* Reload browser after executing arbitrary SQL
* Fix browser in RTL languages
* Fix inability to drop database using the drop link
+* Fix last internal oid for PostgreSQL 8.0
+* Fix (again) dumping on v8 for windows, exclude dumping some objects.
Version 3.5.2
-------------
/**
* Class to hold various commonly used functions
*
- * $Id: Misc.php,v 1.95.2.1 2004/12/06 03:07:17 chriskl Exp $
+ * $Id: Misc.php,v 1.95.2.2 2005/04/13 08:33:01 chriskl Exp $
*/
class Misc {
* @return The escaped string
*/
function escapeShellArg($str) {
- global $data;
+ global $data, $lang;
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
- $data->fieldClean($str);
- return '"' . $str . '"';
+ // Due to annoying PHP bugs, shell arguments cannot be escaped
+ // (command simply fails), so we cannot allow complex objects
+ // to be dumped.
+ if (ereg('^[_.[:alnum:]]+$', $str))
+ return $str;
+ else {
+ echo $lang['strcannotdumponwindows'];
+ exit;
+ }
}
else
return escapeshellarg($str);
* Does an export of a database or a table (via pg_dump)
* to the screen or as a download.
*
- * $Id: dbexport.php,v 1.14.2.5 2005/03/04 02:32:44 chriskl Exp $
+ * $Id: dbexport.php,v 1.14.2.6 2005/04/13 08:33:01 chriskl Exp $
*/
// Prevent timeouts
break;
}
- // Set environmental variable for user and password that pg_dump uses
+ // Set environmental variables that pg_dump uses
putenv('PGPASSWORD=' . $_SESSION['webdbPassword']);
putenv('PGUSER=' . $_SESSION['webdbUsername']);
-
- // Prepare command line arguments
$hostname = $conf['servers'][$_SESSION['webdbServerID']]['host'];
+ if ($hostname !== null && $hostname != '') {
+ putenv('PGHOST=' . $hostname);
+ }
$port = $conf['servers'][$_SESSION['webdbServerID']]['port'];
-
+ if ($port !== null && $port != '') {
+ putenv('PGPORT=' . $port);
+ }
+ if ($_REQUEST['mode'] == 'database') {
+ putenv('PGDATABASE=' . $_REQUEST['database']);
+ }
+
// Check if we're doing a cluster-wide dump or just a per-database dump
if ($_REQUEST['mode'] == 'database') {
// Get path of the pg_dump executable.
// Build command for executing pg_dump. '-i' means ignore version differences.
$cmd = $exe . " -i";
- if ($hostname !== null && $hostname != '') {
- $cmd .= " -h " . $misc->escapeShellArg($hostname);
- }
- if ($port !== null && $port != '') {
- $cmd .= " -p " . $misc->escapeShellArg($port);
- }
-
// Check for a table specified
if (isset($_REQUEST['table']) && $_REQUEST['mode'] == 'database') {
break;
}
- if ($_REQUEST['mode'] == 'database') {
- $cmd .= " " . $misc->escapeShellArg($_REQUEST['database']);
- }
-
// Execute command and return the output to the screen
passthru($cmd);
}
* English language file for phpPgAdmin. Use this as a basis
* for new translations.
*
- * $Id: english.php,v 1.167 2004/11/02 11:39:52 soranzo Exp $
+ * $Id: english.php,v 1.167.2.1 2005/04/13 08:33:01 chriskl Exp $
*/
// Language and character set
$lang['strnouploads'] = 'File uploads are disabled.';
$lang['strimporterror'] = 'Import error.';
$lang['strimporterrorline'] = 'Import error on line %s.';
+ $lang['strcannotdumponwindows'] = 'Dumping of complex table and schema names on Windows is not supported. Please see the FAQ.';
// Tables
$lang['strtable'] = 'Table';
* English language file for phpPgAdmin. Use this as a basis
* for new translations.
*
- * $Id: english.php,v 1.120 2004/11/02 11:39:52 soranzo Exp $
+ * $Id: english.php,v 1.120.2.1 2005/04/13 08:33:02 chriskl Exp $
*/
// Language and character set
$lang['strnouploads'] = 'File uploads are disabled.';
$lang['strimporterror'] = 'Import error.';
$lang['strimporterrorline'] = 'Import error on line %s.';
+ $lang['strcannotdumponwindows'] = 'Dumping of complex table and schema names on Windows is not supported. Please see the FAQ.';
// Tables
$lang['strtable'] = 'Table';