SF.net SVN: postfixadmin:[1049] trunk/backup.php
Brought to you by:
christian_boltz,
gingerdog
|
From: <chr...@us...> - 2011-04-19 22:59:06
|
Revision: 1049
http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=1049&view=rev
Author: christian_boltz
Date: 2011-04-19 22:59:00 +0000 (Tue, 19 Apr 2011)
Log Message:
-----------
backup.php:
- add a warning that backup.php is poorly maintained and might contain bugs
- disable HTML escaping for the message - we feed it with HTML tags...
Modified Paths:
--------------
trunk/backup.php
Modified: trunk/backup.php
===================================================================
--- trunk/backup.php 2011-04-19 22:38:24 UTC (rev 1048)
+++ trunk/backup.php 2011-04-19 22:59:00 UTC (rev 1049)
@@ -28,14 +28,27 @@
(($CONF['backup'] == 'NO') ? header("Location: main.php") && exit : '1');
// 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>');
+if ('pgsql'==$CONF['database_type']) {
+ $smarty->assign ('tMessage', '<p>Sorry: Backup is currently not supported for your DBMS ('.$CONF['database_type'].').</p>', false);
$smarty->assign ('smarty_template', 'message');
$smarty->display ('index.tpl');
-// print '<p>Sorry: Backup is currently not supported for your DBMS.</p>';
-die;
+ die;
}
+
+if (safeget('download') == "") {
+ $smarty->assign ('tMessage', '
+ <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> </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);
+ $smarty->assign ('smarty_template', 'message');
+ $smarty->display ('index.tpl');
+ die;
+}
+
+# Still here? Then let's create the database dump...
+
/*
SELECT attnum,attname,typname,atttypmod-4,attnotnull,atthasdef,adsrc
AS def FROM pg_attribute,pg_class,pg_type,pg_attrdef
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|