Note: this list is kept only as a demonstration for CVSNotice. For the latest CVS notices, see the Xaraya and Postnuke sites
View Statistics - Next Notice - Previous NoticeDirectory filter : [ all ] / postnuke_official / html / modules / comments / backend [ view in CVS ]
| Date | Directory [filter] | File(s) [view] | Author [filter] |
| 16 Aug 2002 14:11:20 | postnuke_official/html/modules/comments/backend | backend.php,1.13,1.14 | Mike |
| quick fix to show total count of comments | |||
Update of /home/cvsroot/postnuke_official/html/modules/comments/backend
In directory ns7.hostnuke.net:/tmp/cvs-serv7056/backend
Modified Files:
backend.php
Log Message:
quick fix to show total count of comments
Index: backend.php
===================================================================
RCS file: /home/cvsroot/postnuke_official/html/modules/comments/backend/backend.php,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** backend.php 12 Aug 2002 17:40:03 -0000 1.13
--- backend.php 16 Aug 2002 14:11:17 -0000 1.14
***************
*** 367,382 ****
$sql = "SELECT $column[itemid] AS Hook, COUNT($column[cid]) AS TotalComments
FROM $pntable[comments]
! WHERE $column[modid]='$modid' AND $column[itemid]='$itemid'";
$result = $dbconn->Execute($sql);
! if ($result->ErrorNo() || !$result->PO_RecordCount()) {
$msg = pnML('Could not retrieve the stats from the database.');
pnExceptionSet(PN_SYSTEM_EXCEPTION, 'DATABASE',
new SystemException(__FILE__.'('.__LINE__.'): '.$msg));
return;
} else {
! $row = $result->GetRowAssoc(false);
! return $row['TotalComments'];
}
// grab total comments for specified module only (all hooks in module).
--- 367,385 ----
$sql = "SELECT $column[itemid] AS Hook, COUNT($column[cid]) AS TotalComments
FROM $pntable[comments]
! WHERE $column[modid]='$modid' AND $column[itemid]='$itemid'
! GROUP BY $column[itemid]";
$result = $dbconn->Execute($sql);
! if ($dbconn->ErrorNo()) {
$msg = pnML('Could not retrieve the stats from the database.');
pnExceptionSet(PN_SYSTEM_EXCEPTION, 'DATABASE',
new SystemException(__FILE__.'('.__LINE__.'): '.$msg));
return;
+ } elseif ($result->EOF) {
+ return 0;
} else {
! $row = $result->fields;
! return $row[1];
}
// grab total comments for specified module only (all hooks in module).
View Statistics - Next Notice - Previous Notice
| Visit Developer Site - Browse CVS Repository |
Syndicate via backend.rss (max. once per hour please) | Powered by CVSNotice 0.1.3 |