@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | public const DIRECTORY_TYPE_USER = 1; |
41 | 41 | public const DIRECTORY_TYPE_ORG = 2; |
42 | 42 | |
43 | - public const DIRECTORY_CONTENT_ALL = 0; |
|
43 | + public const DIRECTORY_CONTENT_ALL = 0; |
|
44 | 44 | public const DIRECTORY_CONTENT_OWN = 1; |
45 | 45 | |
46 | 46 | // Constants for status |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | public const PERM_README_UPDATE = 3; |
58 | 58 | |
59 | 59 | // Constants for log type |
60 | - public const LOG_TYPE_NONE = 0; |
|
60 | + public const LOG_TYPE_NONE = 0; |
|
61 | 61 | public const LOG_TYPE_UPDATE_START = 1; |
62 | 62 | public const LOG_TYPE_UPDATE_END = 2; |
63 | 63 | public const LOG_TYPE_REQUEST = 3; |
@@ -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 | $dirId = Request::getInt('dir_id'); |
@@ -41,8 +41,8 @@ discard block |
||
41 | 41 | default: |
42 | 42 | // Define Stylesheet |
43 | 43 | $GLOBALS['xoTheme']->addStylesheet($style, null); |
44 | - $GLOBALS['xoTheme']->addScript(WGGITHUB_URL . '/assets/js/jquery-ui.js'); |
|
45 | - $GLOBALS['xoTheme']->addScript(WGGITHUB_URL . '/assets/js/sortable.js'); |
|
44 | + $GLOBALS['xoTheme']->addScript(WGGITHUB_URL.'/assets/js/jquery-ui.js'); |
|
45 | + $GLOBALS['xoTheme']->addScript(WGGITHUB_URL.'/assets/js/sortable.js'); |
|
46 | 46 | $templateMain = 'wggithub_admin_directories.tpl'; |
47 | 47 | $GLOBALS['xoopsTpl']->assign('navigation', $adminObject->displayNavigation('directories.php')); |
48 | 48 | $adminObject->addItemButton(_AM_WGGITHUB_ADD_DIRECTORY, 'directories.php?op=new', 'add'); |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | $GLOBALS['xoopsTpl']->assign('directories_count', $directoriesCount); |
53 | 53 | $GLOBALS['xoopsTpl']->assign('wggithub_url', WGGITHUB_URL); |
54 | 54 | $GLOBALS['xoopsTpl']->assign('wggithub_upload_url', WGGITHUB_UPLOAD_URL); |
55 | - $GLOBALS['xoopsTpl']->assign('wggithub_icons_url_16', WGGITHUB_ICONS_URL . '/16'); |
|
55 | + $GLOBALS['xoopsTpl']->assign('wggithub_icons_url_16', WGGITHUB_ICONS_URL.'/16'); |
|
56 | 56 | // Table view directories |
57 | 57 | if ($directoriesCount > 0) { |
58 | 58 | foreach (\array_keys($directoriesAll) as $i) { |
@@ -62,8 +62,8 @@ discard block |
||
62 | 62 | } |
63 | 63 | // Display Navigation |
64 | 64 | if ($directoriesCount > $limit) { |
65 | - include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
66 | - $pagenav = new \XoopsPageNav($directoriesCount, $limit, $start, 'start', 'op=list&limit=' . $limit); |
|
65 | + include_once XOOPS_ROOT_PATH.'/class/pagenav.php'; |
|
66 | + $pagenav = new \XoopsPageNav($directoriesCount, $limit, $start, 'start', 'op=list&limit='.$limit); |
|
67 | 67 | $GLOBALS['xoopsTpl']->assign('pagenav', $pagenav->renderNav(4)); |
68 | 68 | } |
69 | 69 | } else { |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | $directoriesObj->setVar('dir_submitter', Request::getInt('dir_submitter', 0)); |
104 | 104 | // Insert Data |
105 | 105 | if ($directoriesHandler->insert($directoriesObj)) { |
106 | - \redirect_header('directories.php?op=list&start=' . $start . '&limit=' . $limit, 2, _AM_WGGITHUB_FORM_OK); |
|
106 | + \redirect_header('directories.php?op=list&start='.$start.'&limit='.$limit, 2, _AM_WGGITHUB_FORM_OK); |
|
107 | 107 | } |
108 | 108 | // Get Form |
109 | 109 | $GLOBALS['xoopsTpl']->assign('error', $directoriesObj->getHtmlErrors()); |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | $crReadmes = new \CriteriaCompo(); |
143 | 143 | $crReadmes->add(new \Criteria('rm_repoid', $repoId)); |
144 | 144 | if (!$readmesHandler->deleteAll($crReadmes)) { |
145 | - $errors[] = \_AM_WGGITHUB_ERROR_DELETE_DATA . ' READMES'; |
|
145 | + $errors[] = \_AM_WGGITHUB_ERROR_DELETE_DATA.' READMES'; |
|
146 | 146 | } |
147 | 147 | } |
148 | 148 | if ($repositoriesAll[$i]->getVar('repo_release') > 0 || $repositoriesAll[$i]->getVar('repo_prerelease') > 0) { |
@@ -150,17 +150,17 @@ discard block |
||
150 | 150 | $crReleases = new \CriteriaCompo(); |
151 | 151 | $crReleases->add(new \Criteria('rel_repoid', $repoId)); |
152 | 152 | if (!$releasesHandler->deleteAll($crReleases)) { |
153 | - $errors[] = \_AM_WGGITHUB_ERROR_DELETE_DATA . ' RELEASES'; |
|
153 | + $errors[] = \_AM_WGGITHUB_ERROR_DELETE_DATA.' RELEASES'; |
|
154 | 154 | } |
155 | 155 | } |
156 | 156 | } |
157 | 157 | if (!$repositoriesHandler->deleteAll($crRepositories)) { |
158 | - $errors[] = \_AM_WGGITHUB_ERROR_DELETE_DATA . ' REPOSITORIES'; |
|
158 | + $errors[] = \_AM_WGGITHUB_ERROR_DELETE_DATA.' REPOSITORIES'; |
|
159 | 159 | } |
160 | 160 | unset($crReadmes, $crReleases, $repositoriesAll); |
161 | 161 | //delete directory |
162 | 162 | if (!$directoriesHandler->delete($directoriesObj)) { |
163 | - $errors[] = \_AM_WGGITHUB_ERROR_DELETE_DATA . ' DIRECTORIES - ' . $directoriesObj->getHtmlErrors(); |
|
163 | + $errors[] = \_AM_WGGITHUB_ERROR_DELETE_DATA.' DIRECTORIES - '.$directoriesObj->getHtmlErrors(); |
|
164 | 164 | } |
165 | 165 | if (0 == \count($errors)) { |
166 | 166 | \redirect_header('directories.php', 3, _AM_WGGITHUB_FORM_DELETE_OK); |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | $dirName = $directoriesObj->getVar('dir_name'); |
182 | 182 | $githubClient = GithubClient::getInstance(); |
183 | 183 | $result = $githubClient->executeUpdate($dirName); |
184 | - $redir = 'directories.php?op=list&start=' . $start . '&limit=' . $limit; |
|
184 | + $redir = 'directories.php?op=list&start='.$start.'&limit='.$limit; |
|
185 | 185 | if ($result) { |
186 | 186 | \redirect_header($redir, 2, \_MA_WGGITHUB_READGH_SUCCESS); |
187 | 187 | } else { |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | $directoriesObj->setVar(Request::getString('field'), Request::getInt('value', 0)); |
195 | 195 | // Insert Data |
196 | 196 | if ($directoriesHandler->insert($directoriesObj, true)) { |
197 | - \redirect_header('directories.php?op=list&start=' . $start . '&limit=' . $limit, 2, _AM_WGGITHUB_FORM_OK); |
|
197 | + \redirect_header('directories.php?op=list&start='.$start.'&limit='.$limit, 2, _AM_WGGITHUB_FORM_OK); |
|
198 | 198 | } |
199 | 199 | } |
200 | 200 | break; |
@@ -207,4 +207,4 @@ discard block |
||
207 | 207 | } |
208 | 208 | break; |
209 | 209 | } |
210 | -require __DIR__ . '/footer.php'; |
|
210 | +require __DIR__.'/footer.php'; |
@@ -140,7 +140,7 @@ |
||
140 | 140 | $submitter = isset($GLOBALS['xoopsUser']) && \is_object($GLOBALS['xoopsUser']) ? $GLOBALS['xoopsUser']->getVar('uid') : 0; |
141 | 141 | // add/update all items from table repositories |
142 | 142 | foreach ($repos as $key => $repo) { |
143 | - $fork = (bool)$repo['fork']; |
|
143 | + $fork = (bool) $repo['fork']; |
|
144 | 144 | if (Constants::DIRECTORY_CONTENT_ALL == $dirContent || false === $fork) { |
145 | 145 | $crRepositories = new \CriteriaCompo(); |
146 | 146 | $crRepositories->add(new \Criteria('repo_nodeid', $repo['node_id'])); |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | $readmesObj->setVar('rm_content', $readme['content']); |
171 | 171 | $readmesObj->setVar('rm_encoding', $readme['encoding']); |
172 | 172 | $readmesObj->setVar('rm_downloadurl', $readme['download_url']); |
173 | - $readmesObj->setVar('rm_datecreated',time()); |
|
173 | + $readmesObj->setVar('rm_datecreated', time()); |
|
174 | 174 | $readmesObj->setVar('rm_submitter', $submitter); |
175 | 175 | // Insert Data |
176 | 176 | if (!$readmesHandler->insert($readmesObj)) { |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | $readmesObj->setVar('rm_downloadurl', $readme['download_url']); |
233 | 233 | $baseurl = \substr($readme['html_url'], 0, \strrpos($readme['html_url'], '/') + 1); |
234 | 234 | $readmesObj->setVar('rm_baseurl', $baseurl); |
235 | - $readmesObj->setVar('rm_datecreated',time()); |
|
235 | + $readmesObj->setVar('rm_datecreated', time()); |
|
236 | 236 | $readmesObj->setVar('rm_submitter', $submitter); |
237 | 237 | // Insert Data |
238 | 238 | if (!$readmesHandler->insert($readmesObj)) { |
@@ -266,10 +266,10 @@ discard block |
||
266 | 266 | public function updateRepoReadme() |
267 | 267 | { |
268 | 268 | // update repo_readme |
269 | - $sql = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('wggithub_repositories') . ' INNER JOIN ' . $GLOBALS['xoopsDB']->prefix('wggithub_readmes'); |
|
270 | - $sql .= ' ON ' . $GLOBALS['xoopsDB']->prefix('wggithub_repositories') . '.repo_id = ' . $GLOBALS['xoopsDB']->prefix('wggithub_readmes') . '.rm_repoid '; |
|
271 | - $sql .= 'SET ' . $GLOBALS['xoopsDB']->prefix('wggithub_repositories') . '.repo_readme = 1 '; |
|
272 | - $sql .= 'WHERE (((' . $GLOBALS['xoopsDB']->prefix('wggithub_readmes') . '.rm_id)>0));'; |
|
269 | + $sql = 'UPDATE '.$GLOBALS['xoopsDB']->prefix('wggithub_repositories').' INNER JOIN '.$GLOBALS['xoopsDB']->prefix('wggithub_readmes'); |
|
270 | + $sql .= ' ON '.$GLOBALS['xoopsDB']->prefix('wggithub_repositories').'.repo_id = '.$GLOBALS['xoopsDB']->prefix('wggithub_readmes').'.rm_repoid '; |
|
271 | + $sql .= 'SET '.$GLOBALS['xoopsDB']->prefix('wggithub_repositories').'.repo_readme = 1 '; |
|
272 | + $sql .= 'WHERE ((('.$GLOBALS['xoopsDB']->prefix('wggithub_readmes').'.rm_id)>0));'; |
|
273 | 273 | $GLOBALS['xoopsDB']->queryF($sql); |
274 | 274 | |
275 | 275 | return true; |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | if (Constants::STATUS_NEW === $repoStatus || Constants::STATUS_UPDATED === $repoStatus || 0 == $releasesCount) { |
150 | 150 | $ghReleases = $githubClient->getReleases($repositoriesAll[$i]->getVar('repo_user'), $repositoriesAll[$i]->getVar('repo_name')); |
151 | 151 | if ($releasesCount > 0) { |
152 | - $sql = 'DELETE FROM `' . $GLOBALS['xoopsDB']->prefix('wggithub_releases') . '` WHERE `rel_repoid` = ' . $repoId; |
|
152 | + $sql = 'DELETE FROM `'.$GLOBALS['xoopsDB']->prefix('wggithub_releases').'` WHERE `rel_repoid` = '.$repoId; |
|
153 | 153 | if (!$result = $GLOBALS['xoopsDB']->queryF($sql)) { |
154 | 154 | return false; |
155 | 155 | } |
@@ -159,13 +159,13 @@ discard block |
||
159 | 159 | $first = true; |
160 | 160 | $final = false; |
161 | 161 | foreach ($ghReleases as $ghRelease) { |
162 | - if ($first || (!$final && !(bool)$ghRelease['prerelease'])) { |
|
162 | + if ($first || (!$final && !(bool) $ghRelease['prerelease'])) { |
|
163 | 163 | // save first in any case and save first final version |
164 | 164 | $releasesObj = $releasesHandler->create(); |
165 | 165 | $releasesObj->setVar('rel_repoid', $repoId); |
166 | 166 | $releasesObj->setVar('rel_type', $ghRelease['type']); |
167 | 167 | $releasesObj->setVar('rel_name', $ghRelease['name']); |
168 | - $releasesObj->setVar('rel_prerelease', (true == (bool)$ghRelease['prerelease'])); |
|
168 | + $releasesObj->setVar('rel_prerelease', (true == (bool) $ghRelease['prerelease'])); |
|
169 | 169 | $releasesObj->setVar('rel_publishedat', \strtotime($ghRelease['published_at'])); |
170 | 170 | $releasesObj->setVar('rel_tarballurl', $ghRelease['tarball_url']); |
171 | 171 | $releasesObj->setVar('rel_zipballurl', $ghRelease['zipball_url']); |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | } |
178 | 178 | } |
179 | 179 | $first = false; |
180 | - if (false === (bool)$ghRelease['prerelease']) { |
|
180 | + if (false === (bool) $ghRelease['prerelease']) { |
|
181 | 181 | $final = true; |
182 | 182 | } |
183 | 183 | } |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | // must return true otherwise releases will not be loaded |
216 | 216 | return true; |
217 | 217 | } |
218 | - $sql = 'DELETE FROM `' . $GLOBALS['xoopsDB']->prefix('wggithub_releases') . '` WHERE `rel_repoid` = ' . $repoId; |
|
218 | + $sql = 'DELETE FROM `'.$GLOBALS['xoopsDB']->prefix('wggithub_releases').'` WHERE `rel_repoid` = '.$repoId; |
|
219 | 219 | if (!$result = $GLOBALS['xoopsDB']->queryF($sql)) { |
220 | 220 | return false; |
221 | 221 | } |
@@ -224,13 +224,13 @@ discard block |
||
224 | 224 | $first = true; |
225 | 225 | $final = false; |
226 | 226 | foreach ($ghReleases as $ghRelease) { |
227 | - if ($first || (!$final && !(bool)$ghRelease['prerelease'])) { |
|
227 | + if ($first || (!$final && !(bool) $ghRelease['prerelease'])) { |
|
228 | 228 | // save first in any case and save first final version |
229 | 229 | $releasesObj = $releasesHandler->create(); |
230 | 230 | $releasesObj->setVar('rel_repoid', $repoId); |
231 | 231 | $releasesObj->setVar('rel_type', $ghRelease['type']); |
232 | 232 | $releasesObj->setVar('rel_name', $ghRelease['name']); |
233 | - $releasesObj->setVar('rel_prerelease', (true == (bool)$ghRelease['prerelease'])); |
|
233 | + $releasesObj->setVar('rel_prerelease', (true == (bool) $ghRelease['prerelease'])); |
|
234 | 234 | $releasesObj->setVar('rel_publishedat', \strtotime($ghRelease['published_at'])); |
235 | 235 | $releasesObj->setVar('rel_tarballurl', $ghRelease['tarball_url']); |
236 | 236 | $releasesObj->setVar('rel_zipballurl', $ghRelease['zipball_url']); |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | } |
243 | 243 | } |
244 | 244 | $first = false; |
245 | - if (false === (bool)$ghRelease['prerelease']) { |
|
245 | + if (false === (bool) $ghRelease['prerelease']) { |
|
246 | 246 | $final = true; |
247 | 247 | } |
248 | 248 | } |
@@ -259,17 +259,17 @@ discard block |
||
259 | 259 | public function updateRepoReleases() |
260 | 260 | { |
261 | 261 | // update repo_prerelease |
262 | - $sql = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('wggithub_repositories') . ' INNER JOIN ' . $GLOBALS['xoopsDB']->prefix('wggithub_releases'); |
|
263 | - $sql .= ' ON ' . $GLOBALS['xoopsDB']->prefix('wggithub_repositories') . '.repo_id = ' . $GLOBALS['xoopsDB']->prefix('wggithub_releases') . '.rel_repoid '; |
|
264 | - $sql .= 'SET ' . $GLOBALS['xoopsDB']->prefix('wggithub_repositories') . '.repo_prerelease = 1 '; |
|
265 | - $sql .= 'WHERE (((' . $GLOBALS['xoopsDB']->prefix('wggithub_releases') . '.rel_prerelease)=1));'; |
|
262 | + $sql = 'UPDATE '.$GLOBALS['xoopsDB']->prefix('wggithub_repositories').' INNER JOIN '.$GLOBALS['xoopsDB']->prefix('wggithub_releases'); |
|
263 | + $sql .= ' ON '.$GLOBALS['xoopsDB']->prefix('wggithub_repositories').'.repo_id = '.$GLOBALS['xoopsDB']->prefix('wggithub_releases').'.rel_repoid '; |
|
264 | + $sql .= 'SET '.$GLOBALS['xoopsDB']->prefix('wggithub_repositories').'.repo_prerelease = 1 '; |
|
265 | + $sql .= 'WHERE ((('.$GLOBALS['xoopsDB']->prefix('wggithub_releases').'.rel_prerelease)=1));'; |
|
266 | 266 | $GLOBALS['xoopsDB']->queryF($sql); |
267 | 267 | |
268 | 268 | // update repo_release |
269 | - $sql = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('wggithub_repositories') . ' INNER JOIN ' . $GLOBALS['xoopsDB']->prefix('wggithub_releases'); |
|
270 | - $sql .= ' ON ' . $GLOBALS['xoopsDB']->prefix('wggithub_repositories') . '.repo_id = ' . $GLOBALS['xoopsDB']->prefix('wggithub_releases') . '.rel_repoid '; |
|
271 | - $sql .= 'SET ' . $GLOBALS['xoopsDB']->prefix('wggithub_repositories') . '.repo_release = 1 '; |
|
272 | - $sql .= 'WHERE (((' . $GLOBALS['xoopsDB']->prefix('wggithub_releases') . '.rel_prerelease)=0));'; |
|
269 | + $sql = 'UPDATE '.$GLOBALS['xoopsDB']->prefix('wggithub_repositories').' INNER JOIN '.$GLOBALS['xoopsDB']->prefix('wggithub_releases'); |
|
270 | + $sql .= ' ON '.$GLOBALS['xoopsDB']->prefix('wggithub_repositories').'.repo_id = '.$GLOBALS['xoopsDB']->prefix('wggithub_releases').'.rel_repoid '; |
|
271 | + $sql .= 'SET '.$GLOBALS['xoopsDB']->prefix('wggithub_repositories').'.repo_release = 1 '; |
|
272 | + $sql .= 'WHERE ((('.$GLOBALS['xoopsDB']->prefix('wggithub_releases').'.rel_prerelease)=0));'; |
|
273 | 273 | $GLOBALS['xoopsDB']->queryF($sql); |
274 | 274 | |
275 | 275 | return true; |
@@ -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 | $relId = Request::getInt('rel_id'); |
@@ -72,8 +72,8 @@ discard block |
||
72 | 72 | } |
73 | 73 | // Display Navigation |
74 | 74 | if ($releasesCount > $limit) { |
75 | - include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
76 | - $pagenav = new \XoopsPageNav($releasesCount, $limit, $start, 'start', 'op=list&limit=' . $limit); |
|
75 | + include_once XOOPS_ROOT_PATH.'/class/pagenav.php'; |
|
76 | + $pagenav = new \XoopsPageNav($releasesCount, $limit, $start, 'start', 'op=list&limit='.$limit); |
|
77 | 77 | $GLOBALS['xoopsTpl']->assign('pagenav', $pagenav->renderNav(4)); |
78 | 78 | } |
79 | 79 | } else { |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | $releasesObj->setVar('rel_submitter', Request::getInt('rel_submitter', 0)); |
120 | 120 | // Insert Data |
121 | 121 | if ($releasesHandler->insert($releasesObj)) { |
122 | - \redirect_header('releases.php?op=list&start=' . $start . '&limit=' . $limit, 2, _AM_WGGITHUB_FORM_OK); |
|
122 | + \redirect_header('releases.php?op=list&start='.$start.'&limit='.$limit, 2, _AM_WGGITHUB_FORM_OK); |
|
123 | 123 | } |
124 | 124 | // Get Form |
125 | 125 | $GLOBALS['xoopsTpl']->assign('error', $releasesObj->getHtmlErrors()); |
@@ -161,4 +161,4 @@ discard block |
||
161 | 161 | } |
162 | 162 | break; |
163 | 163 | } |
164 | -require __DIR__ . '/footer.php'; |
|
164 | +require __DIR__.'/footer.php'; |
@@ -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 | $rmId = Request::getInt('rm_id'); |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | $in[] = $i; |
66 | 66 | } |
67 | 67 | } |
68 | - $crReadmes->add(new Criteria('rm_repoid', '(' . implode(',', $in) . ')', 'IN')); |
|
68 | + $crReadmes->add(new Criteria('rm_repoid', '('.implode(',', $in).')', 'IN')); |
|
69 | 69 | } |
70 | 70 | $crReadmes->setStart($start); |
71 | 71 | $crReadmes->setLimit($limit); |
@@ -83,8 +83,8 @@ discard block |
||
83 | 83 | } |
84 | 84 | // Display Navigation |
85 | 85 | if ($readmesCount > $limit) { |
86 | - include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
87 | - $pagenav = new \XoopsPageNav($readmesCount, $limit, $start, 'start', 'op=list&limit=' . $limit); |
|
86 | + include_once XOOPS_ROOT_PATH.'/class/pagenav.php'; |
|
87 | + $pagenav = new \XoopsPageNav($readmesCount, $limit, $start, 'start', 'op=list&limit='.$limit); |
|
88 | 88 | $GLOBALS['xoopsTpl']->assign('pagenav', $pagenav->renderNav(4)); |
89 | 89 | } |
90 | 90 | } else { |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | $readmesObj->setVar('rm_submitter', Request::getInt('rm_submitter', 0)); |
131 | 131 | // Insert Data |
132 | 132 | if ($readmesHandler->insert($readmesObj)) { |
133 | - \redirect_header('readmes.php?op=list&start=' . $start . '&limit=' . $limit, 2, _AM_WGGITHUB_FORM_OK); |
|
133 | + \redirect_header('readmes.php?op=list&start='.$start.'&limit='.$limit, 2, _AM_WGGITHUB_FORM_OK); |
|
134 | 134 | } |
135 | 135 | // Get Form |
136 | 136 | $GLOBALS['xoopsTpl']->assign('error', $readmesObj->getHtmlErrors()); |
@@ -172,4 +172,4 @@ discard block |
||
172 | 172 | } |
173 | 173 | break; |
174 | 174 | } |
175 | -require __DIR__ . '/footer.php'; |
|
175 | +require __DIR__.'/footer.php'; |
@@ -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'); |
@@ -80,8 +80,8 @@ discard block |
||
80 | 80 | } |
81 | 81 | // Display Navigation |
82 | 82 | if ($repositoriesCount > $limit) { |
83 | - include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
84 | - $pagenav = new \XoopsPageNav($repositoriesCount, $limit, $start, 'start', 'op=list&limit=' . $limit); |
|
83 | + include_once XOOPS_ROOT_PATH.'/class/pagenav.php'; |
|
84 | + $pagenav = new \XoopsPageNav($repositoriesCount, $limit, $start, 'start', 'op=list&limit='.$limit); |
|
85 | 85 | $GLOBALS['xoopsTpl']->assign('pagenav', $pagenav->renderNav(4)); |
86 | 86 | } |
87 | 87 | } else { |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | $repositoriesObj->setVar('repo_submitter', Request::getInt('repo_submitter', 0)); |
133 | 133 | // Insert Data |
134 | 134 | if ($repositoriesHandler->insert($repositoriesObj)) { |
135 | - \redirect_header('repositories.php?op=list&start=' . $start . '&limit=' . $limit, 2, _AM_WGGITHUB_FORM_OK); |
|
135 | + \redirect_header('repositories.php?op=list&start='.$start.'&limit='.$limit, 2, _AM_WGGITHUB_FORM_OK); |
|
136 | 136 | } |
137 | 137 | // Get Form |
138 | 138 | $GLOBALS['xoopsTpl']->assign('error', $repositoriesObj->getHtmlErrors()); |
@@ -174,4 +174,4 @@ discard block |
||
174 | 174 | } |
175 | 175 | break; |
176 | 176 | } |
177 | -require __DIR__ . '/footer.php'; |
|
177 | +require __DIR__.'/footer.php'; |
@@ -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 |
@@ -213,9 +213,9 @@ discard block |
||
213 | 213 | } |
214 | 214 | $directories[$i]['repos'] = $repos; |
215 | 215 | $directories[$i]['previousRepos'] = $dirStart[$i] > 0; |
216 | - $directories[$i]['previousOp'] = '&dirId=' . $i . '&start=' . ($dirStart[$i] - $dirLimit[$i]) . '&limit=' . $dirLimit[$i] . '&release=' . $filterRelease . '&sortby=' . $filterSortby; |
|
216 | + $directories[$i]['previousOp'] = '&dirId='.$i.'&start='.($dirStart[$i] - $dirLimit[$i]).'&limit='.$dirLimit[$i].'&release='.$filterRelease.'&sortby='.$filterSortby; |
|
217 | 217 | $directories[$i]['nextRepos'] = ($repositoriesCount - $dirStart[$i]) > $limit; |
218 | - $directories[$i]['nextOp'] = '&dirId=' . $i . '&start=' . ($dirStart[$i] + $dirLimit[$i]) . '&limit=' . $dirLimit[$i] . '&release=' . $filterRelease . '&sortby=' . $filterSortby; |
|
218 | + $directories[$i]['nextOp'] = '&dirId='.$i.'&start='.($dirStart[$i] + $dirLimit[$i]).'&limit='.$dirLimit[$i].'&release='.$filterRelease.'&sortby='.$filterSortby; |
|
219 | 219 | $GLOBALS['xoopsTpl']->assign('menu', $menu); |
220 | 220 | $GLOBALS['xoopsTpl']->assign('directories', $directories); |
221 | 221 | } |
@@ -232,10 +232,10 @@ discard block |
||
232 | 232 | // Permissions |
233 | 233 | if (!$permGlobalRead) { |
234 | 234 | $GLOBALS['xoopsTpl']->assign('error', \_NOPERM); |
235 | - require __DIR__ . '/footer.php'; |
|
235 | + require __DIR__.'/footer.php'; |
|
236 | 236 | } |
237 | 237 | $dirName = Request::getString('dir_name', ''); |
238 | - $redir = 'index.php?op=list_afterupdate&release=' . $filterRelease . '&sortby=' . $filterSortby; |
|
238 | + $redir = 'index.php?op=list_afterupdate&release='.$filterRelease.'&sortby='.$filterSortby; |
|
239 | 239 | $githubClient = GithubClient::getInstance(); |
240 | 240 | $result = $githubClient->executeUpdate($dirName); |
241 | 241 | if ($result) { |
@@ -249,12 +249,12 @@ discard block |
||
249 | 249 | // Permissions |
250 | 250 | if (!$permReadmeUpdate) { |
251 | 251 | $GLOBALS['xoopsTpl']->assign('error', \_NOPERM); |
252 | - require __DIR__ . '/footer.php'; |
|
252 | + require __DIR__.'/footer.php'; |
|
253 | 253 | } |
254 | 254 | $repoId = Request::getInt('repo_id', 0); |
255 | 255 | $repoUser = Request::getString('repo_user', 'none'); |
256 | 256 | $repoName = Request::getString('repo_name', 'none'); |
257 | - $redir = 'index.php?op=list_afterupdate&release=' . $filterRelease . '&sortby=' . $filterSortby; |
|
257 | + $redir = 'index.php?op=list_afterupdate&release='.$filterRelease.'&sortby='.$filterSortby; |
|
258 | 258 | $result = $helper->getHandler('Readmes')->updateReadmes($repoId, $repoUser, $repoName); |
259 | 259 | if ($result) { |
260 | 260 | \redirect_header($redir, 2, \_MA_WGGITHUB_READGH_SUCCESS); |
@@ -268,11 +268,11 @@ discard block |
||
268 | 268 | // Breadcrumbs |
269 | 269 | $xoBreadcrumbs[] = ['title' => \_MA_WGGITHUB_INDEX]; |
270 | 270 | // Keywords |
271 | -wggithubMetaKeywords($helper->getConfig('keywords') . ', ' . \implode(',', $keywords)); |
|
271 | +wggithubMetaKeywords($helper->getConfig('keywords').', '.\implode(',', $keywords)); |
|
272 | 272 | unset($keywords); |
273 | 273 | // Description |
274 | 274 | wggithubMetaDescription(\_MA_WGGITHUB_INDEX_DESC); |
275 | 275 | $GLOBALS['xoopsTpl']->assign('xoops_mpageurl', WGGITHUB_URL.'/index.php'); |
276 | 276 | $GLOBALS['xoopsTpl']->assign('xoops_icons32_url', XOOPS_ICONS32_URL); |
277 | 277 | $GLOBALS['xoopsTpl']->assign('wggithub_upload_url', WGGITHUB_UPLOAD_URL); |
278 | -require __DIR__ . '/footer.php'; |
|
278 | +require __DIR__.'/footer.php'; |