These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | use Xmf\Metagen; |
||
4 | use Xmf\Highlighter; |
||
5 | use Xmf\Request; |
||
6 | |||
7 | // |
||
8 | // ------------------------------------------------------------------------ // |
||
9 | // XOOPS - PHP Content Management System // |
||
10 | // Copyright (c) 2000-2016 XOOPS.org // |
||
11 | // <https://xoops.org/> // |
||
12 | // ------------------------------------------------------------------------ // |
||
13 | // This program is free software; you can redistribute it and/or modify // |
||
14 | // it under the terms of the GNU General Public License as published by // |
||
15 | // the Free Software Foundation; either version 2 of the License, or // |
||
16 | // (at your option) any later version. // |
||
17 | // // |
||
18 | // You may not change or alter any portion of this comment or credits // |
||
19 | // of supporting developers from this source code or any supporting // |
||
20 | // source code which is considered copyrighted (c) material of the // |
||
21 | // original comment or credit authors. // |
||
22 | // // |
||
23 | // This program is distributed in the hope that it will be useful, // |
||
24 | // but WITHOUT ANY WARRANTY; without even the implied warranty of // |
||
25 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // |
||
26 | // GNU General Public License for more details. // |
||
27 | // // |
||
28 | // You should have received a copy of the GNU General Public License // |
||
29 | // along with this program; if not, write to the Free Software // |
||
30 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // |
||
31 | // ------------------------------------------------------------------------ // |
||
32 | // Author: phppp (D.J., [email protected]) // |
||
33 | // URL: https://xoops.org // |
||
34 | // Project: Article Project // |
||
35 | // ------------------------------------------------------------------------ // |
||
36 | |||
37 | include_once __DIR__ . '/header.php'; |
||
38 | xoops_loadLanguage('search'); |
||
39 | /** @var \XoopsConfigHandler $configHandler */ |
||
40 | $configHandler = xoops_getHandler('config'); |
||
41 | $xoopsConfigSearch = $configHandler->getConfigsByCat(XOOPS_CONF_SEARCH); |
||
42 | if (1 !== $xoopsConfigSearch['enable_search']) { |
||
43 | redirect_header(XOOPS_URL . '/modules/newbb/index.php', 2, _MD_NEWBB_SEARCHDISABLED); |
||
44 | } |
||
45 | |||
46 | $GLOBALS['xoopsConfig']['module_cache'][$xoopsModule->getVar('mid')] = 0; |
||
47 | $xoopsOption['template_main'] = 'newbb_search.tpl'; |
||
48 | include_once $GLOBALS['xoops']->path('header.php'); |
||
49 | |||
50 | include_once __DIR__ . '/include/functions.render.php'; |
||
51 | include_once __DIR__ . '/include/functions.forum.php'; |
||
52 | include_once __DIR__ . '/include/functions.time.php'; |
||
53 | |||
54 | include_once $GLOBALS['xoops']->path('modules/newbb/include/search.inc.php'); |
||
55 | $limit = $GLOBALS['xoopsModuleConfig']['topics_per_page']; |
||
56 | |||
57 | $queries = []; |
||
58 | $andor = ''; |
||
59 | $start = 0; |
||
60 | $uid = 0; |
||
61 | $forum = 0; |
||
62 | $sortby = 'p.post_time'; // irmtfan remove DESC |
||
63 | $criteriaExtra = new CriteriaCompo(); // irmtfan new criteria |
||
64 | $searchin = 'both'; |
||
65 | $sort = ''; |
||
66 | $since = Request::getInt('since', null); |
||
67 | $next_search['since'] = $since; |
||
0 ignored issues
–
show
|
|||
68 | $term = Request::getString('term', null); |
||
69 | $uname = Request::getString('uname', null); |
||
70 | // irmtfan add select parameters |
||
71 | $selectlength = Request::getInt('selectlength', 200); |
||
72 | |||
73 | // irmtfan assign default values to variables |
||
74 | $show_search = 'post_text'; |
||
0 ignored issues
–
show
$show_search does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
75 | $search_username = trim($uname); |
||
0 ignored issues
–
show
$search_username does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
76 | |||
77 | if ($GLOBALS['xoopsModuleConfig']['wol_enabled']) { |
||
78 | // /** @var \NewbbOnlineHandler $onlineHandler */ |
||
0 ignored issues
–
show
Unused Code
Comprehensibility
introduced
by
42% of this comment could be valid code. Did you maybe forget this after debugging?
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it. The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production. This check looks for comments that seem to be mostly valid code and reports them. ![]() |
|||
79 | // $onlineHandler = xoops_getModuleHandler('online', 'newbb'); |
||
80 | $onlineHandler->init(0); |
||
81 | } |
||
82 | |||
83 | $xoopsTpl->assign('forumindex', sprintf(_MD_NEWBB_FORUMINDEX, htmlspecialchars($GLOBALS['xoopsConfig']['sitename'], ENT_QUOTES))); |
||
84 | //$xoopsTpl->assign("img_folder", newbbDisplayImage($forumImage['topic'])); |
||
0 ignored issues
–
show
Unused Code
Comprehensibility
introduced
by
82% of this comment could be valid code. Did you maybe forget this after debugging?
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it. The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production. This check looks for comments that seem to be mostly valid code and reports them. ![]() |
|||
85 | |||
86 | if (!empty($uname) || Request::getString('submit', '') || !empty($term)) { |
||
87 | // irmtfan filter positive numbers |
||
88 | $selectlength = !empty($selectlength) ? abs($selectlength) : 200; |
||
89 | // irmtfan add select parameters for next search |
||
90 | $next_search['selectlength'] = $selectlength; |
||
0 ignored issues
–
show
$next_search does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
91 | |||
92 | $start = Request::getInt('start', 0); |
||
93 | $forum = Request::getInt('forum', null); |
||
94 | if (empty($forum) || 'all' === $forum || (is_array($forum) && in_array('all', $forum, true))) { |
||
95 | $forum = []; |
||
96 | } elseif (!is_array($forum)) { |
||
97 | $forum = array_map('intval', explode('|', $forum)); |
||
98 | } |
||
99 | $next_search['forum'] = implode('|', $forum); |
||
0 ignored issues
–
show
$next_search does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
100 | // START irmtfan topic search |
||
101 | $topic = Request::getString('topic', null); |
||
102 | $next_search['topic'] = $topic; |
||
0 ignored issues
–
show
$next_search does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
103 | // END irmtfan topic search |
||
104 | // START irmtfan add show search |
||
105 | $show_search = Request::getString('show_search', 'post_text'); |
||
0 ignored issues
–
show
$show_search does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
106 | $next_search['show_search'] = $show_search; |
||
0 ignored issues
–
show
$next_search does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
107 | // START irmtfan add show search |
||
108 | |||
109 | $addterms = Request::getString('andor', 'AND'); |
||
110 | $next_search['andor'] = $addterms; |
||
0 ignored issues
–
show
$next_search does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
111 | $andor = strtoupper($addterms); |
||
112 | if (!in_array($addterms, ['OR', 'AND'], true)) { |
||
113 | $andor = 'AND'; |
||
114 | } |
||
115 | |||
116 | $uname_required = false; |
||
0 ignored issues
–
show
$uname_required does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
117 | $next_search['uname'] = $search_username; |
||
0 ignored issues
–
show
$next_search does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
118 | if (!empty($search_username)) { |
||
0 ignored issues
–
show
$search_username does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
119 | $uname_required = true; |
||
0 ignored issues
–
show
$uname_required does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
120 | $search_username = $GLOBALS['xoopsDB']->escape($search_username); |
||
0 ignored issues
–
show
$search_username does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
121 | if (!$result = $GLOBALS['xoopsDB']->query('SELECT uid FROM ' . $GLOBALS['xoopsDB']->prefix('users') . " WHERE uname LIKE '%$search_username%'")) { |
||
0 ignored issues
–
show
$search_username does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
122 | redirect_header(XOOPS_URL . '/search.php', 1, _MD_NEWBB_ERROROCCURED); |
||
123 | } |
||
124 | $uid = []; |
||
125 | while ($row = $GLOBALS['xoopsDB']->fetchArray($result)) { |
||
126 | $uid[] = $row['uid']; |
||
127 | } |
||
128 | } else { |
||
129 | $uid = 0; |
||
130 | } |
||
131 | |||
132 | $next_search['term'] = htmlspecialchars($term, ENT_QUOTES); |
||
0 ignored issues
–
show
$next_search does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
133 | $query = trim($term); |
||
134 | |||
135 | if ('EXACT' !== $andor) { |
||
136 | $ignored_queries = []; // holds keywords that are shorter than allowed minimum length |
||
0 ignored issues
–
show
$ignored_queries does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
137 | $temp_queries = str_getcsv($query, ' ', '"'); |
||
0 ignored issues
–
show
$temp_queries does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
138 | foreach ($temp_queries as $q) { |
||
0 ignored issues
–
show
$temp_queries does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
139 | $q = trim($q); |
||
140 | if (strlen($q) >= $xoopsConfigSearch['keyword_min']) { |
||
141 | $queries[] = $q; |
||
142 | } else { |
||
143 | $ignored_queries[] = $q; |
||
0 ignored issues
–
show
$ignored_queries does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
144 | } |
||
145 | } |
||
146 | View Code Duplication | if (!$uname_required && 0 === count($queries)) { |
|
0 ignored issues
–
show
This code seems to be duplicated across your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() $uname_required does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
147 | redirect_header(XOOPS_URL . '/search.php', 2, sprintf(_SR_KEYTOOSHORT, $xoopsConfigSearch['keyword_min'])); |
||
148 | } |
||
149 | } else { |
||
150 | //$query = trim($query); |
||
0 ignored issues
–
show
Unused Code
Comprehensibility
introduced
by
56% of this comment could be valid code. Did you maybe forget this after debugging?
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it. The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production. This check looks for comments that seem to be mostly valid code and reports them. ![]() |
|||
151 | View Code Duplication | if (!$uname_required && (strlen($query) < $xoopsConfigSearch['keyword_min'])) { |
|
0 ignored issues
–
show
This code seems to be duplicated across your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() $uname_required does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
152 | redirect_header(XOOPS_URL . '/search.php', 2, sprintf(_SR_KEYTOOSHORT, $xoopsConfigSearch['keyword_min'])); |
||
153 | } |
||
154 | $queries = [$query]; |
||
155 | } |
||
156 | |||
157 | // entries must be lowercase |
||
158 | $allowed = ['p.post_time', 'p.subject']; // irmtfan just post time and subject |
||
159 | |||
160 | $sortby = Request::getString('sortby', 'p.post_time'); |
||
161 | $next_search['sortby'] = $sortby; |
||
0 ignored issues
–
show
$next_search does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
162 | //$sortby = (in_array(strtolower($sortby), $allowed)) ? $sortby : 't.topic_last_post_id'; |
||
0 ignored issues
–
show
Unused Code
Comprehensibility
introduced
by
60% of this comment could be valid code. Did you maybe forget this after debugging?
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it. The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production. This check looks for comments that seem to be mostly valid code and reports them. ![]() |
|||
163 | $sortby = in_array(strtolower($sortby), $allowed) ? $sortby : 'p.post_time'; |
||
164 | $searchin = Request::getString('searchin', 'both'); |
||
165 | $next_search['searchin'] = $searchin; |
||
0 ignored issues
–
show
$next_search does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
166 | // START irmtfan use criteria - add since and topic search |
||
167 | if (!empty($since)) { |
||
168 | $criteriaExtra->add(new Criteria('p.post_time', time() - newbbGetSinceTime($since), '>='), 'OR'); |
||
169 | } |
||
170 | if (is_numeric($topic) && !empty($topic)) { |
||
171 | $criteriaExtra->add(new Criteria('p.topic_id', $topic), 'OR'); |
||
172 | } |
||
173 | // END irmtfan use criteria - add since and topic search |
||
174 | |||
175 | if ($uname_required && (!$uid || count($uid) < 1)) { |
||
0 ignored issues
–
show
$uname_required does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
176 | $results = []; |
||
177 | } // irmtfan bug fix array() |
||
178 | else { |
||
179 | $results = newbb_search($queries, $andor, $limit, $start, $uid, $forum, $sortby, $searchin, $criteriaExtra); |
||
0 ignored issues
–
show
$forum is of type array , but the function expects a integer .
It seems like the type of the argument is not accepted by the function/method which you are calling. In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug. We suggest to add an explicit type cast like in the following example: function acceptsInteger($int) { }
$x = '123'; // string "123"
// Instead of
acceptsInteger($x);
// we recommend to use
acceptsInteger((integer) $x);
![]() |
|||
180 | } // irmtfan $criteriaExtra |
||
181 | |||
182 | $search_info_keywords = Highlighter::apply($myts->htmlSpecialChars($term, ENT_QUOTES), implode(' ', $queries), '<mark>', '</mark>'); |
||
0 ignored issues
–
show
$search_info_keywords does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
183 | $num_results = count($results); |
||
0 ignored issues
–
show
$num_results does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
184 | if ($num_results < 1) { |
||
0 ignored issues
–
show
$num_results does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
185 | $xoopsTpl->assign('lang_nomatch', _SR_NOMATCH); |
||
186 | } else { |
||
187 | $skipresults = 0; |
||
188 | foreach ($results as $row) { |
||
189 | $post_text_select = ''; |
||
0 ignored issues
–
show
$post_text_select does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
190 | $post_subject_select = Highlighter::apply($queries, $row['title'], '<mark>', '</mark>'); |
||
0 ignored issues
–
show
$post_subject_select does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
191 | if ('post_text' === $show_search) { |
||
0 ignored issues
–
show
$show_search does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
192 | $post_text_select = Metagen::getSearchSummary($row['post_text'], $queries, $selectlength); |
||
0 ignored issues
–
show
$post_text_select does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
193 | $post_text_select = Highlighter::apply($queries, $post_text_select, '<mark>', '</mark>'); |
||
0 ignored issues
–
show
$post_text_select does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
194 | } |
||
195 | // if no text remained after select text continue |
||
196 | if (empty($post_text_select) && empty($post_subject_select)) { |
||
0 ignored issues
–
show
$post_text_select does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
197 | ++$skipresults; |
||
198 | continue; |
||
199 | } |
||
200 | $xoopsTpl->append('results', [ |
||
201 | 'forum_name' => $row['forum_name'], |
||
202 | 'forum_link' => $row['forum_link'], |
||
203 | 'link' => $row['link'], |
||
204 | 'title' => $post_subject_select, |
||
0 ignored issues
–
show
$post_subject_select does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
205 | 'poster' => $row['poster'], |
||
206 | 'post_time' => formatTimestamp($row['time'], 'm'), |
||
207 | 'post_text' => $post_text_select |
||
0 ignored issues
–
show
$post_text_select does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
208 | ]); |
||
209 | } |
||
210 | unset($results); |
||
211 | |||
212 | if (count($next_search) > 0) { |
||
0 ignored issues
–
show
$next_search does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
213 | $items = []; |
||
214 | foreach ($next_search as $para => $val) { |
||
0 ignored issues
–
show
$next_search does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
215 | $items[] = "{$para}=" . urlencode($val); |
||
216 | } |
||
217 | if (count($items) > 0) { |
||
218 | $paras = implode('&', $items); |
||
219 | } |
||
220 | unset($next_search, $items); |
||
0 ignored issues
–
show
$next_search does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
221 | } |
||
222 | $search_url = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/search.php?' . $paras; |
||
0 ignored issues
–
show
$search_url does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
223 | // irmtfan remove to have just one query and appropriate next and prev links |
||
224 | //$next_results = newbb_search($queries, $andor, 1, $start + $limit, $uid, $forum, $sortby, $searchin, $subquery); |
||
0 ignored issues
–
show
Unused Code
Comprehensibility
introduced
by
60% of this comment could be valid code. Did you maybe forget this after debugging?
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it. The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production. This check looks for comments that seem to be mostly valid code and reports them. ![]() |
|||
225 | //$next_count = count($next_results); |
||
0 ignored issues
–
show
Unused Code
Comprehensibility
introduced
by
56% of this comment could be valid code. Did you maybe forget this after debugging?
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it. The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production. This check looks for comments that seem to be mostly valid code and reports them. ![]() |
|||
226 | //$has_next = false; |
||
0 ignored issues
–
show
Unused Code
Comprehensibility
introduced
by
50% of this comment could be valid code. Did you maybe forget this after debugging?
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it. The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production. This check looks for comments that seem to be mostly valid code and reports them. ![]() |
|||
227 | //if (is_array($next_results) && $next_count >0) { |
||
0 ignored issues
–
show
Unused Code
Comprehensibility
introduced
by
59% of this comment could be valid code. Did you maybe forget this after debugging?
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it. The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production. This check looks for comments that seem to be mostly valid code and reports them. ![]() |
|||
228 | //$has_next = true; |
||
0 ignored issues
–
show
Unused Code
Comprehensibility
introduced
by
50% of this comment could be valid code. Did you maybe forget this after debugging?
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it. The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production. This check looks for comments that seem to be mostly valid code and reports them. ![]() |
|||
229 | //} |
||
230 | // irmtfan if $results < $limit => it is impossible to have next |
||
231 | if ($num_results == $limit) { |
||
0 ignored issues
–
show
$num_results does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
232 | $next = $start + $limit; |
||
233 | $queries = implode(',', $queries); |
||
234 | $search_url_next = htmlspecialchars($search_url . "&direction=next&start={$next}"); |
||
0 ignored issues
–
show
$search_url_next does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
235 | $search_next = '<a href="' . $search_url_next . '">' . _SR_NEXT . '</a>'; |
||
0 ignored issues
–
show
$search_next does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
236 | $xoopsTpl->assign('search_next', $search_next); |
||
0 ignored issues
–
show
$search_next does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
237 | $xoopsTpl->assign('search_next_url', $search_url_next); |
||
0 ignored issues
–
show
$search_url_next does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
238 | } |
||
239 | if ($start > 0) { |
||
240 | $prev = $start - $limit; |
||
241 | $search_url_prev = htmlspecialchars($search_url . "&direction=previous&start={$prev}"); |
||
0 ignored issues
–
show
$search_url_prev does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
242 | $search_prev = '<a href="' . $search_url_prev . '">' . _SR_PREVIOUS . '</a>'; |
||
0 ignored issues
–
show
$search_prev does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
243 | $xoopsTpl->assign('search_prev', $search_prev); |
||
0 ignored issues
–
show
$search_prev does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
244 | $xoopsTpl->assign('search_prev_url', $search_url_prev); |
||
0 ignored issues
–
show
$search_url_prev does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
245 | } |
||
246 | // irmtfan if all results skipped then redirect to the next/previous page |
||
247 | if ($num_results == $skipresults) { |
||
0 ignored issues
–
show
$num_results does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
248 | $direction = Request::getString('direction', 'next'); |
||
249 | $search_url_redirect = ('next' === strtolower($direction)) ? $search_url_next : $search_url_prev; |
||
0 ignored issues
–
show
$search_url_redirect does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
250 | redirect_header($search_url_redirect, 1, constant(strtoupper("_SR_{$direction}"))); |
||
0 ignored issues
–
show
$search_url_redirect does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
251 | } |
||
252 | } |
||
253 | $search_info = _SR_KEYWORDS . ': ' . $search_info_keywords; |
||
0 ignored issues
–
show
$search_info does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
254 | if ($uname_required) { |
||
0 ignored issues
–
show
$uname_required does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
255 | if ($search_info) { |
||
0 ignored issues
–
show
$search_info does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
256 | $search_info .= '<br>'; |
||
0 ignored issues
–
show
$search_info does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
257 | } |
||
258 | $search_info .= _MD_NEWBB_USERNAME . ': ' . $myts->htmlSpecialChars($search_username); |
||
0 ignored issues
–
show
$search_info does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
259 | } |
||
260 | // add num_results |
||
261 | $search_info .= '<br>' . sprintf(_SR_SHOWING, $start + 1, $start + $num_results); |
||
0 ignored issues
–
show
$search_info does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
262 | // if any result skip show the counter |
||
263 | if (!empty($skipresults)) { |
||
264 | $search_info .= ' - ' . sprintf(_SR_FOUND, $num_results - $skipresults); |
||
0 ignored issues
–
show
$search_info does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
265 | } |
||
266 | $xoopsTpl->assign('search_info', $search_info); |
||
0 ignored issues
–
show
$search_info does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
267 | } |
||
268 | // assign template vars for search |
||
269 | /* term */ |
||
270 | $xoopsTpl->assign('search_term', htmlspecialchars($term, ENT_QUOTES)); |
||
271 | |||
272 | /* andor */ |
||
273 | $andor_select = '<select name="andor" id="andor" class="form-control">'; |
||
0 ignored issues
–
show
$andor_select does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
274 | $andor_select .= '<option value="OR"'; |
||
0 ignored issues
–
show
$andor_select does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
275 | if ('OR' === $andor) { |
||
276 | $andor_select .= ' selected="selected"'; |
||
0 ignored issues
–
show
$andor_select does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
277 | } |
||
278 | $andor_select .= '>' . _SR_ANY . '</option>'; |
||
0 ignored issues
–
show
$andor_select does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
279 | $andor_select .= '<option value="AND"'; |
||
0 ignored issues
–
show
$andor_select does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
280 | if ('AND' === $andor || empty($andor)) { |
||
281 | $andor_select .= ' selected="selected"'; |
||
0 ignored issues
–
show
$andor_select does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
282 | } |
||
283 | $andor_select .= '>' . _SR_ALL . '</option>'; |
||
0 ignored issues
–
show
$andor_select does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
284 | $andor_select .= '</select>'; |
||
0 ignored issues
–
show
$andor_select does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
285 | $xoopsTpl->assign('andor_selection_box', $andor_select); |
||
0 ignored issues
–
show
$andor_select does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
286 | |||
287 | /* forum */ |
||
288 | $select_forum = '<select class="form-control" name="forum[]" id="forum" size="5" multiple="multiple">'; |
||
0 ignored issues
–
show
$select_forum does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
289 | $select_forum .= '<option value="all">' . _MD_NEWBB_SEARCHALLFORUMS . '</option>'; |
||
0 ignored issues
–
show
$select_forum does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
290 | $select_forum .= newbbForumSelectBox($forum); |
||
0 ignored issues
–
show
It seems like
$forum defined by 0 on line 61 can also be of type integer ; however, newbbForumSelectBox() does only seem to accept null|array , maybe add an additional type check?
If a method or function can return multiple different values and unless you are sure that you only can receive a single value in this context, we recommend to add an additional type check: /**
* @return array|string
*/
function returnsDifferentValues($x) {
if ($x) {
return 'foo';
}
return array();
}
$x = returnsDifferentValues($y);
if (is_array($x)) {
// $x is an array.
}
If this a common case that PHP Analyzer should handle natively, please let us know by opening an issue. ![]() $select_forum does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
291 | $select_forum .= '</select>'; |
||
0 ignored issues
–
show
$select_forum does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
292 | $xoopsTpl->assign_by_ref('forum_selection_box', $select_forum); |
||
0 ignored issues
–
show
$select_forum does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
293 | |||
294 | /* searchin */ |
||
295 | $searchin_select = ''; |
||
0 ignored issues
–
show
$searchin_select does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
296 | $searchin_select .= '<label class="radio-inline"><input type="radio" name="searchin" value="title"'; |
||
0 ignored issues
–
show
$searchin_select does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
297 | if ('title' === $searchin) { |
||
298 | $searchin_select .= ' checked'; |
||
0 ignored issues
–
show
$searchin_select does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
299 | } |
||
300 | $searchin_select .= ' />' . _MD_NEWBB_SUBJECT . ' </label>'; |
||
0 ignored issues
–
show
$searchin_select does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
301 | $searchin_select .= '<label class="radio-inline"><input type="radio" name="searchin" value="text"'; |
||
0 ignored issues
–
show
$searchin_select does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
302 | if ('text' === $searchin) { |
||
303 | $searchin_select .= ' checked'; |
||
0 ignored issues
–
show
$searchin_select does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
304 | } |
||
305 | $searchin_select .= ' />' . _MD_NEWBB_BODY . ' </label>'; |
||
0 ignored issues
–
show
$searchin_select does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
306 | $searchin_select .= '<label class="radio-inline"><input type="radio" name="searchin" value="both"'; |
||
0 ignored issues
–
show
$searchin_select does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
307 | if ('both' === $searchin || empty($searchin)) { |
||
308 | $searchin_select .= ' checked'; |
||
0 ignored issues
–
show
$searchin_select does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
309 | } |
||
310 | $searchin_select .= ' />' . _MD_NEWBB_SUBJECT . ' & ' . _MD_NEWBB_BODY . ' </label>'; |
||
0 ignored issues
–
show
$searchin_select does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
311 | $xoopsTpl->assign('searchin_radio', $searchin_select); |
||
0 ignored issues
–
show
$searchin_select does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
312 | |||
313 | /* show_search */ |
||
314 | $show_search_select = ''; |
||
0 ignored issues
–
show
$show_search_select does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
315 | $show_search_select .= '<label class="radio-inline"><input type="radio" name="show_search" value="post"'; |
||
0 ignored issues
–
show
$show_search_select does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
316 | if ('post' === $show_search) { |
||
0 ignored issues
–
show
$show_search does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
317 | $show_search_select .= ' checked'; |
||
0 ignored issues
–
show
$show_search_select does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
318 | } |
||
319 | $show_search_select .= ' />' . _MD_NEWBB_POSTS . ' </label>'; |
||
0 ignored issues
–
show
$show_search_select does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
320 | $show_search_select .= '<label class="radio-inline"><input type="radio" name="show_search" value="post_text"'; |
||
0 ignored issues
–
show
$show_search_select does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
321 | if ('post_text' === $show_search || empty($show_search)) { |
||
0 ignored issues
–
show
$show_search does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
322 | $show_search_select .= ' checked'; |
||
0 ignored issues
–
show
$show_search_select does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
323 | } |
||
324 | $show_search_select .= ' />' . _MD_NEWBB_SEARCHPOSTTEXT . ' </label>'; |
||
0 ignored issues
–
show
$show_search_select does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
325 | $xoopsTpl->assign('show_search_radio', $show_search_select); |
||
0 ignored issues
–
show
$show_search_select does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
326 | |||
327 | /* author */ |
||
328 | $xoopsTpl->assign('author_select', $search_username); |
||
0 ignored issues
–
show
$search_username does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
329 | |||
330 | /* sortby */ |
||
331 | $sortby_select = '<select name="sortby" id="sortby" class="form-control">'; |
||
0 ignored issues
–
show
$sortby_select does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
332 | $sortby_select .= '<option value=\'p.post_time\''; |
||
0 ignored issues
–
show
$sortby_select does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
333 | if ('p.post_time' === $sortby || empty($sortby)) { |
||
334 | $sortby_select .= ' selected=\'selected\''; |
||
0 ignored issues
–
show
$sortby_select does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
335 | } |
||
336 | $sortby_select .= '>' . _MD_NEWBB_DATE . '</option>'; |
||
0 ignored issues
–
show
$sortby_select does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
337 | $sortby_select .= '<option value=\'p.subject\''; |
||
0 ignored issues
–
show
$sortby_select does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
338 | if ('p.subject' === $sortby) { |
||
339 | $sortby_select .= ' selected="selected"'; |
||
0 ignored issues
–
show
$sortby_select does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
340 | } |
||
341 | $sortby_select .= '>' . _MD_NEWBB_TOPIC . '</option>'; |
||
0 ignored issues
–
show
$sortby_select does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
342 | $sortby_select .= '</select>'; |
||
0 ignored issues
–
show
$sortby_select does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
343 | $xoopsTpl->assign('sortby_selection_box', $sortby_select); |
||
0 ignored issues
–
show
$sortby_select does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
344 | |||
345 | /* selectlength */ |
||
346 | $xoopsTpl->assign('selectlength_select', $selectlength); |
||
347 | |||
348 | // irmtfan get since from the user for selction box |
||
349 | $since = Request::getInt('since', $GLOBALS['xoopsModuleConfig']['since_default']); |
||
350 | $select_since = newbbSinceSelectBox($since); |
||
0 ignored issues
–
show
$select_since does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
351 | $xoopsTpl->assign_by_ref('since_selection_box', $select_since); |
||
0 ignored issues
–
show
$select_since does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
|||
352 | |||
353 | if ($xoopsConfigSearch['keyword_min'] > 0) { |
||
354 | $xoopsTpl->assign('search_rule', sprintf(_SR_KEYIGNORE, $xoopsConfigSearch['keyword_min'])); |
||
355 | } |
||
356 | // irmtfan move to footer.php |
||
357 | include_once __DIR__ . '/footer.php'; |
||
358 | include $GLOBALS['xoops']->path('footer.php'); |
||
359 |
This check examines a number of code elements and verifies that they conform to the given naming conventions.
You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.