Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Interchange: cvs

interchange - racke modified 2 files

 

 

Interchange cvs RSS feed   Index | Next | Previous | View Threaded


interchange-cvs at icdevgroup

Jan 23, 2009, 3:46 AM

Post #1 of 4 (679 views)
Permalink
interchange - racke modified 2 files

User: racke
Date: 2009-01-23 11:46:56 GMT
Modified: . Tag: STABLE_5_6-branch WHATSNEW-5.6
Modified: code/UserTag Tag: STABLE_5_6-branch email.tag
Log:
Made [email] process cc and bcc options for plain text emails (#250).

Revision Changes Path
No revision



No revision



2.1.2.16 interchange/Attic/WHATSNEW-5.6


rev 2.1.2.16, prev_rev 2.1.2.15
Index: WHATSNEW-5.6
===================================================================
RCS file: /var/cvs/interchange/Attic/WHATSNEW-5.6,v
retrieving revision 2.1.2.15
retrieving revision 2.1.2.16
diff -u -r2.1.2.15 -r2.1.2.16
--- WHATSNEW-5.6 6 Jan 2009 20:23:40 -0000 2.1.2.15
+++ WHATSNEW-5.6 23 Jan 2009 11:46:56 -0000 2.1.2.16
@@ -7,6 +7,16 @@

See UPGRADE document for a list of incompatible changes.

+Interchange 5.6.2 not yet released.
+
+UserTag
+-------
+
+* Made [email] process cc and bcc options for plain text emails (#250).
+
+
+------------------------------------------------------------------------------
+

Interchange 5.6.2 not yet released.




No revision



No revision



1.14.2.1 interchange/code/UserTag/email.tag


rev 1.14.2.1, prev_rev 1.14
Index: email.tag
===================================================================
RCS file: /var/cvs/interchange/code/UserTag/email.tag,v
retrieving revision 1.14
retrieving revision 1.14.2.1
diff -u -r1.14 -r1.14.2.1
--- email.tag 30 Mar 2007 23:40:56 -0000 1.14
+++ email.tag 23 Jan 2009 11:46:56 -0000 1.14.2.1
@@ -5,7 +5,7 @@
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version. See the LICENSE file for details.
#
-# $Id: email.tag,v 1.14 2007-03-30 23:40:56 pajamian Exp $
+# $Id: email.tag,v 1.14.2.1 2009-01-23 11:46:56 racke Exp $

UserTag email Order to subject reply from extra
UserTag email hasEndTag
@@ -24,7 +24,7 @@
sub {
my ($to, $subject, $reply, $from, $extra, $opt, $body) = @_;
my $ok = 0;
- my @extra;
+ my ($cc, $bcc, @extra);

use vars qw/ $Tag /;

@@ -35,8 +35,12 @@
$from =~ s/,.*//;
}

+ # Use local copy to avoid mangling with caller's data
+ $cc = $opt->{cc};
+ $bcc = $opt->{bcc};
+
# Prevent header injections from spammers' hostile content
- for ($to, $subject, $reply, $from) {
+ for ($to, $subject, $reply, $from, $cc, $bcc) {
# unfold valid RFC 2822 "2.2.3. Long Header Fields"
s/\r?\n([ \t]+)/$1/g;
# now remove any invalid extra lines left over
@@ -93,7 +97,8 @@
From => $from,
Subject => $subject,
Type => $opt->{mimetype},
- Cc => $opt->{cc},
+ Cc => $cc,
+ Bcc => $bcc,
@extra_headers,
;
$opt->{body_mime} ||= 'text/plain';
@@ -177,6 +182,14 @@
}
}

+ if ($cc) {
+ push(@extra, "Cc: $cc");
+ }
+
+ if ($bcc) {
+ push(@extra, "Bcc: $bcc");
+ }
+
$ok = send_mail($to, $subject, $body, $reply, 0, @extra)
unless $sent_with_attach;






_______________________________________________
interchange-cvs mailing list
interchange-cvs [at] icdevgroup
http://www.icdevgroup.org/mailman/listinfo/interchange-cvs


interchange-cvs at icdevgroup

Jan 26, 2009, 1:49 AM

Post #2 of 4 (621 views)
Permalink
interchange - racke modified 2 files [In reply to]

User: racke
Date: 2009-01-26 09:49:11 GMT
Modified: . WHATSNEW-5.7
Modified: code/UI_Tag run_profile.coretag
Log:
[run-profile] now accepts ref attribute to check an arbitrary hash.

Revision Changes Path
2.24 interchange/WHATSNEW-5.7


rev 2.24, prev_rev 2.23
Index: WHATSNEW-5.7
===================================================================
RCS file: /var/cvs/interchange/WHATSNEW-5.7,v
retrieving revision 2.23
retrieving revision 2.24
diff -u -r2.23 -r2.24
--- WHATSNEW-5.7 15 Jan 2009 02:08:04 -0000 2.23
+++ WHATSNEW-5.7 26 Jan 2009 09:49:11 -0000 2.24
@@ -32,6 +32,11 @@
* Add new SessionCookieSecure boolean catalog directive. When enabled, makes
session cookie set in https usable only in https.

+UserTag
+-------
+
+* [run-profile] now accepts ref attribute to check an arbitrary hash.
+

------------------------------------------------------------------------------




1.7 interchange/code/UI_Tag/run_profile.coretag


rev 1.7, prev_rev 1.6
Index: run_profile.coretag
===================================================================
RCS file: /var/cvs/interchange/code/UI_Tag/run_profile.coretag,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- run_profile.coretag 10 Jul 2008 14:56:31 -0000 1.6
+++ run_profile.coretag 26 Jan 2009 09:49:11 -0000 1.7
@@ -1,22 +1,38 @@
-# Copyright 2002-2007 Interchange Development Group and others
+# Copyright 2002-2009 Interchange Development Group and others
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version. See the LICENSE file for details.
#
-# $Id: run_profile.coretag,v 1.6 2008-07-10 14:56:31 racke Exp $
+# $Id: run_profile.coretag,v 1.7 2009-01-26 09:49:11 racke Exp $

UserTag run-profile Order check cgi profile name
UserTag run-profile addAttr
-UserTag run-profile Version $Revision: 1.6 $
+UserTag run-profile Version $Revision: 1.7 $
UserTag run-profile Routine <<EOR
sub {
my ($check, $cgi, $profile, $name, $opt) = @_;
#::logDebug("call check $check");
- my $ref = $cgi ? (\%CGI::values) : $::Values;
+ my $ref;
my $pname = $name;

+ if ($opt->{ref}) {
+ if (ref($opt->{ref}) eq 'HASH') {
+ $ref = $opt->{ref};
+ }
+ else {
+ # error message
+ ::logError("Invalid ref parameter provided for profile %s", $pname || $check);
+ }
+ }
+ elsif ($cgi) {
+ $ref = \%CGI::values;
+ }
+ else {
+ $ref = $::Values;
+ }
+
unless ($pname) {
# check scratch for profile if none specified
$profile = $Scratch->{"profile_$check"} unless $profile;





_______________________________________________
interchange-cvs mailing list
interchange-cvs [at] icdevgroup
http://www.icdevgroup.org/mailman/listinfo/interchange-cvs


interchange-cvs at icdevgroup

Jan 27, 2009, 11:38 PM

Post #3 of 4 (618 views)
Permalink
interchange - racke modified 2 files [In reply to]

User: racke
Date: 2009-01-28 07:38:26 GMT
Modified: . WHATSNEW-5.7
Modified: code/OrderCheck email_only.oc
Log:
Allow custom error messages for email_only check.

Revision Changes Path
2.25 interchange/WHATSNEW-5.7


rev 2.25, prev_rev 2.24
Index: WHATSNEW-5.7
===================================================================
RCS file: /var/cvs/interchange/WHATSNEW-5.7,v
retrieving revision 2.24
retrieving revision 2.25
diff -u -r2.24 -r2.25
--- WHATSNEW-5.7 26 Jan 2009 09:49:11 -0000 2.24
+++ WHATSNEW-5.7 28 Jan 2009 07:38:26 -0000 2.25
@@ -37,6 +37,10 @@

* [run-profile] now accepts ref attribute to check an arbitrary hash.

+Checks
+------
+
+* Allow custom error messages for email_only check.

------------------------------------------------------------------------------




1.5 interchange/code/OrderCheck/email_only.oc


rev 1.5, prev_rev 1.4
Index: email_only.oc
===================================================================
RCS file: /var/cvs/interchange/code/OrderCheck/email_only.oc,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- email_only.oc 30 Mar 2007 23:40:48 -0000 1.4
+++ email_only.oc 28 Jan 2009 07:38:26 -0000 1.5
@@ -1,23 +1,23 @@
-# Copyright 2005-2007 Interchange Development Group and others
+# Copyright 2005-2009 Interchange Development Group and others
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version. See the LICENSE file for details.
#
-# $Id: email_only.oc,v 1.4 2007-03-30 23:40:48 pajamian Exp $
+# $Id: email_only.oc,v 1.5 2009-01-28 07:38:26 racke Exp $

CodeDef email_only OrderCheck 1
CodeDef email_only Description Email address
CodeDef email_only Routine <<EOR
sub {
- my($ref, $var, $val) = @_;
+ my($ref, $var, $val, $msg) = @_;
if($val and $val =~ /^[\040-\077\101-\176]+\@[-A-Za-z0-9.]+\.[A-Za-z]+$/) {
return (1, $var, '');
}
else {
return (undef, $var,
- errmsg( "'%s' not an email address", $val )
+ $msg || errmsg("'%s' not an email address", $val )
);
}
}





_______________________________________________
interchange-cvs mailing list
interchange-cvs [at] icdevgroup
http://www.icdevgroup.org/mailman/listinfo/interchange-cvs


interchange-cvs at icdevgroup

Jan 29, 2009, 2:47 AM

Post #4 of 4 (613 views)
Permalink
interchange - racke modified 2 files [In reply to]

User: racke
Date: 2009-01-29 10:47:40 GMT
Modified: . WHATSNEW-5.7
Modified: code/UserTag convert_date.tag
Log:
Added empty attribute for [convert-date] to display a custom string
instead of the current date when no proper date is passed.

Revision Changes Path
2.26 interchange/WHATSNEW-5.7


rev 2.26, prev_rev 2.25
Index: WHATSNEW-5.7
===================================================================
RCS file: /var/cvs/interchange/WHATSNEW-5.7,v
retrieving revision 2.25
retrieving revision 2.26
diff -u -r2.25 -r2.26
--- WHATSNEW-5.7 28 Jan 2009 07:38:26 -0000 2.25
+++ WHATSNEW-5.7 29 Jan 2009 10:47:40 -0000 2.26
@@ -37,6 +37,9 @@

* [run-profile] now accepts ref attribute to check an arbitrary hash.

+* Added empty attribute for [convert-date] to display a custom string
+ instead of the current date when no proper date is passed.
+
Checks
------




1.8 interchange/code/UserTag/convert_date.tag


rev 1.8, prev_rev 1.7
Index: convert_date.tag
===================================================================
RCS file: /var/cvs/interchange/code/UserTag/convert_date.tag,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- convert_date.tag 30 Mar 2007 23:40:56 -0000 1.7
+++ convert_date.tag 29 Jan 2009 10:47:40 -0000 1.8
@@ -5,7 +5,7 @@
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version. See the LICENSE file for details.
#
-# $Id: convert_date.tag,v 1.7 2007-03-30 23:40:56 pajamian Exp $
+# $Id: convert_date.tag,v 1.8 2009-01-29 10:47:40 racke Exp $

UserTag convert-date Order adjust
UserTag convert-date PosNumber 1
@@ -14,7 +14,7 @@
UserTag convert-date AttrAlias days adjust
UserTag convert-date HasEndTag
UserTag convert-date Interpolate
-UserTag convert-date Version $Revision: 1.7 $
+UserTag convert-date Version $Revision: 1.8 $
UserTag convert-date Routine <<EOR
sub {
my ($adjust, $opt, $text) = @_;
@@ -43,6 +43,9 @@
$t[5] = $1;
$t[5] -= 1900;
}
+ elsif (exists $opt->{empty}) {
+ return $opt->{empty};
+ }
else {
$now = time();
@t = localtime($now) unless $adjust;





_______________________________________________
interchange-cvs mailing list
interchange-cvs [at] icdevgroup
http://www.icdevgroup.org/mailman/listinfo/interchange-cvs

Interchange cvs RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.