WordPress at Your Fingertips
function is not described

PclZip::privCheckFileHeaders() public WP 1.0

Function : privCheckFileHeaders() Description : Parameters : Return Values :
1 on success,
0 on error;

{} It's a method of the class: PclZip{}

No Hooks.

Return

null. Nothing.

Usage

$PclZip = new PclZip();
$PclZip->privCheckFileHeaders( $p_local_header, $p_central_header );
$p_local_header (required) (passed by reference — &)
-
$p_central_header (required) (passed by reference — &)
-

Code of PclZip::privCheckFileHeaders() WP 5.8.2

function privCheckFileHeaders(&$p_local_header, &$p_central_header)
{
  $v_result=1;

	// ----- Check the static values
	// TBC
	if ($p_local_header['filename'] != $p_central_header['filename']) {
	}
	if ($p_local_header['version_extracted'] != $p_central_header['version_extracted']) {
	}
	if ($p_local_header['flag'] != $p_central_header['flag']) {
	}
	if ($p_local_header['compression'] != $p_central_header['compression']) {
	}
	if ($p_local_header['mtime'] != $p_central_header['mtime']) {
	}
	if ($p_local_header['filename_len'] != $p_central_header['filename_len']) {
	}

	// ----- Look for flag bit 3
	if (($p_local_header['flag'] & 8) == 8) {
        $p_local_header['size'] = $p_central_header['size'];
        $p_local_header['compressed_size'] = $p_central_header['compressed_size'];
        $p_local_header['crc'] = $p_central_header['crc'];
	}

  // ----- Return
  return $v_result;
}