Passed
Push — master ( 4990f6...882d2a )
by Michael
03:01
created
admin/admin_synchronization.php 1 patch
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -12,9 +12,9 @@  discard block
 block discarded – undo
12 12
 use Xmf\Request;
13 13
 
14 14
 // irmtfan - TODO - should be changed completly with Newbb new function newbbSynchronization
15
-require_once __DIR__ . '/admin_header.php';
15
+require_once __DIR__.'/admin_header.php';
16 16
 xoops_cp_header();
17
-require_once __DIR__ . '/../include/functions.recon.php';
17
+require_once __DIR__.'/../include/functions.recon.php';
18 18
 $form = '';
19 19
 $form .= $adminObject->displayNavigation(basename(__FILE__));
20 20
 
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
     case 'forum':
27 27
         $result = newbbSynchronization('forum');
28 28
         if (!empty($result)) {
29
-            redirect_header('admin_synchronization.php', 2, _AM_NEWBB_SYNC_TYPE_FORUM . '<br>' . _AM_NEWBB_DATABASEUPDATED);
29
+            redirect_header('admin_synchronization.php', 2, _AM_NEWBB_SYNC_TYPE_FORUM.'<br>'._AM_NEWBB_DATABASEUPDATED);
30 30
         }
31 31
         break;
32 32
     // irmtfan rewrite topic sync
@@ -46,13 +46,13 @@  discard block
 block discarded – undo
46 46
             $topicHandler->synchronization($tObj);
47 47
         }
48 48
         $result = newbbSynchronization('topic');
49
-        redirect_header('admin_synchronization.php?type=topic&amp;start=' . ($start + $limit) . "&amp;limit={$limit}", 2, _AM_NEWBB_SYNCHING . " {$count}: {$start} - " . ($start + $limit));
49
+        redirect_header('admin_synchronization.php?type=topic&amp;start='.($start + $limit)."&amp;limit={$limit}", 2, _AM_NEWBB_SYNCHING." {$count}: {$start} - ".($start + $limit));
50 50
         break;
51 51
     // irmtfan rewrite post sync
52 52
     case 'post':
53 53
         $result = newbbSynchronization('post');
54 54
         if (!empty($result)) {
55
-            redirect_header('admin_synchronization.php', 2, _AM_NEWBB_SYNC_TYPE_POST . '<br>' . _AM_NEWBB_DATABASEUPDATED);
55
+            redirect_header('admin_synchronization.php', 2, _AM_NEWBB_SYNC_TYPE_POST.'<br>'._AM_NEWBB_DATABASEUPDATED);
56 56
         }
57 57
         break;
58 58
     // irmtfan - user is not in recon functions - only here
@@ -63,26 +63,26 @@  discard block
 block discarded – undo
63 63
         if ($start >= ($count = $userHandler->getCount())) {
64 64
             break;
65 65
         }
66
-        $sql    = '    SELECT uid' . '    FROM ' . $GLOBALS['xoopsDB']->prefix('users');
66
+        $sql    = '    SELECT uid'.'    FROM '.$GLOBALS['xoopsDB']->prefix('users');
67 67
         $result = $GLOBALS['xoopsDB']->query($sql, $limit, $start);
68 68
         while (false !== (list($uid) = $GLOBALS['xoopsDB']->fetchRow($result))) {
69 69
             // irmtfan approved=1 AND
70
-            $sql = '    SELECT count(*)' . '    FROM ' . $GLOBALS['xoopsDB']->prefix('newbb_topics') . "    WHERE topic_poster = {$uid}";
70
+            $sql = '    SELECT count(*)'.'    FROM '.$GLOBALS['xoopsDB']->prefix('newbb_topics')."    WHERE topic_poster = {$uid}";
71 71
             $ret = $GLOBALS['xoopsDB']->query($sql);
72 72
             list($topics) = $GLOBALS['xoopsDB']->fetchRow($ret);
73 73
             // irmtfan approved=1 AND
74
-            $sql = '    SELECT count(*)' . '    FROM ' . $GLOBALS['xoopsDB']->prefix('newbb_topics') . "    WHERE topic_digest > 0 AND topic_poster = {$uid}";
74
+            $sql = '    SELECT count(*)'.'    FROM '.$GLOBALS['xoopsDB']->prefix('newbb_topics')."    WHERE topic_digest > 0 AND topic_poster = {$uid}";
75 75
             $ret = $GLOBALS['xoopsDB']->query($sql);
76 76
             list($digests) = $GLOBALS['xoopsDB']->fetchRow($ret);
77 77
             // irmtfan approved=1 AND
78
-            $sql = '    SELECT count(*), MAX(post_time)' . '    FROM ' . $GLOBALS['xoopsDB']->prefix('newbb_posts') . "    WHERE uid = {$uid}";
78
+            $sql = '    SELECT count(*), MAX(post_time)'.'    FROM '.$GLOBALS['xoopsDB']->prefix('newbb_posts')."    WHERE uid = {$uid}";
79 79
             $ret = $GLOBALS['xoopsDB']->query($sql);
80 80
             list($posts, $lastpost) = $GLOBALS['xoopsDB']->fetchRow($ret);
81 81
 
82
-            $GLOBALS['xoopsDB']->queryF('    REPLACE INTO ' . $GLOBALS['xoopsDB']->prefix('newbb_user_stats') . "    SET uid = '{$uid}', user_topics = '{$topics}', user_posts = '{$posts}', user_digests = '{$digests}', user_lastpost = '{$lastpost}'");
82
+            $GLOBALS['xoopsDB']->queryF('    REPLACE INTO '.$GLOBALS['xoopsDB']->prefix('newbb_user_stats')."    SET uid = '{$uid}', user_topics = '{$topics}', user_posts = '{$posts}', user_digests = '{$digests}', user_lastpost = '{$lastpost}'");
83 83
         }
84 84
 
85
-        redirect_header('admin_synchronization.php?type=user&amp;start=' . ($start + $limit) . "&amp;limit={$limit}", 2, _AM_NEWBB_SYNCHING . " {$count}: {$start} - " . ($start + $limit));
85
+        redirect_header('admin_synchronization.php?type=user&amp;start='.($start + $limit)."&amp;limit={$limit}", 2, _AM_NEWBB_SYNCHING." {$count}: {$start} - ".($start + $limit));
86 86
         break;
87 87
     // irmtfan rewrite stats reset
88 88
     case 'stats':
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
     case 'read':
93 93
         $result = newbbSynchronization(['readtopic', 'readforum']);
94 94
         if (!empty($result)) {
95
-            redirect_header('admin_synchronization.php', 2, _AM_NEWBB_SYNC_TYPE_READ . '<br>' . _AM_NEWBB_DATABASEUPDATED);
95
+            redirect_header('admin_synchronization.php', 2, _AM_NEWBB_SYNC_TYPE_READ.'<br>'._AM_NEWBB_DATABASEUPDATED);
96 96
         }
97 97
         exit();
98 98
     // END irmtfan add read sync
@@ -106,70 +106,70 @@  discard block
 block discarded – undo
106 106
 
107 107
 $form .= '<form action="admin_synchronization.php" method="get">';
108 108
 $form .= '<div style="padding: 10px 2px;">';
109
-$form .= '<h2>' . _AM_NEWBB_SYNC_TYPE_FORUM . '</h2>';
109
+$form .= '<h2>'._AM_NEWBB_SYNC_TYPE_FORUM.'</h2>';
110 110
 $form .= '<input type="hidden" name="type" value="forum">';
111 111
 // $form .= _AM_NEWBB_SYNC_ITEMS.'<input type="text" name="limit" value="20">'; // irmtfan remove
112
-$form .= '<input type="submit" name="submit" value=' . _SUBMIT . ' />';
112
+$form .= '<input type="submit" name="submit" value='._SUBMIT.' />';
113 113
 $form .= '</div>';
114 114
 $form .= '</form>';
115 115
 
116 116
 $form .= '<form action="admin_synchronization.php" method="get">';
117 117
 $form .= '<div style="padding: 10px 2px;">';
118
-$form .= '<h2>' . _AM_NEWBB_SYNC_TYPE_TOPIC . '</h2>';
118
+$form .= '<h2>'._AM_NEWBB_SYNC_TYPE_TOPIC.'</h2>';
119 119
 $form .= '<input type="hidden" name="type" value="topic">';
120
-$form .= _AM_NEWBB_SYNC_ITEMS . '<input type="text" name="limit" value="1000">';
121
-$form .= '<input type="submit" name="submit" value=' . _SUBMIT . ' />';
120
+$form .= _AM_NEWBB_SYNC_ITEMS.'<input type="text" name="limit" value="1000">';
121
+$form .= '<input type="submit" name="submit" value='._SUBMIT.' />';
122 122
 $form .= '</div>';
123 123
 $form .= '</form>';
124 124
 
125 125
 $form .= '<form action="admin_synchronization.php" method="get">';
126 126
 $form .= '<div style="padding: 10px 2px;">';
127
-$form .= '<h2>' . _AM_NEWBB_SYNC_TYPE_POST . '</h2>';
127
+$form .= '<h2>'._AM_NEWBB_SYNC_TYPE_POST.'</h2>';
128 128
 $form .= '<input type="hidden" name="type" value="post">';
129 129
 // $form .= _AM_NEWBB_SYNC_ITEMS.'<input type="text" name="limit" value="1000">'; // irmtfan remove
130
-$form .= '<input type="submit" name="submit" value=' . _SUBMIT . ' />';
130
+$form .= '<input type="submit" name="submit" value='._SUBMIT.' />';
131 131
 $form .= '</div>';
132 132
 $form .= '</form>';
133 133
 
134 134
 $form .= '<form action="admin_synchronization.php" method="get">';
135 135
 $form .= '<div style="padding: 10px 2px;">';
136
-$form .= '<h2>' . _AM_NEWBB_SYNC_TYPE_USER . '</h2>';
136
+$form .= '<h2>'._AM_NEWBB_SYNC_TYPE_USER.'</h2>';
137 137
 $form .= '<input type="hidden" name="type" value="user">';
138
-$form .= _AM_NEWBB_SYNC_ITEMS . '<input type="text" name="limit" value="1000">';
139
-$form .= '<input type="submit" name="submit" value=' . _SUBMIT . ' />';
138
+$form .= _AM_NEWBB_SYNC_ITEMS.'<input type="text" name="limit" value="1000">';
139
+$form .= '<input type="submit" name="submit" value='._SUBMIT.' />';
140 140
 $form .= '</div>';
141 141
 $form .= '</form>';
142 142
 // START irmtfan add read sync
143 143
 $form .= '<form action="admin_synchronization.php" method="get">';
144 144
 $form .= '<div style="padding: 10px 2px;">';
145
-$form .= '<h2>' . _AM_NEWBB_SYNC_TYPE_READ . '</h2>';
145
+$form .= '<h2>'._AM_NEWBB_SYNC_TYPE_READ.'</h2>';
146 146
 $form .= '<input type="hidden" name="type" value="read">';
147
-$form .= '<input type="submit" name="submit" value=' . _SUBMIT . ' />';
147
+$form .= '<input type="submit" name="submit" value='._SUBMIT.' />';
148 148
 $form .= '</div>';
149 149
 $form .= '</form>';
150 150
 // END irmtfan add read sync
151 151
 
152 152
 $form .= '<form action="admin_synchronization.php" method="get">';
153 153
 $form .= '<div style="padding: 10px 2px;">';
154
-$form .= '<h2>' . _AM_NEWBB_SYNC_TYPE_STATS . '</h2>';
154
+$form .= '<h2>'._AM_NEWBB_SYNC_TYPE_STATS.'</h2>';
155 155
 $form .= '<input type="hidden" name="type" value="stats">';
156 156
 //$form .= _AM_NEWBB_SYNC_ITEMS.'<input type="text" name="limit" value="1000">';
157
-$form .= '<input type="submit" name="submit" value=' . _SUBMIT . ' />';
157
+$form .= '<input type="submit" name="submit" value='._SUBMIT.' />';
158 158
 $form .= '</div>';
159 159
 $form .= '</form>';
160 160
 
161 161
 $form .= '<form action="admin_synchronization.php" method="get">';
162 162
 $form .= '<div style="padding: 10px 2px;">';
163
-$form .= '<h2>' . _AM_NEWBB_SYNC_TYPE_MISC . '</h2>';
163
+$form .= '<h2>'._AM_NEWBB_SYNC_TYPE_MISC.'</h2>';
164 164
 $form .= '<input type="hidden" name="type" value="misc">';
165
-$form .= '<input type="submit" name="submit" value=' . _SUBMIT . ' />';
165
+$form .= '<input type="submit" name="submit" value='._SUBMIT.' />';
166 166
 $form .= '</div>';
167 167
 $form .= '</form>';
168
-echo "<table width='100%' border='0' cellspacing='1' class='outer'>" . "<tr><td class='odd'>";
168
+echo "<table width='100%' border='0' cellspacing='1' class='outer'>"."<tr><td class='odd'>";
169 169
 echo $form;
170 170
 echo '</td></tr></table>';
171 171
 echo '<fieldset>';
172
-echo '<legend>&nbsp;' . _MI_NEWBB_ADMENU_SYNC . '&nbsp;</legend>';
172
+echo '<legend>&nbsp;'._MI_NEWBB_ADMENU_SYNC.'&nbsp;</legend>';
173 173
 echo _AM_NEWBB_HELP_SYNC_TAB;
174 174
 echo '</fieldset>';
175
-require_once __DIR__ . '/admin_footer.php';
175
+require_once __DIR__.'/admin_footer.php';
Please login to merge, or discard this patch.
admin/admin_forum_manager.php 1 patch
Spacing   +59 added lines, -59 removed lines patch added patch discarded remove patch
@@ -32,11 +32,11 @@  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
 include $GLOBALS['xoops']->path('class/xoopstree.php');
37 37
 require_once $GLOBALS['xoops']->path('class/pagenav.php');
38
-require_once __DIR__ . '/../include/functions.forum.php';
39
-require_once __DIR__ . '/../include/functions.render.php';
38
+require_once __DIR__.'/../include/functions.forum.php';
39
+require_once __DIR__.'/../include/functions.render.php';
40 40
 
41 41
 $cacheHelper = Newbb\Utility::cleanCache();
42 42
 
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
             if ($forumHandler->insert($forumObject)) {
70 70
                 if ($cid !== $forumObject->getVar('cat_id') && $subforums = newbbGetSubForum($forum_id)) {
71 71
                     $forums = array_map('intval', array_values($subforums));
72
-                    $forumHandler->updateAll('cat_id', $cid, new \Criteria('forum_id', '(' . implode(', ', $forums) . ')', 'IN'));
72
+                    $forumHandler->updateAll('cat_id', $cid, new \Criteria('forum_id', '('.implode(', ', $forums).')', 'IN'));
73 73
                 }
74 74
 
75 75
                 //$cacheHelper->delete('forum');
@@ -79,19 +79,19 @@  discard block
 block discarded – undo
79 79
             }
80 80
         } else {
81 81
             $box = '<select name="dest_forum">';
82
-            $box .= '<option value=0 selected>' . _SELECT . '</option>';
82
+            $box .= '<option value=0 selected>'._SELECT.'</option>';
83 83
             $box .= newbbForumSelectBox($forum_id, 'all', true, true);
84 84
             $box .= '</select>';
85 85
 
86
-            echo "<table width='100%' border='0' cellspacing='1' class='outer'>" . "<tr><td class='odd'>";
86
+            echo "<table width='100%' border='0' cellspacing='1' class='outer'>"."<tr><td class='odd'>";
87 87
             echo '<form action="./admin_forum_manager.php" method="post" name="forummove" id="forummove">';
88 88
             echo '<input type="hidden" name="op" value="moveforum" />';
89
-            echo '<input type="hidden" name="forum" value=' . $forum_id . ' />';
89
+            echo '<input type="hidden" name="forum" value='.$forum_id.' />';
90 90
             echo '<table border="0" cellpadding="1" cellspacing="0" align="center" valign="top" width="95%"><tr>';
91
-            echo '<td class="bg2" align="center"><strong>' . _AM_NEWBB_MOVETHISFORUM . '</strong></td>';
91
+            echo '<td class="bg2" align="center"><strong>'._AM_NEWBB_MOVETHISFORUM.'</strong></td>';
92 92
             echo '</tr>';
93
-            echo '<tr><td class="bg1" align="center">' . $box . '</td></tr>';
94
-            echo '<tr><td align="center"><input type="submit" name="save" value=' . _GO . ' class="button" /></td></tr>';
93
+            echo '<tr><td class="bg1" align="center">'.$box.'</td></tr>';
94
+            echo '<tr><td align="center"><input type="submit" name="save" value='._GO.' class="button" /></td></tr>';
95 95
             echo '</table></form>';
96 96
             echo '</td></tr></table>';
97 97
         }
@@ -104,17 +104,17 @@  discard block
 block discarded – undo
104 104
             $forum_dest = $forumHandler->get(Request::getString('dest_forum', '', 'POST'));
105 105
             if (is_object($forum_dest)) {
106 106
                 $cid         = $forum_dest->getVar('cat_id');
107
-                $sql         = '    UPDATE ' . $GLOBALS['xoopsDB']->prefix('newbb_posts') . '    SET forum_id=' . Request::getInt('dest_forum', 0, 'POST') . "    WHERE forum_id=$forum_id";
107
+                $sql         = '    UPDATE '.$GLOBALS['xoopsDB']->prefix('newbb_posts').'    SET forum_id='.Request::getInt('dest_forum', 0, 'POST')."    WHERE forum_id=$forum_id";
108 108
                 $result_post = $GLOBALS['xoopsDB']->queryF($sql);
109 109
 
110
-                $sql          = '    UPDATE ' . $GLOBALS['xoopsDB']->prefix('newbb_topics') . '    SET forum_id=' . Request::getInt('dest_forum', 0, 'POST') . "    WHERE forum_id=$forum_id";
110
+                $sql          = '    UPDATE '.$GLOBALS['xoopsDB']->prefix('newbb_topics').'    SET forum_id='.Request::getInt('dest_forum', 0, 'POST')."    WHERE forum_id=$forum_id";
111 111
                 $result_topic = $GLOBALS['xoopsDB']->queryF($sql);
112 112
 
113 113
                 $forumObject = $forumHandler->get($forum_id);
114 114
                 $forumHandler->updateAll('parent_forum', Request::getInt('dest_forum', 0, 'POST'), new \Criteria('parent_forum', $forum_id));
115 115
                 if ($cid !== $forumObject->getVar('cat_id') && $subforums = newbbGetSubForum($forum_id)) {
116 116
                     $forums = array_map('intval', array_values($subforums));
117
-                    $forumHandler->updateAll('cat_id', $cid, new \Criteria('forum_id', '(' . implode(', ', $forums) . ')', 'IN'));
117
+                    $forumHandler->updateAll('cat_id', $cid, new \Criteria('forum_id', '('.implode(', ', $forums).')', 'IN'));
118 118
                 }
119 119
 
120 120
                 $forumHandler->delete($forumObject);
@@ -129,19 +129,19 @@  discard block
 block discarded – undo
129 129
             }
130 130
         } else {
131 131
             $box = '<select name="dest_forum">';
132
-            $box .= '<option value=0 selected>' . _SELECT . '</option>';
132
+            $box .= '<option value=0 selected>'._SELECT.'</option>';
133 133
             $box .= newbbForumSelectBox($forum_id, 'all');
134 134
             $box .= '</select>';
135
-            echo "<table width='100%' border='0' cellspacing='1' class='outer'>" . "<tr><td class='odd'>";
136
-            echo '<form action="' . xoops_getenv('PHP_SELF') . '" method="post" name="forummove" id="forummove">';
135
+            echo "<table width='100%' border='0' cellspacing='1' class='outer'>"."<tr><td class='odd'>";
136
+            echo '<form action="'.xoops_getenv('PHP_SELF').'" method="post" name="forummove" id="forummove">';
137 137
             echo '<input type="hidden" name="op" value="mergeforum" />';
138
-            echo '<input type="hidden" name="forum" value=' . $forum_id . ' />';
138
+            echo '<input type="hidden" name="forum" value='.$forum_id.' />';
139 139
             echo '<table border="0" cellpadding="1" cellspacing="0" align="center" valign="top" width="95%"><tr>';
140
-            echo '<td class="bg2" align="center"><strong>' . _AM_NEWBB_MERGETHISFORUM . '</strong></td>';
140
+            echo '<td class="bg2" align="center"><strong>'._AM_NEWBB_MERGETHISFORUM.'</strong></td>';
141 141
             echo '</tr>';
142
-            echo '<tr><td class="bg1" align="center">' . _AM_NEWBB_MERGETO_FORUM . '</td></tr>';
143
-            echo '<tr><td class="bg1" align="center">' . $box . '</td></tr>';
144
-            echo '<tr><td align="center"><input type="submit" name="save" value=' . _GO . ' class="button" /></td></tr>';
142
+            echo '<tr><td class="bg1" align="center">'._AM_NEWBB_MERGETO_FORUM.'</td></tr>';
143
+            echo '<tr><td class="bg1" align="center">'.$box.'</td></tr>';
144
+            echo '<tr><td align="center"><input type="submit" name="save" value='._GO.' class="button" /></td></tr>';
145 145
             echo '</form></table>';
146 146
             echo '</td></tr></table>';
147 147
         }
@@ -196,13 +196,13 @@  discard block
 block discarded – undo
196 196
             }
197 197
             redirect_header('admin_forum_manager.php', 2, $message);
198 198
         } else {
199
-            redirect_header('admin_forum_manager.php?op=mod&amp;forum=' . $forumObject->getVar('forum_id') . '', 2, _AM_NEWBB_FORUM_ERROR);
199
+            redirect_header('admin_forum_manager.php?op=mod&amp;forum='.$forumObject->getVar('forum_id').'', 2, _AM_NEWBB_FORUM_ERROR);
200 200
         }
201 201
         break;
202 202
 
203 203
     case 'mod':
204 204
         $forumObject = $forumHandler->get($forum_id);
205
-        include $GLOBALS['xoops']->path('modules/' . $xoopsModule->getVar('dirname') . '/include/form.forum.php');
205
+        include $GLOBALS['xoops']->path('modules/'.$xoopsModule->getVar('dirname').'/include/form.forum.php');
206 206
         break;
207 207
 
208 208
     case 'del':
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
         $forumObject = $forumHandler->create();
228 228
         $forumObject->setVar('parent_forum', $parent_forum);
229 229
         $forumObject->setVar('cat_id', $cat_id);
230
-        include $GLOBALS['xoops']->path('modules/' . $xoopsModule->getVar('dirname') . '/include/form.forum.php');
230
+        include $GLOBALS['xoops']->path('modules/'.$xoopsModule->getVar('dirname').'/include/form.forum.php');
231 231
         break;
232 232
 
233 233
     default:
@@ -242,15 +242,15 @@  discard block
 block discarded – undo
242 242
         }
243 243
 
244 244
         $echo = $adminObject->displayNavigation(basename(__FILE__));
245
-        $echo .= "<table width='100%' border='0' cellspacing='1' class='outer'>" . "<tr><td class='odd'>";
245
+        $echo .= "<table width='100%' border='0' cellspacing='1' class='outer'>"."<tr><td class='odd'>";
246 246
         $echo .= "<table border='0' cellpadding='4' cellspacing='1' width='100%' class='outer'>";
247 247
         $echo .= "<tr align='center'>";
248
-        $echo .= "<th class='bg3' colspan='2'>" . _AM_NEWBB_NAME . '</th>';
249
-        $echo .= "<th class='bg3'>" . _AM_NEWBB_EDIT . '</th>';
250
-        $echo .= "<th class='bg3'>" . _AM_NEWBB_DELETE . '</th>';
251
-        $echo .= "<th class='bg3'>" . _AM_NEWBB_ADD . '</th>';
252
-        $echo .= "<th class='bg3'>" . _AM_NEWBB_MOVE . '</th>';
253
-        $echo .= "<th class='bg3'>" . _AM_NEWBB_MERGE . '</th>';
248
+        $echo .= "<th class='bg3' colspan='2'>"._AM_NEWBB_NAME.'</th>';
249
+        $echo .= "<th class='bg3'>"._AM_NEWBB_EDIT.'</th>';
250
+        $echo .= "<th class='bg3'>"._AM_NEWBB_DELETE.'</th>';
251
+        $echo .= "<th class='bg3'>"._AM_NEWBB_ADD.'</th>';
252
+        $echo .= "<th class='bg3'>"._AM_NEWBB_MOVE.'</th>';
253
+        $echo .= "<th class='bg3'>"._AM_NEWBB_MERGE.'</th>';
254 254
         $echo .= '</tr>';
255 255
 
256 256
         //        $categoryHandler  = Newbb\Helper::getInstance()->getHandler('Category');
@@ -261,15 +261,15 @@  discard block
 block discarded – undo
261 261
         foreach (array_keys($categories) as $c) {
262 262
             $category       = $categories[$c];
263 263
             $cat_id         = $c;
264
-            $cat_link       = '<a href="' . XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname', 'n') . '/index.php?viewcat=' . $cat_id . '">' . $category . '</a>';
265
-            $cat_edit_link  = '<a href="admin_cat_manager.php?op=mod&amp;cat_id=' . $cat_id . '">' . newbbDisplayImage('admin_edit', _EDIT) . '</a>';
266
-            $cat_del_link   = '<a href="admin_cat_manager.php?op=del&amp;cat_id=' . $cat_id . '">' . newbbDisplayImage('admin_delete', _DELETE) . '</a>';
267
-            $forum_add_link = '<a href="admin_forum_manager.php?op=addforum&amp;cat_id=' . $cat_id . '">' . newbbDisplayImage('new_forum') . '</a>';
264
+            $cat_link       = '<a href="'.XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname', 'n').'/index.php?viewcat='.$cat_id.'">'.$category.'</a>';
265
+            $cat_edit_link  = '<a href="admin_cat_manager.php?op=mod&amp;cat_id='.$cat_id.'">'.newbbDisplayImage('admin_edit', _EDIT).'</a>';
266
+            $cat_del_link   = '<a href="admin_cat_manager.php?op=del&amp;cat_id='.$cat_id.'">'.newbbDisplayImage('admin_delete', _DELETE).'</a>';
267
+            $forum_add_link = '<a href="admin_forum_manager.php?op=addforum&amp;cat_id='.$cat_id.'">'.newbbDisplayImage('new_forum').'</a>';
268 268
             $echo           .= "<tr class='even' align='left'>";
269
-            $echo           .= "<td width='100%' colspan='2'><strong>" . $cat_link . '</strong></td>';
270
-            $echo           .= "<td align='center'>" . $cat_edit_link . '</td>';
271
-            $echo           .= "<td align='center'>" . $cat_del_link . '</td>';
272
-            $echo           .= "<td align='center'>" . $forum_add_link . '</td>';
269
+            $echo           .= "<td width='100%' colspan='2'><strong>".$cat_link.'</strong></td>';
270
+            $echo           .= "<td align='center'>".$cat_edit_link.'</td>';
271
+            $echo           .= "<td align='center'>".$cat_del_link.'</td>';
272
+            $echo           .= "<td align='center'>".$forum_add_link.'</td>';
273 273
             $echo           .= '<td></td>';
274 274
             $echo           .= '<td></td>';
275 275
             $echo           .= '</tr>';
@@ -279,21 +279,21 @@  discard block
 block discarded – undo
279 279
             $i = 0;
280 280
             foreach (array_keys($forums[$c]) as $f) {
281 281
                 $forum        = $forums[$c][$f];
282
-                $f_link       = $forum['prefix'] . '<a href="' . XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname', 'n') . '/viewforum.php?forum=' . $f . '">' . $forum['forum_name'] . '</a>';
283
-                $f_edit_link  = '<a href="admin_forum_manager.php?op=mod&amp;forum=' . $f . '">' . newbbDisplayImage('admin_edit', _AM_NEWBB_EDIT) . '</a>';
284
-                $f_del_link   = '<a href="admin_forum_manager.php?op=del&amp;forum=' . $f . '">' . newbbDisplayImage('admin_delete', _AM_NEWBB_DELETE) . '</a>';
285
-                $sf_add_link  = '<a href="admin_forum_manager.php?op=addforum&amp;cat_id=' . $c . '&forum=' . $f . '">' . newbbDisplayImage('new_forum', _AM_NEWBB_CREATEFORUM) . '</a>';
286
-                $f_move_link  = '<a href="admin_forum_manager.php?op=moveforum&amp;forum=' . $f . '">' . newbbDisplayImage('admin_move', _AM_NEWBB_MOVE) . '</a>';
287
-                $f_merge_link = '<a href="admin_forum_manager.php?op=mergeforum&amp;forum=' . $f . '">' . newbbDisplayImage('admin_merge', _AM_NEWBB_MERGE) . '</a>';
282
+                $f_link       = $forum['prefix'].'<a href="'.XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname', 'n').'/viewforum.php?forum='.$f.'">'.$forum['forum_name'].'</a>';
283
+                $f_edit_link  = '<a href="admin_forum_manager.php?op=mod&amp;forum='.$f.'">'.newbbDisplayImage('admin_edit', _AM_NEWBB_EDIT).'</a>';
284
+                $f_del_link   = '<a href="admin_forum_manager.php?op=del&amp;forum='.$f.'">'.newbbDisplayImage('admin_delete', _AM_NEWBB_DELETE).'</a>';
285
+                $sf_add_link  = '<a href="admin_forum_manager.php?op=addforum&amp;cat_id='.$c.'&forum='.$f.'">'.newbbDisplayImage('new_forum', _AM_NEWBB_CREATEFORUM).'</a>';
286
+                $f_move_link  = '<a href="admin_forum_manager.php?op=moveforum&amp;forum='.$f.'">'.newbbDisplayImage('admin_move', _AM_NEWBB_MOVE).'</a>';
287
+                $f_merge_link = '<a href="admin_forum_manager.php?op=mergeforum&amp;forum='.$f.'">'.newbbDisplayImage('admin_merge', _AM_NEWBB_MERGE).'</a>';
288 288
 
289 289
                 $class = (($i++) % 2) ? 'odd' : 'even';
290
-                $echo  .= "<tr class='" . $class . "' align='left'><td></td>";
291
-                $echo  .= '<td><strong>' . $f_link . '</strong></td>';
292
-                $echo  .= "<td align='center'>" . $f_edit_link . '</td>';
293
-                $echo  .= "<td align='center'>" . $f_del_link . '</td>';
294
-                $echo  .= "<td align='center'>" . $sf_add_link . '</td>';
295
-                $echo  .= "<td align='center'>" . $f_move_link . '</td>';
296
-                $echo  .= "<td align='center'>" . $f_merge_link . '</td>';
290
+                $echo  .= "<tr class='".$class."' align='left'><td></td>";
291
+                $echo  .= '<td><strong>'.$f_link.'</strong></td>';
292
+                $echo  .= "<td align='center'>".$f_edit_link.'</td>';
293
+                $echo  .= "<td align='center'>".$f_del_link.'</td>';
294
+                $echo  .= "<td align='center'>".$sf_add_link.'</td>';
295
+                $echo  .= "<td align='center'>".$f_move_link.'</td>';
296
+                $echo  .= "<td align='center'>".$f_merge_link.'</td>';
297 297
                 $echo  .= '</tr>';
298 298
             }
299 299
         }
@@ -303,14 +303,14 @@  discard block
 block discarded – undo
303 303
         echo '</table>';
304 304
         echo '</td></tr></table>';
305 305
         echo '<fieldset>';
306
-        echo '<legend>&nbsp;' . _MI_NEWBB_ADMENU_FORUM . '&nbsp;</legend>';
306
+        echo '<legend>&nbsp;'._MI_NEWBB_ADMENU_FORUM.'&nbsp;</legend>';
307 307
         echo _AM_NEWBB_HELP_FORUM_TAB;
308
-        echo '<br>' . newbbDisplayImage('admin_edit', _EDIT) . '&nbsp;-&nbsp;' . _EDIT;
309
-        echo '<br>' . newbbDisplayImage('admin_delete', _DELETE) . '&nbsp;-&nbsp;' . _DELETE;
310
-        echo '<br>' . newbbDisplayImage('new_forum', _AM_NEWBB_CREATEFORUM) . '&nbsp;-&nbsp;' . _AM_NEWBB_CREATEFORUM;
311
-        echo '<br>' . newbbDisplayImage('admin_move', _AM_NEWBB_MOVE) . '&nbsp;-&nbsp;' . _AM_NEWBB_MOVE;
312
-        echo '<br>' . newbbDisplayImage('admin_merge', _AM_NEWBB_MERGE) . '&nbsp;-&nbsp;' . _AM_NEWBB_MERGE;
308
+        echo '<br>'.newbbDisplayImage('admin_edit', _EDIT).'&nbsp;-&nbsp;'._EDIT;
309
+        echo '<br>'.newbbDisplayImage('admin_delete', _DELETE).'&nbsp;-&nbsp;'._DELETE;
310
+        echo '<br>'.newbbDisplayImage('new_forum', _AM_NEWBB_CREATEFORUM).'&nbsp;-&nbsp;'._AM_NEWBB_CREATEFORUM;
311
+        echo '<br>'.newbbDisplayImage('admin_move', _AM_NEWBB_MOVE).'&nbsp;-&nbsp;'._AM_NEWBB_MOVE;
312
+        echo '<br>'.newbbDisplayImage('admin_merge', _AM_NEWBB_MERGE).'&nbsp;-&nbsp;'._AM_NEWBB_MERGE;
313 313
         echo '</fieldset>';
314 314
         break;
315 315
 }
316
-require_once __DIR__ . '/admin_footer.php';
316
+require_once __DIR__.'/admin_footer.php';
Please login to merge, or discard this patch.
admin/admin_forum_prune.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 
28 28
 use Xmf\Request;
29 29
 
30
-require_once __DIR__ . '/admin_header.php';
30
+require_once __DIR__.'/admin_header.php';
31 31
 require_once $GLOBALS['xoops']->path('class/xoopsformloader.php');
32 32
 
33 33
 xoops_cp_header();
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 //if (!$newXoopsModuleGui) loadModuleAdminMenu(5, _AM_NEWBB_PRUNE_TITLE);
37 37
 //    else $adminObject->displayNavigation(basename(__FILE__));
38 38
 
39
-echo "<table width='100%' border='0' cellspacing='1' class='outer'>" . "<tr><td class='odd'>";
39
+echo "<table width='100%' border='0' cellspacing='1' class='outer'>"."<tr><td class='odd'>";
40 40
 
41 41
 if (Request::getString('submit', '', 'POST')) {
42 42
     $post_list       = null;
@@ -63,8 +63,8 @@  discard block
 block discarded – undo
63 63
     $hot         = Request::getInt('hot', 0, 'POST');
64 64
     $store       = Request::getInt('store', null, 'POST');
65 65
 
66
-    $sql = 'SELECT t.topic_id FROM ' . $GLOBALS['xoopsDB']->prefix('newbb_topics') . ' t, ' . $GLOBALS['xoopsDB']->prefix('newbb_posts') . '  p
67
-                    WHERE t.forum_id IN (' . $selected_forums . ')
66
+    $sql = 'SELECT t.topic_id FROM '.$GLOBALS['xoopsDB']->prefix('newbb_topics').' t, '.$GLOBALS['xoopsDB']->prefix('newbb_posts').'  p
67
+                    WHERE t.forum_id IN (' . $selected_forums.')
68 68
                     AND p.post_id =t.topic_last_post_id ';
69 69
 
70 70
     if ($sticky) {
@@ -77,10 +77,10 @@  discard block
 block discarded – undo
77 77
         $sql .= ' AND t.topic_status <> 1 ';
78 78
     }
79 79
     if (0 !== $hot) {
80
-        $sql .= ' AND t.topic_replies < ' . $hot . ' ';
80
+        $sql .= ' AND t.topic_replies < '.$hot.' ';
81 81
     }
82 82
 
83
-    $sql .= ' AND p.post_time<= ' . $prune_ddays . ' ';
83
+    $sql .= ' AND p.post_time<= '.$prune_ddays.' ';
84 84
     // Ok now we have the sql query completed, go for topic_id's and posts_id's
85 85
     $topics = [];
86 86
     if (!$result = $GLOBALS['xoopsDB']->query($sql)) {
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
     $post_list     = '';
96 96
 
97 97
     if ('' !== $topic_list) {
98
-        $sql = 'SELECT post_id FROM ' . $GLOBALS['xoopsDB']->prefix('newbb_posts') . ' WHERE topic_id IN (' . $topic_list . ')';
98
+        $sql = 'SELECT post_id FROM '.$GLOBALS['xoopsDB']->prefix('newbb_posts').' WHERE topic_id IN ('.$topic_list.')';
99 99
 
100 100
         $posts = [];
101 101
         if (!$result = $GLOBALS['xoopsDB']->query($sql)) {
@@ -112,35 +112,35 @@  discard block
 block discarded – undo
112 112
     if ('' !== $post_list) {
113 113
         // COPY POSTS TO OTHER FORUM
114 114
         if (null !== $store) {
115
-            $sql = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('newbb_posts') . " SET forum_id=$store WHERE topic_id IN ($topic_list)";
115
+            $sql = 'UPDATE '.$GLOBALS['xoopsDB']->prefix('newbb_posts')." SET forum_id=$store WHERE topic_id IN ($topic_list)";
116 116
             if (!$result = $GLOBALS['xoopsDB']->query($sql)) {
117 117
                 return _MD_NEWBB_ERROR;
118 118
             }
119 119
 
120
-            $sql = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('newbb_topics') . " SET forum_id=$store WHERE topic_id IN ($topic_list)";
120
+            $sql = 'UPDATE '.$GLOBALS['xoopsDB']->prefix('newbb_topics')." SET forum_id=$store WHERE topic_id IN ($topic_list)";
121 121
             if (!$result = $GLOBALS['xoopsDB']->query($sql)) {
122 122
                 return _MD_NEWBB_ERROR;
123 123
             }
124 124
         } else {
125 125
             // ARCHIVING POSTS
126 126
             if (1 == $archive) {
127
-                $result = $GLOBALS['xoopsDB']->query('SELECT p.topic_id, p.post_id, t.post_text FROM ' . $GLOBALS['xoopsDB']->prefix('newbb_posts') . ' p, ' . $GLOBALS['xoopsDB']->prefix('newbb_posts_text') . " t WHERE p.post_id IN ($post_list) AND p.post_id=t.post_id");
127
+                $result = $GLOBALS['xoopsDB']->query('SELECT p.topic_id, p.post_id, t.post_text FROM '.$GLOBALS['xoopsDB']->prefix('newbb_posts').' p, '.$GLOBALS['xoopsDB']->prefix('newbb_posts_text')." t WHERE p.post_id IN ($post_list) AND p.post_id=t.post_id");
128 128
                 while (false !== (list($topic_id, $post_id, $post_text) = $GLOBALS['xoopsDB']->fetchRow($result))) {
129
-                    $sql = $GLOBALS['xoopsDB']->query('INSERT INTO ' . $GLOBALS['xoopsDB']->prefix('newbb_archive') . " (topic_id, post_id, post_text) VALUES ($topic_id, $post_id, $post_text)");
129
+                    $sql = $GLOBALS['xoopsDB']->query('INSERT INTO '.$GLOBALS['xoopsDB']->prefix('newbb_archive')." (topic_id, post_id, post_text) VALUES ($topic_id, $post_id, $post_text)");
130 130
                 }
131 131
             }
132 132
             // DELETE POSTS
133
-            $sql = 'DELETE FROM ' . $GLOBALS['xoopsDB']->prefix('newbb_posts') . " WHERE topic_id IN ($topic_list)";
133
+            $sql = 'DELETE FROM '.$GLOBALS['xoopsDB']->prefix('newbb_posts')." WHERE topic_id IN ($topic_list)";
134 134
             if (!$result = $GLOBALS['xoopsDB']->query($sql)) {
135 135
                 return _MD_NEWBB_ERROR;
136 136
             }
137 137
             // DELETE TOPICS
138
-            $sql = 'DELETE FROM ' . $GLOBALS['xoopsDB']->prefix('newbb_topics') . " WHERE topic_id IN ($topic_list)";
138
+            $sql = 'DELETE FROM '.$GLOBALS['xoopsDB']->prefix('newbb_topics')." WHERE topic_id IN ($topic_list)";
139 139
             if (!$result = $GLOBALS['xoopsDB']->query($sql)) {
140 140
                 return _MD_NEWBB_ERROR;
141 141
             }
142 142
             // DELETE POSTS_TEXT
143
-            $sql = 'DELETE FROM ' . $GLOBALS['xoopsDB']->prefix('newbb_posts_text') . " WHERE post_id IN ($post_list)";
143
+            $sql = 'DELETE FROM '.$GLOBALS['xoopsDB']->prefix('newbb_posts_text')." WHERE post_id IN ($post_list)";
144 144
             if (!$result = $GLOBALS['xoopsDB']->query($sql)) {
145 145
                 return _MD_NEWBB_ERROR;
146 146
             }
@@ -179,15 +179,15 @@  discard block
 block discarded – undo
179 179
                           ]);
180 180
     $sform->addElement($days);
181 181
     // START irmtfan remove hardcode db access
182
-    require_once $GLOBALS['xoops']->path('modules/' . $xoopsModule->getVar('dirname') . '/footer.php'); // to include js files
183
-    require_once __DIR__ . '/../include/functions.forum.php';
184
-    $forumSelMulti  = "<select name=\"forums[]\" multiple=\"multiple\" onfocus = \"validate('forums[]','select', false,true)\">";// disable all categories
182
+    require_once $GLOBALS['xoops']->path('modules/'.$xoopsModule->getVar('dirname').'/footer.php'); // to include js files
183
+    require_once __DIR__.'/../include/functions.forum.php';
184
+    $forumSelMulti  = "<select name=\"forums[]\" multiple=\"multiple\" onfocus = \"validate('forums[]','select', false,true)\">"; // disable all categories
185 185
     $forumSelSingle = "<select name=\"store\" onfocus = \"validate('store','select', false,true)\">"; // disable all categories
186
-    $forumSelBox    = '<option value = 0 >-- ' . _AM_NEWBB_PERM_FORUMS . ' --</option>';
186
+    $forumSelBox    = '<option value = 0 >-- '._AM_NEWBB_PERM_FORUMS.' --</option>';
187 187
     $forumSelBox    .= newbbForumSelectBox(null, 'access', false); //$accessForums = nothing, $permission = "access", $delimitorCategory = false
188 188
     $forumSelBox    .= '</select>';
189
-    $forumEle       = new \XoopsFormLabel(_AM_NEWBB_PRUNE_FORUMS, $forumSelMulti . $forumSelBox);
190
-    $storeEle       = new \XoopsFormLabel(_AM_NEWBB_PRUNE_STORE, $forumSelSingle . $forumSelBox);
189
+    $forumEle       = new \XoopsFormLabel(_AM_NEWBB_PRUNE_FORUMS, $forumSelMulti.$forumSelBox);
190
+    $storeEle       = new \XoopsFormLabel(_AM_NEWBB_PRUNE_STORE, $forumSelSingle.$forumSelBox);
191 191
     /* irmtfan remove hardcode
192 192
     $checkbox = new \XoopsFormCheckBox(_AM_NEWBB_PRUNE_FORUMS, 'forums');
193 193
     $radiobox = new \XoopsFormRadio(_AM_NEWBB_PRUNE_STORE, 'store');
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
 
257 257
 echo '</td></tr></table>';
258 258
 echo '<fieldset>';
259
-echo '<legend>&nbsp;' . _MI_NEWBB_ADMENU_PRUNE . '&nbsp;</legend>';
259
+echo '<legend>&nbsp;'._MI_NEWBB_ADMENU_PRUNE.'&nbsp;</legend>';
260 260
 echo _AM_NEWBB_HELP_PRUNE_TAB;
261 261
 echo '</fieldset>';
262
-require_once __DIR__ . '/admin_footer.php';
262
+require_once __DIR__.'/admin_footer.php';
Please login to merge, or discard this patch.
admin/admin_cat_manager.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -32,8 +32,8 @@  discard block
 block discarded – undo
32 32
 use Xmf\Request;
33 33
 use XoopsModules\Newbb;
34 34
 
35
-require_once __DIR__ . '/admin_header.php';
36
-require_once __DIR__ . '/../include/functions.render.php';
35
+require_once __DIR__.'/admin_header.php';
36
+require_once __DIR__.'/../include/functions.render.php';
37 37
 
38 38
 xoops_cp_header();
39 39
 
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
     require_once $GLOBALS['xoops']->path('class/xoopsformloader.php');
70 70
 
71 71
     if (!$categoryObject->isNew()) {
72
-        $sform = new \XoopsThemeForm(_AM_NEWBB_EDITCATEGORY . ' ' . $categoryObject->getVar('cat_title'), 'op', xoops_getenv('PHP_SELF'));
72
+        $sform = new \XoopsThemeForm(_AM_NEWBB_EDITCATEGORY.' '.$categoryObject->getVar('cat_title'), 'op', xoops_getenv('PHP_SELF'));
73 73
     } else {
74 74
         $sform = new \XoopsThemeForm(_AM_NEWBB_CREATENEWCATEGORY, 'op', xoops_getenv('PHP_SELF'));
75 75
         $categoryObject->setVar('cat_title', '');
@@ -83,17 +83,17 @@  discard block
 block discarded – undo
83 83
     $sform->addElement(new \XoopsFormText(_AM_NEWBB_CATEGORY, 'title', 50, 80, $categoryObject->getVar('cat_title', 'E')), true);
84 84
     $sform->addElement(new \XoopsFormDhtmlTextArea(_AM_NEWBB_CATEGORYDESC, 'cat_description', $categoryObject->getVar('cat_description', 'E'), 10, 60), false);
85 85
 
86
-    $imgdir      = '/modules/' . $xoopsModule->getVar('dirname') . '/assets/images/category';
86
+    $imgdir      = '/modules/'.$xoopsModule->getVar('dirname').'/assets/images/category';
87 87
     $cat_image   = $categoryObject->getVar('cat_image');
88 88
     $cat_image   = empty($cat_image) ? 'blank.gif' : $cat_image;
89
-    $graph_array = \XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH . $imgdir . '/');
89
+    $graph_array = \XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH.$imgdir.'/');
90 90
     array_unshift($graph_array, _NONE);
91 91
     $cat_image_select = new \XoopsFormSelect('', 'cat_image', $categoryObject->getVar('cat_image'));
92 92
     $cat_image_select->addOptionArray($graph_array);
93
-    $cat_image_select->setExtra("onchange=\"showImgSelected('img', 'cat_image', '/" . $imgdir . "/', '', '" . XOOPS_URL . "')\"");
93
+    $cat_image_select->setExtra("onchange=\"showImgSelected('img', 'cat_image', '/".$imgdir."/', '', '".XOOPS_URL."')\"");
94 94
     $cat_image_tray = new \XoopsFormElementTray(_AM_NEWBB_IMAGE, '&nbsp;');
95 95
     $cat_image_tray->addElement($cat_image_select);
96
-    $cat_image_tray->addElement(new \XoopsFormLabel('', "<br><img src='" . XOOPS_URL . $imgdir . '/' . $cat_image . " 'name='img' id='img' alt='' />"));
96
+    $cat_image_tray->addElement(new \XoopsFormLabel('', "<br><img src='".XOOPS_URL.$imgdir.'/'.$cat_image." 'name='img' id='img' alt='' />"));
97 97
     $sform->addElement($cat_image_tray);
98 98
 
99 99
     $sform->addElement(new \XoopsFormText(_AM_NEWBB_SPONSORLINK, 'cat_url', 50, 80, $categoryObject->getVar('cat_url', 'E')), false);
@@ -180,32 +180,32 @@  discard block
 block discarded – undo
180 180
         $adminObject->addItemButton(_AM_NEWBB_CREATENEWCATEGORY, 'admin_cat_manager.php?op=mod', $icon = 'add');
181 181
         $adminObject->displayButton('left');
182 182
 
183
-        echo "<table width='100%' border='0' cellspacing='1' class='outer'>" . "<tr><td class='odd'>";
183
+        echo "<table width='100%' border='0' cellspacing='1' class='outer'>"."<tr><td class='odd'>";
184 184
         echo "<table border='0' cellpadding='4' cellspacing='1' width='100%' class='outer'>";
185 185
         echo "<tr align='center'>";
186
-        echo "<th align='left' class='bg3'>" . _AM_NEWBB_CATEGORY1 . '</th>';
187
-        echo "<th class='bg3' width='10%'>" . _AM_NEWBB_EDIT . '</th>';
188
-        echo "<th class='bg3' width='10%'>" . _AM_NEWBB_DELETE . '</th>';
186
+        echo "<th align='left' class='bg3'>"._AM_NEWBB_CATEGORY1.'</th>';
187
+        echo "<th class='bg3' width='10%'>"._AM_NEWBB_EDIT.'</th>';
188
+        echo "<th class='bg3' width='10%'>"._AM_NEWBB_DELETE.'</th>';
189 189
         echo '</tr>';
190 190
 
191 191
         foreach ($categories as $key => $onecat) {
192
-            $cat_edit_link  = '<a href="admin_cat_manager.php?op=mod&cat_id=' . $onecat->getVar('cat_id') . '">' . newbbDisplayImage('admin_edit', _EDIT) . '</a>';
193
-            $cat_del_link   = '<a href="admin_cat_manager.php?op=del&cat_id=' . $onecat->getVar('cat_id') . '">' . newbbDisplayImage('admin_delete', _DELETE) . '</a>';
194
-            $cat_title_link = '<a href="' . XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/index.php?cat=' . $onecat->getVar('cat_id') . '">' . $onecat->getVar('cat_title') . '</a>';
192
+            $cat_edit_link  = '<a href="admin_cat_manager.php?op=mod&cat_id='.$onecat->getVar('cat_id').'">'.newbbDisplayImage('admin_edit', _EDIT).'</a>';
193
+            $cat_del_link   = '<a href="admin_cat_manager.php?op=del&cat_id='.$onecat->getVar('cat_id').'">'.newbbDisplayImage('admin_delete', _DELETE).'</a>';
194
+            $cat_title_link = '<a href="'.XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/index.php?cat='.$onecat->getVar('cat_id').'">'.$onecat->getVar('cat_title').'</a>';
195 195
 
196 196
             echo "<tr class='odd' align='left'>";
197
-            echo '<td>' . $cat_title_link . '</td>';
198
-            echo "<td align='center'>" . $cat_edit_link . '</td>';
199
-            echo "<td align='center'>" . $cat_del_link . '</td>';
197
+            echo '<td>'.$cat_title_link.'</td>';
198
+            echo "<td align='center'>".$cat_edit_link.'</td>';
199
+            echo "<td align='center'>".$cat_del_link.'</td>';
200 200
             echo '</tr>';
201 201
         }
202 202
         echo '</table>';
203 203
         echo '</td></tr></table>';
204 204
         echo '<fieldset>';
205
-        echo '<legend>&nbsp;' . _MI_NEWBB_ADMENU_CATEGORY . '&nbsp;</legend>';
205
+        echo '<legend>&nbsp;'._MI_NEWBB_ADMENU_CATEGORY.'&nbsp;</legend>';
206 206
         echo _AM_NEWBB_HELP_CATEGORY_TAB;
207
-        echo '<br>' . newbbDisplayImage('admin_edit', _EDIT) . '&nbsp;-&nbsp;' . _EDIT;
208
-        echo '<br>' . newbbDisplayImage('admin_delete', _DELETE) . '&nbsp;-&nbsp;' . _DELETE;
207
+        echo '<br>'.newbbDisplayImage('admin_edit', _EDIT).'&nbsp;-&nbsp;'._EDIT;
208
+        echo '<br>'.newbbDisplayImage('admin_delete', _DELETE).'&nbsp;-&nbsp;'._DELETE;
209 209
         echo '</fieldset>';
210 210
         break;
211 211
 }
@@ -213,4 +213,4 @@  discard block
 block discarded – undo
213 213
 $cacheHelper = Newbb\Utility::cleanCache();
214 214
 //$cacheHelper->delete('permission_category');
215 215
 
216
-require_once __DIR__ . '/admin_footer.php';
216
+require_once __DIR__.'/admin_footer.php';
Please login to merge, or discard this patch.
admin/admin_type_manager.php 1 patch
Spacing   +64 added lines, -64 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 
13 13
 use Xmf\Request;
14 14
 
15
-require_once __DIR__ . '/admin_header.php';
15
+require_once __DIR__.'/admin_header.php';
16 16
 xoops_cp_header();
17 17
 echo '<br>';
18 18
 require_once $GLOBALS['xoops']->path('class/xoopsformloader.php');
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
             }
86 86
         }
87 87
         if (count($type_del) > 0) {
88
-            $type_list = $typeHandler->getList(new \Criteria('type_id', '(' . implode(', ', $type_del) . ')', 'IN'));
88
+            $type_list = $typeHandler->getList(new \Criteria('type_id', '('.implode(', ', $type_del).')', 'IN'));
89 89
             xoops_confirm(['op' => 'delete', 'type_del' => serialize($type_del)], xoops_getenv('PHP_SELF'), sprintf(_AM_NEWBB_TODEL_TYPE, implode(', ', array_values($type_list))), '', false);
90 90
         } else {
91 91
             redirect_header(xoops_getenv('PHP_SELF'), 2, _MD_NEWBB_DBUPDATED);
@@ -115,14 +115,14 @@  discard block
 block discarded – undo
115 115
         $adminObject->addItemButton(_AM_NEWBB_TYPE_TEMPLATE_APPLY, 'admin_type_manager.php?op=apply', $icon = 'add');
116 116
         $adminObject->addItemButton(_AM_NEWBB_TYPE_FORUM, 'admin_type_manager.php?op=forum', $icon = 'add');
117 117
         $adminObject->displayButton('left');
118
-        echo '<legend style="font-weight: bold; color: #900;">' . _AM_NEWBB_TYPE_ORDER_DESC . '</legend>';
119
-        echo "<table width='100%' border='0' cellspacing='1' class='outer'>" . "<tr><td class='odd'>";
120
-        echo "<form name='template' method='post' action='" . xoops_getenv('PHP_SELF') . "'>";
118
+        echo '<legend style="font-weight: bold; color: #900;">'._AM_NEWBB_TYPE_ORDER_DESC.'</legend>';
119
+        echo "<table width='100%' border='0' cellspacing='1' class='outer'>"."<tr><td class='odd'>";
120
+        echo "<form name='template' method='post' action='".xoops_getenv('PHP_SELF')."'>";
121 121
         echo "<table border='0' cellpadding='4' cellspacing='1' width='100%' class='outer'>";
122 122
         echo "<tr align='center'>";
123
-        echo "<th class='bg3' width='20%'>" . _AM_NEWBB_TYPE_ORDER . '</th>';
124
-        echo "<th class='bg3' width='20%'>" . _AM_NEWBB_TYPE_NAME . '</th>';
125
-        echo "<th class='bg3'>" . _AM_NEWBB_TYPE_DESCRIPTION . '</th>';
123
+        echo "<th class='bg3' width='20%'>"._AM_NEWBB_TYPE_ORDER.'</th>';
124
+        echo "<th class='bg3' width='20%'>"._AM_NEWBB_TYPE_NAME.'</th>';
125
+        echo "<th class='bg3'>"._AM_NEWBB_TYPE_DESCRIPTION.'</th>';
126 126
         echo '</tr>';
127 127
 
128 128
         if ($templates = $cacheHelper->read('type_template')) {
@@ -133,9 +133,9 @@  discard block
 block discarded – undo
133 133
                 }
134 134
                 $typeObject = $typesObject[$key];
135 135
                 echo "<tr class='even' align='left'>";
136
-                echo "<td><input type='text' name='type_order[{$key}]' value='" . $order . "' size='10' /></td>";
137
-                echo "<td><em style='color:" . $typeObject->getVar('type_color') . ";'>" . $typeObject->getVar('type_name') . '</em></td>';
138
-                echo '<td>' . $typeObject->getVar('type_description') . '</td>';
136
+                echo "<td><input type='text' name='type_order[{$key}]' value='".$order."' size='10' /></td>";
137
+                echo "<td><em style='color:".$typeObject->getVar('type_color').";'>".$typeObject->getVar('type_name').'</em></td>';
138
+                echo '<td>'.$typeObject->getVar('type_description').'</td>';
139 139
                 echo '</tr>';
140 140
                 unset($typesObject[$key]);
141 141
             }
@@ -144,15 +144,15 @@  discard block
 block discarded – undo
144 144
         foreach ($typesObject as $key => $typeObject) {
145 145
             echo "<tr class='odd' align='left'>";
146 146
             echo "<td><input type='text' name='type_order[{$key}]' value='0' size='10' /></td>";
147
-            echo "<td><em style='color:" . $typeObject->getVar('type_color') . ";'>" . $typeObject->getVar('type_name') . '</em></td>';
148
-            echo '<td>' . $typeObject->getVar('type_description') . '</td>';
147
+            echo "<td><em style='color:".$typeObject->getVar('type_color').";'>".$typeObject->getVar('type_name').'</em></td>';
148
+            echo '<td>'.$typeObject->getVar('type_description').'</td>';
149 149
             echo '</tr>';
150 150
         }
151 151
 
152 152
         echo "<tr><td colspan='3' style='text-align:center;'>";
153 153
         echo "<input type='hidden' name='op' value='save_template' />";
154
-        echo "<input type='submit' name='submit' value='" . _SUBMIT . "' /> ";
155
-        echo "<input type='reset' value='" . _CANCEL . "' />";
154
+        echo "<input type='submit' name='submit' value='"._SUBMIT."' /> ";
155
+        echo "<input type='reset' value='"._CANCEL."' />";
156 156
         echo '</td></tr></table>';
157 157
         echo '</form>';
158 158
         echo '</td></tr></table>';
@@ -161,12 +161,12 @@  discard block
 block discarded – undo
161 161
     case 'save_template':
162 162
         $templates = array_flip(array_filter(Request::getArray('type_order', [], 'POST')));
163 163
         $cacheHelper->write('type_template', $templates);
164
-        redirect_header(xoops_getenv('PHP_SELF') . '?op=template', 2, _MD_NEWBB_DBUPDATED);
164
+        redirect_header(xoops_getenv('PHP_SELF').'?op=template', 2, _MD_NEWBB_DBUPDATED);
165 165
         break;
166 166
 
167 167
     case 'apply':
168 168
         if (!$templates = $cacheHelper->read('type_template')) {
169
-            redirect_header(xoops_getenv('PHP_SELF') . '?op=template', 2, _AM_NEWBB_TYPE_TEMPLATE_ERR);
169
+            redirect_header(xoops_getenv('PHP_SELF').'?op=template', 2, _AM_NEWBB_TYPE_TEMPLATE_ERR);
170 170
         }
171 171
 
172 172
         //        $categoryHandler  = Newbb\Helper::getInstance()->getHandler('Category');
@@ -176,9 +176,9 @@  discard block
 block discarded – undo
176 176
         //        $forumHandler = Newbb\Helper::getInstance()->getHandler('Forum');
177 177
         $forums = $forumHandler->getTree(array_keys($categories), 0, 'all');
178 178
         foreach (array_keys($forums) as $c) {
179
-            $fm_options[-1 * $c] = '[' . $categories[$c] . ']';
179
+            $fm_options[-1 * $c] = '['.$categories[$c].']';
180 180
             foreach (array_keys($forums[$c]) as $f) {
181
-                $fm_options[$f] = $forums[$c][$f]['prefix'] . $forums[$c][$f]['forum_name'];
181
+                $fm_options[$f] = $forums[$c][$f]['prefix'].$forums[$c][$f]['forum_name'];
182 182
             }
183 183
         }
184 184
         unset($forums, $categories);
@@ -199,15 +199,15 @@  discard block
 block discarded – undo
199 199
         $adminObject->addItemButton(_AM_NEWBB_TYPE_FORUM, 'admin_type_manager.php?op=forum', $icon = 'add');
200 200
         $adminObject->displayButton('left');
201 201
 
202
-        echo "<table width='100%' border='0' cellspacing='1' class='outer'>" . "<tr><td class='odd'>";
202
+        echo "<table width='100%' border='0' cellspacing='1' class='outer'>"."<tr><td class='odd'>";
203 203
         echo "<table border='0' cellpadding='4' cellspacing='1' width='100%' class='outer'>";
204 204
         echo "<tr align='center'>";
205
-        echo "<th class='bg3' width='20%'>" . _AM_NEWBB_TYPE_NAME . '</th>';
206
-        echo "<th class='bg3' width='20%'>" . _AM_NEWBB_TYPE_ORDER . '</th>';
207
-        echo "<th class='bg3'>" . _AM_NEWBB_TYPE_DESCRIPTION . '</th>';
205
+        echo "<th class='bg3' width='20%'>"._AM_NEWBB_TYPE_NAME.'</th>';
206
+        echo "<th class='bg3' width='20%'>"._AM_NEWBB_TYPE_ORDER.'</th>';
207
+        echo "<th class='bg3'>"._AM_NEWBB_TYPE_DESCRIPTION.'</th>';
208 208
         echo '</tr>';
209 209
 
210
-        $typesObject = $typeHandler->getAll(new \Criteria('type_id', '(' . implode(', ', array_values($templates)) . ')', 'IN'));
210
+        $typesObject = $typeHandler->getAll(new \Criteria('type_id', '('.implode(', ', array_values($templates)).')', 'IN'));
211 211
         arsort($templates);
212 212
         foreach ($templates as $order => $key) {
213 213
             if (!isset($typesObject[$key])) {
@@ -215,9 +215,9 @@  discard block
 block discarded – undo
215 215
             }
216 216
             $typeObject = $typesObject[$key];
217 217
             echo "<tr class='even' align='left'>";
218
-            echo "<td><em style='color:" . $typeObject->getVar('type_color') . ";'>" . $typeObject->getVar('type_name') . '</em></td>';
219
-            echo '<td>' . $order . '</td>';
220
-            echo '<td>' . $typeObject->getVar('type_description') . '</td>';
218
+            echo "<td><em style='color:".$typeObject->getVar('type_color').";'>".$typeObject->getVar('type_name').'</em></td>';
219
+            echo '<td>'.$order.'</td>';
220
+            echo '<td>'.$typeObject->getVar('type_description').'</td>';
221 221
             echo '</tr>';
222 222
             unset($typesObject[$key]);
223 223
         }
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
 
230 230
     case 'save_apply':
231 231
         if (!$templates = $cacheHelper->read('type_template')) {
232
-            redirect_header(xoops_getenv('PHP_SELF') . '?op=template', 2, _AM_NEWBB_TYPE_TEMPLATE);
232
+            redirect_header(xoops_getenv('PHP_SELF').'?op=template', 2, _AM_NEWBB_TYPE_TEMPLATE);
233 233
         }
234 234
         foreach (Request::getArray('forums', [], 'POST') as $forum) {
235 235
             if ($forum < 1) {
@@ -255,9 +255,9 @@  discard block
 block discarded – undo
255 255
         }
256 256
 
257 257
         foreach (array_keys($forums) as $c) {
258
-            $fm_options[-1 * $c] = '[' . $categories[$c] . ']';
258
+            $fm_options[-1 * $c] = '['.$categories[$c].']';
259 259
             foreach (array_keys($forums[$c]) as $f) {
260
-                $fm_options[$f] = $forums[$c][$f]['prefix'] . $forums[$c][$f]['forum_name'];
260
+                $fm_options[$f] = $forums[$c][$f]['prefix'].$forums[$c][$f]['forum_name'];
261 261
             }
262 262
         }
263 263
         unset($forums, $categories);
@@ -282,12 +282,12 @@  discard block
 block discarded – undo
282 282
 
283 283
     case 'edit_forum':
284 284
         if (!Request::getInt('forum', 0, 'POST') || Request::getInt('forum', 0, 'POST') < 1) {
285
-            redirect_header(xoops_getenv('PHP_SELF') . '?op=forum', 2, _AM_NEWBB_TYPE_FORUM_ERR);
285
+            redirect_header(xoops_getenv('PHP_SELF').'?op=forum', 2, _AM_NEWBB_TYPE_FORUM_ERR);
286 286
         }
287 287
 
288 288
         //        $forumHandler = Newbb\Helper::getInstance()->getHandler('Forum');
289 289
         if (!$forumObject = $forumHandler->get(Request::getInt('forum', 0, 'POST'))) {
290
-            redirect_header(xoops_getenv('PHP_SELF') . '?op=forum', 2, _AM_NEWBB_TYPE_FORUM_ERR);
290
+            redirect_header(xoops_getenv('PHP_SELF').'?op=forum', 2, _AM_NEWBB_TYPE_FORUM_ERR);
291 291
         }
292 292
 
293 293
         $typesObject = $typeHandler->getAll();
@@ -299,14 +299,14 @@  discard block
 block discarded – undo
299 299
         $adminObject->addItemButton(_AM_NEWBB_TYPE_TEMPLATE, 'admin_type_manager.php?op=template', $icon = 'add');
300 300
         $adminObject->addItemButton(_AM_NEWBB_TYPE_FORUM, 'admin_type_manager.php?op=forum', $icon = 'add');
301 301
         $adminObject->displayButton('left');
302
-        echo '<legend style="font-weight: bold; color: #900;">' . _AM_NEWBB_TYPE_ORDER_DESC . '</legend>';
303
-        echo "<table width='100%' border='0' cellspacing='1' class='outer'>" . "<tr><td class='odd'>";
304
-        echo "<form name='template' method='post' action='" . xoops_getenv('PHP_SELF') . "'>";
302
+        echo '<legend style="font-weight: bold; color: #900;">'._AM_NEWBB_TYPE_ORDER_DESC.'</legend>';
303
+        echo "<table width='100%' border='0' cellspacing='1' class='outer'>"."<tr><td class='odd'>";
304
+        echo "<form name='template' method='post' action='".xoops_getenv('PHP_SELF')."'>";
305 305
         echo "<table border='0' cellpadding='4' cellspacing='1' width='100%' class='outer'>";
306 306
         echo "<tr align='center'>";
307
-        echo "<th class='bg3' width='20%'>" . _AM_NEWBB_TYPE_ORDER . '</th>';
308
-        echo "<th class='bg3' width='20%'>" . _AM_NEWBB_TYPE_NAME . '</th>';
309
-        echo "<th class='bg3'>" . _AM_NEWBB_TYPE_DESCRIPTION . '</th>';
307
+        echo "<th class='bg3' width='20%'>"._AM_NEWBB_TYPE_ORDER.'</th>';
308
+        echo "<th class='bg3' width='20%'>"._AM_NEWBB_TYPE_NAME.'</th>';
309
+        echo "<th class='bg3'>"._AM_NEWBB_TYPE_DESCRIPTION.'</th>';
310 310
         echo '</tr>';
311 311
 
312 312
         $types       = $typeHandler->getByForum(Request::getInt('forum', 0, 'POST'));
@@ -321,9 +321,9 @@  discard block
 block discarded – undo
321 321
             }
322 322
             $typeObject = $typesObject[$type['type_id']];
323 323
             echo "<tr class='even' align='left'>";
324
-            echo "<td><input type='text' name='type_order[" . $type['type_id'] . "]' value='" . $type['type_order'] . "' size='10' /></td>";
325
-            echo "<td><em style='color:" . $typeObject->getVar('type_color') . ";'>" . $typeObject->getVar('type_name') . '</em></td>';
326
-            echo '<td>' . $typeObject->getVar('type_description') . '</td>';
324
+            echo "<td><input type='text' name='type_order[".$type['type_id']."]' value='".$type['type_order']."' size='10' /></td>";
325
+            echo "<td><em style='color:".$typeObject->getVar('type_color').";'>".$typeObject->getVar('type_name').'</em></td>';
326
+            echo '<td>'.$typeObject->getVar('type_description').'</td>';
327 327
             echo '</tr>';
328 328
             unset($typesObject[$type['type_id']]);
329 329
         }
@@ -331,17 +331,17 @@  discard block
 block discarded – undo
331 331
         foreach ($typesObject as $key => $typeObject) {
332 332
             echo "<tr class='odd' align='left'>";
333 333
             echo "<td><input type='text' name='type_order[{$key}]' value='0' size='10' /></td>";
334
-            echo "<td><em style='color:" . $typeObject->getVar('type_color') . ";'>" . $typeObject->getVar('type_name') . '</em></td>';
335
-            echo '<td>' . $typeObject->getVar('type_description') . '</td>';
334
+            echo "<td><em style='color:".$typeObject->getVar('type_color').";'>".$typeObject->getVar('type_name').'</em></td>';
335
+            echo '<td>'.$typeObject->getVar('type_description').'</td>';
336 336
             echo '</tr>';
337 337
         }
338 338
 
339 339
         echo "<tr><td colspan='3' style='text-align:center;'>";
340
-        echo '<legend style="font-weight: bold; color: #900;">' . _AM_NEWBB_TYPE_EDITFORUM_DESC . '</legend>';
341
-        echo "<input type='hidden' name='forum' value='" . Request::getInt('forum', 0, 'POST') . "' />";
340
+        echo '<legend style="font-weight: bold; color: #900;">'._AM_NEWBB_TYPE_EDITFORUM_DESC.'</legend>';
341
+        echo "<input type='hidden' name='forum' value='".Request::getInt('forum', 0, 'POST')."' />";
342 342
         echo "<input type='hidden' name='op' value='save_forum' />";
343
-        echo "<input type='submit' name='submit' value='" . _SUBMIT . "' /> ";
344
-        echo "<input type='reset' value='" . _CANCEL . "' />";
343
+        echo "<input type='submit' name='submit' value='"._SUBMIT."' /> ";
344
+        echo "<input type='reset' value='"._CANCEL."' />";
345 345
         echo '</td></tr></table>';
346 346
         echo '</form>';
347 347
         echo '</td></tr></table>';
@@ -349,10 +349,10 @@  discard block
 block discarded – undo
349 349
 
350 350
     case 'save_forum':
351 351
         if (!Request::getInt('forum', 0, 'POST') || Request::getInt('forum', 0, 'POST') < 1) {
352
-            redirect_header(xoops_getenv('PHP_SELF') . '?op=forum', 2, _AM_NEWBB_TYPE_FORUM);
352
+            redirect_header(xoops_getenv('PHP_SELF').'?op=forum', 2, _AM_NEWBB_TYPE_FORUM);
353 353
         }
354 354
         $typeHandler->updateByForum(Request::getInt('forum', 0, 'POST'), Request::getArray('type_order', null, 'POST'));
355
-        redirect_header(xoops_getenv('PHP_SELF') . '?op=forum', 2, _MD_NEWBB_DBUPDATED);
355
+        redirect_header(xoops_getenv('PHP_SELF').'?op=forum', 2, _MD_NEWBB_DBUPDATED);
356 356
         break;
357 357
 
358 358
     case 'add':
@@ -372,16 +372,16 @@  discard block
 block discarded – undo
372 372
             $adminObject->displayButton('left');
373 373
         }
374 374
         echo _AM_NEWBB_TYPE_HELP;
375
-        echo "<table width='100%' border='0' cellspacing='1' class='outer'>" . "<tr><td class='odd'>";
376
-        echo "<form name='list' method='post' action='" . xoops_getenv('PHP_SELF') . "'>";
375
+        echo "<table width='100%' border='0' cellspacing='1' class='outer'>"."<tr><td class='odd'>";
376
+        echo "<form name='list' method='post' action='".xoops_getenv('PHP_SELF')."'>";
377 377
         echo "<table border='0' cellpadding='4' cellspacing='1' width='100%' class='outer'>";
378 378
         echo "<tr align='center'>";
379 379
         if ('add' !== $op) {
380
-            echo "<th class='bg3' width='5%'>" . _DELETE . '</th>';
380
+            echo "<th class='bg3' width='5%'>"._DELETE.'</th>';
381 381
         }
382
-        echo "<th align='left' class='bg3' width='20%'>" . _AM_NEWBB_TYPE_NAME . '</th>';
383
-        echo "<th class='bg3' width='15%'>" . _AM_NEWBB_TYPE_COLOR . '</th>';
384
-        echo "<th align='left' class='bg3'>" . _AM_NEWBB_TYPE_DESCRIPTION . '</th>';
382
+        echo "<th align='left' class='bg3' width='20%'>"._AM_NEWBB_TYPE_NAME.'</th>';
383
+        echo "<th class='bg3' width='15%'>"._AM_NEWBB_TYPE_COLOR.'</th>';
384
+        echo "<th align='left' class='bg3'>"._AM_NEWBB_TYPE_DESCRIPTION.'</th>';
385 385
         echo '</tr>';
386 386
 
387 387
         $isColorpicker = require_once $GLOBALS['xoops']->path('class/xoopsform/formcolorpicker.php');
@@ -390,14 +390,14 @@  discard block
 block discarded – undo
390 390
             foreach ($typesObject as $key => $typeObject) {
391 391
                 echo "<tr class='odd' align='left'>";
392 392
                 echo "<td><input type='checkbox' name='type_del[{$key}]' /></td>";
393
-                echo "<td><input type='text' name='type_name[{$key}]' value='" . $typeObject->getVar('type_name') . "' size='10' /></td>";
393
+                echo "<td><input type='text' name='type_name[{$key}]' value='".$typeObject->getVar('type_name')."' size='10' /></td>";
394 394
                 if ($isColorpicker) {
395 395
                     $form_colorpicker = new \XoopsFormColorPicker('', "type_color[{$key}]", $typeObject->getVar('type_color'));
396
-                    echo '<td>' . $form_colorpicker->render() . '</td>';
396
+                    echo '<td>'.$form_colorpicker->render().'</td>';
397 397
                 } else {
398
-                    echo "<td><input type='text' name='type_color[{$key}]' value='" . $typeObject->getVar('type_color') . "' size='10' /></td>";
398
+                    echo "<td><input type='text' name='type_color[{$key}]' value='".$typeObject->getVar('type_color')."' size='10' /></td>";
399 399
                 }
400
-                echo "<td><input type='text' name='type_description[{$key}]' value='" . $typeObject->getVar('type_description') . "' size='30' /></td>";
400
+                echo "<td><input type='text' name='type_description[{$key}]' value='".$typeObject->getVar('type_description')."' size='30' /></td>";
401 401
                 echo '</tr>';
402 402
             }
403 403
             echo "<tr><td colspan='4' style='text-align:center;'>";
@@ -410,7 +410,7 @@  discard block
 block discarded – undo
410 410
                 echo "<td><input type='text' name='type_name[{$i}]' value='' size='10' /></td>";
411 411
                 if ($isColorpicker) {
412 412
                     $form_colorpicker = new \XoopsFormColorPicker('', "type_color[{$i}]", '');
413
-                    echo '<td>' . $form_colorpicker->render() . '</td>';
413
+                    echo '<td>'.$form_colorpicker->render().'</td>';
414 414
                 } else {
415 415
                     echo "<td><input type='text' name='type_color[{$i}]' value='' size='10' /></td>";
416 416
                 }
@@ -421,16 +421,16 @@  discard block
 block discarded – undo
421 421
             echo "<input type='hidden' name='isnew' value='1' />";
422 422
         }
423 423
         echo "<input type='hidden' name='op' value='save_type' />";
424
-        echo "<input type='submit' name='submit' value='" . _SUBMIT . "' /> ";
425
-        echo "<input type='reset' value='" . _CANCEL . "' />";
424
+        echo "<input type='submit' name='submit' value='"._SUBMIT."' /> ";
425
+        echo "<input type='reset' value='"._CANCEL."' />";
426 426
         echo '</td></tr></table>';
427 427
         echo '</form>';
428 428
         echo '</td></tr></table>';
429 429
         echo '<fieldset>';
430
-        echo '<legend>&nbsp;' . _MI_NEWBB_ADMENU_TYPE . '&nbsp;</legend>';
430
+        echo '<legend>&nbsp;'._MI_NEWBB_ADMENU_TYPE.'&nbsp;</legend>';
431 431
         echo _AM_NEWBB_HELP_TYPE_TAB;
432 432
         echo '</fieldset>';
433 433
         break;
434 434
 }
435 435
 
436
-require_once __DIR__ . '/admin_footer.php';
436
+require_once __DIR__.'/admin_footer.php';
Please login to merge, or discard this patch.
makepdf.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -23,17 +23,17 @@  discard block
 block discarded – undo
23 23
 
24 24
 // a complete rewrite by irmtfan to enhance: 1- RTL 2- Multilanguage (EMLH and Xlanguage)
25 25
 error_reporting(0);
26
-require_once __DIR__ . '/header.php';
26
+require_once __DIR__.'/header.php';
27 27
 
28 28
 $attach_id = Request::getString('attachid', '', 'GET');
29 29
 $forum     = Request::getInt('forum', 0, 'GET');
30 30
 $topic_id  = Request::getInt('topic_id', 0, 'GET');
31 31
 $post_id   = Request::getInt('post_id', 0, 'GET');
32 32
 
33
-if (!is_file(XOOPS_ROOT_PATH . '/class/libraries/vendor/tecnickcom/tcpdf/tcpdf.php')) {
34
-    redirect_header(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/viewtopic.php?topic_id=' . $topic_id, 3, 'TCPDF for Xoops not installed');
33
+if (!is_file(XOOPS_ROOT_PATH.'/class/libraries/vendor/tecnickcom/tcpdf/tcpdf.php')) {
34
+    redirect_header(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/viewtopic.php?topic_id='.$topic_id, 3, 'TCPDF for Xoops not installed');
35 35
 } else {
36
-    require_once XOOPS_ROOT_PATH . '/class/libraries/vendor/tecnickcom/tcpdf/tcpdf.php';
36
+    require_once XOOPS_ROOT_PATH.'/class/libraries/vendor/tecnickcom/tcpdf/tcpdf.php';
37 37
 }
38 38
 
39 39
 if (empty($post_id)) {
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 $pf_title        = '';
64 64
 if ($parent_forums) {
65 65
     foreach ($parent_forums as $p_f) {
66
-        $pf_title .= $p_f['forum_name'] . ' - ';
66
+        $pf_title .= $p_f['forum_name'].' - ';
67 67
     }
68 68
 }
69 69
 if (!$forumHandler->getPermission($viewtopic_forum)) {
@@ -83,19 +83,19 @@  discard block
 block discarded – undo
83 83
 $pdf_data['author']                  = $myts->undoHtmlSpecialChars($post_data['author']);
84 84
 $pdf_data['title']                   = $myts->undoHtmlSpecialChars($post_data['subject']);
85 85
 $content                             = '';
86
-$content                             .= '<b>' . $pdf_data['title'] . '</b><br><br>';
87
-$content                             .= _MD_NEWBB_AUTHORC . ' ' . $pdf_data['author'] . '<br>';
88
-$content                             .= _MD_NEWBB_POSTEDON . ' ' . formatTimestamp($post_data['date']) . '<br><br><br>';
89
-$content                             .= $myts->undoHtmlSpecialChars($post_data['text']) . '<br>';
86
+$content                             .= '<b>'.$pdf_data['title'].'</b><br><br>';
87
+$content                             .= _MD_NEWBB_AUTHORC.' '.$pdf_data['author'].'<br>';
88
+$content                             .= _MD_NEWBB_POSTEDON.' '.formatTimestamp($post_data['date']).'<br><br><br>';
89
+$content                             .= $myts->undoHtmlSpecialChars($post_data['text']).'<br>';
90 90
 //$content .= $post_edit . '<br>'; //reserve for future versions to display edit records
91 91
 $pdf_data['content']        = str_replace('[pagebreak]', '<br>', $content);
92 92
 $pdf_data['topic_title']    = $forumtopic->getVar('topic_title');
93
-$pdf_data['forum_title']    = $pf_title . $viewtopic_forum->getVar('forum_name');
93
+$pdf_data['forum_title']    = $pf_title.$viewtopic_forum->getVar('forum_name');
94 94
 $pdf_data['cat_title']      = $viewtopic_cat->getVar('cat_title');
95
-$pdf_data['subject']        = _MD_NEWBB_PDF_SUBJECT . ': ' . $pdf_data['topic_title'];
96
-$pdf_data['keywords']       = XOOPS_URL . ', ' . 'XOOPS Project, ' . $pdf_data['topic_title'];
97
-$pdf_data['HeadFirstLine']  = $GLOBALS['xoopsConfig']['sitename'] . ' - ' . $GLOBALS['xoopsConfig']['slogan'];
98
-$pdf_data['HeadSecondLine'] = _MD_NEWBB_FORUMHOME . ' - ' . $pdf_data['cat_title'] . ' - ' . $pdf_data['forum_title'] . ' - ' . $pdf_data['topic_title'];
95
+$pdf_data['subject']        = _MD_NEWBB_PDF_SUBJECT.': '.$pdf_data['topic_title'];
96
+$pdf_data['keywords']       = XOOPS_URL.', '.'XOOPS Project, '.$pdf_data['topic_title'];
97
+$pdf_data['HeadFirstLine']  = $GLOBALS['xoopsConfig']['sitename'].' - '.$GLOBALS['xoopsConfig']['slogan'];
98
+$pdf_data['HeadSecondLine'] = _MD_NEWBB_FORUMHOME.' - '.$pdf_data['cat_title'].' - '.$pdf_data['forum_title'].' - '.$pdf_data['topic_title'];
99 99
 // START irmtfan to implement EMLH by GIJ
100 100
 if (function_exists('easiestml')) {
101 101
     $pdf_data = easiestml($pdf_data);
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
 // set document information
138 138
 $pdf->SetCreator(PDF_CREATOR);
139 139
 $pdf->SetAuthor(PDF_AUTHOR);
140
-$pdf->SetTitle($pdf_data['forum_title'] . ' - ' . $pdf_data['subject']);
140
+$pdf->SetTitle($pdf_data['forum_title'].' - '.$pdf_data['subject']);
141 141
 $pdf->SetSubject($pdf_data['subject']);
142 142
 $pdf->SetKeywords($pdf_data['keywords']);
143 143
 
@@ -160,4 +160,4 @@  discard block
 block discarded – undo
160 160
 //$pdf->SetFont(PDF_FONT_NAME_MAIN, PDF_FONT_STYLE_MAIN, PDF_FONT_SIZE_MAIN);
161 161
 $pdf->SetFont('dejavusans', '', 12);
162 162
 $pdf->writeHTML($pdf_data['content'], true, 0);
163
-$pdf->Output($pdf_data['topic_title'] . '_' . $post_id . '.pdf', 'I');
163
+$pdf->Output($pdf_data['topic_title'].'_'.$post_id.'.pdf', 'I');
Please login to merge, or discard this patch.
view.tag.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,5 +8,5 @@
 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
 include $GLOBALS['xoops']->path('modules/tag/view.tag.php');
Please login to merge, or discard this patch.