From 9e37cdd9a260b71734bba0595a8d6c955e0680d5 Mon Sep 17 00:00:00 2001 From: JT Smith Date: Wed, 9 Nov 2005 23:44:03 +0000 Subject: [PATCH] removed the notion of scripturl since it's no longer necessary with the modperl handler --- docs/changelog/6.x.x.txt | 8 +++++--- etc/WebGUI.conf.original | 6 ------ lib/WebGUI/Asset/Wobject/DataForm.pm | 2 +- lib/WebGUI/Commerce/Payment/ITransact.pm | 2 +- lib/WebGUI/Config.pm | 4 ---- lib/WebGUI/Macro/PageUrl.pm | 4 +--- lib/WebGUI/Macro/Slash_gatewayUrl.pm | 4 +--- lib/WebGUI/URL.pm | 23 ++--------------------- 8 files changed, 11 insertions(+), 42 deletions(-) diff --git a/docs/changelog/6.x.x.txt b/docs/changelog/6.x.x.txt index 152e839fd..cf1f2918d 100644 --- a/docs/changelog/6.x.x.txt +++ b/docs/changelog/6.x.x.txt @@ -284,18 +284,20 @@ - fix [ 1251390 ] Security tab doesn't appear for member of Admins - HTTP Proxy URLs can now be up to 2048 characters long. - The Edit Branch function now allows you to recursively set meta data. + (Thanks to Volvo for funding this feature.) - Fixed a potential problem where editing a page under rare very rare conditions could destroy the not found page. - Added the ability to override the UI Level of any field in the edit form of - any asset in the WebGUI config file. + any asset in the WebGUI config file. (Thanks to Volvo for funding this +feature.) - Translation providers can now add languageAbbreviation and locale properties to their translation in order to activate the translations of javascript helper components like the rich editor and the calendar date picker. - Added the ability to override the UI Level of an entire asset in the config - file. + file. (Thanks to Volvo for funding this feature.) - fix [ 1229042 ] crumbtrail should show full path... - - Added asset versioning. + - Added asset versioning. (Thanks to Volvo for contributing funding to this feature.) - fix [ 1229188 ] typo in Help: Collaboration, Post List Template Variables - fix [ 1221284 ] Operation\user.pm i18n {internationalize labels} - All form field labels have been internationalized. diff --git a/etc/WebGUI.conf.original b/etc/WebGUI.conf.original index 0361e8759..0d3a2afb9 100644 --- a/etc/WebGUI.conf.original +++ b/etc/WebGUI.conf.original @@ -29,12 +29,6 @@ uploadsPath = /data/WebGUI/www/uploads # passthruUrls => /icons, /documentation/pdf, /my-custom-application, /server-status, /perl-status -# The scripturl tells WebGUI how to reference the gateway script -# when generating URLs. By default it will use the gateway -# script's filename like /index.pl/ - -# scripturl = / - # Tell WebGUI where to store cached files. Defaults to the # /tmp or c:\temp folder depending upon your operating system. diff --git a/lib/WebGUI/Asset/Wobject/DataForm.pm b/lib/WebGUI/Asset/Wobject/DataForm.pm index 61ce57014..ef4f5f3d6 100644 --- a/lib/WebGUI/Asset/Wobject/DataForm.pm +++ b/lib/WebGUI/Asset/Wobject/DataForm.pm @@ -341,7 +341,7 @@ sub getListTemplateVars { $fields->finish; $var->{field_loop} = \@fieldLoop; my @recordLoop; - $entries = WebGUI::SQL->read("select ipAddress,username,userid,submissionDate,DataForm_entryId from DataForm_entry + my $entries = WebGUI::SQL->read("select ipAddress,username,userid,submissionDate,DataForm_entryId from DataForm_entry where assetId=".quote($self->getId)." order by submissionDate desc"); while (my $record = $entries->hashRef) { my @dataLoop; diff --git a/lib/WebGUI/Commerce/Payment/ITransact.pm b/lib/WebGUI/Commerce/Payment/ITransact.pm index 0805a92f4..2b6c3a504 100644 --- a/lib/WebGUI/Commerce/Payment/ITransact.pm +++ b/lib/WebGUI/Commerce/Payment/ITransact.pm @@ -468,7 +468,7 @@ sub configurationForm { -value => '
' ); $f->readOnly( - -value => $i18n->get('extra info').'
https://'.$session{config}{defaultSitename}.WebGUI::URL::getScriptURL().'?op=confirmRecurringTransaction;gateway='.$self->namespace + -value => $i18n->get('extra info').'
https://'.$session{config}{defaultSitename}.'/?op=confirmRecurringTransaction;gateway='.$self->namespace ); return $self->SUPER::configurationForm($f->printRowsOnly); diff --git a/lib/WebGUI/Config.pm b/lib/WebGUI/Config.pm index b76361cac..15a0dacfa 100644 --- a/lib/WebGUI/Config.pm +++ b/lib/WebGUI/Config.pm @@ -163,10 +163,6 @@ sub readConfig { if (ref $data{shippingPlugins} ne "ARRAY") { $data{shippingPlugins} = [$data{shippingPlugins}] if ($data{shippingPlugins}); } - if( defined( $data{scripturl} ) ) { - # get rid of leading "/" if present. - $data{scripturl} =~ s/^\///; - } if (ref $data{sitename} eq "ARRAY") { $data{defaultSitename} = $data{sitename}[0]; } else { diff --git a/lib/WebGUI/Macro/PageUrl.pm b/lib/WebGUI/Macro/PageUrl.pm index 0015487fc..777e73211 100644 --- a/lib/WebGUI/Macro/PageUrl.pm +++ b/lib/WebGUI/Macro/PageUrl.pm @@ -16,9 +16,7 @@ use WebGUI::URL; #------------------------------------------------------------------- sub process { - my $pathinfo = $session{wguri}; - $pathinfo =~ s#^/##; - return WebGUI::URL::getScriptURL().$pathinfo; + return $session{wguri}; } diff --git a/lib/WebGUI/Macro/Slash_gatewayUrl.pm b/lib/WebGUI/Macro/Slash_gatewayUrl.pm index 3850aba45..79ccce1d7 100644 --- a/lib/WebGUI/Macro/Slash_gatewayUrl.pm +++ b/lib/WebGUI/Macro/Slash_gatewayUrl.pm @@ -11,12 +11,10 @@ package WebGUI::Macro::Slash_gatewayUrl; #------------------------------------------------------------------- use strict; -use WebGUI::Session; -use WebGUI::URL; #------------------------------------------------------------------- sub process { - return WebGUI::URL::getScriptURL(); + return "/"; } diff --git a/lib/WebGUI/URL.pm b/lib/WebGUI/URL.pm index 945a5276a..d962e0e6a 100644 --- a/lib/WebGUI/URL.pm +++ b/lib/WebGUI/URL.pm @@ -121,7 +121,7 @@ Name value pairs to add to the URL in the form of: sub gateway { $_[0] =~ s/^\///; - my $url = getScriptURL().$_[0]; + my $url = '/'.$_[0]; if ($session{setting}{preventProxyCache} == 1) { $url = append($url,"noCache=".randint(0,1000).';'.time()); } @@ -167,25 +167,6 @@ sub setSiteURL { #------------------------------------------------------------------- -=head2 getScriptURL { - -Returns the URL for the gateway script. - -=cut - -sub getScriptURL { - my $scripturl; - if (exists $session{config}{scripturl}) { - $scripturl = $session{config}{scripturl}; - } else { - $scripturl = $session{wguri}; - } - $scripturl .= '/'; - return $scripturl; -} - -#------------------------------------------------------------------- - =head2 getSiteURL ( ) Returns a constructed site url. The returned @@ -262,7 +243,7 @@ sub page { if ($useFullUrl) { $url = getSiteURL(); } - $url .= getScriptURL(); + $url .= '/'; my $pathinfo; if ($session{asset}) { $pathinfo = $session{asset}->get("url");