Database export: Download unchecked but GZIP compression checked doesn't make sense...
authorsoranzo <soranzo>
Wed, 31 Dec 2003 15:44:27 +0000 (15:44 +0000)
committersoranzo <soranzo>
Wed, 31 Dec 2003 15:44:27 +0000 (15:44 +0000)
database.php
dataexport.php
dbexport.php
lang/english.php
lang/italian.php
lang/recoded/english.php
lang/recoded/italian.php
tblproperties.php

index ab566ad3502f2df75d3e3c007e9411764d4162cd..07386afbc2840535f217008a8c599bb1ac9f0bd1 100755 (executable)
@@ -3,7 +3,7 @@
        /**
         * Manage schemas within a database
         *
-        * $Id: database.php,v 1.30 2003/12/30 03:09:28 chriskl Exp $
+        * $Id: database.php,v 1.31 2003/12/31 15:44:27 soranzo Exp $
         */
 
        // Include application functions
                echo "</table>\n";
                
                echo "<h3>{$lang['stroptions']}</h3>\n";
-               echo "<table>\n";               
-               echo "<tr>\n<th class=\"data left\">{$lang['strdownload']}</th>\n";
-               echo "<td><input type=\"checkbox\" name=\"download\" /></td>\n</tr>\n";
-               echo "<tr>\n<th class=\"data left\">{$lang['strgzip']}</th>\n";
-               echo "<td><input type=\"checkbox\" name=\"compress\" /></td>\n</tr>\n";
-               echo "</table>\n";
+               echo "<p><input type=\"radio\" name=\"output\" value=\"show\" checked=\"checked\" />{$lang['strshow']}\n";
+               echo "<br/><input type=\"radio\" name=\"output\" value=\"download\" />{$lang['strdownload']}\n";
+               echo "<br /><input type=\"radio\" name=\"output\" value=\"gzipped\" />{$lang['strdownloadgzipped']}</p>\n";
 
                echo "<p><input type=\"hidden\" name=\"action\" value=\"export\" />\n";
                echo $misc->form;
index 786c66937ad21bdefeb9b023923852c9e028d502..f53231ded6de47ab79d2b3739f39d72159ca042a 100644 (file)
@@ -4,7 +4,7 @@
         * Does an export to the screen or as a download.  This checks to
         * see if they have pg_dump set up, and will use it if possible.
         *
-        * $Id: dataexport.php,v 1.9 2003/12/27 10:57:36 chriskl Exp $
+        * $Id: dataexport.php,v 1.10 2003/12/31 15:44:27 soranzo Exp $
         */
 
        $extensions = array(
@@ -36,8 +36,8 @@
                                        $url .= '&what=' . urlencode($_REQUEST['what']);
                                        $url .= '&table=' . urlencode($_REQUEST['table']);
                                        $url .= '&d_format=' . urlencode($_REQUEST['d_format']);
+                                       $url .= '&output=' . urlencode($_REQUEST['output']);
                                        if (isset($_REQUEST['d_oids'])) $url .= '&d_oids=' . urlencode($_REQUEST['d_oids']);
-                                       if (isset($_REQUEST['download'])) $url .= '&download=' . urlencode($_REQUEST['download']);
                                        $url .= "&" . SID;
                                        
                                        header("Location: {$url}");
@@ -55,8 +55,8 @@
                                        $url = 'dbexport.php?database=' . urlencode($_REQUEST['database']);
                                        $url .= '&what=' . urlencode($_REQUEST['what']);
                                        $url .= '&table=' . urlencode($_REQUEST['table']);
+                                       $url .= '&output=' . urlencode($_REQUEST['output']);
                                        if (isset($_REQUEST['s_clean'])) $url .= '&s_clean=' . urlencode($_REQUEST['s_clean']);
-                                       if (isset($_REQUEST['download'])) $url .= '&download=' . urlencode($_REQUEST['download']);
                                        $url .= "&" . SID;
                                        
                                        header("Location: {$url}");
@@ -72,9 +72,9 @@
                                        $url .= '&what=' . urlencode($_REQUEST['what']);
                                        $url .= '&table=' . urlencode($_REQUEST['table']);
                                        $url .= '&sd_format=' . urlencode($_REQUEST['sd_format']);
+                                       $url .= '&output=' . urlencode($_REQUEST['output']);
                                        if (isset($_REQUEST['sd_clean'])) $url .= '&sd_clean=' . urlencode($_REQUEST['sd_clean']);
                                        if (isset($_REQUEST['sd_oids'])) $url .= '&sd_oids=' . urlencode($_REQUEST['sd_oids']);
-                                       if (isset($_REQUEST['download'])) $url .= '&download=' . urlencode($_REQUEST['download']);
                                        $url .= "&" . SID;
                                        
                                        header("Location: {$url}");
@@ -89,7 +89,7 @@
                }
 
                // Make it do a download, if necessary
-               if (isset($_REQUEST['download'])) {
+               if ($_REQUEST['output'] == 'download') {
                        header('Content-Type: application/download');
        
                        if (isset($extensions[$format]))
                echo "<option value=\"html\">XHTML</option>\n";
                echo "<option value=\"xml\">XML</option>\n";
                echo "</select></td></tr>";
-               echo "<tr><th class=\"data\">{$lang['strdownload']}</th><td><input type=\"checkbox\" name=\"download\" /></td></tr>";
                echo "</table>\n";
 
+               echo "<h3>{$lang['stroptions']}</h3>\n";
+               echo "<p><input type=\"radio\" name=\"output\" value=\"show\" checked=\"checked\" />{$lang['strshow']}\n";
+               echo "<br/><input type=\"radio\" name=\"output\" value=\"download\" />{$lang['strdownload']}</p>\n";
+
                echo "<p><input type=\"hidden\" name=\"action\" value=\"export\" />\n";
                echo "<input type=\"hidden\" name=\"what\" value=\"dataonly\" />\n";
                if (isset($_REQUEST['table'])) {
index 0553714229e3d788206e368aa2fa587f58fd48e9..98cfac49e6aecf720315f1686703b14d4676593f 100644 (file)
@@ -3,7 +3,7 @@
         * Does an export of a database to the screen or as a download.
         * Can also dump a specific table of a database.
         *
-        * $Id: dbexport.php,v 1.5 2003/12/30 03:09:29 chriskl Exp $
+        * $Id: dbexport.php,v 1.6 2003/12/31 15:44:27 soranzo Exp $
         */
 
        // Include application functions
        if ($conf['pg_dump_path'] !== null && $conf['pg_dump_path'] != '') {
 
                // Make it do a download, if necessary
-               if (isset($_REQUEST['download'])) {
-                       header('Content-Type: application/download');
-                       if (isset($_REQUEST['compress']))
-                               header('Content-Disposition: attachment; filename=dump.sql.gz');
-                       else
+               switch($_REQUEST['output']){
+                       case 'show':
+                               header('Content-Type: text/plain');
+                               break;
+                       case 'download':
+                               header('Content-Type: application/download');
                                header('Content-Disposition: attachment; filename=dump.sql');
-               }
-               else {
-                       header('Content-Type: text/plain');
+                               break;
+                       case 'gzipped':
+                               header('Content-Type: application/download');
+                               header('Content-Disposition: attachment; filename=dump.sql.gz');
+                               break;
                }
 
                // Set environmental variable for password that pg_dump uses
@@ -49,7 +52,7 @@
                }
 
                // Check for GZIP compression specified
-               if (isset($_REQUEST['compress'])) {
+               if ($_REQUEST['output'] == 'gzipped') {
                        $cmd .= " -Z 9";
                }
                                
index 444b0629f5448c422bebc86e9efb1dbc74e5301a..e0acf12e4ec23d7d50b77f14046c49c6f9628cc8 100755 (executable)
@@ -4,7 +4,7 @@
         * English language file for phpPgAdmin.  Use this as a basis
         * for new translations.
         *
-        * $Id: english.php,v 1.125 2003/12/30 03:09:29 chriskl Exp $
+        * $Id: english.php,v 1.126 2003/12/31 15:44:27 soranzo Exp $
         */
 
        // Language and character set
        $lang['stroptions'] = 'Options';
        $lang['strrefresh'] = 'Refresh';
        $lang['strdownload'] = 'Download';
+       $lang['strdownloadgzipped'] = 'Download compressed with gzip';
        $lang['strinfo'] = 'Info';
        $lang['stroids'] = 'OIDs';
        $lang['stradvanced'] = 'Advanced';
        $lang['strprocesses'] = 'Processes';
        $lang['strsetting'] = 'Setting';
        $lang['strparameters'] = 'Parameters';
-       $lang['strgzip'] = 'GZIP Compression';
 
        // Error handling
        $lang['strnoframes'] = 'You need a frames-enabled browser to use this application.';
index 613dff68c4d402c0eb1bebe38fda823fc2241bc6..ec7cb6956aef254cf5f6e62bf50e5bc2c3f00858 100644 (file)
@@ -4,7 +4,7 @@
         * Italian language file, based on the english language file for phpPgAdmin.
         * Nicola Soranzo [nsoranzo@tiscali.it]
          *
-        * $Id: italian.php,v 1.22 2003/12/16 00:32:28 soranzo Exp $
+        * $Id: italian.php,v 1.23 2003/12/31 15:44:27 soranzo Exp $
         */
 
        // Language and character set - Lingua e set di caratteri
        $lang['stroptions'] = 'Opzioni';
        $lang['strrefresh'] = 'Ricarica';
        $lang['strdownload'] = 'Scarica';
+       $lang['strdownloadgzipped'] = 'Scarica compresso con gzip';
        $lang['strinfo'] = 'Informazioni';
        $lang['stroids'] = 'OIDs';
        $lang['stradvanced'] = 'Avanzato';
index f79701acd168d34f53813263e5107f7dede17385..fd28af25e8963910a297fe90a4ef65ee85a514e4 100644 (file)
@@ -4,7 +4,7 @@
         * English language file for phpPgAdmin.  Use this as a basis
         * for new translations.
         *
-        * $Id: english.php,v 1.77 2003/12/30 03:09:29 chriskl Exp $
+        * $Id: english.php,v 1.78 2003/12/31 15:44:27 soranzo Exp $
         */
 
        // Language and character set
        $lang['stroptions'] = 'Options';
        $lang['strrefresh'] = 'Refresh';
        $lang['strdownload'] = 'Download';
+       $lang['strdownloadgzipped'] = 'Download compressed with gzip';
        $lang['strinfo'] = 'Info';
        $lang['stroids'] = 'OIDs';
        $lang['stradvanced'] = 'Advanced';
        $lang['strprocess'] = 'Process';
        $lang['strprocesses'] = 'Processes';
        $lang['strsetting'] = 'Setting';
-       $lang['strgzip'] = 'GZIP compression';
 
        // Error handling
        $lang['strnoframes'] = 'You need a frames-enabled browser to use this application.';
index e416717026201883d4de66d52b5ef5318353f3b6..33c6d42e6a5d892129d4a593d2f0eda3b1ce89be 100644 (file)
@@ -4,7 +4,7 @@
         * Italian language file, based on the english language file for phpPgAdmin.
         * Nicola Soranzo [nsoranzo@tiscali.it]
          *
-        * $Id: italian.php,v 1.17 2003/12/16 00:32:28 soranzo Exp $
+        * $Id: italian.php,v 1.18 2003/12/31 15:44:27 soranzo Exp $
         */
 
        // Language and character set - Lingua e set di caratteri
        $lang['stroptions'] = 'Opzioni';
        $lang['strrefresh'] = 'Ricarica';
        $lang['strdownload'] = 'Scarica';
+       $lang['strdownloadgzipped'] = 'Scarica compresso con gzip';
        $lang['strinfo'] = 'Informazioni';
        $lang['stroids'] = 'OIDs';
        $lang['stradvanced'] = 'Avanzato';
index 7df2ecef0384b763f32baf7d57d18abd45d57fd4..9a624f0e7f443f467f138adcbeae5db24b0cd201 100644 (file)
@@ -3,7 +3,7 @@
        /**
         * List tables in a database
         *
-        * $Id: tblproperties.php,v 1.33 2003/12/17 09:11:32 chriskl Exp $
+        * $Id: tblproperties.php,v 1.34 2003/12/31 15:44:27 soranzo Exp $
         */
 
        // Include application functions
                echo "</table>\n";
                
                echo "<h3>{$lang['stroptions']}</h3>\n";
-               echo "<table>\n";               
-               echo "<tr>\n<th class=\"data left\">{$lang['strdownload']}</th>\n";
-               echo "<td><input type=\"checkbox\" name=\"download\" /></td>\n</tr>\n";
-               echo "</table>\n";
+               echo "<p><input type=\"radio\" name=\"output\" value=\"show\" checked=\"checked\" />{$lang['strshow']}\n";
+               echo "<br/><input type=\"radio\" name=\"output\" value=\"download\" />{$lang['strdownload']}</p>\n";
 
                echo "<p><input type=\"hidden\" name=\"action\" value=\"export\" />\n";
                echo $misc->form;