These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | // |
||
3 | // ------------------------------------------------------------------------ // |
||
4 | // XOOPS - PHP Content Management System // |
||
5 | // Copyright (c) 2000-2016 XOOPS.org // |
||
6 | // <https://xoops.org/> // |
||
7 | // ------------------------------------------------------------------------ // |
||
8 | // This program is free software; you can redistribute it and/or modify // |
||
9 | // it under the terms of the GNU General Public License as published by // |
||
10 | // the Free Software Foundation; either version 2 of the License, or // |
||
11 | // (at your option) any later version. // |
||
12 | // // |
||
13 | // You may not change or alter any portion of this comment or credits // |
||
14 | // of supporting developers from this source code or any supporting // |
||
15 | // source code which is considered copyrighted (c) material of the // |
||
16 | // original comment or credit authors. // |
||
17 | // // |
||
18 | // This program is distributed in the hope that it will be useful, // |
||
19 | // but WITHOUT ANY WARRANTY; without even the implied warranty of // |
||
20 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // |
||
21 | // GNU General Public License for more details. // |
||
22 | // // |
||
23 | // You should have received a copy of the GNU General Public License // |
||
24 | // along with this program; if not, write to the Free Software // |
||
25 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // |
||
26 | // ------------------------------------------------------------------------ // |
||
27 | // Author: phppp (D.J., [email protected]) // |
||
28 | // URL: https://xoops.org // |
||
29 | // Project: Article Project // |
||
30 | // ------------------------------------------------------------------------ // |
||
31 | |||
32 | use Xmf\Request; |
||
33 | |||
34 | include_once __DIR__ . '/header.php'; |
||
35 | |||
36 | $start = Request::getInt('start', 0, 'GET'); |
||
37 | $forum_id = Request::getInt('forum', 0, 'GET'); |
||
0 ignored issues
–
show
|
|||
38 | $order = Request::getString('order', 'DESC', 'GET'); |
||
39 | |||
40 | $uid = Request::getInt('uid', 0, 'GET'); |
||
41 | |||
42 | $status = (Request::getString('status', '', 'GET') |
||
43 | && in_array(Request::getString('status', '', 'GET'), ['active', 'pending', 'deleted', 'new', 'all', 'digest'], true)) ? Request::getString('status', '', 'GET') : ''; |
||
44 | $mode = Request::getInt('mode', 0, 'GET'); |
||
45 | $mode = (!empty($status) && in_array($status, ['active', 'pending', 'deleted'], true)) ? 2 : $mode; |
||
46 | |||
47 | ///** @var \NewbbForumHandler $forumHandler */ |
||
48 | //$forumHandler = xoops_getModuleHandler('forum', 'newbb'); |
||
49 | ///** @var \NewbbPostHandler $postHandler */ |
||
50 | //$postHandler = xoops_getModuleHandler('post', 'newbb'); |
||
51 | |||
52 | if (empty($forum_id)) { |
||
0 ignored issues
–
show
$forum_id 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. ![]() |
|||
53 | $forums = $forumHandler->getByPermission(0, 'view'); |
||
54 | $accessForums = array_keys($forums); |
||
55 | $isAdmin = $GLOBALS['xoopsUserIsAdmin']; |
||
56 | } else { |
||
57 | $forumObject = $forumHandler->get($forum_id); |
||
0 ignored issues
–
show
$forum_id 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. ![]() |
|||
58 | $forums[$forum_id] = $forumObject; |
||
0 ignored issues
–
show
$forum_id 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. ![]() |
|||
59 | $accessForums = [$forum_id]; |
||
0 ignored issues
–
show
$forum_id 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. ![]() |
|||
60 | $isAdmin = newbbIsAdmin($forumObject); |
||
61 | } |
||
62 | |||
63 | /* Only admin has access to admin mode */ |
||
64 | View Code Duplication | if (!$isAdmin && 2 === $mode) { |
|
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. ![]() |
|||
65 | $status = in_array($status, ['active', 'pending', 'deleted'], true) ? '' : $status; |
||
66 | $mode = 0; |
||
67 | } |
||
68 | if ($mode) { |
||
69 | $_GET['viewmode'] = 'flat'; |
||
70 | } |
||
71 | //echo $mode.' - '.$status; |
||
72 | $post_perpage = $GLOBALS['xoopsModuleConfig']['posts_per_page']; |
||
0 ignored issues
–
show
$post_perpage 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. ![]() |
|||
73 | |||
74 | $criteria_count = new CriteriaCompo(new Criteria('forum_id', '(' . implode(',', $accessForums) . ')', 'IN')); |
||
0 ignored issues
–
show
$criteria_count 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 | $criteria_post = new CriteriaCompo(new Criteria('p.forum_id', '(' . implode(',', $accessForums) . ')', 'IN')); |
||
0 ignored issues
–
show
$criteria_post 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 | $criteria_post->setSort('p.post_id'); |
||
0 ignored issues
–
show
$criteria_post 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. ![]() |
|||
77 | $criteria_post->setOrder($order); |
||
0 ignored issues
–
show
$criteria_post 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. ![]() |
|||
78 | |||
79 | if (!empty($uid)) { |
||
80 | $criteria_count->add(new Criteria('uid', $uid)); |
||
0 ignored issues
–
show
$criteria_count 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. ![]() |
|||
81 | $criteria_post->add(new Criteria('p.uid', $uid)); |
||
0 ignored issues
–
show
$criteria_post 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. ![]() |
|||
82 | } |
||
83 | |||
84 | $join = null; |
||
85 | // START irmtfan solve the status issues and specially status = new issue |
||
86 | switch ($status) { |
||
87 | case 'pending': |
||
88 | $criteria_count->add(new Criteria('approved', 0)); // irmtfan add new criteria |
||
0 ignored issues
–
show
$criteria_count 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. ![]() |
|||
89 | $criteria_post->add(new Criteria('p.approved', 0)); // irmtfan add new criteria |
||
0 ignored issues
–
show
$criteria_post 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. ![]() |
|||
90 | break; |
||
91 | case 'deleted': |
||
92 | $criteria_count->add(new Criteria('approved', -1)); // irmtfan add new criteria |
||
0 ignored issues
–
show
$criteria_count 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. ![]() |
|||
93 | $criteria_post->add(new Criteria('p.approved', -1)); // irmtfan add new criteria |
||
0 ignored issues
–
show
$criteria_post 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. ![]() |
|||
94 | break; |
||
95 | case 'new': |
||
96 | //$criteria_status_count = new CriteriaCompo(new Criteria("post_time", (int)($last_visit), ">"));// irmtfan commented and removed |
||
97 | //$criteria_status_post = new CriteriaCompo(new Criteria("p.post_time", (int)($last_visit), ">"));// irmtfan commented and removed |
||
98 | $criteria_count->add(new Criteria('approved', 1)); // irmtfan uncomment |
||
0 ignored issues
–
show
$criteria_count 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. ![]() |
|||
99 | $criteria_post->add(new Criteria('p.approved', 1)); // irmtfan uncomment |
||
0 ignored issues
–
show
$criteria_post 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 | // following is for 'unread' -- not finished -- irmtfan Now it is finished! |
||
101 | if (empty($GLOBALS['xoopsModuleConfig']['read_mode'])) { |
||
102 | //$criteria_status_count->add(new Criteria('approved', 1));// irmtfan commented and removed |
||
103 | //$criteria_status_post->add(new Criteria('p.approved', 1));// irmtfan commented and removed |
||
104 | } elseif (2 == $GLOBALS['xoopsModuleConfig']['read_mode']) { |
||
105 | // START irmtfan use read_uid to find the unread posts when the user is logged in |
||
106 | $read_uid = is_object($GLOBALS['xoopsUser']) ? $GLOBALS['xoopsUser']->getVar('uid') : 0; |
||
0 ignored issues
–
show
$read_uid 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 | if (!empty($read_uid)) { |
||
0 ignored issues
–
show
$read_uid 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. ![]() |
|||
108 | $join = ' LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('newbb_reads_topic') . ' AS r ON r.read_item = p.topic_id AND r.uid = ' . $read_uid . ' '; // irmtfan corrected add AS |
||
0 ignored issues
–
show
$read_uid 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. ![]() |
|||
109 | $criteria_status_post = new CriteriaCompo();// irmtfan new criteria |
||
0 ignored issues
–
show
$criteria_status_post 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. ![]() |
|||
110 | $criteria_status_post->add(new Criteria('p.post_id', 'r.`post_id`', '>')); // irmtfan corrected - should use $value='r.``' to render in XOOPS/class/criteria.php |
||
0 ignored issues
–
show
$criteria_status_post 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 | $criteria_status_post->add(new Criteria('r.read_id', null, 'IS NULL'), 'OR');// irmtfan corrected - should use "IS NULL" to render in XOOPS/class/criteria.php |
||
0 ignored issues
–
show
$criteria_status_post 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. ![]() |
|||
112 | $criteria_post->add($criteria_status_post); // irmtfan add the status criteria to post criteria - move here |
||
0 ignored issues
–
show
$criteria_post 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. ![]() |
|||
113 | $criteria_count = $criteria_post;// irmtfan criteria count is equal to criteria post - move here |
||
0 ignored issues
–
show
$criteria_count 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. ![]() |
|||
114 | } else { |
||
115 | } |
||
116 | // END irmtfan use read_uid to find the unread posts when the user is logged in |
||
117 | //$criteria_status_post->add(new Criteria("p.approved", 1)); // irmtfan commented and removed |
||
118 | //$criteria_status_count =& $criteria_status_post; |
||
119 | } elseif (1 == $GLOBALS['xoopsModuleConfig']['read_mode']) { |
||
120 | $criteria_count->add(new Criteria('post_time', (int)$last_visit, '>')); // irmtfan add new criteria |
||
0 ignored issues
–
show
$criteria_count 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 | $criteria_post->add(new Criteria('p.post_time', (int)$last_visit, '>')); // irmtfan add new criteria |
||
0 ignored issues
–
show
$criteria_post 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 | // START irmtfan fix read_mode = 1 bugs - for all users (member and anon) |
||
123 | $topics = []; |
||
124 | $topic_lastread = newbbGetCookie('LT', true); |
||
0 ignored issues
–
show
$topic_lastread 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. ![]() |
|||
125 | if (count($topic_lastread) > 0) { |
||
0 ignored issues
–
show
$topic_lastread 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. ![]() |
|||
126 | foreach ($topic_lastread as $id => $time) { |
||
0 ignored issues
–
show
The expression
$topic_lastread of type array|null is not guaranteed to be traversable. How about adding an additional type check?
There are different options of fixing this problem.
![]() $topic_lastread 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. ![]() |
|||
127 | if ($time > (int)$last_visit) { |
||
0 ignored issues
–
show
$last_visit 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. ![]() |
|||
128 | $topics[] = $id; |
||
129 | } |
||
130 | } |
||
131 | } |
||
132 | if (count($topics) > 0) { |
||
133 | $criteria_count->add(new Criteria('topic_id', '(' . implode(',', $topics) . ')', 'NOT IN')); |
||
0 ignored issues
–
show
$criteria_count 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. ![]() |
|||
134 | $criteria_post->add(new Criteria('p.topic_id', '(' . implode(',', $topics) . ')', 'NOT IN')); |
||
0 ignored issues
–
show
$criteria_post 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. ![]() |
|||
135 | } |
||
136 | // END irmtfan fix read_mode = 1 bugs - for all users (member and anon) |
||
137 | //$criteria_status_count->add(new Criteria("approved", 1));// irmtfan commented and removed |
||
138 | //$criteria_status_post->add(new Criteria("p.approved", 1));// irmtfan commented and removed |
||
139 | } |
||
140 | break; |
||
141 | default: |
||
142 | $criteria_count->add(new Criteria('approved', 1)); // irmtfan add new criteria |
||
0 ignored issues
–
show
$criteria_count 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. ![]() |
|||
143 | $criteria_post->add(new Criteria('p.approved', 1)); // irmtfan add new criteria |
||
0 ignored issues
–
show
$criteria_post 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 | break; |
||
145 | } |
||
146 | //$criteria_count->add($criteria_status_count); // irmtfan commented and removed |
||
147 | //$criteria_post->add($criteria_status_post); // irmtfan commented and removed |
||
148 | // END irmtfan solve the status issues and specially status = new issue |
||
149 | ///** @var \NewbbKarmaHandler $karmaHandler */ |
||
150 | //$karmaHandler = xoops_getModuleHandler('karma', 'newbb'); |
||
151 | $user_karma = $karmaHandler->getUserKarma(); |
||
0 ignored issues
–
show
$user_karma 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 | |||
153 | $valid_modes = ['flat', 'compact']; |
||
0 ignored issues
–
show
$valid_modes 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. ![]() |
|||
154 | $viewmode_cookie = newbbGetCookie('V'); |
||
0 ignored issues
–
show
$viewmode_cookie 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. ![]() |
|||
155 | |||
156 | if ('compact' === Request::getString('viewmode', '', 'GET')) { |
||
157 | newbbSetCookie('V', 'compact', $forumCookie['expire']); |
||
158 | } |
||
159 | |||
160 | $viewmode = Request::getString('viewmode', (!empty($viewmode_cookie) ? $viewmode_cookie : (@$valid_modes[$GLOBALS['xoopsModuleConfig']['view_mode'] - 1])), 'GET'); |
||
0 ignored issues
–
show
$viewmode_cookie 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. ![]() |
|||
161 | $viewmode = in_array($viewmode, $valid_modes) ? $viewmode : $valid_modes[0]; |
||
0 ignored issues
–
show
$valid_modes 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 | |||
163 | $postCount = $postHandler->getPostCount($criteria_count, $join);// irmtfan add join for read_mode = 2 |
||
0 ignored issues
–
show
$criteria_count 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. ![]() |
|||
164 | $posts = $postHandler->getPostsByLimit($criteria_post, $post_perpage, $start, $join);// irmtfan add join for read_mode = 2 |
||
0 ignored issues
–
show
$criteria_post 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. ![]() |
|||
165 | |||
166 | $poster_array = []; |
||
0 ignored issues
–
show
$poster_array 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. ![]() |
|||
167 | if (count($posts) > 0) { |
||
168 | foreach (array_keys($posts) as $id) { |
||
169 | /** @var \NewbbPost[] $posts */ |
||
170 | $poster_array[$posts[$id]->getVar('uid')] = 1; |
||
0 ignored issues
–
show
$poster_array 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. ![]() |
|||
171 | } |
||
172 | } |
||
173 | |||
174 | $xoops_pagetitle = $xoopsModule->getVar('name') . ' - ' . _MD_NEWBB_VIEWALLPOSTS; |
||
0 ignored issues
–
show
$xoops_pagetitle 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. ![]() |
|||
175 | $xoopsOption['xoops_pagetitle'] = $xoops_pagetitle; |
||
0 ignored issues
–
show
$xoops_pagetitle 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 | $xoopsOption['template_main'] = 'newbb_viewpost.tpl'; |
||
177 | |||
178 | include_once $GLOBALS['xoops']->path('header.php'); |
||
179 | include_once __DIR__ . '/include/functions.time.php'; |
||
180 | include_once __DIR__ . '/include/functions.render.php'; |
||
181 | |||
182 | //global $xoTheme; |
||
183 | //$xoTheme->addScript('/Frameworks/textsanitizer/xoops.js'); |
||
184 | |||
185 | if (!empty($forum_id)) { |
||
0 ignored issues
–
show
$forum_id 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. ![]() |
|||
186 | if (!$forumHandler->getPermission($forumObject, 'view')) { |
||
187 | redirect_header(XOOPS_URL . '/index.php', 2, _MD_NEWBB_NORIGHTTOACCESS); |
||
188 | } |
||
189 | if ($forumObject->getVar('parent_forum')) { |
||
190 | $parent_forumObject = $forumHandler->get($forumObject->getVar('parent_forum'), ['forum_name']); |
||
0 ignored issues
–
show
$parent_forumObject 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 | $parentforum = [ |
||
192 | 'id' => $forumObject->getVar('parent_forum'), |
||
193 | 'name' => $parent_forumObject->getVar('forum_name') |
||
0 ignored issues
–
show
$parent_forumObject 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 | unset($parent_forumObject); |
||
0 ignored issues
–
show
$parent_forumObject 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. ![]() |
|||
196 | $xoopsTpl->assign_by_ref('parentforum', $parentforum); |
||
197 | } |
||
198 | $xoopsTpl->assign('forum_name', $forumObject->getVar('forum_name')); |
||
199 | $xoopsTpl->assign('forum_moderators', $forumObject->dispForumModerators()); |
||
200 | |||
201 | $xoops_pagetitle = $forumObject->getVar('forum_name') . ' - ' . _MD_NEWBB_VIEWALLPOSTS . ' [' . $xoopsModule->getVar('name') . ']'; |
||
0 ignored issues
–
show
$xoops_pagetitle 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. ![]() |
|||
202 | $xoopsTpl->assign('forum_id', $forumObject->getVar('forum_id')); |
||
203 | // irmtfan new method |
||
204 | View Code Duplication | if (!empty($GLOBALS['xoopsModuleConfig']['rss_enable'])) { |
|
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. ![]() |
|||
205 | $xoopsTpl->assign('xoops_module_header', ' |
||
206 | <link rel="alternate" type="application/xml+rss" title="' . $xoopsModule->getVar('name') . '-' . $forumObject->getVar('forum_name') . '" href="' . XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/rss.php?f=' . $forum_id . '" /> |
||
0 ignored issues
–
show
$forum_id 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. ![]() |
|||
207 | ' . @$xoopsTpl->get_template_vars('xoops_module_header')); |
||
208 | } |
||
209 | View Code Duplication | } elseif (!empty($GLOBALS['xoopsModuleConfig']['rss_enable'])) { |
|
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. ![]() |
|||
210 | $xoopsTpl->assign('xoops_module_header', ' |
||
211 | <link rel="alternate" type="application/xml+rss" title="' . $xoopsModule->getVar('name') . '" href="' . XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/rss.php" /> |
||
212 | ' . @$xoopsTpl->get_template_vars('xoops_module_header')); |
||
213 | } |
||
214 | // irmtfan remove and move to footer.php |
||
215 | //$xoopsTpl->assign('xoops_module_header', $xoops_module_header); |
||
216 | $xoopsTpl->assign('xoops_pagetitle', $xoops_pagetitle); |
||
0 ignored issues
–
show
$xoops_pagetitle 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. ![]() |
|||
217 | // irmtfan - remove icon_path and use newbbDisplayImage |
||
218 | $xoopsTpl->assign('anonym_avatar', newbbDisplayImage('anonym')); |
||
219 | $userid_array = []; |
||
0 ignored issues
–
show
$userid_array 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. ![]() |
|||
220 | View Code Duplication | if (count($poster_array) > 0) { |
|
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. ![]() $poster_array 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 | /** @var \XoopsMembershipHandler $memberHandler */ |
||
222 | $memberHandler = xoops_getHandler('member'); |
||
223 | $userid_array = array_keys($poster_array); |
||
0 ignored issues
–
show
$userid_array 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. ![]() |
|||
224 | $user_criteria = '(' . implode(',', $userid_array) . ')'; |
||
0 ignored issues
–
show
$user_criteria 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. ![]() |
|||
225 | $users = $memberHandler->getUsers(new Criteria('uid', $user_criteria, 'IN'), true); |
||
0 ignored issues
–
show
$user_criteria 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. ![]() |
|||
226 | } else { |
||
227 | $user_criteria = ''; |
||
0 ignored issues
–
show
$user_criteria 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. ![]() |
|||
228 | $users = null; |
||
229 | } |
||
230 | |||
231 | $online = []; |
||
232 | |||
233 | if ($GLOBALS['xoopsModuleConfig']['wol_enabled']) { |
||
234 | if (!empty($user_criteria)) { |
||
0 ignored issues
–
show
$user_criteria 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 | // /** @var \NewbbOnlineHandler $onlineHandler */ |
||
236 | // $onlineHandler = xoops_getModuleHandler('online', 'newbb'); |
||
237 | $onlineHandler->init($forum_id); |
||
0 ignored issues
–
show
$forum_id 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 | } |
||
240 | |||
241 | $viewtopic_users = []; |
||
0 ignored issues
–
show
$viewtopic_users 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 | |||
243 | View Code Duplication | if (count($userid_array) > 0) { |
|
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. ![]() $userid_array 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 | require $GLOBALS['xoops']->path('modules/' . $xoopsModule->getVar('dirname', 'n') . '/class/user.php'); |
||
245 | $userHandler = new NewbbUserHandler($GLOBALS['xoopsModuleConfig']['groupbar_enabled'], $GLOBALS['xoopsModuleConfig']['wol_enabled']); |
||
246 | $userHandler->users = $users; |
||
247 | $userHandler->online = $online; |
||
0 ignored issues
–
show
The property
online does not seem to exist. Did you mean enableOnline ?
An attempt at access to an undefined property has been detected. This may either be a typographical error or the property has been renamed but there are still references to its old name. If you really want to allow access to undefined properties, you can define magic methods to allow access. See the php core documentation on Overloading. ![]() |
|||
248 | $viewtopic_users = $userHandler->getUsers(); |
||
0 ignored issues
–
show
$viewtopic_users 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. ![]() |
|||
249 | } |
||
250 | |||
251 | $pn = 0; |
||
252 | //$topicHandler = xoops_getModuleHandler('topic', 'newbb'); |
||
253 | static $suspension = []; |
||
254 | foreach (array_keys($posts) as $id) { |
||
255 | ++$pn; |
||
256 | |||
257 | /** @var \NewbbPost $post */ |
||
258 | $post = $posts[$id]; |
||
259 | $post_title = $post->getVar('subject'); |
||
0 ignored issues
–
show
$post_title 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. ![]() |
|||
260 | |||
261 | if ($posticon = $post->getVar('icon')) { |
||
262 | $post_image = '<a name="' . $post->getVar('post_id') . '"><img src="' . XOOPS_URL . '/images/subject/' . htmlspecialchars($posticon) . '" alt="" /></a>'; |
||
0 ignored issues
–
show
$post_image 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. ![]() |
|||
263 | } else { |
||
264 | $post_image = '<a name="' . $post->getVar('post_id') . '"><img src="' . XOOPS_URL . '/images/icons/no_posticon.gif" alt="" /></a>'; |
||
0 ignored issues
–
show
$post_image 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 | $poster = [ |
||
267 | 'uid' => 0, |
||
268 | 'name' => $post->getVar('poster_name') ?: $myts->htmlSpecialChars($GLOBALS['xoopsConfig']['anonymous']), |
||
269 | 'link' => $post->getVar('poster_name') ?: $myts->htmlSpecialChars($GLOBALS['xoopsConfig']['anonymous']) |
||
270 | ]; |
||
271 | if ($post->getVar('uid') > 0 && isset($viewtopic_users[$post->getVar('uid')])) { |
||
0 ignored issues
–
show
$viewtopic_users 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. ![]() |
|||
272 | $poster = $viewtopic_users[$post->getVar('uid')]; |
||
0 ignored issues
–
show
$viewtopic_users 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. ![]() |
|||
273 | } |
||
274 | if ($isAdmin || $post->checkIdentity()) { |
||
275 | $post_text = $post->getVar('post_text'); |
||
0 ignored issues
–
show
$post_text 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. ![]() |
|||
276 | $post_attachment = $post->displayAttachment(); |
||
0 ignored issues
–
show
$post_attachment 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 | View Code Duplication | } elseif ($GLOBALS['xoopsModuleConfig']['enable_karma'] && $post->getVar('post_karma') > $user_karma) { |
|
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. ![]() $user_karma 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. ![]() |
|||
278 | $post_text = "<div class='karma'>" . sprintf(_MD_NEWBB_KARMA_REQUIREMENT, $user_karma, $post->getVar('post_karma')) . '</div>'; |
||
0 ignored issues
–
show
$post_text 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 | $post_attachment = ''; |
||
0 ignored issues
–
show
$post_attachment 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 | } elseif ($GLOBALS['xoopsModuleConfig']['allow_require_reply'] && $post->getVar('require_reply')) { |
||
281 | $post_text = "<div class='karma'>" . _MD_NEWBB_REPLY_REQUIREMENT . '</div>'; |
||
0 ignored issues
–
show
$post_text 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 | $post_attachment = ''; |
||
0 ignored issues
–
show
$post_attachment 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. ![]() |
|||
283 | } else { |
||
284 | $post_text = $post->getVar('post_text'); |
||
0 ignored issues
–
show
$post_text 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 | $post_attachment = $post->displayAttachment(); |
||
0 ignored issues
–
show
$post_attachment 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 | |||
288 | $thread_buttons = []; |
||
0 ignored issues
–
show
$thread_buttons 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 | |||
290 | if ($GLOBALS['xoopsModuleConfig']['enable_permcheck']) { |
||
291 | if (!isset($suspension[$post->getVar('forum_id')])) { |
||
292 | // /** @var \NewbbModerateHandler $moderateHandler */ |
||
293 | // $moderateHandler = xoops_getModuleHandler('moderate', 'newbb'); |
||
294 | $suspension[$post->getVar('forum_id')] = !$moderateHandler->verifyUser(-1, '', $post->getVar('forum_id')); |
||
295 | } |
||
296 | |||
297 | View Code Duplication | if ($isAdmin |
|
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. ![]() |
|||
298 | || (!$suspension[$post->getVar('forum_id')] && $post->checkIdentity() |
||
299 | && $post->checkTimelimit('delete_timelimit'))) { |
||
300 | $thread_buttons['delete']['image'] = newbbDisplayImage('p_delete', _DELETE); |
||
0 ignored issues
–
show
$thread_buttons 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 | $thread_buttons['delete']['link'] = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/delete.php?forum=' . $post->getVar('forum_id') . '&topic_id=' . $post->getVar('topic_id'); |
||
0 ignored issues
–
show
$thread_buttons 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 | $thread_buttons['delete']['name'] = _DELETE; |
||
0 ignored issues
–
show
$thread_buttons 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. ![]() |
|||
303 | } |
||
304 | View Code Duplication | if ($isAdmin |
|
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. ![]() |
|||
305 | || !$suspension[$post->getVar('forum_id')] && $post->checkIdentity() |
||
306 | && $post->checkTimelimit('edit_timelimit')) { |
||
307 | $thread_buttons['edit']['image'] = newbbDisplayImage('p_edit', _EDIT); |
||
0 ignored issues
–
show
$thread_buttons 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. ![]() |
|||
308 | $thread_buttons['edit']['link'] = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/edit.php?forum=' . $post->getVar('forum_id') . '&topic_id=' . $post->getVar('topic_id'); |
||
0 ignored issues
–
show
$thread_buttons 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 | $thread_buttons['edit']['name'] = _EDIT; |
||
0 ignored issues
–
show
$thread_buttons 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. ![]() |
|||
310 | } |
||
311 | if (is_object($GLOBALS['xoopsUser']) && !$suspension[$post->getVar('forum_id')]) { |
||
312 | $thread_buttons['reply']['image'] = newbbDisplayImage('p_reply', _MD_NEWBB_REPLY); |
||
0 ignored issues
–
show
$thread_buttons 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. ![]() |
|||
313 | $thread_buttons['reply']['link'] = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/reply.php?forum=' . $post->getVar('forum_id') . '&topic_id=' . $post->getVar('topic_id'); |
||
0 ignored issues
–
show
$thread_buttons 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. ![]() |
|||
314 | $thread_buttons['reply']['name'] = _MD_NEWBB_REPLY; |
||
0 ignored issues
–
show
$thread_buttons 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 | |||
316 | $thread_buttons['quote']['image'] = newbbDisplayImage('p_quote', _MD_NEWBB_QUOTE); |
||
0 ignored issues
–
show
$thread_buttons 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 | $thread_buttons['quote']['link'] = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/reply.php?forum=' . $post->getVar('forum_id') . '&topic_id=' . $post->getVar('topic_id') . '&quotedac=1'; |
||
0 ignored issues
–
show
$thread_buttons 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 | $thread_buttons['quote']['name'] = _MD_NEWBB_QUOTE; |
||
0 ignored issues
–
show
$thread_buttons 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. ![]() |
|||
319 | } |
||
320 | } else { |
||
321 | $thread_buttons['delete']['image'] = newbbDisplayImage('p_delete', _DELETE); |
||
0 ignored issues
–
show
$thread_buttons 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 | $thread_buttons['delete']['link'] = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/delete.php?forum=' . $post->getVar('forum_id') . '&topic_id=' . $post->getVar('topic_id'); |
||
0 ignored issues
–
show
$thread_buttons 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 | $thread_buttons['delete']['name'] = _DELETE; |
||
0 ignored issues
–
show
$thread_buttons 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. ![]() |
|||
324 | $thread_buttons['edit']['image'] = newbbDisplayImage('p_edit', _EDIT); |
||
0 ignored issues
–
show
$thread_buttons 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 | $thread_buttons['edit']['link'] = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/edit.php?forum=' . $post->getVar('forum_id') . '&topic_id=' . $post->getVar('topic_id'); |
||
0 ignored issues
–
show
$thread_buttons 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 | $thread_buttons['edit']['name'] = _EDIT; |
||
0 ignored issues
–
show
$thread_buttons 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. ![]() |
|||
327 | $thread_buttons['reply']['image'] = newbbDisplayImage('p_reply', _MD_NEWBB_REPLY); |
||
0 ignored issues
–
show
$thread_buttons 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. ![]() |
|||
328 | $thread_buttons['reply']['link'] = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/reply.php?forum=' . $post->getVar('forum_id') . '&topic_id=' . $post->getVar('topic_id'); |
||
0 ignored issues
–
show
$thread_buttons 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 | $thread_buttons['reply']['name'] = _MD_NEWBB_REPLY; |
||
0 ignored issues
–
show
$thread_buttons 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. ![]() |
|||
330 | } |
||
331 | |||
332 | if (!$isAdmin && $GLOBALS['xoopsModuleConfig']['reportmod_enabled']) { |
||
333 | $thread_buttons['report']['image'] = newbbDisplayImage('p_report', _MD_NEWBB_REPORT); |
||
0 ignored issues
–
show
$thread_buttons 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. ![]() |
|||
334 | $thread_buttons['report']['link'] = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/report.php?forum=' . $post->getVar('forum_id') . '&topic_id=' . $post->getVar('topic_id'); |
||
0 ignored issues
–
show
$thread_buttons 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 | $thread_buttons['report']['name'] = _MD_NEWBB_REPORT; |
||
0 ignored issues
–
show
$thread_buttons 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. ![]() |
|||
336 | } |
||
337 | $thread_action = []; |
||
0 ignored issues
–
show
$thread_action 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 | |||
339 | $xoopsTpl->append('posts', [ |
||
340 | 'post_id' => $post->getVar('post_id'), |
||
341 | 'topic_id' => $post->getVar('topic_id'), |
||
342 | 'forum_id' => $post->getVar('forum_id'), |
||
343 | 'post_date' => newbbFormatTimestamp($post->getVar('post_time')), |
||
344 | 'post_image' => $post_image, |
||
0 ignored issues
–
show
$post_image 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. ![]() |
|||
345 | 'post_title' => $post_title, |
||
0 ignored issues
–
show
$post_title 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. ![]() |
|||
346 | 'post_text' => $post_text, |
||
0 ignored issues
–
show
$post_text 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. ![]() |
|||
347 | 'post_attachment' => $post_attachment, |
||
0 ignored issues
–
show
$post_attachment 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. ![]() |
|||
348 | 'post_edit' => $post->displayPostEdit(), |
||
349 | 'post_no' => $start + $pn, |
||
350 | 'post_signature' => $post->getVar('attachsig') ? @$poster['signature'] : '', |
||
351 | // 'poster_ip' => ($isAdmin && $GLOBALS['xoopsModuleConfig']['show_ip']) ? long2ip($post->getVar('poster_ip')) : '', |
||
352 | 'poster_ip' => ($isAdmin && $GLOBALS['xoopsModuleConfig']['show_ip']) ? $post->getVar('poster_ip') : '', |
||
353 | 'thread_action' => $thread_action, |
||
0 ignored issues
–
show
$thread_action 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. ![]() |
|||
354 | 'thread_buttons' => $thread_buttons, |
||
0 ignored issues
–
show
$thread_buttons 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. ![]() |
|||
355 | 'poster' => $poster |
||
356 | ]); |
||
357 | |||
358 | unset($thread_buttons, $poster); |
||
0 ignored issues
–
show
$thread_buttons 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. ![]() |
|||
359 | } |
||
360 | unset($viewtopic_users, $forums); |
||
0 ignored issues
–
show
$viewtopic_users 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. ![]() |
|||
361 | |||
362 | View Code Duplication | if (!empty($GLOBALS['xoopsModuleConfig']['show_jump'])) { |
|
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. ![]() |
|||
363 | include_once __DIR__ . '/include/functions.forum.php'; |
||
364 | $xoopsTpl->assign('forum_jumpbox', newbbMakeJumpbox($forum_id)); |
||
0 ignored issues
–
show
$forum_id 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. ![]() |
|||
365 | } |
||
366 | |||
367 | if ($postCount > $post_perpage) { |
||
0 ignored issues
–
show
$post_perpage 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. ![]() |
|||
368 | include $GLOBALS['xoops']->path('class/pagenav.php'); |
||
369 | $nav = new XoopsPageNav($postCount, $post_perpage, $start, 'start', 'forum=' . $forum_id . '&viewmode=' . $viewmode . '&status=' . $status . '&uid=' . $uid . '&order=' . $order . '&mode=' . $mode); |
||
0 ignored issues
–
show
$post_perpage 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. ![]() |
|||
370 | //if (isset($GLOBALS['xoopsModuleConfig']['do_rewrite'])) $nav->url = formatURL(Request::getString('SERVER_NAME', '', 'SERVER')) . $nav->url; |
||
371 | View Code Duplication | if ('select' === $GLOBALS['xoopsModuleConfig']['pagenav_display']) { |
|
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. ![]() |
|||
372 | $navi = $nav->renderSelect(); |
||
373 | } elseif ('image' === $GLOBALS['xoopsModuleConfig']['pagenav_display']) { |
||
374 | $navi = $nav->renderImageNav(4); |
||
375 | } else { |
||
376 | $navi = $nav->renderNav(4); |
||
377 | } |
||
378 | |||
379 | $xoopsTpl->assign('pagenav', $navi); |
||
380 | } else { |
||
381 | $xoopsTpl->assign('pagenav', ''); |
||
382 | } |
||
383 | |||
384 | $xoopsTpl->assign('lang_forum_index', sprintf(_MD_NEWBB_FORUMINDEX, htmlspecialchars($GLOBALS['xoopsConfig']['sitename'], ENT_QUOTES))); |
||
385 | |||
386 | switch ($status) { |
||
387 | case 'active': |
||
388 | $lang_title = _MD_NEWBB_VIEWALLPOSTS . ' [' . _MD_NEWBB_TYPE_ADMIN . ']'; |
||
0 ignored issues
–
show
$lang_title 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. ![]() |
|||
389 | break; |
||
390 | case 'pending': |
||
391 | $lang_title = _MD_NEWBB_VIEWALLPOSTS . ' [' . _MD_NEWBB_TYPE_PENDING . ']'; |
||
0 ignored issues
–
show
$lang_title 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. ![]() |
|||
392 | break; |
||
393 | case 'deleted': |
||
394 | $lang_title = _MD_NEWBB_VIEWALLPOSTS . ' [' . _MD_NEWBB_TYPE_DELETED . ']'; |
||
0 ignored issues
–
show
$lang_title 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. ![]() |
|||
395 | break; |
||
396 | case 'new': |
||
397 | $lang_title = _MD_NEWBB_NEWPOSTS; |
||
0 ignored issues
–
show
$lang_title 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. ![]() |
|||
398 | break; |
||
399 | default: |
||
400 | $lang_title = _MD_NEWBB_VIEWALLPOSTS; |
||
0 ignored issues
–
show
$lang_title 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. ![]() |
|||
401 | break; |
||
402 | } |
||
403 | if ($uid > 0) { |
||
404 | $lang_title .= ' (' . XoopsUser::getUnameFromId($uid) . ')'; |
||
0 ignored issues
–
show
$lang_title 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. ![]() |
|||
405 | } |
||
406 | $xoopsTpl->assign('lang_title', $lang_title); |
||
0 ignored issues
–
show
$lang_title 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. ![]() |
|||
407 | // irmtfan up to p_up |
||
408 | $xoopsTpl->assign('p_up', newbbDisplayImage('up', _MD_NEWBB_TOP)); |
||
409 | $xoopsTpl->assign('groupbar_enable', $GLOBALS['xoopsModuleConfig']['groupbar_enabled']); |
||
410 | $xoopsTpl->assign('anonymous_prefix', $GLOBALS['xoopsModuleConfig']['anonymous_prefix']); |
||
411 | $xoopsTpl->assign('down', newbbDisplayImage('down', _MD_NEWBB_BOTTOM)); |
||
412 | |||
413 | $all_link = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/viewpost.php?forum=' . $forum_id . "&start=$start"; |
||
0 ignored issues
–
show
$all_link 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. ![]() |
|||
414 | $post_link = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/viewpost.php?forum=' . $forum_id; |
||
0 ignored issues
–
show
$post_link 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. ![]() |
|||
415 | $newpost_link = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/viewpost.php?forum=' . $forum_id . '&status=new'; |
||
0 ignored issues
–
show
$newpost_link 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. ![]() |
|||
416 | $digest_link = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/viewpost.php?forum=' . $forum_id . "&start=$start&status=digest"; |
||
0 ignored issues
–
show
$digest_link 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. ![]() |
|||
417 | $unreplied_link = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/viewpost.php?forum=' . $forum_id . "&start=$start&status=unreplied"; |
||
0 ignored issues
–
show
$unreplied_link 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. ![]() |
|||
418 | $unread_link = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/viewpost.php?forum=' . $forum_id . "&start=$start&status=unread"; |
||
0 ignored issues
–
show
$unread_link 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. ![]() |
|||
419 | |||
420 | $xoopsTpl->assign('all_link', $all_link); |
||
0 ignored issues
–
show
$all_link 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. ![]() |
|||
421 | $xoopsTpl->assign('post_link', $post_link); |
||
0 ignored issues
–
show
$post_link 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. ![]() |
|||
422 | $xoopsTpl->assign('newpost_link', $newpost_link); |
||
0 ignored issues
–
show
$newpost_link 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. ![]() |
|||
423 | $xoopsTpl->assign('digest_link', $digest_link); |
||
0 ignored issues
–
show
$digest_link 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. ![]() |
|||
424 | $xoopsTpl->assign('unreplied_link', $unreplied_link); |
||
0 ignored issues
–
show
$unreplied_link 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. ![]() |
|||
425 | $xoopsTpl->assign('unread_link', $unread_link); |
||
0 ignored issues
–
show
$unread_link 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. ![]() |
|||
426 | |||
427 | $viewmode_options = []; |
||
0 ignored issues
–
show
$viewmode_options 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. ![]() |
|||
428 | View Code Duplication | if ('DESC' === $order) { |
|
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. ![]() |
|||
429 | $viewmode_options[] = [ |
||
0 ignored issues
–
show
$viewmode_options 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. ![]() |
|||
430 | 'link' => XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/viewpost.php?viewmode=flat&order=ASC&forum=' . $forum_id, |
||
0 ignored issues
–
show
$forum_id 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. ![]() |
|||
431 | 'title' => _OLDESTFIRST |
||
432 | ]; |
||
433 | } else { |
||
434 | $viewmode_options[] = [ |
||
0 ignored issues
–
show
$viewmode_options 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. ![]() |
|||
435 | 'link' => XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/viewpost.php?viewmode=flat&order=DESC&forum=' . $forum_id, |
||
0 ignored issues
–
show
$forum_id 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. ![]() |
|||
436 | 'title' => _NEWESTFIRST |
||
437 | ]; |
||
438 | } |
||
439 | |||
440 | //$xoopsTpl->assign('viewmode_compact', ($viewmode=="compact")?1:0); |
||
441 | $xoopsTpl->assign_by_ref('viewmode_options', $viewmode_options); |
||
0 ignored issues
–
show
$viewmode_options 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. ![]() |
|||
442 | $xoopsTpl->assign('menumode', $menumode); |
||
443 | $xoopsTpl->assign('menumode_other', $menumode_other); |
||
0 ignored issues
–
show
$menumode_other 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. ![]() |
|||
444 | |||
445 | $xoopsTpl->assign('viewer_level', $isAdmin ? 2 : is_object($GLOBALS['xoopsUser'])); |
||
446 | $xoopsTpl->assign('uid', $uid); |
||
447 | $xoopsTpl->assign('mode', $mode); |
||
448 | $xoopsTpl->assign('status', $status); |
||
449 | // irmtfan move to footer.php |
||
450 | include_once __DIR__ . '/footer.php'; |
||
451 | include $GLOBALS['xoops']->path('footer.php'); |
||
452 |
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.