]> git.uio.no Git - usit-rt.git/blobdiff - etc/upgrade/sanity-check-stylesheets.pl
Putting 4.2.0 on top of 4.0.17
[usit-rt.git] / etc / upgrade / sanity-check-stylesheets.pl
index 6ae1cc61c4264e5f421c242f08916f5df0fa9e4a..aa4faafb47b6793259f89bdc8ae90ef6626ac6df 100644 (file)
@@ -50,7 +50,7 @@ use warnings;
 
 use RT;
 RT::LoadConfig();
-RT->Config->Set('LogToScreen' => 'debug');
+RT->Config->Set('LogToSTDERR' => 'debug');
 RT::Init();
 
 $| = 1;
@@ -59,20 +59,20 @@ use RT::Users;
 my $users = RT::Users->new( $RT::SystemUser );
 $users->UnLimit();
 
-my @comp_roots = RT::Interface::Web->ComponentRoots;
-my %comp_root_check_cache;
+my @static_roots = RT::Interface::Web->StaticRoots;
+my %static_root_check_cache;
 sub stylesheet_exists {
     my $stylesheet = shift;
 
-    return $comp_root_check_cache{$stylesheet}
-        if exists $comp_root_check_cache{$stylesheet};
+    return $static_root_check_cache{$stylesheet}
+        if exists $static_root_check_cache{$stylesheet};
 
-    for my $comp_root (@comp_roots) {
-        return ++$comp_root_check_cache{$stylesheet}
-            if -d "$comp_root/NoAuth/css/$stylesheet";
+    for my $static_root (@static_roots) {
+        return ++$static_root_check_cache{$stylesheet}
+            if -d "$static_root/css/$stylesheet";
     }
 
-    return $comp_root_check_cache{$stylesheet} = 0;
+    return $static_root_check_cache{$stylesheet} = 0;
 }
 
 my $system_stylesheet = RT->Config->Get('WebDefaultStylesheet');