user_level;
@@ -130,7 +130,7 @@ case 'delete':
$standalone = 1;
require_once('admin-header.php');
- $id = intval($HTTP_GET_VARS['id']);
+ $id = intval($_GET['id']);
if (!$id) {
header('Location: users.php');
diff --git a/wp-blog-header.php b/wp-blog-header.php
index 8b4e237304..13667db4ee 100644
--- a/wp-blog-header.php
+++ b/wp-blog-header.php
@@ -1,7 +1,5 @@
get_results("SELECT * FROM $tablecomments WHERE comment_post_ID = $id AND comment_approved = '1' ORDER BY comment_date");
$commentstatus = $wpdb->get_row("SELECT comment_status, post_password FROM $tableposts WHERE ID = $id");
-if (!empty($commentstatus->post_password) && $HTTP_COOKIE_VARS['wp-postpass_'.$cookiehash] != $commentstatus->post_password) { // and it doesn't match the cookie
+if (!empty($commentstatus->post_password) && $_COOKIE['wp-postpass_'.$cookiehash] != $commentstatus->post_password) { // and it doesn't match the cookie
echo(get_the_password_form());
} else { ?>
diff --git a/wp-comments-post.php b/wp-comments-post.php
index 4c48233c3b..251beed11f 100644
--- a/wp-comments-post.php
+++ b/wp-comments-post.php
@@ -13,26 +13,26 @@ function add_magic_quotes($array) {
}
if (!get_magic_quotes_gpc()) {
- $HTTP_GET_VARS = add_magic_quotes($HTTP_GET_VARS);
- $HTTP_POST_VARS = add_magic_quotes($HTTP_POST_VARS);
- $HTTP_COOKIE_VARS = add_magic_quotes($HTTP_COOKIE_VARS);
+ $_GET = add_magic_quotes($_GET);
+ $_POST = add_magic_quotes($_POST);
+ $_COOKIE = add_magic_quotes($_COOKIE);
}
-$author = trim(strip_tags($HTTP_POST_VARS['author']));
+$author = trim(strip_tags($_POST['author']));
-$email = trim(strip_tags($HTTP_POST_VARS['email']));
+$email = trim(strip_tags($_POST['email']));
if (strlen($email) < 6)
$email = '';
-$url = trim(strip_tags($HTTP_POST_VARS['url']));
+$url = trim(strip_tags($_POST['url']));
$url = ((!stristr($url, '://')) && ($url != '')) ? 'http://'.$url : $url;
if (strlen($url) < 7)
$url = '';
-$comment = trim($HTTP_POST_VARS['comment']);
+$comment = trim($_POST['comment']);
$original_comment = $comment;
-$comment_post_ID = intval($HTTP_POST_VARS['comment_post_ID']);
-$user_ip = $HTTP_SERVER_VARS['REMOTE_ADDR'];
+$comment_post_ID = intval($_POST['comment_post_ID']);
+$user_ip = $_SERVER['REMOTE_ADDR'];
$user_domain = gethostbyaddr($user_ip);
$commentstatus = $wpdb->get_var("SELECT comment_status FROM $tableposts WHERE ID = $comment_post_ID");
@@ -116,7 +116,7 @@ if ($ok) { // if there was no comment from this IP in the last 10 seconds
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-cache, must-revalidate');
header('Pragma: no-cache');
- $location = (empty($HTTP_POST_VARS['redirect_to'])) ? $HTTP_SERVER_VARS["HTTP_REFERER"] : $HTTP_POST_VARS['redirect_to'];
+ $location = (empty($_POST['redirect_to'])) ? $_SERVER["HTTP_REFERER"] : $_POST['redirect_to'];
if ($is_IIS) {
header("Refresh: 0;url=$location");
} else {
diff --git a/wp-comments-reply.php b/wp-comments-reply.php
index 6dd8297f40..b86031fcbf 100644
--- a/wp-comments-reply.php
+++ b/wp-comments-reply.php
@@ -25,15 +25,15 @@ require ('wp-blog-header.php');
if (($withcomments) or ($single)) {
if (!empty($post->post_password)) { // if there's a password
- if ($HTTP_COOKIE_VARS['wp-postpass_'.$cookiehash] != $post->post_password) { // and it doesn't match the cookie
+ if ($_COOKIE['wp-postpass_'.$cookiehash] != $post->post_password) { // and it doesn't match the cookie
echo("Enter your password to view comments.
");
return;
}
}
- $comment_author = (isset($HTTP_COOKIE_VARS['comment_author_'.$cookiehash])) ? trim($HTTP_COOKIE_VARS['comment_author_'.$cookiehash]) : '';
- $comment_author_email = (isset($HTTP_COOKIE_VARS['comment_author_email_'.$cookiehash])) ? trim($HTTP_COOKIE_VARS['comment_author_email_'.$cookiehash]) : '';
- $comment_author_url = (isset($HTTP_COOKIE_VARS['comment_author_url_'.$cookiehash])) ? trim($HTTP_COOKIE_VARS['comment_author_url_'.$cookiehash]) : '';
+ $comment_author = (isset($_COOKIE['comment_author_'.$cookiehash])) ? trim($_COOKIE['comment_author_'.$cookiehash]) : '';
+ $comment_author_email = (isset($_COOKIE['comment_author_email_'.$cookiehash])) ? trim($_COOKIE['comment_author_email_'.$cookiehash]) : '';
+ $comment_author_url = (isset($_COOKIE['comment_author_url_'.$cookiehash])) ? trim($_COOKIE['comment_author_url_'.$cookiehash]) : '';
$comments = $wpdb->get_results("SELECT * FROM $tablecomments WHERE comment_post_ID = '$id' AND comment_approved = '1' AND comment_ID = '$comment_reply_ID' ORDER BY comment_date");
?>
diff --git a/wp-comments.php b/wp-comments.php
index 717e16b034..3c273f542f 100644
--- a/wp-comments.php
+++ b/wp-comments.php
@@ -1,10 +1,10 @@
post_password)) { // if there's a password
- if ($HTTP_COOKIE_VARS['wp-postpass_'.$cookiehash] != $post->post_password) { // and it doesn't match the cookie
+ if ($_COOKIE['wp-postpass_'.$cookiehash] != $post->post_password) { // and it doesn't match the cookie
?>
get_results("SELECT * FROM $tablecomments WHERE comment_post_ID = '$id' AND comment_approved = '1' ORDER BY comment_date");
?>
diff --git a/wp-commentsrss2.php b/wp-commentsrss2.php
index 1ae2350f87..fddb7468da 100644
--- a/wp-commentsrss2.php
+++ b/wp-commentsrss2.php
@@ -51,7 +51,7 @@ foreach ($posts as $post) { start_wp();
comment_post_ID; ?>@
post_password) && $HTTP_COOKIE_VARS['wp-postpass'] != $comment->post_password) {
+ if (!empty($comment->post_password) && $_COOKIE['wp-postpass'] != $comment->post_password) {
?>
Protected Comments: Please enter your password to view comments.
]]>
diff --git a/wp-content/plugins/hello.php b/wp-content/plugins/hello.php
index 68332f7d6c..b9002fa1b4 100644
--- a/wp-content/plugins/hello.php
+++ b/wp-content/plugins/hello.php
@@ -2,9 +2,9 @@
/*
Plugin Name: Hello Dolly
Plugin URI: http://wordpress.org/#
-Description: This is not just a plugin, it symbolizes the hope and enthusiasm of an entire generation summed up in two words sung most famously by Louis Armstrong. Hello, Dolly. This is, by the way, the world's first official WordPress plugin. Wish it did something useful.
+Description: This is not just a plugin, it symbolizes the hope and enthusiasm of an entire generation summed up in two words sung most famously by Louis Armstrong. Hello, Dolly. This is, by the way, the world's first official WordPress plugin. When enabled you will randomly see a lyric from Hello, Dolly in the upper right of your admin screen.
Author: Matt Mullenweg
-Author URI: http://photomatt.net
+Author URI: http://photomatt.net/
*/
function hello_dolly() {
diff --git a/wp-includes/functions.php b/wp-includes/functions.php
index 275df0949e..fd4b6ca38b 100644
--- a/wp-includes/functions.php
+++ b/wp-includes/functions.php
@@ -98,11 +98,11 @@ function get_weekstartend($mysqlstring, $start_of_week) {
}
function get_lastpostdate($timezone = 'server') {
- global $tableposts, $cache_lastpostdate, $use_cache, $pagenow, $wpdb;
+ global $tableposts, $cache_lastpostdate, $pagenow, $wpdb;
$add_seconds_blog = get_settings('gmt_offset') * 3600;
$add_seconds_server = date('Z');
$now = current_time('mysql', 1);
- if ((!isset($cache_lastpostdate[$timezone])) OR (!$use_cache)) {
+ if ( !isset($cache_lastpostdate[$timezone]) ) {
switch(strtolower($timezone)) {
case 'gmt':
$lastpostdate = $wpdb->get_var("SELECT post_date_gmt FROM $tableposts WHERE post_date_gmt <= '$now' AND post_status = 'publish' ORDER BY post_date_gmt DESC LIMIT 1");
@@ -122,11 +122,11 @@ function get_lastpostdate($timezone = 'server') {
}
function get_lastpostmodified($timezone = 'server') {
- global $tableposts, $cache_lastpostmodified, $use_cache, $pagenow, $wpdb;
+ global $tableposts, $cache_lastpostmodified, $pagenow, $wpdb;
$add_seconds_blog = get_settings('gmt_offset') * 3600;
$add_seconds_server = date('Z');
$now = current_time('mysql', 1);
- if ((!isset($cache_lastpostmodified[$timezone])) OR (!$use_cache)) {
+ if ( !isset($cache_lastpostmodified[$timezone]) ) {
switch(strtolower($timezone)) {
case 'gmt':
$lastpostmodified = $wpdb->get_var("SELECT post_modified_gmt FROM $tableposts WHERE post_modified_gmt <= '$now' AND post_status = 'publish' ORDER BY post_modified_gmt DESC LIMIT 1");
@@ -150,8 +150,8 @@ function get_lastpostmodified($timezone = 'server') {
}
function user_pass_ok($user_login,$user_pass) {
- global $cache_userdata,$use_cache;
- if ((empty($cache_userdata[$user_login])) OR (!$use_cache)) {
+ global $cache_userdata;
+ if ( empty($cache_userdata[$user_login]) ) {
$userdata = get_userdatabylogin($user_login);
} else {
$userdata = $cache_userdata[$user_login];
@@ -173,8 +173,8 @@ function get_currentuserinfo() { // a bit like get_userdata(), on steroids
}
function get_userdata($userid) {
- global $wpdb, $cache_userdata, $use_cache, $tableusers;
- if ((empty($cache_userdata[$userid])) || (!$use_cache)) {
+ global $wpdb, $cache_userdata, $tableusers;
+ if ( empty($cache_userdata[$userid]) ) {
$user = $wpdb->get_row("SELECT * FROM $tableusers WHERE ID = '$userid'");
$user->user_nickname = stripslashes($user->user_nickname);
$user->user_firstname = stripslashes($user->user_firstname);
@@ -190,8 +190,8 @@ function get_userdata($userid) {
}
function get_userdatabylogin($user_login) {
- global $tableusers, $cache_userdata, $use_cache, $wpdb;
- if ((empty($cache_userdata["$user_login"])) OR (!$use_cache)) {
+ global $tableusers, $cache_userdata, $wpdb;
+ if ( empty($cache_userdata["$user_login"]) ) {
$user = $wpdb->get_row("SELECT * FROM $tableusers WHERE user_login = '$user_login'");
$cache_userdata["$user_login"] = $user;
} else {
@@ -201,8 +201,8 @@ function get_userdatabylogin($user_login) {
}
function get_userid($user_login) {
- global $tableusers, $cache_userdata, $use_cache, $wpdb;
- if ((empty($cache_userdata["$user_login"])) OR (!$use_cache)) {
+ global $tableusers, $cache_userdata, $wpdb;
+ if ( empty($cache_userdata["$user_login"]) ) {
$user_id = $wpdb->get_var("SELECT ID FROM $tableusers WHERE user_login = '$user_login'");
$cache_userdata["$user_login"] = $user_id;
@@ -293,7 +293,7 @@ function url_to_postid($url = '') {
/* Options functions */
function get_settings($setting) {
- global $wpdb, $cache_settings, $use_cache;
+ global $wpdb, $cache_settings;
if (strstr($_SERVER['REQUEST_URI'], 'install.php')) {
return false;
}
@@ -301,7 +301,7 @@ function get_settings($setting) {
// until we switch to using 'gmt_offset' everywhere
$setting = str_replace('time_difference', 'gmt_offset', $setting);
- if ((empty($cache_settings)) OR (!$use_cache)) {
+ if ( (empty($cache_settings)) ) {
$settings = get_alloptions();
$cache_settings = $settings;
} else {
@@ -347,8 +347,7 @@ function add_option($name, $value='') {
$value = $wpdb->escape($value);
$wpdb->query("INSERT INTO $tableoptions (option_name, option_value) VALUES ('$name', '$value')");
- global $use_cache;
- if($wpdb->insert_id && $use_cache) {
+ if($wpdb->insert_id) {
global $cache_settings;
$cache_settings->{$name} = $value;
}
@@ -412,8 +411,8 @@ function get_commentdata($comment_ID,$no_cache=0,$include_unapproved=false) { //
}
function get_catname($cat_ID) {
- global $tablecategories,$cache_catnames,$use_cache, $wpdb;
- if ((!$cache_catnames) || (!$use_cache)) {
+ global $tablecategories, $cache_catnames, $wpdb;
+ if ( !$cache_catnames) ) {
$results = $wpdb->get_results("SELECT * FROM $tablecategories") or die('Oops, couldn\'t query the db for categories.');
foreach ($results as $post) {
$cache_catnames[$post->cat_ID] = $post->cat_name;
@@ -474,7 +473,7 @@ function gzip_compression() {
ob_start("ob_gzhandler");
}
} else if($phpver > "4.0") {
- if(strstr($HTTP_SERVER_VARS['HTTP_ACCEPT_ENCODING'], 'gzip')) {
+ if(strstr($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) {
if(extension_loaded("zlib")) {
$do_gzip_compress = TRUE;
ob_start();
@@ -1002,7 +1001,7 @@ function wp_notify_postauthor($comment_id, $comment_type='comment') {
$notify_message .= get_permalink($comment->comment_post_ID) . '#comments';
if ('' == $comment->comment_author_email || '' == $comment->comment_author) {
- $from = "From: \"$blogname\" ';
+ $from = "From: \"$blogname\" ';
} else {
$from = 'From: "' . stripslashes($comment->comment_author) . "\" <$comment->comment_author_email>";
}
@@ -1061,19 +1060,18 @@ function start_wp() {
global $post, $id, $postdata, $authordata, $day, $preview, $page, $pages, $multipage, $more, $numpages;
global $preview_userid,$preview_date,$preview_content,$preview_title,$preview_category,$preview_notify,$preview_make_clickable,$preview_autobr;
global $pagenow;
- global $HTTP_GET_VARS;
if (!$preview) {
$id = $post->ID;
} else {
$id = 0;
$postdata = array (
'ID' => 0,
- 'Author_ID' => $HTTP_GET_VARS['preview_userid'],
- 'Date' => $HTTP_GET_VARS['preview_date'],
- 'Content' => $HTTP_GET_VARS['preview_content'],
- 'Excerpt' => $HTTP_GET_VARS['preview_excerpt'],
- 'Title' => $HTTP_GET_VARS['preview_title'],
- 'Category' => $HTTP_GET_VARS['preview_category'],
+ 'Author_ID' => $_GET['preview_userid'],
+ 'Date' => $_GET['preview_date'],
+ 'Content' => $_GET['preview_content'],
+ 'Excerpt' => $_GET['preview_excerpt'],
+ 'Title' => $_GET['preview_title'],
+ 'Category' => $_GET['preview_category'],
'Notify' => 1
);
}
diff --git a/wp-includes/template-functions-category.php b/wp-includes/template-functions-category.php
index 2edaf0563d..fedc2e3afc 100644
--- a/wp-includes/template-functions-category.php
+++ b/wp-includes/template-functions-category.php
@@ -112,8 +112,8 @@ function the_category_rss($type = 'rss') {
}
function get_the_category_by_ID($cat_ID) {
- global $tablecategories, $cache_categories, $use_cache, $wpdb;
- if ((!$cache_categories[$cat_ID]) OR (!$use_cache)) {
+ global $tablecategories, $cache_categories, $wpdb;
+ if ( !$cache_categories[$cat_ID]) ) {
$cat_name = $wpdb->get_var("SELECT cat_name FROM $tablecategories WHERE cat_ID = '$cat_ID'");
$cache_categories[$cat_ID]->cat_name = $cat_name;
} else {
diff --git a/wp-includes/template-functions-comment.php b/wp-includes/template-functions-comment.php
index 1c3ffd08cf..8a3db247f7 100644
--- a/wp-includes/template-functions-comment.php
+++ b/wp-includes/template-functions-comment.php
@@ -59,7 +59,7 @@ function comments_popup_script($width=400, $height=400, $file='wp-comments-popup
}
function comments_popup_link($zero='No Comments', $one='1 Comment', $more='% Comments', $CSSclass='', $none='Comments Off') {
- global $id, $wpcommentspopupfile, $wpcommentsjavascript, $post, $wpdb, $tablecomments, $HTTP_COOKIE_VARS, $cookiehash;
+ global $id, $wpcommentspopupfile, $wpcommentsjavascript, $post, $wpdb, $tablecomments, $cookiehash;
global $querystring_start, $querystring_equal, $querystring_separator;
global $comment_count_cache, $single;
if (!$single) {
@@ -73,7 +73,7 @@ function comments_popup_link($zero='No Comments', $one='1 Comment', $more='% Com
return;
} else {
if (!empty($post->post_password)) { // if there's a password
- if ($HTTP_COOKIE_VARS['wp-postpass_'.$cookiehash] != $post->post_password) { // and it doesn't match the cookie
+ if ($_COOKIE['wp-postpass_'.$cookiehash] != $post->post_password) { // and it doesn't match the cookie
echo('Enter your password to view comments');
return;
}
diff --git a/wp-includes/template-functions-general.php b/wp-includes/template-functions-general.php
index d6e6927721..146bb73bb1 100644
--- a/wp-includes/template-functions-general.php
+++ b/wp-includes/template-functions-general.php
@@ -308,7 +308,7 @@ function get_archives($type='', $limit='', $format='html', $before = "", $after
}
function get_calendar($daylength = 1) {
- global $wpdb, $HTTP_GET_VARS, $m, $monthnum, $year, $timedifference, $month, $weekday, $tableposts, $posts;
+ global $wpdb, $m, $monthnum, $year, $timedifference, $month, $weekday, $tableposts, $posts;
// Quick check. If we have no posts at all, abort!
if (!$posts) {
@@ -317,8 +317,8 @@ function get_calendar($daylength = 1) {
return;
}
- if (isset($HTTP_GET_VARS['w'])) {
- $w = ''.intval($HTTP_GET_VARS['w']);
+ if (isset($_GET['w'])) {
+ $w = ''.intval($_GET['w']);
}
$time_difference = get_settings('time_difference');
$add_hours = intval($time_difference);
diff --git a/wp-includes/template-functions-post.php b/wp-includes/template-functions-post.php
index 17b364e864..05ebc27222 100644
--- a/wp-includes/template-functions-post.php
+++ b/wp-includes/template-functions-post.php
@@ -98,7 +98,7 @@ function the_content_rss($more_link_text='(more...)', $stripteaser=0, $more_file
function get_the_content($more_link_text = '(more...)', $stripteaser = 0, $more_file = '') {
global $id, $post, $more, $single, $withcomments, $page, $pages, $multipage, $numpages;
- global $HTTP_SERVER_VARS, $preview, $cookiehash;
+ global $preview, $cookiehash;
global $pagenow;
$output = '';
@@ -112,7 +112,7 @@ function get_the_content($more_link_text = '(more...)', $stripteaser = 0, $more_
if ($more_file != '') {
$file = $more_file;
} else {
- $file = $pagenow; //$HTTP_SERVER_VARS['PHP_SELF'];
+ $file = $pagenow; //$_SERVER['PHP_SELF'];
}
$content = $pages[$page-1];
$content = explode('', $content);
@@ -343,16 +343,16 @@ function next_post($format='%', $next='next post: ', $title='yes', $in_same_cat=
}
function next_posts($max_page = 0) { // original by cfactor at cooltux.org
- global $HTTP_SERVER_VARS, $p, $paged, $what_to_show, $pagenow;
+ global $p, $paged, $what_to_show, $pagenow;
global $querystring_start, $querystring_equal, $querystring_separator;
if (empty($p) && ($what_to_show == 'paged')) {
- $qstr = $HTTP_SERVER_VARS['QUERY_STRING'];
+ $qstr = $_SERVER['QUERY_STRING'];
if (!empty($qstr)) {
$qstr = preg_replace('/&paged=\d{0,}/', '', $qstr);
$qstr = preg_replace('/paged=\d{0,}/', '', $qstr);
- } elseif (stristr($HTTP_SERVER_VARS['REQUEST_URI'], $HTTP_SERVER_VARS['SCRIPT_NAME'] )) {
- if ('' != $qstr = str_replace($HTTP_SERVER_VARS['SCRIPT_NAME'], '',
- $HTTP_SERVER_VARS['REQUEST_URI']) ) {
+ } elseif (stristr($_SERVER['REQUEST_URI'], $_SERVER['SCRIPT_NAME'] )) {
+ if ('' != $qstr = str_replace($_SERVER['SCRIPT_NAME'], '',
+ $_SERVER['REQUEST_URI']) ) {
$qstr = preg_replace('/^\//', '', $qstr);
$qstr = preg_replace('/paged\/\d{0,}\//', '', $qstr);
$qstr = preg_replace('/paged\/\d{0,}/', '', $qstr);
@@ -396,16 +396,16 @@ function next_posts_link($label='Next Page »', $max_page=0) {
function previous_posts() { // original by cfactor at cooltux.org
- global $HTTP_SERVER_VARS, $p, $paged, $what_to_show, $pagenow;
+ global $_SERVER, $p, $paged, $what_to_show, $pagenow;
global $querystring_start, $querystring_equal, $querystring_separator;
if (empty($p) && ($what_to_show == 'paged')) {
- $qstr = $HTTP_SERVER_VARS['QUERY_STRING'];
+ $qstr = $_SERVER['QUERY_STRING'];
if (!empty($qstr)) {
$qstr = preg_replace('/&paged=\d{0,}/', '', $qstr);
$qstr = preg_replace('/paged=\d{0,}/', '', $qstr);
- } elseif (stristr($HTTP_SERVER_VARS['REQUEST_URI'], $HTTP_SERVER_VARS['SCRIPT_NAME'] )) {
- if ('' != $qstr = str_replace($HTTP_SERVER_VARS['SCRIPT_NAME'], '',
- $HTTP_SERVER_VARS['REQUEST_URI']) ) {
+ } elseif (stristr($_SERVER['REQUEST_URI'], $_SERVER['SCRIPT_NAME'] )) {
+ if ('' != $qstr = str_replace($_SERVER['SCRIPT_NAME'], '',
+ $_SERVER['REQUEST_URI']) ) {
$qstr = preg_replace('/^\//', '', $qstr);
$qstr = preg_replace("/paged\/\d{0,}\//", '', $qstr);
$qstr = preg_replace('/paged\/\d{0,}/', '', $qstr);
diff --git a/wp-includes/vars.php b/wp-includes/vars.php
index 381f4f0273..7e7ecb9b26 100644
--- a/wp-includes/vars.php
+++ b/wp-includes/vars.php
@@ -103,7 +103,7 @@ if (($querystring_start == '/') && ($pagenow != 'post.php')) {
// Simple browser detection
$is_lynx = 0; $is_gecko = 0; $is_winIE = 0; $is_macIE = 0; $is_opera = 0; $is_NS4 = 0;
if (!isset($HTTP_USER_AGENT)) {
- $HTTP_USER_AGENT = $HTTP_SERVER_VARS['HTTP_USER_AGENT'];
+ $HTTP_USER_AGENT = $_SERVER['HTTP_USER_AGENT'];
}
if (preg_match('/Lynx/', $HTTP_USER_AGENT)) {
$is_lynx = 1;
@@ -151,8 +151,8 @@ $wp_gecko_correction['out'] = array(
);
// Server detection
-$is_apache = strstr($HTTP_SERVER_VARS['SERVER_SOFTWARE'], 'Apache') ? 1 : 0;
-$is_IIS = strstr($HTTP_SERVER_VARS['SERVER_SOFTWARE'], 'Microsoft-IIS') ? 1 : 0;
+$is_apache = strstr($_SERVER['SERVER_SOFTWARE'], 'Apache') ? 1 : 0;
+$is_IIS = strstr($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS') ? 1 : 0;
// if the config file does not provide the smilies array, let's define it here
if (!isset($wpsmiliestrans)) {
diff --git a/wp-links-opml.php b/wp-links-opml.php
index 25d52ce93a..82a1ab8669 100644
--- a/wp-links-opml.php
+++ b/wp-links-opml.php
@@ -4,7 +4,7 @@ $doing_rss = 1;
header('Content-type: text/xml', true);
require('wp-blog-header.php');
-$link_cat = $HTTP_GET_VARS['link_cat'];
+$link_cat = $_GET['link_cat'];
if ((empty($link_cat)) || ($link_cat == 'all') || ($link_cat == '0')) {
$sql_cat = '';
} else { // be safe
diff --git a/wp-login.php b/wp-login.php
index f9200bf37d..4d853c18d2 100644
--- a/wp-login.php
+++ b/wp-login.php
@@ -15,9 +15,9 @@ if (!function_exists('add_magic_quotes')) {
}
if (!get_magic_quotes_gpc()) {
- $HTTP_GET_VARS = add_magic_quotes($HTTP_GET_VARS);
- $HTTP_POST_VARS = add_magic_quotes($HTTP_POST_VARS);
- $HTTP_COOKIE_VARS = add_magic_quotes($HTTP_COOKIE_VARS);
+ $_GET = add_magic_quotes($_GET);
+ $_POST = add_magic_quotes($_POST);
+ $_COOKIE = add_magic_quotes($_COOKIE);
}
$wpvarstoreset = array('action','mode','error','text','popupurl','popuptitle');
@@ -25,14 +25,14 @@ $wpvarstoreset = array('action','mode','error','text','popupurl','popuptitle');
for ($i = 0; $i < count($wpvarstoreset); $i = $i + 1) {
$wpvar = $wpvarstoreset[$i];
if (!isset($$wpvar)) {
- if (empty($HTTP_POST_VARS["$wpvar"])) {
- if (empty($HTTP_GET_VARS["$wpvar"])) {
+ if (empty($_POST["$wpvar"])) {
+ if (empty($_GET["$wpvar"])) {
$$wpvar = '';
} else {
- $$wpvar = $HTTP_GET_VARS["$wpvar"];
+ $$wpvar = $_GET["$wpvar"];
}
} else {
- $$wpvar = $HTTP_POST_VARS["$wpvar"];
+ $$wpvar = $_POST["$wpvar"];
}
}
}
@@ -58,10 +58,10 @@ break;
case 'login':
- if(!empty($HTTP_POST_VARS)) {
- $log = $HTTP_POST_VARS['log'];
- $pwd = $HTTP_POST_VARS['pwd'];
- $redirect_to = $HTTP_POST_VARS['redirect_to'];
+ if(!empty($_POST)) {
+ $log = $_POST['log'];
+ $pwd = $_POST['pwd'];
+ $redirect_to = $_POST['redirect_to'];
}
$user = get_userdatabylogin($log);
@@ -122,7 +122,7 @@ case 'login':
$user_pass = $pwd;
setcookie('wordpressuser_'.$cookiehash, $user_login, time()+31536000);
setcookie('wordpresspass_'.$cookiehash, md5($user_pass), time()+31536000);
- if (empty($HTTP_COOKIE_VARS['wordpressblogid_'.$cookiehash])) {
+ if (empty($_COOKIE['wordpressblogid_'.$cookiehash])) {
setcookie('wordpressblogid_'.$cookiehash, 1,time()+31536000);
}
header('Expires: Wed, 11 Jan 1984 05:00:00 GMT');
@@ -200,7 +200,7 @@ break;
case 'retrievepassword':
- $user_login = $HTTP_POST_VARS["user_login"];
+ $user_login = $_POST["user_login"];
$user_data = get_userdatabylogin($user_login);
$user_email = $user_data->user_email;
@@ -232,9 +232,9 @@ break;
default:
- if((!empty($HTTP_COOKIE_VARS['wordpressuser_'.$cookiehash])) && (!empty($HTTP_COOKIE_VARS['wordpresspass_'.$cookiehash]))) {
- $user_login = $HTTP_COOKIE_VARS['wordpressuser_'.$cookiehash];
- $user_pass_md5 = $HTTP_COOKIE_VARS['wordpresspass_'.$cookiehash];
+ if((!empty($_COOKIE['wordpressuser_'.$cookiehash])) && (!empty($_COOKIE['wordpresspass_'.$cookiehash]))) {
+ $user_login = $_COOKIE['wordpressuser_'.$cookiehash];
+ $user_pass_md5 = $_COOKIE['wordpresspass_'.$cookiehash];
}
function checklogin() {
@@ -250,7 +250,7 @@ default:
}
if ( !(checklogin()) ) {
- if (!empty($HTTP_COOKIE_VARS['wordpressuser_'.$cookiehash])) {
+ if (!empty($_COOKIE['wordpressuser_'.$cookiehash])) {
$error="Error: wrong login/password"; //, or your session has expired.";
}
} else {
@@ -298,8 +298,8 @@ if ($error) echo "
-
- " />
+
+ " />
diff --git a/wp-mail.php b/wp-mail.php
index af8cc1ae44..94dc67e8f2 100644
--- a/wp-mail.php
+++ b/wp-mail.php
@@ -6,7 +6,6 @@ require_once(ABSPATH.WPINC.'/class-pop3.php');
timer_start();
-$use_cache = 1;
$output_debugging_info = 0; # =1 if you want to output debugging info
$time_difference = get_settings('time_difference');
diff --git a/wp-pass.php b/wp-pass.php
index 090b1771f2..1527115c7f 100644
--- a/wp-pass.php
+++ b/wp-pass.php
@@ -5,7 +5,7 @@
-- Matt
*/
require(dirname(__FILE__) . '/wp-config.php');
-setcookie('wp-postpass_'.$cookiehash, $HTTP_POST_VARS['post_password'], time()+60*60*24*30);
-header('Location: ' . $HTTP_SERVER_VARS['HTTP_REFERER']);
+setcookie('wp-postpass_'.$cookiehash, $_POST['post_password'], time()+60*60*24*30);
+header('Location: ' . $_SERVER['HTTP_REFERER']);
?>
\ No newline at end of file
diff --git a/wp-register.php b/wp-register.php
index 6a02923991..2641b02170 100644
--- a/wp-register.php
+++ b/wp-register.php
@@ -13,23 +13,23 @@ function add_magic_quotes($array) {
}
if (!get_magic_quotes_gpc()) {
- $HTTP_GET_VARS = add_magic_quotes($HTTP_GET_VARS);
- $HTTP_POST_VARS = add_magic_quotes($HTTP_POST_VARS);
- $HTTP_COOKIE_VARS = add_magic_quotes($HTTP_COOKIE_VARS);
+ $_GET = add_magic_quotes($_GET);
+ $_POST = add_magic_quotes($_POST);
+ $_COOKIE = add_magic_quotes($_COOKIE);
}
$wpvarstoreset = array('action');
for ($i=0; $iERROR: This login is already registered, please choose another one.');
}
- $user_ip = $HTTP_SERVER_VARS['REMOTE_ADDR'] ;
- $user_domain = gethostbyaddr($HTTP_SERVER_VARS['REMOTE_ADDR'] );
- $user_browser = $HTTP_SERVER_VARS['HTTP_USER_AGENT'];
+ $user_ip = $_SERVER['REMOTE_ADDR'] ;
+ $user_domain = gethostbyaddr($_SERVER['REMOTE_ADDR'] );
+ $user_browser = $_SERVER['HTTP_USER_AGENT'];
$user_login = addslashes($user_login);
$pass1 = addslashes($pass1);
diff --git a/wp-trackback.php b/wp-trackback.php
index e41de3ad1b..dcff256688 100644
--- a/wp-trackback.php
+++ b/wp-trackback.php
@@ -3,12 +3,12 @@ require(dirname(__FILE__) . '/wp-config.php');
// trackback is done by a POST
$request_array = 'HTTP_POST_VARS';
-$tb_id = explode('/', $HTTP_SERVER_VARS['REQUEST_URI']);
+$tb_id = explode('/', $_SERVER['REQUEST_URI']);
$tb_id = intval($tb_id[count($tb_id)-1]);
-$tb_url = $HTTP_POST_VARS['url'];
-$title = $HTTP_POST_VARS['title'];
-$excerpt = $HTTP_POST_VARS['excerpt'];
-$blog_name = $HTTP_POST_VARS['blog_name'];
+$tb_url = $_POST['url'];
+$title = $_POST['title'];
+$excerpt = $_POST['excerpt'];
+$blog_name = $_POST['blog_name'];
require('wp-blog-header.php');
@@ -21,7 +21,7 @@ if (empty($title) && empty($tb_url) && empty($blog_name)) {
header('Location: ' . get_permalink($tb_id));
}
-if ((strlen(''.$tb_id)) && (empty($HTTP_GET_VARS['__mode'])) && (strlen(''.$tb_url))) {
+if ((strlen(''.$tb_id)) && (empty($_GET['__mode'])) && (strlen(''.$tb_url))) {
@header('Content-Type: text/xml');
@@ -49,7 +49,7 @@ if ((strlen(''.$tb_id)) && (empty($HTTP_GET_VARS['__mode'])) && (strlen(''.$tb_u
$original_comment = $comment;
$comment_post_ID = $tb_id;
- $user_ip = $HTTP_SERVER_VARS['REMOTE_ADDR'];
+ $user_ip = $_SERVER['REMOTE_ADDR'];
$user_domain = gethostbyaddr($user_ip);
$time_difference = get_settings('time_difference');
$now = current_time('mysql');