[otrs-cvs] otrs/Kernel/System/PostMaster NewTicket.pm,1.89,1.90

"CVS commits notifications of OTRS.org" <[email protected]>
Newsgroups gmane.comp.otrs.cvs
Message-ID <[email protected]>
Comments:
Update of /home/cvs/otrs/Kernel/System/PostMaster
In directory lancelot:/tmp/cvs-serv14890/Kernel/System/PostMaster

Modified Files:
	NewTicket.pm 
Log Message:
- Renamed variable EmailForm to EmailFrom.
- Removed use of local variable $_.

Author: mb

Index: NewTicket.pm
===================================================================
RCS file: /home/cvs/otrs/Kernel/System/PostMaster/NewTicket.pm,v
retrieving revision 1.89
retrieving revision 1.90
diff -2 -u -d -r1.89 -r1.90
--- NewTicket.pm	20 Nov 2012 15:51:24 -0000	1.89
+++ NewTicket.pm	17 Jan 2013 15:55:09 -0000	1.90
@@ -1,5 +1,5 @@
 # --
 # Kernel/System/PostMaster/NewTicket.pm - sub part of PostMaster.pm
-# Copyright (C) 2001-2012 OTRS AG, http://otrs.org/
+# Copyright (C) 2001-2013 OTRS AG, http://otrs.org/
 # --
 # $Id$
@@ -31,9 +31,9 @@
 
     # get all objects
-    for (
+    for my $Object (
         qw(DBObject ConfigObject TicketObject LogObject ParserObject TimeObject QueueObject StateObject PriorityObject)
         )
     {
-        $Self->{$_} = $Param{$_} || die 'Got no $_';
+        $Self->{$Object} = $Param{$Object} || die 'Got no $Object';
     }
 
@@ -47,7 +47,7 @@
 
     # check needed stuff
-    for (qw(InmailUserID GetParam)) {
-        if ( !$Param{$_} ) {
-            $Self->{LogObject}->Log( Priority => 'error', Message => "Need $_!" );
+    for my $Needed (qw(InmailUserID GetParam)) {
+        if ( !$Param{$Needed} ) {
+            $Self->{LogObject}->Log( Priority => 'error', Message => "Need $Needed!" );
             return;
         }
@@ -95,6 +95,8 @@
     # get sender email
     my @EmailAddresses = $Self->{ParserObject}->SplitAddressLine( Line => $GetParam{From}, );
-    for (@EmailAddresses) {
-        $GetParam{SenderEmailAddress} = $Self->{ParserObject}->GetEmailAddress( Email => $_, );
+    for my $Address (@EmailAddresses) {
+        $GetParam{SenderEmailAddress} = $Self->{ParserObject}->GetEmailAddress(
+            Email => $Address,
+        );
     }
 
@@ -118,15 +120,15 @@
                 Line => $GetParam{From},
             );
-            for (@EmailAddresses) {
-                $GetParam{EmailForm} = $Self->{ParserObject}->GetEmailAddress(
-                    Email => $_,
+            for my $Address (@EmailAddresses) {
+                $GetParam{EmailFrom} = $Self->{ParserObject}->GetEmailAddress(
+                    Email => $Address,
                 );
             }
             my %List = $Self->{CustomerUserObject}->CustomerSearch(
-                PostMasterSearch => lc( $GetParam{EmailForm} ),
+                PostMasterSearch => lc( $GetParam{EmailFrom} ),
             );
-            for ( sort keys %List ) {
+            for my $UserLogin ( sort keys %List ) {
                 %CustomerData = $Self->{CustomerUserObject}->CustomerUserDataGet(
-                    User => $_,
+                    User => $UserLogin,
                 );
             }
@@ -141,5 +143,5 @@
                 Priority => 'notice',
                 Message  => "Take UserLogin ($CustomerData{UserLogin}) from "
-                    . "customer source backend based on ($GetParam{'EmailForm'}).",
+                    . "customer source backend based on ($GetParam{'EmailFrom'}).",
             );
         }
@@ -151,5 +153,5 @@
                 Priority => 'notice',
                 Message  => "Take UserCustomerID ($CustomerData{UserCustomerID})"
-                    . " from customer source backend based on ($GetParam{'EmailForm'}).",
+                    . " from customer source backend based on ($GetParam{'EmailFrom'}).",
             );
         }
@@ -197,8 +199,8 @@
         print "CustomerID: $GetParam{'X-OTRS-CustomerNo'}\n";
         print "CustomerUser: $GetParam{'X-OTRS-CustomerUser'}\n";
-        for (qw(Type Service SLA Lock)) {
+        for my $Value (qw(Type Service SLA Lock)) {
 
-            if ( $GetParam{ 'X-OTRS-' . $_ } ) {
-                print "Type: " . $GetParam{ 'X-OTRS-' . $_ } . "\n";
+            if ( $GetParam{ 'X-OTRS-' . $Value } ) {
+                print "Type: " . $GetParam{ 'X-OTRS-' . $Value } . "\n";
             }
         }
---------------------------------------------------------------------
OTRS mailing list: cvs-log - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/cvs-log
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/cvs-log
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.