Code Duplication    Length = 22-22 lines in 2 locations

main/inc/lib/pclzip/pclzip.lib.php 2 locations

@@ 3952-3973 (lines=22) @@
3949
    }
3950
3951
  	// ----- Change abort status
3952
  	if ($p_entry['status'] == "aborted") {
3953
        $p_entry['status'] = "skipped";
3954
  	}
3955
3956
    // ----- Look for post-extract callback
3957
    elseif (isset($p_options[PCLZIP_CB_POST_EXTRACT])) {
3958
3959
      // ----- Generate a local information
3960
      $v_local_header = array();
3961
      $this->privConvertHeader2FileInfo($p_entry, $v_local_header);
3962
3963
      // ----- Call the callback
3964
      // Here I do not use call_user_func() because I need to send a reference to the
3965
      // header.
3966
//      eval('$v_result = '.$p_options[PCLZIP_CB_POST_EXTRACT].'(PCLZIP_CB_POST_EXTRACT, $v_local_header);');
3967
      $v_result = $p_options[PCLZIP_CB_POST_EXTRACT](PCLZIP_CB_POST_EXTRACT, $v_local_header);
3968
3969
      // ----- Look for abort result
3970
      if ($v_result == 2) {
3971
      	$v_result = PCLZIP_ERR_USER_ABORTED;
3972
      }
3973
    }
3974
3975
    // ----- Return
3976
    return $v_result;
@@ 4141-4162 (lines=22) @@
4138
    }
4139
4140
	// ----- Change abort status
4141
	if ($p_entry['status'] == "aborted") {
4142
      $p_entry['status'] = "skipped";
4143
	}
4144
4145
    // ----- Look for post-extract callback
4146
    elseif (isset($p_options[PCLZIP_CB_POST_EXTRACT])) {
4147
4148
      // ----- Generate a local information
4149
      $v_local_header = array();
4150
      $this->privConvertHeader2FileInfo($p_entry, $v_local_header);
4151
4152
      // ----- Call the callback
4153
      // Here I do not use call_user_func() because I need to send a reference to the
4154
      // header.
4155
//      eval('$v_result = '.$p_options[PCLZIP_CB_POST_EXTRACT].'(PCLZIP_CB_POST_EXTRACT, $v_local_header);');
4156
      $v_result = $p_options[PCLZIP_CB_POST_EXTRACT](PCLZIP_CB_POST_EXTRACT, $v_local_header);
4157
4158
      // ----- Look for abort result
4159
      if ($v_result == 2) {
4160
      	$v_result = PCLZIP_ERR_USER_ABORTED;
4161
      }
4162
    }
4163
4164
    return $v_result;
4165
  }