[geeklog-cvs] geeklog: Fixed comment count for story on comment submission. Wo...
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Sat Dec 24 09:30:53 EST 2011
changeset 8463:7746d9dd395b
url: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/7746d9dd395b
user: Tom <websitemaster at cogeco.net>
date: Sat Dec 24 09:30:00 2011 -0500
description:
Fixed comment count for story on comment submission. Would be incorrect if another object shared the same id and had a comment (bug# 0001414)
diffstat:
public_html/comment.php | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diffs (21 lines):
diff -r 23db444e4c8d -r 7746d9dd395b public_html/comment.php
--- a/public_html/comment.php Fri Dec 23 13:19:32 2011 -0500
+++ b/public_html/comment.php Sat Dec 24 09:30:00 2011 -0500
@@ -137,7 +137,7 @@
$type, $LANG03[14], $postmode)
. COM_siteFooter();
} else { // success
- $comments = DB_count($_TABLES['comments'], 'sid', $sid);
+ $comments = DB_count($_TABLES['comments'], array('type', 'sid'), array('article', $sid));
DB_change($_TABLES['stories'], 'comments', $comments, 'sid', $sid);
COM_olderStuff(); // update comment count in Older Stories block
$display = COM_refresh(COM_buildUrl($_CONF['site_url']
@@ -390,6 +390,8 @@
if (!empty ($_REQUEST['formtype'])) {
$formtype = COM_applyFilter ($_REQUEST['formtype']);
}
+
+
switch ($mode) {
case $LANG03[28]: // Preview Changes (for edit)
case $LANG03[34]: // Preview Submission changes (for edit)
More information about the geeklog-cvs
mailing list