@@ -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'])); |
@@ -136,9 +136,9 @@ discard block |
||
136 | 136 | */ |
137 | 137 | public function getValuesReleases($keys = null, $format = null, $maxDepth = null) |
138 | 138 | { |
139 | - $helper = \XoopsModules\Wggithub\Helper::getInstance(); |
|
139 | + $helper = \XoopsModules\Wggithub\Helper::getInstance(); |
|
140 | 140 | $ret = $this->getValues($keys, $format, $maxDepth); |
141 | - $ret['id'] = $this->getVar('rel_id'); |
|
141 | + $ret['id'] = $this->getVar('rel_id'); |
|
142 | 142 | $repositoriesHandler = $helper->getHandler('Repositories'); |
143 | 143 | $repositoriesObj = $repositoriesHandler->get($this->getVar('rel_repoid')); |
144 | 144 | if (\is_object($repositoriesObj)) { |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | } |
149 | 149 | $ret['type'] = $this->getVar('rel_type'); |
150 | 150 | $ret['name'] = $this->getVar('rel_name'); |
151 | - $ret['prerelease'] = (int)$this->getVar('rel_prerelease') > 0 ? _YES : _NO; |
|
151 | + $ret['prerelease'] = (int) $this->getVar('rel_prerelease') > 0 ? _YES : _NO; |
|
152 | 152 | $ret['publishedat'] = \formatTimestamp($this->getVar('rel_publishedat'), 'm'); |
153 | 153 | $ret['tarballurl'] = $this->getVar('rel_tarballurl'); |
154 | 154 | $ret['zipballurl'] = $this->getVar('rel_zipballurl'); |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | use XoopsModules\Wggithub; |
31 | 31 | use XoopsModules\Wggithub\Github; |
32 | 32 | |
33 | -require __DIR__ . '/header.php'; |
|
33 | +require __DIR__.'/header.php'; |
|
34 | 34 | // It recovered the value of argument op in URL$ |
35 | 35 | |
36 | 36 | /* |
@@ -45,46 +45,46 @@ discard block |
||
45 | 45 | |
46 | 46 | $data = []; |
47 | 47 | $url = '/orgs/XoopsModules25x/repos?per_page=100&page=1'; |
48 | -echo "<br>Test read org repo:" . $url; |
|
48 | +echo "<br>Test read org repo:".$url; |
|
49 | 49 | $api = new XoopsModules\Wggithub\Github\GithubClient(); |
50 | 50 | $data = $api->testMilo($url); |
51 | 51 | $count = 0; |
52 | 52 | foreach ($data as $key => $repo) { |
53 | - echo "<br>key:" . $key . ' repo:' . $repo['name']; |
|
53 | + echo "<br>key:".$key.' repo:'.$repo['name']; |
|
54 | 54 | $count++; |
55 | - if ($count>5) {break;} |
|
55 | + if ($count > 5) {break; } |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | |
59 | 59 | $data = []; |
60 | 60 | $url = '/users/ggoffy/repos?per_page=100&page=1'; |
61 | -echo "<br><br>Test read user repo:" . $url; |
|
61 | +echo "<br><br>Test read user repo:".$url; |
|
62 | 62 | $api = new XoopsModules\Wggithub\Github\GithubClient(); |
63 | 63 | $data = $api->testMilo($url); |
64 | 64 | $count = 0; |
65 | 65 | foreach ($data as $key => $repo) { |
66 | - echo "<br>key:" . $key . ' repo:' . $repo['name']; |
|
66 | + echo "<br>key:".$key.' repo:'.$repo['name']; |
|
67 | 67 | $count++; |
68 | - if ($count>5) {break;} |
|
68 | + if ($count > 5) {break; } |
|
69 | 69 | } |
70 | 70 | |
71 | 71 | |
72 | 72 | $data = []; |
73 | 73 | $url = '/repos/XoopsModules25x/smallworld/readme'; |
74 | -echo "<br><br>test read readme orgs:" . $url; |
|
74 | +echo "<br><br>test read readme orgs:".$url; |
|
75 | 75 | $api = new XoopsModules\Wggithub\Github\GithubClient(); |
76 | 76 | $data = $api->testMilo($url); |
77 | -echo '<br>name:' . $data['name']; |
|
78 | -echo '<br>download_url:' . $data['download_url']; |
|
77 | +echo '<br>name:'.$data['name']; |
|
78 | +echo '<br>download_url:'.$data['download_url']; |
|
79 | 79 | |
80 | 80 | |
81 | 81 | $data = []; |
82 | 82 | $url = '/repos/ggoffy/wggithub/readme'; |
83 | -echo "<br><br>test read readme user:" . $url; |
|
83 | +echo "<br><br>test read readme user:".$url; |
|
84 | 84 | $api = new XoopsModules\Wggithub\Github\GithubClient(); |
85 | 85 | $data = $api->testMilo($url); |
86 | -echo '<br>name:' . $data['name']; |
|
87 | -echo '<br>download_url:' . $data['download_url']; |
|
86 | +echo '<br>name:'.$data['name']; |
|
87 | +echo '<br>download_url:'.$data['download_url']; |
|
88 | 88 | |
89 | 89 | |
90 | 90 | echo "<br><br><br>-----------------------------------"; |
@@ -93,45 +93,45 @@ discard block |
||
93 | 93 | |
94 | 94 | $data = []; |
95 | 95 | $url = '/orgs/XoopsModules25x/repos?per_page=100&page=1'; |
96 | -echo "<br>Test read org repo:" . $url; |
|
96 | +echo "<br>Test read org repo:".$url; |
|
97 | 97 | $api = new XoopsModules\Wggithub\Github\GithubClient(); |
98 | 98 | $data = $api->testMilo2($url); |
99 | 99 | $count = 0; |
100 | 100 | foreach ($data as $key => $repo) { |
101 | - echo "<br>key:" . $key . ' repo:' . $repo['name']; |
|
101 | + echo "<br>key:".$key.' repo:'.$repo['name']; |
|
102 | 102 | $count++; |
103 | - if ($count>5) {break;} |
|
103 | + if ($count > 5) {break; } |
|
104 | 104 | } |
105 | 105 | |
106 | 106 | |
107 | 107 | $data = []; |
108 | 108 | $url = '/users/ggoffy/repos?per_page=100&page=1'; |
109 | -echo "<br><br>Test read user repo:" . $url; |
|
109 | +echo "<br><br>Test read user repo:".$url; |
|
110 | 110 | $api = new XoopsModules\Wggithub\Github\GithubClient(); |
111 | 111 | $data = $api->testMilo2($url); |
112 | 112 | $count = 0; |
113 | 113 | foreach ($data as $key => $repo) { |
114 | - echo "<br>key:" . $key . ' repo:' . $repo['name']; |
|
114 | + echo "<br>key:".$key.' repo:'.$repo['name']; |
|
115 | 115 | $count++; |
116 | - if ($count>5) {break;} |
|
116 | + if ($count > 5) {break; } |
|
117 | 117 | } |
118 | 118 | |
119 | 119 | |
120 | 120 | $data = []; |
121 | 121 | $url = '/repos/XoopsModules25x/smallworld/readme'; |
122 | -echo "<br><br>test read readme orgs:" . $url; |
|
122 | +echo "<br><br>test read readme orgs:".$url; |
|
123 | 123 | $api = new XoopsModules\Wggithub\Github\GithubClient(); |
124 | 124 | $data = $api->testMilo2($url); |
125 | -echo '<br>name:' . $data['name']; |
|
126 | -echo '<br>download_url:' . $data['download_url']; |
|
125 | +echo '<br>name:'.$data['name']; |
|
126 | +echo '<br>download_url:'.$data['download_url']; |
|
127 | 127 | |
128 | 128 | |
129 | 129 | $data = []; |
130 | 130 | $url = '/repos/ggoffy/wggithub/readme'; |
131 | -echo "<br><br>test read readme user:" . $url; |
|
131 | +echo "<br><br>test read readme user:".$url; |
|
132 | 132 | $api = new XoopsModules\Wggithub\Github\GithubClient(); |
133 | 133 | $data = $api->testMilo2($url); |
134 | -echo '<br>name:' . $data['name']; |
|
135 | -echo '<br>download_url:' . $data['download_url']; |
|
134 | +echo '<br>name:'.$data['name']; |
|
135 | +echo '<br>download_url:'.$data['download_url']; |
|
136 | 136 | |
137 | 137 |
@@ -28,9 +28,9 @@ 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 | // Define Stylesheet |
35 | 35 | $GLOBALS['xoTheme']->addStylesheet($style, null); |
36 | 36 | $keywords = []; |
@@ -166,4 +166,4 @@ discard block |
||
166 | 166 | var_dump($result); |
167 | 167 | */ |
168 | 168 | |
169 | -require __DIR__ . '/footer.php'; |
|
169 | +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); |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | foreach (\array_keys($directoriesAll) as $i) { |
128 | 128 | $directories[$i] = $directoriesAll[$i]->getValuesDirectories(); |
129 | 129 | $dirName = $directoriesAll[$i]->getVar('dir_name'); |
130 | - $dirFilterRelease = (bool)$directoriesAll[$i]->getVar('dir_filterrelease'); |
|
130 | + $dirFilterRelease = (bool) $directoriesAll[$i]->getVar('dir_filterrelease'); |
|
131 | 131 | $repos = []; |
132 | 132 | $crRepositories = new \CriteriaCompo(); |
133 | 133 | //first block/parentheses |
@@ -202,9 +202,9 @@ discard block |
||
202 | 202 | } |
203 | 203 | $directories[$i]['repos'] = $repos; |
204 | 204 | $directories[$i]['previousRepos'] = $start > 0; |
205 | - $directories[$i]['previousOp'] = '&start=' . ($start - $limit) . '&limit=' . $limit . '&release=' . $filterRelease . '&sortby=' . $filterSortby; |
|
205 | + $directories[$i]['previousOp'] = '&start='.($start - $limit).'&limit='.$limit.'&release='.$filterRelease.'&sortby='.$filterSortby; |
|
206 | 206 | $directories[$i]['nextRepos'] = ($repositoriesCount - $start) > $limit; |
207 | - $directories[$i]['nextOp'] = '&start=' . ($start + $limit) . '&limit=' . $limit . '&release=' . $filterRelease . '&sortby=' . $filterSortby; |
|
207 | + $directories[$i]['nextOp'] = '&start='.($start + $limit).'&limit='.$limit.'&release='.$filterRelease.'&sortby='.$filterSortby; |
|
208 | 208 | $GLOBALS['xoopsTpl']->assign('start', $start); |
209 | 209 | $GLOBALS['xoopsTpl']->assign('limit', $limit); |
210 | 210 | $GLOBALS['xoopsTpl']->assign('menu', $menu); |
@@ -214,8 +214,8 @@ discard block |
||
214 | 214 | unset($crDirectories, $directories); |
215 | 215 | // Display Navigation |
216 | 216 | if ($directoriesCount > $limit) { |
217 | - require_once \XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
218 | - $pagenav = new \XoopsPageNav($directoriesCount, $limit, $start, 'start', 'op=list&limit=' . $limit); |
|
217 | + require_once \XOOPS_ROOT_PATH.'/class/pagenav.php'; |
|
218 | + $pagenav = new \XoopsPageNav($directoriesCount, $limit, $start, 'start', 'op=list&limit='.$limit); |
|
219 | 219 | $GLOBALS['xoopsTpl']->assign('pagenav', $pagenav->renderNav(4)); |
220 | 220 | } |
221 | 221 | $GLOBALS['xoopsTpl']->assign('lang_thereare', \sprintf(\_MA_WGGITHUB_INDEX_THEREARE, $directoriesCount)); |
@@ -228,12 +228,12 @@ discard block |
||
228 | 228 | // Permissions |
229 | 229 | if (!$permGlobalRead) { |
230 | 230 | $GLOBALS['xoopsTpl']->assign('error', \_NOPERM); |
231 | - require __DIR__ . '/footer.php'; |
|
231 | + require __DIR__.'/footer.php'; |
|
232 | 232 | } |
233 | 233 | $dirName = Request::getString('dir_name', ''); |
234 | 234 | $start = 0; //reset to default |
235 | 235 | $limit = Request::getInt('limit', $helper->getConfig('userpager')); |
236 | - $redir = 'index.php?op=list_afterupdate&start=' . $start . '&limit=' . $limit . '&release=' . $filterRelease . '&sortby=' . $filterSortby; |
|
236 | + $redir = 'index.php?op=list_afterupdate&start='.$start.'&limit='.$limit.'&release='.$filterRelease.'&sortby='.$filterSortby; |
|
237 | 237 | $githubClient = GithubClient::getInstance(); |
238 | 238 | $result = $githubClient->executeUpdate($dirName); |
239 | 239 | if ($result) { |
@@ -247,14 +247,14 @@ discard block |
||
247 | 247 | // Permissions |
248 | 248 | if (!$permReadmeUpdate) { |
249 | 249 | $GLOBALS['xoopsTpl']->assign('error', \_NOPERM); |
250 | - require __DIR__ . '/footer.php'; |
|
250 | + require __DIR__.'/footer.php'; |
|
251 | 251 | } |
252 | 252 | $start = 0; //reset to default |
253 | 253 | $limit = Request::getInt('limit', $helper->getConfig('userpager')); |
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&start=' . $start . '&limit=' . $limit . '&release=' . $filterRelease . '&sortby=' . $filterSortby; |
|
257 | + $redir = 'index.php?op=list_afterupdate&start='.$start.'&limit='.$limit.'&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'; |
@@ -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; |
@@ -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*****'; |
@@ -166,12 +166,12 @@ discard block |
||
166 | 166 | "src='assets/" |
167 | 167 | ]; |
168 | 168 | $arrReplace = [ |
169 | - 'src="' . $baseUrl . '.gitbook/assets/', |
|
170 | - "src='" . $baseUrl . '.gitbook/assets/', |
|
171 | - 'src="' . $baseUrl . 'en/assets/', |
|
172 | - "src='" . $baseUrl . 'en/assets/', |
|
173 | - 'src="' . $baseUrl . 'assets/', |
|
174 | - "src='" . $baseUrl . 'assets/' |
|
169 | + 'src="'.$baseUrl.'.gitbook/assets/', |
|
170 | + "src='".$baseUrl.'.gitbook/assets/', |
|
171 | + 'src="'.$baseUrl.'en/assets/', |
|
172 | + "src='".$baseUrl.'en/assets/', |
|
173 | + 'src="'.$baseUrl.'assets/', |
|
174 | + "src='".$baseUrl.'assets/' |
|
175 | 175 | ]; |
176 | 176 | $contentClean = str_replace($arrSearch, $arrReplace, $contentEncoded); |
177 | 177 | } else { |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | $ret['submitter'] = \XoopsUser::getUnameFromId($this->getVar('rm_submitter')); |
187 | 187 | $ret['gitbook_link'] = ''; |
188 | 188 | if (strpos($ret['downloadurl'], 'XoopsDoc') > 0) { |
189 | - $ret['gitbook_link'] = 'https://xoops.gitbook.io/' . $repoName . '/'; |
|
189 | + $ret['gitbook_link'] = 'https://xoops.gitbook.io/'.$repoName.'/'; |
|
190 | 190 | } |
191 | 191 | return $ret; |
192 | 192 | } |
@@ -37,10 +37,10 @@ discard block |
||
37 | 37 | 'license_url' => 'http://www.gnu.org/licenses/gpl-3.0.en.html', |
38 | 38 | 'help' => 'page=help', |
39 | 39 | 'release_info' => 'release_info', |
40 | - 'release_file' => XOOPS_URL . '/modules/wggithub/docs/release_info file', |
|
40 | + 'release_file' => XOOPS_URL.'/modules/wggithub/docs/release_info file', |
|
41 | 41 | 'release_date' => '2021/01/13', |
42 | 42 | 'manual' => 'link to manual file', |
43 | - 'manual_file' => XOOPS_URL . '/modules/wggithub/docs/install.txt', |
|
43 | + 'manual_file' => XOOPS_URL.'/modules/wggithub/docs/install.txt', |
|
44 | 44 | 'min_php' => '7.2', |
45 | 45 | 'min_xoops' => '2.5.11', |
46 | 46 | 'min_admin' => '1.2', |
@@ -270,8 +270,8 @@ discard block |
||
270 | 270 | // Make Sample button visible? |
271 | 271 | $modversion['config'][] = [ |
272 | 272 | 'name' => 'displaySampleButton', |
273 | - 'title' => 'CO_' . $moduleDirNameUpper . '_' . 'SHOW_SAMPLE_BUTTON', |
|
274 | - 'description' => 'CO_' . $moduleDirNameUpper . '_' . 'SHOW_SAMPLE_BUTTON_DESC', |
|
273 | + 'title' => 'CO_'.$moduleDirNameUpper.'_'.'SHOW_SAMPLE_BUTTON', |
|
274 | + 'description' => 'CO_'.$moduleDirNameUpper.'_'.'SHOW_SAMPLE_BUTTON_DESC', |
|
275 | 275 | 'formtype' => 'yesno', |
276 | 276 | 'valuetype' => 'int', |
277 | 277 | 'default' => 1, |
@@ -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'; |