Passed
Push — master ( 4990f6...882d2a )
by Michael
03:01
created
admin/admin_report.php 1 patch
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 
32 32
 use Xmf\Request;
33 33
 
34
-require_once __DIR__ . '/admin_header.php';
34
+require_once __DIR__.'/admin_header.php';
35 35
 require_once $GLOBALS['xoops']->path('class/pagenav.php');
36 36
 
37 37
 $op    = Request::getCmd('op', 'default');
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
         //        $report_ids = Request::getInt('report_id', 0, 'POST'); //$_POST['report_id'];
53 53
         // irmtfan add error redirect header
54 54
         if (0 === count($report_ids)) {
55
-            redirect_header("admin_report.php?item={$item}" . (empty($start) ? '' : "&start={$start}"), 1, _AM_NEWBB_REPORTNOTSELECT);
55
+            redirect_header("admin_report.php?item={$item}".(empty($start) ? '' : "&start={$start}"), 1, _AM_NEWBB_REPORTNOTSELECT);
56 56
         }
57 57
         $report_memos = Request::getArray('report_memo', [], 'POST'); // isset($_POST['report_memo']) ? $_POST['report_memo'] : array();
58 58
         foreach ($report_ids as $rid => $value) {
@@ -65,15 +65,15 @@  discard block
 block discarded – undo
65 65
             $reportHandler->insert($reportObject);
66 66
         }
67 67
         // irmtfan add message
68
-        redirect_header("admin_report.php?item={$item}" . (empty($start) ? '' : "&start={$start}"), 1, _AM_NEWBB_REPORTSAVE);
68
+        redirect_header("admin_report.php?item={$item}".(empty($start) ? '' : "&start={$start}"), 1, _AM_NEWBB_REPORTSAVE);
69 69
 
70 70
         break;
71 71
 
72 72
     case 'delete':
73
-        $report_ids = Request::getArray('report_id', [], 'POST');// $_POST['report_id'];
73
+        $report_ids = Request::getArray('report_id', [], 'POST'); // $_POST['report_id'];
74 74
         // irmtfan add error redirect header
75 75
         if (0 === count($report_ids)) {
76
-            redirect_header("admin_report.php?item={$item}" . (empty($start) ? '' : "&start={$start}"), 1, _AM_NEWBB_REPORTNOTSELECT);
76
+            redirect_header("admin_report.php?item={$item}".(empty($start) ? '' : "&start={$start}"), 1, _AM_NEWBB_REPORTNOTSELECT);
77 77
         }
78 78
         foreach ($report_ids as $rid => $value) {
79 79
             if (!$value) {
@@ -84,14 +84,14 @@  discard block
 block discarded – undo
84 84
             }
85 85
         }
86 86
         // irmtfan add message
87
-        redirect_header("admin_report.php?item={$item}" . (empty($start) ? '' : "&start={$start}"), 1, _AM_NEWBB_REPORTDELETE);
87
+        redirect_header("admin_report.php?item={$item}".(empty($start) ? '' : "&start={$start}"), 1, _AM_NEWBB_REPORTDELETE);
88 88
 
89 89
         break;
90 90
 
91 91
     case 'default':
92 92
     default:
93 93
         require_once $GLOBALS['xoops']->path('class/xoopsformloader.php');
94
-        require_once __DIR__ . '/../include/functions.user.php';
94
+        require_once __DIR__.'/../include/functions.user.php';
95 95
 
96 96
         if ('processed' !== $item) {
97 97
             $process_result = 0;
@@ -114,12 +114,12 @@  discard block
 block discarded – undo
114 114
         $adminObject->addItemButton($title_other, $item_other, $icon = 'add');
115 115
         $adminObject->displayButton('left');
116 116
         echo _AM_NEWBB_REPORTADMIN_HELP;
117
-        echo "<table width='100%' border='0' cellspacing='1' class='outer'>" . "<tr><td class='odd'>";
118
-        echo '<form action="' . xoops_getenv('PHP_SELF') . '" method="post">';
117
+        echo "<table width='100%' border='0' cellspacing='1' class='outer'>"."<tr><td class='odd'>";
118
+        echo '<form action="'.xoops_getenv('PHP_SELF').'" method="post">';
119 119
         echo "<table border='0' cellpadding='4' cellspacing='1' width='100%' class='outer'>";
120 120
         echo "<tr align='center'>";
121
-        echo "<th class='bg3' width='80%'>" . _AM_NEWBB_REPORTTITLE . '</th>';
122
-        echo "<th class='bg3' width='10%'>" . $extra . '</th>';
121
+        echo "<th class='bg3' width='80%'>"._AM_NEWBB_REPORTTITLE.'</th>';
122
+        echo "<th class='bg3' width='10%'>".$extra.'</th>';
123 123
         echo '</tr>';
124 124
 
125 125
         $reports = $reportHandler->getAllReports('report_id', 'ASC', $limit, $start, $process_result);
@@ -137,52 +137,52 @@  discard block
 block discarded – undo
137 137
                          . '&amp;viewmode=thread" target="checkreport">'
138 138
                          . $myts->htmlSpecialChars($report['subject'])
139 139
                          . '</a>';
140
-            $checkbox  = '<input type="checkbox" name="report_id[' . $report['report_id'] . ']" value="1" checked />';
140
+            $checkbox = '<input type="checkbox" name="report_id['.$report['report_id'].']" value="1" checked />';
141 141
             if ('processed' !== $item) {
142
-                $memo = '<input type="text" name="report_memo[' . $report['report_id'] . ']" maxlength="255" size="80" />';
142
+                $memo = '<input type="text" name="report_memo['.$report['report_id'].']" maxlength="255" size="80" />';
143 143
             } else {
144 144
                 $memo = $myts->htmlSpecialChars($report['report_memo']);
145 145
             }
146 146
             echo "<tr class='odd' align='left'>";
147
-            echo '<td>' . _AM_NEWBB_REPORTPOST . ': ' . $post_link . '</td>';
148
-            echo "<td align='center'>" . $report['report_id'] . '</td>';
147
+            echo '<td>'._AM_NEWBB_REPORTPOST.': '.$post_link.'</td>';
148
+            echo "<td align='center'>".$report['report_id'].'</td>';
149 149
             echo '</tr>';
150 150
             echo "<tr class='odd' align='left'>";
151
-            echo '<td>' . _AM_NEWBB_REPORTTEXT . ': ' . $myts->htmlSpecialChars($report['report_text']) . '</td>';
151
+            echo '<td>'._AM_NEWBB_REPORTTEXT.': '.$myts->htmlSpecialChars($report['report_text']).'</td>';
152 152
             $uid           = (int)$report['reporter_uid'];
153 153
             $reporter_name = newbbGetUnameFromId($uid, $GLOBALS['xoopsModuleConfig']['show_realname']);
154
-            $reporter      = !empty($uid) ? "<a href='" . XOOPS_URL . '/userinfo.php?uid=' . $uid . "'>" . $reporter_name . '</a><br>' : '';
155
-            echo "<td align='center'>" . $reporter . $report['reporter_ip'] . '</td>';
154
+            $reporter      = !empty($uid) ? "<a href='".XOOPS_URL.'/userinfo.php?uid='.$uid."'>".$reporter_name.'</a><br>' : '';
155
+            echo "<td align='center'>".$reporter.$report['reporter_ip'].'</td>';
156 156
             echo '</tr>';
157 157
             echo "<tr class='odd' align='left'>";
158
-            echo '<td>' . _AM_NEWBB_REPORTMEMO . ': ' . $memo . '</td>';
159
-            echo "<td align='center' >" . $checkbox . '</td>';
158
+            echo '<td>'._AM_NEWBB_REPORTMEMO.': '.$memo.'</td>';
159
+            echo "<td align='center' >".$checkbox.'</td>';
160 160
             echo '</tr>';
161 161
             echo "<tr colspan='2'><td height='2'></td></tr>";
162 162
         }
163 163
         $buttons = '';
164 164
         if ('processed' !== $item) {
165
-            $submit  = new \XoopsFormButton('', 'submit', _SUBMIT, 'submit');
166
-            $buttons .= $submit->render() . ' ';
165
+            $submit = new \XoopsFormButton('', 'submit', _SUBMIT, 'submit');
166
+            $buttons .= $submit->render().' ';
167 167
         }
168 168
         $delete  = new \XoopsFormButton('', 'delete', _DELETE, 'submit');
169
-        $buttons .= $delete->render() . ' ';
169
+        $buttons .= $delete->render().' ';
170 170
         $cancel  = new \XoopsFormButton('', 'cancel', _CANCEL, 'reset');
171 171
         $buttons .= $cancel->render();
172 172
         echo "<tr colspan='2'><td align='center'>{$buttons}</td></tr>";
173 173
         $hidden = new \XoopsFormHidden('start', $start);
174 174
         echo $hidden->render();
175 175
         $hidden = new \XoopsFormHidden('item', $item);
176
-        echo $hidden->render() . '</form>';
176
+        echo $hidden->render().'</form>';
177 177
 
178 178
         echo '</table>';
179 179
         echo '</td></tr></table>';
180
-        $nav = new \XoopsPageNav($reportHandler->getCount(new \Criteria('report_result', $process_result)), $limit, $start, 'start', 'item=' . $item);
180
+        $nav = new \XoopsPageNav($reportHandler->getCount(new \Criteria('report_result', $process_result)), $limit, $start, 'start', 'item='.$item);
181 181
         echo $nav->renderNav(4);
182 182
         echo '<fieldset>';
183
-        echo '<legend>&nbsp;' . _MI_NEWBB_ADMENU_REPORT . '&nbsp;</legend>';
183
+        echo '<legend>&nbsp;'._MI_NEWBB_ADMENU_REPORT.'&nbsp;</legend>';
184 184
         echo _AM_NEWBB_HELP_REPORT_TAB;
185 185
         echo '</fieldset>';
186 186
         break;
187 187
 }
188
-require_once __DIR__ . '/admin_footer.php';
188
+require_once __DIR__.'/admin_footer.php';
Please login to merge, or discard this patch.
admin/admin_permissions.php 1 patch
Spacing   +34 added lines, -34 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__ . '/admin_header.php';
35
+require_once __DIR__.'/admin_header.php';
36 36
 require_once $GLOBALS['xoops']->path('class/xoopsformloader.php');
37 37
 if (!class_exists('XoopsGroupPermForm')) {
38 38
     require_once $GLOBALS['xoops']->path('class/xoopsform/grouppermform.php');
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
         foreach (array_keys($glist) as $i) {
100 100
             // get selected item id(s) for each group
101 101
             $selected = $gpermHandler->getItemIds($this->_permName, $i, $this->_modid);
102
-            $ele      = new NewbbXoopsGroupFormCheckBox($glist[$i], 'perms[' . $this->_permName . ']', $i, $selected);
102
+            $ele      = new NewbbXoopsGroupFormCheckBox($glist[$i], 'perms['.$this->_permName.']', $i, $selected);
103 103
             $ele->setOptionTree($this->_itemTree);
104 104
             $this->addElement($ele);
105 105
             unset($ele);
@@ -108,19 +108,19 @@  discard block
 block discarded – undo
108 108
         $tray->addElement(new \XoopsFormButton('', 'submit', _SUBMIT, 'submit'));
109 109
         $tray->addElement(new \XoopsFormButton('', 'reset', _CANCEL, 'reset'));
110 110
         $this->addElement($tray);
111
-        $ret      = '<br><strong>' . $this->getTitle() . '</strong><br>' . $this->_permDesc . '<br>';
112
-        $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";
111
+        $ret      = '<br><strong>'.$this->getTitle().'</strong><br>'.$this->_permDesc.'<br>';
112
+        $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";
113 113
         $elements = $this->getElements();
114 114
         $hidden   = '';
115 115
         foreach (array_keys($elements) as $i) {
116 116
             if (!is_object($elements[$i])) {
117 117
                 $ret .= $elements[$i];
118 118
             } elseif (!$elements[$i]->isHidden()) {
119
-                $ret .= "<tr valign='top' align='left'><td class='head'>" . $elements[$i]->getCaption();
119
+                $ret .= "<tr valign='top' align='left'><td class='head'>".$elements[$i]->getCaption();
120 120
                 if ('' !== $elements[$i]->getDescription()) {
121
-                    $ret .= '<br><br><span style="font-weight: normal;">' . $elements[$i]->getDescription() . '</span>';
121
+                    $ret .= '<br><br><span style="font-weight: normal;">'.$elements[$i]->getDescription().'</span>';
122 122
                 }
123
-                $ret .= "</td>\n<td class='even' style='text-align:center;'>\n" . $elements[$i]->render() . "\n</td></tr>\n";
123
+                $ret .= "</td>\n<td class='even' style='text-align:center;'>\n".$elements[$i]->render()."\n</td></tr>\n";
124 124
             } else {
125 125
                 $hidden .= $elements[$i]->render();
126 126
             }
@@ -157,17 +157,17 @@  discard block
 block discarded – undo
157 157
     public function _renderOptionTree(&$tree, $option, $prefix, $parentIds = [])
158 158
     {
159 159
         if ($option['id'] > 0) {
160
-            $tree .= $prefix . '<input type="checkbox" name="' . $this->getName() . '[groups][' . $this->_groupId . '][' . $option['id'] . ']" id="' . $this->getName() . '[groups][' . $this->_groupId . '][' . $option['id'] . ']" onclick="';
160
+            $tree .= $prefix.'<input type="checkbox" name="'.$this->getName().'[groups]['.$this->_groupId.']['.$option['id'].']" id="'.$this->getName().'[groups]['.$this->_groupId.']['.$option['id'].']" onclick="';
161 161
             foreach ($parentIds as $pid) {
162 162
                 if ($pid <= 0) {
163 163
                     continue;
164 164
                 }
165
-                $parent_ele = $this->getName() . '[groups][' . $this->_groupId . '][' . $pid . ']';
166
-                $tree       .= "var ele = xoopsGetElementById('" . $parent_ele . "'); if (ele.checked !== true) {ele.checked = this.checked;}";
165
+                $parent_ele = $this->getName().'[groups]['.$this->_groupId.']['.$pid.']';
166
+                $tree .= "var ele = xoopsGetElementById('".$parent_ele."'); if (ele.checked !== true) {ele.checked = this.checked;}";
167 167
             }
168 168
             foreach ($option['allchild'] as $cid) {
169
-                $child_ele = $this->getName() . '[groups][' . $this->_groupId . '][' . $cid . ']';
170
-                $tree      .= "var ele = xoopsGetElementById('" . $child_ele . "'); if (this.checked !== true) {ele.checked = false;}";
169
+                $child_ele = $this->getName().'[groups]['.$this->_groupId.']['.$cid.']';
170
+                $tree .= "var ele = xoopsGetElementById('".$child_ele."'); if (this.checked !== true) {ele.checked = false;}";
171 171
             }
172 172
             $tree .= '" value="1"';
173 173
             if (in_array($option['id'], $this->_value)) {
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
                      . htmlspecialchars($option['name'])
190 190
                      . "\" /><br>\n";
191 191
         } else {
192
-            $tree .= $prefix . $option['name'] . '<input type="hidden" id="' . $this->getName() . '[groups][' . $this->_groupId . '][' . $option['id'] . "]\" /><br>\n";
192
+            $tree .= $prefix.$option['name'].'<input type="hidden" id="'.$this->getName().'[groups]['.$this->_groupId.']['.$option['id']."]\" /><br>\n";
193 193
         }
194 194
         if (isset($option['children'])) {
195 195
             foreach ($option['children'] as $child) {
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
                     //                  array_push($parentIds, $option['id']);
198 198
                     $parentIds[] = $option['id'];
199 199
                 }
200
-                $this->_renderOptionTree($tree, $this->_optionTree[$child], $prefix . '&nbsp;-', $parentIds);
200
+                $this->_renderOptionTree($tree, $this->_optionTree[$child], $prefix.'&nbsp;-', $parentIds);
201 201
             }
202 202
         }
203 203
     }
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
     case 'template':
215 215
         xoops_cp_header();
216 216
         $adminObject->displayNavigation(basename(__FILE__));
217
-        echo "<legend style='font-weight: bold; color: #900;'>" . _AM_NEWBB_PERM_ACTION . '</legend>';
217
+        echo "<legend style='font-weight: bold; color: #900;'>"._AM_NEWBB_PERM_ACTION.'</legend>';
218 218
         $opform    = new \XoopsSimpleForm(_AM_NEWBB_PERM_ACTION_HELP_TEMPLAT, 'actionform', 'admin_permissions.php', 'get');
219 219
         $op_select = new \XoopsFormSelect('', 'action');
220 220
         $op_select->setExtra('onchange="document.forms.actionform.submit()"');
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
         $perm_template = $newbbpermHandler->getTemplate();
234 234
         foreach (array_keys($glist) as $i) {
235 235
             $selected   = !empty($perm_template[$i]) ? array_keys($perm_template[$i]) : [];
236
-            $ret_ele    = '<tr align="left" valign="top"><td class="head">' . $glist[$i] . '</td>';
236
+            $ret_ele    = '<tr align="left" valign="top"><td class="head">'.$glist[$i].'</td>';
237 237
             $ret_ele    .= '<td class="even">';
238 238
             $ret_ele    .= '<table class="outer"><tr><td class="odd"><table><tr>';
239 239
             $ii         = 0;
@@ -243,13 +243,13 @@  discard block
 block discarded – undo
243 243
                 if (0 == $ii % 5) {
244 244
                     $ret_ele .= '</tr><tr>';
245 245
                 }
246
-                $checked      = in_array('forum_' . $perm, $selected) ? ' checked' : '';
247
-                $option_id    = $perm . '_' . $i;
246
+                $checked      = in_array('forum_'.$perm, $selected) ? ' checked' : '';
247
+                $option_id    = $perm.'_'.$i;
248 248
                 $option_ids[] = $option_id;
249
-                $ret_ele      .= '<td><input name="perms[' . $i . '][' . 'forum_' . $perm . ']" id="' . $option_id . '" onclick="" value="1" type="checkbox"' . $checked . '>' . constant('_AM_NEWBB_CAN_' . strtoupper($perm)) . '<br></td>';
249
+                $ret_ele .= '<td><input name="perms['.$i.']['.'forum_'.$perm.']" id="'.$option_id.'" onclick="" value="1" type="checkbox"'.$checked.'>'.constant('_AM_NEWBB_CAN_'.strtoupper($perm)).'<br></td>';
250 250
             }
251 251
             $ret_ele    .= '</tr></table></td><td class="even">';
252
-            $ret_ele    .= _ALL . ' <input id="checkall[' . $i . ']" type="checkbox" value="" onclick="var optionids = new Array(' . implode(', ', $option_ids) . '); xoopsCheckAllElements(optionids, \'checkall[' . $i . ']\')" />';
252
+            $ret_ele    .= _ALL.' <input id="checkall['.$i.']" type="checkbox" value="" onclick="var optionids = new Array('.implode(', ', $option_ids).'); xoopsCheckAllElements(optionids, \'checkall['.$i.']\')" />';
253 253
             $ret_ele    .= '</td></tr></table>';
254 254
             $ret_ele    .= '</td></tr>';
255 255
             $elements[] = $ret_ele;
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
         $tray->addElement(new \XoopsFormHidden('action', 'template_save'));
259 259
         $tray->addElement(new \XoopsFormButton('', 'submit', _SUBMIT, 'submit'));
260 260
         $tray->addElement(new \XoopsFormButton('', 'reset', _CANCEL, 'reset'));
261
-        $ret = '<br><strong>' . _AM_NEWBB_PERM_TEMPLATE . '</strong><br>' . _AM_NEWBB_PERM_TEMPLATE_DESC . '<br>';
261
+        $ret = '<br><strong>'._AM_NEWBB_PERM_TEMPLATE.'</strong><br>'._AM_NEWBB_PERM_TEMPLATE_DESC.'<br>';
262 262
         $ret .= "<form name='template' id='template' method='post'>\n<table width='100%' class='outer' cellspacing='1'>\n";
263 263
         $ret .= implode("\n", $elements);
264 264
         $ret .= '<tr align="left" valign="top"><td class="head"></td><td class="even" style="text-align:center;">';
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
         $ret .= '</td></tr>';
267 267
         $ret .= '</table></form>';
268 268
         echo $ret;
269
-        require_once __DIR__ . '/admin_footer.php';
269
+        require_once __DIR__.'/admin_footer.php';
270 270
         break;
271 271
 
272 272
     case 'template_save':
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
         }
288 288
         xoops_cp_header();
289 289
         $adminObject->displayNavigation(basename(__FILE__));
290
-        echo "<legend style='font-weight: bold; color: #900;'>" . _AM_NEWBB_PERM_ACTION . '</legend>';
290
+        echo "<legend style='font-weight: bold; color: #900;'>"._AM_NEWBB_PERM_ACTION.'</legend>';
291 291
         $opform    = new \XoopsSimpleForm(_AM_NEWBB_PERM_ACTION_HELP_APPLY, 'actionform', 'admin_permissions.php', 'get');
292 292
         $op_select = new \XoopsFormSelect('', 'action');
293 293
         $op_select->setExtra('onchange="document.forms.actionform.submit()"');
@@ -310,9 +310,9 @@  discard block
 block discarded – undo
310 310
         $forums       = $forumHandler->getTree(array_keys($categories), 0, 'all');
311 311
         foreach (array_keys($forums) as $c) {
312 312
             $fm_options[-1 * $c - 1000] = ' ';
313
-            $fm_options[-1 * $c]        = '[' . $categories[$c] . ']';
313
+            $fm_options[-1 * $c]        = '['.$categories[$c].']';
314 314
             foreach (array_keys($forums[$c]) as $f) {
315
-                $fm_options[$f] = $forums[$c][$f]['prefix'] . $forums[$c][$f]['forum_name'];
315
+                $fm_options[$f] = $forums[$c][$f]['prefix'].$forums[$c][$f]['forum_name'];
316 316
             }
317 317
         }
318 318
         unset($forums, $categories);
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
         $tray->addElement(new \XoopsFormButton('', 'reset', _CANCEL, 'reset'));
328 328
         $fmform->addElement($tray);
329 329
         $fmform->display();
330
-        require_once __DIR__ . '/admin_footer.php';
330
+        require_once __DIR__.'/admin_footer.php';
331 331
         break;
332 332
 
333 333
     case 'apply_save':
@@ -365,7 +365,7 @@  discard block
 block discarded – undo
365 365
         }
366 366
 
367 367
         $adminObject->displayNavigation(basename(__FILE__));
368
-        echo "<legend style='font-weight: bold; color: #900;'>" . _AM_NEWBB_PERM_ACTION . '</legend>';
368
+        echo "<legend style='font-weight: bold; color: #900;'>"._AM_NEWBB_PERM_ACTION.'</legend>';
369 369
         $opform    = new \XoopsSimpleForm(_AM_NEWBB_PERM_ACTION_HELP, 'actionform', 'admin_permissions.php', 'get');
370 370
         $op_select = new \XoopsFormSelect('', 'action');
371 371
         $op_select->setExtra('onchange="document.forms.actionform.submit()"');
@@ -388,10 +388,10 @@  discard block
 block discarded – undo
388 388
             ]
389 389
         ];
390 390
         foreach ($perms as $perm) {
391
-            $op_options[$perm] = constant('_AM_NEWBB_CAN_' . strtoupper($perm));
391
+            $op_options[$perm] = constant('_AM_NEWBB_CAN_'.strtoupper($perm));
392 392
             $fm_options[$perm] = [
393
-                'title'     => constant('_AM_NEWBB_CAN_' . strtoupper($perm)),
394
-                'item'      => 'forum_' . $perm,
393
+                'title'     => constant('_AM_NEWBB_CAN_'.strtoupper($perm)),
394
+                'item'      => 'forum_'.$perm,
395 395
                 'desc'      => '',
396 396
                 'anonymous' => true
397 397
             ];
@@ -432,10 +432,10 @@  discard block
 block discarded – undo
432 432
             if (count($forums) > 0) {
433 433
                 foreach (array_keys($forums) as $c) {
434 434
                     $key_c = -1 * $c;
435
-                    $form->addItem($key_c, '<strong>[' . $categories[$c] . ']</strong>');
435
+                    $form->addItem($key_c, '<strong>['.$categories[$c].']</strong>');
436 436
                     foreach (array_keys($forums[$c]) as $f) {
437 437
                         $pid = $forums[$c][$f]['parent_forum'] ?: $key_c;
438
-                        $form->addItem($f, $forums[$c][$f]['prefix'] . $forums[$c][$f]['forum_name'], $pid);
438
+                        $form->addItem($f, $forums[$c][$f]['prefix'].$forums[$c][$f]['forum_name'], $pid);
439 439
                     }
440 440
                 }
441 441
             }
@@ -443,7 +443,7 @@  discard block
 block discarded – undo
443 443
         }
444 444
         $form->display();
445 445
         echo '<fieldset>';
446
-        echo '<legend>&nbsp;' . _MI_NEWBB_ADMENU_PERMISSION . '&nbsp;</legend>';
446
+        echo '<legend>&nbsp;'._MI_NEWBB_ADMENU_PERMISSION.'&nbsp;</legend>';
447 447
         echo _AM_NEWBB_HELP_PERMISSION_TAB;
448 448
         echo '</fieldset>';
449 449
         // Since we can not control the permission update, a trick is used here
@@ -452,6 +452,6 @@  discard block
 block discarded – undo
452 452
         $permissionHandler->createPermData();
453 453
         $cacheHelper = Newbb\Utility::cleanCache();
454 454
         //$cacheHelper->delete('permission');
455
-        require_once __DIR__ . '/admin_footer.php';
455
+        require_once __DIR__.'/admin_footer.php';
456 456
         break;
457 457
 }
Please login to merge, or discard this patch.
admin/admin_votedata.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 
32 32
 use Xmf\Request;
33 33
 
34
-require_once __DIR__ . '/admin_header.php';
34
+require_once __DIR__.'/admin_header.php';
35 35
 
36 36
 $op = $op = Request::getCmd('op', Request::getCmd('op', '', 'POST'), 'GET'); //!empty($_GET['op'])? $_GET['op'] : (!empty($_POST['op'])?$_POST['op']:"");
37 37
 
@@ -39,10 +39,10 @@  discard block
 block discarded – undo
39 39
     case 'delvotes':
40 40
         $rid      = Request::getInt('rid', 0, 'GET');
41 41
         $topic_id = Request::getInt('topic_id', 0, 'GET');
42
-        $sql      = $GLOBALS['xoopsDB']->queryF('DELETE FROM ' . $GLOBALS['xoopsDB']->prefix('newbb_votedata') . " WHERE ratingid = $rid");
42
+        $sql      = $GLOBALS['xoopsDB']->queryF('DELETE FROM '.$GLOBALS['xoopsDB']->prefix('newbb_votedata')." WHERE ratingid = $rid");
43 43
         $GLOBALS['xoopsDB']->query($sql);
44 44
 
45
-        $query       = 'SELECT rating FROM ' . $GLOBALS['xoopsDB']->prefix('newbb_votedata') . ' WHERE topic_id = ' . $topic_id . ' ';
45
+        $query       = 'SELECT rating FROM '.$GLOBALS['xoopsDB']->prefix('newbb_votedata').' WHERE topic_id = '.$topic_id.' ';
46 46
         $voteresult  = $GLOBALS['xoopsDB']->query($query);
47 47
         $votesDB     = $GLOBALS['xoopsDB']->getRowsNum($voteresult);
48 48
         $totalrating = 0;
@@ -63,11 +63,11 @@  discard block
 block discarded – undo
63 63
         $useravgrating = '0';
64 64
         $uservotes     = '0';
65 65
 
66
-        $sql     = 'SELECT * FROM ' . $GLOBALS['xoopsDB']->prefix('newbb_votedata') . ' ORDER BY ratingtimestamp DESC';
66
+        $sql     = 'SELECT * FROM '.$GLOBALS['xoopsDB']->prefix('newbb_votedata').' ORDER BY ratingtimestamp DESC';
67 67
         $results = $GLOBALS['xoopsDB']->query($sql, 20, $start);
68 68
         $votes   = $GLOBALS['xoopsDB']->getRowsNum($results);
69 69
 
70
-        $sql           = 'SELECT rating FROM ' . $GLOBALS['xoopsDB']->prefix('newbb_votedata') . ' ';
70
+        $sql           = 'SELECT rating FROM '.$GLOBALS['xoopsDB']->prefix('newbb_votedata').' ';
71 71
         $result2       = $GLOBALS['xoopsDB']->query($sql, 20, $start);
72 72
         $uservotes     = $GLOBALS['xoopsDB']->getRowsNum($result2);
73 73
         $useravgrating = 0;
@@ -86,28 +86,28 @@  discard block
 block discarded – undo
86 86
         $adminObject->displayNavigation(basename(__FILE__));
87 87
 
88 88
         echo "<div style='padding: 8px;'>\n
89
-        <div><strong>" . _AM_NEWBB_VOTE_USERAVG . ": </strong>$useravgrating</div>\n
90
-        <div><strong>" . _AM_NEWBB_VOTE_TOTALRATE . ": </strong>$uservotes</div>\n
89
+        <div><strong>" . _AM_NEWBB_VOTE_USERAVG.": </strong>$useravgrating</div>\n
90
+        <div><strong>"._AM_NEWBB_VOTE_TOTALRATE.": </strong>$uservotes</div>\n
91 91
         <div style='padding: 8px;'>\n
92
-        <ul><li> " . _AM_NEWBB_VOTE_DELETEDSC . "</li></ul>
92
+        <ul><li> "._AM_NEWBB_VOTE_DELETEDSC."</li></ul>
93 93
         <div>\n
94 94
         <br>\n
95 95
         <table width='100%' border='0' cellspacing='1' class='outer'>" . "<tr><td class='odd'>
96 96
         <table width='100%' cellspacing='1' cellpadding='2' class='outer'>\n
97 97
         <tr>\n
98
-        <th align='center'>" . _AM_NEWBB_VOTE_ID . "</th>\n
99
-        <th align='center'>" . _AM_NEWBB_VOTE_USER . "</th>\n
100
-        <th align='center'>" . _AM_NEWBB_VOTE_IP . "</th>\n
101
-        <th align='center'>" . _AM_NEWBB_VOTE_FILETITLE . "</th>\n
102
-        <th align='center'>" . _AM_NEWBB_VOTE_RATING . "</th>\n
103
-        <th align='center'>" . _AM_NEWBB_VOTE_DATE . "</th>\n
104
-        <th align='center'>" . _AM_NEWBB_ACTION . "</th></tr>\n";
98
+        <th align='center'>" . _AM_NEWBB_VOTE_ID."</th>\n
99
+        <th align='center'>" . _AM_NEWBB_VOTE_USER."</th>\n
100
+        <th align='center'>" . _AM_NEWBB_VOTE_IP."</th>\n
101
+        <th align='center'>" . _AM_NEWBB_VOTE_FILETITLE."</th>\n
102
+        <th align='center'>" . _AM_NEWBB_VOTE_RATING."</th>\n
103
+        <th align='center'>" . _AM_NEWBB_VOTE_DATE."</th>\n
104
+        <th align='center'>" . _AM_NEWBB_ACTION."</th></tr>\n";
105 105
 
106 106
         if (0 == $votes) {
107
-            echo "<tr><td align='center' colspan='7' class='head'>" . _AM_NEWBB_VOTE_NOVOTES . '</td></tr>';
107
+            echo "<tr><td align='center' colspan='7' class='head'>"._AM_NEWBB_VOTE_NOVOTES.'</td></tr>';
108 108
         }
109 109
         while (false !== (list($ratingid, $topic_id, $ratinguser, $rating, $ratinghostname, $ratingtimestamp) = $GLOBALS['xoopsDB']->fetchRow($results))) {
110
-            $sql        = 'SELECT topic_title FROM ' . $GLOBALS['xoopsDB']->prefix('newbb_topics') . ' WHERE topic_id=' . $topic_id . ' ';
110
+            $sql        = 'SELECT topic_title FROM '.$GLOBALS['xoopsDB']->prefix('newbb_topics').' WHERE topic_id='.$topic_id.' ';
111 111
             $down_array = $GLOBALS['xoopsDB']->fetchArray($GLOBALS['xoopsDB']->query($sql));
112 112
 
113 113
             $formatted_date = formatTimestamp($ratingtimestamp, _DATESTRING);
@@ -117,10 +117,10 @@  discard block
 block discarded – undo
117 117
         <td class='head' align='center'>$ratingid</td>\n
118 118
         <td class='even' align='center'>$ratinguname</td>\n
119 119
         <td class='even' align='center' >$ratinghostname</td>\n
120
-        <td class='even' align='left'><a href='" . XOOPS_URL . '/modules/newbb/viewtopic.php?topic_id=' . $topic_id . "' target='topic'>" . $myts->htmlSpecialChars($down_array['topic_title']) . "</a></td>\n
120
+        <td class='even' align='left'><a href='".XOOPS_URL.'/modules/newbb/viewtopic.php?topic_id='.$topic_id."' target='topic'>".$myts->htmlSpecialChars($down_array['topic_title'])."</a></td>\n
121 121
         <td class='even' align='center'>$rating</td>\n
122 122
         <td class='even' align='center'>$formatted_date</td>\n
123
-        <td class='even' align='center'><strong><a href='admin_votedata.php?op=delvotes&amp;topic_id=$topic_id&amp;rid=$ratingid'>" . newbbDisplayImage('p_delete', _DELETE) . "</a></strong></td>\n
123
+        <td class='even' align='center'><strong><a href='admin_votedata.php?op=delvotes&amp;topic_id=$topic_id&amp;rid=$ratingid'>".newbbDisplayImage('p_delete', _DELETE)."</a></strong></td>\n
124 124
         </tr>\n";
125 125
         }
126 126
         echo '</table>';
@@ -129,11 +129,11 @@  discard block
 block discarded – undo
129 129
         require_once $GLOBALS['xoops']->path('class/pagenav.php');
130 130
         $page    = ($votes > 10) ? _AM_NEWBB_INDEX_PAGE : '';
131 131
         $pagenav = new \XoopsPageNav($page, 20, $start, 'start');
132
-        echo '<div align="right" style="padding: 8px;">' . $page . '' . $pagenav->renderImageNav(4) . '</div>';
132
+        echo '<div align="right" style="padding: 8px;">'.$page.''.$pagenav->renderImageNav(4).'</div>';
133 133
         echo '<fieldset>';
134
-        echo '<legend>&nbsp;' . _MI_NEWBB_ADMENU_VOTE . '&nbsp;</legend>';
134
+        echo '<legend>&nbsp;'._MI_NEWBB_ADMENU_VOTE.'&nbsp;</legend>';
135 135
         echo _AM_NEWBB_HELP_VOTE_TAB;
136 136
         echo '</fieldset>';
137 137
         break;
138 138
 }
139
-require_once __DIR__ . '/admin_footer.php';
139
+require_once __DIR__.'/admin_footer.php';
Please login to merge, or discard this patch.
admin/about.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,11 +29,11 @@
 block discarded – undo
29 29
 // Project: XOOPS Project                                                    //
30 30
 // ------------------------------------------------------------------------- //
31 31
 
32
-require_once __DIR__ . '/admin_header.php';
32
+require_once __DIR__.'/admin_header.php';
33 33
 xoops_cp_header();
34 34
 
35 35
 $adminObject->displayNavigation(basename(__FILE__));
36 36
 \Xmf\Module\Admin::setPaypal('PBQZ7D6LT6UBC');
37 37
 $adminObject->displayAbout(false);
38 38
 
39
-require_once __DIR__ . '/admin_footer.php';
39
+require_once __DIR__.'/admin_footer.php';
Please login to merge, or discard this patch.
admin/admin_digest.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 
32 32
 use Xmf\Request;
33 33
 
34
-require_once __DIR__ . '/admin_header.php';
34
+require_once __DIR__.'/admin_header.php';
35 35
 require_once $GLOBALS['xoops']->path('class/pagenav.php');
36 36
 
37 37
 $op   = Request::getCmd('op', Request::getCmd('op', 'default', 'POST'), 'GET'); // !empty($_GET['op'])? $_GET['op'] : (!empty($_POST['op'])?$_POST['op']:"default");
@@ -87,16 +87,16 @@  discard block
 block discarded – undo
87 87
 
88 88
         //if (!$newXoopsModuleGui) loadModuleAdminMenu(7,_AM_NEWBB_DIGESTADMIN);
89 89
         //    else $adminObject->displayNavigation(basename(__FILE__));
90
-        echo '<ul><li>' . _AM_NEWBB_DIGEST_HELP_1 . '</li>';
91
-        echo '<li>' . _AM_NEWBB_DIGEST_HELP_2 . '</li>';
92
-        echo '<li>' . _AM_NEWBB_DIGEST_HELP_3 . '</li>';
93
-        echo '<li>' . _AM_NEWBB_DIGEST_HELP_4 . '</li></ul>';
94
-        echo "<table width='100%' border='0' cellspacing='1' class='outer'>" . "<tr><td class='odd'>";
95
-        echo '<form action="' . xoops_getenv('PHP_SELF') . '" method="post">';
90
+        echo '<ul><li>'._AM_NEWBB_DIGEST_HELP_1.'</li>';
91
+        echo '<li>'._AM_NEWBB_DIGEST_HELP_2.'</li>';
92
+        echo '<li>'._AM_NEWBB_DIGEST_HELP_3.'</li>';
93
+        echo '<li>'._AM_NEWBB_DIGEST_HELP_4.'</li></ul>';
94
+        echo "<table width='100%' border='0' cellspacing='1' class='outer'>"."<tr><td class='odd'>";
95
+        echo '<form action="'.xoops_getenv('PHP_SELF').'" method="post">';
96 96
         echo "<table border='0' cellpadding='4' cellspacing='1' width='100%' class='outer'>";
97 97
         echo "<tr align='center'>";
98
-        echo "<th class='bg3' width='2%'>" . _DELETE . '</th>';
99
-        echo "<th class='bg3'>" . _AM_NEWBB_DIGESTCONTENT . '</th>';
98
+        echo "<th class='bg3' width='2%'>"._DELETE.'</th>';
99
+        echo "<th class='bg3'>"._AM_NEWBB_DIGESTCONTENT.'</th>';
100 100
         echo '</tr>';
101 101
 
102 102
         $digests = [];
@@ -105,22 +105,22 @@  discard block
 block discarded – undo
105 105
         $digests = $digestHandler->getAllDigests($start, $limit);
106 106
         foreach ($digests as $digest) {
107 107
             echo "<tr class='odd' align='left'>";
108
-            echo "<td align='center' ><input type='checkbox' name='digest_id[" . $digest['digest_id'] . "]' value='1' /></td>";
109
-            echo '<td><strong>#' . $digest['digest_id'] . ' @ ' . formatTimestamp($digest['digest_time']) . '</strong><br>' . str_replace("\n", '<br>', $digest['digest_content']) . '</td>';
108
+            echo "<td align='center' ><input type='checkbox' name='digest_id[".$digest['digest_id']."]' value='1' /></td>";
109
+            echo '<td><strong>#'.$digest['digest_id'].' @ '.formatTimestamp($digest['digest_time']).'</strong><br>'.str_replace("\n", '<br>', $digest['digest_content']).'</td>';
110 110
             echo '</tr>';
111 111
             echo "<tr colspan='2'><td height='2'></td></tr>";
112 112
         }
113 113
         $submit = new \XoopsFormButton('', 'submit', _SUBMIT, 'submit');
114
-        echo "<tr><td colspan='2' align='center'>" . $submit->render() . '</td></tr>';
114
+        echo "<tr><td colspan='2' align='center'>".$submit->render().'</td></tr>';
115 115
         $hidden = new \XoopsFormHidden('op', 'delete');
116 116
         echo $hidden->render();
117 117
         $hidden = new \XoopsFormHidden('item', $item);
118
-        echo $hidden->render() . '</form>';
118
+        echo $hidden->render().'</form>';
119 119
 
120 120
         echo '</table>';
121 121
         echo '</td></tr></table>';
122 122
         echo '<fieldset>';
123
-        echo '<legend>&nbsp;' . _AM_NEWBB_PREFERENCES . '&nbsp;-&nbsp;' . _MI_NEWBB_ADMENU_DIGEST . '&nbsp;</legend>';
123
+        echo '<legend>&nbsp;'._AM_NEWBB_PREFERENCES.'&nbsp;-&nbsp;'._MI_NEWBB_ADMENU_DIGEST.'&nbsp;</legend>';
124 124
         echo _AM_NEWBB_DIGEST_HELP_AUTO_DIGEST;
125 125
         echo '</fieldset>';
126 126
         $nav = new \XoopsPageNav($digestHandler->getDigestCount(), $limit, $start, 'start');
@@ -128,4 +128,4 @@  discard block
 block discarded – undo
128 128
 
129 129
         break;
130 130
 }
131
-require_once __DIR__ . '/admin_footer.php';
131
+require_once __DIR__.'/admin_footer.php';
Please login to merge, or discard this patch.
admin/admin_forum_reorder.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 
32 32
 use Xmf\Request;
33 33
 
34
-require_once __DIR__ . '/admin_header.php';
34
+require_once __DIR__.'/admin_header.php';
35 35
 
36 36
 $cat_orders = Request::getArray('cat_orders', null, 'POST');
37 37
 $orders     = Request::getArray('orders', null, 'POST');
@@ -41,14 +41,14 @@  discard block
 block discarded – undo
41 41
 if (Request::getString('submit', '', 'POST')) {
42 42
     $catOrdersCount = count($cat_orders);
43 43
     for ($i = 0; $i < $catOrdersCount; ++$i) {
44
-        $sql = 'update ' . $GLOBALS['xoopsDB']->prefix('newbb_categories') . ' set cat_order = ' . $cat_orders[$i] . " WHERE cat_id=$cat[$i]";
44
+        $sql = 'update '.$GLOBALS['xoopsDB']->prefix('newbb_categories').' set cat_order = '.$cat_orders[$i]." WHERE cat_id=$cat[$i]";
45 45
         if (!$result = $GLOBALS['xoopsDB']->query($sql)) {
46 46
             redirect_header('admin_forum_reorder.php', 1, _AM_NEWBB_FORUM_ERROR);
47 47
         }
48 48
     }
49 49
     $ordersCount = count($orders);
50 50
     for ($i = 0; $i < $ordersCount; ++$i) {
51
-        $sql = 'update ' . $GLOBALS['xoopsDB']->prefix('newbb_forums') . ' set forum_order = ' . $orders[$i] . ' WHERE forum_id=' . $forum[$i];
51
+        $sql = 'update '.$GLOBALS['xoopsDB']->prefix('newbb_forums').' set forum_order = '.$orders[$i].' WHERE forum_id='.$forum[$i];
52 52
         if (!$result = $GLOBALS['xoopsDB']->query($sql)) {
53 53
             redirect_header('admin_forum_reorder.php', 1, _AM_NEWBB_FORUM_ERROR);
54 54
         }
@@ -65,14 +65,14 @@  discard block
 block discarded – undo
65 65
 
66 66
     $adminObject->displayNavigation(basename(__FILE__));
67 67
 
68
-    echo "<table width='100%' border='0' cellspacing='1' class='outer'>" . "<tr><td class='odd'>";
68
+    echo "<table width='100%' border='0' cellspacing='1' class='outer'>"."<tr><td class='odd'>";
69 69
     $tform = new \XoopsThemeForm(_AM_NEWBB_SETFORUMORDER, '', '');
70 70
     $tform->display();
71 71
     echo "<form name='reorder' method='post'>";
72 72
     echo "<table border='0' width='100%' cellpadding='2' cellspacing='1' class='outer'>";
73 73
     echo '<tr>';
74
-    echo "<td class='head' align='left' width='60%'><strong>" . _AM_NEWBB_REORDERTITLE . '</strong></td>';
75
-    echo "<td class='head' align='center'><strong>" . _AM_NEWBB_REORDERWEIGHT . '</strong></td>';
74
+    echo "<td class='head' align='left' width='60%'><strong>"._AM_NEWBB_REORDERTITLE.'</strong></td>';
75
+    echo "<td class='head' align='center'><strong>"._AM_NEWBB_REORDERWEIGHT.'</strong></td>';
76 76
     echo '</tr>';
77 77
 
78 78
     //    /** @var Newbb\ForumHandler $forumHandler */
@@ -85,10 +85,10 @@  discard block
 block discarded – undo
85 85
     $forums     = $forumHandler->getTree(array_keys($categories), 0, 'all', '&nbsp;&nbsp;&nbsp;&nbsp;');
86 86
     foreach (array_keys($categories) as $c) {
87 87
         echo '<tr>';
88
-        echo "<td align='left' nowrap='nowrap' class='head' >" . $categories[$c]->getVar('cat_title') . '</td>';
88
+        echo "<td align='left' nowrap='nowrap' class='head' >".$categories[$c]->getVar('cat_title').'</td>';
89 89
         echo "<td align='right' class='head'>";
90
-        echo "<input type='text' name='cat_orders[]' value='" . $categories[$c]->getVar('cat_order') . "' size='5' maxlength='5' />";
91
-        echo "<input type='hidden' name='cat[]' value='" . $c . "' />";
90
+        echo "<input type='text' name='cat_orders[]' value='".$categories[$c]->getVar('cat_order')."' size='5' maxlength='5' />";
91
+        echo "<input type='hidden' name='cat[]' value='".$c."' />";
92 92
         echo '</td>';
93 93
         echo '</tr>';
94 94
 
@@ -99,24 +99,24 @@  discard block
 block discarded – undo
99 99
         foreach ($forums[$c] as $key => $forum) {
100 100
             echo '<tr>';
101 101
             $class = ((++$i) % 2) ? 'odd' : 'even';
102
-            echo "<td align='left' nowrap='nowrap' class='" . $class . "'>" . $forum['prefix'] . $forum['forum_name'] . '</td>';
103
-            echo "<td align='left' class='" . $class . "'>";
104
-            echo $forum['prefix'] . "<input type='text' name='orders[]' value='" . $forum['forum_order'] . "' size='5' maxlength='5' />";
105
-            echo "<input type='hidden' name='forum[]' value='" . $key . "' />";
102
+            echo "<td align='left' nowrap='nowrap' class='".$class."'>".$forum['prefix'].$forum['forum_name'].'</td>';
103
+            echo "<td align='left' class='".$class."'>";
104
+            echo $forum['prefix']."<input type='text' name='orders[]' value='".$forum['forum_order']."' size='5' maxlength='5' />";
105
+            echo "<input type='hidden' name='forum[]' value='".$key."' />";
106 106
             echo '</td>';
107 107
             echo '</tr>';
108 108
         }
109 109
     }
110 110
     echo "<tr><td class='even' align='center' colspan='6'>";
111 111
 
112
-    echo "<input type='submit' name='submit' value='" . _SUBMIT . "' />";
112
+    echo "<input type='submit' name='submit' value='"._SUBMIT."' />";
113 113
     echo '</td></tr>';
114 114
     echo '</table>';
115 115
     echo '</form>';
116 116
     echo '</td></tr></table>';
117 117
     echo '<fieldset>';
118
-    echo '<legend>&nbsp;' . _MI_NEWBB_ADMENU_ORDER . '&nbsp;</legend>';
118
+    echo '<legend>&nbsp;'._MI_NEWBB_ADMENU_ORDER.'&nbsp;</legend>';
119 119
     echo _AM_NEWBB_HELP_ORDER_TAB;
120 120
     echo '</fieldset>';
121 121
 }
122
-require_once __DIR__ . '/admin_footer.php';
122
+require_once __DIR__.'/admin_footer.php';
Please login to merge, or discard this patch.
admin/admin_groupmod.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 
32 32
 use Xmf\Request;
33 33
 
34
-require_once __DIR__ . '/admin_header.php';
34
+require_once __DIR__.'/admin_header.php';
35 35
 xoops_cp_header();
36 36
 require_once $GLOBALS['xoops']->path('class/xoopsformloader.php');
37 37
 $adminObject->displayNavigation(basename(__FILE__));
@@ -40,8 +40,8 @@  discard block
 block discarded – undo
40 40
 ///** @var Newbb\ForumHandler $forumHandler */
41 41
 //$forumHandler = Newbb\Helper::getInstance()->getHandler('Forum');
42 42
 if (Request::getString('submit', '', 'POST')) {
43
-    $fgroups = Request::getArray('group', '', 'POST');// !empty($_POST['group']) ? $_POST['group'] : '';
44
-    $fforum  = Request::getInt('forenid', 0, 'POST');// (int)($_POST['forenid']);
43
+    $fgroups = Request::getArray('group', '', 'POST'); // !empty($_POST['group']) ? $_POST['group'] : '';
44
+    $fforum  = Request::getInt('forenid', 0, 'POST'); // (int)($_POST['forenid']);
45 45
     $fuser   = [];
46 46
     if (0 !== $fforum) {
47 47
         if ('' !== $fgroups) {
@@ -56,14 +56,14 @@  discard block
 block discarded – undo
56 56
             }
57 57
         }
58 58
         if (-1 == $fforum) { // alle Foren
59
-            $sql = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('newbb_forums') . " SET forum_moderator='" . serialize($fuser) . "'";
59
+            $sql = 'UPDATE '.$GLOBALS['xoopsDB']->prefix('newbb_forums')." SET forum_moderator='".serialize($fuser)."'";
60 60
         } else {
61
-            $sql = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('newbb_forums') . " SET forum_moderator='" . serialize($fuser) . "' WHERE forum_id =" . $fforum;
61
+            $sql = 'UPDATE '.$GLOBALS['xoopsDB']->prefix('newbb_forums')." SET forum_moderator='".serialize($fuser)."' WHERE forum_id =".$fforum;
62 62
         }
63 63
         if (is_array($fuser) && $GLOBALS['xoopsDB']->queryF($sql)) {
64 64
             $mess = _AM_NEWBB_GROUPMOD_ADDMOD;
65 65
         } else {
66
-            $mess = _AM_NEWBB_GROUPMOD_ERRMOD . '<br><small>( ' . $sql . ' )</small>';
66
+            $mess = _AM_NEWBB_GROUPMOD_ERRMOD.'<br><small>( '.$sql.' )</small>';
67 67
         }
68 68
         redirect_header('admin_groupmod.php', 1, $mess);
69 69
         //        echo '<div class="confirmMsg">' . $mess . '</div><br><br>';
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 }
72 72
 
73 73
 echo _AM_NEWBB_GROUPMOD_TITLEDESC;
74
-echo "<br><br><table width='100%' border='0' cellspacing='1' class='outer'>" . "<tr><td class='odd'>";
74
+echo "<br><br><table width='100%' border='0' cellspacing='1' class='outer'>"."<tr><td class='odd'>";
75 75
 echo "<form name='reorder' method='post'>";
76 76
 ///** @var Newbb\CategoryHandler $categoryHandler */
77 77
 //$categoryHandler  = Newbb\Helper::getInstance()->getHandler('Category');
@@ -80,14 +80,14 @@  discard block
 block discarded – undo
80 80
 $categories = $categoryHandler->getAll($criteriaCategory, ['cat_id', 'cat_order', 'cat_title']);
81 81
 $forums     = $forumHandler->getTree(array_keys($categories), 0, 'all', '&nbsp;&nbsp;&nbsp;&nbsp;');
82 82
 echo '<select name="forenid">';
83
-echo '<option value="-1">-- ' . _AM_NEWBB_GROUPMOD_ALLFORUMS . ' --</option>';
83
+echo '<option value="-1">-- '._AM_NEWBB_GROUPMOD_ALLFORUMS.' --</option>';
84 84
 foreach (array_keys($categories) as $c) {
85 85
     if (!isset($forums[$c])) {
86 86
         continue;
87 87
     }
88 88
     $i = 0;
89 89
     foreach ($forums[$c] as $key => $forum) {
90
-        echo '<option value="' . $forum['forum_id'] . '"> ' . $categories[$c]->getVar('cat_title') . '::' . $forum['forum_name'] . '</option>';
90
+        echo '<option value="'.$forum['forum_id'].'"> '.$categories[$c]->getVar('cat_title').'::'.$forum['forum_name'].'</option>';
91 91
     }
92 92
 }
93 93
 echo '</select>';
@@ -95,14 +95,14 @@  discard block
 block discarded – undo
95 95
 
96 96
 $groups = $memberHandler->getGroups();
97 97
 foreach ($groups as $value) {
98
-    echo '<input type="checkbox" name="group[]" value="' . $value->getVar('groupid') . '" /> ' . $value->getVar('name') . '<br>';
98
+    echo '<input type="checkbox" name="group[]" value="'.$value->getVar('groupid').'" /> '.$value->getVar('name').'<br>';
99 99
 }
100 100
 echo "</td><tr><tr><td class='odd' style='text-align:center;'>";
101
-echo '<input type="submit" value="' . _SUBMIT . '" name="submit" />';
101
+echo '<input type="submit" value="'._SUBMIT.'" name="submit" />';
102 102
 echo '</td></tr></table>';
103 103
 echo '</form>';
104 104
 echo '<fieldset>';
105
-echo '<legend>&nbsp;' . _MI_NEWBB_ADMENU_GROUPMOD . '&nbsp;</legend>';
105
+echo '<legend>&nbsp;'._MI_NEWBB_ADMENU_GROUPMOD.'&nbsp;</legend>';
106 106
 echo _AM_NEWBB_HELP_GROUPMOD_TAB;
107 107
 echo '</fieldset>';
108
-require_once __DIR__ . '/admin_footer.php';
108
+require_once __DIR__.'/admin_footer.php';
Please login to merge, or discard this patch.
admin/migrate.php 1 patch
Spacing   +3 added lines, -3 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__ . '/admin_header.php';
35
+require_once __DIR__.'/admin_header.php';
36 36
 xoops_cp_header();
37 37
 
38 38
 $adminObject->displayNavigation(basename(__FILE__));
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
         if (!empty($queue)) {
71 71
             echo "<pre>\n";
72 72
             foreach ($queue as $line) {
73
-                echo $line . ";\n";
73
+                echo $line.";\n";
74 74
             }
75 75
             echo "</pre>\n";
76 76
         }
@@ -92,4 +92,4 @@  discard block
 block discarded – undo
92 92
 
93 93
 echo "<div>$message</div>";
94 94
 
95
-require_once __DIR__ . '/admin_footer.php';
95
+require_once __DIR__.'/admin_footer.php';
Please login to merge, or discard this patch.
admin/index.php 1 patch
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -31,12 +31,12 @@  discard block
 block discarded – undo
31 31
 
32 32
 use XoopsModules\Newbb;
33 33
 
34
-require_once __DIR__ . '/admin_header.php';
34
+require_once __DIR__.'/admin_header.php';
35 35
 //require_once __DIR__ . '/../class/Utility.php';
36
-require_once __DIR__ . '/../include/functions.stats.php';
36
+require_once __DIR__.'/../include/functions.stats.php';
37 37
 
38
-$attach_path = $GLOBALS['xoops']->path($GLOBALS['xoopsModuleConfig']['dir_attachments'] . '/');
39
-$thumb_path  = $attach_path . 'thumbs/';
38
+$attach_path = $GLOBALS['xoops']->path($GLOBALS['xoopsModuleConfig']['dir_attachments'].'/');
39
+$thumb_path  = $attach_path.'thumbs/';
40 40
 $folder      = [$attach_path, $thumb_path];
41 41
 
42 42
 /** @var Xmf\Module\Admin $adminObject */
@@ -75,8 +75,8 @@  discard block
 block discarded – undo
75 75
     $imageLibs = [];
76 76
     unset($output, $status);
77 77
     if (1 == $GLOBALS['xoopsModuleConfig']['image_lib'] || 0 == $GLOBALS['xoopsModuleConfig']['image_lib']) {
78
-        $path = empty($GLOBALS['xoopsModuleConfig']['path_magick']) ? '' : $GLOBALS['xoopsModuleConfig']['path_magick'] . '/';
79
-        @exec($path . 'convert -version', $output, $status);
78
+        $path = empty($GLOBALS['xoopsModuleConfig']['path_magick']) ? '' : $GLOBALS['xoopsModuleConfig']['path_magick'].'/';
79
+        @exec($path.'convert -version', $output, $status);
80 80
         if (empty($status) && !empty($output) && preg_match("/imagemagick[ \t]+([0-9\.]+)/i", $output[0], $matches)) {
81 81
             $imageLibs['imagemagick'] = $matches[0];
82 82
         }
@@ -84,8 +84,8 @@  discard block
 block discarded – undo
84 84
         unset($output, $status);
85 85
     }
86 86
     if (2 == $GLOBALS['xoopsModuleConfig']['image_lib'] || 0 == $GLOBALS['xoopsModuleConfig']['image_lib']) {
87
-        $path = empty($GLOBALS['xoopsModuleConfig']['path_netpbm']) ? '' : $GLOBALS['xoopsModuleConfig']['path_netpbm'] . '/';
88
-        @exec($path . 'jpegtopnm -version 2>&1', $output, $status);
87
+        $path = empty($GLOBALS['xoopsModuleConfig']['path_netpbm']) ? '' : $GLOBALS['xoopsModuleConfig']['path_netpbm'].'/';
88
+        @exec($path.'jpegtopnm -version 2>&1', $output, $status);
89 89
         if (empty($status) && !empty($output) && preg_match("/netpbm[ \t]+([0-9\.]+)/i", $output[0], $matches)) {
90 90
             $imageLibs['netpbm'] = $matches[0];
91 91
         }
@@ -127,30 +127,30 @@  discard block
 block discarded – undo
127 127
 $adminObject->addInfoBox(_AM_NEWBB_PREFERENCES);
128 128
 // START irmtfan better poll module display link and version - check if xoops poll module is available
129 129
 if ($isOK) {
130
-    $pollLink = _AM_NEWBB_AVAILABLE . ': ';
131
-    $pollLink .= '<a href="' . XOOPS_URL . '/modules/' . $xoopspoll->getVar('dirname') . '/admin/index.php"';
132
-    $pollLink .= ' alt="' . $xoopspoll->getVar('name') . ' ' . _VERSION . ' (' . $xoopspoll->getInfo('version') . ') "';
133
-    $pollLink .= ' title="' . $xoopspoll->getVar('name') . ' ' . _VERSION . ' (' . $xoopspoll->getInfo('version') . ') "';
134
-    $pollLink .= '>' . '(' . $xoopspoll->getVar('name') . ')</a>';
130
+    $pollLink = _AM_NEWBB_AVAILABLE.': ';
131
+    $pollLink .= '<a href="'.XOOPS_URL.'/modules/'.$xoopspoll->getVar('dirname').'/admin/index.php"';
132
+    $pollLink .= ' alt="'.$xoopspoll->getVar('name').' '._VERSION.' ('.$xoopspoll->getInfo('version').') "';
133
+    $pollLink .= ' title="'.$xoopspoll->getVar('name').' '._VERSION.' ('.$xoopspoll->getInfo('version').') "';
134
+    $pollLink .= '>'.'('.$xoopspoll->getVar('name').')</a>';
135 135
 } else {
136 136
     $pollLink = _AM_NEWBB_NOTAVAILABLE;
137 137
 }
138
-$adminObject->addInfoBoxLine(sprintf(_AM_NEWBB_POLLMODULE . ': %s', $pollLink));
138
+$adminObject->addInfoBoxLine(sprintf(_AM_NEWBB_POLLMODULE.': %s', $pollLink));
139 139
 // END irmtfan better poll module display link and version - check if xoops poll module is available
140
-$adminObject->addInfoBoxLine(sprintf(_AM_NEWBB_IMAGEMAGICK . ' %s', array_key_exists('imagemagick', $imageLibs) ? _AM_NEWBB_AUTODETECTED . $imageLibs['imagemagick'] : _AM_NEWBB_NOTAVAILABLE));
141
-$adminObject->addInfoBoxLine(sprintf('NetPBM' . ': %s', array_key_exists('netpbm', $imageLibs) ? _AM_NEWBB_AUTODETECTED . $imageLibs['netpbm'] : _AM_NEWBB_NOTAVAILABLE));
142
-$adminObject->addInfoBoxLine(sprintf(_AM_NEWBB_GDLIB . ' %s', array_key_exists('gd', $imageLibs) ? _AM_NEWBB_AUTODETECTED . $imageLibs['gd'] : _AM_NEWBB_NOTAVAILABLE));
143
-$adminObject->addInfoBoxLine(sprintf(_AM_NEWBB_UPLOAD . ' %s', $uploadlimit));
144
-$adminObject->addInfoBoxLine(sprintf(_AM_NEWBB_INDEX_PDF_PAGE . '', ''));
140
+$adminObject->addInfoBoxLine(sprintf(_AM_NEWBB_IMAGEMAGICK.' %s', array_key_exists('imagemagick', $imageLibs) ? _AM_NEWBB_AUTODETECTED . $imageLibs['imagemagick'] : _AM_NEWBB_NOTAVAILABLE));
141
+$adminObject->addInfoBoxLine(sprintf('NetPBM'.': %s', array_key_exists('netpbm', $imageLibs) ? _AM_NEWBB_AUTODETECTED . $imageLibs['netpbm'] : _AM_NEWBB_NOTAVAILABLE));
142
+$adminObject->addInfoBoxLine(sprintf(_AM_NEWBB_GDLIB.' %s', array_key_exists('gd', $imageLibs) ? _AM_NEWBB_AUTODETECTED . $imageLibs['gd'] : _AM_NEWBB_NOTAVAILABLE));
143
+$adminObject->addInfoBoxLine(sprintf(_AM_NEWBB_UPLOAD.' %s', $uploadlimit));
144
+$adminObject->addInfoBoxLine(sprintf(_AM_NEWBB_INDEX_PDF_PAGE.'', ''));
145 145
 
146 146
 $adminObject->addInfoBox(_AM_NEWBB_BOARDSUMMARY);
147
-$adminObject->addInfoBoxLine(sprintf(_AM_NEWBB_TOTALTOPICS . ': %s', getTotalTopics()));
148
-$adminObject->addInfoBoxLine(sprintf(_AM_NEWBB_TOTALPOSTS . ': %s', getTotalPosts()));
149
-$adminObject->addInfoBoxLine(sprintf(_AM_NEWBB_TOTALVIEWS . ': %s', getTotalViews()));
147
+$adminObject->addInfoBoxLine(sprintf(_AM_NEWBB_TOTALTOPICS.': %s', getTotalTopics()));
148
+$adminObject->addInfoBoxLine(sprintf(_AM_NEWBB_TOTALPOSTS.': %s', getTotalPosts()));
149
+$adminObject->addInfoBoxLine(sprintf(_AM_NEWBB_TOTALVIEWS.': %s', getTotalViews()));
150 150
 
151 151
 $adminObject->addInfoBox(_AM_NEWBB_REPORT);
152
-$adminObject->addInfoBoxLine(sprintf(_AM_NEWBB_REPORT_PENDING . ': %s', $reportHandler->getCount(new \Criteria('report_result', 0))));
153
-$adminObject->addInfoBoxLine(sprintf(_AM_NEWBB_REPORT_PROCESSED . ': %s', $reportHandler->getCount(new \Criteria('report_result', 1))));
152
+$adminObject->addInfoBoxLine(sprintf(_AM_NEWBB_REPORT_PENDING.': %s', $reportHandler->getCount(new \Criteria('report_result', 0))));
153
+$adminObject->addInfoBoxLine(sprintf(_AM_NEWBB_REPORT_PROCESSED.': %s', $reportHandler->getCount(new \Criteria('report_result', 1))));
154 154
 
155 155
 foreach (array_keys($GLOBALS['uploadFolders']) as $i) {
156 156
     Newbb\Utility::prepareFolder($uploadFolders[$i]);
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
 $adminObject->displayNavigation(basename(__FILE__));
161 161
 $adminObject->displayIndex();
162 162
 
163
-require_once __DIR__ . '/admin_footer.php';
163
+require_once __DIR__.'/admin_footer.php';
164 164
 
165 165
 $cacheHelper = Newbb\Utility::cleanCache();
166 166
 //$cacheHelper = new \Xmf\Module\Helper\Cache('newbb');
@@ -192,6 +192,6 @@  discard block
 block discarded – undo
192 192
         $base   = log($sizeAsString) / log(1024);
193 193
         $suffix = ['', 'KB', 'MB', 'GB', 'TB'];
194 194
 
195
-        return round(pow(1024, $base - floor($base))) . ' ' . $suffix[(int)floor($base)];
195
+        return round(pow(1024, $base - floor($base))).' '.$suffix[(int)floor($base)];
196 196
     }
197 197
 }
Please login to merge, or discard this patch.