[wp-cvs] wordpress/wp-admin user-edit.php,1.1,1.2
Ryan Boren
rboren at users.sourceforge.net
Sun Aug 8 05:01:15 UTC 2004
Update of /cvsroot/cafelog/wordpress/wp-admin
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18982/wp-admin
Modified Files:
user-edit.php
Log Message:
Define add_magic_quotes() in user-edit.php. Bug 0000216.
Index: user-edit.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-admin/user-edit.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** user-edit.php 1 Aug 2004 09:13:50 -0000 1.1
--- user-edit.php 8 Aug 2004 05:01:13 -0000 1.2
***************
*** 4,7 ****
--- 4,22 ----
$title = __('Edit User');
+ function add_magic_quotes($array) {
+ foreach ($array as $k => $v) {
+ if (is_array($v)) {
+ $array[$k] = add_magic_quotes($v);
+ } else {
+ $array[$k] = addslashes($v);
+ }
+ }
+ return $array;
+ }
+
+ if (!get_magic_quotes_gpc()) {
+ $_POST = add_magic_quotes($_POST);
+ }
+
$wpvarstoreset = array('action', 'standalone', 'redirect', 'profile', 'user_id');
for ($i=0; $i<count($wpvarstoreset); $i += 1) {
***************
*** 20,27 ****
}
- if (!get_magic_quotes_gpc()) {
- $_POST = add_magic_quotes($_POST);
- }
-
switch ($action) {
case 'update':
--- 35,38 ----
More information about the cvs
mailing list