|
@@ 350-374 (lines=25) @@
|
| 347 |
|
$p_result_list = array(); |
| 348 |
|
|
| 349 |
|
// ----- Look if the $p_filelist is really an array |
| 350 |
|
if (is_array($p_filelist)) { |
| 351 |
|
|
| 352 |
|
// ----- Look if the first element is also an array |
| 353 |
|
// This will mean that this is a file description entry |
| 354 |
|
if (isset($p_filelist[0]) && is_array($p_filelist[0])) { |
| 355 |
|
$v_att_list = $p_filelist; |
| 356 |
|
} |
| 357 |
|
|
| 358 |
|
// ----- The list is a list of string names |
| 359 |
|
else { |
| 360 |
|
$v_string_list = $p_filelist; |
| 361 |
|
} |
| 362 |
|
} |
| 363 |
|
|
| 364 |
|
// ----- Look if the $p_filelist is a string |
| 365 |
|
else if (is_string($p_filelist)) { |
| 366 |
|
// ----- Create a list from the string |
| 367 |
|
$v_string_list = explode(PCLZIP_SEPARATOR, $p_filelist); |
| 368 |
|
} |
| 369 |
|
|
| 370 |
|
// ----- Invalid variable type for $p_filelist |
| 371 |
|
else { |
| 372 |
|
PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid variable type p_filelist"); |
| 373 |
|
return 0; |
| 374 |
|
} |
| 375 |
|
|
| 376 |
|
// ----- Reformat the string list |
| 377 |
|
if (sizeof($v_string_list) != 0) { |
|
@@ 537-561 (lines=25) @@
|
| 534 |
|
$p_result_list = array(); |
| 535 |
|
|
| 536 |
|
// ----- Look if the $p_filelist is really an array |
| 537 |
|
if (is_array($p_filelist)) { |
| 538 |
|
|
| 539 |
|
// ----- Look if the first element is also an array |
| 540 |
|
// This will mean that this is a file description entry |
| 541 |
|
if (isset($p_filelist[0]) && is_array($p_filelist[0])) { |
| 542 |
|
$v_att_list = $p_filelist; |
| 543 |
|
} |
| 544 |
|
|
| 545 |
|
// ----- The list is a list of string names |
| 546 |
|
else { |
| 547 |
|
$v_string_list = $p_filelist; |
| 548 |
|
} |
| 549 |
|
} |
| 550 |
|
|
| 551 |
|
// ----- Look if the $p_filelist is a string |
| 552 |
|
else if (is_string($p_filelist)) { |
| 553 |
|
// ----- Create a list from the string |
| 554 |
|
$v_string_list = explode(PCLZIP_SEPARATOR, $p_filelist); |
| 555 |
|
} |
| 556 |
|
|
| 557 |
|
// ----- Invalid variable type for $p_filelist |
| 558 |
|
else { |
| 559 |
|
PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid variable type '".gettype($p_filelist)."' for p_filelist"); |
| 560 |
|
return 0; |
| 561 |
|
} |
| 562 |
|
|
| 563 |
|
// ----- Reformat the string list |
| 564 |
|
if (sizeof($v_string_list) != 0) { |