@@ -207,7 +207,7 @@ discard block |
||
| 207 | 207 | self::rrmdir($fObj->getPathname()); |
| 208 | 208 | } |
| 209 | 209 | } |
| 210 | - $iterator = null; // clear iterator Obj to close file/directory |
|
| 210 | + $iterator = null; // clear iterator Obj to close file/directory |
|
| 211 | 211 | return \rmdir($src); // remove the directory & return results |
| 212 | 212 | } |
| 213 | 213 | |
@@ -247,7 +247,7 @@ discard block |
||
| 247 | 247 | // \rmdir($fObj->getPath()); // now delete the directory |
| 248 | 248 | } |
| 249 | 249 | } |
| 250 | - $iterator = null; // clear iterator Obj to close file/directory |
|
| 250 | + $iterator = null; // clear iterator Obj to close file/directory |
|
| 251 | 251 | return \rmdir($src); // remove the directory & return results |
| 252 | 252 | } |
| 253 | 253 | |
@@ -23,9 +23,9 @@ discard block |
||
| 23 | 23 | |
| 24 | 24 | require \dirname(__DIR__) . '/preloads/autoloader.php'; |
| 25 | 25 | |
| 26 | -require_once \dirname(__DIR__, 3). '/include/cp_header.php'; |
|
| 26 | +require_once \dirname(__DIR__, 3) . '/include/cp_header.php'; |
|
| 27 | 27 | $thisPath = \dirname(__DIR__); |
| 28 | -include_once $thisPath.'/include/common.php'; |
|
| 28 | +include_once $thisPath . '/include/common.php'; |
|
| 29 | 29 | $sysPathIcon16 = '../' . $xoopsModule->getInfo('sysicons16'); |
| 30 | 30 | $sysPathIcon32 = '../' . $xoopsModule->getInfo('sysicons32'); |
| 31 | 31 | $pathModuleAdmin = $GLOBALS['xoopsModule']->getInfo('dirmoduleadmin'); |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | $helper->loadLanguage('modinfo'); |
| 59 | 59 | $helper->loadLanguage('common'); |
| 60 | 60 | // Local admin menu class |
| 61 | -include_once $GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php'); |
|
| 61 | +include_once $GLOBALS['xoops']->path($pathModuleAdmin . '/moduleadmin.php'); |
|
| 62 | 62 | |
| 63 | 63 | xoops_cp_header(); |
| 64 | 64 | $adminMenu = new ModuleAdmin(); |
@@ -27,8 +27,8 @@ |
||
| 27 | 27 | * return object |
| 28 | 28 | */ |
| 29 | 29 | |
| 30 | -$moduleDirName = \basename(\dirname(__DIR__)); |
|
| 31 | -$moduleDirNameUpper = \mb_strtoupper($moduleDirName); |
|
| 30 | +$moduleDirName = \basename(\dirname(__DIR__)); |
|
| 31 | +$moduleDirNameUpper = \mb_strtoupper($moduleDirName); |
|
| 32 | 32 | return (object)[ |
| 33 | 33 | 'name' => \mb_strtoupper($moduleDirName) . ' Module Configurator', |
| 34 | 34 | 'paths' => [ |
@@ -27,13 +27,13 @@ discard block |
||
| 27 | 27 | */ |
| 28 | 28 | function wgsitenotice_block_addCatSelect($cats) { |
| 29 | 29 | $cat_sql = ''; |
| 30 | - if(\is_array($cats)) |
|
| 30 | + if (\is_array($cats)) |
|
| 31 | 31 | { |
| 32 | - $cat_sql = '('.current($cats); |
|
| 32 | + $cat_sql = '(' . current($cats); |
|
| 33 | 33 | \array_shift($cats); |
| 34 | - foreach($cats as $cat) |
|
| 34 | + foreach ($cats as $cat) |
|
| 35 | 35 | { |
| 36 | - $cat_sql .= ','.$cat; |
|
| 36 | + $cat_sql .= ',' . $cat; |
|
| 37 | 37 | } |
| 38 | 38 | $cat_sql .= ')'; |
| 39 | 39 | } |
@@ -44,9 +44,9 @@ discard block |
||
| 44 | 44 | { |
| 45 | 45 | global $xoopsTpl, $xoTheme; |
| 46 | 46 | $myts = MyTextSanitizer::getInstance(); |
| 47 | - $content= $myts->undoHtmlSpecialChars($myts->displayTarea($content)); |
|
| 48 | - if(isset($xoTheme) && \is_object($xoTheme)) { |
|
| 49 | - $xoTheme->addMeta( 'meta', 'keywords', \strip_tags($content)); |
|
| 47 | + $content = $myts->undoHtmlSpecialChars($myts->displayTarea($content)); |
|
| 48 | + if (isset($xoTheme) && \is_object($xoTheme)) { |
|
| 49 | + $xoTheme->addMeta('meta', 'keywords', \strip_tags($content)); |
|
| 50 | 50 | } else { // Compatibility for old Xoops versions |
| 51 | 51 | $xoopsTpl->assign('xoops_meta_keywords', \strip_tags($content)); |
| 52 | 52 | } |
@@ -57,8 +57,8 @@ discard block |
||
| 57 | 57 | global $xoopsTpl, $xoTheme; |
| 58 | 58 | $myts = MyTextSanitizer::getInstance(); |
| 59 | 59 | $content = $myts->undoHtmlSpecialChars($myts->displayTarea($content)); |
| 60 | - if(isset($xoTheme) && \is_object($xoTheme)) { |
|
| 61 | - $xoTheme->addMeta( 'meta', 'description', \strip_tags($content)); |
|
| 60 | + if (isset($xoTheme) && \is_object($xoTheme)) { |
|
| 61 | + $xoTheme->addMeta('meta', 'description', \strip_tags($content)); |
|
| 62 | 62 | } else { // Compatibility for old Xoops versions |
| 63 | 63 | $xoopsTpl->assign('xoops_meta_description', \strip_tags($content)); |
| 64 | 64 | } |
@@ -28,8 +28,8 @@ discard block |
||
| 28 | 28 | $version_id = Request::getInt('version_id'); |
| 29 | 29 | $start = Request::getInt('start'); |
| 30 | 30 | |
| 31 | -$img_yes = "<img src='../".$modPathIcon16."/on.png' >"; |
|
| 32 | -$img_no = "<img src='../".$modPathIcon16."/off.png' >"; |
|
| 31 | +$img_yes = "<img src='../" . $modPathIcon16 . "/on.png' >"; |
|
| 32 | +$img_no = "<img src='../" . $modPathIcon16 . "/off.png' >"; |
|
| 33 | 33 | // Switch options |
| 34 | 34 | switch ($op) |
| 35 | 35 | { |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | $GLOBALS['xoopsTpl']->append('versions_list', $version); |
| 77 | 77 | unset($version); |
| 78 | 78 | } |
| 79 | - if ( $versions_rows > $limit ) { |
|
| 79 | + if ($versions_rows > $limit) { |
|
| 80 | 80 | include_once \XOOPS_ROOT_PATH . '/class/pagenav.php'; |
| 81 | 81 | $pagenav = new \XoopsPageNav($versions_rows, $limit, $start, 'start', 'op=list&limit=' . $limit); |
| 82 | 82 | $GLOBALS['xoopsTpl']->assign('pagenav', $pagenav->renderNav()); |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | $GLOBALS['xoopsTpl']->assign('form', $form->render()); |
| 100 | 100 | break; |
| 101 | 101 | case 'save': |
| 102 | - if ( !$GLOBALS['xoopsSecurity']->check() ) { |
|
| 102 | + if (!$GLOBALS['xoopsSecurity']->check()) { |
|
| 103 | 103 | \redirect_header('versions.php', 3, \implode(',', $GLOBALS['xoopsSecurity']->getErrors())); |
| 104 | 104 | } |
| 105 | 105 | if (isset($version_id)) { |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | $versionsObj->setVar('version_current', $version_current); |
| 143 | 143 | // Insert Data |
| 144 | 144 | if ($versionsHandler->insert($versionsObj)) { |
| 145 | - \redirect_header('versions.php?op=list&start='.$start, 2, \_AM_WGSITENOTICE_FORMOK); |
|
| 145 | + \redirect_header('versions.php?op=list&start=' . $start, 2, \_AM_WGSITENOTICE_FORMOK); |
|
| 146 | 146 | } |
| 147 | 147 | } |
| 148 | 148 | break; |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | $versionsObj->setVar('version_online', $version_online); |
| 156 | 156 | // Insert Data |
| 157 | 157 | if ($versionsHandler->insert($versionsObj)) { |
| 158 | - \redirect_header('versions.php?op=list&start='.$start, 2, \_AM_WGSITENOTICE_FORMOK); |
|
| 158 | + \redirect_header('versions.php?op=list&start=' . $start, 2, \_AM_WGSITENOTICE_FORMOK); |
|
| 159 | 159 | } |
| 160 | 160 | } |
| 161 | 161 | break; |
@@ -173,7 +173,7 @@ discard block |
||
| 173 | 173 | case 'delete': |
| 174 | 174 | $versionsObj = $versionsHandler->get($version_id); |
| 175 | 175 | if (isset($_REQUEST['ok']) && 1 == (int)$_REQUEST['ok']) { |
| 176 | - if ( !$GLOBALS['xoopsSecurity']->check() ) { |
|
| 176 | + if (!$GLOBALS['xoopsSecurity']->check()) { |
|
| 177 | 177 | \redirect_header('versions.php', 3, \implode(', ', $GLOBALS['xoopsSecurity']->getErrors())); |
| 178 | 178 | } |
| 179 | 179 | |
@@ -195,9 +195,9 @@ discard block |
||
| 195 | 195 | |
| 196 | 196 | case 'order': |
| 197 | 197 | $vorder = Request::getArray('vorder'); |
| 198 | - for ($i = 0, $iMax = \count($vorder); $i < $iMax; $i++){ |
|
| 198 | + for ($i = 0, $iMax = \count($vorder); $i < $iMax; $i++) { |
|
| 199 | 199 | $versionsObj = $versionsHandler->get($vorder[$i]); |
| 200 | - $versionsObj->setVar('version_weight',$i+1); |
|
| 200 | + $versionsObj->setVar('version_weight', $i + 1); |
|
| 201 | 201 | $versionsHandler->insert($versionsObj); |
| 202 | 202 | } |
| 203 | 203 | break; |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | * @author Goffy (xoops.wedega.com) - Email:<[email protected]> - Website:<https://xoops.wedega.com> |
| 20 | 20 | */ |
| 21 | 21 | |
| 22 | -$dirname = \basename( \dirname(__DIR__) ) ; |
|
| 22 | +$dirname = \basename(\dirname(__DIR__)); |
|
| 23 | 23 | $moduleDirNameUpper = \mb_strtoupper($dirname); |
| 24 | 24 | $moduleHandler = \xoops_getHandler('module'); |
| 25 | 25 | $xoopsModule = \XoopsModule::getByDirname($dirname); |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | $adminmenu[] = [ |
| 30 | 30 | 'title' => \_MI_WGSITENOTICE_ADMENU1, |
| 31 | 31 | 'link' => 'admin/index.php', |
| 32 | - 'icon' => $sysPathIcon32.'/dashboard.png' |
|
| 32 | + 'icon' => $sysPathIcon32 . '/dashboard.png' |
|
| 33 | 33 | ]; |
| 34 | 34 | $adminmenu[] = [ |
| 35 | 35 | 'title' => \_MI_WGSITENOTICE_ADMENU2, |
@@ -27,8 +27,8 @@ |
||
| 27 | 27 | $GLOBALS['xoopsTpl']->assign('wgsitenotice_url', \WGSITENOTICE_URL); |
| 28 | 28 | // |
| 29 | 29 | $GLOBALS['xoopsTpl']->assign('admin', \WGSITENOTICE_ADMIN); |
| 30 | -if ( $helper->getConfig('show_copyright') ) { |
|
| 30 | +if ($helper->getConfig('show_copyright')) { |
|
| 31 | 31 | $GLOBALS['xoopsTpl']->assign('copyright', $copyright); |
| 32 | 32 | } |
| 33 | 33 | // User footer |
| 34 | -include_once \XOOPS_ROOT_PATH.'/footer.php'; |
|
| 35 | 34 | \ No newline at end of file |
| 35 | +include_once \XOOPS_ROOT_PATH . '/footer.php'; |
|
| 36 | 36 | \ No newline at end of file |
@@ -57,12 +57,12 @@ discard block |
||
| 57 | 57 | echo "<versions>\n"; |
| 58 | 58 | foreach (\array_keys($versions_arr) as $i) { |
| 59 | 59 | echo "\t<version>\n"; |
| 60 | - echo "\t<version_id>".$versions_arr[$i]->getVar('version_id')."</version_id>\n"; |
|
| 61 | - echo "\t<version_name>".$versions_arr[$i]->getVar('version_name')."</version_name>\n"; |
|
| 62 | - echo "\t<version_lang>".$versions_arr[$i]->getVar('version_lang')."</version_lang>\n"; |
|
| 63 | - echo "\t<version_descr>".$versions_arr[$i]->getVar('version_descr')."</version_descr>\n"; |
|
| 64 | - echo "\t<version_author>".$versions_arr[$i]->getVar('version_author')."</version_author>\n"; |
|
| 65 | - echo "\t<version_date>".$versions_arr[$i]->getVar('version_date')."</version_date>\n"; |
|
| 60 | + echo "\t<version_id>" . $versions_arr[$i]->getVar('version_id') . "</version_id>\n"; |
|
| 61 | + echo "\t<version_name>" . $versions_arr[$i]->getVar('version_name') . "</version_name>\n"; |
|
| 62 | + echo "\t<version_lang>" . $versions_arr[$i]->getVar('version_lang') . "</version_lang>\n"; |
|
| 63 | + echo "\t<version_descr>" . $versions_arr[$i]->getVar('version_descr') . "</version_descr>\n"; |
|
| 64 | + echo "\t<version_author>" . $versions_arr[$i]->getVar('version_author') . "</version_author>\n"; |
|
| 65 | + echo "\t<version_date>" . $versions_arr[$i]->getVar('version_date') . "</version_date>\n"; |
|
| 66 | 66 | |
| 67 | 67 | if ($version_id > 0) { |
| 68 | 68 | echo "\t\t<contents>\n"; |
@@ -76,14 +76,14 @@ discard block |
||
| 76 | 76 | if ($contents_rows > 0) { |
| 77 | 77 | foreach (\array_keys($contents_arr) as $j) { |
| 78 | 78 | echo "\t\t\t<content>\n"; |
| 79 | - echo "\t\t\t\t<cont_id>".$contents_arr[$j]->getVar('cont_id')."</cont_id>\n"; |
|
| 80 | - echo "\t\t\t\t<cont_version_id>".$contents_arr[$j]->getVar('cont_version_id')."</cont_version_id>\n"; |
|
| 79 | + echo "\t\t\t\t<cont_id>" . $contents_arr[$j]->getVar('cont_id') . "</cont_id>\n"; |
|
| 80 | + echo "\t\t\t\t<cont_version_id>" . $contents_arr[$j]->getVar('cont_version_id') . "</cont_version_id>\n"; |
|
| 81 | 81 | $xml = $contents_arr[$j]->getVar('cont_header'); |
| 82 | - echo "\t\t\t\t<cont_header>".text2xml($xml)."</cont_header>\n"; |
|
| 82 | + echo "\t\t\t\t<cont_header>" . text2xml($xml) . "</cont_header>\n"; |
|
| 83 | 83 | $xml = $contents_arr[$j]->getVar('cont_text', 'n'); |
| 84 | - echo "\t\t\t\t<cont_text>".text2xml($xml)."</cont_text>\n"; |
|
| 85 | - echo "\t\t\t\t<cont_weight>".$contents_arr[$j]->getVar('cont_weight')."</cont_weight>\n"; |
|
| 86 | - echo "\t\t\t\t<cont_date>".$contents_arr[$j]->getVar('cont_date')."</cont_date>\n"; |
|
| 84 | + echo "\t\t\t\t<cont_text>" . text2xml($xml) . "</cont_text>\n"; |
|
| 85 | + echo "\t\t\t\t<cont_weight>" . $contents_arr[$j]->getVar('cont_weight') . "</cont_weight>\n"; |
|
| 86 | + echo "\t\t\t\t<cont_date>" . $contents_arr[$j]->getVar('cont_date') . "</cont_date>\n"; |
|
| 87 | 87 | echo "\t\t\t</content>\n"; |
| 88 | 88 | } |
| 89 | 89 | } |
@@ -98,10 +98,10 @@ discard block |
||
| 98 | 98 | } |
| 99 | 99 | echo "</document>\n"; |
| 100 | 100 | |
| 101 | -function text2xml ($xml) { |
|
| 101 | +function text2xml($xml) { |
|
| 102 | 102 | // replace html tags e.g. in case of links in the text |
| 103 | 103 | $search = ['<', '>', '"']; |
| 104 | - $replace = ['<', '>', '"']; |
|
| 104 | + $replace = ['<', '>', '"']; |
|
| 105 | 105 | |
| 106 | 106 | return \str_replace($search, $replace, (string)$xml); |
| 107 | 107 | } |
@@ -80,9 +80,9 @@ discard block |
||
| 80 | 80 | $form = new \XoopsThemeForm($title, 'form', $action, 'post', true); |
| 81 | 81 | $form->setExtra('enctype="multipart/form-data"'); |
| 82 | 82 | // Form Text version_name |
| 83 | - $form->addElement( new \XoopsFormText(\_AM_WGSITENOTICE_VERSION_NAME, 'version_name', 50, 255, $this->getVar('version_name')), true ); |
|
| 83 | + $form->addElement(new \XoopsFormText(\_AM_WGSITENOTICE_VERSION_NAME, 'version_name', 50, 255, $this->getVar('version_name')), true); |
|
| 84 | 84 | // Form Text version_lang |
| 85 | - $form->addElement( new \XoopsFormText(\_AM_WGSITENOTICE_VERSION_LANG, 'version_lang', 50, 255, $this->getVar('version_lang')) ); |
|
| 85 | + $form->addElement(new \XoopsFormText(\_AM_WGSITENOTICE_VERSION_LANG, 'version_lang', 50, 255, $this->getVar('version_lang'))); |
|
| 86 | 86 | // Form Text Area |
| 87 | 87 | // Form Dhtml Text Area |
| 88 | 88 | $editor_configs = []; |
@@ -93,18 +93,18 @@ discard block |
||
| 93 | 93 | $editor_configs['width'] = '100%'; |
| 94 | 94 | $editor_configs['height'] = '400px'; |
| 95 | 95 | $editor_configs['editor'] = $helper->getConfig('wgsitenotice_editor'); |
| 96 | - $form->addElement( new \XoopsFormEditor(\_AM_WGSITENOTICE_VERSION_DESCR, 'version_descr', $editor_configs) ); |
|
| 96 | + $form->addElement(new \XoopsFormEditor(\_AM_WGSITENOTICE_VERSION_DESCR, 'version_descr', $editor_configs)); |
|
| 97 | 97 | // Form Text version_author |
| 98 | 98 | $version_author = $this->isNew() ? $GLOBALS['xoopsUser']->getVar('uname') : $this->getVar('version_author'); |
| 99 | - $form->addElement( new \XoopsFormText(\_AM_WGSITENOTICE_VERSION_AUTHOR, 'version_author', 50, 255, $version_author) ); |
|
| 99 | + $form->addElement(new \XoopsFormText(\_AM_WGSITENOTICE_VERSION_AUTHOR, 'version_author', 50, 255, $version_author)); |
|
| 100 | 100 | // Form Text version_weight |
| 101 | - $form->addElement( new \XoopsFormHidden('version_weight', $this->getVar('version_weight')) ); |
|
| 101 | + $form->addElement(new \XoopsFormHidden('version_weight', $this->getVar('version_weight'))); |
|
| 102 | 102 | // Form Radio Yes/No version_current |
| 103 | 103 | $version_current = $this->isNew() ? 0 : $this->getVar('version_current'); |
| 104 | - $form->addElement( new \XoopsFormRadioYN(\_AM_WGSITENOTICE_VERSION_CURRENT, 'version_current', $version_current), true ); |
|
| 104 | + $form->addElement(new \XoopsFormRadioYN(\_AM_WGSITENOTICE_VERSION_CURRENT, 'version_current', $version_current), true); |
|
| 105 | 105 | // Form Radio Yes/No |
| 106 | 106 | $version_online = $this->isNew() ? 0 : $this->getVar('version_online'); |
| 107 | - $form->addElement( new \XoopsFormRadioYN(\_AM_WGSITENOTICE_VERSION_ONLINE, 'version_online', $version_online), true ); |
|
| 107 | + $form->addElement(new \XoopsFormRadioYN(\_AM_WGSITENOTICE_VERSION_ONLINE, 'version_online', $version_online), true); |
|
| 108 | 108 | // Form Text Date Select |
| 109 | 109 | //$form->addElement( new \XoopsFormTextDateSelect(\_AM_WGSITENOTICE_VERSION_DATE, 'version_date', '', $this->getVar('version_date')), true ); |
| 110 | 110 | // Send |