[Jifty-commit] r4321 - wifty/trunk/lib/Wifty/Model
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Sat Oct 27 23:36:28 EDT 2007
Author: ruz
Date: Sat Oct 27 23:36:27 2007
New Revision: 4321
Modified:
wifty/trunk/lib/Wifty/Model/Revision.pm
Log:
* fetch only one record from the DB
Modified: wifty/trunk/lib/Wifty/Model/Revision.pm
==============================================================================
--- wifty/trunk/lib/Wifty/Model/Revision.pm (original)
+++ wifty/trunk/lib/Wifty/Model/Revision.pm Sat Oct 27 23:36:27 2007
@@ -54,8 +54,9 @@
quote_value => 0,
case_sensitive => 1
);
- $revisions->order_by( { column => 'id' } );
- return $revisions->last;
+ $revisions->order_by( { column => 'id', order => 'desc' } );
+ $revisions->rows_per_page(1);
+ return $revisions->first;
}
sub next {
@@ -77,6 +78,7 @@
case_sensitive => 1
);
$revisions->order_by( { column => 'id' } );
+ $revisions->rows_per_page(1);
return $revisions->first;
}
More information about the Jifty-commit
mailing list