@@ -11,17 +11,17 @@ 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 (!$forum = Request::getString('forum', '', '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 | 19 | |
| 20 | 20 | ///** @var Newbb\ForumHandler $forumHandler */ |
| 21 | 21 | //$forumHandler = Newbb\Helper::getInstance()->getHandler('Forum'); |
| 22 | 22 | $forumObject = $forumHandler->get($forum); |
| 23 | 23 | if (!$forumHandler->getPermission($forumObject)) { |
| 24 | - redirect_header(XOOPS_URL . '/index.php', 2, _NOPERM); |
|
| 24 | + redirect_header(XOOPS_URL.'/index.php', 2, _NOPERM); |
|
| 25 | 25 | } |
| 26 | 26 | |
| 27 | 27 | ///** @var Newbb\TopicHandler $topicHandler */ |
@@ -36,12 +36,12 @@ discard block |
||
| 36 | 36 | $query_array = []; |
| 37 | 37 | foreach ($query_vars as $var) { |
| 38 | 38 | if (Request::getString($var, '', 'GET')) { |
| 39 | - $query_array[$var] = "{$var}=" . Request::getString($var, '', 'GET'); |
|
| 39 | + $query_array[$var] = "{$var}=".Request::getString($var, '', 'GET'); |
|
| 40 | 40 | } |
| 41 | 41 | } |
| 42 | 42 | $page_query = htmlspecialchars(implode('&', array_values($query_array))); |
| 43 | 43 | unset($query_array); |
| 44 | - redirect_header(XOOPS_URL . "/modules/newbb/viewforum.php?{$page_query}", 2, _MD_NEWBB_NORIGHTTOPOST); |
|
| 44 | + redirect_header(XOOPS_URL."/modules/newbb/viewforum.php?{$page_query}", 2, _MD_NEWBB_NORIGHTTOPOST); |
|
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | if ($GLOBALS['xoopsModuleConfig']['wol_enabled']) { |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | $attachsig = (is_object($GLOBALS['xoopsUser']) && $GLOBALS['xoopsUser']->getVar('attachsig')) ? 1 : 0; |
| 71 | 71 | $post_id = 0; |
| 72 | 72 | $topic_id = 0; |
| 73 | -include __DIR__ . '/include/form.post.php'; |
|
| 73 | +include __DIR__.'/include/form.post.php'; |
|
| 74 | 74 | |
| 75 | -require_once __DIR__ . '/footer.php'; |
|
| 75 | +require_once __DIR__.'/footer.php'; |
|
| 76 | 76 | include $GLOBALS['xoops']->path('footer.php'); |
@@ -13,14 +13,14 @@ discard block |
||
| 13 | 13 | use XoopsModules\Newbb; |
| 14 | 14 | |
| 15 | 15 | ob_start(); |
| 16 | -require_once __DIR__ . '/header.php'; |
|
| 16 | +require_once __DIR__.'/header.php'; |
|
| 17 | 17 | include $GLOBALS['xoops']->path('header.php'); |
| 18 | 18 | |
| 19 | 19 | $attach_id = Request::getInt('attachid', 0, 'GET'); |
| 20 | 20 | $post_id = Request::getInt('post_id', 0, 'GET'); |
| 21 | 21 | |
| 22 | 22 | if (!$post_id || !$attach_id) { |
| 23 | - exit(_MD_NEWBB_NO_SUCH_FILE . ': post_id:' . $post_id . '; attachid' . $attachid); |
|
| 23 | + exit(_MD_NEWBB_NO_SUCH_FILE.': post_id:'.$post_id.'; attachid'.$attachid); |
|
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | ///** @var Newbb\PostHandler $postHandler */ |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | if (!$attach) { |
| 54 | 54 | exit(_MD_NEWBB_NO_SUCH_FILE); |
| 55 | 55 | } |
| 56 | -$file_saved = $GLOBALS['xoops']->path($GLOBALS['xoopsModuleConfig']['dir_attachments'] . '/' . $attach['name_saved']); |
|
| 56 | +$file_saved = $GLOBALS['xoops']->path($GLOBALS['xoopsModuleConfig']['dir_attachments'].'/'.$attach['name_saved']); |
|
| 57 | 57 | if (!file_exists($file_saved)) { |
| 58 | 58 | exit(_MD_NEWBB_NO_SUCH_FILE); |
| 59 | 59 | } |
@@ -70,8 +70,8 @@ discard block |
||
| 70 | 70 | header('Cache-Control: post-check=0, pre-check=0', false); |
| 71 | 71 | header('Pragma: no-cache'); |
| 72 | 72 | header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); |
| 73 | - header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); |
|
| 74 | - header('location: ' . XOOPS_URL . '/' . $GLOBALS['xoopsModuleConfig']['dir_attachments'] . '/' . $attach['name_saved']); |
|
| 73 | + header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); |
|
| 74 | + header('location: '.XOOPS_URL.'/'.$GLOBALS['xoopsModuleConfig']['dir_attachments'].'/'.$attach['name_saved']); |
|
| 75 | 75 | } else { |
| 76 | 76 | $file_display = $attach['nameDisplay']; |
| 77 | 77 | //$mimetype = $attach['mimetype']; |
@@ -87,11 +87,11 @@ discard block |
||
| 87 | 87 | //header('Content-Type: '.$mimetype); |
| 88 | 88 | header('Content-Type: application/octet-stream'); |
| 89 | 89 | if (preg_match("/MSIE (\d\.\d{1,2})/", Request::getString('HTTP_USER_AGENT', '', 'SERVER'))) { |
| 90 | - header('Content-Disposition: attachment; filename="' . $file_display . '"'); |
|
| 90 | + header('Content-Disposition: attachment; filename="'.$file_display.'"'); |
|
| 91 | 91 | header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); |
| 92 | 92 | header('Pragma: public'); |
| 93 | 93 | } else { |
| 94 | - header('Content-Disposition: attachment; filename="' . $file_display . '"'); |
|
| 94 | + header('Content-Disposition: attachment; filename="'.$file_display.'"'); |
|
| 95 | 95 | header('Pragma: no-cache'); |
| 96 | 96 | } |
| 97 | 97 | header('Content-Type: application/force-download'); |
@@ -11,7 +11,7 @@ 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 | $ok = Request::getInt('ok', 0, 'POST'); |
| 17 | 17 | |
@@ -43,15 +43,15 @@ discard block |
||
| 43 | 43 | } |
| 44 | 44 | $topic_id = $topic->getVar('topic_id'); |
| 45 | 45 | if (!$topic_id) { |
| 46 | - $redirect = empty($forum) ? 'index.php' : 'viewforum.php?forum=' . $forum; |
|
| 47 | - $redirect = XOOPS_URL . '/modules/newbb/' . $redirect; |
|
| 46 | + $redirect = empty($forum) ? 'index.php' : 'viewforum.php?forum='.$forum; |
|
| 47 | + $redirect = XOOPS_URL.'/modules/newbb/'.$redirect; |
|
| 48 | 48 | redirect_header($redirect, 2, _MD_NEWBB_ERRORTOPIC); |
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | $forum = $topic->getVar('forum_id'); |
| 52 | 52 | $forumObject = $forumHandler->get($forum); |
| 53 | 53 | if (!$forumHandler->getPermission($forumObject)) { |
| 54 | - redirect_header(XOOPS_URL . '/index.php', 2, _MD_NEWBB_NORIGHTTOACCESS); |
|
| 54 | + redirect_header(XOOPS_URL.'/index.php', 2, _MD_NEWBB_NORIGHTTOACCESS); |
|
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | $isAdmin = newbbIsAdmin($forumObject); |
@@ -62,11 +62,11 @@ discard block |
||
| 62 | 62 | $topic_status = $topic->getVar('topic_status'); |
| 63 | 63 | if (($postObject->checkIdentity() || $isAdmin) && $topicHandler->getPermission($topic->getVar('forum_id'), $topic_status, 'delete')) { |
| 64 | 64 | } else { |
| 65 | - redirect_header(XOOPS_URL . "/modules/newbb/viewtopic.php?topic_id=$topic_id&pid=$pid&forum=$forum", 2, _MD_NEWBB_DELNOTALLOWED); |
|
| 65 | + redirect_header(XOOPS_URL."/modules/newbb/viewtopic.php?topic_id=$topic_id&pid=$pid&forum=$forum", 2, _MD_NEWBB_DELNOTALLOWED); |
|
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | if (!$isAdmin && !$postObject->checkTimelimit('delete_timelimit')) { |
| 69 | - redirect_header(XOOPS_URL . "/modules/newbb/viewtopic.php?forum=$forum&topic_id=$topic_id&post_id=$post_id&pid=$pid", 2, _MD_NEWBB_TIMEISUPDEL); |
|
| 69 | + redirect_header(XOOPS_URL."/modules/newbb/viewtopic.php?forum=$forum&topic_id=$topic_id&post_id=$post_id&pid=$pid", 2, _MD_NEWBB_TIMEISUPDEL); |
|
| 70 | 70 | } |
| 71 | 71 | |
| 72 | 72 | if ($GLOBALS['xoopsModuleConfig']['wol_enabled']) { |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | } |
| 83 | 83 | if ($isDeleteOne && $postObject->isTopic() && $topic->getVar('topic_replies') > 0) { |
| 84 | 84 | //$postHandler->emptyTopic($postObject); |
| 85 | - redirect_header(XOOPS_URL . "/modules/newbb/viewtopic.php?topic_id=$topic_id&pid=$pid&forum=$forum", 2, _MD_NEWBB_POSTFIRSTWITHREPLYNODELETED); |
|
| 85 | + redirect_header(XOOPS_URL."/modules/newbb/viewtopic.php?topic_id=$topic_id&pid=$pid&forum=$forum", 2, _MD_NEWBB_POSTFIRSTWITHREPLYNODELETED); |
|
| 86 | 86 | } else { |
| 87 | 87 | if (Request::getString('post_text', '', 'POST')) { |
| 88 | 88 | //send a message |
@@ -101,11 +101,11 @@ discard block |
||
| 101 | 101 | $xoopsMailer->setToUsers($senduser); |
| 102 | 102 | $xoopsMailer->setFromName($GLOBALS['xoopsUser']->getVar('uname')); |
| 103 | 103 | $xoopsMailer->setSubject(_MD_NEWBB_DELEDEDMSG_SUBJECT); |
| 104 | - $forenurl = '<a href="' . XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/viewtopic.php?topic_id=' . $postObject->getVar('topic_id') . '">' . $postObject->getVar('subject') . '</a>'; |
|
| 104 | + $forenurl = '<a href="'.XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/viewtopic.php?topic_id='.$postObject->getVar('topic_id').'">'.$postObject->getVar('subject').'</a>'; |
|
| 105 | 105 | if (!empty($GLOBALS['xoopsModuleConfig']['do_rewrite'])) { |
| 106 | 106 | $forenurl = seo_urls($forenurl); |
| 107 | 107 | } |
| 108 | - $body = sprintf(_MD_NEWBB_DELEDEDMSG_BODY, $senduser->getVar('uname'), $forenurl, Request::getString('post_text', '', 'POST'), $GLOBALS['xoopsUser']->getVar('uname'), $GLOBALS['xoopsConfig']['sitename'], XOOPS_URL . '/'); |
|
| 108 | + $body = sprintf(_MD_NEWBB_DELEDEDMSG_BODY, $senduser->getVar('uname'), $forenurl, Request::getString('post_text', '', 'POST'), $GLOBALS['xoopsUser']->getVar('uname'), $GLOBALS['xoopsConfig']['sitename'], XOOPS_URL.'/'); |
|
| 109 | 109 | $body = $myts->nl2Br($body); |
| 110 | 110 | $xoopsMailer->setBody($body); |
| 111 | 111 | $xoopsMailer->send(); |
@@ -121,25 +121,25 @@ discard block |
||
| 121 | 121 | |
| 122 | 122 | //$postObject->loadFilters('delete'); |
| 123 | 123 | if ($isDeleteOne) { |
| 124 | - redirect_header(XOOPS_URL . "/modules/newbb/viewtopic.php?topic_id=$topic_id&order=$order&viewmode=$viewmode&pid=$pid&forum=$forum", 2, _MD_NEWBB_POSTDELETED); |
|
| 124 | + redirect_header(XOOPS_URL."/modules/newbb/viewtopic.php?topic_id=$topic_id&order=$order&viewmode=$viewmode&pid=$pid&forum=$forum", 2, _MD_NEWBB_POSTDELETED); |
|
| 125 | 125 | } else { |
| 126 | - redirect_header(XOOPS_URL . "/modules/newbb/viewforum.php?forum=$forum", 2, _MD_NEWBB_POSTSDELETED); |
|
| 126 | + redirect_header(XOOPS_URL."/modules/newbb/viewforum.php?forum=$forum", 2, _MD_NEWBB_POSTSDELETED); |
|
| 127 | 127 | } |
| 128 | 128 | } else { |
| 129 | 129 | include $GLOBALS['xoops']->path('header.php'); |
| 130 | 130 | //xoops_confirm(array('post_id' => $post_id, 'viewmode' => $viewmode, 'order' => $order, 'forum' => $forum, 'topic_id' => $topic_id, 'ok' => 1), 'delete.php', _MD_NEWBB_DEL_ONE); |
| 131 | - echo '<div class="confirmMsg">' . _MD_NEWBB_DEL_ONE . '<br> |
|
| 132 | - <form method="post" action="' . XOOPS_URL . '/modules/newbb/delete.php">'; |
|
| 133 | - echo _MD_NEWBB_DELEDEDMSG . '<br>'; |
|
| 131 | + echo '<div class="confirmMsg">'._MD_NEWBB_DEL_ONE.'<br> |
|
| 132 | + <form method="post" action="' . XOOPS_URL.'/modules/newbb/delete.php">'; |
|
| 133 | + echo _MD_NEWBB_DELEDEDMSG.'<br>'; |
|
| 134 | 134 | echo '<textarea name="post_text" cols="50" rows="5"></textarea><br>'; |
| 135 | - echo '<input type="hidden" name="post_id" value="' . htmlspecialchars($post_id) . '" />'; |
|
| 136 | - echo '<input type="hidden" name="order" value="' . htmlspecialchars($order) . '" />'; |
|
| 137 | - echo '<input type="hidden" name="forum" value="' . htmlspecialchars($forum) . '" />'; |
|
| 138 | - echo '<input type="hidden" name="topic_id" value="' . htmlspecialchars($topic_id) . '" />'; |
|
| 135 | + echo '<input type="hidden" name="post_id" value="'.htmlspecialchars($post_id).'" />'; |
|
| 136 | + echo '<input type="hidden" name="order" value="'.htmlspecialchars($order).'" />'; |
|
| 137 | + echo '<input type="hidden" name="forum" value="'.htmlspecialchars($forum).'" />'; |
|
| 138 | + echo '<input type="hidden" name="topic_id" value="'.htmlspecialchars($topic_id).'" />'; |
|
| 139 | 139 | echo '<input type="hidden" name="ok" value="1" />'; |
| 140 | 140 | echo $GLOBALS['xoopsSecurity']->getTokenHTML(); |
| 141 | - echo '<input type="submit" name="confirm_submit" value="' . _SUBMIT . '" title="' . _SUBMIT . '"/> |
|
| 142 | - <input type="button" name="confirm_back" value="' . _CANCEL . '" onclick="history.go(-1);" title="' . _CANCEL . '" /> |
|
| 141 | + echo '<input type="submit" name="confirm_submit" value="'._SUBMIT.'" title="'._SUBMIT.'"/> |
|
| 142 | + <input type="button" name="confirm_back" value="' . _CANCEL.'" onclick="history.go(-1);" title="'._CANCEL.'" /> |
|
| 143 | 143 | </form> |
| 144 | 144 | </div>'; |
| 145 | 145 | if ($isAdmin) { |
@@ -11,7 +11,7 @@ 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 | global $xoTheme, $xoopsTpl; |
| 17 | 17 | $GLOBALS['xoopsOption']['template_main'] = 'newbb_moderate.tpl'; |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | $forum_id = Request::getInt('forum', 0); |
| 22 | 22 | $isAdmin = newbbIsAdmin($forum_id); |
| 23 | 23 | if (!$isAdmin) { |
| 24 | - redirect_header(XOOPS_URL . '/index.php', 2, _MD_NEWBB_NORIGHTTOACCESS); |
|
| 24 | + redirect_header(XOOPS_URL.'/index.php', 2, _MD_NEWBB_NORIGHTTOACCESS); |
|
| 25 | 25 | } |
| 26 | 26 | $is_administrator = $GLOBALS['xoopsUserIsAdmin']; |
| 27 | 27 | ///** @var Newbb\ModerateHandler $moderateHandler */ |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | $ipWithMask = $ip->asReadable(); |
| 41 | 41 | $mask = empty($ipParts[1]) ? 0 : (int)$ipParts[1]; |
| 42 | 42 | $mask = ($mask > ((4 === $ip->ipVersion()) ? 32 : 128) || $mask < 8) ? '' : $mask; |
| 43 | - $ipWithMask .= empty($mask) ? '' : '/' . $mask; |
|
| 43 | + $ipWithMask .= empty($mask) ? '' : '/'.$mask; |
|
| 44 | 44 | } |
| 45 | 45 | } |
| 46 | 46 | |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | |
| 101 | 101 | $url = 'moderate.php'; |
| 102 | 102 | if ($forum_id) { |
| 103 | - $url .= '?forum=' . $forum_id; |
|
| 103 | + $url .= '?forum='.$forum_id; |
|
| 104 | 104 | } |
| 105 | 105 | $xoopsTpl->assign('moderate_url', $url); |
| 106 | 106 | |
@@ -111,27 +111,27 @@ discard block |
||
| 111 | 111 | } |
| 112 | 112 | $users = newbbGetUnameFromIds(array_keys($_users), $GLOBALS['xoopsModuleConfig']['show_realname'], true); |
| 113 | 113 | |
| 114 | - $columnHeaders ['uid'] = [ |
|
| 115 | - 'url' => 'moderate.php?forum=' . $forum_id . '&start=' . $start . '&sort=uid', |
|
| 114 | + $columnHeaders ['uid'] = [ |
|
| 115 | + 'url' => 'moderate.php?forum='.$forum_id.'&start='.$start.'&sort=uid', |
|
| 116 | 116 | 'header' => _MD_NEWBB_SUSPEND_UID, |
| 117 | 117 | 'title' => _MD_NEWBB_SUSPEND_UID, |
| 118 | 118 | ]; |
| 119 | - $columnHeaders ['start'] = [ |
|
| 120 | - 'url' => 'moderate.php?forum=' . $forum_id . '&start=' . $start . '&sort=start', |
|
| 119 | + $columnHeaders ['start'] = [ |
|
| 120 | + 'url' => 'moderate.php?forum='.$forum_id.'&start='.$start.'&sort=start', |
|
| 121 | 121 | 'header' => _MD_NEWBB_SUSPEND_START, |
| 122 | 122 | 'title' => _MD_NEWBB_SUSPEND_START, |
| 123 | 123 | ]; |
| 124 | - $columnHeaders['expire'] = [ |
|
| 125 | - 'url' => 'moderate.php?forum=' . $forum_id . '&start=' . $start . '&sort=expire', |
|
| 124 | + $columnHeaders['expire'] = [ |
|
| 125 | + 'url' => 'moderate.php?forum='.$forum_id.'&start='.$start.'&sort=expire', |
|
| 126 | 126 | 'header' => _MD_NEWBB_SUSPEND_EXPIRE, |
| 127 | 127 | 'title' => _MD_NEWBB_SUSPEND_EXPIRE, |
| 128 | 128 | ]; |
| 129 | - $columnHeaders['forum'] = [ |
|
| 130 | - 'url' => 'moderate.php?forum=' . $forum_id . '&start=' . $start . '&sort=forum', |
|
| 129 | + $columnHeaders['forum'] = [ |
|
| 130 | + 'url' => 'moderate.php?forum='.$forum_id.'&start='.$start.'&sort=forum', |
|
| 131 | 131 | 'header' => _MD_NEWBB_SUSPEND_SCOPE, |
| 132 | 132 | 'title' => _MD_NEWBB_SUSPEND_SCOPE, |
| 133 | 133 | ]; |
| 134 | - $columnHeaders['desc'] = [ |
|
| 134 | + $columnHeaders['desc'] = [ |
|
| 135 | 135 | 'url' => false, |
| 136 | 136 | 'header' => _MD_NEWBB_SUSPEND_DESC, |
| 137 | 137 | 'title' => _MD_NEWBB_SUSPEND_DESC, |
@@ -156,14 +156,14 @@ discard block |
||
| 156 | 156 | $row['forum'] = ($moderateObjects[$id]->getVar('forum_id') ? $forum_list[$moderateObjects[$id]->getVar('forum_id')]['forum_name'] : _ALL); |
| 157 | 157 | $row['desc'] = ($moderateObjects[$id]->getVar('mod_desc') ?: _NONE); |
| 158 | 158 | $row['options'] = (($is_administrator |
| 159 | - || $moderateObjects[$id]->getVar('forum_id') == $forum_id) ? '<a href="moderate.php?forum=' . $forum_id . '&del=' . $moderateObjects[$id]->getVar('mod_id') . '">' . _DELETE . '</a>' : ''); |
|
| 159 | + || $moderateObjects[$id]->getVar('forum_id') == $forum_id) ? '<a href="moderate.php?forum='.$forum_id.'&del='.$moderateObjects[$id]->getVar('mod_id').'">'._DELETE.'</a>' : ''); |
|
| 160 | 160 | $columnRows[] = $row; |
| 161 | 161 | } |
| 162 | 162 | $xoopsTpl->assign('columnRows', $columnRows); |
| 163 | 163 | |
| 164 | 164 | if ($moderate_count > $GLOBALS['xoopsModuleConfig']['topics_per_page']) { |
| 165 | 165 | include $GLOBALS['xoops']->path('class/pagenav.php'); |
| 166 | - $nav = new \XoopsPageNav($moderate_count, $GLOBALS['xoopsModuleConfig']['topics_per_page'], $start, 'start', 'forum=' . $forum_id . '&sort=' . $sortname); |
|
| 166 | + $nav = new \XoopsPageNav($moderate_count, $GLOBALS['xoopsModuleConfig']['topics_per_page'], $start, 'start', 'forum='.$forum_id.'&sort='.$sortname); |
|
| 167 | 167 | //if (isset($GLOBALS['xoopsModuleConfig']['do_rewrite'])) { |
| 168 | 168 | // $nav->url = formatURL(Request::getString('SERVER_NAME', '', 'SERVER')) . ' /' . $nav->url; |
| 169 | 169 | //} |
@@ -177,14 +177,14 @@ discard block |
||
| 177 | 177 | $forum_form->addElement(new \XoopsFormText(_MD_NEWBB_SUSPEND_IP, 'ip', 50, 50)); |
| 178 | 178 | $forum_form->addElement(new \XoopsFormText(_MD_NEWBB_SUSPEND_DURATION, 'expire', 20, 25, '5'), true); |
| 179 | 179 | $forum_form->addElement(new \XoopsFormText(_MD_NEWBB_SUSPEND_DESC, 'desc', 50, 255)); |
| 180 | -require_once __DIR__ . '/include/functions.forum.php'; |
|
| 180 | +require_once __DIR__.'/include/functions.forum.php'; |
|
| 181 | 181 | if (newbbIsAdmin()) { |
| 182 | - $forumSel = '<select name="forum">';// if user doesn't select, default is "0" all forums |
|
| 182 | + $forumSel = '<select name="forum">'; // if user doesn't select, default is "0" all forums |
|
| 183 | 183 | $forumSel .= '<option value="0"'; |
| 184 | 184 | if (0 == $forum_id) { |
| 185 | 185 | $forumSel .= ' selected'; |
| 186 | 186 | } |
| 187 | - $forumSel .= '>' . _ALL . '</option>'; |
|
| 187 | + $forumSel .= '>'._ALL.'</option>'; |
|
| 188 | 188 | $forumSel .= newbbForumSelectBox($forum_id, 'access', false); //$accessForums, $permission = "access", $delimitorCategory = true |
| 189 | 189 | $forumSel .= '</select>'; |
| 190 | 190 | $forumEle = new \XoopsFormLabel(_MD_NEWBB_SELFORUM, $forumSel); |
@@ -196,5 +196,5 @@ discard block |
||
| 196 | 196 | $forum_form->addElement(new \XoopsFormButton('', 'submit', _SUBMIT, 'submit')); |
| 197 | 197 | $forum_form->assign($xoopsTpl); |
| 198 | 198 | |
| 199 | -require_once __DIR__ . '/footer.php'; |
|
| 199 | +require_once __DIR__.'/footer.php'; |
|
| 200 | 200 | include $GLOBALS['xoops']->path('footer.php'); |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | * |
| 41 | 41 | */ |
| 42 | 42 | |
| 43 | -require_once __DIR__ . '/header.php'; |
|
| 43 | +require_once __DIR__.'/header.php'; |
|
| 44 | 44 | |
| 45 | 45 | error_reporting(0); |
| 46 | 46 | $xoopsLogger->activated = false; |
@@ -65,9 +65,9 @@ discard block |
||
| 65 | 65 | $topic_id = $post->getVar('topic_id'); |
| 66 | 66 | $post_data = $postHandler->getPostForPrint($post); |
| 67 | 67 | $isPost = 1; |
| 68 | - $post_data['url'] = XOOPS_URL . '/modules/newbb/viewtopic.php?post_id=' . $post_id; |
|
| 68 | + $post_data['url'] = XOOPS_URL.'/modules/newbb/viewtopic.php?post_id='.$post_id; |
|
| 69 | 69 | if (!empty($GLOBALS['xoopsModuleConfig']['do_rewrite'])) { |
| 70 | - $post_data['url'] = seo_urls('<a href="' . $post_data['url'] . '"></a>'); |
|
| 70 | + $post_data['url'] = seo_urls('<a href="'.$post_data['url'].'"></a>'); |
|
| 71 | 71 | $post_data['url'] = str_replace('<a href="', '', $post_data['url']); |
| 72 | 72 | $post_data['url'] = str_replace('"></a>', '', $post_data['url']); |
| 73 | 73 | } |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | echo "</head><body style='background-color:#ffffff; color:#000000;' onload='window.print()'> |
| 114 | 114 | <div style='width: 750px; border: 1px solid #000; padding: 20px;'> |
| 115 | 115 | <div style='text-align: center; display: block; margin: 0 0 6px 0;'> |
| 116 | - <img src='" . XOOPS_URL . "/modules/newbb/assets/images/xoopsbb_slogo.png' border='0' alt='' /> |
|
| 116 | + <img src='" . XOOPS_URL."/modules/newbb/assets/images/xoopsbb_slogo.png' border='0' alt='' /> |
|
| 117 | 117 | <br><br> "; |
| 118 | 118 | |
| 119 | 119 | $postsArray = $topicHandler->getAllPosts($topicObject); |
@@ -122,25 +122,25 @@ discard block |
||
| 122 | 122 | continue; |
| 123 | 123 | } |
| 124 | 124 | $post_data = $postHandler->getPostForPrint($post); |
| 125 | - echo "<h2 style='margin: 0;'>" . $post_data['subject'] . "</h2> |
|
| 126 | - <div align='center'>" . _POSTEDBY . ' ' . $post_data['author'] . ' ' . _ON . ' ' . formatTimestamp($post_data['date']) . "</div> |
|
| 125 | + echo "<h2 style='margin: 0;'>".$post_data['subject']."</h2> |
|
| 126 | + <div align='center'>" . _POSTEDBY.' '.$post_data['author'].' '._ON.' '.formatTimestamp($post_data['date'])."</div> |
|
| 127 | 127 | <div style='text-align: center; display: block; padding-bottom: 12px; margin: 0 0 6px 0; border-bottom: 2px solid #ccc;'></div> |
| 128 | - <div>" . $post_data['text'] . "</div> |
|
| 128 | + <div>" . $post_data['text']."</div> |
|
| 129 | 129 | <div style='padding-top: 12px; border-top: 2px solid #ccc;'></div><br>"; |
| 130 | 130 | } |
| 131 | - echo '<p>' . _MD_NEWBB_COMEFROM . ' ' . XOOPS_URL . '/newbb/viewtopic.php?forum=' . $forum_id . '&topic_id=' . $topic_id . '</p>'; |
|
| 131 | + echo '<p>'._MD_NEWBB_COMEFROM.' '.XOOPS_URL.'/newbb/viewtopic.php?forum='.$forum_id.'&topic_id='.$topic_id.'</p>'; |
|
| 132 | 132 | echo '</div></div>'; |
| 133 | 133 | echo '</body></html>'; |
| 134 | 134 | } else { |
| 135 | 135 | echo "</head><body style='background-color:#ffffff; color:#000000;' onload='window.print()'> |
| 136 | 136 | <div style='width: 750px; border: 1px solid #000; padding: 20px;'> |
| 137 | 137 | <div style='text-align: center; display: block; margin: 0 0 6px 0;'> |
| 138 | - <h2 style='margin: 0;'>" . $post_data['subject'] . "</h2></div> |
|
| 139 | - <div align='center'>" . _POSTEDBY . ' ' . $post_data['author'] . ' ' . _ON . ' ' . formatTimestamp($post_data['date']) . "</div> |
|
| 138 | + <h2 style='margin: 0;'>" . $post_data['subject']."</h2></div> |
|
| 139 | + <div align='center'>" . _POSTEDBY.' '.$post_data['author'].' '._ON.' '.formatTimestamp($post_data['date'])."</div> |
|
| 140 | 140 | <div style='text-align: center; display: block; padding-bottom: 12px; margin: 0 0 6px 0; border-bottom: 2px solid #ccc;'></div> |
| 141 | - <div>" . $post_data['text'] . "</div> |
|
| 141 | + <div>" . $post_data['text']."</div> |
|
| 142 | 142 | <div style='padding-top: 12px; border-top: 2px solid #ccc;'></div> |
| 143 | - <p>" . _MD_NEWBB_COMEFROM . ' ' . $post_data['url'] . '</p> |
|
| 143 | + <p>" . _MD_NEWBB_COMEFROM.' '.$post_data['url'].'</p> |
|
| 144 | 144 | </div> |
| 145 | 145 | <br><br></body></html>'; |
| 146 | 146 | } |
@@ -2,7 +2,7 @@ discard block |
||
| 2 | 2 | |
| 3 | 3 | use Xmf\Request; |
| 4 | 4 | |
| 5 | -require_once __DIR__ . '/header.php'; |
|
| 5 | +require_once __DIR__.'/header.php'; |
|
| 6 | 6 | /* |
| 7 | 7 | * |
| 8 | 8 | * Module: newbbss |
@@ -31,43 +31,43 @@ discard block |
||
| 31 | 31 | // per their requirements. |
| 32 | 32 | $ori_self = Request::getString('PHP_SELF', '', 'SERVER'); |
| 33 | 33 | $ori_self = explode('modules/newbb', $ori_self); |
| 34 | - $newUrl = $ori_self[0] . 'modules/newbb/' . $seoMap[$seoOp]; |
|
| 34 | + $newUrl = $ori_self[0].'modules/newbb/'.$seoMap[$seoOp]; |
|
| 35 | 35 | $_ENV['PHP_SELF'] = $newUrl; |
| 36 | 36 | $_SERVER['SCRIPT_NAME'] = $newUrl; |
| 37 | 37 | $_SERVER['PHP_SELF'] = $newUrl; |
| 38 | 38 | switch ($seoOp) { |
| 39 | 39 | case 'c': |
| 40 | - $_SERVER['REQUEST_URI'] = $newUrl . '?cat=' . $seoArg; |
|
| 40 | + $_SERVER['REQUEST_URI'] = $newUrl.'?cat='.$seoArg; |
|
| 41 | 41 | $_GET['cat'] = $seoArg; |
| 42 | 42 | break; |
| 43 | 43 | case 'f': |
| 44 | - $_SERVER['REQUEST_URI'] = $newUrl . '?forum=' . $seoArg; |
|
| 44 | + $_SERVER['REQUEST_URI'] = $newUrl.'?forum='.$seoArg; |
|
| 45 | 45 | $_GET['forum'] = $seoArg; |
| 46 | 46 | break; |
| 47 | 47 | case 'p': |
| 48 | - $_SERVER['REQUEST_URI'] = $newUrl . '?post_id=' . $seoArg; |
|
| 48 | + $_SERVER['REQUEST_URI'] = $newUrl.'?post_id='.$seoArg; |
|
| 49 | 49 | $_GET['post_id'] = $seoArg; |
| 50 | 50 | break; |
| 51 | 51 | case 'rc': |
| 52 | - $_SERVER['REQUEST_URI'] = $newUrl . '?c=' . $seoArg; |
|
| 52 | + $_SERVER['REQUEST_URI'] = $newUrl.'?c='.$seoArg; |
|
| 53 | 53 | $_GET['c'] = $seoArg; |
| 54 | 54 | break; |
| 55 | 55 | case 'rf': |
| 56 | - $_SERVER['REQUEST_URI'] = $newUrl . '?f=' . $seoArg; |
|
| 56 | + $_SERVER['REQUEST_URI'] = $newUrl.'?f='.$seoArg; |
|
| 57 | 57 | $_GET['f'] = $seoArg; |
| 58 | 58 | break; |
| 59 | 59 | default: |
| 60 | 60 | case 't': |
| 61 | 61 | case 'pr': |
| 62 | - $_SERVER['REQUEST_URI'] = $newUrl . '?topic_id=' . $seoArg; |
|
| 62 | + $_SERVER['REQUEST_URI'] = $newUrl.'?topic_id='.$seoArg; |
|
| 63 | 63 | $_GET['topic_id'] = $seoArg; |
| 64 | 64 | break; |
| 65 | 65 | } |
| 66 | 66 | include $seoMap[$seoOp]; |
| 67 | 67 | } else { |
| 68 | - $last = $seoOp . '/' . $seoArg; |
|
| 68 | + $last = $seoOp.'/'.$seoArg; |
|
| 69 | 69 | if ('' !== $seoOther) { |
| 70 | - $last .= '/' . $seoOther; |
|
| 70 | + $last .= '/'.$seoOther; |
|
| 71 | 71 | } |
| 72 | 72 | include $last; |
| 73 | 73 | } |
@@ -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']; |