@@ -6,7 +6,7 @@ discard block |
||
6 | 6 | class altsysUtils |
7 | 7 | { |
8 | 8 | /** |
9 | - * @param $name |
|
9 | + * @param string $name |
|
10 | 10 | * @param bool $doRegist |
11 | 11 | * @return array |
12 | 12 | */ |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | * @param int $flags |
81 | 81 | * @param null $encoding |
82 | 82 | * @param bool $double_encode |
83 | - * @return mixed|string |
|
83 | + * @return string |
|
84 | 84 | */ |
85 | 85 | |
86 | 86 | public static function htmlSpecialChars($str, $flags = ENT_COMPAT, $encoding = null, $double_encode = true) |
@@ -59,7 +59,7 @@ |
||
59 | 59 | } |
60 | 60 | |
61 | 61 | /** |
62 | - * @param $resource |
|
62 | + * @param string $resource |
|
63 | 63 | * @param $mydirname |
64 | 64 | * @param null $mytrustdirname |
65 | 65 | * @param bool $read_once |
@@ -29,9 +29,9 @@ discard block |
||
29 | 29 | { |
30 | 30 | $this->language = preg_replace('/[^0-9a-zA-Z_-]/', '', @$GLOBALS['xoopsConfig']['language']); |
31 | 31 | |
32 | - $this->salt = mb_substr(md5(XOOPS_ROOT_PATH . XOOPS_DB_USER . XOOPS_DB_PREFIX), 0, 6); |
|
32 | + $this->salt = mb_substr(md5(XOOPS_ROOT_PATH.XOOPS_DB_USER.XOOPS_DB_PREFIX), 0, 6); |
|
33 | 33 | |
34 | - $this->cache_path = XOOPS_TRUST_PATH . '/cache'; |
|
34 | + $this->cache_path = XOOPS_TRUST_PATH.'/cache'; |
|
35 | 35 | |
36 | 36 | if (defined('ALTSYS_MYLANGUAGE_ROOT_PATH') && file_exists(ALTSYS_MYLANGUAGE_ROOT_PATH)) { |
37 | 37 | $this->my_language = ALTSYS_MYLANGUAGE_ROOT_PATH; |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | |
68 | 68 | public function read($resource, $mydirname, $mytrustdirname = null, $read_once = true) |
69 | 69 | { |
70 | - $d3file = XOOPS_ROOT_PATH . '/modules/' . $mydirname . '/mytrustdirname.php'; |
|
70 | + $d3file = XOOPS_ROOT_PATH.'/modules/'.$mydirname.'/mytrustdirname.php'; |
|
71 | 71 | |
72 | 72 | if (empty($mytrustdirname) && is_file($d3file)) { |
73 | 73 | require $d3file; |
@@ -79,12 +79,12 @@ discard block |
||
79 | 79 | |
80 | 80 | $cache_file = $this->getCacheFileName($resource, $mydirname); |
81 | 81 | |
82 | - $root_file = XOOPS_ROOT_PATH . '/modules/' . $mydirname . '/language/' . $this->language . '/' . $resource; |
|
82 | + $root_file = XOOPS_ROOT_PATH.'/modules/'.$mydirname.'/language/'.$this->language.'/'.$resource; |
|
83 | 83 | |
84 | 84 | // language overriding by XOOPS_ROOT_PATH/my_language |
85 | 85 | |
86 | 86 | if ($this->my_language) { |
87 | - $mylang_file = $this->my_language . '/modules/' . $mydirname . '/' . $this->language . '/' . $resource; |
|
87 | + $mylang_file = $this->my_language.'/modules/'.$mydirname.'/'.$this->language.'/'.$resource; |
|
88 | 88 | |
89 | 89 | if (is_file($mylang_file)) { |
90 | 90 | require_once $mylang_file; |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | if (empty($mytrustdirname)) { |
99 | 99 | // conventional module |
100 | 100 | |
101 | - $default_file = XOOPS_ROOT_PATH . '/modules/' . $mydirname . '/language/' . $this->default_language . '/' . $resource; |
|
101 | + $default_file = XOOPS_ROOT_PATH.'/modules/'.$mydirname.'/language/'.$this->default_language.'/'.$resource; |
|
102 | 102 | |
103 | 103 | if (is_file($cache_file)) { |
104 | 104 | require_once $cache_file; |
@@ -112,9 +112,9 @@ discard block |
||
112 | 112 | } else { |
113 | 113 | // D3 modules |
114 | 114 | |
115 | - $trust_file = XOOPS_TRUST_PATH . '/modules/' . $mytrustdirname . '/language/' . $this->language . '/' . $resource; |
|
115 | + $trust_file = XOOPS_TRUST_PATH.'/modules/'.$mytrustdirname.'/language/'.$this->language.'/'.$resource; |
|
116 | 116 | |
117 | - $default_file = XOOPS_TRUST_PATH . '/modules/' . $mytrustdirname . '/language/' . $this->default_language . '/' . $resource; |
|
117 | + $default_file = XOOPS_TRUST_PATH.'/modules/'.$mytrustdirname.'/language/'.$this->default_language.'/'.$resource; |
|
118 | 118 | |
119 | 119 | if (is_file($cache_file)) { |
120 | 120 | require_once $cache_file; |
@@ -155,6 +155,6 @@ discard block |
||
155 | 155 | $language = $this->language; |
156 | 156 | } |
157 | 157 | |
158 | - return $this->cache_path . '/' . $this->cache_prefix . '_' . $this->salt . '_' . $mydirname . '_' . $language . '_' . $resource; |
|
158 | + return $this->cache_path.'/'.$this->cache_prefix.'_'.$this->salt.'_'.$mydirname.'_'.$language.'_'.$resource; |
|
159 | 159 | } |
160 | 160 | } |
@@ -74,7 +74,7 @@ |
||
74 | 74 | * @param array $extra_tags |
75 | 75 | * @param array $user_list |
76 | 76 | * @param null $omit_user_id |
77 | - * @return bool|void |
|
77 | + * @return null|false |
|
78 | 78 | */ |
79 | 79 | |
80 | 80 | public function triggerEvent($mydirname, $mytrustdirname, $category, $item_id, $event, $extra_tags = [], $user_list = [], $omit_user_id = null) |
@@ -2,7 +2,7 @@ discard block |
||
2 | 2 | |
3 | 3 | // notification handler for D3 modules |
4 | 4 | |
5 | -require_once XOOPS_ROOT_PATH . '/include/notification_functions.php'; |
|
5 | +require_once XOOPS_ROOT_PATH.'/include/notification_functions.php'; |
|
6 | 6 | |
7 | 7 | /** |
8 | 8 | * Class D3NotificationHandler |
@@ -39,9 +39,9 @@ discard block |
||
39 | 39 | { |
40 | 40 | global $xoopsConfig; |
41 | 41 | |
42 | - $mydirpath = XOOPS_ROOT_PATH . '/modules/' . $mydirname; |
|
42 | + $mydirpath = XOOPS_ROOT_PATH.'/modules/'.$mydirname; |
|
43 | 43 | |
44 | - $mytrustdirpath = XOOPS_TRUST_PATH . '/modules/' . $mytrustdirname; |
|
44 | + $mytrustdirpath = XOOPS_TRUST_PATH.'/modules/'.$mytrustdirname; |
|
45 | 45 | |
46 | 46 | $language = empty($xoopsConfig['language']) ? 'english' : $xoopsConfig['language']; |
47 | 47 | |
@@ -177,13 +177,13 @@ discard block |
||
177 | 177 | |
178 | 178 | $tags['X_MODULE'] = $module->getVar('name', 'n'); |
179 | 179 | |
180 | - $tags['X_MODULE_URL'] = XOOPS_URL . '/modules/' . $module->getVar('dirname') . '/'; |
|
180 | + $tags['X_MODULE_URL'] = XOOPS_URL.'/modules/'.$module->getVar('dirname').'/'; |
|
181 | 181 | |
182 | 182 | $tags['X_NOTIFY_CATEGORY'] = $category; |
183 | 183 | |
184 | 184 | $tags['X_NOTIFY_EVENT'] = $event; |
185 | 185 | |
186 | - $template = $event_info['mail_template'] . '.tpl'; |
|
186 | + $template = $event_info['mail_template'].'.tpl'; |
|
187 | 187 | |
188 | 188 | $subject = $event_info['mail_subject']; |
189 | 189 | |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | |
203 | 203 | // TODO: don't show unsubscribe link if it is 'one-time' ?? |
204 | 204 | |
205 | - $tags['X_UNSUBSCRIBE_URL'] = XOOPS_URL . '/notifications.php'; |
|
205 | + $tags['X_UNSUBSCRIBE_URL'] = XOOPS_URL.'/notifications.php'; |
|
206 | 206 | |
207 | 207 | $tags = array_merge($tags, $extra_tags); |
208 | 208 |
@@ -359,7 +359,7 @@ |
||
359 | 359 | } |
360 | 360 | |
361 | 361 | /** |
362 | - * @param $name |
|
362 | + * @param string $name |
|
363 | 363 | * @param $options |
364 | 364 | * @param $current_value |
365 | 365 | * @return string |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | |
38 | 38 | $this->mydirname = $mydirname; |
39 | 39 | |
40 | - $this->table = $db->prefix($mydirname ? $mydirname . '_' . $table_body : $table_body); |
|
40 | + $this->table = $db->prefix($mydirname ? $mydirname.'_'.$table_body : $table_body); |
|
41 | 41 | |
42 | 42 | $this->primary_key = $primary_key; |
43 | 43 | |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | |
64 | 64 | public function get_language_constant($name) |
65 | 65 | { |
66 | - return constant(mb_strtoupper('_MD_A_' . $this->dirname . '_' . $this->page_name . '_' . $name)); |
|
66 | + return constant(mb_strtoupper('_MD_A_'.$this->dirname.'_'.$this->page_name.'_'.$name)); |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | /** |
@@ -79,13 +79,13 @@ discard block |
||
79 | 79 | case 'blob': |
80 | 80 | $length = empty($col['length']) ? 65535 : (int)$col['length']; |
81 | 81 | |
82 | - return "`{$col['name']}`='" . addslashes(xoops_substr($value, 0, $length)) . "'"; |
|
82 | + return "`{$col['name']}`='".addslashes(xoops_substr($value, 0, $length))."'"; |
|
83 | 83 | case 'char': |
84 | 84 | case 'varchar': |
85 | 85 | case 'string': |
86 | 86 | $length = empty($col['length']) ? 255 : (int)$col['length']; |
87 | 87 | |
88 | - return "`{$col['name']}`='" . addslashes(xoops_substr($value, 0, $length)) . "'"; |
|
88 | + return "`{$col['name']}`='".addslashes(xoops_substr($value, 0, $length))."'"; |
|
89 | 89 | case 'int': |
90 | 90 | case 'integer': |
91 | 91 | $value = (int)$value; |
@@ -123,21 +123,21 @@ discard block |
||
123 | 123 | continue; |
124 | 124 | } |
125 | 125 | |
126 | - $set4sql .= $this->get_set4sql(@$_POST[$col['name']], $col) . ','; |
|
126 | + $set4sql .= $this->get_set4sql(@$_POST[$col['name']], $col).','; |
|
127 | 127 | } |
128 | 128 | |
129 | 129 | if (!empty($set4sql)) { |
130 | 130 | if ($id > 0) { |
131 | 131 | // UPDATE |
132 | 132 | |
133 | - $db->queryF("UPDATE $this->table SET " . mb_substr($set4sql, 0, -1) . " WHERE $this->primary_key='" . addslashes($id) . "'"); |
|
133 | + $db->queryF("UPDATE $this->table SET ".mb_substr($set4sql, 0, -1)." WHERE $this->primary_key='".addslashes($id)."'"); |
|
134 | 134 | |
135 | 135 | return [$id, 'update']; |
136 | 136 | } |
137 | 137 | |
138 | 138 | // INSERT |
139 | 139 | |
140 | - $db->queryF("INSERT INTO $this->table SET " . mb_substr($set4sql, 0, -1)); |
|
140 | + $db->queryF("INSERT INTO $this->table SET ".mb_substr($set4sql, 0, -1)); |
|
141 | 141 | |
142 | 142 | return [$db->getInsertId(), 'insert']; |
143 | 143 | } |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | $ret = []; |
171 | 171 | |
172 | 172 | foreach (array_keys($_POST[$column4key]) as $id) { |
173 | - $id = (int)$id; // primary_key should be 'integer' |
|
173 | + $id = (int)$id; // primary_key should be 'integer' |
|
174 | 174 | |
175 | 175 | $set4sql = ''; |
176 | 176 | |
@@ -183,14 +183,14 @@ discard block |
||
183 | 183 | continue; |
184 | 184 | } |
185 | 185 | |
186 | - $set4sql .= $this->get_set4sql(@$_POST[$col['name']][$id], $col) . ','; |
|
186 | + $set4sql .= $this->get_set4sql(@$_POST[$col['name']][$id], $col).','; |
|
187 | 187 | } |
188 | 188 | |
189 | 189 | if (!empty($set4sql)) { |
190 | 190 | $result = $db->query("SELECT * FROM $this->table WHERE $this->primary_key=$id"); |
191 | 191 | |
192 | 192 | if (1 == $db->getRowsNum($result)) { |
193 | - $db->queryF("UPDATE $this->table SET " . mb_substr($set4sql, 0, -1) . " WHERE $this->primary_key=$id"); |
|
193 | + $db->queryF("UPDATE $this->table SET ".mb_substr($set4sql, 0, -1)." WHERE $this->primary_key=$id"); |
|
194 | 194 | |
195 | 195 | if (1 == $db->getAffectedRows()) { |
196 | 196 | $ret[$id] = $db->fetchArray($result); |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | $ret = []; |
216 | 216 | |
217 | 217 | foreach (array_keys($_POST['admin_main_checkboxes']) as $id) { |
218 | - $id = (int)$id; // primary_key should be 'integer' |
|
218 | + $id = (int)$id; // primary_key should be 'integer' |
|
219 | 219 | |
220 | 220 | $result = $db->query("SELECT * FROM $this->table WHERE $this->primary_key=$id"); |
221 | 221 | |
@@ -227,13 +227,13 @@ discard block |
||
227 | 227 | if ($delete_comments) { |
228 | 228 | // remove comments |
229 | 229 | |
230 | - $db->queryF('DELETE FROM ' . $db->prefix('xoopscomments') . " WHERE com_modid=$this->mid AND com_itemid=$id"); |
|
230 | + $db->queryF('DELETE FROM '.$db->prefix('xoopscomments')." WHERE com_modid=$this->mid AND com_itemid=$id"); |
|
231 | 231 | } |
232 | 232 | |
233 | 233 | if ($delete_notifications) { |
234 | 234 | // remove notifications |
235 | 235 | |
236 | - $db->queryF('DELETE FROM ' . $db->prefix('xoopsnotifications') . " WHERE not_modid=$this->mid AND not_itemid=$id"); |
|
236 | + $db->queryF('DELETE FROM '.$db->prefix('xoopsnotifications')." WHERE not_modid=$this->mid AND not_itemid=$id"); |
|
237 | 237 | } |
238 | 238 | } |
239 | 239 | } |
@@ -314,7 +314,7 @@ discard block |
||
314 | 314 | default: |
315 | 315 | $size = empty($col['edit_size']) ? 32 : (int)$col['edit_size']; |
316 | 316 | $length = empty($col['length']) ? 255 : (int)$col['length']; |
317 | - $lines[$col['name']] = "<input type='text' name='{$col['name']}' size='$size' maxlength='$length' value='" . htmlspecialchars($col['default_value'], ENT_QUOTES) . "' />"; |
|
317 | + $lines[$col['name']] = "<input type='text' name='{$col['name']}' size='$size' maxlength='$length' value='".htmlspecialchars($col['default_value'], ENT_QUOTES)."' />"; |
|
318 | 318 | break; |
319 | 319 | case false: |
320 | 320 | $lines[$col['name']] = htmlspecialchars($col['default_value'], ENT_QUOTES); |
@@ -354,7 +354,7 @@ discard block |
||
354 | 354 | <form action='' method='get' name='admin_control' id='admin_control'> |
355 | 355 | $hiddens |
356 | 356 | $controllers_html |
357 | - <input type='submit' value='" . _SUBMIT . "' /> |
|
357 | + <input type='submit' value='"._SUBMIT."' /> |
|
358 | 358 | </form>\n"; |
359 | 359 | } |
360 | 360 | |
@@ -367,12 +367,12 @@ discard block |
||
367 | 367 | |
368 | 368 | public function get_select($name, $options, $current_value) |
369 | 369 | { |
370 | - $ret = "<select name='" . htmlspecialchars($name, ENT_QUOTES) . "'>\n"; |
|
370 | + $ret = "<select name='".htmlspecialchars($name, ENT_QUOTES)."'>\n"; |
|
371 | 371 | |
372 | 372 | foreach ($options as $key => $val) { |
373 | 373 | $selected = $val == $current_value ? "selected='selected'" : ''; |
374 | 374 | |
375 | - $ret .= "<option value='" . htmlspecialchars($key, ENT_QUOTES) . "' $selected>" . htmlspecialchars($val, ENT_QUOTES) . "</option>\n"; |
|
375 | + $ret .= "<option value='".htmlspecialchars($key, ENT_QUOTES)."' $selected>".htmlspecialchars($val, ENT_QUOTES)."</option>\n"; |
|
376 | 376 | } |
377 | 377 | |
378 | 378 | $ret .= "</select>\n"; |
@@ -1145,7 +1145,7 @@ discard block |
||
1145 | 1145 | } |
1146 | 1146 | |
1147 | 1147 | /** |
1148 | - * @param $bid |
|
1148 | + * @param integer $bid |
|
1149 | 1149 | * @param string $mode |
1150 | 1150 | */ |
1151 | 1151 | |
@@ -1353,7 +1353,7 @@ discard block |
||
1353 | 1353 | |
1354 | 1354 | /** |
1355 | 1355 | * @param $bctype |
1356 | - * @return mixed|string |
|
1356 | + * @return string |
|
1357 | 1357 | */ |
1358 | 1358 | |
1359 | 1359 | public function get_blockname_from_ctype($bctype) |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | |
118 | 118 | $moduleHandler = xoops_getHandler('module'); |
119 | 119 | |
120 | - if (! empty($_GET['dirname'])) { |
|
120 | + if (! empty($_GET['dirname'])) { |
|
121 | 121 | $dirname = preg_replace('/[^0-9a-zA-Z_-]/', '', \Xmf\Request::getString('dirname', '', 'GET')); |
122 | 122 | |
123 | 123 | $target_module = $moduleHandler->getByDirname($dirname); |
@@ -558,12 +558,12 @@ discard block |
||
558 | 558 | ]; |
559 | 559 | |
560 | 560 | $blocks4assign[] = [ |
561 | - 'name_raw' => $block_data['name'], |
|
562 | - 'title_raw' => $block_data['title'], |
|
563 | - 'cell_position' => $this->renderCell4BlockPosition($block_data), |
|
564 | - 'cell_module_link' => $this->renderCell4BlockModuleLink($block_data), |
|
565 | - 'cell_group_perm' => $this->renderCell4BlockReadGroupPerm($block_data), |
|
566 | - ] + $block_data; |
|
561 | + 'name_raw' => $block_data['name'], |
|
562 | + 'title_raw' => $block_data['title'], |
|
563 | + 'cell_position' => $this->renderCell4BlockPosition($block_data), |
|
564 | + 'cell_module_link' => $this->renderCell4BlockModuleLink($block_data), |
|
565 | + 'cell_group_perm' => $this->renderCell4BlockReadGroupPerm($block_data), |
|
566 | + ] + $block_data; |
|
567 | 567 | } |
568 | 568 | |
569 | 569 | // display |
@@ -573,14 +573,14 @@ discard block |
||
573 | 573 | $tpl = new D3Tpl(); |
574 | 574 | |
575 | 575 | $tpl->assign([ |
576 | - 'target_mid' => $this->target_mid, |
|
577 | - 'target_dirname' => $this->target_dirname, |
|
578 | - 'target_mname' => $this->target_mname, |
|
579 | - 'language' => $this->lang, |
|
580 | - 'cachetime_options' => $this->cachetime_options, |
|
581 | - 'blocks' => $blocks4assign, |
|
582 | - 'gticket_hidden' => $xoopsGTicket->getTicketHtml(__LINE__, 1800, 'myblocksadmin'), |
|
583 | - ]); |
|
576 | + 'target_mid' => $this->target_mid, |
|
577 | + 'target_dirname' => $this->target_dirname, |
|
578 | + 'target_mname' => $this->target_mname, |
|
579 | + 'language' => $this->lang, |
|
580 | + 'cachetime_options' => $this->cachetime_options, |
|
581 | + 'blocks' => $blocks4assign, |
|
582 | + 'gticket_hidden' => $xoopsGTicket->getTicketHtml(__LINE__, 1800, 'myblocksadmin'), |
|
583 | + ]); |
|
584 | 584 | |
585 | 585 | $tpl->display('db:altsys_main_myblocksadmin_list.html'); |
586 | 586 | } |
@@ -1274,18 +1274,18 @@ discard block |
||
1274 | 1274 | } |
1275 | 1275 | |
1276 | 1276 | $tpl->assign([ |
1277 | - 'target_dirname' => $this->target_dirname, |
|
1278 | - 'target_mname' => $this->target_mname, |
|
1279 | - 'language' => $this->lang, |
|
1280 | - 'cachetime_options' => $this->cachetime_options, |
|
1281 | - 'ctype_options' => $this->ctype_options, |
|
1282 | - 'block' => $block4assign, |
|
1283 | - 'op' => $next_op, |
|
1284 | - 'form_title' => $form_title, |
|
1285 | - 'submit_button' => $button_value, |
|
1286 | - 'common_fck_installed' => $this->checkFck(), |
|
1287 | - 'gticket_hidden' => $GLOBALS['xoopsSecurity']->getTokenHTML('myblocksadmin'), |
|
1288 | - ]); |
|
1277 | + 'target_dirname' => $this->target_dirname, |
|
1278 | + 'target_mname' => $this->target_mname, |
|
1279 | + 'language' => $this->lang, |
|
1280 | + 'cachetime_options' => $this->cachetime_options, |
|
1281 | + 'ctype_options' => $this->ctype_options, |
|
1282 | + 'block' => $block4assign, |
|
1283 | + 'op' => $next_op, |
|
1284 | + 'form_title' => $form_title, |
|
1285 | + 'submit_button' => $button_value, |
|
1286 | + 'common_fck_installed' => $this->checkFck(), |
|
1287 | + 'gticket_hidden' => $GLOBALS['xoopsSecurity']->getTokenHTML('myblocksadmin'), |
|
1288 | + ]); |
|
1289 | 1289 | |
1290 | 1290 | if (defined('XOOPS_CUBE_LEGACY')) { |
1291 | 1291 | $tpl->display('db:altsys_main_myblocksadmin_edit_4legacy.html'); |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | |
118 | 118 | $moduleHandler = xoops_getHandler('module'); |
119 | 119 | |
120 | - if (! empty($_GET['dirname'])) { |
|
120 | + if (!empty($_GET['dirname'])) { |
|
121 | 121 | $dirname = preg_replace('/[^0-9a-zA-Z_-]/', '', \Xmf\Request::getString('dirname', '', 'GET')); |
122 | 122 | |
123 | 123 | $target_module = $moduleHandler->getByDirname($dirname); |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | |
129 | 129 | $this->target_mid = $target_module->getVar('mid'); |
130 | 130 | |
131 | - $this->target_mname = $target_module->getVar('name') . ' ' . sprintf('(%2.2f)', $target_module->getVar('version') / 100.0); |
|
131 | + $this->target_mname = $target_module->getVar('name').' '.sprintf('(%2.2f)', $target_module->getVar('version') / 100.0); |
|
132 | 132 | |
133 | 133 | $this->target_dirname = $target_module->getVar('dirname'); |
134 | 134 | |
@@ -138,9 +138,9 @@ discard block |
||
138 | 138 | |
139 | 139 | $breadcrumbsObj = AltsysBreadcrumbs::getInstance(); |
140 | 140 | |
141 | - $breadcrumbsObj->appendPath(XOOPS_URL . '/modules/altsys/admin/index.php?mode=admin&lib=altsys&page=myblocksadmin', '_MI_ALTSYS_MENU_MYBLOCKSADMIN'); |
|
141 | + $breadcrumbsObj->appendPath(XOOPS_URL.'/modules/altsys/admin/index.php?mode=admin&lib=altsys&page=myblocksadmin', '_MI_ALTSYS_MENU_MYBLOCKSADMIN'); |
|
142 | 142 | |
143 | - $breadcrumbsObj->appendPath(XOOPS_URL . '/modules/altsys/admin/index.php?mode=admin&lib=altsys&page=myblocksadmin&dirname=' . $this->target_dirname, $this->target_mname); |
|
143 | + $breadcrumbsObj->appendPath(XOOPS_URL.'/modules/altsys/admin/index.php?mode=admin&lib=altsys&page=myblocksadmin&dirname='.$this->target_dirname, $this->target_mname); |
|
144 | 144 | } else { |
145 | 145 | // custom blocks |
146 | 146 | |
@@ -154,28 +154,28 @@ discard block |
||
154 | 154 | |
155 | 155 | $breadcrumbsObj = AltsysBreadcrumbs::getInstance(); |
156 | 156 | |
157 | - $breadcrumbsObj->appendPath(XOOPS_URL . '/modules/altsys/admin/index.php?mode=admin&lib=altsys&page=myblocksadmin', '_MI_ALTSYS_MENU_MYBLOCKSADMIN'); |
|
157 | + $breadcrumbsObj->appendPath(XOOPS_URL.'/modules/altsys/admin/index.php?mode=admin&lib=altsys&page=myblocksadmin', '_MI_ALTSYS_MENU_MYBLOCKSADMIN'); |
|
158 | 158 | |
159 | - $breadcrumbsObj->appendPath(XOOPS_URL . '/modules/altsys/admin/index.php?mode=admin&lib=altsys&page=myblocksadmin&dirname=' . $this->target_dirname, '_MI_ALTSYS_MENU_CUSTOMBLOCKS'); |
|
159 | + $breadcrumbsObj->appendPath(XOOPS_URL.'/modules/altsys/admin/index.php?mode=admin&lib=altsys&page=myblocksadmin&dirname='.$this->target_dirname, '_MI_ALTSYS_MENU_CUSTOMBLOCKS'); |
|
160 | 160 | } |
161 | 161 | } else { |
162 | 162 | // myblocksadmin as a library |
163 | 163 | |
164 | 164 | $this->target_mid = $xoopsModule->getVar('mid'); |
165 | 165 | |
166 | - $this->target_mname = $xoopsModule->getVar('name') . ' ' . sprintf('(%2.2f)', $xoopsModule->getVar('version') / 100.0); |
|
166 | + $this->target_mname = $xoopsModule->getVar('name').' '.sprintf('(%2.2f)', $xoopsModule->getVar('version') / 100.0); |
|
167 | 167 | |
168 | 168 | $this->target_dirname = $xoopsModule->getVar('dirname'); |
169 | 169 | |
170 | - $mod_url = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname'); |
|
170 | + $mod_url = XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname'); |
|
171 | 171 | |
172 | 172 | $modinfo = $xoopsModule->getInfo(); |
173 | 173 | |
174 | 174 | $breadcrumbsObj = AltsysBreadcrumbs::getInstance(); |
175 | 175 | |
176 | - $breadcrumbsObj->appendPath($mod_url . '/' . @$modinfo['adminindex'], $this->target_mname); |
|
176 | + $breadcrumbsObj->appendPath($mod_url.'/'.@$modinfo['adminindex'], $this->target_mname); |
|
177 | 177 | |
178 | - $breadcrumbsObj->appendPath($mod_url . '/admin/index.php?mode=admin&lib=altsys&page=myblocksadmin', _MD_A_MYBLOCKSADMIN_BLOCKADMIN); |
|
178 | + $breadcrumbsObj->appendPath($mod_url.'/admin/index.php?mode=admin&lib=altsys&page=myblocksadmin', _MD_A_MYBLOCKSADMIN_BLOCKADMIN); |
|
179 | 179 | } |
180 | 180 | |
181 | 181 | // read xoops_version.php of the target |
@@ -301,7 +301,7 @@ discard block |
||
301 | 301 | } else { |
302 | 302 | // origined from the table of `block_module_link` |
303 | 303 | |
304 | - $result = $this->db->query('SELECT module_id FROM ' . $this->db->prefix('block_module_link') . " WHERE block_id='$bid'"); |
|
304 | + $result = $this->db->query('SELECT module_id FROM '.$this->db->prefix('block_module_link')." WHERE block_id='$bid'"); |
|
305 | 305 | |
306 | 306 | $selected_mids = []; |
307 | 307 | |
@@ -370,7 +370,7 @@ discard block |
||
370 | 370 | } else { |
371 | 371 | // origined from the table of `group_perm` |
372 | 372 | |
373 | - $result = $this->db->query('SELECT gperm_groupid FROM ' . $this->db->prefix('group_permission') . " WHERE gperm_itemid='$bid' AND gperm_name='block_read'"); |
|
373 | + $result = $this->db->query('SELECT gperm_groupid FROM '.$this->db->prefix('group_permission')." WHERE gperm_itemid='$bid' AND gperm_name='block_read'"); |
|
374 | 374 | |
375 | 375 | $selected_gids = []; |
376 | 376 | |
@@ -473,31 +473,31 @@ discard block |
||
473 | 473 | |
474 | 474 | return " |
475 | 475 | <div class='blockposition $scol0'> |
476 | - <input type='radio' name='sides[$bid]' value='" . XOOPS_SIDEBLOCK_LEFT . "' class='blockposition' $ssel0 onclick='document.getElementById(\"extra_side_$bid\").value=" . XOOPS_SIDEBLOCK_LEFT . ";' /> |
|
476 | + <input type='radio' name='sides[$bid]' value='".XOOPS_SIDEBLOCK_LEFT."' class='blockposition' $ssel0 onclick='document.getElementById(\"extra_side_$bid\").value=".XOOPS_SIDEBLOCK_LEFT.";' /> |
|
477 | 477 | </div> |
478 | - <div style='float:" . _GLOBAL_LEFT . ";'>-</div> |
|
478 | + <div style='float:" . _GLOBAL_LEFT.";'>-</div> |
|
479 | 479 | <div class='blockposition $scol2'> |
480 | - <input type='radio' name='sides[$bid]' value='" . XOOPS_CENTERBLOCK_LEFT . "' class='blockposition' $ssel2 onclick='document.getElementById(\"extra_side_$bid\").value=" . XOOPS_CENTERBLOCK_LEFT . ";' /> |
|
480 | + <input type='radio' name='sides[$bid]' value='".XOOPS_CENTERBLOCK_LEFT."' class='blockposition' $ssel2 onclick='document.getElementById(\"extra_side_$bid\").value=".XOOPS_CENTERBLOCK_LEFT.";' /> |
|
481 | 481 | </div> |
482 | 482 | <div class='blockposition $scol3'> |
483 | - <input type='radio' name='sides[$bid]' value='" . XOOPS_CENTERBLOCK_CENTER . "' class='blockposition' $ssel3 onclick='document.getElementById(\"extra_side_$bid\").value=" . XOOPS_CENTERBLOCK_CENTER . ";' /> |
|
483 | + <input type='radio' name='sides[$bid]' value='".XOOPS_CENTERBLOCK_CENTER."' class='blockposition' $ssel3 onclick='document.getElementById(\"extra_side_$bid\").value=".XOOPS_CENTERBLOCK_CENTER.";' /> |
|
484 | 484 | </div> |
485 | 485 | <div class='blockposition $scol4'> |
486 | - <input type='radio' name='sides[$bid]' value='" . XOOPS_CENTERBLOCK_RIGHT . "' class='blockposition' $ssel4 onclick='document.getElementById(\"extra_side_$bid\").value=" . XOOPS_CENTERBLOCK_RIGHT . ";' /> |
|
486 | + <input type='radio' name='sides[$bid]' value='".XOOPS_CENTERBLOCK_RIGHT."' class='blockposition' $ssel4 onclick='document.getElementById(\"extra_side_$bid\").value=".XOOPS_CENTERBLOCK_RIGHT.";' /> |
|
487 | 487 | </div> |
488 | - <div style='float:" . _GLOBAL_LEFT . ";'>-</div> |
|
488 | + <div style='float:" . _GLOBAL_LEFT.";'>-</div> |
|
489 | 489 | <div class='blockposition $scol1'> |
490 | - <input type='radio' name='sides[$bid]' value='" . XOOPS_SIDEBLOCK_RIGHT . "' class='blockposition' $ssel1 onclick='document.getElementById(\"extra_side_$bid\").value=" . XOOPS_SIDEBLOCK_RIGHT . ";' /> |
|
490 | + <input type='radio' name='sides[$bid]' value='".XOOPS_SIDEBLOCK_RIGHT."' class='blockposition' $ssel1 onclick='document.getElementById(\"extra_side_$bid\").value=".XOOPS_SIDEBLOCK_RIGHT.";' /> |
|
491 | 491 | </div> |
492 | 492 | <br /> |
493 | 493 | <br /> |
494 | - <div style='float:" . _GLOBAL_LEFT . ";width:50px;' class='$stextbox'> |
|
495 | - <input type='text' name='extra_sides[$bid]' value='" . $value4extra_side . "' style='width:20px;' id='extra_side_$bid' /> |
|
494 | + <div style='float:" . _GLOBAL_LEFT.";width:50px;' class='$stextbox'> |
|
495 | + <input type='text' name='extra_sides[$bid]' value='".$value4extra_side."' style='width:20px;' id='extra_side_$bid' /> |
|
496 | 496 | </div> |
497 | 497 | <div class='blockposition $scoln'> |
498 | 498 | <input type='radio' name='sides[$bid]' value='-1' class='blockposition' $sseln onclick='document.getElementById(\"extra_side_$bid\").value=-1;' /> |
499 | 499 | </div> |
500 | - <div style='float:" . _GLOBAL_LEFT . ";'>" . _NONE . '</div> |
|
500 | + <div style='float:"._GLOBAL_LEFT.";'>"._NONE.'</div> |
|
501 | 501 | '; |
502 | 502 | } |
503 | 503 | |
@@ -509,7 +509,7 @@ discard block |
||
509 | 509 | |
510 | 510 | // main query |
511 | 511 | |
512 | - $sql = 'SELECT * FROM ' . $this->db->prefix('newblocks') . " WHERE mid='$this->target_mid' ORDER BY visible DESC,side,weight"; |
|
512 | + $sql = 'SELECT * FROM '.$this->db->prefix('newblocks')." WHERE mid='$this->target_mid' ORDER BY visible DESC,side,weight"; |
|
513 | 513 | |
514 | 514 | $result = $this->db->query($sql); |
515 | 515 | |
@@ -568,7 +568,7 @@ discard block |
||
568 | 568 | |
569 | 569 | // display |
570 | 570 | |
571 | - require_once XOOPS_TRUST_PATH . '/libs/altsys/class/D3Tpl.class.php'; |
|
571 | + require_once XOOPS_TRUST_PATH.'/libs/altsys/class/D3Tpl.class.php'; |
|
572 | 572 | |
573 | 573 | $tpl = new D3Tpl(); |
574 | 574 | |
@@ -595,7 +595,7 @@ discard block |
||
595 | 595 | return []; |
596 | 596 | } |
597 | 597 | |
598 | - include XOOPS_ROOT_PATH . '/modules/' . $this->target_dirname . '/xoops_version.php'; |
|
598 | + include XOOPS_ROOT_PATH.'/modules/'.$this->target_dirname.'/xoops_version.php'; |
|
599 | 599 | |
600 | 600 | if (empty($modversion['blocks'])) { |
601 | 601 | return []; |
@@ -608,7 +608,7 @@ discard block |
||
608 | 608 | { |
609 | 609 | // query for getting blocks |
610 | 610 | |
611 | - $sql = 'SELECT * FROM ' . $this->db->prefix('newblocks') . " WHERE mid='$this->target_mid' ORDER BY visible DESC,side,weight"; |
|
611 | + $sql = 'SELECT * FROM '.$this->db->prefix('newblocks')." WHERE mid='$this->target_mid' ORDER BY visible DESC,side,weight"; |
|
612 | 612 | |
613 | 613 | $result = $this->db->query($sql); |
614 | 614 | |
@@ -645,9 +645,9 @@ discard block |
||
645 | 645 | // skip system (TODO) |
646 | 646 | |
647 | 647 | if ($this->target_mid > 1) { |
648 | - $form->addAppendix('module_admin', $this->target_mid, $this->target_mname . ' ' . _MD_A_MYBLOCKSADMIN_PERM_MADMIN); |
|
648 | + $form->addAppendix('module_admin', $this->target_mid, $this->target_mname.' '._MD_A_MYBLOCKSADMIN_PERM_MADMIN); |
|
649 | 649 | |
650 | - $form->addAppendix('module_read', $this->target_mid, $this->target_mname . ' ' . _MD_A_MYBLOCKSADMIN_PERM_MREAD); |
|
650 | + $form->addAppendix('module_read', $this->target_mid, $this->target_mname.' '._MD_A_MYBLOCKSADMIN_PERM_MREAD); |
|
651 | 651 | } |
652 | 652 | |
653 | 653 | foreach ($item_list as $item_id => $item_name) { |
@@ -719,27 +719,27 @@ discard block |
||
719 | 719 | $msg = _MD_A_MYBLOCKSADMIN_DBUPDATED; |
720 | 720 | |
721 | 721 | if (false != $block->store()) { |
722 | - include_once XOOPS_ROOT_PATH . '/class/template.php'; |
|
722 | + include_once XOOPS_ROOT_PATH.'/class/template.php'; |
|
723 | 723 | |
724 | 724 | $xoopsTpl = new XoopsTpl(); |
725 | 725 | |
726 | 726 | $xoopsTpl->xoops_setCaching(2); |
727 | 727 | |
728 | 728 | if ('' != $block->getVar('template')) { |
729 | - if ($xoopsTpl->is_cached('db:' . $block->getVar('template'))) { |
|
730 | - if (!$xoopsTpl->clear_cache('db:' . $block->getVar('template'))) { |
|
731 | - $msg = 'Unable to clear cache for block ID' . $bid; |
|
729 | + if ($xoopsTpl->is_cached('db:'.$block->getVar('template'))) { |
|
730 | + if (!$xoopsTpl->clear_cache('db:'.$block->getVar('template'))) { |
|
731 | + $msg = 'Unable to clear cache for block ID'.$bid; |
|
732 | 732 | } |
733 | 733 | } |
734 | 734 | } else { |
735 | - if ($xoopsTpl->is_cached('db:system_dummy.html', 'blk_' . $bid)) { |
|
736 | - if (!$xoopsTpl->clear_cache('db:system_dummy.html', 'blk_' . $bid)) { |
|
737 | - $msg = 'Unable to clear cache for block ID' . $bid; |
|
735 | + if ($xoopsTpl->is_cached('db:system_dummy.html', 'blk_'.$bid)) { |
|
736 | + if (!$xoopsTpl->clear_cache('db:system_dummy.html', 'blk_'.$bid)) { |
|
737 | + $msg = 'Unable to clear cache for block ID'.$bid; |
|
738 | 738 | } |
739 | 739 | } |
740 | 740 | } |
741 | 741 | } else { |
742 | - $msg = 'Failed update of block. ID:' . $bid; |
|
742 | + $msg = 'Failed update of block. ID:'.$bid; |
|
743 | 743 | } |
744 | 744 | |
745 | 745 | return $msg; |
@@ -1078,7 +1078,7 @@ discard block |
||
1078 | 1078 | do { |
1079 | 1079 | $func_num--; |
1080 | 1080 | |
1081 | - list($count) = $this->db->fetchRow($this->db->query('SELECT COUNT(*) FROM ' . $this->db->prefix('newblocks') . ' WHERE mid=' . (int)$mid . ' AND func_num=' . $func_num)); |
|
1081 | + list($count) = $this->db->fetchRow($this->db->query('SELECT COUNT(*) FROM '.$this->db->prefix('newblocks').' WHERE mid='.(int)$mid.' AND func_num='.$func_num)); |
|
1082 | 1082 | } while ($count > 0); |
1083 | 1083 | |
1084 | 1084 | return $func_num > 128 ? $func_num : 255; |
@@ -1121,7 +1121,7 @@ discard block |
||
1121 | 1121 | // permission copy |
1122 | 1122 | |
1123 | 1123 | foreach ($GLOBALS['xoopsUser']->getGroups() as $gid) { |
1124 | - $sql = 'INSERT INTO ' . $this->db->prefix('group_permission') . " (gperm_groupid, gperm_itemid, gperm_modid, gperm_name) VALUES ($gid, $bid, 1, 'block_read')"; |
|
1124 | + $sql = 'INSERT INTO '.$this->db->prefix('group_permission')." (gperm_groupid, gperm_itemid, gperm_modid, gperm_name) VALUES ($gid, $bid, 1, 'block_read')"; |
|
1125 | 1125 | |
1126 | 1126 | $this->db->query($sql); |
1127 | 1127 | } |
@@ -1259,7 +1259,7 @@ discard block |
||
1259 | 1259 | |
1260 | 1260 | // display |
1261 | 1261 | |
1262 | - require_once XOOPS_TRUST_PATH . '/libs/altsys/class/D3Tpl.class.php'; |
|
1262 | + require_once XOOPS_TRUST_PATH.'/libs/altsys/class/D3Tpl.class.php'; |
|
1263 | 1263 | |
1264 | 1264 | $tpl = new D3Tpl(); |
1265 | 1265 | |
@@ -1268,7 +1268,7 @@ discard block |
||
1268 | 1268 | if (defined('XOOPS_CUBE_LEGACY')) { |
1269 | 1269 | $tpl->assign('xoops_cube_legacy', true); |
1270 | 1270 | |
1271 | - include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
1271 | + include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
1272 | 1272 | } else { |
1273 | 1273 | $tpl->assign('xoops_cube_legacy', false); |
1274 | 1274 | } |
@@ -1300,7 +1300,7 @@ discard block |
||
1300 | 1300 | |
1301 | 1301 | public function checkFck() |
1302 | 1302 | { |
1303 | - return file_exists(XOOPS_ROOT_PATH . '/common/fckeditor/fckeditor.js'); |
|
1303 | + return file_exists(XOOPS_ROOT_PATH.'/common/fckeditor/fckeditor.js'); |
|
1304 | 1304 | } |
1305 | 1305 | |
1306 | 1306 | /** |
@@ -1373,14 +1373,14 @@ discard block |
||
1373 | 1373 | // Ticket Check |
1374 | 1374 | |
1375 | 1375 | if (!$GLOBALS['xoopsSecurity']->check(true, 'myblocksadmin')) { |
1376 | - redirect_header(XOOPS_URL . '/', 3, $GLOBALS['xoopsSecurity']->getErrors()); |
|
1376 | + redirect_header(XOOPS_URL.'/', 3, $GLOBALS['xoopsSecurity']->getErrors()); |
|
1377 | 1377 | } |
1378 | 1378 | |
1379 | 1379 | $msg = ''; |
1380 | 1380 | |
1381 | 1381 | $bid = (int)(@$_GET['bid']); |
1382 | 1382 | |
1383 | - if (! empty($_POST['preview'])) { |
|
1383 | + if (!empty($_POST['preview'])) { |
|
1384 | 1384 | // preview |
1385 | 1385 | |
1386 | 1386 | $this->preview_request = $this->fetchRequest4Block($bid); |
@@ -1407,12 +1407,12 @@ discard block |
||
1407 | 1407 | } elseif (!empty($_POST['submit'])) { |
1408 | 1408 | // update module_admin,module_read,block_read |
1409 | 1409 | |
1410 | - include dirname(__DIR__) . '/include/mygroupperm.php'; |
|
1410 | + include dirname(__DIR__).'/include/mygroupperm.php'; |
|
1411 | 1411 | |
1412 | 1412 | $msg = _MD_A_MYBLOCKSADMIN_PERMUPDATED; |
1413 | 1413 | } |
1414 | 1414 | |
1415 | - redirect_header('?mode=admin&lib=altsys&page=myblocksadmin&dirname=' . $this->target_dirname, 1, $msg); |
|
1415 | + redirect_header('?mode=admin&lib=altsys&page=myblocksadmin&dirname='.$this->target_dirname, 1, $msg); |
|
1416 | 1416 | |
1417 | 1417 | exit; |
1418 | 1418 | } |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | // private |
125 | 125 | |
126 | 126 | /** |
127 | - * @param $target_side |
|
127 | + * @param integer $target_side |
|
128 | 128 | * @param $block_data |
129 | 129 | * @return string |
130 | 130 | */ |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | |
157 | 157 | /** |
158 | 158 | * @param $block_data |
159 | - * @param array $skip_sides |
|
159 | + * @param integer[] $skip_sides |
|
160 | 160 | * @return string |
161 | 161 | */ |
162 | 162 |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -require_once __DIR__ . '/MyBlocksAdmin.class.php'; |
|
3 | +require_once __DIR__.'/MyBlocksAdmin.class.php'; |
|
4 | 4 | |
5 | 5 | /** |
6 | 6 | * Class MyBlocksAdminForICMS |
@@ -17,9 +17,9 @@ discard block |
||
17 | 17 | { |
18 | 18 | parent::construct(); |
19 | 19 | |
20 | - @include_once XOOPS_ROOT_PATH . '/modules/system/language/' . $this->lang . '/admin/blocksadmin.php'; |
|
20 | + @include_once XOOPS_ROOT_PATH.'/modules/system/language/'.$this->lang.'/admin/blocksadmin.php'; |
|
21 | 21 | |
22 | - $result = $this->db->query('SELECT id,pname,title FROM ' . $this->db->prefix('block_positions')); |
|
22 | + $result = $this->db->query('SELECT id,pname,title FROM '.$this->db->prefix('block_positions')); |
|
23 | 23 | |
24 | 24 | while (list($id, $pname, $title) = $this->db->fetchRow($result)) { |
25 | 25 | $this->block_positions[$id] = defined($title) ? constant($title) : $title; |
@@ -71,12 +71,12 @@ discard block |
||
71 | 71 | } else { |
72 | 72 | // origined from the table of `block_module_link` |
73 | 73 | |
74 | - $result = $this->db->query('SELECT module_id,page_id FROM ' . $this->db->prefix('block_module_link') . " WHERE block_id='$bid'"); |
|
74 | + $result = $this->db->query('SELECT module_id,page_id FROM '.$this->db->prefix('block_module_link')." WHERE block_id='$bid'"); |
|
75 | 75 | |
76 | 76 | $selected_pages = []; |
77 | 77 | |
78 | 78 | while (list($mid, $pid) = $this->db->fetchRow($result)) { |
79 | - $selected_pages[] = (int)$mid . '-' . (int)$pid; |
|
79 | + $selected_pages[] = (int)$mid.'-'.(int)$pid; |
|
80 | 80 | } |
81 | 81 | } |
82 | 82 | |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | |
85 | 85 | $ret = " |
86 | 86 | <select name='bmodules[$bid][]' size='5' multiple='multiple'> |
87 | - " . $page_handler->getPageSelOptions($selected_pages) . ' |
|
87 | + ".$page_handler->getPageSelOptions($selected_pages).' |
|
88 | 88 | </select>'; |
89 | 89 | |
90 | 90 | return $ret; |
@@ -104,19 +104,19 @@ discard block |
||
104 | 104 | return " |
105 | 105 | <table> |
106 | 106 | <tr> |
107 | - <td rowspan='2'>" . $this->renderRadio4BlockPosition(1, $block_data) . '</td> |
|
108 | - <td>' . $this->renderRadio4BlockPosition(3, $block_data) . '</td> |
|
109 | - <td>' . $this->renderRadio4BlockPosition(4, $block_data) . '</td> |
|
110 | - <td>' . $this->renderRadio4BlockPosition(5, $block_data) . "</td> |
|
111 | - <td rowspan='2'>" . $this->renderRadio4BlockPosition(2, $block_data) . '</td> |
|
107 | + <td rowspan='2'>" . $this->renderRadio4BlockPosition(1, $block_data).'</td> |
|
108 | + <td>' . $this->renderRadio4BlockPosition(3, $block_data).'</td> |
|
109 | + <td>' . $this->renderRadio4BlockPosition(4, $block_data).'</td> |
|
110 | + <td>' . $this->renderRadio4BlockPosition(5, $block_data)."</td> |
|
111 | + <td rowspan='2'>" . $this->renderRadio4BlockPosition(2, $block_data).'</td> |
|
112 | 112 | </tr> |
113 | 113 | <tr> |
114 | - <td>' . $this->renderRadio4BlockPosition(6, $block_data) . '</td> |
|
115 | - <td>' . $this->renderRadio4BlockPosition(7, $block_data) . '</td> |
|
116 | - <td>' . $this->renderRadio4BlockPosition(8, $block_data) . "</td> |
|
114 | + <td>' . $this->renderRadio4BlockPosition(6, $block_data).'</td> |
|
115 | + <td>' . $this->renderRadio4BlockPosition(7, $block_data).'</td> |
|
116 | + <td>' . $this->renderRadio4BlockPosition(8, $block_data)."</td> |
|
117 | 117 | </tr> |
118 | 118 | <tr> |
119 | - <td colspan='5'>" . $this->renderRadio4BlockPositions($block_data, [1, 2, 3, 4, 5, 6, 7, 8]) . '</td> |
|
119 | + <td colspan='5'>" . $this->renderRadio4BlockPositions($block_data, [1, 2, 3, 4, 5, 6, 7, 8]).'</td> |
|
120 | 120 | </tr> |
121 | 121 | </table>'; |
122 | 122 | } |
@@ -87,7 +87,7 @@ |
||
87 | 87 | // private |
88 | 88 | |
89 | 89 | /** |
90 | - * @param $target_side |
|
90 | + * @param integer $target_side |
|
91 | 91 | * @param $block_data |
92 | 92 | * @return string |
93 | 93 | */ |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -require_once __DIR__ . '/MyBlocksAdmin.class.php'; |
|
3 | +require_once __DIR__.'/MyBlocksAdmin.class.php'; |
|
4 | 4 | |
5 | 5 | /** |
6 | 6 | * Class MyBlocksAdminForX20S |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | { |
18 | 18 | parent::construct(); |
19 | 19 | |
20 | - @include_once XOOPS_ROOT_PATH . '/modules/system/language/' . $this->lang . '/admin/blocksadmin.php'; |
|
20 | + @include_once XOOPS_ROOT_PATH.'/modules/system/language/'.$this->lang.'/admin/blocksadmin.php'; |
|
21 | 21 | |
22 | 22 | $this->block_positions = [ |
23 | 23 | -1 => _NONE, |
@@ -67,19 +67,19 @@ discard block |
||
67 | 67 | return " |
68 | 68 | <table style='width:80px;'> |
69 | 69 | <tr> |
70 | - <td rowspan='2'>" . $this->renderRadio4BlockPosition(0, $block_data) . '</td> |
|
71 | - <td>' . $this->renderRadio4BlockPosition(3, $block_data) . '</td> |
|
72 | - <td>' . $this->renderRadio4BlockPosition(5, $block_data) . '</td> |
|
73 | - <td>' . $this->renderRadio4BlockPosition(4, $block_data) . "</td> |
|
74 | - <td rowspan='2'>" . $this->renderRadio4BlockPosition(1, $block_data) . '</td> |
|
70 | + <td rowspan='2'>" . $this->renderRadio4BlockPosition(0, $block_data).'</td> |
|
71 | + <td>' . $this->renderRadio4BlockPosition(3, $block_data).'</td> |
|
72 | + <td>' . $this->renderRadio4BlockPosition(5, $block_data).'</td> |
|
73 | + <td>' . $this->renderRadio4BlockPosition(4, $block_data)."</td> |
|
74 | + <td rowspan='2'>" . $this->renderRadio4BlockPosition(1, $block_data).'</td> |
|
75 | 75 | </tr> |
76 | 76 | <tr> |
77 | - <td>' . $this->renderRadio4BlockPosition(7, $block_data) . '</td> |
|
78 | - <td>' . $this->renderRadio4BlockPosition(9, $block_data) . '</td> |
|
79 | - <td>' . $this->renderRadio4BlockPosition(8, $block_data) . "</td> |
|
77 | + <td>' . $this->renderRadio4BlockPosition(7, $block_data).'</td> |
|
78 | + <td>' . $this->renderRadio4BlockPosition(9, $block_data).'</td> |
|
79 | + <td>' . $this->renderRadio4BlockPosition(8, $block_data)."</td> |
|
80 | 80 | </tr> |
81 | 81 | <tr> |
82 | - <td colspan='5'>" . $this->renderRadio4BlockPosition(-1, $block_data) . _NONE . '</td> |
|
82 | + <td colspan='5'>" . $this->renderRadio4BlockPosition(-1, $block_data)._NONE.'</td> |
|
83 | 83 | </tr> |
84 | 84 | </table>'; |
85 | 85 | } |
@@ -63,8 +63,8 @@ |
||
63 | 63 | } |
64 | 64 | |
65 | 65 | /** |
66 | - * @param $dirname |
|
67 | - * @param $fileBodyName |
|
66 | + * @param string $dirname |
|
67 | + * @param string $fileBodyName |
|
68 | 68 | */ |
69 | 69 | |
70 | 70 | public function _loadLanguage($dirname, $fileBodyName) |
@@ -5,12 +5,12 @@ discard block |
||
5 | 5 | } |
6 | 6 | |
7 | 7 | if (!defined('XOOPS_TRUST_PATH') || XOOPS_TRUST_PATH == '') { |
8 | - header('Location: ' . XOOPS_URL . '/modules/altsys/setup_xoops_trust_path.php'); |
|
8 | + header('Location: '.XOOPS_URL.'/modules/altsys/setup_xoops_trust_path.php'); |
|
9 | 9 | |
10 | 10 | exit; |
11 | 11 | } |
12 | 12 | |
13 | -define('ALTSYS_MYLANGUAGE_ROOT_PATH', XOOPS_ROOT_PATH . '/my_language'); |
|
13 | +define('ALTSYS_MYLANGUAGE_ROOT_PATH', XOOPS_ROOT_PATH.'/my_language'); |
|
14 | 14 | |
15 | 15 | /** |
16 | 16 | * Class SetupAltsysLangMgr |
@@ -33,8 +33,8 @@ discard block |
||
33 | 33 | } |
34 | 34 | } |
35 | 35 | |
36 | -require_once XOOPS_ROOT_PATH . '/core/XCube_LanguageManager.class.php'; |
|
37 | -require_once XOOPS_ROOT_PATH . '/modules/legacy/kernel/Legacy_LanguageManager.class.php'; |
|
36 | +require_once XOOPS_ROOT_PATH.'/core/XCube_LanguageManager.class.php'; |
|
37 | +require_once XOOPS_ROOT_PATH.'/modules/legacy/kernel/Legacy_LanguageManager.class.php'; |
|
38 | 38 | |
39 | 39 | /** |
40 | 40 | * Class AltsysLangMgr_LanguageManager |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | |
48 | 48 | public function prepare() |
49 | 49 | { |
50 | - $langmanpath = XOOPS_TRUST_PATH . '/libs/altsys/class/D3LanguageManager.class.php'; |
|
50 | + $langmanpath = XOOPS_TRUST_PATH.'/libs/altsys/class/D3LanguageManager.class.php'; |
|
51 | 51 | |
52 | 52 | if (!is_file($langmanpath)) { |
53 | 53 | die('install the latest altsys'); |
@@ -75,12 +75,12 @@ discard block |
||
75 | 75 | $root = XCube_Root::getSingleton(); |
76 | 76 | |
77 | 77 | if (!empty($root->mContext->mXoopsConfig['theme_set'])) { |
78 | - $langdir = XOOPS_THEME_PATH . '/' . $root->mContext->mXoopsConfig['theme_set'] . '/language'; |
|
78 | + $langdir = XOOPS_THEME_PATH.'/'.$root->mContext->mXoopsConfig['theme_set'].'/language'; |
|
79 | 79 | |
80 | 80 | if (file_exists($langdir)) { |
81 | - $langfile = $langdir . '/' . $this->mLanguageName . '.php'; |
|
81 | + $langfile = $langdir.'/'.$this->mLanguageName.'.php'; |
|
82 | 82 | |
83 | - $engfile = $langdir . '/english.php'; |
|
83 | + $engfile = $langdir.'/english.php'; |
|
84 | 84 | |
85 | 85 | if (is_file($langfile)) { |
86 | 86 | require_once $langfile; |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | |
96 | 96 | // read normal |
97 | 97 | |
98 | - $this->langman->read($fileBodyName . '.php', $dirname); |
|
98 | + $this->langman->read($fileBodyName.'.php', $dirname); |
|
99 | 99 | } |
100 | 100 | |
101 | 101 | /** |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | // I dare not to use langman... |
108 | 108 | |
109 | 109 | if (false === mb_strpos($type, '.') && $this->langman->my_language) { |
110 | - $mylang_file = $this->langman->my_language . '/' . $this->mLanguageName . '/' . $type . '.php'; |
|
110 | + $mylang_file = $this->langman->my_language.'/'.$this->mLanguageName.'/'.$type.'.php'; |
|
111 | 111 | |
112 | 112 | if (is_file($mylang_file)) { |
113 | 113 | require_once $mylang_file; |
@@ -130,8 +130,8 @@ |
||
130 | 130 | } |
131 | 131 | |
132 | 132 | /** |
133 | - * @param $mid |
|
134 | - * @param $coretype |
|
133 | + * @param integer $mid |
|
134 | + * @param integer|null $coretype |
|
135 | 135 | * @return string |
136 | 136 | */ |
137 | 137 | function altsys_get_link2modpreferences($mid, $coretype) |
@@ -45,17 +45,17 @@ discard block |
||
45 | 45 | global $xoopsModule, $xoopsConfig, $mydirname, $mydirpath, $mytrustdirname, $mytrustdirpath, $mymenu_fake_uri; |
46 | 46 | |
47 | 47 | $mymenu_find_paths = [ |
48 | - $mydirpath . '/admin/mymenu.php', |
|
49 | - $mydirpath . '/mymenu.php', |
|
50 | - $mytrustdirpath . '/admin/mymenu.php', |
|
51 | - $mytrustdirpath . '/mymenu.php', |
|
48 | + $mydirpath.'/admin/mymenu.php', |
|
49 | + $mydirpath.'/mymenu.php', |
|
50 | + $mytrustdirpath.'/admin/mymenu.php', |
|
51 | + $mytrustdirpath.'/mymenu.php', |
|
52 | 52 | ]; |
53 | 53 | |
54 | 54 | foreach ($mymenu_find_paths as $mymenu_find_path) { |
55 | 55 | if (is_file($mymenu_find_path)) { |
56 | 56 | include $mymenu_find_path; |
57 | 57 | |
58 | - include_once __DIR__ . '/adminmenu_functions.php'; |
|
58 | + include_once __DIR__.'/adminmenu_functions.php'; |
|
59 | 59 | |
60 | 60 | altsys_adminmenu_insert_mymenu($xoopsModule); |
61 | 61 | |
@@ -73,14 +73,14 @@ discard block |
||
73 | 73 | { |
74 | 74 | $mylang = $GLOBALS['xoopsConfig']['language']; |
75 | 75 | |
76 | - if (is_file(XOOPS_ROOT_PATH . '/modules/altsys/language/' . $mylang . '/' . $type . '.php')) { |
|
77 | - include_once XOOPS_ROOT_PATH . '/modules/altsys/language/' . $mylang . '/' . $type . '.php'; |
|
78 | - } elseif (is_file(XOOPS_TRUST_PATH . '/libs/altsys/language/' . $mylang . '/' . $type . '.php')) { |
|
79 | - include_once XOOPS_TRUST_PATH . '/libs/altsys/language/' . $mylang . '/' . $type . '.php'; |
|
80 | - } elseif (is_file(XOOPS_ROOT_PATH . '/modules/altsys/language/english/' . $type . '.php')) { |
|
81 | - include_once XOOPS_ROOT_PATH . '/modules/altsys/language/english/' . $type . '.php'; |
|
82 | - } elseif (is_file(XOOPS_TRUST_PATH . '/libs/altsys/language/english/' . $type . '.php')) { |
|
83 | - include_once XOOPS_TRUST_PATH . '/libs/altsys/language/english/' . $type . '.php'; |
|
76 | + if (is_file(XOOPS_ROOT_PATH.'/modules/altsys/language/'.$mylang.'/'.$type.'.php')) { |
|
77 | + include_once XOOPS_ROOT_PATH.'/modules/altsys/language/'.$mylang.'/'.$type.'.php'; |
|
78 | + } elseif (is_file(XOOPS_TRUST_PATH.'/libs/altsys/language/'.$mylang.'/'.$type.'.php')) { |
|
79 | + include_once XOOPS_TRUST_PATH.'/libs/altsys/language/'.$mylang.'/'.$type.'.php'; |
|
80 | + } elseif (is_file(XOOPS_ROOT_PATH.'/modules/altsys/language/english/'.$type.'.php')) { |
|
81 | + include_once XOOPS_ROOT_PATH.'/modules/altsys/language/english/'.$type.'.php'; |
|
82 | + } elseif (is_file(XOOPS_TRUST_PATH.'/libs/altsys/language/english/'.$type.'.php')) { |
|
83 | + include_once XOOPS_TRUST_PATH.'/libs/altsys/language/english/'.$type.'.php'; |
|
84 | 84 | } |
85 | 85 | } |
86 | 86 | |
@@ -144,9 +144,9 @@ discard block |
||
144 | 144 | case ALTSYS_CORE_TYPE_X23P: |
145 | 145 | case ALTSYS_CORE_TYPE_ICMS: |
146 | 146 | default: |
147 | - return XOOPS_URL . '/modules/system/admin.php?fct=preferences&op=showmod&mod=' . $mid; |
|
147 | + return XOOPS_URL.'/modules/system/admin.php?fct=preferences&op=showmod&mod='.$mid; |
|
148 | 148 | case ALTSYS_CORE_TYPE_XCL21: |
149 | - return XOOPS_URL . '/modules/legacy/admin/index.php?action=PreferenceEdit&confmod_id=' . $mid; |
|
149 | + return XOOPS_URL.'/modules/legacy/admin/index.php?action=PreferenceEdit&confmod_id='.$mid; |
|
150 | 150 | } |
151 | 151 | } |
152 | 152 | |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | continue; |
180 | 180 | } |
181 | 181 | |
182 | - @unlink(XOOPS_COMPILE_PATH . '/' . $file); |
|
182 | + @unlink(XOOPS_COMPILE_PATH.'/'.$file); |
|
183 | 183 | } |
184 | 184 | |
185 | 185 | closedir($dh); |