summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Moc <jakub@gentoo.org>2007-09-09 00:12:40 +0000
committerJakub Moc <jakub@gentoo.org>2007-09-09 00:12:40 +0000
commit10a1d42bfe48b2d71f9b847ef68860f5f83f014a (patch)
tree9af1ee6810e198caaf72e3afb59d9b7df191a2e7 /net-mail/postfixadmin/files/postfixadmin-2.1.0-postgres-3.patch
parentMove to mail-client category (diff)
downloadwebapps-experimental-10a1d42bfe48b2d71f9b847ef68860f5f83f014a.tar.gz
webapps-experimental-10a1d42bfe48b2d71f9b847ef68860f5f83f014a.tar.bz2
webapps-experimental-10a1d42bfe48b2d71f9b847ef68860f5f83f014a.zip
net-mail/postfixadmin: Move to net-mail category
svn path=/experimental/; revision=467
Diffstat (limited to 'net-mail/postfixadmin/files/postfixadmin-2.1.0-postgres-3.patch')
-rw-r--r--net-mail/postfixadmin/files/postfixadmin-2.1.0-postgres-3.patch49
1 files changed, 49 insertions, 0 deletions
diff --git a/net-mail/postfixadmin/files/postfixadmin-2.1.0-postgres-3.patch b/net-mail/postfixadmin/files/postfixadmin-2.1.0-postgres-3.patch
new file mode 100644
index 0000000..6766cf5
--- /dev/null
+++ b/net-mail/postfixadmin/files/postfixadmin-2.1.0-postgres-3.patch
@@ -0,0 +1,49 @@
+diff -aNru pfa/admin/backup.php postfixAdmin/admin/backup.php
+--- pfa/admin/backup.php 2006-02-08 19:00:47.478454000 +0100
++++ postfixAdmin/admin/backup.php 2006-02-22 15:16:43.677891000 +0100
+@@ -40,41 +40,11 @@
+ }
+ else
+ {
+- fwrite ($fh, $header);
+-
+- $tables = array('admin','alias','domain','domain_admins','log','mailbox','vacation');
+-
+- for ($i = 0 ; $i < sizeof ($tables) ; ++$i)
+- {
+- $result = db_query ("SHOW CREATE TABLE $tables[$i]");
+- if ($result['rows'] > 0)
+- {
+- while ($row = db_array ($result['result']))
+- {
+- fwrite ($fh, "$row[1]\n\n");
+- }
+- }
+- }
+-
+- for ($i = 0 ; $i < sizeof ($tables) ; ++$i)
+- {
+- $result = db_query ("SELECT * FROM $tables[$i]");
+- if ($result['rows'] > 0)
+- {
+- while ($row = db_assoc ($result['result']))
+- {
+- foreach ($row as $key=>$val)
+- {
+- $fields[] = $key;
+- $values[] = $val;
+- }
+-
+- fwrite ($fh, "INSERT INTO ". $tables[$i] . " (". implode (',',$fields) . ") VALUES ('" . implode ('\',\'',$values) . "')\n");
+- $fields = "";
+- $values = "";
+- }
+- }
++ exec('/usr/bin/pg_dump -U postgres postfix', $exec_dump);
++ foreach($exec_dump as $row) {
++ fwrite($fh, $row. "\r\n");
+ }
++ fclose($fh);
+ }
+ header ("Content-Type: application/octet-stream");
+ header ("Content-Disposition: attachment; filename=\"$filename\"");