Don't paginate with Explains in sql.php . Spacing fixes.
authorsoranzo <soranzo>
Wed, 26 May 2004 23:40:20 +0000 (23:40 +0000)
committersoranzo <soranzo>
Wed, 26 May 2004 23:40:20 +0000 (23:40 +0000)
BUGS
database.php
sql.php

diff --git a/BUGS b/BUGS
index e5df8225afd3d2786966753efba3c9538181c64b..0a21a96d4f164dc6892c34f25277e3608aed2991 100644 (file)
--- a/BUGS
+++ b/BUGS
@@ -33,4 +33,4 @@ NEEDS TESTING
 * advanced stats functions
 * Find links columns in views incorrectly
 * getView() isn't schema-aware for 7.3+?
-* rename function in 7.2 and below doesn't come back to the correct function
\ No newline at end of file
+* rename function in 7.2 and below doesn't come back to the correct function
index 37aebb9942080077580bc7b62837e579267b662a..ff73ff58f6512d02d6f545ed651038ee1e7b856a 100755 (executable)
@@ -3,7 +3,7 @@
        /**
         * Manage schemas within a database
         *
-        * $Id: database.php,v 1.43 2004/05/19 01:28:34 soranzo Exp $
+        * $Id: database.php,v 1.44 2004/05/26 23:40:20 soranzo Exp $
         */
 
        // Include application functions
                echo "<p>{$lang['strsql']}<br />\n";
                echo "<textarea style=\"width:100%;\" rows=\"20\" cols=\"50\" name=\"query\">",
                        htmlspecialchars($_REQUEST['query']), "</textarea>\n";
-                       
-           // Check that file uploads are enabled
-           if (ini_get('file_uploads')) {
-               // Don't show upload option if max size of uploads is zero
-               $max_size = $misc->inisizeToBytes(ini_get('upload_max_filesize'));
-               if (is_double($max_size) && $max_size > 0) {
-                   echo "<br /><br /><input type=\"hidden\" name=\"MAX_FILE_SIZE\" value=\"{$max_size}\" />\n";
-                echo " {$lang['struploadscript']} <input name=\"script\" type=\"file\" /></p>\n";
-            }
-        }
-        else echo "</p>\n";
+               
+               // Check that file uploads are enabled
+               if (ini_get('file_uploads')) {
+                       // Don't show upload option if max size of uploads is zero
+                       $max_size = $misc->inisizeToBytes(ini_get('upload_max_filesize'));
+                       if (is_double($max_size) && $max_size > 0) {
+                               echo "<br /><br /><input type=\"hidden\" name=\"MAX_FILE_SIZE\" value=\"{$max_size}\" />\n";
+                               echo " {$lang['struploadscript']} <input name=\"script\" type=\"file\" /></p>\n";
+                       }
+               }
+               else echo "</p>\n";
+
                echo "<input type=\"checkbox\" name=\"paginate\"", (isset($_REQUEST['paginate']) ? ' checked="checked"' : ''), " /> {$lang['strpaginate']}\n";
                echo "<br />\n";
                echo "<p><input type=\"submit\" value=\"{$lang['strgo']}\" />\n";
diff --git a/sql.php b/sql.php
index 8e4e497ca6b2ecbc0c99ef70a4d9a5278c933032..a2c0a1463c220f6f511ae6a8b44ccd6bf6af0a80 100644 (file)
--- a/sql.php
+++ b/sql.php
@@ -6,7 +6,7 @@
         * how many SQL statements have been strung together with semi-colons
         * @param $query The SQL query string to execute
         *
-        * $Id: sql.php,v 1.20 2004/05/09 08:35:55 chriskl Exp $
+        * $Id: sql.php,v 1.21 2004/05/26 23:40:20 soranzo Exp $
         */
 
        // Include application functions
@@ -22,9 +22,9 @@
                $_REQUEST['query'] = $_POST['query'];
        }
        
-       // Check to see if pagination has been specified.  In that case, send to display
+       // Check to see if pagination has been specified. In that case, send to display
        // script for pagination
-       if (isset($_POST['paginate'])) {
+       if (isset($_POST['paginate']) && !isset($_POST['explain']) && !isset($_POST['explain_analyze'])) {
                include('./display.php');
                exit;
        }
@@ -48,7 +48,7 @@
        
        // Execute the query.  If it's a script upload, special handling is necessary
        if (isset($_FILES['script']) && $_FILES['script']['size'] > 0)
-           $rs = $data->executeScript('script');
+               $rs = $data->executeScript('script');
        else
                $rs = $data->conn->Execute($_POST['query']);