summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2008-06-30 11:17:02 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2008-06-30 11:17:02 +0000
commit541e47c09b503df8bd9b6d149c82cb8d98ac2710 (patch)
tree94c90cfd4eee2b1035f886877b77f53d1f1717c8
parent717b64911edf6baaa2aea29e13b8e808f088e660 (diff)
downloadwordpress-mu-541e47c09b503df8bd9b6d149c82cb8d98ac2710.tar.gz
wordpress-mu-541e47c09b503df8bd9b6d149c82cb8d98ac2710.tar.xz
wordpress-mu-541e47c09b503df8bd9b6d149c82cb8d98ac2710.zip
WP Merge to revision 8195
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1342 7be80a69-a1ef-0310-a953-fb0f7c49ff36
-rw-r--r--wp-admin/admin-header.php9
-rw-r--r--wp-admin/async-upload.php4
-rw-r--r--wp-admin/gears-manifest.php5
-rw-r--r--wp-admin/includes/file.php6
-rw-r--r--wp-admin/includes/media.php10
-rw-r--r--wp-admin/includes/schema.php3
-rw-r--r--wp-admin/includes/upgrade.php9
-rw-r--r--wp-admin/includes/user.php8
-rw-r--r--wp-admin/js/media-upload.js23
-rw-r--r--wp-admin/js/theme-preview.js2
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']),
<img src="images/gear.png" title="Gear" alt="" class="gears-img" />
<div id="gears-msg1">
<h3 class="info-box-title"><?php _e('Speed up WordPress'); ?></h3>
- <p><?php _e('WordPress has support for Gears that adds new features to your web browser.'); ?><br />
+ <p><?php _e('WordPress now has support for Gears, which adds new features to your web browser.'); ?><br />
<a href="http://gears.google.com/" target="_blank" style="font-weight:normal;"><?php _e('More information...'); ?></a></p>
- <p><?php _e('After installing and enabling it, most of the WordPress images, scripts and CSS files will be stored on this computer. This will speed up page loading.'); ?></p>
- <p><strong><?php _e('Please make sure you are not using a public or shared computer.'); ?></strong></p>
- <div class="submit"><button onclick="window.location = 'http://gears.google.com/?action=install&amp;return=<?php echo urlencode( admin_url() ); ?>';" class="button"><?php _e('Install Now'); ?></button>
+ <p><?php _e('After you install and enable Gears most of WordPress&#8217; images, scripts, and CSS files will be stored locally on your computer. This speeds up page load time.'); ?></p>
+ <p><strong><?php _e('Don&#8217;t install on a public or shared computer.'); ?></strong></p> <div class="submit"><button onclick="window.location = 'http://gears.google.com/?action=install&amp;return=<?php echo urlencode( admin_url() ); ?>';" class="button"><?php _e('Install Now'); ?></button>
<button class="button" style="margin-left:10px;" onclick="document.getElementById('gears-info-box').style.display='none';">Cancel</button></div>
</div>
@@ -111,7 +110,7 @@ if ( ($is_gecko || $is_winIE) && strpos(strtolower($_SERVER['HTTP_USER_AGENT']),
<?php } ?>
-<div id="user_info"><p><?php printf(__('Howdy, <a href="%1$s">%2$s</a>!'), 'profile.php', $user_identity) ?> | <a href="<?php echo site_url('wp-login.php?action=logout', 'login') ?>" title="<?php _e('Log Out') ?>"><?php _e('Log Out'); ?></a> | <?php _e('<a href="http://codex.wordpress.org/">Help</a>') ?> | <?php _e('<a href="http://wordpress.org/support/">Forums</a>'); if ( $gears_compat ) { ?> | <span id="gears-menu"><a href="#" onclick="wpGears.message(1);return false;"><?php _e('Speed up!') ?></a></span><?php } ?></p></div>
+<div id="user_info"><p><?php printf(__('Howdy, <a href="%1$s">%2$s</a>!'), 'profile.php', $user_identity) ?> | <a href="<?php echo site_url('wp-login.php?action=logout', 'login') ?>" title="<?php _e('Log Out') ?>"><?php _e('Log Out'); ?></a> | <?php _e('<a href="http://codex.wordpress.org/">Help</a>') ?> | <?php _e('<a href="http://wordpress.org/support/">Forums</a>'); if ( $gears_compat ) { ?> | <span id="gears-menu"><a href="#" onclick="wpGears.message(1);return false;"><?php _e('Turbo') ?></a></span><?php } ?></p></div>
<?php
require(ABSPATH . 'wp-admin/menu-header.php');
diff --git a/wp-admin/async-upload.php b/wp-admin/async-upload.php
index 59feb8c..18b8104 100644
--- a/wp-admin/async-upload.php
+++ b/wp-admin/async-upload.php
@@ -10,7 +10,9 @@ else
require_once('../wp-load.php');
// Flash often fails to send cookies with the POST or upload, so we need to pass it in GET or POST instead
-if ( empty($_COOKIE[AUTH_COOKIE]) && !empty($_REQUEST['auth_cookie']) )
+if ( is_ssl() && empty($_COOKIE[SECURE_AUTH_COOKIE]) && !empty($_REQUEST['auth_cookie']) )
+ $_COOKIE[SECURE_AUTH_COOKIE] = $_REQUEST['auth_cookie'];
+elseif ( empty($_COOKIE[AUTH_COOKIE]) && !empty($_REQUEST['auth_cookie']) )
$_COOKIE[AUTH_COOKIE] = $_REQUEST['auth_cookie'];
unset($current_user);
require_once('admin.php');
diff --git a/wp-admin/gears-manifest.php b/wp-admin/gears-manifest.php
index 889bc58..b87048c 100644
--- a/wp-admin/gears-manifest.php
+++ b/wp-admin/gears-manifest.php
@@ -15,6 +15,7 @@ function get_bloginfo() {}
function is_admin() {return true;}
function site_url() {}
function admin_url() {}
+function wp_guess_url() {}
require(ABSPATH . '/wp-includes/script-loader.php');
require(ABSPATH . '/wp-includes/version.php');
@@ -63,7 +64,7 @@ header( 'Content-Type: application/x-javascript; charset=UTF-8' );
?>
{
"betaManifestVersion" : 1,
-"version" : "<?php echo $man_version; ?>_20080622",
+"version" : "<?php echo $man_version; ?>_20080625",
"entries" : [
<?php echo $defaults; ?>
@@ -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) {
?>
<script type="text/javascript">
-<!--
-top.send_to_editor('<?php echo addslashes($html); ?>');
-top.tb_remove();
--->
+/* <![CDATA[ */
+var win = window.dialogArguments || opener || parent || top;
+win.send_to_editor('<?php echo addslashes($html); ?>');
+/* ]]> */
</script>
<?php
exit;
@@ -850,7 +850,7 @@ jQuery(function($){
file_types: "<?php echo apply_filters('upload_file_glob', '*.*'); ?>",
post_params : {
"post_id" : "<?php echo $post_id; ?>",
- "auth_cookie" : "<?php echo $_COOKIE[AUTH_COOKIE]; ?>",
+ "auth_cookie" : "<?php if ( is_ssl() ) echo $_COOKIE[SECURE_AUTH_COOKIE]; else echo $_COOKIE[AUTH_COOKIE]; ?>",
"_wpnonce" : "<?php echo wp_create_nonce('media-form'); ?>",
"type" : "<?php echo $type; ?>",
"tab" : "<?php echo $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'});
};