Make WordPress Core


Ignore:
Timestamp:
10/18/2004 04:50:08 AM (20 years ago)
Author:
rboren
Message:

Do not stomp permalink setting. Bug 372.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/options-head.php

    r1596 r1810  
    11<?php
    22
    3 if ($user_level <= 6) {
    4     die( __('You have do not have sufficient permissions to edit the options for this blog.') );
     3$parent_file = 'options-general.php';
     4
     5function add_magic_quotes($array) {
     6    foreach ($array as $k => $v) {
     7        if (is_array($v)) {
     8            $array[$k] = add_magic_quotes($v);
     9        } else {
     10            $array[$k] = addslashes($v);
     11        }
     12    }
     13    return $array;
    514}
     15
     16if (!get_magic_quotes_gpc()) {
     17    $_GET    = add_magic_quotes($_GET);
     18    $_POST   = add_magic_quotes($_POST);
     19    $_COOKIE = add_magic_quotes($_COOKIE);
     20}
     21
     22$wpvarstoreset = array('action','standalone', 'option_group_id');
     23for ($i=0; $i<count($wpvarstoreset); $i += 1) {
     24    $wpvar = $wpvarstoreset[$i];
     25    if (!isset($$wpvar)) {
     26        if (empty($_POST["$wpvar"])) {
     27            if (empty($_GET["$wpvar"])) {
     28                $$wpvar = '';
     29            } else {
     30                $$wpvar = $_GET["$wpvar"];
     31            }
     32        } else {
     33            $$wpvar = $_POST["$wpvar"];
     34        }
     35    }
     36}
     37
     38$standalone = 0;
     39include_once('admin-header.php');
    640?>
    741
Note: See TracChangeset for help on using the changeset viewer.