From 4bbc277881b9fdffc3e4fc0eb6e72e4ceb6b18d4 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Mon, 5 Jul 2004 05:42:06 +0000 Subject: [PATCH] - Patch #9046 by asimmonds: comment signature option was not displayed. --- modules/comment.module | 16 ++++++++-------- modules/comment/comment.module | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/modules/comment.module b/modules/comment.module index cf777121287..b474cff7d87 100644 --- a/modules/comment.module +++ b/modules/comment.module @@ -138,14 +138,14 @@ function comment_configure() { * * Provides signature customization for the user's comments. */ -function comment_user($type, $edit, &$user) { - switch ($type) { - case 'edit': - // when user tries to edit his own data - return array(t('Personal information') => form_textarea(t('Signature'), 'signature', $user->signature, 64, 3, t('Your signature will be publicly displayed at the end of your comments.') .'
'. filter_tips_short())); - case 'validate': - // validate user data editing - return array('signature' => $edit['signature']); +function comment_user($type, $edit, &$user, $category = NULL) { + if ($type == 'form' && $category == 'account') { + // when user tries to edit his own data + return array(array('title' => t('Comment settings'), 'data' => form_textarea(t('Signature'), 'signature', $user->signature, 64, 3, t('Your signature will be publicly displayed at the end of your comments.') .'
'. filter_tips_short()), 'weight' => 2)); + } + if ($type == 'validate') { + // validate user data editing + return array('signature' => $edit['signature']); } } diff --git a/modules/comment/comment.module b/modules/comment/comment.module index cf777121287..b474cff7d87 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -138,14 +138,14 @@ function comment_configure() { * * Provides signature customization for the user's comments. */ -function comment_user($type, $edit, &$user) { - switch ($type) { - case 'edit': - // when user tries to edit his own data - return array(t('Personal information') => form_textarea(t('Signature'), 'signature', $user->signature, 64, 3, t('Your signature will be publicly displayed at the end of your comments.') .'
'. filter_tips_short())); - case 'validate': - // validate user data editing - return array('signature' => $edit['signature']); +function comment_user($type, $edit, &$user, $category = NULL) { + if ($type == 'form' && $category == 'account') { + // when user tries to edit his own data + return array(array('title' => t('Comment settings'), 'data' => form_textarea(t('Signature'), 'signature', $user->signature, 64, 3, t('Your signature will be publicly displayed at the end of your comments.') .'
'. filter_tips_short()), 'weight' => 2)); + } + if ($type == 'validate') { + // validate user data editing + return array('signature' => $edit['signature']); } }