make dump feature work on windows
authorchriskl <chriskl>
Sat, 13 Dec 2003 16:15:43 +0000 (16:15 +0000)
committerchriskl <chriskl>
Sat, 13 Dec 2003 16:15:43 +0000 (16:15 +0000)
classes/Misc.php
conf/config.inc.php-dist
dbexport.php

index 1b95a76b3163f3ef338445a632ec26db7a5c0ec2..93951cdd9a254c1da06329f6638a5b96bb4bad77 100644 (file)
@@ -2,7 +2,7 @@
        /**
         * Class to hold various commonly used functions
         *
-        * $Id: Misc.php,v 1.52 2003/12/13 11:04:04 chriskl Exp $
+        * $Id: Misc.php,v 1.53 2003/12/13 16:15:48 chriskl Exp $
         */
         
        class Misc {
                        echo "<td width=\"12%\"><a href=\"database.php?{$vars}&amp;action=variables\">{$lang['strvariables']}</a></td>\n";
                        echo "<td width=\"13%\"><a href=\"database.php?{$vars}&amp;action=processes\">{$lang['strprocesses']}</a></td>\n";
                        echo "<td width=\"12%\"><a href=\"database.php?{$vars}&amp;action=admin\">{$lang['stradmin']}</a></td>\n";
-                       // Check that database dumps are enabled.  The is_executable function
-                       // check is required as it only appeared in Win32 PHP in version 5.0.0
-                       if ($conf['pg_dump_path'] !== null && $conf['pg_dump_path'] != ''
-                                       && function_exists('is_executable') && is_executable($conf['pg_dump_path'])) {                  
+                       // Check that database dumps are enabled.
+                       if ($conf['pg_dump_path'] !== null && $conf['pg_dump_path'] != '') {
                                echo "<td width=\"13%\"><a href=\"database.php?{$vars}&amp;action=export\">{$lang['strexport']}</a></td>\n";
                        }
                        echo "</tr></table>\n";
index 85ec55f86a954c4c56c61361c88adaf8d55584b1..f9dec8819bc0488f9d3a75d0bd0b57fd72b71a98 100644 (file)
@@ -4,7 +4,7 @@
         * Central phpPgAdmin configuration.  As a user you may modify the
         * settings here for your particular configuration.
         *
-        * $Id: config.inc.php-dist,v 1.30 2003/12/13 11:04:04 chriskl Exp $
+        * $Id: config.inc.php-dist,v 1.31 2003/12/13 16:15:48 chriskl Exp $
         */
 
        // An example server.  Create as many of these as you wish,
        $conf['owned_reports_only'] = false;
 
        // Allow database and cluster dumps?
-       // Note: Set this to the fully qualified path name for your pg_dump and
-       // pg_dumpall utilities.  If you set them to '' or null, then the feature
-       // will be disabled.  Read the INSTALL file for more information.
-       $conf['pg_dump_path'] = '/usr/local/bin/pg_dump';
-       $conf['pg_dumpall_path'] = '/usr/local/bin/pg_dumpall';
+       // Note: Set this to the fully qualified path name for your pg_dump 
+       // and pg_dumpall utilities.  If you set them to '' or null, then the 
+       // feature will be disabled.  Read the INSTALL file for more
+       // information.  Usual Win32 Cygwin dir is 'c:/cygwin/bin/pg_dump.exe'
+       $conf['pg_dump_path'] = '/usr/bin/pg_dump';
+       $conf['pg_dumpall_path'] = '/usr/bin/pg_dumpall';
        
        // Minimum length users can set their password to.
        $conf['min_password_length'] = 1;
index 417cbb7678bb3529a840f5578f7b224f817b4ac3..ded5649eae1041732d5536f16c7e142cc2968183 100644 (file)
@@ -2,17 +2,15 @@
        /**
         * Does an export of a database to the screen or as a download
         *
-        * $Id: dbexport.php,v 1.1 2003/12/13 11:04:04 chriskl Exp $
+        * $Id: dbexport.php,v 1.2 2003/12/13 16:15:43 chriskl Exp $
         */
 
        // Include application functions
        $_no_output = true;
        include_once('libraries/lib.inc.php');
        
-       // Check that database dumps are enabled.  The is_executable function
-       // check is required as it only appeared in Win32 PHP in version 5.0.0
-       if ($conf['pg_dump_path'] !== null && $conf['pg_dump_path'] != ''
-                       && function_exists('is_executable') && is_executable($conf['pg_dump_path'])) {
+       // Check that database dumps are enabled.
+       if ($conf['pg_dump_path'] !== null && $conf['pg_dump_path'] != '') {
 
                // Make it do a download, if necessary
                if (isset($_REQUEST['download'])) {