From 541e47c09b503df8bd9b6d149c82cb8d98ac2710 Mon Sep 17 00:00:00 2001 From: donncha Date: Mon, 30 Jun 2008 11:17:02 +0000 Subject: WP Merge to revision 8195 git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1342 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- wp-admin/admin-header.php | 9 ++++----- wp-admin/async-upload.php | 4 +++- wp-admin/gears-manifest.php | 5 +++-- wp-admin/includes/file.php | 6 +++++- wp-admin/includes/media.php | 10 +++++----- wp-admin/includes/schema.php | 3 +-- wp-admin/includes/upgrade.php | 9 ++------- wp-admin/includes/user.php | 8 +++++++- wp-admin/js/media-upload.js | 23 ++++++++++++++++------- wp-admin/js/theme-preview.js | 2 +- 10 files changed, 47 insertions(+), 32 deletions(-) diff --git a/wp-admin/admin-header.php b/wp-admin/admin-header.php index f8a30d7..ff42e3f 100644 --- a/wp-admin/admin-header.php +++ b/wp-admin/admin-header.php @@ -83,11 +83,10 @@ if ( ($is_gecko || $is_winIE) && strpos(strtolower($_SERVER['HTTP_USER_AGENT']),

-


+


-

-

-
+

+

@@ -111,7 +110,7 @@ if ( ($is_gecko || $is_winIE) && strpos(strtolower($_SERVER['HTTP_USER_AGENT']), -

%2$s!'), 'profile.php', $user_identity) ?> | | Help') ?> | Forums'); if ( $gears_compat ) { ?> |

+

%2$s!'), 'profile.php', $user_identity) ?> | | Help') ?> | Forums'); if ( $gears_compat ) { ?> |

{ "betaManifestVersion" : 1, -"version" : "_20080622", +"version" : "_20080625", "entries" : [ @@ -125,7 +126,7 @@ header( 'Content-Type: application/x-javascript; charset=UTF-8' ); { "url" : "../wp-includes/js/tinymce/themes/advanced/js/link.js?ver=3101" }, { "url" : "../wp-includes/js/tinymce/themes/advanced/js/source_editor.js?ver=3101" }, { "url" : "../wp-includes/js/tinymce/themes/advanced/js/anchor.js?ver=3101" }, -{ "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.js?ver=3101" }, +{ "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.js?ver=3102" }, { "url" : "../wp-includes/js/tinymce/themes/advanced/source_editor.htm?ver=3101" }, { "url" : "../wp-includes/js/tinymce/themes/advanced/anchor.htm?ver=3101" }, diff --git a/wp-admin/includes/file.php b/wp-admin/includes/file.php index 078cb9d..32f552c 100644 --- a/wp-admin/includes/file.php +++ b/wp-admin/includes/file.php @@ -287,7 +287,11 @@ function wp_handle_sideload( &$file, $overrides = false ) { return $upload_error_handler( $file, $uploads['error'] ); $filename = wp_unique_filename( $uploads['path'], $file['name'], $unique_filename_callback ); - + + // Strip the query strings. + $filename = str_replace('?','-', $filename); + $filename = str_replace('&','-', $filename); + // Move the file to the uploads dir $new_file = $uploads['path'] . "/$filename"; if ( false === @ rename( $file['tmp_name'], $new_file ) ) { diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php index d6fdec2..cf530d4 100644 --- a/wp-admin/includes/media.php +++ b/wp-admin/includes/media.php @@ -65,10 +65,10 @@ function get_image_send_to_editor($id, $alt, $title, $align, $url='', $rel = fal function media_send_to_editor($html) { ?> ", post_params : { "post_id" : "", - "auth_cookie" : "", + "auth_cookie" : "", "_wpnonce" : "", "type" : "", "tab" : "", diff --git a/wp-admin/includes/schema.php b/wp-admin/includes/schema.php index afaee6b..64b2eaf 100644 --- a/wp-admin/includes/schema.php +++ b/wp-admin/includes/schema.php @@ -229,8 +229,7 @@ CREATE TABLE IF NOT EXISTS $wpdb->signups ( function populate_options() { global $wpdb, $wp_db_version, $current_site; - $schema = ( isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' ) ? 'https://' : 'http://'; - $guessurl = preg_replace('|/wp-admin/.*|i', '', $schema . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']); + $guessurl = wp_guess_url(); do_action('populate_options'); diff --git a/wp-admin/includes/upgrade.php b/wp-admin/includes/upgrade.php index 07a4f9f..3d5ce74 100644 --- a/wp-admin/includes/upgrade.php +++ b/wp-admin/includes/upgrade.php @@ -21,12 +21,7 @@ function wp_install($blog_title, $user_name, $user_email, $public, $remote) { update_option('enable_app',$remote); update_option('enable_xmlrpc',$remote); - $schema = ( isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' ) ? 'https://' : 'http://'; - - if ( defined('WP_SITEURL') && '' != WP_SITEURL ) - $guessurl = WP_SITEURL; - else - $guessurl = preg_replace('|/wp-admin/.*|i', '', $schema . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']); + $guessurl = wp_guess_url(); update_option('siteurl', $guessurl); @@ -889,7 +884,7 @@ function deslash($content) { function dbDelta($queries, $execute = true) { global $wpdb; - // Seperate individual queries into an array + // Separate individual queries into an array if( !is_array($queries) ) { $queries = explode( ';', $queries ); if('' == $queries[count($queries) - 1]) array_pop($queries); diff --git a/wp-admin/includes/user.php b/wp-admin/includes/user.php index 4c02592..3bf4fd7 100644 --- a/wp-admin/includes/user.php +++ b/wp-admin/includes/user.php @@ -353,12 +353,18 @@ class WP_User_Search { function do_paging() { if ( $this->total_users_for_query > $this->users_per_page ) { // have to page the results + $args = array(); + if( ! empty($this->search_term) ) + $args['usersearch'] = urlencode($this->search_term); + if( ! empty($this->role) ) + $args['role'] = urlencode($this->role); + $this->paging_text = paginate_links( array( 'total' => ceil($this->total_users_for_query / $this->users_per_page), 'current' => $this->page, 'base' => 'users.php?%_%', 'format' => 'userspage=%#%', - 'add_args' => array( 'usersearch' => urlencode($this->search_term) ) + 'add_args' => $args ) ); } } diff --git a/wp-admin/js/media-upload.js b/wp-admin/js/media-upload.js index 8c88270..99acd26 100644 --- a/wp-admin/js/media-upload.js +++ b/wp-admin/js/media-upload.js @@ -1,13 +1,15 @@ // send html to the post editor function send_to_editor(h) { - var win = window.dialogArguments || opener || parent || top; + if ( typeof tinyMCE != 'undefined' && ( ed = tinyMCE.activeEditor ) && !ed.isHidden() ) { + ed.focus(); + if (tinymce.isIE) + ed.selection.moveToBookmark(tinymce.EditorManager.activeEditor.windowManager.bookmark); - tinyMCE = win.tinyMCE; - if ( typeof tinyMCE != 'undefined' && ( ed = tinyMCE.getInstanceById('content') ) && !ed.isHidden() ) { - tinyMCE.selectedInstance.getWin().focus(); - tinyMCE.execCommand('mceInsertContent', false, h); + ed.execCommand('mceInsertContent', false, h); } else - win.edInsertContent(win.edCanvas, h); + edInsertContent(edCanvas, h); + + tb_remove(); } // thickbox settings @@ -22,7 +24,7 @@ jQuery(function($) { tbWindow.width( W - 50 ).height( H - 45 ); $('#TB_iframeContent').width( W - 50 ).height( H - 75 ); tbWindow.css({'margin-left': '-' + parseInt((( W - 50 ) / 2),10) + 'px'}); - if ( ! ( $.browser.msie && $.browser.version.substr(0,1) < 7 ) ) + if ( typeof document.body.style.maxWidth != 'undefined' ) tbWindow.css({'top':'20px','margin-top':'0'}); $('#TB_title').css({'background-color':'#222','color':'#cfcfcf'}); }; @@ -35,6 +37,13 @@ jQuery(function($) { $(this).attr( 'href', href + '&width=' + ( W - 80 ) + '&height=' + ( H - 85 ) ); }); }; + + jQuery('a.thickbox').click(function(){ + if ( typeof tinyMCE != 'undefined' && tinyMCE.activeEditor ) { + tinyMCE.get('content').focus(); + tinyMCE.activeEditor.windowManager.bookmark = tinyMCE.activeEditor.selection.getBookmark('simple'); + } + }); $(window).resize( function() { tb_position() } ); }); diff --git a/wp-admin/js/theme-preview.js b/wp-admin/js/theme-preview.js index 43b01cd..f4f85e8 100644 --- a/wp-admin/js/theme-preview.js +++ b/wp-admin/js/theme-preview.js @@ -12,7 +12,7 @@ jQuery(function($) { tbWindow.width( W - 90 ).height( H - 60 ); $('#TB_iframeContent').width( W - 90 ).height( H - 90 ); tbWindow.css({'margin-left': '-' + parseInt((( W - 90 ) / 2),10) + 'px'}); - if ( ! ( $.browser.msie && $.browser.version.substr(0,1) < 7 ) ) + if ( typeof document.body.style.maxWidth != 'undefined' ) tbWindow.css({'top':'30px','margin-top':'0'}); }; -- cgit