[Jifty-commit] r5250 - in Jifty-DBI/trunk: lib/Jifty/DBI
Jifty commits
jifty-commit at lists.jifty.org
Tue Apr 1 14:31:43 EDT 2008
Author: alexmv
Date: Tue Apr 1 14:31:42 2008
New Revision: 5250
Modified:
Jifty-DBI/trunk/ (props changed)
Jifty-DBI/trunk/lib/Jifty/DBI/Collection.pm
Jifty-DBI/trunk/lib/Jifty/DBI/Handle.pm
Jifty-DBI/trunk/lib/Jifty/DBI/Schema.pm
Log:
r28949 at kohr-ah: chmrr | 2008-04-01 14:31:29 -0400
* Note that booleans render as checkboxes
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 Tue Apr 1 14:31:42 2008
@@ -364,7 +364,7 @@
sub _apply_limits {
my $self = shift;
my $statementref = shift;
- $self->_handle->apply_limits( $statementref, $self->rows_per_page,
+ $self->_handle->apply_limits( $statementref, $self->pager->entries_on_this_page,
$self->first_row );
}
@@ -443,7 +443,7 @@
if ( $self->first_row != 0 ) {
$limit_clause .= $self->first_row . ", ";
}
- $limit_clause .= $self->rows_per_page;
+ $limit_clause .= $self->pager->entries_on_this_page;
} else {
$limit_clause = "";
}
Modified: Jifty-DBI/trunk/lib/Jifty/DBI/Handle.pm
==============================================================================
--- Jifty-DBI/trunk/lib/Jifty/DBI/Handle.pm (original)
+++ Jifty-DBI/trunk/lib/Jifty/DBI/Handle.pm Tue Apr 1 14:31:42 2008
@@ -88,6 +88,7 @@
user => undef,
password => undef,
requiressl => undef,
+ extra => {},
@_
);
@@ -109,7 +110,7 @@
if ( ( !$self->dbh ) || ( !$self->dbh->ping ) || ( $self->dsn ne $dsn ) )
{
my $handle
- = DBI->connect( $self->dsn, $args{'user'}, $args{'password'} )
+ = DBI->connect( $self->dsn, $args{'user'}, $args{'password'}, $args{'extra'} )
|| Carp::croak "Connect Failed $DBI::errstr\n";
#databases do case conversion on the name of columns returned.
@@ -196,6 +197,7 @@
delete $args{'user'};
delete $args{'password'};
+ delete $args{'extra'};
$self->{'dsn'} = "dbi:$driver:"
. CORE::join( ';',
Modified: Jifty-DBI/trunk/lib/Jifty/DBI/Schema.pm
==============================================================================
--- Jifty-DBI/trunk/lib/Jifty/DBI/Schema.pm (original)
+++ Jifty-DBI/trunk/lib/Jifty/DBI/Schema.pm Tue Apr 1 14:31:42 2008
@@ -409,6 +409,7 @@
type is 'boolean',
filters are qw(Jifty::DBI::Filter::Boolean),
default is 'false',
+ render_as 'Checkbox',
_init_handler is sub {
my ($column, $from) = @_;
no strict 'refs';
More information about the Jifty-commit
mailing list