Ticket #49163: class-pclzip.php.patch
| File class-pclzip.php.patch, 4.4 KB (added by , 6 years ago) |
|---|
-
wp-admin/includes/class-pclzip.php
34 34 // In version 1.x of PclZip, the separator for file list is a space 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 40 // Recommanded values for compatibility with older versions : … … 68 68 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. 74 74 // Recommended values are under 0.5. Default 0.47. … … 682 682 // By default, if a newer file with the same name already exists, the 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. 688 688 // Parameters : … … 1064 1064 // Function : deleteByIndex() 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) 1070 1070 { … … 1391 1391 return(false); 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 1397 1397 PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, "Unable to read archive '".$this->zipname."'"); … … 1698 1698 if ($v_result_list[$p_options_list[$i]][$j]['start'] < $v_sort_value) { 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])."'"); 1704 1704 … … 2201 2201 // ----- Go to beginning of File 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 2207 2207 // ----- Open the temporary file in write mode … … 2391 2391 // Function : privAddList() 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 : 2397 2397 // $p_list : An array containing the file or directory names to add in the tar … … 2946 2946 else { 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); 2952 2952 $v_dir = ''; … … 4824 4824 // ----- Look if something need to be deleted 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 4830 4830 // ----- Creates a temporary zip archive … … 5108 5108 // ----- Go to beginning of File 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 5114 5114 // ----- Open the temporary file in write mode