Passed
Push — master ( 4990f6...882d2a )
by Michael
03:01
created
update_type.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
  * @since          4.00
9 9
  * @package        module::newbb
10 10
  */
11
-require_once __DIR__ . '/header.php';
11
+require_once __DIR__.'/header.php';
12 12
 
13 13
 if (!is_object($GLOBALS['xoopsUser']) || !$GLOBALS['xoopsUser']->isAdmin()) {
14 14
     exit(_NOPERM);
@@ -22,11 +22,11 @@  discard block
 block discarded – undo
22 22
     exit('No need for update');
23 23
 }
24 24
 
25
-$GLOBALS['xoopsDB']->queryF('DROP TABLE ' . $GLOBALS['xoopsDB']->prefix('newbb_type_tmp'));
26
-$GLOBALS['xoopsDB']->queryF('DROP TABLE ' . $GLOBALS['xoopsDB']->prefix('newbb_type_forum_tmp'));
25
+$GLOBALS['xoopsDB']->queryF('DROP TABLE '.$GLOBALS['xoopsDB']->prefix('newbb_type_tmp'));
26
+$GLOBALS['xoopsDB']->queryF('DROP TABLE '.$GLOBALS['xoopsDB']->prefix('newbb_type_forum_tmp'));
27 27
 
28 28
 if (!$GLOBALS['xoopsDB']->queryF('
29
-        CREATE TABLE ' . $GLOBALS['xoopsDB']->prefix('newbb_type_tmp') . " (
29
+        CREATE TABLE ' . $GLOBALS['xoopsDB']->prefix('newbb_type_tmp')." (
30 30
           `type_id`             SMALLINT(4)         UNSIGNED NOT NULL AUTO_INCREMENT,
31 31
           `type_name`             VARCHAR(64)         NOT NULL DEFAULT '',
32 32
           `type_color`             VARCHAR(10)         NOT NULL DEFAULT '',
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 }
40 40
 
41 41
 if (!$GLOBALS['xoopsDB']->queryF('
42
-        CREATE TABLE ' . $GLOBALS['xoopsDB']->prefix('newbb_type_forum_tmp') . " (
42
+        CREATE TABLE ' . $GLOBALS['xoopsDB']->prefix('newbb_type_forum_tmp')." (
43 43
           `tf_id`                 MEDIUMINT(4)         UNSIGNED NOT NULL AUTO_INCREMENT,
44 44
           `type_id`             SMALLINT(4)         UNSIGNED NOT NULL DEFAULT '0',
45 45
           `forum_id`             SMALLINT(4)         UNSIGNED NOT NULL DEFAULT '0',
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
           KEY `type_order`        (`type_order`)
51 51
         ) ENGINE=MyISAM;
52 52
     ")) {
53
-    $GLOBALS['xoopsDB']->queryF('DROP TABLE ' . $GLOBALS['xoopsDB']->prefix('newbb_type_tmp'));
53
+    $GLOBALS['xoopsDB']->queryF('DROP TABLE '.$GLOBALS['xoopsDB']->prefix('newbb_type_tmp'));
54 54
     exit('Can not create tmp table for `bb_type_forum_tmp`');
55 55
 }
56 56
 
@@ -61,10 +61,10 @@  discard block
 block discarded – undo
61 61
 foreach ($subjectpres as $subjectpre) {
62 62
     if (preg_match("/<[^#]*color=[\"'](#[^'\"\s]*)[^>]>[\[]?([^<\]]*)[\]]?/is", $subjectpre, $matches)) {
63 63
         if (!$GLOBALS['xoopsDB']->queryF('
64
-                INSERT INTO ' . $GLOBALS['xoopsDB']->prefix('newbb_type_tmp') . '
64
+                INSERT INTO ' . $GLOBALS['xoopsDB']->prefix('newbb_type_tmp').'
65 65
                     (`type_name`, `type_color`)
66 66
                 VALUES
67
-                    (' . $GLOBALS['xoopsDB']->quoteString($matches[2]) . ', ' . $GLOBALS['xoopsDB']->quoteString($matches[1]) . ')
67
+                    (' . $GLOBALS['xoopsDB']->quoteString($matches[2]).', '.$GLOBALS['xoopsDB']->quoteString($matches[1]).')
68 68
             ')) {
69 69
             xoops_error("Can not add type of `{$matches[2]}`");
70 70
             continue;
@@ -73,8 +73,8 @@  discard block
 block discarded – undo
73 73
     }
74 74
 }
75 75
 if (0 === count($types)) {
76
-    $GLOBALS['xoopsDB']->queryF('DROP TABLE ' . $GLOBALS['xoopsDB']->prefix('newbb_type_tmp'));
77
-    $GLOBALS['xoopsDB']->queryF('DROP TABLE ' . $GLOBALS['xoopsDB']->prefix('newbb_type_forum_tmp'));
76
+    $GLOBALS['xoopsDB']->queryF('DROP TABLE '.$GLOBALS['xoopsDB']->prefix('newbb_type_tmp'));
77
+    $GLOBALS['xoopsDB']->queryF('DROP TABLE '.$GLOBALS['xoopsDB']->prefix('newbb_type_forum_tmp'));
78 78
     exit('No type item created');
79 79
 }
80 80
 
@@ -87,14 +87,14 @@  discard block
 block discarded – undo
87 87
             $type_query[] = "({$key}, {$forum_id}, {$order})";
88 88
         }
89 89
 
90
-        $sql = 'INSERT INTO ' . $GLOBALS['xoopsDB']->prefix('newbb_type_forum_tmp') . ' (type_id, forum_id, type_order) ' . ' VALUES ' . implode(', ', $type_query);
90
+        $sql = 'INSERT INTO '.$GLOBALS['xoopsDB']->prefix('newbb_type_forum_tmp').' (type_id, forum_id, type_order) '.' VALUES '.implode(', ', $type_query);
91 91
         if (false === ($result = $GLOBALS['xoopsDB']->queryF($sql))) {
92 92
             xoops_error($GLOBALS['xoopsDB']->error());
93 93
         }
94 94
     }
95 95
 } else {
96
-    $GLOBALS['xoopsDB']->queryF('DROP TABLE ' . $GLOBALS['xoopsDB']->prefix('newbb_type_tmp'));
97
-    $GLOBALS['xoopsDB']->queryF('DROP TABLE ' . $GLOBALS['xoopsDB']->prefix('newbb_type_forum_tmp'));
96
+    $GLOBALS['xoopsDB']->queryF('DROP TABLE '.$GLOBALS['xoopsDB']->prefix('newbb_type_tmp'));
97
+    $GLOBALS['xoopsDB']->queryF('DROP TABLE '.$GLOBALS['xoopsDB']->prefix('newbb_type_forum_tmp'));
98 98
     exit('No type item to update');
99 99
 }
100 100
 
Please login to merge, or discard this patch.
votepolls.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 use Xmf\Request;
29 29
 use XoopsModules\Xoopspoll;
30 30
 
31
-require_once __DIR__ . '/header.php';
31
+require_once __DIR__.'/header.php';
32 32
 $poll_id  = Request::getInt('poll_id', Request::getInt('poll_id', 0, 'POST'), 'GET');
33 33
 $topic_id = Request::getInt('topic_id', Request::getInt('topic_id', 0, 'POST'), 'GET');
34 34
 $forum    = Request::getInt('forum', Request::getInt('forum', 0, 'POST'), 'GET');
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 
43 43
 if (!Request::getInt('option_id', 0, 'POST')) {
44 44
     // irmtfan - add error message - simple url
45
-    redirect_header(XOOPS_URL . "/modules/newbb/viewtopic.php?topic_id={$topic_id}", 1, _MD_NEWBB_POLL_NOOPTION);
45
+    redirect_header(XOOPS_URL."/modules/newbb/viewtopic.php?topic_id={$topic_id}", 1, _MD_NEWBB_POLL_NOOPTION);
46 46
 }
47 47
 // poll module
48 48
 $pollModuleHandler = $moduleHandler->getByDirname($GLOBALS['xoopsModuleConfig']['poll_module']);
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
         $pollObject = $xpPollHandler->get($poll_id); // will create poll if poll_id = 0 exist
61 61
         // old xoopspoll or umfrage or any clone from them
62 62
     } else {
63
-        include $GLOBALS['xoops']->path('modules/' . $GLOBALS['xoopsModuleConfig']['poll_module'] . '/include/constants.php');
63
+        include $GLOBALS['xoops']->path('modules/'.$GLOBALS['xoopsModuleConfig']['poll_module'].'/include/constants.php');
64 64
         $classPoll  = $topicObject->loadOldPoll();
65 65
         $pollObject = new $classPoll($poll_id); // will create poll if poll_id = 0 exist
66 66
     }
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
             $optionId = Request::getInt('option_id', 0, 'POST');
82 82
         }
83 83
         if (!$pollObject->hasExpired()) {
84
-            $msg = constant('_MD_' . strtoupper($GLOBALS['xoopsModuleConfig']['poll_module']) . '_MUSTLOGIN');
84
+            $msg = constant('_MD_'.strtoupper($GLOBALS['xoopsModuleConfig']['poll_module']).'_MUSTLOGIN');
85 85
             //@todo:: add $url to all redirects
86 86
             //            $url = $GLOBALS['xoops']->buildUrl("index.php", array('poll_id' => $poll_id));
87 87
             if ($pollObject->isAllowedToVote()) {
@@ -95,13 +95,13 @@  discard block
 block discarded – undo
95 95
                             echo $pollObject->getHtmlErrors();
96 96
                             exit();
97 97
                         }
98
-                        $msg = constant('_MD_' . strtoupper($GLOBALS['xoopsModuleConfig']['poll_module']) . '_THANKSFORVOTE');
98
+                        $msg = constant('_MD_'.strtoupper($GLOBALS['xoopsModuleConfig']['poll_module']).'_THANKSFORVOTE');
99 99
                     } else {
100 100
                         /* there was a problem registering the vote */
101
-                        redirect_header($GLOBALS['xoops']->buildUrl('index.php', ['poll_id' => $poll_id]), $classConstants::REDIRECT_DELAY_MEDIUM, constant('_MD_' . strtoupper($GLOBALS['xoopsModuleConfig']['poll_module']) . '_VOTE_ERROR'));
101
+                        redirect_header($GLOBALS['xoops']->buildUrl('index.php', ['poll_id' => $poll_id]), $classConstants::REDIRECT_DELAY_MEDIUM, constant('_MD_'.strtoupper($GLOBALS['xoopsModuleConfig']['poll_module']).'_VOTE_ERROR'));
102 102
                     }
103 103
                 } else {
104
-                    $msg = constant('_MD_' . strtoupper($GLOBALS['xoopsModuleConfig']['poll_module']) . '_ALREADYVOTED');
104
+                    $msg = constant('_MD_'.strtoupper($GLOBALS['xoopsModuleConfig']['poll_module']).'_ALREADYVOTED');
105 105
                 }
106 106
                 /* set anon user vote (and the time they voted) */
107 107
                 if (!is_object($GLOBALS['xoopsUser'])) {
@@ -111,14 +111,14 @@  discard block
 block discarded – undo
111 111
                     $classPollUtility::setVoteCookie($poll_id, $voteTime, 0);
112 112
                 }
113 113
             } else {
114
-                $msg = constant('_MD_' . strtoupper($GLOBALS['xoopsModuleConfig']['poll_module']) . '_CANNOTVOTE');
114
+                $msg = constant('_MD_'.strtoupper($GLOBALS['xoopsModuleConfig']['poll_module']).'_CANNOTVOTE');
115 115
             }
116 116
         } else {
117 117
             /* poll has expired so just show the results */
118
-            $msg = constant('_MD_' . strtoupper($GLOBALS['xoopsModuleConfig']['poll_module']) . 'SORRYEXPIRED');
118
+            $msg = constant('_MD_'.strtoupper($GLOBALS['xoopsModuleConfig']['poll_module']).'SORRYEXPIRED');
119 119
         }
120 120
     } else {
121
-        $msg = constant('_MD_' . strtoupper($GLOBALS['xoopsModuleConfig']['poll_module']) . '_ERROR_INVALID_POLLID');
121
+        $msg = constant('_MD_'.strtoupper($GLOBALS['xoopsModuleConfig']['poll_module']).'_ERROR_INVALID_POLLID');
122 122
     }
123 123
     if (null !== $url) {
124 124
         redirect_header($url, $classConstants::REDIRECT_DELAY_MEDIUM, $msg);
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
     }
128 128
     // old xoopspoll or umfrage or any clone from them
129 129
 } else {
130
-    $classLog = $classPoll . 'Log';
130
+    $classLog = $classPoll.'Log';
131 131
     if (is_object($GLOBALS['xoopsUser'])) {
132 132
         if ($classLog::hasVoted($poll_id, Request::getString('REMOTE_ADDR', '', 'SERVER'), $GLOBALS['xoopsUser']->getVar('uid'))) {
133 133
             $msg = _PL_ALREADYVOTED;
Please login to merge, or discard this patch.
footer.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -25,23 +25,23 @@
 block discarded – undo
25 25
 require_once $GLOBALS['xoops']->path('modules/newbb/include/functions.render.php');
26 26
 $iconHandler = newbbGetIconHandler();
27 27
 //  get css rel path from setted language
28
-$css_rel_path = $iconHandler->getPath('language/' . $GLOBALS['xoopsConfig']['language'], 'newbb', 'language/english', 'css');
28
+$css_rel_path = $iconHandler->getPath('language/'.$GLOBALS['xoopsConfig']['language'], 'newbb', 'language/english', 'css');
29 29
 // add local stylesheet
30 30
 /** @var xos_opal_Theme $xoTheme */
31
-$xoTheme->addStylesheet($css_rel_path . '/style.css');
31
+$xoTheme->addStylesheet($css_rel_path.'/style.css');
32 32
 
33 33
 //  get js rel path from setted language
34
-$js_rel_path = $iconHandler->getPath('language/' . $GLOBALS['xoopsConfig']['language'], 'newbb', 'language/english', 'js');
34
+$js_rel_path = $iconHandler->getPath('language/'.$GLOBALS['xoopsConfig']['language'], 'newbb', 'language/english', 'js');
35 35
 // add all local js files inside js directory
36 36
 xoops_load('XoopsLists');
37 37
 $allfiles = \XoopsLists::getFileListAsArray($GLOBALS['xoops']->path($js_rel_path));
38 38
 foreach ($allfiles as $jsfile) {
39 39
     if ('js' === strtolower(pathinfo($jsfile, PATHINFO_EXTENSION))) {
40
-        $xoTheme->addScript($js_rel_path . '/' . $jsfile);
40
+        $xoTheme->addScript($js_rel_path.'/'.$jsfile);
41 41
     }
42 42
 }
43
-global $forumCookie;  // for $forumCookie["prefix"] revert last change - use global instead of include_once
43
+global $forumCookie; // for $forumCookie["prefix"] revert last change - use global instead of include_once
44 44
 // add toggle script
45 45
 //$toggle_script = "var toggle_cookie=\"" . $forumCookie['prefix'] . 'G' . '\';';
46
-$toggle_script = 'var toggle_cookie="' . $forumCookie['prefix'] . 'G";';
46
+$toggle_script = 'var toggle_cookie="'.$forumCookie['prefix'].'G";';
47 47
 $xoTheme->addScript(null, ['type' => 'text/javascript'], $toggle_script);
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));
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));
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.
newtopic.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -11,17 +11,17 @@  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 (!$forum = Request::getString('forum', '', '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 19
 
20 20
 ///** @var Newbb\ForumHandler $forumHandler */
21 21
 //$forumHandler = Newbb\Helper::getInstance()->getHandler('Forum');
22 22
 $forumObject = $forumHandler->get($forum);
23 23
 if (!$forumHandler->getPermission($forumObject)) {
24
-    redirect_header(XOOPS_URL . '/index.php', 2, _NOPERM);
24
+    redirect_header(XOOPS_URL.'/index.php', 2, _NOPERM);
25 25
 }
26 26
 
27 27
 ///** @var Newbb\TopicHandler $topicHandler */
@@ -36,12 +36,12 @@  discard block
 block discarded – undo
36 36
     $query_array = [];
37 37
     foreach ($query_vars as $var) {
38 38
         if (Request::getString($var, '', 'GET')) {
39
-            $query_array[$var] = "{$var}=" . Request::getString($var, '', 'GET');
39
+            $query_array[$var] = "{$var}=".Request::getString($var, '', 'GET');
40 40
         }
41 41
     }
42 42
     $page_query = htmlspecialchars(implode('&', array_values($query_array)));
43 43
     unset($query_array);
44
-    redirect_header(XOOPS_URL . "/modules/newbb/viewforum.php?{$page_query}", 2, _MD_NEWBB_NORIGHTTOPOST);
44
+    redirect_header(XOOPS_URL."/modules/newbb/viewforum.php?{$page_query}", 2, _MD_NEWBB_NORIGHTTOPOST);
45 45
 }
46 46
 
47 47
 if ($GLOBALS['xoopsModuleConfig']['wol_enabled']) {
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 $attachsig     = (is_object($GLOBALS['xoopsUser']) && $GLOBALS['xoopsUser']->getVar('attachsig')) ? 1 : 0;
71 71
 $post_id       = 0;
72 72
 $topic_id      = 0;
73
-include __DIR__ . '/include/form.post.php';
73
+include __DIR__.'/include/form.post.php';
74 74
 
75
-require_once __DIR__ . '/footer.php';
75
+require_once __DIR__.'/footer.php';
76 76
 include $GLOBALS['xoops']->path('footer.php');
Please login to merge, or discard this patch.
dl_attachment.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -13,14 +13,14 @@  discard block
 block discarded – undo
13 13
 use XoopsModules\Newbb;
14 14
 
15 15
 ob_start();
16
-require_once __DIR__ . '/header.php';
16
+require_once __DIR__.'/header.php';
17 17
 include $GLOBALS['xoops']->path('header.php');
18 18
 
19 19
 $attach_id = Request::getInt('attachid', 0, 'GET');
20 20
 $post_id   = Request::getInt('post_id', 0, 'GET');
21 21
 
22 22
 if (!$post_id || !$attach_id) {
23
-    exit(_MD_NEWBB_NO_SUCH_FILE . ': post_id:' . $post_id . '; attachid' . $attachid);
23
+    exit(_MD_NEWBB_NO_SUCH_FILE.': post_id:'.$post_id.'; attachid'.$attachid);
24 24
 }
25 25
 
26 26
 ///** @var Newbb\PostHandler $postHandler */
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 if (!$attach) {
54 54
     exit(_MD_NEWBB_NO_SUCH_FILE);
55 55
 }
56
-$file_saved = $GLOBALS['xoops']->path($GLOBALS['xoopsModuleConfig']['dir_attachments'] . '/' . $attach['name_saved']);
56
+$file_saved = $GLOBALS['xoops']->path($GLOBALS['xoopsModuleConfig']['dir_attachments'].'/'.$attach['name_saved']);
57 57
 if (!file_exists($file_saved)) {
58 58
     exit(_MD_NEWBB_NO_SUCH_FILE);
59 59
 }
@@ -70,8 +70,8 @@  discard block
 block discarded – undo
70 70
     header('Cache-Control: post-check=0, pre-check=0', false);
71 71
     header('Pragma: no-cache');
72 72
     header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
73
-    header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
74
-    header('location: ' . XOOPS_URL . '/' . $GLOBALS['xoopsModuleConfig']['dir_attachments'] . '/' . $attach['name_saved']);
73
+    header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
74
+    header('location: '.XOOPS_URL.'/'.$GLOBALS['xoopsModuleConfig']['dir_attachments'].'/'.$attach['name_saved']);
75 75
 } else {
76 76
     $file_display = $attach['nameDisplay'];
77 77
     //$mimetype = $attach['mimetype'];
@@ -87,11 +87,11 @@  discard block
 block discarded – undo
87 87
     //header('Content-Type: '.$mimetype);
88 88
     header('Content-Type: application/octet-stream');
89 89
     if (preg_match("/MSIE (\d\.\d{1,2})/", Request::getString('HTTP_USER_AGENT', '', 'SERVER'))) {
90
-        header('Content-Disposition: attachment; filename="' . $file_display . '"');
90
+        header('Content-Disposition: attachment; filename="'.$file_display.'"');
91 91
         header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
92 92
         header('Pragma: public');
93 93
     } else {
94
-        header('Content-Disposition: attachment; filename="' . $file_display . '"');
94
+        header('Content-Disposition: attachment; filename="'.$file_display.'"');
95 95
         header('Pragma: no-cache');
96 96
     }
97 97
     header('Content-Type: application/force-download');
Please login to merge, or discard this patch.
delete.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  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
 $ok = Request::getInt('ok', 0, 'POST');
17 17
 
@@ -43,15 +43,15 @@  discard block
 block discarded – undo
43 43
 }
44 44
 $topic_id = $topic->getVar('topic_id');
45 45
 if (!$topic_id) {
46
-    $redirect = empty($forum) ? 'index.php' : 'viewforum.php?forum=' . $forum;
47
-    $redirect = XOOPS_URL . '/modules/newbb/' . $redirect;
46
+    $redirect = empty($forum) ? 'index.php' : 'viewforum.php?forum='.$forum;
47
+    $redirect = XOOPS_URL.'/modules/newbb/'.$redirect;
48 48
     redirect_header($redirect, 2, _MD_NEWBB_ERRORTOPIC);
49 49
 }
50 50
 
51 51
 $forum       = $topic->getVar('forum_id');
52 52
 $forumObject = $forumHandler->get($forum);
53 53
 if (!$forumHandler->getPermission($forumObject)) {
54
-    redirect_header(XOOPS_URL . '/index.php', 2, _MD_NEWBB_NORIGHTTOACCESS);
54
+    redirect_header(XOOPS_URL.'/index.php', 2, _MD_NEWBB_NORIGHTTOACCESS);
55 55
 }
56 56
 
57 57
 $isAdmin = newbbIsAdmin($forumObject);
@@ -62,11 +62,11 @@  discard block
 block discarded – undo
62 62
 $topic_status = $topic->getVar('topic_status');
63 63
 if (($postObject->checkIdentity() || $isAdmin) && $topicHandler->getPermission($topic->getVar('forum_id'), $topic_status, 'delete')) {
64 64
 } else {
65
-    redirect_header(XOOPS_URL . "/modules/newbb/viewtopic.php?topic_id=$topic_id&amp;pid=$pid&amp;forum=$forum", 2, _MD_NEWBB_DELNOTALLOWED);
65
+    redirect_header(XOOPS_URL."/modules/newbb/viewtopic.php?topic_id=$topic_id&amp;pid=$pid&amp;forum=$forum", 2, _MD_NEWBB_DELNOTALLOWED);
66 66
 }
67 67
 
68 68
 if (!$isAdmin && !$postObject->checkTimelimit('delete_timelimit')) {
69
-    redirect_header(XOOPS_URL . "/modules/newbb/viewtopic.php?forum=$forum&amp;topic_id=$topic_id&amp;post_id=$post_id&amp;pid=$pid", 2, _MD_NEWBB_TIMEISUPDEL);
69
+    redirect_header(XOOPS_URL."/modules/newbb/viewtopic.php?forum=$forum&amp;topic_id=$topic_id&amp;post_id=$post_id&amp;pid=$pid", 2, _MD_NEWBB_TIMEISUPDEL);
70 70
 }
71 71
 
72 72
 if ($GLOBALS['xoopsModuleConfig']['wol_enabled']) {
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
     }
83 83
     if ($isDeleteOne && $postObject->isTopic() && $topic->getVar('topic_replies') > 0) {
84 84
         //$postHandler->emptyTopic($postObject);
85
-        redirect_header(XOOPS_URL . "/modules/newbb/viewtopic.php?topic_id=$topic_id&amp;pid=$pid&amp;forum=$forum", 2, _MD_NEWBB_POSTFIRSTWITHREPLYNODELETED);
85
+        redirect_header(XOOPS_URL."/modules/newbb/viewtopic.php?topic_id=$topic_id&amp;pid=$pid&amp;forum=$forum", 2, _MD_NEWBB_POSTFIRSTWITHREPLYNODELETED);
86 86
     } else {
87 87
         if (Request::getString('post_text', '', 'POST')) {
88 88
             //send a message
@@ -101,11 +101,11 @@  discard block
 block discarded – undo
101 101
                 $xoopsMailer->setToUsers($senduser);
102 102
                 $xoopsMailer->setFromName($GLOBALS['xoopsUser']->getVar('uname'));
103 103
                 $xoopsMailer->setSubject(_MD_NEWBB_DELEDEDMSG_SUBJECT);
104
-                $forenurl = '<a href="' . XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/viewtopic.php?topic_id=' . $postObject->getVar('topic_id') . '">' . $postObject->getVar('subject') . '</a>';
104
+                $forenurl = '<a href="'.XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/viewtopic.php?topic_id='.$postObject->getVar('topic_id').'">'.$postObject->getVar('subject').'</a>';
105 105
                 if (!empty($GLOBALS['xoopsModuleConfig']['do_rewrite'])) {
106 106
                     $forenurl = seo_urls($forenurl);
107 107
                 }
108
-                $body = sprintf(_MD_NEWBB_DELEDEDMSG_BODY, $senduser->getVar('uname'), $forenurl, Request::getString('post_text', '', 'POST'), $GLOBALS['xoopsUser']->getVar('uname'), $GLOBALS['xoopsConfig']['sitename'], XOOPS_URL . '/');
108
+                $body = sprintf(_MD_NEWBB_DELEDEDMSG_BODY, $senduser->getVar('uname'), $forenurl, Request::getString('post_text', '', 'POST'), $GLOBALS['xoopsUser']->getVar('uname'), $GLOBALS['xoopsConfig']['sitename'], XOOPS_URL.'/');
109 109
                 $body = $myts->nl2Br($body);
110 110
                 $xoopsMailer->setBody($body);
111 111
                 $xoopsMailer->send();
@@ -121,25 +121,25 @@  discard block
 block discarded – undo
121 121
 
122 122
     //$postObject->loadFilters('delete');
123 123
     if ($isDeleteOne) {
124
-        redirect_header(XOOPS_URL . "/modules/newbb/viewtopic.php?topic_id=$topic_id&amp;order=$order&amp;viewmode=$viewmode&amp;pid=$pid&amp;forum=$forum", 2, _MD_NEWBB_POSTDELETED);
124
+        redirect_header(XOOPS_URL."/modules/newbb/viewtopic.php?topic_id=$topic_id&amp;order=$order&amp;viewmode=$viewmode&amp;pid=$pid&amp;forum=$forum", 2, _MD_NEWBB_POSTDELETED);
125 125
     } else {
126
-        redirect_header(XOOPS_URL . "/modules/newbb/viewforum.php?forum=$forum", 2, _MD_NEWBB_POSTSDELETED);
126
+        redirect_header(XOOPS_URL."/modules/newbb/viewforum.php?forum=$forum", 2, _MD_NEWBB_POSTSDELETED);
127 127
     }
128 128
 } else {
129 129
     include $GLOBALS['xoops']->path('header.php');
130 130
     //xoops_confirm(array('post_id' => $post_id, 'viewmode' => $viewmode, 'order' => $order, 'forum' => $forum, 'topic_id' => $topic_id, 'ok' => 1), 'delete.php', _MD_NEWBB_DEL_ONE);
131
-    echo '<div class="confirmMsg">' . _MD_NEWBB_DEL_ONE . '<br>
132
-          <form method="post" action="' . XOOPS_URL . '/modules/newbb/delete.php">';
133
-    echo _MD_NEWBB_DELEDEDMSG . '<br>';
131
+    echo '<div class="confirmMsg">'._MD_NEWBB_DEL_ONE.'<br>
132
+          <form method="post" action="' . XOOPS_URL.'/modules/newbb/delete.php">';
133
+    echo _MD_NEWBB_DELEDEDMSG.'<br>';
134 134
     echo '<textarea name="post_text" cols="50" rows="5"></textarea><br>';
135
-    echo '<input type="hidden" name="post_id" value="' . htmlspecialchars($post_id) . '" />';
136
-    echo '<input type="hidden" name="order" value="' . htmlspecialchars($order) . '" />';
137
-    echo '<input type="hidden" name="forum" value="' . htmlspecialchars($forum) . '" />';
138
-    echo '<input type="hidden" name="topic_id" value="' . htmlspecialchars($topic_id) . '" />';
135
+    echo '<input type="hidden" name="post_id" value="'.htmlspecialchars($post_id).'" />';
136
+    echo '<input type="hidden" name="order" value="'.htmlspecialchars($order).'" />';
137
+    echo '<input type="hidden" name="forum" value="'.htmlspecialchars($forum).'" />';
138
+    echo '<input type="hidden" name="topic_id" value="'.htmlspecialchars($topic_id).'" />';
139 139
     echo '<input type="hidden" name="ok" value="1" />';
140 140
     echo $GLOBALS['xoopsSecurity']->getTokenHTML();
141
-    echo '<input type="submit" name="confirm_submit" value="' . _SUBMIT . '" title="' . _SUBMIT . '"/>
142
-          <input type="button" name="confirm_back" value="' . _CANCEL . '" onclick="history.go(-1);" title="' . _CANCEL . '" />
141
+    echo '<input type="submit" name="confirm_submit" value="'._SUBMIT.'" title="'._SUBMIT.'"/>
142
+          <input type="button" name="confirm_back" value="' . _CANCEL.'" onclick="history.go(-1);" title="'._CANCEL.'" />
143 143
           </form>
144 144
           </div>';
145 145
     if ($isAdmin) {
Please login to merge, or discard this patch.
moderate.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  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
 global $xoTheme, $xoopsTpl;
17 17
 $GLOBALS['xoopsOption']['template_main'] = 'newbb_moderate.tpl';
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 $forum_id     = Request::getInt('forum', 0);
22 22
 $isAdmin      = newbbIsAdmin($forum_id);
23 23
 if (!$isAdmin) {
24
-    redirect_header(XOOPS_URL . '/index.php', 2, _MD_NEWBB_NORIGHTTOACCESS);
24
+    redirect_header(XOOPS_URL.'/index.php', 2, _MD_NEWBB_NORIGHTTOACCESS);
25 25
 }
26 26
 $is_administrator = $GLOBALS['xoopsUserIsAdmin'];
27 27
 ///** @var Newbb\ModerateHandler $moderateHandler */
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
             $ipWithMask = $ip->asReadable();
41 41
             $mask       = empty($ipParts[1]) ? 0 : (int)$ipParts[1];
42 42
             $mask       = ($mask > ((4 === $ip->ipVersion()) ? 32 : 128) || $mask < 8) ? '' : $mask;
43
-            $ipWithMask .= empty($mask) ? '' : '/' . $mask;
43
+            $ipWithMask .= empty($mask) ? '' : '/'.$mask;
44 44
         }
45 45
     }
46 46
 
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 
101 101
 $url = 'moderate.php';
102 102
 if ($forum_id) {
103
-    $url .= '?forum=' . $forum_id;
103
+    $url .= '?forum='.$forum_id;
104 104
 }
105 105
 $xoopsTpl->assign('moderate_url', $url);
106 106
 
@@ -111,27 +111,27 @@  discard block
 block discarded – undo
111 111
     }
112 112
     $users = newbbGetUnameFromIds(array_keys($_users), $GLOBALS['xoopsModuleConfig']['show_realname'], true);
113 113
 
114
-    $columnHeaders ['uid']    = [
115
-        'url'    => 'moderate.php?forum=' . $forum_id . '&amp;start=' . $start . '&amp;sort=uid',
114
+    $columnHeaders ['uid'] = [
115
+        'url'    => 'moderate.php?forum='.$forum_id.'&amp;start='.$start.'&amp;sort=uid',
116 116
         'header' => _MD_NEWBB_SUSPEND_UID,
117 117
         'title'  => _MD_NEWBB_SUSPEND_UID,
118 118
     ];
119
-    $columnHeaders ['start']  = [
120
-        'url'    => 'moderate.php?forum=' . $forum_id . '&amp;start=' . $start . '&amp;sort=start',
119
+    $columnHeaders ['start'] = [
120
+        'url'    => 'moderate.php?forum='.$forum_id.'&amp;start='.$start.'&amp;sort=start',
121 121
         'header' => _MD_NEWBB_SUSPEND_START,
122 122
         'title'  => _MD_NEWBB_SUSPEND_START,
123 123
     ];
124
-    $columnHeaders['expire']  = [
125
-        'url'    => 'moderate.php?forum=' . $forum_id . '&amp;start=' . $start . '&amp;sort=expire',
124
+    $columnHeaders['expire'] = [
125
+        'url'    => 'moderate.php?forum='.$forum_id.'&amp;start='.$start.'&amp;sort=expire',
126 126
         'header' => _MD_NEWBB_SUSPEND_EXPIRE,
127 127
         'title'  => _MD_NEWBB_SUSPEND_EXPIRE,
128 128
     ];
129
-    $columnHeaders['forum']   = [
130
-        'url'    => 'moderate.php?forum=' . $forum_id . '&amp;start=' . $start . '&amp;sort=forum',
129
+    $columnHeaders['forum'] = [
130
+        'url'    => 'moderate.php?forum='.$forum_id.'&amp;start='.$start.'&amp;sort=forum',
131 131
         'header' => _MD_NEWBB_SUSPEND_SCOPE,
132 132
         'title'  => _MD_NEWBB_SUSPEND_SCOPE,
133 133
     ];
134
-    $columnHeaders['desc']    = [
134
+    $columnHeaders['desc'] = [
135 135
         'url'    => false,
136 136
         'header' => _MD_NEWBB_SUSPEND_DESC,
137 137
         'title'  => _MD_NEWBB_SUSPEND_DESC,
@@ -156,14 +156,14 @@  discard block
 block discarded – undo
156 156
         $row['forum']   = ($moderateObjects[$id]->getVar('forum_id') ? $forum_list[$moderateObjects[$id]->getVar('forum_id')]['forum_name'] : _ALL);
157 157
         $row['desc']    = ($moderateObjects[$id]->getVar('mod_desc') ?: _NONE);
158 158
         $row['options'] = (($is_administrator
159
-                            || $moderateObjects[$id]->getVar('forum_id') == $forum_id) ? '<a href="moderate.php?forum=' . $forum_id . '&amp;del=' . $moderateObjects[$id]->getVar('mod_id') . '">' . _DELETE . '</a>' : '');
159
+                            || $moderateObjects[$id]->getVar('forum_id') == $forum_id) ? '<a href="moderate.php?forum='.$forum_id.'&amp;del='.$moderateObjects[$id]->getVar('mod_id').'">'._DELETE.'</a>' : '');
160 160
         $columnRows[]   = $row;
161 161
     }
162 162
     $xoopsTpl->assign('columnRows', $columnRows);
163 163
 
164 164
     if ($moderate_count > $GLOBALS['xoopsModuleConfig']['topics_per_page']) {
165 165
         include $GLOBALS['xoops']->path('class/pagenav.php');
166
-        $nav = new \XoopsPageNav($moderate_count, $GLOBALS['xoopsModuleConfig']['topics_per_page'], $start, 'start', 'forum=' . $forum_id . '&amp;sort=' . $sortname);
166
+        $nav = new \XoopsPageNav($moderate_count, $GLOBALS['xoopsModuleConfig']['topics_per_page'], $start, 'start', 'forum='.$forum_id.'&amp;sort='.$sortname);
167 167
         //if (isset($GLOBALS['xoopsModuleConfig']['do_rewrite'])) {
168 168
         //    $nav->url = formatURL(Request::getString('SERVER_NAME', '', 'SERVER')) . ' /' . $nav->url;
169 169
         //}
@@ -177,14 +177,14 @@  discard block
 block discarded – undo
177 177
 $forum_form->addElement(new \XoopsFormText(_MD_NEWBB_SUSPEND_IP, 'ip', 50, 50));
178 178
 $forum_form->addElement(new \XoopsFormText(_MD_NEWBB_SUSPEND_DURATION, 'expire', 20, 25, '5'), true);
179 179
 $forum_form->addElement(new \XoopsFormText(_MD_NEWBB_SUSPEND_DESC, 'desc', 50, 255));
180
-require_once __DIR__ . '/include/functions.forum.php';
180
+require_once __DIR__.'/include/functions.forum.php';
181 181
 if (newbbIsAdmin()) {
182
-    $forumSel = '<select name="forum">';// if user doesn't select, default is "0" all forums
182
+    $forumSel = '<select name="forum">'; // if user doesn't select, default is "0" all forums
183 183
     $forumSel .= '<option value="0"';
184 184
     if (0 == $forum_id) {
185 185
         $forumSel .= ' selected';
186 186
     }
187
-    $forumSel                         .= '>' . _ALL . '</option>';
187
+    $forumSel                         .= '>'._ALL.'</option>';
188 188
     $forumSel                         .= newbbForumSelectBox($forum_id, 'access', false); //$accessForums, $permission = "access", $delimitorCategory = true
189 189
     $forumSel                         .= '</select>';
190 190
     $forumEle                         = new \XoopsFormLabel(_MD_NEWBB_SELFORUM, $forumSel);
@@ -196,5 +196,5 @@  discard block
 block discarded – undo
196 196
 $forum_form->addElement(new \XoopsFormButton('', 'submit', _SUBMIT, 'submit'));
197 197
 $forum_form->assign($xoopsTpl);
198 198
 
199
-require_once __DIR__ . '/footer.php';
199
+require_once __DIR__.'/footer.php';
200 200
 include $GLOBALS['xoops']->path('footer.php');
Please login to merge, or discard this patch.
print.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
  *
41 41
  */
42 42
 
43
-require_once __DIR__ . '/header.php';
43
+require_once __DIR__.'/header.php';
44 44
 
45 45
 error_reporting(0);
46 46
 $xoopsLogger->activated = false;
@@ -65,9 +65,9 @@  discard block
 block discarded – undo
65 65
         $topic_id         = $post->getVar('topic_id');
66 66
         $post_data        = $postHandler->getPostForPrint($post);
67 67
         $isPost           = 1;
68
-        $post_data['url'] = XOOPS_URL . '/modules/newbb/viewtopic.php?post_id=' . $post_id;
68
+        $post_data['url'] = XOOPS_URL.'/modules/newbb/viewtopic.php?post_id='.$post_id;
69 69
         if (!empty($GLOBALS['xoopsModuleConfig']['do_rewrite'])) {
70
-            $post_data['url'] = seo_urls('<a href="' . $post_data['url'] . '"></a>');
70
+            $post_data['url'] = seo_urls('<a href="'.$post_data['url'].'"></a>');
71 71
             $post_data['url'] = str_replace('<a href="', '', $post_data['url']);
72 72
             $post_data['url'] = str_replace('"></a>', '', $post_data['url']);
73 73
         }
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
     echo "</head><body style='background-color:#ffffff; color:#000000;' onload='window.print()'>
114 114
             <div style='width: 750px; border: 1px solid #000; padding: 20px;'>
115 115
             <div style='text-align: center; display: block; margin: 0 0 6px 0;'>
116
-            <img src='" . XOOPS_URL . "/modules/newbb/assets/images/xoopsbb_slogo.png' border='0' alt='' />
116
+            <img src='" . XOOPS_URL."/modules/newbb/assets/images/xoopsbb_slogo.png' border='0' alt='' />
117 117
             <br><br> ";
118 118
 
119 119
     $postsArray = $topicHandler->getAllPosts($topicObject);
@@ -122,25 +122,25 @@  discard block
 block discarded – undo
122 122
             continue;
123 123
         }
124 124
         $post_data = $postHandler->getPostForPrint($post);
125
-        echo "<h2 style='margin: 0;'>" . $post_data['subject'] . "</h2>
126
-              <div align='center'>" . _POSTEDBY . '&nbsp;' . $post_data['author'] . '&nbsp;' . _ON . '&nbsp;' . formatTimestamp($post_data['date']) . "</div>
125
+        echo "<h2 style='margin: 0;'>".$post_data['subject']."</h2>
126
+              <div align='center'>" . _POSTEDBY.'&nbsp;'.$post_data['author'].'&nbsp;'._ON.'&nbsp;'.formatTimestamp($post_data['date'])."</div>
127 127
               <div style='text-align: center; display: block; padding-bottom: 12px; margin: 0 0 6px 0; border-bottom: 2px solid #ccc;'></div>
128
-               <div>" . $post_data['text'] . "</div>
128
+               <div>" . $post_data['text']."</div>
129 129
               <div style='padding-top: 12px; border-top: 2px solid #ccc;'></div><br>";
130 130
     }
131
-    echo '<p>' . _MD_NEWBB_COMEFROM . '&nbsp;' . XOOPS_URL . '/newbb/viewtopic.php?forum=' . $forum_id . '&amp;topic_id=' . $topic_id . '</p>';
131
+    echo '<p>'._MD_NEWBB_COMEFROM.'&nbsp;'.XOOPS_URL.'/newbb/viewtopic.php?forum='.$forum_id.'&amp;topic_id='.$topic_id.'</p>';
132 132
     echo '</div></div>';
133 133
     echo '</body></html>';
134 134
 } else {
135 135
     echo "</head><body style='background-color:#ffffff; color:#000000;' onload='window.print()'>
136 136
             <div style='width: 750px; border: 1px solid #000; padding: 20px;'>
137 137
             <div style='text-align: center; display: block; margin: 0 0 6px 0;'>
138
-            <h2 style='margin: 0;'>" . $post_data['subject'] . "</h2></div>
139
-            <div align='center'>" . _POSTEDBY . '&nbsp;' . $post_data['author'] . '&nbsp;' . _ON . '&nbsp;' . formatTimestamp($post_data['date']) . "</div>
138
+            <h2 style='margin: 0;'>" . $post_data['subject']."</h2></div>
139
+            <div align='center'>" . _POSTEDBY.'&nbsp;'.$post_data['author'].'&nbsp;'._ON.'&nbsp;'.formatTimestamp($post_data['date'])."</div>
140 140
             <div style='text-align: center; display: block; padding-bottom: 12px; margin: 0 0 6px 0; border-bottom: 2px solid #ccc;'></div>
141
-            <div>" . $post_data['text'] . "</div>
141
+            <div>" . $post_data['text']."</div>
142 142
             <div style='padding-top: 12px; border-top: 2px solid #ccc;'></div>
143
-            <p>" . _MD_NEWBB_COMEFROM . '&nbsp;' . $post_data['url'] . '</p>
143
+            <p>" . _MD_NEWBB_COMEFROM.'&nbsp;'.$post_data['url'].'</p>
144 144
             </div>
145 145
             <br><br></body></html>';
146 146
 }
Please login to merge, or discard this patch.