[otrs-cvs] otrs/Kernel/Modules CustomerTicketPrint.pm,1.6,1.7
cvs-log at otrs.org
cvs-log at otrs.org
Wed Apr 4 07:30:16 GMT 2007
Comments:
Update of /home/cvs/otrs/Kernel/Modules
In directory lancelot:/tmp/cvs-serv11180/Kernel/Modules
Modified Files:
CustomerTicketPrint.pm
Log Message:
Add loop protection to _PDFOutputCustomerInfos().
Author: mh
Index: CustomerTicketPrint.pm
===================================================================
RCS file: /home/cvs/otrs/Kernel/Modules/CustomerTicketPrint.pm,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** CustomerTicketPrint.pm 3 Apr 2007 18:43:02 -0000 1.6
--- CustomerTicketPrint.pm 4 Apr 2007 07:30:11 -0000 1.7
***************
*** 679,682 ****
--- 679,683 ----
}
}
+ my $Output = 0;
my %CustomerData = %{$Param{CustomerData}};
my %Page = %{$Param{PageData}};
***************
*** 697,701 ****
--- 698,704 ----
$TableParam{CellData}[$Row][0]{Font} = 'HelveticaBold';
$TableParam{CellData}[$Row][1]{Content} = $CustomerData{${$Field}[0]};
+
$Row++;
+ $Output = 1;
}
}
***************
*** 703,750 ****
$TableParam{ColumnData}[1]{Width} = 431;
! # set new position
! $Self->{PDFObject}->PositionSet(
! Move => 'relativ',
! Y => -15,
! );
! # output headline
! $Self->{PDFObject}->Text(
! Text => $Self->{LayoutObject}->{LanguageObject}->Get('Customer Infos'),
! Height => 7,
! Type => 'Cut',
! Font => 'HelveticaBoldItalic',
! FontSize => 7,
! Color => '#666666',
! );
! # set new position
! $Self->{PDFObject}->PositionSet(
! Move => 'relativ',
! Y => -4,
! );
! # table params
! $TableParam{Type} = 'Cut';
! $TableParam{Border} = 0;
! $TableParam{FontSize} = 6;
! $TableParam{BackgroundColor} = '#DDDDDD';
! $TableParam{Padding} = 1;
! $TableParam{PaddingTop} = 3;
! $TableParam{PaddingBottom} = 3;
!
! # output table
! for ($Page{PageCount}..$Page{MaxPages}) {
! # output table (or a fragment of it)
! %TableParam = $Self->{PDFObject}->Table(
! %TableParam,
);
! # stop output or output next page
! if ($TableParam{State}) {
! last;
! }
! else {
! $Self->{PDFObject}->PageNew(
! %Page,
! FooterRight => $Page{PageText} . ' ' . $Page{PageCount},
);
! $Page{PageCount}++;
}
}
--- 706,755 ----
$TableParam{ColumnData}[1]{Width} = 431;
! if ($Output) {
! # set new position
! $Self->{PDFObject}->PositionSet(
! Move => 'relativ',
! Y => -15,
);
! # output headline
! $Self->{PDFObject}->Text(
! Text => $Self->{LayoutObject}->{LanguageObject}->Get('Customer Infos'),
! Height => 7,
! Type => 'Cut',
! Font => 'HelveticaBoldItalic',
! FontSize => 7,
! Color => '#666666',
! );
! # set new position
! $Self->{PDFObject}->PositionSet(
! Move => 'relativ',
! Y => -4,
! );
! # table params
! $TableParam{Type} = 'Cut';
! $TableParam{Border} = 0;
! $TableParam{FontSize} = 6;
! $TableParam{BackgroundColor} = '#DDDDDD';
! $TableParam{Padding} = 1;
! $TableParam{PaddingTop} = 3;
! $TableParam{PaddingBottom} = 3;
!
! # output table
! for ($Page{PageCount}..$Page{MaxPages}) {
! # output table (or a fragment of it)
! %TableParam = $Self->{PDFObject}->Table(
! %TableParam,
);
! # stop output or output next page
! if ($TableParam{State}) {
! last;
! }
! else {
! $Self->{PDFObject}->PageNew(
! %Page,
! FooterRight => $Page{PageText} . ' ' . $Page{PageCount},
! );
! $Page{PageCount}++;
! }
}
}
More information about the cvs-log
mailing list