[Rt-commit] r19508 - in rt/3.999/trunk: . lib t/web
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Thu May 7 03:11:35 EDT 2009
Author: sunnavy
Date: Thu May 7 03:11:34 2009
New Revision: 19508
Modified:
rt/3.999/trunk/ (props changed)
rt/3.999/trunk/lib/RT.pm
rt/3.999/trunk/lib/RT/Graph/Tickets.pm
rt/3.999/trunk/t/web/rights1.t
Log:
r20465 at sunnavys-mb (orig r18912): sunnavy | 2009-03-23 12:48:11 +0800
no $RT::WebPath any more, please use RT->config->get
Modified: rt/3.999/trunk/lib/RT.pm
==============================================================================
--- rt/3.999/trunk/lib/RT.pm (original)
+++ rt/3.999/trunk/lib/RT.pm Thu May 7 03:11:34 2009
@@ -118,11 +118,6 @@
$Config = RT::Model::Config->new;
# require RT::I18N;
-
- # RT::Essentials mistakenly recommends that WebPath be set to '/'.
- # If the user does that, do what they mean.
- $RT::WebPath = '' if ( $RT::WebPath eq '/' );
-
RT::I18N->init;
}
Modified: rt/3.999/trunk/lib/RT/Graph/Tickets.pm
==============================================================================
--- rt/3.999/trunk/lib/RT/Graph/Tickets.pm (original)
+++ rt/3.999/trunk/lib/RT/Graph/Tickets.pm Thu May 7 03:11:34 2009
@@ -234,7 +234,7 @@
my %node_style = (
style => 'filled,rounded',
%{ $ticket_status_style{ $args{'ticket'}->status } || {} },
- URL => $RT::WebPath . '/Ticket/Display.html?id=' . $args{'ticket'}->id,
+ URL => RT->config->get('web_path') . '/Ticket/Display.html?id=' . $args{'ticket'}->id,
tooltip =>
gv_escape( $args{'ticket'}->subject || '#' . $args{'ticket'}->id ),
);
Modified: rt/3.999/trunk/t/web/rights1.t
==============================================================================
--- rt/3.999/trunk/t/web/rights1.t (original)
+++ rt/3.999/trunk/t/web/rights1.t Thu May 7 03:11:34 2009
@@ -31,9 +31,9 @@
# get the top page
$agent->login($user_obj->name => 'customer');
# Test for absence of Configure and Preferences tabs.
-ok(!$agent->find_link( url => "$RT::WebPath/Admin/",
+ok(!$agent->find_link( url => RT->config->get('web_path') . "/Admin/",
text => 'Configuration'), "No config tab" );
-ok(!$agent->find_link( url => "$RT::WebPath/User/Prefs.html",
+ok(!$agent->find_link( url => RT->config->get('web_path') . "/User/Prefs.html",
text => 'Preferences'), "No prefs pane" );
# Now test for their presence, one at a time. Sleep for a bit after
@@ -45,7 +45,7 @@
$agent->reload;
like($agent->{'content'} , qr/Logout/i, "Reloaded page successfully");
-ok($agent->find_link( url => "$RT::WebPath/Admin/",
+ok($agent->find_link( url => RT->config->get('web_path') . "/Admin/",
text => 'Configuration'), "Found config tab" );
my ($revokeid,$revokemsg) =$user_obj->principal->revoke_right(right => 'ShowConfigTab');
ok ($revokeid,$revokemsg);
@@ -58,7 +58,7 @@
($revokeid,$revokemsg) = $user_obj->principal->revoke_right(right => 'ModifySelf');
ok ($revokeid,$revokemsg);
# Good. Now load the search page and test Load/Save Search.
-$agent->follow_link( url => "$RT::WebPath/Search/Build.html",
+$agent->follow_link( url => RT->config->get('web_path') . "/Search/Build.html",
text => 'Tickets');
is($agent->{'status'}, 200, "Fetched search builder page");
ok($agent->{'content'} !~ /Load saved search/i, "No search loading box");
More information about the Rt-commit
mailing list