@@ -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 | } |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | use XoopsModules\Wggithub\Constants; |
26 | 26 | use XoopsModules\Wggithub\Common; |
27 | 27 | |
28 | -require __DIR__ . '/header.php'; |
|
28 | +require __DIR__.'/header.php'; |
|
29 | 29 | // It recovered the value of argument op in URL$ |
30 | 30 | $op = Request::getCmd('op', 'list'); |
31 | 31 | $repoId = Request::getInt('repo_id'); |
@@ -43,9 +43,9 @@ discard block |
||
43 | 43 | $templateMain = 'wggithub_admin_repositories.tpl'; |
44 | 44 | $GLOBALS['xoopsTpl']->assign('navigation', $adminObject->displayNavigation('repositories.php')); |
45 | 45 | |
46 | - $autoApproved = (int)$helper->getConfig('autoapproved'); |
|
46 | + $autoApproved = (int) $helper->getConfig('autoapproved'); |
|
47 | 47 | $GLOBALS['xoopsTpl']->assign('autoApproved', !$autoApproved); |
48 | - $GLOBALS['xoopsTpl']->assign('wggithub_icons_url_16', WGGITHUB_ICONS_URL . '/16'); |
|
48 | + $GLOBALS['xoopsTpl']->assign('wggithub_icons_url_16', WGGITHUB_ICONS_URL.'/16'); |
|
49 | 49 | |
50 | 50 | $filterValue = ''; |
51 | 51 | $filterStatus = 0; |
@@ -82,8 +82,8 @@ discard block |
||
82 | 82 | } |
83 | 83 | // Display Navigation |
84 | 84 | if ($repositoriesCount > $limit) { |
85 | - include_once \XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
86 | - $pagenav = new \XoopsPageNav($repositoriesCount, $limit, $start, 'start', 'op=list&limit=' . $limit); |
|
85 | + include_once \XOOPS_ROOT_PATH.'/class/pagenav.php'; |
|
86 | + $pagenav = new \XoopsPageNav($repositoriesCount, $limit, $start, 'start', 'op=list&limit='.$limit); |
|
87 | 87 | $GLOBALS['xoopsTpl']->assign('pagenav', $pagenav->renderNav(4)); |
88 | 88 | } |
89 | 89 | } else { |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | $repositoriesObj->setVar('repo_submitter', Request::getInt('repo_submitter', 0)); |
125 | 125 | // Insert Data |
126 | 126 | if ($repositoriesHandler->insert($repositoriesObj)) { |
127 | - \redirect_header('repositories.php?op=list&start=' . $start . '&limit=' . $limit, 2, \_AM_WGGITHUB_FORM_OK); |
|
127 | + \redirect_header('repositories.php?op=list&start='.$start.'&limit='.$limit, 2, \_AM_WGGITHUB_FORM_OK); |
|
128 | 128 | } |
129 | 129 | // Get Form |
130 | 130 | $GLOBALS['xoopsTpl']->assign('error', $repositoriesObj->getHtmlErrors()); |
@@ -170,9 +170,9 @@ discard block |
||
170 | 170 | $repositoriesObj->setVar(Request::getString('field'), Request::getInt('value', 0)); |
171 | 171 | // Insert Data |
172 | 172 | if ($repositoriesHandler->insert($repositoriesObj, true)) { |
173 | - \redirect_header('repositories.php?op=list&start=' . $start . '&limit=' . $limit, 2, \_AM_WGGITHUB_FORM_OK); |
|
173 | + \redirect_header('repositories.php?op=list&start='.$start.'&limit='.$limit, 2, \_AM_WGGITHUB_FORM_OK); |
|
174 | 174 | } |
175 | 175 | } |
176 | 176 | break; |
177 | 177 | } |
178 | -require __DIR__ . '/footer.php'; |
|
178 | +require __DIR__.'/footer.php'; |
@@ -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); |
@@ -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'; |
@@ -40,10 +40,10 @@ discard block |
||
40 | 40 | 'license_url' => 'http://www.gnu.org/licenses/gpl-3.0.en.html', |
41 | 41 | 'help' => 'page=help', |
42 | 42 | 'release_info' => 'release_info', |
43 | - 'release_file' => \XOOPS_URL . '/modules/wggithub/docs/release_info file', |
|
43 | + 'release_file' => \XOOPS_URL.'/modules/wggithub/docs/release_info file', |
|
44 | 44 | 'release_date' => '2021/03/31', |
45 | 45 | 'manual' => 'link to manual file', |
46 | - 'manual_file' => \XOOPS_URL . '/modules/wggithub/docs/install.txt', |
|
46 | + 'manual_file' => \XOOPS_URL.'/modules/wggithub/docs/install.txt', |
|
47 | 47 | 'min_php' => '7.3', |
48 | 48 | 'min_xoops' => '2.5.11', |
49 | 49 | 'min_admin' => '1.2', |
@@ -310,8 +310,8 @@ discard block |
||
310 | 310 | // Make Sample button visible? |
311 | 311 | $modversion['config'][] = [ |
312 | 312 | 'name' => 'displaySampleButton', |
313 | - 'title' => 'CO_' . $moduleDirNameUpper . '_' . 'SHOW_SAMPLE_BUTTON', |
|
314 | - 'description' => 'CO_' . $moduleDirNameUpper . '_' . 'SHOW_SAMPLE_BUTTON_DESC', |
|
313 | + 'title' => 'CO_'.$moduleDirNameUpper.'_'.'SHOW_SAMPLE_BUTTON', |
|
314 | + 'description' => 'CO_'.$moduleDirNameUpper.'_'.'SHOW_SAMPLE_BUTTON_DESC', |
|
315 | 315 | 'formtype' => 'yesno', |
316 | 316 | 'valuetype' => 'int', |
317 | 317 | 'default' => 1, |
@@ -20,8 +20,8 @@ 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 | |
27 | 27 | $helper = \XoopsModules\Wggithub\Helper::getInstance(); |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | $xoBreadcrumbs = []; |
31 | 31 | if ($helper->getConfig('show_breadcrumbs')) { |
32 | 32 | if (isset($GLOBALS['xoopsModule']) && is_object($GLOBALS['xoopsModule'])) { |
33 | - $xoBreadcrumbs[] = ['title' => $GLOBALS['xoopsModule']->getVar('name'), 'link' => WGGITHUB_URL . '/']; |
|
33 | + $xoBreadcrumbs[] = ['title' => $GLOBALS['xoopsModule']->getVar('name'), 'link' => WGGITHUB_URL.'/']; |
|
34 | 34 | } |
35 | 35 | } |
36 | 36 | // Get instance of module |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | // |
45 | 45 | $myts = MyTextSanitizer::getInstance(); |
46 | 46 | // Default Css Style |
47 | -$style = WGGITHUB_URL . '/assets/css/style.css'; |
|
47 | +$style = WGGITHUB_URL.'/assets/css/style.css'; |
|
48 | 48 | // Smarty Default |
49 | 49 | $sysPathIcon16 = $GLOBALS['xoopsModule']->getInfo('sysicons16'); |
50 | 50 | $sysPathIcon32 = $GLOBALS['xoopsModule']->getInfo('sysicons32'); |
@@ -28,15 +28,15 @@ discard block |
||
28 | 28 | Github\GithubClient |
29 | 29 | }; |
30 | 30 | |
31 | -require __DIR__ . '/header.php'; |
|
31 | +require __DIR__.'/header.php'; |
|
32 | 32 | $GLOBALS['xoopsOption']['template_main'] = 'wggithub_index.tpl'; |
33 | -include_once \XOOPS_ROOT_PATH . '/header.php'; |
|
33 | +include_once \XOOPS_ROOT_PATH.'/header.php'; |
|
34 | 34 | |
35 | 35 | // Permissions |
36 | 36 | $permGlobalView = $permissionsHandler->getPermGlobalView(); |
37 | 37 | if (!$permGlobalView) { |
38 | 38 | $GLOBALS['xoopsTpl']->assign('error', _NOPERM); |
39 | - require __DIR__ . '/footer.php'; |
|
39 | + require __DIR__.'/footer.php'; |
|
40 | 40 | } |
41 | 41 | $permGlobalRead = $permissionsHandler->getPermGlobalRead(); |
42 | 42 | $permReadmeUpdate = $permissionsHandler->getPermReadmeUpdate(); |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | |
51 | 51 | // Define Stylesheet |
52 | 52 | $GLOBALS['xoTheme']->addStylesheet($style, null); |
53 | -$GLOBALS['xoTheme']->addStylesheet(WGGITHUB_URL . '/assets/css/tabs.css', null); |
|
53 | +$GLOBALS['xoTheme']->addStylesheet(WGGITHUB_URL.'/assets/css/tabs.css', null); |
|
54 | 54 | $keywords = []; |
55 | 55 | // |
56 | 56 | $GLOBALS['xoopsTpl']->assign('xoops_icons32_url', XOOPS_ICONS32_URL); |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | } |
116 | 116 | unset($crLogs); |
117 | 117 | |
118 | - $menu = Request::getInt('menu', 0); |
|
118 | + $menu = Request::getInt('menu', 0); |
|
119 | 119 | |
120 | 120 | $crDirectories = new \CriteriaCompo(); |
121 | 121 | $crDirectories->add(new \Criteria('dir_online', 1)); |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | foreach (\array_keys($directoriesAll) as $i) { |
131 | 131 | $directories[$i] = $directoriesAll[$i]->getValuesDirectories(); |
132 | 132 | $dirName = $directoriesAll[$i]->getVar('dir_name'); |
133 | - $dirFilterRelease = (bool)$directoriesAll[$i]->getVar('dir_filterrelease'); |
|
133 | + $dirFilterRelease = (bool) $directoriesAll[$i]->getVar('dir_filterrelease'); |
|
134 | 134 | $repos = []; |
135 | 135 | $crRepositories = new \CriteriaCompo(); |
136 | 136 | //first block/parentheses |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | $crRepo2->add(new Criteria('repo_status', Constants::STATUS_UPTODATE), 'OR'); |
144 | 144 | $crRepositories->add($crRepo2); |
145 | 145 | //third |
146 | - $autoApproved = (int)$helper->getConfig('autoapproved'); |
|
146 | + $autoApproved = (int) $helper->getConfig('autoapproved'); |
|
147 | 147 | if (!$autoApproved) { |
148 | 148 | //third |
149 | 149 | $crRepo3 = new CriteriaCompo(); |
@@ -222,9 +222,9 @@ discard block |
||
222 | 222 | } |
223 | 223 | $directories[$i]['repos'] = $repos; |
224 | 224 | $directories[$i]['previousRepos'] = $dirStart[$i] > 0; |
225 | - $directories[$i]['previousOp'] = '&dirId=' . $i . '&start=' . ($dirStart[$i] - $dirLimit[$i]) . '&limit=' . $dirLimit[$i] . '&frelease=' . $filterRelease . '&fsortby=' . $filterSortby; |
|
225 | + $directories[$i]['previousOp'] = '&dirId='.$i.'&start='.($dirStart[$i] - $dirLimit[$i]).'&limit='.$dirLimit[$i].'&frelease='.$filterRelease.'&fsortby='.$filterSortby; |
|
226 | 226 | $directories[$i]['nextRepos'] = ($repositoriesCount - $dirStart[$i]) > $dirLimit[$i]; |
227 | - $directories[$i]['nextOp'] = '&dirId=' . $i . '&start=' . ($dirStart[$i] + $dirLimit[$i]) . '&limit=' . $dirLimit[$i] . '&frelease=' . $filterRelease . '&fsortby=' . $filterSortby; |
|
227 | + $directories[$i]['nextOp'] = '&dirId='.$i.'&start='.($dirStart[$i] + $dirLimit[$i]).'&limit='.$dirLimit[$i].'&frelease='.$filterRelease.'&fsortby='.$filterSortby; |
|
228 | 228 | $GLOBALS['xoopsTpl']->assign('menu', $menu); |
229 | 229 | $GLOBALS['xoopsTpl']->assign('directories', $directories); |
230 | 230 | } |
@@ -242,10 +242,10 @@ discard block |
||
242 | 242 | // Permissions |
243 | 243 | if (!$permGlobalRead) { |
244 | 244 | $GLOBALS['xoopsTpl']->assign('error', \_NOPERM); |
245 | - require __DIR__ . '/footer.php'; |
|
245 | + require __DIR__.'/footer.php'; |
|
246 | 246 | } |
247 | 247 | $dirName = Request::getString('dir_name', ''); |
248 | - $redir = 'index.php?op=list_afterupdate&frelease=' . $filterRelease . '&fsortby=' . $filterSortby; |
|
248 | + $redir = 'index.php?op=list_afterupdate&frelease='.$filterRelease.'&fsortby='.$filterSortby; |
|
249 | 249 | $githubClient = GithubClient::getInstance(); |
250 | 250 | $result = $githubClient->executeUpdate($dirName); |
251 | 251 | if ($result) { |
@@ -259,12 +259,12 @@ discard block |
||
259 | 259 | // Permissions |
260 | 260 | if (!$permReadmeUpdate) { |
261 | 261 | $GLOBALS['xoopsTpl']->assign('error', \_NOPERM); |
262 | - require __DIR__ . '/footer.php'; |
|
262 | + require __DIR__.'/footer.php'; |
|
263 | 263 | } |
264 | 264 | $repoId = Request::getInt('repo_id', 0); |
265 | 265 | $repoUser = Request::getString('repo_user', 'none'); |
266 | 266 | $repoName = Request::getString('repo_name', 'none'); |
267 | - $redir = 'index.php?op=list_afterupdate&frelease=' . $filterRelease . '&fsortby=' . $filterSortby; |
|
267 | + $redir = 'index.php?op=list_afterupdate&frelease='.$filterRelease.'&fsortby='.$filterSortby; |
|
268 | 268 | $result = $helper->getHandler('Readmes')->updateReadmes($repoId, $repoUser, $repoName); |
269 | 269 | if ($result) { |
270 | 270 | \redirect_header($redir, 2, \_MA_WGGITHUB_READGH_SUCCESS); |
@@ -273,7 +273,7 @@ discard block |
||
273 | 273 | } |
274 | 274 | break; |
275 | 275 | case 'api_error': |
276 | - $error = Request::getString('message') . '<br>' . Request::getString('url'); |
|
276 | + $error = Request::getString('message').'<br>'.Request::getString('url'); |
|
277 | 277 | $GLOBALS['xoopsTpl']->assign('error', $error); |
278 | 278 | break; |
279 | 279 | } |
@@ -282,11 +282,11 @@ discard block |
||
282 | 282 | // Breadcrumbs |
283 | 283 | $xoBreadcrumbs[] = ['title' => \_MA_WGGITHUB_INDEX]; |
284 | 284 | // Keywords |
285 | -wggithubMetaKeywords($helper->getConfig('keywords') . ', ' . \implode(',', $keywords)); |
|
285 | +wggithubMetaKeywords($helper->getConfig('keywords').', '.\implode(',', $keywords)); |
|
286 | 286 | unset($keywords); |
287 | 287 | // Description |
288 | 288 | wggithubMetaDescription(\_MA_WGGITHUB_INDEX_DESC); |
289 | 289 | $GLOBALS['xoopsTpl']->assign('xoops_mpageurl', WGGITHUB_URL.'/index.php'); |
290 | 290 | $GLOBALS['xoopsTpl']->assign('xoops_icons32_url', XOOPS_ICONS32_URL); |
291 | 291 | $GLOBALS['xoopsTpl']->assign('wggithub_upload_url', WGGITHUB_UPLOAD_URL); |
292 | -require __DIR__ . '/footer.php'; |
|
292 | +require __DIR__.'/footer.php'; |