Changeset 1342

Show
Ignore:
Timestamp:
06/30/08 11:17:02 (2 months ago)
Author:
donncha
Message:

WP Merge to revision 8195

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-admin/admin-header.php

    r1336 r1342  
    8484        <div id="gears-msg1"> 
    8585        <h3 class="info-box-title"><?php _e('Speed up WordPress'); ?></h3> 
    86         <p><?php _e('WordPress has support for Gears that adds new features to your web browser.'); ?><br /> 
     86        <p><?php _e('WordPress now has support for Gears, which adds new features to your web browser.'); ?><br /> 
    8787        <a href="http://gears.google.com/" target="_blank" style="font-weight:normal;"><?php _e('More information...'); ?></a></p> 
    88         <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> 
    89         <p><strong><?php _e('Please make sure you are not using a public or shared computer.'); ?></strong></p> 
    90         <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> 
     88        <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> 
     89        <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> 
    9190        <button class="button" style="margin-left:10px;" onclick="document.getElementById('gears-info-box').style.display='none';">Cancel</button></div> 
    9291        </div> 
     
    112111<?php } ?> 
    113112 
    114 <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> 
     113<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> 
    115114 
    116115<?php 
  • trunk/wp-admin/async-upload.php

    r1328 r1342  
    1111 
    1212// Flash often fails to send cookies with the POST or upload, so we need to pass it in GET or POST instead 
    13 if ( empty($_COOKIE[AUTH_COOKIE]) && !empty($_REQUEST['auth_cookie']) ) 
     13if ( is_ssl() && empty($_COOKIE[SECURE_AUTH_COOKIE]) && !empty($_REQUEST['auth_cookie']) ) 
     14        $_COOKIE[SECURE_AUTH_COOKIE] = $_REQUEST['auth_cookie']; 
     15elseif ( empty($_COOKIE[AUTH_COOKIE]) && !empty($_REQUEST['auth_cookie']) ) 
    1416        $_COOKIE[AUTH_COOKIE] = $_REQUEST['auth_cookie']; 
    1517unset($current_user); 
  • trunk/wp-admin/gears-manifest.php

    r1336 r1342  
    1616function site_url() {} 
    1717function admin_url() {} 
     18function wp_guess_url() {} 
    1819 
    1920require(ABSPATH . '/wp-includes/script-loader.php'); 
     
    6465{ 
    6566"betaManifestVersion" : 1, 
    66 "version" : "<?php echo $man_version; ?>_20080622", 
     67"version" : "<?php echo $man_version; ?>_20080625", 
    6768"entries" : [ 
    6869<?php echo $defaults; ?> 
     
    126127{ "url" : "../wp-includes/js/tinymce/themes/advanced/js/source_editor.js?ver=3101" }, 
    127128{ "url" : "../wp-includes/js/tinymce/themes/advanced/js/anchor.js?ver=3101" }, 
    128 { "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.js?ver=3101" }, 
     129{ "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.js?ver=3102" }, 
    129130 
    130131{ "url" : "../wp-includes/js/tinymce/themes/advanced/source_editor.htm?ver=3101" }, 
  • trunk/wp-admin/includes/file.php

    r1336 r1342  
    288288 
    289289        $filename = wp_unique_filename( $uploads['path'], $file['name'], $unique_filename_callback ); 
    290  
     290         
     291        // Strip the query strings. 
     292        $filename = str_replace('?','-', $filename); 
     293        $filename = str_replace('&','-', $filename); 
     294         
    291295        // Move the file to the uploads dir 
    292296        $new_file = $uploads['path'] . "/$filename"; 
  • trunk/wp-admin/includes/media.php

    r1336 r1342  
    6666        ?> 
    6767<script type="text/javascript"> 
    68 <!-- 
    69 top.send_to_editor('<?php echo addslashes($html); ?>')
    70 top.tb_remove(); 
    71 --> 
     68/* <![CDATA[ */ 
     69var win = window.dialogArguments || opener || parent || top
     70win.send_to_editor('<?php echo addslashes($html); ?>'); 
     71/* ]]> */ 
    7272</script> 
    7373        <?php 
     
    851851                        post_params : { 
    852852                                "post_id" : "<?php echo $post_id; ?>", 
    853                                 "auth_cookie" : "<?php echo $_COOKIE[AUTH_COOKIE]; ?>", 
     853                                "auth_cookie" : "<?php if ( is_ssl() ) echo $_COOKIE[SECURE_AUTH_COOKIE]; else echo $_COOKIE[AUTH_COOKIE]; ?>", 
    854854                                "_wpnonce" : "<?php echo wp_create_nonce('media-form'); ?>", 
    855855                                "type" : "<?php echo $type; ?>", 
  • trunk/wp-admin/includes/schema.php

    r1336 r1342  
    230230        global $wpdb, $wp_db_version, $current_site; 
    231231 
    232         $schema = ( isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' ) ? 'https://' : 'http://'; 
    233         $guessurl = preg_replace('|/wp-admin/.*|i', '', $schema . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']); 
     232        $guessurl = wp_guess_url(); 
    234233         
    235234        do_action('populate_options'); 
  • trunk/wp-admin/includes/upgrade.php

    r1336 r1342  
    2222        update_option('enable_xmlrpc',$remote); 
    2323 
    24         $schema = ( isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' ) ? 'https://' : 'http://'; 
    25  
    26         if ( defined('WP_SITEURL') && '' != WP_SITEURL ) 
    27                 $guessurl = WP_SITEURL; 
    28         else 
    29                 $guessurl = preg_replace('|/wp-admin/.*|i', '', $schema . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']); 
     24        $guessurl = wp_guess_url(); 
    3025 
    3126        update_option('siteurl', $guessurl); 
     
    890885        global $wpdb; 
    891886 
    892         // Seperate individual queries into an array 
     887        // Separate individual queries into an array 
    893888        if( !is_array($queries) ) { 
    894889                $queries = explode( ';', $queries ); 
  • trunk/wp-admin/includes/user.php

    r1328 r1342  
    354354        function do_paging() { 
    355355                if ( $this->total_users_for_query > $this->users_per_page ) { // have to page the results 
     356                        $args = array(); 
     357                        if( ! empty($this->search_term) ) 
     358                                $args['usersearch'] = urlencode($this->search_term); 
     359                        if( ! empty($this->role) ) 
     360                                $args['role'] = urlencode($this->role); 
     361 
    356362                        $this->paging_text = paginate_links( array( 
    357363                                'total' => ceil($this->total_users_for_query / $this->users_per_page), 
     
    359365                                'base' => 'users.php?%_%', 
    360366                                'format' => 'userspage=%#%', 
    361                                 'add_args' => array( 'usersearch' => urlencode($this->search_term) ) 
     367                                'add_args' => $args 
    362368                        ) ); 
    363369                } 
  • trunk/wp-admin/js/media-upload.js

    r1328 r1342  
    11// send html to the post editor 
    22function send_to_editor(h) { 
    3         var win = window.dialogArguments || opener || parent || top; 
     3        if ( typeof tinyMCE != 'undefined' && ( ed = tinyMCE.activeEditor ) && !ed.isHidden() ) { 
     4                ed.focus(); 
     5                if (tinymce.isIE) 
     6                        ed.selection.moveToBookmark(tinymce.EditorManager.activeEditor.windowManager.bookmark); 
    47 
    5         tinyMCE = win.tinyMCE; 
    6         if ( typeof tinyMCE != 'undefined' && ( ed = tinyMCE.getInstanceById('content') ) && !ed.isHidden() ) { 
    7                 tinyMCE.selectedInstance.getWin().focus(); 
    8                 tinyMCE.execCommand('mceInsertContent', false, h); 
     8                ed.execCommand('mceInsertContent', false, h); 
    99        } else 
    10                 win.edInsertContent(win.edCanvas, h); 
     10                edInsertContent(edCanvas, h); 
     11 
     12        tb_remove(); 
    1113} 
    1214 
     
    2325                        $('#TB_iframeContent').width( W - 50 ).height( H - 75 ); 
    2426                        tbWindow.css({'margin-left': '-' + parseInt((( W - 50 ) / 2),10) + 'px'}); 
    25                         if ( ! ( $.browser.msie && $.browser.version.substr(0,1) < 7 )
     27                        if ( typeof document.body.style.maxWidth != 'undefined'
    2628                                tbWindow.css({'top':'20px','margin-top':'0'}); 
    2729                        $('#TB_title').css({'background-color':'#222','color':'#cfcfcf'}); 
     
    3638                }); 
    3739        }; 
     40         
     41        jQuery('a.thickbox').click(function(){ 
     42                if ( typeof tinyMCE != 'undefined' &&  tinyMCE.activeEditor ) { 
     43                        tinyMCE.get('content').focus(); 
     44                        tinyMCE.activeEditor.windowManager.bookmark = tinyMCE.activeEditor.selection.getBookmark('simple'); 
     45                } 
     46        }); 
    3847 
    3948        $(window).resize( function() { tb_position() } ); 
  • trunk/wp-admin/js/theme-preview.js

    r1328 r1342  
    1313                        $('#TB_iframeContent').width( W - 90 ).height( H - 90 ); 
    1414                        tbWindow.css({'margin-left': '-' + parseInt((( W - 90 ) / 2),10) + 'px'}); 
    15                         if ( ! ( $.browser.msie && $.browser.version.substr(0,1) < 7 )
     15                        if ( typeof document.body.style.maxWidth != 'undefined'
    1616                                tbWindow.css({'top':'30px','margin-top':'0'}); 
    1717                };