node_comment_mode
modules/node/node.module, строка 1096
- Версии
- 5 – 6
node_comment_mode($nid)
Retrieve the comment mode for the given node ID (none, read, or read/write).
Код
<?php
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];
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии