Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
domainepublic
alternc
Commits
09e0234e
Commit
09e0234e
authored
Aug 25, 2012
by
Benjamin Sonntag
Browse files
in case we set a quota too low, force it to a proper value. Mail should be working properly now
parent
6ba876f1
Changes
3
Hide whitespace changes
Inline
Side-by-side
bureau/admin/mail_doedit.php
View file @
09e0234e
...
...
@@ -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"
);
...
...
bureau/admin/mail_list.php
View file @
09e0234e
...
...
@@ -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"
>
...
...
bureau/class/m_mail.php
View file @
09e0234e
...
...
@@ -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
.
";"
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment