@@ -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,16 +21,16 @@ 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 | -require_once __DIR__ . '/./class/TopicRenderer.php'; |
|
| 33 | +require_once __DIR__.'/./class/TopicRenderer.php'; |
|
| 34 | 34 | $topic_renderer = Newbb\TopicRenderer::getInstance(); |
| 35 | 35 | $topic_renderer->userlevel = $GLOBALS['xoopsUserIsAdmin'] ? 2 : is_object($GLOBALS['xoopsUser']); |
| 36 | 36 | // irmtfan if list topic block is in the page then force to parse |
@@ -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'); |
@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | define('XOOPS_XMLRPC', 1); |
| 17 | 17 | } |
| 18 | 18 | ob_start(); |
| 19 | -require_once __DIR__ . '/header.php'; |
|
| 19 | +require_once __DIR__.'/header.php'; |
|
| 20 | 20 | if (0 == $GLOBALS['xoopsModuleConfig']['email_digest']) { |
| 21 | 21 | echo '<br>Not set'; |
| 22 | 22 | |
@@ -25,6 +25,6 @@ discard block |
||
| 25 | 25 | /** @var Newbb\DigestHandler $digestHandler */ |
| 26 | 26 | $digestHandler = Newbb\Helper::getInstance()->getHandler('Digest'); |
| 27 | 27 | $msg = $digestHandler->process(); |
| 28 | -$msg .= ob_get_contents(); |
|
| 28 | +$msg .= ob_get_contents(); |
|
| 29 | 29 | ob_end_clean(); |
| 30 | -echo '<br>' . $msg; |
|
| 30 | +echo '<br>'.$msg; |
|
@@ -11,8 +11,8 @@ discard block |
||
| 11 | 11 | |
| 12 | 12 | use Xmf\Request; |
| 13 | 13 | |
| 14 | -include dirname(dirname(__DIR__)) . '/mainfile.php'; |
|
| 15 | -require_once __DIR__ . '/include/common.php'; |
|
| 14 | +include dirname(dirname(__DIR__)).'/mainfile.php'; |
|
| 15 | +require_once __DIR__.'/include/common.php'; |
|
| 16 | 16 | |
| 17 | 17 | // defined('XOOPS_ROOT_PATH') || die('Restricted access'); |
| 18 | 18 | /** @var \XoopsLogger $xoopsLogger */ |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | //require_once $GLOBALS['xoops']->path('header.php'); |
| 24 | 24 | |
| 25 | 25 | if (!empty($GLOBALS['xoopsModuleConfig']['do_rewrite'])) { |
| 26 | - require_once __DIR__ . '/seo_url.php'; |
|
| 26 | + require_once __DIR__.'/seo_url.php'; |
|
| 27 | 27 | /* for seo */ |
| 28 | 28 | $toseo_url = ['index.php', 'viewforum.php', 'viewtopic.php', 'rss.php']; |
| 29 | 29 | |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | //rewrite only for files |
| 38 | 38 | |
| 39 | 39 | if ('' !== trim(getenv('SCRIPT_NAME'))) { |
| 40 | - if (false === strpos(getenv('REQUEST_URI'), '/' . SEO_MODULE_NAME . '/')) { |
|
| 40 | + if (false === strpos(getenv('REQUEST_URI'), '/'.SEO_MODULE_NAME.'/')) { |
|
| 41 | 41 | $redir = true; |
| 42 | 42 | } elseif (getenv('QUERY_STRING')) { |
| 43 | 43 | $redir = true; |
@@ -47,9 +47,9 @@ discard block |
||
| 47 | 47 | } |
| 48 | 48 | |
| 49 | 49 | if (true === $redir) { |
| 50 | - $s = 'http://' . getenv('HTTP_HOST') . getenv('REQUEST_URI'); |
|
| 51 | - $s = str_replace('/' . REAL_MODULE_NAME . '/', '/' . SEO_MODULE_NAME . '/', $s); |
|
| 52 | - $newurl = seo_urls('<a href="' . $s . '"></a>'); |
|
| 50 | + $s = 'http://'.getenv('HTTP_HOST').getenv('REQUEST_URI'); |
|
| 51 | + $s = str_replace('/'.REAL_MODULE_NAME.'/', '/'.SEO_MODULE_NAME.'/', $s); |
|
| 52 | + $newurl = seo_urls('<a href="'.$s.'"></a>'); |
|
| 53 | 53 | $newurl = str_replace('<a href="', '', $newurl); |
| 54 | 54 | $newurl = str_replace('"></a>', '', $newurl); |
| 55 | 55 | if (!headers_sent()) { |
@@ -61,10 +61,10 @@ discard block |
||
| 61 | 61 | } |
| 62 | 62 | } |
| 63 | 63 | |
| 64 | -require_once $GLOBALS['xoops']->path('modules/' . $moduleDirName . '/include/vars.php'); |
|
| 64 | +require_once $GLOBALS['xoops']->path('modules/'.$moduleDirName.'/include/vars.php'); |
|
| 65 | 65 | |
| 66 | -require_once __DIR__ . '/include/functions.user.php'; |
|
| 67 | -require_once __DIR__ . '/include/functions.topic.php'; |
|
| 66 | +require_once __DIR__.'/include/functions.user.php'; |
|
| 67 | +require_once __DIR__.'/include/functions.topic.php'; |
|
| 68 | 68 | |
| 69 | 69 | require_once $GLOBALS['xoops']->path('class/xoopsformloader.php'); |
| 70 | 70 | require_once $GLOBALS['xoops']->path('class/module.textsanitizer.php'); |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | $menumode = 0; |
| 74 | 74 | $menumode_other = []; |
| 75 | 75 | $menu_url = htmlspecialchars(preg_replace('/&menumode=[^&]/', '', Request::getString('REQUEST_URI', '', 'SERVER'))); |
| 76 | -$menu_url .= (false === strpos($menu_url, '?')) ? '?menumode=' : '&menumode='; |
|
| 76 | +$menu_url .= (false === strpos($menu_url, '?')) ? '?menumode=' : '&menumode='; |
|
| 77 | 77 | //foreach ($GLOBALS['xoopsModuleConfig']['valid_menumodes'] as $key => $val) { |
| 78 | 78 | // if ($key !== $menumode) { |
| 79 | 79 | // $menumode_other[] = array('title' => $val, 'link' => $menu_url . $key); |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | |
| 83 | 83 | if (is_object($GLOBALS['xoopsUser']) && !empty($GLOBALS['xoopsModuleConfig']['welcome_forum']) |
| 84 | 84 | && !$GLOBALS['xoopsUser']->getVar('posts')) { |
| 85 | - require_once __DIR__ . '/include/functions.welcome.php'; |
|
| 85 | + require_once __DIR__.'/include/functions.welcome.php'; |
|
| 86 | 86 | } |
| 87 | 87 | // irmtfan for backward compatibility |
| 88 | 88 | $pollmodules = $GLOBALS['xoopsModuleConfig']['poll_module']; |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | use Xmf\Request; |
| 33 | 33 | use XoopsModules\Newbb; |
| 34 | 34 | |
| 35 | -require_once __DIR__ . '/header.php'; |
|
| 35 | +require_once __DIR__.'/header.php'; |
|
| 36 | 36 | |
| 37 | 37 | $forum = Request::getInt('forum', 0, 'GET'); |
| 38 | 38 | $topic_id = Request::getInt('topic_id', 0, 'GET'); |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | |
| 66 | 66 | $forumObject = $forumHandler->get($forum); |
| 67 | 67 | if (!$forumHandler->getPermission($forumObject)) { |
| 68 | - redirect_header(XOOPS_URL . '/index.php', 2, _MD_NEWBB_NORIGHTTOACCESS); |
|
| 68 | + redirect_header(XOOPS_URL.'/index.php', 2, _MD_NEWBB_NORIGHTTOACCESS); |
|
| 69 | 69 | } |
| 70 | 70 | |
| 71 | 71 | $topicObject = $topicHandler->get($topic_id); |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | $query_array = []; |
| 79 | 79 | foreach ($query_vars as $var) { |
| 80 | 80 | if (Request::getString($var, '', 'GET')) { |
| 81 | - $query_array[$var] = "{$var}=" . Request::getString($var, '', 'GET'); |
|
| 81 | + $query_array[$var] = "{$var}=".Request::getString($var, '', 'GET'); |
|
| 82 | 82 | } |
| 83 | 83 | } |
| 84 | 84 | $page_query = htmlspecialchars(implode('&', array_values($query_array))); |
@@ -133,8 +133,8 @@ discard block |
||
| 133 | 133 | $r_subject = $postParentObject->getVar('subject', 'E'); |
| 134 | 134 | |
| 135 | 135 | $subject = $r_subject; |
| 136 | -if (!preg_match('/^(Re|' . _MD_NEWBB_RE . '):/i', $r_subject)) { |
|
| 137 | - $subject = _MD_NEWBB_RE . ': ' . $r_subject; |
|
| 136 | +if (!preg_match('/^(Re|'._MD_NEWBB_RE.'):/i', $r_subject)) { |
|
| 137 | + $subject = _MD_NEWBB_RE.': '.$r_subject; |
|
| 138 | 138 | } |
| 139 | 139 | |
| 140 | 140 | $q_message = $postParentObject->getVar('post_text', 'e'); |
@@ -143,12 +143,12 @@ discard block |
||
| 143 | 143 | if (1 === Request::getInt('quotedac', 0, 'GET')) { |
| 144 | 144 | $message = "[quote]\n"; |
| 145 | 145 | $message .= sprintf(_MD_NEWBB_USERWROTE, $r_name); |
| 146 | - $message .= "\n" . $q_message . '[/quote]'; |
|
| 146 | + $message .= "\n".$q_message.'[/quote]'; |
|
| 147 | 147 | $hidden = ''; |
| 148 | 148 | } else { |
| 149 | 149 | $hidden = "[quote]\n"; |
| 150 | 150 | $hidden .= sprintf(_MD_NEWBB_USERWROTE, $r_name); |
| 151 | - $hidden .= "\n" . $q_message . '[/quote]'; |
|
| 151 | + $hidden .= "\n".$q_message.'[/quote]'; |
|
| 152 | 152 | $message = ''; |
| 153 | 153 | } |
| 154 | 154 | } else { |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | $post_karma = 0; |
| 168 | 168 | $require_reply = 0; |
| 169 | 169 | |
| 170 | -include __DIR__ . '/include/form.post.php'; |
|
| 170 | +include __DIR__.'/include/form.post.php'; |
|
| 171 | 171 | |
| 172 | 172 | ///** @var Newbb\KarmaHandler $karmaHandler */ |
| 173 | 173 | //$karmaHandler = Newbb\Helper::getInstance()->getHandler('Karma'); |
@@ -180,7 +180,7 @@ discard block |
||
| 180 | 180 | foreach ($posts_contextObject as $post_contextObject) { |
| 181 | 181 | // Sorry, in order to save queries, we have to hide the non-open post_text even if you have replied or have adequate karma, even an admin. |
| 182 | 182 | if ($GLOBALS['xoopsModuleConfig']['enable_karma'] && $post_contextObject->getVar('post_karma') > 0) { |
| 183 | - $p_message = sprintf(_MD_NEWBB_KARMA_REQUIREMENT, '***', $post_contextObject->getVar('post_karma')) . '</div>'; |
|
| 183 | + $p_message = sprintf(_MD_NEWBB_KARMA_REQUIREMENT, '***', $post_contextObject->getVar('post_karma')).'</div>'; |
|
| 184 | 184 | } elseif ($GLOBALS['xoopsModuleConfig']['allow_require_reply'] && $post_contextObject->getVar('require_reply')) { |
| 185 | 185 | $p_message = _MD_NEWBB_REPLY_REQUIREMENT; |
| 186 | 186 | } else { |
@@ -198,11 +198,11 @@ discard block |
||
| 198 | 198 | |
| 199 | 199 | $posts_context[] = [ |
| 200 | 200 | 'subject' => $p_subject, |
| 201 | - 'meta' => _MD_NEWBB_BY . ' ' . $p_name . ' ' . _MD_NEWBB_ON . ' ' . $p_date, |
|
| 201 | + 'meta' => _MD_NEWBB_BY.' '.$p_name.' '._MD_NEWBB_ON.' '.$p_date, |
|
| 202 | 202 | 'content' => $p_message |
| 203 | 203 | ]; |
| 204 | 204 | } |
| 205 | 205 | $xoopsTpl->assign_by_ref('posts_context', $posts_context); |
| 206 | 206 | // irmtfan move to footer.php |
| 207 | -require_once __DIR__ . '/footer.php'; |
|
| 207 | +require_once __DIR__.'/footer.php'; |
|
| 208 | 208 | include $GLOBALS['xoops']->path('footer.php'); |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | use Xmf\Request; |
| 33 | 33 | use XoopsModules\Newbb; |
| 34 | 34 | |
| 35 | -require_once __DIR__ . '/header.php'; |
|
| 35 | +require_once __DIR__.'/header.php'; |
|
| 36 | 36 | |
| 37 | 37 | $start = Request::getInt('start', 0, 'GET'); |
| 38 | 38 | $forum_id = Request::getInt('forum', 0, 'GET'); |
@@ -72,8 +72,8 @@ discard block |
||
| 72 | 72 | //echo $mode.' - '.$status; |
| 73 | 73 | $post_perpage = $GLOBALS['xoopsModuleConfig']['posts_per_page']; |
| 74 | 74 | |
| 75 | -$criteria_count = new \CriteriaCompo(new \Criteria('forum_id', '(' . implode(',', $accessForums) . ')', 'IN')); |
|
| 76 | -$criteria_post = new \CriteriaCompo(new \Criteria('p.forum_id', '(' . implode(',', $accessForums) . ')', 'IN')); |
|
| 75 | +$criteria_count = new \CriteriaCompo(new \Criteria('forum_id', '('.implode(',', $accessForums).')', 'IN')); |
|
| 76 | +$criteria_post = new \CriteriaCompo(new \Criteria('p.forum_id', '('.implode(',', $accessForums).')', 'IN')); |
|
| 77 | 77 | $criteria_post->setSort('p.post_id'); |
| 78 | 78 | $criteria_post->setOrder($order); |
| 79 | 79 | |
@@ -106,12 +106,12 @@ discard block |
||
| 106 | 106 | // START irmtfan use read_uid to find the unread posts when the user is logged in |
| 107 | 107 | $read_uid = is_object($GLOBALS['xoopsUser']) ? $GLOBALS['xoopsUser']->getVar('uid') : 0; |
| 108 | 108 | if (!empty($read_uid)) { |
| 109 | - $join = ' LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('newbb_reads_topic') . ' AS r ON r.read_item = p.topic_id AND r.uid = ' . $read_uid . ' '; // irmtfan corrected add AS |
|
| 110 | - $criteria_status_post = new \CriteriaCompo();// irmtfan new \Criteria |
|
| 109 | + $join = ' LEFT JOIN '.$GLOBALS['xoopsDB']->prefix('newbb_reads_topic').' AS r ON r.read_item = p.topic_id AND r.uid = '.$read_uid.' '; // irmtfan corrected add AS |
|
| 110 | + $criteria_status_post = new \CriteriaCompo(); // irmtfan new \Criteria |
|
| 111 | 111 | $criteria_status_post->add(new \Criteria('p.post_id', 'r.`post_id`', '>')); // irmtfan corrected - should use $value='r.``' to render in XOOPS/class/criteria.php |
| 112 | - $criteria_status_post->add(new \Criteria('r.read_id', null, 'IS NULL'), 'OR');// irmtfan corrected - should use "IS NULL" to render in XOOPS/class/criteria.php |
|
| 112 | + $criteria_status_post->add(new \Criteria('r.read_id', null, 'IS NULL'), 'OR'); // irmtfan corrected - should use "IS NULL" to render in XOOPS/class/criteria.php |
|
| 113 | 113 | $criteria_post->add($criteria_status_post); // irmtfan add the status criteria to post criteria - move here |
| 114 | - $criteria_count = $criteria_post;// irmtfan criteria count is equal to criteria post - move here |
|
| 114 | + $criteria_count = $criteria_post; // irmtfan criteria count is equal to criteria post - move here |
|
| 115 | 115 | } else { |
| 116 | 116 | } |
| 117 | 117 | // END irmtfan use read_uid to find the unread posts when the user is logged in |
@@ -131,8 +131,8 @@ discard block |
||
| 131 | 131 | } |
| 132 | 132 | } |
| 133 | 133 | if (count($topics) > 0) { |
| 134 | - $criteria_count->add(new \Criteria('topic_id', '(' . implode(',', $topics) . ')', 'NOT IN')); |
|
| 135 | - $criteria_post->add(new \Criteria('p.topic_id', '(' . implode(',', $topics) . ')', 'NOT IN')); |
|
| 134 | + $criteria_count->add(new \Criteria('topic_id', '('.implode(',', $topics).')', 'NOT IN')); |
|
| 135 | + $criteria_post->add(new \Criteria('p.topic_id', '('.implode(',', $topics).')', 'NOT IN')); |
|
| 136 | 136 | } |
| 137 | 137 | // END irmtfan fix read_mode = 1 bugs - for all users (member and anon) |
| 138 | 138 | //$criteria_status_count->add(new \Criteria("approved", 1));// irmtfan commented and removed |
@@ -161,8 +161,8 @@ discard block |
||
| 161 | 161 | $viewmode = Request::getString('viewmode', (!empty($viewmode_cookie) ? $viewmode_cookie : (@$valid_modes[$GLOBALS['xoopsModuleConfig']['view_mode'] - 1])), 'GET'); |
| 162 | 162 | $viewmode = in_array($viewmode, $valid_modes) ? $viewmode : $valid_modes[0]; |
| 163 | 163 | |
| 164 | -$postCount = $postHandler->getPostCount($criteria_count, $join);// irmtfan add join for read_mode = 2 |
|
| 165 | -$posts = $postHandler->getPostsByLimit($criteria_post, $post_perpage, $start, $join);// irmtfan add join for read_mode = 2 |
|
| 164 | +$postCount = $postHandler->getPostCount($criteria_count, $join); // irmtfan add join for read_mode = 2 |
|
| 165 | +$posts = $postHandler->getPostsByLimit($criteria_post, $post_perpage, $start, $join); // irmtfan add join for read_mode = 2 |
|
| 166 | 166 | |
| 167 | 167 | $poster_array = []; |
| 168 | 168 | if (count($posts) > 0) { |
@@ -172,20 +172,20 @@ discard block |
||
| 172 | 172 | } |
| 173 | 173 | } |
| 174 | 174 | |
| 175 | -$xoops_pagetitle = $xoopsModule->getVar('name') . ' - ' . _MD_NEWBB_VIEWALLPOSTS; |
|
| 175 | +$xoops_pagetitle = $xoopsModule->getVar('name').' - '._MD_NEWBB_VIEWALLPOSTS; |
|
| 176 | 176 | $xoopsOption['xoops_pagetitle'] = $xoops_pagetitle; |
| 177 | 177 | $xoopsOption['template_main'] = 'newbb_viewpost.tpl'; |
| 178 | 178 | |
| 179 | 179 | require_once $GLOBALS['xoops']->path('header.php'); |
| 180 | -require_once __DIR__ . '/include/functions.time.php'; |
|
| 181 | -require_once __DIR__ . '/include/functions.render.php'; |
|
| 180 | +require_once __DIR__.'/include/functions.time.php'; |
|
| 181 | +require_once __DIR__.'/include/functions.render.php'; |
|
| 182 | 182 | |
| 183 | 183 | //global $xoTheme; |
| 184 | 184 | //$xoTheme->addScript('/Frameworks/textsanitizer/xoops.js'); |
| 185 | 185 | |
| 186 | 186 | if (!empty($forum_id)) { |
| 187 | 187 | if (!$forumHandler->getPermission($forumObject, 'view')) { |
| 188 | - redirect_header(XOOPS_URL . '/index.php', 2, _MD_NEWBB_NORIGHTTOACCESS); |
|
| 188 | + redirect_header(XOOPS_URL.'/index.php', 2, _MD_NEWBB_NORIGHTTOACCESS); |
|
| 189 | 189 | } |
| 190 | 190 | if ($forumObject->getVar('parent_forum')) { |
| 191 | 191 | $parent_forumObject = $forumHandler->get($forumObject->getVar('parent_forum'), ['forum_name']); |
@@ -199,17 +199,17 @@ discard block |
||
| 199 | 199 | $xoopsTpl->assign('forum_name', $forumObject->getVar('forum_name')); |
| 200 | 200 | $xoopsTpl->assign('forum_moderators', $forumObject->dispForumModerators()); |
| 201 | 201 | |
| 202 | - $xoops_pagetitle = $forumObject->getVar('forum_name') . ' - ' . _MD_NEWBB_VIEWALLPOSTS . ' [' . $xoopsModule->getVar('name') . ']'; |
|
| 202 | + $xoops_pagetitle = $forumObject->getVar('forum_name').' - '._MD_NEWBB_VIEWALLPOSTS.' ['.$xoopsModule->getVar('name').']'; |
|
| 203 | 203 | $xoopsTpl->assign('forum_id', $forumObject->getVar('forum_id')); |
| 204 | 204 | // irmtfan new method |
| 205 | 205 | if (!empty($GLOBALS['xoopsModuleConfig']['rss_enable'])) { |
| 206 | 206 | $xoopsTpl->assign('xoops_module_header', ' |
| 207 | - <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 . '" /> |
|
| 207 | + <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.'" /> |
|
| 208 | 208 | ' . @$xoopsTpl->get_template_vars('xoops_module_header')); |
| 209 | 209 | } |
| 210 | 210 | } elseif (!empty($GLOBALS['xoopsModuleConfig']['rss_enable'])) { |
| 211 | 211 | $xoopsTpl->assign('xoops_module_header', ' |
| 212 | - <link rel="alternate" type="application/xml+rss" title="' . $xoopsModule->getVar('name') . '" href="' . XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/rss.php" /> |
|
| 212 | + <link rel="alternate" type="application/xml+rss" title="' . $xoopsModule->getVar('name').'" href="'.XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/rss.php" /> |
|
| 213 | 213 | ' . @$xoopsTpl->get_template_vars('xoops_module_header')); |
| 214 | 214 | } |
| 215 | 215 | // irmtfan remove and move to footer.php |
@@ -222,7 +222,7 @@ discard block |
||
| 222 | 222 | /** @var \XoopsMembershipHandler $memberHandler */ |
| 223 | 223 | $memberHandler = xoops_getHandler('member'); |
| 224 | 224 | $userid_array = array_keys($poster_array); |
| 225 | - $user_criteria = '(' . implode(',', $userid_array) . ')'; |
|
| 225 | + $user_criteria = '('.implode(',', $userid_array).')'; |
|
| 226 | 226 | $users = $memberHandler->getUsers(new \Criteria('uid', $user_criteria, 'IN'), true); |
| 227 | 227 | } else { |
| 228 | 228 | $user_criteria = ''; |
@@ -260,9 +260,9 @@ discard block |
||
| 260 | 260 | $post_title = $post->getVar('subject'); |
| 261 | 261 | |
| 262 | 262 | if ($posticon = $post->getVar('icon')) { |
| 263 | - $post_image = '<a name="' . $post->getVar('post_id') . '"><img src="' . XOOPS_URL . '/images/subject/' . htmlspecialchars($posticon) . '" alt="" /></a>'; |
|
| 263 | + $post_image = '<a name="'.$post->getVar('post_id').'"><img src="'.XOOPS_URL.'/images/subject/'.htmlspecialchars($posticon).'" alt="" /></a>'; |
|
| 264 | 264 | } else { |
| 265 | - $post_image = '<a name="' . $post->getVar('post_id') . '"><img src="' . XOOPS_URL . '/images/icons/no_posticon.gif" alt="" /></a>'; |
|
| 265 | + $post_image = '<a name="'.$post->getVar('post_id').'"><img src="'.XOOPS_URL.'/images/icons/no_posticon.gif" alt="" /></a>'; |
|
| 266 | 266 | } |
| 267 | 267 | $poster = [ |
| 268 | 268 | 'uid' => 0, |
@@ -276,10 +276,10 @@ discard block |
||
| 276 | 276 | $post_text = $post->getVar('post_text'); |
| 277 | 277 | $post_attachment = $post->displayAttachment(); |
| 278 | 278 | } elseif ($GLOBALS['xoopsModuleConfig']['enable_karma'] && $post->getVar('post_karma') > $user_karma) { |
| 279 | - $post_text = "<div class='karma'>" . sprintf(_MD_NEWBB_KARMA_REQUIREMENT, $user_karma, $post->getVar('post_karma')) . '</div>'; |
|
| 279 | + $post_text = "<div class='karma'>".sprintf(_MD_NEWBB_KARMA_REQUIREMENT, $user_karma, $post->getVar('post_karma')).'</div>'; |
|
| 280 | 280 | $post_attachment = ''; |
| 281 | 281 | } elseif ($GLOBALS['xoopsModuleConfig']['allow_require_reply'] && $post->getVar('require_reply')) { |
| 282 | - $post_text = "<div class='karma'>" . _MD_NEWBB_REPLY_REQUIREMENT . '</div>'; |
|
| 282 | + $post_text = "<div class='karma'>"._MD_NEWBB_REPLY_REQUIREMENT.'</div>'; |
|
| 283 | 283 | $post_attachment = ''; |
| 284 | 284 | } else { |
| 285 | 285 | $post_text = $post->getVar('post_text'); |
@@ -299,40 +299,40 @@ discard block |
||
| 299 | 299 | || (!$suspension[$post->getVar('forum_id')] && $post->checkIdentity() |
| 300 | 300 | && $post->checkTimelimit('delete_timelimit'))) { |
| 301 | 301 | $thread_buttons['delete']['image'] = newbbDisplayImage('p_delete', _DELETE); |
| 302 | - $thread_buttons['delete']['link'] = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/delete.php?forum=' . $post->getVar('forum_id') . '&topic_id=' . $post->getVar('topic_id'); |
|
| 302 | + $thread_buttons['delete']['link'] = XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/delete.php?forum='.$post->getVar('forum_id').'&topic_id='.$post->getVar('topic_id'); |
|
| 303 | 303 | $thread_buttons['delete']['name'] = _DELETE; |
| 304 | 304 | } |
| 305 | 305 | if ($isAdmin |
| 306 | 306 | || !$suspension[$post->getVar('forum_id')] && $post->checkIdentity() |
| 307 | 307 | && $post->checkTimelimit('edit_timelimit')) { |
| 308 | 308 | $thread_buttons['edit']['image'] = newbbDisplayImage('p_edit', _EDIT); |
| 309 | - $thread_buttons['edit']['link'] = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/edit.php?forum=' . $post->getVar('forum_id') . '&topic_id=' . $post->getVar('topic_id'); |
|
| 309 | + $thread_buttons['edit']['link'] = XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/edit.php?forum='.$post->getVar('forum_id').'&topic_id='.$post->getVar('topic_id'); |
|
| 310 | 310 | $thread_buttons['edit']['name'] = _EDIT; |
| 311 | 311 | } |
| 312 | 312 | if (is_object($GLOBALS['xoopsUser']) && !$suspension[$post->getVar('forum_id')]) { |
| 313 | 313 | $thread_buttons['reply']['image'] = newbbDisplayImage('p_reply', _MD_NEWBB_REPLY); |
| 314 | - $thread_buttons['reply']['link'] = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/reply.php?forum=' . $post->getVar('forum_id') . '&topic_id=' . $post->getVar('topic_id'); |
|
| 314 | + $thread_buttons['reply']['link'] = XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/reply.php?forum='.$post->getVar('forum_id').'&topic_id='.$post->getVar('topic_id'); |
|
| 315 | 315 | $thread_buttons['reply']['name'] = _MD_NEWBB_REPLY; |
| 316 | 316 | |
| 317 | 317 | $thread_buttons['quote']['image'] = newbbDisplayImage('p_quote', _MD_NEWBB_QUOTE); |
| 318 | - $thread_buttons['quote']['link'] = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/reply.php?forum=' . $post->getVar('forum_id') . '&topic_id=' . $post->getVar('topic_id') . '&quotedac=1'; |
|
| 318 | + $thread_buttons['quote']['link'] = XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/reply.php?forum='.$post->getVar('forum_id').'&topic_id='.$post->getVar('topic_id').'&quotedac=1'; |
|
| 319 | 319 | $thread_buttons['quote']['name'] = _MD_NEWBB_QUOTE; |
| 320 | 320 | } |
| 321 | 321 | } else { |
| 322 | 322 | $thread_buttons['delete']['image'] = newbbDisplayImage('p_delete', _DELETE); |
| 323 | - $thread_buttons['delete']['link'] = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/delete.php?forum=' . $post->getVar('forum_id') . '&topic_id=' . $post->getVar('topic_id'); |
|
| 323 | + $thread_buttons['delete']['link'] = XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/delete.php?forum='.$post->getVar('forum_id').'&topic_id='.$post->getVar('topic_id'); |
|
| 324 | 324 | $thread_buttons['delete']['name'] = _DELETE; |
| 325 | 325 | $thread_buttons['edit']['image'] = newbbDisplayImage('p_edit', _EDIT); |
| 326 | - $thread_buttons['edit']['link'] = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/edit.php?forum=' . $post->getVar('forum_id') . '&topic_id=' . $post->getVar('topic_id'); |
|
| 326 | + $thread_buttons['edit']['link'] = XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/edit.php?forum='.$post->getVar('forum_id').'&topic_id='.$post->getVar('topic_id'); |
|
| 327 | 327 | $thread_buttons['edit']['name'] = _EDIT; |
| 328 | 328 | $thread_buttons['reply']['image'] = newbbDisplayImage('p_reply', _MD_NEWBB_REPLY); |
| 329 | - $thread_buttons['reply']['link'] = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/reply.php?forum=' . $post->getVar('forum_id') . '&topic_id=' . $post->getVar('topic_id'); |
|
| 329 | + $thread_buttons['reply']['link'] = XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/reply.php?forum='.$post->getVar('forum_id').'&topic_id='.$post->getVar('topic_id'); |
|
| 330 | 330 | $thread_buttons['reply']['name'] = _MD_NEWBB_REPLY; |
| 331 | 331 | } |
| 332 | 332 | |
| 333 | 333 | if (!$isAdmin && $GLOBALS['xoopsModuleConfig']['reportmod_enabled']) { |
| 334 | 334 | $thread_buttons['report']['image'] = newbbDisplayImage('p_report', _MD_NEWBB_REPORT); |
| 335 | - $thread_buttons['report']['link'] = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/report.php?forum=' . $post->getVar('forum_id') . '&topic_id=' . $post->getVar('topic_id'); |
|
| 335 | + $thread_buttons['report']['link'] = XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/report.php?forum='.$post->getVar('forum_id').'&topic_id='.$post->getVar('topic_id'); |
|
| 336 | 336 | $thread_buttons['report']['name'] = _MD_NEWBB_REPORT; |
| 337 | 337 | } |
| 338 | 338 | $thread_action = []; |
@@ -361,13 +361,13 @@ discard block |
||
| 361 | 361 | unset($viewtopic_users, $forums); |
| 362 | 362 | |
| 363 | 363 | if (!empty($GLOBALS['xoopsModuleConfig']['show_jump'])) { |
| 364 | - require_once __DIR__ . '/include/functions.forum.php'; |
|
| 364 | + require_once __DIR__.'/include/functions.forum.php'; |
|
| 365 | 365 | $xoopsTpl->assign('forum_jumpbox', newbbMakeJumpbox($forum_id)); |
| 366 | 366 | } |
| 367 | 367 | |
| 368 | 368 | if ($postCount > $post_perpage) { |
| 369 | 369 | include $GLOBALS['xoops']->path('class/pagenav.php'); |
| 370 | - $nav = new \XoopsPageNav($postCount, $post_perpage, $start, 'start', 'forum=' . $forum_id . '&viewmode=' . $viewmode . '&status=' . $status . '&uid=' . $uid . '&order=' . $order . '&mode=' . $mode); |
|
| 370 | + $nav = new \XoopsPageNav($postCount, $post_perpage, $start, 'start', 'forum='.$forum_id.'&viewmode='.$viewmode.'&status='.$status.'&uid='.$uid.'&order='.$order.'&mode='.$mode); |
|
| 371 | 371 | //if (isset($GLOBALS['xoopsModuleConfig']['do_rewrite'])) $nav->url = formatURL(Request::getString('SERVER_NAME', '', 'SERVER')) . $nav->url; |
| 372 | 372 | if ('select' === $GLOBALS['xoopsModuleConfig']['pagenav_display']) { |
| 373 | 373 | $navi = $nav->renderSelect(); |
@@ -386,13 +386,13 @@ discard block |
||
| 386 | 386 | |
| 387 | 387 | switch ($status) { |
| 388 | 388 | case 'active': |
| 389 | - $lang_title = _MD_NEWBB_VIEWALLPOSTS . ' [' . _MD_NEWBB_TYPE_ADMIN . ']'; |
|
| 389 | + $lang_title = _MD_NEWBB_VIEWALLPOSTS.' ['._MD_NEWBB_TYPE_ADMIN.']'; |
|
| 390 | 390 | break; |
| 391 | 391 | case 'pending': |
| 392 | - $lang_title = _MD_NEWBB_VIEWALLPOSTS . ' [' . _MD_NEWBB_TYPE_PENDING . ']'; |
|
| 392 | + $lang_title = _MD_NEWBB_VIEWALLPOSTS.' ['._MD_NEWBB_TYPE_PENDING.']'; |
|
| 393 | 393 | break; |
| 394 | 394 | case 'deleted': |
| 395 | - $lang_title = _MD_NEWBB_VIEWALLPOSTS . ' [' . _MD_NEWBB_TYPE_DELETED . ']'; |
|
| 395 | + $lang_title = _MD_NEWBB_VIEWALLPOSTS.' ['._MD_NEWBB_TYPE_DELETED.']'; |
|
| 396 | 396 | break; |
| 397 | 397 | case 'new': |
| 398 | 398 | $lang_title = _MD_NEWBB_NEWPOSTS; |
@@ -402,7 +402,7 @@ discard block |
||
| 402 | 402 | break; |
| 403 | 403 | } |
| 404 | 404 | if ($uid > 0) { |
| 405 | - $lang_title .= ' (' . XoopsUser::getUnameFromId($uid) . ')'; |
|
| 405 | + $lang_title .= ' ('.XoopsUser::getUnameFromId($uid).')'; |
|
| 406 | 406 | } |
| 407 | 407 | $xoopsTpl->assign('lang_title', $lang_title); |
| 408 | 408 | // irmtfan up to p_up |
@@ -411,12 +411,12 @@ discard block |
||
| 411 | 411 | $xoopsTpl->assign('anonymous_prefix', $GLOBALS['xoopsModuleConfig']['anonymous_prefix']); |
| 412 | 412 | $xoopsTpl->assign('down', newbbDisplayImage('down', _MD_NEWBB_BOTTOM)); |
| 413 | 413 | |
| 414 | -$all_link = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/viewpost.php?forum=' . $forum_id . "&start=$start"; |
|
| 415 | -$post_link = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/viewpost.php?forum=' . $forum_id; |
|
| 416 | -$newpost_link = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/viewpost.php?forum=' . $forum_id . '&status=new'; |
|
| 417 | -$digest_link = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/viewpost.php?forum=' . $forum_id . "&start=$start&status=digest"; |
|
| 418 | -$unreplied_link = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/viewpost.php?forum=' . $forum_id . "&start=$start&status=unreplied"; |
|
| 419 | -$unread_link = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/viewpost.php?forum=' . $forum_id . "&start=$start&status=unread"; |
|
| 414 | +$all_link = XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/viewpost.php?forum='.$forum_id."&start=$start"; |
|
| 415 | +$post_link = XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/viewpost.php?forum='.$forum_id; |
|
| 416 | +$newpost_link = XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/viewpost.php?forum='.$forum_id.'&status=new'; |
|
| 417 | +$digest_link = XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/viewpost.php?forum='.$forum_id."&start=$start&status=digest"; |
|
| 418 | +$unreplied_link = XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/viewpost.php?forum='.$forum_id."&start=$start&status=unreplied"; |
|
| 419 | +$unread_link = XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/viewpost.php?forum='.$forum_id."&start=$start&status=unread"; |
|
| 420 | 420 | |
| 421 | 421 | $xoopsTpl->assign('all_link', $all_link); |
| 422 | 422 | $xoopsTpl->assign('post_link', $post_link); |
@@ -428,12 +428,12 @@ discard block |
||
| 428 | 428 | $viewmode_options = []; |
| 429 | 429 | if ('DESC' === $order) { |
| 430 | 430 | $viewmode_options[] = [ |
| 431 | - 'link' => XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/viewpost.php?viewmode=flat&order=ASC&forum=' . $forum_id, |
|
| 431 | + 'link' => XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/viewpost.php?viewmode=flat&order=ASC&forum='.$forum_id, |
|
| 432 | 432 | 'title' => _OLDESTFIRST |
| 433 | 433 | ]; |
| 434 | 434 | } else { |
| 435 | 435 | $viewmode_options[] = [ |
| 436 | - 'link' => XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/viewpost.php?viewmode=flat&order=DESC&forum=' . $forum_id, |
|
| 436 | + 'link' => XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/viewpost.php?viewmode=flat&order=DESC&forum='.$forum_id, |
|
| 437 | 437 | 'title' => _NEWESTFIRST |
| 438 | 438 | ]; |
| 439 | 439 | } |
@@ -448,5 +448,5 @@ discard block |
||
| 448 | 448 | $xoopsTpl->assign('mode', $mode); |
| 449 | 449 | $xoopsTpl->assign('status', $status); |
| 450 | 450 | // irmtfan move to footer.php |
| 451 | -require_once __DIR__ . '/footer.php'; |
|
| 451 | +require_once __DIR__.'/footer.php'; |
|
| 452 | 452 | include $GLOBALS['xoops']->path('footer.php'); |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | |
| 32 | 32 | use Xmf\Request; |
| 33 | 33 | |
| 34 | -require_once __DIR__ . '/admin_header.php'; |
|
| 34 | +require_once __DIR__.'/admin_header.php'; |
|
| 35 | 35 | require_once $GLOBALS['xoops']->path('class/pagenav.php'); |
| 36 | 36 | |
| 37 | 37 | $op = Request::getCmd('op', 'default'); |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | // $report_ids = Request::getInt('report_id', 0, 'POST'); //$_POST['report_id']; |
| 53 | 53 | // irmtfan add error redirect header |
| 54 | 54 | if (0 === count($report_ids)) { |
| 55 | - redirect_header("admin_report.php?item={$item}" . (empty($start) ? '' : "&start={$start}"), 1, _AM_NEWBB_REPORTNOTSELECT); |
|
| 55 | + redirect_header("admin_report.php?item={$item}".(empty($start) ? '' : "&start={$start}"), 1, _AM_NEWBB_REPORTNOTSELECT); |
|
| 56 | 56 | } |
| 57 | 57 | $report_memos = Request::getArray('report_memo', [], 'POST'); // isset($_POST['report_memo']) ? $_POST['report_memo'] : array(); |
| 58 | 58 | foreach ($report_ids as $rid => $value) { |
@@ -65,15 +65,15 @@ discard block |
||
| 65 | 65 | $reportHandler->insert($reportObject); |
| 66 | 66 | } |
| 67 | 67 | // irmtfan add message |
| 68 | - redirect_header("admin_report.php?item={$item}" . (empty($start) ? '' : "&start={$start}"), 1, _AM_NEWBB_REPORTSAVE); |
|
| 68 | + redirect_header("admin_report.php?item={$item}".(empty($start) ? '' : "&start={$start}"), 1, _AM_NEWBB_REPORTSAVE); |
|
| 69 | 69 | |
| 70 | 70 | break; |
| 71 | 71 | |
| 72 | 72 | case 'delete': |
| 73 | - $report_ids = Request::getArray('report_id', [], 'POST');// $_POST['report_id']; |
|
| 73 | + $report_ids = Request::getArray('report_id', [], 'POST'); // $_POST['report_id']; |
|
| 74 | 74 | // irmtfan add error redirect header |
| 75 | 75 | if (0 === count($report_ids)) { |
| 76 | - redirect_header("admin_report.php?item={$item}" . (empty($start) ? '' : "&start={$start}"), 1, _AM_NEWBB_REPORTNOTSELECT); |
|
| 76 | + redirect_header("admin_report.php?item={$item}".(empty($start) ? '' : "&start={$start}"), 1, _AM_NEWBB_REPORTNOTSELECT); |
|
| 77 | 77 | } |
| 78 | 78 | foreach ($report_ids as $rid => $value) { |
| 79 | 79 | if (!$value) { |
@@ -84,14 +84,14 @@ discard block |
||
| 84 | 84 | } |
| 85 | 85 | } |
| 86 | 86 | // irmtfan add message |
| 87 | - redirect_header("admin_report.php?item={$item}" . (empty($start) ? '' : "&start={$start}"), 1, _AM_NEWBB_REPORTDELETE); |
|
| 87 | + redirect_header("admin_report.php?item={$item}".(empty($start) ? '' : "&start={$start}"), 1, _AM_NEWBB_REPORTDELETE); |
|
| 88 | 88 | |
| 89 | 89 | break; |
| 90 | 90 | |
| 91 | 91 | case 'default': |
| 92 | 92 | default: |
| 93 | 93 | require_once $GLOBALS['xoops']->path('class/xoopsformloader.php'); |
| 94 | - require_once __DIR__ . '/../include/functions.user.php'; |
|
| 94 | + require_once __DIR__.'/../include/functions.user.php'; |
|
| 95 | 95 | |
| 96 | 96 | if ('processed' !== $item) { |
| 97 | 97 | $process_result = 0; |
@@ -114,12 +114,12 @@ discard block |
||
| 114 | 114 | $adminObject->addItemButton($title_other, $item_other, $icon = 'add'); |
| 115 | 115 | $adminObject->displayButton('left'); |
| 116 | 116 | echo _AM_NEWBB_REPORTADMIN_HELP; |
| 117 | - echo "<table width='100%' border='0' cellspacing='1' class='outer'>" . "<tr><td class='odd'>"; |
|
| 118 | - echo '<form action="' . xoops_getenv('PHP_SELF') . '" method="post">'; |
|
| 117 | + echo "<table width='100%' border='0' cellspacing='1' class='outer'>"."<tr><td class='odd'>"; |
|
| 118 | + echo '<form action="'.xoops_getenv('PHP_SELF').'" method="post">'; |
|
| 119 | 119 | echo "<table border='0' cellpadding='4' cellspacing='1' width='100%' class='outer'>"; |
| 120 | 120 | echo "<tr align='center'>"; |
| 121 | - echo "<th class='bg3' width='80%'>" . _AM_NEWBB_REPORTTITLE . '</th>'; |
|
| 122 | - echo "<th class='bg3' width='10%'>" . $extra . '</th>'; |
|
| 121 | + echo "<th class='bg3' width='80%'>"._AM_NEWBB_REPORTTITLE.'</th>'; |
|
| 122 | + echo "<th class='bg3' width='10%'>".$extra.'</th>'; |
|
| 123 | 123 | echo '</tr>'; |
| 124 | 124 | |
| 125 | 125 | $reports = $reportHandler->getAllReports('report_id', 'ASC', $limit, $start, $process_result); |
@@ -137,52 +137,52 @@ discard block |
||
| 137 | 137 | . '&viewmode=thread" target="checkreport">' |
| 138 | 138 | . $myts->htmlSpecialChars($report['subject']) |
| 139 | 139 | . '</a>'; |
| 140 | - $checkbox = '<input type="checkbox" name="report_id[' . $report['report_id'] . ']" value="1" checked />'; |
|
| 140 | + $checkbox = '<input type="checkbox" name="report_id['.$report['report_id'].']" value="1" checked />'; |
|
| 141 | 141 | if ('processed' !== $item) { |
| 142 | - $memo = '<input type="text" name="report_memo[' . $report['report_id'] . ']" maxlength="255" size="80" />'; |
|
| 142 | + $memo = '<input type="text" name="report_memo['.$report['report_id'].']" maxlength="255" size="80" />'; |
|
| 143 | 143 | } else { |
| 144 | 144 | $memo = $myts->htmlSpecialChars($report['report_memo']); |
| 145 | 145 | } |
| 146 | 146 | echo "<tr class='odd' align='left'>"; |
| 147 | - echo '<td>' . _AM_NEWBB_REPORTPOST . ': ' . $post_link . '</td>'; |
|
| 148 | - echo "<td align='center'>" . $report['report_id'] . '</td>'; |
|
| 147 | + echo '<td>'._AM_NEWBB_REPORTPOST.': '.$post_link.'</td>'; |
|
| 148 | + echo "<td align='center'>".$report['report_id'].'</td>'; |
|
| 149 | 149 | echo '</tr>'; |
| 150 | 150 | echo "<tr class='odd' align='left'>"; |
| 151 | - echo '<td>' . _AM_NEWBB_REPORTTEXT . ': ' . $myts->htmlSpecialChars($report['report_text']) . '</td>'; |
|
| 151 | + echo '<td>'._AM_NEWBB_REPORTTEXT.': '.$myts->htmlSpecialChars($report['report_text']).'</td>'; |
|
| 152 | 152 | $uid = (int)$report['reporter_uid']; |
| 153 | 153 | $reporter_name = newbbGetUnameFromId($uid, $GLOBALS['xoopsModuleConfig']['show_realname']); |
| 154 | - $reporter = !empty($uid) ? "<a href='" . XOOPS_URL . '/userinfo.php?uid=' . $uid . "'>" . $reporter_name . '</a><br>' : ''; |
|
| 155 | - echo "<td align='center'>" . $reporter . $report['reporter_ip'] . '</td>'; |
|
| 154 | + $reporter = !empty($uid) ? "<a href='".XOOPS_URL.'/userinfo.php?uid='.$uid."'>".$reporter_name.'</a><br>' : ''; |
|
| 155 | + echo "<td align='center'>".$reporter.$report['reporter_ip'].'</td>'; |
|
| 156 | 156 | echo '</tr>'; |
| 157 | 157 | echo "<tr class='odd' align='left'>"; |
| 158 | - echo '<td>' . _AM_NEWBB_REPORTMEMO . ': ' . $memo . '</td>'; |
|
| 159 | - echo "<td align='center' >" . $checkbox . '</td>'; |
|
| 158 | + echo '<td>'._AM_NEWBB_REPORTMEMO.': '.$memo.'</td>'; |
|
| 159 | + echo "<td align='center' >".$checkbox.'</td>'; |
|
| 160 | 160 | echo '</tr>'; |
| 161 | 161 | echo "<tr colspan='2'><td height='2'></td></tr>"; |
| 162 | 162 | } |
| 163 | 163 | $buttons = ''; |
| 164 | 164 | if ('processed' !== $item) { |
| 165 | - $submit = new \XoopsFormButton('', 'submit', _SUBMIT, 'submit'); |
|
| 166 | - $buttons .= $submit->render() . ' '; |
|
| 165 | + $submit = new \XoopsFormButton('', 'submit', _SUBMIT, 'submit'); |
|
| 166 | + $buttons .= $submit->render().' '; |
|
| 167 | 167 | } |
| 168 | 168 | $delete = new \XoopsFormButton('', 'delete', _DELETE, 'submit'); |
| 169 | - $buttons .= $delete->render() . ' '; |
|
| 169 | + $buttons .= $delete->render().' '; |
|
| 170 | 170 | $cancel = new \XoopsFormButton('', 'cancel', _CANCEL, 'reset'); |
| 171 | 171 | $buttons .= $cancel->render(); |
| 172 | 172 | echo "<tr colspan='2'><td align='center'>{$buttons}</td></tr>"; |
| 173 | 173 | $hidden = new \XoopsFormHidden('start', $start); |
| 174 | 174 | echo $hidden->render(); |
| 175 | 175 | $hidden = new \XoopsFormHidden('item', $item); |
| 176 | - echo $hidden->render() . '</form>'; |
|
| 176 | + echo $hidden->render().'</form>'; |
|
| 177 | 177 | |
| 178 | 178 | echo '</table>'; |
| 179 | 179 | echo '</td></tr></table>'; |
| 180 | - $nav = new \XoopsPageNav($reportHandler->getCount(new \Criteria('report_result', $process_result)), $limit, $start, 'start', 'item=' . $item); |
|
| 180 | + $nav = new \XoopsPageNav($reportHandler->getCount(new \Criteria('report_result', $process_result)), $limit, $start, 'start', 'item='.$item); |
|
| 181 | 181 | echo $nav->renderNav(4); |
| 182 | 182 | echo '<fieldset>'; |
| 183 | - echo '<legend> ' . _MI_NEWBB_ADMENU_REPORT . ' </legend>'; |
|
| 183 | + echo '<legend> '._MI_NEWBB_ADMENU_REPORT.' </legend>'; |
|
| 184 | 184 | echo _AM_NEWBB_HELP_REPORT_TAB; |
| 185 | 185 | echo '</fieldset>'; |
| 186 | 186 | break; |
| 187 | 187 | } |
| 188 | -require_once __DIR__ . '/admin_footer.php'; |
|
| 188 | +require_once __DIR__.'/admin_footer.php'; |
|
@@ -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'); |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | foreach (array_keys($glist) as $i) { |
| 100 | 100 | // get selected item id(s) for each group |
| 101 | 101 | $selected = $gpermHandler->getItemIds($this->_permName, $i, $this->_modid); |
| 102 | - $ele = new NewbbXoopsGroupFormCheckBox($glist[$i], 'perms[' . $this->_permName . ']', $i, $selected); |
|
| 102 | + $ele = new NewbbXoopsGroupFormCheckBox($glist[$i], 'perms['.$this->_permName.']', $i, $selected); |
|
| 103 | 103 | $ele->setOptionTree($this->_itemTree); |
| 104 | 104 | $this->addElement($ele); |
| 105 | 105 | unset($ele); |
@@ -108,19 +108,19 @@ discard block |
||
| 108 | 108 | $tray->addElement(new \XoopsFormButton('', 'submit', _SUBMIT, 'submit')); |
| 109 | 109 | $tray->addElement(new \XoopsFormButton('', 'reset', _CANCEL, 'reset')); |
| 110 | 110 | $this->addElement($tray); |
| 111 | - $ret = '<br><strong>' . $this->getTitle() . '</strong><br>' . $this->_permDesc . '<br>'; |
|
| 112 | - $ret .= "<form name='" . $this->getName() . "' id='" . $this->getName() . "' action='" . $this->getAction() . "' method='" . $this->getMethod() . "'" . $this->getExtra() . ">\n<table width='100%' class='outer' cellspacing='1' valign='top'>\n"; |
|
| 111 | + $ret = '<br><strong>'.$this->getTitle().'</strong><br>'.$this->_permDesc.'<br>'; |
|
| 112 | + $ret .= "<form name='".$this->getName()."' id='".$this->getName()."' action='".$this->getAction()."' method='".$this->getMethod()."'".$this->getExtra().">\n<table width='100%' class='outer' cellspacing='1' valign='top'>\n"; |
|
| 113 | 113 | $elements = $this->getElements(); |
| 114 | 114 | $hidden = ''; |
| 115 | 115 | foreach (array_keys($elements) as $i) { |
| 116 | 116 | if (!is_object($elements[$i])) { |
| 117 | 117 | $ret .= $elements[$i]; |
| 118 | 118 | } elseif (!$elements[$i]->isHidden()) { |
| 119 | - $ret .= "<tr valign='top' align='left'><td class='head'>" . $elements[$i]->getCaption(); |
|
| 119 | + $ret .= "<tr valign='top' align='left'><td class='head'>".$elements[$i]->getCaption(); |
|
| 120 | 120 | if ('' !== $elements[$i]->getDescription()) { |
| 121 | - $ret .= '<br><br><span style="font-weight: normal;">' . $elements[$i]->getDescription() . '</span>'; |
|
| 121 | + $ret .= '<br><br><span style="font-weight: normal;">'.$elements[$i]->getDescription().'</span>'; |
|
| 122 | 122 | } |
| 123 | - $ret .= "</td>\n<td class='even' style='text-align:center;'>\n" . $elements[$i]->render() . "\n</td></tr>\n"; |
|
| 123 | + $ret .= "</td>\n<td class='even' style='text-align:center;'>\n".$elements[$i]->render()."\n</td></tr>\n"; |
|
| 124 | 124 | } else { |
| 125 | 125 | $hidden .= $elements[$i]->render(); |
| 126 | 126 | } |
@@ -157,17 +157,17 @@ discard block |
||
| 157 | 157 | public function _renderOptionTree(&$tree, $option, $prefix, $parentIds = []) |
| 158 | 158 | { |
| 159 | 159 | if ($option['id'] > 0) { |
| 160 | - $tree .= $prefix . '<input type="checkbox" name="' . $this->getName() . '[groups][' . $this->_groupId . '][' . $option['id'] . ']" id="' . $this->getName() . '[groups][' . $this->_groupId . '][' . $option['id'] . ']" onclick="'; |
|
| 160 | + $tree .= $prefix.'<input type="checkbox" name="'.$this->getName().'[groups]['.$this->_groupId.']['.$option['id'].']" id="'.$this->getName().'[groups]['.$this->_groupId.']['.$option['id'].']" onclick="'; |
|
| 161 | 161 | foreach ($parentIds as $pid) { |
| 162 | 162 | if ($pid <= 0) { |
| 163 | 163 | continue; |
| 164 | 164 | } |
| 165 | - $parent_ele = $this->getName() . '[groups][' . $this->_groupId . '][' . $pid . ']'; |
|
| 166 | - $tree .= "var ele = xoopsGetElementById('" . $parent_ele . "'); if (ele.checked !== true) {ele.checked = this.checked;}"; |
|
| 165 | + $parent_ele = $this->getName().'[groups]['.$this->_groupId.']['.$pid.']'; |
|
| 166 | + $tree .= "var ele = xoopsGetElementById('".$parent_ele."'); if (ele.checked !== true) {ele.checked = this.checked;}"; |
|
| 167 | 167 | } |
| 168 | 168 | foreach ($option['allchild'] as $cid) { |
| 169 | - $child_ele = $this->getName() . '[groups][' . $this->_groupId . '][' . $cid . ']'; |
|
| 170 | - $tree .= "var ele = xoopsGetElementById('" . $child_ele . "'); if (this.checked !== true) {ele.checked = false;}"; |
|
| 169 | + $child_ele = $this->getName().'[groups]['.$this->_groupId.']['.$cid.']'; |
|
| 170 | + $tree .= "var ele = xoopsGetElementById('".$child_ele."'); if (this.checked !== true) {ele.checked = false;}"; |
|
| 171 | 171 | } |
| 172 | 172 | $tree .= '" value="1"'; |
| 173 | 173 | if (in_array($option['id'], $this->_value)) { |
@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | . htmlspecialchars($option['name']) |
| 190 | 190 | . "\" /><br>\n"; |
| 191 | 191 | } else { |
| 192 | - $tree .= $prefix . $option['name'] . '<input type="hidden" id="' . $this->getName() . '[groups][' . $this->_groupId . '][' . $option['id'] . "]\" /><br>\n"; |
|
| 192 | + $tree .= $prefix.$option['name'].'<input type="hidden" id="'.$this->getName().'[groups]['.$this->_groupId.']['.$option['id']."]\" /><br>\n"; |
|
| 193 | 193 | } |
| 194 | 194 | if (isset($option['children'])) { |
| 195 | 195 | foreach ($option['children'] as $child) { |
@@ -197,7 +197,7 @@ discard block |
||
| 197 | 197 | // array_push($parentIds, $option['id']); |
| 198 | 198 | $parentIds[] = $option['id']; |
| 199 | 199 | } |
| 200 | - $this->_renderOptionTree($tree, $this->_optionTree[$child], $prefix . ' -', $parentIds); |
|
| 200 | + $this->_renderOptionTree($tree, $this->_optionTree[$child], $prefix.' -', $parentIds); |
|
| 201 | 201 | } |
| 202 | 202 | } |
| 203 | 203 | } |
@@ -214,7 +214,7 @@ discard block |
||
| 214 | 214 | case 'template': |
| 215 | 215 | xoops_cp_header(); |
| 216 | 216 | $adminObject->displayNavigation(basename(__FILE__)); |
| 217 | - echo "<legend style='font-weight: bold; color: #900;'>" . _AM_NEWBB_PERM_ACTION . '</legend>'; |
|
| 217 | + echo "<legend style='font-weight: bold; color: #900;'>"._AM_NEWBB_PERM_ACTION.'</legend>'; |
|
| 218 | 218 | $opform = new \XoopsSimpleForm(_AM_NEWBB_PERM_ACTION_HELP_TEMPLAT, 'actionform', 'admin_permissions.php', 'get'); |
| 219 | 219 | $op_select = new \XoopsFormSelect('', 'action'); |
| 220 | 220 | $op_select->setExtra('onchange="document.forms.actionform.submit()"'); |
@@ -233,7 +233,7 @@ discard block |
||
| 233 | 233 | $perm_template = $newbbpermHandler->getTemplate(); |
| 234 | 234 | foreach (array_keys($glist) as $i) { |
| 235 | 235 | $selected = !empty($perm_template[$i]) ? array_keys($perm_template[$i]) : []; |
| 236 | - $ret_ele = '<tr align="left" valign="top"><td class="head">' . $glist[$i] . '</td>'; |
|
| 236 | + $ret_ele = '<tr align="left" valign="top"><td class="head">'.$glist[$i].'</td>'; |
|
| 237 | 237 | $ret_ele .= '<td class="even">'; |
| 238 | 238 | $ret_ele .= '<table class="outer"><tr><td class="odd"><table><tr>'; |
| 239 | 239 | $ii = 0; |
@@ -243,13 +243,13 @@ discard block |
||
| 243 | 243 | if (0 == $ii % 5) { |
| 244 | 244 | $ret_ele .= '</tr><tr>'; |
| 245 | 245 | } |
| 246 | - $checked = in_array('forum_' . $perm, $selected) ? ' checked' : ''; |
|
| 247 | - $option_id = $perm . '_' . $i; |
|
| 246 | + $checked = in_array('forum_'.$perm, $selected) ? ' checked' : ''; |
|
| 247 | + $option_id = $perm.'_'.$i; |
|
| 248 | 248 | $option_ids[] = $option_id; |
| 249 | - $ret_ele .= '<td><input name="perms[' . $i . '][' . 'forum_' . $perm . ']" id="' . $option_id . '" onclick="" value="1" type="checkbox"' . $checked . '>' . constant('_AM_NEWBB_CAN_' . strtoupper($perm)) . '<br></td>'; |
|
| 249 | + $ret_ele .= '<td><input name="perms['.$i.']['.'forum_'.$perm.']" id="'.$option_id.'" onclick="" value="1" type="checkbox"'.$checked.'>'.constant('_AM_NEWBB_CAN_'.strtoupper($perm)).'<br></td>'; |
|
| 250 | 250 | } |
| 251 | 251 | $ret_ele .= '</tr></table></td><td class="even">'; |
| 252 | - $ret_ele .= _ALL . ' <input id="checkall[' . $i . ']" type="checkbox" value="" onclick="var optionids = new Array(' . implode(', ', $option_ids) . '); xoopsCheckAllElements(optionids, \'checkall[' . $i . ']\')" />'; |
|
| 252 | + $ret_ele .= _ALL.' <input id="checkall['.$i.']" type="checkbox" value="" onclick="var optionids = new Array('.implode(', ', $option_ids).'); xoopsCheckAllElements(optionids, \'checkall['.$i.']\')" />'; |
|
| 253 | 253 | $ret_ele .= '</td></tr></table>'; |
| 254 | 254 | $ret_ele .= '</td></tr>'; |
| 255 | 255 | $elements[] = $ret_ele; |
@@ -258,7 +258,7 @@ discard block |
||
| 258 | 258 | $tray->addElement(new \XoopsFormHidden('action', 'template_save')); |
| 259 | 259 | $tray->addElement(new \XoopsFormButton('', 'submit', _SUBMIT, 'submit')); |
| 260 | 260 | $tray->addElement(new \XoopsFormButton('', 'reset', _CANCEL, 'reset')); |
| 261 | - $ret = '<br><strong>' . _AM_NEWBB_PERM_TEMPLATE . '</strong><br>' . _AM_NEWBB_PERM_TEMPLATE_DESC . '<br>'; |
|
| 261 | + $ret = '<br><strong>'._AM_NEWBB_PERM_TEMPLATE.'</strong><br>'._AM_NEWBB_PERM_TEMPLATE_DESC.'<br>'; |
|
| 262 | 262 | $ret .= "<form name='template' id='template' method='post'>\n<table width='100%' class='outer' cellspacing='1'>\n"; |
| 263 | 263 | $ret .= implode("\n", $elements); |
| 264 | 264 | $ret .= '<tr align="left" valign="top"><td class="head"></td><td class="even" style="text-align:center;">'; |
@@ -266,7 +266,7 @@ discard block |
||
| 266 | 266 | $ret .= '</td></tr>'; |
| 267 | 267 | $ret .= '</table></form>'; |
| 268 | 268 | echo $ret; |
| 269 | - require_once __DIR__ . '/admin_footer.php'; |
|
| 269 | + require_once __DIR__.'/admin_footer.php'; |
|
| 270 | 270 | break; |
| 271 | 271 | |
| 272 | 272 | case 'template_save': |
@@ -287,7 +287,7 @@ discard block |
||
| 287 | 287 | } |
| 288 | 288 | xoops_cp_header(); |
| 289 | 289 | $adminObject->displayNavigation(basename(__FILE__)); |
| 290 | - echo "<legend style='font-weight: bold; color: #900;'>" . _AM_NEWBB_PERM_ACTION . '</legend>'; |
|
| 290 | + echo "<legend style='font-weight: bold; color: #900;'>"._AM_NEWBB_PERM_ACTION.'</legend>'; |
|
| 291 | 291 | $opform = new \XoopsSimpleForm(_AM_NEWBB_PERM_ACTION_HELP_APPLY, 'actionform', 'admin_permissions.php', 'get'); |
| 292 | 292 | $op_select = new \XoopsFormSelect('', 'action'); |
| 293 | 293 | $op_select->setExtra('onchange="document.forms.actionform.submit()"'); |
@@ -310,9 +310,9 @@ discard block |
||
| 310 | 310 | $forums = $forumHandler->getTree(array_keys($categories), 0, 'all'); |
| 311 | 311 | foreach (array_keys($forums) as $c) { |
| 312 | 312 | $fm_options[-1 * $c - 1000] = ' '; |
| 313 | - $fm_options[-1 * $c] = '[' . $categories[$c] . ']'; |
|
| 313 | + $fm_options[-1 * $c] = '['.$categories[$c].']'; |
|
| 314 | 314 | foreach (array_keys($forums[$c]) as $f) { |
| 315 | - $fm_options[$f] = $forums[$c][$f]['prefix'] . $forums[$c][$f]['forum_name']; |
|
| 315 | + $fm_options[$f] = $forums[$c][$f]['prefix'].$forums[$c][$f]['forum_name']; |
|
| 316 | 316 | } |
| 317 | 317 | } |
| 318 | 318 | unset($forums, $categories); |
@@ -327,7 +327,7 @@ discard block |
||
| 327 | 327 | $tray->addElement(new \XoopsFormButton('', 'reset', _CANCEL, 'reset')); |
| 328 | 328 | $fmform->addElement($tray); |
| 329 | 329 | $fmform->display(); |
| 330 | - require_once __DIR__ . '/admin_footer.php'; |
|
| 330 | + require_once __DIR__.'/admin_footer.php'; |
|
| 331 | 331 | break; |
| 332 | 332 | |
| 333 | 333 | case 'apply_save': |
@@ -365,7 +365,7 @@ discard block |
||
| 365 | 365 | } |
| 366 | 366 | |
| 367 | 367 | $adminObject->displayNavigation(basename(__FILE__)); |
| 368 | - echo "<legend style='font-weight: bold; color: #900;'>" . _AM_NEWBB_PERM_ACTION . '</legend>'; |
|
| 368 | + echo "<legend style='font-weight: bold; color: #900;'>"._AM_NEWBB_PERM_ACTION.'</legend>'; |
|
| 369 | 369 | $opform = new \XoopsSimpleForm(_AM_NEWBB_PERM_ACTION_HELP, 'actionform', 'admin_permissions.php', 'get'); |
| 370 | 370 | $op_select = new \XoopsFormSelect('', 'action'); |
| 371 | 371 | $op_select->setExtra('onchange="document.forms.actionform.submit()"'); |
@@ -388,10 +388,10 @@ discard block |
||
| 388 | 388 | ] |
| 389 | 389 | ]; |
| 390 | 390 | foreach ($perms as $perm) { |
| 391 | - $op_options[$perm] = constant('_AM_NEWBB_CAN_' . strtoupper($perm)); |
|
| 391 | + $op_options[$perm] = constant('_AM_NEWBB_CAN_'.strtoupper($perm)); |
|
| 392 | 392 | $fm_options[$perm] = [ |
| 393 | - 'title' => constant('_AM_NEWBB_CAN_' . strtoupper($perm)), |
|
| 394 | - 'item' => 'forum_' . $perm, |
|
| 393 | + 'title' => constant('_AM_NEWBB_CAN_'.strtoupper($perm)), |
|
| 394 | + 'item' => 'forum_'.$perm, |
|
| 395 | 395 | 'desc' => '', |
| 396 | 396 | 'anonymous' => true |
| 397 | 397 | ]; |
@@ -432,10 +432,10 @@ discard block |
||
| 432 | 432 | if (count($forums) > 0) { |
| 433 | 433 | foreach (array_keys($forums) as $c) { |
| 434 | 434 | $key_c = -1 * $c; |
| 435 | - $form->addItem($key_c, '<strong>[' . $categories[$c] . ']</strong>'); |
|
| 435 | + $form->addItem($key_c, '<strong>['.$categories[$c].']</strong>'); |
|
| 436 | 436 | foreach (array_keys($forums[$c]) as $f) { |
| 437 | 437 | $pid = $forums[$c][$f]['parent_forum'] ?: $key_c; |
| 438 | - $form->addItem($f, $forums[$c][$f]['prefix'] . $forums[$c][$f]['forum_name'], $pid); |
|
| 438 | + $form->addItem($f, $forums[$c][$f]['prefix'].$forums[$c][$f]['forum_name'], $pid); |
|
| 439 | 439 | } |
| 440 | 440 | } |
| 441 | 441 | } |
@@ -443,7 +443,7 @@ discard block |
||
| 443 | 443 | } |
| 444 | 444 | $form->display(); |
| 445 | 445 | echo '<fieldset>'; |
| 446 | - echo '<legend> ' . _MI_NEWBB_ADMENU_PERMISSION . ' </legend>'; |
|
| 446 | + echo '<legend> '._MI_NEWBB_ADMENU_PERMISSION.' </legend>'; |
|
| 447 | 447 | echo _AM_NEWBB_HELP_PERMISSION_TAB; |
| 448 | 448 | echo '</fieldset>'; |
| 449 | 449 | // Since we can not control the permission update, a trick is used here |
@@ -452,6 +452,6 @@ discard block |
||
| 452 | 452 | $permissionHandler->createPermData(); |
| 453 | 453 | $cacheHelper = Newbb\Utility::cleanCache(); |
| 454 | 454 | //$cacheHelper->delete('permission'); |
| 455 | - require_once __DIR__ . '/admin_footer.php'; |
|
| 455 | + require_once __DIR__.'/admin_footer.php'; |
|
| 456 | 456 | break; |
| 457 | 457 | } |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | |
| 32 | 32 | use Xmf\Request; |
| 33 | 33 | |
| 34 | -require_once __DIR__ . '/admin_header.php'; |
|
| 34 | +require_once __DIR__.'/admin_header.php'; |
|
| 35 | 35 | |
| 36 | 36 | $op = $op = Request::getCmd('op', Request::getCmd('op', '', 'POST'), 'GET'); //!empty($_GET['op'])? $_GET['op'] : (!empty($_POST['op'])?$_POST['op']:""); |
| 37 | 37 | |
@@ -39,10 +39,10 @@ discard block |
||
| 39 | 39 | case 'delvotes': |
| 40 | 40 | $rid = Request::getInt('rid', 0, 'GET'); |
| 41 | 41 | $topic_id = Request::getInt('topic_id', 0, 'GET'); |
| 42 | - $sql = $GLOBALS['xoopsDB']->queryF('DELETE FROM ' . $GLOBALS['xoopsDB']->prefix('newbb_votedata') . " WHERE ratingid = $rid"); |
|
| 42 | + $sql = $GLOBALS['xoopsDB']->queryF('DELETE FROM '.$GLOBALS['xoopsDB']->prefix('newbb_votedata')." WHERE ratingid = $rid"); |
|
| 43 | 43 | $GLOBALS['xoopsDB']->query($sql); |
| 44 | 44 | |
| 45 | - $query = 'SELECT rating FROM ' . $GLOBALS['xoopsDB']->prefix('newbb_votedata') . ' WHERE topic_id = ' . $topic_id . ' '; |
|
| 45 | + $query = 'SELECT rating FROM '.$GLOBALS['xoopsDB']->prefix('newbb_votedata').' WHERE topic_id = '.$topic_id.' '; |
|
| 46 | 46 | $voteresult = $GLOBALS['xoopsDB']->query($query); |
| 47 | 47 | $votesDB = $GLOBALS['xoopsDB']->getRowsNum($voteresult); |
| 48 | 48 | $totalrating = 0; |
@@ -63,11 +63,11 @@ discard block |
||
| 63 | 63 | $useravgrating = '0'; |
| 64 | 64 | $uservotes = '0'; |
| 65 | 65 | |
| 66 | - $sql = 'SELECT * FROM ' . $GLOBALS['xoopsDB']->prefix('newbb_votedata') . ' ORDER BY ratingtimestamp DESC'; |
|
| 66 | + $sql = 'SELECT * FROM '.$GLOBALS['xoopsDB']->prefix('newbb_votedata').' ORDER BY ratingtimestamp DESC'; |
|
| 67 | 67 | $results = $GLOBALS['xoopsDB']->query($sql, 20, $start); |
| 68 | 68 | $votes = $GLOBALS['xoopsDB']->getRowsNum($results); |
| 69 | 69 | |
| 70 | - $sql = 'SELECT rating FROM ' . $GLOBALS['xoopsDB']->prefix('newbb_votedata') . ' '; |
|
| 70 | + $sql = 'SELECT rating FROM '.$GLOBALS['xoopsDB']->prefix('newbb_votedata').' '; |
|
| 71 | 71 | $result2 = $GLOBALS['xoopsDB']->query($sql, 20, $start); |
| 72 | 72 | $uservotes = $GLOBALS['xoopsDB']->getRowsNum($result2); |
| 73 | 73 | $useravgrating = 0; |
@@ -86,28 +86,28 @@ discard block |
||
| 86 | 86 | $adminObject->displayNavigation(basename(__FILE__)); |
| 87 | 87 | |
| 88 | 88 | echo "<div style='padding: 8px;'>\n |
| 89 | - <div><strong>" . _AM_NEWBB_VOTE_USERAVG . ": </strong>$useravgrating</div>\n |
|
| 90 | - <div><strong>" . _AM_NEWBB_VOTE_TOTALRATE . ": </strong>$uservotes</div>\n |
|
| 89 | + <div><strong>" . _AM_NEWBB_VOTE_USERAVG.": </strong>$useravgrating</div>\n |
|
| 90 | + <div><strong>"._AM_NEWBB_VOTE_TOTALRATE.": </strong>$uservotes</div>\n |
|
| 91 | 91 | <div style='padding: 8px;'>\n |
| 92 | - <ul><li> " . _AM_NEWBB_VOTE_DELETEDSC . "</li></ul> |
|
| 92 | + <ul><li> "._AM_NEWBB_VOTE_DELETEDSC."</li></ul> |
|
| 93 | 93 | <div>\n |
| 94 | 94 | <br>\n |
| 95 | 95 | <table width='100%' border='0' cellspacing='1' class='outer'>" . "<tr><td class='odd'> |
| 96 | 96 | <table width='100%' cellspacing='1' cellpadding='2' class='outer'>\n |
| 97 | 97 | <tr>\n |
| 98 | - <th align='center'>" . _AM_NEWBB_VOTE_ID . "</th>\n |
|
| 99 | - <th align='center'>" . _AM_NEWBB_VOTE_USER . "</th>\n |
|
| 100 | - <th align='center'>" . _AM_NEWBB_VOTE_IP . "</th>\n |
|
| 101 | - <th align='center'>" . _AM_NEWBB_VOTE_FILETITLE . "</th>\n |
|
| 102 | - <th align='center'>" . _AM_NEWBB_VOTE_RATING . "</th>\n |
|
| 103 | - <th align='center'>" . _AM_NEWBB_VOTE_DATE . "</th>\n |
|
| 104 | - <th align='center'>" . _AM_NEWBB_ACTION . "</th></tr>\n"; |
|
| 98 | + <th align='center'>" . _AM_NEWBB_VOTE_ID."</th>\n |
|
| 99 | + <th align='center'>" . _AM_NEWBB_VOTE_USER."</th>\n |
|
| 100 | + <th align='center'>" . _AM_NEWBB_VOTE_IP."</th>\n |
|
| 101 | + <th align='center'>" . _AM_NEWBB_VOTE_FILETITLE."</th>\n |
|
| 102 | + <th align='center'>" . _AM_NEWBB_VOTE_RATING."</th>\n |
|
| 103 | + <th align='center'>" . _AM_NEWBB_VOTE_DATE."</th>\n |
|
| 104 | + <th align='center'>" . _AM_NEWBB_ACTION."</th></tr>\n"; |
|
| 105 | 105 | |
| 106 | 106 | if (0 == $votes) { |
| 107 | - echo "<tr><td align='center' colspan='7' class='head'>" . _AM_NEWBB_VOTE_NOVOTES . '</td></tr>'; |
|
| 107 | + echo "<tr><td align='center' colspan='7' class='head'>"._AM_NEWBB_VOTE_NOVOTES.'</td></tr>'; |
|
| 108 | 108 | } |
| 109 | 109 | while (false !== (list($ratingid, $topic_id, $ratinguser, $rating, $ratinghostname, $ratingtimestamp) = $GLOBALS['xoopsDB']->fetchRow($results))) { |
| 110 | - $sql = 'SELECT topic_title FROM ' . $GLOBALS['xoopsDB']->prefix('newbb_topics') . ' WHERE topic_id=' . $topic_id . ' '; |
|
| 110 | + $sql = 'SELECT topic_title FROM '.$GLOBALS['xoopsDB']->prefix('newbb_topics').' WHERE topic_id='.$topic_id.' '; |
|
| 111 | 111 | $down_array = $GLOBALS['xoopsDB']->fetchArray($GLOBALS['xoopsDB']->query($sql)); |
| 112 | 112 | |
| 113 | 113 | $formatted_date = formatTimestamp($ratingtimestamp, _DATESTRING); |
@@ -117,10 +117,10 @@ discard block |
||
| 117 | 117 | <td class='head' align='center'>$ratingid</td>\n |
| 118 | 118 | <td class='even' align='center'>$ratinguname</td>\n |
| 119 | 119 | <td class='even' align='center' >$ratinghostname</td>\n |
| 120 | - <td class='even' align='left'><a href='" . XOOPS_URL . '/modules/newbb/viewtopic.php?topic_id=' . $topic_id . "' target='topic'>" . $myts->htmlSpecialChars($down_array['topic_title']) . "</a></td>\n |
|
| 120 | + <td class='even' align='left'><a href='".XOOPS_URL.'/modules/newbb/viewtopic.php?topic_id='.$topic_id."' target='topic'>".$myts->htmlSpecialChars($down_array['topic_title'])."</a></td>\n |
|
| 121 | 121 | <td class='even' align='center'>$rating</td>\n |
| 122 | 122 | <td class='even' align='center'>$formatted_date</td>\n |
| 123 | - <td class='even' align='center'><strong><a href='admin_votedata.php?op=delvotes&topic_id=$topic_id&rid=$ratingid'>" . newbbDisplayImage('p_delete', _DELETE) . "</a></strong></td>\n |
|
| 123 | + <td class='even' align='center'><strong><a href='admin_votedata.php?op=delvotes&topic_id=$topic_id&rid=$ratingid'>".newbbDisplayImage('p_delete', _DELETE)."</a></strong></td>\n |
|
| 124 | 124 | </tr>\n"; |
| 125 | 125 | } |
| 126 | 126 | echo '</table>'; |
@@ -129,11 +129,11 @@ discard block |
||
| 129 | 129 | require_once $GLOBALS['xoops']->path('class/pagenav.php'); |
| 130 | 130 | $page = ($votes > 10) ? _AM_NEWBB_INDEX_PAGE : ''; |
| 131 | 131 | $pagenav = new \XoopsPageNav($page, 20, $start, 'start'); |
| 132 | - echo '<div align="right" style="padding: 8px;">' . $page . '' . $pagenav->renderImageNav(4) . '</div>'; |
|
| 132 | + echo '<div align="right" style="padding: 8px;">'.$page.''.$pagenav->renderImageNav(4).'</div>'; |
|
| 133 | 133 | echo '<fieldset>'; |
| 134 | - echo '<legend> ' . _MI_NEWBB_ADMENU_VOTE . ' </legend>'; |
|
| 134 | + echo '<legend> '._MI_NEWBB_ADMENU_VOTE.' </legend>'; |
|
| 135 | 135 | echo _AM_NEWBB_HELP_VOTE_TAB; |
| 136 | 136 | echo '</fieldset>'; |
| 137 | 137 | break; |
| 138 | 138 | } |
| 139 | -require_once __DIR__ . '/admin_footer.php'; |
|
| 139 | +require_once __DIR__.'/admin_footer.php'; |
|
@@ -29,11 +29,11 @@ |
||
| 29 | 29 | // Project: XOOPS Project // |
| 30 | 30 | // ------------------------------------------------------------------------- // |
| 31 | 31 | |
| 32 | -require_once __DIR__ . '/admin_header.php'; |
|
| 32 | +require_once __DIR__.'/admin_header.php'; |
|
| 33 | 33 | xoops_cp_header(); |
| 34 | 34 | |
| 35 | 35 | $adminObject->displayNavigation(basename(__FILE__)); |
| 36 | 36 | \Xmf\Module\Admin::setPaypal('PBQZ7D6LT6UBC'); |
| 37 | 37 | $adminObject->displayAbout(false); |
| 38 | 38 | |
| 39 | -require_once __DIR__ . '/admin_footer.php'; |
|
| 39 | +require_once __DIR__.'/admin_footer.php'; |
|