Procházet zdrojové kódy

New Reply citation to include date, and author.

jangliss před 21 roky
rodič
revize
7a22752e52
3 změnil soubory, kde provedl 8 přidání a 3 odebrání
  1. 1 1
      ChangeLog
  2. 1 0
      include/options/personal.php
  3. 6 2
      src/compose.php

+ 1 - 1
ChangeLog

@@ -4,7 +4,7 @@
 
 Version 1.5.1 -- CVS
 --------------------
-
+  - New reply citation to include date and author.
 
 Version 1.5.0
 --------------------

+ 1 - 0
include/options/personal.php

@@ -173,6 +173,7 @@ function load_optpage_data_personal() {
         'refresh' => SMOPT_REFRESH_NONE,
         'posvals' => array(SMPREF_NONE    => _("No Citation"),
                            'author_said'  => _("AUTHOR Said"),
+                           'date_time_author' => _("On DATE, AUTHOR Said"),
                            'quote_who'    => _("Quote Who XML"),
                            'user-defined' => _("User-Defined"))
     );

+ 6 - 2
src/compose.php

@@ -144,7 +144,7 @@ function replyAllString($header) {
    return $url_replytoallcc;
 }
 
-function getReplyCitation($orig_from) {
+function getReplyCitation($orig_from, $orig_date) {
     global $reply_citation_style, $reply_citation_start, $reply_citation_end;
     $orig_from = decodeHeader($orig_from->getAddress(false),false,false,true);
 //    $from = decodeHeader($orig_header->getAddr_s('from',"\n$indent"),false,false);
@@ -168,6 +168,10 @@ function getReplyCitation($orig_from) {
         $start = '<' . _("quote") . ' ' . _("who") . '="';
         $end   = '">';
         break;
+    case 'date_time_author':
+        $start = 'On ' . getLongDateString($orig_date) . ', ';
+        $end = ' ' . _("said") . ':';
+        break;
     case 'user-defined':
         $start = $reply_citation_start .
          ($reply_citation_start == '' ? '' : ' ');
@@ -777,7 +781,7 @@ function newMail ($mailbox='', $passed_id='', $passed_ent_id='', $action='', $se
                     $body .= '> ' . str_replace("\n", "\n> ", rtrim($line)) . "\n";
                 }
             }
-            $body = getReplyCitation($from) . $body;
+            $body = getReplyCitation($from , $orig_header->date) . $body;
             $composeMessage->reply_rfc822_header = $orig_header;
 
             break;