From 345d50ec6b65ace29bfaf4a7373d1dbec1d72831 Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Thu, 7 Jun 2012 14:19:28 -0700 Subject: [PATCH] eliminate some noisy warnings so we can see anything important --- rt/lib/RT/Interface/Web.pm | 10 ++++++++-- rt/lib/RT/System.pm | 22 ---------------------- 2 files changed, 8 insertions(+), 24 deletions(-) diff --git a/rt/lib/RT/Interface/Web.pm b/rt/lib/RT/Interface/Web.pm index 65cf308b2..7c9d57821 100644 --- a/rt/lib/RT/Interface/Web.pm +++ b/rt/lib/RT/Interface/Web.pm @@ -1110,8 +1110,14 @@ sub ValidateWebConfig { } } - if ($ENV{SCRIPT_NAME} ne RT->Config->Get('WebPath')) { - $RT::Logger->warn("The actual SCRIPT_NAME ($ENV{SCRIPT_NAME}) does NOT match the configured WebPath ($RT::WebPath). Perhaps you should Set(\$WebPath, '$ENV{SCRIPT_NAME}'); in RT_SiteConfig.pm, otherwise your internal links may be broken."); + #i don't understand how this was ever expected to work + # (even without our dum double // hack)?? + #if ($ENV{SCRIPT_NAME} ne RT->Config->Get('WebPath')) { + ( my $WebPath = RT->Config->Get('WebPath') ) =~ s(/+)(/)g; + ( my $script_name = $ENV{SCRIPT_NAME} ) =~ s(/+)(/)g; + my $script_name_prefix = substr($script_name, 0, length($WebPath)); + if ( $script_name_prefix ne $WebPath ) { + $RT::Logger->warn("The actual SCRIPT_NAME ($script_name) does NOT match the configured WebPath ($WebPath). Perhaps you should Set(\$WebPath, '$script_name_prefix'); in RT_SiteConfig.pm, otherwise your internal links may be broken."); } } diff --git a/rt/lib/RT/System.pm b/rt/lib/RT/System.pm index d0dc50131..d9aaf1cad 100644 --- a/rt/lib/RT/System.pm +++ b/rt/lib/RT/System.pm @@ -261,28 +261,6 @@ sub QueueCacheNeedsUpdate { } } -=head2 QueueCacheNeedsUpdate ( 1 ) - -Attribute to decide when SelectQueue needs to flush the list of queues - and retrieve new ones. Set when queues are created, enabled/disabled - and on certain acl changes. Should also better understand group management. - -If passed a true value, will update the attribute to be the current time. - -=cut - -sub QueueCacheNeedsUpdate { - my $self = shift; - my $update = shift; - - if ($update) { - return $self->SetAttribute(Name => 'QueueCacheNeedsUpdate', Content => time); - } else { - my $cache = $self->FirstAttribute('QueueCacheNeedsUpdate'); - return (defined $cache ? $cache->Content : 0 ); - } -} - RT::Base->_ImportOverlays(); 1; -- 2.11.0