[Jifty-commit] r6943 - jifty/trunk/lib/Jifty/Plugin
Jifty commits
jifty-commit at lists.jifty.org
Wed May 6 07:47:02 EDT 2009
Author: sunnavy
Date: Wed May 6 07:47:01 2009
New Revision: 6943
Modified:
jifty/trunk/lib/Jifty/Plugin/Config.pm
Log:
add restart_url config item so we can cusomize more flexible
Modified: jifty/trunk/lib/Jifty/Plugin/Config.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Plugin/Config.pm (original)
+++ jifty/trunk/lib/Jifty/Plugin/Config.pm Wed May 6 07:47:01 2009
@@ -6,8 +6,7 @@
__PACKAGE__->mk_classdata( after_restart_url => '/' );
__PACKAGE__->mk_classdata( wait_seconds => 5 );
__PACKAGE__->mk_classdata( config_url => '/__jifty/config' );
-__PACKAGE__->mk_classdata(
- restart_url => __PACKAGE__->config_url . '/restart.html' );
+__PACKAGE__->mk_classdata( restart_url => '/__jifty/config/restart.html' );
=head2 NAME
@@ -21,7 +20,8 @@
- Config:
after_restart_url: '/'
wait_seconds: 5
- config_url: '__jifty/config'
+ config_url: '/__jifty/config'
+ restart_url: '/__jifty/config/restart.html'
=head2 DESCRIPTION
@@ -36,20 +36,15 @@
after_restart_url is the url where we will redirect to after restart
wait_seconds are the seconds that we wait for before redirecting
config_url is the url where we will update the config
+restart_url is the url where we acturally do the restart, with a wait page
=cut
sub init {
my $self = shift;
my %opt = @_;
- if ( $opt{after_restart_url} ) {
- __PACKAGE__->after_restart_url( $opt{after_restart_url} );
- }
- if ( $opt{wait_seconds} ) {
- __PACKAGE__->wait_seconds( $opt{wait_seconds} );
- }
- if ( $opt{config_url} ) {
- __PACKAGE__->config_url( $opt{config_url} );
+ for ( qw/after_restart_url restart_url config_url wait_seconds/ ) {
+ __PACKAGE__->$_( $opt{$_} );
}
}
More information about the Jifty-commit
mailing list