[Bast-commits] r8107 - ironman/IronMan-Web/lib/IronMan/Web/Controller

fade at dev.catalyst.perl.org fade at dev.catalyst.perl.org
Mon Dec 14 17:03:40 GMT 2009


Author: fade
Date: 2009-12-14 17:03:40 +0000 (Mon, 14 Dec 2009)
New Revision: 8107

Modified:
   ironman/IronMan-Web/lib/IronMan/Web/Controller/Root.pm
Log:
use $c->uri_for_action to get older URL

Modified: ironman/IronMan-Web/lib/IronMan/Web/Controller/Root.pm
===================================================================
--- ironman/IronMan-Web/lib/IronMan/Web/Controller/Root.pm	2009-12-14 16:06:55 UTC (rev 8106)
+++ ironman/IronMan-Web/lib/IronMan/Web/Controller/Root.pm	2009-12-14 17:03:40 UTC (rev 8107)
@@ -53,8 +53,8 @@
     
     my $next_post = ($posts->all)[-1];
     
-    my $next_post_url = $next_post->posted_on->strftime('archive/%Y/%m/%d#') . $next_post->post_id;
-    
+    my $next_post_date = $next_post->posted_on;
+    my $next_post_url = $c->uri_for_action('archive/day', $next_post_date->year, $next_post_date->month, $next_post_date->day ). '#' . $next_post->post_id;
     $c->stash( 'older_url' => $next_post_url );
 }
 




More information about the Bast-commits mailing list