backup.php:

- switch from tMessage to flash_error()
- style download link as button

This commit is part of the huge cleanup patch by Dale Blount (lnxus@SF),
https://sourceforge.net/tracker/?func=detail&atid=937966&aid=3370510&group_id=191583


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1079 a1433add-5e2c-0410-b055-b7f2511e0802
pull/2/head
Christian Boltz 14 years ago
parent 5fdb814ca4
commit cc0a63ce3a

@ -29,19 +29,19 @@ authentication_require_role('global-admin');
// TODO: make backup supported for postgres
if ('pgsql'==$CONF['database_type']) {
$smarty->assign ('tMessage', '<p>Sorry: Backup is currently not supported for your DBMS ('.$CONF['database_type'].').</p>', false);
flash_error('<p>Sorry: Backup is currently not supported for your DBMS ('.$CONF['database_type'].').</p>');
$smarty->assign ('smarty_template', 'message');
$smarty->display ('index.tpl');
die;
}
if (safeget('download') == "") {
$smarty->assign ('tMessage', '
flash_error('
<p><span class="error_msg">Warning:</span> The backup module of PostfixAdmin is poorly maintained and might contain bugs.</p>
<p>Please use <tt>mysqldump</tt> to get a reliable backup of your database.</p>
<p>&nbsp;</p>
<p>If you still trust this backup module, you can <a href="backup.php?download=1">download the database dump now</a></p>
', false);
<p>If you still trust this backup module, you can <a href="backup.php?download=1" class="button">download the database dump now</a></p>
');
$smarty->assign ('smarty_template', 'message');
$smarty->display ('index.tpl');
die;
@ -80,11 +80,9 @@ if ($_SERVER['REQUEST_METHOD'] == "GET")
if (!$fh = fopen ($backup, 'w'))
{
$tMessage = "<div class=\"error_msg\">Cannot open file ($backup)</div>";
$smarty->assign ('tMessage', $tMessage);
flash_error("<div class=\"error_msg\">Cannot open file ($backup)</div>");
$smarty->assign ('smarty_template', 'message');
$smarty->display ('index.tpl');
// include ("templates/message.php");
}
else
{

Loading…
Cancel
Save