[otrs-cvs] otrs/Kernel/Output/HTML NotificationCharsetCheck.pm, 1.6, 1.7

cvs-log at otrs.org cvs-log at otrs.org
Tue Mar 18 16:16:38 GMT 2008


Comments:
Update of /home/cvs/otrs/Kernel/Output/HTML
In directory lancelot:/tmp/cvs-serv13194/Kernel/Output/HTML

Modified Files:
	NotificationCharsetCheck.pm 
Log Message:
Simplify the code.

Author: tr

Index: NotificationCharsetCheck.pm
===================================================================
RCS file: /home/cvs/otrs/Kernel/Output/HTML/NotificationCharsetCheck.pm,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** NotificationCharsetCheck.pm	2 Oct 2007 10:41:39 -0000	1.6
--- NotificationCharsetCheck.pm	18 Mar 2008 16:16:33 -0000	1.7
***************
*** 1,5 ****
  # --
  # Kernel/Output/HTML/NotificationCharsetCheck.pm
! # Copyright (C) 2001-2007 OTRS GmbH, http://otrs.org/
  # --
  # $Id$
--- 1,5 ----
  # --
  # Kernel/Output/HTML/NotificationCharsetCheck.pm
! # Copyright (C) 2001-2008 OTRS AG, http://otrs.org/
  # --
  # $Id$
***************
*** 7,11 ****
  # This software comes with ABSOLUTELY NO WARRANTY. For details, see
  # the enclosed file COPYING for license information (GPL). If you
! # did not receive this file, see http://www.gnu.org/licenses/gpl.txt.
  # --
  
--- 7,11 ----
  # This software comes with ABSOLUTELY NO WARRANTY. For details, see
  # the enclosed file COPYING for license information (GPL). If you
! # did not receive this file, see http://www.gnu.org/licenses/gpl-2.0.txt.
  # --
  
***************
*** 35,55 ****
      my ( $Self, %Param ) = @_;
  
-     my $Output = '';
- 
      # check DisplayCharset
      if ( $Self->{LayoutObject}->{UserCharset} =~ /^utf-8$/i ) {
!         $Param{CorrectDisplayCharset} = 1;
      }
!     else {
!         for ( $Self->{LayoutObject}->{LanguageObject}->GetPossibleCharsets() ) {
!             if ( $Self->{LayoutObject}->{UserCharset} =~ /^$_$/i ) {
!                 $Param{CorrectDisplayCharset} = 1;
!             }
          }
      }
!     if ( !$Param{CorrectDisplayCharset}
!         && $Self->{LayoutObject}->{LanguageObject}->GetRecommendedCharset() )
!     {
!         $Output .= $Self->{LayoutObject}->Notify(
              Priority => 'Notice',
              Data     => '$Text{"The recommended charset for your language is %s!", "'
--- 35,51 ----
      my ( $Self, %Param ) = @_;
  
      # check DisplayCharset
      if ( $Self->{LayoutObject}->{UserCharset} =~ /^utf-8$/i ) {
!         return '';
      }
! 
!     for ( $Self->{LayoutObject}->{LanguageObject}->GetPossibleCharsets() ) {
!         if ( $Self->{LayoutObject}->{UserCharset} =~ /^$_$/i ) {
!             return ''
          }
      }
! 
!     if ( $Self->{LayoutObject}->{LanguageObject}->GetRecommendedCharset() ) {
!         return $Self->{LayoutObject}->Notify(
              Priority => 'Notice',
              Data     => '$Text{"The recommended charset for your language is %s!", "'
***************
*** 57,61 ****
          );
      }
!     return $Output;
  }
  
--- 53,57 ----
          );
      }
!     return '';
  }
  


More information about the cvs-log mailing list