@@ -11,12 +11,12 @@ discard block |
||
| 11 | 11 | |
| 12 | 12 | use Xmf\Request; |
| 13 | 13 | |
| 14 | -require_once __DIR__ . '/header.php'; |
|
| 14 | +require_once __DIR__.'/header.php'; |
|
| 15 | 15 | |
| 16 | 16 | if (!Request::getInt('forum', 0, 'GET')) { |
| 17 | - redirect_header(XOOPS_URL . '/index.php', 2, _MD_NEWBB_ERRORFORUM); |
|
| 17 | + redirect_header(XOOPS_URL.'/index.php', 2, _MD_NEWBB_ERRORFORUM); |
|
| 18 | 18 | } |
| 19 | -require_once __DIR__ . '/include/functions.read.php'; |
|
| 19 | +require_once __DIR__.'/include/functions.read.php'; |
|
| 20 | 20 | |
| 21 | 21 | /* |
| 22 | 22 | * Build the page query |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | $query_array = []; |
| 26 | 26 | foreach ($query_vars as $var) { |
| 27 | 27 | if (Request::getString($var, '', 'GET')) { |
| 28 | - $query_array[$var] = "{$var}=" . Request::getString($var, '', 'GET'); |
|
| 28 | + $query_array[$var] = "{$var}=".Request::getString($var, '', 'GET'); |
|
| 29 | 29 | } |
| 30 | 30 | } |
| 31 | 31 | $page_query = implode('&', array_values($query_array)); |
@@ -39,8 +39,8 @@ discard block |
||
| 39 | 39 | $markresult = _MD_NEWBB_MARK_UNREAD; |
| 40 | 40 | } |
| 41 | 41 | newbbSetReadTopic($markvalue, Request::getInt('forum', 0, 'GET')); |
| 42 | - $url = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/viewforum.php?' . $page_query; |
|
| 43 | - redirect_header($url, 2, _MD_NEWBB_ALL_TOPIC_MARKED . ' ' . $markresult); |
|
| 42 | + $url = XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/viewforum.php?'.$page_query; |
|
| 43 | + redirect_header($url, 2, _MD_NEWBB_ALL_TOPIC_MARKED.' '.$markresult); |
|
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | $forum_id = Request::getInt('forum', 0, 'GET'); |
@@ -67,25 +67,25 @@ discard block |
||
| 67 | 67 | $forumObject = $forumHandler->get($forum_id); |
| 68 | 68 | |
| 69 | 69 | if (!$forumObject) { |
| 70 | - redirect_header(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/index.php', 2, _MD_NEWBB_ERRORFORUM); |
|
| 70 | + redirect_header(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/index.php', 2, _MD_NEWBB_ERRORFORUM); |
|
| 71 | 71 | } |
| 72 | 72 | |
| 73 | 73 | if (!$forumHandler->getPermission($forumObject)) { |
| 74 | - redirect_header(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/index.php', 2, _NOPERM); |
|
| 74 | + redirect_header(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/index.php', 2, _NOPERM); |
|
| 75 | 75 | } |
| 76 | 76 | newbbSetRead('forum', $forum_id, $forumObject->getVar('forum_last_post_id')); |
| 77 | 77 | |
| 78 | -$xoops_pagetitle = $forumObject->getVar('forum_name') . ' [' . $xoopsModule->getVar('name') . ']'; |
|
| 78 | +$xoops_pagetitle = $forumObject->getVar('forum_name').' ['.$xoopsModule->getVar('name').']'; |
|
| 79 | 79 | |
| 80 | 80 | $xoopsOption['template_main'] = 'newbb_viewforum.tpl'; |
| 81 | 81 | $xoopsOption['xoops_pagetitle'] = $xoops_pagetitle; |
| 82 | 82 | |
| 83 | 83 | require_once $GLOBALS['xoops']->path('header.php'); |
| 84 | -require_once __DIR__ . '/include/functions.render.php'; |
|
| 84 | +require_once __DIR__.'/include/functions.render.php'; |
|
| 85 | 85 | |
| 86 | 86 | if (!empty($GLOBALS['xoopsModuleConfig']['rss_enable'])) { |
| 87 | 87 | $xoopsTpl->assign('xoops_module_header', ' |
| 88 | - <link rel="alternate" type="application/xml+rss" title="' . $xoopsModule->getVar('name') . '-' . $forumObject->getVar('forum_name') . '" href="' . XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/rss.php?f=' . $forum_id . '" /> |
|
| 88 | + <link rel="alternate" type="application/xml+rss" title="' . $xoopsModule->getVar('name').'-'.$forumObject->getVar('forum_name').'" href="'.XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/rss.php?f='.$forum_id.'" /> |
|
| 89 | 89 | ' . @$xoopsTpl->get_template_vars('xoops_module_header')); |
| 90 | 90 | } |
| 91 | 91 | $forumDescription = $forumObject->getVar('forum_desc'); |
@@ -119,16 +119,16 @@ discard block |
||
| 119 | 119 | |
| 120 | 120 | if ($forumHandler->getPermission($forumObject, 'post')) { |
| 121 | 121 | $xoopsTpl->assign('viewer_level', $isAdmin ? 2 : 1); |
| 122 | - $xoopsTpl->assign('forum_post_or_register', '<a href="' . XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . "/newtopic.php?forum={$forum_id}\">" . newbbDisplayImage('t_new', _MD_NEWBB_POSTNEW) . '</a>'); |
|
| 122 | + $xoopsTpl->assign('forum_post_or_register', '<a href="'.XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname')."/newtopic.php?forum={$forum_id}\">".newbbDisplayImage('t_new', _MD_NEWBB_POSTNEW).'</a>'); |
|
| 123 | 123 | if ($pollmodules && $forumHandler->getPermission($forumObject, 'addpoll')) { |
| 124 | 124 | $t_poll = newbbDisplayImage('t_poll', _MD_NEWBB_ADDPOLL); |
| 125 | - $xoopsTpl->assign('forum_addpoll', '<a href="' . XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . "/polls.php?op=add&forum={$forum_id}\">{$t_poll}</a>"); |
|
| 125 | + $xoopsTpl->assign('forum_addpoll', '<a href="'.XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname')."/polls.php?op=add&forum={$forum_id}\">{$t_poll}</a>"); |
|
| 126 | 126 | } |
| 127 | 127 | } else { |
| 128 | 128 | $xoopsTpl->assign('viewer_level', 0); |
| 129 | 129 | if (!is_object($GLOBALS['xoopsUser']) && !empty($GLOBALS['xoopsModuleConfig']['show_reg'])) { |
| 130 | - $redirect = preg_replace("|(.*)\/modules\/Newbb\/(.*)|", "\\1/modules/newbb/newtopic.php?forum=" . $forum_id, htmlspecialchars($xoopsRequestUri, ENT_QUOTES | ENT_HTML5)); |
|
| 131 | - $xoopsTpl->assign('forum_post_or_register', "<a href='" . XOOPS_URL . "/user.php?xoops_redirect={$redirect}'>" . _MD_NEWBB_REGTOPOST . '</a>'); |
|
| 130 | + $redirect = preg_replace("|(.*)\/modules\/Newbb\/(.*)|", "\\1/modules/newbb/newtopic.php?forum=".$forum_id, htmlspecialchars($xoopsRequestUri, ENT_QUOTES | ENT_HTML5)); |
|
| 131 | + $xoopsTpl->assign('forum_post_or_register', "<a href='".XOOPS_URL."/user.php?xoops_redirect={$redirect}'>"._MD_NEWBB_REGTOPOST.'</a>'); |
|
| 132 | 132 | $xoopsTpl->assign('forum_addpoll', ''); |
| 133 | 133 | } else { |
| 134 | 134 | $xoopsTpl->assign('forum_post_or_register', ''); |
@@ -139,7 +139,7 @@ discard block |
||
| 139 | 139 | $xoopsTpl->assign_by_ref('parentforum', $parentforum); |
| 140 | 140 | |
| 141 | 141 | $criteria = new \CriteriaCompo(new \Criteria('parent_forum', $forum_id)); |
| 142 | -$criteria->add(new \Criteria('forum_id', '(' . implode(', ', $forumHandler->getIdsByPermission('access')) . ')', 'IN')); |
|
| 142 | +$criteria->add(new \Criteria('forum_id', '('.implode(', ', $forumHandler->getIdsByPermission('access')).')', 'IN')); |
|
| 143 | 143 | $criteria->setSort('forum_order'); |
| 144 | 144 | |
| 145 | 145 | if ($forums = $forumHandler->getAll($criteria, null, false)) { |
@@ -175,7 +175,7 @@ discard block |
||
| 175 | 175 | |
| 176 | 176 | $forum_selection_sort = '<select name="sort">'; |
| 177 | 177 | foreach ($sel_sort_array as $sort_k => $sort_v) { |
| 178 | - $forum_selection_sort .= '<option value="' . $sort_k . '"' . (($sort == $sort_k) ? ' selected="selected"' : '') . '>' . $sort_v . '</option>'; |
|
| 178 | + $forum_selection_sort .= '<option value="'.$sort_k.'"'.(($sort == $sort_k) ? ' selected="selected"' : '').'>'.$sort_v.'</option>'; |
|
| 179 | 179 | } |
| 180 | 180 | $forum_selection_sort .= '</select>'; |
| 181 | 181 | |
@@ -184,14 +184,14 @@ discard block |
||
| 184 | 184 | $order = (!Request::getString('order', '', 'GET') |
| 185 | 185 | || 'ASC' !== Request::getString('order', '', 'GET')) ? 'DESC' : 'ASC'; |
| 186 | 186 | $forum_selection_order = '<select name="order">'; |
| 187 | -$forum_selection_order .= '<option value="ASC"' . (('ASC' === $order) ? ' selected' : '') . '>' . _MD_NEWBB_ASCENDING . '</option>'; |
|
| 188 | -$forum_selection_order .= '<option value="DESC"' . (('DESC' === $order) ? ' selected' : '') . '>' . _MD_NEWBB_DESCENDING . '</option>'; |
|
| 187 | +$forum_selection_order .= '<option value="ASC"'.(('ASC' === $order) ? ' selected' : '').'>'._MD_NEWBB_ASCENDING.'</option>'; |
|
| 188 | +$forum_selection_order .= '<option value="DESC"'.(('DESC' === $order) ? ' selected' : '').'>'._MD_NEWBB_DESCENDING.'</option>'; |
|
| 189 | 189 | $forum_selection_order .= '</select>'; |
| 190 | 190 | |
| 191 | 191 | $xoopsTpl->assign_by_ref('forum_selection_order', $forum_selection_order); |
| 192 | 192 | |
| 193 | 193 | $since = Request::getInt('since', $GLOBALS['xoopsModuleConfig']['since_default'], 'GET'); |
| 194 | -require_once __DIR__ . '/include/functions.time.php'; |
|
| 194 | +require_once __DIR__.'/include/functions.time.php'; |
|
| 195 | 195 | $forum_selection_since = newbbSinceSelectBox($since); |
| 196 | 196 | $xoopsTpl->assign_by_ref('forum_selection_since', $forum_selection_since); |
| 197 | 197 | |
@@ -200,14 +200,14 @@ discard block |
||
| 200 | 200 | $page_query_sort = implode('&', array_values($query_sort)); |
| 201 | 201 | unset($query_sort); |
| 202 | 202 | // irmtfan - edit: u.uname => t.topic_poster | t.topic_time => t.topic_id | p.post_time => t.topic_last_post_id |
| 203 | -$xoopsTpl->assign('h_topic_link', XOOPS_URL . "/modules/newbb/viewforum.php?{$page_query_sort}&sort=t.topic_title&order=" . (('t.topic_title' === $sort && 'DESC' === $order) ? 'ASC' : 'DESC')); |
|
| 204 | -$xoopsTpl->assign('h_reply_link', XOOPS_URL . "/modules/newbb/viewforum.php?{$page_query_sort}&sort=t.topic_replies&order=" . (('t.topic_replies' === $sort && 'DESC' === $order) ? 'ASC' : 'DESC')); |
|
| 205 | -$xoopsTpl->assign('h_poster_link', XOOPS_URL . "/modules/newbb/viewforum.php?{$page_query_sort}&sort=t.topic_poster&order=" . (('t.topic_poster' === $sort && 'DESC' === $order) ? 'ASC' : 'DESC')); |
|
| 206 | -$xoopsTpl->assign('h_views_link', XOOPS_URL . "/modules/newbb/viewforum.php?{$page_query_sort}&sort=t.topic_views&order=" . (('t.topic_views' === $sort && 'DESC' === $order) ? 'ASC' : 'DESC')); |
|
| 207 | -$xoopsTpl->assign('h_rating_link', XOOPS_URL . "/modules/newbb/viewforum.php?{$page_query_sort}&sort=t.rating&order=" . (('t.rating' === $sort |
|
| 203 | +$xoopsTpl->assign('h_topic_link', XOOPS_URL."/modules/newbb/viewforum.php?{$page_query_sort}&sort=t.topic_title&order=".(('t.topic_title' === $sort && 'DESC' === $order) ? 'ASC' : 'DESC')); |
|
| 204 | +$xoopsTpl->assign('h_reply_link', XOOPS_URL."/modules/newbb/viewforum.php?{$page_query_sort}&sort=t.topic_replies&order=".(('t.topic_replies' === $sort && 'DESC' === $order) ? 'ASC' : 'DESC')); |
|
| 205 | +$xoopsTpl->assign('h_poster_link', XOOPS_URL."/modules/newbb/viewforum.php?{$page_query_sort}&sort=t.topic_poster&order=".(('t.topic_poster' === $sort && 'DESC' === $order) ? 'ASC' : 'DESC')); |
|
| 206 | +$xoopsTpl->assign('h_views_link', XOOPS_URL."/modules/newbb/viewforum.php?{$page_query_sort}&sort=t.topic_views&order=".(('t.topic_views' === $sort && 'DESC' === $order) ? 'ASC' : 'DESC')); |
|
| 207 | +$xoopsTpl->assign('h_rating_link', XOOPS_URL."/modules/newbb/viewforum.php?{$page_query_sort}&sort=t.rating&order=".(('t.rating' === $sort |
|
| 208 | 208 | && 'DESC' === $order) ? 'ASC' : 'DESC')); // irmtfan t.topic_ratings to t.rating |
| 209 | -$xoopsTpl->assign('h_date_link', XOOPS_URL . "/modules/newbb/viewforum.php?{$page_query_sort}&sort=t.topic_last_post_id&order=" . (('t.topic_last_post_id' === $sort && 'DESC' === $order) ? 'ASC' : 'DESC')); |
|
| 210 | -$xoopsTpl->assign('h_publish_link', XOOPS_URL . "/modules/newbb/viewforum.php?{$page_query_sort}&sort=t.topic_id&order=" . (('t.topic_id' === $sort |
|
| 209 | +$xoopsTpl->assign('h_date_link', XOOPS_URL."/modules/newbb/viewforum.php?{$page_query_sort}&sort=t.topic_last_post_id&order=".(('t.topic_last_post_id' === $sort && 'DESC' === $order) ? 'ASC' : 'DESC')); |
|
| 210 | +$xoopsTpl->assign('h_publish_link', XOOPS_URL."/modules/newbb/viewforum.php?{$page_query_sort}&sort=t.topic_id&order=".(('t.topic_id' === $sort |
|
| 211 | 211 | && 'DESC' === $order) ? 'ASC' : 'DESC')); |
| 212 | 212 | $xoopsTpl->assign('forum_since', $since); // For $since in search.php |
| 213 | 213 | |
@@ -237,11 +237,11 @@ discard block |
||
| 237 | 237 | $xoopsTpl->assign('img_digest', newbbDisplayImage('topic_digest', _MD_NEWBB_TOPICDIGEST)); |
| 238 | 238 | $xoopsTpl->assign('img_poll', newbbDisplayImage('poll', _MD_NEWBB_TOPICHASPOLL)); |
| 239 | 239 | |
| 240 | -$xoopsTpl->assign('mark_read', XOOPS_URL . "/modules/newbb/viewforum.php?mark=1&{$page_query}"); |
|
| 241 | -$xoopsTpl->assign('mark_unread', XOOPS_URL . "/modules/newbb/viewforum.php?mark=2&{$page_query}"); |
|
| 240 | +$xoopsTpl->assign('mark_read', XOOPS_URL."/modules/newbb/viewforum.php?mark=1&{$page_query}"); |
|
| 241 | +$xoopsTpl->assign('mark_unread', XOOPS_URL."/modules/newbb/viewforum.php?mark=2&{$page_query}"); |
|
| 242 | 242 | |
| 243 | -$xoopsTpl->assign('post_link', XOOPS_URL . '/modules/newbb/viewpost.php?forum=' . $forum_id); |
|
| 244 | -$xoopsTpl->assign('newpost_link', XOOPS_URL . '/modules/newbb/viewpost.php?status=new&forum=' . $forum_id); |
|
| 243 | +$xoopsTpl->assign('post_link', XOOPS_URL.'/modules/newbb/viewpost.php?forum='.$forum_id); |
|
| 244 | +$xoopsTpl->assign('newpost_link', XOOPS_URL.'/modules/newbb/viewpost.php?status=new&forum='.$forum_id); |
|
| 245 | 245 | |
| 246 | 246 | $query_type = $query_array; |
| 247 | 247 | unset($query_type['type']); |
@@ -252,16 +252,16 @@ discard block |
||
| 252 | 252 | $typeOptions = null; |
| 253 | 253 | $types = []; |
| 254 | 254 | if ($types = $typeHandler->getByForum($forum_id)) { |
| 255 | - $typeOptions[] = ['title' => _ALL, 'link' => XOOPS_URL . "/modules/newbb/viewforum.php?{$page_query_type}"]; |
|
| 255 | + $typeOptions[] = ['title' => _ALL, 'link' => XOOPS_URL."/modules/newbb/viewforum.php?{$page_query_type}"]; |
|
| 256 | 256 | foreach ($types as $key => $item) { |
| 257 | 257 | $typeOptions[] = [ |
| 258 | 258 | 'title' => $item['type_name'], |
| 259 | - 'link' => XOOPS_URL . "/modules/newbb/viewforum.php?{$page_query_type}&type={$key}" |
|
| 259 | + 'link' => XOOPS_URL."/modules/newbb/viewforum.php?{$page_query_type}&type={$key}" |
|
| 260 | 260 | ]; |
| 261 | 261 | } |
| 262 | 262 | } |
| 263 | 263 | if ($type > 0) { |
| 264 | - require_once __DIR__ . '/include/functions.topic.php'; |
|
| 264 | + require_once __DIR__.'/include/functions.topic.php'; |
|
| 265 | 265 | $xoopsTpl->assign('forum_topictype', getTopicTitle('', $types[$type]['type_name'], $types[$type]['type_color'])); |
| 266 | 266 | } |
| 267 | 267 | $xoopsTpl->assign_by_ref('typeOptions', $typeOptions); |
@@ -270,11 +270,11 @@ discard block |
||
| 270 | 270 | unset($query_status['status']); |
| 271 | 271 | $page_query_status = implode('&', array_values($query_status)); |
| 272 | 272 | unset($query_status); |
| 273 | -$xoopsTpl->assign('newpost_link', XOOPS_URL . '/modules/newbb/viewpost.php?status=new&forum=' . $forumObject->getVar('forum_id')); |
|
| 274 | -$xoopsTpl->assign('all_link', XOOPS_URL . "/modules/newbb/viewforum.php?{$page_query_status}"); |
|
| 275 | -$xoopsTpl->assign('digest_link', XOOPS_URL . "/modules/newbb/viewforum.php?{$page_query_status}&status=digest"); |
|
| 276 | -$xoopsTpl->assign('unreplied_link', XOOPS_URL . "/modules/newbb/viewforum.php?{$page_query_status}&status=unreplied"); |
|
| 277 | -$xoopsTpl->assign('unread_link', XOOPS_URL . "/modules/newbb/viewforum.php?{$page_query_status}&status=unread"); |
|
| 273 | +$xoopsTpl->assign('newpost_link', XOOPS_URL.'/modules/newbb/viewpost.php?status=new&forum='.$forumObject->getVar('forum_id')); |
|
| 274 | +$xoopsTpl->assign('all_link', XOOPS_URL."/modules/newbb/viewforum.php?{$page_query_status}"); |
|
| 275 | +$xoopsTpl->assign('digest_link', XOOPS_URL."/modules/newbb/viewforum.php?{$page_query_status}&status=digest"); |
|
| 276 | +$xoopsTpl->assign('unreplied_link', XOOPS_URL."/modules/newbb/viewforum.php?{$page_query_status}&status=unreplied"); |
|
| 277 | +$xoopsTpl->assign('unread_link', XOOPS_URL."/modules/newbb/viewforum.php?{$page_query_status}&status=unread"); |
|
| 278 | 278 | switch ($status) { |
| 279 | 279 | case 'digest': |
| 280 | 280 | $current_status = _MD_NEWBB_DIGEST; |
@@ -322,7 +322,7 @@ discard block |
||
| 322 | 322 | } |
| 323 | 323 | |
| 324 | 324 | if (!empty($GLOBALS['xoopsModuleConfig']['show_jump'])) { |
| 325 | - require_once __DIR__ . '/include/functions.forum.php'; |
|
| 325 | + require_once __DIR__.'/include/functions.forum.php'; |
|
| 326 | 326 | $xoopsTpl->assign('forum_jumpbox', newbbMakeJumpbox($forum_id)); |
| 327 | 327 | } |
| 328 | 328 | |
@@ -335,8 +335,8 @@ discard block |
||
| 335 | 335 | } |
| 336 | 336 | |
| 337 | 337 | if (1 == $GLOBALS['xoopsModuleConfig']['rss_enable']) { |
| 338 | - $xoopsTpl->assign('rss_button', "<div align='right'><a href='" . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . '/rss.php?f=' . $forum_id . "' title='RSS feed' target='_blank'>" . newbbDisplayImage('rss', 'RSS feed') . '</a></div>'); |
|
| 338 | + $xoopsTpl->assign('rss_button', "<div align='right'><a href='".XOOPS_URL.'/modules/'.$xoopsModule->dirname().'/rss.php?f='.$forum_id."' title='RSS feed' target='_blank'>".newbbDisplayImage('rss', 'RSS feed').'</a></div>'); |
|
| 339 | 339 | } |
| 340 | 340 | // irmtfan move to footer.php |
| 341 | -require_once __DIR__ . '/footer.php'; |
|
| 341 | +require_once __DIR__.'/footer.php'; |
|
| 342 | 342 | include $GLOBALS['xoops']->path('footer.php'); |
@@ -21,15 +21,15 @@ discard block |
||
| 21 | 21 | |
| 22 | 22 | //require_once dirname(__DIR__) . '/include/functions.ini.php'; |
| 23 | 23 | //require_once dirname(__DIR__) . '/class/TopicRenderer.php'; |
| 24 | -require_once dirname(__DIR__) . '/footer.php'; // to include js/style files like validate function |
|
| 24 | +require_once dirname(__DIR__).'/footer.php'; // to include js/style files like validate function |
|
| 25 | 25 | |
| 26 | 26 | xoops_loadLanguage('main', 'newbb'); |
| 27 | 27 | |
| 28 | -require_once __DIR__ . '/../include/functions.config.php'; |
|
| 29 | -require_once __DIR__ . '/../include/functions.time.php'; |
|
| 30 | -require_once __DIR__ . '/../include/functions.session.php'; |
|
| 31 | -require_once __DIR__ . '/../include/functions.render.php'; |
|
| 32 | -require_once __DIR__ . '/../include/functions.user.php'; |
|
| 28 | +require_once __DIR__.'/../include/functions.config.php'; |
|
| 29 | +require_once __DIR__.'/../include/functions.time.php'; |
|
| 30 | +require_once __DIR__.'/../include/functions.session.php'; |
|
| 31 | +require_once __DIR__.'/../include/functions.render.php'; |
|
| 32 | +require_once __DIR__.'/../include/functions.user.php'; |
|
| 33 | 33 | |
| 34 | 34 | // options[0] - Status in WHERE claus: all(by default), sticky, digest,lock, poll, voted, viewed, replied, read, (UN_) , active, pending, deleted (admin) (It is multi-select) |
| 35 | 35 | // options[1] - Uid in WHERE claus: uid of the topic poster : -1 - all users (by default) |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | $topicRenderer->force = true; // force against static vars for parse |
| 60 | 60 | |
| 61 | 61 | $topicRenderer->is_multiple = true; // is it for multiple forums |
| 62 | - $topicRenderer->config =& $newbbConfig; // get all configs |
|
| 62 | + $topicRenderer->config = & $newbbConfig; // get all configs |
|
| 63 | 63 | if (!empty($options[6])) { |
| 64 | 64 | $topicRenderer->config['topics_per_page'] = (int)$options[6]; // number of topics (items) to display |
| 65 | 65 | } |
@@ -121,16 +121,16 @@ discard block |
||
| 121 | 121 | $topicPosterRadioEle->addOption(-1, _MD_NEWBB_TOTALUSER); |
| 122 | 122 | $topicPosterRadioEle->addOption((-1 !== $options[1]) ? $options[1] : 0, _SELECT); // if no user in selection box it select uid=0 anon users |
| 123 | 123 | $topicPosterRadioEle->setExtra("onchange=\"var el=document.getElementById('options[1]'); el.disabled=(this.id == 'options[1]1'); if (!el.value) {el.value= this.value}\""); // if user dont select any option it select "all" |
| 124 | - $topicPosterSelectEle = new \XoopsFormSelectUser(_MB_NEWBB_AUTHOR, 'options[1]', true, explode(',', $options[1]), 5, true);// show $limit = 200 users when no user is selected; |
|
| 125 | - $topicPosterEle = new \XoopsFormLabel(_MB_NEWBB_AUTHOR, $topicPosterRadioEle->render() . $topicPosterSelectEle->render()); |
|
| 124 | + $topicPosterSelectEle = new \XoopsFormSelectUser(_MB_NEWBB_AUTHOR, 'options[1]', true, explode(',', $options[1]), 5, true); // show $limit = 200 users when no user is selected; |
|
| 125 | + $topicPosterEle = new \XoopsFormLabel(_MB_NEWBB_AUTHOR, $topicPosterRadioEle->render().$topicPosterSelectEle->render()); |
|
| 126 | 126 | |
| 127 | 127 | // lastposter element |
| 128 | 128 | $lastPosterRadioEle = new \XoopsFormRadio(_MD_NEWBB_POSTER, 'options[2]', $options[2]); |
| 129 | 129 | $lastPosterRadioEle->addOption(-1, _MD_NEWBB_TOTALUSER); |
| 130 | 130 | $lastPosterRadioEle->addOption((-1 !== $options[2]) ? $options[2] : 0, _SELECT); // if no user in selection box it select uid=1 |
| 131 | 131 | $lastPosterRadioEle->setExtra("onchange=\"var el=document.getElementById('options[2]'); el.disabled=(this.id == 'options[2]1'); if (!el.value) {el.value= this.value}\""); // if user dont select any option it select "all" |
| 132 | - $lastPosterSelectEle = new \XoopsFormSelectUser(_MD_NEWBB_POSTER, 'options[2]', true, explode(',', $options[2]), 5, true);// show $limit = 200 users when no user is selected; |
|
| 133 | - $lastPosterEle = new \XoopsFormLabel(_MD_NEWBB_POSTER, $lastPosterRadioEle->render() . $lastPosterSelectEle->render()); |
|
| 132 | + $lastPosterSelectEle = new \XoopsFormSelectUser(_MD_NEWBB_POSTER, 'options[2]', true, explode(',', $options[2]), 5, true); // show $limit = 200 users when no user is selected; |
|
| 133 | + $lastPosterEle = new \XoopsFormLabel(_MD_NEWBB_POSTER, $lastPosterRadioEle->render().$lastPosterSelectEle->render()); |
|
| 134 | 134 | |
| 135 | 135 | // type element |
| 136 | 136 | $types = $topicRenderer->getTypes(); // get all available types in all forums |
@@ -180,20 +180,20 @@ discard block |
||
| 180 | 180 | |
| 181 | 181 | // forum element |
| 182 | 182 | $optionsForum = explode(',', $options[12]); |
| 183 | - require_once __DIR__ . '/../include/functions.forum.php'; |
|
| 183 | + require_once __DIR__.'/../include/functions.forum.php'; |
|
| 184 | 184 | /** @var Newbb\ForumHandler $forumHandler */ |
| 185 | 185 | $forumHandler = Newbb\Helper::getInstance()->getHandler('Forum'); |
| 186 | 186 | //get forum Ids by values. parse positive values to forum IDs and negative values to category IDs. value=0 => all valid forums |
| 187 | 187 | // Get accessible forums |
| 188 | 188 | $accessForums = $forumHandler->getIdsByValues(array_map('intval', $optionsForum)); |
| 189 | 189 | $isAll = (0 === count($optionsForum) || empty($optionsForum[0])); |
| 190 | - $forumSel = "<select name=\"options[12][]\" multiple=\"multiple\" onchange = \"validate('options[12][]','select', true)\">";// if user dont select any it select "0" |
|
| 191 | - $forumSel .= '<option value="0" '; |
|
| 190 | + $forumSel = "<select name=\"options[12][]\" multiple=\"multiple\" onchange = \"validate('options[12][]','select', true)\">"; // if user dont select any it select "0" |
|
| 191 | + $forumSel .= '<option value="0" '; |
|
| 192 | 192 | if ($isAll) { |
| 193 | - $forumSel .= ' selected'; |
|
| 193 | + $forumSel .= ' selected'; |
|
| 194 | 194 | $accessForums = null; // just select _ALL option |
| 195 | 195 | } |
| 196 | - $forumSel .= '>' . _ALL . '</option>'; |
|
| 196 | + $forumSel .= '>'._ALL.'</option>'; |
|
| 197 | 197 | $forumSel .= newbbForumSelectBox($accessForums, 'access', false); //$accessForums, $permission = "access", $delimitorCategory = false |
| 198 | 198 | $forumSel .= '</select>'; |
| 199 | 199 | $forumEle = new \XoopsFormLabel(_MB_NEWBB_FORUMLIST, $forumSel); |
@@ -12,7 +12,7 @@ discard block |
||
| 12 | 12 | use Xmf\Request; |
| 13 | 13 | use XoopsModules\Newbb; |
| 14 | 14 | |
| 15 | -require_once __DIR__ . '/header.php'; |
|
| 15 | +require_once __DIR__.'/header.php'; |
|
| 16 | 16 | |
| 17 | 17 | //$xoopsOption['xoops_module_header']= $xoops_module_header; |
| 18 | 18 | $GLOBALS['xoopsOption']['template_main'] = 'newbb_viewall.tpl'; |
@@ -21,13 +21,13 @@ discard block |
||
| 21 | 21 | // irmtfan new method |
| 22 | 22 | if (!empty($GLOBALS['xoopsModuleConfig']['rss_enable'])) { |
| 23 | 23 | $xoopsTpl->assign('xoops_module_header', ' |
| 24 | - <link rel="alternate" type="application/xml+rss" title="' . $xoopsModule->getVar('name') . '" href="' . XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname', 'n') . '/rss.php" /> |
|
| 24 | + <link rel="alternate" type="application/xml+rss" title="' . $xoopsModule->getVar('name').'" href="'.XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname', 'n').'/rss.php" /> |
|
| 25 | 25 | ' . @$xoopsTpl->get_template_vars('xoops_module_header')); |
| 26 | 26 | } |
| 27 | 27 | //$xoopsTpl->assign('xoops_module_header', $xoops_module_header); |
| 28 | 28 | |
| 29 | -require_once __DIR__ . '/include/functions.time.php'; |
|
| 30 | -require_once __DIR__ . '/include/functions.render.php'; |
|
| 29 | +require_once __DIR__.'/include/functions.time.php'; |
|
| 30 | +require_once __DIR__.'/include/functions.render.php'; |
|
| 31 | 31 | |
| 32 | 32 | // irmtfan use require_once because it will redeclared in newbb/blocks/list_topic.php |
| 33 | 33 | //require_once __DIR__ . '/./class/TopicRenderer.php'; |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | $xoopsTpl->assign('newpost_link', 'viewpost.php?status=new'); |
| 88 | 88 | |
| 89 | 89 | if (!empty($GLOBALS['xoopsModuleConfig']['show_jump'])) { |
| 90 | - require_once __DIR__ . '/include/functions.forum.php'; |
|
| 90 | + require_once __DIR__.'/include/functions.forum.php'; |
|
| 91 | 91 | $xoopsTpl->assign('forum_jumpbox', newbbMakeJumpbox()); |
| 92 | 92 | } |
| 93 | 93 | $xoopsTpl->assign('menumode', $menumode); |
@@ -95,12 +95,12 @@ discard block |
||
| 95 | 95 | |
| 96 | 96 | $xoopsTpl->assign('mode', $mode); |
| 97 | 97 | $xoopsTpl->assign('status', $status); |
| 98 | -$xoopsTpl->assign('viewer_level', $topic_renderer->userlevel);// irmtfan use userlevel |
|
| 98 | +$xoopsTpl->assign('viewer_level', $topic_renderer->userlevel); // irmtfan use userlevel |
|
| 99 | 99 | |
| 100 | 100 | $pagetitle = sprintf(_MD_NEWBB_FORUMINDEX, htmlspecialchars($GLOBALS['xoopsConfig']['sitename'], ENT_QUOTES)); |
| 101 | 101 | $xoopsTpl->assign('forum_index_title', $pagetitle); |
| 102 | 102 | $xoopsTpl->assign('xoops_pagetitle', $pagetitle); |
| 103 | 103 | |
| 104 | 104 | // irmtfan move to footer.php |
| 105 | -require_once __DIR__ . '/footer.php'; |
|
| 105 | +require_once __DIR__.'/footer.php'; |
|
| 106 | 106 | include $GLOBALS['xoops']->path('footer.php'); |
@@ -12,7 +12,7 @@ discard block |
||
| 12 | 12 | use Xmf\Request; |
| 13 | 13 | use XoopsModules\Newbb; |
| 14 | 14 | |
| 15 | -require_once __DIR__ . '/header.php'; |
|
| 15 | +require_once __DIR__.'/header.php'; |
|
| 16 | 16 | |
| 17 | 17 | foreach (['forum', 'topic_id', 'post_id', 'order'] as $getint) { |
| 18 | 18 | ${$getint} = Request::getInt($getint, 0, 'GET'); |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | $query_array = []; |
| 65 | 65 | foreach ($query_vars as $var) { |
| 66 | 66 | if (Request::getString($var, '', 'GET')) { |
| 67 | - $query_array[$var] = "{$var}=" . Request::getString($var, '', 'GET'); |
|
| 67 | + $query_array[$var] = "{$var}=".Request::getString($var, '', 'GET'); |
|
| 68 | 68 | } |
| 69 | 69 | } |
| 70 | 70 | $page_query = htmlspecialchars(implode('&', array_values($query_array)), ENT_QUOTES | ENT_HTML5); |
@@ -115,8 +115,8 @@ discard block |
||
| 115 | 115 | $post_karma = $postObject->getVar('post_karma'); |
| 116 | 116 | $require_reply = $postObject->getVar('require_reply'); |
| 117 | 117 | |
| 118 | -$xoopsTpl->assign('error_message', _MD_NEWBB_EDITEDBY . ' ' . $GLOBALS['xoopsUser']->uname()); |
|
| 119 | -include __DIR__ . '/include/form.post.php'; |
|
| 118 | +$xoopsTpl->assign('error_message', _MD_NEWBB_EDITEDBY.' '.$GLOBALS['xoopsUser']->uname()); |
|
| 119 | +include __DIR__.'/include/form.post.php'; |
|
| 120 | 120 | |
| 121 | 121 | ///** @var Newbb\KarmaHandler $karmaHandler */ |
| 122 | 122 | //$karmaHandler = Newbb\Helper::getInstance()->getHandler('Karma'); |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | $posts_contextObject = $istopic ? [] : [$postHandler->get($postObject->getVar('pid'))]; |
| 127 | 127 | foreach ($posts_contextObject as $post_contextObject) { |
| 128 | 128 | if ($GLOBALS['xoopsModuleConfig']['enable_karma'] && $post_contextObject->getVar('post_karma') > 0) { |
| 129 | - $p_message = sprintf(_MD_NEWBB_KARMA_REQUIREMENT, '***', $post_contextObject->getVar('post_karma')) . '</div>'; |
|
| 129 | + $p_message = sprintf(_MD_NEWBB_KARMA_REQUIREMENT, '***', $post_contextObject->getVar('post_karma')).'</div>'; |
|
| 130 | 130 | } elseif ($GLOBALS['xoopsModuleConfig']['allow_require_reply'] && $post_contextObject->getVar('require_reply')) { |
| 131 | 131 | $p_message = _MD_NEWBB_REPLY_REQUIREMENT; |
| 132 | 132 | } else { |
@@ -144,11 +144,11 @@ discard block |
||
| 144 | 144 | |
| 145 | 145 | $posts_context[] = [ |
| 146 | 146 | 'subject' => $p_subject, |
| 147 | - 'meta' => _MD_NEWBB_BY . ' ' . $p_name . ' ' . _MD_NEWBB_ON . ' ' . $p_date, |
|
| 147 | + 'meta' => _MD_NEWBB_BY.' '.$p_name.' '._MD_NEWBB_ON.' '.$p_date, |
|
| 148 | 148 | 'content' => $p_message |
| 149 | 149 | ]; |
| 150 | 150 | } |
| 151 | 151 | $xoopsTpl->assign_by_ref('posts_context', $posts_context); |
| 152 | 152 | // irmtfan move to footer.php |
| 153 | -require_once __DIR__ . '/footer.php'; |
|
| 153 | +require_once __DIR__.'/footer.php'; |
|
| 154 | 154 | include $GLOBALS['xoops']->path('footer.php'); |
@@ -34,22 +34,22 @@ discard block |
||
| 34 | 34 | // Project: Article Project // |
| 35 | 35 | // ------------------------------------------------------------------------ // |
| 36 | 36 | |
| 37 | -require_once __DIR__ . '/header.php'; |
|
| 37 | +require_once __DIR__.'/header.php'; |
|
| 38 | 38 | xoops_loadLanguage('search'); |
| 39 | 39 | /** @var \XoopsConfigHandler $configHandler */ |
| 40 | 40 | $configHandler = xoops_getHandler('config'); |
| 41 | 41 | $xoopsConfigSearch = $configHandler->getConfigsByCat(XOOPS_CONF_SEARCH); |
| 42 | 42 | if (1 !== $xoopsConfigSearch['enable_search']) { |
| 43 | - redirect_header(XOOPS_URL . '/modules/newbb/index.php', 2, _MD_NEWBB_SEARCHDISABLED); |
|
| 43 | + redirect_header(XOOPS_URL.'/modules/newbb/index.php', 2, _MD_NEWBB_SEARCHDISABLED); |
|
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | $GLOBALS['xoopsConfig']['module_cache'][$xoopsModule->getVar('mid')] = 0; |
| 47 | 47 | $xoopsOption['template_main'] = 'newbb_search.tpl'; |
| 48 | 48 | require_once $GLOBALS['xoops']->path('header.php'); |
| 49 | 49 | |
| 50 | -require_once __DIR__ . '/include/functions.render.php'; |
|
| 51 | -require_once __DIR__ . '/include/functions.forum.php'; |
|
| 52 | -require_once __DIR__ . '/include/functions.time.php'; |
|
| 50 | +require_once __DIR__.'/include/functions.render.php'; |
|
| 51 | +require_once __DIR__.'/include/functions.forum.php'; |
|
| 52 | +require_once __DIR__.'/include/functions.time.php'; |
|
| 53 | 53 | |
| 54 | 54 | require_once $GLOBALS['xoops']->path('modules/newbb/include/search.inc.php'); |
| 55 | 55 | $limit = $GLOBALS['xoopsModuleConfig']['topics_per_page']; |
@@ -118,8 +118,8 @@ discard block |
||
| 118 | 118 | if (!empty($search_username)) { |
| 119 | 119 | $uname_required = true; |
| 120 | 120 | $search_username = $GLOBALS['xoopsDB']->escape($search_username); |
| 121 | - if (!$result = $GLOBALS['xoopsDB']->query('SELECT uid FROM ' . $GLOBALS['xoopsDB']->prefix('users') . " WHERE uname LIKE '%$search_username%'")) { |
|
| 122 | - redirect_header(XOOPS_URL . '/search.php', 1, _MD_NEWBB_ERROROCCURED); |
|
| 121 | + if (!$result = $GLOBALS['xoopsDB']->query('SELECT uid FROM '.$GLOBALS['xoopsDB']->prefix('users')." WHERE uname LIKE '%$search_username%'")) { |
|
| 122 | + redirect_header(XOOPS_URL.'/search.php', 1, _MD_NEWBB_ERROROCCURED); |
|
| 123 | 123 | } |
| 124 | 124 | $uid = []; |
| 125 | 125 | while (false !== ($row = $GLOBALS['xoopsDB']->fetchArray($result))) { |
@@ -144,12 +144,12 @@ discard block |
||
| 144 | 144 | } |
| 145 | 145 | } |
| 146 | 146 | if (!$uname_required && 0 === count($queries)) { |
| 147 | - redirect_header(XOOPS_URL . '/search.php', 2, sprintf(_SR_KEYTOOSHORT, $xoopsConfigSearch['keyword_min'])); |
|
| 147 | + redirect_header(XOOPS_URL.'/search.php', 2, sprintf(_SR_KEYTOOSHORT, $xoopsConfigSearch['keyword_min'])); |
|
| 148 | 148 | } |
| 149 | 149 | } else { |
| 150 | 150 | //$query = trim($query); |
| 151 | 151 | if (!$uname_required && (strlen($query) < $xoopsConfigSearch['keyword_min'])) { |
| 152 | - redirect_header(XOOPS_URL . '/search.php', 2, sprintf(_SR_KEYTOOSHORT, $xoopsConfigSearch['keyword_min'])); |
|
| 152 | + redirect_header(XOOPS_URL.'/search.php', 2, sprintf(_SR_KEYTOOSHORT, $xoopsConfigSearch['keyword_min'])); |
|
| 153 | 153 | } |
| 154 | 154 | $queries = [$query]; |
| 155 | 155 | } |
@@ -212,14 +212,14 @@ discard block |
||
| 212 | 212 | if (count($next_search) > 0) { |
| 213 | 213 | $items = []; |
| 214 | 214 | foreach ($next_search as $para => $val) { |
| 215 | - $items[] = "{$para}=" . urlencode($val); |
|
| 215 | + $items[] = "{$para}=".urlencode($val); |
|
| 216 | 216 | } |
| 217 | 217 | if (count($items) > 0) { |
| 218 | 218 | $paras = implode('&', $items); |
| 219 | 219 | } |
| 220 | 220 | unset($next_search, $items); |
| 221 | 221 | } |
| 222 | - $search_url = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/search.php?' . $paras; |
|
| 222 | + $search_url = XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/search.php?'.$paras; |
|
| 223 | 223 | // irmtfan remove to have just one query and appropriate next and prev links |
| 224 | 224 | //$next_results = newbb_search($queries, $andor, 1, $start + $limit, $uid, $forum, $sortby, $searchin, $subquery); |
| 225 | 225 | //$next_count = count($next_results); |
@@ -231,15 +231,15 @@ discard block |
||
| 231 | 231 | if ($num_results == $limit) { |
| 232 | 232 | $next = $start + $limit; |
| 233 | 233 | $queries = implode(',', $queries); |
| 234 | - $search_url_next = htmlspecialchars($search_url . "&direction=next&start={$next}", ENT_QUOTES | ENT_HTML5); |
|
| 235 | - $search_next = '<a href="' . $search_url_next . '">' . _SR_NEXT . '</a>'; |
|
| 234 | + $search_url_next = htmlspecialchars($search_url."&direction=next&start={$next}", ENT_QUOTES | ENT_HTML5); |
|
| 235 | + $search_next = '<a href="'.$search_url_next.'">'._SR_NEXT.'</a>'; |
|
| 236 | 236 | $xoopsTpl->assign('search_next', $search_next); |
| 237 | 237 | $xoopsTpl->assign('search_next_url', $search_url_next); |
| 238 | 238 | } |
| 239 | 239 | if ($start > 0) { |
| 240 | 240 | $prev = $start - $limit; |
| 241 | - $search_url_prev = htmlspecialchars($search_url . "&direction=previous&start={$prev}", ENT_QUOTES | ENT_HTML5); |
|
| 242 | - $search_prev = '<a href="' . $search_url_prev . '">' . _SR_PREVIOUS . '</a>'; |
|
| 241 | + $search_url_prev = htmlspecialchars($search_url."&direction=previous&start={$prev}", ENT_QUOTES | ENT_HTML5); |
|
| 242 | + $search_prev = '<a href="'.$search_url_prev.'">'._SR_PREVIOUS.'</a>'; |
|
| 243 | 243 | $xoopsTpl->assign('search_prev', $search_prev); |
| 244 | 244 | $xoopsTpl->assign('search_prev_url', $search_url_prev); |
| 245 | 245 | } |
@@ -250,18 +250,18 @@ discard block |
||
| 250 | 250 | redirect_header($search_url_redirect, 1, constant(strtoupper("_SR_{$direction}"))); |
| 251 | 251 | } |
| 252 | 252 | } |
| 253 | - $search_info = _SR_KEYWORDS . ': ' . $search_info_keywords; |
|
| 253 | + $search_info = _SR_KEYWORDS.': '.$search_info_keywords; |
|
| 254 | 254 | if ($uname_required) { |
| 255 | 255 | if ($search_info) { |
| 256 | 256 | $search_info .= '<br>'; |
| 257 | 257 | } |
| 258 | - $search_info .= _MD_NEWBB_USERNAME . ': ' . $myts->htmlSpecialChars($search_username); |
|
| 258 | + $search_info .= _MD_NEWBB_USERNAME.': '.$myts->htmlSpecialChars($search_username); |
|
| 259 | 259 | } |
| 260 | 260 | // add num_results |
| 261 | - $search_info .= '<br>' . sprintf(_SR_SHOWING, $start + 1, $start + $num_results); |
|
| 261 | + $search_info .= '<br>'.sprintf(_SR_SHOWING, $start + 1, $start + $num_results); |
|
| 262 | 262 | // if any result skip show the counter |
| 263 | 263 | if (!empty($skipresults)) { |
| 264 | - $search_info .= ' - ' . sprintf(_SR_FOUND, $num_results - $skipresults); |
|
| 264 | + $search_info .= ' - '.sprintf(_SR_FOUND, $num_results - $skipresults); |
|
| 265 | 265 | } |
| 266 | 266 | $xoopsTpl->assign('search_info', $search_info); |
| 267 | 267 | } |
@@ -275,18 +275,18 @@ discard block |
||
| 275 | 275 | if ('OR' === $andor) { |
| 276 | 276 | $andor_select .= ' selected="selected"'; |
| 277 | 277 | } |
| 278 | -$andor_select .= '>' . _SR_ANY . '</option>'; |
|
| 278 | +$andor_select .= '>'._SR_ANY.'</option>'; |
|
| 279 | 279 | $andor_select .= '<option value="AND"'; |
| 280 | 280 | if ('AND' === $andor || empty($andor)) { |
| 281 | 281 | $andor_select .= ' selected="selected"'; |
| 282 | 282 | } |
| 283 | -$andor_select .= '>' . _SR_ALL . '</option>'; |
|
| 283 | +$andor_select .= '>'._SR_ALL.'</option>'; |
|
| 284 | 284 | $andor_select .= '</select>'; |
| 285 | 285 | $xoopsTpl->assign('andor_selection_box', $andor_select); |
| 286 | 286 | |
| 287 | 287 | /* forum */ |
| 288 | 288 | $select_forum = '<select class="form-control" name="forum[]" id="forum" size="5" multiple="multiple">'; |
| 289 | -$select_forum .= '<option value="all">' . _MD_NEWBB_SEARCHALLFORUMS . '</option>'; |
|
| 289 | +$select_forum .= '<option value="all">'._MD_NEWBB_SEARCHALLFORUMS.'</option>'; |
|
| 290 | 290 | $select_forum .= newbbForumSelectBox($forum); |
| 291 | 291 | $select_forum .= '</select>'; |
| 292 | 292 | $xoopsTpl->assign_by_ref('forum_selection_box', $select_forum); |
@@ -297,17 +297,17 @@ discard block |
||
| 297 | 297 | if ('title' === $searchin) { |
| 298 | 298 | $searchin_select .= ' checked'; |
| 299 | 299 | } |
| 300 | -$searchin_select .= ' />' . _MD_NEWBB_SUBJECT . ' </label>'; |
|
| 300 | +$searchin_select .= ' />'._MD_NEWBB_SUBJECT.' </label>'; |
|
| 301 | 301 | $searchin_select .= '<label class="radio-inline"><input type="radio" name="searchin" value="text"'; |
| 302 | 302 | if ('text' === $searchin) { |
| 303 | 303 | $searchin_select .= ' checked'; |
| 304 | 304 | } |
| 305 | -$searchin_select .= ' />' . _MD_NEWBB_BODY . ' </label>'; |
|
| 305 | +$searchin_select .= ' />'._MD_NEWBB_BODY.' </label>'; |
|
| 306 | 306 | $searchin_select .= '<label class="radio-inline"><input type="radio" name="searchin" value="both"'; |
| 307 | 307 | if ('both' === $searchin || empty($searchin)) { |
| 308 | 308 | $searchin_select .= ' checked'; |
| 309 | 309 | } |
| 310 | -$searchin_select .= ' />' . _MD_NEWBB_SUBJECT . ' & ' . _MD_NEWBB_BODY . ' </label>'; |
|
| 310 | +$searchin_select .= ' />'._MD_NEWBB_SUBJECT.' & '._MD_NEWBB_BODY.' </label>'; |
|
| 311 | 311 | $xoopsTpl->assign('searchin_radio', $searchin_select); |
| 312 | 312 | |
| 313 | 313 | /* show_search */ |
@@ -316,12 +316,12 @@ discard block |
||
| 316 | 316 | if ('post' === $show_search) { |
| 317 | 317 | $show_search_select .= ' checked'; |
| 318 | 318 | } |
| 319 | -$show_search_select .= ' />' . _MD_NEWBB_POSTS . ' </label>'; |
|
| 319 | +$show_search_select .= ' />'._MD_NEWBB_POSTS.' </label>'; |
|
| 320 | 320 | $show_search_select .= '<label class="radio-inline"><input type="radio" name="show_search" value="post_text"'; |
| 321 | 321 | if ('post_text' === $show_search || empty($show_search)) { |
| 322 | 322 | $show_search_select .= ' checked'; |
| 323 | 323 | } |
| 324 | -$show_search_select .= ' />' . _MD_NEWBB_SEARCHPOSTTEXT . ' </label>'; |
|
| 324 | +$show_search_select .= ' />'._MD_NEWBB_SEARCHPOSTTEXT.' </label>'; |
|
| 325 | 325 | $xoopsTpl->assign('show_search_radio', $show_search_select); |
| 326 | 326 | |
| 327 | 327 | /* author */ |
@@ -333,12 +333,12 @@ discard block |
||
| 333 | 333 | if ('p.post_time' === $sortby || empty($sortby)) { |
| 334 | 334 | $sortby_select .= ' selected=\'selected\''; |
| 335 | 335 | } |
| 336 | -$sortby_select .= '>' . _MD_NEWBB_DATE . '</option>'; |
|
| 336 | +$sortby_select .= '>'._MD_NEWBB_DATE.'</option>'; |
|
| 337 | 337 | $sortby_select .= '<option value=\'p.subject\''; |
| 338 | 338 | if ('p.subject' === $sortby) { |
| 339 | 339 | $sortby_select .= ' selected="selected"'; |
| 340 | 340 | } |
| 341 | -$sortby_select .= '>' . _MD_NEWBB_TOPIC . '</option>'; |
|
| 341 | +$sortby_select .= '>'._MD_NEWBB_TOPIC.'</option>'; |
|
| 342 | 342 | $sortby_select .= '</select>'; |
| 343 | 343 | $xoopsTpl->assign('sortby_selection_box', $sortby_select); |
| 344 | 344 | |
@@ -354,5 +354,5 @@ discard block |
||
| 354 | 354 | $xoopsTpl->assign('search_rule', sprintf(_SR_KEYIGNORE, $xoopsConfigSearch['keyword_min'])); |
| 355 | 355 | } |
| 356 | 356 | // irmtfan move to footer.php |
| 357 | -require_once __DIR__ . '/footer.php'; |
|
| 357 | +require_once __DIR__.'/footer.php'; |
|
| 358 | 358 | include $GLOBALS['xoops']->path('footer.php'); |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | |
| 22 | 22 | if ((!defined('XOOPS_ROOT_PATH')) || !($GLOBALS['xoopsUser'] instanceof \XoopsUser) |
| 23 | 23 | || !$GLOBALS['xoopsUser']->IsAdmin()) { |
| 24 | - exit('Restricted access' . PHP_EOL); |
|
| 24 | + exit('Restricted access'.PHP_EOL); |
|
| 25 | 25 | } |
| 26 | 26 | |
| 27 | 27 | /** |
@@ -88,21 +88,21 @@ discard block |
||
| 88 | 88 | if ($tables->useTable($table)) { |
| 89 | 89 | $tables->alterColumn($table, $column, $attributes, $newName); |
| 90 | 90 | if (!$tables->executeQueue()) { |
| 91 | - echo '<br>' . _AM_NEWBB_UPGRADEFAILED0 . ' ' . $migrate->getLastError(); |
|
| 91 | + echo '<br>'._AM_NEWBB_UPGRADEFAILED0.' '.$migrate->getLastError(); |
|
| 92 | 92 | } |
| 93 | 93 | } |
| 94 | 94 | |
| 95 | 95 | //delete old HTML templates |
| 96 | 96 | if (count($configurator->templateFolders) > 0) { |
| 97 | 97 | foreach ($configurator->templateFolders as $folder) { |
| 98 | - $templateFolder = $GLOBALS['xoops']->path('modules/' . $moduleDirName . $folder); |
|
| 98 | + $templateFolder = $GLOBALS['xoops']->path('modules/'.$moduleDirName.$folder); |
|
| 99 | 99 | if (is_dir($templateFolder)) { |
| 100 | 100 | $templateList = array_diff(scandir($templateFolder, SCANDIR_SORT_NONE), ['..', '.']); |
| 101 | 101 | foreach ($templateList as $k => $v) { |
| 102 | - $fileInfo = new \SplFileInfo($templateFolder . $v); |
|
| 102 | + $fileInfo = new \SplFileInfo($templateFolder.$v); |
|
| 103 | 103 | if ('html' === $fileInfo->getExtension() && 'index.html' !== $fileInfo->getFilename()) { |
| 104 | - if (file_exists($templateFolder . $v)) { |
|
| 105 | - unlink($templateFolder . $v); |
|
| 104 | + if (file_exists($templateFolder.$v)) { |
|
| 105 | + unlink($templateFolder.$v); |
|
| 106 | 106 | } |
| 107 | 107 | } |
| 108 | 108 | } |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | if (count($configurator->oldFiles) > 0) { |
| 115 | 115 | // foreach (array_keys($GLOBALS['uploadFolders']) as $i) { |
| 116 | 116 | foreach (array_keys($configurator->oldFiles) as $i) { |
| 117 | - $tempFile = $GLOBALS['xoops']->path('modules/' . $moduleDirName . $configurator->oldFiles[$i]); |
|
| 117 | + $tempFile = $GLOBALS['xoops']->path('modules/'.$moduleDirName.$configurator->oldFiles[$i]); |
|
| 118 | 118 | if (is_file($tempFile)) { |
| 119 | 119 | unlink($tempFile); |
| 120 | 120 | } |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | if (count($configurator->oldFolders) > 0) { |
| 127 | 127 | // foreach (array_keys($GLOBALS['uploadFolders']) as $i) { |
| 128 | 128 | foreach (array_keys($configurator->oldFolders) as $i) { |
| 129 | - $tempFolder = $GLOBALS['xoops']->path('modules/' . $moduleDirName . $configurator->oldFolders[$i]); |
|
| 129 | + $tempFolder = $GLOBALS['xoops']->path('modules/'.$moduleDirName.$configurator->oldFolders[$i]); |
|
| 130 | 130 | /* @var $folderHandler XoopsObjectHandler */ |
| 131 | 131 | $folderHandler = \XoopsFile::getHandler('folder', $tempFolder); |
| 132 | 132 | $folderHandler->delete($tempFolder); |
@@ -143,15 +143,15 @@ discard block |
||
| 143 | 143 | |
| 144 | 144 | // --- COPY blank.png FILES --------------- |
| 145 | 145 | if (count($configurator->copyBlankFiles) > 0) { |
| 146 | - $file = __DIR__ . '/../assets/images/blank.png'; |
|
| 146 | + $file = __DIR__.'/../assets/images/blank.png'; |
|
| 147 | 147 | foreach (array_keys($configurator->copyBlankFiles) as $i) { |
| 148 | - $dest = $configurator->copyBlankFiles[$i] . '/blank.png'; |
|
| 148 | + $dest = $configurator->copyBlankFiles[$i].'/blank.png'; |
|
| 149 | 149 | $utilityClass::copyFile($file, $dest); |
| 150 | 150 | } |
| 151 | 151 | } |
| 152 | 152 | |
| 153 | 153 | //delete .html entries from the tpl table |
| 154 | - $sql = 'DELETE FROM ' . $GLOBALS['xoopsDB']->prefix('tplfile') . " WHERE `tpl_module` = '" . $module->getVar('dirname', 'n') . '\' AND `tpl_file` LIKE \'%.html%\''; |
|
| 154 | + $sql = 'DELETE FROM '.$GLOBALS['xoopsDB']->prefix('tplfile')." WHERE `tpl_module` = '".$module->getVar('dirname', 'n').'\' AND `tpl_file` LIKE \'%.html%\''; |
|
| 155 | 155 | $GLOBALS['xoopsDB']->queryF($sql); |
| 156 | 156 | |
| 157 | 157 | /** @var XoopsGroupPermHandler $gpermHandler */ |
@@ -20,12 +20,12 @@ discard block |
||
| 20 | 20 | */ |
| 21 | 21 | |
| 22 | 22 | // defined('XOOPS_ROOT_PATH') || die('Restricted access'); |
| 23 | -require_once __DIR__ . '/common.php'; |
|
| 23 | +require_once __DIR__.'/common.php'; |
|
| 24 | 24 | |
| 25 | 25 | $moduleDirName = basename(dirname(__DIR__)); |
| 26 | 26 | $uploadFolders = [ |
| 27 | 27 | NEWBB_UPLOAD_PATH, |
| 28 | - NEWBB_UPLOAD_PATH . '/thumbs' |
|
| 28 | + NEWBB_UPLOAD_PATH.'/thumbs' |
|
| 29 | 29 | ]; |
| 30 | 30 | |
| 31 | 31 | /** |
@@ -36,24 +36,24 @@ discard block |
||
| 36 | 36 | $moduleDirName = basename(dirname(__DIR__)); |
| 37 | 37 | $moduleDirNameUpper = strtoupper($moduleDirName); |
| 38 | 38 | return (object)[ |
| 39 | - 'name' => strtoupper($moduleDirName) . ' Module Configurator', |
|
| 39 | + 'name' => strtoupper($moduleDirName).' Module Configurator', |
|
| 40 | 40 | 'paths' => [ |
| 41 | 41 | 'dirname' => $moduleDirName, |
| 42 | - 'admin' => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/admin', |
|
| 43 | - 'modPath' => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName, |
|
| 44 | - 'modUrl' => XOOPS_URL . '/modules/' . $moduleDirName, |
|
| 45 | - 'uploadPath' => XOOPS_UPLOAD_PATH . '/' . $moduleDirName, |
|
| 46 | - 'uploadUrl' => XOOPS_UPLOAD_URL . '/' . $moduleDirName, |
|
| 42 | + 'admin' => XOOPS_ROOT_PATH.'/modules/'.$moduleDirName.'/admin', |
|
| 43 | + 'modPath' => XOOPS_ROOT_PATH.'/modules/'.$moduleDirName, |
|
| 44 | + 'modUrl' => XOOPS_URL.'/modules/'.$moduleDirName, |
|
| 45 | + 'uploadPath' => XOOPS_UPLOAD_PATH.'/'.$moduleDirName, |
|
| 46 | + 'uploadUrl' => XOOPS_UPLOAD_URL.'/'.$moduleDirName, |
|
| 47 | 47 | ], |
| 48 | 48 | 'uploadFolders' => [ |
| 49 | - constant($moduleDirNameUpper . '_UPLOAD_PATH'), |
|
| 50 | - constant($moduleDirNameUpper . '_UPLOAD_PATH') . '/thumbs', |
|
| 49 | + constant($moduleDirNameUpper.'_UPLOAD_PATH'), |
|
| 50 | + constant($moduleDirNameUpper.'_UPLOAD_PATH').'/thumbs', |
|
| 51 | 51 | |
| 52 | 52 | //XOOPS_UPLOAD_PATH . '/flags' |
| 53 | 53 | ], |
| 54 | 54 | 'copyBlankFiles' => [ |
| 55 | - constant($moduleDirNameUpper . '_UPLOAD_PATH'), |
|
| 56 | - constant($moduleDirNameUpper . '_UPLOAD_PATH') . '/thumbs', |
|
| 55 | + constant($moduleDirNameUpper.'_UPLOAD_PATH'), |
|
| 56 | + constant($moduleDirNameUpper.'_UPLOAD_PATH').'/thumbs', |
|
| 57 | 57 | //XOOPS_UPLOAD_PATH . '/flags' |
| 58 | 58 | ], |
| 59 | 59 | |
@@ -88,6 +88,6 @@ discard block |
||
| 88 | 88 | '/images', |
| 89 | 89 | ], |
| 90 | 90 | 'modCopyright' => "<a href='https://xoops.org' title='XOOPS Project' target='_blank'> |
| 91 | - <img src='" . constant($moduleDirNameUpper . '_AUTHOR_LOGOIMG') . '\' alt=\'XOOPS Project\' /></a>', |
|
| 91 | + <img src='" . constant($moduleDirNameUpper.'_AUTHOR_LOGOIMG').'\' alt=\'XOOPS Project\' /></a>', |
|
| 92 | 92 | ]; |
| 93 | 93 | } |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | |
| 14 | 14 | use XoopsModules\Newbb; |
| 15 | 15 | |
| 16 | -defined('NEWBB_FUNCTIONS_INI') || require_once __DIR__ . '/functions.ini.php'; |
|
| 16 | +defined('NEWBB_FUNCTIONS_INI') || require_once __DIR__.'/functions.ini.php'; |
|
| 17 | 17 | define('NEWBB_FUNCTIONS_CONFIG_LOADED', true); |
| 18 | 18 | |
| 19 | 19 | if (!defined('NEWBB_FUNCTIONS_CONFIG')) { |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | $configs = is_object($helper) ? $helper->getConfig() : []; |
| 39 | - $plugins = include __DIR__ . '/plugin.php'; |
|
| 39 | + $plugins = include __DIR__.'/plugin.php'; |
|
| 40 | 40 | if (is_array($configs) && is_array($plugins)) { |
| 41 | 41 | $configs = array_merge($configs, $plugins); |
| 42 | 42 | } |
@@ -68,11 +68,11 @@ discard block |
||
| 68 | 68 | $op_select = new \XoopsFormSelect('', 'action'); |
| 69 | 69 | $op_select->setExtra('onchange="document.forms.actionform.submit()"'); |
| 70 | 70 | $op_select->addOptionArray([ |
| 71 | - 'no' => _SELECT, |
|
| 72 | - 'template' => _AM_NEWBB_PERM_TEMPLATE, |
|
| 73 | - 'apply' => _AM_NEWBB_PERM_TEMPLATEAPP, |
|
| 74 | - 'default' => _AM_NEWBB_PERM_SETBYGROUP |
|
| 75 | - ]); |
|
| 71 | + 'no' => _SELECT, |
|
| 72 | + 'template' => _AM_NEWBB_PERM_TEMPLATE, |
|
| 73 | + 'apply' => _AM_NEWBB_PERM_TEMPLATEAPP, |
|
| 74 | + 'default' => _AM_NEWBB_PERM_SETBYGROUP |
|
| 75 | + ]); |
|
| 76 | 76 | $opform->addElement($op_select); |
| 77 | 77 | $opform->display(); |
| 78 | 78 | |
@@ -141,10 +141,10 @@ discard block |
||
| 141 | 141 | $op_select = new \XoopsFormSelect('', 'action'); |
| 142 | 142 | $op_select->setExtra('onchange="document.forms.actionform.submit()"'); |
| 143 | 143 | $op_select->addOptionArray([ |
| 144 | - 'no' => _SELECT, |
|
| 145 | - 'template' => _AM_NEWBB_PERM_TEMPLATE, |
|
| 146 | - 'apply' => _AM_NEWBB_PERM_TEMPLATEAPP |
|
| 147 | - ]); |
|
| 144 | + 'no' => _SELECT, |
|
| 145 | + 'template' => _AM_NEWBB_PERM_TEMPLATE, |
|
| 146 | + 'apply' => _AM_NEWBB_PERM_TEMPLATEAPP |
|
| 147 | + ]); |
|
| 148 | 148 | $opform->addElement($op_select); |
| 149 | 149 | $opform->display(); |
| 150 | 150 | |
@@ -219,11 +219,11 @@ discard block |
||
| 219 | 219 | $op_select = new \XoopsFormSelect('', 'action'); |
| 220 | 220 | $op_select->setExtra('onchange="document.forms.actionform.submit()"'); |
| 221 | 221 | $op_select->addOptionArray([ |
| 222 | - 'no' => _SELECT, |
|
| 223 | - 'template' => _AM_NEWBB_PERM_TEMPLATE, |
|
| 224 | - 'apply' => _AM_NEWBB_PERM_TEMPLATEAPP, |
|
| 225 | - 'default' => _AM_NEWBB_PERM_SETBYGROUP |
|
| 226 | - ]); |
|
| 222 | + 'no' => _SELECT, |
|
| 223 | + 'template' => _AM_NEWBB_PERM_TEMPLATE, |
|
| 224 | + 'apply' => _AM_NEWBB_PERM_TEMPLATEAPP, |
|
| 225 | + 'default' => _AM_NEWBB_PERM_SETBYGROUP |
|
| 226 | + ]); |
|
| 227 | 227 | $opform->addElement($op_select); |
| 228 | 228 | $opform->display(); |
| 229 | 229 | |
@@ -32,7 +32,7 @@ discard block |
||
| 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'); |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | case 'template': |
| 64 | 64 | xoops_cp_header(); |
| 65 | 65 | $adminObject->displayNavigation(basename(__FILE__)); |
| 66 | - echo "<legend style='font-weight: bold; color: #900;'>" . _AM_NEWBB_PERM_ACTION . '</legend>'; |
|
| 66 | + echo "<legend style='font-weight: bold; color: #900;'>"._AM_NEWBB_PERM_ACTION.'</legend>'; |
|
| 67 | 67 | $opform = new \XoopsSimpleForm(_AM_NEWBB_PERM_ACTION_HELP_TEMPLAT, 'actionform', 'admin_permissions.php', 'get'); |
| 68 | 68 | $op_select = new \XoopsFormSelect('', 'action'); |
| 69 | 69 | $op_select->setExtra('onchange="document.forms.actionform.submit()"'); |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | $perm_template = $newbbpermHandler->getTemplate(); |
| 83 | 83 | foreach (array_keys($glist) as $i) { |
| 84 | 84 | $selected = !empty($perm_template[$i]) ? array_keys($perm_template[$i]) : []; |
| 85 | - $ret_ele = '<tr align="left" valign="top"><td class="head">' . $glist[$i] . '</td>'; |
|
| 85 | + $ret_ele = '<tr align="left" valign="top"><td class="head">'.$glist[$i].'</td>'; |
|
| 86 | 86 | $ret_ele .= '<td class="even">'; |
| 87 | 87 | $ret_ele .= '<table class="outer"><tr><td class="odd"><table><tr>'; |
| 88 | 88 | $ii = 0; |
@@ -92,13 +92,13 @@ discard block |
||
| 92 | 92 | if (0 == $ii % 5) { |
| 93 | 93 | $ret_ele .= '</tr><tr>'; |
| 94 | 94 | } |
| 95 | - $checked = in_array('forum_' . $perm, $selected) ? ' checked' : ''; |
|
| 96 | - $option_id = $perm . '_' . $i; |
|
| 95 | + $checked = in_array('forum_'.$perm, $selected) ? ' checked' : ''; |
|
| 96 | + $option_id = $perm.'_'.$i; |
|
| 97 | 97 | $option_ids[] = $option_id; |
| 98 | - $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>'; |
|
| 98 | + $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>'; |
|
| 99 | 99 | } |
| 100 | 100 | $ret_ele .= '</tr></table></td><td class="even">'; |
| 101 | - $ret_ele .= _ALL . ' <input id="checkall[' . $i . ']" type="checkbox" value="" onclick="var optionids = new Array(' . implode(', ', $option_ids) . '); xoopsCheckAllElements(optionids, \'checkall[' . $i . ']\')" />'; |
|
| 101 | + $ret_ele .= _ALL.' <input id="checkall['.$i.']" type="checkbox" value="" onclick="var optionids = new Array('.implode(', ', $option_ids).'); xoopsCheckAllElements(optionids, \'checkall['.$i.']\')" />'; |
|
| 102 | 102 | $ret_ele .= '</td></tr></table>'; |
| 103 | 103 | $ret_ele .= '</td></tr>'; |
| 104 | 104 | $elements[] = $ret_ele; |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | $tray->addElement(new \XoopsFormHidden('action', 'template_save')); |
| 108 | 108 | $tray->addElement(new \XoopsFormButton('', 'submit', _SUBMIT, 'submit')); |
| 109 | 109 | $tray->addElement(new \XoopsFormButton('', 'reset', _CANCEL, 'reset')); |
| 110 | - $ret = '<br><strong>' . _AM_NEWBB_PERM_TEMPLATE . '</strong><br>' . _AM_NEWBB_PERM_TEMPLATE_DESC . '<br>'; |
|
| 110 | + $ret = '<br><strong>'._AM_NEWBB_PERM_TEMPLATE.'</strong><br>'._AM_NEWBB_PERM_TEMPLATE_DESC.'<br>'; |
|
| 111 | 111 | $ret .= "<form name='template' id='template' method='post'>\n<table width='100%' class='outer' cellspacing='1'>\n"; |
| 112 | 112 | $ret .= implode("\n", $elements); |
| 113 | 113 | $ret .= '<tr align="left" valign="top"><td class="head"></td><td class="even" style="text-align:center;">'; |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | $ret .= '</td></tr>'; |
| 116 | 116 | $ret .= '</table></form>'; |
| 117 | 117 | echo $ret; |
| 118 | - require_once __DIR__ . '/admin_footer.php'; |
|
| 118 | + require_once __DIR__.'/admin_footer.php'; |
|
| 119 | 119 | break; |
| 120 | 120 | |
| 121 | 121 | case 'template_save': |
@@ -136,7 +136,7 @@ discard block |
||
| 136 | 136 | } |
| 137 | 137 | xoops_cp_header(); |
| 138 | 138 | $adminObject->displayNavigation(basename(__FILE__)); |
| 139 | - echo "<legend style='font-weight: bold; color: #900;'>" . _AM_NEWBB_PERM_ACTION . '</legend>'; |
|
| 139 | + echo "<legend style='font-weight: bold; color: #900;'>"._AM_NEWBB_PERM_ACTION.'</legend>'; |
|
| 140 | 140 | $opform = new \XoopsSimpleForm(_AM_NEWBB_PERM_ACTION_HELP_APPLY, 'actionform', 'admin_permissions.php', 'get'); |
| 141 | 141 | $op_select = new \XoopsFormSelect('', 'action'); |
| 142 | 142 | $op_select->setExtra('onchange="document.forms.actionform.submit()"'); |
@@ -159,9 +159,9 @@ discard block |
||
| 159 | 159 | $forums = $forumHandler->getTree(array_keys($categories), 0, 'all'); |
| 160 | 160 | foreach (array_keys($forums) as $c) { |
| 161 | 161 | $fm_options[-1 * $c - 1000] = ' '; |
| 162 | - $fm_options[-1 * $c] = '[' . $categories[$c] . ']'; |
|
| 162 | + $fm_options[-1 * $c] = '['.$categories[$c].']'; |
|
| 163 | 163 | foreach (array_keys($forums[$c]) as $f) { |
| 164 | - $fm_options[$f] = $forums[$c][$f]['prefix'] . $forums[$c][$f]['forum_name']; |
|
| 164 | + $fm_options[$f] = $forums[$c][$f]['prefix'].$forums[$c][$f]['forum_name']; |
|
| 165 | 165 | } |
| 166 | 166 | } |
| 167 | 167 | unset($forums, $categories); |
@@ -176,7 +176,7 @@ discard block |
||
| 176 | 176 | $tray->addElement(new \XoopsFormButton('', 'reset', _CANCEL, 'reset')); |
| 177 | 177 | $fmform->addElement($tray); |
| 178 | 178 | $fmform->display(); |
| 179 | - require_once __DIR__ . '/admin_footer.php'; |
|
| 179 | + require_once __DIR__.'/admin_footer.php'; |
|
| 180 | 180 | break; |
| 181 | 181 | |
| 182 | 182 | case 'apply_save': |
@@ -214,7 +214,7 @@ discard block |
||
| 214 | 214 | } |
| 215 | 215 | |
| 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, 'actionform', 'admin_permissions.php', 'get'); |
| 219 | 219 | $op_select = new \XoopsFormSelect('', 'action'); |
| 220 | 220 | $op_select->setExtra('onchange="document.forms.actionform.submit()"'); |
@@ -237,10 +237,10 @@ discard block |
||
| 237 | 237 | ] |
| 238 | 238 | ]; |
| 239 | 239 | foreach ($perms as $perm) { |
| 240 | - $op_options[$perm] = constant('_AM_NEWBB_CAN_' . strtoupper($perm)); |
|
| 240 | + $op_options[$perm] = constant('_AM_NEWBB_CAN_'.strtoupper($perm)); |
|
| 241 | 241 | $fm_options[$perm] = [ |
| 242 | - 'title' => constant('_AM_NEWBB_CAN_' . strtoupper($perm)), |
|
| 243 | - 'item' => 'forum_' . $perm, |
|
| 242 | + 'title' => constant('_AM_NEWBB_CAN_'.strtoupper($perm)), |
|
| 243 | + 'item' => 'forum_'.$perm, |
|
| 244 | 244 | 'desc' => '', |
| 245 | 245 | 'anonymous' => true |
| 246 | 246 | ]; |
@@ -281,10 +281,10 @@ discard block |
||
| 281 | 281 | if (count($forums) > 0) { |
| 282 | 282 | foreach (array_keys($forums) as $c) { |
| 283 | 283 | $key_c = -1 * $c; |
| 284 | - $form->addItem($key_c, '<strong>[' . $categories[$c] . ']</strong>'); |
|
| 284 | + $form->addItem($key_c, '<strong>['.$categories[$c].']</strong>'); |
|
| 285 | 285 | foreach (array_keys($forums[$c]) as $f) { |
| 286 | 286 | $pid = $forums[$c][$f]['parent_forum'] ?: $key_c; |
| 287 | - $form->addItem($f, $forums[$c][$f]['prefix'] . $forums[$c][$f]['forum_name'], $pid); |
|
| 287 | + $form->addItem($f, $forums[$c][$f]['prefix'].$forums[$c][$f]['forum_name'], $pid); |
|
| 288 | 288 | } |
| 289 | 289 | } |
| 290 | 290 | } |
@@ -292,7 +292,7 @@ discard block |
||
| 292 | 292 | } |
| 293 | 293 | $form->display(); |
| 294 | 294 | echo '<fieldset>'; |
| 295 | - echo '<legend> ' . _MI_NEWBB_ADMENU_PERMISSION . ' </legend>'; |
|
| 295 | + echo '<legend> '._MI_NEWBB_ADMENU_PERMISSION.' </legend>'; |
|
| 296 | 296 | echo _AM_NEWBB_HELP_PERMISSION_TAB; |
| 297 | 297 | echo '</fieldset>'; |
| 298 | 298 | // Since we can not control the permission update, a trick is used here |
@@ -301,6 +301,6 @@ discard block |
||
| 301 | 301 | $permissionHandler->createPermData(); |
| 302 | 302 | $cacheHelper = Newbb\Utility::cleanCache(); |
| 303 | 303 | //$cacheHelper->delete('permission'); |
| 304 | - require_once __DIR__ . '/admin_footer.php'; |
|
| 304 | + require_once __DIR__.'/admin_footer.php'; |
|
| 305 | 305 | break; |
| 306 | 306 | } |