[otrs-cvs] otrs/Kernel/Modules CustomerTicketPrint.pm, 1.2.2.1, 1.2.2.2

cvs-log at otrs.org cvs-log at otrs.org
Wed Apr 4 07:32:58 GMT 2007


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

Modified Files:
      Tag: rel-2_1
	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.2.2.1
retrieving revision 1.2.2.2
diff -C2 -d -r1.2.2.1 -r1.2.2.2
*** CustomerTicketPrint.pm	26 Jan 2007 17:12:04 -0000	1.2.2.1
--- CustomerTicketPrint.pm	4 Apr 2007 07:32:53 -0000	1.2.2.2
***************
*** 675,678 ****
--- 675,679 ----
          }
      }
+     my $Output = 0;
      my %CustomerData = %{$Param{CustomerData}};
      my %Page = %{$Param{PageData}};
***************
*** 686,690 ****
--- 687,693 ----
              $TableParam{CellData}[$Row][0]{Font} = 'HelveticaBold';
              $TableParam{CellData}[$Row][1]{Content} = $CustomerData{${$Field}[0]};
+ 
              $Row++;
+             $Output = 1;
          }
      }
***************
*** 692,739 ****
      $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}++;
          }
      }
--- 695,744 ----
      $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}++;
!             }
          }
      }
***************
*** 992,994 ****
  }
  
! 1;
\ No newline at end of file
--- 997,999 ----
  }
  
! 1;


More information about the cvs-log mailing list