Alexander Nicolaysen Sørnes : comment: Don't log hostname, since we no longer allow anonymouse posts
Alexander Nicolaysen Sørnes
asornes at winehq.org
Sun Apr 24 08:57:49 CDT 2011
Module: appdb
Branch: master
Commit: 4fd3179f606d28d2df885c74bfe45acb7bd4d95e
URL: http://source.winehq.org/git/appdb.git/?a=commit;h=4fd3179f606d28d2df885c74bfe45acb7bd4d95e
Author: Alexander Nicolaysen Sørnes <alexsornes at gmail.com>
Date: Sun Apr 24 15:56:26 2011 +0200
comment: Don't log hostname, since we no longer allow anonymouse posts
---
include/comment.php | 8 +++-----
include/util.php | 12 ------------
tables/appdb_tables.sql | 1 -
3 files changed, 3 insertions(+), 18 deletions(-)
diff --git a/include/comment.php b/include/comment.php
index 8625236..3532e2c 100644
--- a/include/comment.php
+++ b/include/comment.php
@@ -19,7 +19,6 @@ class Comment {
var $iAppId;
var $sDateCreated;
- var $sHostname;
var $oOwner;
@@ -54,7 +53,6 @@ class Comment {
$this->sSubject = $oRow->subject;
$this->sBody = $oRow->body;
$this->sDateCreated = $oRow->time;
- $this->sHostname = $oRow->hostname;
$this->oOwner = new User($oRow->userId);
}
}
@@ -69,12 +67,12 @@ class Comment {
{
$hResult = query_parameters("INSERT INTO appComments
(parentId, versionId, subject, ".
- "body, userId, time, hostname)
- VALUES ('?', '?', '?', '?', '?', ?, '?')",
+ "body, userId, time)
+ VALUES ('?', '?', '?', '?', '?', ?)",
$this->iParentId, $this->iVersionId,
$this->sSubject, $this->sBody,
$_SESSION['current']->iUserId,
- "NOW()", get_remote());
+ "NOW()");
if($hResult)
{
diff --git a/include/util.php b/include/util.php
index e856aff..add9963 100644
--- a/include/util.php
+++ b/include/util.php
@@ -114,18 +114,6 @@ function mysqldatetime_to_unixtimestamp($sDatetime)
return strtotime($sDatetime);
}
-function get_remote()
-{
- global $REMOTE_HOST, $REMOTE_ADDR;
-
- if($REMOTE_HOST)
- $ip = $REMOTE_HOST;
- else
- $ip = $REMOTE_ADDR;
-
- return $ip;
-}
-
function htmlify_urls($text)
{
//FIXME: wonder what the syntax is, this doesn't seem to work
diff --git a/tables/appdb_tables.sql b/tables/appdb_tables.sql
index eb7c5b9..580f551 100644
--- a/tables/appdb_tables.sql
+++ b/tables/appdb_tables.sql
@@ -121,7 +121,6 @@ create table appComments (
parentId int default 0,
versionId int not null,
userId int,
- hostname varchar(80),
subject varchar(128),
body text,
key(commentId),
More information about the wine-cvs
mailing list