[Bps-public-commit] App-Changeloggr branch, master, updated. 7ca43f2789f9ddd2714bef8df6eeffc48df5dee4

Alex M Vandiver alexmv at bestpractical.com
Tue Aug 4 12:49:20 EDT 2009


The branch, master has been updated
       via  7ca43f2789f9ddd2714bef8df6eeffc48df5dee4 (commit)
      from  5e6ce7be8324b4bb2475939c1a9fac4d445d5f17 (commit)

Summary of changes:
 lib/App/Changeloggr/Dispatcher.pm |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

- Log -----------------------------------------------------------------
commit 7ca43f2789f9ddd2714bef8df6eeffc48df5dee4
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Tue Aug 4 12:49:00 2009 -0400

    Some error-proofing

diff --git a/lib/App/Changeloggr/Dispatcher.pm b/lib/App/Changeloggr/Dispatcher.pm
index 9f3b7f9..bd59867 100644
--- a/lib/App/Changeloggr/Dispatcher.pm
+++ b/lib/App/Changeloggr/Dispatcher.pm
@@ -26,9 +26,12 @@ on '/admin/created-changelog' => run {
     redirect "/admin/changelog/changes/$admin_token";
 };
 
+on '/changelog' => redirect '/';
+
 before '/changelog/*' => run {
     my $cl = Changelog( name => $1 );
-    return unless $cl->id and $cl->current_user_is_admin;
+    redirect '/' unless defined $cl and $cl->id;
+    return unless $cl->current_user_is_admin;
     Jifty->web->navigation->child(
         "Manage" => url => "/admin/changelog/" . $cl->admin_token,
     );

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



More information about the Bps-public-commit mailing list