[Jifty-commit] r2207 - in Jifty-DBI/trunk: lib/Jifty/DBI
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Mon Nov 27 22:08:30 EST 2006
Author: jesse
Date: Mon Nov 27 22:08:30 2006
New Revision: 2207
Modified:
Jifty-DBI/trunk/ (props changed)
Jifty-DBI/trunk/lib/Jifty/DBI/Collection.pm
Log:
r45513 at 120: jesse | 2006-11-27 22:08:18 -0500
* Jifty::DBI::Collection: Pass through the arguments to L</new> to L<clean_slate> and on to L<implicit_clauses>
Modified: Jifty-DBI/trunk/lib/Jifty/DBI/Collection.pm
==============================================================================
--- Jifty-DBI/trunk/lib/Jifty/DBI/Collection.pm (original)
+++ Jifty-DBI/trunk/lib/Jifty/DBI/Collection.pm Mon Nov 27 22:08:30 2006
@@ -102,7 +102,7 @@
);
$self->_handle( $args{'handle'} ) if ( $args{'handle'} );
$self->table( $self->new_item->table() );
- $self->clean_slate();
+ $self->clean_slate(%args);
}
sub _init_pager {
@@ -125,6 +125,7 @@
sub clean_slate {
my $self = shift;
+ my %args = (@_);
$self->redo_search();
$self->_init_pager();
$self->{'itemscount'} = 0;
@@ -148,14 +149,15 @@
_open_parens
);
- $self->implicit_clauses();
+ $self->implicit_clauses(%args);
$self->_is_limited(0);
}
=head2 implicit_clauses
Called by L</clean_slate> to set up any implicit clauses that the
-collection B<always> has. Defaults to doing nothing.
+collection B<always> has. Defaults to doing nothing. Is passed the
+paramhash passed into L</new>.
=cut
@@ -1195,7 +1197,7 @@
$self->{'order_by'} = \@args;
$self->redo_search();
}
- return $self->{'order_by'};
+ return ( $self->{'order_by'} || []);
}
=head2 _order_clause
More information about the Jifty-commit
mailing list