diff options
| author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2006-01-10 13:17:40 +0000 |
|---|---|---|
| committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2006-01-10 13:17:40 +0000 |
| commit | 0cc51d943e5a8ffaa7bd7d8bf798f931ac794552 (patch) | |
| tree | e7b50b853bde70e193b22c0096a96f97503ff7f9 /wp-inst/wp-includes/functions.php | |
| parent | a50cf6f1689a7a4e509d379580e3bb15195992d8 (diff) | |
WP Merge.
Also fixes for kses that ate tags, and category js
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@497 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-inst/wp-includes/functions.php')
| -rw-r--r-- | wp-inst/wp-includes/functions.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/wp-inst/wp-includes/functions.php b/wp-inst/wp-includes/functions.php index fee474a..fc2e23d 100644 --- a/wp-inst/wp-includes/functions.php +++ b/wp-inst/wp-includes/functions.php @@ -301,7 +301,8 @@ function get_settings($setting) { if ( 'siteurl' == $setting || 'home' == $setting || 'category_base' == $setting ) $value = preg_replace('|/+$|', '', $value); - $value = stripslashes( $value ); + if (! unserialize($value) ) + $value = stripslashes( $value ); return apply_filters( 'option_' . $setting, maybe_unserialize($value) ); } @@ -360,12 +361,13 @@ function update_option($option_name, $newvalue) { // If the new and old values are the same, no need to update. $oldvalue = get_option($option_name); - if ( $newvalue == $oldvalue ) + if ( $newvalue == $oldvalue ) { return false; + } - if ( false === $oldvalue ) { - add_option($option_name, $newvalue); - return true; + if ( false === $oldvalue ) { + add_option($option_name, $newvalue); + return true; } if ( is_array($newvalue) || is_object($newvalue) ) |
