@@ -39,10 +39,10 @@ discard block |
||
| 39 | 39 | 'license_url' => 'http://www.gnu.org/licenses/gpl-3.0.en.html', |
| 40 | 40 | 'help' => 'page=help', |
| 41 | 41 | 'release_info' => 'release_info', |
| 42 | - 'release_file' => \XOOPS_URL . '/modules/wggithub/docs/release_info file', |
|
| 42 | + 'release_file' => \XOOPS_URL.'/modules/wggithub/docs/release_info file', |
|
| 43 | 43 | 'release_date' => '2022/08/08', |
| 44 | 44 | 'manual' => 'link to manual file', |
| 45 | - 'manual_file' => \XOOPS_URL . '/modules/wggithub/docs/install.txt', |
|
| 45 | + 'manual_file' => \XOOPS_URL.'/modules/wggithub/docs/install.txt', |
|
| 46 | 46 | 'min_php' => '7.4', |
| 47 | 47 | 'min_xoops' => '2.5.11 Stable', |
| 48 | 48 | 'min_admin' => '1.2', |
@@ -299,8 +299,8 @@ discard block |
||
| 299 | 299 | // Make Sample button visible? |
| 300 | 300 | $modversion['config'][] = [ |
| 301 | 301 | 'name' => 'displaySampleButton', |
| 302 | - 'title' => 'CO_' . $moduleDirNameUpper . '_' . 'SHOW_SAMPLE_BUTTON', |
|
| 303 | - 'description' => 'CO_' . $moduleDirNameUpper . '_' . 'SHOW_SAMPLE_BUTTON_DESC', |
|
| 302 | + 'title' => 'CO_'.$moduleDirNameUpper.'_'.'SHOW_SAMPLE_BUTTON', |
|
| 303 | + 'description' => 'CO_'.$moduleDirNameUpper.'_'.'SHOW_SAMPLE_BUTTON_DESC', |
|
| 304 | 304 | 'formtype' => 'yesno', |
| 305 | 305 | 'valuetype' => 'int', |
| 306 | 306 | 'default' => 1, |
@@ -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 ($module->versionCompare($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 |