Changeset 7130
- Timestamp:
- 03/02/08 20:17:30 (6 months ago)
- Files:
-
- trunk/wp-admin/admin-header.php (modified) (1 diff)
- trunk/wp-admin/bookmarklet.php (modified) (1 diff)
- trunk/wp-admin/categories.php (modified) (1 diff)
- trunk/wp-admin/css/install.css (modified) (1 diff)
- trunk/wp-admin/css/login.css (modified) (1 diff)
- trunk/wp-admin/css/widgets.css (modified) (1 diff)
- trunk/wp-admin/edit-comments.php (modified) (2 diffs)
- trunk/wp-admin/edit-form-advanced.php (modified) (1 diff)
- trunk/wp-admin/edit-link-categories.php (modified) (1 diff)
- trunk/wp-admin/edit-page-form.php (modified) (1 diff)
- trunk/wp-admin/edit-pages.php (modified) (3 diffs)
- trunk/wp-admin/edit-tags.php (modified) (1 diff)
- trunk/wp-admin/edit.php (modified) (2 diffs)
- trunk/wp-admin/includes/class-ftp.php (modified) (6 diffs)
- trunk/wp-admin/includes/class-pclzip.php (modified) (68 diffs)
- trunk/wp-admin/includes/class-wp-filesystem-direct.php (modified) (11 diffs)
- trunk/wp-admin/includes/class-wp-filesystem-ftpext.php (modified) (10 diffs)
- trunk/wp-admin/includes/class-wp-filesystem-ftpsockets.php (modified) (12 diffs)
- trunk/wp-admin/includes/comment.php (modified) (1 diff)
- trunk/wp-admin/includes/dashboard.php (modified) (5 diffs)
- trunk/wp-admin/includes/file.php (modified) (2 diffs)
- trunk/wp-admin/includes/media.php (modified) (3 diffs)
- trunk/wp-admin/includes/post.php (modified) (1 diff)
- trunk/wp-admin/includes/template.php (modified) (4 diffs)
- trunk/wp-admin/includes/update.php (modified) (2 diffs)
- trunk/wp-admin/includes/user.php (modified) (1 diff)
- trunk/wp-admin/js/common.js (modified) (1 diff)
- trunk/wp-admin/js/editor.js (modified) (9 diffs)
- trunk/wp-admin/js/forms.js (modified) (2 diffs)
- trunk/wp-admin/js/media-upload.js (modified) (1 diff)
- trunk/wp-admin/js/password-strength-meter.js (modified) (4 diffs)
- trunk/wp-admin/js/post.js (modified) (2 diffs)
- trunk/wp-admin/js/slug.js (modified) (2 diffs)
- trunk/wp-admin/js/upload.js (modified) (3 diffs)
- trunk/wp-admin/js/widgets.js (modified) (1 diff)
- trunk/wp-admin/link-manager.php (modified) (2 diffs)
- trunk/wp-admin/options-general.php (modified) (1 diff)
- trunk/wp-admin/sidebar.php (modified) (2 diffs)
- trunk/wp-admin/theme-editor.php (modified) (3 diffs)
- trunk/wp-admin/update.php (modified) (1 diff)
- trunk/wp-admin/upload.php (modified) (3 diffs)
- trunk/wp-admin/users.php (modified) (1 diff)
- trunk/wp-admin/wp-admin.css (modified) (9 diffs)
- trunk/wp-content/themes/default/style.css (modified) (7 diffs)
- trunk/wp-includes/category-template.php (modified) (2 diffs)
- trunk/wp-includes/classes.php (modified) (3 diffs)
- trunk/wp-includes/deprecated.php (modified) (1 diff)
- trunk/wp-includes/functions.php (modified) (8 diffs)
- trunk/wp-includes/general-template.php (modified) (1 diff)
- trunk/wp-includes/js/autosave.js (modified) (1 diff)
- trunk/wp-includes/js/quicktags.js (modified) (19 diffs)
- trunk/wp-includes/js/wp-lists.js (modified) (1 diff)
- trunk/wp-includes/media.php (modified) (10 diffs)
- trunk/wp-includes/pluggable.php (modified) (3 diffs)
- trunk/wp-includes/post.php (modified) (4 diffs)
- trunk/wp-includes/script-loader.php (modified) (2 diffs)
- trunk/wp-includes/widgets.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/wp-admin/admin-header.php
r7114 r7130 28 28 <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" /> 29 29 <title><?php bloginfo('name') ?> › <?php echo wp_specialchars( strip_tags( $title ) ); ?> — WordPress</title> 30 <?php 30 <?php 31 31 wp_admin_css( 'css/global' ); 32 32 wp_admin_css(); trunk/wp-admin/bookmarklet.php
r6782 r7130 52 52 <title><?php bloginfo('name') ?> › Bookmarklet — WordPress</title> 53 53 <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" /> 54 <?php 54 <?php 55 55 wp_admin_css( 'css/global' ); 56 56 wp_admin_css(); trunk/wp-admin/categories.php
r7046 r7130 98 98 if ( !empty($_GET['_wp_http_referer']) ) { 99 99 wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']))); 100 exit; 100 exit; 101 101 } 102 102 trunk/wp-admin/css/install.css
r7001 r7130 51 51 font-size: 13px !important; 52 52 -moz-border-radius: 2px; 53 -khtml-border-radius: 2px; 53 -khtml-border-radius: 2px; 54 54 -webkit-border-radius: 2px; 55 55 border-radius: 2px; trunk/wp-admin/css/login.css
r6922 r7130 30 30 margin-top: -6px; 31 31 -moz-border-radius: 2px; 32 -khtml-border-radius: 2px; 32 -khtml-border-radius: 2px; 33 33 -webkit-border-radius: 2px; 34 34 border-radius: 2px; trunk/wp-admin/css/widgets.css
r7086 r7130 36 36 div#widget-content { 37 37 border-bottom: 1px solid #ccc; 38 } 38 } 39 39 40 40 ul#widget-list { trunk/wp-admin/edit-comments.php
r7098 r7130 10 10 check_admin_referer('bulk-comments'); 11 11 12 $comments_deleted = $comments_approved = $comments_unapproved = $comments_spammed = 0; 12 $comments_deleted = $comments_approved = $comments_unapproved = $comments_spammed = 0; 13 13 foreach ($_REQUEST['delete_comments'] as $comment) : // Check the permissions on each 14 14 $comment = (int) $comment; … … 41 41 } elseif ( !empty($_GET['_wp_http_referer']) ) { 42 42 wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']))); 43 exit; 43 exit; 44 44 } 45 45 trunk/wp-admin/edit-form-advanced.php
r7120 r7130 179 179 <?php $sample_permalink_html = get_sample_permalink_html($post->ID); ?> 180 180 <div id="edit-slug-box"> 181 <?php if ( ! empty($post->ID) && ! empty($sample_permalink_html) ) : 181 <?php if ( ! empty($post->ID) && ! empty($sample_permalink_html) ) : 182 182 echo $sample_permalink_html; 183 183 endif; ?> trunk/wp-admin/edit-link-categories.php
r7104 r7130 23 23 } elseif ( !empty($_GET['_wp_http_referer']) ) { 24 24 wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']))); 25 exit; 25 exit; 26 26 } 27 27 trunk/wp-admin/edit-page-form.php
r7120 r7130 154 154 <?php $sample_permalink_html = get_sample_permalink_html($post->ID); ?> 155 155 <div id="edit-slug-box"> 156 <?php if ( ! empty($post->ID) && ! empty($sample_permalink_html) ) : 156 <?php if ( ! empty($post->ID) && ! empty($sample_permalink_html) ) : 157 157 echo $sample_permalink_html; 158 158 endif; ?> trunk/wp-admin/edit-pages.php
r7113 r7130 29 29 } elseif ( !empty($_GET['_wp_http_referer']) ) { 30 30 wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']))); 31 exit; 31 exit; 32 32 } 33 33 … … 73 73 74 74 $avail_post_stati = get_available_post_statuses('page'); 75 75 76 76 $status_links = array(); 77 77 $num_posts = wp_count_posts('page', 'readable'); … … 81 81 if ( !in_array($status, $avail_post_stati) ) 82 82 continue; 83 83 84 84 if ( $status == $_GET['post_status'] ) 85 85 $class = ' class="current"'; trunk/wp-admin/edit-tags.php
r7046 r7130 88 88 if ( !empty($_GET['_wp_http_referer']) ) { 89 89 wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']))); 90 exit; 90 exit; 91 91 } 92 92 trunk/wp-admin/edit.php
r7110 r7130 29 29 } elseif ( !empty($_GET['_wp_http_referer']) ) { 30 30 wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']))); 31 exit; 31 exit; 32 32 } 33 33 … … 155 155 continue; 156 156 $arc_row->mmonth = zeroise( $arc_row->mmonth, 2 ); 157 157 158 158 if ( $arc_row->yyear . $arc_row->mmonth == $_GET['m'] ) 159 159 $default = ' selected="selected"'; 160 160 else 161 161 $default = ''; 162 162 163 163 echo "<option$default value='$arc_row->yyear$arc_row->mmonth'>"; 164 164 echo $wp_locale->get_month($arc_row->mmonth) . " $arc_row->yyear"; trunk/wp-admin/includes/class-ftp.php
r7126 r7130 15 15 var $OS_local; 16 16 var $OS_remote; 17 17 18 18 /* Private variables */ 19 19 var $_lastaction; … … 602 602 } 603 603 return $ret; 604 604 605 605 } 606 606 … … 650 650 return false; 651 651 } 652 652 653 653 foreach($list as $k=>$v) { 654 654 $list[$k]=$this->parselisting($v); … … 656 656 } 657 657 $ret=true; 658 658 659 659 foreach($list as $el) { 660 660 if ( empty($el) ) … … 674 674 } 675 675 } 676 676 677 677 if(!$this->rmdir($remote)) { 678 678 $this->PushError("mdel", "can't delete folder", "Can't delete remote folder \"".$remote."/".$el["name"]."\""); … … 814 814 return(array_push($this->_error_array,$error)); 815 815 } 816 816 817 817 // Rcupre une erreur externe 818 818 function PopError(){ trunk/wp-admin/includes/class-pclzip.php
r6919 r7130 28 28 // ----- Constants 29 29 define( 'PCLZIP_READ_BLOCK_SIZE', 2048 ); 30 30 31 31 // ----- File list separator 32 32 // In version 1.x of PclZip, the separator for file list is a space … … 127 127 //define( 'PCLZIP_OPT_CRYPT', 77018 ); 128 128 define( 'PCLZIP_OPT_EXTRACT_DIR_RESTRICTION', 77019 ); 129 129 130 130 // ----- File description attributes 131 131 define( 'PCLZIP_ATT_FILE_NAME', 79001 ); … … 170 170 var $error_code = 1; 171 171 var $error_string = ''; 172 172 173 173 // ----- Current status of the magic_quotes_runtime 174 174 // This value store the php configuration for magic_quotes … … 316 316 $v_filedescr_list = array(); 317 317 $p_result_list = array(); 318 318 319 319 // ----- Look if the $p_filelist is really an array 320 320 if (is_array($p_filelist)) { 321 321 322 322 // ----- Look if the first element is also an array 323 323 // This will mean that this is a file description entry … … 325 325 $v_att_list = $p_filelist; 326 326 } 327 327 328 328 // ----- The list is a list of string names 329 329 else { … … 344 344 return 0; 345 345 } 346 346 347 347 // ----- Reformat the string list 348 348 if (sizeof($v_string_list) != 0) { … … 356 356 } 357 357 } 358 358 359 359 // ----- For each file in the list check the attributes 360 360 $v_supported_attributes … … 506 506 $v_filedescr_list = array(); 507 507 $p_result_list = array(); 508 508 509 509 // ----- Look if the $p_filelist is really an array 510 510 if (is_array($p_filelist)) { 511 511 512 512 // ----- Look if the first element is also an array 513 513 // This will mean that this is a file description entry … … 515 515 $v_att_list = $p_filelist; 516 516 } 517 517 518 518 // ----- The list is a list of string names 519 519 else { … … 534 534 return 0; 535 535 } 536 536 537 537 // ----- Reformat the string list 538 538 if (sizeof($v_string_list) != 0) { … … 541 541 } 542 542 } 543 543 544 544 // ----- For each file in the list check the attributes 545 545 $v_supported_attributes … … 991 991 // PCLZIP_OPT_BY_INDEX : 992 992 // PCLZIP_OPT_BY_NAME : 993 // PCLZIP_OPT_BY_EREG : 993 // PCLZIP_OPT_BY_EREG : 994 994 // PCLZIP_OPT_BY_PREG : 995 995 // Return Values : … … 1066 1066 { 1067 1067 //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::deleteByIndex", "index='$p_index'"); 1068 1068 1069 1069 $p_list = $this->delete(PCLZIP_OPT_BY_INDEX, $p_index); 1070 1070 … … 1120 1120 { 1121 1121 $this->privSwapBackMagicQuotes(); 1122 1122 1123 1123 // ----- Error log 1124 1124 PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \''.$this->zipname.'\' in binary read mode'); … … 1449 1449 //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privParseOptions", ""); 1450 1450 $v_result=1; 1451 1451 1452 1452 // ----- Read the options 1453 1453 $i=0; … … 1646 1646 return PclZip::errorCode(); 1647 1647 } 1648 1648 1649 1649 // ----- Reduce the index list 1650 1650 // each index item in the list must be a couple with a start and … … 1657 1657 $v_item_list = explode("-", $v_work_list[$j]); 1658 1658 $v_size_item_list = sizeof($v_item_list); 1659 1659 1660 1660 // ----- TBC : Here we might check that each item is a 1661 1661 // real integer ... 1662 1662 1663 1663 // ----- Look for single value 1664 1664 if ($v_size_item_list == 1) { … … 1698 1698 $v_sort_value = $v_result_list[$p_options_list[$i]][$j]['start']; 1699 1699 } 1700 1700 1701 1701 // ----- Sort the items 1702 1702 if ($v_sort_flag) { … … 1830 1830 //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privFileDescrParseAtt", ""); 1831 1831 $v_result=1; 1832 1832 1833 1833 // ----- For each file in the list check the attributes 1834 1834 foreach ($p_file_list as $v_key => $v_value) { 1835 1835 1836 1836 // ----- Check if the option is supported 1837 1837 if (!isset($v_requested_options[$v_key])) { … … 1855 1855 $p_filedescr['filename'] = PclZipUtilPathReduction($v_value); 1856 1856 //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($v_key)." = '".$v_value."'"); 1857 1857 1858 1858 if ($p_filedescr['filename'] == '') { 1859 1859 PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid empty filename for attribute '".PclZipUtilOptionText($v_key)."'"); … … 1923 1923 } 1924 1924 } 1925 1925 1926 1926 // end foreach 1927 1927 } 1928 1928 1929 1929 // ----- Return 1930 1930 //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); … … 1945 1945 //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privFileDescrExpand", ""); 1946 1946 $v_result=1; 1947 1947 1948 1948 // ----- Create a result list 1949 1949 $v_result_list = array(); 1950 1950 1951 1951 // ----- Look each entry 1952 1952 for ($i=0; $i<sizeof($p_filedescr_list); $i++) { 1953 1953 // ----- Get filedescr 1954 1954 $v_descr = $p_filedescr_list[$i]; 1955 1955 1956 1956 // ----- Reduce the filename 1957 1957 //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Filedescr before reduction :'".$v_descr['filename']."'"); … … 1959 1959 $v_descr['filename'] = PclZipUtilPathReduction($v_descr['filename']); 1960 1960 //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Filedescr after reduction :'".$v_descr['filename']."'"); 1961 1961 1962 1962 // ----- Get type of descr 1963 1963 if (!file_exists($v_descr['filename'])) { … … 1988 1988 continue; 1989 1989 } 1990 1990 1991 1991 // ----- Calculate the stored filename 1992 1992 $this->privCalculateStoredFilename($v_descr, $p_options); 1993 1993 1994 1994 // ----- Add the descriptor in result list 1995 1995 $v_result_list[sizeof($v_result_list)] = $v_descr; 1996 1996 1997 1997 // ----- Look for folder 1998 1998 if ($v_descr['type'] == 'folder') { … … 2008 2008 continue; 2009 2009 } 2010 2010 2011 2011 // ----- Compose the full filename 2012 2012 $v_dirlist_descr[$v_dirlist_nb]['filename'] = $v_descr['filename'].'/'.$v_item_handler; 2013 2013 2014 2014 // ----- Look for different stored filename 2015 2015 // Because the name of the folder was changed, the name of the … … 2018 2018 $v_dirlist_descr[$v_dirlist_nb]['new_full_name'] = $v_descr['stored_filename'].'/'.$v_item_handler; 2019 2019 } 2020 2020 2021 2021 $v_dirlist_nb++; 2022 2022 } … … 2026 2026 // TBC : unable to open folder in read mode 2027 2027 } 2028 2028 2029 2029 // ----- Expand each element of the list 2030 2030 if ($v_dirlist_nb != 0) { … … 2034 2034 return $v_result; 2035 2035 } 2036 2036 2037 2037 // ----- Concat the resulting list 2038 2038 //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Merging result list (size '".sizeof($v_result_list)."') with dirlist (size '".sizeof($v_dirlist_descr)."')"); … … 2043 2043 //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Nothing in this folder to expand."); 2044 2044 } 2045 2045 2046 2046 // ----- Free local array 2047 2047 unset($v_dirlist_descr); 2048 2048 } 2049 2049 } 2050 2050 2051 2051 // ----- Get the result list 2052 2052 $p_filedescr_list = $v_result_list; … … 2069 2069 $v_result=1; 2070 2070 $v_list_detail = array(); 2071 2071 2072 2072 // ----- Magic quotes trick 2073 2073 $this->privDisableMagicQuotes(); … … 2430 2430 // Description : 2431 2431 // Parameters : 2432 // $p_filedescr_list : An array containing the file description 2432 // $p_filedescr_list : An array containing the file description 2433 2433 // or directory names to add in the zip 2434 2434 // $p_result_list : list of added files with their properties (specially the status field) … … 2450 2450 $p_filedescr_list[$j]['filename'] 2451 2451 = PclZipUtilTranslateWinPath($p_filedescr_list[$j]['filename'], false); 2452 2452 2453 2453 //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Looking for file '".$p_filedescr_list[$j]['filename']."'"); 2454 2454 … … 2504 2504 //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privAddFile", "filename='".$p_filedescr['filename']."'"); 2505 2505 $v_result=1; 2506 2506 2507 2507 // ----- Working variable 2508 2508 $p_filename = $p_filedescr['filename']; … … 2517 2517 return PclZip::errorCode(); 2518 2518 } 2519 2520 // ----- Look for a stored different filename 2519 2520 // ----- Look for a stored different filename 2521 2521 if (isset($p_filedescr['stored_filename'])) { 2522 2522 $v_stored_filename = $p_filedescr['stored_filename']; … … 2584 2584 $p_header['status'] = "filtered"; 2585 2585 } 2586 2586 2587 2587 // ----- Check the path length 2588 2588 if (strlen($p_header['stored_filename']) > 0xFF) { … … 2631 2631 $p_header['compression'] = 8; 2632 2632 } 2633 2633 2634 2634 // ----- Look for encryption 2635 2635 /* … … 2637 2637 && ($p_options[PCLZIP_OPT_CRYPT] != "")) { 2638 2638 //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "File need to be crypted ...."); 2639 2639 2640 2640 // Should be a random header 2641 2641 $v_header = 'xxxxxxxxxxxx'; … … 2645 2645 $p_header['crc'], 2646 2646 "test"); 2647 2647 2648 2648 $p_header['compressed_size'] += 12; 2649 2649 $p_header['flag'] = 1; 2650 2650 2651 2651 // ----- Add the header to the data 2652 2652 $v_content_compressed = $v_header.$v_content_compressed; … … 2663 2663 2664 2664 // ----- Write the compressed (or not) content 2665 @fwrite($this->zip_fd, 2665 @fwrite($this->zip_fd, 2666 2666 $v_content_compressed, $p_header['compressed_size']); 2667 2667 2668 2668 // ----- Close the file 2669 2669 @fclose($v_file); … … 2731 2731 //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privCalculateStoredFilename", "filename='".$p_filedescr['filename']."'"); 2732 2732 $v_result=1; 2733 2733 2734 2734 // ----- Working variables 2735 2735 $p_filename = $p_filedescr['filename']; … … 2758 2758 //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Changing full name of '".$p_filename."' for '".$v_stored_filename."'"); 2759 2759 } 2760 2760 2761 2761 // ----- Look for path and/or short name change 2762 2762 else { … … 2789 2789 if ( (substr($p_filename, 0, 2) == "./") 2790 2790 || (substr($p_remove_dir, 0, 2) == "./")) { 2791 2791 2792 2792 if ( (substr($p_filename, 0, 2) == "./") 2793 2793 && (substr($p_remove_dir, 0, 2) != "./")) { … … 2829 2829 $p_filedescr['stored_filename'] = $v_stored_filename; 2830 2830 //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Stored filename will be '".$p_filedescr['stored_filename']."', strlen ".strlen($p_filedescr['stored_filename'])); 2831 2831 2832 2832 // ----- Return 2833 2833 //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); … … 2992 2992 // ----- Magic quotes trick 2993 2993 $this->privSwapBackMagicQuotes(); 2994 2994 2995 2995 // ----- Error log 2996 2996 PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \''.$this->zipname.'\' in binary read mode'); … … 3271 3271 && ($p_options[PCLZIP_OPT_BY_INDEX] != 0)) { 3272 3272 //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extract with rule 'ByIndex'"); 3273 3273 3274 3274 // ----- Look if the index is in the list 3275 3275 for ($j=$j_start; ($j<sizeof($p_options[PCLZIP_OPT_BY_INDEX])) && (!$v_extract); $j++) { … … 3311 3311 3312 3312 $this->privSwapBackMagicQuotes(); 3313 3313 3314 3314 PclZip::privErrorLog(PCLZIP_ERR_UNSUPPORTED_COMPRESSION, 3315 3315 "Filename '".$v_header['stored_filename']."' is " … … 3321 3321 } 3322 3322 } 3323 3323 3324 3324 // ----- Check encrypted files 3325 3325 if (($v_extract) && (($v_header['flag'] & 1) == 1)) { … … 3358 3358 $v_extract = false; 3359 3359 } 3360 3360 3361 3361 // ----- Look for real extraction 3362 3362 if ($v_extract) … … 3412 3412 // ----- Next extracted file 3413 3413 $v_nb_extracted++; 3414 3414 3415 3415 // ----- Look for user callback abort 3416 3416 if ($v_result1 == 2) { … … 3564 3564 $p_entry['filename'] = $p_path."/".$p_entry['filename']; 3565 3565 } 3566 3566 3567 3567 // ----- Check a base_dir_restriction 3568 3568 if (isset($p_options[PCLZIP_OPT_EXTRACT_DIR_RESTRICTION])) { … … 3570 3570 $v_inclusion 3571 3571 = PclZipUtilPathInclusion($p_options[PCLZIP_OPT_EXTRACT_DIR_RESTRICTION], 3572 $p_entry['filename']); 3572 $p_entry['filename']); 3573 3573 if ($v_inclusion == 0) { 3574 3574 //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "PCLZIP_OPT_EXTRACT_DIR_RESTRICTION is selected, file is outside restriction"); … … 3600 3600 $v_result = 1; 3601 3601 } 3602 3602 3603 3603 // ----- Look for abort result 3604 3604 if ($v_result == 2) { … … 3632 3632 // ----- Change the file status 3633 3633 $p_entry['status'] = "already_a_directory"; 3634 3634 3635 3635 // ----- Look for PCLZIP_OPT_STOP_ON_ERROR 3636 3636 // For historical reason first PclZip implementation does not stop … … 3765 3765 @fwrite($v_dest_file, $v_binary_data, $v_read_size); 3766 3766 */ 3767 @fwrite($v_dest_file, $v_buffer, $v_read_size); 3767 @fwrite($v_dest_file, $v_buffer, $v_read_size); 3768 3768 $v_size -= $v_read_size; 3769 3769 } … … 3774 3774 // ----- Change the file mtime 3775 3775 touch($p_entry['filename'], $p_entry['mtime']); 3776 3776 3777 3777 3778 3778 } … … 3787 3787 //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Read 12 encryption header bytes"); 3788 3788 $v_encryption_header = @fread($this->zip_fd, 12); 3789 3789 3790 3790 // ----- Read the encrypted & compressed file in a buffer 3791 3791 //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Read '".($p_entry['compressed_size']-12)."' compressed & encrypted bytes"); 3792 3792 $v_buffer = @fread($this->zip_fd, $p_entry['compressed_size']-12); 3793 3793 3794 3794 // ----- Decrypt the buffer 3795 3795 $this->privDecrypt($v_encryption_header, $v_buffer, … … 3803 3803 $v_buffer = @fread($this->zip_fd, $p_entry['compressed_size']); 3804 3804 } 3805 3805 3806 3806 // ----- Decompress the file 3807 3807 $v_file_content = @gzinflate($v_buffer); … … 3813 3813 // TBC 3814 3814 $p_entry['status'] = "error"; 3815 3815 3816 3816 //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); 3817 3817 return $v_result; 3818 3818 } 3819 3819 3820 3820 // ----- Opening destination file 3821 3821 if (($v_dest_file = @fopen($p_entry['filename'], 'wb')) == 0) { … … 3856 3856 $p_entry['status'] = "skipped"; 3857 3857 } 3858 3858 3859 3859 // ----- Look for post-extract callback 3860 3860 elseif (isset($p_options[PCLZIP_CB_POST_EXTRACT])) { … … 3965 3965 // ----- Read the compressed file in a buffer (one shot) 3966 3966 $v_buffer = @fread($this->zip_fd, $p_entry['compressed_size']); 3967 3967 3968 3968 // ----- Decompress the file 3969 3969 $v_file_content = gzinflate($v_buffer); … … 4054 4054 // ----- Reading the file 4055 4055 $v_data = @fread($this->zip_fd, $p_entry['compressed_size']); 4056 4056 4057 4057 // ----- Decompress the file 4058 4058 if (($p_string = @gzinflate($v_data)) === FALSE) { … … 4804 4804 return $v_result; 4805 4805 } 4806 4806 4807 4807 // ----- Check that local file header is same as central file header 4808 4808 if ($this->privCheckFileHeaders($v_local_header, … … 4897 4897 //@rename($v_zip_temp_name, $this->zipname); 4898 4898 PclZipUtilRename($v_zip_temp_name, $this->zipname); 4899 4899 4900 4900 // ----- Destroy the temporary archive 4901 4901 unset($v_temp_zip); 4902 4902 } 4903 4903 4904 4904 // ----- Remove every files : reset the file 4905 4905 else if ($v_central_dir['entries'] != 0) { … … 5316 5316 //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, 'PclZip::privDecrypt', "size=".$p_size.""); 5317 5317 $v_result=1; 5318 5318 5319 5319 // ----- To Be Modified ;-) 5320 5320 $v_pwd = "test"; 5321 5321 5322 5322 $p_buffer = PclZipUtilZipDecrypt($p_buffer, $p_size, $p_encryption_header, 5323 5323 $p_crc, $v_pwd); 5324 5324 5325 5325 // ----- Return 5326 5326 //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); … … 5472 5472 } 5473 5473 } 5474 5474 5475 5475 // ----- Look for skip 5476 5476 if ($v_skip > 0) { … … 5507 5507 //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZipUtilPathInclusion", "dir='$p_dir', path='$p_path'"); 5508 5508 $v_result = 1; 5509 5509 5510 5510 // ----- Look for path beginning by ./ 5511 5511 if ( ($p_dir == '.') … … 5698 5698 { 5699 5699 //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZipUtilOptionText", "option='".$p_option."'"); 5700 5700 5701 5701 $v_list = get_defined_constants(); 5702 5702 for (reset($v_list); $v_key = key($v_list); next($v_list)) { … … 5710 5710 } 5711 5711 } 5712 5712 5713 5713 $v_result = 'Unknown'; 5714 5714 trunk/wp-admin/includes/class-wp-filesystem-direct.php
r7129 r7130 88 88 if( !function_exists('posix_getpwuid') ) 89 89 return $owneruid; 90 $ownerarray=posix_getpwuid($owneruid); 90 $ownerarray=posix_getpwuid($owneruid); 91 91 return $ownerarray['name']; 92 92 } … … 122 122 $info = 'u'; 123 123 } 124 124 125 125 // Owner 126 126 $info .= (($perms & 0x0100) ? 'r' : '-'); … … 129 129 (($perms & 0x0800) ? 's' : 'x' ) : 130 130 (($perms & 0x0800) ? 'S' : '-')); 131 131 132 132 // Group 133 133 $info .= (($perms & 0x0020) ? 'r' : '-'); … … 136 136 (($perms & 0x0400) ? 's' : 'x' ) : 137 137 (($perms & 0x0400) ? 'S' : '-')); 138 138 139 139 // World 140 140 $info .= (($perms & 0x0004) ? 'r' : '-'); … … 169 169 if( !function_exists('posix_getgrgid') ) 170 170 return $gid; 171 $grouparray=posix_getgrgid($gid); 171 $grouparray=posix_getgrgid($gid); 172 172 return $grouparray['name']; 173 173 } 174 174 175 175 function copy($source,$destination,$overwrite=false){ 176 176 if( $overwrite && $this->exists($destination) ) … … 211 211 return $retval; 212 212 } 213 213 214 214 function exists($file){ 215 215 return @file_exists($file); … … 231 231 return @is_writable($file); 232 232 } 233 233 234 234 function atime($file){ 235 235 return @fileatime($file); … … 250 250 return @touch($file,$time,$atime); 251 251 } 252 252 253 253 function mkdir($path,$chmod=false,$chown=false,$chgrp=false){ 254
