|
48 | 48 | if (XoopsRequest::getInt('dest_forum', 0, 'POST')) { |
49 | 49 | $dest = XoopsRequest::getInt('dest_forum', 0, 'POST'); |
50 | 50 | if ($dest > 0) { |
51 | | - $pid = (int)$dest; |
| 51 | + $pid = $dest; |
52 | 52 | $forum_dest = $forumHandler->get($pid); |
53 | 53 | $cid = $forum_dest->getVar('cat_id'); |
54 | 54 | unset($forum_dest); |
55 | 55 | } else { |
56 | | - $cid = abs((int)$dest); |
| 56 | + $cid = abs($dest); |
57 | 57 | $pid = 0; |
58 | 58 | } |
59 | 59 | $forum_obj = $forumHandler->get($forum_id); |
|
152 | 152 | $forum_obj->setVar('forum_name', XoopsRequest::getString('forum_name', '', 'POST')); |
153 | 153 | $forum_obj->setVar('forum_desc', XoopsRequest::getString('forum_desc', '', 'POST')); |
154 | 154 | $forum_obj->setVar('forum_order', XoopsRequest::getInt('forum_order', 0, 'POST')); |
155 | | - $forum_obj->setVar('forum_moderator', XoopsRequest::getArray('forum_moderator', array(), 'POST')); |
| 155 | + $forum_obj->setVar('forum_moderator', XoopsRequest::getArray('forum_moderator', [], 'POST')); |
156 | 156 | $forum_obj->setVar('parent_forum', XoopsRequest::getInt('parent_forum', 0, 'POST')); |
157 | 157 | $forum_obj->setVar('attach_maxkb', XoopsRequest::getInt('attach_maxkb', 0, 'POST')); |
158 | 158 | $forum_obj->setVar('attach_ext', XoopsRequest::getString('attach_ext', '', 'POST')); |
159 | 159 | $forum_obj->setVar('hot_threshold', XoopsRequest::getInt('hot_threshold', 0, 'POST')); |
160 | 160 | if (XoopsRequest::getInt('parent_forum', 0, 'POST')) { |
161 | | - $parent_obj = $forumHandler->get(XoopsRequest::getInt('parent_forum', 0, 'POST'), array('cat_id')); |
| 161 | + $parent_obj = $forumHandler->get(XoopsRequest::getInt('parent_forum', 0, 'POST'), ['cat_id']); |
162 | 162 | $_POST['cat_id'] = $parent_obj->getVar('cat_id'); |
163 | 163 | } |
164 | 164 | $forum_obj->setVar('cat_id', XoopsRequest::getInt('cat_id', 0, 'POST')); |
|
202 | 202 |
|
203 | 203 | case 'del': |
204 | 204 | if (1 !== XoopsRequest::getInt('confirm', 0, 'POST')) { |
205 | | - xoops_confirm(array('op' => 'del', 'forum' => XoopsRequest::getInt('forum', 0, 'GET'), 'confirm' => 1), 'admin_forum_manager.php', _AM_NEWBB_TWDAFAP); |
| 205 | + xoops_confirm(['op' => 'del', 'forum' => XoopsRequest::getInt('forum', 0, 'GET'), 'confirm' => 1], 'admin_forum_manager.php', _AM_NEWBB_TWDAFAP); |
206 | 206 | break; |
207 | 207 | } else { |
208 | 208 | $forum_obj = $forumHandler->get(XoopsRequest::getInt('forum', 0, 'POST')); |
|
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&cat_id=" . $cat_id . "\">" . newbbDisplayImage('admin_edit', _EDIT) . '</a>'; |
266 | | - $cat_del_link = "<a href=\"admin_cat_manager.php?op=del&cat_id=" . $cat_id . "\">" . newbbDisplayImage('admin_delete', _DELETE) . '</a>'; |
267 | | - $forum_add_link = "<a href=\"admin_forum_manager.php?op=addforum&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&cat_id=' . $cat_id . '">' . newbbDisplayImage('admin_edit', _EDIT) . '</a>'; |
| 266 | + $cat_del_link = '<a href="admin_cat_manager.php?op=del&cat_id=' . $cat_id . '">' . newbbDisplayImage('admin_delete', _DELETE) . '</a>'; |
| 267 | + $forum_add_link = '<a href="admin_forum_manager.php?op=addforum&cat_id=' . $cat_id . '">' . newbbDisplayImage('new_forum') . '</a>'; |
268 | 268 | $echo .= "<tr class='even' align='left'>"; |
269 | 269 | $echo .= "<td width='100%' colspan='2'><strong>" . $cat_link . '</strong></td>'; |
270 | 270 | $echo .= "<td align='center'>" . $cat_edit_link . '</td>'; |
|
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&forum=" . $f . "\">" . newbbDisplayImage('admin_edit', _AM_NEWBB_EDIT) . '</a>'; |
284 | | - $f_del_link = "<a href=\"admin_forum_manager.php?op=del&forum=" . $f . "\">" . newbbDisplayImage('admin_delete', _AM_NEWBB_DELETE) . '</a>'; |
285 | | - $sf_add_link = "<a href=\"admin_forum_manager.php?op=addforum&cat_id=" . $c . '&forum=' . $f . "\">" . newbbDisplayImage('new_forum', _AM_NEWBB_CREATEFORUM) . '</a>'; |
286 | | - $f_move_link = "<a href=\"admin_forum_manager.php?op=moveforum&forum=" . $f . "\">" . newbbDisplayImage('admin_move', _AM_NEWBB_MOVE) . '</a>'; |
287 | | - $f_merge_link = "<a href=\"admin_forum_manager.php?op=mergeforum&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&forum=' . $f . '">' . newbbDisplayImage('admin_edit', _AM_NEWBB_EDIT) . '</a>'; |
| 284 | + $f_del_link = '<a href="admin_forum_manager.php?op=del&forum=' . $f . '">' . newbbDisplayImage('admin_delete', _AM_NEWBB_DELETE) . '</a>'; |
| 285 | + $sf_add_link = '<a href="admin_forum_manager.php?op=addforum&cat_id=' . $c . '&forum=' . $f . '">' . newbbDisplayImage('new_forum', _AM_NEWBB_CREATEFORUM) . '</a>'; |
| 286 | + $f_move_link = '<a href="admin_forum_manager.php?op=moveforum&forum=' . $f . '">' . newbbDisplayImage('admin_move', _AM_NEWBB_MOVE) . '</a>'; |
| 287 | + $f_merge_link = '<a href="admin_forum_manager.php?op=mergeforum&forum=' . $f . '">' . newbbDisplayImage('admin_merge', _AM_NEWBB_MERGE) . '</a>'; |
288 | 288 |
|
289 | 289 | $class = (($i++) % 2) ? 'odd' : 'even'; |
290 | 290 | $echo .= "<tr class='" . $class . "' align='left'><td></td>"; |
|
0 commit comments