@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | |
| 25 | 25 | //defined('XOOPS_ROOT_PATH') || die('XOOPS root path not defined'); |
| 26 | 26 | |
| 27 | -require_once dirname(dirname(dirname(dirname(__DIR__)))) . '/mainfile.php'; |
|
| 27 | +require_once dirname(dirname(dirname(dirname(__DIR__)))).'/mainfile.php'; |
|
| 28 | 28 | $moduleDirName = basename(dirname(dirname(__DIR__))); |
| 29 | 29 | $moduleDirNameUpper = mb_strtoupper($moduleDirName); |
| 30 | 30 | xoops_loadLanguage('directorychecker', $moduleDirName); |
@@ -56,38 +56,38 @@ discard block |
||
| 56 | 56 | $moduleDirNameUpper = mb_strtoupper($moduleDirName); |
| 57 | 57 | if (!@is_dir($path)) { |
| 58 | 58 | $path_status = "<img src='$pathIcon16/0.png' >"; |
| 59 | - $path_status .= "$path (" . constant('CO_' . $moduleDirNameUpper . '_' . 'DC_NOTAVAILABLE') . ') '; |
|
| 60 | - $path_status .= "<form action='" . $_SERVER['SCRIPT_NAME'] . "' method='post'>"; |
|
| 59 | + $path_status .= "$path (".constant('CO_'.$moduleDirNameUpper.'_'.'DC_NOTAVAILABLE').') '; |
|
| 60 | + $path_status .= "<form action='".$_SERVER['SCRIPT_NAME']."' method='post'>"; |
|
| 61 | 61 | $path_status .= "<input type='hidden' name='op' value='createdir'>"; |
| 62 | 62 | $path_status .= "<input type='hidden' name='path' value='$path'>"; |
| 63 | 63 | $path_status .= "<input type='hidden' name='redirect' value='$redirectFile'>"; |
| 64 | - $path_status .= "<button class='submit' onClick='this.form.submit();'>" . constant('CO_' . $moduleDirNameUpper . '_' . 'DC_CREATETHEDIR') . '</button>'; |
|
| 64 | + $path_status .= "<button class='submit' onClick='this.form.submit();'>".constant('CO_'.$moduleDirNameUpper.'_'.'DC_CREATETHEDIR').'</button>'; |
|
| 65 | 65 | $path_status .= '</form>'; |
| 66 | 66 | } elseif (@is_writable($path)) { |
| 67 | 67 | $path_status = "<img src='$pathIcon16/1.png' >"; |
| 68 | - $path_status .= "$path (" . constant('CO_' . $moduleDirNameUpper . '_' . 'DC_AVAILABLE') . ') '; |
|
| 68 | + $path_status .= "$path (".constant('CO_'.$moduleDirNameUpper.'_'.'DC_AVAILABLE').') '; |
|
| 69 | 69 | $currentMode = mb_substr(decoct(fileperms($path)), 2); |
| 70 | 70 | if ($currentMode != decoct($mode)) { |
| 71 | 71 | $path_status = "<img src='$pathIcon16/0.png' >"; |
| 72 | - $path_status .= $path . sprintf(constant('CO_' . $moduleDirNameUpper . '_' . 'DC_NOTWRITABLE'), decoct($mode), $currentMode); |
|
| 73 | - $path_status .= "<form action='" . $_SERVER['SCRIPT_NAME'] . "' method='post'>"; |
|
| 72 | + $path_status .= $path.sprintf(constant('CO_'.$moduleDirNameUpper.'_'.'DC_NOTWRITABLE'), decoct($mode), $currentMode); |
|
| 73 | + $path_status .= "<form action='".$_SERVER['SCRIPT_NAME']."' method='post'>"; |
|
| 74 | 74 | $path_status .= "<input type='hidden' name='op' value='setdirperm'>"; |
| 75 | 75 | $path_status .= "<input type='hidden' name='mode' value='$mode'>"; |
| 76 | 76 | $path_status .= "<input type='hidden' name='path' value='$path'>"; |
| 77 | 77 | $path_status .= "<input type='hidden' name='redirect' value='$redirectFile'>"; |
| 78 | - $path_status .= "<button class='submit' onClick='this.form.submit();'>" . constant('CO_' . $moduleDirNameUpper . '_' . 'DC_SETMPERM') . '</button>'; |
|
| 78 | + $path_status .= "<button class='submit' onClick='this.form.submit();'>".constant('CO_'.$moduleDirNameUpper.'_'.'DC_SETMPERM').'</button>'; |
|
| 79 | 79 | $path_status .= '</form>'; |
| 80 | 80 | } |
| 81 | 81 | } else { |
| 82 | 82 | $currentMode = mb_substr(decoct(fileperms($path)), 2); |
| 83 | 83 | $path_status = "<img src='$pathIcon16/0.png' >"; |
| 84 | - $path_status .= $path . sprintf(constant('CO_' . $moduleDirNameUpper . '_' . 'DC_NOTWRITABLE'), decoct($mode), $currentMode); |
|
| 85 | - $path_status .= "<form action='" . $_SERVER['SCRIPT_NAME'] . "' method='post'>"; |
|
| 84 | + $path_status .= $path.sprintf(constant('CO_'.$moduleDirNameUpper.'_'.'DC_NOTWRITABLE'), decoct($mode), $currentMode); |
|
| 85 | + $path_status .= "<form action='".$_SERVER['SCRIPT_NAME']."' method='post'>"; |
|
| 86 | 86 | $path_status .= "<input type='hidden' name='op' value='setdirperm'>"; |
| 87 | 87 | $path_status .= "<input type='hidden' name='mode' value='$mode'>"; |
| 88 | 88 | $path_status .= "<input type='hidden' name='path' value='$path'>"; |
| 89 | 89 | $path_status .= "<input type='hidden' name='redirect' value='$redirectFile'>"; |
| 90 | - $path_status .= "<button class='submit' onClick='this.form.submit();'>" . constant('CO_' . $moduleDirNameUpper . '_' . 'DC_SETMPERM') . '</button>'; |
|
| 90 | + $path_status .= "<button class='submit' onClick='this.form.submit();'>".constant('CO_'.$moduleDirNameUpper.'_'.'DC_SETMPERM').'</button>'; |
|
| 91 | 91 | $path_status .= '</form>'; |
| 92 | 92 | } |
| 93 | 93 | |
@@ -141,8 +141,8 @@ discard block |
||
| 141 | 141 | if (\Xmf\Request::hasVar('redirect', 'POST')) { |
| 142 | 142 | $redirect = $_POST['redirect']; |
| 143 | 143 | } |
| 144 | - $msg = DirectoryChecker::createDirectory($path) ? constant('CO_' . $moduleDirNameUpper . '_' . 'DC_DIRCREATED') : constant('CO_' . $moduleDirNameUpper . '_' . 'DC_DIRNOTCREATED'); |
|
| 145 | - redirect_header($redirect, 2, $msg . ': ' . $path); |
|
| 144 | + $msg = DirectoryChecker::createDirectory($path) ? constant('CO_'.$moduleDirNameUpper.'_'.'DC_DIRCREATED') : constant('CO_'.$moduleDirNameUpper.'_'.'DC_DIRNOTCREATED'); |
|
| 145 | + redirect_header($redirect, 2, $msg.': '.$path); |
|
| 146 | 146 | break; |
| 147 | 147 | case 'setdirperm': |
| 148 | 148 | if (\Xmf\Request::hasVar('path', 'POST')) { |
@@ -154,7 +154,7 @@ discard block |
||
| 154 | 154 | if (\Xmf\Request::hasVar('mode', 'POST')) { |
| 155 | 155 | $mode = $_POST['mode']; |
| 156 | 156 | } |
| 157 | - $msg = DirectoryChecker::setDirectoryPermissions($path, $mode) ? constant('CO_' . $moduleDirNameUpper . '_' . 'DC_PERMSET') : constant('CO_' . $moduleDirNameUpper . '_' . 'DC_PERMNOTSET'); |
|
| 158 | - redirect_header($redirect, 2, $msg . ': ' . $path); |
|
| 157 | + $msg = DirectoryChecker::setDirectoryPermissions($path, $mode) ? constant('CO_'.$moduleDirNameUpper.'_'.'DC_PERMSET') : constant('CO_'.$moduleDirNameUpper.'_'.'DC_PERMNOTSET'); |
|
| 158 | + redirect_header($redirect, 2, $msg.': '.$path); |
|
| 159 | 159 | break; |
| 160 | 160 | } |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | throw new \RuntimeException(sprintf('Unable to create the %s directory', $folder)); |
| 35 | 35 | } |
| 36 | 36 | |
| 37 | - file_put_contents($folder . '/index.html', '<script>history.go(-1);</script>'); |
|
| 37 | + file_put_contents($folder.'/index.html', '<script>history.go(-1);</script>'); |
|
| 38 | 38 | } |
| 39 | 39 | } catch (\Exception $e) { |
| 40 | 40 | echo 'Caught exception: ', $e->getMessage(), '<br>'; |
@@ -60,14 +60,14 @@ discard block |
||
| 60 | 60 | $dir = opendir($src); |
| 61 | 61 | // @mkdir($dst); |
| 62 | 62 | if (!@mkdir($dst) && !is_dir($dst)) { |
| 63 | - throw new \RuntimeException('The directory ' . $dst . ' could not be created.'); |
|
| 63 | + throw new \RuntimeException('The directory '.$dst.' could not be created.'); |
|
| 64 | 64 | } |
| 65 | 65 | while (false !== ($file = readdir($dir))) { |
| 66 | 66 | if (('.' !== $file) && ('..' !== $file)) { |
| 67 | - if (is_dir($src . '/' . $file)) { |
|
| 68 | - self::recurseCopy($src . '/' . $file, $dst . '/' . $file); |
|
| 67 | + if (is_dir($src.'/'.$file)) { |
|
| 68 | + self::recurseCopy($src.'/'.$file, $dst.'/'.$file); |
|
| 69 | 69 | } else { |
| 70 | - copy($src . '/' . $file, $dst . '/' . $file); |
|
| 70 | + copy($src.'/'.$file, $dst.'/'.$file); |
|
| 71 | 71 | } |
| 72 | 72 | } |
| 73 | 73 | } |
@@ -203,7 +203,7 @@ discard block |
||
| 203 | 203 | self::rrmdir($fObj->getPathname()); |
| 204 | 204 | } |
| 205 | 205 | } |
| 206 | - $iterator = null; // clear iterator Obj to close file/directory |
|
| 206 | + $iterator = null; // clear iterator Obj to close file/directory |
|
| 207 | 207 | return rmdir($src); // remove the directory & return results |
| 208 | 208 | } |
| 209 | 209 | |
@@ -236,14 +236,14 @@ discard block |
||
| 236 | 236 | $iterator = new \DirectoryIterator($src); |
| 237 | 237 | foreach ($iterator as $fObj) { |
| 238 | 238 | if ($fObj->isFile()) { |
| 239 | - rename($fObj->getPathname(), "{$dest}/" . $fObj->getFilename()); |
|
| 239 | + rename($fObj->getPathname(), "{$dest}/".$fObj->getFilename()); |
|
| 240 | 240 | } elseif (!$fObj->isDot() && $fObj->isDir()) { |
| 241 | 241 | // Try recursively on directory |
| 242 | - self::rmove($fObj->getPathname(), "{$dest}/" . $fObj->getFilename()); |
|
| 242 | + self::rmove($fObj->getPathname(), "{$dest}/".$fObj->getFilename()); |
|
| 243 | 243 | // rmdir($fObj->getPath()); // now delete the directory |
| 244 | 244 | } |
| 245 | 245 | } |
| 246 | - $iterator = null; // clear iterator Obj to close file/directory |
|
| 246 | + $iterator = null; // clear iterator Obj to close file/directory |
|
| 247 | 247 | return rmdir($src); // remove the directory & return results |
| 248 | 248 | } |
| 249 | 249 | |
@@ -279,9 +279,9 @@ discard block |
||
| 279 | 279 | $iterator = new \DirectoryIterator($src); |
| 280 | 280 | foreach ($iterator as $fObj) { |
| 281 | 281 | if ($fObj->isFile()) { |
| 282 | - copy($fObj->getPathname(), "{$dest}/" . $fObj->getFilename()); |
|
| 282 | + copy($fObj->getPathname(), "{$dest}/".$fObj->getFilename()); |
|
| 283 | 283 | } elseif (!$fObj->isDot() && $fObj->isDir()) { |
| 284 | - self::rcopy($fObj->getPathname(), "{$dest}/" . $fObj->getFilename()); |
|
| 284 | + self::rcopy($fObj->getPathname(), "{$dest}/".$fObj->getFilename()); |
|
| 285 | 285 | } |
| 286 | 286 | } |
| 287 | 287 | |
@@ -40,13 +40,13 @@ discard block |
||
| 40 | 40 | //check for minimum XOOPS version |
| 41 | 41 | $currentVer = mb_substr(XOOPS_VERSION, 6); // get the numeric part of string |
| 42 | 42 | if (null === $requiredVer) { |
| 43 | - $requiredVer = '' . $module->getInfo('min_xoops'); //making sure it's a string |
|
| 43 | + $requiredVer = ''.$module->getInfo('min_xoops'); //making sure it's a string |
|
| 44 | 44 | } |
| 45 | 45 | $success = true; |
| 46 | 46 | |
| 47 | 47 | if (version_compare($currentVer, $requiredVer, '<')) { |
| 48 | 48 | $success = false; |
| 49 | - $module->setErrors(sprintf(constant('CO_' . $moduleDirNameUpper . '_ERROR_BAD_XOOPS'), $requiredVer, $currentVer)); |
|
| 49 | + $module->setErrors(sprintf(constant('CO_'.$moduleDirNameUpper.'_ERROR_BAD_XOOPS'), $requiredVer, $currentVer)); |
|
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | return $success; |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | |
| 78 | 78 | if (false !== $reqVer && '' !== $reqVer && !is_array($reqVer)) { |
| 79 | 79 | if (version_compare($verNum, $reqVer, '<')) { |
| 80 | - $module->setErrors(sprintf(constant('CO_' . $moduleDirNameUpper . '_ERROR_BAD_PHP'), $reqVer, $verNum)); |
|
| 80 | + $module->setErrors(sprintf(constant('CO_'.$moduleDirNameUpper.'_ERROR_BAD_PHP'), $reqVer, $verNum)); |
|
| 81 | 81 | $success = false; |
| 82 | 82 | } |
| 83 | 83 | } |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | $moduleDirName = basename(dirname(dirname(__DIR__))); |
| 100 | 100 | $moduleDirNameUpper = mb_strtoupper($moduleDirName); |
| 101 | 101 | $update = ''; |
| 102 | - $repository = 'XoopsModules25x/' . $moduleDirName; |
|
| 102 | + $repository = 'XoopsModules25x/'.$moduleDirName; |
|
| 103 | 103 | // $repository = 'XoopsModules25x/publisher'; //for testing only |
| 104 | 104 | $ret = ''; |
| 105 | 105 | $infoReleasesUrl = "https://api.github.com/repos/$repository/releases"; |
@@ -113,14 +113,14 @@ discard block |
||
| 113 | 113 | if (false === $curlReturn) { |
| 114 | 114 | trigger_error(curl_error($curlHandle)); |
| 115 | 115 | } elseif (false !== mb_strpos($curlReturn, 'Not Found')) { |
| 116 | - trigger_error('Repository Not Found: ' . $infoReleasesUrl); |
|
| 116 | + trigger_error('Repository Not Found: '.$infoReleasesUrl); |
|
| 117 | 117 | } else { |
| 118 | 118 | $file = json_decode($curlReturn, false); |
| 119 | 119 | $latestVersionLink = sprintf("https://github.com/$repository/archive/%s.zip", $file ? reset($file)->tag_name : $default); |
| 120 | 120 | $latestVersion = $file[0]->tag_name; |
| 121 | 121 | $prerelease = $file[0]->prerelease; |
| 122 | 122 | if ('master' !== $latestVersionLink) { |
| 123 | - $update = constant('CO_' . $moduleDirNameUpper . '_' . 'NEW_VERSION') . $latestVersion; |
|
| 123 | + $update = constant('CO_'.$moduleDirNameUpper.'_'.'NEW_VERSION').$latestVersion; |
|
| 124 | 124 | } |
| 125 | 125 | //"PHP-standardized" version |
| 126 | 126 | $latestVersion = mb_strtolower($latestVersion); |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | $latestVersion = str_replace('_', '', mb_strtolower($latestVersion)); |
| 129 | 129 | $latestVersion = str_replace('final', '', mb_strtolower($latestVersion)); |
| 130 | 130 | } |
| 131 | - $moduleVersion = ($helper->getModule()->getInfo('version') . '_' . $helper->getModule()->getInfo('module_status')); |
|
| 131 | + $moduleVersion = ($helper->getModule()->getInfo('version').'_'.$helper->getModule()->getInfo('module_status')); |
|
| 132 | 132 | //"PHP-standardized" version |
| 133 | 133 | $moduleVersion = str_replace(' ', '', mb_strtolower($moduleVersion)); |
| 134 | 134 | // $moduleVersion = '1.0'; //for testing only |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | |
| 25 | 25 | //defined('XOOPS_ROOT_PATH') || die('XOOPS root path not defined'); |
| 26 | 26 | |
| 27 | -require_once dirname(dirname(dirname(dirname(__DIR__)))) . '/mainfile.php'; |
|
| 27 | +require_once dirname(dirname(dirname(dirname(__DIR__)))).'/mainfile.php'; |
|
| 28 | 28 | $moduleDirName = basename(dirname(dirname(__DIR__))); |
| 29 | 29 | $moduleDirNameUpper = mb_strtoupper($moduleDirName); |
| 30 | 30 | xoops_loadLanguage('filechecker', $moduleDirName); |
@@ -56,24 +56,24 @@ discard block |
||
| 56 | 56 | if (null === $original_file_path) { |
| 57 | 57 | if (self::fileExists($file_path)) { |
| 58 | 58 | $path_status = "<img src='$pathIcon16/1.png' >"; |
| 59 | - $path_status .= "$file_path (" . constant('CO_' . $moduleDirNameUpper . '_' . 'FC_AVAILABLE') . ') '; |
|
| 59 | + $path_status .= "$file_path (".constant('CO_'.$moduleDirNameUpper.'_'.'FC_AVAILABLE').') '; |
|
| 60 | 60 | } else { |
| 61 | 61 | $path_status = "<img src='$pathIcon16/0.png' >"; |
| 62 | - $path_status .= "$file_path (" . constant('CO_' . $moduleDirNameUpper . '_' . 'FC_NOTAVAILABLE') . ') '; |
|
| 62 | + $path_status .= "$file_path (".constant('CO_'.$moduleDirNameUpper.'_'.'FC_NOTAVAILABLE').') '; |
|
| 63 | 63 | } |
| 64 | 64 | } else { |
| 65 | 65 | if (self::compareFiles($file_path, $original_file_path)) { |
| 66 | 66 | $path_status = "<img src='$pathIcon16/1.png' >"; |
| 67 | - $path_status .= "$file_path (" . constant('CO_' . $moduleDirNameUpper . '_' . 'FC_AVAILABLE') . ') '; |
|
| 67 | + $path_status .= "$file_path (".constant('CO_'.$moduleDirNameUpper.'_'.'FC_AVAILABLE').') '; |
|
| 68 | 68 | } else { |
| 69 | 69 | $path_status = "<img src='$pathIcon16/0.png' >"; |
| 70 | - $path_status .= "$file_path (" . constant('CO_' . $moduleDirNameUpper . '_' . 'FC_NOTAVAILABLE') . ') '; |
|
| 71 | - $path_status .= "<form action='" . $_SERVER['SCRIPT_NAME'] . "' method='post'>"; |
|
| 70 | + $path_status .= "$file_path (".constant('CO_'.$moduleDirNameUpper.'_'.'FC_NOTAVAILABLE').') '; |
|
| 71 | + $path_status .= "<form action='".$_SERVER['SCRIPT_NAME']."' method='post'>"; |
|
| 72 | 72 | $path_status .= "<input type='hidden' name='op' value='copyfile'>"; |
| 73 | 73 | $path_status .= "<input type='hidden' name='file_path' value='$file_path'>"; |
| 74 | 74 | $path_status .= "<input type='hidden' name='original_file_path' value='$original_file_path'>"; |
| 75 | 75 | $path_status .= "<input type='hidden' name='redirect' value='$redirectFile'>"; |
| 76 | - $path_status .= "<button class='submit' onClick='this.form.submit();'>" . constant('CO_' . $moduleDirNameUpper . '_' . 'FC_CREATETHEFILE') . '</button>'; |
|
| 76 | + $path_status .= "<button class='submit' onClick='this.form.submit();'>".constant('CO_'.$moduleDirNameUpper.'_'.'FC_CREATETHEFILE').'</button>'; |
|
| 77 | 77 | $path_status .= '</form>'; |
| 78 | 78 | } |
| 79 | 79 | } |
@@ -154,7 +154,7 @@ discard block |
||
| 154 | 154 | if (\Xmf\Request::hasVar('redirect', 'POST')) { |
| 155 | 155 | $redirect = $_POST['redirect']; |
| 156 | 156 | } |
| 157 | - $msg = FileChecker::copyFile($original_file_path, $file_path) ? constant('CO_' . $moduleDirNameUpper . '_' . 'FC_FILECOPIED') : constant('CO_' . $moduleDirNameUpper . '_' . 'FC_FILENOTCOPIED'); |
|
| 158 | - redirect_header($redirect, 2, $msg . ': ' . $file_path); |
|
| 157 | + $msg = FileChecker::copyFile($original_file_path, $file_path) ? constant('CO_'.$moduleDirNameUpper.'_'.'FC_FILECOPIED') : constant('CO_'.$moduleDirNameUpper.'_'.'FC_FILENOTCOPIED'); |
|
| 158 | + redirect_header($redirect, 2, $msg.': '.$file_path); |
|
| 159 | 159 | break; |
| 160 | 160 | } |
@@ -51,7 +51,7 @@ |
||
| 51 | 51 | // require dirname(dirname(__DIR__)) . '/config/config.php'; |
| 52 | 52 | // $config = getConfig(); |
| 53 | 53 | |
| 54 | - $config = include dirname(dirname(__DIR__)) . '/config/config.php'; |
|
| 54 | + $config = include dirname(dirname(__DIR__)).'/config/config.php'; |
|
| 55 | 55 | |
| 56 | 56 | $this->name = $config->name; |
| 57 | 57 | $this->paths = $config->paths; |
@@ -71,29 +71,29 @@ discard block |
||
| 71 | 71 | $moduleDirNameUpper = mb_strtoupper($moduleDirName); |
| 72 | 72 | // Get Theme Form |
| 73 | 73 | xoops_load('XoopsFormLoader'); |
| 74 | - $form = new \XoopsThemeForm(constant('CO_' . $moduleDirNameUpper . '_' . 'FB_FORM_TITLE'), 'formfeedback', 'feedback.php', 'post', true); |
|
| 74 | + $form = new \XoopsThemeForm(constant('CO_'.$moduleDirNameUpper.'_'.'FB_FORM_TITLE'), 'formfeedback', 'feedback.php', 'post', true); |
|
| 75 | 75 | $form->setExtra('enctype="multipart/form-data"'); |
| 76 | 76 | |
| 77 | - $recipient = new \XoopsFormText(constant('CO_' . $moduleDirNameUpper . '_' . 'FB_RECIPIENT'), 'recipient', 50, 255, $GLOBALS['xoopsModule']->getInfo('author_mail')); |
|
| 77 | + $recipient = new \XoopsFormText(constant('CO_'.$moduleDirNameUpper.'_'.'FB_RECIPIENT'), 'recipient', 50, 255, $GLOBALS['xoopsModule']->getInfo('author_mail')); |
|
| 78 | 78 | $recipient->setExtra('disabled="disabled"'); |
| 79 | 79 | $form->addElement($recipient); |
| 80 | - $your_name = new \XoopsFormText(constant('CO_' . $moduleDirNameUpper . '_' . 'FB_NAME'), 'your_name', 50, 255, $this->name); |
|
| 81 | - $your_name->setExtra('placeholder="' . constant('CO_' . $moduleDirNameUpper . '_' . 'FB_NAME_PLACEHOLER') . '"'); |
|
| 80 | + $your_name = new \XoopsFormText(constant('CO_'.$moduleDirNameUpper.'_'.'FB_NAME'), 'your_name', 50, 255, $this->name); |
|
| 81 | + $your_name->setExtra('placeholder="'.constant('CO_'.$moduleDirNameUpper.'_'.'FB_NAME_PLACEHOLER').'"'); |
|
| 82 | 82 | $form->addElement($your_name); |
| 83 | - $your_site = new \XoopsFormText(constant('CO_' . $moduleDirNameUpper . '_' . 'FB_SITE'), 'your_site', 50, 255, $this->site); |
|
| 84 | - $your_site->setExtra('placeholder="' . constant('CO_' . $moduleDirNameUpper . '_' . 'FB_SITE_PLACEHOLER') . '"'); |
|
| 83 | + $your_site = new \XoopsFormText(constant('CO_'.$moduleDirNameUpper.'_'.'FB_SITE'), 'your_site', 50, 255, $this->site); |
|
| 84 | + $your_site->setExtra('placeholder="'.constant('CO_'.$moduleDirNameUpper.'_'.'FB_SITE_PLACEHOLER').'"'); |
|
| 85 | 85 | $form->addElement($your_site); |
| 86 | - $your_mail = new \XoopsFormText(constant('CO_' . $moduleDirNameUpper . '_' . 'FB_MAIL'), 'your_mail', 50, 255, $this->email); |
|
| 87 | - $your_mail->setExtra('placeholder="' . constant('CO_' . $moduleDirNameUpper . '_' . 'FB_MAIL_PLACEHOLER') . '"'); |
|
| 86 | + $your_mail = new \XoopsFormText(constant('CO_'.$moduleDirNameUpper.'_'.'FB_MAIL'), 'your_mail', 50, 255, $this->email); |
|
| 87 | + $your_mail->setExtra('placeholder="'.constant('CO_'.$moduleDirNameUpper.'_'.'FB_MAIL_PLACEHOLER').'"'); |
|
| 88 | 88 | $form->addElement($your_mail); |
| 89 | 89 | |
| 90 | - $fbtypeSelect = new \XoopsFormSelect(constant('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE'), 'fb_type', $this->type); |
|
| 90 | + $fbtypeSelect = new \XoopsFormSelect(constant('CO_'.$moduleDirNameUpper.'_'.'FB_TYPE'), 'fb_type', $this->type); |
|
| 91 | 91 | $fbtypeSelect->addOption('', ''); |
| 92 | - $fbtypeSelect->addOption(constant('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE_SUGGESTION'), constant('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE_SUGGESTION')); |
|
| 93 | - $fbtypeSelect->addOption(constant('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE_BUGS'), constant('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE_BUGS')); |
|
| 94 | - $fbtypeSelect->addOption(constant('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE_TESTIMONIAL'), constant('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE_TESTIMONIAL')); |
|
| 95 | - $fbtypeSelect->addOption(constant('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE_FEATURES'), constant('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE_FEATURES')); |
|
| 96 | - $fbtypeSelect->addOption(constant('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE_OTHERS'), constant('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE_OTHERS')); |
|
| 92 | + $fbtypeSelect->addOption(constant('CO_'.$moduleDirNameUpper.'_'.'FB_TYPE_SUGGESTION'), constant('CO_'.$moduleDirNameUpper.'_'.'FB_TYPE_SUGGESTION')); |
|
| 93 | + $fbtypeSelect->addOption(constant('CO_'.$moduleDirNameUpper.'_'.'FB_TYPE_BUGS'), constant('CO_'.$moduleDirNameUpper.'_'.'FB_TYPE_BUGS')); |
|
| 94 | + $fbtypeSelect->addOption(constant('CO_'.$moduleDirNameUpper.'_'.'FB_TYPE_TESTIMONIAL'), constant('CO_'.$moduleDirNameUpper.'_'.'FB_TYPE_TESTIMONIAL')); |
|
| 95 | + $fbtypeSelect->addOption(constant('CO_'.$moduleDirNameUpper.'_'.'FB_TYPE_FEATURES'), constant('CO_'.$moduleDirNameUpper.'_'.'FB_TYPE_FEATURES')); |
|
| 96 | + $fbtypeSelect->addOption(constant('CO_'.$moduleDirNameUpper.'_'.'FB_TYPE_OTHERS'), constant('CO_'.$moduleDirNameUpper.'_'.'FB_TYPE_OTHERS')); |
|
| 97 | 97 | $form->addElement($fbtypeSelect, true); |
| 98 | 98 | |
| 99 | 99 | $editorConfigs = []; |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | $configHandler = xoops_getHandler('config'); |
| 111 | 111 | $config = $configHandler->getConfigsByCat(0, $module->getVar('mid')); |
| 112 | 112 | $editorConfigs['editor'] = $config['general_editor']; |
| 113 | - $editor = new \XoopsFormEditor(constant('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE_CONTENT'), 'fb_content', $editorConfigs); |
|
| 113 | + $editor = new \XoopsFormEditor(constant('CO_'.$moduleDirNameUpper.'_'.'FB_TYPE_CONTENT'), 'fb_content', $editorConfigs); |
|
| 114 | 114 | $form->addElement($editor, true); |
| 115 | 115 | |
| 116 | 116 | $form->addElement(new \XoopsFormHidden('op', 'send')); |
@@ -17,11 +17,11 @@ |
||
| 17 | 17 | * @since |
| 18 | 18 | * @author XOOPS Development Team |
| 19 | 19 | */ |
| 20 | -include dirname(__DIR__) . '/preloads/autoloader.php'; |
|
| 20 | +include dirname(__DIR__).'/preloads/autoloader.php'; |
|
| 21 | 21 | |
| 22 | -require dirname(dirname(dirname(__DIR__))) . '/include/cp_header.php'; |
|
| 22 | +require dirname(dirname(dirname(__DIR__))).'/include/cp_header.php'; |
|
| 23 | 23 | //require $GLOBALS['xoops']->path('www/class/xoopsformloader.php'); |
| 24 | -require dirname(__DIR__) . '/include/common.php'; |
|
| 24 | +require dirname(__DIR__).'/include/common.php'; |
|
| 25 | 25 | |
| 26 | 26 | $moduleDirName = basename(dirname(__DIR__)); |
| 27 | 27 | |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | * @since |
| 18 | 18 | * @author XOOPS Development Team |
| 19 | 19 | */ |
| 20 | -include dirname(__DIR__) . '/preloads/autoloader.php'; |
|
| 20 | +include dirname(__DIR__).'/preloads/autoloader.php'; |
|
| 21 | 21 | |
| 22 | 22 | $moduleDirName = basename(dirname(__DIR__)); |
| 23 | 23 | $moduleDirNameUpper = mb_strtoupper($moduleDirName); |
@@ -36,23 +36,23 @@ discard block |
||
| 36 | 36 | $adminmenu[] = [ |
| 37 | 37 | 'title' => _MI_GROUPS_MENU_HOME, |
| 38 | 38 | 'link' => 'admin/index.php', |
| 39 | - 'icon' => $pathIcon32 . '/home.png', |
|
| 39 | + 'icon' => $pathIcon32.'/home.png', |
|
| 40 | 40 | ]; |
| 41 | 41 | |
| 42 | 42 | $adminmenu[] = [ |
| 43 | 43 | 'title' => _MI_GROUPS_MENU_01, |
| 44 | 44 | 'link' => 'admin/main.php', |
| 45 | - 'icon' => $pathIcon32 . '/manage.png', |
|
| 45 | + 'icon' => $pathIcon32.'/manage.png', |
|
| 46 | 46 | ]; |
| 47 | 47 | |
| 48 | 48 | $adminmenu[] = [ |
| 49 | 49 | 'title' => _MI_GROUPS_MENU_02, |
| 50 | 50 | 'link' => 'admin/perm.php', |
| 51 | - 'icon' => $pathIcon32 . '/permissions.png', |
|
| 51 | + 'icon' => $pathIcon32.'/permissions.png', |
|
| 52 | 52 | ]; |
| 53 | 53 | |
| 54 | 54 | $adminmenu[] = [ |
| 55 | 55 | 'title' => _MI_GROUPS_MENU_ABOUT, |
| 56 | 56 | 'link' => 'admin/about.php', |
| 57 | - 'icon' => $pathIcon32 . '/about.png', |
|
| 57 | + 'icon' => $pathIcon32.'/about.png', |
|
| 58 | 58 | ]; |
@@ -26,10 +26,10 @@ discard block |
||
| 26 | 26 | // ------------------------------------------------------------------------ // |
| 27 | 27 | // |
| 28 | 28 | |
| 29 | -require_once dirname(dirname(dirname(__DIR__))) . '/include/cp_header.php'; |
|
| 30 | -require_once __DIR__ . '/admin_header.php'; |
|
| 29 | +require_once dirname(dirname(dirname(__DIR__))).'/include/cp_header.php'; |
|
| 30 | +require_once __DIR__.'/admin_header.php'; |
|
| 31 | 31 | |
| 32 | -require_once XOOPS_ROOT_PATH . '/class/template.php'; |
|
| 32 | +require_once XOOPS_ROOT_PATH.'/class/template.php'; |
|
| 33 | 33 | if (!isset($xoopsTpl)) { |
| 34 | 34 | $xoopsTpl = new XoopsTpl(); |
| 35 | 35 | } |
@@ -40,12 +40,12 @@ discard block |
||
| 40 | 40 | // CHECK IF SUBMIT WAS PRESSED |
| 41 | 41 | if (isset($_POST['add_x']) || isset($_POST['del_x'])) { |
| 42 | 42 | if (isset($_POST['add_x'])) { |
| 43 | - $memberHandler = xoops_getHandler('member'); |
|
| 43 | + $memberHandler = xoops_getHandler('member'); |
|
| 44 | 44 | $membership = $memberHandler->addUserToGroup($_POST['groupid'], $_POST['all']); |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | if (isset($_POST['del_x'])) { |
| 48 | - $memberHandler = xoops_getHandler('member'); |
|
| 48 | + $memberHandler = xoops_getHandler('member'); |
|
| 49 | 49 | $membership = $memberHandler->removeUsersFromGroup($_POST['groupid'], [$_POST['curr']]); |
| 50 | 50 | } |
| 51 | 51 | } |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | //----------------*/ |
| 109 | 109 | |
| 110 | 110 | $uids = $memberHandler->getUsersByGroup($id); |
| 111 | - $criteria = new Criteria('uid', '(' . implode(',', $uids) . ')', 'IN'); |
|
| 111 | + $criteria = new Criteria('uid', '('.implode(',', $uids).')', 'IN'); |
|
| 112 | 112 | $criteria->setSort('uname'); |
| 113 | 113 | $users = $memberHandler->getUserList($criteria); |
| 114 | 114 | |
@@ -136,5 +136,5 @@ discard block |
||
| 136 | 136 | |
| 137 | 137 | $xoopsTpl->display('db:gm_main.tpl'); |
| 138 | 138 | |
| 139 | -require_once __DIR__ . '/admin_footer.php'; |
|
| 139 | +require_once __DIR__.'/admin_footer.php'; |
|
| 140 | 140 | //xoops_cp_footer(); |