@@ -52,7 +52,7 @@ |
||
52 | 52 | public const PERM_README_UPDATE = 3; |
53 | 53 | |
54 | 54 | // Constants for log type |
55 | - public const LOG_TYPE_NONE = 0; |
|
55 | + public const LOG_TYPE_NONE = 0; |
|
56 | 56 | public const LOG_TYPE_UPDATE_START = 1; |
57 | 57 | public const LOG_TYPE_UPDATE_END = 2; |
58 | 58 | public const LOG_TYPE_REQUEST = 3; |
@@ -132,15 +132,15 @@ |
||
132 | 132 | */ |
133 | 133 | public function getValuesReleases($keys = null, $format = null, $maxDepth = null) |
134 | 134 | { |
135 | - $helper = \XoopsModules\Wggithub\Helper::getInstance(); |
|
135 | + $helper = \XoopsModules\Wggithub\Helper::getInstance(); |
|
136 | 136 | $ret = $this->getValues($keys, $format, $maxDepth); |
137 | - $ret['id'] = $this->getVar('rel_id'); |
|
137 | + $ret['id'] = $this->getVar('rel_id'); |
|
138 | 138 | $repositoriesHandler = $helper->getHandler('Repositories'); |
139 | 139 | $repositoriesObj = $repositoriesHandler->get($this->getVar('rel_repoid')); |
140 | - $ret['repoid'] = $repositoriesObj->getVar('repo_name'); |
|
140 | + $ret['repoid'] = $repositoriesObj->getVar('repo_name'); |
|
141 | 141 | $ret['type'] = $this->getVar('rel_type'); |
142 | 142 | $ret['name'] = $this->getVar('rel_name'); |
143 | - $ret['prerelease'] = (int)$this->getVar('rel_prerelease') > 0 ? _YES : _NO; |
|
143 | + $ret['prerelease'] = (int) $this->getVar('rel_prerelease') > 0 ? _YES : _NO; |
|
144 | 144 | $ret['publishedat'] = \formatTimestamp($this->getVar('rel_publishedat'), 'm'); |
145 | 145 | $ret['tarballurl'] = $this->getVar('rel_tarballurl'); |
146 | 146 | $ret['zipballurl'] = $this->getVar('rel_zipballurl'); |
@@ -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 |