[otrs-cvs] iPhoneHandle/Kernel/System iPhone.pm,1.72,1.73
"CVS commits notifications of OTRS.org" <[email protected]>
| Newsgroups | gmane.comp.otrs.cvs |
|---|---|
| Message-ID | <[email protected]> |
Comments:
Update of /home/cvs/iPhoneHandle/Kernel/System
In directory lancelot:/tmp/cvs-serv9405/Kernel/System
Modified Files:
iPhone.pm
Log Message:
Fixed bug#9021 - Ticket without articles shows an error in server log.
Author: cr
Index: iPhone.pm
===================================================================
RCS file: /home/cvs/iPhoneHandle/Kernel/System/iPhone.pm,v
retrieving revision 1.72
retrieving revision 1.73
diff -2 -u -d -r1.72 -r1.73
--- iPhone.pm 29 Oct 2012 21:56:41 -0000 1.72
+++ iPhone.pm 4 Jan 2013 00:21:52 -0000 1.73
@@ -1,5 +1,5 @@
# --
# Kernel/System/iPhone.pm - all iPhone handle functions
-# Copyright (C) 2001-2012 OTRS AG, http://otrs.org/
+# Copyright (C) 2001-2013 OTRS AG, http://otrs.org/
# --
# $Id$
@@ -2194,25 +2194,27 @@
my $ArticleAllSeen = 1;
my @Index = $Self->{TicketObject}->ArticleIndex( TicketID => $Ticket{TicketID} );
- for my $ArticleID (@Index) {
- my %ArticleFlag = $Self->{TicketObject}->ArticleFlagGet(
- ArticleID => $ArticleID,
- UserID => $Param{UserID},
- );
+ if ( IsArrayRefWithData( \@Index ) ) {
+ for my $ArticleID (@Index) {
+ my %ArticleFlag = $Self->{TicketObject}->ArticleFlagGet(
+ ArticleID => $ArticleID,
+ UserID => $Param{UserID},
+ );
- # last if article was not shown
- if ( !$ArticleFlag{Seen} && !$ArticleFlag{seen} ) {
- $ArticleAllSeen = 0;
- last;
+ # last if article was not shown
+ if ( !$ArticleFlag{Seen} && !$ArticleFlag{seen} ) {
+ $ArticleAllSeen = 0;
+ last;
+ }
}
- }
- # mark ticket as seen if all article are shown
- if ($ArticleAllSeen) {
- $Self->{TicketObject}->TicketFlagSet(
- TicketID => $Ticket{TicketID},
- Key => 'Seen',
- Value => 1,
- UserID => $Param{UserID},
- );
+ # mark ticket as seen if all article are shown
+ if ($ArticleAllSeen) {
+ $Self->{TicketObject}->TicketFlagSet(
+ TicketID => $Ticket{TicketID},
+ Key => 'Seen',
+ Value => 1,
+ UserID => $Param{UserID},
+ );
+ }
}
}
@@ -2354,25 +2356,27 @@
my $ArticleAllSeen = 1;
my @Index = $Self->{TicketObject}->ArticleIndex( TicketID => $Article{TicketID} );
- for my $ArticleID (@Index) {
- my %ArticleFlag = $Self->{TicketObject}->ArticleFlagGet(
- ArticleID => $ArticleID,
- UserID => $Param{UserID},
- );
+ if ( IsArrayRefWithData( \@Index ) ) {
+ for my $ArticleID (@Index) {
+ my %ArticleFlag = $Self->{TicketObject}->ArticleFlagGet(
+ ArticleID => $ArticleID,
+ UserID => $Param{UserID},
+ );
- # last if article was not shown
- if ( !$ArticleFlag{Seen} && !$ArticleFlag{seen} ) {
- $ArticleAllSeen = 0;
- last;
+ # last if article was not shown
+ if ( !$ArticleFlag{Seen} && !$ArticleFlag{seen} ) {
+ $ArticleAllSeen = 0;
+ last;
+ }
}
- }
- # mark ticket as seen if all article are shown
- if ($ArticleAllSeen) {
- $Self->{TicketObject}->TicketFlagSet(
- TicketID => $Article{TicketID},
- Key => 'Seen',
- Value => 1,
- UserID => $Param{UserID},
- );
+ # mark ticket as seen if all article are shown
+ if ($ArticleAllSeen) {
+ $Self->{TicketObject}->TicketFlagSet(
+ TicketID => $Article{TicketID},
+ Key => 'Seen',
+ Value => 1,
+ UserID => $Param{UserID},
+ );
+ }
}
@@ -2887,11 +2891,4 @@
my @Index = $Self->{TicketObject}->ArticleIndex(%Param);
- if ( !@Index ) {
- $Self->{LogObject}->Log(
- Priority => 'error',
- Message => 'There are no articles for this ticket',
- );
- }
-
return @Index;
}
@@ -3090,5 +3087,5 @@
UserID => $Param{UserID},
)
- },
+ },
},
Mandatory => 1,
@@ -3151,5 +3148,5 @@
UserID => $Param{UserID},
)
- },
+ },
},
Mandatory => 1,
---------------------------------------------------------------------
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