Changes in branches/2.7 [10933:10537]
- Location:
- branches/2.7
- Files:
-
- 31 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.7/wp-admin/categories.php
r10933 r10537 295 295 $(document).ready(function(){ 296 296 $('#doaction, #doaction2').click(function(){ 297 if ( $('select[name ="action"]').val() == 'delete' || $('select[name="action2"]').val() == 'delete' ) {297 if ( $('select[name^="action"]').val() == 'delete' ) { 298 298 var m = '<?php echo js_escape(__("You are about to delete the selected categories.\n 'Cancel' to stop, 'OK' to delete.")); ?>'; 299 299 return showNotice.warn(m); -
branches/2.7/wp-admin/edit-comments.php
r10933 r10537 379 379 $(document).ready(function(){ 380 380 $('#doaction, #doaction2').click(function(){ 381 if ( $('select[name ="action"]').val() == 'delete' || $('select[name="action2"]').val() == 'delete' ) {381 if ( $('select[name^="action"]').val() == 'delete' ) { 382 382 var m = '<?php echo js_escape(__("You are about to delete the selected comments.\n 'Cancel' to stop, 'OK' to delete.")); ?>'; 383 383 return showNotice.warn(m); -
branches/2.7/wp-admin/edit-link-categories.php
r10933 r10537 230 230 $(document).ready(function(){ 231 231 $('#doaction, #doaction2').click(function(){ 232 if ( $('select[name ="action"]').val() == 'delete' || $('select[name="action2"]').val() == 'delete' ) {232 if ( $('select[name^="action"]').val() == 'delete' ) { 233 233 var m = '<?php echo js_escape(__("You are about to delete the selected link categories.\n 'Cancel' to stop, 'OK' to delete.")); ?>'; 234 234 return showNotice.warn(m); -
branches/2.7/wp-admin/edit-pages.php
r10933 r10537 318 318 $(document).ready(function(){ 319 319 $('#doaction, #doaction2').click(function(){ 320 if ( $('select[name ="action"]').val() == 'delete' || $('select[name="action2"]').val() == 'delete' ) {320 if ( $('select[name^="action"]').val() == 'delete' ) { 321 321 var m = '<?php echo js_escape(__("You are about to delete the selected pages.\n 'Cancel' to stop, 'OK' to delete.")); ?>'; 322 322 return showNotice.warn(m); -
branches/2.7/wp-admin/edit-tags.php
r10933 r10537 44 44 wp_delete_term( $tag_ID, 'post_tag'); 45 45 46 $location = 'edit-tags.php'; 47 if ( $referer = wp_get_referer() ) { 48 if ( false !== strpos($referer, 'edit-tags.php') ) 49 $location = $referer; 50 } 51 52 $location = add_query_arg('message', 2, $location); 53 wp_redirect($location); 46 wp_redirect('edit-tags.php?message=2'); 54 47 exit; 55 48 … … 268 261 <label for="name"><?php _e('Tag name') ?></label> 269 262 <input name="name" id="name" type="text" value="" size="40" aria-required="true" /> 270 263 <p><?php _e('The name is how the tag appears on your site.'); ?></p> 271 264 </div> 272 265 … … 274 267 <label for="slug"><?php _e('Tag slug') ?></label> 275 268 <input name="slug" id="slug" type="text" value="" size="40" /> 276 269 <p><?php _e('The “slug” is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.'); ?></p> 277 270 </div> 278 271 … … 293 286 $(document).ready(function(){ 294 287 $('#doaction, #doaction2').click(function(){ 295 if ( $('select[name ="action"]').val() == 'delete' || $('select[name="action2"]').val() == 'delete' ) {288 if ( $('select[name^="action"]').val() == 'delete' ) { 296 289 var m = '<?php echo js_escape(__("You are about to delete the selected tags.\n 'Cancel' to stop, 'OK' to delete.")); ?>'; 297 290 return showNotice.warn(m); -
branches/2.7/wp-admin/edit.php
r10933 r10537 302 302 $(document).ready(function(){ 303 303 $('#doaction, #doaction2').click(function(){ 304 if ( $('select[name ="action"]').val() == 'delete' || $('select[name="action2"]').val() == 'delete' ) {304 if ( $('select[name^="action"]').val() == 'delete' ) { 305 305 var m = '<?php echo js_escape(__("You are about to delete the selected posts.\n 'Cancel' to stop, 'OK' to delete.")); ?>'; 306 306 return showNotice.warn(m); -
branches/2.7/wp-admin/import/mt.php
r10933 r10537 40 40 41 41 <?php wp_import_upload_form( add_query_arg('step', 1) ); ?> 42 <form method="post" action="<?php echo a ttribute_escape(add_query_arg('step', 1)); ?>" class="import-upload-form">42 <form method="post" action="<?php echo add_query_arg('step', 1); ?>" class="import-upload-form"> 43 43 44 44 <?php wp_nonce_field('import-upload'); ?> -
branches/2.7/wp-admin/import/opml.php
r10933 r10537 93 93 } else { // try to get the upload file. 94 94 $overrides = array('test_form' => false, 'test_type' => false); 95 $_FILES['userfile']['name'] .= '.txt';96 95 $file = wp_handle_upload($_FILES['userfile'], $overrides); 97 96 -
branches/2.7/wp-admin/includes/import.php
r10933 r10537 61 61 function wp_import_handle_upload() { 62 62 $overrides = array( 'test_form' => false, 'test_type' => false ); 63 $_FILES['import']['name'] .= '. txt';63 $_FILES['import']['name'] .= '.import'; 64 64 $file = wp_handle_upload( $_FILES['import'], $overrides ); 65 65 -
branches/2.7/wp-admin/includes/media.php
r10933 r10537 1168 1168 $item .= $field[$field['input']]; 1169 1169 elseif ( $field['input'] == 'textarea' ) { 1170 $item .= "<textarea type='text' id='$name' name='$name'" . $aria_required . ">" . wp_specialchars( $field['value'] ) . "</textarea>";1170 $item .= "<textarea type='text' id='$name' name='$name'" . $aria_required . ">" . htmlspecialchars( $field['value'] ) . "</textarea>"; 1171 1171 } else { 1172 1172 $item .= "<input type='text' id='$name' name='$name' value='" . attribute_escape( $field['value'] ) . "'" . $aria_required . "/>"; -
branches/2.7/wp-admin/includes/update-core.php
r10933 r10537 162 162 'wp-images/wp-small.png', 163 163 'wp-images/wpminilogo.png', 164 'wp.php' 164 'wp.php', 165 'wp-content/themes/default/attachment.php', 166 'wp-content/themes/default/images/kubrickbg.jpg', 167 'wp-content/plugins/markdown.php', 168 'wp-content/plugins/textile1.php', 165 169 ); 166 170 -
branches/2.7/wp-admin/includes/user.php
r10933 r10537 394 394 $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->usermeta WHERE user_id = %d", $id) ); 395 395 396 $user = new WP_User($id);397 398 396 wp_cache_delete($id, 'users'); 399 397 wp_cache_delete($user->user_login, 'userlogins'); -
branches/2.7/wp-admin/link-manager.php
r10933 r10537 169 169 $link->link_category = wp_get_link_cats($link->link_id); 170 170 $short_url = str_replace('http://', '', $link->link_url); 171 $short_url = preg_replace('/^www \./i', '', $short_url);171 $short_url = preg_replace('/^www./i', '', $short_url); 172 172 if ('/' == substr($short_url, -1)) 173 173 $short_url = substr($short_url, 0, -1); … … 276 276 $(document).ready(function(){ 277 277 $('#doaction, #doaction2').click(function(){ 278 if ( $('select[name ="action"]').val() == 'delete' || $('select[name="action2"]').val() == 'delete' ) {278 if ( $('select[name^="action"]').val() == 'delete' ) { 279 279 var m = '<?php echo js_escape(__("You are about to delete the selected links.\n 'Cancel' to stop, 'OK' to delete.")); ?>'; 280 280 return showNotice.warn(m); -
branches/2.7/wp-admin/setup-config.php
r10933 r10537 43 43 wp_die("<p>The file 'wp-config.php' already exists. If you need to reset any of the configuration items in this file, please delete it first. You may try <a href='install.php'>installing now</a>.</p>"); 44 44 45 // Check if wp-config.php exists above the root directory but is not part of another install46 if (file_exists('../../wp-config.php') && ! file_exists('../../wp- settings.php'))45 // Check if wp-config.php exists above the root directory 46 if (file_exists('../../wp-config.php') && ! file_exists('../../wp-load.php')) 47 47 wp_die("<p>The file 'wp-config.php' already exists one level above your WordPress installation. If you need to reset any of the configuration items in this file, please delete it first. You may try <a href='install.php'>installing now</a>.</p>"); 48 48 -
branches/2.7/wp-admin/upload.php
r10933 r10537 416 416 $(document).ready(function(){ 417 417 $('#doaction, #doaction2').click(function(e){ 418 if ( $('select[name ="action"]').val() == 'delete' || $('select[name="action2"]').val() == 'delete' ) {418 if ( $('select[name^="action"]').val() == 'delete' ) { 419 419 var m = '<?php echo js_escape(__("You are about to delete the selected attachments.\n 'Cancel' to stop, 'OK' to delete.")); ?>'; 420 420 return showNotice.warn(m); -
branches/2.7/wp-admin/users.php
r10933 r10537 241 241 <?php screen_icon(); ?> 242 242 <h2><?php echo wp_specialchars( $title ); 243 if ( isset($_GET[' usersearch']) && $_GET['usersearch'] )244 printf( '<span class="subtitle">' . __('Search results for “%s”') . '</span>', wp_specialchars( $_GET['usersearch']) ); ?>243 if ( isset($_GET['s']) && $_GET['s'] ) 244 printf( '<span class="subtitle">' . __('Search results for “%s”') . '</span>', wp_specialchars( get_search_query() ) ); ?> 245 245 </h2> 246 246 -
branches/2.7/wp-app.php
r10933 r10537 26 26 /** Feed Handling API */ 27 27 require_once(ABSPATH . WPINC . '/feed.php'); 28 29 /** Admin Image API for metadata updating */30 require_once(ABSPATH . '/wp-admin/includes/image.php');31 28 32 29 $_SERVER['PATH_INFO'] = preg_replace( '/.*\/wp-app\.php/', '', $_SERVER['REQUEST_URI'] ); … … 702 699 703 700 $post_title = $parsed->title[1]; 704 $post_content = $parsed-> summary[1];701 $post_content = $parsed->content[1]; 705 702 $pubtimes = $this->get_publish_time($parsed->updated); 706 703 $post_modified = $pubtimes[0]; … … 818 815 } 819 816 820 $upload_dir = wp_upload_dir( );821 817 $location = get_post_meta($entry['ID'], '_wp_attached_file', true); 822 818 $filetype = wp_check_filetype($location); 823 824 $location = "{$upload_dir['basedir']}/{$location}";825 819 826 820 if(!isset($location) || 'attachment' != $entry['post_type'] || empty($filetype['ext'])) … … 850 844 } 851 845 852 wp_update_attachment_metadata( $postID, wp_generate_attachment_metadata( $postID, $location ) );853 854 846 log_app('function',"put_file($postID)"); 855 847 $this->ok(); … … 1075 1067 log_app('function',"get_feed($page, '$post_type')"); 1076 1068 ob_start(); 1077 1078 $this->ENTRY_PATH = $post_type;1079 1069 1080 1070 if(!isset($page)) { … … 1147 1137 break; 1148 1138 case 'attachment': 1149 $this->ENTRY_PATH = 'attachment';1150 1139 $varname = 'attachment_id'; 1151 1140 break; -
branches/2.7/wp-includes/comment-template.php
r10933 r10537 293 293 if ( $comment->user_id > 0 && $user = get_userdata($comment->user_id) ) { 294 294 // For all registered users, 'byuser' 295 $classes[] = 'byuser'; 296 $classes[] = 'comment-author-' . $user->user_nicename; 295 $classes[] = 'byuser comment-author-' . $user->user_nicename; 297 296 // For comment authors who are the author of the post 298 297 if ( $post = get_post($post_id) ) { -
branches/2.7/wp-includes/comment.php
r10933 r10537 740 740 return false; 741 741 742 // Move children up a level.743 $children = $wpdb->get_col( $wpdb->prepare("SELECT comment_ID FROM $wpdb->comments WHERE comment_parent = %d", $comment_id) );744 if ( !empty($children) ) {745 $wpdb->update($wpdb->comments, array('comment_parent' => $comment->comment_parent), array('comment_parent' => $comment_id));746 clean_comment_cache($children);747 }748 749 742 $post_id = $comment->comment_post_ID; 750 743 if ( $post_id && $comment->comment_approved == 1 ) … … 1550 1543 * @subpackage Cache 1551 1544 * 1552 * @param int|array $id Comment ID or array of comment IDs to remove from cache 1553 */ 1554 function clean_comment_cache($ids) { 1555 foreach ( (array) $ids as $id ) 1556 wp_cache_delete($id, 'comment'); 1545 * @param int $id Comment ID to remove from cache 1546 */ 1547 function clean_comment_cache($id) { 1548 wp_cache_delete($id, 'comment'); 1557 1549 } 1558 1550 -
branches/2.7/wp-includes/compat.php
r10933 r10537 100 100 // Added in PHP 5.1.0 101 101 // Error checks from PEAR::PHP_Compat 102 function htmlspecialchars_decode( $str ing, $quote_style = ENT_COMPAT )102 function htmlspecialchars_decode( $str, $quote_style = ENT_COMPAT ) 103 103 { 104 104 if ( !is_scalar( $string ) ) { … … 112 112 } 113 113 114 return wp_specialchars_decode( $str ing, $quote_style );114 return wp_specialchars_decode( $str, $quote_style ); 115 115 } 116 116 } -
branches/2.7/wp-includes/feed.php
r10933 r10537 404 404 if ($key == 'enclosure') { 405 405 foreach ( (array) $val as $enc ) { 406 $enclosure = explode("\n", $enc);406 $enclosure = split("\n", $enc); 407 407 408 408 //only get the the first element eg, audio/mpeg from 'audio/mpeg mpga mp2 mp3' 409 $t = preg_split('/[ \t]/', trim($enclosure[2]) );409 $t = split('[ \t]', trim($enclosure[2]) ); 410 410 $type = $t[0]; 411 411 -
branches/2.7/wp-includes/formatting.php
r10933 r10537 638 638 */ 639 639 function sanitize_title($title, $fallback_title = '') { 640 $raw_title = $title;641 640 $title = strip_tags($title); 642 $title = apply_filters('sanitize_title', $title , $raw_title);641 $title = apply_filters('sanitize_title', $title); 643 642 644 643 if ( '' === $title || false === $title ) -
branches/2.7/wp-includes/functions.php
r10933 r10537 1389 1389 $status_header = apply_filters( 'status_header', $status_header, $header, $text, $protocol ); 1390 1390 1391 return @header( $status_header, true, $header ); 1391 if ( version_compare( phpversion(), '4.3.0', '>=' ) ) 1392 return @header( $status_header, true, $header ); 1393 else 1394 return @header( $status_header ); 1392 1395 } 1393 1396 … … 2619 2622 curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 2620 2623 curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); 2621 curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);2622 2624 2623 2625 curl_exec($ch); … … 2911 2913 return $can_clone ? clone( $object ) : $object; 2912 2914 } 2915 2916 2913 2917 ?> -
branches/2.7/wp-includes/pluggable.php
r10933 r10537 307 307 $from_email = trim( $from_email ); 308 308 } else { 309 $from_ email= trim( $content );309 $from_name = trim( $content ); 310 310 } 311 311 } elseif ( 'content-type' == strtolower($name) ) { … … 1252 1252 1253 1253 if ( defined('SECURE_AUTH_SALT') ) { 1254 $salt = SEC URE_AUTH_SALT;1254 $salt = SECRET_AUTH_SALT; 1255 1255 } else { 1256 1256 $salt = get_option('secure_auth_salt'); -
branches/2.7/wp-includes/post.php
r10933 r10537 3457 3457 3458 3458 $post = _wp_post_revision_fields( $post, $autosave ); 3459 $post = add_magic_quotes($post); //since data is from db 3460 3459 3461 3460 $revision_id = wp_insert_post( $post ); 3462 3461 if ( is_wp_error($revision_id) ) … … 3534 3533 3535 3534 $update['ID'] = $revision['post_parent']; 3536 3537 $update = add_magic_quotes( $update ); //since data is from db3538 3535 3539 3536 $post_id = wp_update_post( $update ); -
branches/2.7/wp-includes/query.php
r10933 r10537 1452 1452 $this->is_comment_feed = true; 1453 1453 1454 if ( !( $this->is_singular || $this->is_archive || $this->is_search || $this->is_feed || $this->is_trackback || $this->is_404 || $this->is_admin || $this->is_comments_popup || $this->is_robots) )1454 if ( !( $this->is_singular || $this->is_archive || $this->is_search || $this->is_feed || $this->is_trackback || $this->is_404 || $this->is_admin || $this->is_comments_popup ) ) 1455 1455 $this->is_home = true; 1456 1456 … … 1791 1791 1792 1792 if ( !empty($q['category__in']) ) { 1793 $groupby = "{$wpdb->posts}.ID"; 1794 } 1795 1796 if ( !empty($q['category__in']) ) { 1793 1797 $join = " INNER JOIN $wpdb->term_relationships ON ($wpdb->posts.ID = $wpdb->term_relationships.object_id) INNER JOIN $wpdb->term_taxonomy ON ($wpdb->term_relationships.term_taxonomy_id = $wpdb->term_taxonomy.term_taxonomy_id) "; 1794 1798 $whichcat .= " AND $wpdb->term_taxonomy.taxonomy = 'category' "; … … 1866 1870 } 1867 1871 1868 if ( !empty($q[' category__in']) || !empty($q['meta_key']) || !empty($q['tag__in']) || !empty($q['tag_slug__in']) ) {1872 if ( !empty($q['tag__in']) || !empty($q['tag_slug__in']) ) { 1869 1873 $groupby = "{$wpdb->posts}.ID"; 1870 1874 } … … 2020 2024 } else { 2021 2025 // Used to filter values 2022 $allowed_keys = array('author', 'date', ' title', 'modified', 'menu_order', 'parent', 'ID', 'rand');2026 $allowed_keys = array('author', 'date', 'category', 'title', 'modified', 'menu_order', 'parent', 'ID', 'rand'); 2023 2027 if ( !empty($q['meta_key']) ) { 2024 2028 $allowed_keys[] = $q['meta_key']; … … 2210 2214 $distinct = apply_filters('posts_distinct', $distinct); 2211 2215 $limits = apply_filters( 'post_limits', $limits ); 2216 2217 if ( ! empty($q['meta_key']) ) 2218 $fields = "$fields, $wpdb->postmeta.meta_value"; 2212 2219 2213 2220 $fields = apply_filters('posts_fields', $fields); -
branches/2.7/wp-includes/theme.php
r10933 r10537 850 850 return; 851 851 852 $_GET['template'] = preg_replace('|[^a-z0-9_. \-/]|i', '', $_GET['template']);852 $_GET['template'] = preg_replace('|[^a-z0-9_.-/]|i', '', $_GET['template']); 853 853 854 854 if ( validate_file($_GET['template']) ) … … 858 858 859 859 if ( isset($_GET['stylesheet']) ) { 860 $_GET['stylesheet'] = preg_replace('|[^a-z0-9_. \-/]|i', '', $_GET['stylesheet']);860 $_GET['stylesheet'] = preg_replace('|[^a-z0-9_.-/]|i', '', $_GET['stylesheet']); 861 861 if ( validate_file($_GET['stylesheet']) ) 862 862 return; -
branches/2.7/wp-includes/update.php
r10933 r10537 31 31 $current = new stdClass; 32 32 33 $locale = apply_filters( 'core_version_check_locale', get_locale());33 $locale = get_locale(); 34 34 if ( 35 35 isset( $current->last_checked ) && -
branches/2.7/wp-includes/version.php
r10933 r10537 9 9 * @global string $wp_version 10 10 */ 11 $wp_version = '2.7. 2-alpha';11 $wp_version = '2.7.1'; 12 12 13 13 /** -
branches/2.7/wp-load.php
r10933 r10537 27 27 require_once( ABSPATH . 'wp-config.php' ); 28 28 29 } elseif ( file_exists( dirname(ABSPATH) . '/wp-config.php' ) && ! file_exists( dirname(ABSPATH) . '/wp- settings.php' ) ) {29 } elseif ( file_exists( dirname(ABSPATH) . '/wp-config.php' ) && ! file_exists( dirname(ABSPATH) . '/wp-load.php' ) ) { 30 30 31 /** The config file resides one level above ABSPATH but is not part of another install*/31 /** The config file resides one level below ABSPATH */ 32 32 require_once( dirname(ABSPATH) . '/wp-config.php' ); 33 33 -
branches/2.7/xmlrpc.php
r10933 r10537 442 442 'blogid' => $blog_id, 443 443 'blogName' => get_option( 'blogname' ), 444 'xmlrpc' => site_url( 'xmlrpc.php' )444 'xmlrpc' => get_option( 'home' ) . '/xmlrpc.php' 445 445 ); 446 446 … … 1594 1594 'blogid' => '1', 1595 1595 'blogName' => get_option('blogname'), 1596 'xmlrpc' => site_url( 'xmlrpc.php' )1596 'xmlrpc' => get_option('home') . '/xmlrpc.php', 1597 1597 ); 1598 1598 … … 3342 3342 global $wpdb; 3343 3343 3344 do_action('xmlrpc_call', 'pingback.extensions.getPing backs');3344 do_action('xmlrpc_call', 'pingback.extensions.getPingsbacks'); 3345 3345 3346 3346 $this->escape($args);
Note: See TracChangeset
for help on using the changeset viewer.