SF.net SVN: postfixadmin: [291] trunk/edit-mailbox.php
Brought to you by:
christian_boltz,
gingerdog
|
From: <chr...@us...> - 2008-01-09 21:49:43
|
Revision: 291
http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=291&view=rev
Author: christian_boltz
Date: 2008-01-09 13:47:28 -0800 (Wed, 09 Jan 2008)
Log Message:
-----------
edit-mailbox.php
- fix: put the values the user entered in the form again if an error was
detected (instead of showing the form completely empty)
- fix: do not check for password length when password is not going to be
changed (empty password field).
Thanks to Danilo Montagna (dmontagna) for pointing this out!
https://sourceforge.net/forum/message.php?msg_id=4709926
Modified Paths:
--------------
trunk/edit-mailbox.php
Modified: trunk/edit-mailbox.php
===================================================================
--- trunk/edit-mailbox.php 2008-01-06 20:20:42 UTC (rev 290)
+++ trunk/edit-mailbox.php 2008-01-09 21:47:28 UTC (rev 291)
@@ -96,12 +96,12 @@
if($fPassword != $user_details['password']){
$min_length = $CONF['min_password_length'];
- if($min_length > 0 && strlen($fPassword) < $min_length) {
- flash_error(sprintf($PALANG['pPasswordTooShort'], $CONF['min_password_length']));
- $error = 1;
- }
if($fPassword == $fPassword2) {
if ($fPassword != "") {
+ if($min_length > 0 && strlen($fPassword) < $min_length) {
+ flash_error(sprintf($PALANG['pPasswordTooShort'], $CONF['min_password_length']));
+ $error = 1;
+ }
$formvars['password'] = pacrypt($fPassword);
}
}
@@ -157,6 +157,13 @@
header ("Location: list-virtual.php?domain=$fDomain");
exit(0);
}
+ }
+ else
+ {
+ # error detected. Put the values the user entered in the form again.
+ $tName = $fName;
+ $tQuota = $fQuota;
+ $tActive = $fActive;
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|