@@ -14,21 +14,21 @@ discard block |
||
14 | 14 | foreach ($tplsadmin_autoupdate_dirnames as $dirname) { |
15 | 15 | $dirname = preg_replace('/[^a-zA-Z0-9_-]/', '', $dirname); |
16 | 16 | |
17 | - $tplsadmin_autoupdate_path = XOOPS_ROOT_PATH . '/modules/' . $dirname . '/templates'; |
|
17 | + $tplsadmin_autoupdate_path = XOOPS_ROOT_PATH.'/modules/'.$dirname.'/templates'; |
|
18 | 18 | |
19 | 19 | // modules |
20 | 20 | |
21 | - if ($handler = @opendir($tplsadmin_autoupdate_path . '/')) { |
|
21 | + if ($handler = @opendir($tplsadmin_autoupdate_path.'/')) { |
|
22 | 22 | while (false !== ($file = readdir($handler))) { |
23 | - $file_path = $tplsadmin_autoupdate_path . '/' . $file; |
|
23 | + $file_path = $tplsadmin_autoupdate_path.'/'.$file; |
|
24 | 24 | |
25 | 25 | if (is_file($file_path) && '.tpl' == mb_substr($file, -5)) { |
26 | - $mtime = (int) (@filemtime($file_path)); |
|
26 | + $mtime = (int)(@filemtime($file_path)); |
|
27 | 27 | |
28 | - [$count] = $xoopsDB->fetchRow($xoopsDB->query('SELECT COUNT(*) FROM ' . $xoopsDB->prefix('tplfile') . " WHERE tpl_tplset='" . addslashes($xoopsConfig['template_set']) . "' AND tpl_file='" . addslashes($file) . "' AND tpl_lastmodified >= $mtime")); |
|
28 | + [$count] = $xoopsDB->fetchRow($xoopsDB->query('SELECT COUNT(*) FROM '.$xoopsDB->prefix('tplfile')." WHERE tpl_tplset='".addslashes($xoopsConfig['template_set'])."' AND tpl_file='".addslashes($file)."' AND tpl_lastmodified >= $mtime")); |
|
29 | 29 | |
30 | 30 | if ($count <= 0) { |
31 | - require_once XOOPS_TRUST_PATH . '/libs/altsys/include/tpls_functions.php'; |
|
31 | + require_once XOOPS_TRUST_PATH.'/libs/altsys/include/tpls_functions.php'; |
|
32 | 32 | |
33 | 33 | tplsadmin_import_data($xoopsConfig['template_set'], $file, implode('', file($file_path)), $mtime); |
34 | 34 | } |
@@ -38,17 +38,17 @@ discard block |
||
38 | 38 | |
39 | 39 | // blocks |
40 | 40 | |
41 | - if ($handler = @opendir($tplsadmin_autoupdate_path . '/blocks/')) { |
|
41 | + if ($handler = @opendir($tplsadmin_autoupdate_path.'/blocks/')) { |
|
42 | 42 | while (false !== ($file = readdir($handler))) { |
43 | - $file_path = $tplsadmin_autoupdate_path . '/blocks/' . $file; |
|
43 | + $file_path = $tplsadmin_autoupdate_path.'/blocks/'.$file; |
|
44 | 44 | |
45 | 45 | if (is_file($file_path) && '.tpl' == mb_substr($file, -5)) { |
46 | - $mtime = (int) (@filemtime($file_path)); |
|
46 | + $mtime = (int)(@filemtime($file_path)); |
|
47 | 47 | |
48 | - [$count] = $xoopsDB->fetchRow($xoopsDB->query('SELECT COUNT(*) FROM ' . $xoopsDB->prefix('tplfile') . " WHERE tpl_tplset='" . addslashes($xoopsConfig['template_set']) . "' AND tpl_file='" . addslashes($file) . "' AND tpl_lastmodified >= $mtime")); |
|
48 | + [$count] = $xoopsDB->fetchRow($xoopsDB->query('SELECT COUNT(*) FROM '.$xoopsDB->prefix('tplfile')." WHERE tpl_tplset='".addslashes($xoopsConfig['template_set'])."' AND tpl_file='".addslashes($file)."' AND tpl_lastmodified >= $mtime")); |
|
49 | 49 | |
50 | 50 | if ($count <= 0) { |
51 | - require_once XOOPS_TRUST_PATH . '/libs/altsys/include/tpls_functions.php'; |
|
51 | + require_once XOOPS_TRUST_PATH.'/libs/altsys/include/tpls_functions.php'; |
|
52 | 52 | |
53 | 53 | tplsadmin_import_data($xoopsConfig['template_set'], $file, implode('', file($file_path)), $mtime); |
54 | 54 | } |
@@ -557,7 +557,7 @@ discard block |
||
557 | 557 | } |
558 | 558 | } |
559 | 559 | |
560 | - $x1 = $xoff + (int) (($numer + ($xlim - $xoff) * $chunk) / $nchunks); |
|
560 | + $x1 = $xoff + (int)(($numer + ($xlim - $xoff) * $chunk) / $nchunks); |
|
561 | 561 | |
562 | 562 | for (; $x < $x1; $x++) { |
563 | 563 | $line = $flip ? $this->yv[$x] : $this->xv[$x]; |
@@ -608,7 +608,7 @@ discard block |
||
608 | 608 | $ymid = $ymids[$this->lcs]; |
609 | 609 | |
610 | 610 | for ($n = 0; $n < $nchunks - 1; $n++) { |
611 | - $x1 = $xoff + (int) (($numer + ($xlim - $xoff) * $n) / $nchunks); |
|
611 | + $x1 = $xoff + (int)(($numer + ($xlim - $xoff) * $n) / $nchunks); |
|
612 | 612 | |
613 | 613 | $y1 = $ymid[$n] + 1; |
614 | 614 | |
@@ -639,7 +639,7 @@ discard block |
||
639 | 639 | $beg = 1; |
640 | 640 | |
641 | 641 | while ($beg < $end) { |
642 | - $mid = (int) (($beg + $end) / 2); |
|
642 | + $mid = (int)(($beg + $end) / 2); |
|
643 | 643 | |
644 | 644 | if ($ypos > $this->seq[$mid]) { |
645 | 645 | $beg = $mid + 1; |
@@ -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 | - require_once __DIR__ . '/adminmenu_functions.php'; |
|
58 | + require_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 | - require_once XOOPS_ROOT_PATH . '/modules/altsys/language/' . $mylang . '/' . $type . '.php'; |
|
78 | - } elseif (is_file(XOOPS_TRUST_PATH . '/libs/altsys/language/' . $mylang . '/' . $type . '.php')) { |
|
79 | - require_once XOOPS_TRUST_PATH . '/libs/altsys/language/' . $mylang . '/' . $type . '.php'; |
|
80 | - } elseif (is_file(XOOPS_ROOT_PATH . '/modules/altsys/language/english/' . $type . '.php')) { |
|
81 | - require_once XOOPS_ROOT_PATH . '/modules/altsys/language/english/' . $type . '.php'; |
|
82 | - } elseif (is_file(XOOPS_TRUST_PATH . '/libs/altsys/language/english/' . $type . '.php')) { |
|
83 | - require_once XOOPS_TRUST_PATH . '/libs/altsys/language/english/' . $type . '.php'; |
|
76 | + if (is_file(XOOPS_ROOT_PATH.'/modules/altsys/language/'.$mylang.'/'.$type.'.php')) { |
|
77 | + require_once XOOPS_ROOT_PATH.'/modules/altsys/language/'.$mylang.'/'.$type.'.php'; |
|
78 | + } elseif (is_file(XOOPS_TRUST_PATH.'/libs/altsys/language/'.$mylang.'/'.$type.'.php')) { |
|
79 | + require_once XOOPS_TRUST_PATH.'/libs/altsys/language/'.$mylang.'/'.$type.'.php'; |
|
80 | + } elseif (is_file(XOOPS_ROOT_PATH.'/modules/altsys/language/english/'.$type.'.php')) { |
|
81 | + require_once XOOPS_ROOT_PATH.'/modules/altsys/language/english/'.$type.'.php'; |
|
82 | + } elseif (is_file(XOOPS_TRUST_PATH.'/libs/altsys/language/english/'.$type.'.php')) { |
|
83 | + require_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); |
@@ -5,19 +5,19 @@ |
||
5 | 5 | } |
6 | 6 | |
7 | 7 | // templates/ under the theme |
8 | -$tplsadmin_autoupdate_path = XOOPS_THEME_PATH . '/' . $xoopsConfig['theme_set'] . '/templates'; |
|
8 | +$tplsadmin_autoupdate_path = XOOPS_THEME_PATH.'/'.$xoopsConfig['theme_set'].'/templates'; |
|
9 | 9 | |
10 | -if ($handler = @opendir($tplsadmin_autoupdate_path . '/')) { |
|
10 | +if ($handler = @opendir($tplsadmin_autoupdate_path.'/')) { |
|
11 | 11 | while (false !== ($file = readdir($handler))) { |
12 | - $file_path = $tplsadmin_autoupdate_path . '/' . $file; |
|
12 | + $file_path = $tplsadmin_autoupdate_path.'/'.$file; |
|
13 | 13 | |
14 | 14 | if (is_file($file_path) && '.tpl' == mb_substr($file, -5)) { |
15 | - $mtime = (int) (@filemtime($file_path)); |
|
15 | + $mtime = (int)(@filemtime($file_path)); |
|
16 | 16 | |
17 | - [$count] = $xoopsDB->fetchRow($xoopsDB->query('SELECT COUNT(*) FROM ' . $xoopsDB->prefix('tplfile') . " WHERE tpl_tplset='" . addslashes($xoopsConfig['template_set']) . "' AND tpl_file='" . addslashes($file) . "' AND tpl_lastmodified >= $mtime")); |
|
17 | + [$count] = $xoopsDB->fetchRow($xoopsDB->query('SELECT COUNT(*) FROM '.$xoopsDB->prefix('tplfile')." WHERE tpl_tplset='".addslashes($xoopsConfig['template_set'])."' AND tpl_file='".addslashes($file)."' AND tpl_lastmodified >= $mtime")); |
|
18 | 18 | |
19 | 19 | if ($count <= 0) { |
20 | - require_once XOOPS_TRUST_PATH . '/libs/altsys/include/tpls_functions.php'; |
|
20 | + require_once XOOPS_TRUST_PATH.'/libs/altsys/include/tpls_functions.php'; |
|
21 | 21 | |
22 | 22 | tplsadmin_import_data($xoopsConfig['template_set'], $file, implode('', file($file_path)), $mtime); |
23 | 23 | } |
@@ -27,8 +27,8 @@ discard block |
||
27 | 27 | // language file |
28 | 28 | |
29 | 29 | if (defined('XOOPS_ROOT_PATH') && !empty($xoopsConfig['language']) && !mb_strstr($xoopsConfig['language'], '/')) { |
30 | - if (is_file(dirname(__DIR__) . '/language/' . $xoopsConfig['language'] . '/gticket_messages.phtml')) { |
|
31 | - include dirname(__DIR__) . '/language/' . $xoopsConfig['language'] . '/gticket_messages.phtml'; |
|
30 | + if (is_file(dirname(__DIR__).'/language/'.$xoopsConfig['language'].'/gticket_messages.phtml')) { |
|
31 | + include dirname(__DIR__).'/language/'.$xoopsConfig['language'].'/gticket_messages.phtml'; |
|
32 | 32 | } |
33 | 33 | } |
34 | 34 | |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | |
60 | 60 | public function getTicketHtml($salt = '', $timeout = 1800, $area = '') |
61 | 61 | { |
62 | - return '<input type="hidden" name="XOOPS_G_TICKET" value="' . $this->issue($salt, $timeout, $area) . '">'; |
|
62 | + return '<input type="hidden" name="XOOPS_G_TICKET" value="'.$this->issue($salt, $timeout, $area).'">'; |
|
63 | 63 | } |
64 | 64 | |
65 | 65 | // returns an object of XoopsFormHidden including theh ticket |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | |
117 | 117 | public function getTicketParamString($salt = '', $noamp = false, $timeout = 1800, $area = '') |
118 | 118 | { |
119 | - return ($noamp ? '' : '&') . 'XOOPS_G_TICKET=' . $this->issue($salt, $timeout, $area); |
|
119 | + return ($noamp ? '' : '&').'XOOPS_G_TICKET='.$this->issue($salt, $timeout, $area); |
|
120 | 120 | } |
121 | 121 | |
122 | 122 | // issue a ticket |
@@ -134,9 +134,9 @@ discard block |
||
134 | 134 | |
135 | 135 | if ('' === $salt) { |
136 | 136 | if (version_compare(PHP_VERSION, '7.0.0') >= 0 && function_exists('random_bytes')) { |
137 | - $salt = '$2y$07$' . str_replace('+', '.', base64_encode(random_bytes(self::PBKDF2_SALT_BYTES))); |
|
137 | + $salt = '$2y$07$'.str_replace('+', '.', base64_encode(random_bytes(self::PBKDF2_SALT_BYTES))); |
|
138 | 138 | } elseif (function_exists('mcrypt_create_iv')) { |
139 | - $salt = '$2y$07$' . str_replace('+', '.', base64_encode(mcrypt_create_iv(16, MCRYPT_DEV_URANDOM))); |
|
139 | + $salt = '$2y$07$'.str_replace('+', '.', base64_encode(mcrypt_create_iv(16, MCRYPT_DEV_URANDOM))); |
|
140 | 140 | } |
141 | 141 | } |
142 | 142 | |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | |
147 | 147 | $appendix_salt = empty($_SERVER['PATH']) ? XOOPS_DB_NAME : $_SERVER['PATH']; |
148 | 148 | |
149 | - $token = crypt($salt . $usec . $appendix_salt . $sec, $salt); |
|
149 | + $token = crypt($salt.$usec.$appendix_salt.$sec, $salt); |
|
150 | 150 | |
151 | 151 | $this->_latest_token = $token; |
152 | 152 | |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | |
182 | 182 | // paid md5ed token as a ticket |
183 | 183 | |
184 | - return md5($token . XOOPS_DB_PREFIX); |
|
184 | + return md5($token.XOOPS_DB_PREFIX); |
|
185 | 185 | } |
186 | 186 | |
187 | 187 | // check a ticket |
@@ -227,14 +227,14 @@ discard block |
||
227 | 227 | // default lifetime 30min |
228 | 228 | |
229 | 229 | if ($stub['expire'] >= time()) { |
230 | - if (md5($stub['token'] . XOOPS_DB_PREFIX) === $ticket) { |
|
230 | + if (md5($stub['token'].XOOPS_DB_PREFIX) === $ticket) { |
|
231 | 231 | $found_stub = $stub; |
232 | 232 | } else { |
233 | 233 | // store the other valid stubs into session |
234 | 234 | |
235 | 235 | $_SESSION['XOOPS_G_STUBS'][] = $stub; |
236 | 236 | } |
237 | - } elseif (md5($stub['token'] . XOOPS_DB_PREFIX) === $ticket) { |
|
237 | + } elseif (md5($stub['token'].XOOPS_DB_PREFIX) === $ticket) { |
|
238 | 238 | // not CSRF but Time-Out |
239 | 239 | |
240 | 240 | $timeout_flag = true; |
@@ -318,7 +318,7 @@ discard block |
||
318 | 318 | |
319 | 319 | $table = '<table>'; |
320 | 320 | |
321 | - $form = '<form action="?' . htmlspecialchars(@$_SERVER['QUERY_STRING'], ENT_QUOTES | ENT_HTML5) . '" method="post" >'; |
|
321 | + $form = '<form action="?'.htmlspecialchars(@$_SERVER['QUERY_STRING'], ENT_QUOTES | ENT_HTML5).'" method="post" >'; |
|
322 | 322 | |
323 | 323 | foreach ($_POST as $key => $val) { |
324 | 324 | if ('XOOPS_G_TICKET' == $key) { |
@@ -340,22 +340,22 @@ discard block |
||
340 | 340 | $val = stripslashes($val); |
341 | 341 | } |
342 | 342 | |
343 | - $table .= '<tr><th>' . htmlspecialchars($key, ENT_QUOTES | ENT_HTML5) . '</th><td>' . htmlspecialchars($val, ENT_QUOTES | ENT_HTML5) . '</td></tr>' . "\n"; |
|
343 | + $table .= '<tr><th>'.htmlspecialchars($key, ENT_QUOTES | ENT_HTML5).'</th><td>'.htmlspecialchars($val, ENT_QUOTES | ENT_HTML5).'</td></tr>'."\n"; |
|
344 | 344 | |
345 | - $form .= '<input type="hidden" name="' . htmlspecialchars($key, ENT_QUOTES | ENT_HTML5) . '" value="' . htmlspecialchars($val, ENT_QUOTES | ENT_HTML5) . '">' . "\n"; |
|
345 | + $form .= '<input type="hidden" name="'.htmlspecialchars($key, ENT_QUOTES | ENT_HTML5).'" value="'.htmlspecialchars($val, ENT_QUOTES | ENT_HTML5).'">'."\n"; |
|
346 | 346 | } |
347 | 347 | } |
348 | 348 | |
349 | 349 | $table .= '</table>'; |
350 | 350 | |
351 | - $form .= $this->getTicketHtml(__LINE__, 300, $area) . '<input type="submit" value="' . $this->messages['btn_repost'] . '"></form>'; |
|
351 | + $form .= $this->getTicketHtml(__LINE__, 300, $area).'<input type="submit" value="'.$this->messages['btn_repost'].'"></form>'; |
|
352 | 352 | |
353 | 353 | error_reporting(0); |
354 | 354 | |
355 | 355 | while (@ob_get_level() && @ob_end_clean()) { |
356 | 356 | } |
357 | 357 | |
358 | - 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>'; |
|
358 | + 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>'; |
|
359 | 359 | } |
360 | 360 | |
361 | 361 | /** |
@@ -376,7 +376,7 @@ discard block |
||
376 | 376 | } |
377 | 377 | |
378 | 378 | if (is_array($val)) { |
379 | - [$tmp_table, $tmp_form] = $this->extract_post_recursive($key_name . '[' . htmlspecialchars($key, ENT_QUOTES | ENT_HTML5) . ']', $val); |
|
379 | + [$tmp_table, $tmp_form] = $this->extract_post_recursive($key_name.'['.htmlspecialchars($key, ENT_QUOTES | ENT_HTML5).']', $val); |
|
380 | 380 | |
381 | 381 | $table .= $tmp_table; |
382 | 382 | |
@@ -386,9 +386,9 @@ discard block |
||
386 | 386 | $val = stripslashes($val); |
387 | 387 | } |
388 | 388 | |
389 | - $table .= '<tr><th>' . $key_name . '[' . htmlspecialchars($key, ENT_QUOTES | ENT_HTML5) . ']</th><td>' . htmlspecialchars($val, ENT_QUOTES | ENT_HTML5) . '</td></tr>' . "\n"; |
|
389 | + $table .= '<tr><th>'.$key_name.'['.htmlspecialchars($key, ENT_QUOTES | ENT_HTML5).']</th><td>'.htmlspecialchars($val, ENT_QUOTES | ENT_HTML5).'</td></tr>'."\n"; |
|
390 | 390 | |
391 | - $form .= '<input type="hidden" name="' . $key_name . '[' . htmlspecialchars($key, ENT_QUOTES | ENT_HTML5) . ']" value="' . htmlspecialchars($val, ENT_QUOTES | ENT_HTML5) . '">' . "\n"; |
|
391 | + $form .= '<input type="hidden" name="'.$key_name.'['.htmlspecialchars($key, ENT_QUOTES | ENT_HTML5).']" value="'.htmlspecialchars($val, ENT_QUOTES | ENT_HTML5).'">'."\n"; |
|
392 | 392 | } |
393 | 393 | } |
394 | 394 | |
@@ -448,8 +448,8 @@ discard block |
||
448 | 448 | |
449 | 449 | public function errorHandler4FindOutput($errNo, $errStr, $errFile, $errLine) |
450 | 450 | { |
451 | - if (preg_match('?' . preg_quote(XOOPS_ROOT_PATH) . '([^:]+)\:(\d+)?', $errStr, $regs)) { |
|
452 | - echo 'Irregular output! check the file ' . htmlspecialchars($regs[1], ENT_QUOTES | ENT_HTML5) . ' line ' . htmlspecialchars($regs[2], ENT_QUOTES | ENT_HTML5); |
|
451 | + if (preg_match('?'.preg_quote(XOOPS_ROOT_PATH).'([^:]+)\:(\d+)?', $errStr, $regs)) { |
|
452 | + echo 'Irregular output! check the file '.htmlspecialchars($regs[1], ENT_QUOTES | ENT_HTML5).' line '.htmlspecialchars($regs[2], ENT_QUOTES | ENT_HTML5); |
|
453 | 453 | } else { |
454 | 454 | echo 'Irregular output! check language files etc.'; |
455 | 455 | } |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | /** |
27 | 27 | * Parent |
28 | 28 | */ |
29 | -require_once XOOPS_ROOT_PATH . '/class/xoopsform/formcheckbox.php'; |
|
29 | +require_once XOOPS_ROOT_PATH.'/class/xoopsform/formcheckbox.php'; |
|
30 | 30 | |
31 | 31 | /** |
32 | 32 | * A checkbox field with a choice of available groups |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | } |
59 | 59 | |
60 | 60 | foreach ($options as $k => $v) { |
61 | - $options[$k] = $v . '<br>'; |
|
61 | + $options[$k] = $v.'<br>'; |
|
62 | 62 | } |
63 | 63 | |
64 | 64 | $this->addOptionArray($options); |
@@ -14,27 +14,27 @@ |
||
14 | 14 | foreach ($tplsadmin_autoupdate_mydirnames as $tplsadmin_mydirname) { |
15 | 15 | $tplsadmin_mydirname = preg_replace('/[^a-zA-Z0-9_-]/', '', $tplsadmin_mydirname); |
16 | 16 | |
17 | - require XOOPS_ROOT_PATH . '/modules/' . $tplsadmin_mydirname . '/mytrustdirname.php'; |
|
17 | + require XOOPS_ROOT_PATH.'/modules/'.$tplsadmin_mydirname.'/mytrustdirname.php'; |
|
18 | 18 | |
19 | 19 | $altsys_mid_path = 'altsys' == $mytrustdirname ? '/libs/' : '/modules/'; |
20 | 20 | |
21 | - $tplsadmin_autoupdate_path = XOOPS_TRUST_PATH . $altsys_mid_path . $mytrustdirname . '/templates'; |
|
21 | + $tplsadmin_autoupdate_path = XOOPS_TRUST_PATH.$altsys_mid_path.$mytrustdirname.'/templates'; |
|
22 | 22 | |
23 | 23 | // modules |
24 | 24 | |
25 | - if ($handler = @opendir($tplsadmin_autoupdate_path . '/')) { |
|
25 | + if ($handler = @opendir($tplsadmin_autoupdate_path.'/')) { |
|
26 | 26 | while (false !== ($file = readdir($handler))) { |
27 | - $file_path = $tplsadmin_autoupdate_path . '/' . $file; |
|
27 | + $file_path = $tplsadmin_autoupdate_path.'/'.$file; |
|
28 | 28 | |
29 | 29 | if (is_file($file_path)) { |
30 | - $mtime = (int) (@filemtime($file_path)); |
|
30 | + $mtime = (int)(@filemtime($file_path)); |
|
31 | 31 | |
32 | - $tpl_file = $tplsadmin_mydirname . '_' . $file; |
|
32 | + $tpl_file = $tplsadmin_mydirname.'_'.$file; |
|
33 | 33 | |
34 | - [$count] = $xoopsDB->fetchRow($xoopsDB->query('SELECT COUNT(*) FROM ' . $xoopsDB->prefix('tplfile') . " WHERE tpl_tplset='" . addslashes($xoopsConfig['template_set']) . "' AND tpl_file='" . addslashes($tpl_file) . "' AND tpl_lastmodified >= $mtime")); |
|
34 | + [$count] = $xoopsDB->fetchRow($xoopsDB->query('SELECT COUNT(*) FROM '.$xoopsDB->prefix('tplfile')." WHERE tpl_tplset='".addslashes($xoopsConfig['template_set'])."' AND tpl_file='".addslashes($tpl_file)."' AND tpl_lastmodified >= $mtime")); |
|
35 | 35 | |
36 | 36 | if ($count <= 0) { |
37 | - require_once XOOPS_TRUST_PATH . '/libs/altsys/include/tpls_functions.php'; |
|
37 | + require_once XOOPS_TRUST_PATH.'/libs/altsys/include/tpls_functions.php'; |
|
38 | 38 | |
39 | 39 | tplsadmin_import_data($xoopsConfig['template_set'], $tpl_file, implode('', file($file_path)), $mtime); |
40 | 40 | } |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | public function __construct($params = []) |
38 | 38 | { |
39 | 39 | foreach ($params as $param => $value) { |
40 | - $v = '_' . $param; |
|
40 | + $v = '_'.$param; |
|
41 | 41 | |
42 | 42 | if (isset($this->$v)) { |
43 | 43 | $this->$v = $value; |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | $output .= $this->_block($x0, $xi - $x0, $y0, $yi - $y0, $block); |
135 | 135 | } |
136 | 136 | |
137 | - return $output . $this->_endDiff(); |
|
137 | + return $output.$this->_endDiff(); |
|
138 | 138 | } |
139 | 139 | |
140 | 140 | /** |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | } |
167 | 167 | } |
168 | 168 | |
169 | - return $output . $this->_endBlock(); |
|
169 | + return $output.$this->_endBlock(); |
|
170 | 170 | } |
171 | 171 | |
172 | 172 | /** |
@@ -195,14 +195,14 @@ discard block |
||
195 | 195 | public function _blockHeader($xbeg, $xlen, $ybeg, $ylen) |
196 | 196 | { |
197 | 197 | if ($xlen > 1) { |
198 | - $xbeg .= ',' . ($xbeg + $xlen - 1); |
|
198 | + $xbeg .= ','.($xbeg + $xlen - 1); |
|
199 | 199 | } |
200 | 200 | |
201 | 201 | if ($ylen > 1) { |
202 | - $ybeg .= ',' . ($ybeg + $ylen - 1); |
|
202 | + $ybeg .= ','.($ybeg + $ylen - 1); |
|
203 | 203 | } |
204 | 204 | |
205 | - return $xbeg . ($xlen ? ($ylen ? 'c' : 'd') : 'a') . $ybeg; |
|
205 | + return $xbeg.($xlen ? ($ylen ? 'c' : 'd') : 'a').$ybeg; |
|
206 | 206 | } |
207 | 207 | |
208 | 208 | /** |
@@ -211,7 +211,7 @@ discard block |
||
211 | 211 | */ |
212 | 212 | public function _startBlock($header) |
213 | 213 | { |
214 | - return $header . "\n"; |
|
214 | + return $header."\n"; |
|
215 | 215 | } |
216 | 216 | |
217 | 217 | /** |
@@ -229,7 +229,7 @@ discard block |
||
229 | 229 | */ |
230 | 230 | public function _lines($lines, $prefix = ' ') |
231 | 231 | { |
232 | - return $prefix . implode("\n$prefix", $lines) . "\n"; |
|
232 | + return $prefix.implode("\n$prefix", $lines)."\n"; |
|
233 | 233 | } |
234 | 234 | |
235 | 235 | /** |
@@ -266,6 +266,6 @@ discard block |
||
266 | 266 | */ |
267 | 267 | public function _changed($orig, $final) |
268 | 268 | { |
269 | - return $this->_deleted($orig) . "---\n" . $this->_added($final); |
|
269 | + return $this->_deleted($orig)."---\n".$this->_added($final); |
|
270 | 270 | } |
271 | 271 | } |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | }*/ // GIJ |
142 | 142 | |
143 | 143 | if (!extension_loaded('zlib')) { |
144 | - die("The extension 'zlib' couldn't be found.\n" . 'Please make sure your version of PHP was built ' . "with 'zlib' support.\n"); |
|
144 | + die("The extension 'zlib' couldn't be found.\n".'Please make sure your version of PHP was built '."with 'zlib' support.\n"); |
|
145 | 145 | |
146 | 146 | return false; |
147 | 147 | } |
@@ -525,7 +525,7 @@ discard block |
||
525 | 525 | && ('' == $p_params['by_index']) |
526 | 526 | && ('' == $p_params['by_ereg']) |
527 | 527 | && ('' == $p_params['by_preg'])) { |
528 | - $this->_errorLog(ARCHIVE_ZIP_ERR_INVALID_PARAMETER, 'At least one filtering rule must' . ' be set as parameter'); |
|
528 | + $this->_errorLog(ARCHIVE_ZIP_ERR_INVALID_PARAMETER, 'At least one filtering rule must'.' be set as parameter'); |
|
529 | 529 | |
530 | 530 | return 0; |
531 | 531 | } |
@@ -583,7 +583,7 @@ discard block |
||
583 | 583 | // ----- Open the zip file |
584 | 584 | |
585 | 585 | if (0 == ($this->_zip_fd = @fopen($this->_zipname, 'rb'))) { |
586 | - $this->_errorLog(ARCHIVE_ZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \'' . $this->_zipname . '\' in binary read mode'); |
|
586 | + $this->_errorLog(ARCHIVE_ZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \''.$this->_zipname.'\' in binary read mode'); |
|
587 | 587 | |
588 | 588 | return 0; |
589 | 589 | } |
@@ -640,7 +640,7 @@ discard block |
||
640 | 640 | // TBC : Should also check the archive format |
641 | 641 | |
642 | 642 | if (!is_file($p_archive)) { |
643 | - $this->_errorLog(ARCHIVE_ZIP_ERR_MISSING_FILE, "No file with filename '" . $p_archive . "'"); |
|
643 | + $this->_errorLog(ARCHIVE_ZIP_ERR_MISSING_FILE, "No file with filename '".$p_archive."'"); |
|
644 | 644 | |
645 | 645 | $v_result = ARCHIVE_ZIP_ERR_MISSING_FILE; |
646 | 646 | } else { |
@@ -756,7 +756,7 @@ discard block |
||
756 | 756 | } |
757 | 757 | |
758 | 758 | if ($p_with_code) { |
759 | - return ($v_value . ' (' . $this->_error_code . ')'); |
|
759 | + return ($v_value.' ('.$this->_error_code.')'); |
|
760 | 760 | } |
761 | 761 | |
762 | 762 | return $v_value; |
@@ -778,10 +778,10 @@ discard block |
||
778 | 778 | public function errorInfo($p_full = false) |
779 | 779 | { |
780 | 780 | if ($p_full) { |
781 | - return ($this->errorName(true) . ' : ' . $this->_error_string); |
|
781 | + return ($this->errorName(true).' : '.$this->_error_string); |
|
782 | 782 | } |
783 | 783 | |
784 | - return ($this->_error_string . ' [code ' . $this->_error_code . ']'); |
|
784 | + return ($this->_error_string.' [code '.$this->_error_code.']'); |
|
785 | 785 | } |
786 | 786 | |
787 | 787 | // }}} |
@@ -845,7 +845,7 @@ discard block |
||
845 | 845 | if (!is_file($this->_zipname)) { |
846 | 846 | // ----- Error log |
847 | 847 | |
848 | - $this->_errorLog(ARCHIVE_ZIP_ERR_MISSING_FILE, "Missing archive file '" . $this->_zipname . "'"); |
|
848 | + $this->_errorLog(ARCHIVE_ZIP_ERR_MISSING_FILE, "Missing archive file '".$this->_zipname."'"); |
|
849 | 849 | |
850 | 850 | return false; |
851 | 851 | } |
@@ -855,7 +855,7 @@ discard block |
||
855 | 855 | if (!is_readable($this->_zipname)) { |
856 | 856 | // ----- Error log |
857 | 857 | |
858 | - $this->_errorLog(ARCHIVE_ZIP_ERR_READ_OPEN_FAIL, "Unable to read archive '" . $this->_zipname . "'"); |
|
858 | + $this->_errorLog(ARCHIVE_ZIP_ERR_READ_OPEN_FAIL, "Unable to read archive '".$this->_zipname."'"); |
|
859 | 859 | |
860 | 860 | return false; |
861 | 861 | } |
@@ -998,14 +998,14 @@ discard block |
||
998 | 998 | |
999 | 999 | // ----- Creates a temporay file |
1000 | 1000 | |
1001 | - $v_zip_temp_name = ARCHIVE_ZIP_TEMPORARY_DIR . uniqid('archive_zip-') . '.tmp'; |
|
1001 | + $v_zip_temp_name = ARCHIVE_ZIP_TEMPORARY_DIR.uniqid('archive_zip-').'.tmp'; |
|
1002 | 1002 | |
1003 | 1003 | // ----- Open the temporary file in write mode |
1004 | 1004 | |
1005 | 1005 | if (0 == ($v_zip_temp_fd = @fopen($v_zip_temp_name, 'wb'))) { |
1006 | 1006 | $this->_closeFd(); |
1007 | 1007 | |
1008 | - $this->_errorLog(ARCHIVE_ZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \'' . $v_zip_temp_name . '\' in binary write mode'); |
|
1008 | + $this->_errorLog(ARCHIVE_ZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \''.$v_zip_temp_name.'\' in binary write mode'); |
|
1009 | 1009 | |
1010 | 1010 | return self::errorCode(); |
1011 | 1011 | } |
@@ -1181,7 +1181,7 @@ discard block |
||
1181 | 1181 | // ----- Look if already open |
1182 | 1182 | |
1183 | 1183 | if (0 != $this->_zip_fd) { |
1184 | - $this->_errorLog(ARCHIVE_ZIP_ERR_READ_OPEN_FAIL, 'Zip file \'' . $this->_zipname . '\' already open'); |
|
1184 | + $this->_errorLog(ARCHIVE_ZIP_ERR_READ_OPEN_FAIL, 'Zip file \''.$this->_zipname.'\' already open'); |
|
1185 | 1185 | |
1186 | 1186 | return self::errorCode(); |
1187 | 1187 | } |
@@ -1189,7 +1189,7 @@ discard block |
||
1189 | 1189 | // ----- Open the zip file |
1190 | 1190 | |
1191 | 1191 | if (0 == ($this->_zip_fd = @fopen($this->_zipname, $p_mode))) { |
1192 | - $this->_errorLog(ARCHIVE_ZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \'' . $this->_zipname . '\' in ' . $p_mode . ' mode'); |
|
1192 | + $this->_errorLog(ARCHIVE_ZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \''.$this->_zipname.'\' in '.$p_mode.' mode'); |
|
1193 | 1193 | |
1194 | 1194 | return self::errorCode(); |
1195 | 1195 | } |
@@ -1436,7 +1436,7 @@ discard block |
||
1436 | 1436 | // ----- Look for path |
1437 | 1437 | |
1438 | 1438 | if ('.' != $p_filename) { |
1439 | - $v_path = $p_filename . '/'; |
|
1439 | + $v_path = $p_filename.'/'; |
|
1440 | 1440 | } else { |
1441 | 1441 | $v_path = ''; |
1442 | 1442 | } |
@@ -1450,10 +1450,10 @@ discard block |
||
1450 | 1450 | while ($p_hitem = readdir($p_hdir)) { |
1451 | 1451 | // ----- Look for a file |
1452 | 1452 | |
1453 | - if (is_file($v_path . $p_hitem)) { |
|
1453 | + if (is_file($v_path.$p_hitem)) { |
|
1454 | 1454 | // ----- Add the file |
1455 | 1455 | |
1456 | - if (1 != ($v_result = $this->_addFile($v_path . $p_hitem, $v_header, $p_add_dir, $p_remove_dir, $p_remove_all_dir, $p_params))) { |
|
1456 | + if (1 != ($v_result = $this->_addFile($v_path.$p_hitem, $v_header, $p_add_dir, $p_remove_dir, $p_remove_all_dir, $p_params))) { |
|
1457 | 1457 | // ----- Return status |
1458 | 1458 | |
1459 | 1459 | return $v_result; |
@@ -1467,7 +1467,7 @@ discard block |
||
1467 | 1467 | else { |
1468 | 1468 | // ----- Need an array as parameter |
1469 | 1469 | |
1470 | - $p_temp_list[0] = $v_path . $p_hitem; |
|
1470 | + $p_temp_list[0] = $v_path.$p_hitem; |
|
1471 | 1471 | |
1472 | 1472 | $v_result = $this->_addFileList($p_temp_list, $p_result_list, $p_add_dir, $p_remove_dir, $p_remove_all_dir, $p_params); |
1473 | 1473 | |
@@ -1543,7 +1543,7 @@ discard block |
||
1543 | 1543 | |
1544 | 1544 | if (('./' == mb_substr($p_filename, 0, 2)) || ('./' == mb_substr($p_remove_dir, 0, 2))) { |
1545 | 1545 | if (('./' == mb_substr($p_filename, 0, 2)) && ('./' != mb_substr($p_remove_dir, 0, 2))) { |
1546 | - $p_remove_dir = './' . $p_remove_dir; |
|
1546 | + $p_remove_dir = './'.$p_remove_dir; |
|
1547 | 1547 | } |
1548 | 1548 | |
1549 | 1549 | if (('./' != mb_substr($p_filename, 0, 2)) && ('./' == mb_substr($p_remove_dir, 0, 2))) { |
@@ -1568,9 +1568,9 @@ discard block |
||
1568 | 1568 | |
1569 | 1569 | if ('' != $p_add_dir) { |
1570 | 1570 | if ('/' == mb_substr($p_add_dir, -1)) { |
1571 | - $v_stored_filename = $p_add_dir . $v_stored_filename; |
|
1571 | + $v_stored_filename = $p_add_dir.$v_stored_filename; |
|
1572 | 1572 | } else { |
1573 | - $v_stored_filename = $p_add_dir . '/' . $v_stored_filename; |
|
1573 | + $v_stored_filename = $p_add_dir.'/'.$v_stored_filename; |
|
1574 | 1574 | } |
1575 | 1575 | } |
1576 | 1576 | |
@@ -1652,7 +1652,7 @@ discard block |
||
1652 | 1652 | |
1653 | 1653 | // header. |
1654 | 1654 | |
1655 | - eval('$v_result = ' . $p_params[ARCHIVE_ZIP_PARAM_PRE_ADD] . '(ARCHIVE_ZIP_PARAM_PRE_ADD, $v_local_header);'); |
|
1655 | + eval('$v_result = '.$p_params[ARCHIVE_ZIP_PARAM_PRE_ADD].'(ARCHIVE_ZIP_PARAM_PRE_ADD, $v_local_header);'); |
|
1656 | 1656 | |
1657 | 1657 | if (0 == $v_result) { |
1658 | 1658 | // ----- Change the file status |
@@ -1735,7 +1735,7 @@ discard block |
||
1735 | 1735 | |
1736 | 1736 | // ----- Write the compressed content |
1737 | 1737 | |
1738 | - $v_binary_data = pack('a' . $p_header['compressed_size'], $v_content_compressed); |
|
1738 | + $v_binary_data = pack('a'.$p_header['compressed_size'], $v_content_compressed); |
|
1739 | 1739 | |
1740 | 1740 | @fwrite($this->_zip_fd, $v_binary_data, $p_header['compressed_size']); |
1741 | 1741 | |
@@ -1753,7 +1753,7 @@ discard block |
||
1753 | 1753 | |
1754 | 1754 | $p_header['size'] = 0; |
1755 | 1755 | |
1756 | - $p_header['external'] = 0x41FF0010; // Value for a folder : to be checked |
|
1756 | + $p_header['external'] = 0x41FF0010; // Value for a folder : to be checked |
|
1757 | 1757 | |
1758 | 1758 | // ----- Call the header generation |
1759 | 1759 | |
@@ -1779,7 +1779,7 @@ discard block |
||
1779 | 1779 | |
1780 | 1780 | // header. |
1781 | 1781 | |
1782 | - eval('$v_result = ' . $p_params[ARCHIVE_ZIP_PARAM_POST_ADD] . '(ARCHIVE_ZIP_PARAM_POST_ADD, $v_local_header);'); |
|
1782 | + eval('$v_result = '.$p_params[ARCHIVE_ZIP_PARAM_POST_ADD].'(ARCHIVE_ZIP_PARAM_POST_ADD, $v_local_header);'); |
|
1783 | 1783 | |
1784 | 1784 | if (0 == $v_result) { |
1785 | 1785 | // ----- Ignored |
@@ -2024,7 +2024,7 @@ discard block |
||
2024 | 2024 | if (0 == ($this->_zip_fd = @fopen($this->_zipname, 'rb'))) { |
2025 | 2025 | // ----- Error log |
2026 | 2026 | |
2027 | - $this->_errorLog(ARCHIVE_ZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \'' . $this->_zipname . '\' in binary read mode'); |
|
2027 | + $this->_errorLog(ARCHIVE_ZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \''.$this->_zipname.'\' in binary read mode'); |
|
2028 | 2028 | |
2029 | 2029 | // ----- Return |
2030 | 2030 | |
@@ -2213,7 +2213,7 @@ discard block |
||
2213 | 2213 | || (('/' != mb_substr($p_path, 0, 1)) |
2214 | 2214 | && ('../' != mb_substr($p_path, 0, 3)) |
2215 | 2215 | && (':/' != mb_substr($p_path, 1, 2)))) { |
2216 | - $p_path = './' . $p_path; |
|
2216 | + $p_path = './'.$p_path; |
|
2217 | 2217 | } |
2218 | 2218 | |
2219 | 2219 | // ----- Reduce the path last (and duplicated) '/' |
@@ -2519,7 +2519,7 @@ discard block |
||
2519 | 2519 | // ----- Add the path |
2520 | 2520 | |
2521 | 2521 | if ('' != $p_path) { |
2522 | - $p_entry['filename'] = $p_path . '/' . $p_entry['filename']; |
|
2522 | + $p_entry['filename'] = $p_path.'/'.$p_entry['filename']; |
|
2523 | 2523 | } |
2524 | 2524 | |
2525 | 2525 | // ----- Look for pre-extract callback |
@@ -2538,7 +2538,7 @@ discard block |
||
2538 | 2538 | |
2539 | 2539 | // header. |
2540 | 2540 | |
2541 | - eval('$v_result = ' . $p_params[ARCHIVE_ZIP_PARAM_PRE_EXTRACT] . '(ARCHIVE_ZIP_PARAM_PRE_EXTRACT, $v_local_header);'); |
|
2541 | + eval('$v_result = '.$p_params[ARCHIVE_ZIP_PARAM_PRE_EXTRACT].'(ARCHIVE_ZIP_PARAM_PRE_EXTRACT, $v_local_header);'); |
|
2542 | 2542 | |
2543 | 2543 | if (0 == $v_result) { |
2544 | 2544 | // ----- Change the file status |
@@ -2644,7 +2644,7 @@ discard block |
||
2644 | 2644 | |
2645 | 2645 | $v_buffer = fread($this->_zip_fd, $v_read_size); |
2646 | 2646 | |
2647 | - $v_binary_data = pack('a' . $v_read_size, $v_buffer); |
|
2647 | + $v_binary_data = pack('a'.$v_read_size, $v_buffer); |
|
2648 | 2648 | |
2649 | 2649 | @fwrite($v_dest_file, $v_binary_data, $v_read_size); |
2650 | 2650 | |
@@ -2723,7 +2723,7 @@ discard block |
||
2723 | 2723 | |
2724 | 2724 | // header. |
2725 | 2725 | |
2726 | - eval('$v_result = ' . $p_params[ARCHIVE_ZIP_PARAM_POST_EXTRACT] . '(ARCHIVE_ZIP_PARAM_POST_EXTRACT, $v_local_header);'); |
|
2726 | + eval('$v_result = '.$p_params[ARCHIVE_ZIP_PARAM_POST_EXTRACT].'(ARCHIVE_ZIP_PARAM_POST_EXTRACT, $v_local_header);'); |
|
2727 | 2727 | } |
2728 | 2728 | |
2729 | 2729 | // ----- Return |
@@ -2861,7 +2861,7 @@ discard block |
||
2861 | 2861 | |
2862 | 2862 | // ----- Error log |
2863 | 2863 | |
2864 | - $this->_errorLog(ARCHIVE_ZIP_ERR_BAD_FORMAT, 'Invalid block size : ' . mb_strlen($v_binary_data)); |
|
2864 | + $this->_errorLog(ARCHIVE_ZIP_ERR_BAD_FORMAT, 'Invalid block size : '.mb_strlen($v_binary_data)); |
|
2865 | 2865 | |
2866 | 2866 | // ----- Return |
2867 | 2867 | |
@@ -3003,7 +3003,7 @@ discard block |
||
3003 | 3003 | |
3004 | 3004 | // ----- Error log |
3005 | 3005 | |
3006 | - $this->_errorLog(ARCHIVE_ZIP_ERR_BAD_FORMAT, 'Invalid block size : ' . mb_strlen($v_binary_data)); |
|
3006 | + $this->_errorLog(ARCHIVE_ZIP_ERR_BAD_FORMAT, 'Invalid block size : '.mb_strlen($v_binary_data)); |
|
3007 | 3007 | |
3008 | 3008 | // ----- Return |
3009 | 3009 | |
@@ -3117,7 +3117,7 @@ discard block |
||
3117 | 3117 | @fseek($this->_zip_fd, $v_size); |
3118 | 3118 | |
3119 | 3119 | if (@ftell($this->_zip_fd) != $v_size) { |
3120 | - $this->_errorLog(ARCHIVE_ZIP_ERR_BAD_FORMAT, 'Unable to go to the end of the archive \'' . $this->_zipname . '\''); |
|
3120 | + $this->_errorLog(ARCHIVE_ZIP_ERR_BAD_FORMAT, 'Unable to go to the end of the archive \''.$this->_zipname.'\''); |
|
3121 | 3121 | |
3122 | 3122 | return self::errorCode(); |
3123 | 3123 | } |
@@ -3134,7 +3134,7 @@ discard block |
||
3134 | 3134 | @fseek($this->_zip_fd, $v_size - 22); |
3135 | 3135 | |
3136 | 3136 | if (($v_pos = @ftell($this->_zip_fd)) != ($v_size - 22)) { |
3137 | - $this->_errorLog(ARCHIVE_ZIP_ERR_BAD_FORMAT, 'Unable to seek back to the middle of the archive \'' . $this->_zipname . '\''); |
|
3137 | + $this->_errorLog(ARCHIVE_ZIP_ERR_BAD_FORMAT, 'Unable to seek back to the middle of the archive \''.$this->_zipname.'\''); |
|
3138 | 3138 | |
3139 | 3139 | return self::errorCode(); |
3140 | 3140 | } |
@@ -3166,7 +3166,7 @@ discard block |
||
3166 | 3166 | @fseek($this->_zip_fd, $v_size - $v_maximum_size); |
3167 | 3167 | |
3168 | 3168 | if (@ftell($this->_zip_fd) != ($v_size - $v_maximum_size)) { |
3169 | - $this->_errorLog(ARCHIVE_ZIP_ERR_BAD_FORMAT, 'Unable to seek back to the middle of the archive \'' . $this->_zipname . '\''); |
|
3169 | + $this->_errorLog(ARCHIVE_ZIP_ERR_BAD_FORMAT, 'Unable to seek back to the middle of the archive \''.$this->_zipname.'\''); |
|
3170 | 3170 | |
3171 | 3171 | return self::errorCode(); |
3172 | 3172 | } |
@@ -3213,7 +3213,7 @@ discard block |
||
3213 | 3213 | // ----- Look for invalid block size |
3214 | 3214 | |
3215 | 3215 | if (18 != mb_strlen($v_binary_data)) { |
3216 | - $this->_errorLog(ARCHIVE_ZIP_ERR_BAD_FORMAT, 'Invalid End of Central Dir Record size : ' . mb_strlen($v_binary_data)); |
|
3216 | + $this->_errorLog(ARCHIVE_ZIP_ERR_BAD_FORMAT, 'Invalid End of Central Dir Record size : '.mb_strlen($v_binary_data)); |
|
3217 | 3217 | |
3218 | 3218 | return self::errorCode(); |
3219 | 3219 | } |
@@ -3369,7 +3369,7 @@ discard block |
||
3369 | 3369 | && (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])) { |
3370 | 3370 | $v_found = true; |
3371 | 3371 | } elseif ((0x00000010 == ($v_header_list[$v_nb_extracted]['external'] & 0x00000010)) /* Indicates a folder */ |
3372 | - && ($v_header_list[$v_nb_extracted]['stored_filename'] . '/' == $p_params[ARCHIVE_ZIP_PARAM_BY_NAME][$j])) { |
|
3372 | + && ($v_header_list[$v_nb_extracted]['stored_filename'].'/' == $p_params[ARCHIVE_ZIP_PARAM_BY_NAME][$j])) { |
|
3373 | 3373 | $v_found = true; |
3374 | 3374 | } |
3375 | 3375 | } // ----- Look for a filename |
@@ -3435,7 +3435,7 @@ discard block |
||
3435 | 3435 | if ($v_nb_extracted > 0) { |
3436 | 3436 | // ----- Creates a temporay file |
3437 | 3437 | |
3438 | - $v_zip_temp_name = ARCHIVE_ZIP_TEMPORARY_DIR . uniqid('archive_zip-') . '.tmp'; |
|
3438 | + $v_zip_temp_name = ARCHIVE_ZIP_TEMPORARY_DIR.uniqid('archive_zip-').'.tmp'; |
|
3439 | 3439 | |
3440 | 3440 | // ----- Creates a temporary zip archive |
3441 | 3441 | |
@@ -3774,7 +3774,7 @@ discard block |
||
3774 | 3774 | |
3775 | 3775 | // ----- Creates a temporay file |
3776 | 3776 | |
3777 | - $v_zip_temp_name = ARCHIVE_ZIP_TEMPORARY_DIR . uniqid('archive_zip-') . '.tmp'; |
|
3777 | + $v_zip_temp_name = ARCHIVE_ZIP_TEMPORARY_DIR.uniqid('archive_zip-').'.tmp'; |
|
3778 | 3778 | |
3779 | 3779 | // ----- Open the temporary file in write mode |
3780 | 3780 | |
@@ -3783,7 +3783,7 @@ discard block |
||
3783 | 3783 | |
3784 | 3784 | $p_archive_to_add->_closeFd(); |
3785 | 3785 | |
3786 | - $this->_errorLog(ARCHIVE_ZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \'' . $v_zip_temp_name . '\' in binary write mode'); |
|
3786 | + $this->_errorLog(ARCHIVE_ZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \''.$v_zip_temp_name.'\' in binary write mode'); |
|
3787 | 3787 | |
3788 | 3788 | return self::errorCode(); |
3789 | 3789 | } |
@@ -3981,7 +3981,7 @@ discard block |
||
3981 | 3981 | if (0 == ($v_zip_temp_fd = @fopen($p_archive_filename, 'rb'))) { |
3982 | 3982 | $this->_closeFd(); |
3983 | 3983 | |
3984 | - $this->_errorLog(ARCHIVE_ZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive file \'' . $p_archive_filename . '\' in binary write mode'); |
|
3984 | + $this->_errorLog(ARCHIVE_ZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive file \''.$p_archive_filename.'\' in binary write mode'); |
|
3985 | 3985 | |
3986 | 3986 | return self::errorCode(); |
3987 | 3987 | } |
@@ -4042,7 +4042,7 @@ discard block |
||
4042 | 4042 | |
4043 | 4043 | for (reset($p_params); [$v_key, $v_value] = each($p_params);) { |
4044 | 4044 | if (!isset($p_default[$v_key])) { |
4045 | - $this->_errorLog(ARCHIVE_ZIP_ERR_INVALID_PARAMETER, 'Unsupported parameter with key \'' . $v_key . '\''); |
|
4045 | + $this->_errorLog(ARCHIVE_ZIP_ERR_INVALID_PARAMETER, 'Unsupported parameter with key \''.$v_key.'\''); |
|
4046 | 4046 | |
4047 | 4047 | return self::errorCode(); |
4048 | 4048 | } |
@@ -4070,7 +4070,7 @@ discard block |
||
4070 | 4070 | |
4071 | 4071 | if (isset($p_params[$v_key]) && ('' != $p_params[$v_key])) { |
4072 | 4072 | if (!function_exists($p_params[$v_key])) { |
4073 | - $this->_errorLog(ARCHIVE_ZIP_ERR_INVALID_PARAM_VALUE, "Callback '" . $p_params[$v_key] . "()' is not an existing function for " . "parameter '" . $v_key . "'"); |
|
4073 | + $this->_errorLog(ARCHIVE_ZIP_ERR_INVALID_PARAM_VALUE, "Callback '".$p_params[$v_key]."()' is not an existing function for "."parameter '".$v_key."'"); |
|
4074 | 4074 | |
4075 | 4075 | return self::errorCode(); |
4076 | 4076 | } |
@@ -4179,7 +4179,7 @@ discard block |
||
4179 | 4179 | // ----- Ignore only the double '//' in path, |
4180 | 4180 | // but not the first and last '/' |
4181 | 4181 | } else { |
4182 | - $v_result = $v_list[$i] . ($i != (count($v_list) - 1) ? '/' . $v_result : ''); |
|
4182 | + $v_result = $v_list[$i].($i != (count($v_list) - 1) ? '/'.$v_result : ''); |
|
4183 | 4183 | } |
4184 | 4184 | } |
4185 | 4185 | } |