[otrs-cvs] ImportExport/Kernel/System/ImportExport/FormatBackend CSV.pm, 1.2, 1.3

cvs-log at otrs.org cvs-log at otrs.org
Mon Feb 4 15:21:27 GMT 2008


Comments:
Update of /home/cvs/ImportExport/Kernel/System/ImportExport/FormatBackend
In directory lancelot:/tmp/cvs-serv15660/Kernel/System/ImportExport/FormatBackend

Modified Files:
	CSV.pm 
Log Message:
Improved modularisation.

Author: mh

Index: CSV.pm
===================================================================
RCS file: /home/cvs/ImportExport/Kernel/System/ImportExport/FormatBackend/CSV.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** CSV.pm	4 Feb 2008 12:19:54 -0000	1.2
--- CSV.pm	4 Feb 2008 15:21:22 -0000	1.3
***************
*** 81,85 ****
  
      my $Attributes = $FormatBackend->AttributesGet(
-         Type   => 'Import',
          UserID => 1,
      );
--- 81,84 ----
***************
*** 91,128 ****
  
      # check needed stuff
!     for my $Argument (qw(Type UserID)) {
!         if ( !$Param{$Argument} ) {
!             $Self->{LogObject}->Log(
!                 Priority => 'error',
!                 Message  => "Need $Argument!",
!             );
!             return;
!         }
      }
  
!     my $Attributes = [];
! 
!     if ( $Param{Type} eq 'Import' ) {
!         $Attributes = [
!             {
!                 Key         => 'ImportDirectory',
!                 Name        => 'Import Directory',
!                 Description => 'Only needed for automated importing per script',
!                 Type        => 'Text',
!                 Required    => 0,
!             },
!         ];
!     }
!     else {
!         $Attributes = [
!             {
!                 Key         => 'ExportDirectory',
!                 Name        => 'Export Directory',
!                 Description => 'Only needed for automated importing per script',
!                 Type        => 'Text',
!                 Required    => 0,
!             },
!         ];
!     }
  
      return $Attributes;
--- 90,114 ----
  
      # check needed stuff
!     if ( !$Param{UserID} ) {
!         $Self->{LogObject}->Log( Priority => 'error', Message  => 'Need UserID!' );
!         return;
      }
  
!     my $Attributes = [
!         {
!             Key         => 'ImportDirectory',
!             Name        => 'Import Directory',
!             Description => 'Only needed for automated importing per script',
!             Type        => 'Text',
!             Required    => 0,
!         },
!         {
!             Key         => 'ExportDirectory',
!             Name        => 'Export Directory',
!             Description => 'Only needed for automated importing per script',
!             Type        => 'Text',
!             Required    => 0,
!         },
!     ];
  
      return $Attributes;


More information about the cvs-log mailing list