diff options
author | Dries Buytaert <dries@buytaert.net> | 2002-12-08 08:04:58 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2002-12-08 08:04:58 +0000 |
commit | a10cd273d38a904d737e17abdeee9a9a7de78a80 (patch) | |
tree | 0f9320604da0c9f4d8c47003ac9e580ce540f910 | |
parent | d2d381d7c40efef52ea6a5e8c28a6f1b7da50f55 (diff) | |
download | brdo-a10cd273d38a904d737e17abdeee9a9a7de78a80.tar.gz brdo-a10cd273d38a904d737e17abdeee9a9a7de78a80.tar.bz2 |
- Avoid empty fields to be displayed. Patch by Moshe.
-rw-r--r-- | modules/comment.module | 10 | ||||
-rw-r--r-- | modules/comment/comment.module | 10 | ||||
-rw-r--r-- | modules/jabber.module | 4 |
3 files changed, 19 insertions, 5 deletions
diff --git a/modules/comment.module b/modules/comment.module index 9baf10ce9..bc663a3ec 100644 --- a/modules/comment.module +++ b/modules/comment.module @@ -44,9 +44,15 @@ function comment_conf_options() { function comment_user($type, $edit, &$user) { switch ($type) { case "view_public": - return form_item(t("Signature"), check_output($user->signature, 1)); + if ($user->signature) { + return form_item(t("Signature"), check_output($user->signature, 1)); + } + break; case "view_private": - return form_item(t("Signature"), check_output($user->signature, 1)); + if ($user->signature) { + return form_item(t("Signature"), check_output($user->signature, 1)); + } + break; case "edit_form": // when user tries to edit his own data return form_textarea(t("Signature"), "signature", $edit["signature"], 70, 3, t("Your signature will be publicly displayed at the end of your comments.") ."<br />". t("Allowed HTML tags") .": ". htmlspecialchars(variable_get("allowed_html", "<a> <b> <dd> <dl> <dt> <i> <li> <ol> <u> <ul>"))); diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 9baf10ce9..bc663a3ec 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -44,9 +44,15 @@ function comment_conf_options() { function comment_user($type, $edit, &$user) { switch ($type) { case "view_public": - return form_item(t("Signature"), check_output($user->signature, 1)); + if ($user->signature) { + return form_item(t("Signature"), check_output($user->signature, 1)); + } + break; case "view_private": - return form_item(t("Signature"), check_output($user->signature, 1)); + if ($user->signature) { + return form_item(t("Signature"), check_output($user->signature, 1)); + } + break; case "edit_form": // when user tries to edit his own data return form_textarea(t("Signature"), "signature", $edit["signature"], 70, 3, t("Your signature will be publicly displayed at the end of your comments.") ."<br />". t("Allowed HTML tags") .": ". htmlspecialchars(variable_get("allowed_html", "<a> <b> <dd> <dl> <dt> <i> <li> <ol> <u> <ul>"))); diff --git a/modules/jabber.module b/modules/jabber.module index 47be2babf..c69aa4463 100644 --- a/modules/jabber.module +++ b/modules/jabber.module @@ -168,7 +168,9 @@ function jabber_user($type, $edit, $user) { switch ($type) { case "view_private": $result = user_get_authname($user, $module); - $output .= form_item(t("$name ID"), $result); + if ($result) { + $output .= form_item(t("$name ID"), $result); + } return $output; case "edit_form": $result = user_get_authname($user, $module); |