-my $parser = new HTML::Mason::Parser;
-my $interp = new HTML::Mason::Interp (parser=>$parser,
- comp_root=>'/var/www/masondocs',
- data_dir=>'/home/ivan/freeside_current/masondata',
- out_mode=>'stream',
- );
-my $ah = new HTML::Mason::ApacheHandler ( interp => $interp,
- #auto_send_headers => 0,
- );
+
+#my $parser = new HTML::Mason::Parser;
+#my $interp = new HTML::Mason::Interp (parser=>$parser,
+# comp_root=>'/var/www/masondocs',
+# data_dir=>'/usr/local/etc/freeside/masondata',
+# out_mode=>'stream',
+# );
+
+use vars qw($r);
+
+if ( %%%RT_ENABLED%%% ) {
+ eval '
+ use lib ( "/opt/rt3/local/lib", "/opt/rt3/lib" );
+ use RT;
+ use vars qw($Nobody $SystemUser);
+ RT::LoadConfig();
+ ';
+ die $@ if $@;
+
+
+}
+
+
+my $ah = new HTML::Mason::ApacheHandler (
+ #interp => $interp,
+ #auto_send_headers => 0,
+ comp_root=> [
+ [ 'freeside' => '%%%FREESIDE_DOCUMENT_ROOT%%%' ],
+ [ 'rt' => '%%%FREESIDE_DOCUMENT_ROOT%%%/rt' ],
+ ],
+ data_dir=>'/usr/local/etc/freeside/masondata',
+ #out_mode=>'stream',
+
+ #RT
+ args_method => 'CGI',
+ default_escape_flags => 'h',
+ allow_globals => [qw(%session)],
+ #autoflush => 1,
+);