[otrs-cvs] otrs/Kernel/Modules AgentTicketPrint.pm, 1.32.2.2, 1.32.2.3

cvs-log at otrs.org cvs-log at otrs.org
Tue Apr 3 23:15:38 GMT 2007


Comments:
Update of /home/cvs/otrs/Kernel/Modules
In directory lancelot:/tmp/cvs-serv24045

Modified Files:
      Tag: rel-2_1
	AgentTicketPrint.pm 
Log Message:
Add loop protection to _PDFOutputCustomerInfos().

Author: mh

Index: AgentTicketPrint.pm
===================================================================
RCS file: /home/cvs/otrs/Kernel/Modules/AgentTicketPrint.pm,v
retrieving revision 1.32.2.2
retrieving revision 1.32.2.3
diff -C2 -d -r1.32.2.2 -r1.32.2.3
*** AgentTicketPrint.pm	26 Feb 2007 11:12:28 -0000	1.32.2.2
--- AgentTicketPrint.pm	3 Apr 2007 23:15:33 -0000	1.32.2.3
***************
*** 662,665 ****
--- 662,666 ----
          }
      }
+     my $Output = 0;
      my %CustomerData = %{$Param{CustomerData}};
      my %Page = %{$Param{PageData}};
***************
*** 673,677 ****
--- 674,680 ----
              $TableParam{CellData}[$Row][0]{Font} = 'HelveticaBold';
              $TableParam{CellData}[$Row][1]{Content} = $CustomerData{${$Field}[0]};
+ 
              $Row++;
+             $Output = 1;
          }
      }
***************
*** 679,726 ****
      $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}++;
          }
      }
--- 682,731 ----
      $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