diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/node/node.module | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/modules/node/node.module b/modules/node/node.module index b64dbdebf..1ac8a9d20 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -1446,11 +1446,8 @@ function theme_node_search_admin($form) { * Retrieve the comment mode for the given node ID (none, read, or read/write). */ function node_comment_mode($nid) { - static $comment_mode; - if (!isset($comment_mode[$nid])) { - $comment_mode[$nid] = db_result(db_query('SELECT comment FROM {node} WHERE nid = %d', $nid)); - } - return $comment_mode[$nid]; + $node = node_load($nid); + return $node->comment; } /** |