]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-settings.php
Wordpress 2.0.11
[autoinstalls/wordpress.git] / wp-settings.php
index 312c52e18d1d0ca695362e54696d8495f0a39492..a76988c3e4d11ec0bab224e5fb8ea9cfe982cb4d 100644 (file)
@@ -12,13 +12,14 @@ 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(); 
 
-$HTTP_USER_AGENT = getenv('HTTP_USER_AGENT');
 unset( $wp_filter, $cache_userdata, $cache_lastcommentmodified, $cache_lastpostdate, $cache_settings, $category_cache, $cache_categories );
 
 if ( ! isset($blog_id) )
@@ -198,9 +199,12 @@ $_POST   = add_magic_quotes($_POST  );
 $_COOKIE = add_magic_quotes($_COOKIE);
 $_SERVER = add_magic_quotes($_SERVER);
 
-$wp_query   = new WP_Query();
-$wp_rewrite = new WP_Rewrite();
-$wp         = new WP();
+do_action('sanitize_comment_cookies');
+
+$wp_the_query =& new WP_Query();
+$wp_query     =& $wp_the_query;
+$wp_rewrite   =& new WP_Rewrite();
+$wp           =& new WP();
 
 define('TEMPLATEPATH', get_template_directory());
 
@@ -223,4 +227,4 @@ register_shutdown_function('shutdown_action_hook');
 // Everything is loaded and initialized.
 do_action('init');
 
-?>
\ No newline at end of file
+?>