bug # 523853 Added an option to put the automatic signature append to reply/forward...
authorjmunro <jmunro@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 13 Mar 2002 20:04:53 +0000 (20:04 +0000)
committerjmunro <jmunro@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 13 Mar 2002 20:04:53 +0000 (20:04 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@2577 7612ce4b-ef26-0410-bec9-ea0150e637f0

src/compose.php
src/load_prefs.php
src/options_display.php

index ae6050cd97ba85d623ac110716cd43b828a13327..dda4b1e28b11ec231ec4bf5d2b758762d3704e23 100644 (file)
@@ -509,7 +509,7 @@ function showInputForm ($session) {
            $from_htmladdr_search, $location_of_buttons, $attachment_dir,
            $username, $data_dir, $identity, $draft_id, $delete_draft,
            $mailprio, $default_use_mdn, $mdn_user_support, $compose_new_win,
-           $saved_draft, $mail_sent;
+           $saved_draft, $mail_sent, $sig_first;
 
     $subject = decodeHeader($subject, false);
     $reply_subj = decodeHeader($reply_subj, false);
@@ -646,9 +646,19 @@ function showInputForm ($session) {
     echo '   <TR>' . "\n" .
          '      <TD BGCOLOR="' . $color[4] . '" COLSPAN=2>' . "\n" .
          '         &nbsp;&nbsp;<TEXTAREA NAME=body ROWS=20 COLS="' .
-         $editor_size . '" WRAP=HARD>' . htmlspecialchars($body);
+         $editor_size . '" WRAP=HARD>';
     if ($use_signature == true && $newmail == true && !isset($from_htmladdr_search)) {
-        echo "\n\n".($prefix_sig==true? "-- \n":'').htmlspecialchars($signature);
+        if ($sig_first == '1') {
+            echo "\n\n".($prefix_sig==true? "-- \n":'').htmlspecialchars($signature);
+            echo "\n\n".htmlspecialchars($body);
+        }
+        else {
+            echo "\n\n".htmlspecialchars($body);
+            echo "\n\n".($prefix_sig==true? "-- \n":'').htmlspecialchars($signature);
+        }
+    }
+    else {
+       echo htmlspecialchars($body);
     }
     echo '</TEXTAREA><BR>' . "\n" .
          '      </TD>' . "\n" .
index cce035433f7312d898dfefa2a89c1aed9849b17c..ad782d4982fff6d703efd0d2d3669a3587ce47b1 100644 (file)
@@ -207,6 +207,9 @@ $hour_format = getPref($data_dir, $username, 'hour_format', 2);
 /*  compose in new window setting */
 $compose_new_win = getPref($data_dir, $username, 'compose_new_win', 0);
 
+/* signature placement settings */
+$sig_first = getPref($data_dir, $username, 'sig_first', 0);
+
 /* Load the javascript settings. */
 $javascript_setting =
     getPref($data_dir, $username, 'javascript_setting', SMPREF_JS_AUTODETECT);
index 59fa47052449d36a9292249fcccbcab4440e7500..1a77f6300793bdd59b33606c43c328b16efea1b6 100644 (file)
@@ -239,6 +239,12 @@ function load_optpage_data_display() {
         'type'    => SMOPT_TYPE_BOOLEAN,
         'refresh' => SMOPT_REFRESH_ALL
     );
+    $optvals[SMOPT_GRP_MESSAGE][] = array(
+        'name'    => 'sig_first',
+        'caption' => _("Append signature before reply/forward text"),
+        'type'    => SMOPT_TYPE_BOOLEAN,
+        'refresh' => SMOPT_REFRESH_NONE
+    );
     /* Assemble all this together and return it as our result. */
     $result = array(
         'grps' => $optgrps,