PclZip::extractByIndex() –

You appear to be a bot. Output may be restricted

Description

Usage

PclZip::extractByIndex( $p_index );

Parameters

$p_index
( mixed ) required

Returns

void

Source

File name: wordpress/wp-admin/includes/class-pclzip.php
Lines:

101 to 129 of 129
        }
      }
    }

    // ----- Trace

    // ----- Trick
    // Here I want to reuse extractByRule(), so I need to parse the $p_index
    // with privParseOptions()
    $v_arg_trick = array (PCLZIP_OPT_BY_INDEX, $p_index);
    $v_options_trick = array();
    $v_result = $this->PclZip::privParseOptions($v_arg_trick, sizeof($v_arg_trick), $v_options_trick,
                                        array (PCLZIP_OPT_BY_INDEX => 'optional' ));
    if ($v_result != 1) {
        return 0;
    }
    $v_options[PCLZIP_OPT_BY_INDEX] = $v_options_trick[PCLZIP_OPT_BY_INDEX];

    // ----- Look for default option values
    $this->PclZip::privOptionDefaultThreshold($v_options);

    // ----- Call the extracting fct
    if (($v_result = $this->PclZip::privExtractByRule($p_list, $v_path, $v_remove_path, $v_remove_all_path, $v_options)) < 1) {
        return(0);
    }

    // ----- Return
    return $p_list;
  }
 

 View on GitHub View on Trac