From: ebullient Date: Thu, 10 Apr 2003 00:40:08 +0000 (+0000) Subject: Added patch 717651 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=b72da2392e0c0f0e97be23c39f9fb7c85b02d528;p=squirrelmail.git Added patch 717651 git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@4761 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/config/conf.pl b/config/conf.pl index 487d3c2e..ac66f420 100755 --- a/config/conf.pl +++ b/config/conf.pl @@ -3015,6 +3015,7 @@ sub set_defaults { # 'images/logo.gif' --> SM_PATH . 'config/images/logo.gif' # '/absolute/path/logo.gif' --> '/absolute/path/logo.gif' # 'http://whatever/' --> 'http://whatever' +# $some_var/path --> "$some_var/path" sub change_to_SM_path() { my ($old_path) = @_; my $new_path = ''; @@ -3028,7 +3029,16 @@ sub change_to_SM_path() { return "\'" . $old_path . "\'" if ( $old_path =~ /^\w:\// ); return $old_path if ( $old_path =~ /^\'(\/|http)/ ); return $old_path if ( $old_path =~ /^\'\w:\// ); - return $old_path if ( $old_path =~ /^(\$|SM_PATH)/); + return $old_path if ( $old_path =~ /^SM_PATH/); + + if ( $old_path =~ /^\$/ ) { + # check if it's a single var, or a $var/path combination + # if it's $var/path, enclose in "" + if ( $old_path =~ /\// ) { + return '"'.$old_path.'"'; + } + return $old_path; + } # Remove remaining ' $old_path =~ s/\'//g; @@ -3073,7 +3083,7 @@ sub change_to_rel_path() { if ( $old_path =~ /^SM_PATH/ ) { $new_path =~ s/^SM_PATH . \'/\.\.\//; - $new_path =~ s/\.\.\/config\///; + $new_path =~ s/\.\.\/config\///; } return $new_path;