phpcompta-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpcompta-dev] r377 - trunk/backup_noadmin


From: phpcompta-dev
Subject: [Phpcompta-dev] r377 - trunk/backup_noadmin
Date: Thu, 21 Jun 2012 04:16:31 +0200 (CEST)

Author: danydb
Date: 2012-06-21 04:16:30 +0200 (Thu, 21 Jun 2012)
New Revision: 377

Modified:
   trunk/backup_noadmin/raw.php
Log:
backup : Add pghost variable

Modified: trunk/backup_noadmin/raw.php
===================================================================
--- trunk/backup_noadmin/raw.php        2012-06-15 18:45:01 UTC (rev 376)
+++ trunk/backup_noadmin/raw.php        2012-06-21 02:16:30 UTC (rev 377)
@@ -1,4 +1,5 @@
 <?php
+
 /*
  *   This file is part of PhpCompta.
  *
@@ -15,21 +16,22 @@
  *   You should have received a copy of the GNU General Public License
  *   along with PhpCompta; if not, write to the Free Software
  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-*/
+ */
 /* $Revision$ */
 
 // Copyright Author Dany De Bontridder address@hidden
 
-/*!\file
+/* !\file
  * \brief raw file for backup
  */
-$cmd=escapeshellcmd (PG_DUMP);
-putenv("PGPASSWORD=".phpcompta_password);
-putenv("PGUSER=".phpcompta_user);
-
-$database=domaine."dossier".Dossier::id();
-$args= " -Fc -Z9 --no-owner -p ".phpcompta_psql_port." ".$database;
+$cmd = escapeshellcmd(PG_DUMP);
+putenv("PGPASSWORD=" . phpcompta_password);
+putenv("PGUSER=" . phpcompta_user);
+putenv("PGHOST=" . phpcompta_psql_host);
+putenv("PGPORT=" . phpcompta_psql_port);
+$database = domaine . "dossier" . Dossier::id();
+$args = " -Fc -Z9 --no-owner -p " . phpcompta_psql_port . " " . $database;
 header('Content-type: application/octet');
-header('Content-Disposition:attachment;filename="'.$database.'.bin"',FALSE);
+header('Content-Disposition:attachment;filename="' . $database . '.bin"', 
FALSE);
 
-passthru ($cmd.$args,$a);
\ No newline at end of file
+passthru($cmd . $args, $a);
\ No newline at end of file



---
PhpCompta est un logiciel de comptabilité libre en ligne (full web)
Projet opensource http://www.phpcompta.eu



reply via email to

[Prev in Thread] Current Thread [Next in Thread]