[Rt-commit] r18912 - in rt/3.999/branches/config-in-db: lib t/web
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Mon Mar 23 00:48:14 EDT 2009
Author: sunnavy
Date: Mon Mar 23 00:48:11 2009
New Revision: 18912
Modified:
rt/3.999/branches/config-in-db/lib/RT.pm
rt/3.999/branches/config-in-db/lib/RT/Graph/Tickets.pm
rt/3.999/branches/config-in-db/t/web/rights1.t
Log:
no $RT::WebPath any more, please use RT->config->get
Modified: rt/3.999/branches/config-in-db/lib/RT.pm
==============================================================================
--- rt/3.999/branches/config-in-db/lib/RT.pm (original)
+++ rt/3.999/branches/config-in-db/lib/RT.pm Mon Mar 23 00:48:11 2009
@@ -119,11 +119,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/branches/config-in-db/lib/RT/Graph/Tickets.pm
==============================================================================
--- rt/3.999/branches/config-in-db/lib/RT/Graph/Tickets.pm (original)
+++ rt/3.999/branches/config-in-db/lib/RT/Graph/Tickets.pm Mon Mar 23 00:48:11 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/branches/config-in-db/t/web/rights1.t
==============================================================================
--- rt/3.999/branches/config-in-db/t/web/rights1.t (original)
+++ rt/3.999/branches/config-in-db/t/web/rights1.t Mon Mar 23 00:48:11 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