Commit d0e9dc8d authored by Antoine Beaupré's avatar Antoine Beaupré

tell the user at which time the changes will be effective instead of the

vague "5 minutes".

Sponsored by: Koumbit
Closes: #231
parent 0e29de73
...@@ -53,7 +53,14 @@ include("head.php"); ...@@ -53,7 +53,14 @@ include("head.php");
<body> <body>
<h3><?php printf(_("Editing domain %s"),$domain); ?></h3> <h3><?php printf(_("Editing domain %s"),$domain); ?></h3>
<p> <p>
<?php printf(_("The domain %s has been changed. The modifications will take effect in 5 minutes."),$domain); ?><br /> <?php
printf(_("The domain %s has been changed."),$domain);
# take the current time
$t = time();
# that modulo (%) there computes the time of the next cron job
# XXX: we assume the cron job is at every 5 minutes
print strtr(_("The modifications will take effect at %time. Server time is %now."), array('%now' => %date('H:i:s', $t), '%time' => date('H:i:s', %($t-($t%300)+300))));
?><br />
<a href="login.php" target="_top"><?php __("Click here to continue"); ?></a> <a href="login.php" target="_top"><?php __("Click here to continue"); ?></a>
</p> </p>
</body> </body>
......
...@@ -47,7 +47,12 @@ include("head.php"); ...@@ -47,7 +47,12 @@ include("head.php");
echo "<p class=\"error\">$error</p></body></html>"; echo "<p class=\"error\">$error</p></body></html>";
exit(); exit();
} else { } else {
echo "<p class=\"error\">"._("The subdomain has been deleted. Changes will take place in 5 minutes.")."</p>"; # take the current time
$t = time();
# that modulo (%) there computes the time of the next cron job
# XXX: we assume the cron job is at every 5 minutes
$error=strtr(_("The modifications will take effect at %time. Server time is %now."), array('%now' => %date('H:i:s', $t), '%time' => date('H:i:s', %($t-($t%300)+300))));
echo "<p class=\"error\">".$error."</p>";
} }
?> ?>
<p><a href="dom_edit.php?domain=<?php echo urlencode($domain) ?>"><?php __("Click here to continue"); ?></a></p> <p><a href="dom_edit.php?domain=<?php echo urlencode($domain) ?>"><?php __("Click here to continue"); ?></a></p>
......
...@@ -50,9 +50,13 @@ $dom->unlock(); ...@@ -50,9 +50,13 @@ $dom->unlock();
if (!$r) { if (!$r) {
$error=$err->errstr(); $error=$err->errstr();
} else { } else {
$error=_("The modifications will take effect in 5 minutes."); # take the current time
$t = time();
# that modulo (%) there computes the time of the next cron job
# XXX: we assume the cron job is at every 5 minutes
$error=strtr(_("The modifications will take effect at %time. Server time is %now."), array('%now' => %date('H:i:s', $t), '%time' => date('H:i:s', %($t-($t%300)+300))));
} }
include("dom_edit.php"); include("dom_edit.php");
exit; exit;
?> ?>
\ No newline at end of file
Markdown is supported
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