summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2011-05-01 10:59:42 +0200
committerYorhel <git@yorhel.nl>2011-05-01 10:59:42 +0200
commit196e3bd79e08a4f84f9df90e4a88685449b9bee5 (patch)
tree2abe96d555d6bbcae1894101ead0ff1916f9a4e3
parent4873e8583189ee9c611fadd27d491dc104c52b57 (diff)
Bugfix in update_stats_cache() resulting in a 500
-rw-r--r--util/sql/func.sql2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/sql/func.sql b/util/sql/func.sql
index 47b4511d..3af04562 100644
--- a/util/sql/func.sql
+++ b/util/sql/func.sql
@@ -499,7 +499,7 @@ BEGIN
UPDATE stats_cache SET count = count+1 WHERE section = TG_TABLE_NAME;
ELSE
IF TG_TABLE_NAME = 'threads_posts' THEN
- IF EXISTS(SELECT 1 FROM threads WHERE id = NEW.tid AND hidden = FALSE) THEN
+ IF EXISTS(SELECT 1 FROM threads WHERE id = NEW.tid AND threads.hidden = FALSE) THEN
UPDATE stats_cache SET count = count+1 WHERE section = TG_TABLE_NAME;
END IF;
ELSE