[Rt-commit] r18813 - in rt/3.999/branches/config-in-db: lib/RT/ScripAction sbin share/html/Dashboards t/api

sunnavy at bestpractical.com sunnavy at bestpractical.com
Mon Mar 16 21:51:03 EDT 2009


Author: sunnavy
Date: Mon Mar 16 21:51:01 2009
New Revision: 18813

Modified:
   rt/3.999/branches/config-in-db/lib/RT/Bootstrap.pm
   rt/3.999/branches/config-in-db/lib/RT/ScripAction/Notify.pm
   rt/3.999/branches/config-in-db/sbin/rt-email-dashboards
   rt/3.999/branches/config-in-db/share/html/Dashboards/Subscription.html
   rt/3.999/branches/config-in-db/t/api/date.t

Log:
time_zone => timezone

Modified: rt/3.999/branches/config-in-db/lib/RT/Bootstrap.pm
==============================================================================
--- rt/3.999/branches/config-in-db/lib/RT/Bootstrap.pm	(original)
+++ rt/3.999/branches/config-in-db/lib/RT/Bootstrap.pm	Mon Mar 16 21:51:01 2009
@@ -64,7 +64,7 @@
         'canonicalize_email_match'     => '',
         'canonicalize_email_replace'   => '',
         'canonicalize_on_create'       => 0,
-        'canonicalize_redirect_ur_ls'  => 0,
+        'canonicalize_redirect_urls'   => 0,
         'chart_font'                   => undef,
         'comment_address'              => '',
         'correspond_address'           => '',
@@ -167,7 +167,7 @@
         'store_loops'                            => undef,
         'strict_link_acl'                        => 1,
         'suppress_inline_text_files'             => undef,
-        'time_zone'                              => 'America/New_York',
+        'timezone'                               => 'America/New_York',
         'truncate_long_attachments'              => undef,
         'trust_html_attachments'                 => undef,
         'use_friendly_from_line'                 => 1,

Modified: rt/3.999/branches/config-in-db/lib/RT/ScripAction/Notify.pm
==============================================================================
--- rt/3.999/branches/config-in-db/lib/RT/ScripAction/Notify.pm	(original)
+++ rt/3.999/branches/config-in-db/lib/RT/ScripAction/Notify.pm	Mon Mar 16 21:51:01 2009
@@ -154,7 +154,7 @@
     }
 
     my $skip = '';
-    unless ( RT->config->get('NotifyActor') ) {
+    unless ( RT->config->get('notify_actor') ) {
         if ( my $creator = $self->transaction->creator_obj->email ) {
             $skip = lc $creator;
         }
@@ -181,7 +181,7 @@
         $recipients{'to'} = delete $recipients{'cc'};
     }
 
-    if ( my $format = RT->config->get('UseFriendlyToLine') ) {
+    if ( my $format = RT->config->get('use_friendly_to_line') ) {
         unless ( @{ $recipients{'to'} } ) {
             push @{ $self->{'PseudoTo'} ||= [] }, sprintf $format, $self->argument, $ticket->id;
         }

Modified: rt/3.999/branches/config-in-db/sbin/rt-email-dashboards
==============================================================================
--- rt/3.999/branches/config-in-db/sbin/rt-email-dashboards	(original)
+++ rt/3.999/branches/config-in-db/sbin/rt-email-dashboards	Mon Mar 16 21:51:01 2009
@@ -121,7 +121,7 @@
         next;
     }
 
-    my ($hour, $dow, $dom) = hour_dow_dom_in($user->timezone || RT->config->get('time_zone'));
+    my ($hour, $dow, $dom) = hour_dow_dom_in($user->timezone || RT->config->get('timezone'));
     $hour .= ':00';
     debug "Checking %1's subscriptions: hour %2, dow %3, dom %4",
           $user->name, $hour, $dow, $dom;

Modified: rt/3.999/branches/config-in-db/share/html/Dashboards/Subscription.html
==============================================================================
--- rt/3.999/branches/config-in-db/share/html/Dashboards/Subscription.html	(original)
+++ rt/3.999/branches/config-in-db/share/html/Dashboards/Subscription.html	Mon Mar 16 21:51:01 2009
@@ -185,7 +185,7 @@
 my ($title, @results);
 my ($val, $msg);
 my $Loaded = 0;
-my $timezone = Jifty->web->current_user->user_object->timezone || RT->config->get('time_zone');
+my $timezone = Jifty->web->current_user->user_object->timezone || RT->config->get('timezone');
 
 use RT::Dashboard;
 my $dashboard_obj = RT::Dashboard->new( current_user => Jifty->web->current_user );

Modified: rt/3.999/branches/config-in-db/t/api/date.t
==============================================================================
--- rt/3.999/branches/config-in-db/t/api/date.t	(original)
+++ rt/3.999/branches/config-in-db/t/api/date.t	Mon Mar 16 21:51:01 2009
@@ -21,7 +21,7 @@
     # set timezone in all places to UTC
     RT->system_user->user_object->__set(column => 'timezone', value => 'UTC')
                                 if RT->system_user->user_object->timezone;
-    RT->config->set( Timezone => 'UTC' );
+    RT->config->set( timezone => 'UTC' );
 }
 
 my $current_user;
@@ -53,7 +53,7 @@
     is($date->timezone, 'UTC', "the deafult value is always UTC");
     is($date->timezone('server'), 'UTC', "wasn't changed");
 
-    RT->config->set( Timezone => 'Africa/Ouagadougou' );
+    RT->config->set( timezone => 'Africa/Ouagadougou' );
     is($date->timezone('server'),
        'Africa/Ouagadougou',
        "timezone of the RT server was changed");
@@ -71,12 +71,12 @@
        "in user context returns timezone of the server if user's one is not defined");
     is($date->timezone, 'UTC', "the deafult value is always UTC");
 
-    RT->config->set( Timezone => 'GMT' );
+    RT->config->set( timezone => 'GMT' );
     is($date->timezone('server'),
        'UTC',
        "timezone is GMT which one is alias for UTC");
 
-    RT->config->set( Timezone => '' );
+    RT->config->set( timezone => '' );
     is($date->timezone, 'UTC', "dropped all timzones to UTC");
     is($date->timezone('user'),
        'UTC',
@@ -85,7 +85,7 @@
        'UTC',
        "timezone of the server is not defined so UTC");
 
-    RT->config->set( Timezone => 'UTC' );
+    RT->config->set( timezone => 'UTC' );
 }
 
 {
@@ -290,11 +290,11 @@
     $date->set(format => 'unknown', value => 'weird date');
     is($date->unix, 0, "date was wrong");
 
-    RT->config->set( Timezone => 'Europe/Moscow' );
+    RT->config->set( timezone => 'Europe/Moscow' );
     $date->set(format => 'datemanip', value => '2005-11-28 15:10:00');
     is($date->iso, '2005-11-28 12:10:00', "YYYY-DD-MM hh:mm:ss");
 
-    RT->config->set( Timezone => 'UTC' );
+    RT->config->set( timezone => 'UTC' );
     $date->set(format => 'datemanip', value => '2005-11-28 15:10:00');
     is($date->iso, '2005-11-28 15:10:00', "YYYY-DD-MM hh:mm:ss");
 
@@ -309,7 +309,7 @@
     $date->set(format => 'unknown', value => 'weird date');
     is($date->unix, 0, "date was wrong");
 
-    RT->config->set( Timezone => 'Europe/Moscow' );
+    RT->config->set( timezone => 'Europe/Moscow' );
     $date->set(format => 'unknown', value => '2005-11-28 15:10:00');
     is($date->iso, '2005-11-28 12:10:00', "YYYY-DD-MM hh:mm:ss");
 
@@ -327,7 +327,7 @@
         restore_time();
     }
 
-    RT->config->set( Timezone => 'UTC' );
+    RT->config->set( timezone => 'UTC' );
     $date->set(format => 'unknown', value => '2005-11-28 15:10:00');
     is($date->iso, '2005-11-28 15:10:00', "YYYY-DD-MM hh:mm:ss");
 
@@ -344,7 +344,7 @@
 { # SetToMidnight
     my $date = RT::Date->new(current_user => RT->system_user);
 
-    RT->config->set( Timezone => 'Europe/Moscow' );
+    RT->config->set( timezone => 'Europe/Moscow' );
     $date->set(format => 'ISO', value => '2005-11-28 15:10:00');
     $date->set_to_midnight;
     is($date->iso, '2005-11-28 00:00:00', "default is utc");
@@ -372,7 +372,7 @@
     $date->set_to_midnight(timezone => 'server');
     is($date->iso, '2005-11-27 21:00:00', "server context");
 
-    RT->config->set( Timezone => 'UTC' );
+    RT->config->set( timezone => 'UTC' );
 }
 
 { # set_to_now
@@ -428,18 +428,18 @@
     my $date = RT::Date->new(current_user =>  $current_user );
     is($date->as_string, "Not set", "as_string returns 'Not set'");
 
-    RT->config->set( DateTimeFormat => '');
+    RT->config->set( date_time_format => '');
     $date->unix(1);
     is($date->as_string, 'Thu Jan 01 00:00:01 1970', "correct string");
     is($date->as_string(date => 0), '00:00:01', "correct string");
     is($date->as_string(time => 0), 'Thu Jan 01 1970', "correct string");
     is($date->as_string(date => 0, time => 0), 'Thu Jan 01 00:00:01 1970', "invalid input");
 
-    RT->config->set( DateTimeFormat => 'RFC2822' );
+    RT->config->set( date_time_format => 'RFC2822' );
     $date->unix(1);
     is($date->as_string, 'Thu, 1 Jan 1970 00:00:01 +0000', "correct string");
 
-    RT->config->set( DateTimeFormat => { format => 'RFC2822', seconds => 0 } );
+    RT->config->set( date_time_format => { format => 'RFC2822', seconds => 0 } );
     $date->unix(1);
     is($date->as_string, 'Thu, 1 Jan 1970 00:00 +0000', "correct string");
     is($date->as_string(seconds => 1), 'Thu, 1 Jan 1970 00:00:01 +0000', "correct string");


More information about the Rt-commit mailing list