ImpressCMS/impresscms

View on GitHub
htdocs/modules/system/admin/tplsets/main.php

Summary

Maintainability
F
6 days
Test Coverage

File main.php has 1044 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
// $Id: main.php 12399 2014-01-25 17:02:01Z skenow $
//  ------------------------------------------------------------------------ //
//                XOOPS - PHP Content Management System                      //
//                    Copyright (c) 2000 XOOPS.org                           //
Severity: Major
Found in htdocs/modules/system/admin/tplsets/main.php - About 2 days to fix

    Consider simplifying this complex logical expression.
    Open

                                    if (isset($infoarr[3]) && trim($infoarr[3]) == 'blocks') {
                                        $default =& $tpltpl_handler->find('default', 'block', NULL, trim($infoarr[2]), trim($infoarr[4]));
                                    } elseif ((!isset($infoarr[4]) || trim($infoarr[4]) == '') && $infoarr[1] == 'templates') {
                                        $default =& $tpltpl_handler->find('default', 'module', NULL, trim($infoarr[2]), trim($infoarr[3]));
                                    } elseif ($infoarr[1] == "templates" && $infoarr[2] == "system" && $infoarr[3] == "admin") {
    Severity: Major
    Found in htdocs/modules/system/admin/tplsets/main.php - About 1 hr to fix

      Avoid deeply nested control flow statements.
      Open

                              if ($files[$i]->getVar('tpl_type') == 'block') {
                                  $path = $tplset . '/templates/' . $files[$i]->getVar('tpl_module') . '/blocks/' . $files[$i]->getVar('tpl_file');
                                  $xml .= "\r\n    <template name=\"" . $files[$i]->getVar('tpl_file') . "\">\r\n      <module>" . $files[$i]->getVar('tpl_module') . "</module>\r\n      <type>block</type>\r\n      <lastModified>" . $files[$i]->getVar('tpl_lastmodified') . "</lastModified>\r\n    </template>";
                              } elseif ($files[$i]->getVar('tpl_type') == 'module') {
                                  $path = $tplset . '/templates/' . $files[$i]->getVar('tpl_module') . '/' . $files[$i]->getVar('tpl_file');
      Severity: Major
      Found in htdocs/modules/system/admin/tplsets/main.php - About 45 mins to fix

        Call to method handler from undeclared class \icms
        Open

                        $module_handler = icms::handler('icms_module');

        Argument 1 (string) is string but \icms_conv_nr2local() takes int defined at /code/htdocs/include/functions.php:1231
        Open

                                    . icms_conv_nr2local($filecount) . '</strong>)]</li>';

        Call to method __construct from undeclared class \icms_form_elements_Hidden
        Open

                $form->addElement(new icms_form_elements_Hidden('fct', 'tplsets'));

        Variable $tplset is undeclared
        Open

                if ($tplset != 'default') {

        Variable $moddir is undeclared
        Open

                                . $moddir . '&amp;tplset=' . $tplset . '&amp;op=generatetpl&amp;type=block&amp;file=' . urlencode($nfile) . '"><img src="'. ICMS_IMAGES_SET_URL . '/actions/filenew2.png" alt="' . _MD_GENERATE . '" title="' . _MD_GENERATE . '" /></a></td>

        Variable $err was undeclared, but array fields are being added to it.
        Open

                    $err[] = 'Selected template (ID: ' . '$id' . ') does not exist';

        Reference to static property security from undeclared class \icms
        Open

                if ($id <= 0 | !icms::$security->check()) {

        Variable $tplset is undeclared
        Open

                $tplset = trim($tplset);

        Variable $theme is undeclared
        Open

                            $msgs[] = '<span style="color:#ff0000;">' . _ERROR . ': ' . sprintf(_MD_TPLSET_FILE_NOTEXIST, $theme) . '</span>';

        Call to method __construct from undeclared class \icms_file_ZipDownloader
        Open

                                $downloader = new icms_file_ZipDownloader();

        Call to method handler from undeclared class \icms
        Open

                $tpltpl_handler =& icms::handler('icms_view_template_file');

        Call to method handler from undeclared class \icms
        Open

                $tpltpl_handler =& icms::handler('icms_view_template_file');

        Reference to undeclared constant \_LIST
        Open

                                    . '&amp;moddir=' . $moddir . '">' . _LIST . '</a> (<strong>'

        Reference to undeclared constant \_DELETE
        Open

                            . '"><img src="'. ICMS_IMAGES_SET_URL . '/actions/editdelete.png" alt="' . _DELETE . '" title="' . _DELETE . '" /></a>';

        Call to method addElement from undeclared class \icms_form_Theme
        Open

                $form->addElement(new icms_form_elements_Hidden('op', 'uploadtar_go'));

        Reference to undeclared constant \_MD_AM_DBUPDATED
        Open

                        redirect_header('admin.php?fct=tplsets&amp;op=edittpl&amp;id=' . $tplfile->getVar('tpl_id'), 2, _MD_AM_DBUPDATED);

        Call to method addElement from undeclared class \icms_form_Theme
        Open

                    $form->addElement(new icms_form_elements_Textarea(_MD_FILEHTML, 'html', $default[0]->getVar('tpl_source'), 25));

        Call to method download from undeclared class \icms_file_TarDownloader
        Open

                        echo $downloader->download($tplset, TRUE);

        Call to method getVar on non-class type null
        Open

                    redirect_header('admin.php?fct=tplsets&amp;op=listtpl&amp;moddir=' . $newtpl->getVar('tpl_module') . '&amp;tplset=' . urlencode($newtpl->getVar('tpl_tplset')), 2, _MD_AM_DBUPDATED);

        Reference to undeclared constant \_MD_AM_DBUPDATED
        Open

                    redirect_header('admin.php?fct=tplsets&amp;op=listtpl&amp;moddir=' . $newtpl->getVar('tpl_module') . '&amp;tplset=' . urlencode($newtpl->getVar('tpl_tplset')), 2, _MD_AM_DBUPDATED);

        Reference to static property security from undeclared class \icms
        Open

                if (!icms::$security->check()) {

        Call to method template_touch from undeclared class \icms_view_Tpl
        Open

                                $icmsAdminTpl->template_touch($newtpl->getVar('tpl_id'));

        Call to method getMediaName from undeclared class \icms_file_MediaUploadHandler
        Open

                        if ($uploader->getMediaName() == '') {

        Variable $tplset is undeclared
        Open

                    if ($tplset != 'default') {

        Variable $moddir is undeclared
        Open

                    $notinst_files = array_diff(icms_core_Filesystem::getFileList(ICMS_MODULES_PATH . '/' . $moddir . '/templates/'), $inst_files);

        Variable $tplset is undeclared
        Open

                                echo '<td style="background-color:' . $bg . ';">' . $last_imported_f . ' <a href="admin.php?fct=tplsets&amp;tplset=' . $tplset . '&amp;op=importtpl&amp;moddir=' . $moddir . '&amp;id=' . $btemplates[$j]->getVar('tpl_id') . '">' . _MD_IMPORT . '</a>]';

        Variable $icms_admin_handler is undeclared
        Open

        $tplset_handler = $icms_admin_handler;

        Reference to undeclared constant \_CLONE
        Open

                        . '"><img src="'. ICMS_IMAGES_SET_URL . '/actions/editcopy.png" alt="' . _CLONE . '" title="' . _CLONE . '" /></a>';

        Variable $id is undeclared
        Open

                if ($id <= 0 | !icms::$security->check()) {

        Call to method handler from undeclared class \icms
        Open

                    $tplset_handler = icms::handler('icms_view_template_set');

        Call to method __construct from undeclared class \icms_form_elements_File
        Open

                $form->addElement(new icms_form_elements_File(_MD_CHOOSETAR . '<br /><span style="color:#ff0000;">' . _MD_ONLYTAR . '</span>', 'tpl_upload', 1000000));

        Reference to static property user from undeclared class \icms
        Open

        if (!is_object(icms::$user) || !is_object($icmsModule) || !icms::$user->isAdmin($icmsModule->getVar('mid'))) {

        Call to method __construct from undeclared class \icms_form_Theme
        Open

                $form = new icms_form_Theme(_MD_CLONETHEME, 'template_form', 'admin.php', 'post', TRUE);

        Reference to undeclared constant \_EDIT
        Open

                            . '<a href="admin.php?fct=tplsets&amp;op=edittpl&amp;id=' . $btemplates[$j]->getVar('tpl_id') . '"><img src="'. ICMS_IMAGES_SET_URL . '/actions/edit.png" alt="' . _EDIT . '" title="' . _EDIT . '" /></a>'

        Call to method __construct from undeclared class \icms_form_elements_Hidden
        Open

                $form->addElement(new icms_form_elements_Hidden('tplset', $tplset));

        Call to method addElement from undeclared class \icms_form_Theme
        Open

                $form->addElement(new icms_form_elements_Text(_MD_NTHEMENAME . '<br /><span style="font-weight:normal;">' . _MD_ENTERTH . '</span>', 'tplset_name', 20, 50));

        Call to method display from undeclared class \icms_form_Theme
        Open

                    $form->display();

        Call to method __construct from undeclared class \icms_form_elements_Hidden
        Open

                $form->addElement(new icms_form_elements_Hidden('fct', 'tplsets'));

        Call to method error from undeclared class \icms_core_Message
        Open

                icms_core_Message::error($err);

        Variable $tplset is undeclared
        Open

                if ($tplset != 'default') {

        Call to method addElement from undeclared class \icms_form_Theme
        Open

                $form->addElement(new icms_form_elements_Button('', 'tpl_button', _SUBMIT, 'submit'));

        Reference to static property security from undeclared class \icms
        Open

                        . '<input type="hidden" name="op" value="update" />' . icms::$security->getTokenHTML()

        Reference to static property security from undeclared class \icms
        Open

                if ($id <= 0 | !icms::$security->check()) {

        Reference to static property security from undeclared class \icms
        Open

                if (!icms::$security->check()) {

        Call to method clear_cache from undeclared class \icms_view_Tpl
        Open

                                if (!$xoopsTpl->clear_cache('db:' . $tplfile->getVar('tpl_file'))) {

        Call to method template_touch from undeclared class \icms_view_Tpl
        Open

                                    $icmsAdminTpl->template_touch($defaulttpl[0]->getVar('tpl_id'), TRUE);

        Reference to undeclared constant \_LANGCODE
        Open

                    . '" /><meta http-equiv="content-language" content="' . _LANGCODE

        Reference to static property security from undeclared class \icms
        Open

                    redirect_header('admin.php?fct=tplsets', 3, implode('<br />', icms::$security->getErrors()));

        Call to method addElement from undeclared class \icms_form_Theme
        Open

                $form->addElement(new icms_form_elements_Button('', 'upload_button', _MD_UPLOAD, 'submit'));

        Variable $method is undeclared
        Open

                        if ($method == 'tar') {

        Reference to static property security from undeclared class \icms
        Open

                if (!icms::$security->check()) {

        Variable $tplset is undeclared
        Open

                            $physical_file = ICMS_THEME_PATH . '/' . $tplset . '/templates/' . $moddir . '/' . $nfile;

        Call to method __construct from undeclared class \icms_form_elements_Label
        Open

                $form->addElement(new icms_form_elements_Label(_MD_THEMENAME, $tplset));

        Reference to undeclared constant \_ERROR
        Open

                        $err = _ERROR . ': ' . sprintf(_MD_TPLSET_INSERT_FAILED, '<strong>' . $tplfile[0]->getVar('tpl_file') . '</strong>');

        Variable $tplset is undeclared
        Open

                    if ($tplset != 'default') {

        Reference to undeclared constant \_ERROR
        Open

                                    . _ERROR . ': ' . sprintf(_MD_TPLSET_DELETE_FAIL, '<strong>' . $templates[$i]->getVar('tpl_file') . '</strong>')

        Call to method error from undeclared class \icms_core_Message
        Open

                    icms_core_Message::error(sprintf(_MD_TPLSET_EXISTS, '<strong>' . $newtheme . '</strong>'));

        Reference to undeclared constant \_DELETE
        Open

                            . ' <a href="admin.php?fct=tplsets&amp;op=deletetpl&amp;id=' . $btemplates[$j]->getVar('tpl_id') . '"><img src="'. ICMS_IMAGES_SET_URL . '/actions/editdelete.png" alt="' . _DELETE . '" title="' . _DELETE . '" /></a>'

        Variable $tplset is undeclared
        Open

                            if ($tplset == $icmsConfig['template_set']) {

        Reference to undeclared constant \_ERROR
        Open

                                    $msgs[] = '&nbsp;<span style="color:#ff0000;">' . _ERROR . ': ' . sprintf(_MD_TPLSET_COPY_FAILED, '<strong>' . $templates[$i]->getVar('tpl_file') . '</strong>')

        Reference to static property security from undeclared class \icms
        Open

                    redirect_header('admin.php?fct=tplsets', 3, implode('<br />', icms::$security->getErrors()));

        Call to method display from undeclared class \icms_form_Theme
        Open

                $form->display();

        Variable $moddir is undeclared
        Open

                    $bnotinst_files = array_diff(icms_core_Filesystem::getFileList(ICMS_MODULES_PATH . '/' . $moddir . '/templates/blocks/'), $binst_files);

        Call to method __construct from undeclared class \icms_form_Theme
        Open

                    $form = new icms_form_Theme(_MD_VIEWDEFAULT, 'template_form', 'admin.php');

        Call to method __construct from undeclared class \icms_file_MediaUploadHandler
        Open

                $uploader = new icms_file_MediaUploadHandler(ICMS_UPLOAD_PATH, array(

        Variable $moddir is undeclared
        Open

                        . '<input type="hidden" name="moddir" value="' . $moddir . '" />'

        Call to method handler from undeclared class \icms
        Open

                $tpltpl_handler =& icms::handler('icms_view_template_file');

        Variable $id is undeclared
        Open

                if ($id <= 0 | !icms::$security->check()) {

        Call to method __construct from undeclared class \icms_file_TarFileHandler
        Open

                        $tar = new icms_file_TarFileHandler();

        Call to method error from undeclared class \icms_core_Message
        Open

                        icms_core_Message::error(_MD_NOZLIB);

        Call to method template_touch from undeclared class \icms_view_Tpl
        Open

                                $icmsAdminTpl->template_touch($id);

        Reference to undeclared constant \_LANGCODE
        Open

                echo '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="' . _LANGCODE . '" lang="' . _LANGCODE

        Reference to undeclared constant \_ERROR
        Open

                            echo '<span style="color:#ff0000;">' . _ERROR . ': ' . _MD_TPLSET_INVALID_NAME . '</span><br />';

        Call to method confirm from undeclared class \icms_core_Message
        Open

                icms_core_Message::confirm(array('tplset' => $tplset, 'moddir' => $moddir, 'file' => $file, 'type' => $type, 'op' => 'generatetpl_go', 'fct' => 'tplsets'), 'admin.php', _MD_PLZGENERATE, _MD_GENERATE);

        Variable $tplset is undeclared
        Open

                            if ($tplset == $icmsConfig['template_set']) {

        Reference to undeclared constant \_MD_AM_DBUPDATED
        Open

                        . urlencode($tplfile->getVar('tpl_tplset')), 2, _MD_AM_DBUPDATED);

        Reference to undeclared constant \_ERROR
        Open

                                            echo '&nbsp;&nbsp;<span style="color:#ff0000;">' . _ERROR . ': ' . _MD_TPLSET_IMGSET_CREATE_FAILED . '</span><br />';

        Variable $tplset is undeclared
        Open

                            $msgs[] = '&nbsp;&nbsp;' . sprintf(_MD_TPLSET_DELETE_OK, $tplset);

        Argument 1 (theme) is null but \xoops_getcss() takes string defined at /code/htdocs/include/functions.php:277
        Open

                        . xoops_getcss($icmsConfig['theme_set']) . '" />';

        Call to method __construct from undeclared class \icms_form_elements_Text
        Open

                $form->addElement(new icms_form_elements_Text(_MD_NEWNAME, 'newtheme', 30, 50), TRUE);

        Call to method __construct from undeclared class \icms_db_criteria_Item
        Open

                } elseif ($tpltpl_handler->getCount(new icms_db_criteria_Item('tpl_tplset', $newtheme)) > 0) {

        Call to method confirm from undeclared class \icms_core_Message
        Open

                icms_core_Message::confirm(array('tplset' => $tplset, 'op' => 'generatemod_go', 'fct' => 'tplsets', 'moddir' => $moddir), 'admin.php', _MD_PLZGENERATE, _MD_GENERATE);

        Reference to static property security from undeclared class \icms
        Open

                    redirect_header('admin.php?fct=tplsets', 3, implode('<br />', icms::$security->getErrors()));

        Call to method openTar from undeclared class \icms_file_TarFileHandler
        Open

                        $tar->openTar($uploader->getSavedDestination());

        Call to method handler from undeclared class \icms
        Open

                                    $tpltpl_handler = icms::handler('icms_view_template_file');

        Call to method addElement from undeclared class \icms_form_Theme
        Open

                $form->addElement(new icms_form_elements_File(_MD_CHOOSETAR . '<br /><span style="color:#ff0000;">' . _MD_ONLYTAR . '</span>', 'tpl_upload', 1000000));

        Call to method handler from undeclared class \icms
        Open

                $tpltpl_handler =& icms::handler('icms_view_template_file');

        Variable $moddir is undeclared
        Open

                        $physical_file = ICMS_THEME_PATH . '/' . $tplset . '/templates/' . $moddir . '/' . $filename;

        Variable $moddir is undeclared
        Open

                                . '<a href="admin.php?fct=tplsets&amp;moddir=' . $moddir . '&amp;tplset=' . $tplset_enc

        Variable $tplset is undeclared
        Open

                                . $moddir . '&amp;tplset=' . $tplset . '&amp;op=generatetpl&amp;type=block&amp;file=' . urlencode($nfile) . '"><img src="'. ICMS_IMAGES_SET_URL . '/actions/filenew2.png" alt="' . _MD_GENERATE . '" title="' . _MD_GENERATE . '" /></a></td>

        Call to method __construct from undeclared class \icms_view_Tpl
        Open

                            $xoopsTpl = new icms_view_Tpl();

        Call to method handler from undeclared class \icms
        Open

                    $tpltpl_handler =& icms::handler('icms_view_template_file');

        Reference to undeclared constant \_ERROR
        Open

                        . _ERROR . ': ' . _MD_TPLSET_DEFAULT_NODELETE

        Call to method addElement from undeclared class \icms_form_Theme
        Open

                $form->addElement(new icms_form_elements_Text(_MD_NEWNAME, 'newtheme', 30, 50), TRUE);

        Call to method addElement from undeclared class \icms_form_Theme
        Open

                $form->addElement(new icms_form_elements_Hidden('fct', 'tplsets'));

        Call to method __construct from undeclared class \icms_db_criteria_Item
        Open

                        $templates =& $tpltpl_handler->getObjects(new icms_db_criteria_Item('tpl_tplset', $tplset), TRUE);

        Call to method handler from undeclared class \icms
        Open

                        $tpltpl_handler =& icms::handler('icms_view_template_file');

        Call to method __construct from undeclared class \icms_db_criteria_Item
        Open

                            if ($tplset_handler->getCount(new icms_db_criteria_Item('tplset_name', $tplset_name)) > 0) {

        Reference to static property security from undeclared class \icms
        Open

                if (!icms::$security->check()) {

        Variable $xoops_upload_file is undeclared
        Open

                foreach ($xoops_upload_file as $upload_file) {

        Call to method fetchMedia from undeclared class \icms_file_MediaUploadHandler
        Open

                    if ($uploader->fetchMedia($upload_file2)) {

        Call to method __construct from undeclared class \icms_view_Tpl
        Open

        $icmsAdminTpl = new icms_view_Tpl();

        Call to method setExtra from undeclared class \icms_form_Theme
        Open

                $form->setExtra('enctype="multipart/form-data"');

        Call to method handler from undeclared class \icms
        Open

                $module_handler = icms::handler('icms_module');

        Variable $moddir is undeclared
        Open

                                echo '[<a href="admin.php?fct=tplsets&amp;moddir=' . $moddir . '&amp;tplset=' . $tplset_enc . '&amp;op=importtpl&amp;file=' . urlencode($nfile) . '">' . _MD_IMPORT . '</a>]';

        Reference to undeclared constant \_ERROR
        Open

                                . _ERROR . ': ' . sprintf(_MD_TPLSET_DELETE_FAIL, $tplset)

        Variable $moddir is undeclared
        Open

                    $physical_file = ICMS_THEME_PATH . '/' . $tplset . '/templates/' . $moddir . '/blocks/' . $filename;

        Variable $id is undeclared
        Open

                $tpl =& $tpltpl_handler->get( (int) ($id), TRUE);

        Reference to static property security from undeclared class \icms
        Open

                    redirect_header('admin.php?fct=tplsets', 3, implode('<br />', icms::$security->getErrors()));

        Variable $tplset is undeclared
        Open

                    $physical_file = ICMS_THEME_PATH . '/' . $tplset . '/templates/' . $moddir . '/blocks/' . $filename;

        Reference to static property security from undeclared class \icms
        Open

                if (!icms::$security->check()) {

        Call to method getErrors from undeclared class \icms_file_MediaUploadHandler
        Open

                        icms_core_Message::error($uploader->getErrors());

        Variable $id is undeclared
        Open

                    $err[] = sprintf(_MD_TPLSET_TEMPLATE_NOTEXIST, $id);

        Call to method getSavedDestination from undeclared class \icms_file_MediaUploadHandler
        Open

                        $tar->openTar($uploader->getSavedDestination());

        Reference to undeclared constant \_MD_AM_DBUPDATED
        Open

                        redirect_header('admin.php?fct=tplsets&amp;tplset=' . $tplfile->getVar('tpl_tplset') . '&amp;op=' . trim($redirect), 2, _MD_AM_DBUPDATED);

        Reference to instance property files from undeclared class \icms_file_TarFileHandler
        Open

                                    foreach ($tar->files as $id => $info) {

        Reference to undeclared constant \_YES
        Open

                icms_core_Message::confirm(array('tplset' => $tplset, 'op' => 'delete_go', 'fct' => 'tplsets'), 'admin.php', _MD_RUSUREDELTH, _YES);

        Call to method getErrors from undeclared class \icms_file_MediaUploadHandler
        Open

                            $msg[] = $uploader->getErrors();

        Call to method __construct from undeclared class \icms_form_elements_Hidden
        Open

                $form->addElement(new icms_form_elements_Hidden('op', 'uploadtar_go'));

        Reference to static property security from undeclared class \icms
        Open

                if (!icms::$security->check()) {

        Call to method display from undeclared class \icms_form_Theme
        Open

                $form->display();

        Variable $tplset is undeclared
        Open

                            $filepath = ICMS_THEME_PATH . '/' . $tplset . '/templates/' . $tplfile->getVar('tpl_module') . '/' . $tplfile->getVar('tpl_file');

        Variable $tplset is undeclared
        Open

                if ($tplset != 'default' && $tplset != $icmsConfig['template_set']) {

        Variable $tplset is undeclared
        Open

                if ($tplset == '') {

        Variable $icmsModule is undeclared
        Open

        if (!is_object(icms::$user) || !is_object($icmsModule) || !icms::$user->isAdmin($icmsModule->getVar('mid'))) {

        Variable $moddir is undeclared
        Open

                                    . ' [<a href="admin.php?fct=tplsets&amp;tplset=' . $tplset_enc . '&amp;moddir=' . $moddir

        Reference to static property security from undeclared class \icms
        Open

                    redirect_header('admin.php?fct=tplsets', 1, implode('<br />', icms::$security->getErrors()));

        Variable $moddir is undeclared
        Open

                                echo '<td style="background-color:' . $bg . ';">' . $last_imported_f . ' <a href="admin.php?fct=tplsets&amp;tplset=' . $tplset . '&amp;op=importtpl&amp;moddir=' . $moddir . '&amp;id=' . $btemplates[$j]->getVar('tpl_id') . '">' . _MD_IMPORT . '</a>]';

        Call to method warning from undeclared class \icms_core_Message
        Open

                if ($tcount == 1) icms_core_Message::warning(_MD_TPLSET_CREATE_OWN, "", TRUE);

        Variable $installed_themes was undeclared, but array fields are being added to it.
        Open

                    $installed_themes[] = $tplsetname;

        Call to method __construct from undeclared class \icms_form_elements_Text
        Open

                $form->addElement(new icms_form_elements_Text(_MD_NTHEMENAME . '<br /><span style="font-weight:normal;">' . _MD_ENTERTH . '</span>', 'tplset_name', 20, 50));

        Variable $moddir is undeclared
        Open

                            $physical_file = ICMS_THEME_PATH . '/' . $tplset . '/templates/' . $moddir . '/blocks/' . $nfile;

        Call to method handler from undeclared class \icms
        Open

                    $tplset_handler = icms::handler('icms_view_template_set');

        Variable $tplset is undeclared
        Open

                $tplset_enc = filter_var($tplset, FILTER_SANITIZE_ENCODED);

        Call to method setPrefix from undeclared class \icms_file_MediaUploadHandler
        Open

                $uploader->setPrefix('tmp');

        Variable $tplset is undeclared
        Open

                if ($tplset != 'default') {

        Call to method fetch from undeclared class \icms_view_Tpl
        Open

                    $lines = preg_split("/(\r\n|\r|\n)( *)/", $xoopsTpl->fetch('file:' . ICMS_CACHE_PATH . '/' . $dummyfile));

        Variable $tplset is undeclared
        Open

                                echo '[<a href="admin.php?fct=tplsets&amp;moddir=' . $moddir . '&amp;tplset=' . $tplset . '&amp;op=importtpl&amp;file=' . urlencode($nfile) . '">' . _MD_IMPORT . '</a>]';

        Call to method confirm from undeclared class \icms_core_Message
        Open

                icms_core_Message::confirm(array('tplset' => $tplset, 'op' => 'delete_go', 'fct' => 'tplsets'), 'admin.php', _MD_RUSUREDELTH, _YES);

        Call to method setPrefix from undeclared class \icms_file_MediaUploadHandler
        Open

                $uploader->setPrefix('tmp');

        Call to method addElement from undeclared class \icms_form_Theme
        Open

                $form->addElement(new icms_form_elements_Label(_MD_THEMENAME, $tplset));

        Call to method handler from undeclared class \icms
        Open

                $tpltpl_handler =& icms::handler('icms_view_template_file');

        Call to method error from undeclared class \icms_core_Message
        Open

                    icms_core_Message::error(_MD_TPLSET_IMPORT_FAILED . ' ' . $filepath);

        Call to method error from undeclared class \icms_core_Message
        Open

                icms_core_Message::error($err);

        Reference to undeclared constant \_SUBMIT
        Open

                $form->addElement(new icms_form_elements_Button('', 'tpl_button', _SUBMIT, 'submit'));

        Reference to undeclared constant \_CHARSET
        Open

                    . '"><head><meta http-equiv="content-type" content="text/html; charset=' . _CHARSET

        Reference to undeclared constant \_ERROR
        Open

                            $msgs[] = '<span style="color:#ff0000;">' . _ERROR . ': ' . sprintf(_MD_TPLSET_FILE_NOTEXIST, $theme) . '</span>';

        Call to method addFileData from undeclared class \icms_file_TarDownloader
        Open

                                $downloader->addFileData($files[$i]->getVar('tpl_source'), $path, $files[$i]->getVar('tpl_lastmodified'));

        Reference to undeclared constant \_CLOSE
        Open

                echo '<div style="text-align:center;">[<a href="#" onclick="javascript:window.close();">' . _CLOSE . '</a>]</div></body></html>';

        Reference to undeclared constant \_ERROR
        Open

                                . _ERROR . ': ' . sprintf(_MD_TPLSET_BLOCK_INSERT_FAILED,'<strong>' . $tplfiles[$i]->getVar('tpl_file') . '</strong>')

        Call to method __construct from undeclared class \icms_file_TarDownloader
        Open

                                $downloader = new icms_file_TarDownloader();

        Reference to undeclared constant \_ERROR
        Open

                                echo '<span style="color:#ff0000;">' . _ERROR . ': ' . sprintf(_MD_TPLSET_EXISTS, '<strong>' . htmlspecialchars($tplset_name, ENT_QUOTES) . '</strong>') . '</span><br />';

        Call to method __construct from undeclared class \icms_db_criteria_Item
        Open

                        $files =& $tpltpl_handler->getObjects(new icms_db_criteria_Item('tpl_tplset', $tplset), TRUE);

        Invalid offset "theme_set" of array type array{template_set:mixed}
        Open

                        . xoops_getcss($icmsConfig['theme_set']) . '" />';

        Call to method assign from undeclared class \icms_view_Tpl
        Open

                        $xoopsTpl->assign('block', $block->buildBlock());

        Variable $moddir is undeclared
        Open

                        . '<a href="./admin.php?fct=tplsets&amp;op=listtpl&amp;moddir=' . $moddir

        Call to method handler from undeclared class \icms
        Open

                            $tpltpl_handler =& icms::handler('icms_view_template_file');

        Reference to static property security from undeclared class \icms
        Open

                if (!icms::$security->check()) {

        Variable $tplset is undeclared
        Open

                        if ($tplset == $icmsConfig['template_set']) {

        Variable $files is undeclared
        Open

                unset($files);

        Call to method upload from undeclared class \icms_file_MediaUploadHandler
        Open

                            if (!$uploader->upload()) {

        Reference to instance property files from undeclared class \icms_file_TarFileHandler
        Open

                        foreach ($tar->files as $id => $info) {

        Variable $moddir is undeclared
        Open

                    . '&amp;moddir=' . $moddir . '">' . _MD_AM_BTOTADMIN . '</a>';

        Reference to static property security from undeclared class \icms
        Open

                    redirect_header('admin.php?fct=tplsets', 3, implode('<br />', icms::$security->getErrors()));

        Call to method checkVarArray from undeclared class \icms_core_DataFilter
        Open

            $clean_POST = icms_core_DataFilter::checkVarArray($_POST, $filter_post, FALSE);

        Reference to undeclared constant \_DELETE
        Open

                            . ' <a href="admin.php?fct=tplsets&amp;op=deletetpl&amp;id=' . $templates[$i]->getVar('tpl_id') . '"><img src="'. ICMS_IMAGES_SET_URL . '/actions/editdelete.png" alt="' . _DELETE . '" title="' . _DELETE . '" /></a>'

        Call to method confirm from undeclared class \icms_core_Message
        Open

                icms_core_Message::confirm(array('id' => $id, 'op' => 'deletetpl_go', 'fct' => 'tplsets'), 'admin.php', _MD_RUSUREDELTPL, _YES);

        Call to method __construct from undeclared class \icms_db_criteria_Item
        Open

                    $tplsets =& $tplset_handler->getObjects(new icms_db_criteria_Item('tplset_name', $tplset));

        Reference to undeclared constant \_ERROR
        Open

                        $msgs[] = '<span style="color:#ff0000;">' . _ERROR . ': ' . sprintf(_MD_TPLSET_CREATE_FAILED, '<strong>' . $newtheme . '</strong>') . '</span><br />';

        Argument 1 (time) is false|int but \formatTimestamp() takes string defined at /code/htdocs/include/functions.php:1428
        Open

                        $filemodified_date = formatTimestamp($tpl_modified, 'l');

        Variable $tplset is undeclared
        Open

                echo '<br />' . sprintf(_MD_TPLSET_TEMPLATE_ADDED, '<strong>' . $tplset . '</strong>')

        Call to method handler from undeclared class \icms
        Open

                            $tplset_handler = icms::handler('icms_view_template_set');

        Call to method getErrors from undeclared class \icms_file_MediaUploadHandler
        Open

                    $err = implode('<br />', $uploader->getErrors(FALSE));

        Suspicious type null of a variable or expression used to build a string. (Expected type to be able to cast to a string)
        Open

                    . '" /><title>' . $icmsConfig['sitename'] . '</title>'

        Reference to static property security from undeclared class \icms
        Open

                    redirect_header('admin.php?fct=tplsets', 3, implode('<br />', icms::$security->getErrors()));

        Variable $tplset is undeclared
        Open

                                if ($tplset == $icmsConfig['template_set']) {

        Call to method handler from undeclared class \icms
        Open

                $tplset_handler = icms::handler('icms_view_template_set');

        Call to method addElement from undeclared class \icms_form_Theme
        Open

                $form->addElement(new icms_form_elements_Hidden('fct', 'tplsets'));

        Variable $tplset is undeclared
        Open

                if ($tplset != 'default') {

        Variable $tplset is undeclared
        Open

                        $physical_file = ICMS_THEME_PATH . '/' . $tplset . '/templates/' . $moddir . '/' . $filename;

        Variable $moddir is undeclared
        Open

                            $physical_file = ICMS_THEME_PATH . '/' . $tplset . '/templates/' . $moddir . '/' . $nfile;

        Variable $tplset is undeclared
        Open

                if ($tplset != 'default') {

        Call to method getFileList from undeclared class \icms_core_Filesystem
        Open

                    $bnotinst_files = array_diff(icms_core_Filesystem::getFileList(ICMS_MODULES_PATH . '/' . $moddir . '/templates/blocks/'), $binst_files);

        Variable $tplset is undeclared
        Open

                            $physical_file = ICMS_THEME_PATH . '/' . $tplset . '/templates/' . $moddir . '/blocks/' . $nfile;

        Variable $id is undeclared
        Open

                if ($id <= 0) {

        Variable $id is undeclared
        Open

                        'tpl_id' => $id,

        Call to method handler from undeclared class \icms
        Open

                $tpltpl_handler =& icms::handler('icms_view_template_file');

        Call to method fetchMedia from undeclared class \icms_file_MediaUploadHandler
        Open

                if ($uploader->fetchMedia($xoops_upload_file[0])) {

        Reference to undeclared constant \_ERROR
        Open

                            echo '<span style="color:#ff0000;">' . _ERROR . ': ' . _MD_TPLSET_NAME_NOT_BLANK . '</span><br />';

        Call to method fetch from undeclared class \icms_view_Tpl
        Open

                    $xoopsTpl->assign('content', $xoopsTpl->fetch('file:' . ICMS_CACHE_PATH . '/' . $dummytpl));

        Call to method __construct from undeclared class \icms_form_Theme
        Open

                $form = new icms_form_Theme(_MD_UPLOADTAR, 'tplupload_form', 'admin.php', 'post', TRUE);

        Call to method __construct from undeclared class \icms_form_elements_Button
        Open

                $form->addElement(new icms_form_elements_Button('', 'upload_button', _MD_UPLOAD, 'submit'));

        Variable $moddir is undeclared
        Open

                if ($moddir == '') {

        Reference to undeclared constant \_EDIT
        Open

                            . '<a href="admin.php?fct=tplsets&amp;op=edittpl&amp;id=' . $templates[$i]->getVar('tpl_id') . '"><img src="'. ICMS_IMAGES_SET_URL . '/actions/edit.png" alt="' . _EDIT . '" title="' . _EDIT . '" /></a>'

        Call to method handler from undeclared class \icms
        Open

                $tpltpl_handler =& icms::handler('icms_view_template_file');

        Call to method is_cached from undeclared class \icms_view_Tpl
        Open

                            if ($xoopsTpl->is_cached('db:' . $tplfile->getVar('tpl_file'))) {

        Call to method error from undeclared class \icms_core_Message
        Open

                icms_core_Message::error($err);

        Reference to static property security from undeclared class \icms
        Open

                    redirect_header('admin.php?fct=tplsets', 1, implode('<br />', icms::$security->getErrors()));

        Call to method __construct from undeclared class \icms_db_criteria_Item
        Open

                    $templates =& $tpltpl_handler->getObjects(new icms_db_criteria_Item('tpl_tplset', $tplset));

        Call to method handler from undeclared class \icms
        Open

                        $tplset_handler = icms::handler('icms_view_template_set');

        Call to method addFileData from undeclared class \icms_file_TarDownloader
        Open

                        $downloader->addFileData($xml, $tplset . '/tplset.xml', time());

        Call to method error from undeclared class \icms_core_Message
        Open

                icms_core_Message::error($err);

        Reference to undeclared constant \_ERROR
        Open

                                    echo '<span style="color:#ff0000;">' . _ERROR . ': ' . sprintf(_MD_TPLSET_CREATE_FAILED, '<strong>' . htmlspecialchars($tplset_name, ENT_QUOTES) . '</strong>') . '</span><br />';

        Call to method checkVarArray from undeclared class \icms_core_DataFilter
        Open

            $clean_GET = icms_core_DataFilter::checkVarArray($_GET, $filter_get, FALSE);

        Reference to undeclared constant \_ERROR
        Open

                                                echo '&nbsp;&nbsp;<span style="color:#ff0000;">' . _ERROR . ': ' . sprintf(_MD_TPLSET_INSERT_FAILED, '<strong>' . $info['name'] . '</strong>') . '</span><br />';

        Variable $op is undeclared
        Open

        if ($op == '') $op = 'list';

        Call to method stripSlashesGPC from undeclared class \icms_core_DataFilter
        Open

                $html = icms_core_DataFilter::stripSlashesGPC($html);

        Call to method handler from undeclared class \icms
        Open

                $tpltpl_handler =& icms::handler('icms_view_template_file');

        Reference to undeclared constant \_CHARSET
        Open

                    . '<html><head><meta http-equiv="content-type" content="text/html; charset=' . _CHARSET

        Reference to undeclared constant \_LIST
        Open

                            . '&amp;moddir=' . $ni . '"><img src="'. ICMS_IMAGES_SET_URL . '/actions/view_choose.png" alt="' . _LIST . '" title="' . _LIST . '" /></a> (<span style="color:#ff0000; font-weight: bold;">0</span>)'

        Call to method __construct from undeclared class \icms_file_MediaUploadHandler
        Open

                $uploader = new icms_file_MediaUploadHandler(ICMS_UPLOAD_PATH, array('text/html', 'application/x-cdf'), 200000);

        Call to method getSavedDestination from undeclared class \icms_file_MediaUploadHandler
        Open

                            $fsource = @fread($fp, filesize($uploader->getSavedDestination()));

        Call to method getSavedDestination from undeclared class \icms_file_MediaUploadHandler
        Open

                            @unlink($uploader->getSavedDestination());

        Call to method confirm from undeclared class \icms_core_Message
        Open

                    icms_core_Message::confirm(array('tplset' => $tplset, 'moddir' => $moddir, 'id' => $id, 'op' => 'importtpl_go', 'fct' => 'tplsets'), 'admin.php', _MD_RUSUREIMPT, _MD_IMPORT);

        Variable $moddir is undeclared
        Open

                                echo '[<a href="admin.php?fct=tplsets&amp;moddir=' . $moddir . '&amp;tplset=' . $tplset . '&amp;op=importtpl&amp;file=' . urlencode($nfile) . '">' . _MD_IMPORT . '</a>]';

        Call to method getFileList from undeclared class \icms_core_Filesystem
        Open

                    $notinst_files = array_diff(icms_core_Filesystem::getFileList(ICMS_MODULES_PATH . '/' . $moddir . '/templates/'), $inst_files);

        Reference to undeclared constant \_YES
        Open

                icms_core_Message::confirm(array('id' => $id, 'op' => 'deletetpl_go', 'fct' => 'tplsets'), 'admin.php', _MD_RUSUREDELTPL, _YES);

        Reference to undeclared constant \_MD_AM_DBUPDATED
        Open

                        redirect_header('admin.php?fct=tplsets', 2, _MD_AM_DBUPDATED);

        Call to method handler from undeclared class \icms
        Open

                $tpltpl_handler =& icms::handler('icms_view_template_file');

        Call to method addElement from undeclared class \icms_form_Theme
        Open

                $form->addElement(new icms_form_elements_Hidden('tplset', $tplset));

        Reference to static property security from undeclared class \icms
        Open

                    redirect_header('admin.php?fct=tplsets', 1, implode('<br />', icms::$security->getErrors()));

        Call to method addElement from undeclared class \icms_form_Theme
        Open

                $form->addElement(new icms_form_elements_Hidden('op', 'clone_go'));

        Variable $tplset is undeclared
        Open

                                . _ERROR . ': ' . sprintf(_MD_TPLSET_DELETE_FAIL, $tplset)

        Call to method __construct from undeclared class \icms_form_elements_Hidden
        Open

                $form->addElement(new icms_form_elements_Hidden('op', 'clone_go'));

        Call to method error from undeclared class \icms_core_Message
        Open

                    icms_core_Message::error(_MD_TPLSET_UNIQUE_NAME);

        Call to method __construct from undeclared class \icms_form_elements_Button
        Open

                $form->addElement(new icms_form_elements_Button('', 'tpl_button', _SUBMIT, 'submit'));

        Argument 1 (string) is null but \htmlspecialchars() takes string
        Open

                    . '" /><title>' . htmlspecialchars($icmsConfig['sitename']) . ' Administration' . '</title>'

        Variable $newtheme is undeclared
        Open

                $newtheme = trim($newtheme);

        Call to method __construct from undeclared class \icms_form_elements_Textarea
        Open

                    $form->addElement(new icms_form_elements_Textarea(_MD_FILEHTML, 'html', $default[0]->getVar('tpl_source'), 25));

        Invalid offset "sitename" of array type array{template_set:mixed}
        Open

                    . '" /><title>' . htmlspecialchars($icmsConfig['sitename']) . ' Administration' . '</title>'

        Call to method display from undeclared class \icms_form_Theme
        Open

                    $form->display();

        Call to method handler from undeclared class \icms
        Open

                $tpltpl_handler =& icms::handler('icms_view_template_file');

        Call to method handler from undeclared class \icms
        Open

                $tpltpl_handler =& icms::handler('icms_view_template_file');

        Call to method template_touch from undeclared class \icms_view_Tpl
        Open

                            $icmsAdminTpl->template_touch($newtpl->getVar('tpl_id'));

        Reference to undeclared constant \_ERROR
        Open

                            . _ERROR . ': ' . sprintf(_MD_TPLSET_INSERT_FAILED, '<strong>' . $file . '</strong>') . '</span><br />';

        Variable $tplset is undeclared
        Open

                    echo sprintf(_MD_TPLSET_INSTALLING . $tplset) . '...<br />';

        Call to method template_touch from undeclared class \icms_view_Tpl
        Open

                                $icmsAdminTpl->template_touch($newtpl->getVar('tpl_id'));

        Call to method getSavedDestination from undeclared class \icms_file_MediaUploadHandler
        Open

                        @unlink($uploader->getSavedDestination());

        Call to method error from undeclared class \icms_core_Message
        Open

                        icms_core_Message::error($uploader->getErrors());

        Reference to undeclared constant \_ERROR
        Open

                                                echo '&nbsp;&nbsp;<span style="color:#ff0000;">' . _ERROR . ': ' . sprintf(_MD_TPLSET_NOT_FOUND, '<strong>' . $info['name'] . '</strong>') . '</span><br />';

        Call to method handler from undeclared class \icms
        Open

                                        $imageset_handler = icms::handler('icms_image_set');

        Call to method __construct from undeclared class \icms_view_Tpl
        Open

                $xoopsTpl = new icms_view_Tpl();

        Variable $id is undeclared
        Open

                    $tform = array('tpl_tplset' => $tplset, 'tpl_id' => $id, 'tpl_file' => $tplfile->getVar('tpl_file'), 'tpl_desc' => $tplfile->getVar('tpl_desc'), 'tpl_lastmodified' => $tplfile->getVar('tpl_lastmodified'), 'tpl_source' => htmlspecialchars($html, ENT_QUOTES), 'tpl_module' => $moddir);

        Reference to undeclared constant \_LANGCODE
        Open

                    . '" /><meta http-equiv="content-language" content="' . _LANGCODE

        Call to method buildBlock from undeclared class \icms_view_block_Object
        Open

                        $xoopsTpl->assign('block', $block->buildBlock());

        Call to method getSavedDestination from undeclared class \icms_file_MediaUploadHandler
        Open

                            $fp = @fopen($uploader->getSavedDestination(), 'r');

        Call to method clear_compiled_tpl from undeclared class \icms_view_Tpl
        Open

                    $xoopsTpl->clear_compiled_tpl('file:' . ICMS_CACHE_PATH . '/' . $dummyfile);

        Call to method confirm from undeclared class \icms_core_Message
        Open

                    icms_core_Message::confirm(array('tplset' => $tplset, 'moddir' => $moddir, 'file' => $file, 'op' => 'importtpl_go', 'fct' => 'tplsets'), 'admin.php', _MD_RUSUREIMPT, _MD_IMPORT);

        Reference to static property security from undeclared class \icms
        Open

                if (!icms::$security->check()) {

        Invalid offset "sitename" of array type array{template_set:mixed}
        Open

                    . '" /><title>' . $icmsConfig['sitename'] . '</title>'

        Variable $moddir is undeclared
        Open

                    $tform = array('tpl_tplset' => $tplset, 'tpl_id' => $id, 'tpl_file' => $tplfile->getVar('tpl_file'), 'tpl_desc' => $tplfile->getVar('tpl_desc'), 'tpl_lastmodified' => $tplfile->getVar('tpl_lastmodified'), 'tpl_source' => htmlspecialchars($html, ENT_QUOTES), 'tpl_module' => $moddir);

        Call to method getErrors from undeclared class \icms_file_MediaUploadHandler
        Open

                            $msg[] = $uploader->getErrors();

        Call to method assign from undeclared class \icms_view_Tpl
        Open

                    $xoopsTpl->assign('content', $xoopsTpl->fetch('file:' . ICMS_CACHE_PATH . '/' . $dummytpl));

        Call to method upload from undeclared class \icms_file_MediaUploadHandler
        Open

                        if (!$uploader->upload()) {

        Variable $tplset is undeclared
        Open

                            $filepath = ICMS_THEME_PATH . '/' . $tplset . '/templates/' . $tplfile->getVar('tpl_module') . '/blocks/' . $tplfile->getVar('tpl_file');

        Reference to undeclared constant \_MD_AM_DBUPDATED
        Open

                redirect_header('admin.php?fct=tplsets&amp;op=listtpl&amp;moddir=' . $tplfile->getVar('tpl_module') . '&amp;tplset=' . urlencode($tplfile->getVar('tpl_tplset')), 2, _MD_AM_DBUPDATED);

        Call to method __construct from undeclared class \icms_view_block_Object
        Open

                        $block = new icms_view_block_Object($tplfile->getVar('tpl_refid'));

        Call to method template_touch from undeclared class \icms_view_Tpl
        Open

                                    if ($icmsAdminTpl->template_touch($tpl->getVar('tpl_id'), TRUE)) {

        Variable $moddir is undeclared
        Open

                    echo '<br /><a href="admin.php?fct=tplsets&amp;op=listtpl&amp;tplset=' . urlencode($tplset) . '&amp;moddir=' . $moddir . '">' . _MD_AM_BTOTADMIN . '</a>';

        Reference to static property security from undeclared class \icms
        Open

                    redirect_header('admin.php?fct=tplsets', 3, implode('<br />', icms::$security->getErrors()));

        Call to method clear_compiled_tpl from undeclared class \icms_view_Tpl
        Open

                    $xoopsTpl->clear_compiled_tpl('file:' . ICMS_CACHE_PATH . '/' . $dummytpl);

        Reference to undeclared constant \_ERROR
        Open

                                                echo '&nbsp;&nbsp;<span style="color:#ff0000;">' . _ERROR . ': ' . sprintf(_MD_TPLSET_IMGSET_LINK_FAILED, '<strong>' . htmlspecialchars($tplset_name, ENT_QUOTES) . '</strong>') . '</span><br />';

        Call to method display from undeclared class \icms_form_Theme
        Open

                    $form->display();

        Variable $tplset is undeclared
        Open

                echo '</code><br /><a href="admin.php?fct=tplsets&amp;op=listtpl&amp;tplset=' . urlencode($tplset)

        Variable $tplset is undeclared
        Open

                    echo '<br /><a href="admin.php?fct=tplsets&amp;op=listtpl&amp;tplset=' . urlencode($tplset) . '&amp;moddir=' . $moddir . '">' . _MD_AM_BTOTADMIN . '</a>';

        Call to method handler from undeclared class \icms
        Open

                $tpltpl_handler =& icms::handler('icms_view_template_file');

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

                        echo '</td><td style="vertical-align: middle;">'
                            . '<a href="admin.php?fct=tplsets&amp;op=edittpl&amp;id=' . $templates[$i]->getVar('tpl_id') . '"><img src="'. ICMS_IMAGES_SET_URL . '/actions/edit.png" alt="' . _EDIT . '" title="' . _EDIT . '" /></a>'
                            . ' <a href="admin.php?fct=tplsets&amp;op=downloadtpl&amp;id=' . $templates[$i]->getVar('tpl_id') . '"><img src="'. ICMS_IMAGES_SET_URL . '/actions/filesave2.png" alt="' . _MD_DOWNLOAD . '" title="' . _MD_DOWNLOAD . '" /></a>'
                            . ' <a href="admin.php?fct=tplsets&amp;op=deletetpl&amp;id=' . $templates[$i]->getVar('tpl_id') . '"><img src="'. ICMS_IMAGES_SET_URL . '/actions/editdelete.png" alt="' . _DELETE . '" title="' . _DELETE . '" /></a>'
                            . '</td><td style="vertical-align: middle;" align="' . _GLOBAL_RIGHT . '"><input type="file" name="' . $filename . '" id="' . $filename . '" />'
        Severity: Major
        Found in htdocs/modules/system/admin/tplsets/main.php and 1 other location - About 7 hrs to fix
        htdocs/modules/system/admin/tplsets/main.php on lines 306..312

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 241.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

                        echo '</td><td style="vertical-align: middle;">'
                            . '<a href="admin.php?fct=tplsets&amp;op=edittpl&amp;id=' . $btemplates[$j]->getVar('tpl_id') . '"><img src="'. ICMS_IMAGES_SET_URL . '/actions/edit.png" alt="' . _EDIT . '" title="' . _EDIT . '" /></a>'
                            . ' <a href="admin.php?fct=tplsets&amp;op=downloadtpl&amp;id=' . $btemplates[$j]->getVar('tpl_id') . '"><img src="'. ICMS_IMAGES_SET_URL . '/actions/filesave2.png" alt="' . _MD_DOWNLOAD . '" title="' . _MD_DOWNLOAD . '" /></a>'
                            . ' <a href="admin.php?fct=tplsets&amp;op=deletetpl&amp;id=' . $btemplates[$j]->getVar('tpl_id') . '"><img src="'. ICMS_IMAGES_SET_URL . '/actions/editdelete.png" alt="' . _DELETE . '" title="' . _DELETE . '" /></a>'
                            . '</td><td style="vertical-align: middle;" align="' . _GLOBAL_RIGHT . '"><input type="file" name="' . $filename . '" id="' . $filename . '" />'
        Severity: Major
        Found in htdocs/modules/system/admin/tplsets/main.php and 1 other location - About 7 hrs to fix
        htdocs/modules/system/admin/tplsets/main.php on lines 230..236

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 241.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

                        if (file_exists($physical_file)) {
                            $mtime = filemtime($physical_file);
                            if ($last_imported < $mtime) {
                                if ($mtime > $last_modified) {
                                    $bg = '#ff9999';
        Severity: Major
        Found in htdocs/modules/system/admin/tplsets/main.php and 1 other location - About 3 hrs to fix
        htdocs/modules/system/admin/tplsets/main.php on lines 291..305

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 150.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

                        if (file_exists($physical_file)) {
                            $mtime = filemtime($physical_file);
                            if ($last_imported < $mtime) {
                                if ($mtime > $last_modified) {
                                    $bg = '#ff9999';
        Severity: Major
        Found in htdocs/modules/system/admin/tplsets/main.php and 1 other location - About 3 hrs to fix
        htdocs/modules/system/admin/tplsets/main.php on lines 212..229

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 150.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

                    if ($tplset != 'default') {
                        $physical_file = ICMS_THEME_PATH . '/' . $tplset . '/templates/' . $moddir . '/' . $filename;
                        if (file_exists($physical_file)) {
                            $mtime = filemtime($physical_file);
                            if ($last_imported < $mtime) {
        Severity: Major
        Found in htdocs/modules/system/admin/tplsets/main.php and 1 other location - About 1 hr to fix
        htdocs/modules/system/admin/tplsets/main.php on lines 290..316

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 108.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

                    if ($tplset != 'default') {
                        if (file_exists($physical_file)) {
                            $mtime = filemtime($physical_file);
                            if ($last_imported < $mtime) {
                                if ($mtime > $last_modified) {
        Severity: Major
        Found in htdocs/modules/system/admin/tplsets/main.php and 1 other location - About 1 hr to fix
        htdocs/modules/system/admin/tplsets/main.php on lines 210..239

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 108.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

                                if ($files[$i]->getVar('tpl_type') == 'block') {
                                    $path = $tplset . '/templates/' . $files[$i]->getVar('tpl_module') . '/blocks/' . $files[$i]->getVar('tpl_file');
                                    $xml .= "\r\n    <template name=\"" . $files[$i]->getVar('tpl_file') . "\">\r\n      <module>" . $files[$i]->getVar('tpl_module') . "</module>\r\n      <type>block</type>\r\n      <lastModified>" . $files[$i]->getVar('tpl_lastmodified') . "</lastModified>\r\n    </template>";
                                } elseif ($files[$i]->getVar('tpl_type') == 'module') {
                                    $path = $tplset . '/templates/' . $files[$i]->getVar('tpl_module') . '/' . $files[$i]->getVar('tpl_file');
        Severity: Major
        Found in htdocs/modules/system/admin/tplsets/main.php and 1 other location - About 1 hr to fix
        htdocs/modules/system/admin/tplsets/main.php on lines 690..693

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 105.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

                                } elseif ($files[$i]->getVar('tpl_type') == 'module') {
                                    $path = $tplset . '/templates/' . $files[$i]->getVar('tpl_module') . '/' . $files[$i]->getVar('tpl_file');
                                    $xml .= "\r\n    <template name=\"" . $files[$i]->getVar('tpl_file') . "\">\r\n      <module>" . $files[$i]->getVar('tpl_module') . "</module>\r\n      <type>module</type>\r\n      <lastModified>" . $files[$i]->getVar('tpl_lastmodified') . "</lastModified>\r\n    </template>";
                                }
        Severity: Major
        Found in htdocs/modules/system/admin/tplsets/main.php and 1 other location - About 1 hr to fix
        htdocs/modules/system/admin/tplsets/main.php on lines 687..693

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 105.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE"
        Open

                if ($tcount == 1) icms_core_Message::warning(_MD_TPLSET_CREATE_OWN, "", TRUE);

        TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE"
        Open

                $tplfile =& $tpltpl_handler->get($id, TRUE);

        TRUE, FALSE and NULL must be lowercase; expected "null" but found "NULL"
        Open

                                            $default =& $tpltpl_handler->find('default', 'block', NULL, trim($infoarr[2]), trim($infoarr[4]));

        TRUE, FALSE and NULL must be lowercase; expected "null" but found "NULL"
        Open

                                $tplfile =& $tpltpl_handler->find('default', NULL, NULL, $moddir, $upload_file);

        TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE"
        Open

                $form = new icms_form_Theme(_MD_UPLOADTAR, 'tplupload_form', 'admin.php', 'post', TRUE);

        Blank line found at start of control structure
        Open

                                if (count($defaulttpl) > 0) {

        TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE"
        Open

                $form = new icms_form_Theme(_MD_CLONETHEME, 'template_form', 'admin.php', 'post', TRUE);

        TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE"
        Open

                        $templates =& $tpltpl_handler->getObjects(new icms_db_criteria_Item('tpl_tplset', $tplset), TRUE);

        TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE"
        Open

                            $tpl->setVar('tpl_source', $fsource, TRUE);

        Blank line found at end of control structure
        Open

        
        

        TRUE, FALSE and NULL must be lowercase; expected "null" but found "NULL"
        Open

                $tplfiles =& $tpltpl_handler->find('default', 'module', NULL, $moddir, NULL, TRUE);

        TRUE, FALSE and NULL must be lowercase; expected "null" but found "NULL"
        Open

                $tplfiles =& $tpltpl_handler->find('default', 'block', NULL, $moddir, NULL, TRUE);

        TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE"
        Open

                $error = TRUE;

        TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE"
        Open

                                    $icmsAdminTpl->template_touch($defaulttpl[0]->getVar('tpl_id'), TRUE);

        TRUE, FALSE and NULL must be lowercase; expected "false" but found "FALSE"
        Open

                    if (FALSE !== extension_loaded('zlib')) {

        TRUE, FALSE and NULL must be lowercase; expected "false" but found "FALSE"
        Open

            $clean_POST = icms_core_DataFilter::checkVarArray($_POST, $filter_post, FALSE);

        TRUE, FALSE and NULL must be lowercase; expected "null" but found "NULL"
        Open

                $tplfiles =& $tpltpl_handler->find('default', 'module', NULL, $moddir, NULL, TRUE);

        TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE"
        Open

                $tplfiles =& $tpltpl_handler->find('default', 'block', NULL, $moddir, NULL, TRUE);

        TRUE, FALSE and NULL must be lowercase; expected "null" but found "NULL"
        Open

                                            $default =& $tpltpl_handler->find('default', 'module', NULL, trim($infoarr[2]), trim($infoarr[3]));

        TRUE, FALSE and NULL must be lowercase; expected "false" but found "FALSE"
        Open

                    $err = implode('<br />', $uploader->getErrors(FALSE));

        TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE"
        Open

                $tplfile =& $tpltpl_handler->get($id, TRUE);

        TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE"
        Open

                    $tplfiles =& $tpltpl_handler->find('default', NULL, NULL, NULL, trim($file), TRUE);

        TRUE, FALSE and NULL must be lowercase; expected "null" but found "NULL"
        Open

                    $css =& $tpltpl_handler->find($icmsConfig['template_set'], 'css', 0, NULL, NULL, TRUE);

        TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE"
        Open

                            $tplfile->setVar('tpl_source', $filesource, TRUE);

        TRUE, FALSE and NULL must be lowercase; expected "null" but found "NULL"
        Open

                    $tplfiles =& $tpltpl_handler->find('default', NULL, NULL, NULL, trim($file), TRUE);

        TRUE, FALSE and NULL must be lowercase; expected "null" but found "NULL"
        Open

                    $css =& $tpltpl_handler->find($icmsConfig['template_set'], 'css', 0, NULL, NULL, TRUE);

        Blank line found at start of control structure
        Open

                    if ($tplfile->getVar('tpl_type') == 'block') {

        TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE"
        Open

                                    if ($icmsAdminTpl->template_touch($tpl->getVar('tpl_id'), TRUE)) {

        TRUE, FALSE and NULL must be lowercase; expected "null" but found "NULL"
        Open

                    $tplfiles =& $tpltpl_handler->find('default', NULL, NULL, NULL, trim($file), TRUE);

        TRUE, FALSE and NULL must be lowercase; expected "false" but found "FALSE"
        Open

            $clean_GET = icms_core_DataFilter::checkVarArray($_GET, $filter_get, FALSE);

        TRUE, FALSE and NULL must be lowercase; expected "null" but found "NULL"
        Open

                $templates =& $tpltpl_handler->find($tplset, 'module', NULL, $moddir);

        TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE"
        Open

                $tplfile =& $tpltpl_handler->get($id, TRUE);

        TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE"
        Open

                $form->addElement(new icms_form_elements_Text(_MD_NEWNAME, 'newtheme', 30, 50), TRUE);

        TRUE, FALSE and NULL must be lowercase; expected "null" but found "NULL"
        Open

                                $tplfile =& $tpltpl_handler->find('default', NULL, NULL, $moddir, $upload_file);

        Blank line found at start of control structure
        Open

                                if ($tplset == $icmsConfig['template_set']) {

        TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE"
        Open

                    $tplfile =& $tpltpl_handler->get($id, TRUE);

        TRUE, FALSE and NULL must be lowercase; expected "false" but found "FALSE"
        Open

                        if (FALSE !== $fp = fopen($filepath, 'r')) {

        TRUE, FALSE and NULL must be lowercase; expected "false" but found "FALSE"
        Open

                                $error = FALSE;

        TRUE, FALSE and NULL must be lowercase; expected "null" but found "NULL"
        Open

                                $defaulttpl =& $tpltpl_handler->find('default', $tplfile->getVar('tpl_type'), $tplfile->getVar('tpl_refid'), NULL, $tplfile->getVar('tpl_file'));

        TRUE, FALSE and NULL must be lowercase; expected "null" but found "NULL"
        Open

                                            $default =& $tpltpl_handler->find('default', 'module', NULL, trim($infoarr[2]), $file);

        TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE"
        Open

                        $files =& $tpltpl_handler->getObjects(new icms_db_criteria_Item('tpl_tplset', $tplset), TRUE);

        TRUE, FALSE and NULL must be lowercase; expected "null" but found "NULL"
        Open

                $tplfile =& $tpltpl_handler->find('default', $type, NULL, $moddir, $file, TRUE);

        TRUE, FALSE and NULL must be lowercase; expected "false" but found "FALSE"
        Open

                                            if (strrpos($info["name"], "tplset.xml") === FALSE) {

        TRUE, FALSE and NULL must be lowercase; expected "null" but found "NULL"
        Open

                    $tplfiles =& $tpltpl_handler->find('default', NULL, NULL, NULL, trim($file), TRUE);

        Blank line found at start of control structure
        Open

                        if ($tplset == $icmsConfig['template_set']) {

        TRUE, FALSE and NULL must be lowercase; expected "null" but found "NULL"
        Open

                $tplfiles =& $tpltpl_handler->find('default', 'block', NULL, $moddir, NULL, TRUE);

        TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE"
        Open

                        echo $downloader->download($tplset, TRUE);

        TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE"
        Open

                                            $newtpl->setVar('tpl_source', $info['file'], TRUE);

        TRUE, FALSE and NULL must be lowercase; expected "false" but found "FALSE"
        Open

                        $themefound = FALSE;

        TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE"
        Open

                $tplfiles =& $tpltpl_handler->find('default', 'module', NULL, $moddir, NULL, TRUE);

        Blank line found at start of control structure
        Open

                            if ($tplset == $icmsConfig['template_set']) {

        TRUE, FALSE and NULL must be lowercase; expected "null" but found "NULL"
        Open

                $default =& $tpltpl_handler->find('default', $tplfile->getVar('tpl_type'), $tplfile->getVar('tpl_refid'), NULL, $tplfile->getVar('tpl_file'));

        TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE"
        Open

                $tpl =& $tpltpl_handler->get( (int) ($id), TRUE);

        TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE"
        Open

                $tplfile =& $tpltpl_handler->find('default', $type, NULL, $moddir, $file, TRUE);

        TRUE, FALSE and NULL must be lowercase; expected "null" but found "NULL"
        Open

                $btemplates =& $tpltpl_handler->find($tplset, 'block', NULL, $moddir);

        Blank line found at start of control structure
        Open

                            if ($tplset == $icmsConfig['template_set']) {

        TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE"
        Open

                    $css =& $tpltpl_handler->find($icmsConfig['template_set'], 'css', 0, NULL, NULL, TRUE);

        TRUE, FALSE and NULL must be lowercase; expected "false" but found "FALSE"
        Open

                if (FALSE !== $error) {

        Only one argument is allowed per line in a multi-line function call
        Open

                $uploader = new icms_file_MediaUploadHandler(ICMS_UPLOAD_PATH, array(

        Inline control structures are not allowed
        Open

        if ($op == '') $op = 'list';

        Inline control structures are not allowed
        Open

            if (isset($_GET['filter_post'])) unset ($_GET['filter_post']);

        Inline control structures are not allowed
        Open

                if ($tcount == 1) icms_core_Message::warning(_MD_TPLSET_CREATE_OWN, "", TRUE);

        No space found after comma in function call
        Open

                        } elseif  (preg_match('/[' . preg_quote('\/:*?"<>|','/') . ']/', $tplset_name)) {

        Opening parenthesis of a multi-line function call must be the last content on the line
        Open

                $uploader = new icms_file_MediaUploadHandler(ICMS_UPLOAD_PATH, array(

        Line indented incorrectly; expected 3 tabs, found 5
        Open

                            if (!$uploader->upload()) {

        Multi-line function call not indented correctly; expected 8 spaces but found 12
        Open

                    1000000);

        Closing parenthesis of a multi-line function call must be on a line by itself
        Open

                    1000000);

        Space after opening parenthesis of function call prohibited
        Open

                $tpl =& $tpltpl_handler->get( (int) ($id), TRUE);

        No space found after comma in function call
        Open

                                . _ERROR . ': ' . sprintf(_MD_TPLSET_BLOCK_INSERT_FAILED,'<strong>' . $tplfiles[$i]->getVar('tpl_file') . '</strong>')

        Closing brace indented incorrectly; expected 20 spaces, found 12
        Open

                    } else {

        Expected 1 space after ELSEIF keyword; 2 found
        Open

                        } elseif  (preg_match('/[' . preg_quote('\/:*?"<>|','/') . ']/', $tplset_name)) {

        Space before opening parenthesis of function call prohibited
        Open

            if (isset($_GET['filter_post'])) unset ($_GET['filter_post']);

        Unexpected trailing spaces found.
        Open

                                    

        Unexpected trailing spaces found.
        Open

                    

        Unexpected trailing spaces found.
        Open

                                    

        There are no issues that match your filters.

        Category
        Status