ImpressCMS/impresscms

View on GitHub
htdocs/search.php

Summary

Maintainability
D
1 day
Test Coverage

File search.php has 265 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
// $Id: search.php 12313 2013-09-15 21:14:35Z skenow $
//  ------------------------------------------------------------------------ //
//                XOOPS - PHP Content Management System                      //
//                    Copyright (c) 2000 XOOPS.org                           //
Severity: Minor
Found in htdocs/search.php - About 2 hrs to fix

    Avoid deeply nested control flow statements.
    Open

                                if (!empty($results[$i]['uid'])) {
                                    $uname = icms_member_user_Object::getUnameFromId($results[$i]['uid']);
                                    $results[$i]['processed_user_name'] = $uname;
                                    $results[$i]['processed_user_url'] = ICMS_URL . "/userinfo.php?uid=" . $results[$i]['uid'];
                                }
    Severity: Major
    Found in htdocs/search.php - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                                  if (!preg_match("/^http[s]*:\/\//i", $results[$i]['link'])) {
                                      $results[$i]['link'] = "modules/" . $moddir . "/" . $results[$i]['link'];
                                  }
      Severity: Major
      Found in htdocs/search.php - About 45 mins to fix

        Reference to undeclared constant \_SR_SHOWING
        Open

                        $xoopsTpl->assign("showing", sprintf(_SR_SHOWING, 1, $max_results_per_page));
        Severity: Minor
        Found in htdocs/search.php by phan

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

                                    $results[$i]['processed_image_url'] = "modules/" . $moddir . "/" . $results[$i]['image'];
        Severity: Minor
        Found in htdocs/search.php by phan

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

                                    $results[$i]['processed_time'] = !empty($results[$i]['time']) ? " (" . formatTimestamp( (int) $results[$i]['time']) . ")" : "";
        Severity: Minor
        Found in htdocs/search.php by phan

        Variable $icmsConfigSearch is undeclared
        Open

        $search_limiter = (($icmsConfigSearch['enable_deep_search'] == FALSE) ? $icmsConfigSearch['num_shallow_search'] : FALSE);
        Severity: Minor
        Found in htdocs/search.php by phan

        Reference to undeclared constant \_SR_PLZENTER
        Open

                redirect_header("search.php", 1, _SR_PLZENTER);
        Severity: Minor
        Found in htdocs/search.php by phan

        Variable $xoopsTpl is undeclared
        Open

        $xoopsTpl->assign('basic_search', FALSE);
        Severity: Minor
        Found in htdocs/search.php by phan

        Variable $icmsConfigSearch is undeclared
        Open

                                if ($icmsConfigSearch['search_user_date']) {
        Severity: Minor
        Found in htdocs/search.php by phan

        Variable $xoopsTpl is undeclared
        Open

        $xoopsTpl->assign("label_search_type", _SR_TYPE . ':');
        Severity: Minor
        Found in htdocs/search.php by phan

        Reference to undeclared constant \_SR_KEYTOOSHORT
        Open

                    redirect_header('search.php', 2, sprintf(_SR_KEYTOOSHORT, icms_conv_nr2local($icmsConfigSearch['keyword_min'])));
        Severity: Minor
        Found in htdocs/search.php by phan

        Variable $xoopsTpl is undeclared
        Open

            $xoopsTpl->assign("ignored_keywords", $ignored_keywords);
        Severity: Minor
        Found in htdocs/search.php by phan

        Reference to undeclared constant \_CHARSET
        Open

        $xoopsTpl->assign('icms_pagetitle', _SR_SEARCHRESULTS . ' - ' . htmlspecialchars(implode(' ',$keywords), ENT_COMPAT, _CHARSET));
        Severity: Minor
        Found in htdocs/search.php by phan

        Call to method __construct from undeclared class \icms_db_criteria_Item
        Open

                $criteria = new icms_db_criteria_Compo(new icms_db_criteria_Item('hassearch', 1));
        Severity: Critical
        Found in htdocs/search.php by phan

        Call to method checkVar from undeclared class \icms_core_DataFilter
        Open

                                $results[$i]['processed_image_alt_text'] = icms_core_DataFilter::checkVar($modname, 'text', 'output') . ": ";
        Severity: Critical
        Found in htdocs/search.php by phan

        Variable $xoopsTpl is undeclared
        Open

            $xoopsTpl->assign('basic_search', TRUE);
        Severity: Minor
        Found in htdocs/search.php by phan

        Reference to undeclared constant \_SR_KEYTOOSHORT
        Open

                    redirect_header('search.php', 2, sprintf(_SR_KEYTOOSHORT, icms_conv_nr2local($icmsConfigSearch['keyword_min'])));
        Severity: Minor
        Found in htdocs/search.php by phan

        Reference to static property user from undeclared class \icms
        Open

        $groups = is_object(icms::$user) ? icms::$user->getGroups() : XOOPS_GROUP_ANONYMOUS;
        Severity: Critical
        Found in htdocs/search.php by phan

        Variable $icmsConfigSearch is undeclared
        Open

                    if (strlen($q) >= $icmsConfigSearch['keyword_min']) {
        Severity: Minor
        Found in htdocs/search.php by phan

        Reference to undeclared constant \_CHARSET
        Open

                $ignored_keywords[] = htmlspecialchars(stripslashes($q), ENT_COMPAT, _CHARSET);
        Severity: Minor
        Found in htdocs/search.php by phan

        Reference to undeclared constant \_SR_SEARCHRESULTS
        Open

        $xoopsTpl->assign('icms_pagetitle', _SR_SEARCHRESULTS . ' - ' . htmlspecialchars(implode(' ',$keywords), ENT_COMPAT, _CHARSET));
        Severity: Minor
        Found in htdocs/search.php by phan

        Invalid offset "time" of array type array{link:string}|array{processed_image_alt_text:string}|array{processed_image_url:'images/icons/posticon2.gif'}|array{processed_image_url:string}|array{processed_title:}|array{processed_user_name:}|array{processed_user_url:string}|array{uid:int}
        Open

                                    $results[$i]['processed_time'] = !empty($results[$i]['time']) ? " (" . formatTimestamp( (int) $results[$i]['time']) . ")" : "";
        Severity: Minor
        Found in htdocs/search.php by phan

        Variable $icmsConfigSearch is undeclared
        Open

                            if ($icmsConfigSearch['enable_deep_search'] == FALSE) {
        Severity: Minor
        Found in htdocs/search.php by phan

        Call to method checkVar from undeclared class \icms_core_DataFilter
        Open

                        $results[$i]['processed_image_alt_text'] = icms_core_DataFilter::checkVar($modname, 'text', 'output') . ": ";
        Severity: Critical
        Found in htdocs/search.php by phan

        Variable $icmsConfigSearch is undeclared
        Open

                        if ($icmsConfigSearch['search_user_date']) {
        Severity: Minor
        Found in htdocs/search.php by phan

        Variable $xoopsTpl is undeclared
        Open

        $xoopsTpl->assign("module_sort_order", $all_results_counts);
        Severity: Minor
        Found in htdocs/search.php by phan

        Reference to undeclared constant \_SR_TYPE
        Open

        $xoopsTpl->assign("label_search_type", _SR_TYPE . ':');
        Severity: Minor
        Found in htdocs/search.php by phan

        Reference to undeclared constant \_SR_ALL
        Open

        if ($andor == 'AND') $label_andor = _SR_ALL;
        Severity: Minor
        Found in htdocs/search.php by phan

        Call to method addSlashes from undeclared class \icms_core_DataFilter
        Open

                $queries = array(icms_core_DataFilter::addSlashes($query));
        Severity: Critical
        Found in htdocs/search.php by phan

        Reference to undeclared constant \_SR_SEARCHRESULTS
        Open

        $xoopsTpl->assign("label_search_results", _SR_SEARCHRESULTS);
        Severity: Minor
        Found in htdocs/search.php by phan

        Variable $xoopsTpl is undeclared
        Open

        $xoopsTpl->assign("label_keywords", _SR_KEYWORDS . ':');
        Severity: Minor
        Found in htdocs/search.php by phan

        Call to method __construct from undeclared class \icms_db_criteria_Item
        Open

                $criteria->add(new icms_db_criteria_Item('isactive', 1));
        Severity: Critical
        Found in htdocs/search.php by phan

        Invalid offset "link" of array type array{processed_image_alt_text:string}|array{processed_image_url:'images/icons/posticon2.gif'}|array{processed_image_url:string}
        Open

                                if (isset ($results[$i]['link']) && $results[$i]['link'] != '') {
        Severity: Minor
        Found in htdocs/search.php by phan

        Invalid offset "title" of array type array{link:string}|array{processed_image_alt_text:string}|array{processed_image_url:'images/icons/posticon2.gif'}|array{processed_image_url:string}
        Open

                                    $results[$i]['processed_title'] = icms_core_DataFilter::checkVar($results[$i]['title'], 'text', 'output');
        Severity: Minor
        Found in htdocs/search.php by phan

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

                                        $results[$i]['link'] = "modules/" . $moddir . "/" . $results[$i]['link'];
        Severity: Minor
        Found in htdocs/search.php by phan

        Invalid offset "uid" of array type array{link:string}|array{processed_image_alt_text:string}|array{processed_image_url:'images/icons/posticon2.gif'}|array{processed_image_url:string}|array{processed_title:}|null
        Open

                                    $results[$i]['uid'] = @ (int) $results[$i]['uid'];
        Severity: Minor
        Found in htdocs/search.php by phan

        Call to method getUnameFromId from undeclared class \icms_member_user_Object
        Open

                                $uname = icms_member_user_Object::getUnameFromId($results[$i]['uid']);
        Severity: Critical
        Found in htdocs/search.php by phan

        Call to method handler from undeclared class \icms
        Open

        $gperm_handler = icms::handler('icms_member_groupperm');
        Severity: Critical
        Found in htdocs/search.php by phan

        Variable $xoopsTpl is undeclared
        Open

            $xoopsTpl->assign('search_form', $search_form);
        Severity: Minor
        Found in htdocs/search.php by phan

        Reference to undeclared constant \_SR_EXACT
        Open

        if ($andor == 'exact') $label_andor = _SR_EXACT;
        Severity: Minor
        Found in htdocs/search.php by phan

        Variable $xoopsTpl is undeclared
        Open

        $xoopsTpl->assign("label_search_results", _SR_SEARCHRESULTS);
        Severity: Minor
        Found in htdocs/search.php by phan

        Reference to undeclared constant \_CHARSET
        Open

                                "search_more_url" => htmlspecialchars($search_url, ENT_COMPAT, _CHARSET),
        Severity: Minor
        Found in htdocs/search.php by phan

        Variable $xoopsTpl is undeclared
        Open

        $xoopsTpl->assign("search_results", $all_results);
        Severity: Minor
        Found in htdocs/search.php by phan

        Reference to undeclared constant \_SR_PLZENTER
        Open

                redirect_header("search.php", 1, _SR_PLZENTER);
        Severity: Minor
        Found in htdocs/search.php by phan

        Reference to undeclared constant \_SEARCH
        Open

            $xoopsTpl->assign('icms_pagetitle', _SEARCH);
        Severity: Minor
        Found in htdocs/search.php by phan

        Variable $xoopsTpl is undeclared
        Open

        $xoopsTpl->assign("search_type", $label_andor);
        Severity: Minor
        Found in htdocs/search.php by phan

        Call to method addSlashes from undeclared class \icms_core_DataFilter
        Open

                        $ignored_queries[] = icms_core_DataFilter::addSlashes($q);
        Severity: Critical
        Found in htdocs/search.php by phan

        Reference to undeclared constant \_SR_KEYWORDS
        Open

        $xoopsTpl->assign("label_keywords", _SR_KEYWORDS . ':');
        Severity: Minor
        Found in htdocs/search.php by phan

        Variable $xoopsTpl is undeclared
        Open

        $xoopsTpl->assign("searched_keywords", $keywords);
        Severity: Minor
        Found in htdocs/search.php by phan

        Variable $xoopsTpl is undeclared
        Open

        $xoopsTpl->assign('icms_pagetitle', _SR_SEARCHRESULTS . ' - ' . htmlspecialchars(implode(' ',$keywords), ENT_COMPAT, _CHARSET));
        Severity: Minor
        Found in htdocs/search.php by phan

        Variable $xoopsTpl is undeclared
        Open

                        $xoopsTpl->assign("showing", sprintf(_SR_SHOWING, 1, $max_results_per_page));
        Severity: Minor
        Found in htdocs/search.php by phan

        Variable $icmsConfigSearch is undeclared
        Open

                $max_results_per_page = (int) $icmsConfigSearch['search_per_page'];
        Severity: Minor
        Found in htdocs/search.php by phan

        Call to method handler from undeclared class \icms
        Open

                $module_handler = icms::handler('icms_module');
        Severity: Critical
        Found in htdocs/search.php by phan

        Reference to undeclared constant \_SR_SHOWALLR
        Open

                            $all_results[$modname] = array("search_more_title" => _SR_SHOWALLR,
        Severity: Minor
        Found in htdocs/search.php by phan

        Reference to undeclared constant \_SR_NOMATCH
        Open

                    echo '<p>' . _SR_NOMATCH . '</p>';
        Severity: Minor
        Found in htdocs/search.php by phan

        Call to method handler from undeclared class \icms
        Open

                $module_handler = icms::handler('icms_module');
        Severity: Critical
        Found in htdocs/search.php by phan

        Call to method __construct from undeclared class \icms_db_criteria_Compo
        Open

                $criteria = new icms_db_criteria_Compo(new icms_db_criteria_Item('hassearch', 1));
        Severity: Critical
        Found in htdocs/search.php by phan

        Argument 2 (subject) is null but \preg_match() takes string
        Open

                                    if (!preg_match("/^http[s]*:\/\//i", $results[$i]['link'])) {
        Severity: Minor
        Found in htdocs/search.php by phan

        Invalid offset "link" of array type array{processed_image_alt_text:string}|array{processed_image_url:'images/icons/posticon2.gif'}|array{processed_image_url:string}
        Open

                                        $results[$i]['link'] = "modules/" . $moddir . "/" . $results[$i]['link'];
        Severity: Minor
        Found in htdocs/search.php by phan

        Variable $xoopsTpl is undeclared
        Open

        $xoopsTpl->assign('search_form', $search_form);
        Severity: Minor
        Found in htdocs/search.php by phan

        Variable $xoopsTpl is undeclared
        Open

            $xoopsTpl->assign('icms_pagetitle', _SEARCH);
        Severity: Minor
        Found in htdocs/search.php by phan

        Call to method addSlashes from undeclared class \icms_core_DataFilter
        Open

                        $queries[] = icms_core_DataFilter::addSlashes($q);
        Severity: Critical
        Found in htdocs/search.php by phan

        Variable $xoopsTpl is undeclared
        Open

            $xoopsTpl->assign("label_ignored_keywords", sprintf(_SR_IGNOREDWORDS, $icmsConfigSearch['keyword_min']));
        Severity: Minor
        Found in htdocs/search.php by phan

        Call to method add from undeclared class \icms_db_criteria_Compo
        Open

                $criteria->add(new icms_db_criteria_Item('mid', "(" . implode(',', $available_modules) . ")", 'IN'));
        Severity: Critical
        Found in htdocs/search.php by phan

        Invalid offset "link" of array type array{processed_image_alt_text:string}|array{processed_image_url:'images/icons/posticon2.gif'}|array{processed_image_url:string}
        Open

                                    if (!preg_match("/^http[s]*:\/\//i", $results[$i]['link'])) {
        Severity: Minor
        Found in htdocs/search.php by phan

        Call to method getUnameFromId from undeclared class \icms_member_user_Object
        Open

                                        $uname = icms_member_user_Object::getUnameFromId($results[$i]['uid']);
        Severity: Critical
        Found in htdocs/search.php by phan

        Variable $icmsConfigSearch is undeclared
        Open

                if (strlen($query) < $icmsConfigSearch['keyword_min']) {
        Severity: Minor
        Found in htdocs/search.php by phan

        Variable $icmsConfigSearch is undeclared
        Open

            $xoopsTpl->assign("label_ignored_keywords", sprintf(_SR_IGNOREDWORDS, $icmsConfigSearch['keyword_min']));
        Severity: Minor
        Found in htdocs/search.php by phan

        Call to method __construct from undeclared class \icms_db_criteria_Item
        Open

                $criteria->add(new icms_db_criteria_Item('mid', "(" . implode(',', $available_modules) . ")", 'IN'));
        Severity: Critical
        Found in htdocs/search.php by phan

        Invalid offset "image" of array type array{processed_image_alt_text:string}
        Open

                                if (isset($results[$i]['image']) && $results[$i]['image'] != "") {
        Severity: Minor
        Found in htdocs/search.php by phan

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

                            $results[$i]['processed_time'] = !empty($results[$i]['time']) ? " (". formatTimestamp((int) $results[$i]['time']) . ")" : "";
        Severity: Minor
        Found in htdocs/search.php by phan

        Variable $icmsConfigSearch is undeclared
        Open

        if ($icmsConfigSearch['enable_search'] == FALSE) {
        Severity: Minor
        Found in htdocs/search.php by phan

        Reference to undeclared constant \_SR_PLZENTER
        Open

                redirect_header("search.php", 1, _SR_PLZENTER);
        Severity: Minor
        Found in htdocs/search.php by phan

        Reference to undeclared constant \_SR_IGNOREDWORDS
        Open

            $xoopsTpl->assign("label_ignored_keywords", sprintf(_SR_IGNOREDWORDS, $icmsConfigSearch['keyword_min']));
        Severity: Minor
        Found in htdocs/search.php by phan

        Variable $icmsConfigSearch is undeclared
        Open

                $max_results_per_page = (int) ($icmsConfigSearch['num_shallow_search']);
        Severity: Minor
        Found in htdocs/search.php by phan

        Call to method checkVar from undeclared class \icms_core_DataFilter
        Open

                        $results[$i]['processed_title'] = icms_core_DataFilter::checkVar($results[$i]['title'], 'text', 'output');
        Severity: Critical
        Found in htdocs/search.php by phan

        Variable $xoopsTpl is undeclared
        Open

        $xoopsTpl->assign("start", $start + 1);
        Severity: Minor
        Found in htdocs/search.php by phan

        Call to method renderNav from undeclared class \icms_view_PageNav
        Open

                    "page_nav" => $pagenav->renderNav());
        Severity: Critical
        Found in htdocs/search.php by phan

        Variable $icmsConfigSearch is undeclared
        Open

                    redirect_header('search.php', 2, sprintf(_SR_KEYTOOSHORT, icms_conv_nr2local($icmsConfigSearch['keyword_min'])));
        Severity: Minor
        Found in htdocs/search.php by phan

        Reference to undeclared constant \_CHARSET
        Open

            $keywords[] = htmlspecialchars(stripslashes($q), ENT_COMPAT, _CHARSET);
        Severity: Minor
        Found in htdocs/search.php by phan

        Call to method add from undeclared class \icms_db_criteria_Compo
        Open

                $criteria->add(new icms_db_criteria_Item('isactive', 1));
        Severity: Critical
        Found in htdocs/search.php by phan

        Invalid offset "image" of array type array{processed_image_alt_text:string}
        Open

                                    $results[$i]['processed_image_url'] = "modules/" . $moddir . "/" . $results[$i]['image'];
        Severity: Minor
        Found in htdocs/search.php by phan

        Call to method checkVar from undeclared class \icms_core_DataFilter
        Open

                                    $results[$i]['processed_title'] = icms_core_DataFilter::checkVar($results[$i]['title'], 'text', 'output');
        Severity: Critical
        Found in htdocs/search.php by phan

        Call to method __construct from undeclared class \icms_view_PageNav
        Open

                    $pagenav = new icms_view_PageNav($count, $max_results_per_page, $start, "start", $search_url_get_params);
        Severity: Critical
        Found in htdocs/search.php by phan

        Reference to undeclared constant \_SR_ANY
        Open

        if ($andor == 'OR') $label_andor = _SR_ANY;
        Severity: Minor
        Found in htdocs/search.php by phan

        Variable $icmsConfigSearch is undeclared
        Open

                    redirect_header('search.php', 2, sprintf(_SR_KEYTOOSHORT, icms_conv_nr2local($icmsConfigSearch['keyword_min'])));
        Severity: Minor
        Found in htdocs/search.php by phan

        Variable $icmsConfigSearch is undeclared
        Open

                            if ($icmsConfigSearch['search_no_res_mod']) {
        Severity: Minor
        Found in htdocs/search.php by phan

        Reference to undeclared constant \_CHARSET
        Open

                    $search_url_get_params = htmlspecialchars($search_url_get_params, ENT_COMPAT, _CHARSET);
        Severity: Minor
        Found in htdocs/search.php by phan

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

                                if ($icmsConfigSearch['search_user_date']) {
                                    $results[$i]['uid'] = @ (int) $results[$i]['uid'];
                                    if (!empty($results[$i]['uid'])) {
                                        $uname = icms_member_user_Object::getUnameFromId($results[$i]['uid']);
                                        $results[$i]['processed_user_name'] = $uname;
        Severity: Major
        Found in htdocs/search.php and 1 other location - About 4 hrs to fix
        htdocs/search.php on lines 300..308

        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 182.

        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

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

                        if ($icmsConfigSearch['search_user_date']) {
                            $results[$i]['uid'] = @ (int) $results[$i]['uid'];
                            if (!empty($results[$i]['uid'])) {
                                $uname = icms_member_user_Object::getUnameFromId($results[$i]['uid']);
                                $results[$i]['processed_user_name'] = $uname;
        Severity: Major
        Found in htdocs/search.php and 1 other location - About 4 hrs to fix
        htdocs/search.php on lines 236..244

        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 182.

        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 "false" but found "FALSE"
        Open

        $search_limiter = (($icmsConfigSearch['enable_deep_search'] == FALSE) ? $icmsConfigSearch['num_shallow_search'] : FALSE);
        Severity: Minor
        Found in htdocs/search.php by phpcodesniffer

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

        if ($icmsConfigSearch['enable_search'] == FALSE) {
        Severity: Minor
        Found in htdocs/search.php by phpcodesniffer

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

        $xoopsTpl->assign('basic_search', FALSE);
        Severity: Minor
        Found in htdocs/search.php by phpcodesniffer

        Expected 1 space before "=>"; 0 found
        Open

                    foreach ($simples as $k=>$v) {
        Severity: Minor
        Found in htdocs/search.php by phpcodesniffer

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

                            if ($icmsConfigSearch['enable_deep_search'] == FALSE) {
        Severity: Minor
        Found in htdocs/search.php by phpcodesniffer

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

            $xoopsTpl->assign('basic_search', TRUE);
        Severity: Minor
        Found in htdocs/search.php by phpcodesniffer

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

        $search_limiter = (($icmsConfigSearch['enable_deep_search'] == FALSE) ? $icmsConfigSearch['num_shallow_search'] : FALSE);
        Severity: Minor
        Found in htdocs/search.php by phpcodesniffer

        Expected 1 space after "=>"; 0 found
        Open

                    foreach ($simples as $k=>$v) {
        Severity: Minor
        Found in htdocs/search.php by phpcodesniffer

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

                $modules =& $module_handler->getObjects($criteria, TRUE);
        Severity: Minor
        Found in htdocs/search.php by phpcodesniffer

        Inline control structures are not allowed
        Open

        if ($andor == 'AND') $label_andor = _SR_ALL;
        Severity: Minor
        Found in htdocs/search.php by phpcodesniffer

        Inline control structures are not allowed
        Open

        if ($andor == 'exact') $label_andor = _SR_EXACT;
        Severity: Minor
        Found in htdocs/search.php by phpcodesniffer

        Inline control structures are not allowed
        Open

        if ($andor == 'OR') $label_andor = _SR_ANY;
        Severity: Minor
        Found in htdocs/search.php by phpcodesniffer

        No space found after comma in function call
        Open

        $xoopsTpl->assign('icms_pagetitle', _SR_SEARCHRESULTS . ' - ' . htmlspecialchars(implode(' ',$keywords), ENT_COMPAT, _CHARSET));
        Severity: Minor
        Found in htdocs/search.php by phpcodesniffer

        Space before opening parenthesis of function call prohibited
        Open

                                if (isset ($results[$i]['link']) && $results[$i]['link'] != '') {
        Severity: Minor
        Found in htdocs/search.php by phpcodesniffer

        Space after opening parenthesis of function call prohibited
        Open

                                    $results[$i]['processed_time'] = !empty($results[$i]['time']) ? " (" . formatTimestamp( (int) $results[$i]['time']) . ")" : "";
        Severity: Minor
        Found in htdocs/search.php by phpcodesniffer

        There are no issues that match your filters.

        Category
        Status