X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=include%2Foptions%2Fpersonal.php;h=ab833179bc842e261baf340a3ec40b8dd1ccac23;hp=e25bb3e700d67ff264d81e0c4be7497b2e70093d;hb=c4faef335b2362c81b8ebf026d4066c12d70536c;hpb=c0d968010e710870fdfee2f22d7cc9fad370c7a9 diff --git a/include/options/personal.php b/include/options/personal.php index e25bb3e7..ab833179 100644 --- a/include/options/personal.php +++ b/include/options/personal.php @@ -5,7 +5,7 @@ * * Displays all options relating to personal information * - * @copyright 1999-2012 The SquirrelMail Project Team + * @copyright 1999-2020 The SquirrelMail Project Team * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @version $Id$ * @package squirrelmail @@ -34,7 +34,7 @@ define('SMOPT_GRP_TZ', 3); * @return array all option information */ function load_optpage_data_personal() { - global $data_dir, $username, $edit_identity, $edit_name, + global $data_dir, $username, $edit_identity, $edit_name, $edit_reply_to, $full_name, $reply_to, $email_address, $signature, $tzChangeAllowed, $timeZone, $domain; @@ -104,17 +104,30 @@ function load_optpage_data_personal() { 'caption' => _("E-mail Address"), 'type' => SMOPT_TYPE_COMMENT, 'refresh' => SMOPT_REFRESH_NONE, - 'comment' => htmlspecialchars($email_address) + 'comment' => sm_encode_html_special_chars($email_address) ); } - $optvals[SMOPT_GRP_CONTACT][] = array( - 'name' => 'reply_to', - 'caption' => _("Reply To"), - 'type' => SMOPT_TYPE_STRING, - 'refresh' => SMOPT_REFRESH_NONE, - 'size' => SMOPT_SIZE_HUGE - ); + if ($edit_identity || $edit_reply_to) { + $optvals[SMOPT_GRP_CONTACT][] = array( + 'name' => 'reply_to', + 'caption' => _("Reply To"), + 'type' => SMOPT_TYPE_STRING, + 'refresh' => SMOPT_REFRESH_NONE, + 'size' => SMOPT_SIZE_HUGE + ); + } else { +//TODO: For many users, this is redundant to the email address above, especially if not editable -- so here instead of a comment, we could just hide it... in fact, that's what we'll do, but keep this code for posterity in case someone decides we shouldn't do this +/* + $optvals[SMOPT_GRP_CONTACT][] = array( + 'name' => 'reply_to', + 'caption' => _("Reply To"), + 'type' => SMOPT_TYPE_COMMENT, + 'refresh' => SMOPT_REFRESH_NONE, + 'comment' => sm_encode_html_special_chars($reply_to), + ); +*/ + } $optvals[SMOPT_GRP_CONTACT][] = array( 'name' => 'signature',