X-Git-Url: http://git.treefish.org/fex.git/blobdiff_plain/e5c93609849bda051fff54b5d5265af5608c6c69..3aae246cf7f4af7ae49da09e5ed0c180f31f0c12:/cgi-bin/fac?ds=inline diff --git a/cgi-bin/fac b/cgi-bin/fac index 6a41ab7..a6a0012 100755 --- a/cgi-bin/fac +++ b/cgi-bin/fac @@ -205,13 +205,13 @@ if (defined $PARAM{"createUser"}) { if ($PARAM{"editUser"} =~ /^#.*/) { &editRestrictionsForm; } else { + $user = normalize_user($PARAM{"editUser"}); if (defined $PARAM{"delete file"}) { - $user = normalize_user($PARAM{"editUser"}); unlink "$user/\@ALLOWED_RECIPIENTS"; print "upload restrictions for $user have been deleted\n"; &end_html; } else { - editUser($PARAM{"editUser"}); + editUser($user); } } } elsif ($PARAM{"contentBox"} and $PARAM{"ar"}) { @@ -410,7 +410,7 @@ sub createUser { $idf = "$user/@"; if (-f $idf) { - html_error($error,"There is already an user $user!"); + html_error($error,"There is already an user $user!"); } open $idf,'>',$idf or http_die("cannot write $idf - $!"); @@ -564,8 +564,9 @@ sub saveFile { &end_html; } } else { - system qw'cp -a',$ar,"$ar~"; + system 'mv',$ar,"$ar~"; } + $rf =~ s/^\s+$//; open $ar,'>',$ar or http_die("cannot write $ar - $!"); print {$ar} $rf; close $ar or http_die("cannot write $ar - $!");;