@@ -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.tpl'); |
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.tpl'); |
@@ -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.tpl', 'blk_' . $bid)) { |
|
736 | - if (!$xoopsTpl->clear_cache('db:system_dummy.tpl', 'blk_' . $bid)) { |
|
737 | - $msg = 'Unable to clear cache for block ID' . $bid; |
|
735 | + if ($xoopsTpl->is_cached('db:system_dummy.tpl', 'blk_'.$bid)) { |
|
736 | + if (!$xoopsTpl->clear_cache('db:system_dummy.tpl', '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 | } |
@@ -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); |
@@ -142,6 +142,9 @@ discard block |
||
142 | 142 | |
143 | 143 | // function Archive_Zip($p_zipname) |
144 | 144 | |
145 | + /** |
|
146 | + * @param string $p_zipname |
|
147 | + */ |
|
145 | 148 | public function __construct($p_zipname) |
146 | 149 | { |
147 | 150 | // ----- Check the zlib |
@@ -185,7 +188,7 @@ discard block |
||
185 | 188 | * @param mixed $p_filelist The list of the files or folders to add. |
186 | 189 | * It can be a string with filenames separated |
187 | 190 | * by a comma, or an array of filenames. |
188 | - * @param mixed $p_params An array of variable parameters and values. |
|
191 | + * @param integer $p_params An array of variable parameters and values. |
|
189 | 192 | * @return mixed An array of file description on success, |
190 | 193 | * an error code on error |
191 | 194 | */ |
@@ -263,7 +266,7 @@ discard block |
||
263 | 266 | * @param mixed $p_filelist The list of the files or folders to add. |
264 | 267 | * It can be a string with filenames separated |
265 | 268 | * by a comma, or an array of filenames. |
266 | - * @param mixed $p_params An array of variable parameters and values. |
|
269 | + * @param integer $p_params An array of variable parameters and values. |
|
267 | 270 | * @return mixed An array of file description on success, |
268 | 271 | * 0 on an unrecoverable failure, an error code is logged. |
269 | 272 | */ |
@@ -430,7 +433,7 @@ discard block |
||
430 | 433 | * each entry extraction. |
431 | 434 | * |
432 | 435 | * @access public |
433 | - * @param mixed $p_params An array of variable parameters and values. |
|
436 | + * @param integer $p_params An array of variable parameters and values. |
|
434 | 437 | * @return mixed An array of file description on success, |
435 | 438 | * 0 on an unrecoverable failure, an error code is logged. |
436 | 439 | */ |
@@ -1194,7 +1197,7 @@ discard block |
||
1194 | 1197 | * Archive_Zip::_openFd() |
1195 | 1198 | * |
1196 | 1199 | * { Description } |
1197 | - * @param $p_mode |
|
1200 | + * @param string $p_mode |
|
1198 | 1201 | * @return int |
1199 | 1202 | */ |
1200 | 1203 | |
@@ -1530,7 +1533,7 @@ discard block |
||
1530 | 1533 | * Archive_Zip::_addFile() |
1531 | 1534 | * |
1532 | 1535 | * { Description } |
1533 | - * @param $p_filename |
|
1536 | + * @param boolean|string $p_filename |
|
1534 | 1537 | * @param $p_add_dir |
1535 | 1538 | * @param $p_remove_dir |
1536 | 1539 | * @param $p_remove_all_dir |
@@ -1997,7 +2000,7 @@ discard block |
||
1997 | 2000 | * @param $p_nb_entries |
1998 | 2001 | * @param $p_size |
1999 | 2002 | * @param $p_offset |
2000 | - * @param $p_comment |
|
2003 | + * @param string $p_comment |
|
2001 | 2004 | * @return int |
2002 | 2005 | */ |
2003 | 2006 | |
@@ -4376,8 +4379,8 @@ discard block |
||
4376 | 4379 | * |
4377 | 4380 | * { Description } |
4378 | 4381 | * |
4379 | - * @param $p_src |
|
4380 | - * @param $p_dest |
|
4382 | + * @param integer $p_src |
|
4383 | + * @param integer $p_dest |
|
4381 | 4384 | * @param $p_size |
4382 | 4385 | * @param int $p_mode |
4383 | 4386 | * @return int |
@@ -4464,8 +4467,8 @@ discard block |
||
4464 | 4467 | * _tool_Rename() |
4465 | 4468 | * |
4466 | 4469 | * { Description } |
4467 | - * @param $p_src |
|
4468 | - * @param $p_dest |
|
4470 | + * @param string $p_src |
|
4471 | + * @param string $p_dest |
|
4469 | 4472 | * @return int |
4470 | 4473 | */ |
4471 | 4474 |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | }*/ // GIJ |
152 | 152 | |
153 | 153 | if (!extension_loaded('zlib')) { |
154 | - die("The extension 'zlib' couldn't be found.\n" . 'Please make sure your version of PHP was built ' . "with 'zlib' support.\n"); |
|
154 | + die("The extension 'zlib' couldn't be found.\n".'Please make sure your version of PHP was built '."with 'zlib' support.\n"); |
|
155 | 155 | |
156 | 156 | return false; |
157 | 157 | } |
@@ -533,7 +533,7 @@ discard block |
||
533 | 533 | && ('' == $p_params['by_index']) |
534 | 534 | && ('' == $p_params['by_ereg']) |
535 | 535 | && ('' == $p_params['by_preg'])) { |
536 | - $this->_errorLog(ARCHIVE_ZIP_ERR_INVALID_PARAMETER, 'At least one filtering rule must' . ' be set as parameter'); |
|
536 | + $this->_errorLog(ARCHIVE_ZIP_ERR_INVALID_PARAMETER, 'At least one filtering rule must'.' be set as parameter'); |
|
537 | 537 | |
538 | 538 | return 0; |
539 | 539 | } |
@@ -593,7 +593,7 @@ discard block |
||
593 | 593 | // ----- Open the zip file |
594 | 594 | |
595 | 595 | if (0 == ($this->_zip_fd = @fopen($this->_zipname, 'rb'))) { |
596 | - $this->_errorLog(ARCHIVE_ZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \'' . $this->_zipname . '\' in binary read mode'); |
|
596 | + $this->_errorLog(ARCHIVE_ZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \''.$this->_zipname.'\' in binary read mode'); |
|
597 | 597 | |
598 | 598 | return 0; |
599 | 599 | } |
@@ -652,7 +652,7 @@ discard block |
||
652 | 652 | // TBC : Should also check the archive format |
653 | 653 | |
654 | 654 | if (!is_file($p_archive)) { |
655 | - $this->_errorLog(ARCHIVE_ZIP_ERR_MISSING_FILE, "No file with filename '" . $p_archive . "'"); |
|
655 | + $this->_errorLog(ARCHIVE_ZIP_ERR_MISSING_FILE, "No file with filename '".$p_archive."'"); |
|
656 | 656 | |
657 | 657 | $v_result = ARCHIVE_ZIP_ERR_MISSING_FILE; |
658 | 658 | } else { |
@@ -774,7 +774,7 @@ discard block |
||
774 | 774 | } |
775 | 775 | |
776 | 776 | if ($p_with_code) { |
777 | - return ($v_value . ' (' . $this->_error_code . ')'); |
|
777 | + return ($v_value.' ('.$this->_error_code.')'); |
|
778 | 778 | } |
779 | 779 | |
780 | 780 | return $v_value; |
@@ -798,10 +798,10 @@ discard block |
||
798 | 798 | public function errorInfo($p_full = false) |
799 | 799 | { |
800 | 800 | if ($p_full) { |
801 | - return ($this->errorName(true) . ' : ' . $this->_error_string); |
|
801 | + return ($this->errorName(true).' : '.$this->_error_string); |
|
802 | 802 | } |
803 | 803 | |
804 | - return ($this->_error_string . ' [code ' . $this->_error_code . ']'); |
|
804 | + return ($this->_error_string.' [code '.$this->_error_code.']'); |
|
805 | 805 | } |
806 | 806 | |
807 | 807 | // }}} |
@@ -866,7 +866,7 @@ discard block |
||
866 | 866 | if (!is_file($this->_zipname)) { |
867 | 867 | // ----- Error log |
868 | 868 | |
869 | - $this->_errorLog(ARCHIVE_ZIP_ERR_MISSING_FILE, "Missing archive file '" . $this->_zipname . "'"); |
|
869 | + $this->_errorLog(ARCHIVE_ZIP_ERR_MISSING_FILE, "Missing archive file '".$this->_zipname."'"); |
|
870 | 870 | |
871 | 871 | return false; |
872 | 872 | } |
@@ -876,7 +876,7 @@ discard block |
||
876 | 876 | if (!is_readable($this->_zipname)) { |
877 | 877 | // ----- Error log |
878 | 878 | |
879 | - $this->_errorLog(ARCHIVE_ZIP_ERR_READ_OPEN_FAIL, "Unable to read archive '" . $this->_zipname . "'"); |
|
879 | + $this->_errorLog(ARCHIVE_ZIP_ERR_READ_OPEN_FAIL, "Unable to read archive '".$this->_zipname."'"); |
|
880 | 880 | |
881 | 881 | return false; |
882 | 882 | } |
@@ -1021,14 +1021,14 @@ discard block |
||
1021 | 1021 | |
1022 | 1022 | // ----- Creates a temporay file |
1023 | 1023 | |
1024 | - $v_zip_temp_name = ARCHIVE_ZIP_TEMPORARY_DIR . uniqid('archive_zip-') . '.tmp'; |
|
1024 | + $v_zip_temp_name = ARCHIVE_ZIP_TEMPORARY_DIR.uniqid('archive_zip-').'.tmp'; |
|
1025 | 1025 | |
1026 | 1026 | // ----- Open the temporary file in write mode |
1027 | 1027 | |
1028 | 1028 | if (0 == ($v_zip_temp_fd = @fopen($v_zip_temp_name, 'wb'))) { |
1029 | 1029 | $this->_closeFd(); |
1030 | 1030 | |
1031 | - $this->_errorLog(ARCHIVE_ZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \'' . $v_zip_temp_name . '\' in binary write mode'); |
|
1031 | + $this->_errorLog(ARCHIVE_ZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \''.$v_zip_temp_name.'\' in binary write mode'); |
|
1032 | 1032 | |
1033 | 1033 | return self::errorCode(); |
1034 | 1034 | } |
@@ -1205,7 +1205,7 @@ discard block |
||
1205 | 1205 | // ----- Look if already open |
1206 | 1206 | |
1207 | 1207 | if (0 != $this->_zip_fd) { |
1208 | - $this->_errorLog(ARCHIVE_ZIP_ERR_READ_OPEN_FAIL, 'Zip file \'' . $this->_zipname . '\' already open'); |
|
1208 | + $this->_errorLog(ARCHIVE_ZIP_ERR_READ_OPEN_FAIL, 'Zip file \''.$this->_zipname.'\' already open'); |
|
1209 | 1209 | |
1210 | 1210 | return self::errorCode(); |
1211 | 1211 | } |
@@ -1213,7 +1213,7 @@ discard block |
||
1213 | 1213 | // ----- Open the zip file |
1214 | 1214 | |
1215 | 1215 | if (0 == ($this->_zip_fd = @fopen($this->_zipname, $p_mode))) { |
1216 | - $this->_errorLog(ARCHIVE_ZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \'' . $this->_zipname . '\' in ' . $p_mode . ' mode'); |
|
1216 | + $this->_errorLog(ARCHIVE_ZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \''.$this->_zipname.'\' in '.$p_mode.' mode'); |
|
1217 | 1217 | |
1218 | 1218 | return self::errorCode(); |
1219 | 1219 | } |
@@ -1462,7 +1462,7 @@ discard block |
||
1462 | 1462 | // ----- Look for path |
1463 | 1463 | |
1464 | 1464 | if ('.' != $p_filename) { |
1465 | - $v_path = $p_filename . '/'; |
|
1465 | + $v_path = $p_filename.'/'; |
|
1466 | 1466 | } else { |
1467 | 1467 | $v_path = ''; |
1468 | 1468 | } |
@@ -1476,10 +1476,10 @@ discard block |
||
1476 | 1476 | while ($p_hitem = readdir($p_hdir)) { |
1477 | 1477 | // ----- Look for a file |
1478 | 1478 | |
1479 | - if (is_file($v_path . $p_hitem)) { |
|
1479 | + if (is_file($v_path.$p_hitem)) { |
|
1480 | 1480 | // ----- Add the file |
1481 | 1481 | |
1482 | - if (1 != ($v_result = $this->_addFile($v_path . $p_hitem, $v_header, $p_add_dir, $p_remove_dir, $p_remove_all_dir, $p_params))) { |
|
1482 | + if (1 != ($v_result = $this->_addFile($v_path.$p_hitem, $v_header, $p_add_dir, $p_remove_dir, $p_remove_all_dir, $p_params))) { |
|
1483 | 1483 | // ----- Return status |
1484 | 1484 | |
1485 | 1485 | return $v_result; |
@@ -1493,7 +1493,7 @@ discard block |
||
1493 | 1493 | else { |
1494 | 1494 | // ----- Need an array as parameter |
1495 | 1495 | |
1496 | - $p_temp_list[0] = $v_path . $p_hitem; |
|
1496 | + $p_temp_list[0] = $v_path.$p_hitem; |
|
1497 | 1497 | |
1498 | 1498 | $v_result = $this->_addFileList($p_temp_list, $p_result_list, $p_add_dir, $p_remove_dir, $p_remove_all_dir, $p_params); |
1499 | 1499 | |
@@ -1570,7 +1570,7 @@ discard block |
||
1570 | 1570 | |
1571 | 1571 | if (('./' == mb_substr($p_filename, 0, 2)) || ('./' == mb_substr($p_remove_dir, 0, 2))) { |
1572 | 1572 | if (('./' == mb_substr($p_filename, 0, 2)) && ('./' != mb_substr($p_remove_dir, 0, 2))) { |
1573 | - $p_remove_dir = './' . $p_remove_dir; |
|
1573 | + $p_remove_dir = './'.$p_remove_dir; |
|
1574 | 1574 | } |
1575 | 1575 | |
1576 | 1576 | if (('./' != mb_substr($p_filename, 0, 2)) && ('./' == mb_substr($p_remove_dir, 0, 2))) { |
@@ -1595,9 +1595,9 @@ discard block |
||
1595 | 1595 | |
1596 | 1596 | if ('' != $p_add_dir) { |
1597 | 1597 | if ('/' == mb_substr($p_add_dir, -1)) { |
1598 | - $v_stored_filename = $p_add_dir . $v_stored_filename; |
|
1598 | + $v_stored_filename = $p_add_dir.$v_stored_filename; |
|
1599 | 1599 | } else { |
1600 | - $v_stored_filename = $p_add_dir . '/' . $v_stored_filename; |
|
1600 | + $v_stored_filename = $p_add_dir.'/'.$v_stored_filename; |
|
1601 | 1601 | } |
1602 | 1602 | } |
1603 | 1603 | |
@@ -1679,7 +1679,7 @@ discard block |
||
1679 | 1679 | |
1680 | 1680 | // header. |
1681 | 1681 | |
1682 | - eval('$v_result = ' . $p_params[ARCHIVE_ZIP_PARAM_PRE_ADD] . '(ARCHIVE_ZIP_PARAM_PRE_ADD, $v_local_header);'); |
|
1682 | + eval('$v_result = '.$p_params[ARCHIVE_ZIP_PARAM_PRE_ADD].'(ARCHIVE_ZIP_PARAM_PRE_ADD, $v_local_header);'); |
|
1683 | 1683 | |
1684 | 1684 | if (0 == $v_result) { |
1685 | 1685 | // ----- Change the file status |
@@ -1762,7 +1762,7 @@ discard block |
||
1762 | 1762 | |
1763 | 1763 | // ----- Write the compressed content |
1764 | 1764 | |
1765 | - $v_binary_data = pack('a' . $p_header['compressed_size'], $v_content_compressed); |
|
1765 | + $v_binary_data = pack('a'.$p_header['compressed_size'], $v_content_compressed); |
|
1766 | 1766 | |
1767 | 1767 | @fwrite($this->_zip_fd, $v_binary_data, $p_header['compressed_size']); |
1768 | 1768 | |
@@ -1780,7 +1780,7 @@ discard block |
||
1780 | 1780 | |
1781 | 1781 | $p_header['size'] = 0; |
1782 | 1782 | |
1783 | - $p_header['external'] = 0x41FF0010; // Value for a folder : to be checked |
|
1783 | + $p_header['external'] = 0x41FF0010; // Value for a folder : to be checked |
|
1784 | 1784 | |
1785 | 1785 | // ----- Call the header generation |
1786 | 1786 | |
@@ -1806,7 +1806,7 @@ discard block |
||
1806 | 1806 | |
1807 | 1807 | // header. |
1808 | 1808 | |
1809 | - eval('$v_result = ' . $p_params[ARCHIVE_ZIP_PARAM_POST_ADD] . '(ARCHIVE_ZIP_PARAM_POST_ADD, $v_local_header);'); |
|
1809 | + eval('$v_result = '.$p_params[ARCHIVE_ZIP_PARAM_POST_ADD].'(ARCHIVE_ZIP_PARAM_POST_ADD, $v_local_header);'); |
|
1810 | 1810 | |
1811 | 1811 | if (0 == $v_result) { |
1812 | 1812 | // ----- Ignored |
@@ -2055,7 +2055,7 @@ discard block |
||
2055 | 2055 | if (0 == ($this->_zip_fd = @fopen($this->_zipname, 'rb'))) { |
2056 | 2056 | // ----- Error log |
2057 | 2057 | |
2058 | - $this->_errorLog(ARCHIVE_ZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \'' . $this->_zipname . '\' in binary read mode'); |
|
2058 | + $this->_errorLog(ARCHIVE_ZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \''.$this->_zipname.'\' in binary read mode'); |
|
2059 | 2059 | |
2060 | 2060 | // ----- Return |
2061 | 2061 | |
@@ -2246,7 +2246,7 @@ discard block |
||
2246 | 2246 | || (('/' != mb_substr($p_path, 0, 1)) |
2247 | 2247 | && ('../' != mb_substr($p_path, 0, 3)) |
2248 | 2248 | && (':/' != mb_substr($p_path, 1, 2)))) { |
2249 | - $p_path = './' . $p_path; |
|
2249 | + $p_path = './'.$p_path; |
|
2250 | 2250 | } |
2251 | 2251 | |
2252 | 2252 | // ----- Reduce the path last (and duplicated) '/' |
@@ -2549,7 +2549,7 @@ discard block |
||
2549 | 2549 | // ----- Add the path |
2550 | 2550 | |
2551 | 2551 | if ('' != $p_path) { |
2552 | - $p_entry['filename'] = $p_path . '/' . $p_entry['filename']; |
|
2552 | + $p_entry['filename'] = $p_path.'/'.$p_entry['filename']; |
|
2553 | 2553 | } |
2554 | 2554 | |
2555 | 2555 | // ----- Look for pre-extract callback |
@@ -2568,7 +2568,7 @@ discard block |
||
2568 | 2568 | |
2569 | 2569 | // header. |
2570 | 2570 | |
2571 | - eval('$v_result = ' . $p_params[ARCHIVE_ZIP_PARAM_PRE_EXTRACT] . '(ARCHIVE_ZIP_PARAM_PRE_EXTRACT, $v_local_header);'); |
|
2571 | + eval('$v_result = '.$p_params[ARCHIVE_ZIP_PARAM_PRE_EXTRACT].'(ARCHIVE_ZIP_PARAM_PRE_EXTRACT, $v_local_header);'); |
|
2572 | 2572 | |
2573 | 2573 | if (0 == $v_result) { |
2574 | 2574 | // ----- Change the file status |
@@ -2674,7 +2674,7 @@ discard block |
||
2674 | 2674 | |
2675 | 2675 | $v_buffer = fread($this->_zip_fd, $v_read_size); |
2676 | 2676 | |
2677 | - $v_binary_data = pack('a' . $v_read_size, $v_buffer); |
|
2677 | + $v_binary_data = pack('a'.$v_read_size, $v_buffer); |
|
2678 | 2678 | |
2679 | 2679 | @fwrite($v_dest_file, $v_binary_data, $v_read_size); |
2680 | 2680 | |
@@ -2753,7 +2753,7 @@ discard block |
||
2753 | 2753 | |
2754 | 2754 | // header. |
2755 | 2755 | |
2756 | - eval('$v_result = ' . $p_params[ARCHIVE_ZIP_PARAM_POST_EXTRACT] . '(ARCHIVE_ZIP_PARAM_POST_EXTRACT, $v_local_header);'); |
|
2756 | + eval('$v_result = '.$p_params[ARCHIVE_ZIP_PARAM_POST_EXTRACT].'(ARCHIVE_ZIP_PARAM_POST_EXTRACT, $v_local_header);'); |
|
2757 | 2757 | } |
2758 | 2758 | |
2759 | 2759 | // ----- Return |
@@ -2894,7 +2894,7 @@ discard block |
||
2894 | 2894 | |
2895 | 2895 | // ----- Error log |
2896 | 2896 | |
2897 | - $this->_errorLog(ARCHIVE_ZIP_ERR_BAD_FORMAT, 'Invalid block size : ' . mb_strlen($v_binary_data)); |
|
2897 | + $this->_errorLog(ARCHIVE_ZIP_ERR_BAD_FORMAT, 'Invalid block size : '.mb_strlen($v_binary_data)); |
|
2898 | 2898 | |
2899 | 2899 | // ----- Return |
2900 | 2900 | |
@@ -3037,7 +3037,7 @@ discard block |
||
3037 | 3037 | |
3038 | 3038 | // ----- Error log |
3039 | 3039 | |
3040 | - $this->_errorLog(ARCHIVE_ZIP_ERR_BAD_FORMAT, 'Invalid block size : ' . mb_strlen($v_binary_data)); |
|
3040 | + $this->_errorLog(ARCHIVE_ZIP_ERR_BAD_FORMAT, 'Invalid block size : '.mb_strlen($v_binary_data)); |
|
3041 | 3041 | |
3042 | 3042 | // ----- Return |
3043 | 3043 | |
@@ -3152,7 +3152,7 @@ discard block |
||
3152 | 3152 | @fseek($this->_zip_fd, $v_size); |
3153 | 3153 | |
3154 | 3154 | if (@ftell($this->_zip_fd) != $v_size) { |
3155 | - $this->_errorLog(ARCHIVE_ZIP_ERR_BAD_FORMAT, 'Unable to go to the end of the archive \'' . $this->_zipname . '\''); |
|
3155 | + $this->_errorLog(ARCHIVE_ZIP_ERR_BAD_FORMAT, 'Unable to go to the end of the archive \''.$this->_zipname.'\''); |
|
3156 | 3156 | |
3157 | 3157 | return self::errorCode(); |
3158 | 3158 | } |
@@ -3169,7 +3169,7 @@ discard block |
||
3169 | 3169 | @fseek($this->_zip_fd, $v_size - 22); |
3170 | 3170 | |
3171 | 3171 | if (($v_pos = @ftell($this->_zip_fd)) != ($v_size - 22)) { |
3172 | - $this->_errorLog(ARCHIVE_ZIP_ERR_BAD_FORMAT, 'Unable to seek back to the middle of the archive \'' . $this->_zipname . '\''); |
|
3172 | + $this->_errorLog(ARCHIVE_ZIP_ERR_BAD_FORMAT, 'Unable to seek back to the middle of the archive \''.$this->_zipname.'\''); |
|
3173 | 3173 | |
3174 | 3174 | return self::errorCode(); |
3175 | 3175 | } |
@@ -3201,7 +3201,7 @@ discard block |
||
3201 | 3201 | @fseek($this->_zip_fd, $v_size - $v_maximum_size); |
3202 | 3202 | |
3203 | 3203 | if (@ftell($this->_zip_fd) != ($v_size - $v_maximum_size)) { |
3204 | - $this->_errorLog(ARCHIVE_ZIP_ERR_BAD_FORMAT, 'Unable to seek back to the middle of the archive \'' . $this->_zipname . '\''); |
|
3204 | + $this->_errorLog(ARCHIVE_ZIP_ERR_BAD_FORMAT, 'Unable to seek back to the middle of the archive \''.$this->_zipname.'\''); |
|
3205 | 3205 | |
3206 | 3206 | return self::errorCode(); |
3207 | 3207 | } |
@@ -3248,7 +3248,7 @@ discard block |
||
3248 | 3248 | // ----- Look for invalid block size |
3249 | 3249 | |
3250 | 3250 | if (18 != mb_strlen($v_binary_data)) { |
3251 | - $this->_errorLog(ARCHIVE_ZIP_ERR_BAD_FORMAT, 'Invalid End of Central Dir Record size : ' . mb_strlen($v_binary_data)); |
|
3251 | + $this->_errorLog(ARCHIVE_ZIP_ERR_BAD_FORMAT, 'Invalid End of Central Dir Record size : '.mb_strlen($v_binary_data)); |
|
3252 | 3252 | |
3253 | 3253 | return self::errorCode(); |
3254 | 3254 | } |
@@ -3405,7 +3405,7 @@ discard block |
||
3405 | 3405 | && (mb_substr($v_header_list[$v_nb_extracted]['stored_filename'], 0, mb_strlen($p_params[ARCHIVE_ZIP_PARAM_BY_NAME][$j])) == $p_params[ARCHIVE_ZIP_PARAM_BY_NAME][$j])) { |
3406 | 3406 | $v_found = true; |
3407 | 3407 | } elseif ((0x00000010 == ($v_header_list[$v_nb_extracted]['external'] & 0x00000010)) /* Indicates a folder */ |
3408 | - && ($v_header_list[$v_nb_extracted]['stored_filename'] . '/' == $p_params[ARCHIVE_ZIP_PARAM_BY_NAME][$j])) { |
|
3408 | + && ($v_header_list[$v_nb_extracted]['stored_filename'].'/' == $p_params[ARCHIVE_ZIP_PARAM_BY_NAME][$j])) { |
|
3409 | 3409 | $v_found = true; |
3410 | 3410 | } |
3411 | 3411 | } // ----- Look for a filename |
@@ -3465,7 +3465,7 @@ discard block |
||
3465 | 3465 | if ($v_nb_extracted > 0) { |
3466 | 3466 | // ----- Creates a temporay file |
3467 | 3467 | |
3468 | - $v_zip_temp_name = ARCHIVE_ZIP_TEMPORARY_DIR . uniqid('archive_zip-') . '.tmp'; |
|
3468 | + $v_zip_temp_name = ARCHIVE_ZIP_TEMPORARY_DIR.uniqid('archive_zip-').'.tmp'; |
|
3469 | 3469 | |
3470 | 3470 | // ----- Creates a temporary zip archive |
3471 | 3471 | |
@@ -3807,7 +3807,7 @@ discard block |
||
3807 | 3807 | |
3808 | 3808 | // ----- Creates a temporay file |
3809 | 3809 | |
3810 | - $v_zip_temp_name = ARCHIVE_ZIP_TEMPORARY_DIR . uniqid('archive_zip-') . '.tmp'; |
|
3810 | + $v_zip_temp_name = ARCHIVE_ZIP_TEMPORARY_DIR.uniqid('archive_zip-').'.tmp'; |
|
3811 | 3811 | |
3812 | 3812 | // ----- Open the temporary file in write mode |
3813 | 3813 | |
@@ -3816,7 +3816,7 @@ discard block |
||
3816 | 3816 | |
3817 | 3817 | $p_archive_to_add->_closeFd(); |
3818 | 3818 | |
3819 | - $this->_errorLog(ARCHIVE_ZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \'' . $v_zip_temp_name . '\' in binary write mode'); |
|
3819 | + $this->_errorLog(ARCHIVE_ZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \''.$v_zip_temp_name.'\' in binary write mode'); |
|
3820 | 3820 | |
3821 | 3821 | return self::errorCode(); |
3822 | 3822 | } |
@@ -4015,7 +4015,7 @@ discard block |
||
4015 | 4015 | if (0 == ($v_zip_temp_fd = @fopen($p_archive_filename, 'rb'))) { |
4016 | 4016 | $this->_closeFd(); |
4017 | 4017 | |
4018 | - $this->_errorLog(ARCHIVE_ZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive file \'' . $p_archive_filename . '\' in binary write mode'); |
|
4018 | + $this->_errorLog(ARCHIVE_ZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive file \''.$p_archive_filename.'\' in binary write mode'); |
|
4019 | 4019 | |
4020 | 4020 | return self::errorCode(); |
4021 | 4021 | } |
@@ -4077,7 +4077,7 @@ discard block |
||
4077 | 4077 | |
4078 | 4078 | for (reset($p_params); list($v_key, $v_value) = each($p_params);) { |
4079 | 4079 | if (!isset($p_default[$v_key])) { |
4080 | - $this->_errorLog(ARCHIVE_ZIP_ERR_INVALID_PARAMETER, 'Unsupported parameter with key \'' . $v_key . '\''); |
|
4080 | + $this->_errorLog(ARCHIVE_ZIP_ERR_INVALID_PARAMETER, 'Unsupported parameter with key \''.$v_key.'\''); |
|
4081 | 4081 | |
4082 | 4082 | return self::errorCode(); |
4083 | 4083 | } |
@@ -4105,7 +4105,7 @@ discard block |
||
4105 | 4105 | |
4106 | 4106 | if (isset($p_params[$v_key]) && ('' != $p_params[$v_key])) { |
4107 | 4107 | if (!function_exists($p_params[$v_key])) { |
4108 | - $this->_errorLog(ARCHIVE_ZIP_ERR_INVALID_PARAM_VALUE, "Callback '" . $p_params[$v_key] . "()' is not an existing function for " . "parameter '" . $v_key . "'"); |
|
4108 | + $this->_errorLog(ARCHIVE_ZIP_ERR_INVALID_PARAM_VALUE, "Callback '".$p_params[$v_key]."()' is not an existing function for "."parameter '".$v_key."'"); |
|
4109 | 4109 | |
4110 | 4110 | return self::errorCode(); |
4111 | 4111 | } |
@@ -4217,7 +4217,7 @@ discard block |
||
4217 | 4217 | // ----- Ignore only the double '//' in path, |
4218 | 4218 | // but not the first and last '/' |
4219 | 4219 | } else { |
4220 | - $v_result = $v_list[$i] . ($i != (count($v_list) - 1) ? '/' . $v_result : ''); |
|
4220 | + $v_result = $v_list[$i].($i != (count($v_list) - 1) ? '/'.$v_result : ''); |
|
4221 | 4221 | } |
4222 | 4222 | } |
4223 | 4223 | } |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | * @param bool $post |
192 | 192 | * @param string $area |
193 | 193 | * @param bool $allow_repost |
194 | - * @return bool |
|
194 | + * @return null|boolean |
|
195 | 195 | */ |
196 | 196 | |
197 | 197 | public function check($post = true, $area = '', $allow_repost = true) |
@@ -362,9 +362,9 @@ discard block |
||
362 | 362 | } |
363 | 363 | |
364 | 364 | /** |
365 | - * @param $key_name |
|
365 | + * @param string $key_name |
|
366 | 366 | * @param $tmp_array |
367 | - * @return array |
|
367 | + * @return string[] |
|
368 | 368 | */ |
369 | 369 | |
370 | 370 | public function extract_post_recursive($key_name, $tmp_array) |
@@ -28,8 +28,8 @@ discard block |
||
28 | 28 | // language file |
29 | 29 | |
30 | 30 | if (defined('XOOPS_ROOT_PATH') && !empty($xoopsConfig['language']) && !mb_strstr($xoopsConfig['language'], '/')) { |
31 | - if (is_file(dirname(__DIR__) . '/language/' . $xoopsConfig['language'] . '/gticket_messages.phtml')) { |
|
32 | - include dirname(__DIR__) . '/language/' . $xoopsConfig['language'] . '/gticket_messages.phtml'; |
|
31 | + if (is_file(dirname(__DIR__).'/language/'.$xoopsConfig['language'].'/gticket_messages.phtml')) { |
|
32 | + include dirname(__DIR__).'/language/'.$xoopsConfig['language'].'/gticket_messages.phtml'; |
|
33 | 33 | } |
34 | 34 | } |
35 | 35 | |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | |
61 | 61 | public function getTicketHtml($salt = '', $timeout = 1800, $area = '') |
62 | 62 | { |
63 | - return '<input type="hidden" name="XOOPS_G_TICKET" value="' . $this->issue($salt, $timeout, $area) . '" />'; |
|
63 | + return '<input type="hidden" name="XOOPS_G_TICKET" value="'.$this->issue($salt, $timeout, $area).'" />'; |
|
64 | 64 | } |
65 | 65 | |
66 | 66 | // returns an object of XoopsFormHidden including theh ticket |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | |
118 | 118 | public function getTicketParamString($salt = '', $noamp = false, $timeout = 1800, $area = '') |
119 | 119 | { |
120 | - return ($noamp ? '' : '&') . 'XOOPS_G_TICKET=' . $this->issue($salt, $timeout, $area); |
|
120 | + return ($noamp ? '' : '&').'XOOPS_G_TICKET='.$this->issue($salt, $timeout, $area); |
|
121 | 121 | } |
122 | 122 | |
123 | 123 | // issue a ticket |
@@ -135,9 +135,9 @@ discard block |
||
135 | 135 | |
136 | 136 | if ('' === $salt) { |
137 | 137 | if (version_compare(PHP_VERSION, '7.0.0') >= 0 && function_exists('random_bytes')) { |
138 | - $salt = '$2y$07$' . str_replace('+', '.', base64_encode(random_bytes(self::PBKDF2_SALT_BYTES))); |
|
138 | + $salt = '$2y$07$'.str_replace('+', '.', base64_encode(random_bytes(self::PBKDF2_SALT_BYTES))); |
|
139 | 139 | } elseif (function_exists('mcrypt_create_iv')) { |
140 | - $salt = '$2y$07$' . str_replace('+', '.', base64_encode(mcrypt_create_iv(16, MCRYPT_DEV_URANDOM))); |
|
140 | + $salt = '$2y$07$'.str_replace('+', '.', base64_encode(mcrypt_create_iv(16, MCRYPT_DEV_URANDOM))); |
|
141 | 141 | } |
142 | 142 | } |
143 | 143 | |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | |
148 | 148 | $appendix_salt = empty($_SERVER['PATH']) ? XOOPS_DB_NAME : $_SERVER['PATH']; |
149 | 149 | |
150 | - $token = crypt($salt . $usec . $appendix_salt . $sec, $salt); |
|
150 | + $token = crypt($salt.$usec.$appendix_salt.$sec, $salt); |
|
151 | 151 | |
152 | 152 | $this->_latest_token = $token; |
153 | 153 | |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | |
183 | 183 | // paid md5ed token as a ticket |
184 | 184 | |
185 | - return md5($token . XOOPS_DB_PREFIX); |
|
185 | + return md5($token.XOOPS_DB_PREFIX); |
|
186 | 186 | } |
187 | 187 | |
188 | 188 | // check a ticket |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | // default lifetime 30min |
229 | 229 | |
230 | 230 | if ($stub['expire'] >= time()) { |
231 | - if (md5($stub['token'] . XOOPS_DB_PREFIX) === $ticket) { |
|
231 | + if (md5($stub['token'].XOOPS_DB_PREFIX) === $ticket) { |
|
232 | 232 | $found_stub = $stub; |
233 | 233 | } else { |
234 | 234 | // store the other valid stubs into session |
@@ -236,7 +236,7 @@ discard block |
||
236 | 236 | $_SESSION['XOOPS_G_STUBS'][] = $stub; |
237 | 237 | } |
238 | 238 | } else { |
239 | - if (md5($stub['token'] . XOOPS_DB_PREFIX) === $ticket) { |
|
239 | + if (md5($stub['token'].XOOPS_DB_PREFIX) === $ticket) { |
|
240 | 240 | // not CSRF but Time-Out |
241 | 241 | |
242 | 242 | $timeout_flag = true; |
@@ -321,7 +321,7 @@ discard block |
||
321 | 321 | |
322 | 322 | $table = '<table>'; |
323 | 323 | |
324 | - $form = '<form action="?' . htmlspecialchars(@$_SERVER['QUERY_STRING'], ENT_QUOTES) . '" method="post" >'; |
|
324 | + $form = '<form action="?'.htmlspecialchars(@$_SERVER['QUERY_STRING'], ENT_QUOTES).'" method="post" >'; |
|
325 | 325 | |
326 | 326 | foreach ($_POST as $key => $val) { |
327 | 327 | if ('XOOPS_G_TICKET' == $key) { |
@@ -343,22 +343,22 @@ discard block |
||
343 | 343 | $val = stripslashes($val); |
344 | 344 | } |
345 | 345 | |
346 | - $table .= '<tr><th>' . htmlspecialchars($key, ENT_QUOTES) . '</th><td>' . htmlspecialchars($val, ENT_QUOTES) . '</td></tr>' . "\n"; |
|
346 | + $table .= '<tr><th>'.htmlspecialchars($key, ENT_QUOTES).'</th><td>'.htmlspecialchars($val, ENT_QUOTES).'</td></tr>'."\n"; |
|
347 | 347 | |
348 | - $form .= '<input type="hidden" name="' . htmlspecialchars($key, ENT_QUOTES) . '" value="' . htmlspecialchars($val, ENT_QUOTES) . '" />' . "\n"; |
|
348 | + $form .= '<input type="hidden" name="'.htmlspecialchars($key, ENT_QUOTES).'" value="'.htmlspecialchars($val, ENT_QUOTES).'" />'."\n"; |
|
349 | 349 | } |
350 | 350 | } |
351 | 351 | |
352 | 352 | $table .= '</table>'; |
353 | 353 | |
354 | - $form .= $this->getTicketHtml(__LINE__, 300, $area) . '<input type="submit" value="' . $this->messages['btn_repost'] . '" /></form>'; |
|
354 | + $form .= $this->getTicketHtml(__LINE__, 300, $area).'<input type="submit" value="'.$this->messages['btn_repost'].'" /></form>'; |
|
355 | 355 | |
356 | 356 | error_reporting(0); |
357 | 357 | |
358 | 358 | while (@ob_get_level() && @ob_end_clean()) { |
359 | 359 | } |
360 | 360 | |
361 | - echo '<html><head><title>' . $this->messages['err_general'] . '</title><style>table,td,th {border:solid black 1px; border-collapse:collapse;}</style></head><body>' . sprintf($this->messages['fmt_prompt4repost'], $this->getErrors()) . $table . $form . '</body></html>'; |
|
361 | + echo '<html><head><title>'.$this->messages['err_general'].'</title><style>table,td,th {border:solid black 1px; border-collapse:collapse;}</style></head><body>'.sprintf($this->messages['fmt_prompt4repost'], $this->getErrors()).$table.$form.'</body></html>'; |
|
362 | 362 | } |
363 | 363 | |
364 | 364 | /** |
@@ -379,7 +379,7 @@ discard block |
||
379 | 379 | } |
380 | 380 | |
381 | 381 | if (is_array($val)) { |
382 | - list($tmp_table, $tmp_form) = $this->extract_post_recursive($key_name . '[' . htmlspecialchars($key, ENT_QUOTES) . ']', $val); |
|
382 | + list($tmp_table, $tmp_form) = $this->extract_post_recursive($key_name.'['.htmlspecialchars($key, ENT_QUOTES).']', $val); |
|
383 | 383 | |
384 | 384 | $table .= $tmp_table; |
385 | 385 | |
@@ -389,9 +389,9 @@ discard block |
||
389 | 389 | $val = stripslashes($val); |
390 | 390 | } |
391 | 391 | |
392 | - $table .= '<tr><th>' . $key_name . '[' . htmlspecialchars($key, ENT_QUOTES) . ']</th><td>' . htmlspecialchars($val, ENT_QUOTES) . '</td></tr>' . "\n"; |
|
392 | + $table .= '<tr><th>'.$key_name.'['.htmlspecialchars($key, ENT_QUOTES).']</th><td>'.htmlspecialchars($val, ENT_QUOTES).'</td></tr>'."\n"; |
|
393 | 393 | |
394 | - $form .= '<input type="hidden" name="' . $key_name . '[' . htmlspecialchars($key, ENT_QUOTES) . ']" value="' . htmlspecialchars($val, ENT_QUOTES) . '" />' . "\n"; |
|
394 | + $form .= '<input type="hidden" name="'.$key_name.'['.htmlspecialchars($key, ENT_QUOTES).']" value="'.htmlspecialchars($val, ENT_QUOTES).'" />'."\n"; |
|
395 | 395 | } |
396 | 396 | } |
397 | 397 | |
@@ -451,8 +451,8 @@ discard block |
||
451 | 451 | |
452 | 452 | public function errorHandler4FindOutput($errNo, $errStr, $errFile, $errLine) |
453 | 453 | { |
454 | - if (preg_match('?' . preg_quote(XOOPS_ROOT_PATH) . '([^:]+)\:(\d+)?', $errStr, $regs)) { |
|
455 | - echo 'Irregular output! check the file ' . htmlspecialchars($regs[1], ENT_QUOTES | ENT_HTML5) . ' line ' . htmlspecialchars($regs[2], ENT_QUOTES | ENT_HTML5); |
|
454 | + if (preg_match('?'.preg_quote(XOOPS_ROOT_PATH).'([^:]+)\:(\d+)?', $errStr, $regs)) { |
|
455 | + echo 'Irregular output! check the file '.htmlspecialchars($regs[1], ENT_QUOTES | ENT_HTML5).' line '.htmlspecialchars($regs[2], ENT_QUOTES | ENT_HTML5); |
|
456 | 456 | } else { |
457 | 457 | echo 'Irregular output! check language files etc.'; |
458 | 458 | } |
@@ -82,6 +82,12 @@ discard block |
||
82 | 82 | |
83 | 83 | // public function MyXoopsGroupPermForm($title, $modid, $permname, $permdesc) |
84 | 84 | |
85 | + /** |
|
86 | + * @param string $title |
|
87 | + * @param integer $modid |
|
88 | + * @param string $permname |
|
89 | + * @param string $permdesc |
|
90 | + */ |
|
85 | 91 | public function __construct($title, $modid, $permname, $permdesc) |
86 | 92 | { |
87 | 93 | // $this->XoopsForm($title, 'groupperm_form', XOOPS_URL.'/modules/system/admin/groupperm.php', 'post'); GIJ |
@@ -121,9 +127,9 @@ discard block |
||
121 | 127 | * Add appendix |
122 | 128 | * |
123 | 129 | * @access public |
124 | - * @param $permName |
|
125 | - * @param $itemId |
|
126 | - * @param $itemName |
|
130 | + * @param string $permName |
|
131 | + * @param integer $itemId |
|
132 | + * @param string $itemName |
|
127 | 133 | */ |
128 | 134 | |
129 | 135 | public function addAppendix($permName, $itemId, $itemName) |
@@ -311,7 +317,7 @@ discard block |
||
311 | 317 | /** |
312 | 318 | * Constructor |
313 | 319 | * @param $caption |
314 | - * @param $name |
|
320 | + * @param string $name |
|
315 | 321 | * @param $groupId |
316 | 322 | * @param null $values |
317 | 323 | */ |
@@ -486,20 +486,20 @@ |
||
486 | 486 | } |
487 | 487 | |
488 | 488 | $tree .= ' />' |
489 | - . $option['name'] |
|
490 | - . '<input type="hidden" name="' |
|
491 | - . $this->getName() |
|
492 | - . '[parents][' |
|
493 | - . $option['id'] |
|
494 | - . ']" value="' |
|
495 | - . implode(':', $parentIds) |
|
496 | - . '" /><input type="hidden" name="' |
|
497 | - . $this->getName() |
|
498 | - . '[itemname][' |
|
499 | - . $option['id'] |
|
500 | - . ']" value="' |
|
501 | - . htmlspecialchars($option['name'], ENT_QUOTES | ENT_HTML5) |
|
502 | - . "\" /><br />\n"; |
|
489 | + . $option['name'] |
|
490 | + . '<input type="hidden" name="' |
|
491 | + . $this->getName() |
|
492 | + . '[parents][' |
|
493 | + . $option['id'] |
|
494 | + . ']" value="' |
|
495 | + . implode(':', $parentIds) |
|
496 | + . '" /><input type="hidden" name="' |
|
497 | + . $this->getName() |
|
498 | + . '[itemname][' |
|
499 | + . $option['id'] |
|
500 | + . ']" value="' |
|
501 | + . htmlspecialchars($option['name'], ENT_QUOTES | ENT_HTML5) |
|
502 | + . "\" /><br />\n"; |
|
503 | 503 | |
504 | 504 | if (isset($option['children'])) { |
505 | 505 | foreach ($option['children'] as $child) { |
@@ -18,11 +18,11 @@ discard block |
||
18 | 18 | exit; |
19 | 19 | } |
20 | 20 | |
21 | -require_once XOOPS_ROOT_PATH . '/class/xoopsform/formelement.php'; |
|
22 | -require_once XOOPS_ROOT_PATH . '/class/xoopsform/formhidden.php'; |
|
23 | -require_once XOOPS_ROOT_PATH . '/class/xoopsform/formbutton.php'; |
|
24 | -require_once XOOPS_ROOT_PATH . '/class/xoopsform/formelementtray.php'; |
|
25 | -require_once XOOPS_ROOT_PATH . '/class/xoopsform/form.php'; |
|
21 | +require_once XOOPS_ROOT_PATH.'/class/xoopsform/formelement.php'; |
|
22 | +require_once XOOPS_ROOT_PATH.'/class/xoopsform/formhidden.php'; |
|
23 | +require_once XOOPS_ROOT_PATH.'/class/xoopsform/formbutton.php'; |
|
24 | +require_once XOOPS_ROOT_PATH.'/class/xoopsform/formelementtray.php'; |
|
25 | +require_once XOOPS_ROOT_PATH.'/class/xoopsform/form.php'; |
|
26 | 26 | |
27 | 27 | /** |
28 | 28 | * Renders a form for setting module specific group permissions |
@@ -188,13 +188,13 @@ discard block |
||
188 | 188 | |
189 | 189 | $selected = $grouppermHandler->getItemIds($this->_permName, $i, $this->_modid); |
190 | 190 | |
191 | - $ele = new MyXoopsGroupFormCheckBox($glist[$i], 'perms[' . $this->_permName . ']', $i, $selected); |
|
191 | + $ele = new MyXoopsGroupFormCheckBox($glist[$i], 'perms['.$this->_permName.']', $i, $selected); |
|
192 | 192 | |
193 | 193 | $ele->setOptionTree($this->_itemTree); |
194 | 194 | |
195 | 195 | // GIJ start |
196 | 196 | |
197 | - $ele->setDescription('<input type="checkbox" onclick="with(document.groupperm_form){for(i=0;i<length;i++){if(elements[i].name.match(/^perms\[(module_admin|module_read|block_read)\]\[groups\]\[' . $i . '\]/)){elements[i].checked=this.checked;}}};">'); |
|
197 | + $ele->setDescription('<input type="checkbox" onclick="with(document.groupperm_form){for(i=0;i<length;i++){if(elements[i].name.match(/^perms\[(module_admin|module_read|block_read)\]\[groups\]\['.$i.'\]/)){elements[i].checked=this.checked;}}};">'); |
|
198 | 198 | |
199 | 199 | // GIJ_end |
200 | 200 | |
@@ -237,9 +237,9 @@ discard block |
||
237 | 237 | |
238 | 238 | $this->addElement($tray); |
239 | 239 | |
240 | - $ret = '<h4>' . $this->getTitle() . '</h4>' . $this->_permDesc . '<br />'; |
|
240 | + $ret = '<h4>'.$this->getTitle().'</h4>'.$this->_permDesc.'<br />'; |
|
241 | 241 | |
242 | - $ret .= "<form name='" . $this->getName() . "' id='" . $this->getName() . "' action='" . $this->getAction() . "' method='" . $this->getMethod() . "'" . $this->getExtra() . ">\n<table width='100%' class='outer' cellspacing='1'>\n"; |
|
242 | + $ret .= "<form name='".$this->getName()."' id='".$this->getName()."' action='".$this->getAction()."' method='".$this->getMethod()."'".$this->getExtra().">\n<table width='100%' class='outer' cellspacing='1'>\n"; |
|
243 | 243 | |
244 | 244 | $elements = &$this->getElements(); |
245 | 245 | |
@@ -249,21 +249,21 @@ discard block |
||
249 | 249 | } elseif (!$elements[$i]->isHidden()) { |
250 | 250 | // group name |
251 | 251 | |
252 | - $ret .= "<tr valign='top' align='" . _GLOBAL_LEFT . "'><td class='head'>" . $elements[$i]->getCaption(); |
|
252 | + $ret .= "<tr valign='top' align='"._GLOBAL_LEFT."'><td class='head'>".$elements[$i]->getCaption(); |
|
253 | 253 | |
254 | 254 | // group description |
255 | 255 | |
256 | 256 | if ('' != $elements[$i]->getDescription()) { |
257 | - $ret .= '<br /><br /><span style="font-weight: normal;">' . $elements[$i]->getDescription() . '</span>'; |
|
257 | + $ret .= '<br /><br /><span style="font-weight: normal;">'.$elements[$i]->getDescription().'</span>'; |
|
258 | 258 | } |
259 | 259 | |
260 | - $ret .= "</td>\n<td class='even'>\n" . $elements[$i]->render() . "\n</td></tr>\n"; |
|
260 | + $ret .= "</td>\n<td class='even'>\n".$elements[$i]->render()."\n</td></tr>\n"; |
|
261 | 261 | } else { |
262 | 262 | $ret .= $elements[$i]->render(); |
263 | 263 | } |
264 | 264 | } |
265 | 265 | |
266 | - $ret .= '</table>' . $xoopsGTicket->getTicketHtml(__LINE__, 1800, 'myblocksadmin') . '</form>'; |
|
266 | + $ret .= '</table>'.$xoopsGTicket->getTicketHtml(__LINE__, 1800, 'myblocksadmin').'</form>'; |
|
267 | 267 | |
268 | 268 | return $ret; |
269 | 269 | } |
@@ -396,7 +396,7 @@ discard block |
||
396 | 396 | |
397 | 397 | $checked = $append['selected'] ? 'checked="checked"' : ''; |
398 | 398 | |
399 | - $name = 'perms[' . $append['permname'] . ']'; |
|
399 | + $name = 'perms['.$append['permname'].']'; |
|
400 | 400 | |
401 | 401 | $itemid = $append['itemid']; |
402 | 402 | |
@@ -428,7 +428,7 @@ discard block |
||
428 | 428 | |
429 | 429 | $this->_renderOptionTree($tree, $this->_optionTree[$topitem], $prefix); |
430 | 430 | |
431 | - $ret .= $tree . '</td>'; |
|
431 | + $ret .= $tree.'</td>'; |
|
432 | 432 | |
433 | 433 | $cols++; |
434 | 434 | } |
@@ -451,7 +451,7 @@ discard block |
||
451 | 451 | |
452 | 452 | public function _renderOptionTree(&$tree, $option, $prefix, $parentIds = []) |
453 | 453 | { |
454 | - $tree .= $prefix . '<input type="checkbox" name="' . $this->getName() . '[groups][' . $this->_groupId . '][' . $option['id'] . ']" id="' . $this->getName() . '[groups][' . $this->_groupId . '][' . $option['id'] . ']" onclick="'; |
|
454 | + $tree .= $prefix.'<input type="checkbox" name="'.$this->getName().'[groups]['.$this->_groupId.']['.$option['id'].']" id="'.$this->getName().'[groups]['.$this->_groupId.']['.$option['id'].']" onclick="'; |
|
455 | 455 | |
456 | 456 | // If there are parent elements, add javascript that will |
457 | 457 | |
@@ -460,9 +460,9 @@ discard block |
||
460 | 460 | // sure permissions to parent items are added as well. |
461 | 461 | |
462 | 462 | foreach ($parentIds as $pid) { |
463 | - $parent_ele = $this->getName() . '[groups][' . $this->_groupId . '][' . $pid . ']'; |
|
463 | + $parent_ele = $this->getName().'[groups]['.$this->_groupId.']['.$pid.']'; |
|
464 | 464 | |
465 | - $tree .= "var ele = xoopsGetElementById('" . $parent_ele . "'); if(ele.checked != true) {ele.checked = this.checked;}"; |
|
465 | + $tree .= "var ele = xoopsGetElementById('".$parent_ele."'); if(ele.checked != true) {ele.checked = this.checked;}"; |
|
466 | 466 | } |
467 | 467 | |
468 | 468 | // If there are child elements, add javascript that will |
@@ -474,9 +474,9 @@ discard block |
||
474 | 474 | // is no permission to this item. |
475 | 475 | |
476 | 476 | foreach ($option['allchild'] as $cid) { |
477 | - $child_ele = $this->getName() . '[groups][' . $this->_groupId . '][' . $cid . ']'; |
|
477 | + $child_ele = $this->getName().'[groups]['.$this->_groupId.']['.$cid.']'; |
|
478 | 478 | |
479 | - $tree .= "var ele = xoopsGetElementById('" . $child_ele . "'); if(this.checked != true) {ele.checked = false;}"; |
|
479 | + $tree .= "var ele = xoopsGetElementById('".$child_ele."'); if(this.checked != true) {ele.checked = false;}"; |
|
480 | 480 | } |
481 | 481 | |
482 | 482 | $tree .= '" value="1"'; |
@@ -505,7 +505,7 @@ discard block |
||
505 | 505 | foreach ($option['children'] as $child) { |
506 | 506 | array_push($parentIds, $option['id']); |
507 | 507 | |
508 | - $this->_renderOptionTree($tree, $this->_optionTree[$child], $prefix . ' -', $parentIds); |
|
508 | + $this->_renderOptionTree($tree, $this->_optionTree[$child], $prefix.' -', $parentIds); |
|
509 | 509 | } |
510 | 510 | } |
511 | 511 | } |
@@ -532,7 +532,7 @@ discard block |
||
532 | 532 | * @param $xlim |
533 | 533 | * @param $yoff |
534 | 534 | * @param $ylim |
535 | - * @param $nchunks |
|
535 | + * @param double $nchunks |
|
536 | 536 | * @return array |
537 | 537 | */ |
538 | 538 | |
@@ -692,10 +692,10 @@ discard block |
||
692 | 692 | * |
693 | 693 | * Note that XLIM, YLIM are exclusive bounds. All line numbers are |
694 | 694 | * origin-0 and discarded lines are not counted. |
695 | - * @param $xoff |
|
696 | - * @param $xlim |
|
697 | - * @param $yoff |
|
698 | - * @param $ylim |
|
695 | + * @param integer $xoff |
|
696 | + * @param integer $xlim |
|
697 | + * @param integer $yoff |
|
698 | + * @param integer $ylim |
|
699 | 699 | */ |
700 | 700 | |
701 | 701 | public function _compareseq($xoff, $xlim, $yoff, $ylim) |
@@ -145,10 +145,10 @@ discard block |
||
145 | 145 | } |
146 | 146 | |
147 | 147 | /** |
148 | - * @param $xbeg |
|
149 | - * @param $xlen |
|
150 | - * @param $ybeg |
|
151 | - * @param $ylen |
|
148 | + * @param integer $xbeg |
|
149 | + * @param integer $xlen |
|
150 | + * @param integer $ybeg |
|
151 | + * @param integer $ylen |
|
152 | 152 | * @param $edits |
153 | 153 | * @return string |
154 | 154 | */ |
@@ -217,7 +217,7 @@ discard block |
||
217 | 217 | } |
218 | 218 | |
219 | 219 | /** |
220 | - * @param $header |
|
220 | + * @param string $header |
|
221 | 221 | * @return string |
222 | 222 | */ |
223 | 223 |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | public function __construct($params = []) |
43 | 43 | { |
44 | 44 | foreach ($params as $param => $value) { |
45 | - $v = '_' . $param; |
|
45 | + $v = '_'.$param; |
|
46 | 46 | |
47 | 47 | if (isset($this->$v)) { |
48 | 48 | $this->$v = $value; |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | $output .= $this->_block($x0, $xi - $x0, $y0, $yi - $y0, $block); |
142 | 142 | } |
143 | 143 | |
144 | - return $output . $this->_endDiff(); |
|
144 | + return $output.$this->_endDiff(); |
|
145 | 145 | } |
146 | 146 | |
147 | 147 | /** |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | } |
175 | 175 | } |
176 | 176 | |
177 | - return $output . $this->_endBlock(); |
|
177 | + return $output.$this->_endBlock(); |
|
178 | 178 | } |
179 | 179 | |
180 | 180 | /** |
@@ -206,14 +206,14 @@ discard block |
||
206 | 206 | public function _blockHeader($xbeg, $xlen, $ybeg, $ylen) |
207 | 207 | { |
208 | 208 | if ($xlen > 1) { |
209 | - $xbeg .= ',' . ($xbeg + $xlen - 1); |
|
209 | + $xbeg .= ','.($xbeg + $xlen - 1); |
|
210 | 210 | } |
211 | 211 | |
212 | 212 | if ($ylen > 1) { |
213 | - $ybeg .= ',' . ($ybeg + $ylen - 1); |
|
213 | + $ybeg .= ','.($ybeg + $ylen - 1); |
|
214 | 214 | } |
215 | 215 | |
216 | - return $xbeg . ($xlen ? ($ylen ? 'c' : 'd') : 'a') . $ybeg; |
|
216 | + return $xbeg.($xlen ? ($ylen ? 'c' : 'd') : 'a').$ybeg; |
|
217 | 217 | } |
218 | 218 | |
219 | 219 | /** |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | |
224 | 224 | public function _startBlock($header) |
225 | 225 | { |
226 | - return $header . "\n"; |
|
226 | + return $header."\n"; |
|
227 | 227 | } |
228 | 228 | |
229 | 229 | /** |
@@ -243,7 +243,7 @@ discard block |
||
243 | 243 | |
244 | 244 | public function _lines($lines, $prefix = ' ') |
245 | 245 | { |
246 | - return $prefix . implode("\n$prefix", $lines) . "\n"; |
|
246 | + return $prefix.implode("\n$prefix", $lines)."\n"; |
|
247 | 247 | } |
248 | 248 | |
249 | 249 | /** |
@@ -284,6 +284,6 @@ discard block |
||
284 | 284 | |
285 | 285 | public function _changed($orig, $final) |
286 | 286 | { |
287 | - return $this->_deleted($orig) . "---\n" . $this->_added($final); |
|
287 | + return $this->_deleted($orig)."---\n".$this->_added($final); |
|
288 | 288 | } |
289 | 289 | } |