From 8d6987f81d3d5667b00b428580a05e7ac973279a Mon Sep 17 00:00:00 2001 From: ivan Date: Sun, 3 Jan 2010 03:07:29 +0000 Subject: [PATCH] can't we all just get along (with RT 3.8.7)? --- FS/FS/Mason.pm | 4 +++- FS/FS/Mason/Request.pm | 11 +++++++++++ Makefile | 7 ++++--- rt/etc/RT_SiteConfig.pm | 21 +++++++++++---------- 4 files changed, 29 insertions(+), 14 deletions(-) diff --git a/FS/FS/Mason.pm b/FS/FS/Mason.pm index cc15cd4d9..c5b68f58d 100644 --- a/FS/FS/Mason.pm +++ b/FS/FS/Mason.pm @@ -266,9 +266,11 @@ if ( -e $addl_handler_use_file ) { #to throw a real error instead of just a mysterious unstyled RT use CSS::Squish 0.06; + use RT::Interface::Web::Request; + #slow, unreliable, segfaults and is optional #see rt/html/Ticket/Elements/ShowTransactionAttachments - use Text::Quoted; + #use Text::Quoted; #?#use File::Path qw( rmtree ); #?#use File::Glob qw( bsd_glob ); diff --git a/FS/FS/Mason/Request.pm b/FS/FS/Mason/Request.pm index 0a1df874a..8d66f4fff 100644 --- a/FS/FS/Mason/Request.pm +++ b/FS/FS/Mason/Request.pm @@ -30,6 +30,9 @@ sub new { } +#override alter_superclass ala RT::Interface::Web::Request ?? +# for Mason 1.39 vs. Perl 5.10.0 + sub freeside_setup { my( $filename, $mode ) = @_; @@ -75,4 +78,12 @@ sub freeside_setup { } +sub callback { + RT::Interface::Web::Request::callback(@_); +} + +sub request_path { + RT::Interface::Web::Request::request_path(@_); +} + 1; diff --git a/Makefile b/Makefile index 10b96e25d..6d0b2c009 100644 --- a/Makefile +++ b/Makefile @@ -345,7 +345,8 @@ configure-rt: --with-db-rt-pass=${DB_PASSWORD} \ --with-web-user=freeside \ --with-web-group=freeside \ - --with-rt-group=freeside + --with-rt-group=freeside \ + --with-web-handler=modperl2 create-rt: configure-rt [ -d /opt ] || mkdir /opt #doh @@ -361,12 +362,12 @@ create-rt: configure-rt || true install-rt: - perl -p -i -e "\ + [ ${RT_ENABLED} -eq 1 ] && ( cd rt; make install ) || true + [ ${RT_ENABLED} -eq 1 ] && perl -p -i -e "\ s'%%%RT_DOMAIN%%%'${RT_DOMAIN}'g;\ s'%%%RT_TIMEZONE%%%'${RT_TIMEZONE}'g;\ s'%%%FREESIDE_URL%%%'${FREESIDE_URL}'g;\ " ${RT_PATH}/etc/RT_SiteConfig.pm - [ ${RT_ENABLED} -eq 1 ] && ( cd rt; make install ) || true clean: rm -rf masondocs diff --git a/rt/etc/RT_SiteConfig.pm b/rt/etc/RT_SiteConfig.pm index ef9fa13ae..513d2c46b 100644 --- a/rt/etc/RT_SiteConfig.pm +++ b/rt/etc/RT_SiteConfig.pm @@ -20,21 +20,21 @@ # Sometimes you may want to change domain, timezone, or freeside::URL later, # everything else should probably stay untouched. -$RT::rtname = '%%%RT_DOMAIN%%%'; -$RT::Organization = '%%%RT_DOMAIN%%%'; +Set($rtname, '%%%RT_DOMAIN%%%'); +Set($Organization, '%%%RT_DOMAIN%%%'); -$RT::Timezone = '%%%RT_TIMEZONE%%%'; +Set($Timezone, '%%%RT_TIMEZONE%%%'); -$RT::WebExternalAuth = 1; -$RT::WebFallbackToInternal = 1; #no -$RT::WebExternalAuto = 1; +Set($WebExternalAuth, 1); +Set($WebFallbackToInternal, 1); #no +Set($WebExternalAuto, 1); $RT::URI::freeside::IntegrationType = 'Internal'; $RT::URI::freeside::URL = '%%%FREESIDE_URL%%%'; $RT::URI::freeside::URL =~ m(^(https?://[^/]+)(/.*)$)i; -$RT::WebBaseURL = $1; -$RT::WebPath = "$2/rt"; +Set($WebBaseURL, $1); +Set($WebPath, "$2/rt"); Set($DatabaseHost , ''); @@ -45,11 +45,12 @@ Set($DatabaseHost , ''); #NEW, RT 3.6 style (uncomment to use): #Set($DefaultSummaryRows, 10); -$RT::QuickCreateLong = 0; #set to true to cause quick ticket creation to +#does this do anything in RT 3.8?? +Set($QuickCreateLong, 0); #set to true to cause quick ticket creation to #redirect to the "long" ticket creation screen #instead of just creating a ticket with the subject. -Set($MessageBoxWidth , 80); +Set($MessageBoxWidth, 80); #Set(@Plugins,(qw(Extension::QuickDelete RT::FM))); 1; -- 2.11.0