diff --git a/wp-admin/admin-header.php b/wp-admin/admin-header.php
index a65108ade0..d6ba54dd71 100644
--- a/wp-admin/admin-header.php
+++ b/wp-admin/admin-header.php
@@ -74,10 +74,7 @@ unset($hook_suffixes, $hook_suffix);
@@ -110,7 +107,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 ( ! $is_opera ) { ?> |
|;,]+/g, '_'); // gears beta doesn't allow certain chars in the store name
- name = 'wp_' + name.substring(0, 60); // max length of name is 64 chars
+ name = name.replace(/[\/\\:*"?<>|;,]+/g, '_'); // gears beta doesn't allow certain chars in the store name
+ name = 'wp_' + name.substring(0, 60); // max length of name is 64 chars
- return name;
- },
+ return name;
+ },
- message : function(show) {
+ 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');
if ( ! msg1 ) return;
@@ -61,23 +61,32 @@ wpGears = {
I : function(id) {
return document.getElementById(id);
}
-}
+};
-function gearsInit() {
+(function() {
if ( 'undefined' != typeof google && google.gears ) return;
var gf = false;
- if ( 'undefined' != typeof GearsFactory ) { // Firefox
+ if ( 'undefined' != typeof GearsFactory ) {
gf = new GearsFactory();
- } else { // IE
+ } else {
try {
gf = new ActiveXObject('Gears.Factory');
- } catch (e) {}
+ if ( factory.getBuildInfo().indexOf('ie_mobile') != -1 )
+ gf.privateSetGlobalObject(this);
+ } catch (e) {
+ if ( ( 'undefined' != typeof navigator.mimeTypes ) && navigator.mimeTypes['application/x-googlegears'] ) {
+ gf = document.createElement("object");
+ gf.style.display = "none";
+ gf.width = 0;
+ gf.height = 0;
+ gf.type = "application/x-googlegears";
+ document.documentElement.appendChild(gf);
+ }
+ }
}
if ( ! gf ) return;
if ( 'undefined' == typeof google ) google = {};
if ( ! google.gears ) google.gears = { factory : gf };
-}
-
-gearsInit();
+})();
diff --git a/wp-includes/script-loader.php b/wp-includes/script-loader.php
index 3e15ea3465..3778526020 100644
--- a/wp-includes/script-loader.php
+++ b/wp-includes/script-loader.php
@@ -194,7 +194,7 @@ function wp_default_scripts( &$scripts ) {
'count' => __('Word count: %d')
));
- $scripts->add( 'wp-gears', '/wp-admin/js/wp-gears.js', false, '20080511' );
+ $scripts->add( 'wp-gears', '/wp-admin/js/wp-gears.js', false, '20080721' );
$scripts->localize( 'wp-gears', 'wpGearsL10n', array(
'updateCompleted' => __('Update completed.'),
'error' => __('Error:')