@@ -176,10 +176,10 @@ |
||
176 | 176 | break; |
177 | 177 | } |
178 | 178 | $ret['content_shorttext'] = Utility::truncateHtml($content_text); |
179 | - $ret['autoupdate'] = (int)$this->getVar('dir_autoupdate') > 0 ? _YES : _NO; |
|
180 | - $ret['online'] = (int)$this->getVar('dir_online') > 0 ? _YES : _NO; |
|
181 | - $ret['filterrelease'] = (int)$this->getVar('dir_filterrelease') > 0 ? _YES : _NO; |
|
182 | - $ret['weight'] = (int)$this->getVar('dir_weight'); |
|
179 | + $ret['autoupdate'] = (int) $this->getVar('dir_autoupdate') > 0 ? _YES : _NO; |
|
180 | + $ret['online'] = (int) $this->getVar('dir_online') > 0 ? _YES : _NO; |
|
181 | + $ret['filterrelease'] = (int) $this->getVar('dir_filterrelease') > 0 ? _YES : _NO; |
|
182 | + $ret['weight'] = (int) $this->getVar('dir_weight'); |
|
183 | 183 | $ret['datecreated'] = \formatTimestamp($this->getVar('dir_datecreated'), 's'); |
184 | 184 | $ret['submitter'] = \XoopsUser::getUnameFromId($this->getVar('dir_submitter')); |
185 | 185 | return $ret; |
@@ -23,8 +23,8 @@ discard block |
||
23 | 23 | use Xmf\Request; |
24 | 24 | use XoopsModules\Wggithub\Common; |
25 | 25 | |
26 | -include_once \dirname(__DIR__) . '/preloads/autoloader.php'; |
|
27 | -require __DIR__ . '/header.php'; |
|
26 | +include_once \dirname(__DIR__).'/preloads/autoloader.php'; |
|
27 | +require __DIR__.'/header.php'; |
|
28 | 28 | |
29 | 29 | // Template Index |
30 | 30 | $templateMain = 'wggithub_admin_index.tpl'; |
@@ -45,12 +45,12 @@ discard block |
||
45 | 45 | // InfoBox Statistics |
46 | 46 | $adminObject->addInfoBox(\_AM_WGGITHUB_STATISTICS); |
47 | 47 | // Info elements |
48 | -$adminObject->addInfoBoxLine(\sprintf( '<label>' . \_AM_WGGITHUB_THEREARE_SETTINGS . '</label>', $countSettings)); |
|
49 | -$adminObject->addInfoBoxLine(\sprintf( '<label>' . \_AM_WGGITHUB_THEREARE_DIRECTORIES . '</label>', $countDirectories)); |
|
50 | -$adminObject->addInfoBoxLine(\sprintf( '<label>' . \_AM_WGGITHUB_THEREARE_LOGS . '</label>', $countLogs)); |
|
51 | -$adminObject->addInfoBoxLine(\sprintf( '<label>' . \_AM_WGGITHUB_THEREARE_REPOSITORIES . '</label>', $countRepositories)); |
|
52 | -$adminObject->addInfoBoxLine(\sprintf( '<label>' . \_AM_WGGITHUB_THEREARE_READMES . '</label>', $countReadmes)); |
|
53 | -$adminObject->addInfoBoxLine(\sprintf( '<label>' . \_AM_WGGITHUB_THEREARE_RELEASES . '</label>', $countReleases)); |
|
48 | +$adminObject->addInfoBoxLine(\sprintf('<label>'.\_AM_WGGITHUB_THEREARE_SETTINGS.'</label>', $countSettings)); |
|
49 | +$adminObject->addInfoBoxLine(\sprintf('<label>'.\_AM_WGGITHUB_THEREARE_DIRECTORIES.'</label>', $countDirectories)); |
|
50 | +$adminObject->addInfoBoxLine(\sprintf('<label>'.\_AM_WGGITHUB_THEREARE_LOGS.'</label>', $countLogs)); |
|
51 | +$adminObject->addInfoBoxLine(\sprintf('<label>'.\_AM_WGGITHUB_THEREARE_REPOSITORIES.'</label>', $countRepositories)); |
|
52 | +$adminObject->addInfoBoxLine(\sprintf('<label>'.\_AM_WGGITHUB_THEREARE_READMES.'</label>', $countReadmes)); |
|
53 | +$adminObject->addInfoBoxLine(\sprintf('<label>'.\_AM_WGGITHUB_THEREARE_RELEASES.'</label>', $countReleases)); |
|
54 | 54 | |
55 | 55 | // Upload Folders |
56 | 56 | $configurator = new Common\Configurator(); |
@@ -70,12 +70,12 @@ discard block |
||
70 | 70 | // Test Data |
71 | 71 | if ($helper->getConfig('displaySampleButton')) { |
72 | 72 | \xoops_loadLanguage('admin/modulesadmin', 'system'); |
73 | - include_once \dirname(__DIR__) . '/testdata/index.php'; |
|
74 | - $adminObject->addItemButton(\constant('CO_' . $moduleDirNameUpper . '_ADD_SAMPLEDATA'), '__DIR__ . /../../testdata/index.php?op=load', 'add'); |
|
75 | - $adminObject->addItemButton(\constant('CO_' . $moduleDirNameUpper . '_SAVE_SAMPLEDATA'), '__DIR__ . /../../testdata/index.php?op=save', 'add'); |
|
73 | + include_once \dirname(__DIR__).'/testdata/index.php'; |
|
74 | + $adminObject->addItemButton(\constant('CO_'.$moduleDirNameUpper.'_ADD_SAMPLEDATA'), '__DIR__ . /../../testdata/index.php?op=load', 'add'); |
|
75 | + $adminObject->addItemButton(\constant('CO_'.$moduleDirNameUpper.'_SAVE_SAMPLEDATA'), '__DIR__ . /../../testdata/index.php?op=save', 'add'); |
|
76 | 76 | // $adminObject->addItemButton(\constant('CO_' . $moduleDirNameUpper . '_EXPORT_SCHEMA'), '__DIR__ . /../../testdata/index.php?op=exportschema', 'add'); |
77 | 77 | $adminObject->displayButton('left'); |
78 | 78 | } |
79 | 79 | $GLOBALS['xoopsTpl']->assign('index', $adminObject->displayIndex()); |
80 | 80 | // End Test Data |
81 | -require __DIR__ . '/footer.php'; |
|
81 | +require __DIR__.'/footer.php'; |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | $helper = \XoopsModules\Wggithub\Helper::getInstance(); |
138 | 138 | $utility = new \XoopsModules\Wggithub\Utility(); |
139 | 139 | $ret = $this->getValues($keys, $format, $maxDepth); |
140 | - $ret['id'] = $this->getVar('rm_id'); |
|
140 | + $ret['id'] = $this->getVar('rm_id'); |
|
141 | 141 | $repositoriesHandler = $helper->getHandler('Repositories'); |
142 | 142 | $repositoriesObj = $repositoriesHandler->get($this->getVar('rm_repoid')); |
143 | 143 | $repoName = '*****missing repo_name*****'; |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | $ret['submitter'] = \XoopsUser::getUnameFromId($this->getVar('rm_submitter')); |
170 | 170 | $ret['gitbook_link'] = ''; |
171 | 171 | if (\strpos($ret['downloadurl'], 'XoopsDoc') > 0) { |
172 | - $ret['gitbook_link'] = 'https://xoops.gitbook.io/' . $repoName . '/'; |
|
172 | + $ret['gitbook_link'] = 'https://xoops.gitbook.io/'.$repoName.'/'; |
|
173 | 173 | } |
174 | 174 | return $ret; |
175 | 175 | } |
@@ -214,22 +214,22 @@ discard block |
||
214 | 214 | $arrReplace = [ |
215 | 215 | 'src="https://xoops.org/images/logoXoopsPhp8.png', |
216 | 216 | "src='https://xoops.org/images/logoXoopsPhp8.png", |
217 | - 'src="' . $baseUrl . '.gitbook/assets/', |
|
218 | - "src='" . $baseUrl . '.gitbook/assets/', |
|
219 | - 'src="' . $baseUrl . 'en/assets/', |
|
220 | - "src='" . $baseUrl . 'en/assets/', |
|
221 | - 'src="' . $baseUrl . 'assets/', |
|
222 | - "src='" . $baseUrl . 'assets/' |
|
217 | + 'src="'.$baseUrl.'.gitbook/assets/', |
|
218 | + "src='".$baseUrl.'.gitbook/assets/', |
|
219 | + 'src="'.$baseUrl.'en/assets/', |
|
220 | + "src='".$baseUrl.'en/assets/', |
|
221 | + 'src="'.$baseUrl.'assets/', |
|
222 | + "src='".$baseUrl.'assets/' |
|
223 | 223 | ]; |
224 | 224 | $contentClean = \str_replace($arrSearch, $arrReplace, $contentClean); |
225 | 225 | |
226 | 226 | //replace known missing images |
227 | 227 | $arrSearch = [ |
228 | - 'src="' . \XOOPS_URL . '/screenshot.jpg', |
|
229 | - 'src="' . \XOOPS_URL . '/sd-099-theme-surprice.gif', |
|
230 | - 'src="' . \XOOPS_URL . '/shot.gif', |
|
231 | - 'src="' . \XOOPS_URL . '/shot.jpg', |
|
232 | - 'src="' . \XOOPS_URL . '/theme_preview.png', |
|
228 | + 'src="'.\XOOPS_URL.'/screenshot.jpg', |
|
229 | + 'src="'.\XOOPS_URL.'/sd-099-theme-surprice.gif', |
|
230 | + 'src="'.\XOOPS_URL.'/shot.gif', |
|
231 | + 'src="'.\XOOPS_URL.'/shot.jpg', |
|
232 | + 'src="'.\XOOPS_URL.'/theme_preview.png', |
|
233 | 233 | 'src="https://github.com/xoops/newbb-tutorial/tree/54ef6104e66b74e8c6dea683d3cce70ceafdd739/assets/image001.jpg', |
234 | 234 | 'src="https://github.com/xoops/repairshop-tutorial/tree/719d6d32dea221b3e980fd3d6222f179ac898394/en/assets/img_2.jpg', |
235 | 235 | 'src="https://github.com/xoops/xoops-mylinks-tutorial/tree/d30c30645d48c5ead51399ff711c25935cbd0495/en/assets/forkit.png', |
@@ -300,7 +300,7 @@ discard block |
||
300 | 300 | 'src="https://insight.sensiolabs.com/projects/7ada0220-a68e-4369-aef0-950172630ff8/mini.png', |
301 | 301 | 'src="https://xoops.org/images/translations-github-blue.svg', |
302 | 302 | ]; |
303 | - $contentClean = \str_replace($arrSearch, 'src="' . \WGGITHUB_IMAGE_URL . '/blank.gif', $contentClean); |
|
303 | + $contentClean = \str_replace($arrSearch, 'src="'.\WGGITHUB_IMAGE_URL.'/blank.gif', $contentClean); |
|
304 | 304 | |
305 | 305 | return $contentClean; |
306 | 306 | } |
@@ -32,9 +32,9 @@ discard block |
||
32 | 32 | // Get instance of module |
33 | 33 | $helper = \XoopsModules\Wggithub\Helper::getInstance(); |
34 | 34 | $repositoriesHandler = $helper->getHandler('Repositories'); |
35 | - $repoId = (int)$itemId; |
|
35 | + $repoId = (int) $itemId; |
|
36 | 36 | $repositoriesObj = $repositoriesHandler->get($repoId); |
37 | - $repositoriesObj->setVar('repo_comments', (int)$itemNumb); |
|
37 | + $repositoriesObj->setVar('repo_comments', (int) $itemNumb); |
|
38 | 38 | if ($repositoriesHandler->insert($repositoriesObj)) { |
39 | 39 | return true; |
40 | 40 | } |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | |
60 | 60 | $tags = []; |
61 | 61 | $tags['ITEM_NAME'] = $repoName; |
62 | - $tags['ITEM_URL'] = \XOOPS_URL . '/modules/wggithub/repositories.php?op=show&repo_id=' . $repoId; |
|
62 | + $tags['ITEM_URL'] = \XOOPS_URL.'/modules/wggithub/repositories.php?op=show&repo_id='.$repoId; |
|
63 | 63 | $notificationHandler = \xoops_getHandler('notification'); |
64 | 64 | // Event modify notification |
65 | 65 | $notificationHandler->triggerEvent('global', 0, 'global_comment', $tags); |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | |
26 | 26 | //\defined('XOOPS_ROOT_PATH') || die('XOOPS root path not defined'); |
27 | 27 | |
28 | -require_once \dirname(__DIR__, 4) . '/mainfile.php'; |
|
28 | +require_once \dirname(__DIR__, 4).'/mainfile.php'; |
|
29 | 29 | $moduleDirName = \basename(\dirname(__DIR__, 2)); |
30 | 30 | $moduleDirNameUpper = \mb_strtoupper($moduleDirName); |
31 | 31 | \xoops_loadLanguage('filechecker', $moduleDirName); |
@@ -57,24 +57,24 @@ discard block |
||
57 | 57 | if (null === $original_file_path) { |
58 | 58 | if (self::fileExists($file_path)) { |
59 | 59 | $path_status = "<img src='$pathIcon16/1.png' >"; |
60 | - $path_status .= "$file_path (" . \constant('CO_' . $moduleDirNameUpper . '_' . 'FC_AVAILABLE') . ') '; |
|
60 | + $path_status .= "$file_path (".\constant('CO_'.$moduleDirNameUpper.'_'.'FC_AVAILABLE').') '; |
|
61 | 61 | } else { |
62 | 62 | $path_status = "<img src='$pathIcon16/0.png' >"; |
63 | - $path_status .= "$file_path (" . \constant('CO_' . $moduleDirNameUpper . '_' . 'FC_NOTAVAILABLE') . ') '; |
|
63 | + $path_status .= "$file_path (".\constant('CO_'.$moduleDirNameUpper.'_'.'FC_NOTAVAILABLE').') '; |
|
64 | 64 | } |
65 | 65 | } else { |
66 | 66 | if (self::compareFiles($file_path, $original_file_path)) { |
67 | 67 | $path_status = "<img src='$pathIcon16/1.png' >"; |
68 | - $path_status .= "$file_path (" . \constant('CO_' . $moduleDirNameUpper . '_' . 'FC_AVAILABLE') . ') '; |
|
68 | + $path_status .= "$file_path (".\constant('CO_'.$moduleDirNameUpper.'_'.'FC_AVAILABLE').') '; |
|
69 | 69 | } else { |
70 | 70 | $path_status = "<img src='$pathIcon16/0.png' >"; |
71 | - $path_status .= "$file_path (" . \constant('CO_' . $moduleDirNameUpper . '_' . 'FC_NOTAVAILABLE') . ') '; |
|
72 | - $path_status .= "<form action='" . $_SERVER['SCRIPT_NAME'] . "' method='post'>"; |
|
71 | + $path_status .= "$file_path (".\constant('CO_'.$moduleDirNameUpper.'_'.'FC_NOTAVAILABLE').') '; |
|
72 | + $path_status .= "<form action='".$_SERVER['SCRIPT_NAME']."' method='post'>"; |
|
73 | 73 | $path_status .= "<input type='hidden' name='op' value='copyfile'>"; |
74 | 74 | $path_status .= "<input type='hidden' name='file_path' value='$file_path'>"; |
75 | 75 | $path_status .= "<input type='hidden' name='original_file_path' value='$original_file_path'>"; |
76 | 76 | $path_status .= "<input type='hidden' name='redirect' value='$redirectFile'>"; |
77 | - $path_status .= "<button class='submit' onClick='this.form.submit();'>" . \constant('CO_' . $moduleDirNameUpper . '_' . 'FC_CREATETHEFILE') . '</button>'; |
|
77 | + $path_status .= "<button class='submit' onClick='this.form.submit();'>".\constant('CO_'.$moduleDirNameUpper.'_'.'FC_CREATETHEFILE').'</button>'; |
|
78 | 78 | $path_status .= '</form>'; |
79 | 79 | } |
80 | 80 | } |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | { |
140 | 140 | $target = \str_replace('..', '', $target); |
141 | 141 | |
142 | - return @\chmod($target, (int)$mode); |
|
142 | + return @\chmod($target, (int) $mode); |
|
143 | 143 | } |
144 | 144 | } |
145 | 145 | |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | if (\Xmf\Request::hasVar('redirect', 'POST')) { |
156 | 156 | $redirect = $_POST['redirect']; |
157 | 157 | } |
158 | - $msg = FileChecker::copyFile($original_file_path, $file_path) ? \constant('CO_' . $moduleDirNameUpper . '_' . 'FC_FILECOPIED') : \constant('CO_' . $moduleDirNameUpper . '_' . 'FC_FILENOTCOPIED'); |
|
159 | - \redirect_header($redirect, 2, $msg . ': ' . $file_path); |
|
158 | + $msg = FileChecker::copyFile($original_file_path, $file_path) ? \constant('CO_'.$moduleDirNameUpper.'_'.'FC_FILECOPIED') : \constant('CO_'.$moduleDirNameUpper.'_'.'FC_FILENOTCOPIED'); |
|
159 | + \redirect_header($redirect, 2, $msg.': '.$file_path); |
|
160 | 160 | break; |
161 | 161 | } |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | use XoopsModules\Wggithub; |
25 | 25 | |
26 | 26 | |
27 | -require_once \dirname(__DIR__, 4) . '/mainfile.php'; |
|
27 | +require_once \dirname(__DIR__, 4).'/mainfile.php'; |
|
28 | 28 | $moduleDirName = \basename(\dirname(__DIR__, 2)); |
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 | |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | { |
119 | 119 | $target = \str_replace('..', '', $target); |
120 | 120 | |
121 | - return @\chmod($target, (int)$mode); |
|
121 | + return @\chmod($target, (int) $mode); |
|
122 | 122 | } |
123 | 123 | |
124 | 124 | /** |
@@ -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 | } |
@@ -32,4 +32,4 @@ |
||
32 | 32 | $GLOBALS['xoopsTpl']->assign('admin', \WGGITHUB_ADMIN); |
33 | 33 | $GLOBALS['xoopsTpl']->assign('copyright', $copyright); |
34 | 34 | // |
35 | -include_once \XOOPS_ROOT_PATH . '/footer.php'; |
|
35 | +include_once \XOOPS_ROOT_PATH.'/footer.php'; |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | global $xoopsDB; |
33 | 33 | |
34 | 34 | if (!\defined('WGGITHUB_URL')) { |
35 | - \define('WGGITHUB_URL', \XOOPS_URL . '/modules/wggithub'); |
|
35 | + \define('WGGITHUB_URL', \XOOPS_URL.'/modules/wggithub'); |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | switch ($category) { |
@@ -42,11 +42,11 @@ discard block |
||
42 | 42 | return $item; |
43 | 43 | break; |
44 | 44 | case 'repositories': |
45 | - $sql = 'SELECT repo_name FROM ' . $xoopsDB->prefix('wggithub_repositories') . ' WHERE repo_id = '. $item_id; |
|
45 | + $sql = 'SELECT repo_name FROM '.$xoopsDB->prefix('wggithub_repositories').' WHERE repo_id = '.$item_id; |
|
46 | 46 | $result = $xoopsDB->query($sql); |
47 | 47 | $result_array = $xoopsDB->fetchArray($result); |
48 | 48 | $item['name'] = $result_array['repo_name']; |
49 | - $item['url'] = \WGGITHUB_URL . '/repositories.php?repo_id=' . $item_id; |
|
49 | + $item['url'] = \WGGITHUB_URL.'/repositories.php?repo_id='.$item_id; |
|
50 | 50 | return $item; |
51 | 51 | break; |
52 | 52 | } |
@@ -20,29 +20,29 @@ |
||
20 | 20 | * @author Goffy - XOOPS Development Team - Email:<[email protected]> - Website:<https://wedega.com> |
21 | 21 | */ |
22 | 22 | if (!\defined('XOOPS_ICONS32_PATH')) { |
23 | - \define('XOOPS_ICONS32_PATH', \XOOPS_ROOT_PATH . '/Frameworks/moduleclasses/icons/32'); |
|
23 | + \define('XOOPS_ICONS32_PATH', \XOOPS_ROOT_PATH.'/Frameworks/moduleclasses/icons/32'); |
|
24 | 24 | } |
25 | 25 | if (!\defined('XOOPS_ICONS32_URL')) { |
26 | - \define('XOOPS_ICONS32_URL', \XOOPS_URL . '/Frameworks/moduleclasses/icons/32'); |
|
26 | + \define('XOOPS_ICONS32_URL', \XOOPS_URL.'/Frameworks/moduleclasses/icons/32'); |
|
27 | 27 | } |
28 | 28 | \define('WGGITHUB_DIRNAME', 'wggithub'); |
29 | -\define('WGGITHUB_PATH', \XOOPS_ROOT_PATH . '/modules/' . \WGGITHUB_DIRNAME); |
|
30 | -\define('WGGITHUB_URL', \XOOPS_URL . '/modules/' . \WGGITHUB_DIRNAME); |
|
31 | -\define('WGGITHUB_ICONS_PATH', \WGGITHUB_PATH . '/assets/icons'); |
|
32 | -\define('WGGITHUB_ICONS_URL', \WGGITHUB_URL . '/assets/icons'); |
|
33 | -\define('WGGITHUB_IMAGE_PATH', \WGGITHUB_PATH . '/assets/images'); |
|
34 | -\define('WGGITHUB_IMAGE_URL', \WGGITHUB_URL . '/assets/images'); |
|
35 | -\define('WGGITHUB_UPLOAD_PATH', XOOPS_UPLOAD_PATH . '/' . \WGGITHUB_DIRNAME); |
|
36 | -\define('WGGITHUB_UPLOAD_URL', XOOPS_UPLOAD_URL . '/' . \WGGITHUB_DIRNAME); |
|
37 | -\define('WGGITHUB_UPLOAD_FILES_PATH', \WGGITHUB_UPLOAD_PATH . '/files'); |
|
38 | -\define('WGGITHUB_UPLOAD_FILES_URL', \WGGITHUB_UPLOAD_URL . '/files'); |
|
39 | -\define('WGGITHUB_UPLOAD_IMAGE_PATH', \WGGITHUB_UPLOAD_PATH . '/images'); |
|
40 | -\define('WGGITHUB_UPLOAD_IMAGE_URL', \WGGITHUB_UPLOAD_URL . '/images'); |
|
41 | -\define('WGGITHUB_UPLOAD_SHOTS_PATH', \WGGITHUB_UPLOAD_PATH . '/images/shots'); |
|
42 | -\define('WGGITHUB_UPLOAD_SHOTS_URL', \WGGITHUB_UPLOAD_URL . '/images/shots'); |
|
43 | -\define('WGGITHUB_ADMIN', \WGGITHUB_URL . '/admin/index.php'); |
|
44 | -$localLogo = \WGGITHUB_IMAGE_URL . '/wedega_logo.png'; |
|
29 | +\define('WGGITHUB_PATH', \XOOPS_ROOT_PATH.'/modules/'.\WGGITHUB_DIRNAME); |
|
30 | +\define('WGGITHUB_URL', \XOOPS_URL.'/modules/'.\WGGITHUB_DIRNAME); |
|
31 | +\define('WGGITHUB_ICONS_PATH', \WGGITHUB_PATH.'/assets/icons'); |
|
32 | +\define('WGGITHUB_ICONS_URL', \WGGITHUB_URL.'/assets/icons'); |
|
33 | +\define('WGGITHUB_IMAGE_PATH', \WGGITHUB_PATH.'/assets/images'); |
|
34 | +\define('WGGITHUB_IMAGE_URL', \WGGITHUB_URL.'/assets/images'); |
|
35 | +\define('WGGITHUB_UPLOAD_PATH', XOOPS_UPLOAD_PATH.'/'.\WGGITHUB_DIRNAME); |
|
36 | +\define('WGGITHUB_UPLOAD_URL', XOOPS_UPLOAD_URL.'/'.\WGGITHUB_DIRNAME); |
|
37 | +\define('WGGITHUB_UPLOAD_FILES_PATH', \WGGITHUB_UPLOAD_PATH.'/files'); |
|
38 | +\define('WGGITHUB_UPLOAD_FILES_URL', \WGGITHUB_UPLOAD_URL.'/files'); |
|
39 | +\define('WGGITHUB_UPLOAD_IMAGE_PATH', \WGGITHUB_UPLOAD_PATH.'/images'); |
|
40 | +\define('WGGITHUB_UPLOAD_IMAGE_URL', \WGGITHUB_UPLOAD_URL.'/images'); |
|
41 | +\define('WGGITHUB_UPLOAD_SHOTS_PATH', \WGGITHUB_UPLOAD_PATH.'/images/shots'); |
|
42 | +\define('WGGITHUB_UPLOAD_SHOTS_URL', \WGGITHUB_UPLOAD_URL.'/images/shots'); |
|
43 | +\define('WGGITHUB_ADMIN', \WGGITHUB_URL.'/admin/index.php'); |
|
44 | +$localLogo = \WGGITHUB_IMAGE_URL.'/wedega_logo.png'; |
|
45 | 45 | // Module Information |
46 | -$copyright = "<a href='https://wedega.com' title='XOOPS on Wedega' target='_blank'><img src='" . $localLogo . "' alt='XOOPS on Wedega' /></a>"; |
|
47 | -include_once \XOOPS_ROOT_PATH . '/class/xoopsrequest.php'; |
|
48 | -include_once \WGGITHUB_PATH . '/include/functions.php'; |
|
46 | +$copyright = "<a href='https://wedega.com' title='XOOPS on Wedega' target='_blank'><img src='".$localLogo."' alt='XOOPS on Wedega' /></a>"; |
|
47 | +include_once \XOOPS_ROOT_PATH.'/class/xoopsrequest.php'; |
|
48 | +include_once \WGGITHUB_PATH.'/include/functions.php'; |