@@ -146,14 +146,14 @@ discard block |
||
| 146 | 146 | $max_height_resize = $this->maxHeight; |
| 147 | 147 | if ($original_w > $original_h) {
|
| 148 | 148 | $max_height_ratio = $this->maxHeight / $original_h; |
| 149 | - $max_width_resize = (int)\round($original_w * $max_height_ratio); |
|
| 149 | + $max_width_resize = (int) \round($original_w * $max_height_ratio); |
|
| 150 | 150 | } else {
|
| 151 | 151 | $max_width_ratio = $this->maxWidth / $original_w; |
| 152 | - $max_height_resize = (int)\round($original_h * $max_width_ratio); |
|
| 152 | + $max_height_resize = (int) \round($original_h * $max_width_ratio); |
|
| 153 | 153 | } |
| 154 | 154 | if ($max_width_resize < $this->maxWidth) {
|
| 155 | 155 | $max_height_ratio = $this->maxWidth / $max_width_resize; |
| 156 | - $max_height_resize = (int)\round($this->maxHeight * $max_height_ratio); |
|
| 156 | + $max_height_resize = (int) \round($this->maxHeight * $max_height_ratio); |
|
| 157 | 157 | $max_width_resize = $this->maxWidth; |
| 158 | 158 | } |
| 159 | 159 | |
@@ -168,9 +168,9 @@ discard block |
||
| 168 | 168 | $max_width_offset = 0; |
| 169 | 169 | $max_height_offset = 0; |
| 170 | 170 | if ($this->maxWidth < $max_width_resize) {
|
| 171 | - $max_width_offset = (int)\round(($max_width_resize - $this->maxWidth) / 2); |
|
| 171 | + $max_width_offset = (int) \round(($max_width_resize - $this->maxWidth) / 2); |
|
| 172 | 172 | } else {
|
| 173 | - $max_height_offset = (int)\round(($max_height_resize - $this->maxHeight) / 2); |
|
| 173 | + $max_height_offset = (int) \round(($max_height_resize - $this->maxHeight) / 2); |
|
| 174 | 174 | } |
| 175 | 175 | |
| 176 | 176 | if (!imagecopy($final, $thumb, 0, 0, $max_width_offset, $max_height_offset, $max_width_resize, $max_height_resize)) {
|
@@ -189,10 +189,10 @@ discard block |
||
| 189 | 189 | $dest = \imagecreatefromjpeg($this->endFile); |
| 190 | 190 | $src = \imagecreatefromjpeg($this->sourceFile); |
| 191 | 191 | if (4 == $this->mergeType) {
|
| 192 | - $imgWidth = (int)\round($this->maxWidth / 2 - 1); |
|
| 193 | - $imgHeight = (int)\round($this->maxHeight / 2 - 1); |
|
| 194 | - $posCol2 = (int)\round($this->maxWidth / 2 + 1); |
|
| 195 | - $posRow2 = (int)\round($this->maxHeight / 2 + 1); |
|
| 192 | + $imgWidth = (int) \round($this->maxWidth / 2 - 1); |
|
| 193 | + $imgHeight = (int) \round($this->maxHeight / 2 - 1); |
|
| 194 | + $posCol2 = (int) \round($this->maxWidth / 2 + 1); |
|
| 195 | + $posRow2 = (int) \round($this->maxHeight / 2 + 1); |
|
| 196 | 196 | switch ($this->mergePos) {
|
| 197 | 197 | case 1: |
| 198 | 198 | imagecopy($dest, $src, 0, 0, 0, 0, $imgWidth, $imgHeight); //top left |
@@ -209,11 +209,11 @@ discard block |
||
| 209 | 209 | } |
| 210 | 210 | } |
| 211 | 211 | if (6 == $this->mergeType) {
|
| 212 | - $imgWidth = (int)\round($this->maxWidth / 3 - 1); |
|
| 213 | - $imgHeight = (int)\round($this->maxHeight / 2 - 1); |
|
| 214 | - $posCol2 = (int)\round($this->maxWidth / 3 + 1); |
|
| 215 | - $posCol3 = $posCol2 + (int)\round($this->maxWidth / 3 + 1); |
|
| 216 | - $posRow2 = (int)\round($this->maxHeight / 2 + 1); |
|
| 212 | + $imgWidth = (int) \round($this->maxWidth / 3 - 1); |
|
| 213 | + $imgHeight = (int) \round($this->maxHeight / 2 - 1); |
|
| 214 | + $posCol2 = (int) \round($this->maxWidth / 3 + 1); |
|
| 215 | + $posCol3 = $posCol2 + (int) \round($this->maxWidth / 3 + 1); |
|
| 216 | + $posRow2 = (int) \round($this->maxHeight / 2 + 1); |
|
| 217 | 217 | |
| 218 | 218 | switch ($this->mergePos) {
|
| 219 | 219 | case 1: |
@@ -67,29 +67,29 @@ discard block |
||
| 67 | 67 | $moduleDirNameUpper = \mb_strtoupper($moduleDirName); |
| 68 | 68 | // Get Theme Form |
| 69 | 69 | \xoops_load('XoopsFormLoader');
|
| 70 | - $form = new \XoopsThemeForm(\constant('CO_' . $moduleDirNameUpper . '_' . 'FB_FORM_TITLE'), 'formfeedback', 'feedback.php', 'post', true);
|
|
| 70 | + $form = new \XoopsThemeForm(\constant('CO_'.$moduleDirNameUpper.'_'.'FB_FORM_TITLE'), 'formfeedback', 'feedback.php', 'post', true);
|
|
| 71 | 71 | $form->setExtra('enctype="multipart/form-data"');
|
| 72 | 72 | |
| 73 | - $recipient = new \XoopsFormText(\constant('CO_' . $moduleDirNameUpper . '_' . 'FB_RECIPIENT'), 'recipient', 50, 255, $GLOBALS['xoopsModule']->getInfo('author_mail'));
|
|
| 73 | + $recipient = new \XoopsFormText(\constant('CO_'.$moduleDirNameUpper.'_'.'FB_RECIPIENT'), 'recipient', 50, 255, $GLOBALS['xoopsModule']->getInfo('author_mail'));
|
|
| 74 | 74 | $recipient->setExtra('disabled="disabled"');
|
| 75 | 75 | $form->addElement($recipient); |
| 76 | - $your_name = new \XoopsFormText(\constant('CO_' . $moduleDirNameUpper . '_' . 'FB_NAME'), 'your_name', 50, 255, $this->name);
|
|
| 77 | - $your_name->setExtra('placeholder="' . \constant('CO_' . $moduleDirNameUpper . '_' . 'FB_NAME_PLACEHOLER') . '"');
|
|
| 76 | + $your_name = new \XoopsFormText(\constant('CO_'.$moduleDirNameUpper.'_'.'FB_NAME'), 'your_name', 50, 255, $this->name);
|
|
| 77 | + $your_name->setExtra('placeholder="'.\constant('CO_'.$moduleDirNameUpper.'_'.'FB_NAME_PLACEHOLER').'"');
|
|
| 78 | 78 | $form->addElement($your_name); |
| 79 | - $your_site = new \XoopsFormText(\constant('CO_' . $moduleDirNameUpper . '_' . 'FB_SITE'), 'your_site', 50, 255, $this->site);
|
|
| 80 | - $your_site->setExtra('placeholder="' . \constant('CO_' . $moduleDirNameUpper . '_' . 'FB_SITE_PLACEHOLER') . '"');
|
|
| 79 | + $your_site = new \XoopsFormText(\constant('CO_'.$moduleDirNameUpper.'_'.'FB_SITE'), 'your_site', 50, 255, $this->site);
|
|
| 80 | + $your_site->setExtra('placeholder="'.\constant('CO_'.$moduleDirNameUpper.'_'.'FB_SITE_PLACEHOLER').'"');
|
|
| 81 | 81 | $form->addElement($your_site); |
| 82 | - $your_mail = new \XoopsFormText(\constant('CO_' . $moduleDirNameUpper . '_' . 'FB_MAIL'), 'your_mail', 50, 255, $this->email);
|
|
| 83 | - $your_mail->setExtra('placeholder="' . \constant('CO_' . $moduleDirNameUpper . '_' . 'FB_MAIL_PLACEHOLER') . '"');
|
|
| 82 | + $your_mail = new \XoopsFormText(\constant('CO_'.$moduleDirNameUpper.'_'.'FB_MAIL'), 'your_mail', 50, 255, $this->email);
|
|
| 83 | + $your_mail->setExtra('placeholder="'.\constant('CO_'.$moduleDirNameUpper.'_'.'FB_MAIL_PLACEHOLER').'"');
|
|
| 84 | 84 | $form->addElement($your_mail); |
| 85 | 85 | |
| 86 | - $fbtypeSelect = new \XoopsFormSelect(\constant('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE'), 'fb_type', $this->type);
|
|
| 86 | + $fbtypeSelect = new \XoopsFormSelect(\constant('CO_'.$moduleDirNameUpper.'_'.'FB_TYPE'), 'fb_type', $this->type);
|
|
| 87 | 87 | $fbtypeSelect->addOption('', '');
|
| 88 | - $fbtypeSelect->addOption(\constant('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE_SUGGESTION'), \constant('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE_SUGGESTION'));
|
|
| 89 | - $fbtypeSelect->addOption(\constant('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE_BUGS'), \constant('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE_BUGS'));
|
|
| 90 | - $fbtypeSelect->addOption(\constant('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE_TESTIMONIAL'), \constant('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE_TESTIMONIAL'));
|
|
| 91 | - $fbtypeSelect->addOption(\constant('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE_FEATURES'), \constant('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE_FEATURES'));
|
|
| 92 | - $fbtypeSelect->addOption(\constant('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE_OTHERS'), \constant('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE_OTHERS'));
|
|
| 88 | + $fbtypeSelect->addOption(\constant('CO_'.$moduleDirNameUpper.'_'.'FB_TYPE_SUGGESTION'), \constant('CO_'.$moduleDirNameUpper.'_'.'FB_TYPE_SUGGESTION'));
|
|
| 89 | + $fbtypeSelect->addOption(\constant('CO_'.$moduleDirNameUpper.'_'.'FB_TYPE_BUGS'), \constant('CO_'.$moduleDirNameUpper.'_'.'FB_TYPE_BUGS'));
|
|
| 90 | + $fbtypeSelect->addOption(\constant('CO_'.$moduleDirNameUpper.'_'.'FB_TYPE_TESTIMONIAL'), \constant('CO_'.$moduleDirNameUpper.'_'.'FB_TYPE_TESTIMONIAL'));
|
|
| 91 | + $fbtypeSelect->addOption(\constant('CO_'.$moduleDirNameUpper.'_'.'FB_TYPE_FEATURES'), \constant('CO_'.$moduleDirNameUpper.'_'.'FB_TYPE_FEATURES'));
|
|
| 92 | + $fbtypeSelect->addOption(\constant('CO_'.$moduleDirNameUpper.'_'.'FB_TYPE_OTHERS'), \constant('CO_'.$moduleDirNameUpper.'_'.'FB_TYPE_OTHERS'));
|
|
| 93 | 93 | $form->addElement($fbtypeSelect, true); |
| 94 | 94 | |
| 95 | 95 | $editorConfigs = []; |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | $configHandler = \xoops_getHandler('config');
|
| 105 | 105 | $config = &$configHandler->getConfigsByCat(0, $module->getVar('mid'));
|
| 106 | 106 | $editorConfigs['editor'] = $config['general_editor']; |
| 107 | - $editor = new \XoopsFormEditor(\constant('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE_CONTENT'), 'fb_content', $editorConfigs);
|
|
| 107 | + $editor = new \XoopsFormEditor(\constant('CO_'.$moduleDirNameUpper.'_'.'FB_TYPE_CONTENT'), 'fb_content', $editorConfigs);
|
|
| 108 | 108 | $form->addElement($editor, true); |
| 109 | 109 | |
| 110 | 110 | $form->addElement(new \XoopsFormHidden('op', 'send'));
|
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | throw new \RuntimeException(\sprintf('Unable to create the %s directory', $folder));
|
| 36 | 36 | } |
| 37 | 37 | |
| 38 | - file_put_contents($folder . '/index.html', '<script>history.go(-1);</script>'); |
|
| 38 | + file_put_contents($folder.'/index.html', '<script>history.go(-1);</script>'); |
|
| 39 | 39 | } |
| 40 | 40 | } catch (\Exception $e) {
|
| 41 | 41 | echo 'Caught exception: ', $e->getMessage(), '<br>'; |
@@ -61,14 +61,14 @@ discard block |
||
| 61 | 61 | $dir = \opendir($src); |
| 62 | 62 | // @\mkdir($dst); |
| 63 | 63 | if (!@\mkdir($dst) && !\is_dir($dst)) {
|
| 64 | - throw new \RuntimeException('The directory ' . $dst . ' could not be created.');
|
|
| 64 | + throw new \RuntimeException('The directory '.$dst.' could not be created.');
|
|
| 65 | 65 | } |
| 66 | 66 | while (false !== ($file = \readdir($dir))) {
|
| 67 | 67 | if (('.' !== $file) && ('..' !== $file)) {
|
| 68 | - if (\is_dir($src . '/' . $file)) {
|
|
| 69 | - self::recurseCopy($src . '/' . $file, $dst . '/' . $file); |
|
| 68 | + if (\is_dir($src.'/'.$file)) {
|
|
| 69 | + self::recurseCopy($src.'/'.$file, $dst.'/'.$file); |
|
| 70 | 70 | } else {
|
| 71 | - \copy($src . '/' . $file, $dst . '/' . $file); |
|
| 71 | + \copy($src.'/'.$file, $dst.'/'.$file); |
|
| 72 | 72 | } |
| 73 | 73 | } |
| 74 | 74 | } |
@@ -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 | |
@@ -240,14 +240,14 @@ discard block |
||
| 240 | 240 | $iterator = new \DirectoryIterator($src); |
| 241 | 241 | foreach ($iterator as $fObj) {
|
| 242 | 242 | if ($fObj->isFile()) {
|
| 243 | - \rename($fObj->getPathname(), "{$dest}/" . $fObj->getFilename());
|
|
| 243 | + \rename($fObj->getPathname(), "{$dest}/".$fObj->getFilename());
|
|
| 244 | 244 | } elseif (!$fObj->isDot() && $fObj->isDir()) {
|
| 245 | 245 | // Try recursively on directory |
| 246 | - self::rmove($fObj->getPathname(), "{$dest}/" . $fObj->getFilename());
|
|
| 246 | + self::rmove($fObj->getPathname(), "{$dest}/".$fObj->getFilename());
|
|
| 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 | |
@@ -283,9 +283,9 @@ discard block |
||
| 283 | 283 | $iterator = new \DirectoryIterator($src); |
| 284 | 284 | foreach ($iterator as $fObj) {
|
| 285 | 285 | if ($fObj->isFile()) {
|
| 286 | - \copy($fObj->getPathname(), "{$dest}/" . $fObj->getFilename());
|
|
| 286 | + \copy($fObj->getPathname(), "{$dest}/".$fObj->getFilename());
|
|
| 287 | 287 | } elseif (!$fObj->isDot() && $fObj->isDir()) {
|
| 288 | - self::rcopy($fObj->getPathname(), "{$dest}/" . $fObj->getFilename());
|
|
| 288 | + self::rcopy($fObj->getPathname(), "{$dest}/".$fObj->getFilename());
|
|
| 289 | 289 | } |
| 290 | 290 | } |
| 291 | 291 | |
@@ -51,7 +51,7 @@ |
||
| 51 | 51 | // require \dirname(\dirname(__DIR__)) . '/config/config.php'; |
| 52 | 52 | // $config = getConfig(); |
| 53 | 53 | |
| 54 | - $config = include \dirname(__DIR__, 2) . '/config/config.php'; |
|
| 54 | + $config = include \dirname(__DIR__, 2).'/config/config.php'; |
|
| 55 | 55 | |
| 56 | 56 | $this->name = $config->name; |
| 57 | 57 | $this->paths = $config->paths; |
@@ -88,7 +88,7 @@ |
||
| 88 | 88 | $this->synchronizeTable($tableName); |
| 89 | 89 | $updateTable = $GLOBALS['xoopsDB']->prefix($tableName); |
| 90 | 90 | $joinTable = $GLOBALS['xoopsDB']->prefix($srcTableName); |
| 91 | - $sql = "UPDATE `$updateTable` t1 INNER JOIN `$joinTable` t2 ON t1.post_id = t2.post_id \n" . "SET t1.dohtml = t2.dohtml, t1.dosmiley = t2.dosmiley, t1.doxcode = t2.doxcode\n" . ' , t1.doimage = t2.doimage, t1.dobr = t2.dobr'; |
|
| 91 | + $sql = "UPDATE `$updateTable` t1 INNER JOIN `$joinTable` t2 ON t1.post_id = t2.post_id \n"."SET t1.dohtml = t2.dohtml, t1.dosmiley = t2.dosmiley, t1.doxcode = t2.doxcode\n".' , t1.doimage = t2.doimage, t1.dobr = t2.dobr'; |
|
| 92 | 92 | $this->tableHandler->addToQueue($sql); |
| 93 | 93 | } |
| 94 | 94 | } |
@@ -49,13 +49,13 @@ discard block |
||
| 49 | 49 | $currentVer = $versionText; |
| 50 | 50 | } |
| 51 | 51 | if (null === $requiredVer) {
|
| 52 | - $requiredVer = '' . $module->getInfo('min_xoops'); //making sure it's a string
|
|
| 52 | + $requiredVer = ''.$module->getInfo('min_xoops'); //making sure it's a string
|
|
| 53 | 53 | } |
| 54 | 54 | $success = true; |
| 55 | 55 | |
| 56 | 56 | if (\version_compare($currentVer, $requiredVer, '<')) {
|
| 57 | 57 | $success = false; |
| 58 | - $module->setErrors(\sprintf(\constant('CO_' . $moduleDirNameUpper . '_ERROR_BAD_XOOPS'), $requiredVer, $currentVer));
|
|
| 58 | + $module->setErrors(\sprintf(\constant('CO_'.$moduleDirNameUpper.'_ERROR_BAD_XOOPS'), $requiredVer, $currentVer));
|
|
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | return $success; |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | |
| 85 | 85 | if (false !== $reqVer && '' !== $reqVer) {
|
| 86 | 86 | if (\version_compare($verNum, $reqVer, '<')) {
|
| 87 | - $module->setErrors(\sprintf(\constant('CO_' . $moduleDirNameUpper . '_ERROR_BAD_PHP'), $reqVer, $verNum));
|
|
| 87 | + $module->setErrors(\sprintf(\constant('CO_'.$moduleDirNameUpper.'_ERROR_BAD_PHP'), $reqVer, $verNum));
|
|
| 88 | 88 | $success = false; |
| 89 | 89 | } |
| 90 | 90 | } |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | $moduleDirName = \basename(\dirname(__DIR__, 2)); |
| 107 | 107 | $moduleDirNameUpper = \mb_strtoupper($moduleDirName); |
| 108 | 108 | $update = ''; |
| 109 | - $repository = 'XoopsModules25x/' . $moduleDirName; |
|
| 109 | + $repository = 'XoopsModules25x/'.$moduleDirName; |
|
| 110 | 110 | // $repository = 'XoopsModules25x/publisher'; //for testing only |
| 111 | 111 | $ret = ''; |
| 112 | 112 | $infoReleasesUrl = "https://api.github.com/repos/$repository/releases"; |
@@ -120,14 +120,14 @@ discard block |
||
| 120 | 120 | if (false === $curlReturn) {
|
| 121 | 121 | \trigger_error(\curl_error($curlHandle)); |
| 122 | 122 | } elseif (mb_strpos($curlReturn, 'Not Found')) {
|
| 123 | - \trigger_error('Repository Not Found: ' . $infoReleasesUrl);
|
|
| 123 | + \trigger_error('Repository Not Found: '.$infoReleasesUrl);
|
|
| 124 | 124 | } else {
|
| 125 | 125 | $file = \json_decode($curlReturn, false); |
| 126 | 126 | $latestVersionLink = \sprintf("https://github.com/$repository/archive/%s.zip", $file ? reset($file)->tag_name : $default);
|
| 127 | 127 | $latestVersion = $file[0]->tag_name; |
| 128 | 128 | $prerelease = $file[0]->prerelease; |
| 129 | 129 | if ('master' !== $latestVersionLink) {
|
| 130 | - $update = \constant('CO_' . $moduleDirNameUpper . '_' . 'NEW_VERSION') . $latestVersion;
|
|
| 130 | + $update = \constant('CO_'.$moduleDirNameUpper.'_'.'NEW_VERSION').$latestVersion;
|
|
| 131 | 131 | } |
| 132 | 132 | //"PHP-standardized" version |
| 133 | 133 | $latestVersion = \mb_strtolower($latestVersion); |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | $latestVersion = \str_replace('_', '', \mb_strtolower($latestVersion));
|
| 136 | 136 | $latestVersion = \str_replace('final', '', \mb_strtolower($latestVersion));
|
| 137 | 137 | } |
| 138 | - $moduleVersion = ($helper->getModule()->getInfo('version') . '_' . $helper->getModule()->getInfo('module_status'));
|
|
| 138 | + $moduleVersion = ($helper->getModule()->getInfo('version').'_'.$helper->getModule()->getInfo('module_status'));
|
|
| 139 | 139 | //"PHP-standardized" version |
| 140 | 140 | $moduleVersion = \str_replace(' ', '', \mb_strtolower($moduleVersion));
|
| 141 | 141 | // $moduleVersion = '1.0'; //for testing only |
@@ -73,7 +73,7 @@ |
||
| 73 | 73 | require $GLOBALS['xoops']->path('class/template.php');
|
| 74 | 74 | $breadcrumbTpl = new \XoopsTpl(); |
| 75 | 75 | $breadcrumbTpl->assign('breadcrumb', $this->bread);
|
| 76 | - $html = $breadcrumbTpl->fetch('db:' . $this->dirname . '_common_breadcrumb.tpl');
|
|
| 76 | + $html = $breadcrumbTpl->fetch('db:'.$this->dirname.'_common_breadcrumb.tpl');
|
|
| 77 | 77 | unset($breadcrumbTpl); |
| 78 | 78 | |
| 79 | 79 | return $html; |
@@ -36,19 +36,19 @@ discard block |
||
| 36 | 36 | // $query = $GLOBALS['xoopsDB']->query($sql); |
| 37 | 37 | // list($meta) = $GLOBALS['xoopsDB']->fetchRow($query); |
| 38 | 38 | $html .= '<fieldset>'; |
| 39 | - $html .= "<legend style='font-weight: bold; color: #900;'>" . \constant('CO_' . $moduleDirNameUpper . '_IMAGEINFO') . '</legend>';
|
|
| 39 | + $html .= "<legend style='font-weight: bold; color: #900;'>".\constant('CO_'.$moduleDirNameUpper.'_IMAGEINFO').'</legend>';
|
|
| 40 | 40 | $html .= "<div style='padding: 8px;'>"; |
| 41 | 41 | // $html .= '<div>' . \constant('CO_' . $moduleDirNameUpper . '_METAVERSION') . $meta . "</div>";
|
| 42 | 42 | // $html .= "<br>"; |
| 43 | 43 | // $html .= "<br>"; |
| 44 | - $html .= '<div>' . \constant('CO_' . $moduleDirNameUpper . '_SPHPINI') . '</div>';
|
|
| 44 | + $html .= '<div>'.\constant('CO_'.$moduleDirNameUpper.'_SPHPINI').'</div>';
|
|
| 45 | 45 | $html .= '<ul>'; |
| 46 | 46 | |
| 47 | - $gdlib = \function_exists('gd_info') ? '<span style="color: #008000;">' . \constant('CO_' . $moduleDirNameUpper . '_GDON') . '</span>' : '<span style="color: #ff0000;">' . \constant('CO_' . $moduleDirNameUpper . '_GDOFF') . '</span>';
|
|
| 48 | - $html .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_GDLIBSTATUS') . $gdlib;
|
|
| 47 | + $gdlib = \function_exists('gd_info') ? '<span style="color: #008000;">'.\constant('CO_'.$moduleDirNameUpper.'_GDON').'</span>' : '<span style="color: #ff0000;">'.\constant('CO_'.$moduleDirNameUpper.'_GDOFF').'</span>';
|
|
| 48 | + $html .= '<li>'.\constant('CO_'.$moduleDirNameUpper.'_GDLIBSTATUS').$gdlib;
|
|
| 49 | 49 | if (\function_exists('gd_info')) {
|
| 50 | 50 | if (true === ($gdlib = gd_info())) {
|
| 51 | - $html .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_GDLIBVERSION') . '<b>' . $gdlib['GD Version'] . '</b>';
|
|
| 51 | + $html .= '<li>'.\constant('CO_'.$moduleDirNameUpper.'_GDLIBVERSION').'<b>'.$gdlib['GD Version'].'</b>';
|
|
| 52 | 52 | } |
| 53 | 53 | } |
| 54 | 54 | |
@@ -58,18 +58,18 @@ discard block |
||
| 58 | 58 | // $registerglobals = (!\ini_get('register_globals')) ? "<span style=\"color: #008000;\">" . \constant('CO_' . $moduleDirNameUpper . '_OFF') . '</span>' : "<span style=\"color: #ff0000;\">" . \constant('CO_' . $moduleDirNameUpper . '_ON') . '</span>';
|
| 59 | 59 | // $html .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_REGISTERGLOBALS . $registerglobals;
|
| 60 | 60 | |
| 61 | - $downloads = \ini_get('file_uploads') ? '<span style="color: #008000;">' . \constant('CO_' . $moduleDirNameUpper . '_ON') . '</span>' : '<span style="color: #ff0000;">' . \constant('CO_' . $moduleDirNameUpper . '_OFF') . '</span>';
|
|
| 62 | - $html .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_SERVERUPLOADSTATUS') . $downloads;
|
|
| 61 | + $downloads = \ini_get('file_uploads') ? '<span style="color: #008000;">'.\constant('CO_'.$moduleDirNameUpper.'_ON').'</span>' : '<span style="color: #ff0000;">'.\constant('CO_'.$moduleDirNameUpper.'_OFF').'</span>';
|
|
| 62 | + $html .= '<li>'.\constant('CO_'.$moduleDirNameUpper.'_SERVERUPLOADSTATUS').$downloads;
|
|
| 63 | 63 | |
| 64 | - $html .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_MAXUPLOADSIZE') . ' <b><span style="color: #0000ff;">' . \ini_get('upload_max_filesize') . '</span></b>';
|
|
| 65 | - $html .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_MAXPOSTSIZE') . ' <b><span style="color: #0000ff;">' . \ini_get('post_max_size') . '</span></b>';
|
|
| 66 | - $html .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_MEMORYLIMIT') . ' <b><span style="color: #0000ff;">' . \ini_get('memory_limit') . '</span></b>';
|
|
| 64 | + $html .= '<li>'.\constant('CO_'.$moduleDirNameUpper.'_MAXUPLOADSIZE').' <b><span style="color: #0000ff;">'.\ini_get('upload_max_filesize').'</span></b>';
|
|
| 65 | + $html .= '<li>'.\constant('CO_'.$moduleDirNameUpper.'_MAXPOSTSIZE').' <b><span style="color: #0000ff;">'.\ini_get('post_max_size').'</span></b>';
|
|
| 66 | + $html .= '<li>'.\constant('CO_'.$moduleDirNameUpper.'_MEMORYLIMIT').' <b><span style="color: #0000ff;">'.\ini_get('memory_limit').'</span></b>';
|
|
| 67 | 67 | $html .= '</ul>'; |
| 68 | 68 | $html .= '<ul>'; |
| 69 | - $html .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_SERVERPATH') . ' <b>' . \XOOPS_ROOT_PATH . '</b>';
|
|
| 69 | + $html .= '<li>'.\constant('CO_'.$moduleDirNameUpper.'_SERVERPATH').' <b>'.\XOOPS_ROOT_PATH.'</b>';
|
|
| 70 | 70 | $html .= '</ul>'; |
| 71 | 71 | $html .= '<br>'; |
| 72 | - $html .= \constant('CO_' . $moduleDirNameUpper . '_UPLOADPATHDSC') . '';
|
|
| 72 | + $html .= \constant('CO_'.$moduleDirNameUpper.'_UPLOADPATHDSC').'';
|
|
| 73 | 73 | $html .= '</div>'; |
| 74 | 74 | $html .= '</fieldset><br>'; |
| 75 | 75 | |
@@ -148,7 +148,7 @@ discard block |
||
| 148 | 148 | */ |
| 149 | 149 | public function setPrimarySetting($setId) |
| 150 | 150 | {
|
| 151 | - $helper = \XoopsModules\Wggithub\Helper::getInstance(); |
|
| 151 | + $helper = \XoopsModules\Wggithub\Helper::getInstance(); |
|
| 152 | 152 | $settingsObj = null; |
| 153 | 153 | $settingsHandler = $helper->getHandler('Settings');
|
| 154 | 154 | if (isset($setId)) {
|
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | } |
| 159 | 159 | |
| 160 | 160 | // reset all |
| 161 | - $strSQL = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('wggithub_settings') . ' SET ' . $GLOBALS['xoopsDB']->prefix('wggithub_settings') . '.set_primary = 0';
|
|
| 161 | + $strSQL = 'UPDATE '.$GLOBALS['xoopsDB']->prefix('wggithub_settings').' SET '.$GLOBALS['xoopsDB']->prefix('wggithub_settings').'.set_primary = 0';
|
|
| 162 | 162 | $GLOBALS['xoopsDB']->queryF($strSQL); |
| 163 | 163 | // Set Vars |
| 164 | 164 | $settingsObj->setVar('set_primary', 1);
|