[3/5] chpasswd.cgi: Make swroot refs the same as for other cgi files
Commit Message
- This uses the swroot definition from general-functions.pl and makes the definition
the same as used in the majority of other IPFire cgi files.
Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
---
html/cgi-bin/chpasswd.cgi | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
@@ -21,7 +21,7 @@
use CGI qw(param);
-$swroot = "/var/ipfire";
+require '/var/ipfire/general-functions.pl';
my %cgiparams;
my %mainsettings;
@@ -30,8 +30,8 @@ my %proxysettings;
$proxysettings{'NCSA_MIN_PASS_LEN'} = 6;
### Initialize environment
-&readhash("${swroot}/main/settings", \%mainsettings);
-&readhash("${swroot}/proxy/advanced/settings", \%proxysettings);
+&readhash("${General::swroot}/main/settings", \%mainsettings);
+&readhash("${General::swroot}/proxy/advanced/settings", \%proxysettings);
$language = $mainsettings{'LANGUAGE'};
### Initialize language
@@ -40,12 +40,12 @@ if ($language =~ /^(\w+)$/) {$language = $1;}
# Uncomment this to force a certain language:
# $language='en';
#
-require "${swroot}/langs/en.pl";
-require "${swroot}/langs/${language}.pl";
+require "${General::swroot}/langs/en.pl";
+require "${General::swroot}/langs/${language}.pl";
-my $userdb = "$swroot/proxy/advanced/ncsa/passwd";
+my $userdb = "$General::swroot/proxy/advanced/ncsa/passwd";
-&readhash("$swroot/ethernet/settings", \%netsettings);
+&readhash("$General::swroot/ethernet/settings", \%netsettings);
my $success = 0;