[Jifty-commit] jifty branch, master, updated. jifty-1.01209-15-g2179422

Jifty commits jifty-commit at lists.jifty.org
Sat Jan 22 13:31:03 EST 2011


The branch, master has been updated
       via  217942230a6b7ce39a75768179eaa7144f8d448e (commit)
       via  98bef7b1616cb3458a2d75cb12d19f920ee5d664 (commit)
       via  8376ae8bc5624918c33a571dfebfe63afc383e6b (commit)
      from  18f5b117edb2bc62d705a4dcb395123dfa0158ad (commit)

Summary of changes:
 lib/Jifty/DateTime.pm   |   11 ++++++++++-
 lib/Jifty/Dispatcher.pm |    6 ++++--
 2 files changed, 14 insertions(+), 3 deletions(-)

- Log -----------------------------------------------------------------
commit 8376ae8bc5624918c33a571dfebfe63afc383e6b
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Thu Jan 20 06:13:37 2011 -0500

    Add a timestamp type

diff --git a/lib/Jifty/DateTime.pm b/lib/Jifty/DateTime.pm
index 678c2ed..08358fe 100644
--- a/lib/Jifty/DateTime.pm
+++ b/lib/Jifty/DateTime.pm
@@ -45,6 +45,15 @@ BEGIN {
 
 use base qw(Jifty::Object DateTime);
 
+use Jifty::DBI::Schema;
+Jifty::DBI::Schema->register_types(
+    timestamp => sub {
+        encode_on_select is 1,
+        type is 'timestamp',
+        filters are qw( Jifty::Filter::DateTime Jifty::DBI::Filter::DateTime ),
+    },
+);
+
 =head2 new ARGS
 
 See L<DateTime/new>. If we get what appears to be a date, then we keep this in

commit 98bef7b1616cb3458a2d75cb12d19f920ee5d664
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Thu Jan 20 06:13:54 2011 -0500

    Add a default timezone configuration

diff --git a/lib/Jifty/DateTime.pm b/lib/Jifty/DateTime.pm
index 08358fe..a60861c 100644
--- a/lib/Jifty/DateTime.pm
+++ b/lib/Jifty/DateTime.pm
@@ -250,7 +250,7 @@ latter is merely an alias for the former.
 
 sub set_current_user_timezone {
     my $self    = shift;
-    my $default = shift || 'UTC';
+    my $default = shift || Jifty->config->framework('Timezone') || 'UTC';
     my $tz = $self->current_user_has_timezone || $default;
 
     $self->set_time_zone($tz);

commit 217942230a6b7ce39a75768179eaa7144f8d448e
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Sat Jan 22 13:19:13 2011 -0500

    Compiled condition cache should depend on cwd, as well
    
    Otherwise, the second 'on' rule will never match here, as it is cached
    to mean "/", instead of "/foo/":
    
      on '' => run { ... };
      under '/foo' => [
        on '' => run { ... };
      ];

diff --git a/lib/Jifty/Dispatcher.pm b/lib/Jifty/Dispatcher.pm
index e986123..618c214 100644
--- a/lib/Jifty/Dispatcher.pm
+++ b/lib/Jifty/Dispatcher.pm
@@ -1032,8 +1032,10 @@ sub _compile_condition {
     # Previously compiled (eg. a qr{} -- return it verbatim)
     return $cond if ref $cond;
 
-    my $cachekey = join('-', (($Dispatcher->{rule} eq 'on') ? 'on' : 'in'),
-                             $cond);
+    my $cachekey = join('-',
+                        (($Dispatcher->{rule} eq 'on') ? 'on' : 'in'),
+                        $self->{cwd},
+                        $cond);
     unless ( $CONDITION_CACHE{$cachekey} ) {
 
         my $compiled = $cond;

-----------------------------------------------------------------------


More information about the Jifty-commit mailing list