lots of fixes and improvements to reports
authorchriskl <chriskl>
Wed, 13 Aug 2003 09:17:26 +0000 (09:17 +0000)
committerchriskl <chriskl>
Wed, 13 Aug 2003 09:17:26 +0000 (09:17 +0000)
HISTORY
reports.php

diff --git a/HISTORY b/HISTORY
index 0d33c78d9807d57b2a44ffd5e72ed81027ea047d..358ee4c0c45c21020928f222f02f4798ca75642f 100644 (file)
--- a/HISTORY
+++ b/HISTORY
@@ -1,8 +1,8 @@
 phpPgAdmin History
 ------------------
 
-Version 3.1
------------
+Version 3.1-dev
+---------------
 
 Features:
 * Turkish update from Devrim Gunduz
@@ -34,6 +34,20 @@ Bug Fixes:
 * Correctly display the contents of bytea fields
 * Consider information_schema to be a system object
 * Remember fields if index creation fails
+* Fix saving and loading function volatility
+* Don't list domains under types
+* Lots of reports fixes (titles, page reloads, etc.)
+
+Version 3.0.1
+-------------
+
+Bug Fixes
+* Lots of NULL value in table dump fixes (XML format changed slightly)
+* Support zero column tables
+* Correctly display the contents of bytea fields
+* Error in ADODB_base.php
+* Fix saving and loading function volatility
+* Don't list domains under types
 
 Version 3.0
 -----------
index 37c38f4174ad78446e6e32b853fdcaae6786e239..802b5a0a5ef2403c59b39077920e7c706c8a60f6 100644 (file)
@@ -3,7 +3,7 @@
        /**
         * List reports in a database
         *
-        * $Id: reports.php,v 1.11 2003/05/19 05:53:42 chriskl Exp $
+        * $Id: reports.php,v 1.12 2003/08/13 09:17:26 chriskl Exp $
         */
 
        // Include application functions
@@ -24,8 +24,8 @@
                global $PHP_SELF, $lang;
 
                // If it's a first, load then get the data from the database
-               if ($_REQUEST['action'] == 'edit') {
-                       $report = &$reportsdb->getReport($_REQUEST['report_id']);
+               $report = &$reportsdb->getReport($_REQUEST['report_id']);
+               if ($_REQUEST['action'] == 'edit') {                    
                        $_POST['report_name'] = $report->f['report_name'];
                        $_POST['db_name'] = $report->f['db_name'];
                        $_POST['descr'] = $report->f['descr'];
                // Get a list of available databases
                $databases = &$data->getDatabases();
 
-               echo "<h2>{$lang['strreports']}: {$lang['strcreatereport']}</h2>\n";
+               echo "<h2>{$lang['strreports']}: ", htmlspecialchars($report->f['report_name']), ": {$lang['stredit']}</h2>\n";
                $misc->printMsg($msg);
 
                echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
-               echo "<table width=\"100%\">\n";
+               echo "<table>\n";
                echo "<tr><th class=\"data\">{$lang['strname']}</th>\n";
                echo "<td class=\"data1\"><input name=\"report_name\" size=\"32\" maxlength=\"{$data->_maxNameLen}\" value=\"",
                        htmlspecialchars($_POST['report_name']), "\" /></td></tr>\n";
                echo "</table>\n";
                echo "<p><input type=\"hidden\" name=\"action\" value=\"save_edit\">\n";
                echo "<input type=\"submit\" value=\"{$lang['strsave']}\" />\n";
-               echo "<input type=\"reset\" value=\"{$lang['strreset']}\" /></p>\n";
+               echo "<input type=\"submit\" name=\"cancel\" value=\"{$lang['strcancel']}\" /></p>\n";
                echo "<input type=\"hidden\" name=\"report_id\" value=\"{$report->f['report_id']}\" />\n";
                echo "</form>\n";
-
-               echo "<p><a class=\"navlink\" href=\"$PHP_SELF\">{$lang['strshowallreports']}</a></p>\n";
        }
 
        /**
                if (!isset($_POST['report_sql'])) $_POST['report_sql'] = '';
 
                // Check that they've given a name and a definition
-               if ($_POST['report_name'] == '') doCreate($lang['strreportneedsname']);
-               elseif ($_POST['report_sql'] == '') doCreate($lang['strreportneedsdef']);
+               if ($_POST['report_name'] == '') doEdit($lang['strreportneedsname']);
+               elseif ($_POST['report_sql'] == '') doEdit($lang['strreportneedsdef']);
                else {
                        $status = $reportsdb->alterReport($_POST['report_id'], $_POST['report_name'], $_POST['db_name'],
                                                                $_POST['descr'], $_POST['report_sql']);
                        if ($status == 0)
                                doDefault($lang['strreportcreated']);
                        else
-                               doCreate($lang['strreportcreatedbad']);
+                               doEdit($lang['strreportcreatedbad']);
                }
        }
 
 
                $report = $reportsdb->getReport($_REQUEST['report_id']);
 
-               echo "<h2>{$lang['strreports']}: {$lang['strreport']}</h2>\n";
+               echo "<h2>{$lang['strreports']}: ", htmlspecialchars($report->f['report_name']), "</h2>\n";
                $misc->printMsg($msg);
 
                if ($report->recordCount() == 1) {
-                       echo "<table width=\"100%\">\n";
+                       echo "<table>\n";
                        echo "<tr><th class=\"data\">{$lang['strname']}</th>\n";
                        echo "<td class=\"data1\">", $misc->printVal($report->f['report_name']), "</td></tr>\n";
                        echo "<tr><th class=\"data\">{$lang['strdatabase']}</th>\n";
                echo "</table>\n";
                echo "<p><input type=\"hidden\" name=\"action\" value=\"save_create\" />\n";
                echo "<input type=\"submit\" value=\"{$lang['strsave']}\" />\n";
-               echo "<input type=\"{$lang['strreset']}\" /></p>\n";
+               echo "<input type=\"submit\" name=\"cancel\" value=\"{$lang['strcancel']}\" /></p>\n";
                echo "</form>\n";
-
-               echo "<p><a class=\"navlink\" href=\"$PHP_SELF\">{$lang['strshowallreports']}</a></p>\n";
        }
 
        /**
                        echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
                        echo "<input type=\"hidden\" name=\"action\" value=\"drop\">\n";
                        echo "<input type=\"hidden\" name=\"report_id\" value=\"", htmlspecialchars($_REQUEST['report_id']), "\">\n";
-                       echo "<input type=\"submit\" name=\"yes\" value=\"{$lang['stryes']}\"> <input type=\"submit\" name=\"no\" value=\"{$lang['strno']}\">\n";
+                       echo "<input type=\"submit\" name=\"drop\" value=\"{$lang['strdrop']}\">\n";
+                       echo "<input type=\"submit\" name=\"cancel\" value=\"{$lang['strcancel']}\">\n";
                        echo "</form>\n";
                }
                else {
 
        switch ($action) {
                case 'save_edit':
-                       doSaveEdit();
+                       if (isset($_POST['cancel'])) doDefault();
+                       else doSaveEdit();
                        break;
                case 'edit':
                        doEdit();
                        doProperties();
                        break;
                case 'save_create':
-                       doSaveCreate();
+                       if (isset($_POST['cancel'])) doDefault();
+                       else doSaveCreate();
                        break;
                case 'create':
                        doCreate();
                        break;
                case 'drop':
-                       if (isset($_POST['yes'])) doDrop(false);
+                       if (isset($_POST['drop'])) doDrop(false);
                        else doDefault();
                        break;
                case 'confirm_drop':