@@ -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); |
@@ -121,13 +121,13 @@ discard block |
||
121 | 121 | foreach (\array_keys($directoriesAll) as $i) { |
122 | 122 | $directories[$i] = $directoriesAll[$i]->getValuesDirectories(); |
123 | 123 | $dirName = $directoriesAll[$i]->getVar('dir_name'); |
124 | - $dirFilterRelease = (bool)$directoriesAll[$i]->getVar('dir_filterrelease'); |
|
124 | + $dirFilterRelease = (bool) $directoriesAll[$i]->getVar('dir_filterrelease'); |
|
125 | 125 | $repos = []; |
126 | 126 | $crRepositories = new \CriteriaCompo(); |
127 | 127 | $crRepositories->add(new \Criteria('repo_user', $dirName)); |
128 | 128 | $repositoriesCountTotal = $repositoriesHandler->getCount($crRepositories); |
129 | 129 | if ('any' === $filterRelease && $dirFilterRelease) { |
130 | - $crRepositories->add(new \Criteria('repo_prerelease', 1) ); |
|
130 | + $crRepositories->add(new \Criteria('repo_prerelease', 1)); |
|
131 | 131 | $crRepositories->add(new \Criteria('repo_release', 1), 'OR'); |
132 | 132 | } |
133 | 133 | if ('final' === $filterRelease && $dirFilterRelease) { |
@@ -182,9 +182,9 @@ discard block |
||
182 | 182 | } |
183 | 183 | $directories[$i]['repos'] = $repos; |
184 | 184 | $directories[$i]['previousRepos'] = $start > 0; |
185 | - $directories[$i]['previousOp'] = '&start=' . ($start - $limit) . '&limit=' . $limit . '&release=' . $filterRelease . '&sortby=' . $filterSortby; |
|
185 | + $directories[$i]['previousOp'] = '&start='.($start - $limit).'&limit='.$limit.'&release='.$filterRelease.'&sortby='.$filterSortby; |
|
186 | 186 | $directories[$i]['nextRepos'] = ($repositoriesCount - $start) > $limit; |
187 | - $directories[$i]['nextOp'] = '&start=' . ($start + $limit) . '&limit=' . $limit . '&release=' . $filterRelease . '&sortby=' . $filterSortby; |
|
187 | + $directories[$i]['nextOp'] = '&start='.($start + $limit).'&limit='.$limit.'&release='.$filterRelease.'&sortby='.$filterSortby; |
|
188 | 188 | $GLOBALS['xoopsTpl']->assign('start', $start); |
189 | 189 | $GLOBALS['xoopsTpl']->assign('limit', $limit); |
190 | 190 | $GLOBALS['xoopsTpl']->assign('menu', $menu); |
@@ -195,8 +195,8 @@ discard block |
||
195 | 195 | unset($crDirectories, $directories); |
196 | 196 | // Display Navigation |
197 | 197 | if ($directoriesCount > $limit) { |
198 | - require_once \XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
199 | - $pagenav = new \XoopsPageNav($directoriesCount, $limit, $start, 'start', 'op=list&limit=' . $limit); |
|
198 | + require_once \XOOPS_ROOT_PATH.'/class/pagenav.php'; |
|
199 | + $pagenav = new \XoopsPageNav($directoriesCount, $limit, $start, 'start', 'op=list&limit='.$limit); |
|
200 | 200 | $GLOBALS['xoopsTpl']->assign('pagenav', $pagenav->renderNav(4)); |
201 | 201 | } |
202 | 202 | $GLOBALS['xoopsTpl']->assign('lang_thereare', \sprintf(\_MA_WGGITHUB_INDEX_THEREARE, $directoriesCount)); |
@@ -209,12 +209,12 @@ discard block |
||
209 | 209 | // Permissions |
210 | 210 | if (!$permGlobalRead) { |
211 | 211 | $GLOBALS['xoopsTpl']->assign('error', \_NOPERM); |
212 | - require __DIR__ . '/footer.php'; |
|
212 | + require __DIR__.'/footer.php'; |
|
213 | 213 | } |
214 | 214 | $dirName = Request::getString('dir_name', ''); |
215 | 215 | $githubClient = GithubClient::getInstance(); |
216 | 216 | $result = $githubClient->executeUpdate($dirName); |
217 | - $redir = 'index.php?op=list_afterupdate&start=' . $start . '&limit=' . $limit . '&release=' . $filterRelease . '&sortby=' . $filterSortby; |
|
217 | + $redir = 'index.php?op=list_afterupdate&start='.$start.'&limit='.$limit.'&release='.$filterRelease.'&sortby='.$filterSortby; |
|
218 | 218 | if ($result) { |
219 | 219 | \redirect_header($redir, 2, \_MA_WGGITHUB_READGH_SUCCESS); |
220 | 220 | } else { |
@@ -226,13 +226,13 @@ discard block |
||
226 | 226 | // Permissions |
227 | 227 | if (!$permReadmeUpdate) { |
228 | 228 | $GLOBALS['xoopsTpl']->assign('error', \_NOPERM); |
229 | - require __DIR__ . '/footer.php'; |
|
229 | + require __DIR__.'/footer.php'; |
|
230 | 230 | } |
231 | 231 | $repoId = Request::getInt('repo_id', 0); |
232 | 232 | $repoUser = Request::getString('repo_user', 'none'); |
233 | 233 | $repoName = Request::getString('repo_name', 'none'); |
234 | 234 | $result = $helper->getHandler('Readmes')->updateReadmes($repoId, $repoUser, $repoName); |
235 | - $redir = 'index.php?op=list_afterupdate&start=' . $start . '&limit=' . $limit . '&release=' . $filterRelease . '&sortby=' . $filterSortby; |
|
235 | + $redir = 'index.php?op=list_afterupdate&start='.$start.'&limit='.$limit.'&release='.$filterRelease.'&sortby='.$filterSortby; |
|
236 | 236 | if ($result) { |
237 | 237 | \redirect_header($redir, 2, \_MA_WGGITHUB_READGH_SUCCESS); |
238 | 238 | } else { |
@@ -245,11 +245,11 @@ discard block |
||
245 | 245 | // Breadcrumbs |
246 | 246 | $xoBreadcrumbs[] = ['title' => \_MA_WGGITHUB_INDEX]; |
247 | 247 | // Keywords |
248 | -wggithubMetaKeywords($helper->getConfig('keywords') . ', ' . \implode(',', $keywords)); |
|
248 | +wggithubMetaKeywords($helper->getConfig('keywords').', '.\implode(',', $keywords)); |
|
249 | 249 | unset($keywords); |
250 | 250 | // Description |
251 | 251 | wggithubMetaDescription(\_MA_WGGITHUB_INDEX_DESC); |
252 | 252 | $GLOBALS['xoopsTpl']->assign('xoops_mpageurl', WGGITHUB_URL.'/index.php'); |
253 | 253 | $GLOBALS['xoopsTpl']->assign('xoops_icons32_url', XOOPS_ICONS32_URL); |
254 | 254 | $GLOBALS['xoopsTpl']->assign('wggithub_upload_url', WGGITHUB_UPLOAD_URL); |
255 | -require __DIR__ . '/footer.php'; |
|
255 | +require __DIR__.'/footer.php'; |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | Github\GithubClient |
28 | 28 | }; |
29 | 29 | |
30 | -require __DIR__ . '/header.php'; |
|
30 | +require __DIR__.'/header.php'; |
|
31 | 31 | // It recovered the value of argument op in URL$ |
32 | 32 | $op = Request::getCmd('op', 'list'); |
33 | 33 | // Request dir_id |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | $GLOBALS['xoopsTpl']->assign('directories_count', $directoriesCount); |
49 | 49 | $GLOBALS['xoopsTpl']->assign('wggithub_url', WGGITHUB_URL); |
50 | 50 | $GLOBALS['xoopsTpl']->assign('wggithub_upload_url', WGGITHUB_UPLOAD_URL); |
51 | - $GLOBALS['xoopsTpl']->assign('wggithub_icons_url_16', WGGITHUB_ICONS_URL . '/16'); |
|
51 | + $GLOBALS['xoopsTpl']->assign('wggithub_icons_url_16', WGGITHUB_ICONS_URL.'/16'); |
|
52 | 52 | // Table view directories |
53 | 53 | if ($directoriesCount > 0) { |
54 | 54 | foreach (\array_keys($directoriesAll) as $i) { |
@@ -58,8 +58,8 @@ discard block |
||
58 | 58 | } |
59 | 59 | // Display Navigation |
60 | 60 | if ($directoriesCount > $limit) { |
61 | - include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
62 | - $pagenav = new \XoopsPageNav($directoriesCount, $limit, $start, 'start', 'op=list&limit=' . $limit); |
|
61 | + include_once XOOPS_ROOT_PATH.'/class/pagenav.php'; |
|
62 | + $pagenav = new \XoopsPageNav($directoriesCount, $limit, $start, 'start', 'op=list&limit='.$limit); |
|
63 | 63 | $GLOBALS['xoopsTpl']->assign('pagenav', $pagenav->renderNav(4)); |
64 | 64 | } |
65 | 65 | } else { |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | $dirName = $directoriesObj->getVar('dir_name'); |
144 | 144 | $githubClient = GithubClient::getInstance(); |
145 | 145 | $result = $githubClient->executeUpdate($dirName); |
146 | - $redir = 'index.php?op=list&start=' . $start . '&limit=' . $limit; |
|
146 | + $redir = 'index.php?op=list&start='.$start.'&limit='.$limit; |
|
147 | 147 | if ($result) { |
148 | 148 | \redirect_header($redir, 2, \_MA_WGGITHUB_READGH_SUCCESS); |
149 | 149 | } else { |
@@ -151,4 +151,4 @@ discard block |
||
151 | 151 | } |
152 | 152 | break; |
153 | 153 | } |
154 | -require __DIR__ . '/footer.php'; |
|
154 | +require __DIR__.'/footer.php'; |