[otrs-cvs] CVS: otrs/Kernel/System Stats.pm,1.14,1.14.2.1

cvs-log at otrs.org cvs-log at otrs.org
Thu Jan 11 11:51:41 CET 2007


Update of /home/cvs/otrs/Kernel/System
In directory lancelot:/tmp/cvs-serv18782/Kernel/System

Modified Files:
      Tag: rel-2_1
	Stats.pm 
Log Message:
quote \n in cache files

Index: Stats.pm
===================================================================
RCS file: /home/cvs/otrs/Kernel/System/Stats.pm,v
retrieving revision 1.14
retrieving revision 1.14.2.1
diff -C2 -r1.14 -r1.14.2.1
*** Stats.pm	7 Dec 2006 08:37:27 -0000	1.14
--- Stats.pm	11 Jan 2007 10:51:39 -0000	1.14.2.1
***************
*** 1,5 ****
  # --
  # Kernel/System/Stats.pm - all advice functions
! # Copyright (C) 2001-2006 OTRS GmbH, http://otrs.org/
  # --
  # $Id$
--- 1,5 ----
  # --
  # Kernel/System/Stats.pm - all advice functions
! # Copyright (C) 2001-2007 OTRS GmbH, http://otrs.org/
  # --
  # $Id$
***************
*** 1020,1024 ****
  
      # search for a better way to cache stats (StatID and Cache)
!     if ($Param{Cache}) {
          my $Path = $Self->{ConfigObject}->Get('TempDir');
          my $File = 'Stats' . $Param{StatID} . "-" . $TitleTimeStart . "-" . $TitleTimeStop .  ".cache";
--- 1020,1024 ----
  
      # search for a better way to cache stats (StatID and Cache)
!     if ($Param{Cache} && $TitleTimeStart && $TitleTimeStop) {
          my $Path = $Self->{ConfigObject}->Get('TempDir');
          my $File = 'Stats' . $Param{StatID} . "-" . $TitleTimeStart . "-" . $TitleTimeStop .  ".cache";
***************
*** 1026,1030 ****
          if (open (DATA, "< $Path/$File")) {
              while (<DATA>) {
!                 my @Row = split(/;;/, $_);
                  push (@StatArray, \@Row);
              }
--- 1026,1033 ----
          if (open (DATA, "< $Path/$File")) {
              while (<DATA>) {
!                 my $Line = $_;
!                 $Line =~ s/\\n/\n/mgs;
!                 my @Row = split(/;;/, $Line);
!                 pop(@Row);
                  push (@StatArray, \@Row);
              }
***************
*** 1092,1097 ****
                  if (open (DATA, "> $Path/$File")) {
                      foreach my $Row (@StatArray) {
!                         foreach (@{$Row}) {
!                             print DATA "$_;;";
                          }
                          print DATA "\n";
--- 1095,1101 ----
                  if (open (DATA, "> $Path/$File")) {
                      foreach my $Row (@StatArray) {
!                         foreach my $Cell (@{$Row}) {
!                             $Cell =~ s/\n/\\n/mgs;
!                             print DATA "$Cell;;";
                          }
                          print DATA "\n";
***************
*** 1729,1736 ****
          if (open (DATA, "> $Path/$File")) {
              foreach my $Row (@Data) {
!                 foreach (@{$Row}) {
!                     print DATA "$_;;";
                  }
!                 print DATA "\n";
              }
              close (DATA);
--- 1733,1742 ----
          if (open (DATA, "> $Path/$File")) {
              foreach my $Row (@Data) {
!                 my $Line = '';
!                 foreach my $Cell (@{$Row}) {
!                     $Line .= "$Cell;;";
                  }
!                 $Line =~ s/\n/\\n/mgs;
!                 print DATA "$Line\n";
              }
              close (DATA);
***************
*** 1771,1780 ****
      if (open (DATA, "< $Path/$File")) {
          while (<DATA>) {
!             my @Row = split(/;;/, $_);
              push (@Data, \@Row);
          }
          close (DATA);
      }
!     # otherwise you get error waring in the shell
      #else {
      #    $Self->{LogObject}->Log(
--- 1777,1789 ----
      if (open (DATA, "< $Path/$File")) {
          while (<DATA>) {
!             my $Line = $_;
!             $Line =~ s/\\n/\n/mgs;
!             my @Row = split(/;;/, $Line);
!             pop (@Row);
              push (@Data, \@Row);
          }
          close (DATA);
      }
!     # otherwise you get error warning in the shell
      #else {
      #    $Self->{LogObject}->Log(



More information about the cvs-log mailing list