From d510632e9f07cec9ac3de3b5dafc56bd58c81b8a Mon Sep 17 00:00:00 2001 From: donncha Date: Tue, 7 Nov 2006 12:37:04 +0000 Subject: WP Merge git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@804 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- wp-admin/options.php | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) (limited to 'wp-admin/options.php') diff --git a/wp-admin/options.php b/wp-admin/options.php index 33f5acd..ceb4830 100644 --- a/wp-admin/options.php +++ b/wp-admin/options.php @@ -11,9 +11,10 @@ if ( !current_user_can('manage_options') ) wp_die(__('Cheatin’ uh?')); if( $_GET[ 'adminhash' ] ) { - $new_admin_details = get_option( 'new_admin_email' ); + $new_admin_details = get_option( 'adminhash' ); if( is_array( $new_admin_details ) && $new_admin_details[ 'hash' ] == $_GET[ 'adminhash' ] && $new_admin_details[ 'newemail' ] != '' ) { update_option( "admin_email", $new_admin_details[ 'newemail' ] ); + delete_option( "adminhash" ); delete_option( "new_admin_email" ); } wp_redirect( get_option( "siteurl" ) . "/wp-admin/options-general.php?updated=true" ); @@ -24,6 +25,7 @@ function sanitize_option($option, $value) { // Remember to call stripslashes! switch ($option) { case 'admin_email': + case 'new_admin_email': $value = stripslashes($value); $value = sanitize_email($value); break; @@ -137,23 +139,32 @@ if (!is_site_admin()) get_results("SELECT * FROM $wpdb->options ORDER BY option_name"); -foreach ( (array) $options as $option ) - $options_to_update[] = $option->option_name; -$options_to_update = implode(',', $options_to_update); -?> - - -option_value, 'single'); + $disabled = ''; + if ( is_serialized($option->option_value) ) { + if ( is_serialized_string($option->option_value) ) { + // this is a serialized string, so we should display it + $value = wp_specialchars(maybe_unserialize($option->option_value), 'single'); + $options_to_update[] = $option->option_name; + $class = 'all-options'; + } else { + $value = 'SERIALIZED DATA'; + $disabled = ' disabled="disabled"'; + $class = 'all-options disabled'; + } + } else { + $value = wp_specialchars($option->option_value, 'single'); + $options_to_update[] = $option->option_name; + $class = 'all-options'; + } echo " @@ -161,7 +172,8 @@ foreach ( (array) $options as $option) : endforeach; ?>
"; - if (stristr($value, "\n")) echo ""; - else echo ""; + if (stristr($value, "\n")) echo ""; + else echo ""; echo " $option->option_description
-

+ +

-- cgit