summaryrefslogtreecommitdiff
path: root/rt/lib/RT/Interface
diff options
context:
space:
mode:
authorivan <ivan>2004-11-11 12:13:50 +0000
committerivan <ivan>2004-11-11 12:13:50 +0000
commitc582e92888b4a5553e1b4e5214cf35217e4a0cf0 (patch)
tree3fe7cd7bf22bd356b478f0de0dd8f0b140fcee23 /rt/lib/RT/Interface
parent289340780927b5bac2c7604d7317c3063c6dd8cc (diff)
import rt 3.0.12
Diffstat (limited to 'rt/lib/RT/Interface')
-rwxr-xr-xrt/lib/RT/Interface/Email.pm12
-rw-r--r--rt/lib/RT/Interface/Email/Auth/MailFrom.pm2
-rw-r--r--rt/lib/RT/Interface/Web.pm6
3 files changed, 12 insertions, 8 deletions
diff --git a/rt/lib/RT/Interface/Email.pm b/rt/lib/RT/Interface/Email.pm
index 241f5f35c..52542a149 100755
--- a/rt/lib/RT/Interface/Email.pm
+++ b/rt/lib/RT/Interface/Email.pm
@@ -34,7 +34,7 @@ BEGIN {
use vars qw ($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
# set the version for version checking
- $VERSION = do { my @r = (q$Revision: 1.1.1.2 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; # must be all one line, for MakeMaker
+ $VERSION = do { my @r = (q$Revision: 1.1.1.3 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; # must be all one line, for MakeMaker
@ISA = qw(Exporter);
@@ -57,7 +57,7 @@ BEGIN {
=head1 NAME
- RT::Interface::CLI - helper functions for creating a commandline RT interface
+ RT::Interface::Email - helper functions for parsing email sent to RT
=head1 SYNOPSIS
@@ -182,14 +182,13 @@ sub MailError {
}
-
if ($RT::MailCommand eq 'sendmailpipe') {
open (MAIL, "|$RT::SendmailPath $RT::SendmailArguments") || return(0);
print MAIL $entity->as_string;
close(MAIL);
}
else {
- $entity->send($RT::MailCommand, $RT::MailParams);
+ $entity->send($RT::MailCommand, $RT::MailParams);
}
}
@@ -376,6 +375,9 @@ This performs all the "guts" of the mail rt-mailgate program, and is
designed to be called from the web interface with a message, user
object, and so on.
+Can also take an optional 'ticket' parameter; this ticket id overrides
+any ticket id found in the subject.
+
Returns:
An array of:
@@ -430,7 +432,7 @@ sub Gateway {
if ( -f $temp_file ) {
$parser->ParseMIMEEntityFromFile($temp_file);
- File::Temp::unlink0( $fh, $temp_file );
+ unlink( $temp_file );
if ($parser->Entity) {
delete $args{'message'};
}
diff --git a/rt/lib/RT/Interface/Email/Auth/MailFrom.pm b/rt/lib/RT/Interface/Email/Auth/MailFrom.pm
index eb778ff30..f71666b72 100644
--- a/rt/lib/RT/Interface/Email/Auth/MailFrom.pm
+++ b/rt/lib/RT/Interface/Email/Auth/MailFrom.pm
@@ -118,7 +118,7 @@ sub GetCurrentUser {
}
- $CurrentUser = CreateUser( undef, $Address, $Name, $args{'Message'} );
+ $CurrentUser = CreateUser( undef, $Address, $Name, $Address, $args{'Message'} );
return ( $CurrentUser, 1 );
}
diff --git a/rt/lib/RT/Interface/Web.pm b/rt/lib/RT/Interface/Web.pm
index 8d66239be..329a2801b 100644
--- a/rt/lib/RT/Interface/Web.pm
+++ b/rt/lib/RT/Interface/Web.pm
@@ -101,6 +101,7 @@ sub NewCGIHandler {
default_escape_flags => 'h',
allow_globals => [qw(%session)],
autoflush => 1,
+ @_
);
@@ -424,7 +425,8 @@ sub ProcessUpdateMessage {
);
#Make the update content have no 'weird' newlines in it
- if ( $args{ARGSRef}->{'UpdateContent'} ||
+ if ( $args{ARGSRef}->{'UpdateTimeWorked'} ||
+ $args{ARGSRef}->{'UpdateContent'} ||
$args{ARGSRef}->{'UpdateAttachments'}) {
if (
@@ -530,7 +532,7 @@ sub MakeMIMEEntity {
# on NFS and NTFS, it is possible that tempfile() conflicts
# with other processes, causing a race condition. we try to
# accommodate this by pausing and retrying.
- last if ($fh, $temp_file) = eval { tempfile() };
+ last if ($fh, $temp_file) = eval { tempfile( UNLINK => 1) };
sleep 1;
}