summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2006-02-09 08:52:03 +0000
committerDries Buytaert <dries@buytaert.net>2006-02-09 08:52:03 +0000
commit88490f6413ea2cfc667eb634c8a29478b89aa94e (patch)
tree2605119fd202f5bc6488071b32d6d993589ec53f /modules
parent51f8d2f33b1cb4490047368964f7fc724b399d7f (diff)
downloadbrdo-88490f6413ea2cfc667eb634c8a29478b89aa94e.tar.gz
brdo-88490f6413ea2cfc667eb634c8a29478b89aa94e.tar.bz2
- Patch #47691 by Cvbge: quickfix postgresql
Diffstat (limited to 'modules')
-rw-r--r--modules/forum.module2
-rw-r--r--modules/forum/forum.module2
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/forum.module b/modules/forum.module
index 1909a6e93..8e957fe74 100644
--- a/modules/forum.module
+++ b/modules/forum.module
@@ -708,7 +708,7 @@ function forum_get_forums($tid = 0) {
* than NODE_NEW_LIMIT.
*/
function _forum_topics_unread($term, $uid) {
- $sql = 'SELECT COUNT(n.nid) FROM {node} n INNER JOIN {term_node} tn ON n.nid = tn.nid AND tn.tid = %d LEFT JOIN {history} h ON n.nid = h.nid AND h.uid = %d WHERE n.status = 1 AND n.type = "forum" AND n.created > %d AND h.nid IS NULL';
+ $sql = "SELECT COUNT(n.nid) FROM {node} n INNER JOIN {term_node} tn ON n.nid = tn.nid AND tn.tid = %d LEFT JOIN {history} h ON n.nid = h.nid AND h.uid = %d WHERE n.status = 1 AND n.type = 'forum' AND n.created > %d AND h.nid IS NULL";
$sql = db_rewrite_sql($sql);
return db_result(db_query($sql, $term, $uid, NODE_NEW_LIMIT));
}
diff --git a/modules/forum/forum.module b/modules/forum/forum.module
index 1909a6e93..8e957fe74 100644
--- a/modules/forum/forum.module
+++ b/modules/forum/forum.module
@@ -708,7 +708,7 @@ function forum_get_forums($tid = 0) {
* than NODE_NEW_LIMIT.
*/
function _forum_topics_unread($term, $uid) {
- $sql = 'SELECT COUNT(n.nid) FROM {node} n INNER JOIN {term_node} tn ON n.nid = tn.nid AND tn.tid = %d LEFT JOIN {history} h ON n.nid = h.nid AND h.uid = %d WHERE n.status = 1 AND n.type = "forum" AND n.created > %d AND h.nid IS NULL';
+ $sql = "SELECT COUNT(n.nid) FROM {node} n INNER JOIN {term_node} tn ON n.nid = tn.nid AND tn.tid = %d LEFT JOIN {history} h ON n.nid = h.nid AND h.uid = %d WHERE n.status = 1 AND n.type = 'forum' AND n.created > %d AND h.nid IS NULL";
$sql = db_rewrite_sql($sql);
return db_result(db_query($sql, $term, $uid, NODE_NEW_LIMIT));
}