X-Git-Url: https://git.p6c8.net/devedit.git/blobdiff_plain/7efda2bd1d1eb1d06b1513f459e14164ad4689f7..d6b0eacd69eb222641d326aa6cc5f9f4d133ddd7:/modules/Config/DevEdit.pm?ds=inline diff --git a/modules/Config/DevEdit.pm b/modules/Config/DevEdit.pm index aa76b5e..b4cb963 100644 --- a/modules/Config/DevEdit.pm +++ b/modules/Config/DevEdit.pm @@ -6,7 +6,15 @@ package Config::DevEdit; # Read and parse the configuration files # # Author: Patrick Canterino -# Last modified: 2005-08-24 +# Last modified: 2005-09-30 +# +# Copyright (C) 1999-2000 Roland Bluethgen, Frank Schoenmann +# Copyright (C) 2003-2009 Patrick Canterino +# All Rights Reserved. +# +# This file can be distributed and/or modified under the terms of +# of the Artistic License 1.0 (see also the LICENSE file found at +# the top level of the Dev-Editor distribution). # use strict; @@ -45,6 +53,20 @@ sub read_config($) { my $userconf = parse_config($config->{'userconf_file'}); + # Parse aliases (we use references, so we won't get a memory + # problem so soon...) + + foreach my $user(keys(%$userconf)) + { + if(my $aliases = $userconf->{$user}->{'aliases'}) + { + foreach my $alias(parse_line('\s+',0,$aliases)) + { + $userconf->{$alias} = $userconf->{$user} unless($userconf->{$alias}); + } + } + } + if($userconf->{$ENV{'REMOTE_USER'}}) { # The current HTTP Auth user has got an individual configuration @@ -52,12 +74,14 @@ sub read_config($) my $new_conf = $userconf->{$ENV{'REMOTE_USER'}}; - $config->{'fileroot'} = $new_conf->{'fileroot'} if($new_conf->{'fileroot'}); - $config->{'httproot'} = $new_conf->{'httproot'} if($new_conf->{'httproot'}); + $config->{'fileroot'} = $new_conf->{'fileroot'} if($new_conf->{'fileroot'}); + $config->{'httproot'} = $new_conf->{'httproot'} if($new_conf->{'httproot'}); + + $config->{'forbidden'} = $new_conf->{'forbidden'} if(defined $new_conf->{'forbidden'}); - $config->{'forbidden'} = $new_conf->{'forbidden'} if(defined $new_conf->{'forbidden'}); + $config->{'hide_dot_files'} = $new_conf->{'hide_dot_files'} if(defined $new_conf->{'hide_dot_files'}); - $config->{'user_config'} = 1; + $config->{'user_config'} = 1; } }