Two minor fixes to compose.php so signatures with alternate identities work properly.
authortassium <tassium@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 27 Dec 2002 16:00:35 +0000 (16:00 +0000)
committertassium <tassium@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 27 Dec 2002 16:00:35 +0000 (16:00 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@4317 7612ce4b-ef26-0410-bec9-ea0150e637f0

src/compose.php

index 2a2db00ba701981b28d87f349fed067be386d02a..b034df4ce7a7a4c2956b36115f3db9af0f340c97 100644 (file)
@@ -821,7 +821,7 @@ function showInputForm ($session, $values=false) {
        $subject = $values['subject'];       
        $mailprio = $values['mailprio'];
        $body = $values['body'];
-       $identity = $values['identity'];
+       $identity = (int) $values['identity'];
     }
     
     if ($use_javascript_addr_book) {
@@ -950,6 +950,15 @@ function showInputForm ($session, $values=false) {
                       $editor_size . '" WRAP="VIRTUAL">';
     }
     if ($use_signature == true && $newmail == true && !isset($from_htmladdr_search)) {
+        if ($idents > 1) {
+            if ($identity == 'default') {
+                $no = 'g';
+        } else {
+            $no = $identity;
+        }
+        $signature = getSig($data_dir, $username, $no);
+    }
+
         if ($sig_first == '1') {
             if ($default_charset == 'iso-2022-jp') {
                 echo "\n\n".($prefix_sig==true? "-- \n":'').mb_convert_encoding($signature, 'EUC-JP');