summaryrefslogtreecommitdiffstats
path: root/wp-includes
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2007-02-01 21:27:11 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2007-02-01 21:27:11 +0000
commit56ebeff8a4a3c1c954ed56bfa2db8fbebd0f8593 (patch)
treee169955bf33e976121cf0fa8d61db2dcf8b45e35 /wp-includes
parent3e374fafd80d1bdddbb9bd2ed76ff34a11fa9c9a (diff)
downloadwordpress-mu-56ebeff8a4a3c1c954ed56bfa2db8fbebd0f8593.tar.gz
wordpress-mu-56ebeff8a4a3c1c954ed56bfa2db8fbebd0f8593.tar.xz
wordpress-mu-56ebeff8a4a3c1c954ed56bfa2db8fbebd0f8593.zip
Revert changes to options.
Let's aim for 1.1.1 next week git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@877 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-includes')
-rw-r--r--wp-includes/cache.php6
-rw-r--r--wp-includes/functions.php4
-rw-r--r--wp-includes/version.php2
3 files changed, 6 insertions, 6 deletions
diff --git a/wp-includes/cache.php b/wp-includes/cache.php
index 6b02ba3..daaeaeb 100644
--- a/wp-includes/cache.php
+++ b/wp-includes/cache.php
@@ -1,6 +1,7 @@
<?php
function wp_cache_add($key, $data, $flag = '', $expire = 0) {
global $wp_object_cache;
+ $data = unserialize(serialize($data));
return $wp_object_cache->add($key, $data, $flag, $expire);
}
@@ -37,12 +38,14 @@ function wp_cache_init() {
function wp_cache_replace($key, $data, $flag = '', $expire = 0) {
global $wp_object_cache;
+ $data = unserialize(serialize($data));
return $wp_object_cache->replace($key, $data, $flag, $expire);
}
function wp_cache_set($key, $data, $flag = '', $expire = 0) {
global $wp_object_cache;
+ $data = unserialize(serialize($data));
return $wp_object_cache->set($key, $data, $flag, $expire);
}
@@ -212,8 +215,6 @@ class WP_Object_Cache {
foreach ($dogs as $catt) {
$this->cache['category'][$catt->cat_ID] = $catt;
$this->cache[$this->key( $catt->cat_ID, 'category' )] = $catt;
- }
- }
} else
if ('options' == $group) {
$wpdb->hide_errors();
@@ -227,7 +228,6 @@ class WP_Object_Cache {
foreach ($options as $option) {
$this->cache['options'][$option->option_name] = $option->option_value;
- $this->cache[$this->key( $option->option_name, 'options' )] = $option->option_value;
}
}
}
diff --git a/wp-includes/functions.php b/wp-includes/functions.php
index de60099..c59062a 100644
--- a/wp-includes/functions.php
+++ b/wp-includes/functions.php
@@ -299,7 +299,7 @@ function update_option($option_name, $newvalue) {
$_newvalue = $newvalue;
$newvalue = maybe_serialize($newvalue);
- wp_cache_set($option_name, $newvalue, 'options');
+ wp_cache_delete($option_name, 'options');
$newvalue = $wpdb->escape($newvalue);
$option_name = $wpdb->escape($option_name);
@@ -321,7 +321,7 @@ function add_option($name, $value = '', $description = '', $autoload = 'yes') {
$value = maybe_serialize($value);
- wp_cache_set($name, $value, 'options');
+ wp_cache_delete($name, 'options');
$name = $wpdb->escape($name);
$value = $wpdb->escape($value);
diff --git a/wp-includes/version.php b/wp-includes/version.php
index f6ba1d5..1d485b5 100644
--- a/wp-includes/version.php
+++ b/wp-includes/version.php
@@ -2,7 +2,7 @@
// This holds the version number in a separate file so we can bump it without cluttering the SVN
-$wp_version = 'wordpress-mu-1.2'; // Let's just avoid confusion
+$wp_version = 'wordpress-mu-1.1.1'; // Let's just avoid confusion
$wp_db_version = 4772;
?>