Added Length of Subject as Display Option (default 50, as before).
[squirrelmail.git] / functions / mailbox_display.php
index 706fbddc74eb2ca26304baca9b51b0aaae703b0c..f728bac07786449d2966a950c18f15ad7b363b1a 100644 (file)
@@ -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))