- Avoid empty fields to be displayed. Patch by Moshe.
parent
d2d381d7c4
commit
a10cd273d3
|
@ -44,9 +44,15 @@ function comment_conf_options() {
|
||||||
function comment_user($type, $edit, &$user) {
|
function comment_user($type, $edit, &$user) {
|
||||||
switch ($type) {
|
switch ($type) {
|
||||||
case "view_public":
|
case "view_public":
|
||||||
|
if ($user->signature) {
|
||||||
return form_item(t("Signature"), check_output($user->signature, 1));
|
return form_item(t("Signature"), check_output($user->signature, 1));
|
||||||
|
}
|
||||||
|
break;
|
||||||
case "view_private":
|
case "view_private":
|
||||||
|
if ($user->signature) {
|
||||||
return form_item(t("Signature"), check_output($user->signature, 1));
|
return form_item(t("Signature"), check_output($user->signature, 1));
|
||||||
|
}
|
||||||
|
break;
|
||||||
case "edit_form":
|
case "edit_form":
|
||||||
// when user tries to edit his own data
|
// 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>")));
|
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>")));
|
||||||
|
|
|
@ -44,9 +44,15 @@ function comment_conf_options() {
|
||||||
function comment_user($type, $edit, &$user) {
|
function comment_user($type, $edit, &$user) {
|
||||||
switch ($type) {
|
switch ($type) {
|
||||||
case "view_public":
|
case "view_public":
|
||||||
|
if ($user->signature) {
|
||||||
return form_item(t("Signature"), check_output($user->signature, 1));
|
return form_item(t("Signature"), check_output($user->signature, 1));
|
||||||
|
}
|
||||||
|
break;
|
||||||
case "view_private":
|
case "view_private":
|
||||||
|
if ($user->signature) {
|
||||||
return form_item(t("Signature"), check_output($user->signature, 1));
|
return form_item(t("Signature"), check_output($user->signature, 1));
|
||||||
|
}
|
||||||
|
break;
|
||||||
case "edit_form":
|
case "edit_form":
|
||||||
// when user tries to edit his own data
|
// 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>")));
|
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>")));
|
||||||
|
|
|
@ -168,7 +168,9 @@ function jabber_user($type, $edit, $user) {
|
||||||
switch ($type) {
|
switch ($type) {
|
||||||
case "view_private":
|
case "view_private":
|
||||||
$result = user_get_authname($user, $module);
|
$result = user_get_authname($user, $module);
|
||||||
|
if ($result) {
|
||||||
$output .= form_item(t("$name ID"), $result);
|
$output .= form_item(t("$name ID"), $result);
|
||||||
|
}
|
||||||
return $output;
|
return $output;
|
||||||
case "edit_form":
|
case "edit_form":
|
||||||
$result = user_get_authname($user, $module);
|
$result = user_get_authname($user, $module);
|
||||||
|
|
Loading…
Reference in New Issue