From ae5b4268242b59d21b19cc93a4ace297cd3d7201 Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Mon, 28 May 2018 17:20:54 -0700 Subject: [PATCH] Password may not always be set --- virtual_feature.pl | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/virtual_feature.pl b/virtual_feature.pl index d8412a1..aabda60 100755 --- a/virtual_feature.pl +++ b/virtual_feature.pl @@ -179,6 +179,15 @@ sub feature_setup $gitfile = "$phd/git/$gitfile"; &virtual_server::copy_source_dest_as_domain_user($d, $src, $gitfile); } +my $gitconf = "$phd/git/gitweb_config.perl"; +if (!-r $gitconf) { + my $lref = &virtual_server::read_file_lines_as_domain_user($d, $gitconf); + push(@$lref, '$stylesheet = "gitweb.css";'); + push(@$lref, '$logo = "git-logo.png";'); + push(@$lref, '$favicon = "git-favicon.png";'); + push(@$lref, '$javascript = "gitweb.js";'); + &virtual_server::flush_file_lines_as_domain_user($d, $gitconf); + } &$virtual_server::second_print($virtual_server::text{'setup_done'}); # Set default limit from template @@ -657,7 +666,7 @@ sub mailbox_modify } } -if ($user->{'passmode'} == 3) { +if ($user->{'passmode'} && $user->{'passmode'} == 3) { # Password was changed $suser->{'pass'} = $user->{'pass_crypt'} || &htaccess_htpasswd::encrypt_password($user->{'plainpass'});