summaryrefslogtreecommitdiff
path: root/modules/comment/comment.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-04-20 21:28:15 +0000
committerDries Buytaert <dries@buytaert.net>2009-04-20 21:28:15 +0000
commite81096f5bc509b650aba39ce1868efa066aa8152 (patch)
tree1027fbb5d3018fe21eb9e7f5b3a6b932681bdda0 /modules/comment/comment.module
parenta6233dfe2065e011b38adeb9480e0b741fe48f84 (diff)
downloadbrdo-e81096f5bc509b650aba39ce1868efa066aa8152.tar.gz
brdo-e81096f5bc509b650aba39ce1868efa066aa8152.tar.bz2
- Patch #372471 by JamesAn et al: killed theme_box().
Diffstat (limited to 'modules/comment/comment.module')
-rw-r--r--modules/comment/comment.module13
1 files changed, 10 insertions, 3 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index 6c7e582fa..313b163b7 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -128,6 +128,9 @@ function comment_theme() {
'template' => 'comment',
'arguments' => array('comment' => NULL, 'node' => NULL, 'links' => array()),
),
+ 'comment_form_box' => array(
+ 'arguments' => array('edit' => NULL, 'title' => NULL),
+ ),
'comment_folded' => array(
'template' => 'comment-folded',
'arguments' => array('comment' => NULL),
@@ -1197,7 +1200,7 @@ function comment_render($node, $cid = 0) {
// If enabled, show new comment form if it's not already being displayed.
$reply = arg(0) == 'comment' && arg(1) == 'reply';
if (user_access('post comments') && $node->comment == COMMENT_NODE_OPEN && (variable_get('comment_form_location_' . $node->type, COMMENT_FORM_SEPARATE_PAGE) == COMMENT_FORM_BELOW) && !$reply) {
- $output .= comment_form_box(array('nid' => $nid), t('Post new comment'));
+ $output .= theme('comment_form_box', array('nid' => $nid), t('Post new comment'));
}
if ($output) {
$output = theme('comment_wrapper', $output, $node);
@@ -1624,9 +1627,13 @@ function comment_form(&$form_state, $edit, $title = NULL) {
* The form structure.
* @param $title
* The form title.
+ * @return
+ * A string containing the box output.
*/
-function comment_form_box($edit, $title = NULL) {
- return theme('box', $title, drupal_get_form('comment_form', $edit, $title));
+function theme_comment_form_box($edit, $title = NULL) {
+ $content = drupal_get_form('comment_form', $edit, $title);
+ $output = '<h2 class="title">' . $title . '</h2><div>' . $content . '</div>';
+ return $output;
}
/**