X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/cc7b1505cd9fafd87c3672f669e13e98b0c544f7..022dfbbbe3215917d84708eb09acca93b21ae9e0:/wp-settings.php diff --git a/wp-settings.php b/wp-settings.php index f01ccb7e..a76988c3 100644 --- a/wp-settings.php +++ b/wp-settings.php @@ -12,8 +12,10 @@ function unregister_GLOBALS() { $input = array_merge($_GET, $_POST, $_COOKIE, $_SERVER, $_ENV, $_FILES, isset($_SESSION) && is_array($_SESSION) ? $_SESSION : array()); foreach ( $input as $k => $v ) - if ( !in_array($k, $noUnset) && isset($GLOBALS[$k]) ) + if ( !in_array($k, $noUnset) && isset($GLOBALS[$k]) ) { + $GLOBALS[$k] = NULL; unset($GLOBALS[$k]); + } } unregister_GLOBALS(); @@ -199,9 +201,10 @@ $_SERVER = add_magic_quotes($_SERVER); do_action('sanitize_comment_cookies'); -$wp_query = new WP_Query(); -$wp_rewrite = new WP_Rewrite(); -$wp = new WP(); +$wp_the_query =& new WP_Query(); +$wp_query =& $wp_the_query; +$wp_rewrite =& new WP_Rewrite(); +$wp =& new WP(); define('TEMPLATEPATH', get_template_directory()); @@ -224,4 +227,4 @@ register_shutdown_function('shutdown_action_hook'); // Everything is loaded and initialized. do_action('init'); -?> \ No newline at end of file +?>