From: Christopher Kings-L. <ch...@us...> - 2004-03-14 07:04:47
|
Update of /cvsroot/phppgadmin/webdb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27283 Modified Files: HISTORY dbexport.php Log Message: fix pg_dump for 7.0 and 7.1 postgres Index: HISTORY =================================================================== RCS file: /cvsroot/phppgadmin/webdb/HISTORY,v retrieving revision 1.145 retrieving revision 1.146 diff -C2 -d -r1.145 -r1.146 *** HISTORY 12 Mar 2004 08:56:51 -0000 1.145 --- HISTORY 14 Mar 2004 06:55:52 -0000 1.146 *************** *** 9,12 **** --- 9,15 ---- * View, add, edit and delete comments on views, schemas and columns (Dan Boren) + Bugs + * Fix pg_dump output for PostgreSQL 7.0.x and 7.1.x + Version 3.3.1 ------------- Index: dbexport.php =================================================================== RCS file: /cvsroot/phppgadmin/webdb/dbexport.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** dbexport.php 25 Feb 2004 15:46:22 -0000 1.8 --- dbexport.php 14 Mar 2004 06:55:53 -0000 1.9 *************** *** 29,43 **** } ! // Set environmental variable for password that pg_dump uses putenv('PGPASSWORD=' . $_SESSION['webdbPassword']); // Prepare command line arguments $hostname = $conf['servers'][$_SESSION['webdbServerID']]['host']; $port = $conf['servers'][$_SESSION['webdbServerID']]['port']; - $username = escapeshellarg($_SESSION['webdbUsername']); $database = escapeshellarg($_REQUEST['database']); // Build command for executing pg_dump ! $cmd = escapeshellcmd($conf['servers'][$_SESSION['webdbServerID']]['pg_dump_path']) . " -i -U {$username}"; if ($hostname !== null && $hostname != '') { $cmd .= " -h " . escapeshellarg($hostname); --- 29,43 ---- } ! // Set environmental variable for user and password that pg_dump uses putenv('PGPASSWORD=' . $_SESSION['webdbPassword']); + putenv('PGUSER=' . $_SESSION['webdbUsername']); // Prepare command line arguments $hostname = $conf['servers'][$_SESSION['webdbServerID']]['host']; $port = $conf['servers'][$_SESSION['webdbServerID']]['port']; $database = escapeshellarg($_REQUEST['database']); // Build command for executing pg_dump ! $cmd = escapeshellcmd($conf['servers'][$_SESSION['webdbServerID']]['pg_dump_path']) . " -i"; if ($hostname !== null && $hostname != '') { $cmd .= " -h " . escapeshellarg($hostname); *************** *** 74,78 **** } ! $cmd .= " -U {$username} {$database}"; // Execute command and return the output to the screen --- 74,78 ---- } ! $cmd .= " {$database}"; // Execute command and return the output to the screen |