cvsuser 05/09/16 12:51:57
Modified: App-Repository/lib/App/ValueDomain Repository.pm
Log:
add sorting (order_by)
Revision Changes Path
1.5 +6 -2 p5ee/App-Repository/lib/App/ValueDomain/Repository.pm
Index: Repository.pm
===================================================================
RCS file: /cvs/public/p5ee/App-Repository/lib/App/ValueDomain/Repository.pm,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Repository.pm 16 Sep 2005 19:43:11 -0000 1.4
+++ Repository.pm 16 Sep 2005 19:51:57 -0000 1.5
@@ -128,7 +128,11 @@
if ($rep && $table && $valuecolumn && $params) {
my @cols = ( $valuecolumn );
push(@cols, $labelcolumn) if ($labelcolumn);
- $rows = $rep->get_rows($table, \%params, [EMAIL PROTECTED]);
+ my ($options);
+ if ($self->{order_by}) {
+ $options = { order_by => $self->{order_by} };
+ }
+ $rows = $rep->get_rows($table, \%params, [EMAIL PROTECTED],
$options);
$values = [];
$labels = {};
if ($self->{extra_values}) {