@@ -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 | } |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | if (Constants::STATUS_NEW === $repoStatus || Constants::STATUS_UPDATED === $repoStatus || 0 == $releasesCount) { |
| 150 | 150 | $ghReleases = $libReleases->getReleases($repositoriesAll[$i]->getVar('repo_user'), $repositoriesAll[$i]->getVar('repo_name')); |
| 151 | 151 | if ($releasesCount > 0) { |
| 152 | - $sql = 'DELETE FROM `' . $GLOBALS['xoopsDB']->prefix('wggithub_releases') . '` WHERE `rel_repoid` = ' . $repoId; |
|
| 152 | + $sql = 'DELETE FROM `'.$GLOBALS['xoopsDB']->prefix('wggithub_releases').'` WHERE `rel_repoid` = '.$repoId; |
|
| 153 | 153 | if (!$result = $GLOBALS['xoopsDB']->queryF($sql)) { |
| 154 | 154 | return false; |
| 155 | 155 | } |
@@ -159,13 +159,13 @@ discard block |
||
| 159 | 159 | $first = true; |
| 160 | 160 | $final = false; |
| 161 | 161 | foreach ($ghReleases as $ghRelease) { |
| 162 | - if ($first || (!$final && !(bool)$ghRelease['prerelease'])) { |
|
| 162 | + if ($first || (!$final && !(bool) $ghRelease['prerelease'])) { |
|
| 163 | 163 | // save first in any case and save first final version |
| 164 | 164 | $releasesObj = $releasesHandler->create(); |
| 165 | 165 | $releasesObj->setVar('rel_repoid', $repoId); |
| 166 | 166 | $releasesObj->setVar('rel_type', $ghRelease['type']); |
| 167 | 167 | $releasesObj->setVar('rel_name', $ghRelease['name']); |
| 168 | - $releasesObj->setVar('rel_prerelease', (true == (bool)$ghRelease['prerelease'])); |
|
| 168 | + $releasesObj->setVar('rel_prerelease', (true == (bool) $ghRelease['prerelease'])); |
|
| 169 | 169 | $releasesObj->setVar('rel_publishedat', \strtotime($ghRelease['published_at'])); |
| 170 | 170 | $releasesObj->setVar('rel_tarballurl', $ghRelease['tarball_url']); |
| 171 | 171 | $releasesObj->setVar('rel_zipballurl', $ghRelease['zipball_url']); |
@@ -177,7 +177,7 @@ discard block |
||
| 177 | 177 | } |
| 178 | 178 | } |
| 179 | 179 | $first = false; |
| 180 | - if (false === (bool)$ghRelease['prerelease']) { |
|
| 180 | + if (false === (bool) $ghRelease['prerelease']) { |
|
| 181 | 181 | $final = true; |
| 182 | 182 | } |
| 183 | 183 | } |
@@ -215,7 +215,7 @@ discard block |
||
| 215 | 215 | // must return true otherwise releases will not be loaded |
| 216 | 216 | return true; |
| 217 | 217 | } |
| 218 | - $sql = 'DELETE FROM `' . $GLOBALS['xoopsDB']->prefix('wggithub_releases') . '` WHERE `rel_repoid` = ' . $repoId; |
|
| 218 | + $sql = 'DELETE FROM `'.$GLOBALS['xoopsDB']->prefix('wggithub_releases').'` WHERE `rel_repoid` = '.$repoId; |
|
| 219 | 219 | if (!$result = $GLOBALS['xoopsDB']->queryF($sql)) { |
| 220 | 220 | return false; |
| 221 | 221 | } |
@@ -224,13 +224,13 @@ discard block |
||
| 224 | 224 | $first = true; |
| 225 | 225 | $final = false; |
| 226 | 226 | foreach ($ghReleases as $ghRelease) { |
| 227 | - if ($first || (!$final && !(bool)$ghRelease['prerelease'])) { |
|
| 227 | + if ($first || (!$final && !(bool) $ghRelease['prerelease'])) { |
|
| 228 | 228 | // save first in any case and save first final version |
| 229 | 229 | $releasesObj = $releasesHandler->create(); |
| 230 | 230 | $releasesObj->setVar('rel_repoid', $repoId); |
| 231 | 231 | $releasesObj->setVar('rel_type', $ghRelease['type']); |
| 232 | 232 | $releasesObj->setVar('rel_name', $ghRelease['name']); |
| 233 | - $releasesObj->setVar('rel_prerelease', (true == (bool)$ghRelease['prerelease'])); |
|
| 233 | + $releasesObj->setVar('rel_prerelease', (true == (bool) $ghRelease['prerelease'])); |
|
| 234 | 234 | $releasesObj->setVar('rel_publishedat', \strtotime($ghRelease['published_at'])); |
| 235 | 235 | $releasesObj->setVar('rel_tarballurl', $ghRelease['tarball_url']); |
| 236 | 236 | $releasesObj->setVar('rel_zipballurl', $ghRelease['zipball_url']); |
@@ -242,7 +242,7 @@ discard block |
||
| 242 | 242 | } |
| 243 | 243 | } |
| 244 | 244 | $first = false; |
| 245 | - if (false === (bool)$ghRelease['prerelease']) { |
|
| 245 | + if (false === (bool) $ghRelease['prerelease']) { |
|
| 246 | 246 | $final = true; |
| 247 | 247 | } |
| 248 | 248 | } |
@@ -259,17 +259,17 @@ discard block |
||
| 259 | 259 | public function updateRepoReleases() |
| 260 | 260 | { |
| 261 | 261 | // update repo_prerelease |
| 262 | - $sql = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('wggithub_repositories') . ' INNER JOIN ' . $GLOBALS['xoopsDB']->prefix('wggithub_releases'); |
|
| 263 | - $sql .= ' ON ' . $GLOBALS['xoopsDB']->prefix('wggithub_repositories') . '.repo_id = ' . $GLOBALS['xoopsDB']->prefix('wggithub_releases') . '.rel_repoid '; |
|
| 264 | - $sql .= 'SET ' . $GLOBALS['xoopsDB']->prefix('wggithub_repositories') . '.repo_prerelease = 1 '; |
|
| 265 | - $sql .= 'WHERE (((' . $GLOBALS['xoopsDB']->prefix('wggithub_releases') . '.rel_prerelease)=1));'; |
|
| 262 | + $sql = 'UPDATE '.$GLOBALS['xoopsDB']->prefix('wggithub_repositories').' INNER JOIN '.$GLOBALS['xoopsDB']->prefix('wggithub_releases'); |
|
| 263 | + $sql .= ' ON '.$GLOBALS['xoopsDB']->prefix('wggithub_repositories').'.repo_id = '.$GLOBALS['xoopsDB']->prefix('wggithub_releases').'.rel_repoid '; |
|
| 264 | + $sql .= 'SET '.$GLOBALS['xoopsDB']->prefix('wggithub_repositories').'.repo_prerelease = 1 '; |
|
| 265 | + $sql .= 'WHERE ((('.$GLOBALS['xoopsDB']->prefix('wggithub_releases').'.rel_prerelease)=1));'; |
|
| 266 | 266 | $GLOBALS['xoopsDB']->queryF($sql); |
| 267 | 267 | |
| 268 | 268 | // update repo_release |
| 269 | - $sql = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('wggithub_repositories') . ' INNER JOIN ' . $GLOBALS['xoopsDB']->prefix('wggithub_releases'); |
|
| 270 | - $sql .= ' ON ' . $GLOBALS['xoopsDB']->prefix('wggithub_repositories') . '.repo_id = ' . $GLOBALS['xoopsDB']->prefix('wggithub_releases') . '.rel_repoid '; |
|
| 271 | - $sql .= 'SET ' . $GLOBALS['xoopsDB']->prefix('wggithub_repositories') . '.repo_release = 1 '; |
|
| 272 | - $sql .= 'WHERE (((' . $GLOBALS['xoopsDB']->prefix('wggithub_releases') . '.rel_prerelease)=0));'; |
|
| 269 | + $sql = 'UPDATE '.$GLOBALS['xoopsDB']->prefix('wggithub_repositories').' INNER JOIN '.$GLOBALS['xoopsDB']->prefix('wggithub_releases'); |
|
| 270 | + $sql .= ' ON '.$GLOBALS['xoopsDB']->prefix('wggithub_repositories').'.repo_id = '.$GLOBALS['xoopsDB']->prefix('wggithub_releases').'.rel_repoid '; |
|
| 271 | + $sql .= 'SET '.$GLOBALS['xoopsDB']->prefix('wggithub_repositories').'.repo_release = 1 '; |
|
| 272 | + $sql .= 'WHERE ((('.$GLOBALS['xoopsDB']->prefix('wggithub_releases').'.rel_prerelease)=0));'; |
|
| 273 | 273 | $GLOBALS['xoopsDB']->queryF($sql); |
| 274 | 274 | |
| 275 | 275 | return true; |
@@ -132,15 +132,15 @@ |
||
| 132 | 132 | */ |
| 133 | 133 | public function getValuesReleases($keys = null, $format = null, $maxDepth = null) |
| 134 | 134 | { |
| 135 | - $helper = \XoopsModules\Wggithub\Helper::getInstance(); |
|
| 135 | + $helper = \XoopsModules\Wggithub\Helper::getInstance(); |
|
| 136 | 136 | $ret = $this->getValues($keys, $format, $maxDepth); |
| 137 | - $ret['id'] = $this->getVar('rel_id'); |
|
| 137 | + $ret['id'] = $this->getVar('rel_id'); |
|
| 138 | 138 | $repositoriesHandler = $helper->getHandler('Repositories'); |
| 139 | 139 | $repositoriesObj = $repositoriesHandler->get($this->getVar('rel_repoid')); |
| 140 | - $ret['repoid'] = $repositoriesObj->getVar('repo_name'); |
|
| 140 | + $ret['repoid'] = $repositoriesObj->getVar('repo_name'); |
|
| 141 | 141 | $ret['type'] = $this->getVar('rel_type'); |
| 142 | 142 | $ret['name'] = $this->getVar('rel_name'); |
| 143 | - $ret['prerelease'] = (int)$this->getVar('rel_prerelease') > 0 ? _YES : _NO; |
|
| 143 | + $ret['prerelease'] = (int) $this->getVar('rel_prerelease') > 0 ? _YES : _NO; |
|
| 144 | 144 | $ret['publishedat'] = \formatTimestamp($this->getVar('rel_publishedat'), 'm'); |
| 145 | 145 | $ret['tarballurl'] = $this->getVar('rel_tarballurl'); |
| 146 | 146 | $ret['zipballurl'] = $this->getVar('rel_zipballurl'); |
@@ -173,7 +173,7 @@ |
||
| 173 | 173 | $ret = $this->getValues($keys, $format, $maxDepth); |
| 174 | 174 | $ret['id'] = $this->getVar('repo_id'); |
| 175 | 175 | $ret['nodeid'] = $this->getVar('repo_nodeid'); |
| 176 | - $ret['user'] = $this->getVar('repo_user'); |
|
| 176 | + $ret['user'] = $this->getVar('repo_user'); |
|
| 177 | 177 | $ret['name'] = $this->getVar('repo_name'); |
| 178 | 178 | $ret['fullname'] = $this->getVar('repo_fullname'); |
| 179 | 179 | $ret['createdat'] = \formatTimestamp($this->getVar('repo_createdat'), 'm'); |
@@ -167,9 +167,9 @@ |
||
| 167 | 167 | $ret['name'] = $this->getVar('dir_name'); |
| 168 | 168 | $ret['type'] = $this->getVar('dir_type'); |
| 169 | 169 | $ret['type_text'] = Constants::DIRECTORY_TYPE_USER == $this->getVar('dir_type') ? \_AM_WGGITHUB_DIRECTORY_TYPE_USER : \_AM_WGGITHUB_DIRECTORY_TYPE_ORG; |
| 170 | - $ret['autoupdate'] = (int)$this->getVar('dir_autoupdate') > 0 ? _YES : _NO; |
|
| 171 | - $ret['online'] = (int)$this->getVar('dir_online') > 0 ? _YES : _NO; |
|
| 172 | - $ret['filterrelease'] = (int)$this->getVar('dir_filterrelease') > 0 ? _YES : _NO; |
|
| 170 | + $ret['autoupdate'] = (int) $this->getVar('dir_autoupdate') > 0 ? _YES : _NO; |
|
| 171 | + $ret['online'] = (int) $this->getVar('dir_online') > 0 ? _YES : _NO; |
|
| 172 | + $ret['filterrelease'] = (int) $this->getVar('dir_filterrelease') > 0 ? _YES : _NO; |
|
| 173 | 173 | $ret['datecreated'] = \formatTimestamp($this->getVar('dir_datecreated'), 's'); |
| 174 | 174 | $ret['submitter'] = \XoopsUser::getUnameFromId($this->getVar('dir_submitter')); |
| 175 | 175 | return $ret; |
@@ -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 | } |
@@ -20,12 +20,12 @@ discard block |
||
| 20 | 20 | * @author Goffy - XOOPS Development Team - Email:<[email protected]> - Website:<https://wedega.com> |
| 21 | 21 | */ |
| 22 | 22 | |
| 23 | -include dirname(__DIR__, 2) . '/mainfile.php'; |
|
| 24 | -include __DIR__ . '/include/common.php'; |
|
| 23 | +include dirname(__DIR__, 2).'/mainfile.php'; |
|
| 24 | +include __DIR__.'/include/common.php'; |
|
| 25 | 25 | $moduleDirName = \basename(__DIR__); |
| 26 | 26 | // Breadcrumbs |
| 27 | 27 | $xoBreadcrumbs = []; |
| 28 | -$xoBreadcrumbs[] = ['title' => _MA_WGGITHUB_TITLE, 'link' => WGGITHUB_URL . '/']; |
|
| 28 | +$xoBreadcrumbs[] = ['title' => _MA_WGGITHUB_TITLE, 'link' => WGGITHUB_URL.'/']; |
|
| 29 | 29 | // Get instance of module |
| 30 | 30 | $helper = \XoopsModules\Wggithub\Helper::getInstance(); |
| 31 | 31 | $settingsHandler = $helper->getHandler('Settings'); |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | // |
| 39 | 39 | $myts = MyTextSanitizer::getInstance(); |
| 40 | 40 | // Default Css Style |
| 41 | -$style = WGGITHUB_URL . '/assets/css/style.css'; |
|
| 41 | +$style = WGGITHUB_URL.'/assets/css/style.css'; |
|
| 42 | 42 | // Smarty Default |
| 43 | 43 | $sysPathIcon16 = $GLOBALS['xoopsModule']->getInfo('sysicons16'); |
| 44 | 44 | $sysPathIcon32 = $GLOBALS['xoopsModule']->getInfo('sysicons32'); |