diff --git a/wp-admin/admin-header.php b/wp-admin/admin-header.php index e1b3bafcd..0825d0203 100644 --- a/wp-admin/admin-header.php +++ b/wp-admin/admin-header.php @@ -100,14 +100,7 @@ if ( ! $is_opera ) { + + + diff --git a/wp-admin/gears-manifest.php b/wp-admin/gears-manifest.php index 7808051af..07e885b17 100644 --- a/wp-admin/gears-manifest.php +++ b/wp-admin/gears-manifest.php @@ -208,7 +208,6 @@ header( 'Content-Type: application/x-javascript; charset=UTF-8' ); { "url" : "../wp-includes/js/tinymce/plugins/fullscreen/fullscreen.htm?ver=311b" }, { "url" : "../wp-includes/js/tinymce/plugins/inlinepopups/template.htm?ver=311b" }, { "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/editimage.html?ver=311f" }, -{ "url" : "../wp-includes/js/tinymce/wp-mce-help.php?ver=311b" }, { "url" : "../wp-includes/js/tinymce/themes/advanced/skins/wp_theme/ui.css?ver=311b" }, { "url" : "../wp-includes/js/tinymce/themes/advanced/skins/wp_theme/content.css?ver=311b" }, @@ -276,6 +275,5 @@ header( 'Content-Type: application/x-javascript; charset=UTF-8' ); { "url" : "../wp-includes/images/crystal/spreadsheet.png" }, { "url" : "../wp-includes/images/rss.png" }, { "url" : "../wp-includes/js/thickbox/loadingAnimation.gif" }, -{ "url" : "../wp-includes/js/thickbox/tb-close.png" }, -{ "url" : "../wp-includes/js/swfupload/swfupload_f9.swf" } +{ "url" : "../wp-includes/js/thickbox/tb-close.png" } ]} diff --git a/wp-admin/js/wp-gears.js b/wp-admin/js/wp-gears.js index 34954ecc1..54589ab24 100644 --- a/wp-admin/js/wp-gears.js +++ b/wp-admin/js/wp-gears.js @@ -10,17 +10,20 @@ wpGears = { store = localServer.createManagedStore(this.storeName()); store.manifestUrl = "gears-manifest.php"; store.checkForUpdate(); - this.message(); + this.message(3); }, getPermission : function() { + var perm = true; + if ( 'undefined' != typeof google && google.gears ) { if ( ! google.gears.factory.hasPermission ) - google.gears.factory.getPermission( 'WordPress', 'images/logo.gif' ); + perm = google.gears.factory.getPermission( 'WordPress', 'images/logo.gif' ); - try { - this.createStore(); - } catch(e) {} // silence if canceled + if ( perm ) + try { this.createStore(); } catch(e) { this.message(); } // silence if canceled + else + this.message(4); } }, @@ -34,13 +37,16 @@ wpGears = { }, message : function(show) { - var t = this, msg1 = t.I('gears-msg1'), msg2 = t.I('gears-msg2'), msg3 = t.I('gears-msg3'), num = t.I('gears-upd-number'), wait = t.I('gears-wait'); + var t = this, msg1 = t.I('gears-msg1'), msg2 = t.I('gears-msg2'), msg3 = t.I('gears-msg3'), msg4 = t.I('gears-msg4'), num = t.I('gears-upd-number'), wait = t.I('gears-wait'); if ( ! msg1 ) return; if ( 'undefined' != typeof google && google.gears ) { - if ( google.gears.factory.hasPermission ) { - msg1.style.display = msg2.style.display = 'none'; + if ( show && show == 4 ) { + msg1.style.display = msg2.style.display = msg3.style.display = 'none'; + msg4.style.display = 'block'; + } else if ( google.gears.factory.hasPermission ) { + msg1.style.display = msg2.style.display = msg4.style.display = 'none'; msg3.style.display = 'block'; if ( 'undefined' == typeof store ) @@ -50,12 +56,13 @@ wpGears = { store.onerror = function(){wait.innerHTML = (' ' + wpGearsL10n.error + ' ' + store.lastErrorMessage);}; store.onprogress = function(e){if(num) num.innerHTML = (' ' + e.filesComplete + ' / ' + e.filesTotal);}; } else { - msg1.style.display = msg3.style.display = 'none'; + msg1.style.display = msg3.style.display = msg4.style.display = 'none'; msg2.style.display = 'block'; } } if ( show ) t.I('gears-info-box').style.display = 'block'; + else t.I('gears-info-box').style.display = 'none'; }, I : function(id) { diff --git a/wp-includes/script-loader.php b/wp-includes/script-loader.php index e6db78abd..1994a2442 100644 --- a/wp-includes/script-loader.php +++ b/wp-includes/script-loader.php @@ -234,7 +234,7 @@ function wp_default_scripts( &$scripts ) { 'count' => __('Word count: %d') )); - $scripts->add( 'wp-gears', '/wp-admin/js/wp-gears.js', false, '20080721' ); + $scripts->add( 'wp-gears', '/wp-admin/js/wp-gears.js', false, '20080905' ); $scripts->localize( 'wp-gears', 'wpGearsL10n', array( 'updateCompleted' => __('Update completed.'), 'error' => __('Error:') diff --git a/wp-includes/vars.php b/wp-includes/vars.php index a29ea2f4c..4fb6a8357 100644 --- a/wp-includes/vars.php +++ b/wp-includes/vars.php @@ -38,6 +38,8 @@ $is_lynx = $is_gecko = $is_winIE = $is_macIE = $is_opera = $is_NS4 = $is_safari if (strpos($_SERVER['HTTP_USER_AGENT'], 'Lynx') !== false) { $is_lynx = true; +} elseif ( strpos(strtolower($_SERVER['HTTP_USER_AGENT']), 'chrome') !== false ) { + $is_chrome = true; } elseif ( strpos(strtolower($_SERVER['HTTP_USER_AGENT']), 'webkit') !== false ) { $is_safari = true; } elseif (strpos($_SERVER['HTTP_USER_AGENT'], 'Gecko') !== false) {