@@ -76,9 +76,9 @@ discard block |
||
76 | 76 | setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Label")), null, 'errors'); |
77 | 77 | $action = 'create'; |
78 | 78 | } else { |
79 | - $sql = "SELECT pcg_version FROM " . MAIN_DB_PREFIX . "accounting_system WHERE rowid = ".((int) getDolGlobalInt('CHARTOFACCOUNTS')); |
|
79 | + $sql = "SELECT pcg_version FROM ".MAIN_DB_PREFIX."accounting_system WHERE rowid = ".((int) getDolGlobalInt('CHARTOFACCOUNTS')); |
|
80 | 80 | |
81 | - dol_syslog('accountancy/admin/card.php:: $sql=' . $sql); |
|
81 | + dol_syslog('accountancy/admin/card.php:: $sql='.$sql); |
|
82 | 82 | $result = $db->query($sql); |
83 | 83 | $obj = $db->fetch_object($result); |
84 | 84 | |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | if (!$error) { |
124 | 124 | setEventMessages("RecordCreatedSuccessfully", null, 'mesgs'); |
125 | 125 | $urltogo = $backtopage ? $backtopage : DOL_URL_ROOT.'/accountancy/admin/account.php'; |
126 | - header("Location: " . $urltogo); |
|
126 | + header("Location: ".$urltogo); |
|
127 | 127 | exit; |
128 | 128 | } |
129 | 129 | } |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | |
142 | 142 | $sql = "SELECT pcg_version FROM ".MAIN_DB_PREFIX."accounting_system WHERE rowid=".((int) getDolGlobalInt('CHARTOFACCOUNTS')); |
143 | 143 | |
144 | - dol_syslog('accountancy/admin/card.php:: $sql=' . $sql); |
|
144 | + dol_syslog('accountancy/admin/card.php:: $sql='.$sql); |
|
145 | 145 | $result2 = $db->query($sql); |
146 | 146 | $obj = $db->fetch_object($result2); |
147 | 147 | |
@@ -171,8 +171,8 @@ discard block |
||
171 | 171 | $result = $object->update($user); |
172 | 172 | |
173 | 173 | if ($result > 0) { |
174 | - $urltogo = $backtopage ? $backtopage : ($_SERVER["PHP_SELF"] . "?id=" . $id); |
|
175 | - header("Location: " . $urltogo); |
|
174 | + $urltogo = $backtopage ? $backtopage : ($_SERVER["PHP_SELF"]."?id=".$id); |
|
175 | + header("Location: ".$urltogo); |
|
176 | 176 | exit(); |
177 | 177 | } elseif ($result == -2) { |
178 | 178 | setEventMessages($langs->trans("ErrorAccountNumberAlreadyExists", $object->account_number), null, 'errors'); |
@@ -264,14 +264,14 @@ discard block |
||
264 | 264 | print '<input type="text" name="pcg_type" list="pcg_type_datalist" value="'.dol_escape_htmltag(GETPOSTISSET('pcg_type') ? GETPOST('pcg_type', 'alpha') : $object->pcg_type).'">'; |
265 | 265 | // autosuggest from existing account types if found |
266 | 266 | print '<datalist id="pcg_type_datalist">'; |
267 | - $sql = "SELECT DISTINCT pcg_type FROM " . MAIN_DB_PREFIX . "accounting_account"; |
|
268 | - $sql .= " WHERE fk_pcg_version = '" . $db->escape($accountsystem->ref) . "'"; |
|
269 | - $sql .= ' AND entity in ('.getEntity('accounting_account', 0).')'; // Always limit to current entity. No sharing in accountancy. |
|
267 | + $sql = "SELECT DISTINCT pcg_type FROM ".MAIN_DB_PREFIX."accounting_account"; |
|
268 | + $sql .= " WHERE fk_pcg_version = '".$db->escape($accountsystem->ref)."'"; |
|
269 | + $sql .= ' AND entity in ('.getEntity('accounting_account', 0).')'; // Always limit to current entity. No sharing in accountancy. |
|
270 | 270 | $sql .= ' LIMIT 50000'; // just as a sanity check |
271 | 271 | $resql = $db->query($sql); |
272 | 272 | if ($resql) { |
273 | 273 | while ($obj = $db->fetch_object($resql)) { |
274 | - print '<option value="' . dol_escape_htmltag($obj->pcg_type) . '">'; |
|
274 | + print '<option value="'.dol_escape_htmltag($obj->pcg_type).'">'; |
|
275 | 275 | } |
276 | 276 | } |
277 | 277 | print '</datalist>'; |
@@ -341,14 +341,14 @@ discard block |
||
341 | 341 | print '<input type="text" name="pcg_type" list="pcg_type_datalist" value="'.dol_escape_htmltag(GETPOSTISSET('pcg_type') ? GETPOST('pcg_type', 'alpha') : $object->pcg_type).'">'; |
342 | 342 | // autosuggest from existing account types if found |
343 | 343 | print '<datalist id="pcg_type_datalist">'; |
344 | - $sql = 'SELECT DISTINCT pcg_type FROM ' . MAIN_DB_PREFIX . 'accounting_account'; |
|
345 | - $sql .= " WHERE fk_pcg_version = '" . $db->escape($accountsystem->ref) . "'"; |
|
346 | - $sql .= ' AND entity in ('.getEntity('accounting_account', 0).')'; // Always limit to current entity. No sharing in accountancy. |
|
344 | + $sql = 'SELECT DISTINCT pcg_type FROM '.MAIN_DB_PREFIX.'accounting_account'; |
|
345 | + $sql .= " WHERE fk_pcg_version = '".$db->escape($accountsystem->ref)."'"; |
|
346 | + $sql .= ' AND entity in ('.getEntity('accounting_account', 0).')'; // Always limit to current entity. No sharing in accountancy. |
|
347 | 347 | $sql .= ' LIMIT 50000'; // just as a sanity check |
348 | 348 | $resql = $db->query($sql); |
349 | 349 | if ($resql) { |
350 | 350 | while ($obj = $db->fetch_object($resql)) { |
351 | - print '<option value="' . dol_escape_htmltag($obj->pcg_type) . '">'; |
|
351 | + print '<option value="'.dol_escape_htmltag($obj->pcg_type).'">'; |
|
352 | 352 | } |
353 | 353 | } |
354 | 354 | print '</datalist>'; |
@@ -252,7 +252,7 @@ discard block |
||
252 | 252 | } |
253 | 253 | } |
254 | 254 | if (empty($error)) { |
255 | - header("Location: card.php?id=" . $object->id); |
|
255 | + header("Location: card.php?id=".$object->id); |
|
256 | 256 | exit; |
257 | 257 | } |
258 | 258 | } |
@@ -307,7 +307,7 @@ discard block |
||
307 | 307 | } else { |
308 | 308 | $result = $object->fetch($id); |
309 | 309 | |
310 | - $object->amount = $amount; |
|
310 | + $object->amount = $amount; |
|
311 | 311 | |
312 | 312 | $result = $object->update($user); |
313 | 313 | if ($result <= 0) { |
@@ -469,7 +469,7 @@ discard block |
||
469 | 469 | |
470 | 470 | // Auto create payment |
471 | 471 | print '<tr><td><label for="auto_create_paiement">'.$langs->trans('AutomaticCreationPayment').'</label></td>'; |
472 | - print '<td><input id="auto_create_paiement" name="auto_create_paiement" type="checkbox" ' . (empty($auto_create_payment) ? '' : 'checked="checked"') . ' value="1"></td></tr>'."\n"; |
|
472 | + print '<td><input id="auto_create_paiement" name="auto_create_paiement" type="checkbox" '.(empty($auto_create_payment) ? '' : 'checked="checked"').' value="1"></td></tr>'."\n"; |
|
473 | 473 | |
474 | 474 | print '<tr class="hide_if_no_auto_create_payment">'; |
475 | 475 | print '<td class="fieldrequired">'.$langs->trans("DatePayment").'</td><td>'; |
@@ -609,9 +609,9 @@ discard block |
||
609 | 609 | print '</td></tr>'; |
610 | 610 | |
611 | 611 | if ($action == 'edit') { |
612 | - print '<tr><td class="fieldrequired">' . $langs->trans("Amount") . '</td><td><input name="amount" size="10" value="' . price($object->amount) . '"></td></tr>'; |
|
612 | + print '<tr><td class="fieldrequired">'.$langs->trans("Amount").'</td><td><input name="amount" size="10" value="'.price($object->amount).'"></td></tr>'; |
|
613 | 613 | } else { |
614 | - print '<tr><td>' . $langs->trans("Amount") . '</td><td>' . price($object->amount) . '</td></tr>'; |
|
614 | + print '<tr><td>'.$langs->trans("Amount").'</td><td>'.price($object->amount).'</td></tr>'; |
|
615 | 615 | } |
616 | 616 | |
617 | 617 | // Mode of payment |
@@ -306,7 +306,7 @@ discard block |
||
306 | 306 | $this->type_payment = $obj->fk_typepayment; |
307 | 307 | $this->num_payment = $obj->num_payment; |
308 | 308 | $this->label = $obj->label; |
309 | - $this->note = $obj->note_private; // For backward compatibility |
|
309 | + $this->note = $obj->note_private; // For backward compatibility |
|
310 | 310 | $this->note_private = $obj->note_private; |
311 | 311 | $this->subledger_account = $obj->subledger_account; |
312 | 312 | $this->accountancy_code = $obj->accountancy_code; |
@@ -486,7 +486,7 @@ discard block |
||
486 | 486 | $sql .= ", ".($this->fk_project > 0 ? ((int) $this->fk_project) : 0); |
487 | 487 | $sql .= ", ".((int) $user->id); |
488 | 488 | $sql .= ", '".$this->db->idate($now)."'"; |
489 | - $sql .= ", NULL"; // Filled later |
|
489 | + $sql .= ", NULL"; // Filled later |
|
490 | 490 | $sql .= ", ".((int) $conf->entity); |
491 | 491 | $sql .= ")"; |
492 | 492 |
@@ -45,8 +45,8 @@ |
||
45 | 45 | |
46 | 46 | const STATUS_DRAFT = 0; |
47 | 47 | const STATUS_NOT_USED = 1; |
48 | - const STATUS_CREDITED = 2; // STATUS_CREDITED and STATUS_DEBITED is same. Difference is in ->type |
|
49 | - const STATUS_DEBITED = 2; // STATUS_CREDITED and STATUS_DEBITED is same. Difference is in ->type |
|
48 | + const STATUS_CREDITED = 2; // STATUS_CREDITED and STATUS_DEBITED is same. Difference is in ->type |
|
49 | + const STATUS_DEBITED = 2; // STATUS_CREDITED and STATUS_DEBITED is same. Difference is in ->type |
|
50 | 50 | const STATUS_REJECTED = 3; |
51 | 51 | |
52 | 52 |
@@ -199,12 +199,12 @@ discard block |
||
199 | 199 | print '<div class="div-table-responsive-no-min">'; |
200 | 200 | print '<table class="noborder centpercent">'; |
201 | 201 | print '<tr class="liste_titre">'; |
202 | -print getTitleFieldOfList('Name', 0, $_SERVER['PHP_SELF'], 'name', '', $param, '', $sortfield, $sortorder, '') . "\n"; |
|
202 | +print getTitleFieldOfList('Name', 0, $_SERVER['PHP_SELF'], 'name', '', $param, '', $sortfield, $sortorder, '')."\n"; |
|
203 | 203 | print getTitleFieldOfList("Value", 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder); |
204 | 204 | print getTitleFieldOfList("Comment", 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder); |
205 | -print getTitleFieldOfList('DateModificationShort', 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center ') . "\n"; |
|
205 | +print getTitleFieldOfList('DateModificationShort', 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center ')."\n"; |
|
206 | 206 | if (isModEnabled('multicompany') && !$user->entity) { |
207 | - print getTitleFieldOfList('Entity', 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center ') . "\n"; |
|
207 | + print getTitleFieldOfList('Entity', 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center ')."\n"; |
|
208 | 208 | } |
209 | 209 | print getTitleFieldOfList("", 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'center '); |
210 | 210 | print "</tr>\n"; |
@@ -227,12 +227,12 @@ discard block |
||
227 | 227 | // Limit to superadmin |
228 | 228 | if (isModEnabled('multicompany') && !$user->entity) { |
229 | 229 | print '<td>'; |
230 | - print '<input type="text" class="flat" size="1" name="entity" value="' . $conf->entity . '">'; |
|
230 | + print '<input type="text" class="flat" size="1" name="entity" value="'.$conf->entity.'">'; |
|
231 | 231 | print '</td>'; |
232 | 232 | print '<td class="center">'; |
233 | 233 | } else { |
234 | 234 | print '<td class="center">'; |
235 | - print '<input type="hidden" name="entity" value="' . $conf->entity . '">'; |
|
235 | + print '<input type="hidden" name="entity" value="'.$conf->entity.'">'; |
|
236 | 236 | } |
237 | 237 | print '<input type="submit" class="button button-add small" id="add" name="add" value="'.$langs->trans("Add").'">'; |
238 | 238 | print "</td>\n"; |
@@ -217,7 +217,7 @@ discard block |
||
217 | 217 | |
218 | 218 | // ----- Tests the zlib |
219 | 219 | if (!function_exists('gzopen')) { |
220 | - die('Abort ' . basename(__FILE__) . ' : Missing zlib extensions'); |
|
220 | + die('Abort '.basename(__FILE__).' : Missing zlib extensions'); |
|
221 | 221 | } |
222 | 222 | |
223 | 223 | // ----- Set the attributes |
@@ -538,7 +538,7 @@ discard block |
||
538 | 538 | |
539 | 539 | // ----- Invalid variable type for $p_filelist |
540 | 540 | } else { |
541 | - PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid variable type '" . gettype($p_filelist) . "' for p_filelist"); |
|
541 | + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid variable type '".gettype($p_filelist)."' for p_filelist"); |
|
542 | 542 | |
543 | 543 | return 0; |
544 | 544 | } |
@@ -942,7 +942,7 @@ discard block |
||
942 | 942 | // ----- Trick |
943 | 943 | // Here I want to reuse extractByRule(), so I need to parse the $p_index |
944 | 944 | // with privParseOptions() |
945 | - $v_arg_trick = array( |
|
945 | + $v_arg_trick = array( |
|
946 | 946 | PCLZIP_OPT_BY_INDEX, |
947 | 947 | $p_index |
948 | 948 | ); |
@@ -1100,7 +1100,7 @@ discard block |
||
1100 | 1100 | $this->privSwapBackMagicQuotes(); |
1101 | 1101 | |
1102 | 1102 | // ----- Error log |
1103 | - PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \'' . $this->zipname . '\' in binary read mode'); |
|
1103 | + PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \''.$this->zipname.'\' in binary read mode'); |
|
1104 | 1104 | |
1105 | 1105 | // ----- Return |
1106 | 1106 | return 0; |
@@ -1163,7 +1163,7 @@ discard block |
||
1163 | 1163 | // TBC : Should also check the archive format |
1164 | 1164 | if (!is_file($p_archive)) { |
1165 | 1165 | // ----- Error log |
1166 | - PclZip::privErrorLog(PCLZIP_ERR_MISSING_FILE, "No file with filename '" . $p_archive . "'"); |
|
1166 | + PclZip::privErrorLog(PCLZIP_ERR_MISSING_FILE, "No file with filename '".$p_archive."'"); |
|
1167 | 1167 | $v_result = PCLZIP_ERR_MISSING_FILE; |
1168 | 1168 | } else { |
1169 | 1169 | // ----- Duplicate the archive |
@@ -1288,7 +1288,7 @@ discard block |
||
1288 | 1288 | } |
1289 | 1289 | |
1290 | 1290 | if ($p_with_code) { |
1291 | - return ($v_value . ' (' . $this->error_code . ')'); |
|
1291 | + return ($v_value.' ('.$this->error_code.')'); |
|
1292 | 1292 | } else { |
1293 | 1293 | return ($v_value); |
1294 | 1294 | } |
@@ -1306,9 +1306,9 @@ discard block |
||
1306 | 1306 | return (PclErrorString()); |
1307 | 1307 | } else { |
1308 | 1308 | if ($p_full) { |
1309 | - return ($this->errorName(true) . " : " . $this->error_string); |
|
1309 | + return ($this->errorName(true)." : ".$this->error_string); |
|
1310 | 1310 | } else { |
1311 | - return ($this->error_string . " [code " . $this->error_code . "]"); |
|
1311 | + return ($this->error_string." [code ".$this->error_code."]"); |
|
1312 | 1312 | } |
1313 | 1313 | } |
1314 | 1314 | } |
@@ -1347,7 +1347,7 @@ discard block |
||
1347 | 1347 | // ----- Look if the file exits |
1348 | 1348 | if (!is_file($this->zipname)) { |
1349 | 1349 | // ----- Error log |
1350 | - PclZip::privErrorLog(PCLZIP_ERR_MISSING_FILE, "Missing archive file '" . $this->zipname . "'"); |
|
1350 | + PclZip::privErrorLog(PCLZIP_ERR_MISSING_FILE, "Missing archive file '".$this->zipname."'"); |
|
1351 | 1351 | |
1352 | 1352 | return (false); |
1353 | 1353 | } |
@@ -1355,7 +1355,7 @@ discard block |
||
1355 | 1355 | // ----- Check that the file is readeable |
1356 | 1356 | if (!is_readable($this->zipname)) { |
1357 | 1357 | // ----- Error log |
1358 | - PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, "Unable to read archive '" . $this->zipname . "'"); |
|
1358 | + PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, "Unable to read archive '".$this->zipname."'"); |
|
1359 | 1359 | |
1360 | 1360 | return (false); |
1361 | 1361 | } |
@@ -1400,7 +1400,7 @@ discard block |
||
1400 | 1400 | // ----- Check if the option is supported |
1401 | 1401 | if (!isset($v_requested_options[$p_options_list[$i]])) { |
1402 | 1402 | // ----- Error log |
1403 | - PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid optional parameter '" . $p_options_list[$i] . "' for this method"); |
|
1403 | + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid optional parameter '".$p_options_list[$i]."' for this method"); |
|
1404 | 1404 | |
1405 | 1405 | // ----- Return |
1406 | 1406 | return PclZip::errorCode(); |
@@ -1415,7 +1415,7 @@ discard block |
||
1415 | 1415 | // ----- Check the number of parameters |
1416 | 1416 | if (($i + 1) >= $p_size) { |
1417 | 1417 | // ----- Error log |
1418 | - PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '" . PclZipUtilOptionText($p_options_list[$i]) . "'"); |
|
1418 | + PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); |
|
1419 | 1419 | |
1420 | 1420 | // ----- Return |
1421 | 1421 | return PclZip::errorCode(); |
@@ -1429,14 +1429,14 @@ discard block |
||
1429 | 1429 | case PCLZIP_OPT_TEMP_FILE_THRESHOLD: |
1430 | 1430 | // ----- Check the number of parameters |
1431 | 1431 | if (($i + 1) >= $p_size) { |
1432 | - PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '" . PclZipUtilOptionText($p_options_list[$i]) . "'"); |
|
1432 | + PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); |
|
1433 | 1433 | |
1434 | 1434 | return PclZip::errorCode(); |
1435 | 1435 | } |
1436 | 1436 | |
1437 | 1437 | // ----- Check for incompatible options |
1438 | 1438 | if (isset($v_result_list[PCLZIP_OPT_TEMP_FILE_OFF])) { |
1439 | - PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Option '" . PclZipUtilOptionText($p_options_list[$i]) . "' can not be used with option 'PCLZIP_OPT_TEMP_FILE_OFF'"); |
|
1439 | + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Option '".PclZipUtilOptionText($p_options_list[$i])."' can not be used with option 'PCLZIP_OPT_TEMP_FILE_OFF'"); |
|
1440 | 1440 | |
1441 | 1441 | return PclZip::errorCode(); |
1442 | 1442 | } |
@@ -1444,7 +1444,7 @@ discard block |
||
1444 | 1444 | // ----- Check the value |
1445 | 1445 | $v_value = $p_options_list[$i + 1]; |
1446 | 1446 | if ((!is_integer($v_value)) || ($v_value < 0)) { |
1447 | - PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Integer expected for option '" . PclZipUtilOptionText($p_options_list[$i]) . "'"); |
|
1447 | + PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Integer expected for option '".PclZipUtilOptionText($p_options_list[$i])."'"); |
|
1448 | 1448 | |
1449 | 1449 | return PclZip::errorCode(); |
1450 | 1450 | } |
@@ -1457,7 +1457,7 @@ discard block |
||
1457 | 1457 | case PCLZIP_OPT_TEMP_FILE_ON: |
1458 | 1458 | // ----- Check for incompatible options |
1459 | 1459 | if (isset($v_result_list[PCLZIP_OPT_TEMP_FILE_OFF])) { |
1460 | - PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Option '" . PclZipUtilOptionText($p_options_list[$i]) . "' can not be used with option 'PCLZIP_OPT_TEMP_FILE_OFF'"); |
|
1460 | + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Option '".PclZipUtilOptionText($p_options_list[$i])."' can not be used with option 'PCLZIP_OPT_TEMP_FILE_OFF'"); |
|
1461 | 1461 | |
1462 | 1462 | return PclZip::errorCode(); |
1463 | 1463 | } |
@@ -1468,13 +1468,13 @@ discard block |
||
1468 | 1468 | case PCLZIP_OPT_TEMP_FILE_OFF: |
1469 | 1469 | // ----- Check for incompatible options |
1470 | 1470 | if (isset($v_result_list[PCLZIP_OPT_TEMP_FILE_ON])) { |
1471 | - PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Option '" . PclZipUtilOptionText($p_options_list[$i]) . "' can not be used with option 'PCLZIP_OPT_TEMP_FILE_ON'"); |
|
1471 | + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Option '".PclZipUtilOptionText($p_options_list[$i])."' can not be used with option 'PCLZIP_OPT_TEMP_FILE_ON'"); |
|
1472 | 1472 | |
1473 | 1473 | return PclZip::errorCode(); |
1474 | 1474 | } |
1475 | 1475 | // ----- Check for incompatible options |
1476 | 1476 | if (isset($v_result_list[PCLZIP_OPT_TEMP_FILE_THRESHOLD])) { |
1477 | - PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Option '" . PclZipUtilOptionText($p_options_list[$i]) . "' can not be used with option 'PCLZIP_OPT_TEMP_FILE_THRESHOLD'"); |
|
1477 | + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Option '".PclZipUtilOptionText($p_options_list[$i])."' can not be used with option 'PCLZIP_OPT_TEMP_FILE_THRESHOLD'"); |
|
1478 | 1478 | |
1479 | 1479 | return PclZip::errorCode(); |
1480 | 1480 | } |
@@ -1486,7 +1486,7 @@ discard block |
||
1486 | 1486 | // ----- Check the number of parameters |
1487 | 1487 | if (($i + 1) >= $p_size) { |
1488 | 1488 | // ----- Error log |
1489 | - PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '" . PclZipUtilOptionText($p_options_list[$i]) . "'"); |
|
1489 | + PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); |
|
1490 | 1490 | |
1491 | 1491 | // ----- Return |
1492 | 1492 | return PclZip::errorCode(); |
@@ -1505,7 +1505,7 @@ discard block |
||
1505 | 1505 | // ----- Check the number of parameters |
1506 | 1506 | if (($i + 1) >= $p_size) { |
1507 | 1507 | // ----- Error log |
1508 | - PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '" . PclZipUtilOptionText($p_options_list[$i]) . "'"); |
|
1508 | + PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); |
|
1509 | 1509 | |
1510 | 1510 | // ----- Return |
1511 | 1511 | return PclZip::errorCode(); |
@@ -1518,7 +1518,7 @@ discard block |
||
1518 | 1518 | $v_result_list[$p_options_list[$i]] = $p_options_list[$i + 1]; |
1519 | 1519 | } else { |
1520 | 1520 | // ----- Error log |
1521 | - PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Wrong parameter value for option '" . PclZipUtilOptionText($p_options_list[$i]) . "'"); |
|
1521 | + PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Wrong parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); |
|
1522 | 1522 | |
1523 | 1523 | // ----- Return |
1524 | 1524 | return PclZip::errorCode(); |
@@ -1536,7 +1536,7 @@ discard block |
||
1536 | 1536 | // ----- Check the number of parameters |
1537 | 1537 | if (($i + 1) >= $p_size) { |
1538 | 1538 | // ----- Error log |
1539 | - PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '" . PclZipUtilOptionText($p_options_list[$i]) . "'"); |
|
1539 | + PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); |
|
1540 | 1540 | |
1541 | 1541 | // ----- Return |
1542 | 1542 | return PclZip::errorCode(); |
@@ -1547,7 +1547,7 @@ discard block |
||
1547 | 1547 | $v_result_list[$p_options_list[$i]] = $p_options_list[$i + 1]; |
1548 | 1548 | } else { |
1549 | 1549 | // ----- Error log |
1550 | - PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Wrong parameter value for option '" . PclZipUtilOptionText($p_options_list[$i]) . "'"); |
|
1550 | + PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Wrong parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); |
|
1551 | 1551 | |
1552 | 1552 | // ----- Return |
1553 | 1553 | return PclZip::errorCode(); |
@@ -1562,7 +1562,7 @@ discard block |
||
1562 | 1562 | // ----- Check the number of parameters |
1563 | 1563 | if (($i + 1) >= $p_size) { |
1564 | 1564 | // ----- Error log |
1565 | - PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '" . PclZipUtilOptionText($p_options_list[$i]) . "'"); |
|
1565 | + PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); |
|
1566 | 1566 | |
1567 | 1567 | // ----- Return |
1568 | 1568 | return PclZip::errorCode(); |
@@ -1573,7 +1573,7 @@ discard block |
||
1573 | 1573 | $v_result_list[$p_options_list[$i]] = $p_options_list[$i + 1]; |
1574 | 1574 | } else { |
1575 | 1575 | // ----- Error log |
1576 | - PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Wrong parameter value for option '" . PclZipUtilOptionText($p_options_list[$i]) . "'"); |
|
1576 | + PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Wrong parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); |
|
1577 | 1577 | |
1578 | 1578 | // ----- Return |
1579 | 1579 | return PclZip::errorCode(); |
@@ -1586,7 +1586,7 @@ discard block |
||
1586 | 1586 | // ----- Check the number of parameters |
1587 | 1587 | if (($i + 1) >= $p_size) { |
1588 | 1588 | // ----- Error log |
1589 | - PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '" . PclZipUtilOptionText($p_options_list[$i]) . "'"); |
|
1589 | + PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); |
|
1590 | 1590 | |
1591 | 1591 | // ----- Return |
1592 | 1592 | return PclZip::errorCode(); |
@@ -1602,12 +1602,12 @@ discard block |
||
1602 | 1602 | // ----- Parse items |
1603 | 1603 | $v_work_list = explode(",", $p_options_list[$i + 1]); |
1604 | 1604 | } elseif (is_integer($p_options_list[$i + 1])) { |
1605 | - $v_work_list[0] = $p_options_list[$i + 1] . '-' . $p_options_list[$i + 1]; |
|
1605 | + $v_work_list[0] = $p_options_list[$i + 1].'-'.$p_options_list[$i + 1]; |
|
1606 | 1606 | } elseif (is_array($p_options_list[$i + 1])) { |
1607 | 1607 | $v_work_list = $p_options_list[$i + 1]; |
1608 | 1608 | } else { |
1609 | 1609 | // ----- Error log |
1610 | - PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Value must be integer, string or array for option '" . PclZipUtilOptionText($p_options_list[$i]) . "'"); |
|
1610 | + PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Value must be integer, string or array for option '".PclZipUtilOptionText($p_options_list[$i])."'"); |
|
1611 | 1611 | |
1612 | 1612 | // ----- Return |
1613 | 1613 | return PclZip::errorCode(); |
@@ -1638,7 +1638,7 @@ discard block |
||
1638 | 1638 | $v_result_list[$p_options_list[$i]][$j]['end'] = $v_item_list[1]; |
1639 | 1639 | } else { |
1640 | 1640 | // ----- Error log |
1641 | - PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Too many values in index range for option '" . PclZipUtilOptionText($p_options_list[$i]) . "'"); |
|
1641 | + PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Too many values in index range for option '".PclZipUtilOptionText($p_options_list[$i])."'"); |
|
1642 | 1642 | |
1643 | 1643 | // ----- Return |
1644 | 1644 | return PclZip::errorCode(); |
@@ -1650,7 +1650,7 @@ discard block |
||
1650 | 1650 | |
1651 | 1651 | // ----- TBC : An automatic sort should be writen ... |
1652 | 1652 | // ----- Error log |
1653 | - PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Invalid order of index range for option '" . PclZipUtilOptionText($p_options_list[$i]) . "'"); |
|
1653 | + PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Invalid order of index range for option '".PclZipUtilOptionText($p_options_list[$i])."'"); |
|
1654 | 1654 | |
1655 | 1655 | // ----- Return |
1656 | 1656 | return PclZip::errorCode(); |
@@ -1682,7 +1682,7 @@ discard block |
||
1682 | 1682 | // ----- Check the number of parameters |
1683 | 1683 | if (($i + 1) >= $p_size) { |
1684 | 1684 | // ----- Error log |
1685 | - PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '" . PclZipUtilOptionText($p_options_list[$i]) . "'"); |
|
1685 | + PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); |
|
1686 | 1686 | |
1687 | 1687 | // ----- Return |
1688 | 1688 | return PclZip::errorCode(); |
@@ -1707,7 +1707,7 @@ discard block |
||
1707 | 1707 | // ----- Check the number of parameters |
1708 | 1708 | if (($i + 1) >= $p_size) { |
1709 | 1709 | // ----- Error log |
1710 | - PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '" . PclZipUtilOptionText($p_options_list[$i]) . "'"); |
|
1710 | + PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); |
|
1711 | 1711 | |
1712 | 1712 | // ----- Return |
1713 | 1713 | return PclZip::errorCode(); |
@@ -1719,7 +1719,7 @@ discard block |
||
1719 | 1719 | // ----- Check that the value is a valid existing function |
1720 | 1720 | if (!function_exists($v_function_name)) { |
1721 | 1721 | // ----- Error log |
1722 | - PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Function '" . $v_function_name . "()' is not an existing function for option '" . PclZipUtilOptionText($p_options_list[$i]) . "'"); |
|
1722 | + PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Function '".$v_function_name."()' is not an existing function for option '".PclZipUtilOptionText($p_options_list[$i])."'"); |
|
1723 | 1723 | |
1724 | 1724 | // ----- Return |
1725 | 1725 | return PclZip::errorCode(); |
@@ -1732,7 +1732,7 @@ discard block |
||
1732 | 1732 | |
1733 | 1733 | default: |
1734 | 1734 | // ----- Error log |
1735 | - PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Unknown parameter '" . $p_options_list[$i] . "'"); |
|
1735 | + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Unknown parameter '".$p_options_list[$i]."'"); |
|
1736 | 1736 | |
1737 | 1737 | // ----- Return |
1738 | 1738 | return PclZip::errorCode(); |
@@ -1750,7 +1750,7 @@ discard block |
||
1750 | 1750 | // ----- Look if present |
1751 | 1751 | if (!isset($v_result_list[$key])) { |
1752 | 1752 | // ----- Error log |
1753 | - PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Missing mandatory parameter " . PclZipUtilOptionText($key) . "(" . $key . ")"); |
|
1753 | + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Missing mandatory parameter ".PclZipUtilOptionText($key)."(".$key.")"); |
|
1754 | 1754 | |
1755 | 1755 | // ----- Return |
1756 | 1756 | return PclZip::errorCode(); |
@@ -1831,7 +1831,7 @@ discard block |
||
1831 | 1831 | // ----- Check if the option is supported |
1832 | 1832 | if (!isset($v_requested_options[$v_key])) { |
1833 | 1833 | // ----- Error log |
1834 | - PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid file attribute '" . $v_key . "' for this file"); |
|
1834 | + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid file attribute '".$v_key."' for this file"); |
|
1835 | 1835 | |
1836 | 1836 | // ----- Return |
1837 | 1837 | return PclZip::errorCode(); |
@@ -1841,7 +1841,7 @@ discard block |
||
1841 | 1841 | switch ($v_key) { |
1842 | 1842 | case PCLZIP_ATT_FILE_NAME: |
1843 | 1843 | if (!is_string($v_value)) { |
1844 | - PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid type " . gettype($v_value) . ". String expected for attribute '" . PclZipUtilOptionText($v_key) . "'"); |
|
1844 | + PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid type ".gettype($v_value).". String expected for attribute '".PclZipUtilOptionText($v_key)."'"); |
|
1845 | 1845 | |
1846 | 1846 | return PclZip::errorCode(); |
1847 | 1847 | } |
@@ -1849,7 +1849,7 @@ discard block |
||
1849 | 1849 | $p_filedescr['filename'] = PclZipUtilPathReduction($v_value); |
1850 | 1850 | |
1851 | 1851 | if ($p_filedescr['filename'] == '') { |
1852 | - PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid empty filename for attribute '" . PclZipUtilOptionText($v_key) . "'"); |
|
1852 | + PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid empty filename for attribute '".PclZipUtilOptionText($v_key)."'"); |
|
1853 | 1853 | |
1854 | 1854 | return PclZip::errorCode(); |
1855 | 1855 | } |
@@ -1858,7 +1858,7 @@ discard block |
||
1858 | 1858 | |
1859 | 1859 | case PCLZIP_ATT_FILE_NEW_SHORT_NAME: |
1860 | 1860 | if (!is_string($v_value)) { |
1861 | - PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid type " . gettype($v_value) . ". String expected for attribute '" . PclZipUtilOptionText($v_key) . "'"); |
|
1861 | + PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid type ".gettype($v_value).". String expected for attribute '".PclZipUtilOptionText($v_key)."'"); |
|
1862 | 1862 | |
1863 | 1863 | return PclZip::errorCode(); |
1864 | 1864 | } |
@@ -1866,7 +1866,7 @@ discard block |
||
1866 | 1866 | $p_filedescr['new_short_name'] = PclZipUtilPathReduction($v_value); |
1867 | 1867 | |
1868 | 1868 | if ($p_filedescr['new_short_name'] == '') { |
1869 | - PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid empty short filename for attribute '" . PclZipUtilOptionText($v_key) . "'"); |
|
1869 | + PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid empty short filename for attribute '".PclZipUtilOptionText($v_key)."'"); |
|
1870 | 1870 | |
1871 | 1871 | return PclZip::errorCode(); |
1872 | 1872 | } |
@@ -1874,7 +1874,7 @@ discard block |
||
1874 | 1874 | |
1875 | 1875 | case PCLZIP_ATT_FILE_NEW_FULL_NAME: |
1876 | 1876 | if (!is_string($v_value)) { |
1877 | - PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid type " . gettype($v_value) . ". String expected for attribute '" . PclZipUtilOptionText($v_key) . "'"); |
|
1877 | + PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid type ".gettype($v_value).". String expected for attribute '".PclZipUtilOptionText($v_key)."'"); |
|
1878 | 1878 | |
1879 | 1879 | return PclZip::errorCode(); |
1880 | 1880 | } |
@@ -1882,7 +1882,7 @@ discard block |
||
1882 | 1882 | $p_filedescr['new_full_name'] = PclZipUtilPathReduction($v_value); |
1883 | 1883 | |
1884 | 1884 | if ($p_filedescr['new_full_name'] == '') { |
1885 | - PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid empty full filename for attribute '" . PclZipUtilOptionText($v_key) . "'"); |
|
1885 | + PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid empty full filename for attribute '".PclZipUtilOptionText($v_key)."'"); |
|
1886 | 1886 | |
1887 | 1887 | return PclZip::errorCode(); |
1888 | 1888 | } |
@@ -1891,7 +1891,7 @@ discard block |
||
1891 | 1891 | // ----- Look for options that takes a string |
1892 | 1892 | case PCLZIP_ATT_FILE_COMMENT: |
1893 | 1893 | if (!is_string($v_value)) { |
1894 | - PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid type " . gettype($v_value) . ". String expected for attribute '" . PclZipUtilOptionText($v_key) . "'"); |
|
1894 | + PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid type ".gettype($v_value).". String expected for attribute '".PclZipUtilOptionText($v_key)."'"); |
|
1895 | 1895 | |
1896 | 1896 | return PclZip::errorCode(); |
1897 | 1897 | } |
@@ -1901,7 +1901,7 @@ discard block |
||
1901 | 1901 | |
1902 | 1902 | case PCLZIP_ATT_FILE_MTIME: |
1903 | 1903 | if (!is_integer($v_value)) { |
1904 | - PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid type " . gettype($v_value) . ". Integer expected for attribute '" . PclZipUtilOptionText($v_key) . "'"); |
|
1904 | + PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid type ".gettype($v_value).". Integer expected for attribute '".PclZipUtilOptionText($v_key)."'"); |
|
1905 | 1905 | |
1906 | 1906 | return PclZip::errorCode(); |
1907 | 1907 | } |
@@ -1915,7 +1915,7 @@ discard block |
||
1915 | 1915 | |
1916 | 1916 | default: |
1917 | 1917 | // ----- Error log |
1918 | - PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Unknown parameter '" . $v_key . "'"); |
|
1918 | + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Unknown parameter '".$v_key."'"); |
|
1919 | 1919 | |
1920 | 1920 | // ----- Return |
1921 | 1921 | return PclZip::errorCode(); |
@@ -1928,7 +1928,7 @@ discard block |
||
1928 | 1928 | if ($v_requested_options[$key] == 'mandatory') { |
1929 | 1929 | // ----- Look if present |
1930 | 1930 | if (!isset($p_file_list[$key])) { |
1931 | - PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Missing mandatory parameter " . PclZipUtilOptionText($key) . "(" . $key . ")"); |
|
1931 | + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Missing mandatory parameter ".PclZipUtilOptionText($key)."(".$key.")"); |
|
1932 | 1932 | |
1933 | 1933 | return PclZip::errorCode(); |
1934 | 1934 | } |
@@ -1996,7 +1996,7 @@ discard block |
||
1996 | 1996 | // ----- Missing file |
1997 | 1997 | } else { |
1998 | 1998 | // ----- Error log |
1999 | - PclZip::privErrorLog(PCLZIP_ERR_MISSING_FILE, "File '" . $v_descr['filename'] . "' does not exist"); |
|
1999 | + PclZip::privErrorLog(PCLZIP_ERR_MISSING_FILE, "File '".$v_descr['filename']."' does not exist"); |
|
2000 | 2000 | |
2001 | 2001 | // ----- Return |
2002 | 2002 | return PclZip::errorCode(); |
@@ -2022,14 +2022,14 @@ discard block |
||
2022 | 2022 | } |
2023 | 2023 | |
2024 | 2024 | // ----- Compose the full filename |
2025 | - $v_dirlist_descr[$v_dirlist_nb]['filename'] = $v_descr['filename'] . '/' . $v_item_handler; |
|
2025 | + $v_dirlist_descr[$v_dirlist_nb]['filename'] = $v_descr['filename'].'/'.$v_item_handler; |
|
2026 | 2026 | |
2027 | 2027 | // ----- Look for different stored filename |
2028 | 2028 | // Because the name of the folder was changed, the name of the |
2029 | 2029 | // files/sub-folders also change |
2030 | 2030 | if (($v_descr['stored_filename'] != $v_descr['filename']) && (!isset($p_options[PCLZIP_OPT_REMOVE_ALL_PATH]))) { |
2031 | 2031 | if ($v_descr['stored_filename'] != '') { |
2032 | - $v_dirlist_descr[$v_dirlist_nb]['new_full_name'] = $v_descr['stored_filename'] . '/' . $v_item_handler; |
|
2032 | + $v_dirlist_descr[$v_dirlist_nb]['new_full_name'] = $v_descr['stored_filename'].'/'.$v_item_handler; |
|
2033 | 2033 | } else { |
2034 | 2034 | $v_dirlist_descr[$v_dirlist_nb]['new_full_name'] = $v_item_handler; |
2035 | 2035 | } |
@@ -2147,14 +2147,14 @@ discard block |
||
2147 | 2147 | @rewind($this->zip_fd); |
2148 | 2148 | |
2149 | 2149 | // ----- Creates a temporay file |
2150 | - $v_zip_temp_name = PCLZIP_TEMPORARY_DIR . uniqid('pclzip-') . '.tmp'; |
|
2150 | + $v_zip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.tmp'; |
|
2151 | 2151 | |
2152 | 2152 | // ----- Open the temporary file in write mode |
2153 | 2153 | if (($v_zip_temp_fd = @fopen($v_zip_temp_name, 'wb')) == 0) { |
2154 | 2154 | $this->privCloseFd(); |
2155 | 2155 | $this->privSwapBackMagicQuotes(); |
2156 | 2156 | |
2157 | - PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \'' . $v_zip_temp_name . '\' in binary write mode'); |
|
2157 | + PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \''.$v_zip_temp_name.'\' in binary write mode'); |
|
2158 | 2158 | |
2159 | 2159 | // ----- Return |
2160 | 2160 | return PclZip::errorCode(); |
@@ -2227,10 +2227,10 @@ discard block |
||
2227 | 2227 | $v_comment = $p_options[PCLZIP_OPT_COMMENT]; |
2228 | 2228 | } |
2229 | 2229 | if (isset($p_options[PCLZIP_OPT_ADD_COMMENT])) { |
2230 | - $v_comment = $v_comment . $p_options[PCLZIP_OPT_ADD_COMMENT]; |
|
2230 | + $v_comment = $v_comment.$p_options[PCLZIP_OPT_ADD_COMMENT]; |
|
2231 | 2231 | } |
2232 | 2232 | if (isset($p_options[PCLZIP_OPT_PREPEND_COMMENT])) { |
2233 | - $v_comment = $p_options[PCLZIP_OPT_PREPEND_COMMENT] . $v_comment; |
|
2233 | + $v_comment = $p_options[PCLZIP_OPT_PREPEND_COMMENT].$v_comment; |
|
2234 | 2234 | } |
2235 | 2235 | |
2236 | 2236 | // ----- Calculate the size of the central header |
@@ -2286,7 +2286,7 @@ discard block |
||
2286 | 2286 | // ----- Look if already open |
2287 | 2287 | if ($this->zip_fd != 0) { |
2288 | 2288 | // ----- Error log |
2289 | - PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Zip file \'' . $this->zipname . '\' already open'); |
|
2289 | + PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Zip file \''.$this->zipname.'\' already open'); |
|
2290 | 2290 | |
2291 | 2291 | // ----- Return |
2292 | 2292 | return PclZip::errorCode(); |
@@ -2295,7 +2295,7 @@ discard block |
||
2295 | 2295 | // ----- Open the zip file |
2296 | 2296 | if (($this->zip_fd = @fopen($this->zipname, $p_mode)) == 0) { |
2297 | 2297 | // ----- Error log |
2298 | - PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \'' . $this->zipname . '\' in ' . $p_mode . ' mode'); |
|
2298 | + PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \''.$this->zipname.'\' in '.$p_mode.' mode'); |
|
2299 | 2299 | |
2300 | 2300 | // ----- Return |
2301 | 2301 | return PclZip::errorCode(); |
@@ -2421,7 +2421,7 @@ discard block |
||
2421 | 2421 | |
2422 | 2422 | // ----- Check the filename |
2423 | 2423 | if (($p_filedescr_list[$j]['type'] != 'virtual_file') && (!file_exists($p_filedescr_list[$j]['filename']))) { |
2424 | - PclZip::privErrorLog(PCLZIP_ERR_MISSING_FILE, "File '" . $p_filedescr_list[$j]['filename'] . "' does not exist"); |
|
2424 | + PclZip::privErrorLog(PCLZIP_ERR_MISSING_FILE, "File '".$p_filedescr_list[$j]['filename']."' does not exist"); |
|
2425 | 2425 | |
2426 | 2426 | return PclZip::errorCode(); |
2427 | 2427 | } |
@@ -2728,10 +2728,10 @@ discard block |
||
2728 | 2728 | } |
2729 | 2729 | |
2730 | 2730 | // ----- Creates a compressed temporary file |
2731 | - $v_gzip_temp_name = PCLZIP_TEMPORARY_DIR . uniqid('pclzip-') . '.gz'; |
|
2731 | + $v_gzip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.gz'; |
|
2732 | 2732 | if (($v_file_compressed = @gzopen($v_gzip_temp_name, "wb")) == 0) { |
2733 | 2733 | fclose($v_file); |
2734 | - PclZip::privErrorLog(PCLZIP_ERR_WRITE_OPEN_FAIL, 'Unable to open temporary file \'' . $v_gzip_temp_name . '\' in binary write mode'); |
|
2734 | + PclZip::privErrorLog(PCLZIP_ERR_WRITE_OPEN_FAIL, 'Unable to open temporary file \''.$v_gzip_temp_name.'\' in binary write mode'); |
|
2735 | 2735 | |
2736 | 2736 | return PclZip::errorCode(); |
2737 | 2737 | } |
@@ -2752,14 +2752,14 @@ discard block |
||
2752 | 2752 | |
2753 | 2753 | // ----- Check the minimum file size |
2754 | 2754 | if (filesize($v_gzip_temp_name) < 18) { |
2755 | - PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'gzip temporary file \'' . $v_gzip_temp_name . '\' has invalid filesize - should be minimum 18 bytes'); |
|
2755 | + PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'gzip temporary file \''.$v_gzip_temp_name.'\' has invalid filesize - should be minimum 18 bytes'); |
|
2756 | 2756 | |
2757 | 2757 | return PclZip::errorCode(); |
2758 | 2758 | } |
2759 | 2759 | |
2760 | 2760 | // ----- Extract the compressed attributes |
2761 | 2761 | if (($v_file_compressed = @fopen($v_gzip_temp_name, "rb")) == 0) { |
2762 | - PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \'' . $v_gzip_temp_name . '\' in binary read mode'); |
|
2762 | + PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \''.$v_gzip_temp_name.'\' in binary read mode'); |
|
2763 | 2763 | |
2764 | 2764 | return PclZip::errorCode(); |
2765 | 2765 | } |
@@ -2792,7 +2792,7 @@ discard block |
||
2792 | 2792 | |
2793 | 2793 | // ----- Add the compressed data |
2794 | 2794 | if (($v_file_compressed = @fopen($v_gzip_temp_name, "rb")) == 0) { |
2795 | - PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \'' . $v_gzip_temp_name . '\' in binary read mode'); |
|
2795 | + PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \''.$v_gzip_temp_name.'\' in binary read mode'); |
|
2796 | 2796 | |
2797 | 2797 | return PclZip::errorCode(); |
2798 | 2798 | } |
@@ -2863,9 +2863,9 @@ discard block |
||
2863 | 2863 | $v_path_info = pathinfo($p_filename); |
2864 | 2864 | $v_dir = ''; |
2865 | 2865 | if ($v_path_info['dirname'] != '') { |
2866 | - $v_dir = $v_path_info['dirname'] . '/'; |
|
2866 | + $v_dir = $v_path_info['dirname'].'/'; |
|
2867 | 2867 | } |
2868 | - $v_stored_filename = $v_dir . $p_filedescr['new_short_name']; |
|
2868 | + $v_stored_filename = $v_dir.$p_filedescr['new_short_name']; |
|
2869 | 2869 | } else { |
2870 | 2870 | // ----- Calculate the stored filename |
2871 | 2871 | $v_stored_filename = $p_filename; |
@@ -2884,7 +2884,7 @@ discard block |
||
2884 | 2884 | if ((substr($p_filename, 0, 2) == "./") || (substr($p_remove_dir, 0, 2) == "./")) { |
2885 | 2885 | |
2886 | 2886 | if ((substr($p_filename, 0, 2) == "./") && (substr($p_remove_dir, 0, 2) != "./")) { |
2887 | - $p_remove_dir = "./" . $p_remove_dir; |
|
2887 | + $p_remove_dir = "./".$p_remove_dir; |
|
2888 | 2888 | } |
2889 | 2889 | if ((substr($p_filename, 0, 2) != "./") && (substr($p_remove_dir, 0, 2) == "./")) { |
2890 | 2890 | $p_remove_dir = substr($p_remove_dir, 2); |
@@ -2907,9 +2907,9 @@ discard block |
||
2907 | 2907 | // ----- Look for path to add |
2908 | 2908 | if ($p_add_dir != "") { |
2909 | 2909 | if (substr($p_add_dir, -1) == "/") { |
2910 | - $v_stored_filename = $p_add_dir . $v_stored_filename; |
|
2910 | + $v_stored_filename = $p_add_dir.$v_stored_filename; |
|
2911 | 2911 | } else { |
2912 | - $v_stored_filename = $p_add_dir . "/" . $v_stored_filename; |
|
2912 | + $v_stored_filename = $p_add_dir."/".$v_stored_filename; |
|
2913 | 2913 | } |
2914 | 2914 | } |
2915 | 2915 | } |
@@ -3046,7 +3046,7 @@ discard block |
||
3046 | 3046 | $this->privSwapBackMagicQuotes(); |
3047 | 3047 | |
3048 | 3048 | // ----- Error log |
3049 | - PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \'' . $this->zipname . '\' in binary read mode'); |
|
3049 | + PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \''.$this->zipname.'\' in binary read mode'); |
|
3050 | 3050 | |
3051 | 3051 | // ----- Return |
3052 | 3052 | return PclZip::errorCode(); |
@@ -3165,7 +3165,7 @@ discard block |
||
3165 | 3165 | |
3166 | 3166 | // ----- Check the path |
3167 | 3167 | if (($p_path == "") || ((substr($p_path, 0, 1) != "/") && (substr($p_path, 0, 3) != "../") && (substr($p_path, 1, 2) != ":/"))) { |
3168 | - $p_path = "./" . $p_path; |
|
3168 | + $p_path = "./".$p_path; |
|
3169 | 3169 | } |
3170 | 3170 | |
3171 | 3171 | // ----- Reduce the path last (and duplicated) '/' |
@@ -3309,7 +3309,7 @@ discard block |
||
3309 | 3309 | |
3310 | 3310 | $this->privSwapBackMagicQuotes(); |
3311 | 3311 | |
3312 | - PclZip::privErrorLog(PCLZIP_ERR_UNSUPPORTED_COMPRESSION, "Filename '" . $v_header['stored_filename'] . "' is " . "compressed by an unsupported compression " . "method (" . $v_header['compression'] . ") "); |
|
3312 | + PclZip::privErrorLog(PCLZIP_ERR_UNSUPPORTED_COMPRESSION, "Filename '".$v_header['stored_filename']."' is "."compressed by an unsupported compression "."method (".$v_header['compression'].") "); |
|
3313 | 3313 | |
3314 | 3314 | return PclZip::errorCode(); |
3315 | 3315 | } |
@@ -3324,7 +3324,7 @@ discard block |
||
3324 | 3324 | |
3325 | 3325 | $this->privSwapBackMagicQuotes(); |
3326 | 3326 | |
3327 | - PclZip::privErrorLog(PCLZIP_ERR_UNSUPPORTED_ENCRYPTION, "Unsupported encryption for " . " filename '" . $v_header['stored_filename'] . "'"); |
|
3327 | + PclZip::privErrorLog(PCLZIP_ERR_UNSUPPORTED_ENCRYPTION, "Unsupported encryption for "." filename '".$v_header['stored_filename']."'"); |
|
3328 | 3328 | |
3329 | 3329 | return PclZip::errorCode(); |
3330 | 3330 | } |
@@ -3515,7 +3515,7 @@ discard block |
||
3515 | 3515 | |
3516 | 3516 | // ----- Add the path |
3517 | 3517 | if ($p_path != '') { |
3518 | - $p_entry['filename'] = $p_path . "/" . $p_entry['filename']; |
|
3518 | + $p_entry['filename'] = $p_path."/".$p_entry['filename']; |
|
3519 | 3519 | } |
3520 | 3520 | |
3521 | 3521 | // ----- Check a base_dir_restriction |
@@ -3523,7 +3523,7 @@ discard block |
||
3523 | 3523 | $v_inclusion = PclZipUtilPathInclusion($p_options[PCLZIP_OPT_EXTRACT_DIR_RESTRICTION], $p_entry['filename']); |
3524 | 3524 | if ($v_inclusion == 0) { |
3525 | 3525 | |
3526 | - PclZip::privErrorLog(PCLZIP_ERR_DIRECTORY_RESTRICTION, "Filename '" . $p_entry['filename'] . "' is " . "outside PCLZIP_OPT_EXTRACT_DIR_RESTRICTION"); |
|
3526 | + PclZip::privErrorLog(PCLZIP_ERR_DIRECTORY_RESTRICTION, "Filename '".$p_entry['filename']."' is "."outside PCLZIP_OPT_EXTRACT_DIR_RESTRICTION"); |
|
3527 | 3527 | |
3528 | 3528 | return PclZip::errorCode(); |
3529 | 3529 | } |
@@ -3576,7 +3576,7 @@ discard block |
||
3576 | 3576 | // when this kind of error occurs. |
3577 | 3577 | if ((isset($p_options[PCLZIP_OPT_STOP_ON_ERROR])) && ($p_options[PCLZIP_OPT_STOP_ON_ERROR] === true)) { |
3578 | 3578 | |
3579 | - PclZip::privErrorLog(PCLZIP_ERR_ALREADY_A_DIRECTORY, "Filename '" . $p_entry['filename'] . "' is " . "already used by an existing directory"); |
|
3579 | + PclZip::privErrorLog(PCLZIP_ERR_ALREADY_A_DIRECTORY, "Filename '".$p_entry['filename']."' is "."already used by an existing directory"); |
|
3580 | 3580 | |
3581 | 3581 | return PclZip::errorCode(); |
3582 | 3582 | } |
@@ -3592,7 +3592,7 @@ discard block |
||
3592 | 3592 | // when this kind of error occurs. |
3593 | 3593 | if ((isset($p_options[PCLZIP_OPT_STOP_ON_ERROR])) && ($p_options[PCLZIP_OPT_STOP_ON_ERROR] === true)) { |
3594 | 3594 | |
3595 | - PclZip::privErrorLog(PCLZIP_ERR_WRITE_OPEN_FAIL, "Filename '" . $p_entry['filename'] . "' exists " . "and is write protected"); |
|
3595 | + PclZip::privErrorLog(PCLZIP_ERR_WRITE_OPEN_FAIL, "Filename '".$p_entry['filename']."' exists "."and is write protected"); |
|
3596 | 3596 | |
3597 | 3597 | return PclZip::errorCode(); |
3598 | 3598 | } |
@@ -3609,7 +3609,7 @@ discard block |
||
3609 | 3609 | // when this kind of error occurs. |
3610 | 3610 | if ((isset($p_options[PCLZIP_OPT_STOP_ON_ERROR])) && ($p_options[PCLZIP_OPT_STOP_ON_ERROR] === true)) { |
3611 | 3611 | |
3612 | - PclZip::privErrorLog(PCLZIP_ERR_WRITE_OPEN_FAIL, "Newer version of '" . $p_entry['filename'] . "' exists " . "and option PCLZIP_OPT_REPLACE_NEWER is not selected"); |
|
3612 | + PclZip::privErrorLog(PCLZIP_ERR_WRITE_OPEN_FAIL, "Newer version of '".$p_entry['filename']."' exists "."and option PCLZIP_OPT_REPLACE_NEWER is not selected"); |
|
3613 | 3613 | |
3614 | 3614 | return PclZip::errorCode(); |
3615 | 3615 | } |
@@ -3680,7 +3680,7 @@ discard block |
||
3680 | 3680 | // ----- TBC |
3681 | 3681 | // Need to be finished |
3682 | 3682 | if (($p_entry['flag'] & 1) == 1) { |
3683 | - PclZip::privErrorLog(PCLZIP_ERR_UNSUPPORTED_ENCRYPTION, 'File \'' . $p_entry['filename'] . '\' is encrypted. Encrypted files are not supported.'); |
|
3683 | + PclZip::privErrorLog(PCLZIP_ERR_UNSUPPORTED_ENCRYPTION, 'File \''.$p_entry['filename'].'\' is encrypted. Encrypted files are not supported.'); |
|
3684 | 3684 | |
3685 | 3685 | return PclZip::errorCode(); |
3686 | 3686 | } |
@@ -3781,10 +3781,10 @@ discard block |
||
3781 | 3781 | $v_result = 1; |
3782 | 3782 | |
3783 | 3783 | // ----- Creates a temporary file |
3784 | - $v_gzip_temp_name = PCLZIP_TEMPORARY_DIR . uniqid('pclzip-') . '.gz'; |
|
3784 | + $v_gzip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.gz'; |
|
3785 | 3785 | if (($v_dest_file = @fopen($v_gzip_temp_name, "wb")) == 0) { |
3786 | 3786 | fclose($v_file); |
3787 | - PclZip::privErrorLog(PCLZIP_ERR_WRITE_OPEN_FAIL, 'Unable to open temporary file \'' . $v_gzip_temp_name . '\' in binary write mode'); |
|
3787 | + PclZip::privErrorLog(PCLZIP_ERR_WRITE_OPEN_FAIL, 'Unable to open temporary file \''.$v_gzip_temp_name.'\' in binary write mode'); |
|
3788 | 3788 | |
3789 | 3789 | return PclZip::errorCode(); |
3790 | 3790 | } |
@@ -3821,7 +3821,7 @@ discard block |
||
3821 | 3821 | if (($v_src_file = @gzopen($v_gzip_temp_name, 'rb')) == 0) { |
3822 | 3822 | @fclose($v_dest_file); |
3823 | 3823 | $p_entry['status'] = "read_error"; |
3824 | - PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \'' . $v_gzip_temp_name . '\' in binary read mode'); |
|
3824 | + PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \''.$v_gzip_temp_name.'\' in binary read mode'); |
|
3825 | 3825 | |
3826 | 3826 | return PclZip::errorCode(); |
3827 | 3827 | } |
@@ -4105,7 +4105,7 @@ discard block |
||
4105 | 4105 | $p_header['status'] = "invalid_header"; |
4106 | 4106 | |
4107 | 4107 | // ----- Error log |
4108 | - PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Invalid block size : " . strlen($v_binary_data)); |
|
4108 | + PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Invalid block size : ".strlen($v_binary_data)); |
|
4109 | 4109 | |
4110 | 4110 | // ----- Return |
4111 | 4111 | return PclZip::errorCode(); |
@@ -4202,7 +4202,7 @@ discard block |
||
4202 | 4202 | $p_header['status'] = "invalid_header"; |
4203 | 4203 | |
4204 | 4204 | // ----- Error log |
4205 | - PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Invalid block size : " . strlen($v_binary_data)); |
|
4205 | + PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Invalid block size : ".strlen($v_binary_data)); |
|
4206 | 4206 | |
4207 | 4207 | // ----- Return |
4208 | 4208 | return PclZip::errorCode(); |
@@ -4326,7 +4326,7 @@ discard block |
||
4326 | 4326 | @fseek($this->zip_fd, $v_size); |
4327 | 4327 | if (@ftell($this->zip_fd) != $v_size) { |
4328 | 4328 | // ----- Error log |
4329 | - PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Unable to go to the end of the archive \'' . $this->zipname . '\''); |
|
4329 | + PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Unable to go to the end of the archive \''.$this->zipname.'\''); |
|
4330 | 4330 | |
4331 | 4331 | // ----- Return |
4332 | 4332 | return PclZip::errorCode(); |
@@ -4339,7 +4339,7 @@ discard block |
||
4339 | 4339 | @fseek($this->zip_fd, $v_size - 22); |
4340 | 4340 | if (($v_pos = @ftell($this->zip_fd)) != ($v_size - 22)) { |
4341 | 4341 | // ----- Error log |
4342 | - PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Unable to seek back to the middle of the archive \'' . $this->zipname . '\''); |
|
4342 | + PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Unable to seek back to the middle of the archive \''.$this->zipname.'\''); |
|
4343 | 4343 | |
4344 | 4344 | // ----- Return |
4345 | 4345 | return PclZip::errorCode(); |
@@ -4366,7 +4366,7 @@ discard block |
||
4366 | 4366 | @fseek($this->zip_fd, $v_size - $v_maximum_size); |
4367 | 4367 | if (@ftell($this->zip_fd) != ($v_size - $v_maximum_size)) { |
4368 | 4368 | // ----- Error log |
4369 | - PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Unable to seek back to the middle of the archive \'' . $this->zipname . '\''); |
|
4369 | + PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Unable to seek back to the middle of the archive \''.$this->zipname.'\''); |
|
4370 | 4370 | |
4371 | 4371 | // ----- Return |
4372 | 4372 | return PclZip::errorCode(); |
@@ -4412,7 +4412,7 @@ discard block |
||
4412 | 4412 | if (strlen($v_binary_data) != 18) { |
4413 | 4413 | |
4414 | 4414 | // ----- Error log |
4415 | - PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Invalid End of Central Dir Record size : " . strlen($v_binary_data)); |
|
4415 | + PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Invalid End of Central Dir Record size : ".strlen($v_binary_data)); |
|
4416 | 4416 | |
4417 | 4417 | // ----- Return |
4418 | 4418 | return PclZip::errorCode(); |
@@ -4430,7 +4430,7 @@ discard block |
||
4430 | 4430 | // While decrypted, zip has training 0 bytes |
4431 | 4431 | if (0) { |
4432 | 4432 | // ----- Error log |
4433 | - PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'The central dir is not at the end of the archive.' . ' Some trailing bytes exists after the archive.'); |
|
4433 | + PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'The central dir is not at the end of the archive.'.' Some trailing bytes exists after the archive.'); |
|
4434 | 4434 | |
4435 | 4435 | // ----- Return |
4436 | 4436 | return PclZip::errorCode(); |
@@ -4535,7 +4535,7 @@ discard block |
||
4535 | 4535 | // ----- Look if the directory is in the filename path |
4536 | 4536 | if ((strlen($v_header_list[$v_nb_extracted]['stored_filename']) > strlen($p_options[PCLZIP_OPT_BY_NAME][$j])) && (substr($v_header_list[$v_nb_extracted]['stored_filename'], 0, strlen($p_options[PCLZIP_OPT_BY_NAME][$j])) == $p_options[PCLZIP_OPT_BY_NAME][$j])) { |
4537 | 4537 | $v_found = true; |
4538 | - } elseif ((($v_header_list[$v_nb_extracted]['external'] & 0x00000010) == 0x00000010) /* Indicates a folder */ && ($v_header_list[$v_nb_extracted]['stored_filename'] . '/' == $p_options[PCLZIP_OPT_BY_NAME][$j])) { |
|
4538 | + } elseif ((($v_header_list[$v_nb_extracted]['external'] & 0x00000010) == 0x00000010) /* Indicates a folder */ && ($v_header_list[$v_nb_extracted]['stored_filename'].'/' == $p_options[PCLZIP_OPT_BY_NAME][$j])) { |
|
4539 | 4539 | $v_found = true; |
4540 | 4540 | } |
4541 | 4541 | |
@@ -4597,7 +4597,7 @@ discard block |
||
4597 | 4597 | if ($v_nb_extracted > 0) { |
4598 | 4598 | |
4599 | 4599 | // ----- Creates a temporay file |
4600 | - $v_zip_temp_name = PCLZIP_TEMPORARY_DIR . uniqid('pclzip-') . '.tmp'; |
|
4600 | + $v_zip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.tmp'; |
|
4601 | 4601 | |
4602 | 4602 | // ----- Creates a temporary zip archive |
4603 | 4603 | $v_temp_zip = new PclZip($v_zip_temp_name); |
@@ -4866,14 +4866,14 @@ discard block |
||
4866 | 4866 | @rewind($p_archive_to_add->zip_fd); |
4867 | 4867 | |
4868 | 4868 | // ----- Creates a temporay file |
4869 | - $v_zip_temp_name = PCLZIP_TEMPORARY_DIR . uniqid('pclzip-') . '.tmp'; |
|
4869 | + $v_zip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.tmp'; |
|
4870 | 4870 | |
4871 | 4871 | // ----- Open the temporary file in write mode |
4872 | 4872 | if (($v_zip_temp_fd = @fopen($v_zip_temp_name, 'wb')) == 0) { |
4873 | 4873 | $this->privCloseFd(); |
4874 | 4874 | $p_archive_to_add->privCloseFd(); |
4875 | 4875 | |
4876 | - PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \'' . $v_zip_temp_name . '\' in binary write mode'); |
|
4876 | + PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \''.$v_zip_temp_name.'\' in binary write mode'); |
|
4877 | 4877 | |
4878 | 4878 | // ----- Return |
4879 | 4879 | return PclZip::errorCode(); |
@@ -4920,7 +4920,7 @@ discard block |
||
4920 | 4920 | } |
4921 | 4921 | |
4922 | 4922 | // ----- Merge the file comments |
4923 | - $v_comment = $v_central_dir['comment'] . ' ' . $v_central_dir_to_add['comment']; |
|
4923 | + $v_comment = $v_central_dir['comment'].' '.$v_central_dir_to_add['comment']; |
|
4924 | 4924 | |
4925 | 4925 | // ----- Calculate the size of the (new) central header |
4926 | 4926 | $v_size = @ftell($v_zip_temp_fd) - $v_offset; |
@@ -5002,7 +5002,7 @@ discard block |
||
5002 | 5002 | if (($v_zip_temp_fd = @fopen($p_archive_filename, 'rb')) == 0) { |
5003 | 5003 | $this->privCloseFd(); |
5004 | 5004 | |
5005 | - PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive file \'' . $p_archive_filename . '\' in binary write mode'); |
|
5005 | + PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive file \''.$p_archive_filename.'\' in binary write mode'); |
|
5006 | 5006 | |
5007 | 5007 | // ----- Return |
5008 | 5008 | return PclZip::errorCode(); |
@@ -5155,7 +5155,7 @@ discard block |
||
5155 | 5155 | } elseif ($v_list[$i] == "") { |
5156 | 5156 | // ----- First '/' i.e. root slash |
5157 | 5157 | if ($i == 0) { |
5158 | - $v_result = "/" . $v_result; |
|
5158 | + $v_result = "/".$v_result; |
|
5159 | 5159 | if ($v_skip > 0) { |
5160 | 5160 | // ----- It is an invalid path, so the path is not modified |
5161 | 5161 | // TBC |
@@ -5177,7 +5177,7 @@ discard block |
||
5177 | 5177 | if ($v_skip > 0) { |
5178 | 5178 | $v_skip--; |
5179 | 5179 | } else { |
5180 | - $v_result = $v_list[$i] . ($i != (sizeof($v_list) - 1) ? "/" . $v_result : ""); |
|
5180 | + $v_result = $v_list[$i].($i != (sizeof($v_list) - 1) ? "/".$v_result : ""); |
|
5181 | 5181 | } |
5182 | 5182 | } |
5183 | 5183 | } |
@@ -5185,7 +5185,7 @@ discard block |
||
5185 | 5185 | // ----- Look for skip |
5186 | 5186 | if ($v_skip > 0) { |
5187 | 5187 | while ($v_skip > 0) { |
5188 | - $v_result = '../' . $v_result; |
|
5188 | + $v_result = '../'.$v_result; |
|
5189 | 5189 | $v_skip--; |
5190 | 5190 | } |
5191 | 5191 | } |
@@ -5217,10 +5217,10 @@ discard block |
||
5217 | 5217 | |
5218 | 5218 | // ----- Look for path beginning by ./ |
5219 | 5219 | if (($p_dir == '.') || ((strlen($p_dir) >= 2) && (substr($p_dir, 0, 2) == './'))) { |
5220 | - $p_dir = PclZipUtilTranslateWinPath(getcwd(), false) . '/' . substr($p_dir, 1); |
|
5220 | + $p_dir = PclZipUtilTranslateWinPath(getcwd(), false).'/'.substr($p_dir, 1); |
|
5221 | 5221 | } |
5222 | 5222 | if (($p_path == '.') || ((strlen($p_path) >= 2) && (substr($p_path, 0, 2) == './'))) { |
5223 | - $p_path = PclZipUtilTranslateWinPath(getcwd(), false) . '/' . substr($p_path, 1); |
|
5223 | + $p_path = PclZipUtilTranslateWinPath(getcwd(), false).'/'.substr($p_path, 1); |
|
5224 | 5224 | } |
5225 | 5225 | |
5226 | 5226 | // ----- Explode dir and path by directory separator |
@@ -255,7 +255,7 @@ |
||
255 | 255 | foreach ($handlers as $handler) { |
256 | 256 | $assoc[$handler->getHandledKeyword()] = $handler; |
257 | 257 | } |
258 | - uasort($assoc, function ($a, $b) { |
|
258 | + uasort($assoc, function($a, $b) { |
|
259 | 259 | return $a->getPriorityOver($b->getHandledKeyword()); |
260 | 260 | }); |
261 | 261 | $this->handlers = $assoc; |
@@ -257,7 +257,7 @@ |
||
257 | 257 | } |
258 | 258 | $streamContext = stream_context_create($options); |
259 | 259 | |
260 | - set_error_handler(function ($type, $msg) { |
|
260 | + set_error_handler(function($type, $msg) { |
|
261 | 261 | throw new Swift_TransportException('Connection could not be established with host '.$this->params['host'].' :'.$msg); |
262 | 262 | }); |
263 | 263 | try { |
@@ -183,7 +183,7 @@ |
||
183 | 183 | { |
184 | 184 | list($domain, $username) = $this->getDomainAndUsername($username); |
185 | 185 | //$challenge, $context, $targetInfoH, $targetName, $domainName, $workstation, $DNSDomainName, $DNSServerName, $blob, $ter |
186 | - list($challenge, , , , , $workstation, , , $blob) = $this->parseMessage2($response); |
|
186 | + list($challenge,,,,, $workstation,,, $blob) = $this->parseMessage2($response); |
|
187 | 187 | |
188 | 188 | if (!$v2) { |
189 | 189 | // LMv1 |