[prev in list] [next in list] [prev in thread] [next in thread]
List: squirrelmail-cvs
Subject: [SM-CVS] SF.net SVN: squirrelmail:[13911]
From: pdontthink () users ! sourceforge ! net
Date: 2010-02-16 19:31:45
Message-ID: E1NhT97-0002Va-N3 () sfp-svn-4 ! v30 ! ch3 ! sourceforge ! com
[Download RAW message or body]
Revision: 13911
http://squirrelmail.svn.sourceforge.net/squirrelmail/?rev=13911&view=rev
Author: pdontthink
Date: 2010-02-16 19:31:45 +0000 (Tue, 16 Feb 2010)
Log Message:
-----------
Add option that allows the signature to be stripped on reply (#2952876). Thanks to \
Sven Strickroth.
Modified Paths:
--------------
branches/SM-1_4-STABLE/squirrelmail/doc/ChangeLog
branches/SM-1_4-STABLE/squirrelmail/include/load_prefs.php
branches/SM-1_4-STABLE/squirrelmail/include/options/display.php
branches/SM-1_4-STABLE/squirrelmail/src/compose.php
Modified: branches/SM-1_4-STABLE/squirrelmail/doc/ChangeLog
===================================================================
--- branches/SM-1_4-STABLE/squirrelmail/doc/ChangeLog 2010-02-16 13:44:59 UTC (rev \
13910)
+++ branches/SM-1_4-STABLE/squirrelmail/doc/ChangeLog 2010-02-16 19:31:45 UTC (rev \
13911) @@ -21,6 +21,8 @@
- Added unread links in message view.
- Added the ability to configure Google Mail (Gmail) as the mail server
behind SquirrelMail.
+ - Added option in display preferences that allows the signature to be stripped
+ from the original message when replying (#2952876). Thanks to Sven Strickroth.
Version 1.4.20 RC2 - 17 Aug 2009
--------------------------------
Modified: branches/SM-1_4-STABLE/squirrelmail/include/load_prefs.php
===================================================================
--- branches/SM-1_4-STABLE/squirrelmail/include/load_prefs.php 2010-02-16 13:44:59 \
UTC (rev 13910)
+++ branches/SM-1_4-STABLE/squirrelmail/include/load_prefs.php 2010-02-16 19:31:45 \
UTC (rev 13911) @@ -256,6 +256,9 @@
/* signature placement settings */
$sig_first = getPref($data_dir, $username, 'sig_first', 0);
+/* strip signature from replies setting */
+$trim_signature_on_reply = getPref($data_dir, $username, 'trim_signature_on_reply', \
0); +
/* use the internal date of the message for sorting instead of the supplied header \
date */ $internal_date_sort = getPref($data_dir, $username, 'internal_date_sort', \
SMPREF_ON);
Modified: branches/SM-1_4-STABLE/squirrelmail/include/options/display.php
===================================================================
--- branches/SM-1_4-STABLE/squirrelmail/include/options/display.php 2010-02-16 \
13:44:59 UTC (rev 13910)
+++ branches/SM-1_4-STABLE/squirrelmail/include/options/display.php 2010-02-16 \
19:31:45 UTC (rev 13911) @@ -331,6 +331,13 @@
);
$optvals[SMOPT_GRP_MESSAGE][] = array(
+ 'name' => 'trim_signature_on_reply',
+ 'caption' => _("Remove Original Signature when Replying"),
+ 'type' => SMOPT_TYPE_BOOLEAN,
+ 'refresh' => SMOPT_REFRESH_NONE
+ );
+
+ $optvals[SMOPT_GRP_MESSAGE][] = array(
'name' => 'body_quote',
'caption' => _("Prefix for Original Message when Replying"),
'type' => SMOPT_TYPE_STRING,
Modified: branches/SM-1_4-STABLE/squirrelmail/src/compose.php
===================================================================
--- branches/SM-1_4-STABLE/squirrelmail/src/compose.php 2010-02-16 13:44:59 UTC (rev \
13910)
+++ branches/SM-1_4-STABLE/squirrelmail/src/compose.php 2010-02-16 19:31:45 UTC (rev \
13911) @@ -688,7 +688,7 @@
global $editor_size, $default_use_priority, $body, $idents,
$use_signature, $composesession, $data_dir, $username,
$username, $key, $imapServerAddress, $imapPort,
- $composeMessage, $body_quote;
+ $composeMessage, $body_quote, $trim_signature_on_reply;
global $languages, $squirrelmail_language, $default_charset;
/*
@@ -891,6 +891,21 @@
sqUnWordWrap($body);
$body = '';
$cnt = count($rewrap_body);
+ if ($trim_signature_on_reply) {
+ $skiplines = $cnt;
+ for ($i = $cnt - 1; $i >= 0; $i--) {
+ // we could use a regular expression if we want to
+ // catch more possible signature indicators
+ if ($rewrap_body[$i] == '-- ' || $rewrap_body[$i] == '--') \
{ + $skiplines = $i;
+ break;
+ }
+ }
+ for ($i = $skiplines; $i < $cnt; $i++) {
+ unset($rewrap_body[$i]);
+ }
+ $cnt = $skiplines;
+ }
for ($i=0;$i<$cnt;$i++) {
sqWordWrap($rewrap_body[$i], $editor_size, $default_charset);
if (preg_match("/^(>+)/", $rewrap_body[$i], $matches)) {
This was sent by the SourceForge.net collaborative development platform, the world's \
largest Open Source development site.
------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
-----
squirrelmail-cvs mailing list
List address: squirrelmail-cvs@lists.sourceforge.net
List info (subscribe/unsubscribe/change options): \
https://lists.sourceforge.net/lists/listinfo/squirrelmail-cvs
Repository: http://squirrelmail.org/svn
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic