Make WordPress Core

Changeset 1515


Ignore:
Timestamp:
08/08/2004 05:01:13 AM (22 years ago)
Author:
rboren
Message:

Define add_magic_quotes() in user-edit.php. Bug 0000216.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/user-edit.php

    r1507 r1515  
    33
    44$title = __('Edit User');
     5
     6function add_magic_quotes($array) {
     7  foreach ($array as $k => $v) {
     8    if (is_array($v)) {
     9      $array[$k] = add_magic_quotes($v);
     10    } else {
     11      $array[$k] = addslashes($v);
     12    }
     13  }
     14  return $array;
     15}
     16
     17if (!get_magic_quotes_gpc()) {
     18    $_POST   = add_magic_quotes($_POST);
     19}
    520
    621$wpvarstoreset = array('action', 'standalone', 'redirect', 'profile', 'user_id');
     
    1833        }
    1934    }
    20 }
    21 
    22 if (!get_magic_quotes_gpc()) {
    23     $_POST   = add_magic_quotes($_POST);
    2435}
    2536
Note: See TracChangeset for help on using the changeset viewer.