[otrs-cvs] Fred/Kernel/System/Fred ConfigLog.pm,1.5,1.6
cvs-log at otrs.org
cvs-log at otrs.org
Sun Feb 3 07:38:02 GMT 2008
Comments:
Update of /home/cvs/Fred/Kernel/System/Fred
In directory lancelot:/tmp/cvs-serv18581/Kernel/System/Fred
Modified Files:
ConfigLog.pm
Log Message:
Insert a nice config log mechanism
Author: tr
Index: ConfigLog.pm
===================================================================
RCS file: /home/cvs/Fred/Kernel/System/Fred/ConfigLog.pm,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** ConfigLog.pm 17 Oct 2007 14:31:53 -0000 1.5
--- ConfigLog.pm 3 Feb 2008 07:37:57 -0000 1.6
***************
*** 1,5 ****
# --
# Kernel/System/Fred/ConfigLog.pm
! # Copyright (C) 2001-2007 OTRS GmbH, http://otrs.org/
# --
# $Id$
--- 1,5 ----
# --
# Kernel/System/Fred/ConfigLog.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.
# --
***************
*** 113,116 ****
--- 113,126 ----
}
+ # sort the data
+ my $Config_Ref = $Self->{ConfigObject}->Get('Fred::ConfigLog');
+ my $OrderBy = defined($Config_Ref->{OrderBy}) ? $Config_Ref->{OrderBy} : 3;
+ if ($OrderBy == 3) {
+ @LogMessages = sort { $b->[$OrderBy] <=> $a->[$OrderBy] } @LogMessages;
+ }
+ else {
+ @LogMessages = sort { $a->[$OrderBy] cmp $b->[$OrderBy] } @LogMessages;
+ }
+
$Param{ModuleRef}->{Data} = \@LogMessages ;
return 1;
***************
*** 260,264 ****
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.
=cut
--- 270,274 ----
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.
=cut
More information about the cvs-log
mailing list