From 84b26cfde914b9f559be2fca83a77adaf7dadec2 Mon Sep 17 00:00:00 2001 From: Matt Mullenweg Date: Thu, 26 Feb 2004 14:37:15 +0000 Subject: [PATCH] Option fixes. git-svn-id: https://develop.svn.wordpress.org/trunk@939 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/options-general.php | 3 ++- wp-admin/options-writing.php | 7 ++++--- wp-admin/options.php | 17 +++++++++++------ 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/wp-admin/options-general.php b/wp-admin/options-general.php index 428dc3049e..c9e1a0c0cb 100644 --- a/wp-admin/options-general.php +++ b/wp-admin/options-general.php @@ -66,6 +66,7 @@ if ($user_level <= 3) {

General Options

+ @@ -106,7 +107,7 @@ This address is used only for admin purposes. - + diff --git a/wp-admin/options-writing.php b/wp-admin/options-writing.php index d36bcbec36..85730faa8d 100644 --- a/wp-admin/options-writing.php +++ b/wp-admin/options-writing.php @@ -65,11 +65,12 @@ if ($user_level <= 3) {

Writing Options

- +
Weblog title:
Times in the weblog should differ by: Times in the weblog should differ by: hours
- - + + diff --git a/wp-admin/options.php b/wp-admin/options.php index 66f3cf90a9..a3436b7ac0 100644 --- a/wp-admin/options.php +++ b/wp-admin/options.php @@ -44,7 +44,7 @@ if ($option_group_id == '') { switch($action) { -case "update": +case 'update': $standalone = 1; include_once("./admin-header.php"); $any_changed = 0; @@ -53,19 +53,24 @@ case "update": // pull the vars from the post // validate ranges etc. // update the values - foreach ($_POST as $key => $value) { - $option_names[] = "'$key'"; + if (!$_POST['page_options']) { + foreach ($_POST as $key => $value) { + $option_names[] = "'$key'"; + } + $option_names = implode(',', $option_names); + } else { + $option_names = stripslashes($_POST['page_options']); } - $option_names = implode(',', $option_names); $options = $wpdb->get_results("SELECT $tableoptions.option_id, option_name, option_type, option_value, option_admin_level FROM $tableoptions WHERE option_name IN ($option_names)"); +// die(var_dump($options)); if ($options) { foreach ($options as $option) { // should we even bother checking? if ($user_level >= $option->option_admin_level) { - $this_name = $option->option_name; $old_val = stripslashes($option->option_value); - $new_val = $_POST[$this_name]; + $new_val = $_POST[$option->option_name]; + if (!$new_val) $new_val = 0; if ($new_val != $old_val) { // get type and validate
Size of the writing box, in lines: Size of the writing box: + lines
Character Setting: