<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre, #msg p { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[12042] trunk:
Associate subdirector of whitespace trims trailing whites with pinking shears
.</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/12042">12042</a></dd>
<dt>Author</dt> <dd>ryan</dd>
<dt>Date</dt> <dd>2009-10-15 20:26:21 +0000 (Thu, 15 Oct 2009)</dd>
</dl>
<h3>Log Message</h3>
<pre>Associate subdirector of whitespace trims trailing whites with pinking shears.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminincludesclasspclzipphp">trunk/wp-admin/includes/class-pclzip.php</a></li>
<li><a href="#trunkwpadminincludespluginphp">trunk/wp-admin/includes/plugin.php</a></li>
<li><a href="#trunkwpadminpressthisphp">trunk/wp-admin/press-this.php</a></li>
<li><a href="#trunkwpincludesclassoembedphp">trunk/wp-includes/class-oembed.php</a></li>
<li><a href="#trunkwpincludescommentphp">trunk/wp-includes/comment.php</a></li>
<li><a href="#trunkwpincludesdeprecatedphp">trunk/wp-includes/deprecated.php</a></li>
<li><a href="#trunkwpincludesfunctionsphp">trunk/wp-includes/functions.php</a></li>
<li><a href="#trunkwpincludesmediaphp">trunk/wp-includes/media.php</a></li>
<li><a href="#trunkwpincludesmetaphp">trunk/wp-includes/meta.php</a></li>
<li><a href="#trunkwpincludespostphp">trunk/wp-includes/post.php</a></li>
<li><a href="#trunkwpincludesscriptloaderphp">trunk/wp-includes/script-loader.php</a></li>
<li><a href="#trunkwpincludesthemephp">trunk/wp-includes/theme.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadminincludesclasspclzipphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/class-pclzip.php (12041 => 12042)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/class-pclzip.php        2009-10-15 17:27:45 UTC (rev 12041)
+++ trunk/wp-admin/includes/class-pclzip.php        2009-10-15 20:26:21 UTC (rev 12042)
</span><span class="lines">@@ -29,7 +29,7 @@
</span><span class="cx"> if (!defined('PCLZIP_READ_BLOCK_SIZE')) {
</span><span class="cx"> define( 'PCLZIP_READ_BLOCK_SIZE', 2048 );
</span><span class="cx"> }
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- File list separator
</span><span class="cx"> // In version 1.x of PclZip, the separator for file list is a space
</span><span class="cx"> // (which is not a very smart choice, specifically for windows paths !).
</span><span class="lines">@@ -68,7 +68,7 @@
</span><span class="cx">
</span><span class="cx"> // ----- Optional threshold ratio for use of temporary files
</span><span class="cx"> // Pclzip sense the size of the file to add/extract and decide to
</span><del>- // use or not temporary file. The algorythm is looking for
</del><ins>+ // use or not temporary file. The algorythm is looking for
</ins><span class="cx"> // memory_limit of PHP and apply a ratio.
</span><span class="cx"> // threshold = memory_limit * ratio.
</span><span class="cx"> // Recommended values are under 0.5. Default 0.47.
</span><span class="lines">@@ -152,7 +152,7 @@
</span><span class="cx"> define( 'PCLZIP_OPT_ADD_TEMP_FILE_ON', 77021 ); // alias
</span><span class="cx"> define( 'PCLZIP_OPT_TEMP_FILE_OFF', 77022 );
</span><span class="cx"> define( 'PCLZIP_OPT_ADD_TEMP_FILE_OFF', 77022 ); // alias
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- File description attributes
</span><span class="cx"> define( 'PCLZIP_ATT_FILE_NAME', 79001 );
</span><span class="cx"> define( 'PCLZIP_ATT_FILE_NEW_SHORT_NAME', 79002 );
</span><span class="lines">@@ -198,7 +198,7 @@
</span><span class="cx"> // ----- Internal error handling
</span><span class="cx"> var $error_code = 1;
</span><span class="cx"> var $error_string = '';
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Current status of the magic_quotes_runtime
</span><span class="cx"> // This value store the php configuration for magic_quotes
</span><span class="cx"> // The class can then disable the magic_quotes and reset it after
</span><span class="lines">@@ -332,7 +332,7 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> }
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Look for default option values
</span><span class="cx"> $this->privOptionDefaultThreshold($v_options);
</span><span class="cx">
</span><span class="lines">@@ -341,16 +341,16 @@
</span><span class="cx"> $v_att_list = array();
</span><span class="cx"> $v_filedescr_list = array();
</span><span class="cx"> $p_result_list = array();
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Look if the $p_filelist is really an array
</span><span class="cx"> if (is_array($p_filelist)) {
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Look if the first element is also an array
</span><span class="cx"> // This will mean that this is a file description entry
</span><span class="cx"> if (isset($p_filelist[0]) && is_array($p_filelist[0])) {
</span><span class="cx"> $v_att_list = $p_filelist;
</span><span class="cx"> }
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- The list is a list of string names
</span><span class="cx"> else {
</span><span class="cx"> $v_string_list = $p_filelist;
</span><span class="lines">@@ -368,7 +368,7 @@
</span><span class="cx"> PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid variable type p_filelist");
</span><span class="cx"> return 0;
</span><span class="cx"> }
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Reformat the string list
</span><span class="cx"> if (sizeof($v_string_list) != 0) {
</span><span class="cx"> foreach ($v_string_list as $v_string) {
</span><span class="lines">@@ -379,7 +379,7 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> }
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- For each file in the list check the attributes
</span><span class="cx"> $v_supported_attributes
</span><span class="cx"> = array ( PCLZIP_ATT_FILE_NAME => 'mandatory'
</span><span class="lines">@@ -528,16 +528,16 @@
</span><span class="cx"> $v_att_list = array();
</span><span class="cx"> $v_filedescr_list = array();
</span><span class="cx"> $p_result_list = array();
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Look if the $p_filelist is really an array
</span><span class="cx"> if (is_array($p_filelist)) {
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Look if the first element is also an array
</span><span class="cx"> // This will mean that this is a file description entry
</span><span class="cx"> if (isset($p_filelist[0]) && is_array($p_filelist[0])) {
</span><span class="cx"> $v_att_list = $p_filelist;
</span><span class="cx"> }
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- The list is a list of string names
</span><span class="cx"> else {
</span><span class="cx"> $v_string_list = $p_filelist;
</span><span class="lines">@@ -555,14 +555,14 @@
</span><span class="cx"> PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid variable type '".gettype($p_filelist)."' for p_filelist");
</span><span class="cx"> return 0;
</span><span class="cx"> }
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Reformat the string list
</span><span class="cx"> if (sizeof($v_string_list) != 0) {
</span><span class="cx"> foreach ($v_string_list as $v_string) {
</span><span class="cx"> $v_att_list[][PCLZIP_ATT_FILE_NAME] = $v_string;
</span><span class="cx"> }
</span><span class="cx"> }
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- For each file in the list check the attributes
</span><span class="cx"> $v_supported_attributes
</span><span class="cx"> = array ( PCLZIP_ATT_FILE_NAME => 'mandatory'
</span><span class="lines">@@ -996,7 +996,7 @@
</span><span class="cx"> // Options :
</span><span class="cx"> // PCLZIP_OPT_BY_INDEX :
</span><span class="cx"> // PCLZIP_OPT_BY_NAME :
</span><del>- // PCLZIP_OPT_BY_EREG :
</del><ins>+ // PCLZIP_OPT_BY_EREG :
</ins><span class="cx"> // PCLZIP_OPT_BY_PREG :
</span><span class="cx"> // Return Values :
</span><span class="cx"> // 0 on failure,
</span><span class="lines">@@ -1064,7 +1064,7 @@
</span><span class="cx"> // --------------------------------------------------------------------------------
</span><span class="cx"> function deleteByIndex($p_index)
</span><span class="cx"> {
</span><del>-
</del><ins>+
</ins><span class="cx"> $p_list = $this->delete(PCLZIP_OPT_BY_INDEX, $p_index);
</span><span class="cx">
</span><span class="cx"> // ----- Return
</span><span class="lines">@@ -1114,7 +1114,7 @@
</span><span class="cx"> if (($this->zip_fd = @fopen($this->zipname, 'rb')) == 0)
</span><span class="cx"> {
</span><span class="cx"> $this->privSwapBackMagicQuotes();
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Error log
</span><span class="cx"> PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \''.$this->zipname.'\' in binary read mode');
</span><span class="cx">
</span><span class="lines">@@ -1426,7 +1426,7 @@
</span><span class="cx"> function privParseOptions(&$p_options_list, $p_size, &$v_result_list, $v_requested_options=false)
</span><span class="cx"> {
</span><span class="cx"> $v_result=1;
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Read the options
</span><span class="cx"> $i=0;
</span><span class="cx"> while ($i<$p_size) {
</span><span class="lines">@@ -1466,13 +1466,13 @@
</span><span class="cx"> PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'");
</span><span class="cx"> return PclZip::errorCode();
</span><span class="cx"> }
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Check for incompatible options
</span><span class="cx"> if (isset($v_result_list[PCLZIP_OPT_TEMP_FILE_OFF])) {
</span><span class="cx"> PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Option '".PclZipUtilOptionText($p_options_list[$i])."' can not be used with option 'PCLZIP_OPT_TEMP_FILE_OFF'");
</span><span class="cx"> return PclZip::errorCode();
</span><span class="cx"> }
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Check the value
</span><span class="cx"> $v_value = $p_options_list[$i+1];
</span><span class="cx"> if ((!is_integer($v_value)) || ($v_value<0)) {
</span><span class="lines">@@ -1491,7 +1491,7 @@
</span><span class="cx"> PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Option '".PclZipUtilOptionText($p_options_list[$i])."' can not be used with option 'PCLZIP_OPT_TEMP_FILE_OFF'");
</span><span class="cx"> return PclZip::errorCode();
</span><span class="cx"> }
</span><del>-
</del><ins>+
</ins><span class="cx"> $v_result_list[$p_options_list[$i]] = true;
</span><span class="cx"> break;
</span><span class="cx">
</span><span class="lines">@@ -1506,7 +1506,7 @@
</span><span class="cx"> PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Option '".PclZipUtilOptionText($p_options_list[$i])."' can not be used with option 'PCLZIP_OPT_TEMP_FILE_THRESHOLD'");
</span><span class="cx"> return PclZip::errorCode();
</span><span class="cx"> }
</span><del>-
</del><ins>+
</ins><span class="cx"> $v_result_list[$p_options_list[$i]] = true;
</span><span class="cx"> break;
</span><span class="cx">
</span><span class="lines">@@ -1655,7 +1655,7 @@
</span><span class="cx"> // ----- Return
</span><span class="cx"> return PclZip::errorCode();
</span><span class="cx"> }
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Reduce the index list
</span><span class="cx"> // each index item in the list must be a couple with a start and
</span><span class="cx"> // an end value : [0,3], [5-5], [8-10], ...
</span><span class="lines">@@ -1666,10 +1666,10 @@
</span><span class="cx"> // ----- Explode the item
</span><span class="cx"> $v_item_list = explode("-", $v_work_list[$j]);
</span><span class="cx"> $v_size_item_list = sizeof($v_item_list);
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- TBC : Here we might check that each item is a
</span><span class="cx"> // real integer ...
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Look for single value
</span><span class="cx"> if ($v_size_item_list == 1) {
</span><span class="cx"> // ----- Set the option value
</span><span class="lines">@@ -1703,7 +1703,7 @@
</span><span class="cx"> }
</span><span class="cx"> $v_sort_value = $v_result_list[$p_options_list[$i]][$j]['start'];
</span><span class="cx"> }
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Sort the items
</span><span class="cx"> if ($v_sort_flag) {
</span><span class="cx"> // TBC : To Be Completed
</span><span class="lines">@@ -1806,10 +1806,10 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> }
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Look for default values
</span><span class="cx"> if (!isset($v_result_list[PCLZIP_OPT_TEMP_FILE_THRESHOLD])) {
</span><del>-
</del><ins>+
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // ----- Return
</span><span class="lines">@@ -1826,17 +1826,17 @@
</span><span class="cx"> function privOptionDefaultThreshold(&$p_options)
</span><span class="cx"> {
</span><span class="cx"> $v_result=1;
</span><del>-
</del><ins>+
</ins><span class="cx"> if (isset($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD])
</span><span class="cx"> || isset($p_options[PCLZIP_OPT_TEMP_FILE_OFF])) {
</span><span class="cx"> return $v_result;
</span><span class="cx"> }
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Get 'memory_limit' configuration value
</span><span class="cx"> $v_memory_limit = ini_get('memory_limit');
</span><span class="cx"> $v_memory_limit = trim($v_memory_limit);
</span><span class="cx"> $last = strtolower(substr($v_memory_limit, -1));
</span><del>-
</del><ins>+
</ins><span class="cx"> if($last == 'g')
</span><span class="cx"> //$v_memory_limit = $v_memory_limit*1024*1024*1024;
</span><span class="cx"> $v_memory_limit = $v_memory_limit*1073741824;
</span><span class="lines">@@ -1845,15 +1845,15 @@
</span><span class="cx"> $v_memory_limit = $v_memory_limit*1048576;
</span><span class="cx"> if($last == 'k')
</span><span class="cx"> $v_memory_limit = $v_memory_limit*1024;
</span><del>-
</del><ins>+
</ins><span class="cx"> $p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD] = floor($v_memory_limit*PCLZIP_TEMPORARY_FILE_RATIO);
</span><del>-
</del><span class="cx">
</span><ins>+
</ins><span class="cx"> // ----- Sanity check : No threshold if value lower than 1M
</span><span class="cx"> if ($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD] < 1048576) {
</span><span class="cx"> unset($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD]);
</span><span class="cx"> }
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Return
</span><span class="cx"> return $v_result;
</span><span class="cx"> }
</span><span class="lines">@@ -1870,10 +1870,10 @@
</span><span class="cx"> function privFileDescrParseAtt(&$p_file_list, &$p_filedescr, $v_options, $v_requested_options=false)
</span><span class="cx"> {
</span><span class="cx"> $v_result=1;
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- For each file in the list check the attributes
</span><span class="cx"> foreach ($p_file_list as $v_key => $v_value) {
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Check if the option is supported
</span><span class="cx"> if (!isset($v_requested_options[$v_key])) {
</span><span class="cx"> // ----- Error log
</span><span class="lines">@@ -1892,7 +1892,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> $p_filedescr['filename'] = PclZipUtilPathReduction($v_value);
</span><del>-
</del><ins>+
</ins><span class="cx"> if ($p_filedescr['filename'] == '') {
</span><span class="cx"> PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid empty filename for attribute '".PclZipUtilOptionText($v_key)."'");
</span><span class="cx"> return PclZip::errorCode();
</span><span class="lines">@@ -1973,10 +1973,10 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> }
</span><del>-
</del><ins>+
</ins><span class="cx"> // end foreach
</span><span class="cx"> }
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Return
</span><span class="cx"> return $v_result;
</span><span class="cx"> }
</span><span class="lines">@@ -1989,7 +1989,7 @@
</span><span class="cx"> // or a string to be added as file. For any other type of files (link, other)
</span><span class="cx"> // just ignore the item.
</span><span class="cx"> // Then prepare the information that will be stored for that file.
</span><del>- // When its a folder, expand the folder with all the files that are in that
</del><ins>+ // When its a folder, expand the folder with all the files that are in that
</ins><span class="cx"> // folder (recursively).
</span><span class="cx"> // Parameters :
</span><span class="cx"> // Return Values :
</span><span class="lines">@@ -1999,20 +1999,20 @@
</span><span class="cx"> function privFileDescrExpand(&$p_filedescr_list, &$p_options)
</span><span class="cx"> {
</span><span class="cx"> $v_result=1;
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Create a result list
</span><span class="cx"> $v_result_list = array();
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Look each entry
</span><span class="cx"> for ($i=0; $i<sizeof($p_filedescr_list); $i++) {
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Get filedescr
</span><span class="cx"> $v_descr = $p_filedescr_list[$i];
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Reduce the filename
</span><span class="cx"> $v_descr['filename'] = PclZipUtilTranslateWinPath($v_descr['filename'], false);
</span><span class="cx"> $v_descr['filename'] = PclZipUtilPathReduction($v_descr['filename']);
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Look for real file or folder
</span><span class="cx"> if (file_exists($v_descr['filename'])) {
</span><span class="cx"> if (@is_file($v_descr['filename'])) {
</span><span class="lines">@@ -2030,12 +2030,12 @@
</span><span class="cx"> continue;
</span><span class="cx"> }
</span><span class="cx"> }
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Look for string added as file
</span><span class="cx"> else if (isset($v_descr['content'])) {
</span><span class="cx"> $v_descr['type'] = 'virtual_file';
</span><span class="cx"> }
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Missing file
</span><span class="cx"> else {
</span><span class="cx"> // ----- Error log
</span><span class="lines">@@ -2044,13 +2044,13 @@
</span><span class="cx"> // ----- Return
</span><span class="cx"> return PclZip::errorCode();
</span><span class="cx"> }
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Calculate the stored filename
</span><span class="cx"> $this->privCalculateStoredFilename($v_descr, $p_options);
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Add the descriptor in result list
</span><span class="cx"> $v_result_list[sizeof($v_result_list)] = $v_descr;
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Look for folder
</span><span class="cx"> if ($v_descr['type'] == 'folder') {
</span><span class="cx"> // ----- List of items in folder
</span><span class="lines">@@ -2063,10 +2063,10 @@
</span><span class="cx"> if (($v_item_handler == '.') || ($v_item_handler == '..')) {
</span><span class="cx"> continue;
</span><span class="cx"> }
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Compose the full filename
</span><span class="cx"> $v_dirlist_descr[$v_dirlist_nb]['filename'] = $v_descr['filename'].'/'.$v_item_handler;
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Look for different stored filename
</span><span class="cx"> // Because the name of the folder was changed, the name of the
</span><span class="cx"> // files/sub-folders also change
</span><span class="lines">@@ -2079,34 +2079,34 @@
</span><span class="cx"> $v_dirlist_descr[$v_dirlist_nb]['new_full_name'] = $v_item_handler;
</span><span class="cx"> }
</span><span class="cx"> }
</span><del>-
</del><ins>+
</ins><span class="cx"> $v_dirlist_nb++;
</span><span class="cx"> }
</span><del>-
</del><ins>+
</ins><span class="cx"> @closedir($v_folder_handler);
</span><span class="cx"> }
</span><span class="cx"> else {
</span><span class="cx"> // TBC : unable to open folder in read mode
</span><span class="cx"> }
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Expand each element of the list
</span><span class="cx"> if ($v_dirlist_nb != 0) {
</span><span class="cx"> // ----- Expand
</span><span class="cx"> if (($v_result = $this->privFileDescrExpand($v_dirlist_descr, $p_options)) != 1) {
</span><span class="cx"> return $v_result;
</span><span class="cx"> }
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Concat the resulting list
</span><span class="cx"> $v_result_list = array_merge($v_result_list, $v_dirlist_descr);
</span><span class="cx"> }
</span><span class="cx"> else {
</span><span class="cx"> }
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Free local array
</span><span class="cx"> unset($v_dirlist_descr);
</span><span class="cx"> }
</span><span class="cx"> }
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Get the result list
</span><span class="cx"> $p_filedescr_list = $v_result_list;
</span><span class="cx">
</span><span class="lines">@@ -2125,7 +2125,7 @@
</span><span class="cx"> {
</span><span class="cx"> $v_result=1;
</span><span class="cx"> $v_list_detail = array();
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Magic quotes trick
</span><span class="cx"> $this->privDisableMagicQuotes();
</span><span class="cx">
</span><span class="lines">@@ -2455,7 +2455,7 @@
</span><span class="cx"> // Function : privAddFileList()
</span><span class="cx"> // Description :
</span><span class="cx"> // Parameters :
</span><del>- // $p_filedescr_list : An array containing the file description
</del><ins>+ // $p_filedescr_list : An array containing the file description
</ins><span class="cx"> // or directory names to add in the zip
</span><span class="cx"> // $p_result_list : list of added files with their properties (specially the status field)
</span><span class="cx"> // Return Values :
</span><span class="lines">@@ -2473,8 +2473,8 @@
</span><span class="cx"> // ----- Format the filename
</span><span class="cx"> $p_filedescr_list[$j]['filename']
</span><span class="cx"> = PclZipUtilTranslateWinPath($p_filedescr_list[$j]['filename'], false);
</span><del>-
</del><span class="cx">
</span><ins>+
</ins><span class="cx"> // ----- Skip empty file names
</span><span class="cx"> // TBC : Can this be possible ? not checked in DescrParseAtt ?
</span><span class="cx"> if ($p_filedescr_list[$j]['filename'] == "") {
</span><span class="lines">@@ -2525,7 +2525,7 @@
</span><span class="cx"> function privAddFile($p_filedescr, &$p_header, &$p_options)
</span><span class="cx"> {
</span><span class="cx"> $v_result=1;
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Working variable
</span><span class="cx"> $p_filename = $p_filedescr['filename'];
</span><span class="cx">
</span><span class="lines">@@ -2537,8 +2537,8 @@
</span><span class="cx"> // ----- Return
</span><span class="cx"> return PclZip::errorCode();
</span><span class="cx"> }
</span><del>-
- // ----- Look for a stored different filename
</del><ins>+
+ // ----- Look for a stored different filename
</ins><span class="cx"> /* TBC : Removed
</span><span class="cx"> if (isset($p_filedescr['stored_filename'])) {
</span><span class="cx"> $v_stored_filename = $p_filedescr['stored_filename'];
</span><span class="lines">@@ -2573,21 +2573,21 @@
</span><span class="cx"> $p_header['external'] = 0x00000000;
</span><span class="cx"> $p_header['size'] = filesize($p_filename);
</span><span class="cx"> }
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Look for regular folder
</span><span class="cx"> else if ($p_filedescr['type']=='folder') {
</span><span class="cx"> $p_header['external'] = 0x00000010;
</span><span class="cx"> $p_header['mtime'] = filemtime($p_filename);
</span><span class="cx"> $p_header['size'] = filesize($p_filename);
</span><span class="cx"> }
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Look for virtual file
</span><span class="cx"> else if ($p_filedescr['type'] == 'virtual_file') {
</span><span class="cx"> $p_header['external'] = 0x00000000;
</span><span class="cx"> $p_header['size'] = strlen($p_filedescr['content']);
</span><span class="cx"> }
</span><del>-
</del><span class="cx">
</span><ins>+
</ins><span class="cx"> // ----- Look for filetime
</span><span class="cx"> if (isset($p_filedescr['mtime'])) {
</span><span class="cx"> $p_header['mtime'] = $p_filedescr['mtime'];
</span><span class="lines">@@ -2637,7 +2637,7 @@
</span><span class="cx"> if ($p_header['stored_filename'] == "") {
</span><span class="cx"> $p_header['status'] = "filtered";
</span><span class="cx"> }
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Check the path length
</span><span class="cx"> if (strlen($p_header['stored_filename']) > 0xFF) {
</span><span class="cx"> $p_header['status'] = 'filename_too_long';
</span><span class="lines">@@ -2649,7 +2649,7 @@
</span><span class="cx"> // ----- Look for a file
</span><span class="cx"> if ($p_filedescr['type'] == 'file') {
</span><span class="cx"> // ----- Look for using temporary file to zip
</span><del>- if ( (!isset($p_options[PCLZIP_OPT_TEMP_FILE_OFF]))
</del><ins>+ if ( (!isset($p_options[PCLZIP_OPT_TEMP_FILE_OFF]))
</ins><span class="cx"> && (isset($p_options[PCLZIP_OPT_TEMP_FILE_ON])
</span><span class="cx"> || (isset($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD])
</span><span class="cx"> && ($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD] <= $p_header['size'])) ) ) {
</span><span class="lines">@@ -2658,7 +2658,7 @@
</span><span class="cx"> return $v_result;
</span><span class="cx"> }
</span><span class="cx"> }
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Use "in memory" zip algo
</span><span class="cx"> else {
</span><span class="cx">
</span><span class="lines">@@ -2676,14 +2676,14 @@
</span><span class="cx">
</span><span class="cx"> // ----- Calculate the CRC
</span><span class="cx"> $p_header['crc'] = @crc32($v_content);
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Look for no compression
</span><span class="cx"> if ($p_options[PCLZIP_OPT_NO_COMPRESSION]) {
</span><span class="cx"> // ----- Set header parameters
</span><span class="cx"> $p_header['compressed_size'] = $p_header['size'];
</span><span class="cx"> $p_header['compression'] = 0;
</span><span class="cx"> }
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Look for normal compression
</span><span class="cx"> else {
</span><span class="cx"> // ----- Compress the content
</span><span class="lines">@@ -2693,7 +2693,7 @@
</span><span class="cx"> $p_header['compressed_size'] = strlen($v_content);
</span><span class="cx"> $p_header['compression'] = 8;
</span><span class="cx"> }
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Call the header generation
</span><span class="cx"> if (($v_result = $this->privWriteFileHeader($p_header)) != 1) {
</span><span class="cx"> @fclose($v_file);
</span><span class="lines">@@ -2709,19 +2709,19 @@
</span><span class="cx">
</span><span class="cx"> // ----- Look for a virtual file (a file from string)
</span><span class="cx"> else if ($p_filedescr['type'] == 'virtual_file') {
</span><del>-
</del><ins>+
</ins><span class="cx"> $v_content = $p_filedescr['content'];
</span><span class="cx">
</span><span class="cx"> // ----- Calculate the CRC
</span><span class="cx"> $p_header['crc'] = @crc32($v_content);
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Look for no compression
</span><span class="cx"> if ($p_options[PCLZIP_OPT_NO_COMPRESSION]) {
</span><span class="cx"> // ----- Set header parameters
</span><span class="cx"> $p_header['compressed_size'] = $p_header['size'];
</span><span class="cx"> $p_header['compression'] = 0;
</span><span class="cx"> }
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Look for normal compression
</span><span class="cx"> else {
</span><span class="cx"> // ----- Compress the content
</span><span class="lines">@@ -2731,7 +2731,7 @@
</span><span class="cx"> $p_header['compressed_size'] = strlen($v_content);
</span><span class="cx"> $p_header['compression'] = 8;
</span><span class="cx"> }
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Call the header generation
</span><span class="cx"> if (($v_result = $this->privWriteFileHeader($p_header)) != 1) {
</span><span class="cx"> @fclose($v_file);
</span><span class="lines">@@ -2796,7 +2796,7 @@
</span><span class="cx"> function privAddFileUsingTempFile($p_filedescr, &$p_header, &$p_options)
</span><span class="cx"> {
</span><span class="cx"> $v_result=PCLZIP_ERR_NO_ERROR;
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Working variable
</span><span class="cx"> $p_filename = $p_filedescr['filename'];
</span><span class="cx">
</span><span class="lines">@@ -2891,7 +2891,7 @@
</span><span class="cx">
</span><span class="cx"> // ----- Unlink the temporary file
</span><span class="cx"> @unlink($v_gzip_temp_name);
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Return
</span><span class="cx"> return $v_result;
</span><span class="cx"> }
</span><span class="lines">@@ -2908,7 +2908,7 @@
</span><span class="cx"> function privCalculateStoredFilename(&$p_filedescr, &$p_options)
</span><span class="cx"> {
</span><span class="cx"> $v_result=1;
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Working variables
</span><span class="cx"> $p_filename = $p_filedescr['filename'];
</span><span class="cx"> if (isset($p_options[PCLZIP_OPT_ADD_PATH])) {
</span><span class="lines">@@ -2936,7 +2936,7 @@
</span><span class="cx"> // ----- Remove drive letter if any
</span><span class="cx"> $v_stored_filename = PclZipUtilTranslateWinPath($p_filedescr['new_full_name']);
</span><span class="cx"> }
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Look for path and/or short name change
</span><span class="cx"> else {
</span><span class="cx">
</span><span class="lines">@@ -2966,7 +2966,7 @@
</span><span class="cx">
</span><span class="cx"> if ( (substr($p_filename, 0, 2) == "./")
</span><span class="cx"> || (substr($p_remove_dir, 0, 2) == "./")) {
</span><del>-
</del><ins>+
</ins><span class="cx"> if ( (substr($p_filename, 0, 2) == "./")
</span><span class="cx"> && (substr($p_remove_dir, 0, 2) != "./")) {
</span><span class="cx"> $p_remove_dir = "./".$p_remove_dir;
</span><span class="lines">@@ -2989,10 +2989,10 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> }
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Remove drive letter if any
</span><span class="cx"> $v_stored_filename = PclZipUtilTranslateWinPath($v_stored_filename);
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Look for path to add
</span><span class="cx"> if ($p_add_dir != "") {
</span><span class="cx"> if (substr($p_add_dir, -1) == "/")
</span><span class="lines">@@ -3005,7 +3005,7 @@
</span><span class="cx"> // ----- Filename (reduce the path of stored name)
</span><span class="cx"> $v_stored_filename = PclZipUtilPathReduction($v_stored_filename);
</span><span class="cx"> $p_filedescr['stored_filename'] = $v_stored_filename;
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Return
</span><span class="cx"> return $v_result;
</span><span class="cx"> }
</span><span class="lines">@@ -3156,7 +3156,7 @@
</span><span class="cx"> {
</span><span class="cx"> // ----- Magic quotes trick
</span><span class="cx"> $this->privSwapBackMagicQuotes();
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Error log
</span><span class="cx"> PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \''.$this->zipname.'\' in binary read mode');
</span><span class="cx">
</span><span class="lines">@@ -3387,7 +3387,7 @@
</span><span class="cx">
</span><span class="cx"> // ----- Look for extract by ereg rule
</span><span class="cx"> // ereg() is deprecated with PHP 5.3
</span><del>- /*
</del><ins>+ /*
</ins><span class="cx"> else if ( (isset($p_options[PCLZIP_OPT_BY_EREG]))
</span><span class="cx"> && ($p_options[PCLZIP_OPT_BY_EREG] != "")) {
</span><span class="cx">
</span><span class="lines">@@ -3409,7 +3409,7 @@
</span><span class="cx"> // ----- Look for extract by index rule
</span><span class="cx"> else if ( (isset($p_options[PCLZIP_OPT_BY_INDEX]))
</span><span class="cx"> && ($p_options[PCLZIP_OPT_BY_INDEX] != 0)) {
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Look if the index is in the list
</span><span class="cx"> for ($j=$j_start; ($j<sizeof($p_options[PCLZIP_OPT_BY_INDEX])) && (!$v_extract); $j++) {
</span><span class="cx">
</span><span class="lines">@@ -3442,7 +3442,7 @@
</span><span class="cx">                  && ($p_options[PCLZIP_OPT_STOP_ON_ERROR]===true)) {
</span><span class="cx">
</span><span class="cx"> $this->privSwapBackMagicQuotes();
</span><del>-
</del><ins>+
</ins><span class="cx"> PclZip::privErrorLog(PCLZIP_ERR_UNSUPPORTED_COMPRESSION,
</span><span class="cx">                          "Filename '".$v_header['stored_filename']."' is "
</span><span class="cx">                                                             ."compressed by an unsupported compression "
</span><span class="lines">@@ -3451,7 +3451,7 @@
</span><span class="cx"> return PclZip::errorCode();
</span><span class="cx">                  }
</span><span class="cx">          }
</span><del>-        
</del><ins>+
</ins><span class="cx">          // ----- Check encrypted files
</span><span class="cx">          if (($v_extract) && (($v_header['flag'] & 1) == 1)) {
</span><span class="cx"> $v_header['status'] = 'unsupported_encryption';
</span><span class="lines">@@ -3483,7 +3483,7 @@
</span><span class="cx">
</span><span class="cx"> $v_extract = false;
</span><span class="cx"> }
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Look for real extraction
</span><span class="cx"> if ($v_extract)
</span><span class="cx"> {
</span><span class="lines">@@ -3532,7 +3532,7 @@
</span><span class="cx">
</span><span class="cx"> // ----- Next extracted file
</span><span class="cx"> $v_nb_extracted++;
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Look for user callback abort
</span><span class="cx"> if ($v_result1 == 2) {
</span><span class="cx">         break;
</span><span class="lines">@@ -3668,12 +3668,12 @@
</span><span class="cx"> if ($p_path != '') {
</span><span class="cx"> $p_entry['filename'] = $p_path."/".$p_entry['filename'];
</span><span class="cx"> }
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Check a base_dir_restriction
</span><span class="cx"> if (isset($p_options[PCLZIP_OPT_EXTRACT_DIR_RESTRICTION])) {
</span><span class="cx"> $v_inclusion
</span><span class="cx"> = PclZipUtilPathInclusion($p_options[PCLZIP_OPT_EXTRACT_DIR_RESTRICTION],
</span><del>- $p_entry['filename']);
</del><ins>+ $p_entry['filename']);
</ins><span class="cx"> if ($v_inclusion == 0) {
</span><span class="cx">
</span><span class="cx"> PclZip::privErrorLog(PCLZIP_ERR_DIRECTORY_RESTRICTION,
</span><span class="lines">@@ -3700,7 +3700,7 @@
</span><span class="cx"> $p_entry['status'] = "skipped";
</span><span class="cx"> $v_result = 1;
</span><span class="cx"> }
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Look for abort result
</span><span class="cx"> if ($v_result == 2) {
</span><span class="cx"> // ----- This status is internal and will be changed in 'skipped'
</span><span class="lines">@@ -3727,7 +3727,7 @@
</span><span class="cx">
</span><span class="cx"> // ----- Change the file status
</span><span class="cx"> $p_entry['status'] = "already_a_directory";
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Look for PCLZIP_OPT_STOP_ON_ERROR
</span><span class="cx"> // For historical reason first PclZip implementation does not stop
</span><span class="cx"> // when this kind of error occurs.
</span><span class="lines">@@ -3800,10 +3800,10 @@
</span><span class="cx"> $v_dir_to_check = dirname($p_entry['filename']);
</span><span class="cx">
</span><span class="cx"> if (($v_result = $this->privDirCheck($v_dir_to_check, (($p_entry['external']&0x00000010)==0x00000010))) != 1) {
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Change the file status
</span><span class="cx"> $p_entry['status'] = "path_creation_fail";
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Return
</span><span class="cx"> //return $v_result;
</span><span class="cx"> $v_result = 1;
</span><span class="lines">@@ -3842,7 +3842,7 @@
</span><span class="cx"> $v_binary_data = pack('a'.$v_read_size, $v_buffer);
</span><span class="cx"> @fwrite($v_dest_file, $v_binary_data, $v_read_size);
</span><span class="cx"> */
</span><del>- @fwrite($v_dest_file, $v_buffer, $v_read_size);
</del><ins>+ @fwrite($v_dest_file, $v_buffer, $v_read_size);
</ins><span class="cx"> $v_size -= $v_read_size;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -3851,8 +3851,8 @@
</span><span class="cx">
</span><span class="cx"> // ----- Change the file mtime
</span><span class="cx"> touch($p_entry['filename'], $p_entry['mtime']);
</span><del>-
</del><span class="cx">
</span><ins>+
</ins><span class="cx"> }
</span><span class="cx"> else {
</span><span class="cx"> // ----- TBC
</span><span class="lines">@@ -3864,7 +3864,7 @@
</span><span class="cx">
</span><span class="cx">
</span><span class="cx"> // ----- Look for using temporary file to unzip
</span><del>- if ( (!isset($p_options[PCLZIP_OPT_TEMP_FILE_OFF]))
</del><ins>+ if ( (!isset($p_options[PCLZIP_OPT_TEMP_FILE_OFF]))
</ins><span class="cx"> && (isset($p_options[PCLZIP_OPT_TEMP_FILE_ON])
</span><span class="cx"> || (isset($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD])
</span><span class="cx"> && ($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD] <= $p_entry['size'])) ) ) {
</span><span class="lines">@@ -3873,42 +3873,42 @@
</span><span class="cx"> return $v_result;
</span><span class="cx"> }
</span><span class="cx"> }
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Look for extract in memory
</span><span class="cx"> else {
</span><span class="cx">
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Read the compressed file in a buffer (one shot)
</span><span class="cx"> $v_buffer = @fread($this->zip_fd, $p_entry['compressed_size']);
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Decompress the file
</span><span class="cx"> $v_file_content = @gzinflate($v_buffer);
</span><span class="cx"> unset($v_buffer);
</span><span class="cx"> if ($v_file_content === FALSE) {
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Change the file status
</span><span class="cx"> // TBC
</span><span class="cx"> $p_entry['status'] = "error";
</span><del>-
</del><ins>+
</ins><span class="cx"> return $v_result;
</span><span class="cx"> }
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Opening destination file
</span><span class="cx"> if (($v_dest_file = @fopen($p_entry['filename'], 'wb')) == 0) {
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Change the file status
</span><span class="cx"> $p_entry['status'] = "write_error";
</span><del>-
</del><ins>+
</ins><span class="cx"> return $v_result;
</span><span class="cx"> }
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Write the uncompressed data
</span><span class="cx"> @fwrite($v_dest_file, $v_file_content, $p_entry['size']);
</span><span class="cx"> unset($v_file_content);
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Closing the destination file
</span><span class="cx"> @fclose($v_dest_file);
</span><del>-
</del><ins>+
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // ----- Change the file mtime
</span><span class="lines">@@ -3929,7 +3929,7 @@
</span><span class="cx">         if ($p_entry['status'] == "aborted") {
</span><span class="cx"> $p_entry['status'] = "skipped";
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx"> // ----- Look for post-extract callback
</span><span class="cx"> elseif (isset($p_options[PCLZIP_CB_POST_EXTRACT])) {
</span><span class="cx">
</span><span class="lines">@@ -3962,7 +3962,7 @@
</span><span class="cx"> function privExtractFileUsingTempFile(&$p_entry, &$p_options)
</span><span class="cx"> {
</span><span class="cx"> $v_result=1;
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Creates a temporary file
</span><span class="cx"> $v_gzip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.gz';
</span><span class="cx"> if (($v_dest_file = @fopen($v_gzip_temp_name, "wb")) == 0) {
</span><span class="lines">@@ -4023,7 +4023,7 @@
</span><span class="cx">
</span><span class="cx"> // ----- Delete the temporary file
</span><span class="cx"> @unlink($v_gzip_temp_name);
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Return
</span><span class="cx"> return $v_result;
</span><span class="cx"> }
</span><span class="lines">@@ -4101,7 +4101,7 @@
</span><span class="cx">
</span><span class="cx"> // ----- Read the compressed file in a buffer (one shot)
</span><span class="cx"> $v_buffer = @fread($this->zip_fd, $p_entry['compressed_size']);
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Decompress the file
</span><span class="cx"> $v_file_content = gzinflate($v_buffer);
</span><span class="cx"> unset($v_buffer);
</span><span class="lines">@@ -4180,7 +4180,7 @@
</span><span class="cx"> $p_entry['status'] = "skipped";
</span><span class="cx"> $v_result = 1;
</span><span class="cx"> }
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Look for abort result
</span><span class="cx"> if ($v_result == 2) {
</span><span class="cx"> // ----- This status is internal and will be changed in 'skipped'
</span><span class="lines">@@ -4202,41 +4202,41 @@
</span><span class="cx"> // ----- Look for not compressed file
</span><span class="cx"> // if ($p_entry['compressed_size'] == $p_entry['size'])
</span><span class="cx"> if ($p_entry['compression'] == 0) {
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Reading the file
</span><span class="cx"> $p_string = @fread($this->zip_fd, $p_entry['compressed_size']);
</span><span class="cx"> }
</span><span class="cx"> else {
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Reading the file
</span><span class="cx"> $v_data = @fread($this->zip_fd, $p_entry['compressed_size']);
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Decompress the file
</span><span class="cx"> if (($p_string = @gzinflate($v_data)) === FALSE) {
</span><span class="cx"> // TBC
</span><span class="cx"> }
</span><span class="cx"> }
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Trace
</span><span class="cx"> }
</span><span class="cx"> else {
</span><span class="cx"> // TBC : error : can not extract a folder in a string
</span><span class="cx"> }
</span><del>-
</del><ins>+
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx">         // ----- Change abort status
</span><span class="cx">         if ($p_entry['status'] == "aborted") {
</span><span class="cx"> $p_entry['status'] = "skipped";
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx"> // ----- Look for post-extract callback
</span><span class="cx"> elseif (isset($p_options[PCLZIP_CB_POST_EXTRACT])) {
</span><span class="cx">
</span><span class="cx"> // ----- Generate a local information
</span><span class="cx"> $v_local_header = array();
</span><span class="cx"> $this->privConvertHeader2FileInfo($p_entry, $v_local_header);
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Swap the content to header
</span><span class="cx"> $v_local_header['content'] = $p_string;
</span><span class="cx"> $p_string = '';
</span><span class="lines">@@ -4496,7 +4496,7 @@
</span><span class="cx">         }
</span><span class="cx">         if ($p_local_header['filename_len'] != $p_central_header['filename_len']) {
</span><span class="cx">         }
</span><del>-
</del><ins>+
</ins><span class="cx">         // ----- Look for flag bit 3
</span><span class="cx">         if (($p_local_header['flag'] & 8) == 8) {
</span><span class="cx"> $p_local_header['size'] = $p_central_header['size'];
</span><span class="lines">@@ -4582,9 +4582,9 @@
</span><span class="cx">
</span><span class="cx"> // ----- Add the byte
</span><span class="cx"> //$v_bytes = ($v_bytes << 8) | Ord($v_byte);
</span><del>- // Note we mask the old value down such that once shifted we can never end up with more than a 32bit number
- // Otherwise on systems where we have 64bit integers the check below for the magic number will fail.
- $v_bytes = ( ($v_bytes & 0xFFFFFF) << 8) | Ord($v_byte);
</del><ins>+ // Note we mask the old value down such that once shifted we can never end up with more than a 32bit number
+ // Otherwise on systems where we have 64bit integers the check below for the magic number will fail.
+ $v_bytes = ( ($v_bytes & 0xFFFFFF) << 8) | Ord($v_byte);
</ins><span class="cx">
</span><span class="cx"> // ----- Compare the bytes
</span><span class="cx"> if ($v_bytes == 0x504b0506)
</span><span class="lines">@@ -4862,7 +4862,7 @@
</span><span class="cx"> // ----- Return
</span><span class="cx"> return $v_result;
</span><span class="cx"> }
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Check that local file header is same as central file header
</span><span class="cx"> if ($this->privCheckFileHeaders($v_local_header,
</span><span class="cx">                          $v_header_list[$i]) != 1) {
</span><span class="lines">@@ -4946,11 +4946,11 @@
</span><span class="cx"> // TBC : I should test the result ...
</span><span class="cx"> //@rename($v_zip_temp_name, $this->zipname);
</span><span class="cx"> PclZipUtilRename($v_zip_temp_name, $this->zipname);
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Destroy the temporary archive
</span><span class="cx"> unset($v_temp_zip);
</span><span class="cx"> }
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Remove every files : reset the file
</span><span class="cx"> else if ($v_central_dir['entries'] != 0) {
</span><span class="cx"> $this->privCloseFd();
</span><span class="lines">@@ -5437,7 +5437,7 @@
</span><span class="cx">                  }
</span><span class="cx"> }
</span><span class="cx"> }
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Look for skip
</span><span class="cx"> if ($v_skip > 0) {
</span><span class="cx"> while ($v_skip > 0) {
</span><span class="lines">@@ -5470,7 +5470,7 @@
</span><span class="cx"> function PclZipUtilPathInclusion($p_dir, $p_path)
</span><span class="cx"> {
</span><span class="cx"> $v_result = 1;
</span><del>-
</del><ins>+
</ins><span class="cx"> // ----- Look for path beginning by ./
</span><span class="cx"> if ( ($p_dir == '.')
</span><span class="cx"> || ((strlen($p_dir) >=2) && (substr($p_dir, 0, 2) == './'))) {
</span><span class="lines">@@ -5638,7 +5638,7 @@
</span><span class="cx"> // --------------------------------------------------------------------------------
</span><span class="cx"> function PclZipUtilOptionText($p_option)
</span><span class="cx"> {
</span><del>-
</del><ins>+
</ins><span class="cx"> $v_list = get_defined_constants();
</span><span class="cx"> for (reset($v_list); $v_key = key($v_list); next($v_list)) {
</span><span class="cx">          $v_prefix = substr($v_key, 0, 10);
</span><span class="lines">@@ -5649,7 +5649,7 @@
</span><span class="cx"> return $v_key;
</span><span class="cx">          }
</span><span class="cx"> }
</span><del>-
</del><ins>+
</ins><span class="cx"> $v_result = 'Unknown';
</span><span class="cx">
</span><span class="cx"> return $v_result;
</span></span></pre></div>
<a id="trunkwpadminincludespluginphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/plugin.php (12041 => 12042)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/plugin.php        2009-10-15 17:27:45 UTC (rev 12041)
+++ trunk/wp-admin/includes/plugin.php        2009-10-15 20:26:21 UTC (rev 12042)
</span><span class="lines">@@ -991,7 +991,7 @@
</span><span class="cx"> * @since 2.7.0
</span><span class="cx"> *
</span><span class="cx"> * @param string $option_group A settings group name. Should correspond to a whitelisted option key name.
</span><del>- *         Default whitelisted option key names include "general," "discussion," and "reading," among others.
</del><ins>+ *         Default whitelisted option key names include "general," "discussion," and "reading," among others.
</ins><span class="cx"> * @param string $option_name The name of an option to sanitize and save.
</span><span class="cx"> * @param unknown_type $sanitize_callback A callback function that sanitizes the option's value.
</span><span class="cx"> * @return unknown
</span></span></pre></div>
<a id="trunkwpadminpressthisphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/press-this.php (12041 => 12042)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/press-this.php        2009-10-15 17:27:45 UTC (rev 12041)
+++ trunk/wp-admin/press-this.php        2009-10-15 20:26:21 UTC (rev 12042)
</span><span class="lines">@@ -436,7 +436,7 @@
</span><span class="cx">                 <?php } ?>
</span><span class="cx">                 jQuery('#title').unbind();
</span><span class="cx">                 jQuery('#publish, #save').click(function() { jQuery('#saving').css('display', 'inline'); });
</span><del>-                
</del><ins>+
</ins><span class="cx">                 $('#tagsdiv-post_tag, #categorydiv').children('h3').click(function(){
</span><span class="cx">                         $(this).siblings('.inside').toggle();
</span><span class="cx">                 });
</span></span></pre></div>
<a id="trunkwpincludesclassoembedphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/class-oembed.php (12041 => 12042)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/class-oembed.php        2009-10-15 17:27:45 UTC (rev 12041)
+++ trunk/wp-includes/class-oembed.php        2009-10-15 20:26:21 UTC (rev 12042)
</span><span class="lines">@@ -174,7 +174,7 @@
</span><span class="cx">                 // Example content: http://vimeo.com/api/oembed.xml?url=http%3A%2F%2Fvimeo.com%2F240975
</span><span class="cx">                 elseif ( function_exists('simplexml_load_string') ) {
</span><span class="cx">                         $errors = libxml_use_internal_errors( 'true' );
</span><del>-                        
</del><ins>+
</ins><span class="cx">                         $data = simplexml_load_string( $result );
</span><span class="cx">
</span><span class="cx">                         libxml_use_internal_errors( $errors );
</span></span></pre></div>
<a id="trunkwpincludescommentphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/comment.php (12041 => 12042)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/comment.php        2009-10-15 17:27:45 UTC (rev 12041)
+++ trunk/wp-includes/comment.php        2009-10-15 20:26:21 UTC (rev 12042)
</span><span class="lines">@@ -896,8 +896,8 @@
</span><span class="cx">
</span><span class="cx">         $comment['comment_approved'] = $status;
</span><span class="cx">
</span><del>-        delete_comment_meta($comment_id, '_wp_trash_meta_time');
-        delete_comment_meta($comment_id, '_wp_trash_meta_status');
</del><ins>+        delete_comment_meta($comment_id, '_wp_trash_meta_time');
+        delete_comment_meta($comment_id, '_wp_trash_meta_status');
</ins><span class="cx">
</span><span class="cx">         wp_update_comment($comment);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkwpincludesdeprecatedphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/deprecated.php (12041 => 12042)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/deprecated.php        2009-10-15 17:27:45 UTC (rev 12041)
+++ trunk/wp-includes/deprecated.php        2009-10-15 20:26:21 UTC (rev 12042)
</span><span class="lines">@@ -1715,7 +1715,7 @@
</span><span class="cx"> *                parameters.
</span><span class="cx"> *
</span><span class="cx"> * @deprecated 2.9.0
</span><del>- *
</del><ins>+ *
</ins><span class="cx"> * @param string $more_link_text Optional. Text to display when more content is available but not displayed.
</span><span class="cx"> * @param int|bool $stripteaser Optional. Default is 0.
</span><span class="cx"> * @param string $more_file Optional.
</span></span></pre></div>
<a id="trunkwpincludesfunctionsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/functions.php (12041 => 12042)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/functions.php        2009-10-15 17:27:45 UTC (rev 12041)
+++ trunk/wp-includes/functions.php        2009-10-15 20:26:21 UTC (rev 12042)
</span><span class="lines">@@ -3172,13 +3172,13 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function get_site_option( $key, $default = false, $use_cache = true ) {
</span><del>-        // Allow plugins to short-circuit site options.
-         $pre = apply_filters( 'pre_site_option_' . $key, false );
-         if ( false !== $pre )
-                 return $pre;
-
</del><ins>+        // Allow plugins to short-circuit site options.
+         $pre = apply_filters( 'pre_site_option_' . $key, false );
+         if ( false !== $pre )
+                 return $pre;
+
</ins><span class="cx">         $value = get_option($key, $default);
</span><del>-
</del><ins>+
</ins><span class="cx">         return apply_filters( 'site_option_' . $key, $value );
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkwpincludesmediaphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/media.php (12041 => 12042)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/media.php        2009-10-15 17:27:45 UTC (rev 12041)
+++ trunk/wp-includes/media.php        2009-10-15 20:26:21 UTC (rev 12042)
</span><span class="lines">@@ -560,7 +560,7 @@
</span><span class="cx"> * Adds a 'wp-post-image' class to post image thumbnails
</span><span class="cx"> * Uses the begin_fetch_post_image_html and end_fetch_post_image_html action hooks to
</span><span class="cx"> * dynamically add/remove itself so as to only filter post image thumbnails
</span><del>- *
</del><ins>+ *
</ins><span class="cx"> * @author Mark Jaquith
</span><span class="cx"> * @since 2.9.0
</span><span class="cx"> * @param array $attr Attributes including src, class, alt, title
</span><span class="lines">@@ -573,7 +573,7 @@
</span><span class="cx">
</span><span class="cx"> /**
</span><span class="cx"> * Adds _wp_post_image_class_filter to the wp_get_attachment_image_attributes filter
</span><del>- *
</del><ins>+ *
</ins><span class="cx"> * @author Mark Jaquith
</span><span class="cx"> * @since 2.9.0
</span><span class="cx"> */
</span><span class="lines">@@ -583,7 +583,7 @@
</span><span class="cx">
</span><span class="cx"> /**
</span><span class="cx"> * Removes _wp_post_image_class_filter from the wp_get_attachment_image_attributes filter
</span><del>- *
</del><ins>+ *
</ins><span class="cx"> * @author Mark Jaquith
</span><span class="cx"> * @since 2.9.0
</span><span class="cx"> */
</span></span></pre></div>
<a id="trunkwpincludesmetaphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/meta.php (12041 => 12042)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/meta.php        2009-10-15 17:27:45 UTC (rev 12041)
+++ trunk/wp-includes/meta.php        2009-10-15 20:26:21 UTC (rev 12042)
</span><span class="lines">@@ -81,9 +81,9 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function delete_metadata($meta_type, $object_id, $meta_key, $meta_value = '', $delete_all = false) {
</span><del>-        if ( !$meta_type || !$meta_key || (!$delete_all && ! (int)$object_id) )
</del><ins>+        if ( !$meta_type || !$meta_key || (!$delete_all && ! (int)$object_id) )
</ins><span class="cx">                 return false;
</span><del>-        
</del><ins>+
</ins><span class="cx">         if ( ! $table = _get_meta_table($meta_type) )
</span><span class="cx">                 return false;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkwpincludespostphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/post.php (12041 => 12042)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/post.php        2009-10-15 17:27:45 UTC (rev 12041)
+++ trunk/wp-includes/post.php        2009-10-15 20:26:21 UTC (rev 12042)
</span><span class="lines">@@ -473,7 +473,7 @@
</span><span class="cx"> * Optional $args contents:
</span><span class="cx"> *
</span><span class="cx"> * exclude_from_search - Whether to exclude posts with this post type from search results. Defaults to true.
</span><del>- *
</del><ins>+ *
</ins><span class="cx"> * @package WordPress
</span><span class="cx"> * @subpackage Post
</span><span class="cx"> * @since 2.9.0
</span><span class="lines">@@ -2246,7 +2246,7 @@
</span><span class="cx"> *
</span><span class="cx"> * It uses auxiliary structure to hold parent-children relationships and
</span><span class="cx"> * runs in O(N) complexity
</span><del>- *
</del><ins>+ *
</ins><span class="cx"> * @since 2.0.0
</span><span class="cx"> *
</span><span class="cx"> * @param array $posts Posts array.
</span><span class="lines">@@ -2254,34 +2254,34 @@
</span><span class="cx"> * @return array A list arranged by hierarchy. Children immediately follow their parents.
</span><span class="cx"> */
</span><span class="cx"> function &get_page_hierarchy( &$pages, $page_id = 0 ) {
</span><del>-        
</del><ins>+
</ins><span class="cx">         if ( empty( $pages ) )
</span><span class="cx">                 return null;
</span><del>-                
</del><ins>+
</ins><span class="cx">         $children = array();
</span><span class="cx">         foreach ( (array) $pages as $p ) {
</span><del>-                
</del><ins>+
</ins><span class="cx">                 $parent_id = intval( $p->post_parent );
</span><span class="cx">                 $children[ $parent_id ][] = $p;
</span><span class="cx">          }
</span><del>-        
</del><ins>+
</ins><span class="cx">          $result = array();
</span><span class="cx">          _page_traverse_name( $page_id, $children, $result );
</span><del>-        
</del><ins>+
</ins><span class="cx">         return $result;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><span class="cx"> * function to traverse and return all the nested children post names of a root page.
</span><span class="cx"> * $children contains parent-chilren relations
</span><del>- *
</del><ins>+ *
</ins><span class="cx"> */
</span><del>-function _page_traverse_name( $page_id, &$children, &$result ){
-        
</del><ins>+function _page_traverse_name( $page_id, &$children, &$result ){
+
</ins><span class="cx">         if ( isset( $children[ $page_id ] ) ){
</span><del>-                
</del><ins>+
</ins><span class="cx">                 foreach( (array)$children[ $page_id ] as $child ) {
</span><del>-                        
</del><ins>+
</ins><span class="cx">                         $result[ $child->ID ] = $child->post_name;
</span><span class="cx">                         _page_traverse_name( $child->ID, $children, $result );
</span><span class="cx">                 }
</span></span></pre></div>
<a id="trunkwpincludesscriptloaderphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/script-loader.php (12041 => 12042)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/script-loader.php        2009-10-15 17:27:45 UTC (rev 12041)
+++ trunk/wp-includes/script-loader.php        2009-10-15 20:26:21 UTC (rev 12042)
</span><span class="lines">@@ -385,7 +385,7 @@
</span><span class="cx">
</span><span class="cx">                 $scripts->add( 'set-post-thumbnail-handler', "/wp-admin/js/set-post-thumbnail-handler$suffix.js", array( 'jquery' ), '20091015' );
</span><span class="cx">                 $scripts->add_data( 'set-post-thumbnail-handler', 'group', 1 );
</span><del>-        
</del><ins>+
</ins><span class="cx">         }
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkwpincludesthemephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/theme.php (12041 => 12042)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/theme.php        2009-10-15 17:27:45 UTC (rev 12041)
+++ trunk/wp-includes/theme.php        2009-10-15 20:26:21 UTC (rev 12042)
</span><span class="lines">@@ -129,7 +129,7 @@
</span><span class="cx">         $template = get_template();
</span><span class="cx">         $theme_root = get_theme_root( $template );
</span><span class="cx">         $template_dir = "$theme_root/$template";
</span><del>-                
</del><ins>+
</ins><span class="cx">         return apply_filters( 'template_directory', $template_dir, $template, $theme_root );
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -145,7 +145,7 @@
</span><span class="cx">         $template = get_template();
</span><span class="cx">         $theme_root_uri = get_theme_root_uri( $template );
</span><span class="cx">         $template_dir_uri = "$theme_root_uri/$template";
</span><del>-        
</del><ins>+
</ins><span class="cx">         return apply_filters( 'template_directory_uri', $template_dir_uri, $template, $theme_root_uri );
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -266,9 +266,9 @@
</span><span class="cx">
</span><span class="cx">         if ( !$theme_files = search_theme_directories() )
</span><span class="cx">                 return false;
</span><del>-        
</del><ins>+
</ins><span class="cx">         asort( $theme_files );
</span><del>-        
</del><ins>+
</ins><span class="cx">         foreach ( (array) $theme_files as $theme_file ) {
</span><span class="cx">                 $theme_root = $theme_file['theme_root'];
</span><span class="cx">                 $theme_file = $theme_file['theme_file'];
</span><span class="lines">@@ -307,7 +307,7 @@
</span><span class="cx">                         else
</span><span class="cx">                                 continue;
</span><span class="cx">                 }
</span><del>-                
</del><ins>+
</ins><span class="cx">                 $template = trim( $template );
</span><span class="cx">
</span><span class="cx">                 if ( !file_exists("$theme_root/$template/index.php") ) {
</span><span class="lines">@@ -315,9 +315,9 @@
</span><span class="cx">                         if ( file_exists("$theme_root/$parent_dir/$template/index.php") ) {
</span><span class="cx">                                 $template = "$theme_root/$parent_dir/$template";
</span><span class="cx">                         } else {
</span><del>-                                /**
-                                 * The parent theme doesn't exist in the current theme's folder or sub folder
-                                 * so lets use the theme root for the parent template.
</del><ins>+                                /**
+                                 * The parent theme doesn't exist in the current theme's folder or sub folder
+                                 * so lets use the theme root for the parent template.
</ins><span class="cx">                                  */
</span><span class="cx">                                 $parent_theme_root = $theme_files[$template]['theme_root'];
</span><span class="cx">                                 if ( file_exists( "$parent_theme_root/$template/index.php" ) ) {
</span><span class="lines">@@ -326,12 +326,12 @@
</span><span class="cx">                                         $wp_broken_themes[$name] = array('Name' => $name, 'Title' => $title, 'Description' => __('Template is missing.'));
</span><span class="cx">                                         continue;
</span><span class="cx">                                 }
</span><del>-                                
</del><ins>+
</ins><span class="cx">                         }
</span><span class="cx">                 } else {
</span><span class="cx">                         $template = trim( $theme_root . '/' . $template );
</span><span class="cx">                 }
</span><del>-                
</del><ins>+
</ins><span class="cx">                 $stylesheet_files = array();
</span><span class="cx">                 $template_files = array();
</span><span class="cx">
</span><span class="lines">@@ -419,7 +419,7 @@
</span><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         $wp_themes = $themes;
</span><del>-        
</del><ins>+
</ins><span class="cx">         return $themes;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -501,16 +501,16 @@
</span><span class="cx"> */
</span><span class="cx"> function register_theme_directory( $directory ) {
</span><span class="cx">         global $wp_theme_directories;
</span><del>-        
</del><ins>+
</ins><span class="cx">         /* The theme directory should be relative to the content directory */
</span><span class="cx">         $registered_directory = WP_CONTENT_DIR . '/' . $directory;
</span><del>-        
</del><ins>+
</ins><span class="cx">         /* If this folder does not exist, return and do not register */
</span><span class="cx">         if ( !file_exists( $registered_directory ) )
</span><span class="cx">                 return false;
</span><del>-        
</del><ins>+
</ins><span class="cx">         $wp_theme_directories[] = $registered_directory;
</span><del>-        
</del><ins>+
</ins><span class="cx">         return true;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -523,7 +523,7 @@
</span><span class="cx"> */
</span><span class="cx"> function search_theme_directories() {
</span><span class="cx">         global $wp_theme_directories, $wp_broken_themes;
</span><del>-        
</del><ins>+
</ins><span class="cx">         if ( empty( $wp_theme_directories ) )
</span><span class="cx">                 return false;
</span><span class="cx">
</span><span class="lines">@@ -533,9 +533,9 @@
</span><span class="cx">         /* Loop the registered theme directories and extract all themes */
</span><span class="cx">         foreach ( (array) $wp_theme_directories as $theme_root ) {
</span><span class="cx">                 $theme_loc = $theme_root;
</span><del>-                
</del><ins>+
</ins><span class="cx">                 /* We don't want to replace all forward slashes, see Trac #4541 */
</span><del>-                if ( '/' != WP_CONTENT_DIR )
</del><ins>+                if ( '/' != WP_CONTENT_DIR )
</ins><span class="cx">                         $theme_loc = str_replace(WP_CONTENT_DIR, '', $theme_root);
</span><span class="cx">
</span><span class="cx">                 /* Files in the root of the current theme directory and one subdir down */
</span><span class="lines">@@ -551,7 +551,7 @@
</span><span class="cx">
</span><span class="cx">                                 $stylish_dir = @ opendir($theme_root . '/' . $theme_dir);
</span><span class="cx">                                 $found_stylesheet = false;
</span><del>-                                
</del><ins>+
</ins><span class="cx">                                 while ( ($theme_file = readdir($stylish_dir)) !== false ) {
</span><span class="cx">                                         if ( $theme_file == 'style.css' ) {
</span><span class="cx">                                                 $theme_files[$theme_dir] = array( 'theme_file' => $theme_dir . '/' . $theme_file, 'theme_root' => $theme_root );
</span><span class="lines">@@ -560,20 +560,20 @@
</span><span class="cx">                                         }
</span><span class="cx">                                 }
</span><span class="cx">                                 @closedir($stylish_dir);
</span><del>-                                
</del><ins>+
</ins><span class="cx">                                 if ( !$found_stylesheet ) { // look for themes in that dir
</span><span class="cx">                                         $subdir = "$theme_root/$theme_dir";
</span><span class="cx">                                         $subdir_name = $theme_dir;
</span><span class="cx">                                         $theme_subdir = @ opendir( $subdir );
</span><del>-                                        
</del><ins>+
</ins><span class="cx">                                         while ( ($theme_dir = readdir($theme_subdir)) !== false ) {
</span><span class="cx">                                                 if ( is_dir( $subdir . '/' . $theme_dir) && is_readable($subdir . '/' . $theme_dir) ) {
</span><span class="cx">                                                         if ( $theme_dir{0} == '.' || $theme_dir == '..' || $theme_dir == 'CVS' )
</span><span class="cx">                                                                 continue;
</span><del>-                                                                
</del><ins>+
</ins><span class="cx">                                                         $stylish_dir = @ opendir($subdir . '/' . $theme_dir);
</span><span class="cx">                                                         $found_stylesheet = false;
</span><del>-                                                        
</del><ins>+
</ins><span class="cx">                                                         while ( ($theme_file = readdir($stylish_dir)) !== false ) {
</span><span class="cx">                                                                 if ( $theme_file == 'style.css' ) {
</span><span class="cx">                                                                         $theme_files[$theme_dir] = array( 'theme_file' => $subdir_name . '/' . $theme_dir . '/' . $theme_file, 'theme_root' => $theme_root );
</span><span class="lines">@@ -585,7 +585,7 @@
</span><span class="cx">                                                 }
</span><span class="cx">                                         }
</span><span class="cx">                                         @closedir($theme_subdir);
</span><del>-                                        
</del><ins>+
</ins><span class="cx">                                         $wp_broken_themes[$theme_dir] = array('Name' => $theme_dir, 'Title' => $theme_dir, 'Description' => __('Stylesheet is missing.'));
</span><span class="cx">                                 }
</span><span class="cx">                         }
</span><span class="lines">@@ -593,7 +593,7 @@
</span><span class="cx">                 if ( is_dir( $theme_dir ) )
</span><span class="cx">                         @closedir( $theme_dir );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         return $theme_files;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -610,7 +610,7 @@
</span><span class="cx"> */
</span><span class="cx"> function get_theme_root( $stylesheet_or_template = false ) {
</span><span class="cx">         $theme_roots = get_theme_roots();
</span><del>-        
</del><ins>+
</ins><span class="cx">         if ( $theme_roots[$stylesheet_or_template] )
</span><span class="cx">                 $theme_root = WP_CONTENT_DIR . '/' . $theme_roots[$stylesheet_or_template];
</span><span class="cx">         else
</span><span class="lines">@@ -631,7 +631,7 @@
</span><span class="cx"> */
</span><span class="cx"> function get_theme_root_uri( $stylesheet_or_template = false ) {
</span><span class="cx">         $theme_roots = get_theme_roots();
</span><del>-        
</del><ins>+
</ins><span class="cx">         if ( $theme_roots[$stylesheet_or_template] )
</span><span class="cx">                 $theme_root_uri = content_url( $theme_roots[$stylesheet_or_template] );
</span><span class="cx">         else
</span><span class="lines">@@ -736,7 +736,7 @@
</span><span class="cx"> * Works by first retrieving the current tag name, for example 'tag-wordpress.php' and then
</span><span class="cx"> * trying tag ID, for example 'tag-1.php' and will finally fallback to tag.php
</span><span class="cx"> * template, if those files don't exist.
</span><del>- *
</del><ins>+ *
</ins><span class="cx"> * @since 2.3.0
</span><span class="cx"> * @uses apply_filters() Calls 'tag_template' on file path of tag template.
</span><span class="cx"> *
</span><span class="lines">@@ -753,7 +753,7 @@
</span><span class="cx">         if ( $tag_id )
</span><span class="cx">                 $templates[] = "tag-$tag_id.php";
</span><span class="cx">         $templates[] = "tag.php";
</span><del>-        
</del><ins>+
</ins><span class="cx">         $template = locate_template($templates);
</span><span class="cx">         return apply_filters('tag_template', $template);
</span><span class="cx"> }
</span></span></pre>
</div>
</div>
</body>
</html>