[freeside-commits] freeside/FS/FS Mason.pm,1.50,1.51

Ivan,,, ivan at wavetail.420.am
Sat Aug 14 17:44:56 PDT 2010


Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv16313/FS/FS

Modified Files:
	Mason.pm 
Log Message:
address root cause of rt/rt links and remove the workarounds, RT#9280

Index: Mason.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Mason.pm,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -w -d -r1.50 -r1.51
--- Mason.pm	9 Aug 2010 01:03:49 -0000	1.50
+++ Mason.pm	15 Aug 2010 00:44:54 -0000	1.51
@@ -453,7 +453,7 @@
     RT::LoadConfig();
   }
 
-  # A hook supporting strange legacy ways people have added stuff on
+  # A hook supporting strange legacy ways people (well, SG) have added stuff on
 
   my @addl_comp_root = ();
   my $addl_comp_root_file = '%%%FREESIDE_CONF%%%/addl_comp_root.pl';
@@ -468,17 +468,20 @@
     }
   }
 
+  my $fs_comp_root =
+    scalar(@addl_comp_root)
+      ? [
+          [ 'freeside'=>'%%%FREESIDE_DOCUMENT_ROOT%%%' ],
+          @addl_comp_root,
+        ]
+      : '%%%FREESIDE_DOCUMENT_ROOT%%%';
+
   my %interp = (
     request_class        => $request_class,
     data_dir             => '%%%MASONDATA%%%',
     error_mode           => 'output',
     error_format         => 'html',
     ignore_warnings_expr => '.',
-    comp_root            => [
-                              [ 'freeside'=>'%%%FREESIDE_DOCUMENT_ROOT%%%'    ],
-                              [ 'rt'      =>'%%%FREESIDE_DOCUMENT_ROOT%%%/rt' ],
-                              @addl_comp_root,
-                            ],
   );
 
   $interp{out_method} = $opt{outbuf} if $mode eq 'standalone' && $opt{outbuf};
@@ -495,6 +498,7 @@
 
   my $fs_interp = new HTML::Mason::Interp (
     %interp,
+    comp_root    => $fs_comp_root,
     escape_flags => { 'js_string' => $js_string_sub,
                       'defang'    => sub {
                         ${$_[0]} = $html_defang->defang(${$_[0]});
@@ -507,6 +511,10 @@
 
   my $rt_interp = new HTML::Mason::Interp (
     %interp,
+    comp_root    => [
+                      [ 'rt'       => '%%%FREESIDE_DOCUMENT_ROOT%%%/rt' ],
+                      [ 'freeside' => '%%%FREESIDE_DOCUMENT_ROOT%%%'    ],
+                    ],
     escape_flags => { 'h'         => \&RT::Interface::Web::EscapeUTF8,
                       'js_string' => $js_string_sub,
                     },



More information about the freeside-commits mailing list