@@ -25,9 +25,9 @@ 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 | $GLOBALS['xoopsOption']['template_main'] = 'wggithub_readmes.tpl'; |
30 | -include_once XOOPS_ROOT_PATH . '/header.php'; |
|
30 | +include_once XOOPS_ROOT_PATH.'/header.php'; |
|
31 | 31 | |
32 | 32 | $op = Request::getCmd('op', 'list'); |
33 | 33 | $start = Request::getInt('start', 0); |
@@ -68,8 +68,8 @@ discard block |
||
68 | 68 | unset($readmes); |
69 | 69 | // Display Navigation |
70 | 70 | if ($readmesCount > $limit) { |
71 | - include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
72 | - $pagenav = new \XoopsPageNav($readmesCount, $limit, $start, 'start', 'op=list&limit=' . $limit); |
|
71 | + include_once XOOPS_ROOT_PATH.'/class/pagenav.php'; |
|
72 | + $pagenav = new \XoopsPageNav($readmesCount, $limit, $start, 'start', 'op=list&limit='.$limit); |
|
73 | 73 | $GLOBALS['xoopsTpl']->assign('pagenav', $pagenav->renderNav(4)); |
74 | 74 | } |
75 | 75 | $GLOBALS['xoopsTpl']->assign('type', $helper->getConfig('table_type')); |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | $xoBreadcrumbs[] = ['title' => _MA_WGGITHUB_READMES]; |
84 | 84 | |
85 | 85 | // Keywords |
86 | -wggithubMetaKeywords($helper->getConfig('keywords') . ', ' . \implode(',', $keywords)); |
|
86 | +wggithubMetaKeywords($helper->getConfig('keywords').', '.\implode(',', $keywords)); |
|
87 | 87 | unset($keywords); |
88 | 88 | |
89 | 89 | // Description |
@@ -91,4 +91,4 @@ discard block |
||
91 | 91 | $GLOBALS['xoopsTpl']->assign('xoops_mpageurl', WGGITHUB_URL.'/readmes.php'); |
92 | 92 | $GLOBALS['xoopsTpl']->assign('wggithub_upload_url', WGGITHUB_UPLOAD_URL); |
93 | 93 | |
94 | -require __DIR__ . '/footer.php'; |
|
94 | +require __DIR__.'/footer.php'; |
@@ -25,9 +25,9 @@ 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 | $GLOBALS['xoopsOption']['template_main'] = 'wggithub_directories.tpl'; |
30 | -include_once \XOOPS_ROOT_PATH . '/header.php'; |
|
30 | +include_once \XOOPS_ROOT_PATH.'/header.php'; |
|
31 | 31 | |
32 | 32 | $op = Request::getCmd('op', 'list'); |
33 | 33 | $start = Request::getInt('start', 0); |
@@ -70,8 +70,8 @@ discard block |
||
70 | 70 | unset($directories); |
71 | 71 | // Display Navigation |
72 | 72 | if ($directoriesCount > $limit) { |
73 | - include_once \XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
74 | - $pagenav = new \XoopsPageNav($directoriesCount, $limit, $start, 'start', 'op=list&limit=' . $limit); |
|
73 | + include_once \XOOPS_ROOT_PATH.'/class/pagenav.php'; |
|
74 | + $pagenav = new \XoopsPageNav($directoriesCount, $limit, $start, 'start', 'op=list&limit='.$limit); |
|
75 | 75 | $GLOBALS['xoopsTpl']->assign('pagenav', $pagenav->renderNav(4)); |
76 | 76 | } |
77 | 77 | $GLOBALS['xoopsTpl']->assign('type', $helper->getConfig('table_type')); |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | $xoBreadcrumbs[] = ['title' => \_MA_WGGITHUB_DIRECTORIES]; |
86 | 86 | |
87 | 87 | // Keywords |
88 | -wggithubMetaKeywords($helper->getConfig('keywords') . ', ' . \implode(',', $keywords)); |
|
88 | +wggithubMetaKeywords($helper->getConfig('keywords').', '.\implode(',', $keywords)); |
|
89 | 89 | unset($keywords); |
90 | 90 | |
91 | 91 | // Description |
@@ -93,4 +93,4 @@ discard block |
||
93 | 93 | $GLOBALS['xoopsTpl']->assign('xoops_mpageurl', WGGITHUB_URL.'/directories.php'); |
94 | 94 | $GLOBALS['xoopsTpl']->assign('wggithub_upload_url', WGGITHUB_UPLOAD_URL); |
95 | 95 | |
96 | -require __DIR__ . '/footer.php'; |
|
96 | +require __DIR__.'/footer.php'; |
@@ -25,9 +25,9 @@ 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 | $GLOBALS['xoopsOption']['template_main'] = 'wggithub_repositories.tpl'; |
30 | -include_once XOOPS_ROOT_PATH . '/header.php'; |
|
30 | +include_once XOOPS_ROOT_PATH.'/header.php'; |
|
31 | 31 | |
32 | 32 | $op = Request::getCmd('op', 'list'); |
33 | 33 | $start = Request::getInt('start', 0); |
@@ -70,8 +70,8 @@ discard block |
||
70 | 70 | unset($repositories); |
71 | 71 | // Display Navigation |
72 | 72 | if ($repositoriesCount > $limit) { |
73 | - include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
74 | - $pagenav = new \XoopsPageNav($repositoriesCount, $limit, $start, 'start', 'op=list&limit=' . $limit); |
|
73 | + include_once XOOPS_ROOT_PATH.'/class/pagenav.php'; |
|
74 | + $pagenav = new \XoopsPageNav($repositoriesCount, $limit, $start, 'start', 'op=list&limit='.$limit); |
|
75 | 75 | $GLOBALS['xoopsTpl']->assign('pagenav', $pagenav->renderNav(4)); |
76 | 76 | } |
77 | 77 | $GLOBALS['xoopsTpl']->assign('type', $helper->getConfig('table_type')); |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | $xoBreadcrumbs[] = ['title' => _MA_WGGITHUB_REPOSITORIES]; |
86 | 86 | |
87 | 87 | // Keywords |
88 | -wggithubMetaKeywords($helper->getConfig('keywords') . ', ' . \implode(',', $keywords)); |
|
88 | +wggithubMetaKeywords($helper->getConfig('keywords').', '.\implode(',', $keywords)); |
|
89 | 89 | unset($keywords); |
90 | 90 | |
91 | 91 | // Description |
@@ -93,4 +93,4 @@ discard block |
||
93 | 93 | $GLOBALS['xoopsTpl']->assign('xoops_mpageurl', WGGITHUB_URL.'/repositories.php'); |
94 | 94 | $GLOBALS['xoopsTpl']->assign('wggithub_upload_url', WGGITHUB_UPLOAD_URL); |
95 | 95 | |
96 | -require __DIR__ . '/footer.php'; |
|
96 | +require __DIR__.'/footer.php'; |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | use XoopsModules\Wggithub\Helper; |
25 | 25 | use XoopsModules\Wggithub\Constants; |
26 | 26 | |
27 | -include_once XOOPS_ROOT_PATH . '/modules/wggithub/include/common.php'; |
|
27 | +include_once XOOPS_ROOT_PATH.'/modules/wggithub/include/common.php'; |
|
28 | 28 | |
29 | 29 | /** |
30 | 30 | * Function show block |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | */ |
34 | 34 | function b_wggithub_repositories_show($options) |
35 | 35 | { |
36 | - include_once XOOPS_ROOT_PATH . '/modules/wggithub/class/repositories.php'; |
|
36 | + include_once XOOPS_ROOT_PATH.'/modules/wggithub/class/repositories.php'; |
|
37 | 37 | $myts = MyTextSanitizer::getInstance(); |
38 | 38 | $GLOBALS['xoopsTpl']->assign('wggithub_upload_url', WGGITHUB_UPLOAD_URL); |
39 | 39 | $block = []; |
@@ -98,14 +98,14 @@ discard block |
||
98 | 98 | */ |
99 | 99 | function b_wggithub_repositories_edit($options) |
100 | 100 | { |
101 | - include_once XOOPS_ROOT_PATH . '/modules/wggithub/class/repositories.php'; |
|
101 | + include_once XOOPS_ROOT_PATH.'/modules/wggithub/class/repositories.php'; |
|
102 | 102 | $helper = Helper::getInstance(); |
103 | 103 | $repositoriesHandler = $helper->getHandler('Repositories'); |
104 | 104 | $GLOBALS['xoopsTpl']->assign('wggithub_upload_url', WGGITHUB_UPLOAD_URL); |
105 | 105 | $form = _MB_WGGITHUB_DISPLAY; |
106 | 106 | $form .= "<input type='hidden' name='options[0]' value='".$options[0]."' />"; |
107 | - $form .= "<input type='text' name='options[1]' size='5' maxlength='255' value='" . $options[1] . "' /> <br>"; |
|
108 | - $form .= _MB_WGGITHUB_TITLE_LENGTH . " : <input type='text' name='options[2]' size='5' maxlength='255' value='" . $options[2] . "' /><br><br>"; |
|
107 | + $form .= "<input type='text' name='options[1]' size='5' maxlength='255' value='".$options[1]."' /> <br>"; |
|
108 | + $form .= _MB_WGGITHUB_TITLE_LENGTH." : <input type='text' name='options[2]' size='5' maxlength='255' value='".$options[2]."' /><br><br>"; |
|
109 | 109 | \array_shift($options); |
110 | 110 | \array_shift($options); |
111 | 111 | \array_shift($options); |
@@ -116,11 +116,11 @@ discard block |
||
116 | 116 | $crRepositories->setOrder('ASC'); |
117 | 117 | $repositoriesAll = $repositoriesHandler->getAll($crRepositories); |
118 | 118 | unset($crRepositories); |
119 | - $form .= _MB_WGGITHUB_REPOSITORIES_TO_DISPLAY . "<br><select name='options[]' multiple='multiple' size='5'>"; |
|
120 | - $form .= "<option value='0' " . (\in_array(0, $options) == false ? '' : "selected='selected'") . '>' . _MB_WGGITHUB_ALL_REPOSITORIES . '</option>'; |
|
119 | + $form .= _MB_WGGITHUB_REPOSITORIES_TO_DISPLAY."<br><select name='options[]' multiple='multiple' size='5'>"; |
|
120 | + $form .= "<option value='0' ".(\in_array(0, $options) == false ? '' : "selected='selected'").'>'._MB_WGGITHUB_ALL_REPOSITORIES.'</option>'; |
|
121 | 121 | foreach (\array_keys($repositoriesAll) as $i) { |
122 | 122 | $repo_id = $repositoriesAll[$i]->getVar('repo_id'); |
123 | - $form .= "<option value='" . $repo_id . "' " . (\in_array($repo_id, $options) == false ? '' : "selected='selected'") . '>' . $repositoriesAll[$i]->getVar('repo_name') . '</option>'; |
|
123 | + $form .= "<option value='".$repo_id."' ".(\in_array($repo_id, $options) == false ? '' : "selected='selected'").'>'.$repositoriesAll[$i]->getVar('repo_name').'</option>'; |
|
124 | 124 | } |
125 | 125 | $form .= '</select>'; |
126 | 126 |
@@ -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'; |