Changeset 47123 for trunk/src/wp-admin/includes/class-pclzip.php
- Timestamp:
- 01/29/2020 12:54:21 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-pclzip.php
r46105 r47123 35 35 // (which is not a very smart choice, specifically for windows paths !). 36 36 // A better separator should be a comma (,). This constant gives you the 37 // abil ty to change that.37 // ability to change that. 38 38 // However notice that changing this value, may have impact on existing 39 39 // scripts, using space separated filenames. 40 // Recomm anded values for compatibility with older versions :40 // Recommended values for compatibility with older versions : 41 41 //define( 'PCLZIP_SEPARATOR', ' ' ); 42 // Recomm anded values for smart separation of filenames.42 // Recommended values for smart separation of filenames. 43 43 if (!defined('PCLZIP_SEPARATOR')) { 44 44 define( 'PCLZIP_SEPARATOR', ',' ); … … 69 69 // ----- Optional threshold ratio for use of temporary files 70 70 // Pclzip sense the size of the file to add/extract and decide to 71 // use or not temporary file. The algor ythm is looking for71 // use or not temporary file. The algorithm is looking for 72 72 // memory_limit of PHP and apply a ratio. 73 73 // threshold = memory_limit * ratio. … … 249 249 // in the archive. 250 250 // In this synopsis, the function takes an optional variable list of 251 // options. See bel low the supported options.251 // options. See below the supported options. 252 252 // Parameters : 253 253 // $p_filelist : An array containing file or directory names, or … … 683 683 // file is not extracted. 684 684 // 685 // If both PCLZIP_OPT_PATH and PCLZIP_OPT_ADD_PATH aoptions685 // If both PCLZIP_OPT_PATH and PCLZIP_OPT_ADD_PATH options 686 686 // are used, the path indicated in PCLZIP_OPT_ADD_PATH is append 687 687 // at the end of the path value of PCLZIP_OPT_PATH. … … 1065 1065 // Description : 1066 1066 // ***** Deprecated ***** 1067 // delete(PCLZIP_OPT_BY_INDEX, $p_index) should be prefer ed.1067 // delete(PCLZIP_OPT_BY_INDEX, $p_index) should be preferred. 1068 1068 // -------------------------------------------------------------------------------- 1069 1069 function deleteByIndex($p_index) … … 1127 1127 } 1128 1128 1129 // ----- Read the central directory information s1129 // ----- Read the central directory information 1130 1130 $v_central_dir = array(); 1131 1131 if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1) … … 1392 1392 } 1393 1393 1394 // ----- Check that the file is read eable1394 // ----- Check that the file is readable 1395 1395 if (!is_readable($this->zipname)) { 1396 1396 // ----- Error log … … 1699 1699 $v_sort_flag=true; 1700 1700 1701 // ----- TBC : An automatic sort should be writ en ...1701 // ----- TBC : An automatic sort should be written ... 1702 1702 // ----- Error log 1703 1703 PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Invalid order of index range for option '".PclZipUtilOptionText($p_options_list[$i])."'"); … … 2190 2190 } 2191 2191 2192 // ----- Read the central directory information s2192 // ----- Read the central directory information 2193 2193 $v_central_dir = array(); 2194 2194 if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1) … … 2202 2202 @rewind($this->zip_fd); 2203 2203 2204 // ----- Creates a tempora y file2204 // ----- Creates a temporary file 2205 2205 $v_zip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.tmp'; 2206 2206 … … 2392 2392 // Description : 2393 2393 // $p_add_dir and $p_remove_dir will give the ability to memorize a path which is 2394 // different from the real path of the file. This is useful lif you want to have PclTar2394 // different from the real path of the file. This is useful if you want to have PclTar 2395 2395 // running in any directory, and memorize relative path from an other directory. 2396 2396 // Parameters : … … 2632 2632 } 2633 2633 2634 // ----- Update the information s2634 // ----- Update the information 2635 2635 // Only some fields can be modified 2636 2636 if ($p_header['stored_filename'] != $v_local_header['stored_filename']) { … … 2784 2784 } 2785 2785 2786 // ----- Update the information s2786 // ----- Update the information 2787 2787 // Nothing can be modified 2788 2788 } … … 2947 2947 2948 2948 // ----- Look for short name change 2949 // Its when we c ahnge just the filename but not the path2949 // Its when we change just the filename but not the path 2950 2950 if (isset($p_filedescr['new_short_name'])) { 2951 2951 $v_path_info = pathinfo($p_filename); … … 3170 3170 } 3171 3171 3172 // ----- Read the central directory information s3172 // ----- Read the central directory information 3173 3173 $v_central_dir = array(); 3174 3174 if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1) … … 3221 3221 // Function : privConvertHeader2FileInfo() 3222 3222 // Description : 3223 // This function takes the file information sfrom the central directory3223 // This function takes the file information from the central directory 3224 3224 // entries and extract the interesting parameters that will be given back. 3225 3225 // The resulting file infos are set in the array $p_info … … 3314 3314 } 3315 3315 3316 // ----- Read the central directory information s3316 // ----- Read the central directory information 3317 3317 $v_central_dir = array(); 3318 3318 if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1) … … 3714 3714 } 3715 3715 3716 // ----- Update the information s3716 // ----- Update the information 3717 3717 // Only some fields can be modified 3718 3718 $p_entry['filename'] = $v_local_header['filename']; … … 4081 4081 } 4082 4082 4083 // ----- Update the information s4083 // ----- Update the information 4084 4084 // Only some fields can be modified 4085 4085 $p_entry['filename'] = $v_local_header['filename']; … … 4194 4194 } 4195 4195 4196 // ----- Update the information s4196 // ----- Update the information 4197 4197 // Only some fields can be modified 4198 4198 $p_entry['filename'] = $v_local_header['filename']; … … 4690 4690 } 4691 4691 4692 // ----- Read the central directory information s4692 // ----- Read the central directory information 4693 4693 $v_central_dir = array(); 4694 4694 if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1) … … 4825 4825 if ($v_nb_extracted > 0) { 4826 4826 4827 // ----- Creates a tempora y file4827 // ----- Creates a temporary file 4828 4828 $v_zip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.tmp'; 4829 4829 … … 5076 5076 } 5077 5077 5078 // ----- Read the central directory information s5078 // ----- Read the central directory information 5079 5079 $v_central_dir = array(); 5080 5080 if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1) … … 5096 5096 } 5097 5097 5098 // ----- Read the central directory information s5098 // ----- Read the central directory information 5099 5099 $v_central_dir_to_add = array(); 5100 5100 if (($v_result = $p_archive_to_add->privReadEndCentralDir($v_central_dir_to_add)) != 1) … … 5109 5109 @rewind($p_archive_to_add->zip_fd); 5110 5110 5111 // ----- Creates a tempora y file5111 // ----- Creates a temporary file 5112 5112 $v_zip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.tmp'; 5113 5113
Note: See TracChangeset
for help on using the changeset viewer.