@@ -19,7 +19,7 @@ |
||
| 19 | 19 | |
| 20 | 20 | global $pathIcon32; |
| 21 | 21 | if (!class_exists('\Xoops', false)) { |
| 22 | - echo "<div class='adminfooter'>\n" . " <div style='text-align: center;'>\n" . " <a href='https://xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n" . " </div>\n" . ' ' . _AM_MODULEADMIN_ADMIN_FOOTER . "\n" . "</div>\n"; |
|
| 22 | + echo "<div class='adminfooter'>\n"." <div style='text-align: center;'>\n"." <a href='https://xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n"." </div>\n".' '._AM_MODULEADMIN_ADMIN_FOOTER."\n"."</div>\n"; |
|
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | xoops_cp_footer(); |
@@ -8,5 +8,5 @@ |
||
| 8 | 8 | * @since 4.00 |
| 9 | 9 | * @package module::newbb |
| 10 | 10 | */ |
| 11 | -include __DIR__ . '/header.php'; |
|
| 11 | +include __DIR__.'/header.php'; |
|
| 12 | 12 | include $GLOBALS['xoops']->path('modules/tag/list.tag.php'); |
@@ -28,5 +28,5 @@ |
||
| 28 | 28 | // URL: http://www.myweb.ne.jp/, https://xoops.org/, http://jp.xoops.org/ // |
| 29 | 29 | // Project: XOOPS Project // |
| 30 | 30 | // ------------------------------------------------------------------------- // |
| 31 | -include dirname(dirname(__DIR__)) . '/mainfile.php'; |
|
| 31 | +include dirname(dirname(__DIR__)).'/mainfile.php'; |
|
| 32 | 32 | include $GLOBALS['xoops']->path('include/notification_update.php'); |
@@ -34,22 +34,22 @@ discard block |
||
| 34 | 34 | // Project: Article Project // |
| 35 | 35 | // ------------------------------------------------------------------------ // |
| 36 | 36 | |
| 37 | -require_once __DIR__ . '/header.php'; |
|
| 37 | +require_once __DIR__.'/header.php'; |
|
| 38 | 38 | xoops_loadLanguage('search'); |
| 39 | 39 | /** @var \XoopsConfigHandler $configHandler */ |
| 40 | 40 | $configHandler = xoops_getHandler('config'); |
| 41 | 41 | $xoopsConfigSearch = $configHandler->getConfigsByCat(XOOPS_CONF_SEARCH); |
| 42 | 42 | if (1 !== $xoopsConfigSearch['enable_search']) { |
| 43 | - redirect_header(XOOPS_URL . '/modules/newbb/index.php', 2, _MD_NEWBB_SEARCHDISABLED); |
|
| 43 | + redirect_header(XOOPS_URL.'/modules/newbb/index.php', 2, _MD_NEWBB_SEARCHDISABLED); |
|
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | $GLOBALS['xoopsConfig']['module_cache'][$xoopsModule->getVar('mid')] = 0; |
| 47 | 47 | $xoopsOption['template_main'] = 'newbb_search.tpl'; |
| 48 | 48 | require_once $GLOBALS['xoops']->path('header.php'); |
| 49 | 49 | |
| 50 | -require_once __DIR__ . '/include/functions.render.php'; |
|
| 51 | -require_once __DIR__ . '/include/functions.forum.php'; |
|
| 52 | -require_once __DIR__ . '/include/functions.time.php'; |
|
| 50 | +require_once __DIR__.'/include/functions.render.php'; |
|
| 51 | +require_once __DIR__.'/include/functions.forum.php'; |
|
| 52 | +require_once __DIR__.'/include/functions.time.php'; |
|
| 53 | 53 | |
| 54 | 54 | require_once $GLOBALS['xoops']->path('modules/newbb/include/search.inc.php'); |
| 55 | 55 | $limit = $GLOBALS['xoopsModuleConfig']['topics_per_page']; |
@@ -118,8 +118,8 @@ discard block |
||
| 118 | 118 | if (!empty($search_username)) { |
| 119 | 119 | $uname_required = true; |
| 120 | 120 | $search_username = $GLOBALS['xoopsDB']->escape($search_username); |
| 121 | - if (!$result = $GLOBALS['xoopsDB']->query('SELECT uid FROM ' . $GLOBALS['xoopsDB']->prefix('users') . " WHERE uname LIKE '%$search_username%'")) { |
|
| 122 | - redirect_header(XOOPS_URL . '/search.php', 1, _MD_NEWBB_ERROROCCURED); |
|
| 121 | + if (!$result = $GLOBALS['xoopsDB']->query('SELECT uid FROM '.$GLOBALS['xoopsDB']->prefix('users')." WHERE uname LIKE '%$search_username%'")) { |
|
| 122 | + redirect_header(XOOPS_URL.'/search.php', 1, _MD_NEWBB_ERROROCCURED); |
|
| 123 | 123 | } |
| 124 | 124 | $uid = []; |
| 125 | 125 | while (false !== ($row = $GLOBALS['xoopsDB']->fetchArray($result))) { |
@@ -144,12 +144,12 @@ discard block |
||
| 144 | 144 | } |
| 145 | 145 | } |
| 146 | 146 | if (!$uname_required && 0 === count($queries)) { |
| 147 | - redirect_header(XOOPS_URL . '/search.php', 2, sprintf(_SR_KEYTOOSHORT, $xoopsConfigSearch['keyword_min'])); |
|
| 147 | + redirect_header(XOOPS_URL.'/search.php', 2, sprintf(_SR_KEYTOOSHORT, $xoopsConfigSearch['keyword_min'])); |
|
| 148 | 148 | } |
| 149 | 149 | } else { |
| 150 | 150 | //$query = trim($query); |
| 151 | 151 | if (!$uname_required && (strlen($query) < $xoopsConfigSearch['keyword_min'])) { |
| 152 | - redirect_header(XOOPS_URL . '/search.php', 2, sprintf(_SR_KEYTOOSHORT, $xoopsConfigSearch['keyword_min'])); |
|
| 152 | + redirect_header(XOOPS_URL.'/search.php', 2, sprintf(_SR_KEYTOOSHORT, $xoopsConfigSearch['keyword_min'])); |
|
| 153 | 153 | } |
| 154 | 154 | $queries = [$query]; |
| 155 | 155 | } |
@@ -212,14 +212,14 @@ discard block |
||
| 212 | 212 | if (count($next_search) > 0) { |
| 213 | 213 | $items = []; |
| 214 | 214 | foreach ($next_search as $para => $val) { |
| 215 | - $items[] = "{$para}=" . urlencode($val); |
|
| 215 | + $items[] = "{$para}=".urlencode($val); |
|
| 216 | 216 | } |
| 217 | 217 | if (count($items) > 0) { |
| 218 | 218 | $paras = implode('&', $items); |
| 219 | 219 | } |
| 220 | 220 | unset($next_search, $items); |
| 221 | 221 | } |
| 222 | - $search_url = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/search.php?' . $paras; |
|
| 222 | + $search_url = XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/search.php?'.$paras; |
|
| 223 | 223 | // irmtfan remove to have just one query and appropriate next and prev links |
| 224 | 224 | //$next_results = newbb_search($queries, $andor, 1, $start + $limit, $uid, $forum, $sortby, $searchin, $subquery); |
| 225 | 225 | //$next_count = count($next_results); |
@@ -231,15 +231,15 @@ discard block |
||
| 231 | 231 | if ($num_results == $limit) { |
| 232 | 232 | $next = $start + $limit; |
| 233 | 233 | $queries = implode(',', $queries); |
| 234 | - $search_url_next = htmlspecialchars($search_url . "&direction=next&start={$next}"); |
|
| 235 | - $search_next = '<a href="' . $search_url_next . '">' . _SR_NEXT . '</a>'; |
|
| 234 | + $search_url_next = htmlspecialchars($search_url."&direction=next&start={$next}"); |
|
| 235 | + $search_next = '<a href="'.$search_url_next.'">'._SR_NEXT.'</a>'; |
|
| 236 | 236 | $xoopsTpl->assign('search_next', $search_next); |
| 237 | 237 | $xoopsTpl->assign('search_next_url', $search_url_next); |
| 238 | 238 | } |
| 239 | 239 | if ($start > 0) { |
| 240 | 240 | $prev = $start - $limit; |
| 241 | - $search_url_prev = htmlspecialchars($search_url . "&direction=previous&start={$prev}"); |
|
| 242 | - $search_prev = '<a href="' . $search_url_prev . '">' . _SR_PREVIOUS . '</a>'; |
|
| 241 | + $search_url_prev = htmlspecialchars($search_url."&direction=previous&start={$prev}"); |
|
| 242 | + $search_prev = '<a href="'.$search_url_prev.'">'._SR_PREVIOUS.'</a>'; |
|
| 243 | 243 | $xoopsTpl->assign('search_prev', $search_prev); |
| 244 | 244 | $xoopsTpl->assign('search_prev_url', $search_url_prev); |
| 245 | 245 | } |
@@ -250,18 +250,18 @@ discard block |
||
| 250 | 250 | redirect_header($search_url_redirect, 1, constant(strtoupper("_SR_{$direction}"))); |
| 251 | 251 | } |
| 252 | 252 | } |
| 253 | - $search_info = _SR_KEYWORDS . ': ' . $search_info_keywords; |
|
| 253 | + $search_info = _SR_KEYWORDS.': '.$search_info_keywords; |
|
| 254 | 254 | if ($uname_required) { |
| 255 | 255 | if ($search_info) { |
| 256 | 256 | $search_info .= '<br>'; |
| 257 | 257 | } |
| 258 | - $search_info .= _MD_NEWBB_USERNAME . ': ' . $myts->htmlSpecialChars($search_username); |
|
| 258 | + $search_info .= _MD_NEWBB_USERNAME.': '.$myts->htmlSpecialChars($search_username); |
|
| 259 | 259 | } |
| 260 | 260 | // add num_results |
| 261 | - $search_info .= '<br>' . sprintf(_SR_SHOWING, $start + 1, $start + $num_results); |
|
| 261 | + $search_info .= '<br>'.sprintf(_SR_SHOWING, $start + 1, $start + $num_results); |
|
| 262 | 262 | // if any result skip show the counter |
| 263 | 263 | if (!empty($skipresults)) { |
| 264 | - $search_info .= ' - ' . sprintf(_SR_FOUND, $num_results - $skipresults); |
|
| 264 | + $search_info .= ' - '.sprintf(_SR_FOUND, $num_results - $skipresults); |
|
| 265 | 265 | } |
| 266 | 266 | $xoopsTpl->assign('search_info', $search_info); |
| 267 | 267 | } |
@@ -275,18 +275,18 @@ discard block |
||
| 275 | 275 | if ('OR' === $andor) { |
| 276 | 276 | $andor_select .= ' selected="selected"'; |
| 277 | 277 | } |
| 278 | -$andor_select .= '>' . _SR_ANY . '</option>'; |
|
| 278 | +$andor_select .= '>'._SR_ANY.'</option>'; |
|
| 279 | 279 | $andor_select .= '<option value="AND"'; |
| 280 | 280 | if ('AND' === $andor || empty($andor)) { |
| 281 | 281 | $andor_select .= ' selected="selected"'; |
| 282 | 282 | } |
| 283 | -$andor_select .= '>' . _SR_ALL . '</option>'; |
|
| 283 | +$andor_select .= '>'._SR_ALL.'</option>'; |
|
| 284 | 284 | $andor_select .= '</select>'; |
| 285 | 285 | $xoopsTpl->assign('andor_selection_box', $andor_select); |
| 286 | 286 | |
| 287 | 287 | /* forum */ |
| 288 | 288 | $select_forum = '<select class="form-control" name="forum[]" id="forum" size="5" multiple="multiple">'; |
| 289 | -$select_forum .= '<option value="all">' . _MD_NEWBB_SEARCHALLFORUMS . '</option>'; |
|
| 289 | +$select_forum .= '<option value="all">'._MD_NEWBB_SEARCHALLFORUMS.'</option>'; |
|
| 290 | 290 | $select_forum .= newbbForumSelectBox($forum); |
| 291 | 291 | $select_forum .= '</select>'; |
| 292 | 292 | $xoopsTpl->assign_by_ref('forum_selection_box', $select_forum); |
@@ -297,17 +297,17 @@ discard block |
||
| 297 | 297 | if ('title' === $searchin) { |
| 298 | 298 | $searchin_select .= ' checked'; |
| 299 | 299 | } |
| 300 | -$searchin_select .= ' />' . _MD_NEWBB_SUBJECT . ' </label>'; |
|
| 300 | +$searchin_select .= ' />'._MD_NEWBB_SUBJECT.' </label>'; |
|
| 301 | 301 | $searchin_select .= '<label class="radio-inline"><input type="radio" name="searchin" value="text"'; |
| 302 | 302 | if ('text' === $searchin) { |
| 303 | 303 | $searchin_select .= ' checked'; |
| 304 | 304 | } |
| 305 | -$searchin_select .= ' />' . _MD_NEWBB_BODY . ' </label>'; |
|
| 305 | +$searchin_select .= ' />'._MD_NEWBB_BODY.' </label>'; |
|
| 306 | 306 | $searchin_select .= '<label class="radio-inline"><input type="radio" name="searchin" value="both"'; |
| 307 | 307 | if ('both' === $searchin || empty($searchin)) { |
| 308 | 308 | $searchin_select .= ' checked'; |
| 309 | 309 | } |
| 310 | -$searchin_select .= ' />' . _MD_NEWBB_SUBJECT . ' & ' . _MD_NEWBB_BODY . ' </label>'; |
|
| 310 | +$searchin_select .= ' />'._MD_NEWBB_SUBJECT.' & '._MD_NEWBB_BODY.' </label>'; |
|
| 311 | 311 | $xoopsTpl->assign('searchin_radio', $searchin_select); |
| 312 | 312 | |
| 313 | 313 | /* show_search */ |
@@ -316,12 +316,12 @@ discard block |
||
| 316 | 316 | if ('post' === $show_search) { |
| 317 | 317 | $show_search_select .= ' checked'; |
| 318 | 318 | } |
| 319 | -$show_search_select .= ' />' . _MD_NEWBB_POSTS . ' </label>'; |
|
| 319 | +$show_search_select .= ' />'._MD_NEWBB_POSTS.' </label>'; |
|
| 320 | 320 | $show_search_select .= '<label class="radio-inline"><input type="radio" name="show_search" value="post_text"'; |
| 321 | 321 | if ('post_text' === $show_search || empty($show_search)) { |
| 322 | 322 | $show_search_select .= ' checked'; |
| 323 | 323 | } |
| 324 | -$show_search_select .= ' />' . _MD_NEWBB_SEARCHPOSTTEXT . ' </label>'; |
|
| 324 | +$show_search_select .= ' />'._MD_NEWBB_SEARCHPOSTTEXT.' </label>'; |
|
| 325 | 325 | $xoopsTpl->assign('show_search_radio', $show_search_select); |
| 326 | 326 | |
| 327 | 327 | /* author */ |
@@ -333,12 +333,12 @@ discard block |
||
| 333 | 333 | if ('p.post_time' === $sortby || empty($sortby)) { |
| 334 | 334 | $sortby_select .= ' selected=\'selected\''; |
| 335 | 335 | } |
| 336 | -$sortby_select .= '>' . _MD_NEWBB_DATE . '</option>'; |
|
| 336 | +$sortby_select .= '>'._MD_NEWBB_DATE.'</option>'; |
|
| 337 | 337 | $sortby_select .= '<option value=\'p.subject\''; |
| 338 | 338 | if ('p.subject' === $sortby) { |
| 339 | 339 | $sortby_select .= ' selected="selected"'; |
| 340 | 340 | } |
| 341 | -$sortby_select .= '>' . _MD_NEWBB_TOPIC . '</option>'; |
|
| 341 | +$sortby_select .= '>'._MD_NEWBB_TOPIC.'</option>'; |
|
| 342 | 342 | $sortby_select .= '</select>'; |
| 343 | 343 | $xoopsTpl->assign('sortby_selection_box', $sortby_select); |
| 344 | 344 | |
@@ -354,5 +354,5 @@ discard block |
||
| 354 | 354 | $xoopsTpl->assign('search_rule', sprintf(_SR_KEYIGNORE, $xoopsConfigSearch['keyword_min'])); |
| 355 | 355 | } |
| 356 | 356 | // irmtfan move to footer.php |
| 357 | -require_once __DIR__ . '/footer.php'; |
|
| 357 | +require_once __DIR__.'/footer.php'; |
|
| 358 | 358 | include $GLOBALS['xoops']->path('footer.php'); |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | require_once $GLOBALS['xoops']->path('class/xoopsformloader.php'); |
| 29 | 29 | |
| 30 | 30 | // The forum instanciation |
| 31 | -$form_forum = new \XoopsThemeForm(_AM_NEWBB_EDITTHISFORUM . ' ' . $forumObject->getVar('forum_name'), 'form_forum', xoops_getenv('PHP_SELF')); |
|
| 31 | +$form_forum = new \XoopsThemeForm(_AM_NEWBB_EDITTHISFORUM.' '.$forumObject->getVar('forum_name'), 'form_forum', xoops_getenv('PHP_SELF')); |
|
| 32 | 32 | |
| 33 | 33 | // Forum name |
| 34 | 34 | $form_forum->addElement(new \XoopsFormText(_AM_NEWBB_FORUMNAME, 'forum_name', 50, 80, $forumObject->getVar('forum_name', 'E')), true); |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | $perm_checkbox = new \XoopsFormCheckBox('', 'perm_template', $forumObject->isNew()); |
| 66 | 66 | $perm_checkbox->addOption(1, _AM_NEWBB_PERM_TEMPLATEAPP); |
| 67 | 67 | $perm_tray->addElement($perm_checkbox); |
| 68 | -$perm_tray->addElement(new \XoopsFormLabel('', '<a href="admin_permissions.php?action=template" rel="external" title="">' . _AM_NEWBB_PERM_TEMPLATE . '</a>')); |
|
| 68 | +$perm_tray->addElement(new \XoopsFormLabel('', '<a href="admin_permissions.php?action=template" rel="external" title="">'._AM_NEWBB_PERM_TEMPLATE.'</a>')); |
|
| 69 | 69 | $form_forum->addElement($perm_tray); |
| 70 | 70 | |
| 71 | 71 | $form_forum->addElement(new \XoopsFormHidden('forum', $forumObject->getVar('forum_id'))); |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | |
| 14 | 14 | use XoopsModules\Newbb; |
| 15 | 15 | |
| 16 | -defined('NEWBB_FUNCTIONS_INI') || require_once __DIR__ . '/functions.ini.php'; |
|
| 16 | +defined('NEWBB_FUNCTIONS_INI') || require_once __DIR__.'/functions.ini.php'; |
|
| 17 | 17 | define('NEWBB_FUNCTIONS_CONFIG_LOADED', true); |
| 18 | 18 | |
| 19 | 19 | if (!defined('NEWBB_FUNCTIONS_CONFIG')) { |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | */ |
| 27 | 27 | function newbbLoadConfig() |
| 28 | 28 | { |
| 29 | - require_once dirname(__DIR__) . '/class/Helper.php'; |
|
| 29 | + require_once dirname(__DIR__).'/class/Helper.php'; |
|
| 30 | 30 | //$helper = NewBB::getInstance(); |
| 31 | 31 | $helper = Newbb\Helper::getInstance(); |
| 32 | 32 | static $configs = null; |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | $configs = is_object($helper) ? $helper->getConfig() : []; |
| 39 | - $plugins = include __DIR__ . '/plugin.php'; |
|
| 39 | + $plugins = include __DIR__.'/plugin.php'; |
|
| 40 | 40 | if (is_array($configs) && is_array($plugins)) { |
| 41 | 41 | $configs = array_merge($configs, $plugins); |
| 42 | 42 | } |
@@ -54,34 +54,34 @@ discard block |
||
| 54 | 54 | // remove old html template files |
| 55 | 55 | // create an array with all folders, and then run this once |
| 56 | 56 | |
| 57 | - $templateDirectory = $GLOBALS['xoops']->path('modules/' . $module->getVar('dirname', 'n') . '/templates/'); |
|
| 57 | + $templateDirectory = $GLOBALS['xoops']->path('modules/'.$module->getVar('dirname', 'n').'/templates/'); |
|
| 58 | 58 | $template_list = array_diff(scandir($templateDirectory, SCANDIR_SORT_NONE), ['..', '.']); |
| 59 | 59 | foreach ($template_list as $k => $v) { |
| 60 | - $fileinfo = new \SplFileInfo($templateDirectory . $v); |
|
| 60 | + $fileinfo = new \SplFileInfo($templateDirectory.$v); |
|
| 61 | 61 | if ('html' === $fileinfo->getExtension() && 'index.html' !== $fileinfo->getFilename()) { |
| 62 | - @unlink($templateDirectory . $v); |
|
| 62 | + @unlink($templateDirectory.$v); |
|
| 63 | 63 | } |
| 64 | 64 | } |
| 65 | - $templateDirectory = $GLOBALS['xoops']->path('modules/' . $module->getVar('dirname', 'n') . '/templates/blocks'); |
|
| 65 | + $templateDirectory = $GLOBALS['xoops']->path('modules/'.$module->getVar('dirname', 'n').'/templates/blocks'); |
|
| 66 | 66 | $template_list = array_diff(scandir($templateDirectory, SCANDIR_SORT_NONE), ['..', '.']); |
| 67 | 67 | foreach ($template_list as $k => $v) { |
| 68 | - $fileinfo = new \SplFileInfo($templateDirectory . $v); |
|
| 68 | + $fileinfo = new \SplFileInfo($templateDirectory.$v); |
|
| 69 | 69 | if ('html' === $fileinfo->getExtension() && 'index.html' !== $fileinfo->getFilename()) { |
| 70 | - @unlink($templateDirectory . $v); |
|
| 70 | + @unlink($templateDirectory.$v); |
|
| 71 | 71 | } |
| 72 | 72 | } |
| 73 | 73 | // Load class XoopsFile |
| 74 | 74 | xoops_load('xoopsfile'); |
| 75 | 75 | //remove /images directory |
| 76 | - $imagesDirectory = $GLOBALS['xoops']->path('modules/' . $module->getVar('dirname', 'n') . '/images/'); |
|
| 76 | + $imagesDirectory = $GLOBALS['xoops']->path('modules/'.$module->getVar('dirname', 'n').'/images/'); |
|
| 77 | 77 | $folderHandler = \XoopsFile::getHandler('folder', $imagesDirectory); |
| 78 | 78 | $folderHandler->delete($imagesDirectory); |
| 79 | 79 | |
| 80 | 80 | //remove old changelogs |
| 81 | - array_map('unlink', glob(dirname(__DIR__) . '/docs/changelog-rev*.txt')); |
|
| 81 | + array_map('unlink', glob(dirname(__DIR__).'/docs/changelog-rev*.txt')); |
|
| 82 | 82 | |
| 83 | 83 | if (!empty($newbbConfig['syncOnUpdate'])) { |
| 84 | - require_once __DIR__ . '/../include/functions.recon.php'; |
|
| 84 | + require_once __DIR__.'/../include/functions.recon.php'; |
|
| 85 | 85 | newbbSynchronization(); |
| 86 | 86 | } |
| 87 | 87 | |
@@ -107,9 +107,9 @@ discard block |
||
| 107 | 107 | */ |
| 108 | 108 | function xoops_module_pre_install_newbb(\XoopsModule $module) |
| 109 | 109 | { |
| 110 | - $mod_tables =& $module->getInfo('tables'); |
|
| 110 | + $mod_tables = & $module->getInfo('tables'); |
|
| 111 | 111 | foreach ($mod_tables as $table) { |
| 112 | - $GLOBALS['xoopsDB']->queryF('DROP TABLE IF EXISTS ' . $GLOBALS['xoopsDB']->prefix($table) . ';'); |
|
| 112 | + $GLOBALS['xoopsDB']->queryF('DROP TABLE IF EXISTS '.$GLOBALS['xoopsDB']->prefix($table).';'); |
|
| 113 | 113 | } |
| 114 | 114 | |
| 115 | 115 | return true; |
@@ -176,12 +176,12 @@ discard block |
||
| 176 | 176 | } |
| 177 | 177 | foreach ($groups_post as $group_id) { |
| 178 | 178 | foreach ($post_items as $item) { |
| 179 | - $gpermHandler->addRight('forum_' . $item, $forum_id, $group_id, $module_id); |
|
| 179 | + $gpermHandler->addRight('forum_'.$item, $forum_id, $group_id, $module_id); |
|
| 180 | 180 | } |
| 181 | 181 | } |
| 182 | 182 | |
| 183 | 183 | /* Create a test post */ |
| 184 | - require_once __DIR__ . '/functions.user.php'; |
|
| 184 | + require_once __DIR__.'/functions.user.php'; |
|
| 185 | 185 | /** @var Newbb\PostHandler $postHandler */ |
| 186 | 186 | $postHandler = Newbb\Helper::getInstance()->getHandler('Post'); |
| 187 | 187 | /** @var $forumpost */ |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | if (!empty($avatar) && 'blank.gif' !== $avatar) { |
| 68 | 68 | $categories[0]['fields'][] = [ |
| 69 | 69 | 'title' => _MD_NEWBB_AUTO_CREATE_AVATARS, |
| 70 | - 'value' => "<img src='" . XOOPS_UPLOAD_URL . '/' . $GLOBALS['xoopsUser']->getVar('user_avatar') . "' alt='" . $GLOBALS['xoopsUser']->getVar('uname') . "' />" |
|
| 70 | + 'value' => "<img src='".XOOPS_UPLOAD_URL.'/'.$GLOBALS['xoopsUser']->getVar('user_avatar')."' alt='".$GLOBALS['xoopsUser']->getVar('uname')."' />" |
|
| 71 | 71 | ]; |
| 72 | 72 | $weights[0][] = 0; |
| 73 | 73 | } |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | ksort($categories); |
| 103 | 103 | } |
| 104 | 104 | |
| 105 | -$message = sprintf(_MD_NEWBB_WELCOME_MESSAGE, $GLOBALS['xoopsUser']->getVar('uname')) . "\n\n"; |
|
| 105 | +$message = sprintf(_MD_NEWBB_WELCOME_MESSAGE, $GLOBALS['xoopsUser']->getVar('uname'))."\n\n"; |
|
| 106 | 106 | //$message .= _PROFILE . ": <a href='" . XOOPS_URL . '/userinfo.php?uid=' . $GLOBALS['xoopsUser']->getVar('uid') . "'><strong>" . $GLOBALS['xoopsUser']->getVar('uname') . '</strong></a> '; |
| 107 | 107 | //$message .= " | <a target='_blank' href='".XOOPS_URL . '/pmlite.php?send2=1&to_userid=' . $GLOBALS['xoopsUser']->getVar('uid') . "'>" . _MD_NEWBB_PM . "</a>\n"; |
| 108 | 108 | $message .= sprintf($GLOBALS['xoopsModuleConfig']['welcome_forum_message']); |
@@ -123,9 +123,9 @@ discard block |
||
| 123 | 123 | if (!empty($GLOBALS['xoopsModuleConfig']['notification_enabled'])) { |
| 124 | 124 | $tags = []; |
| 125 | 125 | $tags['THREAD_NAME'] = $subject; |
| 126 | - $tags['THREAD_URL'] = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/viewtopic.php?post_id=' . $post_id . '&topic_id=' . $postObject->getVar('topic_id') . '&forum=' . $forum_id; |
|
| 127 | - $tags['POST_URL'] = $tags['THREAD_URL'] . '#forumpost' . $post_id; |
|
| 128 | - require_once __DIR__ . '/notification.inc.php'; |
|
| 126 | + $tags['THREAD_URL'] = XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/viewtopic.php?post_id='.$post_id.'&topic_id='.$postObject->getVar('topic_id').'&forum='.$forum_id; |
|
| 127 | + $tags['POST_URL'] = $tags['THREAD_URL'].'#forumpost'.$post_id; |
|
| 128 | + require_once __DIR__.'/notification.inc.php'; |
|
| 129 | 129 | $forum_info = newbb_notify_iteminfo('forum', $forum_id); |
| 130 | 130 | $tags['FORUM_NAME'] = $forum_info['name']; |
| 131 | 131 | $tags['FORUM_URL'] = $forum_info['url']; |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | |
| 14 | 14 | // defined('XOOPS_ROOT_PATH') || die('Restricted access'); |
| 15 | 15 | |
| 16 | -defined('NEWBB_FUNCTIONS_INI') || require_once __DIR__ . '/functions.ini.php'; |
|
| 16 | +defined('NEWBB_FUNCTIONS_INI') || require_once __DIR__.'/functions.ini.php'; |
|
| 17 | 17 | define('NEWBB_FUNCTIONS_SESSION_LOADED', true); |
| 18 | 18 | xoops_load('XoopsRequest'); |
| 19 | 19 | |
@@ -35,11 +35,11 @@ discard block |
||
| 35 | 35 | if (is_array($string)) { |
| 36 | 36 | $value = []; |
| 37 | 37 | foreach ($string as $key => $val) { |
| 38 | - $value[] = $key . '|' . $val; |
|
| 38 | + $value[] = $key.'|'.$val; |
|
| 39 | 39 | } |
| 40 | 40 | $string = implode(',', $value); |
| 41 | 41 | } |
| 42 | - $_SESSION['newbb_' . $name] = $string; |
|
| 42 | + $_SESSION['newbb_'.$name] = $string; |
|
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | /** |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | */ |
| 50 | 50 | function newbbGetSession($name, $isArray = false) |
| 51 | 51 | { |
| 52 | - $value = !empty($_SESSION['newbb_' . $name]) ? $_SESSION['newbb_' . $name] : false; |
|
| 52 | + $value = !empty($_SESSION['newbb_'.$name]) ? $_SESSION['newbb_'.$name] : false; |
|
| 53 | 53 | if ($isArray) { |
| 54 | 54 | $_value = $value ? explode(',', $value) : []; |
| 55 | 55 | $value = []; |
@@ -77,11 +77,11 @@ discard block |
||
| 77 | 77 | if (is_array($string)) { |
| 78 | 78 | $value = []; |
| 79 | 79 | foreach ($string as $key => $val) { |
| 80 | - $value[] = $key . '|' . $val; |
|
| 80 | + $value[] = $key.'|'.$val; |
|
| 81 | 81 | } |
| 82 | 82 | $string = implode(',', $value); |
| 83 | 83 | } |
| 84 | - setcookie($forumCookie['prefix'] . $name, $string, (int)$expire, $forumCookie['path'], $forumCookie['domain'], $forumCookie['secure']); |
|
| 84 | + setcookie($forumCookie['prefix'].$name, $string, (int)$expire, $forumCookie['path'], $forumCookie['domain'], $forumCookie['secure']); |
|
| 85 | 85 | } |
| 86 | 86 | |
| 87 | 87 | /** |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | { |
| 94 | 94 | global $forumCookie; |
| 95 | 95 | // $value = !empty($_COOKIE[$forumCookie['prefix'] . $name]) ? $_COOKIE[$forumCookie['prefix'] . $name] : null; |
| 96 | - $value = Request::getString($forumCookie['prefix'] . $name, null, 'COOKIE'); |
|
| 96 | + $value = Request::getString($forumCookie['prefix'].$name, null, 'COOKIE'); |
|
| 97 | 97 | |
| 98 | 98 | if ($isArray) { |
| 99 | 99 | $_value = $value ? explode(',', $value) : []; |