diff --git a/wp-admin/menu.txt b/wp-admin/menu.txt index 00f4e46bae..533a0f2f29 100644 --- a/wp-admin/menu.txt +++ b/wp-admin/menu.txt @@ -3,7 +3,7 @@ 3 categories.php Categories 5 link-manager.php Links 3 users.php Users -4 options-general.php Options +6 options-general.php Options 8 plugins.php Plugins 4 templates.php Templates 5 upload.php Upload diff --git a/wp-admin/options-discussion.php b/wp-admin/options-discussion.php index f60ad87e6e..ce9a0c911e 100644 --- a/wp-admin/options-discussion.php +++ b/wp-admin/options-discussion.php @@ -34,36 +34,11 @@ for ($i=0; $i - -
+

Discussion Options

diff --git a/wp-admin/options-general.php b/wp-admin/options-general.php index 7979d0203e..af3c10a48a 100644 --- a/wp-admin/options-general.php +++ b/wp-admin/options-general.php @@ -34,36 +34,12 @@ for ($i=0; $i - -
+

General Options

diff --git a/wp-admin/options-head.php b/wp-admin/options-head.php new file mode 100644 index 0000000000..a428bfda50 --- /dev/null +++ b/wp-admin/options-head.php @@ -0,0 +1,49 @@ +get_results("SELECT group_id, group_name, group_desc, group_longdesc FROM $tableoptiongroups ORDER BY group_id"); +foreach ($option_groups as $option_group) { + if ($option_group->group_id == $option_group_id) { + $current_desc = $option_group->group_desc; + $current_long_desc = $option_group->group_longdesc; + $groups .= "
  • {$option_group->group_name}
  • \n"; + } else { + $groups .= "
  • {$option_group->group_name}
  • \n"; + } +} + +$submenu = << +
  • General
  • +
  • Writing
  • +
  • Reading
  • +
  • Discussion
  • +
  • Miscellaneous
  • + $groups +
  • Permalinks
  • + +END; + +$sublines = split("\n", $submenu); +foreach ($sublines as $subline) { + preg_match('/href="([^"]+)"/', $subline, $url); + if (substr($_SERVER['REQUEST_URI'], -8) == substr($url[1], -8)) { + $subline = str_replace('a hr', 'a class="current" hr', $subline); + if ($_SERVER["REQUEST_URI"] == $url[1]) { + $subline = preg_replace('|href=".*?"|', '', $subline); + } + } + echo $subline."\n"; +} +?> + + +
    + + +

    Options saved.

    + \ No newline at end of file diff --git a/wp-admin/options-misc.php b/wp-admin/options-misc.php new file mode 100644 index 0000000000..ba89dfbbc1 --- /dev/null +++ b/wp-admin/options-misc.php @@ -0,0 +1,58 @@ + $v) { + if (is_array($v)) { + $array[$k] = add_magic_quotes($v); + } else { + $array[$k] = addslashes($v); + } + } + return $array; +} + +if (!get_magic_quotes_gpc()) { + $HTTP_GET_VARS = add_magic_quotes($HTTP_GET_VARS); + $HTTP_POST_VARS = add_magic_quotes($HTTP_POST_VARS); + $HTTP_COOKIE_VARS = add_magic_quotes($HTTP_COOKIE_VARS); +} + +$wpvarstoreset = array('action','standalone', 'option_group_id'); +for ($i=0; $i + +
    +

    Miscellaneous Options

    + + + +

    + +

    +

    + +

    + +
    + \ No newline at end of file diff --git a/wp-admin/options-permalink.php b/wp-admin/options-permalink.php index 8f008458b2..a29f678f2d 100644 --- a/wp-admin/options-permalink.php +++ b/wp-admin/options-permalink.php @@ -50,31 +50,11 @@ switch($action) { default: $standalone = 0; include_once('admin-header.php'); - if ($user_level <= 3) { + if ($user_level <= 6) { die("You have do not have sufficient permissions to edit the options for this blog."); } + include('options-head.php'); ?> - -

    Edit Permalink Structure

    WordPress offers you the ability to create a custom URI structure for your permalinks and archives. The following “tags” are available:

    @@ -130,4 +110,5 @@ echo "
    \n"; break; } -include("admin-footer.php") ?> +include("admin-footer.php") +?> \ No newline at end of file diff --git a/wp-admin/options-reading.php b/wp-admin/options-reading.php index 1f7fe07bef..490788d91e 100644 --- a/wp-admin/options-reading.php +++ b/wp-admin/options-reading.php @@ -1,5 +1,5 @@ $v) { @@ -34,36 +34,11 @@ for ($i=0; $i - -
    +

    Reading Options

    diff --git a/wp-admin/options-writing.php b/wp-admin/options-writing.php index bca114a3ec..358b2144a4 100644 --- a/wp-admin/options-writing.php +++ b/wp-admin/options-writing.php @@ -34,36 +34,13 @@ for ($i=0; $i - -
    +

    Writing Options

    @@ -72,7 +49,7 @@ if ($user_level <= 3) { -
    When starting a post, show:
    diff --git a/wp-admin/options.php b/wp-admin/options.php index f26e509ce4..18bd2f0418 100644 --- a/wp-admin/options.php +++ b/wp-admin/options.php @@ -107,13 +107,15 @@ $nonbools = array('default_ping_status', 'default_comment_status'); } $message .= $dB_errors . '
    ' . $validation_message; } - header('Location: ' . $_SERVER['HTTP_REFERER']); + + $goback = str_replace('?updated=true', '', $_SERVER['HTTP_REFERER']) . '?updated=true'; + header('Location: ' . $goback); break; default: $standalone = 0; include_once("./admin-header.php"); - if ($user_level <= 3) { + if ($user_level <= 6) { die("You have do not have sufficient permissions to edit the options for this blog."); } ?> @@ -142,29 +144,9 @@ if ($non_was_selected) { // no group pre-selected, display opening page -?> - -

    @@ -194,13 +176,9 @@ if ($non_was_selected) { // no group pre-selected, display opening page
    -

    No help for this group of options.

    -
    \ No newline at end of file +include('admin-footer.php'); +?> \ No newline at end of file diff --git a/wp-admin/upgrade-functions.php b/wp-admin/upgrade-functions.php index 5a7a71c529..c7f5c09c1a 100644 --- a/wp-admin/upgrade-functions.php +++ b/wp-admin/upgrade-functions.php @@ -781,8 +781,10 @@ function upgrade_110() { // Option for using the advanced edit screen by default if(!$wpdb->get_var("SELECT option_id FROM $tableoptions WHERE option_name = 'advanced_edit'")) { - $wpdb->query("INSERT INTO $tableoptions (option_name, option_type, option_value, option_admin_level) VALUES ('advanced_edit', 3, '0', 8)"); + $wpdb->query("INSERT INTO $tableoptions (option_name, option_type, option_value, option_admin_level) VALUES ('advanced_edit', 5, '0', 8)"); } + // Fix for CVS versions + $wpdb->query("UPDATE $tableoptions SET option_type = '5' WHERE option_name = 'advanced_edit'"); // Now an option for moderation words if(!$wpdb->get_var("SELECT option_id FROM $tableoptions WHERE option_name = 'moderation_keys'")) { diff --git a/wp-admin/wp-admin.css b/wp-admin/wp-admin.css index 88e104e19a..73dd8095a2 100644 --- a/wp-admin/wp-admin.css +++ b/wp-admin/wp-admin.css @@ -147,6 +147,13 @@ textarea, input, select { font: 12px Georgia, "Times New Roman", Times, serif; } +.updated { + background-color: #f0f8ff; + border: 1px solid #69c; + margin: 5px 5% 10px; + padding: 0 1em 0 1em; +} + .unapproved { color: #888; }