[geeklog-cvs] geeklog: The last 10 comments for the User Profile should return...
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Mon Apr 5 12:44:52 EDT 2010
changeset 7873:e547b33a2390
url: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/e547b33a2390
user: Tom <websitemaster at cogeco.net>
date: Mon Apr 05 12:32:06 2010 -0400
description:
The last 10 comments for the User Profile should return the comment titles not the staticpage title that the comment is for.
diffstat:
plugins/staticpages/functions.inc | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diffs (16 lines):
diff -r acbf6b299bb6 -r e547b33a2390 plugins/staticpages/functions.inc
--- a/plugins/staticpages/functions.inc Mon Apr 05 12:31:37 2010 -0400
+++ b/plugins/staticpages/functions.inc Mon Apr 05 12:32:06 2010 -0400
@@ -1607,11 +1607,10 @@
. " WHERE (sp.sp_id = sid) AND (sp.commentcode >= 0) AND (sp.draft_flag = 0)" . COM_getPermSQL('AND', 0, 2, 'sp')
. " AND (date >= (NOW()+ INTERVAL '{$_CONF['newcommentsinterval']} SECOND')) {$stwhere} GROUP BY sid,type, title, sid ORDER BY 5 DESC LIMIT 15";
} else {
- $sql = "SELECT {$_TABLES['comments']}.sid, sp.sp_title title, cid, UNIX_TIMESTAMP({$_TABLES['comments']}.date) AS unixdate FROM {$_TABLES['comments']}, {$_TABLES['staticpage']} sp"
+ $sql = "SELECT {$_TABLES['comments']}.sid, {$_TABLES['comments']}.title title, cid, UNIX_TIMESTAMP({$_TABLES['comments']}.date) AS unixdate FROM {$_TABLES['comments']}, {$_TABLES['staticpage']} sp"
. " WHERE (sp.sp_id = sid) AND (sp.commentcode >= 0) AND (sp.draft_flag = 0)" . COM_getPermSQL('AND', 0, 2, 'sp')
. "{$stwhere} ORDER BY unixdate DESC LIMIT $numreturn";
}
-
$result = DB_query($sql);
$nrows = DB_numRows($result);
if ($nrows > 0) {
More information about the geeklog-cvs
mailing list