- Patch #5766 by Moshe: replace getenv() with $_SERVER.
parent
38e89dd03f
commit
6c99c2d86f
|
@ -435,7 +435,7 @@ function comment_post($edit) {
|
|||
|
||||
$edit["cid"] = db_next_id("{comments}_cid");
|
||||
|
||||
db_query("INSERT INTO {comments} (cid, nid, pid, uid, subject, comment, hostname, timestamp, status, score, users, thread) VALUES (%d, %d, %d, %d, '%s', '%s', '%s', %d, %d, %d, '%s', '%s')", $edit["cid"], $edit["nid"], $edit["pid"], $user->uid, $edit["subject"], $edit["comment"], getenv("REMOTE_ADDR"), time(), $status, $score, $users, $thread);
|
||||
db_query("INSERT INTO {comments} (cid, nid, pid, uid, subject, comment, hostname, timestamp, status, score, users, thread) VALUES (%d, %d, %d, %d, '%s', '%s', '%s', %d, %d, %d, '%s', '%s')", $edit["cid"], $edit["nid"], $edit["pid"], $user->uid, $edit["subject"], $edit["comment"], $_SERVER['REMOTE_ADDR'], time(), $status, $score, $users, $thread);
|
||||
|
||||
/*
|
||||
** Tell the other modules a new comment has been submitted:
|
||||
|
|
|
@ -435,7 +435,7 @@ function comment_post($edit) {
|
|||
|
||||
$edit["cid"] = db_next_id("{comments}_cid");
|
||||
|
||||
db_query("INSERT INTO {comments} (cid, nid, pid, uid, subject, comment, hostname, timestamp, status, score, users, thread) VALUES (%d, %d, %d, %d, '%s', '%s', '%s', %d, %d, %d, '%s', '%s')", $edit["cid"], $edit["nid"], $edit["pid"], $user->uid, $edit["subject"], $edit["comment"], getenv("REMOTE_ADDR"), time(), $status, $score, $users, $thread);
|
||||
db_query("INSERT INTO {comments} (cid, nid, pid, uid, subject, comment, hostname, timestamp, status, score, users, thread) VALUES (%d, %d, %d, %d, '%s', '%s', '%s', %d, %d, %d, '%s', '%s')", $edit["cid"], $edit["nid"], $edit["pid"], $user->uid, $edit["subject"], $edit["comment"], $_SERVER['REMOTE_ADDR'], time(), $status, $score, $users, $thread);
|
||||
|
||||
/*
|
||||
** Tell the other modules a new comment has been submitted:
|
||||
|
|
|
@ -21,7 +21,8 @@ function statistics_exit() {
|
|||
if ((variable_get("statistics_enable_access_log", 0)) && (module_invoke("throttle", "status") < 5)) {
|
||||
// statistical logs are enabled
|
||||
$referrer = referer_uri();
|
||||
$hostname = getenv("REMOTE_ADDR");
|
||||
$hostname = $_SERVER['REMOTE_ADDR'];
|
||||
|
||||
// log this page access
|
||||
if ((arg(0) == "node") && (arg(1) == "view") && arg(2)) {
|
||||
db_query("INSERT INTO {accesslog} (nid, url, hostname, uid, timestamp) values(%d, '%s', '%s', %d, %d)", arg(2), $referrer, $hostname, $user->uid, time());
|
||||
|
|
|
@ -21,7 +21,8 @@ function statistics_exit() {
|
|||
if ((variable_get("statistics_enable_access_log", 0)) && (module_invoke("throttle", "status") < 5)) {
|
||||
// statistical logs are enabled
|
||||
$referrer = referer_uri();
|
||||
$hostname = getenv("REMOTE_ADDR");
|
||||
$hostname = $_SERVER['REMOTE_ADDR'];
|
||||
|
||||
// log this page access
|
||||
if ((arg(0) == "node") && (arg(1) == "view") && arg(2)) {
|
||||
db_query("INSERT INTO {accesslog} (nid, url, hostname, uid, timestamp) values(%d, '%s', '%s', %d, %d)", arg(2), $referrer, $hostname, $user->uid, time());
|
||||
|
|
Loading…
Reference in New Issue