[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 01/04: Bug when backing up
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 01/04: Bug when backing up |
Date: |
Tue, 11 Mar 2014 18:51:05 +0000 |
sparkyx pushed a commit to branch master
in repository noalyss.
commit eb962e043e40a4019e0e6736208f5e69c3a4f26b
Author: Dany De Bontridder <address@hidden>
Date: Tue Mar 11 19:46:22 2014 +0100
Bug when backing up
---
html/backup.php | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/html/backup.php b/html/backup.php
index 5ddc083..7bb1193 100644
--- a/html/backup.php
+++ b/html/backup.php
@@ -68,12 +68,14 @@ if ( isset ($_REQUEST['sa']) )
putenv("PGUSER=".phpcompta_user);
putenv("PGHOST=".phpcompta_psql_host);
putenv("PGPORT=".phpcompta_psql_port);
+ } else {
+ die ('Aucune connection');
}
if ( $_REQUEST['t'] == 'd' )
{
$database=domaine."dossier".$_REQUEST['d'];
- $args= " -Fc -Z9 --no-owner -h ".noalyss_psql_host." -p
".noalyss_psql_port." ".$database;
+ $args= " -Fc -Z9 --no-owner -h ".getenv("PGHOST")." -p
".getenv("PGPORT")." ".$database;
header('Content-type: application/octet');
header('Content-Disposition:attachment;filename="'.$database.'.bin"',FALSE);
@@ -84,7 +86,7 @@ if ( isset ($_REQUEST['sa']) )
if ( $_REQUEST['t'] == 'm' )
{
$database=domaine."mod".$_REQUEST['d'];
- $args= " -Fc -Z9 --no-owner -h ".noalyss_psql_host." -p
".noalyss_psql_port." ".$database;
+ $args= " -Fc -Z9 --no-owner -h ".getenv("PGHOST")." -p
".getenv("PGPORT")." ".$database;
header('Content-type: bin/x-application');
header('Content-Disposition:
attachment;filename="'.$database.'.bin"',FALSE);
$a=passthru ($cmd.$args);