mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 12:50:28 +00:00
Use wpdb->escape instead of addslashes to prepare DB bound data.
git-svn-id: https://develop.svn.wordpress.org/trunk@2699 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
+12
-5
@@ -136,13 +136,20 @@ load_default_textdomain();
|
||||
// Pull in locale data after loading text domain.
|
||||
require_once(ABSPATH . WPINC . '/locale.php');
|
||||
|
||||
if ( !get_magic_quotes_gpc() ) {
|
||||
$_GET = add_magic_quotes($_GET );
|
||||
$_POST = add_magic_quotes($_POST );
|
||||
$_COOKIE = add_magic_quotes($_COOKIE);
|
||||
$_SERVER = add_magic_quotes($_SERVER);
|
||||
// If already slashed, strip.
|
||||
if ( get_magic_quotes_gpc() ) {
|
||||
$_GET = stripslashes($_GET );
|
||||
$_POST = stripslashes($_POST );
|
||||
$_COOKIE = stripslashes($_COOKIE);
|
||||
$_SERVER = stripslashes($_SERVER);
|
||||
}
|
||||
|
||||
// Escape with wpdb.
|
||||
$_GET = add_magic_quotes($_GET );
|
||||
$_POST = add_magic_quotes($_POST );
|
||||
$_COOKIE = add_magic_quotes($_COOKIE);
|
||||
$_SERVER = add_magic_quotes($_SERVER);
|
||||
|
||||
function shutdown_action_hook() {
|
||||
do_action('shutdown');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user