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 [email protected]
 
-/*!\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

_______________________________________________
Phpcompta  est un logiciel libre de comptabilit&#233; en ligne 
(http://www.phpcompta.eu)
Phpcompta-dev mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/phpcompta-dev

Reply via email to