Changeset 7130
- Timestamp:
- 03/02/2008 08:17:30 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 57 edited
Legend:
- Unmodified
- Added
- Removed
-
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 254 if( ! $chmod) 255 255 $chmod = $this->permission; 256 256 257 257 if( !@mkdir($path,$chmod) ) 258 258 return false; … … 276 276 return @rmdir($path); 277 277 } 278 278 279 279 function dirlist($path,$incdot=false,$recursive=false){ 280 280 if( $this->is_file($path) ){ … … 292 292 $struc = array(); 293 293 $struc['name'] = $entry; 294 294 295 295 if( '.' == $struc['name'][0] && !$incdot) 296 296 continue; 297 297 if( $limitFile && $struc['name'] != $limitFile) 298 298 continue; 299 299 300 300 $struc['perms'] = $this->gethchmod($path.'/'.$entry); 301 301 $struc['permsn'] = $this->getnumchmodfromh($struc['perms']); … … 310 310 if ('d' == $struc['type'] ){ 311 311 $struc['files'] = array(); 312 312 313 313 if( $incdot ){ 314 314 //We're including the doted starts -
trunk/wp-admin/includes/class-wp-filesystem-ftpext.php
r7126 r7130 5 5 var $errors = array(); 6 6 var $options = array(); 7 7 8 8 var $wp_base = ''; 9 9 var $permission = null; 10 10 11 11 var $filetypes = array( 12 12 'php'=>FTP_ASCII, … … 17 17 'htm'=>FTP_ASCII, 18 18 'xml'=>FTP_ASCII, 19 19 20 20 'jpg'=>FTP_BINARY, 21 21 'png'=>FTP_BINARY, … … 23 23 'bmp'=>FTP_BINARY 24 24 ); 25 25 26 26 function WP_Filesystem_FTPext($opt='') { 27 27 $this->errors = new WP_Error(); … … 54 54 55 55 if ( empty ($opt['password']) ) 56 $this->errors->add('empty_password', __('FTP password is required')); 56 $this->errors->add('empty_password', __('FTP password is required')); 57 57 else 58 58 $this->options['password'] = $opt['password']; 59 59 60 60 $this->options['ssl'] = ( !empty($opt['ssl']) ); 61 61 } … … 89 89 if( empty( $base ) ) $base = '/'; 90 90 if( '/' != substr($base, -1) ) $base .= '/'; 91 91 92 92 if($echo) echo sprintf(__('Changing to %s'), $base) .'<br>'; 93 93 if( false === ftp_chdir($this->link, $base) ) … … 220 220 $info = 'u'; 221 221 } 222 222 223 223 // Owner 224 224 $info .= (($perms & 0x0100) ? 'r' : '-'); … … 227 227 (($perms & 0x0800) ? 's' : 'x' ) : 228 228 (($perms & 0x0800) ? 'S' : '-')); 229 229 230 230 // Group 231 231 $info .= (($perms & 0x0020) ? 'r' : '-'); … … 234 234 (($perms & 0x0400) ? 's' : 'x' ) : 235 235 (($perms & 0x0400) ? 'S' : '-')); 236 236 237 237 // World 238 238 $info .= (($perms & 0x0004) ? 'r' : '-'); … … 339 339 if( ! $recursive ) 340 340 return ftp_rmdir($this->link, $file); 341 341 342 342 //TODO: Recursive Directory delete, Have to delete files from the folder first. 343 343 //$dir = $this->dirlist($path); 344 344 //foreach($dir as $file) 345 345 346 346 } 347 347 … … 440 440 $ret = array(); 441 441 foreach ( $dirlist as $struc ) { 442 442 443 443 if ( 'd' == $struc['type'] ) { 444 444 $struc['files'] = array(); -
trunk/wp-admin/includes/class-wp-filesystem-ftpsockets.php
r7126 r7130 5 5 var $errors; 6 6 var $options = array(); 7 7 8 8 var $wp_base = ''; 9 9 var $permission = null; 10 10 11 11 var $filetypes = array( 12 12 'php'=>FTP_ASCII, … … 17 17 'htm'=>FTP_ASCII, 18 18 'xml'=>FTP_ASCII, 19 19 20 20 'jpg'=>FTP_BINARY, 21 21 'png'=>FTP_BINARY, … … 23 23 'bmp'=>FTP_BINARY 24 24 ); 25 25 26 26 function WP_Filesystem_ftpsockets($opt='') { 27 27 $this->errors = new WP_Error(); … … 53 53 54 54 if ( empty ($opt['password']) ) 55 $this->errors->add('empty_password', __('FTP password is required')); 55 $this->errors->add('empty_password', __('FTP password is required')); 56 56 else 57 57 $this->options['password'] = $opt['password']; … … 91 91 if( empty( $base ) ) $base = '/'; 92 92 if( '/' != substr($base, -1) ) $base .= '/'; 93 93 94 94 if($echo) echo __('Changing to ') . $base .'<br>'; 95 95 if( false === $this->ftp->chdir($base) ) … … 158 158 } 159 159 $this->ftp->SetType($type); 160 160 161 161 $temp = tmpfile(); 162 162 fwrite($temp,$contents); … … 174 174 return false; 175 175 } 176 176 177 177 function chmod($file,$mode=false,$recursive=false){ 178 178 if( ! $mode ) … … 192 192 return true; 193 193 } 194 194 195 195 function chown($file,$owner,$recursive=false){ 196 196 return false; 197 197 } 198 198 199 199 function owner($file){ 200 200 $dir = $this->dirlist($file); 201 201 return $dir[$file]['owner']; 202 202 } 203 203 204 204 function getchmod($file){ 205 205 $dir = $this->dirlist($file); … … 235 235 $info = 'u'; 236 236 } 237 237 238 238 // Owner 239 239 $info .= (($perms & 0x0100) ? 'r' : '-'); … … 242 242 (($perms & 0x0800) ? 's' : 'x' ) : 243 243 (($perms & 0x0800) ? 'S' : '-')); 244 244 245 245 // Group 246 246 $info .= (($perms & 0x0020) ? 'r' : '-'); … … 249 249 (($perms & 0x0400) ? 's' : 'x' ) : 250 250 (($perms & 0x0400) ? 'S' : '-')); 251 251 252 252 // World 253 253 $info .= (($perms & 0x0004) ? 'r' : '-'); … … 386 386 $ret = array(); 387 387 foreach ( $list as $struc ) { 388 388 389 389 if ( 'd' == $struc['type'] ) { 390 390 $struc['files'] = array(); -
trunk/wp-admin/includes/comment.php
r6883 r7130 81 81 } 82 82 83 if ( is_admin() && ('edit-comments.php' == $pagenow || 'moderation.php' == $pagenow || 'edit.php' == $pagenow) ) { 83 if ( is_admin() && ('edit-comments.php' == $pagenow || 'moderation.php' == $pagenow || 'edit.php' == $pagenow) ) { 84 84 if ( get_option('show_avatars') ) 85 85 add_filter( 'comment_author', 'floated_admin_avatar' ); -
trunk/wp-admin/includes/dashboard.php
r7088 r7130 111 111 $arg, $arg, $arg... (further args passed to callbacks) 112 112 ); 113 113 114 114 // optional: if you want users to be able to edit the settings of your widget, you need to register a widget_control 115 115 wp_register_widget_control( $widget_id, $widget_control_title, $control_output_callback, … … 317 317 $date = ''; 318 318 $link = clean_url( strip_tags( $item['link'] ) ); 319 319 320 320 if ( isset( $item['author_uri'] ) ) 321 321 $site_link = clean_url( strip_tags( $item['author_uri'] ) ); 322 322 323 323 if ( !$publisher = wp_specialchars( strip_tags( isset($item['dc']['publisher']) ? $item['dc']['publisher'] : $item['author_name'] ) ) ) 324 324 $publisher = __( 'Somebody' ); … … 327 327 else 328 328 $publisher = "<strong>$publisher</strong>"; 329 329 330 330 if ( isset($item['description']) ) 331 331 $content = $item['description']; … … 344 344 else 345 345 $text = _c( '%1$s linked here saying, "%3$s"|feed_display' ); 346 346 347 347 if ( $show_date ) { 348 348 if ( $show_author || $show_summary ) … … 352 352 $date = gmdate( get_option( 'date_format' ), $date ); 353 353 } 354 354 355 355 echo "\t<li>" . sprintf( _c( "$text|feed_display" ), $publisher, $link, $content, $date ) . "</li>\n"; 356 356 } -
trunk/wp-admin/includes/file.php
r7126 r7130 208 208 $snoopy = new Snoopy(); 209 209 $snoopy->fetch($url); 210 210 211 211 fwrite($handle, $snoopy->results); 212 212 fclose($handle); … … 220 220 if ( ! $wp_filesystem || !is_object($wp_filesystem) ) 221 221 return new WP_Error('fs_unavailable', __('Could not access filesystem.')); 222 222 223 223 $fs =& $wp_filesystem; 224 224 -
trunk/wp-admin/includes/media.php
r7124 r7130 127 127 <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" /> 128 128 <title><?php bloginfo('name') ?> › <?php _e('Uploads'); ?> — WordPress</title> 129 <?php 129 <?php 130 130 wp_admin_css( 'css/global' ); 131 131 wp_admin_css(); … … 387 387 if ( !empty($_POST) ) { 388 388 $return = media_upload_form_handler(); 389 389 390 390 if ( is_string($return) ) 391 391 return $return; … … 400 400 if ( !empty($_POST) ) { 401 401 $return = media_upload_form_handler(); 402 402 403 403 if ( is_string($return) ) 404 404 return $return; -
trunk/wp-admin/includes/post.php
r7111 r7130 645 645 if ( !$current_user || !$current_user->ID ) 646 646 return false; 647 647 648 648 $now = time(); 649 649 -
trunk/wp-admin/includes/template.php
r7104 r7130 348 348 ?> 349 349 <tr id='page-<?php echo $id; ?>' class='<?php echo $class; ?>'> 350 351 350 351 352 352 <?php 353 353 … … 452 452 } 453 453 ?> 454 454 455 455 </tr> 456 456 … … 571 571 else 572 572 $approved = "comment_approved != 'spam'"; 573 573 574 574 if ( $s ) { 575 575 $s = $wpdb->escape($s); … … 616 616 $approve_url = clean_url( wp_nonce_url( "comment.php?action=approvecomment&p=$comment->comment_post_ID&c=$comment->comment_ID", "approve-comment_$comment->comment_ID" ) ); 617 617 $spam_url = clean_url( wp_nonce_url( "comment.php?action=deletecomment&dt=spam&p=$comment->comment_post_ID&c=$comment->comment_ID", "delete-comment_$comment->comment_ID" ) ); 618 618 619 619 ?> 620 620 <tr id="comment-<?php echo $comment->comment_ID; ?>" class='<?php echo $class; ?>'> -
trunk/wp-admin/includes/update.php
r7126 r7130 138 138 return new WP_Error('fs_unavailable', __('Could not access filesystem.')); 139 139 140 if ( $wp_filesystem->errors->get_error_code() ) 140 if ( $wp_filesystem->errors->get_error_code() ) 141 141 return new WP_Error('fs_error', __('Filesystem error'), $wp_filesystem->errors); 142 142 … … 173 173 // Once installed, delete the package 174 174 unlink($file); 175 175 176 176 // Remove the existing plugin. 177 177 apply_filters('update_feedback', __("Removing the old version of the plugin")); -
trunk/wp-admin/includes/user.php
r6887 r7130 328 328 $search_sql .= ')'; 329 329 } 330 330 331 331 $this->query_from_where = "FROM $wpdb->users"; 332 332 if ( $this->role ) -
trunk/wp-admin/js/common.js
r7050 r7130 1 1 addLoadEvent( function() { 2 2 // pulse 3 jQuery('.fade').animate( { backgroundColor: '#ffffe0' }, 300).animate( { backgroundColor: '#fffbcc' }, 300).animate( { backgroundColor: '#ffffe0' }, 300).animate( { backgroundColor: '#fffbcc' }, 300); 3 jQuery('.fade').animate( { backgroundColor: '#ffffe0' }, 300).animate( { backgroundColor: '#fffbcc' }, 300).animate( { backgroundColor: '#ffffe0' }, 300).animate( { backgroundColor: '#fffbcc' }, 300); 4 4 5 5 // Reveal -
trunk/wp-admin/js/editor.js
r7114 r7130 6 6 } else { 7 7 var H; 8 if ( H = tinymce.util.Cookie.getHash("TinyMCE_content_size") ) 8 if ( H = tinymce.util.Cookie.getHash("TinyMCE_content_size") ) 9 9 document.getElementById('content').style.height = H.ch - 30 + 'px'; 10 10 } … … 12 12 13 13 switchEditors = { 14 14 15 15 saveCallback : function(el, content, body) { 16 16 17 17 document.getElementById(el).style.color = '#fff'; 18 if ( tinyMCE.activeEditor.isHidden() ) 18 if ( tinyMCE.activeEditor.isHidden() ) 19 19 content = document.getElementById(el).value; 20 20 else … … 45 45 content = content.replace(new RegExp('\\s*</('+blocklist+')>\\s*', 'mg'), '</$1>\n'); 46 46 content = content.replace(new RegExp('<li>', 'g'), '\t<li>'); 47 47 48 48 if ( content.indexOf('<object') != -1 ) { 49 49 content = content.replace(new RegExp('\\s*<param([^>]*)>\\s*', 'g'), "<param$1>"); // no pee inside object/embed 50 50 content = content.replace(new RegExp('\\s*</embed>\\s*', 'g'), '</embed>'); 51 51 } 52 52 53 53 // Unmark special paragraph closing tags 54 54 content = content.replace(new RegExp('</p#>', 'g'), '</p>\n'); … … 72 72 if ( ! ed || ed.isHidden() ) { 73 73 ta.style.color = '#fff'; 74 74 75 75 this.edToggle(P, H); 76 76 edCloseAllTags(); // :-( … … 84 84 if ( ed ) ed.show(); 85 85 else tinyMCE.execCommand("mceAddControl", false, id); 86 86 87 87 this.wpSetDefaultEditor( 'tinymce' ); 88 88 } else { … … 94 94 ta.value = this.pre_wpautop(ta.value); 95 95 qt.style.display = 'block'; 96 96 97 97 if ( tinymce.isIE6 ) { 98 98 ta.style.width = '98%'; … … 103 103 ec.style.padding = '6px'; 104 104 } 105 105 106 106 ta.style.color = ''; 107 107 … … 133 133 wpautop : function(pee) { 134 134 var blocklist = 'table|thead|tfoot|caption|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|form|blockquote|address|math|p|h[1-6]'; 135 135 136 136 pee = pee + "\n\n"; 137 137 pee = pee.replace(new RegExp('<br />\\s*<br />', 'gi'), "\n\n"); 138 pee = pee.replace(new RegExp('(<(?:'+blocklist+')[^>]*>)', 'gi'), "\n$1"); 138 pee = pee.replace(new RegExp('(<(?:'+blocklist+')[^>]*>)', 'gi'), "\n$1"); 139 139 pee = pee.replace(new RegExp('(</(?:'+blocklist+')>)', 'gi'), "$1\n\n"); 140 140 pee = pee.replace(new RegExp("\\r\\n|\\r", 'g'), "\n"); … … 147 147 pee = pee.replace(new RegExp('</blockquote></p>', 'gi'), '</p></blockquote>'); 148 148 pee = pee.replace(new RegExp('<p>\\s*(</?(?:'+blocklist+')[^>]*>)', 'gi'), "$1"); 149 pee = pee.replace(new RegExp('(</?(?:'+blocklist+')[^>]*>)\\s*</p>', 'gi'), "$1"); 149 pee = pee.replace(new RegExp('(</?(?:'+blocklist+')[^>]*>)\\s*</p>', 'gi'), "$1"); 150 150 pee = pee.replace(new RegExp('\\s*\\n', 'gi'), "<br />\n"); 151 151 pee = pee.replace(new RegExp('(</?(?:'+blocklist+')[^>]*>)\\s*<br />', 'gi'), "$1"); -
trunk/wp-admin/js/forms.js
r6570 r7130 14 14 for (i = 0, n = form.elements.length; i < n; i++) { 15 15 if (form.elements[i].type == "checkbox") { 16 if (form.elements[i].checked == true) 17 num++; 16 if (form.elements[i].checked == true) 17 num++; 18 18 } 19 19 } … … 23 23 function checkAllUsers(role) { 24 24 var checkboxs = document.getElementsByTagName('input'); 25 for(var i = 0, inp; inp = checkboxs[i]; i++) 26 if(inp.type.toLowerCase() == 'checkbox' && inp.className == role) 25 for(var i = 0, inp; inp = checkboxs[i]; i++) 26 if(inp.type.toLowerCase() == 'checkbox' && inp.className == role) 27 27 if(inp.checked == false) 28 28 inp.checked = true; -
trunk/wp-admin/js/media-upload.js
r6579 r7130 10 10 } else 11 11 win.edInsertContent(win.edCanvas, h); 12 } 12 } -
trunk/wp-admin/js/password-strength-meter.js
r6422 r7130 13 13 function passwordStrength(password,username) 14 14 { 15 score = 0 16 15 score = 0 16 17 17 //password < 4 18 18 if (password.length < 4 ) { return shortPass } 19 19 20 20 //password == username 21 21 if (password.toLowerCase()==username.toLowerCase()) return badPass 22 22 23 23 //password length 24 24 score += password.length * 4 … … 29 29 30 30 //password has 3 numbers 31 if (password.match(/(.*[0-9].*[0-9].*[0-9])/)) score += 5 32 31 if (password.match(/(.*[0-9].*[0-9].*[0-9])/)) score += 5 32 33 33 //password has 2 sybols 34 if (password.match(/(.*[!,@,#,$,%,^,&,*,?,_,~].*[!,@,#,$,%,^,&,*,?,_,~])/)) score += 5 35 34 if (password.match(/(.*[!,@,#,$,%,^,&,*,?,_,~].*[!,@,#,$,%,^,&,*,?,_,~])/)) score += 5 35 36 36 //password has Upper and Lower chars 37 if (password.match(/([a-z].*[A-Z])|([A-Z].*[a-z])/)) score += 10 38 37 if (password.match(/([a-z].*[A-Z])|([A-Z].*[a-z])/)) score += 10 38 39 39 //password has number and chars 40 if (password.match(/([a-zA-Z])/) && password.match(/([0-9])/)) score += 15 40 if (password.match(/([a-zA-Z])/) && password.match(/([0-9])/)) score += 15 41 41 // 42 42 //password has number and symbol 43 if (password.match(/([!,@,#,$,%,^,&,*,?,_,~])/) && password.match(/([0-9])/)) score += 15 44 43 if (password.match(/([!,@,#,$,%,^,&,*,?,_,~])/) && password.match(/([0-9])/)) score += 15 44 45 45 //password has char and symbol 46 if (password.match(/([!,@,#,$,%,^,&,*,?,_,~])/) && password.match(/([a-zA-Z])/)) score += 15 47 46 if (password.match(/([!,@,#,$,%,^,&,*,?,_,~])/) && password.match(/([a-zA-Z])/)) score += 15 47 48 48 //password is just a nubers or chars 49 if (password.match(/^\w+$/) || password.match(/^\d+$/) ) score -= 10 50 49 if (password.match(/^\w+$/) || password.match(/^\d+$/) ) score -= 10 50 51 51 //verifing 0 < score < 100 52 if ( score < 0 ) score = 0 53 if ( score > 100 ) score = 100 54 55 if (score < 34 ) return badPass 52 if ( score < 0 ) score = 0 53 if ( score > 100 ) score = 100 54 55 if (score < 34 ) return badPass 56 56 if (score < 68 ) return goodPass 57 57 return strongPass … … 94 94 function passwordStrength(password,username) 95 95 { 96 score = 0 97 96 score = 0 97 98 98 //password < 4 99 99 if (password.length < 4 ) { return shortPass } 100 100 101 101 //password == username 102 102 if (password.toLowerCase()==username.toLowerCase()) return badPass 103 103 104 104 //password length 105 105 score += password.length * 4 … … 110 110 111 111 //password has 3 numbers 112 if (password.match(/(.*[0-9].*[0-9].*[0-9])/)) score += 5 113 112 if (password.match(/(.*[0-9].*[0-9].*[0-9])/)) score += 5 113 114 114 //password has 2 sybols 115 if (password.match(/(.*[!,@,#,$,%,^,&,*,?,_,~].*[!,@,#,$,%,^,&,*,?,_,~])/)) score += 5 116 115 if (password.match(/(.*[!,@,#,$,%,^,&,*,?,_,~].*[!,@,#,$,%,^,&,*,?,_,~])/)) score += 5 116 117 117 //password has Upper and Lower chars 118 if (password.match(/([a-z].*[A-Z])|([A-Z].*[a-z])/)) score += 10 119 118 if (password.match(/([a-z].*[A-Z])|([A-Z].*[a-z])/)) score += 10 119 120 120 //password has number and chars 121 if (password.match(/([a-zA-Z])/) && password.match(/([0-9])/)) score += 15 121 if (password.match(/([a-zA-Z])/) && password.match(/([0-9])/)) score += 15 122 122 // 123 123 //password has number and symbol 124 if (password.match(/([!,@,#,$,%,^,&,*,?,_,~])/) && password.match(/([0-9])/)) score += 15 125 124 if (password.match(/([!,@,#,$,%,^,&,*,?,_,~])/) && password.match(/([0-9])/)) score += 15 125 126 126 //password has char and symbol 127 if (password.match(/([!,@,#,$,%,^,&,*,?,_,~])/) && password.match(/([a-zA-Z])/)) score += 15 128 127 if (password.match(/([!,@,#,$,%,^,&,*,?,_,~])/) && password.match(/([a-zA-Z])/)) score += 15 128 129 129 //password is just a nubers or chars 130 if (password.match(/^\w+$/) || password.match(/^\d+$/) ) score -= 10 131 130 if (password.match(/^\w+$/) || password.match(/^\d+$/) ) score -= 10 131 132 132 //verifing 0 < score < 100 133 if ( score < 0 ) score = 0 134 if ( score > 100 ) score = 100 135 136 if (score < 34 ) return badPass 133 if ( score < 0 ) score = 0 134 if ( score > 100 ) score = 100 135 136 if (score < 34 ) return badPass 137 137 if (score < 68 ) return goodPass 138 138 return strongPass -
trunk/wp-admin/js/post.js
r6975 r7130 24 24 jQuery.each( current_tags, function( key, val ) { 25 25 val = val.replace( /^\s+/, '' ).replace( /\s+$/, '' ); // trim 26 if ( !val.match(/^\s+$/) && '' != val ) { 26 if ( !val.match(/^\s+$/) && '' != val ) { 27 27 txt = '<span><a id="tag-check-' + key + '" class="ntdelbutton">X</a> ' + val + '</span> '; 28 28 jQuery( '#tagchecklist' ).append( txt ); … … 64 64 // If no tags on the page, skip the tag and category stuff. 65 65 if ( !jQuery('#tags-input').size() ) { 66 return; 66 return; 67 67 } 68 68 69 69 // Editable slugs 70 70 make_slugedit_clickable(); 71 71 72 72 // hide advanced slug field 73 73 jQuery('#slugdiv').hide(); -
trunk/wp-admin/js/slug.js
r6954 r7130 2 2 var i, c = 0; 3 3 var e = jQuery('#editable-post-name'); 4 var revert_e = e.html(); 4 var revert_e = e.html(); 5 5 var real_slug = jQuery('#post_name'); 6 6 var revert_slug = real_slug.html(); … … 19 19 jQuery('#edit-slug-box').html(data); 20 20 b.html(revert_b); 21 real_slug.attr('value', new_slug); 21 real_slug.attr('value', new_slug); 22 22 make_slugedit_clickable(); 23 23 }); -
trunk/wp-admin/js/upload.js
r6386 r7130 6 6 postID: 0, 7 7 8 // cookie create and read functions adapted from http://www.quirksmode.org/js/cookies.html 8 // cookie create and read functions adapted from http://www.quirksmode.org/js/cookies.html 9 9 createCookie: function(name,value,days) { 10 10 if (days) { … … 29 29 30 30 assignCookieOnChange: function() { 31 jQuery(this).bind("change", function(){ 32 theFileList.createCookie(jQuery(this).attr('name'),jQuery(this).attr('id'),365); 31 jQuery(this).bind("change", function(){ 32 theFileList.createCookie(jQuery(this).attr('name'),jQuery(this).attr('id'),365); 33 33 }); 34 34 }, … … 324 324 }; 325 325 326 for ( var property in uploadL10n ) 326 for ( var property in uploadL10n ) 327 327 theFileList[property] = uploadL10n[property]; 328 328 theFileList.initializeVars(); -
trunk/wp-admin/js/widgets.js
r7086 r7130 88 88 if ( !context ) 89 89 context = document; 90 90 91 91 $('a.widget-control-edit', context).click( editClick ); 92 92 -
trunk/wp-admin/link-manager.php
r7104 r7130 22 22 } elseif ( !empty($_GET['_wp_http_referer']) ) { 23 23 wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']))); 24 exit; 24 exit; 25 25 } 26 26 … … 171 171 switch($column_name) { 172 172 case 'name': 173 173 174 174 echo "<td><strong><a class='row-title' href='link.php?link_id=$link->link_id&action=edit' class='edit'>$link->link_name</a></strong><br />"; 175 175 echo $link->link_description . "</td>"; -
trunk/wp-admin/options-general.php
r7108 r7130 58 58 <td> 59 59 <select name="gmt_offset"> 60 <?php 60 <?php 61 61 $current_offset = get_option('gmt_offset'); 62 62 $offset_range = array (-12, -11.5, -11, -10.5, -10, -9.5, -9, -8.5, -8, -7.5, -7, -6.5, -6, -5.5, -5, -4.5, -4, -3.5, -3, -2.5, -2, -1.5, -1, -0.5, -
trunk/wp-admin/sidebar.php
r6782 r7130 14 14 <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=UTF-8" /> 15 15 <title>WordPress › Posted</title> 16 <?php 16 <?php 17 17 wp_admin_css( 'css/global' ); 18 18 wp_admin_css(); … … 32 32 <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('blog_charset'); ?>" /> 33 33 <title>WordPress › Sidebar</title> 34 <?php 34 <?php 35 35 wp_admin_css( 'css/global' ); 36 36 wp_admin_css(); -
trunk/wp-admin/theme-editor.php
r6960 r7130 84 84 <?php if (isset($_GET['a'])) : ?> 85 85 <div id="message" class="updated fade"><p><?php _e('File edited successfully.') ?></p></div> 86 <?php endif; 86 <?php endif; 87 87 88 88 $description = get_file_description($file); … … 135 135 <h4 style="margin-bottom: 0px;"><?php _e('Styles'); ?></h4> 136 136 <ul> 137 <?php foreach($themes[$theme]['Stylesheet Files'] as $style_file) : 137 <?php foreach($themes[$theme]['Stylesheet Files'] as $style_file) : 138 138 $description = get_file_description($style_file); 139 139 $style_show = basename($style_file); … … 156 156 <input type="hidden" name="theme" value="<?php echo $theme ?>" /> 157 157 </div> 158 158 159 159 <div> 160 160 <?php if ( is_writeable($real_file) ) : ?> -
trunk/wp-admin/update.php
r7127 r7130 111 111 do_plugin_upgrade($plugin); 112 112 include('admin-footer.php'); 113 } 113 } 114 114 115 115 } -
trunk/wp-admin/upload.php
r7062 r7130 2 2 require_once('admin.php'); 3 3 4 if (!current_user_can('upload_files')) 5 wp_die(__('You do not have permission to upload files.')); 4 if (!current_user_can('upload_files')) 5 wp_die(__('You do not have permission to upload files.')); 6 6 7 7 // Handle bulk deletes … … 27 27 } elseif ( !empty($_GET['_wp_http_referer']) ) { 28 28 wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']))); 29 exit; 29 exit; 30 30 } 31 31 … … 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/users.php
r7123 r7130 185 185 if ( !empty($_GET['_wp_http_referer']) ) { 186 186 wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']))); 187 exit; 187 exit; 188 188 } 189 189 -
trunk/wp-admin/wp-admin.css
r7119 r7130 171 171 font-size: 13px; 172 172 -moz-border-radius: 3px; 173 -khtml-border-radius: 3px; 173 -khtml-border-radius: 3px; 174 174 -webkit-border-radius: 3px; 175 175 border-radius: 3px; … … 235 235 236 236 .error { 237 background: #f00; 238 border: 1px solid #800; 237 background: #f00; 238 border: 1px solid #800; 239 239 color: #fff; 240 240 } … … 369 369 padding: 0 0 .2em 1px; 370 370 } 371 371 372 372 #searchform #s { 373 373 padding: 4px 3px; … … 570 570 color: #555; 571 571 text-align: center; 572 } 572 } 573 573 574 574 #update-nag a, .plugin-update a { … … 579 579 } 580 580 581 #pass-strength-result { 581 #pass-strength-result { 582 582 padding: 3px 5px 3px 5px; 583 583 margin-top: 3px; 584 text-align: center; 584 text-align: center; 585 585 background-color: #e3e3e3; 586 586 border: 1px solid #000000; 587 587 } 588 588 589 #pass-strength-result.short { 589 #pass-strength-result.short { 590 590 background-color: #e3e3e3; 591 border: 1px solid #000000; 592 } 593 594 #pass-strength-result.bad { 591 border: 1px solid #000000; 592 } 593 594 #pass-strength-result.bad { 595 595 background-color: #ffeff7; 596 border: 1px solid #cc6699; 597 } 598 599 #pass-strength-result.good { 596 border: 1px solid #cc6699; 597 } 598 599 #pass-strength-result.good { 600 600 background-color: #effff4; 601 border: 1px solid #66cc87; 602 } 603 604 #pass-strength-result.strong { 601 border: 1px solid #66cc87; 602 } 603 604 #pass-strength-result.strong { 605 605 background-color: #59ef86; 606 606 border: 1px solid #319f52; … … 695 695 -webkit-border-top-left-radius: 3px; 696 696 border-top-left-radius: 3px; 697 -moz-border-radius-topright: 3px; 697 -moz-border-radius-topright: 3px; 698 698 -khtml-border-top-right-radius: 3px; 699 699 -webkit-border-top-right-radius: 3px; … … 892 892 height:100%; 893 893 } 894 #wpwrap { 895 position: relative; 894 #wpwrap { 895 position: relative; 896 896 min-height: 100%; 897 897 } … … 906 906 background: #464646 url('images/logo-ghost.png') no-repeat 20px 10px; 907 907 color: #999; 908 position: relative; 909 margin-top: -75px; 908 position: relative; 909 margin-top: -75px; 910 910 } 911 911 … … 1065 1065 font-size: 1.7em; 1066 1066 padding: 4px 3px; 1067 width: 98%; 1067 width: 98%; 1068 1068 } 1069 1069 -
trunk/wp-content/themes/default/style.css
r6530 r7130 1 /* 1 /* 2 2 Theme Name: WordPress Default 3 3 Theme URI: http://wordpress.org/ … … 40 40 } 41 41 42 #headerimg { 43 margin: 7px 9px 0; 44 height: 192px; 45 width: 740px; 46 } 42 #headerimg { 43 margin: 7px 9px 0; 44 height: 192px; 45 width: 740px; 46 } 47 47 48 48 #content { … … 73 73 74 74 #footer { 75 background: #eee url('images/kubrickfooter.jpg') no-repeat top; 75 background: #eee url('images/kubrickfooter.jpg') no-repeat top; 76 76 border: none; 77 77 } … … 212 212 body { 213 213 margin: 0 0 20px 0; 214 padding: 0; 214 padding: 0; 215 215 } 216 216 … … 225 225 #header { 226 226 background-color: #73a0c5; 227 margin: 0 0 0 1px; 228 padding: 0; 229 height: 200px; 227 margin: 0 0 0 1px; 228 padding: 0; 229 height: 200px; 230 230 width: 758px; 231 231 } … … 387 387 padding-left: 10px; 388 388 text-indent: -10px; 389 } 389 } 390 390 391 391 html>body .entry li { … … 451 451 #searchform { 452 452 margin: 10px auto; 453 padding: 5px 3px; 453 padding: 5px 3px; 454 454 text-align: center; 455 455 } -
trunk/wp-includes/category-template.php
r7064 r7130 168 168 } 169 169 170 /* 170 /* 171 171 * in_category() - Checks whether the current post is within a particular category 172 * 172 * 173 173 * This function checks to see if the post is within the supplied category. The categoy 174 174 * can be specified by number or name and will be checked as a name first to allow for categories with numeric names. 175 175 * Note: Prior to v2.5 of WordPress category names where not supported. 176 * 177 * @since 1.2.0 178 * 179 * @param int|string $category 176 * 177 * @since 1.2.0 178 * 179 * @param int|string $category 180 180 * @return bool true if the post is in the supplied category 181 */ 181 */ 182 182 function in_category( $category ) { // Check if the current post is in the given category 183 183 global $post; … … 186 186 if (0 != $cat_ID) 187 187 $category = $cat_ID; 188 188 189 189 $categories = get_object_term_cache($post->ID, 'category'); 190 190 if ( false === $categories ) -
trunk/wp-includes/classes.php
r7109 r7130 417 417 $output = call_user_func_array(array(&$this, 'start_el'), $cb_args); 418 418 419 if ( $max_depth == 0 || 419 if ( $max_depth == 0 || 420 420 ($max_depth != 0 && $max_depth > $depth+1 )) { //whether to descend 421 421 422 422 for ( $i = 0; $i < sizeof( $children_elements ); $i++ ) { 423 423 424 424 $child = $children_elements[$i]; 425 425 if ( $child->$parent_field == $element->$id_field ) { 426 426 427 427 if ( !isset($newlevel) ) { 428 $newlevel = true; 428 $newlevel = true; 429 429 //start the child delimiter 430 430 $cb_args = array_merge( array($output, $depth), $args); 431 431 $output = call_user_func_array(array(&$this, 'start_lvl'), $cb_args); 432 432 } 433 433 434 434 array_splice( $children_elements, $i, 1 ); 435 435 $output = $this->display_element( $child, $children_elements, $max_depth, $depth + 1, $args, $output ); … … 438 438 } 439 439 } 440 440 441 441 if ( isset($newlevel) && $newlevel ){ 442 442 //end the child delimiter … … 444 444 $output = call_user_func_array(array(&$this, 'end_lvl'), $cb_args); 445 445 } 446 446 447 447 //end this element 448 448 $cb_args = array_merge( array($output, $element, $depth), $args); -
trunk/wp-includes/deprecated.php
r6812 r7130 1277 1277 /** 1278 1278 * gzip_compression() - Unused function 1279 * 1279 * 1280 1280 * @deprecated 2.5 1281 1281 */ -
trunk/wp-includes/functions.php
r7114 r7130 6 6 if ( empty( $m ) ) 7 7 return false; 8 8 9 9 if( 'G' == $dateformatstring ) { 10 10 return gmmktime( … … 13 13 ); 14 14 } 15 15 16 16 $i = mktime( 17 17 (int) substr( $m, 11, 2 ), (int) substr( $m, 14, 2 ), (int) substr( $m, 17, 2 ), … … 907 907 } 908 908 909 do_action( $hook, $wp_query->is_comment_feed ); 909 do_action( $hook, $wp_query->is_comment_feed ); 910 910 } 911 911 … … 1044 1044 if ( strlen($path) == 0 || $path{0} == '.' ) 1045 1045 return false; 1046 1046 1047 1047 // windows allows absolute paths like this 1048 1048 if ( preg_match('#^[a-zA-Z]:\\\\#', $path) ) … … 1057 1057 if ( path_is_absolute($path) ) 1058 1058 return $path; 1059 1059 1060 1060 return rtrim($base, '/') . '/' . ltrim($path, '/'); 1061 1061 } … … 1065 1065 $siteurl = get_option( 'siteurl' ); 1066 1066 $upload_path = $dir = get_option( 'upload_path' ); 1067 1067 1068 1068 // $dir is absolute, $path is (maybe) relative to ABSPATH 1069 1069 $dir = path_join( ABSPATH, $upload_path ); … … 1090 1090 $subdir = "/$y/$m"; 1091 1091 } 1092 1092 1093 1093 $dir .= $subdir; 1094 1094 $url .= $subdir; … … 1185 1185 'text' => array('txt'), 1186 1186 'archive' => array('tar','bz2','gz','cab','dmg','rar','sea','sit','sqx','zip'), 1187 'code' => array('css','html','php','js'), 1187 'code' => array('css','html','php','js'), 1188 1188 )); 1189 1189 foreach ( $ext2type as $type => $exts ) -
trunk/wp-includes/general-template.php
r7032 r7130 938 938 <a id="edButtonPreview" onclick="switchEditors.go('<?php echo $id; ?>');"><?php _e('Visual'); ?></a> 939 939 <?php } 940 } 941 940 } 941 942 942 if ( $media_buttons ) { ?> 943 943 <div id="media-buttons"> -
trunk/wp-includes/js/autosave.js
r7103 r7130 133 133 /* Gotta do this up here so we can check the length when tinyMCE is in use */ 134 134 if ( rich ) { tinyMCE.triggerSave(); } 135 135 136 136 post_data["content"] = jQuery("#content").val(); 137 137 if ( jQuery('#post_name').val() ) -
trunk/wp-includes/js/quicktags.js
r5167 r7130 26 26 27 27 var now = new Date(); 28 var datetime = now.getUTCFullYear() + '-' + 28 var datetime = now.getUTCFullYear() + '-' + 29 29 zeroise(now.getUTCMonth() + 1, 2) + '-' + 30 zeroise(now.getUTCDate(), 2) + 'T' + 31 zeroise(now.getUTCHours(), 2) + ':' + 32 zeroise(now.getUTCMinutes(), 2) + ':' + 30 zeroise(now.getUTCDate(), 2) + 'T' + 31 zeroise(now.getUTCHours(), 2) + ':' + 32 zeroise(now.getUTCMinutes(), 2) + ':' + 33 33 zeroise(now.getUTCSeconds() ,2) + 34 34 '+00:00'; 35 35 36 edButtons[edButtons.length] = 36 edButtons[edButtons.length] = 37 37 new edButton('ed_strong' 38 38 ,'b' … … 42 42 ); 43 43 44 edButtons[edButtons.length] = 44 edButtons[edButtons.length] = 45 45 new edButton('ed_em' 46 46 ,'i' … … 50 50 ); 51 51 52 edButtons[edButtons.length] = 52 edButtons[edButtons.length] = 53 53 new edButton('ed_link' 54 54 ,'link' … … 58 58 ); // special case 59 59 60 edButtons[edButtons.length] = 60 edButtons[edButtons.length] = 61 61 new edButton('ed_block' 62 62 ,'b-quote' … … 67 67 68 68 69 edButtons[edButtons.length] = 69 edButtons[edButtons.length] = 70 70 new edButton('ed_del' 71 71 ,'del' … … 75 75 ); 76 76 77 edButtons[edButtons.length] = 77 edButtons[edButtons.length] = 78 78 new edButton('ed_ins' 79 79 ,'ins' … … 83 83 ); 84 84 85 edButtons[edButtons.length] = 85 edButtons[edButtons.length] = 86 86 new edButton('ed_img' 87 87 ,'img' … … 92 92 ); // special case 93 93 94 edButtons[edButtons.length] = 94 edButtons[edButtons.length] = 95 95 new edButton('ed_ul' 96 96 ,'ul' … … 100 100 ); 101 101 102 edButtons[edButtons.length] = 102 edButtons[edButtons.length] = 103 103 new edButton('ed_ol' 104 104 ,'ol' … … 108 108 ); 109 109 110 edButtons[edButtons.length] = 110 edButtons[edButtons.length] = 111 111 new edButton('ed_li' 112 112 ,'li' … … 116 116 ); 117 117 118 edButtons[edButtons.length] = 118 edButtons[edButtons.length] = 119 119 new edButton('ed_code' 120 120 ,'code' … … 124 124 ); 125 125 126 edButtons[edButtons.length] = 126 edButtons[edButtons.length] = 127 127 new edButton('ed_more' 128 128 ,'more' … … 133 133 ); 134 134 /* 135 edButtons[edButtons.length] = 135 edButtons[edButtons.length] = 136 136 new edButton('ed_next' 137 137 ,'page' … … 221 221 newWin = ' target="_blank"'; 222 222 } 223 var tempStr = '<a href="' + edLinks[i].URL + '"' + newWin + '>' 223 var tempStr = '<a href="' + edLinks[i].URL + '"' + newWin + '>' 224 224 + edLinks[i].display 225 225 + '</a>'; … … 299 299 myField.value = myField.value.substring(0, startPos) 300 300 + edButtons[i].tagStart 301 + myField.value.substring(startPos, endPos) 301 + myField.value.substring(startPos, endPos) 302 302 + edButtons[i].tagEnd 303 303 + myField.value.substring(endPos, myField.value.length); … … 306 306 else { 307 307 if (!edCheckOpenTags(i) || edButtons[i].tagEnd == '') { 308 myField.value = myField.value.substring(0, startPos) 308 myField.value = myField.value.substring(0, startPos) 309 309 + edButtons[i].tagStart 310 310 + myField.value.substring(endPos, myField.value.length); … … 313 313 } 314 314 else { 315 myField.value = myField.value.substring(0, startPos) 315 myField.value = myField.value.substring(0, startPos) 316 316 + edButtons[i].tagEnd 317 317 + myField.value.substring(endPos, myField.value.length); … … 351 351 var endPos = myField.selectionEnd; 352 352 myField.value = myField.value.substring(0, startPos) 353 + myValue 353 + myValue 354 354 + myField.value.substring(endPos, myField.value.length); 355 355 myField.focus(); … … 381 381 var myValue = prompt(quicktagsL10n.enterImageURL, 'http://'); 382 382 if (myValue) { 383 myValue = '<img src="' 384 + myValue 385 + '" alt="' + prompt(quicktagsL10n.enterImageDescription, '') 383 myValue = '<img src="' 384 + myValue 385 + '" alt="' + prompt(quicktagsL10n.enterImageDescription, '') 386 386 + '" />'; 387 387 edInsertContent(myField, myValue); -
trunk/wp-includes/js/wp-lists.js
r7103 r7130 59 59 if ( cls[3] ) { s.addColor = '#' + cls[3]; } 60 60 else { s.addColor = s.addColor || '#FFFF33'; } 61 61 62 62 if ( !s ) { return false; } 63 63 -
trunk/wp-includes/media.php
r7043 r7130 5 5 // scale down the default size of an image so it's a better fit for the editor and theme 6 6 function image_constrain_size_for_editor($width, $height, $size = 'medium') { 7 7 8 8 if ( $size == 'thumb' ) { 9 9 $max_width = intval(get_option('thumbnail_size_w')); … … 34 34 35 35 list( $max_width, $max_height ) = apply_filters( 'editor_max_image_size', array( $max_width, $max_height ), $size ); 36 36 37 37 return wp_constrain_dimensions( $width, $height, $max_width, $max_height ); 38 38 } … … 52 52 // returns an array($url, $width, $height) 53 53 function image_downsize($id, $size = 'medium') { 54 54 55 55 $img_url = wp_get_attachment_url($id); 56 56 $meta = wp_get_attachment_metadata($id); 57 57 $width = $height = 0; 58 58 59 59 // plugins can use this to provide resize services 60 60 if ( $out = apply_filters('image_downsize', false, $id, $size) ) 61 61 return $out; 62 62 63 63 if ( $size == 'thumb' ) { 64 64 // thumbnail: use the thumb as the displayed image, and constrain based on its dimensions … … 75 75 list( $width, $height ) = image_constrain_size_for_editor( $meta['width'], $meta['height'], $size ); 76 76 } 77 77 78 78 return array( $img_url, $width, $height ); 79 79 80 80 } 81 81 … … 98 98 if ( !$max_width and !$max_height ) 99 99 return array( $current_width, $current_height ); 100 100 101 101 $width_ratio = $height_ratio = 1.0; 102 102 103 103 if ( $max_width > 0 && $current_width > $max_width ) 104 104 $width_ratio = $max_width / $current_width; 105 105 106 106 if ( $max_height > 0 && $current_height > $max_height ) 107 107 $height_ratio = $max_height / $current_height; 108 108 109 109 // the smaller ratio is the one we need to fit it to the constraining box 110 110 $ratio = min( $width_ratio, $height_ratio ); 111 111 112 112 return array( intval($current_width * $ratio), intval($current_height * $ratio) ); 113 113 } … … 116 116 // if $crop is true, the largest matching central portion of the image will be cropped out and resized to the required size 117 117 function image_resize_dimensions($orig_w, $orig_h, $dest_w, $dest_h, $crop=false) { 118 118 119 119 if ($orig_w <= 0 || $orig_h <= 0) 120 120 return false; … … 122 122 if ($dest_w <= 0 && $dest_h <= 0) 123 123 return false; 124 124 125 125 if ( $crop ) { 126 126 // crop the largest possible portion of the original image that we can size to $dest_w x $dest_h … … 136 136 137 137 $size_ratio = max($new_w / $orig_w, $new_h / $orig_h); 138 138 139 139 $crop_w = ceil($new_w / $size_ratio); 140 140 $crop_h = ceil($new_h / $size_ratio); … … 147 147 $crop_w = $orig_w; 148 148 $crop_h = $orig_h; 149 149 150 150 $s_x = 0; 151 151 $s_y = 0; 152 152 153 153 list( $new_w, $new_h ) = wp_constrain_dimensions( $orig_w, $orig_h, $dest_w, $dest_h ); 154 154 } 155 155 156 156 // if the resulting image would be the same size or larger we don't want to resize it 157 157 if ($new_w >= $orig_w && $new_h >= $orig_h) … … 176 176 return $dims; 177 177 list($dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h) = $dims; 178 178 179 179 $newimage = imagecreatetruecolor( $dst_w, $dst_h); 180 180 -
trunk/wp-includes/pluggable.php
r7096 r7130 651 651 $nonce = $_REQUEST['_ajax_nonce'] ? $_REQUEST['_ajax_nonce'] : $_REQUEST['_wpnonce']; 652 652 653 if ( !wp_verify_nonce( $nonce, $action ) ) 653 if ( !wp_verify_nonce( $nonce, $action ) ) 654 654 die('-1'); 655 655 … … 857 857 $comments_waiting = $wpdb->get_var("SELECT count(comment_ID) FROM $wpdb->comments WHERE comment_approved = '0'"); 858 858 859 switch ($comment->comment_type) 859 switch ($comment->comment_type) 860 860 { 861 861 case 'trackback': … … 883 883 break; 884 884 } 885 885 886 886 $notify_message .= sprintf( __('Approve it: %s'), get_option('siteurl')."/wp-admin/comment.php?action=mac&c=$comment_id" ) . "\r\n"; 887 887 $notify_message .= sprintf( __('Delete it: %s'), get_option('siteurl')."/wp-admin/comment.php?action=cdc&c=$comment_id" ) . "\r\n"; 888 888 $notify_message .= sprintf( __('Spam it: %s'), get_option('siteurl')."/wp-admin/comment.php?action=cdc&dt=spam&c=$comment_id" ) . "\r\n"; 889 889 890 890 $strCommentsPending = sprintf( __ngettext('%s comment', '%s comments', $comments_waiting), $comments_waiting ); 891 891 $notify_message .= sprintf( __('Currently %s are waiting for approval. Please visit the moderation panel:'), $strCommentsPending ) . "\r\n"; -
trunk/wp-includes/post.php
r7109 r7130 1429 1429 * check_and_publish_future_post() - check to make sure post has correct status before 1430 1430 * passing it on to be published. Invoked by cron 'publish_future_post' event 1431 * This safeguard prevents cron from publishing drafts, etc. 1432 * 1431 * This safeguard prevents cron from publishing drafts, etc. 1432 * 1433 1433 * {@internal Missing Long Description}} 1434 1434 * … … 1442 1442 */ 1443 1443 function check_and_publish_future_post($post_id) { 1444 1444 1445 1445 $post = get_post($post_id); 1446 1446 … … 1451 1451 return; 1452 1452 1453 return wp_publish_post($post_id); 1453 return wp_publish_post($post_id); 1454 1454 } 1455 1455 … … 2932 2932 if ( !empty($_post->ancestors) ) 2933 2933 return; 2934 2934 2935 2935 $_post->ancestors = array(); 2936 2936 -
trunk/wp-includes/script-loader.php
r7103 r7130 33 33 $visual_editor = apply_filters('visual_editor', array('tiny_mce')); 34 34 $this->add( 'editor', false, $visual_editor, '20080218' ); 35 35 36 36 $this->add( 'editor_functions', '/wp-admin/js/editor.js', false, '20080221' ); 37 37 38 38 // Modify this version when tinyMCE plugins are changed. 39 39 $mce_version = apply_filters('tiny_mce_version', '20080226'); 40 40 $this->add( 'tiny_mce', '/wp-includes/js/tinymce/tiny_mce_config.php', array('editor_functions'), $mce_version ); 41 41 42 42 $this->add( 'prototype', '/wp-includes/js/prototype.js', false, '1.6'); 43 43 … … 480 480 } 481 481 482 // These localizations require information that may not be loaded even by init 483 function wp_just_in_time_script_localization() { 484 wp_localize_script( 'tiny_mce', 'wpTinyMCEConfig', array( 'defaultEditor' => wp_default_editor() ) ); 485 } 486 487 add_filter( 'wp_print_scripts', 'wp_just_in_time_script_localization' ); 482 // These localizations require information that may not be loaded even by init 483 function wp_just_in_time_script_localization() { 484 wp_localize_script( 'tiny_mce', 'wpTinyMCEConfig', array( 'defaultEditor' => wp_default_editor() ) ); 485 } 486 487 add_filter( 'wp_print_scripts', 'wp_just_in_time_script_localization' ); 488 488 add_filter( 'print_scripts_array', 'wp_prototype_before_jquery' ); 489 489 -
trunk/wp-includes/widgets.php
r7080 r7130 263 263 if ( !$widget_id || $widget_id == $wp_registered_widgets[$widget]['id'] ) 264 264 return $sidebar; 265 265 266 266 267 267 return false;
Note: See TracChangeset
for help on using the changeset viewer.