WordPress.org

Make WordPress Core

Ticket #49163: class-pclzip.php.patch

File class-pclzip.php.patch, 4.4 KB (added by passoniate, 7 months ago)

patch

  • wp-admin/includes/class-pclzip.php

     
    3434  // In version 1.x of PclZip, the separator for file list is a space
    3535  // (which is not a very smart choice, specifically for windows paths !).
    3636  // A better separator should be a comma (,). This constant gives you the
    37   // abilty to change that.
     37  // ability to change that.
    3838  // However notice that changing this value, may have impact on existing
    3939  // scripts, using space separated filenames.
    4040  // Recommanded values for compatibility with older versions :
     
    6868
    6969  // ----- Optional threshold ratio for use of temporary files
    7070  //       Pclzip sense the size of the file to add/extract and decide to
    71   //       use or not temporary file. The algorythm is looking for
     71  //       use or not temporary file. The algorithm is looking for
    7272  //       memory_limit of PHP and apply a ratio.
    7373  //       threshold = memory_limit * ratio.
    7474  //       Recommended values are under 0.5. Default 0.47.
     
    682682  //   By default, if a newer file with the same name already exists, the
    683683  //   file is not extracted.
    684684  //
    685   //   If both PCLZIP_OPT_PATH and PCLZIP_OPT_ADD_PATH aoptions
     685  //   If both PCLZIP_OPT_PATH and PCLZIP_OPT_ADD_PATH options
    686686  //   are used, the path indicated in PCLZIP_OPT_ADD_PATH is append
    687687  //   at the end of the path value of PCLZIP_OPT_PATH.
    688688  // Parameters :
     
    10641064  // Function : deleteByIndex()
    10651065  // Description :
    10661066  //   ***** Deprecated *****
    1067   //   delete(PCLZIP_OPT_BY_INDEX, $p_index) should be prefered.
     1067  //   delete(PCLZIP_OPT_BY_INDEX, $p_index) should be preferred.
    10681068  // --------------------------------------------------------------------------------
    10691069  function deleteByIndex($p_index)
    10701070  {
     
    13911391      return(false);
    13921392    }
    13931393
    1394     // ----- Check that the file is readeable
     1394    // ----- Check that the file is readable
    13951395    if (!is_readable($this->zipname)) {
    13961396      // ----- Error log
    13971397      PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, "Unable to read archive '".$this->zipname."'");
     
    16981698              if ($v_result_list[$p_options_list[$i]][$j]['start'] < $v_sort_value) {
    16991699                  $v_sort_flag=true;
    17001700
    1701                   // ----- TBC : An automatic sort should be writen ...
     1701                  // ----- TBC : An automatic sort should be written ...
    17021702                  // ----- Error log
    17031703                  PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Invalid order of index range for option '".PclZipUtilOptionText($p_options_list[$i])."'");
    17041704
     
    22012201    // ----- Go to beginning of File
    22022202    @rewind($this->zip_fd);
    22032203
    2204     // ----- Creates a temporay file
     2204    // ----- Creates a temporary file
    22052205    $v_zip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.tmp';
    22062206
    22072207    // ----- Open the temporary file in write mode
     
    23912391  // Function : privAddList()
    23922392  // Description :
    23932393  //   $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 usefull if you want to have PclTar
     2394  //   different from the real path of the file. This is useful if you want to have PclTar
    23952395  //   running in any directory, and memorize relative path from an other directory.
    23962396  // Parameters :
    23972397  //   $p_list : An array containing the file or directory names to add in the tar
     
    29462946    else {
    29472947
    29482948      // ----- Look for short name change
    2949       // Its when we cahnge just the filename but not the path
     2949      // Its when we change just the filename but not the path
    29502950      if (isset($p_filedescr['new_short_name'])) {
    29512951        $v_path_info = pathinfo($p_filename);
    29522952        $v_dir = '';
     
    48244824    // ----- Look if something need to be deleted
    48254825    if ($v_nb_extracted > 0) {
    48264826
    4827         // ----- Creates a temporay file
     4827        // ----- Creates a temporary file
    48284828        $v_zip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.tmp';
    48294829
    48304830        // ----- Creates a temporary zip archive
     
    51085108    // ----- Go to beginning of File
    51095109    @rewind($p_archive_to_add->zip_fd);
    51105110
    5111     // ----- Creates a temporay file
     5111    // ----- Creates a temporary file
    51125112    $v_zip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.tmp';
    51135113
    51145114    // ----- Open the temporary file in write mode