summaryrefslogtreecommitdiffstats
path: root/wp-inst
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2005-08-15 10:05:38 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2005-08-15 10:05:38 +0000
commite6b38d5bb77bd7495b3513ebfd3679ee1dd79996 (patch)
treef972a1b867d13637f01586cb7e565ccf1654c2c5 /wp-inst
parent2cbe26f5a201c8b6090d2d5faf337a6bb3f14cf0 (diff)
downloadwordpress-mu-e6b38d5bb77bd7495b3513ebfd3679ee1dd79996.tar.gz
wordpress-mu-e6b38d5bb77bd7495b3513ebfd3679ee1dd79996.tar.xz
wordpress-mu-e6b38d5bb77bd7495b3513ebfd3679ee1dd79996.zip
WP changes.
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@187 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-inst')
-rw-r--r--wp-inst/wp-admin/install.php2
-rw-r--r--wp-inst/wp-admin/moderation.php4
-rw-r--r--wp-inst/wp-settings.php28
3 files changed, 20 insertions, 14 deletions
diff --git a/wp-inst/wp-admin/install.php b/wp-inst/wp-admin/install.php
index 19f2563..18195f8 100644
--- a/wp-inst/wp-admin/install.php
+++ b/wp-inst/wp-admin/install.php
@@ -144,7 +144,7 @@ $wpdb->query("UPDATE $wpdb->options SET option_value = '$admin_email' WHERE opti
// Now drop in some default links
$wpdb->query("INSERT INTO $wpdb->linkcategories (cat_id, cat_name) VALUES (1, '".$wpdb->escape(__('Blogroll'))."')");
-$wpdb->query("INSERT INTO $wpdb->links (link_url, link_name, link_category, link_rss) VALUES ('http://blog.carthik.net/index.php', 'Carthik', 1, 'http://blog.carthik.net/feed/');");
+$wpdb->query("INSERT INTO $wpdb->links (link_url, link_name, link_category, link_rss) VALUES ('http://blog.carthik.net/', 'Carthik', 1, 'http://blog.carthik.net/feed/');");
$wpdb->query("INSERT INTO $wpdb->links (link_url, link_name, link_category, link_rss) VALUES ('http://blogs.linux.ie/xeer/', 'Donncha', 1, 'http://blogs.linux.ie/xeer/feed/');");
$wpdb->query("INSERT INTO $wpdb->links (link_url, link_name, link_category, link_rss) VALUES ('http://zengun.org/weblog/', 'Michel', 1, 'http://zengun.org/weblog/feed/');");
$wpdb->query("INSERT INTO $wpdb->links (link_url, link_name, link_category, link_rss) VALUES ('http://boren.nu/', 'Ryan', 1, 'http://boren.nu/feed/');");
diff --git a/wp-inst/wp-admin/moderation.php b/wp-inst/wp-admin/moderation.php
index eb1949d..c9e1723 100644
--- a/wp-inst/wp-admin/moderation.php
+++ b/wp-inst/wp-admin/moderation.php
@@ -77,7 +77,7 @@ default:
require_once('admin-header.php');
if ( isset($_GET['deleted']) || isset($_GET['approved']) || isset($_GET['ignored']) ) {
- echo "<div class='updated'>\n<p>";
+ echo "<div id='moderated' class='updated'>\n<p>";
$approved = (int) $_GET['approved'];
$deleted = (int) $_GET['deleted'];
$ignored = (int) $_GET['ignored'];
@@ -216,4 +216,4 @@ break;
}
-include('admin-footer.php') ?> \ No newline at end of file
+include('admin-footer.php') ?>
diff --git a/wp-inst/wp-settings.php b/wp-inst/wp-settings.php
index 3c3537e..2f458cc 100644
--- a/wp-inst/wp-settings.php
+++ b/wp-inst/wp-settings.php
@@ -1,19 +1,25 @@
<?php
// Turn register globals off
-if ( ini_get('register_globals') ) {
- $superglobals = array($_SERVER, $_ENV, $_FILES, $_COOKIE, $_POST, $_GET);
- if ( isset($_SESSION) )
- array_unshift($superglobals, $_SESSION);
+function unregister_GLOBALS() {
+ if ( !ini_get('register_globals') )
+ return;
+
+ if ( isset($_REQUEST['GLOBALS']) )
+ die('GLOBALS overwrite attempt detected');
+
+ // Variables that shouldn't be unset
+ $noUnset = array('GLOBALS', '_GET', '_POST', '_COOKIE', '_REQUEST', '_SERVER', '_ENV', '_FILES', 'table_prefix');
- foreach ( $superglobals as $superglobal )
- foreach ( $superglobal as $global => $value )
- if ( 'table_prefix' != $global )
- unset( $GLOBALS[$global] );
+ $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]) )
+ unset($GLOBALS[$k]);
}
-$HTTP_HOST = getenv('HTTP_HOST'); /* domain name */
-$REMOTE_ADDR = getenv('REMOTE_ADDR'); /* visitor's IP */
-$HTTP_USER_AGENT = getenv('HTTP_USER_AGENT'); /* visitor's browser */
+unregister_GLOBALS();
+
+$HTTP_USER_AGENT = getenv('HTTP_USER_AGENT');
+unset( $wp_filter, $cache_userdata, $cache_lastcommentmodified, $cache_lastpostdate, $cache_settings, $category_cache, $cache_categories );
// Fix for IIS, which doesn't set REQUEST_URI
if ( empty( $_SERVER['REQUEST_URI'] ) ) {