@@ 323-337 (lines=15) @@ | ||
320 | // ----- Look for 2 args |
|
321 | // Here we need to support the first historic synopsis of the |
|
322 | // method. |
|
323 | else { |
|
324 | ||
325 | // ----- Get the first argument |
|
326 | $v_options[PCLZIP_OPT_ADD_PATH] = $v_arg_list[0]; |
|
327 | ||
328 | // ----- Look for the optional second argument |
|
329 | if ($v_size == 2) { |
|
330 | $v_options[PCLZIP_OPT_REMOVE_PATH] = $v_arg_list[1]; |
|
331 | } |
|
332 | else if ($v_size > 2) { |
|
333 | PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, |
|
334 | "Invalid number / type of arguments"); |
|
335 | return 0; |
|
336 | } |
|
337 | } |
|
338 | } |
|
339 | ||
340 | // ----- Look for default option values |
|
@@ 508-524 (lines=17) @@ | ||
505 | // ----- Look for 2 args |
|
506 | // Here we need to support the first historic synopsis of the |
|
507 | // method. |
|
508 | else { |
|
509 | ||
510 | // ----- Get the first argument |
|
511 | $v_options[PCLZIP_OPT_ADD_PATH] = $v_add_path = $v_arg_list[0]; |
|
512 | ||
513 | // ----- Look for the optional second argument |
|
514 | if ($v_size == 2) { |
|
515 | $v_options[PCLZIP_OPT_REMOVE_PATH] = $v_arg_list[1]; |
|
516 | } |
|
517 | else if ($v_size > 2) { |
|
518 | // ----- Error log |
|
519 | PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid number / type of arguments"); |
|
520 | ||
521 | // ----- Return |
|
522 | return 0; |
|
523 | } |
|
524 | } |
|
525 | } |
|
526 | ||
527 | // ----- Look for default option values |