@@ -20,10 +20,10 @@ |
||
20 | 20 | * @author Goffy - XOOPS Development Team - Email:<[email protected]> - Website:<https://wedega.com> |
21 | 21 | */ |
22 | 22 | if (!\defined('XOOPS_ICONS32_PATH')) { |
23 | - \define('XOOPS_ICONS32_PATH', XOOPS_ROOT_PATH . '/Frameworks/moduleclasses/icons/32'); |
|
23 | + \define('XOOPS_ICONS32_PATH', XOOPS_ROOT_PATH . '/Frameworks/moduleclasses/icons/32'); |
|
24 | 24 | } |
25 | 25 | if (!\defined('XOOPS_ICONS32_URL')) { |
26 | - \define('XOOPS_ICONS32_URL', XOOPS_URL . '/Frameworks/moduleclasses/icons/32'); |
|
26 | + \define('XOOPS_ICONS32_URL', XOOPS_URL . '/Frameworks/moduleclasses/icons/32'); |
|
27 | 27 | } |
28 | 28 | \define('WGGITHUB_DIRNAME', 'wggithub'); |
29 | 29 | \define('WGGITHUB_PATH', XOOPS_ROOT_PATH . '/modules/' . WGGITHUB_DIRNAME); |
@@ -20,29 +20,29 @@ |
||
20 | 20 | * @author Goffy - XOOPS Development Team - Email:<[email protected]> - Website:<https://wedega.com> |
21 | 21 | */ |
22 | 22 | if (!\defined('XOOPS_ICONS32_PATH')) { |
23 | - \define('XOOPS_ICONS32_PATH', XOOPS_ROOT_PATH . '/Frameworks/moduleclasses/icons/32'); |
|
23 | + \define('XOOPS_ICONS32_PATH', XOOPS_ROOT_PATH.'/Frameworks/moduleclasses/icons/32'); |
|
24 | 24 | } |
25 | 25 | if (!\defined('XOOPS_ICONS32_URL')) { |
26 | - \define('XOOPS_ICONS32_URL', XOOPS_URL . '/Frameworks/moduleclasses/icons/32'); |
|
26 | + \define('XOOPS_ICONS32_URL', XOOPS_URL.'/Frameworks/moduleclasses/icons/32'); |
|
27 | 27 | } |
28 | 28 | \define('WGGITHUB_DIRNAME', 'wggithub'); |
29 | -\define('WGGITHUB_PATH', XOOPS_ROOT_PATH . '/modules/' . WGGITHUB_DIRNAME); |
|
30 | -\define('WGGITHUB_URL', XOOPS_URL . '/modules/' . WGGITHUB_DIRNAME); |
|
31 | -\define('WGGITHUB_ICONS_PATH', WGGITHUB_PATH . '/assets/icons'); |
|
32 | -\define('WGGITHUB_ICONS_URL', WGGITHUB_URL . '/assets/icons'); |
|
33 | -\define('WGGITHUB_IMAGE_PATH', WGGITHUB_PATH . '/assets/images'); |
|
34 | -\define('WGGITHUB_IMAGE_URL', WGGITHUB_URL . '/assets/images'); |
|
35 | -\define('WGGITHUB_UPLOAD_PATH', XOOPS_UPLOAD_PATH . '/' . WGGITHUB_DIRNAME); |
|
36 | -\define('WGGITHUB_UPLOAD_URL', XOOPS_UPLOAD_URL . '/' . WGGITHUB_DIRNAME); |
|
37 | -\define('WGGITHUB_UPLOAD_FILES_PATH', WGGITHUB_UPLOAD_PATH . '/files'); |
|
38 | -\define('WGGITHUB_UPLOAD_FILES_URL', WGGITHUB_UPLOAD_URL . '/files'); |
|
39 | -\define('WGGITHUB_UPLOAD_IMAGE_PATH', WGGITHUB_UPLOAD_PATH . '/images'); |
|
40 | -\define('WGGITHUB_UPLOAD_IMAGE_URL', WGGITHUB_UPLOAD_URL . '/images'); |
|
41 | -\define('WGGITHUB_UPLOAD_SHOTS_PATH', WGGITHUB_UPLOAD_PATH . '/images/shots'); |
|
42 | -\define('WGGITHUB_UPLOAD_SHOTS_URL', WGGITHUB_UPLOAD_URL . '/images/shots'); |
|
43 | -\define('WGGITHUB_ADMIN', WGGITHUB_URL . '/admin/index.php'); |
|
44 | -$localLogo = WGGITHUB_IMAGE_URL . '/tdmxoops_logo.png'; |
|
29 | +\define('WGGITHUB_PATH', XOOPS_ROOT_PATH.'/modules/'.WGGITHUB_DIRNAME); |
|
30 | +\define('WGGITHUB_URL', XOOPS_URL.'/modules/'.WGGITHUB_DIRNAME); |
|
31 | +\define('WGGITHUB_ICONS_PATH', WGGITHUB_PATH.'/assets/icons'); |
|
32 | +\define('WGGITHUB_ICONS_URL', WGGITHUB_URL.'/assets/icons'); |
|
33 | +\define('WGGITHUB_IMAGE_PATH', WGGITHUB_PATH.'/assets/images'); |
|
34 | +\define('WGGITHUB_IMAGE_URL', WGGITHUB_URL.'/assets/images'); |
|
35 | +\define('WGGITHUB_UPLOAD_PATH', XOOPS_UPLOAD_PATH.'/'.WGGITHUB_DIRNAME); |
|
36 | +\define('WGGITHUB_UPLOAD_URL', XOOPS_UPLOAD_URL.'/'.WGGITHUB_DIRNAME); |
|
37 | +\define('WGGITHUB_UPLOAD_FILES_PATH', WGGITHUB_UPLOAD_PATH.'/files'); |
|
38 | +\define('WGGITHUB_UPLOAD_FILES_URL', WGGITHUB_UPLOAD_URL.'/files'); |
|
39 | +\define('WGGITHUB_UPLOAD_IMAGE_PATH', WGGITHUB_UPLOAD_PATH.'/images'); |
|
40 | +\define('WGGITHUB_UPLOAD_IMAGE_URL', WGGITHUB_UPLOAD_URL.'/images'); |
|
41 | +\define('WGGITHUB_UPLOAD_SHOTS_PATH', WGGITHUB_UPLOAD_PATH.'/images/shots'); |
|
42 | +\define('WGGITHUB_UPLOAD_SHOTS_URL', WGGITHUB_UPLOAD_URL.'/images/shots'); |
|
43 | +\define('WGGITHUB_ADMIN', WGGITHUB_URL.'/admin/index.php'); |
|
44 | +$localLogo = WGGITHUB_IMAGE_URL.'/tdmxoops_logo.png'; |
|
45 | 45 | // Module Information |
46 | -$copyright = "<a href='https://wedega.com' title='XOOPS on Wedega' target='_blank'><img src='" . $localLogo . "' alt='XOOPS on Wedega' /></a>"; |
|
47 | -include_once XOOPS_ROOT_PATH . '/class/xoopsrequest.php'; |
|
48 | -include_once WGGITHUB_PATH . '/include/functions.php'; |
|
46 | +$copyright = "<a href='https://wedega.com' title='XOOPS on Wedega' target='_blank'><img src='".$localLogo."' alt='XOOPS on Wedega' /></a>"; |
|
47 | +include_once XOOPS_ROOT_PATH.'/class/xoopsrequest.php'; |
|
48 | +include_once WGGITHUB_PATH.'/include/functions.php'; |
@@ -52,7 +52,7 @@ |
||
52 | 52 | if ($dirInfo->isDir()) { |
53 | 53 | // The directory exists so delete it |
54 | 54 | if (!$utility::rrmdir($old_dir)) { |
55 | - $module->setErrors(\sprintf(\constant('CO_' . $moduleDirNameUpper . '_ERROR_BAD_DEL_PATH'), $old_dir)); |
|
55 | + $module->setErrors(\sprintf(\constant('CO_'.$moduleDirNameUpper.'_ERROR_BAD_DEL_PATH'), $old_dir)); |
|
56 | 56 | $success = false; |
57 | 57 | } |
58 | 58 | } |
@@ -28,16 +28,16 @@ discard block |
||
28 | 28 | */ |
29 | 29 | function wggithub_block_addCatSelect($cats) |
30 | 30 | { |
31 | - $cat_sql = '('; |
|
32 | - if (\is_array($cats)) { |
|
33 | - $cat_sql .= current($cats); |
|
34 | - array_shift($cats); |
|
35 | - foreach ($cats as $cat) { |
|
36 | - $cat_sql .= ',' . $cat; |
|
37 | - } |
|
38 | - } |
|
39 | - $cat_sql .= ')'; |
|
40 | - return $cat_sql; |
|
31 | + $cat_sql = '('; |
|
32 | + if (\is_array($cats)) { |
|
33 | + $cat_sql .= current($cats); |
|
34 | + array_shift($cats); |
|
35 | + foreach ($cats as $cat) { |
|
36 | + $cat_sql .= ',' . $cat; |
|
37 | + } |
|
38 | + } |
|
39 | + $cat_sql .= ')'; |
|
40 | + return $cat_sql; |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | /** |
@@ -49,17 +49,17 @@ discard block |
||
49 | 49 | */ |
50 | 50 | function wggithubGetMyItemIds($permtype, $dirname) |
51 | 51 | { |
52 | - global $xoopsUser; |
|
53 | - static $permissions = []; |
|
54 | - if (\is_array($permissions) && \array_key_exists($permtype, $permissions)) { |
|
55 | - return $permissions[$permtype]; |
|
56 | - } |
|
57 | - $moduleHandler = \xoops_getHandler('module'); |
|
58 | - $wggithubModule = $moduleHandler->getByDirname($dirname); |
|
59 | - $groups = \is_object($xoopsUser) ? $xoopsUser->getGroups() : XOOPS_GROUP_ANONYMOUS; |
|
60 | - $grouppermHandler = \xoops_getHandler('groupperm'); |
|
61 | - $itemIds = $grouppermHandler->getItemIds($permtype, $groups, $wggithubModule->getVar('mid')); |
|
62 | - return $itemIds; |
|
52 | + global $xoopsUser; |
|
53 | + static $permissions = []; |
|
54 | + if (\is_array($permissions) && \array_key_exists($permtype, $permissions)) { |
|
55 | + return $permissions[$permtype]; |
|
56 | + } |
|
57 | + $moduleHandler = \xoops_getHandler('module'); |
|
58 | + $wggithubModule = $moduleHandler->getByDirname($dirname); |
|
59 | + $groups = \is_object($xoopsUser) ? $xoopsUser->getGroups() : XOOPS_GROUP_ANONYMOUS; |
|
60 | + $grouppermHandler = \xoops_getHandler('groupperm'); |
|
61 | + $itemIds = $grouppermHandler->getItemIds($permtype, $groups, $wggithubModule->getVar('mid')); |
|
62 | + return $itemIds; |
|
63 | 63 | } |
64 | 64 | |
65 | 65 | /** |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | |
134 | 134 | case 'none': |
135 | 135 | if($topic_name) { |
136 | - $topic_name = 'topic=' . $topic_name . '&'; |
|
136 | + $topic_name = 'topic=' . $topic_name . '&'; |
|
137 | 137 | } |
138 | 138 | $rewrite_base = '/modules/'; |
139 | 139 | $page = 'page=' . $array['content_alias']; |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | return XOOPS_URL . $rewrite_base . $module_name . $type . $topic_name . $id . $page . $rewrite_ext; |
164 | 164 | break; |
165 | 165 | |
166 | - case 'short': |
|
166 | + case 'short': |
|
167 | 167 | if($topic_name) { |
168 | 168 | $topic_name .= '/'; |
169 | 169 | } |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | $cat_sql .= current($cats); |
34 | 34 | array_shift($cats); |
35 | 35 | foreach ($cats as $cat) { |
36 | - $cat_sql .= ',' . $cat; |
|
36 | + $cat_sql .= ','.$cat; |
|
37 | 37 | } |
38 | 38 | } |
39 | 39 | $cat_sql .= ')'; |
@@ -72,9 +72,9 @@ discard block |
||
72 | 72 | { |
73 | 73 | global $xoopsTpl, $xoTheme; |
74 | 74 | $myts = MyTextSanitizer::getInstance(); |
75 | - $content= $myts->undoHtmlSpecialChars($myts->displayTarea($content)); |
|
76 | - if(isset($xoTheme) && \is_object($xoTheme)) { |
|
77 | - $xoTheme->addMeta( 'meta', 'keywords', \strip_tags($content)); |
|
75 | + $content = $myts->undoHtmlSpecialChars($myts->displayTarea($content)); |
|
76 | + if (isset($xoTheme) && \is_object($xoTheme)) { |
|
77 | + $xoTheme->addMeta('meta', 'keywords', \strip_tags($content)); |
|
78 | 78 | } else { // Compatibility for old Xoops versions |
79 | 79 | $xoopsTpl->assign('xoops_meta_keywords', \strip_tags($content)); |
80 | 80 | } |
@@ -91,8 +91,8 @@ discard block |
||
91 | 91 | global $xoopsTpl, $xoTheme; |
92 | 92 | $myts = MyTextSanitizer::getInstance(); |
93 | 93 | $content = $myts->undoHtmlSpecialChars($myts->displayTarea($content)); |
94 | - if(isset($xoTheme) && \is_object($xoTheme)) { |
|
95 | - $xoTheme->addMeta( 'meta', 'description', \strip_tags($content)); |
|
94 | + if (isset($xoTheme) && \is_object($xoTheme)) { |
|
95 | + $xoTheme->addMeta('meta', 'description', \strip_tags($content)); |
|
96 | 96 | } else { // Compatibility for old Xoops versions |
97 | 97 | $xoopsTpl->assign('xoops_meta_description', \strip_tags($content)); |
98 | 98 | } |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | if (0 != $lenght_id) { |
118 | 118 | $id = $array['content_id']; |
119 | 119 | while (\strlen($id) < $lenght_id) { |
120 | - $id = '0' . $id; |
|
120 | + $id = '0'.$id; |
|
121 | 121 | } |
122 | 122 | } else { |
123 | 123 | $id = $array['content_id']; |
@@ -132,23 +132,23 @@ discard block |
||
132 | 132 | switch ($rewrite_url) { |
133 | 133 | |
134 | 134 | case 'none': |
135 | - if($topic_name) { |
|
136 | - $topic_name = 'topic=' . $topic_name . '&'; |
|
135 | + if ($topic_name) { |
|
136 | + $topic_name = 'topic='.$topic_name.'&'; |
|
137 | 137 | } |
138 | 138 | $rewrite_base = '/modules/'; |
139 | - $page = 'page=' . $array['content_alias']; |
|
140 | - return XOOPS_URL . $rewrite_base . $module . '/' . $type . '.php?' . $topic_name . 'id=' . $id . '&' . $page . $comment; |
|
139 | + $page = 'page='.$array['content_alias']; |
|
140 | + return XOOPS_URL.$rewrite_base.$module.'/'.$type.'.php?'.$topic_name.'id='.$id.'&'.$page.$comment; |
|
141 | 141 | break; |
142 | 142 | |
143 | 143 | case 'rewrite': |
144 | - if($topic_name) { |
|
144 | + if ($topic_name) { |
|
145 | 145 | $topic_name .= '/'; |
146 | 146 | } |
147 | 147 | $rewrite_base = xoops_getModuleOption('rewrite_mode', $module); |
148 | 148 | $rewrite_ext = xoops_getModuleOption('rewrite_ext', $module); |
149 | 149 | $module_name = ''; |
150 | - if(xoops_getModuleOption('rewrite_name', $module)) { |
|
151 | - $module_name = xoops_getModuleOption('rewrite_name', $module) . '/'; |
|
150 | + if (xoops_getModuleOption('rewrite_name', $module)) { |
|
151 | + $module_name = xoops_getModuleOption('rewrite_name', $module).'/'; |
|
152 | 152 | } |
153 | 153 | $page = $array['content_alias']; |
154 | 154 | $type .= '/'; |
@@ -157,21 +157,21 @@ discard block |
||
157 | 157 | $type = ''; |
158 | 158 | } |
159 | 159 | if ('comment-edit/' === $type || 'comment-reply/' === $type || 'comment-delete/' === $type) { |
160 | - return XOOPS_URL . $rewrite_base . $module_name . $type . $id . '/'; |
|
160 | + return XOOPS_URL.$rewrite_base.$module_name.$type.$id.'/'; |
|
161 | 161 | } |
162 | 162 | |
163 | - return XOOPS_URL . $rewrite_base . $module_name . $type . $topic_name . $id . $page . $rewrite_ext; |
|
163 | + return XOOPS_URL.$rewrite_base.$module_name.$type.$topic_name.$id.$page.$rewrite_ext; |
|
164 | 164 | break; |
165 | 165 | |
166 | 166 | case 'short': |
167 | - if($topic_name) { |
|
167 | + if ($topic_name) { |
|
168 | 168 | $topic_name .= '/'; |
169 | 169 | } |
170 | 170 | $rewrite_base = xoops_getModuleOption('rewrite_mode', $module); |
171 | 171 | $rewrite_ext = xoops_getModuleOption('rewrite_ext', $module); |
172 | 172 | $module_name = ''; |
173 | - if(xoops_getModuleOption('rewrite_name', $module)) { |
|
174 | - $module_name = xoops_getModuleOption('rewrite_name', $module) . '/'; |
|
173 | + if (xoops_getModuleOption('rewrite_name', $module)) { |
|
174 | + $module_name = xoops_getModuleOption('rewrite_name', $module).'/'; |
|
175 | 175 | } |
176 | 176 | $page = $array['content_alias']; |
177 | 177 | $type .= '/'; |
@@ -179,10 +179,10 @@ discard block |
||
179 | 179 | $type = ''; |
180 | 180 | } |
181 | 181 | if ('comment-edit/' === $type || 'comment-reply/' === $type || 'comment-delete/' === $type) { |
182 | - return XOOPS_URL . $rewrite_base . $module_name . $type . $id . '/'; |
|
182 | + return XOOPS_URL.$rewrite_base.$module_name.$type.$id.'/'; |
|
183 | 183 | } |
184 | 184 | |
185 | - return XOOPS_URL . $rewrite_base . $module_name . $type . $topic_name . $page . $rewrite_ext; |
|
185 | + return XOOPS_URL.$rewrite_base.$module_name.$type.$topic_name.$page.$rewrite_ext; |
|
186 | 186 | break; |
187 | 187 | } |
188 | 188 | return null; |
@@ -207,6 +207,6 @@ discard block |
||
207 | 207 | $url .= htmlentities($url, ENT_COMPAT, 'utf-8'); |
208 | 208 | $url .= \preg_replace('`&([a-z])(acute|uml|circ|grave|ring|cedil|slash|tilde|caron|lig);`i', "\1", $url); |
209 | 209 | $url .= \preg_replace(array($regular_expression, '`[-]+`'), '-', $url); |
210 | - $url = ($url == '') ? $type : strtolower( rim($url, '-')); |
|
210 | + $url = ($url == '') ? $type : strtolower(rim($url, '-')); |
|
211 | 211 | return $url; |
212 | 212 | } |
213 | 213 | \ No newline at end of file |
@@ -47,38 +47,38 @@ |
||
47 | 47 | $GLOBALS['xoopsTpl']->assign('showItem', $dirId > 0); |
48 | 48 | |
49 | 49 | switch ($op) { |
50 | - case 'show': |
|
51 | - case 'list': |
|
52 | - default: |
|
53 | - $crDirectories = new \CriteriaCompo(); |
|
54 | - if ($dirId > 0) { |
|
55 | - $crDirectories->add(new \Criteria('dir_id', $dirId)); |
|
56 | - } |
|
57 | - $directoriesCount = $directoriesHandler->getCount($crDirectories); |
|
58 | - $GLOBALS['xoopsTpl']->assign('directoriesCount', $directoriesCount); |
|
59 | - $crDirectories->setStart($start); |
|
60 | - $crDirectories->setLimit($limit); |
|
61 | - $directoriesAll = $directoriesHandler->getAll($crDirectories); |
|
62 | - if ($directoriesCount > 0) { |
|
63 | - $directories = []; |
|
64 | - // Get All Directories |
|
65 | - foreach (\array_keys($directoriesAll) as $i) { |
|
66 | - $directories[$i] = $directoriesAll[$i]->getValuesDirectories(); |
|
67 | - $keywords[$i] = $directoriesAll[$i]->getVar('dir_name'); |
|
68 | - } |
|
69 | - $GLOBALS['xoopsTpl']->assign('directories', $directories); |
|
70 | - unset($directories); |
|
71 | - // Display Navigation |
|
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); |
|
75 | - $GLOBALS['xoopsTpl']->assign('pagenav', $pagenav->renderNav(4)); |
|
76 | - } |
|
77 | - $GLOBALS['xoopsTpl']->assign('type', $helper->getConfig('table_type')); |
|
78 | - $GLOBALS['xoopsTpl']->assign('divideby', $helper->getConfig('divideby')); |
|
79 | - $GLOBALS['xoopsTpl']->assign('numb_col', $helper->getConfig('numb_col')); |
|
80 | - } |
|
81 | - break; |
|
50 | + case 'show': |
|
51 | + case 'list': |
|
52 | + default: |
|
53 | + $crDirectories = new \CriteriaCompo(); |
|
54 | + if ($dirId > 0) { |
|
55 | + $crDirectories->add(new \Criteria('dir_id', $dirId)); |
|
56 | + } |
|
57 | + $directoriesCount = $directoriesHandler->getCount($crDirectories); |
|
58 | + $GLOBALS['xoopsTpl']->assign('directoriesCount', $directoriesCount); |
|
59 | + $crDirectories->setStart($start); |
|
60 | + $crDirectories->setLimit($limit); |
|
61 | + $directoriesAll = $directoriesHandler->getAll($crDirectories); |
|
62 | + if ($directoriesCount > 0) { |
|
63 | + $directories = []; |
|
64 | + // Get All Directories |
|
65 | + foreach (\array_keys($directoriesAll) as $i) { |
|
66 | + $directories[$i] = $directoriesAll[$i]->getValuesDirectories(); |
|
67 | + $keywords[$i] = $directoriesAll[$i]->getVar('dir_name'); |
|
68 | + } |
|
69 | + $GLOBALS['xoopsTpl']->assign('directories', $directories); |
|
70 | + unset($directories); |
|
71 | + // Display Navigation |
|
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); |
|
75 | + $GLOBALS['xoopsTpl']->assign('pagenav', $pagenav->renderNav(4)); |
|
76 | + } |
|
77 | + $GLOBALS['xoopsTpl']->assign('type', $helper->getConfig('table_type')); |
|
78 | + $GLOBALS['xoopsTpl']->assign('divideby', $helper->getConfig('divideby')); |
|
79 | + $GLOBALS['xoopsTpl']->assign('numb_col', $helper->getConfig('numb_col')); |
|
80 | + } |
|
81 | + break; |
|
82 | 82 | } |
83 | 83 | |
84 | 84 | // Breadcrumbs |
@@ -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'; |
@@ -20,7 +20,7 @@ |
||
20 | 20 | * @author Goffy - XOOPS Development Team - Email:<[email protected]> - Website:<https://wedega.com> |
21 | 21 | */ |
22 | 22 | if (\count($xoBreadcrumbs) > 1) { |
23 | - $GLOBALS['xoopsTpl']->assign('xoBreadcrumbs', $xoBreadcrumbs); |
|
23 | + $GLOBALS['xoopsTpl']->assign('xoBreadcrumbs', $xoBreadcrumbs); |
|
24 | 24 | } |
25 | 25 | $GLOBALS['xoopsTpl']->assign('adv', $helper->getConfig('advertise')); |
26 | 26 | // |
@@ -30,4 +30,4 @@ |
||
30 | 30 | $GLOBALS['xoopsTpl']->assign('admin', WGGITHUB_ADMIN); |
31 | 31 | $GLOBALS['xoopsTpl']->assign('copyright', $copyright); |
32 | 32 | // |
33 | -include_once \XOOPS_ROOT_PATH . '/footer.php'; |
|
33 | +include_once \XOOPS_ROOT_PATH.'/footer.php'; |
@@ -47,38 +47,38 @@ |
||
47 | 47 | $GLOBALS['xoopsTpl']->assign('showItem', $repoId > 0); |
48 | 48 | |
49 | 49 | switch ($op) { |
50 | - case 'show': |
|
51 | - case 'list': |
|
52 | - default: |
|
53 | - $crRepositories = new \CriteriaCompo(); |
|
54 | - if ($repoId > 0) { |
|
55 | - $crRepositories->add(new \Criteria('repo_id', $repoId)); |
|
56 | - } |
|
57 | - $repositoriesCount = $repositoriesHandler->getCount($crRepositories); |
|
58 | - $GLOBALS['xoopsTpl']->assign('repositoriesCount', $repositoriesCount); |
|
59 | - $crRepositories->setStart($start); |
|
60 | - $crRepositories->setLimit($limit); |
|
61 | - $repositoriesAll = $repositoriesHandler->getAll($crRepositories); |
|
62 | - if ($repositoriesCount > 0) { |
|
63 | - $repositories = []; |
|
64 | - // Get All Repositories |
|
65 | - foreach (\array_keys($repositoriesAll) as $i) { |
|
66 | - $repositories[$i] = $repositoriesAll[$i]->getValuesRepositories(); |
|
67 | - $keywords[$i] = $repositoriesAll[$i]->getVar('repo_name'); |
|
68 | - } |
|
69 | - $GLOBALS['xoopsTpl']->assign('repositories', $repositories); |
|
70 | - unset($repositories); |
|
71 | - // Display Navigation |
|
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); |
|
75 | - $GLOBALS['xoopsTpl']->assign('pagenav', $pagenav->renderNav(4)); |
|
76 | - } |
|
77 | - $GLOBALS['xoopsTpl']->assign('type', $helper->getConfig('table_type')); |
|
78 | - $GLOBALS['xoopsTpl']->assign('divideby', $helper->getConfig('divideby')); |
|
79 | - $GLOBALS['xoopsTpl']->assign('numb_col', $helper->getConfig('numb_col')); |
|
80 | - } |
|
81 | - break; |
|
50 | + case 'show': |
|
51 | + case 'list': |
|
52 | + default: |
|
53 | + $crRepositories = new \CriteriaCompo(); |
|
54 | + if ($repoId > 0) { |
|
55 | + $crRepositories->add(new \Criteria('repo_id', $repoId)); |
|
56 | + } |
|
57 | + $repositoriesCount = $repositoriesHandler->getCount($crRepositories); |
|
58 | + $GLOBALS['xoopsTpl']->assign('repositoriesCount', $repositoriesCount); |
|
59 | + $crRepositories->setStart($start); |
|
60 | + $crRepositories->setLimit($limit); |
|
61 | + $repositoriesAll = $repositoriesHandler->getAll($crRepositories); |
|
62 | + if ($repositoriesCount > 0) { |
|
63 | + $repositories = []; |
|
64 | + // Get All Repositories |
|
65 | + foreach (\array_keys($repositoriesAll) as $i) { |
|
66 | + $repositories[$i] = $repositoriesAll[$i]->getValuesRepositories(); |
|
67 | + $keywords[$i] = $repositoriesAll[$i]->getVar('repo_name'); |
|
68 | + } |
|
69 | + $GLOBALS['xoopsTpl']->assign('repositories', $repositories); |
|
70 | + unset($repositories); |
|
71 | + // Display Navigation |
|
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); |
|
75 | + $GLOBALS['xoopsTpl']->assign('pagenav', $pagenav->renderNav(4)); |
|
76 | + } |
|
77 | + $GLOBALS['xoopsTpl']->assign('type', $helper->getConfig('table_type')); |
|
78 | + $GLOBALS['xoopsTpl']->assign('divideby', $helper->getConfig('divideby')); |
|
79 | + $GLOBALS['xoopsTpl']->assign('numb_col', $helper->getConfig('numb_col')); |
|
80 | + } |
|
81 | + break; |
|
82 | 82 | } |
83 | 83 | |
84 | 84 | // Breadcrumbs |
@@ -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'; |
@@ -32,119 +32,119 @@ |
||
32 | 32 | */ |
33 | 33 | class Settings extends \XoopsObject |
34 | 34 | { |
35 | - /** |
|
36 | - * Constructor |
|
37 | - * |
|
38 | - * @param null |
|
39 | - */ |
|
40 | - public function __construct() |
|
41 | - { |
|
42 | - $this->initVar('set_id', XOBJ_DTYPE_INT); |
|
43 | - $this->initVar('set_username', XOBJ_DTYPE_TXTBOX); |
|
44 | - $this->initVar('set_token', XOBJ_DTYPE_TXTBOX); |
|
45 | - $this->initVar('set_options', XOBJ_DTYPE_TXTAREA); |
|
46 | - $this->initVar('set_primary', XOBJ_DTYPE_INT); |
|
47 | - $this->initVar('set_date', XOBJ_DTYPE_INT); |
|
48 | - $this->initVar('set_submitter', XOBJ_DTYPE_INT); |
|
49 | - } |
|
35 | + /** |
|
36 | + * Constructor |
|
37 | + * |
|
38 | + * @param null |
|
39 | + */ |
|
40 | + public function __construct() |
|
41 | + { |
|
42 | + $this->initVar('set_id', XOBJ_DTYPE_INT); |
|
43 | + $this->initVar('set_username', XOBJ_DTYPE_TXTBOX); |
|
44 | + $this->initVar('set_token', XOBJ_DTYPE_TXTBOX); |
|
45 | + $this->initVar('set_options', XOBJ_DTYPE_TXTAREA); |
|
46 | + $this->initVar('set_primary', XOBJ_DTYPE_INT); |
|
47 | + $this->initVar('set_date', XOBJ_DTYPE_INT); |
|
48 | + $this->initVar('set_submitter', XOBJ_DTYPE_INT); |
|
49 | + } |
|
50 | 50 | |
51 | - /** |
|
52 | - * @static function &getInstance |
|
53 | - * |
|
54 | - * @param null |
|
55 | - */ |
|
56 | - public static function getInstance() |
|
57 | - { |
|
58 | - static $instance = false; |
|
59 | - if (!$instance) { |
|
60 | - $instance = new self(); |
|
61 | - } |
|
62 | - } |
|
51 | + /** |
|
52 | + * @static function &getInstance |
|
53 | + * |
|
54 | + * @param null |
|
55 | + */ |
|
56 | + public static function getInstance() |
|
57 | + { |
|
58 | + static $instance = false; |
|
59 | + if (!$instance) { |
|
60 | + $instance = new self(); |
|
61 | + } |
|
62 | + } |
|
63 | 63 | |
64 | - /** |
|
65 | - * The new inserted $Id |
|
66 | - * @return inserted id |
|
67 | - */ |
|
68 | - public function getNewInsertedIdSettings() |
|
69 | - { |
|
70 | - $newInsertedId = $GLOBALS['xoopsDB']->getInsertId(); |
|
71 | - return $newInsertedId; |
|
72 | - } |
|
64 | + /** |
|
65 | + * The new inserted $Id |
|
66 | + * @return inserted id |
|
67 | + */ |
|
68 | + public function getNewInsertedIdSettings() |
|
69 | + { |
|
70 | + $newInsertedId = $GLOBALS['xoopsDB']->getInsertId(); |
|
71 | + return $newInsertedId; |
|
72 | + } |
|
73 | 73 | |
74 | - /** |
|
75 | - * @public function getForm |
|
76 | - * @param bool $action |
|
77 | - * @return \XoopsThemeForm |
|
78 | - */ |
|
79 | - public function getFormSettings($action = false) |
|
80 | - { |
|
81 | - $helper = \XoopsModules\Wggithub\Helper::getInstance(); |
|
82 | - if (!$action) { |
|
83 | - $action = $_SERVER['REQUEST_URI']; |
|
84 | - } |
|
85 | - $isAdmin = $GLOBALS['xoopsUser']->isAdmin($GLOBALS['xoopsModule']->mid()); |
|
86 | - // Title |
|
87 | - $title = $this->isNew() ? \sprintf(_AM_WGGITHUB_SETTING_ADD) : \sprintf(_AM_WGGITHUB_SETTING_EDIT); |
|
88 | - // Get Theme Form |
|
89 | - \xoops_load('XoopsFormLoader'); |
|
90 | - $form = new \XoopsThemeForm($title, 'form', $action, 'post', true); |
|
91 | - $form->setExtra('enctype="multipart/form-data"'); |
|
92 | - // Form Text setUsername |
|
93 | - $form->addElement(new \XoopsFormText(_AM_WGGITHUB_SETTING_USERNAME, 'set_username', 50, 255, $this->getVar('set_username')), true); |
|
94 | - // Form Text setToken |
|
95 | - $form->addElement(new \XoopsFormText(_AM_WGGITHUB_SETTING_TOKEN, 'set_token', 50, 255, $this->getVar('set_token')), true); |
|
96 | - // Form Editor TextArea setOptions |
|
97 | - $form->addElement(new \XoopsFormTextArea(_AM_WGGITHUB_SETTING_OPTIONS, 'set_options', $this->getVar('set_options', 'e'), 4, 47)); |
|
98 | - // Form Radio Yes/No setPrimary |
|
99 | - $setPrimary = $this->isNew() ?: $this->getVar('set_primary'); |
|
100 | - $form->addElement(new \XoopsFormRadioYN(_AM_WGGITHUB_SETTING_PRIMARY, 'set_primary', $setPrimary)); |
|
101 | - // Form Text Date Select setDate |
|
102 | - $setDate = $this->isNew() ?: $this->getVar('set_date'); |
|
103 | - $form->addElement(new \XoopsFormTextDateSelect(_AM_WGGITHUB_SETTING_DATE, 'set_date', '', $setDate)); |
|
104 | - // Form Select User setSubmitter |
|
105 | - $form->addElement(new \XoopsFormSelectUser(_AM_WGGITHUB_SETTING_SUBMITTER, 'set_submitter', false, $this->getVar('set_submitter'))); |
|
106 | - // To Save |
|
107 | - $form->addElement(new \XoopsFormHidden('op', 'save')); |
|
108 | - $form->addElement(new \XoopsFormButtonTray('', _SUBMIT, 'submit', '', false)); |
|
109 | - return $form; |
|
110 | - } |
|
74 | + /** |
|
75 | + * @public function getForm |
|
76 | + * @param bool $action |
|
77 | + * @return \XoopsThemeForm |
|
78 | + */ |
|
79 | + public function getFormSettings($action = false) |
|
80 | + { |
|
81 | + $helper = \XoopsModules\Wggithub\Helper::getInstance(); |
|
82 | + if (!$action) { |
|
83 | + $action = $_SERVER['REQUEST_URI']; |
|
84 | + } |
|
85 | + $isAdmin = $GLOBALS['xoopsUser']->isAdmin($GLOBALS['xoopsModule']->mid()); |
|
86 | + // Title |
|
87 | + $title = $this->isNew() ? \sprintf(_AM_WGGITHUB_SETTING_ADD) : \sprintf(_AM_WGGITHUB_SETTING_EDIT); |
|
88 | + // Get Theme Form |
|
89 | + \xoops_load('XoopsFormLoader'); |
|
90 | + $form = new \XoopsThemeForm($title, 'form', $action, 'post', true); |
|
91 | + $form->setExtra('enctype="multipart/form-data"'); |
|
92 | + // Form Text setUsername |
|
93 | + $form->addElement(new \XoopsFormText(_AM_WGGITHUB_SETTING_USERNAME, 'set_username', 50, 255, $this->getVar('set_username')), true); |
|
94 | + // Form Text setToken |
|
95 | + $form->addElement(new \XoopsFormText(_AM_WGGITHUB_SETTING_TOKEN, 'set_token', 50, 255, $this->getVar('set_token')), true); |
|
96 | + // Form Editor TextArea setOptions |
|
97 | + $form->addElement(new \XoopsFormTextArea(_AM_WGGITHUB_SETTING_OPTIONS, 'set_options', $this->getVar('set_options', 'e'), 4, 47)); |
|
98 | + // Form Radio Yes/No setPrimary |
|
99 | + $setPrimary = $this->isNew() ?: $this->getVar('set_primary'); |
|
100 | + $form->addElement(new \XoopsFormRadioYN(_AM_WGGITHUB_SETTING_PRIMARY, 'set_primary', $setPrimary)); |
|
101 | + // Form Text Date Select setDate |
|
102 | + $setDate = $this->isNew() ?: $this->getVar('set_date'); |
|
103 | + $form->addElement(new \XoopsFormTextDateSelect(_AM_WGGITHUB_SETTING_DATE, 'set_date', '', $setDate)); |
|
104 | + // Form Select User setSubmitter |
|
105 | + $form->addElement(new \XoopsFormSelectUser(_AM_WGGITHUB_SETTING_SUBMITTER, 'set_submitter', false, $this->getVar('set_submitter'))); |
|
106 | + // To Save |
|
107 | + $form->addElement(new \XoopsFormHidden('op', 'save')); |
|
108 | + $form->addElement(new \XoopsFormButtonTray('', _SUBMIT, 'submit', '', false)); |
|
109 | + return $form; |
|
110 | + } |
|
111 | 111 | |
112 | - /** |
|
113 | - * Get Values |
|
114 | - * @param null $keys |
|
115 | - * @param null $format |
|
116 | - * @param null $maxDepth |
|
117 | - * @return array |
|
118 | - */ |
|
119 | - public function getValuesSettings($keys = null, $format = null, $maxDepth = null) |
|
120 | - { |
|
121 | - $helper = \XoopsModules\Wggithub\Helper::getInstance(); |
|
122 | - $utility = new \XoopsModules\Wggithub\Utility(); |
|
123 | - $ret = $this->getValues($keys, $format, $maxDepth); |
|
124 | - $ret['id'] = $this->getVar('set_id'); |
|
125 | - $ret['username'] = $this->getVar('set_username'); |
|
126 | - $ret['token'] = $this->getVar('set_token'); |
|
127 | - $ret['options'] = \strip_tags($this->getVar('set_options', 'e')); |
|
128 | - $editorMaxchar = $helper->getConfig('editor_maxchar'); |
|
129 | - $ret['options_short'] = $utility::truncateHtml($ret['options'], $editorMaxchar); |
|
130 | - $ret['primary'] = (int)$this->getVar('set_primary') > 0 ? _YES : _NO; |
|
131 | - $ret['date'] = \formatTimestamp($this->getVar('set_date'), 's'); |
|
132 | - $ret['submitter'] = \XoopsUser::getUnameFromId($this->getVar('set_submitter')); |
|
133 | - return $ret; |
|
134 | - } |
|
112 | + /** |
|
113 | + * Get Values |
|
114 | + * @param null $keys |
|
115 | + * @param null $format |
|
116 | + * @param null $maxDepth |
|
117 | + * @return array |
|
118 | + */ |
|
119 | + public function getValuesSettings($keys = null, $format = null, $maxDepth = null) |
|
120 | + { |
|
121 | + $helper = \XoopsModules\Wggithub\Helper::getInstance(); |
|
122 | + $utility = new \XoopsModules\Wggithub\Utility(); |
|
123 | + $ret = $this->getValues($keys, $format, $maxDepth); |
|
124 | + $ret['id'] = $this->getVar('set_id'); |
|
125 | + $ret['username'] = $this->getVar('set_username'); |
|
126 | + $ret['token'] = $this->getVar('set_token'); |
|
127 | + $ret['options'] = \strip_tags($this->getVar('set_options', 'e')); |
|
128 | + $editorMaxchar = $helper->getConfig('editor_maxchar'); |
|
129 | + $ret['options_short'] = $utility::truncateHtml($ret['options'], $editorMaxchar); |
|
130 | + $ret['primary'] = (int)$this->getVar('set_primary') > 0 ? _YES : _NO; |
|
131 | + $ret['date'] = \formatTimestamp($this->getVar('set_date'), 's'); |
|
132 | + $ret['submitter'] = \XoopsUser::getUnameFromId($this->getVar('set_submitter')); |
|
133 | + return $ret; |
|
134 | + } |
|
135 | 135 | |
136 | - /** |
|
137 | - * Returns an array representation of the object |
|
138 | - * |
|
139 | - * @return array |
|
140 | - */ |
|
141 | - public function toArraySettings() |
|
142 | - { |
|
143 | - $ret = []; |
|
144 | - $vars = $this->getVars(); |
|
145 | - foreach (\array_keys($vars) as $var) { |
|
146 | - $ret[$var] = $this->getVar('"{$var}"'); |
|
147 | - } |
|
148 | - return $ret; |
|
149 | - } |
|
136 | + /** |
|
137 | + * Returns an array representation of the object |
|
138 | + * |
|
139 | + * @return array |
|
140 | + */ |
|
141 | + public function toArraySettings() |
|
142 | + { |
|
143 | + $ret = []; |
|
144 | + $vars = $this->getVars(); |
|
145 | + foreach (\array_keys($vars) as $var) { |
|
146 | + $ret[$var] = $this->getVar('"{$var}"'); |
|
147 | + } |
|
148 | + return $ret; |
|
149 | + } |
|
150 | 150 | } |
@@ -127,7 +127,7 @@ |
||
127 | 127 | $ret['options'] = \strip_tags($this->getVar('set_options', 'e')); |
128 | 128 | $editorMaxchar = $helper->getConfig('editor_maxchar'); |
129 | 129 | $ret['options_short'] = $utility::truncateHtml($ret['options'], $editorMaxchar); |
130 | - $ret['primary'] = (int)$this->getVar('set_primary') > 0 ? _YES : _NO; |
|
130 | + $ret['primary'] = (int) $this->getVar('set_primary') > 0 ? _YES : _NO; |
|
131 | 131 | $ret['date'] = \formatTimestamp($this->getVar('set_date'), 's'); |
132 | 132 | $ret['submitter'] = \XoopsUser::getUnameFromId($this->getVar('set_submitter')); |
133 | 133 | return $ret; |
@@ -36,19 +36,19 @@ discard block |
||
36 | 36 | // $query = $GLOBALS['xoopsDB']->query($sql); |
37 | 37 | // list($meta) = $GLOBALS['xoopsDB']->fetchRow($query); |
38 | 38 | $html .= '<fieldset>'; |
39 | - $html .= "<legend style='font-weight: bold; color: #900;'>" . \constant('CO_' . $moduleDirNameUpper . '_IMAGEINFO') . '</legend>'; |
|
39 | + $html .= "<legend style='font-weight: bold; color: #900;'>".\constant('CO_'.$moduleDirNameUpper.'_IMAGEINFO').'</legend>'; |
|
40 | 40 | $html .= "<div style='padding: 8px;'>"; |
41 | 41 | // $html .= '<div>' . \constant('CO_' . $moduleDirNameUpper . '_METAVERSION') . $meta . "</div>"; |
42 | 42 | // $html .= "<br>"; |
43 | 43 | // $html .= "<br>"; |
44 | - $html .= '<div>' . \constant('CO_' . $moduleDirNameUpper . '_SPHPINI') . '</div>'; |
|
44 | + $html .= '<div>'.\constant('CO_'.$moduleDirNameUpper.'_SPHPINI').'</div>'; |
|
45 | 45 | $html .= '<ul>'; |
46 | 46 | |
47 | - $gdlib = \function_exists('gd_info') ? '<span style="color: #008000;">' . \constant('CO_' . $moduleDirNameUpper . '_GDON') . '</span>' : '<span style="color: #ff0000;">' . \constant('CO_' . $moduleDirNameUpper . '_GDOFF') . '</span>'; |
|
48 | - $html .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_GDLIBSTATUS') . $gdlib; |
|
47 | + $gdlib = \function_exists('gd_info') ? '<span style="color: #008000;">'.\constant('CO_'.$moduleDirNameUpper.'_GDON').'</span>' : '<span style="color: #ff0000;">'.\constant('CO_'.$moduleDirNameUpper.'_GDOFF').'</span>'; |
|
48 | + $html .= '<li>'.\constant('CO_'.$moduleDirNameUpper.'_GDLIBSTATUS').$gdlib; |
|
49 | 49 | if (\function_exists('gd_info')) { |
50 | 50 | if (true === ($gdlib = gd_info())) { |
51 | - $html .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_GDLIBVERSION') . '<b>' . $gdlib['GD Version'] . '</b>'; |
|
51 | + $html .= '<li>'.\constant('CO_'.$moduleDirNameUpper.'_GDLIBVERSION').'<b>'.$gdlib['GD Version'].'</b>'; |
|
52 | 52 | } |
53 | 53 | } |
54 | 54 | |
@@ -58,18 +58,18 @@ discard block |
||
58 | 58 | // $registerglobals = (!\ini_get('register_globals')) ? "<span style=\"color: #008000;\">" . \constant('CO_' . $moduleDirNameUpper . '_OFF') . '</span>' : "<span style=\"color: #ff0000;\">" . \constant('CO_' . $moduleDirNameUpper . '_ON') . '</span>'; |
59 | 59 | // $html .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_REGISTERGLOBALS . $registerglobals; |
60 | 60 | |
61 | - $downloads = \ini_get('file_uploads') ? '<span style="color: #008000;">' . \constant('CO_' . $moduleDirNameUpper . '_ON') . '</span>' : '<span style="color: #ff0000;">' . \constant('CO_' . $moduleDirNameUpper . '_OFF') . '</span>'; |
|
62 | - $html .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_SERVERUPLOADSTATUS') . $downloads; |
|
61 | + $downloads = \ini_get('file_uploads') ? '<span style="color: #008000;">'.\constant('CO_'.$moduleDirNameUpper.'_ON').'</span>' : '<span style="color: #ff0000;">'.\constant('CO_'.$moduleDirNameUpper.'_OFF').'</span>'; |
|
62 | + $html .= '<li>'.\constant('CO_'.$moduleDirNameUpper.'_SERVERUPLOADSTATUS').$downloads; |
|
63 | 63 | |
64 | - $html .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_MAXUPLOADSIZE') . ' <b><span style="color: #0000ff;">' . \ini_get('upload_max_filesize') . '</span></b>'; |
|
65 | - $html .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_MAXPOSTSIZE') . ' <b><span style="color: #0000ff;">' . \ini_get('post_max_size') . '</span></b>'; |
|
66 | - $html .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_MEMORYLIMIT') . ' <b><span style="color: #0000ff;">' . \ini_get('memory_limit') . '</span></b>'; |
|
64 | + $html .= '<li>'.\constant('CO_'.$moduleDirNameUpper.'_MAXUPLOADSIZE').' <b><span style="color: #0000ff;">'.\ini_get('upload_max_filesize').'</span></b>'; |
|
65 | + $html .= '<li>'.\constant('CO_'.$moduleDirNameUpper.'_MAXPOSTSIZE').' <b><span style="color: #0000ff;">'.\ini_get('post_max_size').'</span></b>'; |
|
66 | + $html .= '<li>'.\constant('CO_'.$moduleDirNameUpper.'_MEMORYLIMIT').' <b><span style="color: #0000ff;">'.\ini_get('memory_limit').'</span></b>'; |
|
67 | 67 | $html .= '</ul>'; |
68 | 68 | $html .= '<ul>'; |
69 | - $html .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_SERVERPATH') . ' <b>' . XOOPS_ROOT_PATH . '</b>'; |
|
69 | + $html .= '<li>'.\constant('CO_'.$moduleDirNameUpper.'_SERVERPATH').' <b>'.XOOPS_ROOT_PATH.'</b>'; |
|
70 | 70 | $html .= '</ul>'; |
71 | 71 | $html .= '<br>'; |
72 | - $html .= \constant('CO_' . $moduleDirNameUpper . '_UPLOADPATHDSC') . ''; |
|
72 | + $html .= \constant('CO_'.$moduleDirNameUpper.'_UPLOADPATHDSC').''; |
|
73 | 73 | $html .= '</div>'; |
74 | 74 | $html .= '</fieldset><br>'; |
75 | 75 |
@@ -73,7 +73,7 @@ |
||
73 | 73 | require $GLOBALS['xoops']->path('class/template.php'); |
74 | 74 | $breadcrumbTpl = new \XoopsTpl(); |
75 | 75 | $breadcrumbTpl->assign('breadcrumb', $this->bread); |
76 | - $html = $breadcrumbTpl->fetch('db:' . $this->dirname . '_common_breadcrumb.tpl'); |
|
76 | + $html = $breadcrumbTpl->fetch('db:'.$this->dirname.'_common_breadcrumb.tpl'); |
|
77 | 77 | unset($breadcrumbTpl); |
78 | 78 | |
79 | 79 | return $html; |