diff options
Diffstat (limited to 'modules/comment')
-rw-r--r-- | modules/comment/comment.install | 76 | ||||
-rw-r--r-- | modules/comment/comment.module | 6 |
2 files changed, 41 insertions, 41 deletions
diff --git a/modules/comment/comment.install b/modules/comment/comment.install index 054919530..4cbc31fe5 100644 --- a/modules/comment/comment.install +++ b/modules/comment/comment.install @@ -159,44 +159,44 @@ function comment_schema() { 'primary key' => array('cid'), ); - $schema['node_comment_statistics'] = array( - 'description' => t('Maintains statistics of node and comments posts to show "new" and "updated" flags.'), - 'fields' => array( - 'nid' => array( - 'type' => 'int', - 'unsigned' => TRUE, - 'not null' => TRUE, - 'default' => 0, - 'description' => t('The {node}.nid for which the statistics are compiled.'), - ), - 'last_comment_timestamp' => array( - 'type' => 'int', - 'not null' => TRUE, - 'default' => 0, - 'description' => t('The Unix timestamp of the last comment that was posted within this node, from {comments}.timestamp.'), - ), - 'last_comment_name' => array( - 'type' => 'varchar', - 'length' => 60, - 'not null' => FALSE, - 'description' => t('The name of the latest author to post a comment on this node, from {comments}.name.'), - ), - 'last_comment_uid' => array( - 'type' => 'int', - 'not null' => TRUE, - 'default' => 0, - 'description' => t('The user ID of the latest author to post a comment on this node, from {comments}.uid.'), - ), - 'comment_count' => array( - 'type' => 'int', - 'unsigned' => TRUE, - 'not null' => TRUE, - 'default' => 0, - 'description' => t('The total number of comments on this node.'), - ), - ), - 'indexes' => array('node_comment_timestamp' => array('last_comment_timestamp')), - 'primary key' => array('nid'), + $schema['node_comment_statistics'] = array( + 'description' => t('Maintains statistics of node and comments posts to show "new" and "updated" flags.'), + 'fields' => array( + 'nid' => array( + 'type' => 'int', + 'unsigned' => TRUE, + 'not null' => TRUE, + 'default' => 0, + 'description' => t('The {node}.nid for which the statistics are compiled.'), + ), + 'last_comment_timestamp' => array( + 'type' => 'int', + 'not null' => TRUE, + 'default' => 0, + 'description' => t('The Unix timestamp of the last comment that was posted within this node, from {comments}.timestamp.'), + ), + 'last_comment_name' => array( + 'type' => 'varchar', + 'length' => 60, + 'not null' => FALSE, + 'description' => t('The name of the latest author to post a comment on this node, from {comments}.name.'), + ), + 'last_comment_uid' => array( + 'type' => 'int', + 'not null' => TRUE, + 'default' => 0, + 'description' => t('The user ID of the latest author to post a comment on this node, from {comments}.uid.'), + ), + 'comment_count' => array( + 'type' => 'int', + 'unsigned' => TRUE, + 'not null' => TRUE, + 'default' => 0, + 'description' => t('The total number of comments on this node.'), + ), + ), + 'indexes' => array('node_comment_timestamp' => array('last_comment_timestamp')), + 'primary key' => array('nid'), ); return $schema; diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 4876fe638..08cdfd8ea 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -1050,8 +1050,8 @@ function comment_operations($action = NULL) { } /** -*** misc functions: helpers, privates, history -**/ + * Misc functions: helpers, privates, history + */ /** * Load the entire comment by cid. @@ -1318,7 +1318,7 @@ function comment_form(&$form_state, $edit, $title = NULL) { if (!form_get_errors() && ((variable_get('comment_preview_'. $node->type, COMMENT_PREVIEW_REQUIRED) == COMMENT_PREVIEW_OPTIONAL) || ($op == t('Preview')) || ($op == t('Save')))) { $form['submit'] = array('#type' => 'submit', '#value' => t('Save'), '#weight' => 19); } - + $form['preview'] = array('#type' => 'button', '#value' => t('Preview'), '#weight' => 20); $form['#token'] = 'comment'. $edit['nid'] . (isset($edit['pid']) ? $edit['pid'] : ''); |