@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | |
| 22 | 22 | if ((!defined('XOOPS_ROOT_PATH')) || !($GLOBALS['xoopsUser'] instanceof \XoopsUser) |
| 23 | 23 | || !$GLOBALS['xoopsUser']->IsAdmin()) { |
| 24 | - exit('Restricted access' . PHP_EOL); |
|
| 24 | + exit('Restricted access'.PHP_EOL); |
|
| 25 | 25 | } |
| 26 | 26 | |
| 27 | 27 | /** |
@@ -88,21 +88,21 @@ discard block |
||
| 88 | 88 | if ($tables->useTable($table)) { |
| 89 | 89 | $tables->alterColumn($table, $column, $attributes, $newName); |
| 90 | 90 | if (!$tables->executeQueue()) { |
| 91 | - echo '<br>' . _AM_NEWBB_UPGRADEFAILED0 . ' ' . $migrate->getLastError(); |
|
| 91 | + echo '<br>'._AM_NEWBB_UPGRADEFAILED0.' '.$migrate->getLastError(); |
|
| 92 | 92 | } |
| 93 | 93 | } |
| 94 | 94 | |
| 95 | 95 | //delete old HTML templates |
| 96 | 96 | if (count($configurator->templateFolders) > 0) { |
| 97 | 97 | foreach ($configurator->templateFolders as $folder) { |
| 98 | - $templateFolder = $GLOBALS['xoops']->path('modules/' . $moduleDirName . $folder); |
|
| 98 | + $templateFolder = $GLOBALS['xoops']->path('modules/'.$moduleDirName.$folder); |
|
| 99 | 99 | if (is_dir($templateFolder)) { |
| 100 | 100 | $templateList = array_diff(scandir($templateFolder, SCANDIR_SORT_NONE), ['..', '.']); |
| 101 | 101 | foreach ($templateList as $k => $v) { |
| 102 | - $fileInfo = new \SplFileInfo($templateFolder . $v); |
|
| 102 | + $fileInfo = new \SplFileInfo($templateFolder.$v); |
|
| 103 | 103 | if ('html' === $fileInfo->getExtension() && 'index.html' !== $fileInfo->getFilename()) { |
| 104 | - if (file_exists($templateFolder . $v)) { |
|
| 105 | - unlink($templateFolder . $v); |
|
| 104 | + if (file_exists($templateFolder.$v)) { |
|
| 105 | + unlink($templateFolder.$v); |
|
| 106 | 106 | } |
| 107 | 107 | } |
| 108 | 108 | } |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | if (count($configurator->oldFiles) > 0) { |
| 115 | 115 | // foreach (array_keys($GLOBALS['uploadFolders']) as $i) { |
| 116 | 116 | foreach (array_keys($configurator->oldFiles) as $i) { |
| 117 | - $tempFile = $GLOBALS['xoops']->path('modules/' . $moduleDirName . $configurator->oldFiles[$i]); |
|
| 117 | + $tempFile = $GLOBALS['xoops']->path('modules/'.$moduleDirName.$configurator->oldFiles[$i]); |
|
| 118 | 118 | if (is_file($tempFile)) { |
| 119 | 119 | unlink($tempFile); |
| 120 | 120 | } |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | if (count($configurator->oldFolders) > 0) { |
| 127 | 127 | // foreach (array_keys($GLOBALS['uploadFolders']) as $i) { |
| 128 | 128 | foreach (array_keys($configurator->oldFolders) as $i) { |
| 129 | - $tempFolder = $GLOBALS['xoops']->path('modules/' . $moduleDirName . $configurator->oldFolders[$i]); |
|
| 129 | + $tempFolder = $GLOBALS['xoops']->path('modules/'.$moduleDirName.$configurator->oldFolders[$i]); |
|
| 130 | 130 | /* @var $folderHandler XoopsObjectHandler */ |
| 131 | 131 | $folderHandler = \XoopsFile::getHandler('folder', $tempFolder); |
| 132 | 132 | $folderHandler->delete($tempFolder); |
@@ -143,15 +143,15 @@ discard block |
||
| 143 | 143 | |
| 144 | 144 | // --- COPY blank.png FILES --------------- |
| 145 | 145 | if (count($configurator->copyBlankFiles) > 0) { |
| 146 | - $file = __DIR__ . '/../assets/images/blank.png'; |
|
| 146 | + $file = __DIR__.'/../assets/images/blank.png'; |
|
| 147 | 147 | foreach (array_keys($configurator->copyBlankFiles) as $i) { |
| 148 | - $dest = $configurator->copyBlankFiles[$i] . '/blank.png'; |
|
| 148 | + $dest = $configurator->copyBlankFiles[$i].'/blank.png'; |
|
| 149 | 149 | $utilityClass::copyFile($file, $dest); |
| 150 | 150 | } |
| 151 | 151 | } |
| 152 | 152 | |
| 153 | 153 | //delete .html entries from the tpl table |
| 154 | - $sql = 'DELETE FROM ' . $GLOBALS['xoopsDB']->prefix('tplfile') . " WHERE `tpl_module` = '" . $module->getVar('dirname', 'n') . '\' AND `tpl_file` LIKE \'%.html%\''; |
|
| 154 | + $sql = 'DELETE FROM '.$GLOBALS['xoopsDB']->prefix('tplfile')." WHERE `tpl_module` = '".$module->getVar('dirname', 'n').'\' AND `tpl_file` LIKE \'%.html%\''; |
|
| 155 | 155 | $GLOBALS['xoopsDB']->queryF($sql); |
| 156 | 156 | |
| 157 | 157 | /** @var XoopsGroupPermHandler $gpermHandler */ |
@@ -20,12 +20,12 @@ discard block |
||
| 20 | 20 | */ |
| 21 | 21 | |
| 22 | 22 | // defined('XOOPS_ROOT_PATH') || die('Restricted access'); |
| 23 | -require_once __DIR__ . '/common.php'; |
|
| 23 | +require_once __DIR__.'/common.php'; |
|
| 24 | 24 | |
| 25 | 25 | $moduleDirName = basename(dirname(__DIR__)); |
| 26 | 26 | $uploadFolders = [ |
| 27 | 27 | NEWBB_UPLOAD_PATH, |
| 28 | - NEWBB_UPLOAD_PATH . '/thumbs' |
|
| 28 | + NEWBB_UPLOAD_PATH.'/thumbs' |
|
| 29 | 29 | ]; |
| 30 | 30 | |
| 31 | 31 | /** |
@@ -36,24 +36,24 @@ discard block |
||
| 36 | 36 | $moduleDirName = basename(dirname(__DIR__)); |
| 37 | 37 | $moduleDirNameUpper = strtoupper($moduleDirName); |
| 38 | 38 | return (object)[ |
| 39 | - 'name' => strtoupper($moduleDirName) . ' Module Configurator', |
|
| 39 | + 'name' => strtoupper($moduleDirName).' Module Configurator', |
|
| 40 | 40 | 'paths' => [ |
| 41 | 41 | 'dirname' => $moduleDirName, |
| 42 | - 'admin' => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/admin', |
|
| 43 | - 'modPath' => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName, |
|
| 44 | - 'modUrl' => XOOPS_URL . '/modules/' . $moduleDirName, |
|
| 45 | - 'uploadPath' => XOOPS_UPLOAD_PATH . '/' . $moduleDirName, |
|
| 46 | - 'uploadUrl' => XOOPS_UPLOAD_URL . '/' . $moduleDirName, |
|
| 42 | + 'admin' => XOOPS_ROOT_PATH.'/modules/'.$moduleDirName.'/admin', |
|
| 43 | + 'modPath' => XOOPS_ROOT_PATH.'/modules/'.$moduleDirName, |
|
| 44 | + 'modUrl' => XOOPS_URL.'/modules/'.$moduleDirName, |
|
| 45 | + 'uploadPath' => XOOPS_UPLOAD_PATH.'/'.$moduleDirName, |
|
| 46 | + 'uploadUrl' => XOOPS_UPLOAD_URL.'/'.$moduleDirName, |
|
| 47 | 47 | ], |
| 48 | 48 | 'uploadFolders' => [ |
| 49 | - constant($moduleDirNameUpper . '_UPLOAD_PATH'), |
|
| 50 | - constant($moduleDirNameUpper . '_UPLOAD_PATH') . '/thumbs', |
|
| 49 | + constant($moduleDirNameUpper.'_UPLOAD_PATH'), |
|
| 50 | + constant($moduleDirNameUpper.'_UPLOAD_PATH').'/thumbs', |
|
| 51 | 51 | |
| 52 | 52 | //XOOPS_UPLOAD_PATH . '/flags' |
| 53 | 53 | ], |
| 54 | 54 | 'copyBlankFiles' => [ |
| 55 | - constant($moduleDirNameUpper . '_UPLOAD_PATH'), |
|
| 56 | - constant($moduleDirNameUpper . '_UPLOAD_PATH') . '/thumbs', |
|
| 55 | + constant($moduleDirNameUpper.'_UPLOAD_PATH'), |
|
| 56 | + constant($moduleDirNameUpper.'_UPLOAD_PATH').'/thumbs', |
|
| 57 | 57 | //XOOPS_UPLOAD_PATH . '/flags' |
| 58 | 58 | ], |
| 59 | 59 | |
@@ -88,6 +88,6 @@ discard block |
||
| 88 | 88 | '/images', |
| 89 | 89 | ], |
| 90 | 90 | 'modCopyright' => "<a href='https://xoops.org' title='XOOPS Project' target='_blank'> |
| 91 | - <img src='" . constant($moduleDirNameUpper . '_AUTHOR_LOGOIMG') . '\' alt=\'XOOPS Project\' /></a>', |
|
| 91 | + <img src='" . constant($moduleDirNameUpper.'_AUTHOR_LOGOIMG').'\' alt=\'XOOPS Project\' /></a>', |
|
| 92 | 92 | ]; |
| 93 | 93 | } |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | |
| 14 | 14 | use XoopsModules\Newbb; |
| 15 | 15 | |
| 16 | -defined('NEWBB_FUNCTIONS_INI') || require_once __DIR__ . '/functions.ini.php'; |
|
| 16 | +defined('NEWBB_FUNCTIONS_INI') || require_once __DIR__.'/functions.ini.php'; |
|
| 17 | 17 | define('NEWBB_FUNCTIONS_CONFIG_LOADED', true); |
| 18 | 18 | |
| 19 | 19 | if (!defined('NEWBB_FUNCTIONS_CONFIG')) { |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | $configs = is_object($helper) ? $helper->getConfig() : []; |
| 39 | - $plugins = include __DIR__ . '/plugin.php'; |
|
| 39 | + $plugins = include __DIR__.'/plugin.php'; |
|
| 40 | 40 | if (is_array($configs) && is_array($plugins)) { |
| 41 | 41 | $configs = array_merge($configs, $plugins); |
| 42 | 42 | } |
@@ -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, ENT_QUOTES | ENT_HTML5) . '" />'; |
|
| 136 | - echo '<input type="hidden" name="order" value="' . htmlspecialchars($order, ENT_QUOTES | ENT_HTML5) . '" />'; |
|
| 137 | - echo '<input type="hidden" name="forum" value="' . htmlspecialchars($forum, ENT_QUOTES | ENT_HTML5) . '" />'; |
|
| 138 | - echo '<input type="hidden" name="topic_id" value="' . htmlspecialchars($topic_id, ENT_QUOTES | ENT_HTML5) . '" />'; |
|
| 135 | + echo '<input type="hidden" name="post_id" value="'.htmlspecialchars($post_id, ENT_QUOTES | ENT_HTML5).'" />'; |
|
| 136 | + echo '<input type="hidden" name="order" value="'.htmlspecialchars($order, ENT_QUOTES | ENT_HTML5).'" />'; |
|
| 137 | + echo '<input type="hidden" name="forum" value="'.htmlspecialchars($forum, ENT_QUOTES | ENT_HTML5).'" />'; |
|
| 138 | + echo '<input type="hidden" name="topic_id" value="'.htmlspecialchars($topic_id, ENT_QUOTES | ENT_HTML5).'" />'; |
|
| 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) { |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | use Xmf\Request; |
| 33 | 33 | use XoopsModules\Newbb; |
| 34 | 34 | |
| 35 | -require_once __DIR__ . '/admin_header.php'; |
|
| 35 | +require_once __DIR__.'/admin_header.php'; |
|
| 36 | 36 | require_once $GLOBALS['xoops']->path('class/xoopsformloader.php'); |
| 37 | 37 | if (!class_exists('XoopsGroupPermForm')) { |
| 38 | 38 | require_once $GLOBALS['xoops']->path('class/xoopsform/grouppermform.php'); |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | case 'template': |
| 64 | 64 | xoops_cp_header(); |
| 65 | 65 | $adminObject->displayNavigation(basename(__FILE__)); |
| 66 | - echo "<legend style='font-weight: bold; color: #900;'>" . _AM_NEWBB_PERM_ACTION . '</legend>'; |
|
| 66 | + echo "<legend style='font-weight: bold; color: #900;'>"._AM_NEWBB_PERM_ACTION.'</legend>'; |
|
| 67 | 67 | $opform = new \XoopsSimpleForm(_AM_NEWBB_PERM_ACTION_HELP_TEMPLAT, 'actionform', 'admin_permissions.php', 'get'); |
| 68 | 68 | $op_select = new \XoopsFormSelect('', 'action'); |
| 69 | 69 | $op_select->setExtra('onchange="document.forms.actionform.submit()"'); |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | $perm_template = $newbbpermHandler->getTemplate(); |
| 83 | 83 | foreach (array_keys($glist) as $i) { |
| 84 | 84 | $selected = !empty($perm_template[$i]) ? array_keys($perm_template[$i]) : []; |
| 85 | - $ret_ele = '<tr align="left" valign="top"><td class="head">' . $glist[$i] . '</td>'; |
|
| 85 | + $ret_ele = '<tr align="left" valign="top"><td class="head">'.$glist[$i].'</td>'; |
|
| 86 | 86 | $ret_ele .= '<td class="even">'; |
| 87 | 87 | $ret_ele .= '<table class="outer"><tr><td class="odd"><table><tr>'; |
| 88 | 88 | $ii = 0; |
@@ -92,13 +92,13 @@ discard block |
||
| 92 | 92 | if (0 == $ii % 5) { |
| 93 | 93 | $ret_ele .= '</tr><tr>'; |
| 94 | 94 | } |
| 95 | - $checked = in_array('forum_' . $perm, $selected) ? ' checked' : ''; |
|
| 96 | - $option_id = $perm . '_' . $i; |
|
| 95 | + $checked = in_array('forum_'.$perm, $selected) ? ' checked' : ''; |
|
| 96 | + $option_id = $perm.'_'.$i; |
|
| 97 | 97 | $option_ids[] = $option_id; |
| 98 | - $ret_ele .= '<td><input name="perms[' . $i . '][' . 'forum_' . $perm . ']" id="' . $option_id . '" onclick="" value="1" type="checkbox"' . $checked . '>' . constant('_AM_NEWBB_CAN_' . strtoupper($perm)) . '<br></td>'; |
|
| 98 | + $ret_ele .= '<td><input name="perms['.$i.']['.'forum_'.$perm.']" id="'.$option_id.'" onclick="" value="1" type="checkbox"'.$checked.'>'.constant('_AM_NEWBB_CAN_'.strtoupper($perm)).'<br></td>'; |
|
| 99 | 99 | } |
| 100 | 100 | $ret_ele .= '</tr></table></td><td class="even">'; |
| 101 | - $ret_ele .= _ALL . ' <input id="checkall[' . $i . ']" type="checkbox" value="" onclick="var optionids = new Array(' . implode(', ', $option_ids) . '); xoopsCheckAllElements(optionids, \'checkall[' . $i . ']\')" />'; |
|
| 101 | + $ret_ele .= _ALL.' <input id="checkall['.$i.']" type="checkbox" value="" onclick="var optionids = new Array('.implode(', ', $option_ids).'); xoopsCheckAllElements(optionids, \'checkall['.$i.']\')" />'; |
|
| 102 | 102 | $ret_ele .= '</td></tr></table>'; |
| 103 | 103 | $ret_ele .= '</td></tr>'; |
| 104 | 104 | $elements[] = $ret_ele; |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | $tray->addElement(new \XoopsFormHidden('action', 'template_save')); |
| 108 | 108 | $tray->addElement(new \XoopsFormButton('', 'submit', _SUBMIT, 'submit')); |
| 109 | 109 | $tray->addElement(new \XoopsFormButton('', 'reset', _CANCEL, 'reset')); |
| 110 | - $ret = '<br><strong>' . _AM_NEWBB_PERM_TEMPLATE . '</strong><br>' . _AM_NEWBB_PERM_TEMPLATE_DESC . '<br>'; |
|
| 110 | + $ret = '<br><strong>'._AM_NEWBB_PERM_TEMPLATE.'</strong><br>'._AM_NEWBB_PERM_TEMPLATE_DESC.'<br>'; |
|
| 111 | 111 | $ret .= "<form name='template' id='template' method='post'>\n<table width='100%' class='outer' cellspacing='1'>\n"; |
| 112 | 112 | $ret .= implode("\n", $elements); |
| 113 | 113 | $ret .= '<tr align="left" valign="top"><td class="head"></td><td class="even" style="text-align:center;">'; |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | $ret .= '</td></tr>'; |
| 116 | 116 | $ret .= '</table></form>'; |
| 117 | 117 | echo $ret; |
| 118 | - require_once __DIR__ . '/admin_footer.php'; |
|
| 118 | + require_once __DIR__.'/admin_footer.php'; |
|
| 119 | 119 | break; |
| 120 | 120 | |
| 121 | 121 | case 'template_save': |
@@ -136,7 +136,7 @@ discard block |
||
| 136 | 136 | } |
| 137 | 137 | xoops_cp_header(); |
| 138 | 138 | $adminObject->displayNavigation(basename(__FILE__)); |
| 139 | - echo "<legend style='font-weight: bold; color: #900;'>" . _AM_NEWBB_PERM_ACTION . '</legend>'; |
|
| 139 | + echo "<legend style='font-weight: bold; color: #900;'>"._AM_NEWBB_PERM_ACTION.'</legend>'; |
|
| 140 | 140 | $opform = new \XoopsSimpleForm(_AM_NEWBB_PERM_ACTION_HELP_APPLY, 'actionform', 'admin_permissions.php', 'get'); |
| 141 | 141 | $op_select = new \XoopsFormSelect('', 'action'); |
| 142 | 142 | $op_select->setExtra('onchange="document.forms.actionform.submit()"'); |
@@ -159,9 +159,9 @@ discard block |
||
| 159 | 159 | $forums = $forumHandler->getTree(array_keys($categories), 0, 'all'); |
| 160 | 160 | foreach (array_keys($forums) as $c) { |
| 161 | 161 | $fm_options[-1 * $c - 1000] = ' '; |
| 162 | - $fm_options[-1 * $c] = '[' . $categories[$c] . ']'; |
|
| 162 | + $fm_options[-1 * $c] = '['.$categories[$c].']'; |
|
| 163 | 163 | foreach (array_keys($forums[$c]) as $f) { |
| 164 | - $fm_options[$f] = $forums[$c][$f]['prefix'] . $forums[$c][$f]['forum_name']; |
|
| 164 | + $fm_options[$f] = $forums[$c][$f]['prefix'].$forums[$c][$f]['forum_name']; |
|
| 165 | 165 | } |
| 166 | 166 | } |
| 167 | 167 | unset($forums, $categories); |
@@ -176,7 +176,7 @@ discard block |
||
| 176 | 176 | $tray->addElement(new \XoopsFormButton('', 'reset', _CANCEL, 'reset')); |
| 177 | 177 | $fmform->addElement($tray); |
| 178 | 178 | $fmform->display(); |
| 179 | - require_once __DIR__ . '/admin_footer.php'; |
|
| 179 | + require_once __DIR__.'/admin_footer.php'; |
|
| 180 | 180 | break; |
| 181 | 181 | |
| 182 | 182 | case 'apply_save': |
@@ -214,7 +214,7 @@ discard block |
||
| 214 | 214 | } |
| 215 | 215 | |
| 216 | 216 | $adminObject->displayNavigation(basename(__FILE__)); |
| 217 | - echo "<legend style='font-weight: bold; color: #900;'>" . _AM_NEWBB_PERM_ACTION . '</legend>'; |
|
| 217 | + echo "<legend style='font-weight: bold; color: #900;'>"._AM_NEWBB_PERM_ACTION.'</legend>'; |
|
| 218 | 218 | $opform = new \XoopsSimpleForm(_AM_NEWBB_PERM_ACTION_HELP, 'actionform', 'admin_permissions.php', 'get'); |
| 219 | 219 | $op_select = new \XoopsFormSelect('', 'action'); |
| 220 | 220 | $op_select->setExtra('onchange="document.forms.actionform.submit()"'); |
@@ -237,10 +237,10 @@ discard block |
||
| 237 | 237 | ] |
| 238 | 238 | ]; |
| 239 | 239 | foreach ($perms as $perm) { |
| 240 | - $op_options[$perm] = constant('_AM_NEWBB_CAN_' . strtoupper($perm)); |
|
| 240 | + $op_options[$perm] = constant('_AM_NEWBB_CAN_'.strtoupper($perm)); |
|
| 241 | 241 | $fm_options[$perm] = [ |
| 242 | - 'title' => constant('_AM_NEWBB_CAN_' . strtoupper($perm)), |
|
| 243 | - 'item' => 'forum_' . $perm, |
|
| 242 | + 'title' => constant('_AM_NEWBB_CAN_'.strtoupper($perm)), |
|
| 243 | + 'item' => 'forum_'.$perm, |
|
| 244 | 244 | 'desc' => '', |
| 245 | 245 | 'anonymous' => true |
| 246 | 246 | ]; |
@@ -281,10 +281,10 @@ discard block |
||
| 281 | 281 | if (count($forums) > 0) { |
| 282 | 282 | foreach (array_keys($forums) as $c) { |
| 283 | 283 | $key_c = -1 * $c; |
| 284 | - $form->addItem($key_c, '<strong>[' . $categories[$c] . ']</strong>'); |
|
| 284 | + $form->addItem($key_c, '<strong>['.$categories[$c].']</strong>'); |
|
| 285 | 285 | foreach (array_keys($forums[$c]) as $f) { |
| 286 | 286 | $pid = $forums[$c][$f]['parent_forum'] ?: $key_c; |
| 287 | - $form->addItem($f, $forums[$c][$f]['prefix'] . $forums[$c][$f]['forum_name'], $pid); |
|
| 287 | + $form->addItem($f, $forums[$c][$f]['prefix'].$forums[$c][$f]['forum_name'], $pid); |
|
| 288 | 288 | } |
| 289 | 289 | } |
| 290 | 290 | } |
@@ -292,7 +292,7 @@ discard block |
||
| 292 | 292 | } |
| 293 | 293 | $form->display(); |
| 294 | 294 | echo '<fieldset>'; |
| 295 | - echo '<legend> ' . _MI_NEWBB_ADMENU_PERMISSION . ' </legend>'; |
|
| 295 | + echo '<legend> '._MI_NEWBB_ADMENU_PERMISSION.' </legend>'; |
|
| 296 | 296 | echo _AM_NEWBB_HELP_PERMISSION_TAB; |
| 297 | 297 | echo '</fieldset>'; |
| 298 | 298 | // Since we can not control the permission update, a trick is used here |
@@ -301,6 +301,6 @@ discard block |
||
| 301 | 301 | $permissionHandler->createPermData(); |
| 302 | 302 | $cacheHelper = Newbb\Utility::cleanCache(); |
| 303 | 303 | //$cacheHelper->delete('permission'); |
| 304 | - require_once __DIR__ . '/admin_footer.php'; |
|
| 304 | + require_once __DIR__.'/admin_footer.php'; |
|
| 305 | 305 | break; |
| 306 | 306 | } |