Przeglądaj źródła

Two minor fixes to compose.php so signatures with alternate identities work properly.

tassium 22 lat temu
rodzic
commit
5682e21e4c
1 zmienionych plików z 10 dodań i 1 usunięć
  1. 10 1
      src/compose.php

+ 10 - 1
src/compose.php

@@ -821,7 +821,7 @@ function showInputForm ($session, $values=false) {
        $subject = $values['subject'];       
        $subject = $values['subject'];       
        $mailprio = $values['mailprio'];
        $mailprio = $values['mailprio'];
        $body = $values['body'];
        $body = $values['body'];
-       $identity = $values['identity'];
+       $identity = (int) $values['identity'];
     }
     }
     
     
     if ($use_javascript_addr_book) {
     if ($use_javascript_addr_book) {
@@ -950,6 +950,15 @@ function showInputForm ($session, $values=false) {
                       $editor_size . '" WRAP="VIRTUAL">';
                       $editor_size . '" WRAP="VIRTUAL">';
     }
     }
     if ($use_signature == true && $newmail == true && !isset($from_htmladdr_search)) {
     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 ($sig_first == '1') {
             if ($default_charset == 'iso-2022-jp') {
             if ($default_charset == 'iso-2022-jp') {
                 echo "\n\n".($prefix_sig==true? "-- \n":'').mb_convert_encoding($signature, 'EUC-JP');
                 echo "\n\n".($prefix_sig==true? "-- \n":'').mb_convert_encoding($signature, 'EUC-JP');