From: alex-brainstorm Date: Sat, 30 Aug 2003 23:40:38 +0000 (+0000) Subject: Added Length of Subject as Display Option (default 50, as before). X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=commitdiff_plain;h=3fc1a95fa49610a823d3587357b3d6123c6120ee Added Length of Subject as Display Option (default 50, as before). git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@5593 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/functions/mailbox_display.php b/functions/mailbox_display.php index 706fbddc..f728bac0 100644 --- a/functions/mailbox_display.php +++ b/functions/mailbox_display.php @@ -21,10 +21,8 @@ require_once(SM_PATH . 'functions/mime.php'); /* Constants: * PG_SEL_MAX: default value for page_selector_max - * SUBJ_TRIM_AT: the length at which we trim off subjects */ define('PG_SEL_MAX', 10); -define('SUBJ_TRIM_AT', 50); function elapsed($start) { @@ -1260,7 +1258,8 @@ function processSubject($subject, $threadlevel = 0) { return _("(no subject)"); } - $trim_at = SUBJ_TRIM_AT; + global $truncate_subject; /* number of characters for Subject field (<= 0 for unchanged) */ + $trim_at = $truncate_subject; /* if this is threaded, subtract two chars per indentlevel */ if (($threadlevel > 0) && ($threadlevel <= 10)) diff --git a/include/options/display.php b/include/options/display.php index 1e21532b..1235ca13 100644 --- a/include/options/display.php +++ b/include/options/display.php @@ -159,6 +159,14 @@ function load_optpage_data_display() { 'size' => SMOPT_SIZE_TINY ); + $optvals[SMOPT_GRP_MAILBOX][] = array( + 'name' => 'truncate_subject', + 'caption' => _("Length of Subject Field (0 for full)"), + 'type' => SMOPT_TYPE_INTEGER, + 'refresh' => SMOPT_REFRESH_NONE, + 'size' => SMOPT_SIZE_TINY + ); + /*** Load the General Options into the array ***/ $optgrps[SMOPT_GRP_MESSAGE] = _("Message Display and Composition");