Make WordPress Core

Changeset 47123


Ignore:
Timestamp:
01/29/2020 12:54:21 AM (5 years ago)
Author:
SergeyBiryukov
Message:

Docs: Fix typos in wp-admin/includes/class-pclzip.php.

With the upstream library not updated in 10 years since the last time it was merged, it should be safe to treat it as "adopted" rather than external, and make these fixes.

Props passoniate, ottok.
Fixes #49163. See #38464.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-pclzip.php

    r46105 r47123  
    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.
    40   // Recommanded values for compatibility with older versions :
     40  // Recommended values for compatibility with older versions :
    4141  //define( 'PCLZIP_SEPARATOR', ' ' );
    42   // Recommanded values for smart separation of filenames.
     42  // Recommended values for smart separation of filenames.
    4343  if (!defined('PCLZIP_SEPARATOR')) {
    4444    define( 'PCLZIP_SEPARATOR', ',' );
     
    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.
     
    249249  //   in the archive.
    250250  //   In this synopsis, the function takes an optional variable list of
    251   //   options. See bellow the supported options.
     251  //   options. See below the supported options.
    252252  // Parameters :
    253253  //   $p_filelist : An array containing file or directory names, or
     
    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.
     
    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)
     
    11271127      }
    11281128
    1129       // ----- Read the central directory informations
     1129      // ----- Read the central directory information
    11301130      $v_central_dir = array();
    11311131      if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1)
     
    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
     
    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])."'");
     
    21902190    }
    21912191
    2192     // ----- Read the central directory informations
     2192    // ----- Read the central directory information
    21932193    $v_central_dir = array();
    21942194    if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1)
     
    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
     
    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 :
     
    26322632      }
    26332633
    2634       // ----- Update the informations
     2634      // ----- Update the information
    26352635      // Only some fields can be modified
    26362636      if ($p_header['stored_filename'] != $v_local_header['stored_filename']) {
     
    27842784      }
    27852785
    2786       // ----- Update the informations
     2786      // ----- Update the information
    27872787      // Nothing can be modified
    27882788    }
     
    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);
     
    31703170    }
    31713171
    3172     // ----- Read the central directory informations
     3172    // ----- Read the central directory information
    31733173    $v_central_dir = array();
    31743174    if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1)
     
    32213221  // Function : privConvertHeader2FileInfo()
    32223222  // Description :
    3223   //   This function takes the file informations from the central directory
     3223  //   This function takes the file information from the central directory
    32243224  //   entries and extract the interesting parameters that will be given back.
    32253225  //   The resulting file infos are set in the array $p_info
     
    33143314    }
    33153315
    3316     // ----- Read the central directory informations
     3316    // ----- Read the central directory information
    33173317    $v_central_dir = array();
    33183318    if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1)
     
    37143714      }
    37153715
    3716       // ----- Update the informations
     3716      // ----- Update the information
    37173717      // Only some fields can be modified
    37183718      $p_entry['filename'] = $v_local_header['filename'];
     
    40814081      }
    40824082
    4083       // ----- Update the informations
     4083      // ----- Update the information
    40844084      // Only some fields can be modified
    40854085      $p_entry['filename'] = $v_local_header['filename'];
     
    41944194      }
    41954195
    4196       // ----- Update the informations
     4196      // ----- Update the information
    41974197      // Only some fields can be modified
    41984198      $p_entry['filename'] = $v_local_header['filename'];
     
    46904690    }
    46914691
    4692     // ----- Read the central directory informations
     4692    // ----- Read the central directory information
    46934693    $v_central_dir = array();
    46944694    if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1)
     
    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
     
    50765076    }
    50775077
    5078     // ----- Read the central directory informations
     5078    // ----- Read the central directory information
    50795079    $v_central_dir = array();
    50805080    if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1)
     
    50965096    }
    50975097
    5098     // ----- Read the central directory informations
     5098    // ----- Read the central directory information
    50995099    $v_central_dir_to_add = array();
    51005100    if (($v_result = $p_archive_to_add->privReadEndCentralDir($v_central_dir_to_add)) != 1)
     
    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
Note: See TracChangeset for help on using the changeset viewer.