Changeset 1342
- Timestamp:
- 06/30/08 11:17:02 (2 months ago)
- Files:
-
- trunk/wp-admin/admin-header.php (modified) (2 diffs)
- trunk/wp-admin/async-upload.php (modified) (1 diff)
- trunk/wp-admin/gears-manifest.php (modified) (3 diffs)
- trunk/wp-admin/includes/file.php (modified) (1 diff)
- trunk/wp-admin/includes/media.php (modified) (2 diffs)
- trunk/wp-admin/includes/schema.php (modified) (1 diff)
- trunk/wp-admin/includes/upgrade.php (modified) (2 diffs)
- trunk/wp-admin/includes/user.php (modified) (2 diffs)
- trunk/wp-admin/js/media-upload.js (modified) (3 diffs)
- trunk/wp-admin/js/theme-preview.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/wp-admin/admin-header.php
r1336 r1342 84 84 <div id="gears-msg1"> 85 85 <h3 class="info-box-title"><?php _e('Speed up WordPress'); ?></h3> 86 <p><?php _e('WordPress has support for Gears thatadds 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 /> 87 87 <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&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’ 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’t install on a public or shared computer.'); ?></strong></p> <div class="submit"><button onclick="window.location = 'http://gears.google.com/?action=install&return=<?php echo urlencode( admin_url() ); ?>';" class="button"><?php _e('Install Now'); ?></button> 91 90 <button class="button" style="margin-left:10px;" onclick="document.getElementById('gears-info-box').style.display='none';">Cancel</button></div> 92 91 </div> … … 112 111 <?php } ?> 113 112 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> 115 114 116 115 <?php trunk/wp-admin/async-upload.php
r1328 r1342 11 11 12 12 // 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']) ) 13 if ( is_ssl() && empty($_COOKIE[SECURE_AUTH_COOKIE]) && !empty($_REQUEST['auth_cookie']) ) 14 $_COOKIE[SECURE_AUTH_COOKIE] = $_REQUEST['auth_cookie']; 15 elseif ( empty($_COOKIE[AUTH_COOKIE]) && !empty($_REQUEST['auth_cookie']) ) 14 16 $_COOKIE[AUTH_COOKIE] = $_REQUEST['auth_cookie']; 15 17 unset($current_user); trunk/wp-admin/gears-manifest.php
r1336 r1342 16 16 function site_url() {} 17 17 function admin_url() {} 18 function wp_guess_url() {} 18 19 19 20 require(ABSPATH . '/wp-includes/script-loader.php'); … … 64 65 { 65 66 "betaManifestVersion" : 1, 66 "version" : "<?php echo $man_version; ?>_2008062 2",67 "version" : "<?php echo $man_version; ?>_20080625", 67 68 "entries" : [ 68 69 <?php echo $defaults; ?> … … 126 127 { "url" : "../wp-includes/js/tinymce/themes/advanced/js/source_editor.js?ver=3101" }, 127 128 { "url" : "../wp-includes/js/tinymce/themes/advanced/js/anchor.js?ver=3101" }, 128 { "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.js?ver=310 1" },129 { "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.js?ver=3102" }, 129 130 130 131 { "url" : "../wp-includes/js/tinymce/themes/advanced/source_editor.htm?ver=3101" }, trunk/wp-admin/includes/file.php
r1336 r1342 288 288 289 289 $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 291 295 // Move the file to the uploads dir 292 296 $new_file = $uploads['path'] . "/$filename"; trunk/wp-admin/includes/media.php
r1336 r1342 66 66 ?> 67 67 <script type="text/javascript"> 68 <!-- 69 top.send_to_editor('<?php echo addslashes($html); ?>');70 top.tb_remove();71 --> 68 /* <![CDATA[ */ 69 var win = window.dialogArguments || opener || parent || top; 70 win.send_to_editor('<?php echo addslashes($html); ?>'); 71 /* ]]> */ 72 72 </script> 73 73 <?php … … 851 851 post_params : { 852 852 "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]; ?>", 854 854 "_wpnonce" : "<?php echo wp_create_nonce('media-form'); ?>", 855 855 "type" : "<?php echo $type; ?>", trunk/wp-admin/includes/schema.php
r1336 r1342 230 230 global $wpdb, $wp_db_version, $current_site; 231 231 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(); 234 233 235 234 do_action('populate_options'); trunk/wp-admin/includes/upgrade.php
r1336 r1342 22 22 update_option('enable_xmlrpc',$remote); 23 23 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(); 30 25 31 26 update_option('siteurl', $guessurl); … … 890 885 global $wpdb; 891 886 892 // Sep erate individual queries into an array887 // Separate individual queries into an array 893 888 if( !is_array($queries) ) { 894 889 $queries = explode( ';', $queries ); trunk/wp-admin/includes/user.php
r1328 r1342 354 354 function do_paging() { 355 355 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 356 362 $this->paging_text = paginate_links( array( 357 363 'total' => ceil($this->total_users_for_query / $this->users_per_page), … … 359 365 'base' => 'users.php?%_%', 360 366 'format' => 'userspage=%#%', 361 'add_args' => array( 'usersearch' => urlencode($this->search_term) )367 'add_args' => $args 362 368 ) ); 363 369 } trunk/wp-admin/js/media-upload.js
r1328 r1342 1 1 // send html to the post editor 2 2 function 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); 4 7 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); 9 9 } else 10 win.edInsertContent(win.edCanvas, h); 10 edInsertContent(edCanvas, h); 11 12 tb_remove(); 11 13 } 12 14 … … 23 25 $('#TB_iframeContent').width( W - 50 ).height( H - 75 ); 24 26 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' ) 26 28 tbWindow.css({'top':'20px','margin-top':'0'}); 27 29 $('#TB_title').css({'background-color':'#222','color':'#cfcfcf'}); … … 36 38 }); 37 39 }; 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 }); 38 47 39 48 $(window).resize( function() { tb_position() } ); trunk/wp-admin/js/theme-preview.js
r1328 r1342 13 13 $('#TB_iframeContent').width( W - 90 ).height( H - 90 ); 14 14 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' ) 16 16 tbWindow.css({'top':'30px','margin-top':'0'}); 17 17 };
