summaryrefslogtreecommitdiff
path: root/modules/node/node.module
diff options
context:
space:
mode:
Diffstat (limited to 'modules/node/node.module')
-rw-r--r--modules/node/node.module6
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/node/node.module b/modules/node/node.module
index f70e2173f..d575c6eb9 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -363,7 +363,11 @@ function node_filter_line($text) {
}
function node_comment_mode($nid) {
- return db_result(db_query("SELECT comment FROM node WHERE nid = '%s'", $nid));
+ static $comment_mode;
+ if (!isset($comment_mode[$nid])) {
+ $comment_mode[$nid] = db_result(db_query("SELECT comment FROM node WHERE nid = '%s'", $nid));
+ }
+ return $comment_mode[$nid];
}
function node_filter($text) {