@@ -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'; |