Passed
Pull Request — master (#70)
by Pierre-Henry
03:15
created
class/GroupPermForm.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
         foreach (array_keys($glist) as $i) {
55 55
             // get selected item id(s) for each group
56 56
             $selected = $gpermHandler->getItemIds($this->_permName, $i, $this->_modid);
57
-            $ele      = new Newbb\GroupFormCheckBox($glist[$i], 'perms[' . $this->_permName . ']', $i, $selected);
57
+            $ele      = new Newbb\GroupFormCheckBox($glist[$i], 'perms['.$this->_permName.']', $i, $selected);
58 58
             $ele->setOptionTree($this->_itemTree);
59 59
             $this->addElement($ele);
60 60
             unset($ele);
@@ -63,19 +63,19 @@  discard block
 block discarded – undo
63 63
         $tray->addElement(new \XoopsFormButton('', 'submit', _SUBMIT, 'submit'));
64 64
         $tray->addElement(new \XoopsFormButton('', 'reset', _CANCEL, 'reset'));
65 65
         $this->addElement($tray);
66
-        $ret      = '<br><strong>' . $this->getTitle() . '</strong><br>' . $this->_permDesc . '<br>';
67
-        $ret      .= "<form name='" . $this->getName() . "' id='" . $this->getName() . "' action='" . $this->getAction() . "' method='" . $this->getMethod() . "'" . $this->getExtra() . ">\n<table width='100%' class='outer' cellspacing='1' valign='top'>\n";
66
+        $ret      = '<br><strong>'.$this->getTitle().'</strong><br>'.$this->_permDesc.'<br>';
67
+        $ret .= "<form name='".$this->getName()."' id='".$this->getName()."' action='".$this->getAction()."' method='".$this->getMethod()."'".$this->getExtra().">\n<table width='100%' class='outer' cellspacing='1' valign='top'>\n";
68 68
         $elements = $this->getElements();
69 69
         $hidden   = '';
70 70
         foreach (array_keys($elements) as $i) {
71 71
             if (!is_object($elements[$i])) {
72 72
                 $ret .= $elements[$i];
73 73
             } elseif (!$elements[$i]->isHidden()) {
74
-                $ret .= "<tr valign='top' align='left'><td class='head'>" . $elements[$i]->getCaption();
74
+                $ret .= "<tr valign='top' align='left'><td class='head'>".$elements[$i]->getCaption();
75 75
                 if ('' !== $elements[$i]->getDescription()) {
76
-                    $ret .= '<br><br><span style="font-weight: normal;">' . $elements[$i]->getDescription() . '</span>';
76
+                    $ret .= '<br><br><span style="font-weight: normal;">'.$elements[$i]->getDescription().'</span>';
77 77
                 }
78
-                $ret .= "</td>\n<td class='even' style='text-align:center;'>\n" . $elements[$i]->render() . "\n</td></tr>\n";
78
+                $ret .= "</td>\n<td class='even' style='text-align:center;'>\n".$elements[$i]->render()."\n</td></tr>\n";
79 79
             } else {
80 80
                 $hidden .= $elements[$i]->render();
81 81
             }
Please login to merge, or discard this patch.
header.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -11,8 +11,8 @@  discard block
 block discarded – undo
11 11
 
12 12
 use Xmf\Request;
13 13
 
14
-include dirname(dirname(__DIR__)) . '/mainfile.php';
15
-require_once __DIR__ . '/include/common.php';
14
+include dirname(dirname(__DIR__)).'/mainfile.php';
15
+require_once __DIR__.'/include/common.php';
16 16
 
17 17
 // defined('XOOPS_ROOT_PATH') || die('Restricted access');
18 18
 /** @var \XoopsLogger $xoopsLogger */
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 //require_once $GLOBALS['xoops']->path('header.php');
24 24
 
25 25
 if (!empty($GLOBALS['xoopsModuleConfig']['do_rewrite'])) {
26
-    require_once __DIR__ . '/seo_url.php';
26
+    require_once __DIR__.'/seo_url.php';
27 27
     /* for seo */
28 28
     $toseo_url = ['index.php', 'viewforum.php', 'viewtopic.php', 'rss.php'];
29 29
 
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
                 //rewrite only for files
38 38
 
39 39
                 if ('' !== trim(getenv('SCRIPT_NAME'))) {
40
-                    if (false === strpos(getenv('REQUEST_URI'), '/' . SEO_MODULE_NAME . '/')) {
40
+                    if (false === strpos(getenv('REQUEST_URI'), '/'.SEO_MODULE_NAME.'/')) {
41 41
                         $redir = true;
42 42
                     } elseif (getenv('QUERY_STRING')) {
43 43
                         $redir = true;
@@ -47,9 +47,9 @@  discard block
 block discarded – undo
47 47
         }
48 48
 
49 49
         if (true === $redir) {
50
-            $s      = 'http://' . getenv('HTTP_HOST') . getenv('REQUEST_URI');
51
-            $s      = str_replace('/' . REAL_MODULE_NAME . '/', '/' . SEO_MODULE_NAME . '/', $s);
52
-            $newurl = seo_urls('<a href="' . $s . '"></a>');
50
+            $s      = 'http://'.getenv('HTTP_HOST').getenv('REQUEST_URI');
51
+            $s      = str_replace('/'.REAL_MODULE_NAME.'/', '/'.SEO_MODULE_NAME.'/', $s);
52
+            $newurl = seo_urls('<a href="'.$s.'"></a>');
53 53
             $newurl = str_replace('<a href="', '', $newurl);
54 54
             $newurl = str_replace('"></a>', '', $newurl);
55 55
             if (!headers_sent()) {
@@ -61,10 +61,10 @@  discard block
 block discarded – undo
61 61
     }
62 62
 }
63 63
 
64
-require_once $GLOBALS['xoops']->path('modules/' . $moduleDirName . '/include/vars.php');
64
+require_once $GLOBALS['xoops']->path('modules/'.$moduleDirName.'/include/vars.php');
65 65
 
66
-require_once __DIR__ . '/include/functions.user.php';
67
-require_once __DIR__ . '/include/functions.topic.php';
66
+require_once __DIR__.'/include/functions.user.php';
67
+require_once __DIR__.'/include/functions.topic.php';
68 68
 
69 69
 require_once $GLOBALS['xoops']->path('class/xoopsformloader.php');
70 70
 require_once $GLOBALS['xoops']->path('class/module.textsanitizer.php');
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 $menumode       = 0;
74 74
 $menumode_other = [];
75 75
 $menu_url       = htmlspecialchars(preg_replace('/&menumode=[^&]/', '', Request::getString('REQUEST_URI', '', 'SERVER')), ENT_QUOTES | ENT_HTML5);
76
-$menu_url       .= (false === strpos($menu_url, '?')) ? '?menumode=' : '&amp;menumode=';
76
+$menu_url .= (false === strpos($menu_url, '?')) ? '?menumode=' : '&amp;menumode=';
77 77
 //foreach ($GLOBALS['xoopsModuleConfig']['valid_menumodes'] as $key => $val) {
78 78
 //    if ($key !== $menumode) {
79 79
 //        $menumode_other[] = array('title' => $val, 'link' => $menu_url . $key);
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 
83 83
 if (is_object($GLOBALS['xoopsUser']) && !empty($GLOBALS['xoopsModuleConfig']['welcome_forum'])
84 84
     && !$GLOBALS['xoopsUser']->getVar('posts')) {
85
-    require_once __DIR__ . '/include/functions.welcome.php';
85
+    require_once __DIR__.'/include/functions.welcome.php';
86 86
 }
87 87
 // irmtfan for backward compatibility
88 88
 $pollmodules = $GLOBALS['xoopsModuleConfig']['poll_module'];
Please login to merge, or discard this patch.
viewpost.php 1 patch
Spacing   +46 added lines, -46 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 use Xmf\Request;
33 33
 use XoopsModules\Newbb;
34 34
 
35
-require_once __DIR__ . '/header.php';
35
+require_once __DIR__.'/header.php';
36 36
 
37 37
 $start    = Request::getInt('start', 0, 'GET');
38 38
 $forum_id = Request::getInt('forum', 0, 'GET');
@@ -72,8 +72,8 @@  discard block
 block discarded – undo
72 72
 //echo $mode.' - '.$status;
73 73
 $post_perpage = $GLOBALS['xoopsModuleConfig']['posts_per_page'];
74 74
 
75
-$criteria_count = new \CriteriaCompo(new \Criteria('forum_id', '(' . implode(',', $accessForums) . ')', 'IN'));
76
-$criteria_post  = new \CriteriaCompo(new \Criteria('p.forum_id', '(' . implode(',', $accessForums) . ')', 'IN'));
75
+$criteria_count = new \CriteriaCompo(new \Criteria('forum_id', '('.implode(',', $accessForums).')', 'IN'));
76
+$criteria_post  = new \CriteriaCompo(new \Criteria('p.forum_id', '('.implode(',', $accessForums).')', 'IN'));
77 77
 $criteria_post->setSort('p.post_id');
78 78
 $criteria_post->setOrder($order);
79 79
 
@@ -106,12 +106,12 @@  discard block
 block discarded – undo
106 106
             // START irmtfan use read_uid to find the unread posts when the user is logged in
107 107
             $read_uid = is_object($GLOBALS['xoopsUser']) ? $GLOBALS['xoopsUser']->getVar('uid') : 0;
108 108
             if (!empty($read_uid)) {
109
-                $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
110
-                $criteria_status_post = new \CriteriaCompo();// irmtfan new \Criteria
109
+                $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
110
+                $criteria_status_post = new \CriteriaCompo(); // irmtfan new \Criteria
111 111
                 $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
112
-                $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
112
+                $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
113 113
                 $criteria_post->add($criteria_status_post); // irmtfan add the status criteria to post criteria - move here
114
-                $criteria_count = $criteria_post;// irmtfan criteria count is equal to criteria post - move here
114
+                $criteria_count = $criteria_post; // irmtfan criteria count is equal to criteria post - move here
115 115
             } else {
116 116
             }
117 117
             // END irmtfan use read_uid to find the unread posts when the user is logged in
@@ -131,8 +131,8 @@  discard block
 block discarded – undo
131 131
                 }
132 132
             }
133 133
             if (count($topics) > 0) {
134
-                $criteria_count->add(new \Criteria('topic_id', '(' . implode(',', $topics) . ')', 'NOT IN'));
135
-                $criteria_post->add(new \Criteria('p.topic_id', '(' . implode(',', $topics) . ')', 'NOT IN'));
134
+                $criteria_count->add(new \Criteria('topic_id', '('.implode(',', $topics).')', 'NOT IN'));
135
+                $criteria_post->add(new \Criteria('p.topic_id', '('.implode(',', $topics).')', 'NOT IN'));
136 136
             }
137 137
             // END irmtfan fix read_mode = 1 bugs - for all users (member and anon)
138 138
             //$criteria_status_count->add(new \Criteria("approved", 1));// irmtfan commented and removed
@@ -161,8 +161,8 @@  discard block
 block discarded – undo
161 161
 $viewmode = Request::getString('viewmode', (!empty($viewmode_cookie) ? $viewmode_cookie : (@$valid_modes[$GLOBALS['xoopsModuleConfig']['view_mode'] - 1])), 'GET');
162 162
 $viewmode = in_array($viewmode, $valid_modes) ? $viewmode : $valid_modes[0];
163 163
 
164
-$postCount = $postHandler->getPostCount($criteria_count, $join);// irmtfan add join for read_mode = 2
165
-$posts     = $postHandler->getPostsByLimit($criteria_post, $post_perpage, $start, $join);// irmtfan add join for read_mode = 2
164
+$postCount = $postHandler->getPostCount($criteria_count, $join); // irmtfan add join for read_mode = 2
165
+$posts     = $postHandler->getPostsByLimit($criteria_post, $post_perpage, $start, $join); // irmtfan add join for read_mode = 2
166 166
 
167 167
 $poster_array = [];
168 168
 if (count($posts) > 0) {
@@ -172,20 +172,20 @@  discard block
 block discarded – undo
172 172
     }
173 173
 }
174 174
 
175
-$xoops_pagetitle                = $xoopsModule->getVar('name') . ' - ' . _MD_NEWBB_VIEWALLPOSTS;
175
+$xoops_pagetitle                = $xoopsModule->getVar('name').' - '._MD_NEWBB_VIEWALLPOSTS;
176 176
 $xoopsOption['xoops_pagetitle'] = $xoops_pagetitle;
177 177
 $xoopsOption['template_main']   = 'newbb_viewpost.tpl';
178 178
 
179 179
 require_once $GLOBALS['xoops']->path('header.php');
180
-require_once __DIR__ . '/include/functions.time.php';
181
-require_once __DIR__ . '/include/functions.render.php';
180
+require_once __DIR__.'/include/functions.time.php';
181
+require_once __DIR__.'/include/functions.render.php';
182 182
 
183 183
 //global $xoTheme;
184 184
 //$xoTheme->addScript('/Frameworks/textsanitizer/xoops.js');
185 185
 
186 186
 if (!empty($forum_id)) {
187 187
     if (!$forumHandler->getPermission($forumObject, 'view')) {
188
-        redirect_header(XOOPS_URL . '/index.php', 2, _MD_NEWBB_NORIGHTTOACCESS);
188
+        redirect_header(XOOPS_URL.'/index.php', 2, _MD_NEWBB_NORIGHTTOACCESS);
189 189
     }
190 190
     if ($forumObject->getVar('parent_forum')) {
191 191
         $parent_forumObject = $forumHandler->get($forumObject->getVar('parent_forum'), ['forum_name']);
@@ -199,17 +199,17 @@  discard block
 block discarded – undo
199 199
     $xoopsTpl->assign('forum_name', $forumObject->getVar('forum_name'));
200 200
     $xoopsTpl->assign('forum_moderators', $forumObject->dispForumModerators());
201 201
 
202
-    $xoops_pagetitle = $forumObject->getVar('forum_name') . ' - ' . _MD_NEWBB_VIEWALLPOSTS . ' [' . $xoopsModule->getVar('name') . ']';
202
+    $xoops_pagetitle = $forumObject->getVar('forum_name').' - '._MD_NEWBB_VIEWALLPOSTS.' ['.$xoopsModule->getVar('name').']';
203 203
     $xoopsTpl->assign('forum_id', $forumObject->getVar('forum_id'));
204 204
     // irmtfan new method
205 205
     if (!empty($GLOBALS['xoopsModuleConfig']['rss_enable'])) {
206 206
         $xoopsTpl->assign('xoops_module_header', '
207
-            <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 . '" />
207
+            <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.'" />
208 208
             ' . @$xoopsTpl->get_template_vars('xoops_module_header'));
209 209
     }
210 210
 } elseif (!empty($GLOBALS['xoopsModuleConfig']['rss_enable'])) {
211 211
     $xoopsTpl->assign('xoops_module_header', '
212
-        <link rel="alternate" type="application/xml+rss" title="' . $xoopsModule->getVar('name') . '" href="' . XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/rss.php" />
212
+        <link rel="alternate" type="application/xml+rss" title="' . $xoopsModule->getVar('name').'" href="'.XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/rss.php" />
213 213
     ' . @$xoopsTpl->get_template_vars('xoops_module_header'));
214 214
 }
215 215
 // irmtfan remove and move to footer.php
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
     /** @var \XoopsMembershipHandler $memberHandler */
223 223
     $memberHandler = xoops_getHandler('member');
224 224
     $userid_array  = array_keys($poster_array);
225
-    $user_criteria = '(' . implode(',', $userid_array) . ')';
225
+    $user_criteria = '('.implode(',', $userid_array).')';
226 226
     $users         = $memberHandler->getUsers(new \Criteria('uid', $user_criteria, 'IN'), true);
227 227
 } else {
228 228
     $user_criteria = '';
@@ -260,9 +260,9 @@  discard block
 block discarded – undo
260 260
     $post_title = $post->getVar('subject');
261 261
 
262 262
     if ($posticon = $post->getVar('icon')) {
263
-        $post_image = '<a name="' . $post->getVar('post_id') . '"><img src="' . XOOPS_URL . '/images/subject/' . htmlspecialchars($posticon, ENT_QUOTES | ENT_HTML5) . '" alt="" /></a>';
263
+        $post_image = '<a name="'.$post->getVar('post_id').'"><img src="'.XOOPS_URL.'/images/subject/'.htmlspecialchars($posticon, ENT_QUOTES | ENT_HTML5).'" alt="" /></a>';
264 264
     } else {
265
-        $post_image = '<a name="' . $post->getVar('post_id') . '"><img src="' . XOOPS_URL . '/images/icons/no_posticon.gif" alt="" /></a>';
265
+        $post_image = '<a name="'.$post->getVar('post_id').'"><img src="'.XOOPS_URL.'/images/icons/no_posticon.gif" alt="" /></a>';
266 266
     }
267 267
     $poster = [
268 268
         'uid'  => 0,
@@ -276,10 +276,10 @@  discard block
 block discarded – undo
276 276
         $post_text       = $post->getVar('post_text');
277 277
         $post_attachment = $post->displayAttachment();
278 278
     } elseif ($GLOBALS['xoopsModuleConfig']['enable_karma'] && $post->getVar('post_karma') > $user_karma) {
279
-        $post_text       = "<div class='karma'>" . sprintf(_MD_NEWBB_KARMA_REQUIREMENT, $user_karma, $post->getVar('post_karma')) . '</div>';
279
+        $post_text       = "<div class='karma'>".sprintf(_MD_NEWBB_KARMA_REQUIREMENT, $user_karma, $post->getVar('post_karma')).'</div>';
280 280
         $post_attachment = '';
281 281
     } elseif ($GLOBALS['xoopsModuleConfig']['allow_require_reply'] && $post->getVar('require_reply')) {
282
-        $post_text       = "<div class='karma'>" . _MD_NEWBB_REPLY_REQUIREMENT . '</div>';
282
+        $post_text       = "<div class='karma'>"._MD_NEWBB_REPLY_REQUIREMENT.'</div>';
283 283
         $post_attachment = '';
284 284
     } else {
285 285
         $post_text       = $post->getVar('post_text');
@@ -299,40 +299,40 @@  discard block
 block discarded – undo
299 299
             || (!$suspension[$post->getVar('forum_id')] && $post->checkIdentity()
300 300
                 && $post->checkTimelimit('delete_timelimit'))) {
301 301
             $thread_buttons['delete']['image'] = newbbDisplayImage('p_delete', _DELETE);
302
-            $thread_buttons['delete']['link']  = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/delete.php?forum=' . $post->getVar('forum_id') . '&amp;topic_id=' . $post->getVar('topic_id');
302
+            $thread_buttons['delete']['link']  = XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/delete.php?forum='.$post->getVar('forum_id').'&amp;topic_id='.$post->getVar('topic_id');
303 303
             $thread_buttons['delete']['name']  = _DELETE;
304 304
         }
305 305
         if ($isAdmin
306 306
             || !$suspension[$post->getVar('forum_id')] && $post->checkIdentity()
307 307
                && $post->checkTimelimit('edit_timelimit')) {
308 308
             $thread_buttons['edit']['image'] = newbbDisplayImage('p_edit', _EDIT);
309
-            $thread_buttons['edit']['link']  = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/edit.php?forum=' . $post->getVar('forum_id') . '&amp;topic_id=' . $post->getVar('topic_id');
309
+            $thread_buttons['edit']['link']  = XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/edit.php?forum='.$post->getVar('forum_id').'&amp;topic_id='.$post->getVar('topic_id');
310 310
             $thread_buttons['edit']['name']  = _EDIT;
311 311
         }
312 312
         if (is_object($GLOBALS['xoopsUser']) && !$suspension[$post->getVar('forum_id')]) {
313 313
             $thread_buttons['reply']['image'] = newbbDisplayImage('p_reply', _MD_NEWBB_REPLY);
314
-            $thread_buttons['reply']['link']  = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/reply.php?forum=' . $post->getVar('forum_id') . '&amp;topic_id=' . $post->getVar('topic_id');
314
+            $thread_buttons['reply']['link']  = XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/reply.php?forum='.$post->getVar('forum_id').'&amp;topic_id='.$post->getVar('topic_id');
315 315
             $thread_buttons['reply']['name']  = _MD_NEWBB_REPLY;
316 316
 
317 317
             $thread_buttons['quote']['image'] = newbbDisplayImage('p_quote', _MD_NEWBB_QUOTE);
318
-            $thread_buttons['quote']['link']  = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/reply.php?forum=' . $post->getVar('forum_id') . '&amp;topic_id=' . $post->getVar('topic_id') . '&amp;quotedac=1';
318
+            $thread_buttons['quote']['link']  = XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/reply.php?forum='.$post->getVar('forum_id').'&amp;topic_id='.$post->getVar('topic_id').'&amp;quotedac=1';
319 319
             $thread_buttons['quote']['name']  = _MD_NEWBB_QUOTE;
320 320
         }
321 321
     } else {
322 322
         $thread_buttons['delete']['image'] = newbbDisplayImage('p_delete', _DELETE);
323
-        $thread_buttons['delete']['link']  = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/delete.php?forum=' . $post->getVar('forum_id') . '&amp;topic_id=' . $post->getVar('topic_id');
323
+        $thread_buttons['delete']['link']  = XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/delete.php?forum='.$post->getVar('forum_id').'&amp;topic_id='.$post->getVar('topic_id');
324 324
         $thread_buttons['delete']['name']  = _DELETE;
325 325
         $thread_buttons['edit']['image']   = newbbDisplayImage('p_edit', _EDIT);
326
-        $thread_buttons['edit']['link']    = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/edit.php?forum=' . $post->getVar('forum_id') . '&amp;topic_id=' . $post->getVar('topic_id');
326
+        $thread_buttons['edit']['link']    = XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/edit.php?forum='.$post->getVar('forum_id').'&amp;topic_id='.$post->getVar('topic_id');
327 327
         $thread_buttons['edit']['name']    = _EDIT;
328 328
         $thread_buttons['reply']['image']  = newbbDisplayImage('p_reply', _MD_NEWBB_REPLY);
329
-        $thread_buttons['reply']['link']   = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/reply.php?forum=' . $post->getVar('forum_id') . '&amp;topic_id=' . $post->getVar('topic_id');
329
+        $thread_buttons['reply']['link']   = XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/reply.php?forum='.$post->getVar('forum_id').'&amp;topic_id='.$post->getVar('topic_id');
330 330
         $thread_buttons['reply']['name']   = _MD_NEWBB_REPLY;
331 331
     }
332 332
 
333 333
     if (!$isAdmin && $GLOBALS['xoopsModuleConfig']['reportmod_enabled']) {
334 334
         $thread_buttons['report']['image'] = newbbDisplayImage('p_report', _MD_NEWBB_REPORT);
335
-        $thread_buttons['report']['link']  = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/report.php?forum=' . $post->getVar('forum_id') . '&amp;topic_id=' . $post->getVar('topic_id');
335
+        $thread_buttons['report']['link']  = XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/report.php?forum='.$post->getVar('forum_id').'&amp;topic_id='.$post->getVar('topic_id');
336 336
         $thread_buttons['report']['name']  = _MD_NEWBB_REPORT;
337 337
     }
338 338
     $thread_action = [];
@@ -361,13 +361,13 @@  discard block
 block discarded – undo
361 361
 unset($viewtopic_users, $forums);
362 362
 
363 363
 if (!empty($GLOBALS['xoopsModuleConfig']['show_jump'])) {
364
-    require_once __DIR__ . '/include/functions.forum.php';
364
+    require_once __DIR__.'/include/functions.forum.php';
365 365
     $xoopsTpl->assign('forum_jumpbox', newbbMakeJumpbox($forum_id));
366 366
 }
367 367
 
368 368
 if ($postCount > $post_perpage) {
369 369
     include $GLOBALS['xoops']->path('class/pagenav.php');
370
-    $nav = new \XoopsPageNav($postCount, $post_perpage, $start, 'start', 'forum=' . $forum_id . '&amp;viewmode=' . $viewmode . '&amp;status=' . $status . '&amp;uid=' . $uid . '&amp;order=' . $order . '&amp;mode=' . $mode);
370
+    $nav = new \XoopsPageNav($postCount, $post_perpage, $start, 'start', 'forum='.$forum_id.'&amp;viewmode='.$viewmode.'&amp;status='.$status.'&amp;uid='.$uid.'&amp;order='.$order.'&amp;mode='.$mode);
371 371
     //if (isset($GLOBALS['xoopsModuleConfig']['do_rewrite'])) $nav->url = formatURL(Request::getString('SERVER_NAME', '', 'SERVER')) . $nav->url;
372 372
     if ('select' === $GLOBALS['xoopsModuleConfig']['pagenav_display']) {
373 373
         $navi = $nav->renderSelect();
@@ -386,13 +386,13 @@  discard block
 block discarded – undo
386 386
 
387 387
 switch ($status) {
388 388
     case 'active':
389
-        $lang_title = _MD_NEWBB_VIEWALLPOSTS . ' [' . _MD_NEWBB_TYPE_ADMIN . ']';
389
+        $lang_title = _MD_NEWBB_VIEWALLPOSTS.' ['._MD_NEWBB_TYPE_ADMIN.']';
390 390
         break;
391 391
     case 'pending':
392
-        $lang_title = _MD_NEWBB_VIEWALLPOSTS . ' [' . _MD_NEWBB_TYPE_PENDING . ']';
392
+        $lang_title = _MD_NEWBB_VIEWALLPOSTS.' ['._MD_NEWBB_TYPE_PENDING.']';
393 393
         break;
394 394
     case 'deleted':
395
-        $lang_title = _MD_NEWBB_VIEWALLPOSTS . ' [' . _MD_NEWBB_TYPE_DELETED . ']';
395
+        $lang_title = _MD_NEWBB_VIEWALLPOSTS.' ['._MD_NEWBB_TYPE_DELETED.']';
396 396
         break;
397 397
     case 'new':
398 398
         $lang_title = _MD_NEWBB_NEWPOSTS;
@@ -402,7 +402,7 @@  discard block
 block discarded – undo
402 402
         break;
403 403
 }
404 404
 if ($uid > 0) {
405
-    $lang_title .= ' (' . XoopsUser::getUnameFromId($uid) . ')';
405
+    $lang_title .= ' ('.XoopsUser::getUnameFromId($uid).')';
406 406
 }
407 407
 $xoopsTpl->assign('lang_title', $lang_title);
408 408
 // irmtfan up to p_up
@@ -411,12 +411,12 @@  discard block
 block discarded – undo
411 411
 $xoopsTpl->assign('anonymous_prefix', $GLOBALS['xoopsModuleConfig']['anonymous_prefix']);
412 412
 $xoopsTpl->assign('down', newbbDisplayImage('down', _MD_NEWBB_BOTTOM));
413 413
 
414
-$all_link       = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/viewpost.php?forum=' . $forum_id . "&amp;start=$start";
415
-$post_link      = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/viewpost.php?forum=' . $forum_id;
416
-$newpost_link   = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/viewpost.php?forum=' . $forum_id . '&amp;status=new';
417
-$digest_link    = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/viewpost.php?forum=' . $forum_id . "&amp;start=$start&amp;status=digest";
418
-$unreplied_link = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/viewpost.php?forum=' . $forum_id . "&amp;start=$start&amp;status=unreplied";
419
-$unread_link    = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/viewpost.php?forum=' . $forum_id . "&amp;start=$start&amp;status=unread";
414
+$all_link       = XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/viewpost.php?forum='.$forum_id."&amp;start=$start";
415
+$post_link      = XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/viewpost.php?forum='.$forum_id;
416
+$newpost_link   = XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/viewpost.php?forum='.$forum_id.'&amp;status=new';
417
+$digest_link    = XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/viewpost.php?forum='.$forum_id."&amp;start=$start&amp;status=digest";
418
+$unreplied_link = XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/viewpost.php?forum='.$forum_id."&amp;start=$start&amp;status=unreplied";
419
+$unread_link    = XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/viewpost.php?forum='.$forum_id."&amp;start=$start&amp;status=unread";
420 420
 
421 421
 $xoopsTpl->assign('all_link', $all_link);
422 422
 $xoopsTpl->assign('post_link', $post_link);
@@ -428,12 +428,12 @@  discard block
 block discarded – undo
428 428
 $viewmode_options = [];
429 429
 if ('DESC' === $order) {
430 430
     $viewmode_options[] = [
431
-        'link'  => XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/viewpost.php?viewmode=flat&amp;order=ASC&amp;forum=' . $forum_id,
431
+        'link'  => XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/viewpost.php?viewmode=flat&amp;order=ASC&amp;forum='.$forum_id,
432 432
         'title' => _OLDESTFIRST
433 433
     ];
434 434
 } else {
435 435
     $viewmode_options[] = [
436
-        'link'  => XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/viewpost.php?viewmode=flat&amp;order=DESC&amp;forum=' . $forum_id,
436
+        'link'  => XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/viewpost.php?viewmode=flat&amp;order=DESC&amp;forum='.$forum_id,
437 437
         'title' => _NEWESTFIRST
438 438
     ];
439 439
 }
@@ -448,5 +448,5 @@  discard block
 block discarded – undo
448 448
 $xoopsTpl->assign('mode', $mode);
449 449
 $xoopsTpl->assign('status', $status);
450 450
 // irmtfan move to footer.php
451
-require_once __DIR__ . '/footer.php';
451
+require_once __DIR__.'/footer.php';
452 452
 include $GLOBALS['xoops']->path('footer.php');
Please login to merge, or discard this patch.
polls.php 1 patch
Spacing   +47 added lines, -47 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 
24 24
 // rewrite by irmtfan and zyspec to accept xoopspoll 1.4 and all old xoopspoll and umfrage versions and all clones
25 25
 
26
-require_once __DIR__ . '/header.php';
26
+require_once __DIR__.'/header.php';
27 27
 require_once $GLOBALS['xoops']->path('class/xoopsformloader.php');
28 28
 require_once $GLOBALS['xoops']->path('class/xoopslists.php');
29 29
 require_once $GLOBALS['xoops']->path('class/xoopsblock.php');
@@ -56,18 +56,18 @@  discard block
 block discarded – undo
56 56
 if (is_object($topicObject)) {
57 57
     $forum_id = $topicObject->getVar('forum_id');
58 58
 } else {
59
-    redirect_header(XOOPS_URL . '/index.php', 2, _MD_NEWBB_POLLMODULE_ERROR . ': ' . _MD_NEWBB_FORUMNOEXIST);
59
+    redirect_header(XOOPS_URL.'/index.php', 2, _MD_NEWBB_POLLMODULE_ERROR.': '._MD_NEWBB_FORUMNOEXIST);
60 60
 }
61 61
 // forum access permission
62 62
 /** @var Newbb\ForumHandler $forumHandler */
63 63
 $forumHandler = Newbb\Helper::getInstance()->getHandler('Forum');
64 64
 $forumObject  = $forumHandler->get($forum_id);
65 65
 if (!$forumHandler->getPermission($forumObject)) {
66
-    redirect_header(XOOPS_URL . '/index.php', 2, _MD_NEWBB_NORIGHTTOACCESS);
66
+    redirect_header(XOOPS_URL.'/index.php', 2, _MD_NEWBB_NORIGHTTOACCESS);
67 67
 }
68 68
 // topic view permission
69 69
 if (!$topicHandler->getPermission($forumObject, $topicObject->getVar('topic_status'), 'view')) {
70
-    redirect_header('viewforum.php?forum=' . $forum_id, 2, _MD_NEWBB_NORIGHTTOVIEW);
70
+    redirect_header('viewforum.php?forum='.$forum_id, 2, _MD_NEWBB_NORIGHTTOVIEW);
71 71
 }
72 72
 // poll module
73 73
 $pollModuleHandler = $moduleHandler->getByDirname($GLOBALS['xoopsModuleConfig']['poll_module']);
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
         $pollObject = $xpPollHandler->get($poll_id); // will create poll if poll_id = 0 exist
85 85
         // old xoopspoll or umfrage or any clone from them
86 86
     } else {
87
-        include $GLOBALS['xoops']->path('modules/' . $GLOBALS['xoopsModuleConfig']['poll_module'] . '/include/constants.php');
87
+        include $GLOBALS['xoops']->path('modules/'.$GLOBALS['xoopsModuleConfig']['poll_module'].'/include/constants.php');
88 88
         $classPoll  = $topicObject->loadOldPoll();
89 89
         $pollObject = new $classPoll($poll_id); // will create poll if poll_id = 0 exist
90 90
     }
@@ -114,11 +114,11 @@  discard block
 block discarded – undo
114 114
     case 'add':
115 115
         // new xoopspoll module
116 116
         if ($pollModuleHandler->getVar('version') >= 140) {
117
-            echo '<h4>' . _MD_NEWBB_POLL_CREATNEWPOLL . "</h4>\n";
117
+            echo '<h4>'._MD_NEWBB_POLL_CREATNEWPOLL."</h4>\n";
118 118
             $pollObject->renderForm(Request::getString('PHP_SELF', '', 'SERVER'), 'post', ['topic_id' => $topic_id]);
119 119
         // old xoopspoll or umfrage or any clone from them
120 120
         } else {
121
-            $classOption  = $classPoll . 'Option';
121
+            $classOption  = $classPoll.'Option';
122 122
             $poll_form    = new \XoopsThemeForm(_MD_NEWBB_POLL_CREATNEWPOLL, 'poll_form', 'polls.php', 'post', true);
123 123
             $author_label = new \XoopsFormLabel(_MD_NEWBB_POLL_AUTHOR, is_object($GLOBALS['xoopsUser']) ? ("<a href='"
124 124
                                                                                                           . XOOPS_URL
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
             $poll_form->addElement($desc_tarea);
135 135
             $currenttime = formatTimestamp(time(), 'Y-m-d H:i:s');
136 136
             $endtime     = formatTimestamp(time() + 604800, 'Y-m-d H:i:s');
137
-            $expire_text = new \XoopsFormText(_MD_NEWBB_POLL_EXPIRATION . '<br><small>' . _MD_NEWBB_POLL_FORMAT . '<br>' . sprintf(_MD_NEWBB_POLL_CURRENTTIME, $currenttime) . '</small>', 'end_time', 30, 19, $endtime);
137
+            $expire_text = new \XoopsFormText(_MD_NEWBB_POLL_EXPIRATION.'<br><small>'._MD_NEWBB_POLL_FORMAT.'<br>'.sprintf(_MD_NEWBB_POLL_CURRENTTIME, $currenttime).'</small>', 'end_time', 30, 19, $endtime);
138 138
             $poll_form->addElement($expire_text);
139 139
 
140 140
             $weight_text = new \XoopsFormText(_MD_NEWBB_POLL_DISPLAYORDER, 'weight', 6, 5, 0);
@@ -147,14 +147,14 @@  discard block
 block discarded – undo
147 147
             $poll_form->addElement($notify_yn);
148 148
 
149 149
             $option_tray    = new \XoopsFormElementTray(_MD_NEWBB_POLL_POLLOPTIONS, '');
150
-            $barcolor_array = \XoopsLists::getImgListAsArray($GLOBALS['xoops']->path('modules/' . $GLOBALS['xoopsModuleConfig']['poll_module'] . '/assets/images/colorbars/'));
150
+            $barcolor_array = \XoopsLists::getImgListAsArray($GLOBALS['xoops']->path('modules/'.$GLOBALS['xoopsModuleConfig']['poll_module'].'/assets/images/colorbars/'));
151 151
             for ($i = 0; $i < 10; ++$i) {
152 152
                 $current_bar = ('blank.gif' !== current($barcolor_array)) ? current($barcolor_array) : next($barcolor_array);
153 153
                 $option_text = new \XoopsFormText('', 'option_text[]', 50, 255);
154 154
                 $option_tray->addElement($option_text);
155 155
                 $color_select = new \XoopsFormSelect('', "option_color[{$i}]", $current_bar);
156 156
                 $color_select->addOptionArray($barcolor_array);
157
-                $color_select->setExtra("onchange='showImgSelected(\"option_color_image[{$i}]\", \"option_color[{$i}]\", \"modules/" . $GLOBALS['xoopsModuleConfig']['poll_module'] . '/assets/images/colorbars", "", "' . XOOPS_URL . "\")'");
157
+                $color_select->setExtra("onchange='showImgSelected(\"option_color_image[{$i}]\", \"option_color[{$i}]\", \"modules/".$GLOBALS['xoopsModuleConfig']['poll_module'].'/assets/images/colorbars", "", "'.XOOPS_URL."\")'");
158 158
                 $color_label = new \XoopsFormLabel('', "<img src='"
159 159
                                                       . XOOPS_URL
160 160
                                                       . '/modules/'
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
             $poll_form->addElement(new \XoopsFormHidden('poll_id', $poll_id));
177 177
             $poll_form->addElement(new \XoopsFormHidden('user_id', is_object($GLOBALS['xoopsUser']) ? $GLOBALS['xoopsUser']->getVar('uid') : 0));
178 178
             $poll_form->addElement(new \XoopsFormButtonTray('poll_submit', _SUBMIT, 'submit'));
179
-            echo '<h4>' . _MD_NEWBB_POLL_POLLCONF . '</h4>';
179
+            echo '<h4>'._MD_NEWBB_POLL_POLLCONF.'</h4>';
180 180
             $poll_form->display();
181 181
         }
182 182
         break; // op: add
@@ -184,13 +184,13 @@  discard block
 block discarded – undo
184 184
     case 'edit':
185 185
         // new xoopspoll module
186 186
         if ($pollModuleHandler->getVar('version') >= 140) {
187
-            echo '<h4>' . _MD_NEWBB_POLL_EDITPOLL . "</h4>\n";
187
+            echo '<h4>'._MD_NEWBB_POLL_EDITPOLL."</h4>\n";
188 188
             $pollObject->renderForm(Request::getString('PHP_SELF', '', 'SERVER'), 'post', ['topic_id' => $topic_id]);
189 189
         // old xoopspoll or umfrage or any clone from them
190 190
         } else {
191
-            $classOption  = $classPoll . 'Option';
191
+            $classOption  = $classPoll.'Option';
192 192
             $poll_form    = new \XoopsThemeForm(_MD_NEWBB_POLL_EDITPOLL, 'poll_form', 'polls.php', 'post', true);
193
-            $author_label = new \XoopsFormLabel(_MD_NEWBB_POLL_AUTHOR, "<a href='" . XOOPS_URL . '/userinfo.php?uid=' . $pollObject->getVar('user_id') . "'>" . newbbGetUnameFromId($pollObject->getVar('user_id'), $GLOBALS['xoopsModuleConfig']['show_realname']) . '</a>');
193
+            $author_label = new \XoopsFormLabel(_MD_NEWBB_POLL_AUTHOR, "<a href='".XOOPS_URL.'/userinfo.php?uid='.$pollObject->getVar('user_id')."'>".newbbGetUnameFromId($pollObject->getVar('user_id'), $GLOBALS['xoopsModuleConfig']['show_realname']).'</a>');
194 194
             $poll_form->addElement($author_label);
195 195
             $question_text = new \XoopsFormText(_MD_NEWBB_POLL_POLLQUESTION, 'question', 50, 255, $pollObject->getVar('question', 'E'));
196 196
             $poll_form->addElement($question_text);
@@ -198,13 +198,13 @@  discard block
 block discarded – undo
198 198
             $poll_form->addElement($desc_tarea);
199 199
             $date = formatTimestamp($pollObject->getVar('end_time'), 'Y-m-d H:i:s'); // important "Y-m-d H:i:s" use in jdf function
200 200
             if (!$pollObject->hasExpired()) {
201
-                $expire_text = new \XoopsFormText(_MD_NEWBB_POLL_EXPIRATION . '<br><small>' . _MD_NEWBB_POLL_FORMAT . '<br>' . sprintf(_MD_NEWBB_POLL_CURRENTTIME, formatTimestamp(time(), 'Y-m-d H:i:s')) . '</small>', 'end_time', 20, 19, $date);
201
+                $expire_text = new \XoopsFormText(_MD_NEWBB_POLL_EXPIRATION.'<br><small>'._MD_NEWBB_POLL_FORMAT.'<br>'.sprintf(_MD_NEWBB_POLL_CURRENTTIME, formatTimestamp(time(), 'Y-m-d H:i:s')).'</small>', 'end_time', 20, 19, $date);
202 202
                 $poll_form->addElement($expire_text);
203 203
             } else {
204 204
                 // irmtfan full URL - add topic_id
205 205
                 $restart_label = new \XoopsFormLabel(
206 206
                     _MD_NEWBB_POLL_EXPIRATION,
207
-                                                    sprintf(_MD_NEWBB_POLL_EXPIREDAT, $date) . "<br><a href='" . XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . "/polls.php?op=restart&amp;poll_id={$poll_id}&amp;topic_id={$topic_id}'>" . _MD_NEWBB_POLL_RESTART . '</a>'
207
+                                                    sprintf(_MD_NEWBB_POLL_EXPIREDAT, $date)."<br><a href='".XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname')."/polls.php?op=restart&amp;poll_id={$poll_id}&amp;topic_id={$topic_id}'>"._MD_NEWBB_POLL_RESTART.'</a>'
208 208
                 );
209 209
                 $poll_form->addElement($restart_label);
210 210
             }
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
             $poll_form->addElement($weight_text);
213 213
             $multi_yn = new \XoopsFormRadioYN(_MD_NEWBB_POLL_ALLOWMULTI, 'multiple', $pollObject->getVar('multiple'));
214 214
             $poll_form->addElement($multi_yn);
215
-            $options_arr  =& $classOption::getAllByPollId($poll_id);
215
+            $options_arr  = & $classOption::getAllByPollId($poll_id);
216 216
             $notify_value = 1;
217 217
             if (0 !== $pollObject->getVar('mail_status')) {
218 218
                 $notify_value = 0;
@@ -228,9 +228,9 @@  discard block
 block discarded – undo
228 228
                 $option_tray->addElement(new \XoopsFormHidden('option_id[]', $option->getVar('option_id')));
229 229
                 $color_select = new \XoopsFormSelect('', 'option_color[{$i}]', $option->getVar('option_color'));
230 230
                 $color_select->addOptionArray($barcolor_array);
231
-                $color_select->setExtra("onchange='showImgSelected(\"option_color_image[{$i}]\", \"option_color[" . $i . "]\", \"modules/{$GLOBALS['xoopsModuleConfig']['poll_module']}/assets/images/colorbars\", \"\", \"" . XOOPS_URL . "\")'");
231
+                $color_select->setExtra("onchange='showImgSelected(\"option_color_image[{$i}]\", \"option_color[".$i."]\", \"modules/{$GLOBALS['xoopsModuleConfig']['poll_module']}/assets/images/colorbars\", \"\", \"".XOOPS_URL."\")'");
232 232
                 $color_label = new \XoopsFormLabel('', "<img src='"
233
-                                                      . $GLOBALS['xoops']->url("modules/{$GLOBALS['xoopsModuleConfig']['poll_module']}/assets/images/colorbars/" . $option->getVar('option_color', 'E'))
233
+                                                      . $GLOBALS['xoops']->url("modules/{$GLOBALS['xoopsModuleConfig']['poll_module']}/assets/images/colorbars/".$option->getVar('option_color', 'E'))
234 234
                                                       . "' name='option_color_image[{$i}]' id='option_color_image[{$i}]' class='alignbottom' width='30' height='15' alt='' /><br>");
235 235
                 $option_tray->addElement($color_select);
236 236
                 $option_tray->addElement($color_label);
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
                 ++$i;
239 239
             }
240 240
             // irmtfan full URL
241
-            $more_label = new \XoopsFormLabel('', "<br><a href='" . XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . "/polls.php?op=addmore&amp;poll_id={$poll_id}&amp;topic_id={$topic_id}'>" . _MD_NEWBB_POLL_ADDMORE . '</a>');
241
+            $more_label = new \XoopsFormLabel('', "<br><a href='".XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname')."/polls.php?op=addmore&amp;poll_id={$poll_id}&amp;topic_id={$topic_id}'>"._MD_NEWBB_POLL_ADDMORE.'</a>');
242 242
             $option_tray->addElement($more_label);
243 243
             $poll_form->addElement($option_tray);
244 244
             $poll_form->addElement(new \XoopsFormHidden('op', 'update'));
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
             $poll_form->addElement(new \XoopsFormHidden('poll_id', $poll_id));
247 247
             $poll_form->addElement(new \XoopsFormButtonTray('poll_submit', _SUBMIT, 'submit'));
248 248
 
249
-            echo '<h4>' . _MD_NEWBB_POLL_POLLCONF . "</h4>\n";
249
+            echo '<h4>'._MD_NEWBB_POLL_POLLCONF."</h4>\n";
250 250
             $poll_form->display();
251 251
         }
252 252
         break; // op: edit
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
             $option_empty = true;
265 265
             if (!Request::getString('option_text', '', 'POST')) {
266 266
                 // irmtfan - issue with javascript:history.go(-1)
267
-                redirect_header(Request::getString('HTTP_REFERER', '', 'SERVER'), 2, _MD_NEWBB_ERROROCCURED . ': ' . _MD_NEWBB_POLL_POLLOPTIONS . ' !');
267
+                redirect_header(Request::getString('HTTP_REFERER', '', 'SERVER'), 2, _MD_NEWBB_ERROROCCURED.': '._MD_NEWBB_POLL_POLLOPTIONS.' !');
268 268
             }
269 269
             $option_text = Request::getArray('option_text', '', 'POST');
270 270
             foreach ($option_text as $optxt) {
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
             }
276 276
             if ($option_empty) {
277 277
                 // irmtfan - issue with javascript:history.go(-1)
278
-                redirect_header(Request::getString('HTTP_REFERER', '', 'SERVER'), 2, _MD_NEWBB_ERROROCCURED . ': ' . _MD_NEWBB_POLL_POLLOPTIONS . ' !');
278
+                redirect_header(Request::getString('HTTP_REFERER', '', 'SERVER'), 2, _MD_NEWBB_ERROROCCURED.': '._MD_NEWBB_POLL_POLLOPTIONS.' !');
279 279
             }
280 280
             $pollObject->setVar('question', Request::getString('question', '', 'POST'));
281 281
             $pollObject->setVar('description', Request::getString('description', '', 'POST'));
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
             }
307 307
             $i            = 0;
308 308
             $option_color = Request::getArray('option_color', null, 'POST');
309
-            $classOption  = $classPoll . 'Option';
309
+            $classOption  = $classPoll.'Option';
310 310
             foreach ($option_text as $optxt) {
311 311
                 $optxt = trim($optxt);
312 312
                 /** @var Xoopspoll\Option $optionObject */
@@ -333,7 +333,7 @@  discard block
 block discarded – undo
333 333
             } else {
334 334
                 redirect_header("viewtopic.php?topic_id={$topic_id}", 2, _MD_NEWBB_POLL_DBUPDATED);
335 335
             }
336
-            break;// op: save
336
+            break; // op: save
337 337
         }
338 338
     // no break
339 339
     case 'update':
@@ -346,7 +346,7 @@  discard block
 block discarded – undo
346 346
         $option_string = is_array($option_text) ? implode('', $option_text) : $option_text;
347 347
         $option_string = trim($option_string);
348 348
         if ('' === $option_string) {
349
-            redirect_header(Request::getString('HTTP_REFERER', '', 'SERVER'), 2, _MD_NEWBB_ERROROCCURED . ': ' . _MD_NEWBB_POLL_POLLOPTIONS . ' !');
349
+            redirect_header(Request::getString('HTTP_REFERER', '', 'SERVER'), 2, _MD_NEWBB_ERROROCCURED.': '._MD_NEWBB_POLL_POLLOPTIONS.' !');
350 350
         }
351 351
 
352 352
         // new xoopspoll module
@@ -465,8 +465,8 @@  discard block
 block discarded – undo
465 465
             $i            = 0;
466 466
             $option_id    = Request::getArray('option_id', null, 'POST');
467 467
             $option_color = Request::getArray('option_color', null, 'POST');
468
-            $classOption  = $classPoll . 'Option';
469
-            $classLog     = $classPoll . 'Log';
468
+            $classOption  = $classPoll.'Option';
469
+            $classLog     = $classPoll.'Log';
470 470
             foreach ($option_id as $opid) {
471 471
                 $optionObject    = new $classOption($opid);
472 472
                 $option_text[$i] = trim($option_text[$i]);
@@ -497,7 +497,7 @@  discard block
 block discarded – undo
497 497
         } else {
498 498
             redirect_header("viewtopic.php?topic_id={$topic_id}", 2, _MD_NEWBB_POLL_DBUPDATED);
499 499
         }
500
-        break;// op: save | update
500
+        break; // op: save | update
501 501
 
502 502
     case 'addmore':
503 503
         $question = $pollObject->getVar('question');
@@ -511,14 +511,14 @@  discard block
 block discarded – undo
511 511
         // old xoopspoll or umfrage or any clone from them
512 512
         } else {
513 513
             $option_tray    = new \XoopsFormElementTray(_MD_NEWBB_POLL_POLLOPTIONS, '');
514
-            $barcolor_array = \XoopsLists::getImgListAsArray($GLOBALS['xoops']->path('modules/' . $GLOBALS['xoopsModuleConfig']['poll_module'] . '/assets/images/colorbars/'));
514
+            $barcolor_array = \XoopsLists::getImgListAsArray($GLOBALS['xoops']->path('modules/'.$GLOBALS['xoopsModuleConfig']['poll_module'].'/assets/images/colorbars/'));
515 515
             for ($i = 0; $i < 10; ++$i) {
516 516
                 $current_bar = ('blank.gif' !== current($barcolor_array)) ? current($barcolor_array) : next($barcolor_array);
517 517
                 $option_text = new \XoopsFormText('', 'option_text[]', 50, 255);
518 518
                 $option_tray->addElement($option_text);
519 519
                 $color_select = new \XoopsFormSelect('', "option_color[{$i}]", $current_bar);
520 520
                 $color_select->addOptionArray($barcolor_array);
521
-                $color_select->setExtra("onchange='showImgSelected(\"option_color_image[{$i}]\", \"option_color[{$i}]\", \"modules/{$GLOBALS['xoopsModuleConfig']['poll_module']}/assets/images/colorbars\", \"\", \"" . XOOPS_URL . "\")'");
521
+                $color_select->setExtra("onchange='showImgSelected(\"option_color_image[{$i}]\", \"option_color[{$i}]\", \"modules/{$GLOBALS['xoopsModuleConfig']['poll_module']}/assets/images/colorbars\", \"\", \"".XOOPS_URL."\")'");
522 522
                 $color_label = new \XoopsFormLabel('', "<img src='"
523 523
                                                       . $GLOBALS['xoops']->url("modules/{$GLOBALS['xoopsModuleConfig']['poll_module']}/assets/images/colorbars/{$current_bar}")
524 524
                                                       . "' name='option_color_image[{$i}]' id='option_color_image[{$i}]' class='alignbottom' width='30' height='15' alt='' /><br>");
@@ -536,7 +536,7 @@  discard block
 block discarded – undo
536 536
         $poll_form->addElement(new \XoopsFormHidden('topic_id', $topic_id));
537 537
         $poll_form->addElement(new \XoopsFormHidden('poll_id', $poll_id));
538 538
 
539
-        echo '<h4>' . _MD_NEWBB_POLL_POLLCONF . "</h4>\n";
539
+        echo '<h4>'._MD_NEWBB_POLL_POLLCONF."</h4>\n";
540 540
         $poll_form->display();
541 541
         break;
542 542
 
@@ -551,7 +551,7 @@  discard block
 block discarded – undo
551 551
         $option_string = trim($option_string);
552 552
         if ('' === $option_string) {
553 553
             // irmtfan - issue with javascript:history.go(-1)
554
-            redirect_header(Request::getString('HTTP_REFERER', '', 'SERVER'), 2, _MD_NEWBB_ERROROCCURED . ': ' . _MD_NEWBB_POLL_POLLOPTIONS . ' !');
554
+            redirect_header(Request::getString('HTTP_REFERER', '', 'SERVER'), 2, _MD_NEWBB_ERROROCCURED.': '._MD_NEWBB_POLL_POLLOPTIONS.' !');
555 555
         }
556 556
         $i            = 0;
557 557
         $option_color = Request::getArray('option_color', null, 'POST');
@@ -568,7 +568,7 @@  discard block
 block discarded – undo
568 568
                     $xpOptHandler->insert($optionObject);
569 569
                 // old xoopspoll or umfrage or any clone from them
570 570
                 } else {
571
-                    $classOption  = $classPoll . 'Option';
571
+                    $classOption  = $classPoll.'Option';
572 572
                     $optionObject = new $classOption();
573 573
                     $optionObject->setVar('option_text', $optxt);
574 574
                     $optionObject->setVar('poll_id', $poll_id);
@@ -586,7 +586,7 @@  discard block
 block discarded – undo
586 586
         break;
587 587
 
588 588
     case 'delete':
589
-        echo '<h4>' . _MD_NEWBB_POLL_POLLCONF . "</h4>\n";
589
+        echo '<h4>'._MD_NEWBB_POLL_POLLCONF."</h4>\n";
590 590
         xoops_confirm(['op' => 'delete_ok', 'topic_id' => $topic_id, 'poll_id' => $poll_id], 'polls.php', sprintf(_MD_NEWBB_POLL_RUSUREDEL, $pollObject->getVar('question')));
591 591
         break;
592 592
 
@@ -610,8 +610,8 @@  discard block
 block discarded – undo
610 610
             // old xoopspoll or umfrage or any clone from them
611 611
         } else {
612 612
             $status      = $pollObject->delete();
613
-            $classOption = $classPoll . 'Option';
614
-            $classLog    = $classPoll . 'Log';
613
+            $classOption = $classPoll.'Option';
614
+            $classLog    = $classPoll.'Log';
615 615
             if (false !== $status) {
616 616
                 $classOption::deleteByPollId($poll_id);
617 617
                 $classLog::deleteByPollId($poll_id);
@@ -638,13 +638,13 @@  discard block
 block discarded – undo
638 638
             xoops_error($msg);
639 639
             break;
640 640
         }
641
-        redirect_header(XOOPS_URL . "/modules/newbb/viewtopic.php?topic_id={$topic_id}", 1, _MD_NEWBB_POLL_DBUPDATED);
641
+        redirect_header(XOOPS_URL."/modules/newbb/viewtopic.php?topic_id={$topic_id}", 1, _MD_NEWBB_POLL_DBUPDATED);
642 642
         break;
643 643
 
644 644
     case 'restart':
645 645
         // new xoopspoll module
646 646
         if ($pollModuleHandler->getVar('version') >= 140) {
647
-            $classConstants   = new XoopsModules\Xoopspoll\Constants();
647
+            $classConstants = new XoopsModules\Xoopspoll\Constants();
648 648
             $default_poll_duration = $classConstants::DEFAULT_POLL_DURATION;
649 649
         // old xoopspoll or umfrage or any clone from them
650 650
         } else {
@@ -652,10 +652,10 @@  discard block
 block discarded – undo
652 652
         }
653 653
         $poll_form   = new \XoopsThemeForm(_MD_NEWBB_POLL_RESTARTPOLL, 'poll_form', 'polls.php', 'post', true);
654 654
         $expire_text = new \XoopsFormText(
655
-            _MD_NEWBB_POLL_EXPIRATION . '<br><small>' . _MD_NEWBB_POLL_FORMAT . '<br>' . sprintf(_MD_NEWBB_POLL_CURRENTTIME, formatTimestamp(time(), 'Y-m-d H:i:s')) . '<br>' . sprintf(
655
+            _MD_NEWBB_POLL_EXPIRATION.'<br><small>'._MD_NEWBB_POLL_FORMAT.'<br>'.sprintf(_MD_NEWBB_POLL_CURRENTTIME, formatTimestamp(time(), 'Y-m-d H:i:s')).'<br>'.sprintf(
656 656
             _MD_NEWBB_POLL_EXPIREDAT,
657 657
                                                                                                                                                                                                                      formatTimestamp($pollObject->getVar('end_time'), 'Y-m-d H:i:s')
658
-        ) . '</small>',
658
+        ).'</small>',
659 659
                                          'end_time',
660 660
             20,
661 661
             19,
@@ -669,7 +669,7 @@  discard block
 block discarded – undo
669 669
         $poll_form->addElement(new \XoopsFormHidden('poll_id', $poll_id));
670 670
         $poll_form->addElement(new \XoopsFormButton('', 'poll_submit', _MD_NEWBB_POLL_RESTART, 'submit'));
671 671
 
672
-        echo '<h4>' . _MD_NEWBB_POLL_POLLCONF . "</h4>\n";
672
+        echo '<h4>'._MD_NEWBB_POLL_POLLCONF."</h4>\n";
673 673
         $poll_form->display();
674 674
         break;
675 675
 
@@ -681,7 +681,7 @@  discard block
 block discarded – undo
681 681
 
682 682
         // new xoopspoll module
683 683
         if ($pollModuleHandler->getVar('version') >= 140) {
684
-            $classConstants   = new XoopsModules\Xoopspoll\Constants();
684
+            $classConstants = new XoopsModules\Xoopspoll\Constants();
685 685
             $default_poll_duration = $classConstants::DEFAULT_POLL_DURATION;
686 686
             $poll_not_mailed       = $classConstants::POLL_NOT_MAILED;
687 687
             $poll_mailed           = $classConstants::POLL_MAILED;
@@ -731,8 +731,8 @@  discard block
 block discarded – undo
731 731
                 exit();
732 732
             }
733 733
             if (Request::getInt('reset', 0, 'POST')) { // reset all logs
734
-                $classOption = $classPoll . 'Option';
735
-                $classLog    = $classPoll . 'Log';
734
+                $classOption = $classPoll.'Option';
735
+                $classLog    = $classPoll.'Log';
736 736
                 $classLog::deleteByPollId($poll_id);
737 737
                 $classOption::resetCountByPollId($poll_id);
738 738
                 $pollObject->updateCount();
@@ -741,7 +741,7 @@  discard block
 block discarded – undo
741 741
         require_once $GLOBALS['xoops']->path('class/template.php');
742 742
         xoops_template_clear_module_cache($xoopsModule->getVar('mid'));
743 743
         xoops_template_clear_module_cache($pollModuleHandler->getVar('mid'));
744
-        redirect_header(XOOPS_URL . "/modules/newbb/viewtopic.php?topic_id={$topic_id}", 1, _MD_NEWBB_POLL_DBUPDATED);
744
+        redirect_header(XOOPS_URL."/modules/newbb/viewtopic.php?topic_id={$topic_id}", 1, _MD_NEWBB_POLL_DBUPDATED);
745 745
         break;
746 746
 
747 747
     case 'log':
@@ -756,5 +756,5 @@  discard block
 block discarded – undo
756 756
 } // switch
757 757
 
758 758
 // irmtfan move to footer.php
759
-require_once __DIR__ . '/footer.php';
759
+require_once __DIR__.'/footer.php';
760 760
 include $GLOBALS['xoops']->path('footer.php');
Please login to merge, or discard this patch.
viewforum.php 1 patch
Spacing   +42 added lines, -42 removed lines patch added patch discarded remove patch
@@ -11,12 +11,12 @@  discard block
 block discarded – undo
11 11
 
12 12
 use Xmf\Request;
13 13
 
14
-require_once __DIR__ . '/header.php';
14
+require_once __DIR__.'/header.php';
15 15
 
16 16
 if (!Request::getInt('forum', 0, 'GET')) {
17
-    redirect_header(XOOPS_URL . '/index.php', 2, _MD_NEWBB_ERRORFORUM);
17
+    redirect_header(XOOPS_URL.'/index.php', 2, _MD_NEWBB_ERRORFORUM);
18 18
 }
19
-require_once __DIR__ . '/include/functions.read.php';
19
+require_once __DIR__.'/include/functions.read.php';
20 20
 
21 21
 /*
22 22
  * Build the page query
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 $query_array = [];
26 26
 foreach ($query_vars as $var) {
27 27
     if (Request::getString($var, '', 'GET')) {
28
-        $query_array[$var] = "{$var}=" . Request::getString($var, '', 'GET');
28
+        $query_array[$var] = "{$var}=".Request::getString($var, '', 'GET');
29 29
     }
30 30
 }
31 31
 $page_query = implode('&amp;', array_values($query_array));
@@ -39,8 +39,8 @@  discard block
 block discarded – undo
39 39
         $markresult = _MD_NEWBB_MARK_UNREAD;
40 40
     }
41 41
     newbbSetReadTopic($markvalue, Request::getInt('forum', 0, 'GET'));
42
-    $url = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/viewforum.php?' . $page_query;
43
-    redirect_header($url, 2, _MD_NEWBB_ALL_TOPIC_MARKED . ' ' . $markresult);
42
+    $url = XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/viewforum.php?'.$page_query;
43
+    redirect_header($url, 2, _MD_NEWBB_ALL_TOPIC_MARKED.' '.$markresult);
44 44
 }
45 45
 
46 46
 $forum_id = Request::getInt('forum', 0, 'GET');
@@ -67,25 +67,25 @@  discard block
 block discarded – undo
67 67
 $forumObject = $forumHandler->get($forum_id);
68 68
 
69 69
 if (!$forumObject) {
70
-    redirect_header(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/index.php', 2, _MD_NEWBB_ERRORFORUM);
70
+    redirect_header(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/index.php', 2, _MD_NEWBB_ERRORFORUM);
71 71
 }
72 72
 
73 73
 if (!$forumHandler->getPermission($forumObject)) {
74
-    redirect_header(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/index.php', 2, _NOPERM);
74
+    redirect_header(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/index.php', 2, _NOPERM);
75 75
 }
76 76
 newbbSetRead('forum', $forum_id, $forumObject->getVar('forum_last_post_id'));
77 77
 
78
-$xoops_pagetitle = $forumObject->getVar('forum_name') . ' [' . $xoopsModule->getVar('name') . ']';
78
+$xoops_pagetitle = $forumObject->getVar('forum_name').' ['.$xoopsModule->getVar('name').']';
79 79
 
80 80
 $xoopsOption['template_main']   = 'newbb_viewforum.tpl';
81 81
 $xoopsOption['xoops_pagetitle'] = $xoops_pagetitle;
82 82
 
83 83
 require_once $GLOBALS['xoops']->path('header.php');
84
-require_once __DIR__ . '/include/functions.render.php';
84
+require_once __DIR__.'/include/functions.render.php';
85 85
 
86 86
 if (!empty($GLOBALS['xoopsModuleConfig']['rss_enable'])) {
87 87
     $xoopsTpl->assign('xoops_module_header', '
88
-    <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 . '" />
88
+    <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.'" />
89 89
     ' . @$xoopsTpl->get_template_vars('xoops_module_header'));
90 90
 }
91 91
 $forumDescription = $forumObject->getVar('forum_desc');
@@ -119,16 +119,16 @@  discard block
 block discarded – undo
119 119
 
120 120
 if ($forumHandler->getPermission($forumObject, 'post')) {
121 121
     $xoopsTpl->assign('viewer_level', $isAdmin ? 2 : 1);
122
-    $xoopsTpl->assign('forum_post_or_register', '<a href="' . XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . "/newtopic.php?forum={$forum_id}\">" . newbbDisplayImage('t_new', _MD_NEWBB_POSTNEW) . '</a>');
122
+    $xoopsTpl->assign('forum_post_or_register', '<a href="'.XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname')."/newtopic.php?forum={$forum_id}\">".newbbDisplayImage('t_new', _MD_NEWBB_POSTNEW).'</a>');
123 123
     if ($pollmodules && $forumHandler->getPermission($forumObject, 'addpoll')) {
124 124
         $t_poll = newbbDisplayImage('t_poll', _MD_NEWBB_ADDPOLL);
125
-        $xoopsTpl->assign('forum_addpoll', '<a href="' . XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . "/polls.php?op=add&amp;forum={$forum_id}\">{$t_poll}</a>");
125
+        $xoopsTpl->assign('forum_addpoll', '<a href="'.XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname')."/polls.php?op=add&amp;forum={$forum_id}\">{$t_poll}</a>");
126 126
     }
127 127
 } else {
128 128
     $xoopsTpl->assign('viewer_level', 0);
129 129
     if (!is_object($GLOBALS['xoopsUser']) && !empty($GLOBALS['xoopsModuleConfig']['show_reg'])) {
130
-        $redirect = preg_replace("|(.*)\/modules\/Newbb\/(.*)|", "\\1/modules/newbb/newtopic.php?forum=" . $forum_id, htmlspecialchars($xoopsRequestUri, ENT_QUOTES | ENT_HTML5));
131
-        $xoopsTpl->assign('forum_post_or_register', "<a href='" . XOOPS_URL . "/user.php?xoops_redirect={$redirect}'>" . _MD_NEWBB_REGTOPOST . '</a>');
130
+        $redirect = preg_replace("|(.*)\/modules\/Newbb\/(.*)|", "\\1/modules/newbb/newtopic.php?forum=".$forum_id, htmlspecialchars($xoopsRequestUri, ENT_QUOTES | ENT_HTML5));
131
+        $xoopsTpl->assign('forum_post_or_register', "<a href='".XOOPS_URL."/user.php?xoops_redirect={$redirect}'>"._MD_NEWBB_REGTOPOST.'</a>');
132 132
         $xoopsTpl->assign('forum_addpoll', '');
133 133
     } else {
134 134
         $xoopsTpl->assign('forum_post_or_register', '');
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
 $xoopsTpl->assign_by_ref('parentforum', $parentforum);
140 140
 
141 141
 $criteria = new \CriteriaCompo(new \Criteria('parent_forum', $forum_id));
142
-$criteria->add(new \Criteria('forum_id', '(' . implode(', ', $forumHandler->getIdsByPermission('access')) . ')', 'IN'));
142
+$criteria->add(new \Criteria('forum_id', '('.implode(', ', $forumHandler->getIdsByPermission('access')).')', 'IN'));
143 143
 $criteria->setSort('forum_order');
144 144
 
145 145
 if ($forums = $forumHandler->getAll($criteria, null, false)) {
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 
176 176
 $forum_selection_sort = '<select name="sort">';
177 177
 foreach ($sel_sort_array as $sort_k => $sort_v) {
178
-    $forum_selection_sort .= '<option value="' . $sort_k . '"' . (($sort == $sort_k) ? ' selected="selected"' : '') . '>' . $sort_v . '</option>';
178
+    $forum_selection_sort .= '<option value="'.$sort_k.'"'.(($sort == $sort_k) ? ' selected="selected"' : '').'>'.$sort_v.'</option>';
179 179
 }
180 180
 $forum_selection_sort .= '</select>';
181 181
 
@@ -184,14 +184,14 @@  discard block
 block discarded – undo
184 184
 $order                 = (!Request::getString('order', '', 'GET')
185 185
                           || 'ASC' !== Request::getString('order', '', 'GET')) ? 'DESC' : 'ASC';
186 186
 $forum_selection_order = '<select name="order">';
187
-$forum_selection_order .= '<option value="ASC"' . (('ASC' === $order) ? ' selected' : '') . '>' . _MD_NEWBB_ASCENDING . '</option>';
188
-$forum_selection_order .= '<option value="DESC"' . (('DESC' === $order) ? ' selected' : '') . '>' . _MD_NEWBB_DESCENDING . '</option>';
187
+$forum_selection_order .= '<option value="ASC"'.(('ASC' === $order) ? ' selected' : '').'>'._MD_NEWBB_ASCENDING.'</option>';
188
+$forum_selection_order .= '<option value="DESC"'.(('DESC' === $order) ? ' selected' : '').'>'._MD_NEWBB_DESCENDING.'</option>';
189 189
 $forum_selection_order .= '</select>';
190 190
 
191 191
 $xoopsTpl->assign_by_ref('forum_selection_order', $forum_selection_order);
192 192
 
193 193
 $since = Request::getInt('since', $GLOBALS['xoopsModuleConfig']['since_default'], 'GET');
194
-require_once __DIR__ . '/include/functions.time.php';
194
+require_once __DIR__.'/include/functions.time.php';
195 195
 $forum_selection_since = newbbSinceSelectBox($since);
196 196
 $xoopsTpl->assign_by_ref('forum_selection_since', $forum_selection_since);
197 197
 
@@ -200,14 +200,14 @@  discard block
 block discarded – undo
200 200
 $page_query_sort = implode('&amp;', array_values($query_sort));
201 201
 unset($query_sort);
202 202
 // irmtfan - edit: u.uname => t.topic_poster | t.topic_time => t.topic_id | p.post_time => t.topic_last_post_id
203
-$xoopsTpl->assign('h_topic_link', XOOPS_URL . "/modules/newbb/viewforum.php?{$page_query_sort}&amp;sort=t.topic_title&amp;order=" . (('t.topic_title' === $sort && 'DESC' === $order) ? 'ASC' : 'DESC'));
204
-$xoopsTpl->assign('h_reply_link', XOOPS_URL . "/modules/newbb/viewforum.php?{$page_query_sort}&amp;sort=t.topic_replies&amp;order=" . (('t.topic_replies' === $sort && 'DESC' === $order) ? 'ASC' : 'DESC'));
205
-$xoopsTpl->assign('h_poster_link', XOOPS_URL . "/modules/newbb/viewforum.php?{$page_query_sort}&amp;sort=t.topic_poster&amp;order=" . (('t.topic_poster' === $sort && 'DESC' === $order) ? 'ASC' : 'DESC'));
206
-$xoopsTpl->assign('h_views_link', XOOPS_URL . "/modules/newbb/viewforum.php?{$page_query_sort}&amp;sort=t.topic_views&amp;order=" . (('t.topic_views' === $sort && 'DESC' === $order) ? 'ASC' : 'DESC'));
207
-$xoopsTpl->assign('h_rating_link', XOOPS_URL . "/modules/newbb/viewforum.php?{$page_query_sort}&amp;sort=t.rating&amp;order=" . (('t.rating' === $sort
203
+$xoopsTpl->assign('h_topic_link', XOOPS_URL."/modules/newbb/viewforum.php?{$page_query_sort}&amp;sort=t.topic_title&amp;order=".(('t.topic_title' === $sort && 'DESC' === $order) ? 'ASC' : 'DESC'));
204
+$xoopsTpl->assign('h_reply_link', XOOPS_URL."/modules/newbb/viewforum.php?{$page_query_sort}&amp;sort=t.topic_replies&amp;order=".(('t.topic_replies' === $sort && 'DESC' === $order) ? 'ASC' : 'DESC'));
205
+$xoopsTpl->assign('h_poster_link', XOOPS_URL."/modules/newbb/viewforum.php?{$page_query_sort}&amp;sort=t.topic_poster&amp;order=".(('t.topic_poster' === $sort && 'DESC' === $order) ? 'ASC' : 'DESC'));
206
+$xoopsTpl->assign('h_views_link', XOOPS_URL."/modules/newbb/viewforum.php?{$page_query_sort}&amp;sort=t.topic_views&amp;order=".(('t.topic_views' === $sort && 'DESC' === $order) ? 'ASC' : 'DESC'));
207
+$xoopsTpl->assign('h_rating_link', XOOPS_URL."/modules/newbb/viewforum.php?{$page_query_sort}&amp;sort=t.rating&amp;order=".(('t.rating' === $sort
208 208
                                                                                                                                   && 'DESC' === $order) ? 'ASC' : 'DESC')); // irmtfan t.topic_ratings to t.rating
209
-$xoopsTpl->assign('h_date_link', XOOPS_URL . "/modules/newbb/viewforum.php?{$page_query_sort}&amp;sort=t.topic_last_post_id&amp;order=" . (('t.topic_last_post_id' === $sort && 'DESC' === $order) ? 'ASC' : 'DESC'));
210
-$xoopsTpl->assign('h_publish_link', XOOPS_URL . "/modules/newbb/viewforum.php?{$page_query_sort}&amp;sort=t.topic_id&amp;order=" . (('t.topic_id' === $sort
209
+$xoopsTpl->assign('h_date_link', XOOPS_URL."/modules/newbb/viewforum.php?{$page_query_sort}&amp;sort=t.topic_last_post_id&amp;order=".(('t.topic_last_post_id' === $sort && 'DESC' === $order) ? 'ASC' : 'DESC'));
210
+$xoopsTpl->assign('h_publish_link', XOOPS_URL."/modules/newbb/viewforum.php?{$page_query_sort}&amp;sort=t.topic_id&amp;order=".(('t.topic_id' === $sort
211 211
                                                                                                                                      && 'DESC' === $order) ? 'ASC' : 'DESC'));
212 212
 $xoopsTpl->assign('forum_since', $since); // For $since in search.php
213 213
 
@@ -237,11 +237,11 @@  discard block
 block discarded – undo
237 237
 $xoopsTpl->assign('img_digest', newbbDisplayImage('topic_digest', _MD_NEWBB_TOPICDIGEST));
238 238
 $xoopsTpl->assign('img_poll', newbbDisplayImage('poll', _MD_NEWBB_TOPICHASPOLL));
239 239
 
240
-$xoopsTpl->assign('mark_read', XOOPS_URL . "/modules/newbb/viewforum.php?mark=1&amp;{$page_query}");
241
-$xoopsTpl->assign('mark_unread', XOOPS_URL . "/modules/newbb/viewforum.php?mark=2&amp;{$page_query}");
240
+$xoopsTpl->assign('mark_read', XOOPS_URL."/modules/newbb/viewforum.php?mark=1&amp;{$page_query}");
241
+$xoopsTpl->assign('mark_unread', XOOPS_URL."/modules/newbb/viewforum.php?mark=2&amp;{$page_query}");
242 242
 
243
-$xoopsTpl->assign('post_link', XOOPS_URL . '/modules/newbb/viewpost.php?forum=' . $forum_id);
244
-$xoopsTpl->assign('newpost_link', XOOPS_URL . '/modules/newbb/viewpost.php?status=new&amp;forum=' . $forum_id);
243
+$xoopsTpl->assign('post_link', XOOPS_URL.'/modules/newbb/viewpost.php?forum='.$forum_id);
244
+$xoopsTpl->assign('newpost_link', XOOPS_URL.'/modules/newbb/viewpost.php?status=new&amp;forum='.$forum_id);
245 245
 
246 246
 $query_type = $query_array;
247 247
 unset($query_type['type']);
@@ -252,16 +252,16 @@  discard block
 block discarded – undo
252 252
 $typeOptions = null;
253 253
 $types       = [];
254 254
 if ($types = $typeHandler->getByForum($forum_id)) {
255
-    $typeOptions[] = ['title' => _ALL, 'link' => XOOPS_URL . "/modules/newbb/viewforum.php?{$page_query_type}"];
255
+    $typeOptions[] = ['title' => _ALL, 'link' => XOOPS_URL."/modules/newbb/viewforum.php?{$page_query_type}"];
256 256
     foreach ($types as $key => $item) {
257 257
         $typeOptions[] = [
258 258
             'title' => $item['type_name'],
259
-            'link'  => XOOPS_URL . "/modules/newbb/viewforum.php?{$page_query_type}&amp;type={$key}"
259
+            'link'  => XOOPS_URL."/modules/newbb/viewforum.php?{$page_query_type}&amp;type={$key}"
260 260
         ];
261 261
     }
262 262
 }
263 263
 if ($type > 0) {
264
-    require_once __DIR__ . '/include/functions.topic.php';
264
+    require_once __DIR__.'/include/functions.topic.php';
265 265
     $xoopsTpl->assign('forum_topictype', getTopicTitle('', $types[$type]['type_name'], $types[$type]['type_color']));
266 266
 }
267 267
 $xoopsTpl->assign_by_ref('typeOptions', $typeOptions);
@@ -270,11 +270,11 @@  discard block
 block discarded – undo
270 270
 unset($query_status['status']);
271 271
 $page_query_status = implode('&amp;', array_values($query_status));
272 272
 unset($query_status);
273
-$xoopsTpl->assign('newpost_link', XOOPS_URL . '/modules/newbb/viewpost.php?status=new&amp;forum=' . $forumObject->getVar('forum_id'));
274
-$xoopsTpl->assign('all_link', XOOPS_URL . "/modules/newbb/viewforum.php?{$page_query_status}");
275
-$xoopsTpl->assign('digest_link', XOOPS_URL . "/modules/newbb/viewforum.php?{$page_query_status}&amp;status=digest");
276
-$xoopsTpl->assign('unreplied_link', XOOPS_URL . "/modules/newbb/viewforum.php?{$page_query_status}&amp;status=unreplied");
277
-$xoopsTpl->assign('unread_link', XOOPS_URL . "/modules/newbb/viewforum.php?{$page_query_status}&amp;status=unread");
273
+$xoopsTpl->assign('newpost_link', XOOPS_URL.'/modules/newbb/viewpost.php?status=new&amp;forum='.$forumObject->getVar('forum_id'));
274
+$xoopsTpl->assign('all_link', XOOPS_URL."/modules/newbb/viewforum.php?{$page_query_status}");
275
+$xoopsTpl->assign('digest_link', XOOPS_URL."/modules/newbb/viewforum.php?{$page_query_status}&amp;status=digest");
276
+$xoopsTpl->assign('unreplied_link', XOOPS_URL."/modules/newbb/viewforum.php?{$page_query_status}&amp;status=unreplied");
277
+$xoopsTpl->assign('unread_link', XOOPS_URL."/modules/newbb/viewforum.php?{$page_query_status}&amp;status=unread");
278 278
 switch ($status) {
279 279
     case 'digest':
280 280
         $current_status = _MD_NEWBB_DIGEST;
@@ -322,7 +322,7 @@  discard block
 block discarded – undo
322 322
 }
323 323
 
324 324
 if (!empty($GLOBALS['xoopsModuleConfig']['show_jump'])) {
325
-    require_once __DIR__ . '/include/functions.forum.php';
325
+    require_once __DIR__.'/include/functions.forum.php';
326 326
     $xoopsTpl->assign('forum_jumpbox', newbbMakeJumpbox($forum_id));
327 327
 }
328 328
 
@@ -335,8 +335,8 @@  discard block
 block discarded – undo
335 335
 }
336 336
 
337 337
 if (1 == $GLOBALS['xoopsModuleConfig']['rss_enable']) {
338
-    $xoopsTpl->assign('rss_button', "<div align='right'><a href='" . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . '/rss.php?f=' . $forum_id . "' title='RSS feed' target='_blank'>" . newbbDisplayImage('rss', 'RSS feed') . '</a></div>');
338
+    $xoopsTpl->assign('rss_button', "<div align='right'><a href='".XOOPS_URL.'/modules/'.$xoopsModule->dirname().'/rss.php?f='.$forum_id."' title='RSS feed' target='_blank'>".newbbDisplayImage('rss', 'RSS feed').'</a></div>');
339 339
 }
340 340
 // irmtfan move to footer.php
341
-require_once __DIR__ . '/footer.php';
341
+require_once __DIR__.'/footer.php';
342 342
 include $GLOBALS['xoops']->path('footer.php');
Please login to merge, or discard this patch.
blocks/newbb_block.php 1 patch
Spacing   +132 added lines, -132 removed lines patch added patch discarded remove patch
@@ -56,8 +56,8 @@  discard block
 block discarded – undo
56 56
     global $accessForums;
57 57
     global $xoopsLogger;
58 58
 
59
-    require_once __DIR__ . '/../include/functions.config.php';
60
-    require_once __DIR__ . '/../include/functions.time.php';
59
+    require_once __DIR__.'/../include/functions.config.php';
60
+    require_once __DIR__.'/../include/functions.time.php';
61 61
 
62 62
     $myts          = \MyTextSanitizer::getInstance();
63 63
     $block         = [];
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
     $extraCriteria = '';
67 67
     if (!empty($options[2])) {
68 68
         //require_once __DIR__ . '/../include/functions.time.php';
69
-        $extraCriteria .= ' AND p.post_time>' . (time() - newbbGetSinceTime($options[2]));
69
+        $extraCriteria .= ' AND p.post_time>'.(time() - newbbGetSinceTime($options[2]));
70 70
     }
71 71
     switch ($options[0]) {
72 72
         case 'time':
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
         return $block;
93 93
     }
94 94
 
95
-    $forumCriteria   = ' AND t.forum_id IN (' . implode(',', $allowedForums) . ')';
95
+    $forumCriteria   = ' AND t.forum_id IN ('.implode(',', $allowedForums).')';
96 96
     $approveCriteria = ' AND t.approved = 1';
97 97
 
98 98
     $newbbConfig = newbbLoadConfig();
@@ -148,13 +148,13 @@  discard block
 block discarded – undo
148 148
         return $block;
149 149
     }
150 150
 
151
-    require_once __DIR__ . '/../include/functions.user.php';
151
+    require_once __DIR__.'/../include/functions.user.php';
152 152
     $author_name = newbbGetUnameFromIds(array_keys($author), $newbbConfig['show_realname'], true);
153 153
 
154 154
     if (count($types) > 0) {
155 155
         /** @var Newbb\TypeHandler $typeHandler */
156 156
         $typeHandler = Newbb\Helper::getInstance()->getHandler('Type');
157
-        $type_list   = $typeHandler->getList(new \Criteria('type_id', '(' . implode(', ', array_keys($types)) . ')', 'IN'));
157
+        $type_list   = $typeHandler->getList(new \Criteria('type_id', '('.implode(', ', array_keys($types)).')', 'IN'));
158 158
     }
159 159
 
160 160
     foreach ($rows as $arr) {
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
         xoops_loadLanguage('main', 'newbb');
163 163
         $topic                  = [];
164 164
         $topic_page_jump        = newbbDisplayImage('lastposticon', _MD_NEWBB_GOTOLASTPOST);
165
-        $topic['topic_subject'] = empty($type_list[$arr['type_id']]) ? '' : '[' . $type_list[$arr['type_id']] . ']';
165
+        $topic['topic_subject'] = empty($type_list[$arr['type_id']]) ? '' : '['.$type_list[$arr['type_id']].']';
166 166
 
167 167
         $topic['post_id']      = $arr['post_id'];
168 168
         $topic['topic_status'] = $arr['topic_status'];
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
         if (!empty($options[5])) {
175 175
             $title = xoops_substr($title, 0, $options[5]);
176 176
         }
177
-        $topic['title']   = $topic['topic_subject'] . ' ' . $title;
177
+        $topic['title']   = $topic['topic_subject'].' '.$title;
178 178
         $topic['replies'] = $arr['topic_replies'];
179 179
         $topic['views']   = $arr['topic_views'];
180 180
         $topic['time']    = newbbFormatTimestamp($arr['post_time']);
@@ -186,9 +186,9 @@  discard block
 block discarded – undo
186 186
         $topic['topic_poster']    = $topic_poster;
187 187
         $topic['topic_page_jump'] = $topic_page_jump;
188 188
         // START irmtfan remove hardcoded html in URLs - add $seo_topic_url
189
-        $seo_url       = XOOPS_URL . '/' . SEO_MODULE_NAME . '/viewtopic.php?post_id=' . $topic['post_id'];
190
-        $seo_topic_url = XOOPS_URL . '/' . SEO_MODULE_NAME . '/viewtopic.php?topic_id=' . $topic['id'];
191
-        $seo_forum_url = XOOPS_URL . '/' . SEO_MODULE_NAME . '/viewforum.php?forum=' . $topic['forum_id'];
189
+        $seo_url       = XOOPS_URL.'/'.SEO_MODULE_NAME.'/viewtopic.php?post_id='.$topic['post_id'];
190
+        $seo_topic_url = XOOPS_URL.'/'.SEO_MODULE_NAME.'/viewtopic.php?topic_id='.$topic['id'];
191
+        $seo_forum_url = XOOPS_URL.'/'.SEO_MODULE_NAME.'/viewforum.php?forum='.$topic['forum_id'];
192 192
         if (!empty($newbbConfig['do_rewrite'])) {
193 193
             $topic['seo_url']       = seo_urls($seo_url);
194 194
             $topic['seo_topic_url'] = seo_urls($seo_topic_url);
@@ -203,11 +203,11 @@  discard block
 block discarded – undo
203 203
         unset($topic);
204 204
     }
205 205
     // START irmtfan remove hardcoded html in URLs
206
-    $seo_top_allforums          = XOOPS_URL . '/' . SEO_MODULE_NAME;
206
+    $seo_top_allforums          = XOOPS_URL.'/'.SEO_MODULE_NAME;
207 207
     $block['seo_top_allforums'] = !empty($newbbConfig['do_rewrite']) ? seo_urls($seo_top_allforums) : $seo_top_allforums;
208
-    $seo_top_allforums          = XOOPS_URL . '/' . SEO_MODULE_NAME . '/list.topic.php';
208
+    $seo_top_allforums          = XOOPS_URL.'/'.SEO_MODULE_NAME.'/list.topic.php';
209 209
     $block['seo_top_alltopics'] = !empty($newbbConfig['do_rewrite']) ? seo_urls($seo_top_allforums) : $seo_top_allforums;
210
-    $seo_top_allforums          = XOOPS_URL . '/' . SEO_MODULE_NAME . '/viewpost.php';
210
+    $seo_top_allforums          = XOOPS_URL.'/'.SEO_MODULE_NAME.'/viewpost.php';
211 211
     $block['seo_top_allposts']  = !empty($newbbConfig['do_rewrite']) ? seo_urls($seo_top_allforums) : $seo_top_allforums;
212 212
     // END irmtfan remove hardcoded html in URLs
213 213
     $block['indexNav'] = (int)$options[4];
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
 function b_newbb_topic_show($options)
231 231
 {
232 232
     global $accessForums;
233
-    require_once __DIR__ . '/../include/functions.time.php';
233
+    require_once __DIR__.'/../include/functions.time.php';
234 234
     $myts          = \MyTextSanitizer::getInstance();
235 235
     $block         = [];
236 236
     $i             = 0;
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
     $time_criteria = null;
240 240
     if (!empty($options[2])) {
241 241
         $time_criteria = time() - newbbGetSinceTime($options[2]);
242
-        $extraCriteria = ' AND t.topic_time>' . $time_criteria;
242
+        $extraCriteria = ' AND t.topic_time>'.$time_criteria;
243 243
     }
244 244
     switch ($options[0]) {
245 245
         case 'views':
@@ -252,11 +252,11 @@  discard block
 block discarded – undo
252 252
             $order         = 't.digest_time';
253 253
             $extraCriteria = ' AND t.topic_digest=1';
254 254
             if (null !== $time_criteria) {
255
-                $extraCriteria .= ' AND t.digest_time>' . $time_criteria;
255
+                $extraCriteria .= ' AND t.digest_time>'.$time_criteria;
256 256
             }
257 257
             break;
258 258
         case 'sticky':
259
-            $order         = 't.topic_id';
259
+            $order = 't.topic_id';
260 260
             $extraCriteria .= ' AND t.topic_sticky=1';
261 261
             break;
262 262
         case 'time':
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
         return false;
293 293
     }
294 294
 
295
-    $forumCriteria   = ' AND t.forum_id IN (' . implode(',', $allowedForums) . ')';
295
+    $forumCriteria   = ' AND t.forum_id IN ('.implode(',', $allowedForums).')';
296 296
     $approveCriteria = ' AND t.approved = 1';
297 297
 
298 298
     $query = 'SELECT'
@@ -332,19 +332,19 @@  discard block
 block discarded – undo
332 332
     if (count($rows) < 1) {
333 333
         return $block;
334 334
     }
335
-    require_once __DIR__ . '/../include/functions.user.php';
335
+    require_once __DIR__.'/../include/functions.user.php';
336 336
     $author_name = newbbGetUnameFromIds(array_keys($author), $newbbConfig['show_realname'], true);
337 337
     if (count($types) > 0) {
338 338
         /** @var Newbb\TypeHandler $typeHandler */
339 339
         $typeHandler = Newbb\Helper::getInstance()->getHandler('Type');
340
-        $type_list   = $typeHandler->getList(new \Criteria('type_id', '(' . implode(', ', array_keys($types)) . ')', 'IN'));
340
+        $type_list   = $typeHandler->getList(new \Criteria('type_id', '('.implode(', ', array_keys($types)).')', 'IN'));
341 341
     }
342 342
 
343 343
     foreach ($rows as $arr) {
344 344
         // irmtfan remove $topic_page_jump because there is no last post
345 345
         //$topic_page_jump = '';
346 346
         $topic                  = [];
347
-        $topic['topic_subject'] = empty($type_list[$arr['type_id']]) ? '' : '[' . $type_list[$arr['type_id']] . '] ';
347
+        $topic['topic_subject'] = empty($type_list[$arr['type_id']]) ? '' : '['.$type_list[$arr['type_id']].'] ';
348 348
         $topic['forum_id']      = $arr['forum_id'];
349 349
         $topic['forum_name']    = $myts->htmlSpecialChars($arr['forum_name']);
350 350
         $topic['id']            = $arr['topic_id'];
@@ -353,7 +353,7 @@  discard block
 block discarded – undo
353 353
         if (!empty($options[5])) {
354 354
             $title = xoops_substr($title, 0, $options[5]);
355 355
         }
356
-        $topic['title']   = $topic['topic_subject'] . $title;
356
+        $topic['title']   = $topic['topic_subject'].$title;
357 357
         $topic['replies'] = $arr['topic_replies'];
358 358
         $topic['views']   = $arr['topic_views'];
359 359
         $topic['time']    = newbbFormatTimestamp($arr['topic_time']);
@@ -366,8 +366,8 @@  discard block
 block discarded – undo
366 366
         // irmtfan remove $topic_page_jump because there is no last post
367 367
         //$topic['topic_page_jump'] = $topic_page_jump;
368 368
         // START irmtfan remove hardcoded html in URLs - add $seo_topic_url
369
-        $seo_topic_url = XOOPS_URL . '/' . SEO_MODULE_NAME . '/viewtopic.php?topic_id=' . $topic['id'];
370
-        $seo_forum_url = XOOPS_URL . '/' . SEO_MODULE_NAME . '/viewforum.php?forum=' . $topic['forum_id'];
369
+        $seo_topic_url = XOOPS_URL.'/'.SEO_MODULE_NAME.'/viewtopic.php?topic_id='.$topic['id'];
370
+        $seo_forum_url = XOOPS_URL.'/'.SEO_MODULE_NAME.'/viewforum.php?forum='.$topic['forum_id'];
371 371
 
372 372
         if (!empty($newbbConfig['do_rewrite'])) {
373 373
             $topic['seo_topic_url'] = seo_urls($seo_topic_url);
@@ -381,11 +381,11 @@  discard block
 block discarded – undo
381 381
         unset($topic);
382 382
     }
383 383
     // START irmtfan remove hardcoded html in URLs
384
-    $seo_top_allforums          = XOOPS_URL . '/' . SEO_MODULE_NAME;
384
+    $seo_top_allforums          = XOOPS_URL.'/'.SEO_MODULE_NAME;
385 385
     $block['seo_top_allforums'] = !empty($newbbConfig['do_rewrite']) ? seo_urls($seo_top_allforums) : $seo_top_allforums;
386
-    $seo_top_allforums          = XOOPS_URL . '/' . SEO_MODULE_NAME . '/list.topic.php';
386
+    $seo_top_allforums          = XOOPS_URL.'/'.SEO_MODULE_NAME.'/list.topic.php';
387 387
     $block['seo_top_alltopics'] = !empty($newbbConfig['do_rewrite']) ? seo_urls($seo_top_allforums) : $seo_top_allforums;
388
-    $seo_top_allforums          = XOOPS_URL . '/' . SEO_MODULE_NAME . '/viewpost.php';
388
+    $seo_top_allforums          = XOOPS_URL.'/'.SEO_MODULE_NAME.'/viewpost.php';
389 389
     $block['seo_top_allposts']  = !empty($newbbConfig['do_rewrite']) ? seo_urls($seo_top_allforums) : $seo_top_allforums;
390 390
     // END irmtfan remove hardcoded html in URLs
391 391
     $block['indexNav'] = (int)$options[4];
@@ -410,7 +410,7 @@  discard block
 block discarded – undo
410 410
     global $accessForums;
411 411
     global $newbbConfig;
412 412
 
413
-    require_once __DIR__ . '/../include/functions.time.php';
413
+    require_once __DIR__.'/../include/functions.time.php';
414 414
     $myts          = \MyTextSanitizer::getInstance();
415 415
     $block         = [];
416 416
     $i             = 0;
@@ -419,7 +419,7 @@  discard block
 block discarded – undo
419 419
     $time_criteria = null;
420 420
     if (!empty($options[2])) {
421 421
         $time_criteria = time() - newbbGetSinceTime($options[2]);
422
-        $extraCriteria = ' AND p.post_time>' . $time_criteria;
422
+        $extraCriteria = ' AND p.post_time>'.$time_criteria;
423 423
     }
424 424
 
425 425
     switch ($options[0]) {
@@ -463,7 +463,7 @@  discard block
 block discarded – undo
463 463
         return $block;
464 464
     }
465 465
 
466
-    $forumCriteria   = ' AND p.forum_id IN (' . implode(',', $allowedForums) . ')';
466
+    $forumCriteria   = ' AND p.forum_id IN ('.implode(',', $allowedForums).')';
467 467
     $approveCriteria = ' AND p.approved = 1';
468 468
 
469 469
     $query = 'SELECT';
@@ -471,11 +471,11 @@  discard block
 block discarded – undo
471 471
     if ('text' === $options[0]) {
472 472
         $query .= '    pt.dohtml, pt.dosmiley, pt.doxcode, pt.dobr, pt.post_text,';
473 473
     }
474
-    $query .= '    f.forum_id, f.forum_name' . '    FROM ' . $GLOBALS['xoopsDB']->prefix('newbb_posts') . ' AS p ' . '    LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('newbb_forums') . ' AS f ON f.forum_id=p.forum_id';
474
+    $query .= '    f.forum_id, f.forum_name'.'    FROM '.$GLOBALS['xoopsDB']->prefix('newbb_posts').' AS p '.'    LEFT JOIN '.$GLOBALS['xoopsDB']->prefix('newbb_forums').' AS f ON f.forum_id=p.forum_id';
475 475
     if ('text' === $options[0]) {
476
-        $query .= '    LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('newbb_posts_text') . ' AS pt ON pt.post_id=p.post_id';
476
+        $query .= '    LEFT JOIN '.$GLOBALS['xoopsDB']->prefix('newbb_posts_text').' AS pt ON pt.post_id=p.post_id';
477 477
     }
478
-    $query .= '    WHERE 1=1 ' . $forumCriteria . $approveCriteria . $extraCriteria . ' ORDER BY ' . $order . ' DESC';
478
+    $query .= '    WHERE 1=1 '.$forumCriteria.$approveCriteria.$extraCriteria.' ORDER BY '.$order.' DESC';
479 479
 
480 480
     $result = $GLOBALS['xoopsDB']->query($query, $options[1], 0);
481 481
     if (!$result) {
@@ -492,15 +492,15 @@  discard block
 block discarded – undo
492 492
     if (count($rows) < 1) {
493 493
         return $block;
494 494
     }
495
-    require_once __DIR__ . '/../include/functions.user.php';
495
+    require_once __DIR__.'/../include/functions.user.php';
496 496
     $author_name = newbbGetUnameFromIds(array_keys($author), $newbbConfig['show_realname'], true);
497 497
 
498 498
     foreach ($rows as $arr) {
499 499
         //if ($arr['icon'] && is_file($GLOBALS['xoops']->path('images/subject/' . $arr['icon']))) {
500 500
         if (!empty($arr['icon'])) {
501
-            $last_post_icon = '<img src="' . XOOPS_URL . '/images/subject/' . htmlspecialchars($arr['icon'], ENT_QUOTES | ENT_HTML5) . '" alt="" />';
501
+            $last_post_icon = '<img src="'.XOOPS_URL.'/images/subject/'.htmlspecialchars($arr['icon'], ENT_QUOTES | ENT_HTML5).'" alt="" />';
502 502
         } else {
503
-            $last_post_icon = '<img src="' . XOOPS_URL . '/images/subject/icon1.gif" alt="" />';
503
+            $last_post_icon = '<img src="'.XOOPS_URL.'/images/subject/icon1.gif" alt="" />';
504 504
         }
505 505
         //$topic['jump_post'] = "<a href='" . XOOPS_URL . "/modules/newbb/viewtopic.php?post_id=" . $arr['post_id'] ."#forumpost" . $arr['post_id'] . "'>" . $last_post_icon . '</a>';
506 506
         $topic               = [];
@@ -530,8 +530,8 @@  discard block
 block discarded – undo
530 530
             $topic['post_text'] = $post_text;
531 531
         }
532 532
         // START irmtfan remove hardcoded html in URLs
533
-        $seo_url       = XOOPS_URL . '/' . SEO_MODULE_NAME . '/viewtopic.php?post_id=' . $topic['post_id'];
534
-        $seo_forum_url = XOOPS_URL . '/' . SEO_MODULE_NAME . '/viewforum.php?forum=' . $topic['forum_id'];
533
+        $seo_url       = XOOPS_URL.'/'.SEO_MODULE_NAME.'/viewtopic.php?post_id='.$topic['post_id'];
534
+        $seo_forum_url = XOOPS_URL.'/'.SEO_MODULE_NAME.'/viewforum.php?forum='.$topic['forum_id'];
535 535
         // END irmtfan remove hardcoded html in URLs
536 536
         if (!empty($newbbConfig['do_rewrite'])) {
537 537
             $topic['seo_url']       = seo_urls($seo_url);
@@ -545,11 +545,11 @@  discard block
 block discarded – undo
545 545
         unset($topic);
546 546
     }
547 547
     // START irmtfan remove hardcoded html in URLs
548
-    $seo_top_allforums          = XOOPS_URL . '/' . SEO_MODULE_NAME;
548
+    $seo_top_allforums          = XOOPS_URL.'/'.SEO_MODULE_NAME;
549 549
     $block['seo_top_allforums'] = !empty($newbbConfig['do_rewrite']) ? seo_urls($seo_top_allforums) : $seo_top_allforums;
550
-    $seo_top_allforums          = XOOPS_URL . '/' . SEO_MODULE_NAME . '/list.topic.php';
550
+    $seo_top_allforums          = XOOPS_URL.'/'.SEO_MODULE_NAME.'/list.topic.php';
551 551
     $block['seo_top_alltopics'] = !empty($newbbConfig['do_rewrite']) ? seo_urls($seo_top_allforums) : $seo_top_allforums;
552
-    $seo_top_allforums          = XOOPS_URL . '/' . SEO_MODULE_NAME . '/viewpost.php';
552
+    $seo_top_allforums          = XOOPS_URL.'/'.SEO_MODULE_NAME.'/viewpost.php';
553 553
     $block['seo_top_allposts']  = !empty($newbbConfig['do_rewrite']) ? seo_urls($seo_top_allforums) : $seo_top_allforums;
554 554
     // END irmtfan remove hardcoded html in URLs
555 555
 
@@ -582,9 +582,9 @@  discard block
 block discarded – undo
582 582
     $extraCriteria = '';
583 583
     $time_criteria = null;
584 584
     if (!empty($options[2])) {
585
-        require_once __DIR__ . '/../include/functions.time.php';
585
+        require_once __DIR__.'/../include/functions.time.php';
586 586
         $time_criteria = time() - newbbGetSinceTime($options[2]);
587
-        $extraCriteria = ' AND topic_time > ' . $time_criteria;
587
+        $extraCriteria = ' AND topic_time > '.$time_criteria;
588 588
     }
589 589
     switch ($options[0]) {
590 590
         case 'topic':
@@ -592,7 +592,7 @@  discard block
 block discarded – undo
592 592
         case 'digest':
593 593
             $extraCriteria = ' AND topic_digest = 1';
594 594
             if (null !== $time_criteria) {
595
-                $extraCriteria .= ' AND digest_time > ' . $time_criteria;
595
+                $extraCriteria .= ' AND digest_time > '.$time_criteria;
596 596
             }
597 597
             break;
598 598
         case 'sticky':
@@ -602,7 +602,7 @@  discard block
 block discarded – undo
602 602
         default:
603 603
             $type = 'post';
604 604
             if (null !== $time_criteria) {
605
-                $extraCriteria = ' AND post_time > ' . $time_criteria;
605
+                $extraCriteria = ' AND post_time > '.$time_criteria;
606 606
             }
607 607
             break;
608 608
     }
@@ -626,17 +626,17 @@  discard block
 block discarded – undo
626 626
     }
627 627
 
628 628
     if ('topic' === $type) {
629
-        $forumCriteria   = ' AND forum_id IN (' . implode(',', $allowedForums) . ')';
629
+        $forumCriteria   = ' AND forum_id IN ('.implode(',', $allowedForums).')';
630 630
         $approveCriteria = ' AND approved = 1';
631 631
         $query           = 'SELECT DISTINCT topic_poster AS author, COUNT(*) AS count
632
-                    FROM ' . $GLOBALS['xoopsDB']->prefix('newbb_topics') . '
633
-                    WHERE topic_poster>0 ' . $forumCriteria . $approveCriteria . $extraCriteria . ' GROUP BY topic_poster ORDER BY ' . $order . ' DESC';
632
+                    FROM ' . $GLOBALS['xoopsDB']->prefix('newbb_topics').'
633
+                    WHERE topic_poster>0 ' . $forumCriteria.$approveCriteria.$extraCriteria.' GROUP BY topic_poster ORDER BY '.$order.' DESC';
634 634
     } else {
635
-        $forumCriteria   = ' AND forum_id IN (' . implode(',', $allowedForums) . ')';
635
+        $forumCriteria   = ' AND forum_id IN ('.implode(',', $allowedForums).')';
636 636
         $approveCriteria = ' AND approved = 1';
637 637
         $query           = 'SELECT DISTINCT uid AS author, COUNT(*) AS count
638
-                    FROM ' . $GLOBALS['xoopsDB']->prefix('newbb_posts') . '
639
-                    WHERE uid > 0 ' . $forumCriteria . $approveCriteria . $extraCriteria . ' GROUP BY uid ORDER BY ' . $order . ' DESC';
638
+                    FROM ' . $GLOBALS['xoopsDB']->prefix('newbb_posts').'
639
+                    WHERE uid > 0 ' . $forumCriteria.$approveCriteria.$extraCriteria.' GROUP BY uid ORDER BY '.$order.' DESC';
640 640
     }
641 641
 
642 642
     $result = $GLOBALS['xoopsDB']->query($query, $options[1], 0);
@@ -651,12 +651,12 @@  discard block
 block discarded – undo
651 651
     if (count($author) < 1) {
652 652
         return $block;
653 653
     }
654
-    require_once __DIR__ . '/../include/functions.user.php';
654
+    require_once __DIR__.'/../include/functions.user.php';
655 655
     $author_name = newbbGetUnameFromIds(array_keys($author), $newbbConfig['show_realname']);
656 656
     foreach (array_keys($author) as $uid) {
657 657
         $author[$uid]['name'] = $myts->htmlSpecialChars($author_name[$uid]);
658 658
     }
659
-    $block['authors']   =& $author;
659
+    $block['authors']   = & $author;
660 660
     $block['disp_mode'] = $options[3]; // 0 - full view; 1 - lite view;
661 661
     $block['indexNav']  = (int)$options[4];
662 662
 
@@ -669,45 +669,45 @@  discard block
 block discarded – undo
669 669
  */
670 670
 function b_newbb_edit($options)
671 671
 {
672
-    require_once __DIR__ . '/../include/functions.forum.php';
672
+    require_once __DIR__.'/../include/functions.forum.php';
673 673
 
674
-    $form = _MB_NEWBB_CRITERIA . "<select name='options[0]'>";
674
+    $form = _MB_NEWBB_CRITERIA."<select name='options[0]'>";
675 675
     $form .= "<option value='time'";
676 676
     if ('time' === $options[0]) {
677 677
         $form .= " selected='selected' ";
678 678
     }
679
-    $form .= '>' . _MB_NEWBB_CRITERIA_TIME . '</option>';
679
+    $form .= '>'._MB_NEWBB_CRITERIA_TIME.'</option>';
680 680
     $form .= '</select>';
681
-    $form .= '<br>' . _MB_NEWBB_DISPLAY . "<input type='text' name='options[1]' value='" . $options[1] . "' />";
682
-    $form .= '<br>' . _MB_NEWBB_TIME . "<input type='text' name='options[2]' value='" . $options[2] . "' />";
683
-    $form .= '<br>&nbsp;&nbsp;&nbsp;&nbsp;<small>' . _MB_NEWBB_TIME_DESC . '</small>';
684
-    $form .= '<br>' . _MB_NEWBB_DISPLAYMODE . "<input type='radio' name='options[3]' value='0'";
681
+    $form .= '<br>'._MB_NEWBB_DISPLAY."<input type='text' name='options[1]' value='".$options[1]."' />";
682
+    $form .= '<br>'._MB_NEWBB_TIME."<input type='text' name='options[2]' value='".$options[2]."' />";
683
+    $form .= '<br>&nbsp;&nbsp;&nbsp;&nbsp;<small>'._MB_NEWBB_TIME_DESC.'</small>';
684
+    $form .= '<br>'._MB_NEWBB_DISPLAYMODE."<input type='radio' name='options[3]' value='0'";
685 685
     if (0 == $options[3]) {
686 686
         $form .= ' checked';
687 687
     }
688
-    $form .= ' />&nbsp;' . _MB_NEWBB_DISPLAYMODE_FULL . "<input type='radio' name='options[3]' value='1'";
688
+    $form .= ' />&nbsp;'._MB_NEWBB_DISPLAYMODE_FULL."<input type='radio' name='options[3]' value='1'";
689 689
     if (1 == $options[3]) {
690 690
         $form .= ' checked';
691 691
     }
692
-    $form .= ' />&nbsp;' . _MB_NEWBB_DISPLAYMODE_COMPACT . "<input type='radio' name='options[3]' value='2'";
692
+    $form .= ' />&nbsp;'._MB_NEWBB_DISPLAYMODE_COMPACT."<input type='radio' name='options[3]' value='2'";
693 693
     if (2 == $options[3]) {
694 694
         $form .= ' checked';
695 695
     }
696
-    $form .= ' />&nbsp;' . _MB_NEWBB_DISPLAYMODE_LITE;
696
+    $form .= ' />&nbsp;'._MB_NEWBB_DISPLAYMODE_LITE;
697 697
 
698
-    $form .= '<br>' . _MB_NEWBB_INDEXNAV . '<input type="radio" name="options[4]" value="1"';
698
+    $form .= '<br>'._MB_NEWBB_INDEXNAV.'<input type="radio" name="options[4]" value="1"';
699 699
     if (1 == $options[4]) {
700 700
         $form .= ' checked';
701 701
     }
702
-    $form .= ' />' . _YES . '<input type="radio" name="options[4]" value="0"';
702
+    $form .= ' />'._YES.'<input type="radio" name="options[4]" value="0"';
703 703
     if (0 == $options[4]) {
704 704
         $form .= ' checked';
705 705
     }
706
-    $form .= ' />' . _NO;
706
+    $form .= ' />'._NO;
707 707
 
708
-    $form .= '<br>' . _MB_NEWBB_TITLE_LENGTH . "<input type='text' name='options[5]' value='" . $options[5] . "' />";
708
+    $form .= '<br>'._MB_NEWBB_TITLE_LENGTH."<input type='text' name='options[5]' value='".$options[5]."' />";
709 709
 
710
-    $form .= '<br><br>' . _MB_NEWBB_FORUMLIST;
710
+    $form .= '<br><br>'._MB_NEWBB_FORUMLIST;
711 711
 
712 712
     $optionsForum = array_filter(array_slice($options, 6), 'b_newbb_array_filter'); // get allowed forums
713 713
     $isAll        = (0 === count($optionsForum) || empty($optionsForum[0]));
@@ -716,7 +716,7 @@  discard block
 block discarded – undo
716 716
     if ($isAll) {
717 717
         $form .= ' selected';
718 718
     }
719
-    $form .= '>' . _ALL . '</option>';
719
+    $form .= '>'._ALL.'</option>';
720 720
     $form .= newbbForumSelectBox($optionsForum);
721 721
     $form .= '</select><br>';
722 722
 
@@ -729,64 +729,64 @@  discard block
 block discarded – undo
729 729
  */
730 730
 function b_newbb_topic_edit($options)
731 731
 {
732
-    require_once __DIR__ . '/../include/functions.forum.php';
733
-    $form = _MB_NEWBB_CRITERIA . "<select name='options[0]'>";
732
+    require_once __DIR__.'/../include/functions.forum.php';
733
+    $form = _MB_NEWBB_CRITERIA."<select name='options[0]'>";
734 734
     $form .= "<option value='time'";
735 735
     if ('time' === $options[0]) {
736 736
         $form .= " selected='selected' ";
737 737
     }
738
-    $form .= '>' . _MB_NEWBB_CRITERIA_TIME . '</option>';
738
+    $form .= '>'._MB_NEWBB_CRITERIA_TIME.'</option>';
739 739
     $form .= "<option value='views'";
740 740
     if ('views' === $options[0]) {
741 741
         $form .= " selected='selected' ";
742 742
     }
743
-    $form .= '>' . _MB_NEWBB_CRITERIA_VIEWS . '</option>';
743
+    $form .= '>'._MB_NEWBB_CRITERIA_VIEWS.'</option>';
744 744
     $form .= "<option value='replies'";
745 745
     if ('replies' === $options[0]) {
746 746
         $form .= " selected='selected' ";
747 747
     }
748
-    $form .= '>' . _MB_NEWBB_CRITERIA_REPLIES . '</option>';
748
+    $form .= '>'._MB_NEWBB_CRITERIA_REPLIES.'</option>';
749 749
     $form .= "<option value='digest'";
750 750
     if ('digest' === $options[0]) {
751 751
         $form .= " selected='selected' ";
752 752
     }
753
-    $form .= '>' . _MB_NEWBB_CRITERIA_DIGEST . '</option>';
753
+    $form .= '>'._MB_NEWBB_CRITERIA_DIGEST.'</option>';
754 754
     $form .= "<option value='sticky'";
755 755
     if ('sticky' === $options[0]) {
756 756
         $form .= " selected='selected' ";
757 757
     }
758
-    $form .= '>' . _MB_NEWBB_CRITERIA_STICKY . '</option>';
758
+    $form .= '>'._MB_NEWBB_CRITERIA_STICKY.'</option>';
759 759
     $form .= '</select>';
760
-    $form .= '<br>' . _MB_NEWBB_DISPLAY . "<input type='text' name='options[1]' value='" . $options[1] . "' />";
761
-    $form .= '<br>' . _MB_NEWBB_TIME . "<input type='text' name='options[2]' value='" . $options[2] . "' />";
762
-    $form .= '<br>&nbsp;&nbsp;&nbsp;&nbsp;<small>' . _MB_NEWBB_TIME_DESC . '</small>';
763
-    $form .= '<br>' . _MB_NEWBB_DISPLAYMODE . "<input type='radio' name='options[3]' value='0'";
760
+    $form .= '<br>'._MB_NEWBB_DISPLAY."<input type='text' name='options[1]' value='".$options[1]."' />";
761
+    $form .= '<br>'._MB_NEWBB_TIME."<input type='text' name='options[2]' value='".$options[2]."' />";
762
+    $form .= '<br>&nbsp;&nbsp;&nbsp;&nbsp;<small>'._MB_NEWBB_TIME_DESC.'</small>';
763
+    $form .= '<br>'._MB_NEWBB_DISPLAYMODE."<input type='radio' name='options[3]' value='0'";
764 764
     if (0 == $options[3]) {
765 765
         $form .= ' checked';
766 766
     }
767
-    $form .= ' />&nbsp;' . _MB_NEWBB_DISPLAYMODE_FULL . "<input type='radio' name='options[3]' value='1'";
767
+    $form .= ' />&nbsp;'._MB_NEWBB_DISPLAYMODE_FULL."<input type='radio' name='options[3]' value='1'";
768 768
     if (1 == $options[3]) {
769 769
         $form .= ' checked';
770 770
     }
771
-    $form .= ' />&nbsp;' . _MB_NEWBB_DISPLAYMODE_COMPACT . "<input type='radio' name='options[3]' value='2'";
771
+    $form .= ' />&nbsp;'._MB_NEWBB_DISPLAYMODE_COMPACT."<input type='radio' name='options[3]' value='2'";
772 772
     if (2 == $options[3]) {
773 773
         $form .= ' checked';
774 774
     }
775
-    $form .= ' />&nbsp;' . _MB_NEWBB_DISPLAYMODE_LITE;
775
+    $form .= ' />&nbsp;'._MB_NEWBB_DISPLAYMODE_LITE;
776 776
 
777
-    $form .= '<br>' . _MB_NEWBB_INDEXNAV . '<input type="radio" name="options[4]" value="1"';
777
+    $form .= '<br>'._MB_NEWBB_INDEXNAV.'<input type="radio" name="options[4]" value="1"';
778 778
     if (1 == $options[4]) {
779 779
         $form .= ' checked';
780 780
     }
781
-    $form .= ' />' . _YES . '<input type="radio" name="options[4]" value="0"';
781
+    $form .= ' />'._YES.'<input type="radio" name="options[4]" value="0"';
782 782
     if (0 == $options[4]) {
783 783
         $form .= ' checked';
784 784
     }
785
-    $form .= ' />' . _NO;
785
+    $form .= ' />'._NO;
786 786
 
787
-    $form .= '<br>' . _MB_NEWBB_TITLE_LENGTH . "<input type='text' name='options[5]' value='" . $options[5] . "' />";
787
+    $form .= '<br>'._MB_NEWBB_TITLE_LENGTH."<input type='text' name='options[5]' value='".$options[5]."' />";
788 788
 
789
-    $form .= '<br><br>' . _MB_NEWBB_FORUMLIST;
789
+    $form .= '<br><br>'._MB_NEWBB_FORUMLIST;
790 790
 
791 791
     $optionsForum = array_filter(array_slice($options, 6), 'b_newbb_array_filter'); // get allowed forums
792 792
 
@@ -796,7 +796,7 @@  discard block
 block discarded – undo
796 796
     if ($isAll) {
797 797
         $form .= ' selected="selected"';
798 798
     }
799
-    $form .= '>' . _ALL . '</option>';
799
+    $form .= '>'._ALL.'</option>';
800 800
     $form .= newbbForumSelectBox($optionsForum);
801 801
     $form .= '</select><br>';
802 802
 
@@ -809,49 +809,49 @@  discard block
 block discarded – undo
809 809
  */
810 810
 function b_newbb_post_edit($options)
811 811
 {
812
-    require_once __DIR__ . '/../include/functions.forum.php';
813
-    $form = _MB_NEWBB_CRITERIA . "<select name='options[0]'>";
812
+    require_once __DIR__.'/../include/functions.forum.php';
813
+    $form = _MB_NEWBB_CRITERIA."<select name='options[0]'>";
814 814
     $form .= "<option value='title'";
815 815
     if ('title' === $options[0]) {
816 816
         $form .= " selected='selected' ";
817 817
     }
818
-    $form .= '>' . _MB_NEWBB_CRITERIA_TITLE . '</option>';
818
+    $form .= '>'._MB_NEWBB_CRITERIA_TITLE.'</option>';
819 819
     $form .= "<option value='text'";
820 820
     if ('text' === $options[0]) {
821 821
         $form .= " selected='selected' ";
822 822
     }
823
-    $form .= '>' . _MB_NEWBB_CRITERIA_TEXT . '</option>';
823
+    $form .= '>'._MB_NEWBB_CRITERIA_TEXT.'</option>';
824 824
     $form .= '</select>';
825
-    $form .= '<br>' . _MB_NEWBB_DISPLAY . "<input type='text' name='options[1]' value='" . $options[1] . "' />";
826
-    $form .= '<br>' . _MB_NEWBB_TIME . "<input type='text' name='options[2]' value='" . $options[2] . "' />";
827
-    $form .= '<br>&nbsp;&nbsp;&nbsp;&nbsp;<small>' . _MB_NEWBB_TIME_DESC . '</small>';
828
-    $form .= '<br>' . _MB_NEWBB_DISPLAYMODE . "<input type='radio' name='options[3]' value='0'";
825
+    $form .= '<br>'._MB_NEWBB_DISPLAY."<input type='text' name='options[1]' value='".$options[1]."' />";
826
+    $form .= '<br>'._MB_NEWBB_TIME."<input type='text' name='options[2]' value='".$options[2]."' />";
827
+    $form .= '<br>&nbsp;&nbsp;&nbsp;&nbsp;<small>'._MB_NEWBB_TIME_DESC.'</small>';
828
+    $form .= '<br>'._MB_NEWBB_DISPLAYMODE."<input type='radio' name='options[3]' value='0'";
829 829
     if (0 == $options[3]) {
830 830
         $form .= ' checked';
831 831
     }
832
-    $form .= ' />&nbsp;' . _MB_NEWBB_DISPLAYMODE_FULL . "<input type='radio' name='options[3]' value='1'";
832
+    $form .= ' />&nbsp;'._MB_NEWBB_DISPLAYMODE_FULL."<input type='radio' name='options[3]' value='1'";
833 833
     if (1 == $options[3]) {
834 834
         $form .= ' checked';
835 835
     }
836
-    $form .= ' />&nbsp;' . _MB_NEWBB_DISPLAYMODE_COMPACT . "<input type='radio' name='options[3]' value='2'";
836
+    $form .= ' />&nbsp;'._MB_NEWBB_DISPLAYMODE_COMPACT."<input type='radio' name='options[3]' value='2'";
837 837
     if (2 == $options[3]) {
838 838
         $form .= ' checked';
839 839
     }
840
-    $form .= ' />&nbsp;' . _MB_NEWBB_DISPLAYMODE_LITE;
840
+    $form .= ' />&nbsp;'._MB_NEWBB_DISPLAYMODE_LITE;
841 841
 
842
-    $form .= '<br>' . _MB_NEWBB_INDEXNAV . '<input type="radio" name="options[4]" value="1"';
842
+    $form .= '<br>'._MB_NEWBB_INDEXNAV.'<input type="radio" name="options[4]" value="1"';
843 843
     if (1 == $options[4]) {
844 844
         $form .= ' checked';
845 845
     }
846
-    $form .= ' />' . _YES . '<input type="radio" name="options[4]" value="0"';
846
+    $form .= ' />'._YES.'<input type="radio" name="options[4]" value="0"';
847 847
     if (0 == $options[4]) {
848 848
         $form .= ' checked';
849 849
     }
850
-    $form .= ' />' . _NO;
850
+    $form .= ' />'._NO;
851 851
 
852
-    $form .= '<br>' . _MB_NEWBB_TITLE_LENGTH . "<input type='text' name='options[5]' value='" . $options[5] . "' />";
852
+    $form .= '<br>'._MB_NEWBB_TITLE_LENGTH."<input type='text' name='options[5]' value='".$options[5]."' />";
853 853
 
854
-    $form .= '<br><br>' . _MB_NEWBB_FORUMLIST;
854
+    $form .= '<br><br>'._MB_NEWBB_FORUMLIST;
855 855
 
856 856
     $optionsForum = array_filter(array_slice($options, 6), 'b_newbb_array_filter'); // get allowed forums
857 857
     $isAll        = (0 === count($optionsForum) || empty($optionsForum[0]));
@@ -860,7 +860,7 @@  discard block
 block discarded – undo
860 860
     if ($isAll) {
861 861
         $form .= ' selected="selected"';
862 862
     }
863
-    $form .= '>' . _ALL . '</option>';
863
+    $form .= '>'._ALL.'</option>';
864 864
     $form .= newbbForumSelectBox($optionsForum);
865 865
     $form .= '</select><br>';
866 866
 
@@ -873,53 +873,53 @@  discard block
 block discarded – undo
873 873
  */
874 874
 function b_newbb_author_edit($options)
875 875
 {
876
-    require_once __DIR__ . '/../include/functions.forum.php';
877
-    $form = _MB_NEWBB_CRITERIA . "<select name='options[0]'>";
876
+    require_once __DIR__.'/../include/functions.forum.php';
877
+    $form = _MB_NEWBB_CRITERIA."<select name='options[0]'>";
878 878
     $form .= "<option value='post'";
879 879
     if ('post' === $options[0]) {
880 880
         $form .= " selected='selected' ";
881 881
     }
882
-    $form .= '>' . _MB_NEWBB_CRITERIA_POST . '</option>';
882
+    $form .= '>'._MB_NEWBB_CRITERIA_POST.'</option>';
883 883
     $form .= "<option value='topic'";
884 884
     if ('topic' === $options[0]) {
885 885
         $form .= " selected='selected' ";
886 886
     }
887
-    $form .= '>' . _MB_NEWBB_CRITERIA_TOPIC . '</option>';
887
+    $form .= '>'._MB_NEWBB_CRITERIA_TOPIC.'</option>';
888 888
     $form .= "<option value='digest'";
889 889
     if ('digest' === $options[0]) {
890 890
         $form .= " selected='selected' ";
891 891
     }
892
-    $form .= '>' . _MB_NEWBB_CRITERIA_DIGESTS . '</option>';
892
+    $form .= '>'._MB_NEWBB_CRITERIA_DIGESTS.'</option>';
893 893
     $form .= "<option value='sticky'";
894 894
     if ('sticky' === $options[0]) {
895 895
         $form .= " selected='selected' ";
896 896
     }
897
-    $form .= '>' . _MB_NEWBB_CRITERIA_STICKYS . '</option>';
897
+    $form .= '>'._MB_NEWBB_CRITERIA_STICKYS.'</option>';
898 898
     $form .= '</select>';
899
-    $form .= '<br>' . _MB_NEWBB_DISPLAY . "<input type='text' name='options[1]' value='" . $options[1] . "' />";
900
-    $form .= '<br>' . _MB_NEWBB_TIME . "<input type='text' name='options[2]' value='" . $options[2] . "' />";
901
-    $form .= '<br>&nbsp;&nbsp;&nbsp;&nbsp;<small>' . _MB_NEWBB_TIME_DESC . '</small>';
902
-    $form .= '<br>' . _MB_NEWBB_DISPLAYMODE . "<input type='radio' name='options[3]' value='0'";
899
+    $form .= '<br>'._MB_NEWBB_DISPLAY."<input type='text' name='options[1]' value='".$options[1]."' />";
900
+    $form .= '<br>'._MB_NEWBB_TIME."<input type='text' name='options[2]' value='".$options[2]."' />";
901
+    $form .= '<br>&nbsp;&nbsp;&nbsp;&nbsp;<small>'._MB_NEWBB_TIME_DESC.'</small>';
902
+    $form .= '<br>'._MB_NEWBB_DISPLAYMODE."<input type='radio' name='options[3]' value='0'";
903 903
     if (0 == $options[3]) {
904 904
         $form .= ' checked';
905 905
     }
906
-    $form .= ' />&nbsp;' . _MB_NEWBB_DISPLAYMODE_COMPACT . "<input type='radio' name='options[3]' value='1'";
906
+    $form .= ' />&nbsp;'._MB_NEWBB_DISPLAYMODE_COMPACT."<input type='radio' name='options[3]' value='1'";
907 907
     if (1 == $options[3]) {
908 908
         $form .= ' checked';
909 909
     }
910
-    $form .= ' />&nbsp;' . _MB_NEWBB_DISPLAYMODE_LITE;
910
+    $form .= ' />&nbsp;'._MB_NEWBB_DISPLAYMODE_LITE;
911 911
 
912
-    $form .= '<br>' . _MB_NEWBB_INDEXNAV . '<input type="radio" name="options[4]" value="1"';
912
+    $form .= '<br>'._MB_NEWBB_INDEXNAV.'<input type="radio" name="options[4]" value="1"';
913 913
     if (1 == $options[4]) {
914 914
         $form .= ' checked';
915 915
     }
916
-    $form .= ' />' . _YES . '<input type="radio" name="options[4]" value="0"';
916
+    $form .= ' />'._YES.'<input type="radio" name="options[4]" value="0"';
917 917
     if (0 == $options[4]) {
918 918
         $form .= ' checked';
919 919
     }
920
-    $form .= ' />' . _NO;
920
+    $form .= ' />'._NO;
921 921
 
922
-    $form .= '<br><br>' . _MB_NEWBB_FORUMLIST;
922
+    $form .= '<br><br>'._MB_NEWBB_FORUMLIST;
923 923
 
924 924
     $optionsForum = array_filter(array_slice($options, 5), 'b_newbb_array_filter'); // get allowed forums
925 925
     $isAll        = (0 === count($optionsForum) || empty($optionsForum[0]));
@@ -928,7 +928,7 @@  discard block
 block discarded – undo
928 928
     if ($isAll) {
929 929
         $form .= ' selected="selected"';
930 930
     }
931
-    $form .= '>' . _ALL . '</option>';
931
+    $form .= '>'._ALL.'</option>';
932 932
     $form .= newbbForumSelectBox($optionsForum);
933 933
     $form .= '</select><br>';
934 934
 
@@ -942,8 +942,8 @@  discard block
 block discarded – undo
942 942
 function b_newbb_custom($options)
943 943
 {
944 944
     // if no newbb module block set, we have to include the language file
945
-    if (is_readable($GLOBALS['xoops']->path('modules/newbb/language/' . $GLOBALS['xoopsConfig']['language'] . '/blocks.php'))) {
946
-        require_once $GLOBALS['xoops']->path('modules/newbb/language/' . $GLOBALS['xoopsConfig']['language'] . '/blocks.php');
945
+    if (is_readable($GLOBALS['xoops']->path('modules/newbb/language/'.$GLOBALS['xoopsConfig']['language'].'/blocks.php'))) {
946
+        require_once $GLOBALS['xoops']->path('modules/newbb/language/'.$GLOBALS['xoopsConfig']['language'].'/blocks.php');
947 947
     } else {
948 948
         require_once $GLOBALS['xoops']->path('modules/newbb/language/english/blocks.php');
949 949
     }
@@ -967,8 +967,8 @@  discard block
 block discarded – undo
967 967
 {
968 968
 
969 969
     // if no newbb module block set, we have to include the language file
970
-    if (is_readable($GLOBALS['xoops']->path('modules/newbb/language/' . $GLOBALS['xoopsConfig']['language'] . '/blocks.php'))) {
971
-        require_once $GLOBALS['xoops']->path('modules/newbb/language/' . $GLOBALS['xoopsConfig']['language'] . '/blocks.php');
970
+    if (is_readable($GLOBALS['xoops']->path('modules/newbb/language/'.$GLOBALS['xoopsConfig']['language'].'/blocks.php'))) {
971
+        require_once $GLOBALS['xoops']->path('modules/newbb/language/'.$GLOBALS['xoopsConfig']['language'].'/blocks.php');
972 972
     } else {
973 973
         require_once $GLOBALS['xoops']->path('modules/newbb/language/english/blocks.php');
974 974
     }
@@ -992,8 +992,8 @@  discard block
 block discarded – undo
992 992
 {
993 993
 
994 994
     // if no newbb module block set, we have to include the language file
995
-    if (is_readable($GLOBALS['xoops']->path('modules/newbb/language/' . $GLOBALS['xoopsConfig']['language'] . '/blocks.php'))) {
996
-        require_once $GLOBALS['xoops']->path('modules/newbb/language/' . $GLOBALS['xoopsConfig']['language'] . '/blocks.php');
995
+    if (is_readable($GLOBALS['xoops']->path('modules/newbb/language/'.$GLOBALS['xoopsConfig']['language'].'/blocks.php'))) {
996
+        require_once $GLOBALS['xoops']->path('modules/newbb/language/'.$GLOBALS['xoopsConfig']['language'].'/blocks.php');
997 997
     } else {
998 998
         require_once $GLOBALS['xoops']->path('modules/newbb/language/english/blocks.php');
999 999
     }
@@ -1016,8 +1016,8 @@  discard block
 block discarded – undo
1016 1016
 function b_newbb_custom_author($options)
1017 1017
 {
1018 1018
     // if no newbb module block set, we have to include the language file
1019
-    if (is_readable($GLOBALS['xoops']->path('modules/newbb/language/' . $GLOBALS['xoopsConfig']['language'] . '/blocks.php'))) {
1020
-        require_once $GLOBALS['xoops']->path('modules/newbb/language/' . $GLOBALS['xoopsConfig']['language'] . '/blocks.php');
1019
+    if (is_readable($GLOBALS['xoops']->path('modules/newbb/language/'.$GLOBALS['xoopsConfig']['language'].'/blocks.php'))) {
1020
+        require_once $GLOBALS['xoops']->path('modules/newbb/language/'.$GLOBALS['xoopsConfig']['language'].'/blocks.php');
1021 1021
     } else {
1022 1022
         require_once $GLOBALS['xoops']->path('modules/newbb/language/english/blocks.php');
1023 1023
     }
Please login to merge, or discard this patch.
blocks/list_topic.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -21,15 +21,15 @@  discard block
 block discarded – undo
21 21
 
22 22
 //require_once dirname(__DIR__) . '/include/functions.ini.php';
23 23
 //require_once dirname(__DIR__) . '/class/TopicRenderer.php';
24
-require_once dirname(__DIR__) . '/footer.php'; // to include js/style files like validate function
24
+require_once dirname(__DIR__).'/footer.php'; // to include js/style files like validate function
25 25
 
26 26
 xoops_loadLanguage('main', 'newbb');
27 27
 
28
-require_once __DIR__ . '/../include/functions.config.php';
29
-require_once __DIR__ . '/../include/functions.time.php';
30
-require_once __DIR__ . '/../include/functions.session.php';
31
-require_once __DIR__ . '/../include/functions.render.php';
32
-require_once __DIR__ . '/../include/functions.user.php';
28
+require_once __DIR__.'/../include/functions.config.php';
29
+require_once __DIR__.'/../include/functions.time.php';
30
+require_once __DIR__.'/../include/functions.session.php';
31
+require_once __DIR__.'/../include/functions.render.php';
32
+require_once __DIR__.'/../include/functions.user.php';
33 33
 
34 34
 // options[0] - Status in WHERE claus: all(by default), sticky, digest,lock, poll, voted, viewed, replied, read, (UN_) , active, pending, deleted (admin) (It is  multi-select)
35 35
 // options[1] - Uid in WHERE claus: uid of the topic poster : -1 - all users (by default)
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
     $topicRenderer->force = true; // force against static vars for parse
60 60
 
61 61
     $topicRenderer->is_multiple = true; // is it for multiple forums
62
-    $topicRenderer->config      =& $newbbConfig; // get all configs
62
+    $topicRenderer->config      = & $newbbConfig; // get all configs
63 63
     if (!empty($options[6])) {
64 64
         $topicRenderer->config['topics_per_page'] = (int)$options[6]; // number of topics (items) to display
65 65
     }
@@ -121,16 +121,16 @@  discard block
 block discarded – undo
121 121
     $topicPosterRadioEle->addOption(-1, _MD_NEWBB_TOTALUSER);
122 122
     $topicPosterRadioEle->addOption((-1 !== $options[1]) ? $options[1] : 0, _SELECT); // if no user in selection box it select uid=0 anon users
123 123
     $topicPosterRadioEle->setExtra("onchange=\"var el=document.getElementById('options[1]'); el.disabled=(this.id == 'options[1]1'); if (!el.value) {el.value= this.value}\""); // if user dont select any option it select "all"
124
-    $topicPosterSelectEle = new \XoopsFormSelectUser(_MB_NEWBB_AUTHOR, 'options[1]', true, explode(',', $options[1]), 5, true);// show $limit = 200 users when no user is selected;
125
-    $topicPosterEle       = new \XoopsFormLabel(_MB_NEWBB_AUTHOR, $topicPosterRadioEle->render() . $topicPosterSelectEle->render());
124
+    $topicPosterSelectEle = new \XoopsFormSelectUser(_MB_NEWBB_AUTHOR, 'options[1]', true, explode(',', $options[1]), 5, true); // show $limit = 200 users when no user is selected;
125
+    $topicPosterEle       = new \XoopsFormLabel(_MB_NEWBB_AUTHOR, $topicPosterRadioEle->render().$topicPosterSelectEle->render());
126 126
 
127 127
     // lastposter element
128 128
     $lastPosterRadioEle = new \XoopsFormRadio(_MD_NEWBB_POSTER, 'options[2]', $options[2]);
129 129
     $lastPosterRadioEle->addOption(-1, _MD_NEWBB_TOTALUSER);
130 130
     $lastPosterRadioEle->addOption((-1 !== $options[2]) ? $options[2] : 0, _SELECT); // if no user in selection box it select uid=1
131 131
     $lastPosterRadioEle->setExtra("onchange=\"var el=document.getElementById('options[2]'); el.disabled=(this.id == 'options[2]1'); if (!el.value) {el.value= this.value}\""); // if user dont select any option it select "all"
132
-    $lastPosterSelectEle = new \XoopsFormSelectUser(_MD_NEWBB_POSTER, 'options[2]', true, explode(',', $options[2]), 5, true);// show $limit = 200 users when no user is selected;
133
-    $lastPosterEle       = new \XoopsFormLabel(_MD_NEWBB_POSTER, $lastPosterRadioEle->render() . $lastPosterSelectEle->render());
132
+    $lastPosterSelectEle = new \XoopsFormSelectUser(_MD_NEWBB_POSTER, 'options[2]', true, explode(',', $options[2]), 5, true); // show $limit = 200 users when no user is selected;
133
+    $lastPosterEle       = new \XoopsFormLabel(_MD_NEWBB_POSTER, $lastPosterRadioEle->render().$lastPosterSelectEle->render());
134 134
 
135 135
     // type element
136 136
     $types   = $topicRenderer->getTypes(); // get all available types in all forums
@@ -180,20 +180,20 @@  discard block
 block discarded – undo
180 180
 
181 181
     //  forum element
182 182
     $optionsForum = explode(',', $options[12]);
183
-    require_once __DIR__ . '/../include/functions.forum.php';
183
+    require_once __DIR__.'/../include/functions.forum.php';
184 184
     /** @var Newbb\ForumHandler $forumHandler */
185 185
     $forumHandler = Newbb\Helper::getInstance()->getHandler('Forum');
186 186
     //get forum Ids by values. parse positive values to forum IDs and negative values to category IDs. value=0 => all valid forums
187 187
     // Get accessible forums
188 188
     $accessForums = $forumHandler->getIdsByValues(array_map('intval', $optionsForum));
189 189
     $isAll        = (0 === count($optionsForum) || empty($optionsForum[0]));
190
-    $forumSel     = "<select name=\"options[12][]\" multiple=\"multiple\" onchange = \"validate('options[12][]','select', true)\">";// if user dont select any it select "0"
191
-    $forumSel     .= '<option value="0" ';
190
+    $forumSel     = "<select name=\"options[12][]\" multiple=\"multiple\" onchange = \"validate('options[12][]','select', true)\">"; // if user dont select any it select "0"
191
+    $forumSel .= '<option value="0" ';
192 192
     if ($isAll) {
193
-        $forumSel     .= ' selected';
193
+        $forumSel .= ' selected';
194 194
         $accessForums = null; // just select _ALL option
195 195
     }
196
-    $forumSel .= '>' . _ALL . '</option>';
196
+    $forumSel .= '>'._ALL.'</option>';
197 197
     $forumSel .= newbbForumSelectBox($accessForums, 'access', false); //$accessForums, $permission = "access", $delimitorCategory = false
198 198
     $forumSel .= '</select>';
199 199
     $forumEle = new \XoopsFormLabel(_MB_NEWBB_FORUMLIST, $forumSel);
Please login to merge, or discard this patch.
reply.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 use Xmf\Request;
33 33
 use XoopsModules\Newbb;
34 34
 
35
-require_once __DIR__ . '/header.php';
35
+require_once __DIR__.'/header.php';
36 36
 
37 37
 $forum    = Request::getInt('forum', 0, 'GET');
38 38
 $topic_id = Request::getInt('topic_id', 0, 'GET');
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 
66 66
 $forumObject = $forumHandler->get($forum);
67 67
 if (!$forumHandler->getPermission($forumObject)) {
68
-    redirect_header(XOOPS_URL . '/index.php', 2, _MD_NEWBB_NORIGHTTOACCESS);
68
+    redirect_header(XOOPS_URL.'/index.php', 2, _MD_NEWBB_NORIGHTTOACCESS);
69 69
 }
70 70
 
71 71
 $topicObject  = $topicHandler->get($topic_id);
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
     $query_array = [];
79 79
     foreach ($query_vars as $var) {
80 80
         if (Request::getString($var, '', 'GET')) {
81
-            $query_array[$var] = "{$var}=" . Request::getString($var, '', 'GET');
81
+            $query_array[$var] = "{$var}=".Request::getString($var, '', 'GET');
82 82
         }
83 83
     }
84 84
     $page_query = htmlspecialchars(implode('&', array_values($query_array)), ENT_QUOTES | ENT_HTML5);
@@ -133,8 +133,8 @@  discard block
 block discarded – undo
133 133
 $r_subject = $postParentObject->getVar('subject', 'E');
134 134
 
135 135
 $subject = $r_subject;
136
-if (!preg_match('/^(Re|' . _MD_NEWBB_RE . '):/i', $r_subject)) {
137
-    $subject = _MD_NEWBB_RE . ': ' . $r_subject;
136
+if (!preg_match('/^(Re|'._MD_NEWBB_RE.'):/i', $r_subject)) {
137
+    $subject = _MD_NEWBB_RE.': '.$r_subject;
138 138
 }
139 139
 
140 140
 $q_message = $postParentObject->getVar('post_text', 'e');
@@ -143,12 +143,12 @@  discard block
 block discarded – undo
143 143
     if (1 === Request::getInt('quotedac', 0, 'GET')) {
144 144
         $message = "[quote]\n";
145 145
         $message .= sprintf(_MD_NEWBB_USERWROTE, $r_name);
146
-        $message .= "\n" . $q_message . '[/quote]';
146
+        $message .= "\n".$q_message.'[/quote]';
147 147
         $hidden  = '';
148 148
     } else {
149 149
         $hidden  = "[quote]\n";
150 150
         $hidden  .= sprintf(_MD_NEWBB_USERWROTE, $r_name);
151
-        $hidden  .= "\n" . $q_message . '[/quote]';
151
+        $hidden  .= "\n".$q_message.'[/quote]';
152 152
         $message = '';
153 153
     }
154 154
 } else {
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 $post_karma    = 0;
168 168
 $require_reply = 0;
169 169
 
170
-include __DIR__ . '/include/form.post.php';
170
+include __DIR__.'/include/form.post.php';
171 171
 
172 172
 ///** @var Newbb\KarmaHandler $karmaHandler */
173 173
 //$karmaHandler = Newbb\Helper::getInstance()->getHandler('Karma');
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
 foreach ($posts_contextObject as $post_contextObject) {
181 181
     // Sorry, in order to save queries, we have to hide the non-open post_text even if you have replied or have adequate karma, even an admin.
182 182
     if ($GLOBALS['xoopsModuleConfig']['enable_karma'] && $post_contextObject->getVar('post_karma') > 0) {
183
-        $p_message = sprintf(_MD_NEWBB_KARMA_REQUIREMENT, '***', $post_contextObject->getVar('post_karma')) . '</div>';
183
+        $p_message = sprintf(_MD_NEWBB_KARMA_REQUIREMENT, '***', $post_contextObject->getVar('post_karma')).'</div>';
184 184
     } elseif ($GLOBALS['xoopsModuleConfig']['allow_require_reply'] && $post_contextObject->getVar('require_reply')) {
185 185
         $p_message = _MD_NEWBB_REPLY_REQUIREMENT;
186 186
     } else {
@@ -198,11 +198,11 @@  discard block
 block discarded – undo
198 198
 
199 199
     $posts_context[] = [
200 200
         'subject' => $p_subject,
201
-        'meta'    => _MD_NEWBB_BY . ' ' . $p_name . ' ' . _MD_NEWBB_ON . ' ' . $p_date,
201
+        'meta'    => _MD_NEWBB_BY.' '.$p_name.' '._MD_NEWBB_ON.' '.$p_date,
202 202
         'content' => $p_message
203 203
     ];
204 204
 }
205 205
 $xoopsTpl->assign_by_ref('posts_context', $posts_context);
206 206
 // irmtfan move to footer.php
207
-require_once __DIR__ . '/footer.php';
207
+require_once __DIR__.'/footer.php';
208 208
 include $GLOBALS['xoops']->path('footer.php');
Please login to merge, or discard this patch.
list.topic.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 use Xmf\Request;
13 13
 use XoopsModules\Newbb;
14 14
 
15
-require_once __DIR__ . '/header.php';
15
+require_once __DIR__.'/header.php';
16 16
 
17 17
 //$xoopsOption['xoops_module_header']= $xoops_module_header;
18 18
 $GLOBALS['xoopsOption']['template_main'] = 'newbb_viewall.tpl';
@@ -21,13 +21,13 @@  discard block
 block discarded – undo
21 21
 // irmtfan new method
22 22
 if (!empty($GLOBALS['xoopsModuleConfig']['rss_enable'])) {
23 23
     $xoopsTpl->assign('xoops_module_header', '
24
-    <link rel="alternate" type="application/xml+rss" title="' . $xoopsModule->getVar('name') . '" href="' . XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname', 'n') . '/rss.php" />
24
+    <link rel="alternate" type="application/xml+rss" title="' . $xoopsModule->getVar('name').'" href="'.XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname', 'n').'/rss.php" />
25 25
     ' . @$xoopsTpl->get_template_vars('xoops_module_header'));
26 26
 }
27 27
 //$xoopsTpl->assign('xoops_module_header', $xoops_module_header);
28 28
 
29
-require_once __DIR__ . '/include/functions.time.php';
30
-require_once __DIR__ . '/include/functions.render.php';
29
+require_once __DIR__.'/include/functions.time.php';
30
+require_once __DIR__.'/include/functions.render.php';
31 31
 
32 32
 // irmtfan use require_once because it will redeclared in newbb/blocks/list_topic.php
33 33
 //require_once __DIR__ . '/./class/TopicRenderer.php';
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 $xoopsTpl->assign('newpost_link', 'viewpost.php?status=new');
88 88
 
89 89
 if (!empty($GLOBALS['xoopsModuleConfig']['show_jump'])) {
90
-    require_once __DIR__ . '/include/functions.forum.php';
90
+    require_once __DIR__.'/include/functions.forum.php';
91 91
     $xoopsTpl->assign('forum_jumpbox', newbbMakeJumpbox());
92 92
 }
93 93
 $xoopsTpl->assign('menumode', $menumode);
@@ -95,12 +95,12 @@  discard block
 block discarded – undo
95 95
 
96 96
 $xoopsTpl->assign('mode', $mode);
97 97
 $xoopsTpl->assign('status', $status);
98
-$xoopsTpl->assign('viewer_level', $topic_renderer->userlevel);// irmtfan use userlevel
98
+$xoopsTpl->assign('viewer_level', $topic_renderer->userlevel); // irmtfan use userlevel
99 99
 
100 100
 $pagetitle = sprintf(_MD_NEWBB_FORUMINDEX, htmlspecialchars($GLOBALS['xoopsConfig']['sitename'], ENT_QUOTES));
101 101
 $xoopsTpl->assign('forum_index_title', $pagetitle);
102 102
 $xoopsTpl->assign('xoops_pagetitle', $pagetitle);
103 103
 
104 104
 // irmtfan move to footer.php
105
-require_once __DIR__ . '/footer.php';
105
+require_once __DIR__.'/footer.php';
106 106
 include $GLOBALS['xoops']->path('footer.php');
Please login to merge, or discard this patch.