@@ -8,5 +8,5 @@ |
||
| 8 | 8 | * @since 4.00 |
| 9 | 9 | * @package module::newbb |
| 10 | 10 | */ |
| 11 | -require_once __DIR__ . '/header.php'; |
|
| 11 | +require_once __DIR__.'/header.php'; |
|
| 12 | 12 | require_once $GLOBALS['xoops']->path('modules/tag/list.tag.php'); |
@@ -12,7 +12,7 @@ discard block |
||
| 12 | 12 | use Xmf\Request; |
| 13 | 13 | use XoopsModules\Newbb; |
| 14 | 14 | |
| 15 | -require_once __DIR__ . '/header.php'; |
|
| 15 | +require_once __DIR__.'/header.php'; |
|
| 16 | 16 | |
| 17 | 17 | foreach (['forum', 'topic_id', 'post_id', 'order'] as $getint) { |
| 18 | 18 | ${$getint} = Request::getInt($getint, 0, 'GET'); |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | $query_array = []; |
| 65 | 65 | foreach ($query_vars as $var) { |
| 66 | 66 | if (Request::getString($var, '', 'GET')) { |
| 67 | - $query_array[$var] = "{$var}=" . Request::getString($var, '', 'GET'); |
|
| 67 | + $query_array[$var] = "{$var}=".Request::getString($var, '', 'GET'); |
|
| 68 | 68 | } |
| 69 | 69 | } |
| 70 | 70 | $page_query = htmlspecialchars(implode('&', array_values($query_array)), ENT_QUOTES | ENT_HTML5); |
@@ -115,8 +115,8 @@ discard block |
||
| 115 | 115 | $post_karma = $postObject->getVar('post_karma'); |
| 116 | 116 | $require_reply = $postObject->getVar('require_reply'); |
| 117 | 117 | |
| 118 | -$xoopsTpl->assign('error_message', _MD_NEWBB_EDITEDBY . ' ' . $GLOBALS['xoopsUser']->uname()); |
|
| 119 | -require_once __DIR__ . '/include/form.post.php'; |
|
| 118 | +$xoopsTpl->assign('error_message', _MD_NEWBB_EDITEDBY.' '.$GLOBALS['xoopsUser']->uname()); |
|
| 119 | +require_once __DIR__.'/include/form.post.php'; |
|
| 120 | 120 | |
| 121 | 121 | ///** @var Newbb\KarmaHandler $karmaHandler */ |
| 122 | 122 | //$karmaHandler = Newbb\Helper::getInstance()->getHandler('Karma'); |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | $posts_contextObject = $istopic ? [] : [$postHandler->get($postObject->getVar('pid'))]; |
| 127 | 127 | foreach ($posts_contextObject as $post_contextObject) { |
| 128 | 128 | if ($GLOBALS['xoopsModuleConfig']['enable_karma'] && $post_contextObject->getVar('post_karma') > 0) { |
| 129 | - $p_message = sprintf(_MD_NEWBB_KARMA_REQUIREMENT, '***', $post_contextObject->getVar('post_karma')) . '</div>'; |
|
| 129 | + $p_message = sprintf(_MD_NEWBB_KARMA_REQUIREMENT, '***', $post_contextObject->getVar('post_karma')).'</div>'; |
|
| 130 | 130 | } elseif ($GLOBALS['xoopsModuleConfig']['allow_require_reply'] && $post_contextObject->getVar('require_reply')) { |
| 131 | 131 | $p_message = _MD_NEWBB_REPLY_REQUIREMENT; |
| 132 | 132 | } else { |
@@ -144,11 +144,11 @@ discard block |
||
| 144 | 144 | |
| 145 | 145 | $posts_context[] = [ |
| 146 | 146 | 'subject' => $p_subject, |
| 147 | - 'meta' => _MD_NEWBB_BY . ' ' . $p_name . ' ' . _MD_NEWBB_ON . ' ' . $p_date, |
|
| 147 | + 'meta' => _MD_NEWBB_BY.' '.$p_name.' '._MD_NEWBB_ON.' '.$p_date, |
|
| 148 | 148 | 'content' => $p_message |
| 149 | 149 | ]; |
| 150 | 150 | } |
| 151 | 151 | $xoopsTpl->assign_by_ref('posts_context', $posts_context); |
| 152 | 152 | // irmtfan move to footer.php |
| 153 | -require_once __DIR__ . '/footer.php'; |
|
| 153 | +require_once __DIR__.'/footer.php'; |
|
| 154 | 154 | require_once $GLOBALS['xoops']->path('footer.php'); |
@@ -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 | require_once $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 | require_once $last; |
| 73 | 73 | } |
@@ -3,12 +3,12 @@ discard block |
||
| 3 | 3 | /** |
| 4 | 4 | * @see http://www.php-fig.org/psr/psr-4/examples/ |
| 5 | 5 | */ |
| 6 | -spl_autoload_register(function ($class) { |
|
| 6 | +spl_autoload_register(function($class) { |
|
| 7 | 7 | // project-specific namespace prefix |
| 8 | - $prefix = 'XoopsModules\\' . ucfirst(basename(dirname(__DIR__))); |
|
| 8 | + $prefix = 'XoopsModules\\'.ucfirst(basename(dirname(__DIR__))); |
|
| 9 | 9 | |
| 10 | 10 | // base directory for the namespace prefix |
| 11 | - $base_dir = dirname(__DIR__) . '/class/'; |
|
| 11 | + $base_dir = dirname(__DIR__).'/class/'; |
|
| 12 | 12 | |
| 13 | 13 | // does the class use the namespace prefix? |
| 14 | 14 | $len = strlen($prefix); |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | // replace the namespace prefix with the base directory, replace namespace |
| 24 | 24 | // separators with directory separators in the relative class name, append |
| 25 | 25 | // with .php |
| 26 | - $file = $base_dir . str_replace('\\', '/', $relativeClass) . '.php'; |
|
| 26 | + $file = $base_dir.str_replace('\\', '/', $relativeClass).'.php'; |
|
| 27 | 27 | |
| 28 | 28 | // if the file exists, require it |
| 29 | 29 | if (file_exists($file)) { |
@@ -28,6 +28,6 @@ |
||
| 28 | 28 | */ |
| 29 | 29 | public static function eventCoreIncludeCommonEnd($args) |
| 30 | 30 | { |
| 31 | - require_once __DIR__ . '/autoloader.php'; |
|
| 31 | + require_once __DIR__.'/autoloader.php'; |
|
| 32 | 32 | } |
| 33 | 33 | } |
@@ -33,15 +33,15 @@ |
||
| 33 | 33 | use XoopsModules\Newbb; |
| 34 | 34 | |
| 35 | 35 | //require_once $GLOBALS['xoops']->path('include/cp_header.php'); |
| 36 | -require_once dirname(dirname(dirname(__DIR__))) . '/include/cp_header.php'; |
|
| 37 | -require_once $GLOBALS['xoops']->path('modules/' . $xoopsModule->getVar('dirname') . '/include/vars.php'); |
|
| 38 | -require_once $GLOBALS['xoops']->path('modules/' . $xoopsModule->getVar('dirname') . '/include/functions.user.php'); |
|
| 39 | -require_once $GLOBALS['xoops']->path('modules/' . $xoopsModule->getVar('dirname') . '/include/functions.render.php'); |
|
| 36 | +require_once dirname(dirname(dirname(__DIR__))).'/include/cp_header.php'; |
|
| 37 | +require_once $GLOBALS['xoops']->path('modules/'.$xoopsModule->getVar('dirname').'/include/vars.php'); |
|
| 38 | +require_once $GLOBALS['xoops']->path('modules/'.$xoopsModule->getVar('dirname').'/include/functions.user.php'); |
|
| 39 | +require_once $GLOBALS['xoops']->path('modules/'.$xoopsModule->getVar('dirname').'/include/functions.render.php'); |
|
| 40 | 40 | //require_once $GLOBALS['xoops']->path('Frameworks/art/functions.php'); |
| 41 | 41 | //require_once $GLOBALS['xoops']->path('Frameworks/art/functions.admin.php'); |
| 42 | 42 | |
| 43 | -require_once dirname(__DIR__) . '/include/config.php'; |
|
| 44 | -require_once dirname(__DIR__) . '/include/common.php'; |
|
| 43 | +require_once dirname(__DIR__).'/include/config.php'; |
|
| 44 | +require_once dirname(__DIR__).'/include/common.php'; |
|
| 45 | 45 | |
| 46 | 46 | /** @var Newbb\Helper $helper */ |
| 47 | 47 | $helper = Newbb\Helper::getInstance(); |
@@ -32,11 +32,11 @@ 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/xoopstree.php'); |
| 37 | 37 | require_once $GLOBALS['xoops']->path('class/pagenav.php'); |
| 38 | -require_once dirname(__DIR__) . '/include/functions.forum.php'; |
|
| 39 | -require_once dirname(__DIR__) . '/include/functions.render.php'; |
|
| 38 | +require_once dirname(__DIR__).'/include/functions.forum.php'; |
|
| 39 | +require_once dirname(__DIR__).'/include/functions.render.php'; |
|
| 40 | 40 | |
| 41 | 41 | $cacheHelper = Newbb\Utility::cleanCache(); |
| 42 | 42 | |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | if ($forumHandler->insert($forumObject)) { |
| 70 | 70 | if ($cid !== $forumObject->getVar('cat_id') && $subforums = newbbGetSubForum($forum_id)) { |
| 71 | 71 | $forums = array_map('intval', array_values($subforums)); |
| 72 | - $forumHandler->updateAll('cat_id', $cid, new \Criteria('forum_id', '(' . implode(', ', $forums) . ')', 'IN')); |
|
| 72 | + $forumHandler->updateAll('cat_id', $cid, new \Criteria('forum_id', '('.implode(', ', $forums).')', 'IN')); |
|
| 73 | 73 | } |
| 74 | 74 | |
| 75 | 75 | //$cacheHelper->delete('forum'); |
@@ -79,19 +79,19 @@ discard block |
||
| 79 | 79 | } |
| 80 | 80 | } else { |
| 81 | 81 | $box = '<select name="dest_forum">'; |
| 82 | - $box .= '<option value=0 selected>' . _SELECT . '</option>'; |
|
| 82 | + $box .= '<option value=0 selected>'._SELECT.'</option>'; |
|
| 83 | 83 | $box .= newbbForumSelectBox($forum_id, 'all', true, true); |
| 84 | 84 | $box .= '</select>'; |
| 85 | 85 | |
| 86 | - echo "<table width='100%' border='0' cellspacing='1' class='outer'>" . "<tr><td class='odd'>"; |
|
| 86 | + echo "<table width='100%' border='0' cellspacing='1' class='outer'>"."<tr><td class='odd'>"; |
|
| 87 | 87 | echo '<form action="./admin_forum_manager.php" method="post" name="forummove" id="forummove">'; |
| 88 | 88 | echo '<input type="hidden" name="op" value="moveforum" />'; |
| 89 | - echo '<input type="hidden" name="forum" value=' . $forum_id . ' />'; |
|
| 89 | + echo '<input type="hidden" name="forum" value='.$forum_id.' />'; |
|
| 90 | 90 | echo '<table border="0" cellpadding="1" cellspacing="0" align="center" valign="top" width="95%"><tr>'; |
| 91 | - echo '<td class="bg2" align="center"><strong>' . _AM_NEWBB_MOVETHISFORUM . '</strong></td>'; |
|
| 91 | + echo '<td class="bg2" align="center"><strong>'._AM_NEWBB_MOVETHISFORUM.'</strong></td>'; |
|
| 92 | 92 | echo '</tr>'; |
| 93 | - echo '<tr><td class="bg1" align="center">' . $box . '</td></tr>'; |
|
| 94 | - echo '<tr><td align="center"><input type="submit" name="save" value=' . _GO . ' class="button" /></td></tr>'; |
|
| 93 | + echo '<tr><td class="bg1" align="center">'.$box.'</td></tr>'; |
|
| 94 | + echo '<tr><td align="center"><input type="submit" name="save" value='._GO.' class="button" /></td></tr>'; |
|
| 95 | 95 | echo '</table></form>'; |
| 96 | 96 | echo '</td></tr></table>'; |
| 97 | 97 | } |
@@ -104,17 +104,17 @@ discard block |
||
| 104 | 104 | $forum_dest = $forumHandler->get(Request::getString('dest_forum', '', 'POST')); |
| 105 | 105 | if (is_object($forum_dest)) { |
| 106 | 106 | $cid = $forum_dest->getVar('cat_id'); |
| 107 | - $sql = ' UPDATE ' . $GLOBALS['xoopsDB']->prefix('newbb_posts') . ' SET forum_id=' . Request::getInt('dest_forum', 0, 'POST') . " WHERE forum_id=$forum_id"; |
|
| 107 | + $sql = ' UPDATE '.$GLOBALS['xoopsDB']->prefix('newbb_posts').' SET forum_id='.Request::getInt('dest_forum', 0, 'POST')." WHERE forum_id=$forum_id"; |
|
| 108 | 108 | $result_post = $GLOBALS['xoopsDB']->queryF($sql); |
| 109 | 109 | |
| 110 | - $sql = ' UPDATE ' . $GLOBALS['xoopsDB']->prefix('newbb_topics') . ' SET forum_id=' . Request::getInt('dest_forum', 0, 'POST') . " WHERE forum_id=$forum_id"; |
|
| 110 | + $sql = ' UPDATE '.$GLOBALS['xoopsDB']->prefix('newbb_topics').' SET forum_id='.Request::getInt('dest_forum', 0, 'POST')." WHERE forum_id=$forum_id"; |
|
| 111 | 111 | $result_topic = $GLOBALS['xoopsDB']->queryF($sql); |
| 112 | 112 | |
| 113 | 113 | $forumObject = $forumHandler->get($forum_id); |
| 114 | 114 | $forumHandler->updateAll('parent_forum', Request::getInt('dest_forum', 0, 'POST'), new \Criteria('parent_forum', $forum_id)); |
| 115 | 115 | if ($cid !== $forumObject->getVar('cat_id') && $subforums = newbbGetSubForum($forum_id)) { |
| 116 | 116 | $forums = array_map('intval', array_values($subforums)); |
| 117 | - $forumHandler->updateAll('cat_id', $cid, new \Criteria('forum_id', '(' . implode(', ', $forums) . ')', 'IN')); |
|
| 117 | + $forumHandler->updateAll('cat_id', $cid, new \Criteria('forum_id', '('.implode(', ', $forums).')', 'IN')); |
|
| 118 | 118 | } |
| 119 | 119 | |
| 120 | 120 | $forumHandler->delete($forumObject); |
@@ -129,19 +129,19 @@ discard block |
||
| 129 | 129 | } |
| 130 | 130 | } else { |
| 131 | 131 | $box = '<select name="dest_forum">'; |
| 132 | - $box .= '<option value=0 selected>' . _SELECT . '</option>'; |
|
| 132 | + $box .= '<option value=0 selected>'._SELECT.'</option>'; |
|
| 133 | 133 | $box .= newbbForumSelectBox($forum_id, 'all'); |
| 134 | 134 | $box .= '</select>'; |
| 135 | - echo "<table width='100%' border='0' cellspacing='1' class='outer'>" . "<tr><td class='odd'>"; |
|
| 136 | - echo '<form action="' . xoops_getenv('PHP_SELF') . '" method="post" name="forummove" id="forummove">'; |
|
| 135 | + echo "<table width='100%' border='0' cellspacing='1' class='outer'>"."<tr><td class='odd'>"; |
|
| 136 | + echo '<form action="'.xoops_getenv('PHP_SELF').'" method="post" name="forummove" id="forummove">'; |
|
| 137 | 137 | echo '<input type="hidden" name="op" value="mergeforum" />'; |
| 138 | - echo '<input type="hidden" name="forum" value=' . $forum_id . ' />'; |
|
| 138 | + echo '<input type="hidden" name="forum" value='.$forum_id.' />'; |
|
| 139 | 139 | echo '<table border="0" cellpadding="1" cellspacing="0" align="center" valign="top" width="95%"><tr>'; |
| 140 | - echo '<td class="bg2" align="center"><strong>' . _AM_NEWBB_MERGETHISFORUM . '</strong></td>'; |
|
| 140 | + echo '<td class="bg2" align="center"><strong>'._AM_NEWBB_MERGETHISFORUM.'</strong></td>'; |
|
| 141 | 141 | echo '</tr>'; |
| 142 | - echo '<tr><td class="bg1" align="center">' . _AM_NEWBB_MERGETO_FORUM . '</td></tr>'; |
|
| 143 | - echo '<tr><td class="bg1" align="center">' . $box . '</td></tr>'; |
|
| 144 | - echo '<tr><td align="center"><input type="submit" name="save" value=' . _GO . ' class="button" /></td></tr>'; |
|
| 142 | + echo '<tr><td class="bg1" align="center">'._AM_NEWBB_MERGETO_FORUM.'</td></tr>'; |
|
| 143 | + echo '<tr><td class="bg1" align="center">'.$box.'</td></tr>'; |
|
| 144 | + echo '<tr><td align="center"><input type="submit" name="save" value='._GO.' class="button" /></td></tr>'; |
|
| 145 | 145 | echo '</form></table>'; |
| 146 | 146 | echo '</td></tr></table>'; |
| 147 | 147 | } |
@@ -196,13 +196,13 @@ discard block |
||
| 196 | 196 | } |
| 197 | 197 | redirect_header('admin_forum_manager.php', 2, $message); |
| 198 | 198 | } else { |
| 199 | - redirect_header('admin_forum_manager.php?op=mod&forum=' . $forumObject->getVar('forum_id') . '', 2, _AM_NEWBB_FORUM_ERROR); |
|
| 199 | + redirect_header('admin_forum_manager.php?op=mod&forum='.$forumObject->getVar('forum_id').'', 2, _AM_NEWBB_FORUM_ERROR); |
|
| 200 | 200 | } |
| 201 | 201 | break; |
| 202 | 202 | |
| 203 | 203 | case 'mod': |
| 204 | 204 | $forumObject = $forumHandler->get($forum_id); |
| 205 | - require_once $GLOBALS['xoops']->path('modules/' . $xoopsModule->getVar('dirname') . '/include/form.forum.php'); |
|
| 205 | + require_once $GLOBALS['xoops']->path('modules/'.$xoopsModule->getVar('dirname').'/include/form.forum.php'); |
|
| 206 | 206 | break; |
| 207 | 207 | |
| 208 | 208 | case 'del': |
@@ -227,7 +227,7 @@ discard block |
||
| 227 | 227 | $forumObject = $forumHandler->create(); |
| 228 | 228 | $forumObject->setVar('parent_forum', $parent_forum); |
| 229 | 229 | $forumObject->setVar('cat_id', $cat_id); |
| 230 | - require_once $GLOBALS['xoops']->path('modules/' . $xoopsModule->getVar('dirname') . '/include/form.forum.php'); |
|
| 230 | + require_once $GLOBALS['xoops']->path('modules/'.$xoopsModule->getVar('dirname').'/include/form.forum.php'); |
|
| 231 | 231 | break; |
| 232 | 232 | |
| 233 | 233 | default: |
@@ -242,15 +242,15 @@ discard block |
||
| 242 | 242 | } |
| 243 | 243 | |
| 244 | 244 | $echo = $adminObject->displayNavigation(basename(__FILE__)); |
| 245 | - $echo .= "<table width='100%' border='0' cellspacing='1' class='outer'>" . "<tr><td class='odd'>"; |
|
| 245 | + $echo .= "<table width='100%' border='0' cellspacing='1' class='outer'>"."<tr><td class='odd'>"; |
|
| 246 | 246 | $echo .= "<table border='0' cellpadding='4' cellspacing='1' width='100%' class='outer'>"; |
| 247 | 247 | $echo .= "<tr align='center'>"; |
| 248 | - $echo .= "<th class='bg3' colspan='2'>" . _AM_NEWBB_NAME . '</th>'; |
|
| 249 | - $echo .= "<th class='bg3'>" . _AM_NEWBB_EDIT . '</th>'; |
|
| 250 | - $echo .= "<th class='bg3'>" . _AM_NEWBB_DELETE . '</th>'; |
|
| 251 | - $echo .= "<th class='bg3'>" . _AM_NEWBB_ADD . '</th>'; |
|
| 252 | - $echo .= "<th class='bg3'>" . _AM_NEWBB_MOVE . '</th>'; |
|
| 253 | - $echo .= "<th class='bg3'>" . _AM_NEWBB_MERGE . '</th>'; |
|
| 248 | + $echo .= "<th class='bg3' colspan='2'>"._AM_NEWBB_NAME.'</th>'; |
|
| 249 | + $echo .= "<th class='bg3'>"._AM_NEWBB_EDIT.'</th>'; |
|
| 250 | + $echo .= "<th class='bg3'>"._AM_NEWBB_DELETE.'</th>'; |
|
| 251 | + $echo .= "<th class='bg3'>"._AM_NEWBB_ADD.'</th>'; |
|
| 252 | + $echo .= "<th class='bg3'>"._AM_NEWBB_MOVE.'</th>'; |
|
| 253 | + $echo .= "<th class='bg3'>"._AM_NEWBB_MERGE.'</th>'; |
|
| 254 | 254 | $echo .= '</tr>'; |
| 255 | 255 | |
| 256 | 256 | // $categoryHandler = Newbb\Helper::getInstance()->getHandler('Category'); |
@@ -261,15 +261,15 @@ discard block |
||
| 261 | 261 | foreach (array_keys($categories) as $c) { |
| 262 | 262 | $category = $categories[$c]; |
| 263 | 263 | $cat_id = $c; |
| 264 | - $cat_link = '<a href="' . XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname', 'n') . '/index.php?viewcat=' . $cat_id . '">' . $category . '</a>'; |
|
| 265 | - $cat_edit_link = '<a href="admin_cat_manager.php?op=mod&cat_id=' . $cat_id . '">' . newbbDisplayImage('admin_edit', _EDIT) . '</a>'; |
|
| 266 | - $cat_del_link = '<a href="admin_cat_manager.php?op=del&cat_id=' . $cat_id . '">' . newbbDisplayImage('admin_delete', _DELETE) . '</a>'; |
|
| 267 | - $forum_add_link = '<a href="admin_forum_manager.php?op=addforum&cat_id=' . $cat_id . '">' . newbbDisplayImage('new_forum') . '</a>'; |
|
| 264 | + $cat_link = '<a href="'.XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname', 'n').'/index.php?viewcat='.$cat_id.'">'.$category.'</a>'; |
|
| 265 | + $cat_edit_link = '<a href="admin_cat_manager.php?op=mod&cat_id='.$cat_id.'">'.newbbDisplayImage('admin_edit', _EDIT).'</a>'; |
|
| 266 | + $cat_del_link = '<a href="admin_cat_manager.php?op=del&cat_id='.$cat_id.'">'.newbbDisplayImage('admin_delete', _DELETE).'</a>'; |
|
| 267 | + $forum_add_link = '<a href="admin_forum_manager.php?op=addforum&cat_id='.$cat_id.'">'.newbbDisplayImage('new_forum').'</a>'; |
|
| 268 | 268 | $echo .= "<tr class='even' align='left'>"; |
| 269 | - $echo .= "<td width='100%' colspan='2'><strong>" . $cat_link . '</strong></td>'; |
|
| 270 | - $echo .= "<td align='center'>" . $cat_edit_link . '</td>'; |
|
| 271 | - $echo .= "<td align='center'>" . $cat_del_link . '</td>'; |
|
| 272 | - $echo .= "<td align='center'>" . $forum_add_link . '</td>'; |
|
| 269 | + $echo .= "<td width='100%' colspan='2'><strong>".$cat_link.'</strong></td>'; |
|
| 270 | + $echo .= "<td align='center'>".$cat_edit_link.'</td>'; |
|
| 271 | + $echo .= "<td align='center'>".$cat_del_link.'</td>'; |
|
| 272 | + $echo .= "<td align='center'>".$forum_add_link.'</td>'; |
|
| 273 | 273 | $echo .= '<td></td>'; |
| 274 | 274 | $echo .= '<td></td>'; |
| 275 | 275 | $echo .= '</tr>'; |
@@ -279,21 +279,21 @@ discard block |
||
| 279 | 279 | $i = 0; |
| 280 | 280 | foreach (array_keys($forums[$c]) as $f) { |
| 281 | 281 | $forum = $forums[$c][$f]; |
| 282 | - $f_link = $forum['prefix'] . '<a href="' . XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname', 'n') . '/viewforum.php?forum=' . $f . '">' . $forum['forum_name'] . '</a>'; |
|
| 283 | - $f_edit_link = '<a href="admin_forum_manager.php?op=mod&forum=' . $f . '">' . newbbDisplayImage('admin_edit', _AM_NEWBB_EDIT) . '</a>'; |
|
| 284 | - $f_del_link = '<a href="admin_forum_manager.php?op=del&forum=' . $f . '">' . newbbDisplayImage('admin_delete', _AM_NEWBB_DELETE) . '</a>'; |
|
| 285 | - $sf_add_link = '<a href="admin_forum_manager.php?op=addforum&cat_id=' . $c . '&forum=' . $f . '">' . newbbDisplayImage('new_forum', _AM_NEWBB_CREATEFORUM) . '</a>'; |
|
| 286 | - $f_move_link = '<a href="admin_forum_manager.php?op=moveforum&forum=' . $f . '">' . newbbDisplayImage('admin_move', _AM_NEWBB_MOVE) . '</a>'; |
|
| 287 | - $f_merge_link = '<a href="admin_forum_manager.php?op=mergeforum&forum=' . $f . '">' . newbbDisplayImage('admin_merge', _AM_NEWBB_MERGE) . '</a>'; |
|
| 282 | + $f_link = $forum['prefix'].'<a href="'.XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname', 'n').'/viewforum.php?forum='.$f.'">'.$forum['forum_name'].'</a>'; |
|
| 283 | + $f_edit_link = '<a href="admin_forum_manager.php?op=mod&forum='.$f.'">'.newbbDisplayImage('admin_edit', _AM_NEWBB_EDIT).'</a>'; |
|
| 284 | + $f_del_link = '<a href="admin_forum_manager.php?op=del&forum='.$f.'">'.newbbDisplayImage('admin_delete', _AM_NEWBB_DELETE).'</a>'; |
|
| 285 | + $sf_add_link = '<a href="admin_forum_manager.php?op=addforum&cat_id='.$c.'&forum='.$f.'">'.newbbDisplayImage('new_forum', _AM_NEWBB_CREATEFORUM).'</a>'; |
|
| 286 | + $f_move_link = '<a href="admin_forum_manager.php?op=moveforum&forum='.$f.'">'.newbbDisplayImage('admin_move', _AM_NEWBB_MOVE).'</a>'; |
|
| 287 | + $f_merge_link = '<a href="admin_forum_manager.php?op=mergeforum&forum='.$f.'">'.newbbDisplayImage('admin_merge', _AM_NEWBB_MERGE).'</a>'; |
|
| 288 | 288 | |
| 289 | 289 | $class = (($i++) % 2) ? 'odd' : 'even'; |
| 290 | - $echo .= "<tr class='" . $class . "' align='left'><td></td>"; |
|
| 291 | - $echo .= '<td><strong>' . $f_link . '</strong></td>'; |
|
| 292 | - $echo .= "<td align='center'>" . $f_edit_link . '</td>'; |
|
| 293 | - $echo .= "<td align='center'>" . $f_del_link . '</td>'; |
|
| 294 | - $echo .= "<td align='center'>" . $sf_add_link . '</td>'; |
|
| 295 | - $echo .= "<td align='center'>" . $f_move_link . '</td>'; |
|
| 296 | - $echo .= "<td align='center'>" . $f_merge_link . '</td>'; |
|
| 290 | + $echo .= "<tr class='".$class."' align='left'><td></td>"; |
|
| 291 | + $echo .= '<td><strong>'.$f_link.'</strong></td>'; |
|
| 292 | + $echo .= "<td align='center'>".$f_edit_link.'</td>'; |
|
| 293 | + $echo .= "<td align='center'>".$f_del_link.'</td>'; |
|
| 294 | + $echo .= "<td align='center'>".$sf_add_link.'</td>'; |
|
| 295 | + $echo .= "<td align='center'>".$f_move_link.'</td>'; |
|
| 296 | + $echo .= "<td align='center'>".$f_merge_link.'</td>'; |
|
| 297 | 297 | $echo .= '</tr>'; |
| 298 | 298 | } |
| 299 | 299 | } |
@@ -303,14 +303,14 @@ discard block |
||
| 303 | 303 | echo '</table>'; |
| 304 | 304 | echo '</td></tr></table>'; |
| 305 | 305 | echo '<fieldset>'; |
| 306 | - echo '<legend> ' . _MI_NEWBB_ADMENU_FORUM . ' </legend>'; |
|
| 306 | + echo '<legend> '._MI_NEWBB_ADMENU_FORUM.' </legend>'; |
|
| 307 | 307 | echo _AM_NEWBB_HELP_FORUM_TAB; |
| 308 | - echo '<br>' . newbbDisplayImage('admin_edit', _EDIT) . ' - ' . _EDIT; |
|
| 309 | - echo '<br>' . newbbDisplayImage('admin_delete', _DELETE) . ' - ' . _DELETE; |
|
| 310 | - echo '<br>' . newbbDisplayImage('new_forum', _AM_NEWBB_CREATEFORUM) . ' - ' . _AM_NEWBB_CREATEFORUM; |
|
| 311 | - echo '<br>' . newbbDisplayImage('admin_move', _AM_NEWBB_MOVE) . ' - ' . _AM_NEWBB_MOVE; |
|
| 312 | - echo '<br>' . newbbDisplayImage('admin_merge', _AM_NEWBB_MERGE) . ' - ' . _AM_NEWBB_MERGE; |
|
| 308 | + echo '<br>'.newbbDisplayImage('admin_edit', _EDIT).' - '._EDIT; |
|
| 309 | + echo '<br>'.newbbDisplayImage('admin_delete', _DELETE).' - '._DELETE; |
|
| 310 | + echo '<br>'.newbbDisplayImage('new_forum', _AM_NEWBB_CREATEFORUM).' - '._AM_NEWBB_CREATEFORUM; |
|
| 311 | + echo '<br>'.newbbDisplayImage('admin_move', _AM_NEWBB_MOVE).' - '._AM_NEWBB_MOVE; |
|
| 312 | + echo '<br>'.newbbDisplayImage('admin_merge', _AM_NEWBB_MERGE).' - '._AM_NEWBB_MERGE; |
|
| 313 | 313 | echo '</fieldset>'; |
| 314 | 314 | break; |
| 315 | 315 | } |
| 316 | -require_once __DIR__ . '/admin_footer.php'; |
|
| 316 | +require_once __DIR__.'/admin_footer.php'; |
|
@@ -12,9 +12,9 @@ discard block |
||
| 12 | 12 | use Xmf\Request; |
| 13 | 13 | |
| 14 | 14 | // irmtfan - TODO - should be changed completly with Newbb new function newbbSynchronization |
| 15 | -require_once __DIR__ . '/admin_header.php'; |
|
| 15 | +require_once __DIR__.'/admin_header.php'; |
|
| 16 | 16 | xoops_cp_header(); |
| 17 | -require_once dirname(__DIR__) . '/include/functions.recon.php'; |
|
| 17 | +require_once dirname(__DIR__).'/include/functions.recon.php'; |
|
| 18 | 18 | $form = ''; |
| 19 | 19 | $form .= $adminObject->displayNavigation(basename(__FILE__)); |
| 20 | 20 | |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | case 'forum': |
| 27 | 27 | $result = newbbSynchronization('forum'); |
| 28 | 28 | if (!empty($result)) { |
| 29 | - redirect_header('admin_synchronization.php', 2, _AM_NEWBB_SYNC_TYPE_FORUM . '<br>' . _AM_NEWBB_DATABASEUPDATED); |
|
| 29 | + redirect_header('admin_synchronization.php', 2, _AM_NEWBB_SYNC_TYPE_FORUM.'<br>'._AM_NEWBB_DATABASEUPDATED); |
|
| 30 | 30 | } |
| 31 | 31 | break; |
| 32 | 32 | // irmtfan rewrite topic sync |
@@ -45,13 +45,13 @@ discard block |
||
| 45 | 45 | $topicHandler->synchronization($tObj); |
| 46 | 46 | } |
| 47 | 47 | $result = newbbSynchronization('topic'); |
| 48 | - redirect_header('admin_synchronization.php?type=topic&start=' . ($start + $limit) . "&limit={$limit}", 2, _AM_NEWBB_SYNCHING . " {$count}: {$start} - " . ($start + $limit)); |
|
| 48 | + redirect_header('admin_synchronization.php?type=topic&start='.($start + $limit)."&limit={$limit}", 2, _AM_NEWBB_SYNCHING." {$count}: {$start} - ".($start + $limit)); |
|
| 49 | 49 | break; |
| 50 | 50 | // irmtfan rewrite post sync |
| 51 | 51 | case 'post': |
| 52 | 52 | $result = newbbSynchronization('post'); |
| 53 | 53 | if (!empty($result)) { |
| 54 | - redirect_header('admin_synchronization.php', 2, _AM_NEWBB_SYNC_TYPE_POST . '<br>' . _AM_NEWBB_DATABASEUPDATED); |
|
| 54 | + redirect_header('admin_synchronization.php', 2, _AM_NEWBB_SYNC_TYPE_POST.'<br>'._AM_NEWBB_DATABASEUPDATED); |
|
| 55 | 55 | } |
| 56 | 56 | break; |
| 57 | 57 | // irmtfan - user is not in recon functions - only here |
@@ -62,26 +62,26 @@ discard block |
||
| 62 | 62 | if ($start >= ($count = $userHandler->getCount())) { |
| 63 | 63 | break; |
| 64 | 64 | } |
| 65 | - $sql = ' SELECT uid' . ' FROM ' . $GLOBALS['xoopsDB']->prefix('users'); |
|
| 65 | + $sql = ' SELECT uid'.' FROM '.$GLOBALS['xoopsDB']->prefix('users'); |
|
| 66 | 66 | $result = $GLOBALS['xoopsDB']->query($sql, $limit, $start); |
| 67 | 67 | while (false !== (list($uid) = $GLOBALS['xoopsDB']->fetchRow($result))) { |
| 68 | 68 | // irmtfan approved=1 AND |
| 69 | - $sql = ' SELECT count(*)' . ' FROM ' . $GLOBALS['xoopsDB']->prefix('newbb_topics') . " WHERE topic_poster = {$uid}"; |
|
| 69 | + $sql = ' SELECT count(*)'.' FROM '.$GLOBALS['xoopsDB']->prefix('newbb_topics')." WHERE topic_poster = {$uid}"; |
|
| 70 | 70 | $ret = $GLOBALS['xoopsDB']->query($sql); |
| 71 | 71 | list($topics) = $GLOBALS['xoopsDB']->fetchRow($ret); |
| 72 | 72 | // irmtfan approved=1 AND |
| 73 | - $sql = ' SELECT count(*)' . ' FROM ' . $GLOBALS['xoopsDB']->prefix('newbb_topics') . " WHERE topic_digest > 0 AND topic_poster = {$uid}"; |
|
| 73 | + $sql = ' SELECT count(*)'.' FROM '.$GLOBALS['xoopsDB']->prefix('newbb_topics')." WHERE topic_digest > 0 AND topic_poster = {$uid}"; |
|
| 74 | 74 | $ret = $GLOBALS['xoopsDB']->query($sql); |
| 75 | 75 | list($digests) = $GLOBALS['xoopsDB']->fetchRow($ret); |
| 76 | 76 | // irmtfan approved=1 AND |
| 77 | - $sql = ' SELECT count(*), MAX(post_time)' . ' FROM ' . $GLOBALS['xoopsDB']->prefix('newbb_posts') . " WHERE uid = {$uid}"; |
|
| 77 | + $sql = ' SELECT count(*), MAX(post_time)'.' FROM '.$GLOBALS['xoopsDB']->prefix('newbb_posts')." WHERE uid = {$uid}"; |
|
| 78 | 78 | $ret = $GLOBALS['xoopsDB']->query($sql); |
| 79 | 79 | list($posts, $lastpost) = $GLOBALS['xoopsDB']->fetchRow($ret); |
| 80 | 80 | |
| 81 | - $GLOBALS['xoopsDB']->queryF(' REPLACE INTO ' . $GLOBALS['xoopsDB']->prefix('newbb_user_stats') . " SET uid = '{$uid}', user_topics = '{$topics}', user_posts = '{$posts}', user_digests = '{$digests}', user_lastpost = '{$lastpost}'"); |
|
| 81 | + $GLOBALS['xoopsDB']->queryF(' REPLACE INTO '.$GLOBALS['xoopsDB']->prefix('newbb_user_stats')." SET uid = '{$uid}', user_topics = '{$topics}', user_posts = '{$posts}', user_digests = '{$digests}', user_lastpost = '{$lastpost}'"); |
|
| 82 | 82 | } |
| 83 | 83 | |
| 84 | - redirect_header('admin_synchronization.php?type=user&start=' . ($start + $limit) . "&limit={$limit}", 2, _AM_NEWBB_SYNCHING . " {$count}: {$start} - " . ($start + $limit)); |
|
| 84 | + redirect_header('admin_synchronization.php?type=user&start='.($start + $limit)."&limit={$limit}", 2, _AM_NEWBB_SYNCHING." {$count}: {$start} - ".($start + $limit)); |
|
| 85 | 85 | break; |
| 86 | 86 | // irmtfan rewrite stats reset |
| 87 | 87 | case 'stats': |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | case 'read': |
| 92 | 92 | $result = newbbSynchronization(['readtopic', 'readforum']); |
| 93 | 93 | if (!empty($result)) { |
| 94 | - redirect_header('admin_synchronization.php', 2, _AM_NEWBB_SYNC_TYPE_READ . '<br>' . _AM_NEWBB_DATABASEUPDATED); |
|
| 94 | + redirect_header('admin_synchronization.php', 2, _AM_NEWBB_SYNC_TYPE_READ.'<br>'._AM_NEWBB_DATABASEUPDATED); |
|
| 95 | 95 | } |
| 96 | 96 | exit(); |
| 97 | 97 | // END irmtfan add read sync |
@@ -105,70 +105,70 @@ discard block |
||
| 105 | 105 | |
| 106 | 106 | $form .= '<form action="admin_synchronization.php" method="get">'; |
| 107 | 107 | $form .= '<div style="padding: 10px 2px;">'; |
| 108 | -$form .= '<h2>' . _AM_NEWBB_SYNC_TYPE_FORUM . '</h2>'; |
|
| 108 | +$form .= '<h2>'._AM_NEWBB_SYNC_TYPE_FORUM.'</h2>'; |
|
| 109 | 109 | $form .= '<input type="hidden" name="type" value="forum">'; |
| 110 | 110 | // $form .= _AM_NEWBB_SYNC_ITEMS.'<input type="text" name="limit" value="20">'; // irmtfan remove |
| 111 | -$form .= '<input type="submit" name="submit" value=' . _SUBMIT . ' />'; |
|
| 111 | +$form .= '<input type="submit" name="submit" value='._SUBMIT.' />'; |
|
| 112 | 112 | $form .= '</div>'; |
| 113 | 113 | $form .= '</form>'; |
| 114 | 114 | |
| 115 | 115 | $form .= '<form action="admin_synchronization.php" method="get">'; |
| 116 | 116 | $form .= '<div style="padding: 10px 2px;">'; |
| 117 | -$form .= '<h2>' . _AM_NEWBB_SYNC_TYPE_TOPIC . '</h2>'; |
|
| 117 | +$form .= '<h2>'._AM_NEWBB_SYNC_TYPE_TOPIC.'</h2>'; |
|
| 118 | 118 | $form .= '<input type="hidden" name="type" value="topic">'; |
| 119 | -$form .= _AM_NEWBB_SYNC_ITEMS . '<input type="text" name="limit" value="1000">'; |
|
| 120 | -$form .= '<input type="submit" name="submit" value=' . _SUBMIT . ' />'; |
|
| 119 | +$form .= _AM_NEWBB_SYNC_ITEMS.'<input type="text" name="limit" value="1000">'; |
|
| 120 | +$form .= '<input type="submit" name="submit" value='._SUBMIT.' />'; |
|
| 121 | 121 | $form .= '</div>'; |
| 122 | 122 | $form .= '</form>'; |
| 123 | 123 | |
| 124 | 124 | $form .= '<form action="admin_synchronization.php" method="get">'; |
| 125 | 125 | $form .= '<div style="padding: 10px 2px;">'; |
| 126 | -$form .= '<h2>' . _AM_NEWBB_SYNC_TYPE_POST . '</h2>'; |
|
| 126 | +$form .= '<h2>'._AM_NEWBB_SYNC_TYPE_POST.'</h2>'; |
|
| 127 | 127 | $form .= '<input type="hidden" name="type" value="post">'; |
| 128 | 128 | // $form .= _AM_NEWBB_SYNC_ITEMS.'<input type="text" name="limit" value="1000">'; // irmtfan remove |
| 129 | -$form .= '<input type="submit" name="submit" value=' . _SUBMIT . ' />'; |
|
| 129 | +$form .= '<input type="submit" name="submit" value='._SUBMIT.' />'; |
|
| 130 | 130 | $form .= '</div>'; |
| 131 | 131 | $form .= '</form>'; |
| 132 | 132 | |
| 133 | 133 | $form .= '<form action="admin_synchronization.php" method="get">'; |
| 134 | 134 | $form .= '<div style="padding: 10px 2px;">'; |
| 135 | -$form .= '<h2>' . _AM_NEWBB_SYNC_TYPE_USER . '</h2>'; |
|
| 135 | +$form .= '<h2>'._AM_NEWBB_SYNC_TYPE_USER.'</h2>'; |
|
| 136 | 136 | $form .= '<input type="hidden" name="type" value="user">'; |
| 137 | -$form .= _AM_NEWBB_SYNC_ITEMS . '<input type="text" name="limit" value="1000">'; |
|
| 138 | -$form .= '<input type="submit" name="submit" value=' . _SUBMIT . ' />'; |
|
| 137 | +$form .= _AM_NEWBB_SYNC_ITEMS.'<input type="text" name="limit" value="1000">'; |
|
| 138 | +$form .= '<input type="submit" name="submit" value='._SUBMIT.' />'; |
|
| 139 | 139 | $form .= '</div>'; |
| 140 | 140 | $form .= '</form>'; |
| 141 | 141 | // START irmtfan add read sync |
| 142 | 142 | $form .= '<form action="admin_synchronization.php" method="get">'; |
| 143 | 143 | $form .= '<div style="padding: 10px 2px;">'; |
| 144 | -$form .= '<h2>' . _AM_NEWBB_SYNC_TYPE_READ . '</h2>'; |
|
| 144 | +$form .= '<h2>'._AM_NEWBB_SYNC_TYPE_READ.'</h2>'; |
|
| 145 | 145 | $form .= '<input type="hidden" name="type" value="read">'; |
| 146 | -$form .= '<input type="submit" name="submit" value=' . _SUBMIT . ' />'; |
|
| 146 | +$form .= '<input type="submit" name="submit" value='._SUBMIT.' />'; |
|
| 147 | 147 | $form .= '</div>'; |
| 148 | 148 | $form .= '</form>'; |
| 149 | 149 | // END irmtfan add read sync |
| 150 | 150 | |
| 151 | 151 | $form .= '<form action="admin_synchronization.php" method="get">'; |
| 152 | 152 | $form .= '<div style="padding: 10px 2px;">'; |
| 153 | -$form .= '<h2>' . _AM_NEWBB_SYNC_TYPE_STATS . '</h2>'; |
|
| 153 | +$form .= '<h2>'._AM_NEWBB_SYNC_TYPE_STATS.'</h2>'; |
|
| 154 | 154 | $form .= '<input type="hidden" name="type" value="stats">'; |
| 155 | 155 | //$form .= _AM_NEWBB_SYNC_ITEMS.'<input type="text" name="limit" value="1000">'; |
| 156 | -$form .= '<input type="submit" name="submit" value=' . _SUBMIT . ' />'; |
|
| 156 | +$form .= '<input type="submit" name="submit" value='._SUBMIT.' />'; |
|
| 157 | 157 | $form .= '</div>'; |
| 158 | 158 | $form .= '</form>'; |
| 159 | 159 | |
| 160 | 160 | $form .= '<form action="admin_synchronization.php" method="get">'; |
| 161 | 161 | $form .= '<div style="padding: 10px 2px;">'; |
| 162 | -$form .= '<h2>' . _AM_NEWBB_SYNC_TYPE_MISC . '</h2>'; |
|
| 162 | +$form .= '<h2>'._AM_NEWBB_SYNC_TYPE_MISC.'</h2>'; |
|
| 163 | 163 | $form .= '<input type="hidden" name="type" value="misc">'; |
| 164 | -$form .= '<input type="submit" name="submit" value=' . _SUBMIT . ' />'; |
|
| 164 | +$form .= '<input type="submit" name="submit" value='._SUBMIT.' />'; |
|
| 165 | 165 | $form .= '</div>'; |
| 166 | 166 | $form .= '</form>'; |
| 167 | -echo "<table width='100%' border='0' cellspacing='1' class='outer'>" . "<tr><td class='odd'>"; |
|
| 167 | +echo "<table width='100%' border='0' cellspacing='1' class='outer'>"."<tr><td class='odd'>"; |
|
| 168 | 168 | echo $form; |
| 169 | 169 | echo '</td></tr></table>'; |
| 170 | 170 | echo '<fieldset>'; |
| 171 | -echo '<legend> ' . _MI_NEWBB_ADMENU_SYNC . ' </legend>'; |
|
| 171 | +echo '<legend> '._MI_NEWBB_ADMENU_SYNC.' </legend>'; |
|
| 172 | 172 | echo _AM_NEWBB_HELP_SYNC_TAB; |
| 173 | 173 | echo '</fieldset>'; |
| 174 | -require_once __DIR__ . '/admin_footer.php'; |
|
| 174 | +require_once __DIR__.'/admin_footer.php'; |
|
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | |
| 28 | 28 | use Xmf\Request; |
| 29 | 29 | |
| 30 | -require_once __DIR__ . '/admin_header.php'; |
|
| 30 | +require_once __DIR__.'/admin_header.php'; |
|
| 31 | 31 | require_once $GLOBALS['xoops']->path('class/xoopsformloader.php'); |
| 32 | 32 | |
| 33 | 33 | xoops_cp_header(); |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | //if (!$newXoopsModuleGui) loadModuleAdminMenu(5, _AM_NEWBB_PRUNE_TITLE); |
| 37 | 37 | // else $adminObject->displayNavigation(basename(__FILE__)); |
| 38 | 38 | |
| 39 | -echo "<table width='100%' border='0' cellspacing='1' class='outer'>" . "<tr><td class='odd'>"; |
|
| 39 | +echo "<table width='100%' border='0' cellspacing='1' class='outer'>"."<tr><td class='odd'>"; |
|
| 40 | 40 | |
| 41 | 41 | if (Request::hasVar('submit', 'POST')) { |
| 42 | 42 | $post_list = null; |
@@ -63,8 +63,8 @@ discard block |
||
| 63 | 63 | $hot = Request::getInt('hot', 0, 'POST'); |
| 64 | 64 | $store = Request::getInt('store', null, 'POST'); |
| 65 | 65 | |
| 66 | - $sql = 'SELECT t.topic_id FROM ' . $GLOBALS['xoopsDB']->prefix('newbb_topics') . ' t, ' . $GLOBALS['xoopsDB']->prefix('newbb_posts') . ' p |
|
| 67 | - WHERE t.forum_id IN (' . $selected_forums . ') |
|
| 66 | + $sql = 'SELECT t.topic_id FROM '.$GLOBALS['xoopsDB']->prefix('newbb_topics').' t, '.$GLOBALS['xoopsDB']->prefix('newbb_posts').' p |
|
| 67 | + WHERE t.forum_id IN (' . $selected_forums.') |
|
| 68 | 68 | AND p.post_id =t.topic_last_post_id '; |
| 69 | 69 | |
| 70 | 70 | if ($sticky) { |
@@ -77,10 +77,10 @@ discard block |
||
| 77 | 77 | $sql .= ' AND t.topic_status <> 1 '; |
| 78 | 78 | } |
| 79 | 79 | if (0 !== $hot) { |
| 80 | - $sql .= ' AND t.topic_replies < ' . $hot . ' '; |
|
| 80 | + $sql .= ' AND t.topic_replies < '.$hot.' '; |
|
| 81 | 81 | } |
| 82 | 82 | |
| 83 | - $sql .= ' AND p.post_time<= ' . $prune_ddays . ' '; |
|
| 83 | + $sql .= ' AND p.post_time<= '.$prune_ddays.' '; |
|
| 84 | 84 | // Ok now we have the sql query completed, go for topic_id's and posts_id's |
| 85 | 85 | $topics = []; |
| 86 | 86 | if (!$result = $GLOBALS['xoopsDB']->query($sql)) { |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | $post_list = ''; |
| 96 | 96 | |
| 97 | 97 | if ('' !== $topic_list) { |
| 98 | - $sql = 'SELECT post_id FROM ' . $GLOBALS['xoopsDB']->prefix('newbb_posts') . ' WHERE topic_id IN (' . $topic_list . ')'; |
|
| 98 | + $sql = 'SELECT post_id FROM '.$GLOBALS['xoopsDB']->prefix('newbb_posts').' WHERE topic_id IN ('.$topic_list.')'; |
|
| 99 | 99 | |
| 100 | 100 | $posts = []; |
| 101 | 101 | if (!$result = $GLOBALS['xoopsDB']->query($sql)) { |
@@ -112,35 +112,35 @@ discard block |
||
| 112 | 112 | if ('' !== $post_list) { |
| 113 | 113 | // COPY POSTS TO OTHER FORUM |
| 114 | 114 | if (null !== $store) { |
| 115 | - $sql = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('newbb_posts') . " SET forum_id=$store WHERE topic_id IN ($topic_list)"; |
|
| 115 | + $sql = 'UPDATE '.$GLOBALS['xoopsDB']->prefix('newbb_posts')." SET forum_id=$store WHERE topic_id IN ($topic_list)"; |
|
| 116 | 116 | if (!$result = $GLOBALS['xoopsDB']->query($sql)) { |
| 117 | 117 | return _MD_NEWBB_ERROR; |
| 118 | 118 | } |
| 119 | 119 | |
| 120 | - $sql = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('newbb_topics') . " SET forum_id=$store WHERE topic_id IN ($topic_list)"; |
|
| 120 | + $sql = 'UPDATE '.$GLOBALS['xoopsDB']->prefix('newbb_topics')." SET forum_id=$store WHERE topic_id IN ($topic_list)"; |
|
| 121 | 121 | if (!$result = $GLOBALS['xoopsDB']->query($sql)) { |
| 122 | 122 | return _MD_NEWBB_ERROR; |
| 123 | 123 | } |
| 124 | 124 | } else { |
| 125 | 125 | // ARCHIVING POSTS |
| 126 | 126 | if (1 == $archive) { |
| 127 | - $result = $GLOBALS['xoopsDB']->query('SELECT p.topic_id, p.post_id, t.post_text FROM ' . $GLOBALS['xoopsDB']->prefix('newbb_posts') . ' p, ' . $GLOBALS['xoopsDB']->prefix('newbb_posts_text') . " t WHERE p.post_id IN ($post_list) AND p.post_id=t.post_id"); |
|
| 127 | + $result = $GLOBALS['xoopsDB']->query('SELECT p.topic_id, p.post_id, t.post_text FROM '.$GLOBALS['xoopsDB']->prefix('newbb_posts').' p, '.$GLOBALS['xoopsDB']->prefix('newbb_posts_text')." t WHERE p.post_id IN ($post_list) AND p.post_id=t.post_id"); |
|
| 128 | 128 | while (false !== (list($topic_id, $post_id, $post_text) = $GLOBALS['xoopsDB']->fetchRow($result))) { |
| 129 | - $sql = $GLOBALS['xoopsDB']->query('INSERT INTO ' . $GLOBALS['xoopsDB']->prefix('newbb_archive') . " (topic_id, post_id, post_text) VALUES ($topic_id, $post_id, $post_text)"); |
|
| 129 | + $sql = $GLOBALS['xoopsDB']->query('INSERT INTO '.$GLOBALS['xoopsDB']->prefix('newbb_archive')." (topic_id, post_id, post_text) VALUES ($topic_id, $post_id, $post_text)"); |
|
| 130 | 130 | } |
| 131 | 131 | } |
| 132 | 132 | // DELETE POSTS |
| 133 | - $sql = 'DELETE FROM ' . $GLOBALS['xoopsDB']->prefix('newbb_posts') . " WHERE topic_id IN ($topic_list)"; |
|
| 133 | + $sql = 'DELETE FROM '.$GLOBALS['xoopsDB']->prefix('newbb_posts')." WHERE topic_id IN ($topic_list)"; |
|
| 134 | 134 | if (!$result = $GLOBALS['xoopsDB']->query($sql)) { |
| 135 | 135 | return _MD_NEWBB_ERROR; |
| 136 | 136 | } |
| 137 | 137 | // DELETE TOPICS |
| 138 | - $sql = 'DELETE FROM ' . $GLOBALS['xoopsDB']->prefix('newbb_topics') . " WHERE topic_id IN ($topic_list)"; |
|
| 138 | + $sql = 'DELETE FROM '.$GLOBALS['xoopsDB']->prefix('newbb_topics')." WHERE topic_id IN ($topic_list)"; |
|
| 139 | 139 | if (!$result = $GLOBALS['xoopsDB']->query($sql)) { |
| 140 | 140 | return _MD_NEWBB_ERROR; |
| 141 | 141 | } |
| 142 | 142 | // DELETE POSTS_TEXT |
| 143 | - $sql = 'DELETE FROM ' . $GLOBALS['xoopsDB']->prefix('newbb_posts_text') . " WHERE post_id IN ($post_list)"; |
|
| 143 | + $sql = 'DELETE FROM '.$GLOBALS['xoopsDB']->prefix('newbb_posts_text')." WHERE post_id IN ($post_list)"; |
|
| 144 | 144 | if (!$result = $GLOBALS['xoopsDB']->query($sql)) { |
| 145 | 145 | return _MD_NEWBB_ERROR; |
| 146 | 146 | } |
@@ -179,15 +179,15 @@ discard block |
||
| 179 | 179 | ]); |
| 180 | 180 | $sform->addElement($days); |
| 181 | 181 | // START irmtfan remove hardcode db access |
| 182 | - require_once $GLOBALS['xoops']->path('modules/' . $xoopsModule->getVar('dirname') . '/footer.php'); // to include js files |
|
| 183 | - require_once dirname(__DIR__) . '/include/functions.forum.php'; |
|
| 184 | - $forumSelMulti = "<select name=\"forums[]\" multiple=\"multiple\" onfocus = \"validate('forums[]','select', false,true)\">";// disable all categories |
|
| 182 | + require_once $GLOBALS['xoops']->path('modules/'.$xoopsModule->getVar('dirname').'/footer.php'); // to include js files |
|
| 183 | + require_once dirname(__DIR__).'/include/functions.forum.php'; |
|
| 184 | + $forumSelMulti = "<select name=\"forums[]\" multiple=\"multiple\" onfocus = \"validate('forums[]','select', false,true)\">"; // disable all categories |
|
| 185 | 185 | $forumSelSingle = "<select name=\"store\" onfocus = \"validate('store','select', false,true)\">"; // disable all categories |
| 186 | - $forumSelBox = '<option value = 0 >-- ' . _AM_NEWBB_PERM_FORUMS . ' --</option>'; |
|
| 186 | + $forumSelBox = '<option value = 0 >-- '._AM_NEWBB_PERM_FORUMS.' --</option>'; |
|
| 187 | 187 | $forumSelBox .= newbbForumSelectBox(null, 'access', false); //$accessForums = nothing, $permission = "access", $delimitorCategory = false |
| 188 | 188 | $forumSelBox .= '</select>'; |
| 189 | - $forumEle = new \XoopsFormLabel(_AM_NEWBB_PRUNE_FORUMS, $forumSelMulti . $forumSelBox); |
|
| 190 | - $storeEle = new \XoopsFormLabel(_AM_NEWBB_PRUNE_STORE, $forumSelSingle . $forumSelBox); |
|
| 189 | + $forumEle = new \XoopsFormLabel(_AM_NEWBB_PRUNE_FORUMS, $forumSelMulti.$forumSelBox); |
|
| 190 | + $storeEle = new \XoopsFormLabel(_AM_NEWBB_PRUNE_STORE, $forumSelSingle.$forumSelBox); |
|
| 191 | 191 | /* irmtfan remove hardcode |
| 192 | 192 | $checkbox = new \XoopsFormCheckBox(_AM_NEWBB_PRUNE_FORUMS, 'forums'); |
| 193 | 193 | $radiobox = new \XoopsFormRadio(_AM_NEWBB_PRUNE_STORE, 'store'); |
@@ -256,7 +256,7 @@ discard block |
||
| 256 | 256 | |
| 257 | 257 | echo '</td></tr></table>'; |
| 258 | 258 | echo '<fieldset>'; |
| 259 | -echo '<legend> ' . _MI_NEWBB_ADMENU_PRUNE . ' </legend>'; |
|
| 259 | +echo '<legend> '._MI_NEWBB_ADMENU_PRUNE.' </legend>'; |
|
| 260 | 260 | echo _AM_NEWBB_HELP_PRUNE_TAB; |
| 261 | 261 | echo '</fieldset>'; |
| 262 | -require_once __DIR__ . '/admin_footer.php'; |
|
| 262 | +require_once __DIR__.'/admin_footer.php'; |
|