SF.net SVN: postfixadmin:[406] trunk/backup.php
Brought to you by:
christian_boltz,
gingerdog
|
From: <chr...@us...> - 2008-07-18 23:15:45
|
Revision: 406
http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=406&view=rev
Author: christian_boltz
Date: 2008-07-18 23:15:52 +0000 (Fri, 18 Jul 2008)
Log Message:
-----------
backup.php:
- replace table_by_pos with table_by_key - script was totally broken
while table_by_pos was used (only admin table backed up)
- changed Content-Type: header to text/plain - file is still offered
for download, but can be opened in a text editor easier
Modified Paths:
--------------
trunk/backup.php
Modified: trunk/backup.php
===================================================================
--- trunk/backup.php 2008-07-18 23:07:40 UTC (rev 405)
+++ trunk/backup.php 2008-07-18 23:15:52 UTC (rev 406)
@@ -88,7 +88,7 @@
for ($i = 0 ; $i < sizeof ($tables) ; ++$i)
{
- $result = db_query ("SHOW CREATE TABLE ".table_by_pos($i));
+ $result = db_query ("SHOW CREATE TABLE " . table_by_key($tables[$i]));
if ($result['rows'] > 0)
{
while ($row = db_array ($result['result']))
@@ -100,7 +100,7 @@
for ($i = 0 ; $i < sizeof ($tables) ; ++$i)
{
- $result = db_query ("SELECT * FROM ".table_by_pos($i));
+ $result = db_query ("SELECT * FROM " . table_by_key($tables[$i]));
if ($result['rows'] > 0)
{
while ($row = db_assoc ($result['result']))
@@ -118,7 +118,7 @@
}
}
}
- header ("Content-Type: application/octet-stream");
+ header ("Content-Type: text/plain");
header ("Content-Disposition: attachment; filename=\"$filename\"");
header ("Content-Transfer-Encoding: binary");
header ("Content-Length: " . filesize("$backup"));
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|