[vhffs-dev] [786] sort history by date

[ Thread Index | Date Index | More vhffs.org/vhffs-dev Archives ]


Revision: 786
Author:   gradator
Date:     2007-08-28 18:10:24 +0000 (Tue, 28 Aug 2007)

Log Message:
-----------
sort history by date

Modified Paths:
--------------
    trunk/vhffs-panel/group/history.pl
    trunk/vhffs-panel/history.pl


Modified: trunk/vhffs-panel/group/history.pl
===================================================================
--- trunk/vhffs-panel/group/history.pl	2007-08-28 17:14:58 UTC (rev 785)
+++ trunk/vhffs-panel/group/history.pl	2007-08-28 18:10:24 UTC (rev 786)
@@ -91,7 +91,7 @@
 	}
 	else
 	{
-		foreach( sort keys %{$history} )
+		foreach( sort { $a <=> $b } keys %{$history} )
 		{
 			$subtemplate = new HTML::Template( filename => $templatedir."/panel/group/history_part.tmpl" );
 			my $date = Vhffs::Functions::parse_date( $history->{$_}{date} );
@@ -105,7 +105,7 @@
 				$datestr = gettext("no information about date");
 			}
 			$subtemplate->param( DATE => $datestr );
-			$subtemplate->param( TYPE => Vhffs::Functions::type_string_from_type_id( $history->{$_}{type} ) );
+			$subtemplate->param( TYPE => $_." ---- ".Vhffs::Functions::type_string_from_type_id( $history->{$_}{type} ) );
 			my $object = Vhffs::ObjectFactory::fetch_object( $vhffs , $history->{$_}{object_id} );
 			$subtemplate->param( NAME => $object->get_title );
 			$subtemplate->param( EVENT => $history->{$_}{message} );

Modified: trunk/vhffs-panel/history.pl
===================================================================
--- trunk/vhffs-panel/history.pl	2007-08-28 17:14:58 UTC (rev 785)
+++ trunk/vhffs-panel/history.pl	2007-08-28 18:10:24 UTC (rev 786)
@@ -116,7 +116,7 @@
 	}
 	else
 	{
-		foreach( sort keys %{$history} )
+		foreach( sort { $a <=> $b } keys %{$history} )
 		{
 			$subtemplate = new HTML::Template( filename => $templatesdir."/panel/misc/history_part.tmpl" );
 			$date =  Vhffs::Functions::parse_date( $history->{$_}{date} );


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/