XoopsModules25x/about

View on GitHub

Showing 434 of 434 total issues

template_lookup accesses the super-global variable $GLOBALS.
Open

    public static function &template_lookup($index_by_page = false)
    {
        require_once XOOPS_ROOT_PATH . '/class/xoopslists.php';

        $files = \XoopsLists::getHtmlListAsArray(XOOPS_ROOT_PATH . '/modules/' . $GLOBALS['artdirname'] . '/templates/');
Severity: Minor
Found in class/Utility.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

rmove accesses the super-global variable $GLOBALS.
Open

    public static function rmove($src, $dest)
    {
        // Only continue if user is a 'global' Admin
        if (!($GLOBALS['xoopsUser'] instanceof \XoopsUser) || !$GLOBALS['xoopsUser']->isAdmin()) {
            return false;
Severity: Minor
Found in class/Common/FilesManagement.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

template_lookup accesses the super-global variable $GLOBALS.
Open

    public static function &template_lookup($index_by_page = false)
    {
        require_once XOOPS_ROOT_PATH . '/class/xoopslists.php';

        $files = \XoopsLists::getHtmlListAsArray(XOOPS_ROOT_PATH . '/modules/' . $GLOBALS['artdirname'] . '/templates/');
Severity: Minor
Found in class/Utility.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

Line exceeds 120 characters; contains 132 characters
Open

                $content_length = mb_strlen(\preg_replace('/&[0-9a-z]{2,8};|&#\d{1,7};|[0-9a-f]{1,6};/i', ' ', $line_matchings[2]));
Severity: Minor
Found in class/Common/SysUtility.php by phpcodesniffer

Line exceeds 120 characters; contains 142 characters
Open

                    if (\preg_match_all('/&[0-9a-z]{2,8};|&#\d{1,7};|[0-9a-f]{1,6};/i', $line_matchings[2], $entities, PREG_OFFSET_CAPTURE)) {
Severity: Minor
Found in class/Common/SysUtility.php by phpcodesniffer

Line exceeds 120 characters; contains 239 characters
Open

        $downloads = \ini_get('file_uploads') ? '<span style="color: #008000;">' . \constant('CO_' . $moduleDirNameUpper . '_ON') . '</span>' : '<span style="color: #ff0000;">' . \constant('CO_' . $moduleDirNameUpper . '_OFF') . '</span>';
Severity: Minor
Found in class/Common/ServerStats.php by phpcodesniffer

Line exceeds 120 characters; contains 202 characters
Open

        $result = $GLOBALS['xoopsDB']->queryF("INSERT INTO $table (" . implode(', ', array_keys($tempTable)) . ") VALUES ('" . implode("', '", $tempTable) . "')") or exit ($GLOBALS['xoopsDB']->error());
Severity: Minor
Found in class/Common/SysUtility.php by phpcodesniffer

Line exceeds 120 characters; contains 135 characters
Open

$linkResults[Constants::PUBLISHED]     = array_key_exists(Constants::PUBLISHED, $linkResults) ? $linkResults[Constants::PUBLISHED] : 0;
Severity: Minor
Found in admin/index.php by phpcodesniffer

Line exceeds 120 characters; contains 204 characters
Open

        //    $safemode = ini_get('safe_mode') ? constant('CO_' . $moduleDirNameUpper . '_ON') . constant('CO_' . $moduleDirNameUpper . '_SAFEMODEPROBLEMS : constant('CO_' . $moduleDirNameUpper . '_OFF');
Severity: Minor
Found in class/Common/ServerStats.php by phpcodesniffer

Line exceeds 120 characters; contains 165 characters
Open

                $descEditor = new \XoopsFormEditor(\ucfirst($options['name']), $helper->getConfig('editorUser'), $options, $nohtml = false, $onfailure = 'textarea');
Severity: Minor
Found in class/Common/SysUtility.php by phpcodesniffer

Line exceeds 120 characters; contains 135 characters
Open

            $descEditor = new \XoopsFormDhtmlTextArea(\ucfirst($options['name']), $options['name'], $options['value'], '100%', '100%');
Severity: Minor
Found in class/Common/SysUtility.php by phpcodesniffer

Line exceeds 120 characters; contains 144 characters
Open

            $helper->redirect('admin/admin.page.php', Constants::REDIRECT_DELAY_MEDIUM, sprintf(_AM_ABOUT_SAVEDSUCCESS, _AM_ABOUT_PAGE_INSERT));
Severity: Minor
Found in admin/admin.page.php by phpcodesniffer

Line exceeds 120 characters; contains 141 characters
Open

        $pageEditor        = new \XoopsFormEditor('', $helper->getConfig('editorAdmin'), $options, $nohtml = false, $onfailure = 'textarea');
Severity: Minor
Found in include/form.page.php by phpcodesniffer

Line exceeds 120 characters; contains 165 characters
Open

                    if (\preg_match('/^<(\s*.+?\/\s*|\s*(img|br|input|hr|area|base|basefont|col|frame|isindex|link|meta|param)(\s.+?)?)>$/is', $line_matchings[1])) {
Severity: Minor
Found in class/Common/SysUtility.php by phpcodesniffer

Line exceeds 120 characters; contains 149 characters
Open

    $menu->addElement(new \XoopsFormText(_AM_ABOUT_PAGE_MENU_TITLE . ':', 'page_menu_title', 30, 255, $pageObj->getVar('page_menu_title', $format)));
Severity: Minor
Found in include/form.page.php by phpcodesniffer

Line exceeds 120 characters; contains 148 characters
Open

$form->addElement(new \XoopsFormRadioYN(_AM_ABOUT_PAGE_STATUS, 'page_status', $list_status, $yes = _AM_ABOUT_PAGE_SUB, $no = _AM_ABOUT_PAGE_DRAFT));
Severity: Minor
Found in include/form.page.php by phpcodesniffer

Line exceeds 120 characters; contains 172 characters
Open

        $sql = 'DELETE FROM ' . $GLOBALS['xoopsDB']->prefix('tplfile') . " WHERE `tpl_module` = '" . $module->getVar('dirname', 'n') . '\' AND `tpl_file` LIKE \'%.html%\'';
Severity: Minor
Found in include/onupdate.php by phpcodesniffer

Line exceeds 120 characters; contains 133 characters
Open

        if (is_readable($xoops->path('modules/' . $GLOBALS['artdirname'] . '/assets/css/style_' . mb_strtolower($style) . '.css'))) {
Severity: Minor
Found in class/Utility.php by phpcodesniffer

Line exceeds 120 characters; contains 139 characters
Open

        $xoopsOption['xoops_pagetitle'] = htmlspecialchars(_MD_ABOUT_INDEX . ' - ' . $helper->getModule()->name(), ENT_QUOTES | ENT_HTML5);
Severity: Minor
Found in index.php by phpcodesniffer

Line exceeds 120 characters; contains 142 characters
Open

            $helper->redirect('admin/admin.page.php', Constants::REDIRECT_DELAY_MEDIUM, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
Severity: Minor
Found in admin/admin.page.php by phpcodesniffer
Severity
Category
Status
Source
Language