in case we set a quota too low, force it to a proper value. Mail should be working properly now
This commit is contained in:
parent
6ba876f10c
commit
09e0234ee2
|
@ -117,7 +117,7 @@ if (!$res=$mail->get_details($mail_id)) {
|
|||
|
||||
}
|
||||
|
||||
if ($error) $error=_("Your email has been edited successfully");
|
||||
if (!$error) $error=_("Your email has been edited successfully");
|
||||
|
||||
$_REQUEST["domain_id"]=$dom->get_domain_byname($res["domain"]);
|
||||
include("mail_list.php");
|
||||
|
|
|
@ -53,9 +53,6 @@ if ($domain=$dom->get_domain_byid($domain_id)) {
|
|||
?>
|
||||
|
||||
<?php
|
||||
if (isset($error)) {
|
||||
echo "<p class=\"error\">$error</p>";
|
||||
}
|
||||
|
||||
// Mail creation form
|
||||
if ($quota->cancreate("mail")) {
|
||||
|
@ -77,6 +74,11 @@ if (empty($mails_list)){ // If there is no mail for this domain
|
|||
<hr id="topbar"/>
|
||||
<h3><?php printf(_("Email addresses of the domain %s"),$domain); ?> : </h3>
|
||||
|
||||
<?php
|
||||
if (isset($error)) {
|
||||
echo "<p class=\"error\">$error</p>";
|
||||
}
|
||||
?>
|
||||
|
||||
<table class="searchtable"><tr><td>
|
||||
<form method="get" name="formlist1" id="formlist1" action="mail_list.php">
|
||||
|
|
|
@ -467,6 +467,10 @@ class m_mail {
|
|||
}
|
||||
|
||||
if ($islocal) {
|
||||
if ($quotamb<(intval($me["used"]/1024/1024)+1)) {
|
||||
$quotamb=intval($me["used"]/1024/1024)+1;
|
||||
$err->raise("mail",_("You set a quota smaller than the current mailbox size. Since it's not allowed, we set the quota to the current mailbox size."));
|
||||
}
|
||||
$db->query("UPDATE mailbox SET quota=".intval($quotamb)." WHERE address_id=".$mail_id.";");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue