Commit 797b821f authored by Alan Garcia's avatar Alan Garcia
Browse files

Fix #1282

parent b4d4053a
...@@ -43,13 +43,13 @@ if ($password != $passwordconf) { ...@@ -43,13 +43,13 @@ if ($password != $passwordconf) {
exit(); exit();
} }
if (!$password) { if (empty($password)) {
$error=_("Please enter a password"); $error=_("Please enter a password");
include ("hta_adduser.php"); include ("hta_adduser.php");
exit(); exit();
} }
if (!$hta->add_user($user, $password,$dir)) { if (!$hta->add_user($user, $password, $dir)) {
$error=$err->errstr(); $error=$err->errstr();
include ("hta_adduser.php"); include ("hta_adduser.php");
} else { } else {
......
...@@ -30,17 +30,42 @@ ...@@ -30,17 +30,42 @@
require_once("../class/config.php"); require_once("../class/config.php");
$fields = array ( $fields = array (
"d" => array ("post", "array", ""), "d" => array ("post", "array", array()),
"dir" => array ("post", "string", ""), "dir" => array ("post", "string", ""),
"confirm_del" => array ("post", "string", ""),
); );
getFields($fields); getFields($fields);
reset($d); if (!empty($confirm_del)) {
if (!$hta->del_user($d,$dir)) { reset($d);
$error=$err->errstr(); if (!$hta->del_user($d,$dir)) {
$error=$err->errstr();
}
header ('Location: /hta_edit.php?dir='.urlencode($dir));
exit();
} }
include_once('head.php');
?>
<h3><?php __("Authorized user deletion confirm"); ?></h3>
<hr id="topbar"/>
<br />
<?php __("Do you really want to delete those users ?");?>
<ul>
<?php foreach($d as $t) {
echo "<li>$t</li>\n";
} ?>
</ul>
<form method="post" action="hta_dodeluser.php" name="main" id="main">
<input type='hidden' name='dir' value='<?php echo $dir;?>' >
<?php foreach($d as $t) {
echo "<input type='hidden' name='d[$t]' value='$t' >\n";
} ?>
<input type="submit" class="inb" name="confirm_del" value="<?php __("Delete")?>" />
<input type="button" class="inb" name="cancel" value="<?php __("Cancel"); ?>" onclick="document.location='/hta_edit.php?dir=<?php echo urlencode($dir);?>'" />
</form>
include("hta_edit.php"); <?php
include_once('foot.php');
exit(); exit();
?> ?>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment