@@ -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; |
@@ -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: |
@@ -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 | } |
@@ -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; |
@@ -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 | |
@@ -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; |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | |
| 76 | 76 | if (false !== $reqVer && '' !== $reqVer) { |
| 77 | 77 | if (\version_compare($verNum, $reqVer, '<')) { |
| 78 | - $module->setErrors(\sprintf(\constant('CO_' . $moduleDirNameUpper . '_ERROR_BAD_PHP'), $reqVer, $verNum)); |
|
| 78 | + $module->setErrors(\sprintf(\constant('CO_'.$moduleDirNameUpper.'_ERROR_BAD_PHP'), $reqVer, $verNum)); |
|
| 79 | 79 | $success = false; |
| 80 | 80 | } |
| 81 | 81 | } |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | $moduleDirName = \basename(dirname(__DIR__, 2)); |
| 98 | 98 | $moduleDirNameUpper = \mb_strtoupper($moduleDirName); |
| 99 | 99 | $update = ''; |
| 100 | - $repository = 'XoopsModules25x/' . $moduleDirName; |
|
| 100 | + $repository = 'XoopsModules25x/'.$moduleDirName; |
|
| 101 | 101 | // $repository = 'XoopsModules25x/publisher'; //for testing only |
| 102 | 102 | $ret = ''; |
| 103 | 103 | $infoReleasesUrl = "https://api.github.com/repos/$repository/releases"; |
@@ -111,14 +111,14 @@ discard block |
||
| 111 | 111 | if (false === $curlReturn) { |
| 112 | 112 | \trigger_error(\curl_error($curlHandle)); |
| 113 | 113 | } elseif (mb_strpos($curlReturn, 'Not Found')) { |
| 114 | - \trigger_error('Repository Not Found: ' . $infoReleasesUrl); |
|
| 114 | + \trigger_error('Repository Not Found: '.$infoReleasesUrl); |
|
| 115 | 115 | } else { |
| 116 | 116 | $file = \json_decode($curlReturn, false); |
| 117 | 117 | $latestVersionLink = \sprintf("https://github.com/$repository/archive/%s.zip", $file ? reset($file)->tag_name : $default); |
| 118 | 118 | $latestVersion = $file[0]->tag_name; |
| 119 | 119 | $prerelease = $file[0]->prerelease; |
| 120 | 120 | if ('master' !== $latestVersionLink) { |
| 121 | - $update = \constant('CO_' . $moduleDirNameUpper . '_' . 'NEW_VERSION') . $latestVersion; |
|
| 121 | + $update = \constant('CO_'.$moduleDirNameUpper.'_'.'NEW_VERSION').$latestVersion; |
|
| 122 | 122 | } |
| 123 | 123 | //"PHP-standardized" version |
| 124 | 124 | $latestVersion = \mb_strtolower($latestVersion); |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | $latestVersion = \str_replace('_', '', \mb_strtolower($latestVersion)); |
| 127 | 127 | $latestVersion = \str_replace('final', '', \mb_strtolower($latestVersion)); |
| 128 | 128 | } |
| 129 | - $moduleVersion = ($helper->getModule()->getInfo('version') . '_' . $helper->getModule()->getInfo('module_status')); |
|
| 129 | + $moduleVersion = ($helper->getModule()->getInfo('version').'_'.$helper->getModule()->getInfo('module_status')); |
|
| 130 | 130 | //"PHP-standardized" version |
| 131 | 131 | $moduleVersion = \str_replace(' ', '', \mb_strtolower($moduleVersion)); |
| 132 | 132 | // $moduleVersion = '1.0'; //for testing only |
@@ -70,7 +70,7 @@ |
||
| 70 | 70 | */ |
| 71 | 71 | public function getHandler($name) |
| 72 | 72 | { |
| 73 | - $class = __NAMESPACE__ . '\\' . \ucfirst($name) . 'Handler'; |
|
| 73 | + $class = __NAMESPACE__.'\\'.\ucfirst($name).'Handler'; |
|
| 74 | 74 | if (!\class_exists($class)) { |
| 75 | 75 | throw new \RuntimeException("Class '$class' not found"); |
| 76 | 76 | } |
@@ -56,11 +56,11 @@ discard block |
||
| 56 | 56 | { |
| 57 | 57 | if ($considerHtml) { |
| 58 | 58 | // if the plain text is shorter than the maximum length, return the whole text |
| 59 | - if (mb_strlen(\preg_replace('/<.*?' . '>/', '', $text)) <= $length) { |
|
| 59 | + if (mb_strlen(\preg_replace('/<.*?'.'>/', '', $text)) <= $length) { |
|
| 60 | 60 | return $text; |
| 61 | 61 | } |
| 62 | 62 | // splits all html-tags to scanable lines |
| 63 | - \preg_match_all('/(<.+?' . '>)?([^<>]*)/s', $text, $lines, PREG_SET_ORDER); |
|
| 63 | + \preg_match_all('/(<.+?'.'>)?([^<>]*)/s', $text, $lines, PREG_SET_ORDER); |
|
| 64 | 64 | $total_length = mb_strlen($ending); |
| 65 | 65 | $open_tags = []; |
| 66 | 66 | $truncate = ''; |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | unset($open_tags[$pos]); |
| 79 | 79 | } |
| 80 | 80 | // if tag is an opening tag |
| 81 | - } elseif (\preg_match('/^<\s*([^\s>!]+).*?' . '>$/s', $line_matchings[1], $tag_matchings)) { |
|
| 81 | + } elseif (\preg_match('/^<\s*([^\s>!]+).*?'.'>$/s', $line_matchings[1], $tag_matchings)) { |
|
| 82 | 82 | // add tag to the beginning of $open_tags list |
| 83 | 83 | \array_unshift($open_tags, \mb_strtolower($tag_matchings[1])); |
| 84 | 84 | } |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | if ($considerHtml) { |
| 139 | 139 | // close all unclosed html-tags |
| 140 | 140 | foreach ($open_tags as $tag) { |
| 141 | - $truncate .= '</' . $tag . '>'; |
|
| 141 | + $truncate .= '</'.$tag.'>'; |
|
| 142 | 142 | } |
| 143 | 143 | } |
| 144 | 144 | |
@@ -211,7 +211,7 @@ discard block |
||
| 211 | 211 | //--></script> |
| 212 | 212 | <!-- End Form Validation JavaScript //-->', |
| 213 | 213 | ]; |
| 214 | - $paypalform = [ |
|
| 214 | + $paypalform = [ |
|
| 215 | 215 | 0 => '<form action="https://www.paypal.com/cgi-bin/webscr" method="post">', |
| 216 | 216 | 1 => '<input name="cmd" value="_s-xclick" type="hidden">', |
| 217 | 217 | 2 => '<input name="hosted_button_id" value="%s" type="hidden">', |
@@ -224,11 +224,11 @@ discard block |
||
| 224 | 224 | case 2: |
| 225 | 225 | $donationform[$key] = \sprintf( |
| 226 | 226 | $donationform[$key], |
| 227 | - $GLOBALS['xoopsConfig']['sitename'] . ' - ' . ('' != $GLOBALS['xoopsUser']->getVar('name') ? $GLOBALS['xoopsUser']->getVar('name') . ' [' . $GLOBALS['xoopsUser']->getVar('uname') . ']' : $GLOBALS['xoopsUser']->getVar('uname')), |
|
| 227 | + $GLOBALS['xoopsConfig']['sitename'].' - '.('' != $GLOBALS['xoopsUser']->getVar('name') ? $GLOBALS['xoopsUser']->getVar('name').' ['.$GLOBALS['xoopsUser']->getVar('uname').']' : $GLOBALS['xoopsUser']->getVar('uname')), |
|
| 228 | 228 | $GLOBALS['xoopsUser']->getVar('email'), |
| 229 | 229 | XOOPS_LICENSE_KEY, |
| 230 | 230 | \mb_strtoupper($GLOBALS['xoopsModule']->getVar('dirname')), |
| 231 | - \mb_strtoupper($GLOBALS['xoopsModule']->getVar('dirname')) . ' ' . $GLOBALS['xoopsModule']->getVar('name') |
|
| 231 | + \mb_strtoupper($GLOBALS['xoopsModule']->getVar('dirname')).' '.$GLOBALS['xoopsModule']->getVar('name') |
|
| 232 | 232 | ); |
| 233 | 233 | break; |
| 234 | 234 | } |