XoopsModules25x/apcal

View on GitHub
xoops_version.php

Summary

Maintainability
D
2 days
Test Coverage

File xoops_version.php has 896 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
/*
 * You may not change or alter any portion of this comment or credits
 * of supporting developers from this source code or any supporting source code
 * which is considered copyrighted (c) material of the original comment or credit authors.
Severity: Major
Found in xoops_version.php - About 2 days to fix

    Consider simplifying this complex logical expression.
    Open

    if (!empty($_POST['fct']) && !empty($_POST['op']) && !empty($_POST['diranme']) && $_POST['fct'] === 'modulesadmin'
        && $_POST['op'] === 'update_ok'
        && $_POST['dirname'] == $modversion['dirname']
    ) {
        include __DIR__ . '/include/onupdate.inc.php';
    Severity: Major
    Found in xoops_version.php - About 40 mins to fix

      Line exceeds 120 characters; contains 142 characters
      Open

          echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">' . "\r\n";
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line exceeds 120 characters; contains 134 characters
      Open

          echo '<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xml:lang="en" lang="en"><head>' . "\r\n";
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['config'][] = [
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      ];
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      ];
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      ];
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      ];
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['config'][] = [
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['config'][] = [
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['config'][] = [
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      ];
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['config'][] = [
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      ];
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['config'][] = [
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      ];
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      ];
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['config'][] = [
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['config'][] = [
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['config'][] = [
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      ];
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      ];
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['config'][] = [
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['config'][] = [
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['search']['func'] = "apcal{$mydirnumber}_search";
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['notification']['category'][1]['title']          = _MI_APCAL_GLOBAL_NOTIFY;
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['notification']['category'][1]['subscribe_from'] = array('index.php');
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['notification']['category'][2]['title']          = _MI_APCAL_CATEGORY_NOTIFY;
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['notification']['category'][3]['title']          = _MI_APCAL_EVENT_NOTIFY;
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['notification']['event'][1]['mail_template'] = 'global_newevent_notify';
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['onUpdate']  = 'include/onupdate.php';
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['config'][] = [
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      ];
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['config'][] = [
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['notification']['category'][1]['description']    = _MI_APCAL_GLOBAL_NOTIFYDSC;
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected 4 spaces, found 0
      Open

      }
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['notification']['category'][3]['subscribe_from'] = array('index.php');
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['onInstall'] = 'include/oninstall.php';
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      ];
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['config'][] = [
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['config'][] = [
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['config'][] = [
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['comments']['callback']['update']  = 'apcal_comments_update';
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['hasNotification']             = 1;
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['notification']['lookup_func'] = "apcal{$mydirnumber}_notify_iteminfo";
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['notification']['category'][3]['name']           = 'event';
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['notification']['category'][3]['allow_bookmark'] = 1;
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['notification']['event'][1]['caption']       = _MI_APCAL_GLOBAL_NEWEVENT_NOTIFYCAP;
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['notification']['event'][2]['name']          = 'new_event';
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['config'][] = [
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['config'][] = [
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      ];
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['notification']['event'][2]['mail_subject']  = _MI_APCAL_CATEGORY_NEWEVENT_NOTIFYSBJ;
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['config'][] = [
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      ];
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      ];
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      ];
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['comments']['callbackFile']        = 'include/comment_functions.php';
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['notification']['category'][2]['allow_bookmark'] = 1;
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      ];
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      ];
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 5 spaces, found 4
      Open

          include __DIR__ . '/include/onupdate.inc.php';
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['config'][] = [
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['notification']['event'][2]['description']   = _MI_APCAL_CATEGORY_NEWEVENT_NOTIFYDSC;
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      ];
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      ];
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      ];
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['search']['file'] = 'include/search.inc.php';
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['notification']['category'][3]['description']    = _MI_APCAL_EVENT_NOTIFYDSC;
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['notification']['event'][2]['category']      = 'category';
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['notification']['event'][2]['title']         = _MI_APCAL_CATEGORY_NEWEVENT_NOTIFY;
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['config'][] = [
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['config'][] = [
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['notification']['lookup_file'] = 'include/notification.inc.php';
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['notification']['event'][1]['category']      = 'global';
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['notification']['event'][1]['description']   = _MI_APCAL_GLOBAL_NEWEVENT_NOTIFYDSC;
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['config'][] = [
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['notification']['category'][1]['name']           = 'global';
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['notification']['event'][2]['mail_template'] = 'category_newevent_notify';
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      ) {
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['comments']['itemName'] = 'event_id';
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['notification']['category'][2]['item_name']      = 'cid';
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['notification']['category'][3]['item_name']      = 'event_id';
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      ];
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['config'][] = [
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      ];
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['config'][] = [
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['hasComments']          = 1;
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['comments']['callback']['approve'] = 'apcal_comments_approve';
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['templates'] = [
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['notification']['category'][2]['name']           = 'category';
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['notification']['category'][2]['description']    = _MI_APCAL_CATEGORY_NOTIFYDSC;
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['notification']['event'][1]['title']         = _MI_APCAL_GLOBAL_NEWEVENT_NOTIFY;
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      ];
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['config'][] = [
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      ];
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      ];
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['config'][] = [
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['config'][] = [
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      ];
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      ];
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      ];
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      ];
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['comments']['pageName'] = 'index.php';
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['notification']['event'][1]['name']          = 'new_event';
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['notification']['event'][1]['mail_subject']  = _MI_APCAL_GLOBAL_NEWEVENT_NOTIFYSBJ;
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['config'][] = [
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['hasSearch']      = 1;
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['notification']['category'][2]['subscribe_from'] = array('index.php');
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected at least 1 spaces, found 0
      Open

      $modversion['notification']['event'][2]['caption']       = _MI_APCAL_CATEGORY_NEWEVENT_NOTIFYCAP;
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      Line indented incorrectly; expected 1 spaces, found 0
      Open

      if (!empty($_POST['fct']) && !empty($_POST['op']) && !empty($_POST['diranme']) && $_POST['fct'] === 'modulesadmin'
      Severity: Minor
      Found in xoops_version.php by phpcodesniffer

      There are no issues that match your filters.

      Category
      Status