Changed to superglobals, and eliminated $use_cache (since we always do).

git-svn-id: https://develop.svn.wordpress.org/trunk@1108 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Matt Mullenweg
2004-04-20 22:56:47 +00:00
parent c9239346a5
commit 94f0cf9181
49 changed files with 432 additions and 438 deletions
+10 -10
View File
@@ -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 {