Make WordPress Core


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

Do not stomp permalink setting. Bug 372.

File:
1 edited

Legend:

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

    r1599 r1810  
    33
    44$title = __('Reading Options');
    5 $parent_file = 'options-general.php';
    6 
    7 function add_magic_quotes($array) {
    8         foreach ($array as $k => $v) {
    9                 if (is_array($v)) {
    10                         $array[$k] = add_magic_quotes($v);
    11                 } else {
    12                         $array[$k] = addslashes($v);
    13                 }
    14         }
    15         return $array;
    16 }
    17 
    18 if (!get_magic_quotes_gpc()) {
    19         $_GET    = add_magic_quotes($_GET);
    20         $_POST   = add_magic_quotes($_POST);
    21         $_COOKIE = add_magic_quotes($_COOKIE);
    22 }
    23 
    24 $wpvarstoreset = array('action','standalone', 'option_group_id');
    25 for ($i=0; $i<count($wpvarstoreset); $i += 1) {
    26         $wpvar = $wpvarstoreset[$i];
    27         if (!isset($$wpvar)) {
    28                 if (empty($_POST["$wpvar"])) {
    29                         if (empty($_GET["$wpvar"])) {
    30                                 $$wpvar = '';
    31                         } else {
    32                                 $$wpvar = $_GET["$wpvar"];
    33                         }
    34                 } else {
    35                         $$wpvar = $_POST["$wpvar"];
    36                 }
    37         }
    38 }
    39 
    40 $standalone = 0;
    41 include_once('admin-header.php');
    425include('options-head.php');
    436?>
Note: See TracChangeset for help on using the changeset viewer.