From 9a9f7772a7ccce85c94ac451416181793b245465 Mon Sep 17 00:00:00 2001 From: chriskl Date: Wed, 13 Aug 2003 09:17:26 +0000 Subject: [PATCH] lots of fixes and improvements to reports --- HISTORY | 18 ++++++++++++++++-- reports.php | 39 +++++++++++++++++++-------------------- 2 files changed, 35 insertions(+), 22 deletions(-) diff --git a/HISTORY b/HISTORY index 0d33c78d..358ee4c0 100644 --- 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 ----------- diff --git a/reports.php b/reports.php index 37c38f41..802b5a0a 100644 --- a/reports.php +++ b/reports.php @@ -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']; @@ -35,11 +35,11 @@ // Get a list of available databases $databases = &$data->getDatabases(); - echo "

{$lang['strreports']}: {$lang['strcreatereport']}

\n"; + echo "

{$lang['strreports']}: ", htmlspecialchars($report->f['report_name']), ": {$lang['stredit']}

\n"; $misc->printMsg($msg); echo "
\n"; - echo "\n"; + echo "
\n"; echo "\n"; echo "\n"; @@ -62,11 +62,9 @@ echo "
{$lang['strname']}_maxNameLen}\" value=\"", htmlspecialchars($_POST['report_name']), "\" />
\n"; echo "

\n"; echo "\n"; - echo "

\n"; + echo "

\n"; echo "f['report_id']}\" />\n"; echo "
\n"; - - echo "

{$lang['strshowallreports']}

\n"; } /** @@ -81,15 +79,15 @@ 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']); } } @@ -102,11 +100,11 @@ $report = $reportsdb->getReport($_REQUEST['report_id']); - echo "

{$lang['strreports']}: {$lang['strreport']}

\n"; + echo "

{$lang['strreports']}: ", htmlspecialchars($report->f['report_name']), "

\n"; $misc->printMsg($msg); if ($report->recordCount() == 1) { - echo "\n"; + echo "
\n"; echo "\n"; echo "\n"; echo "\n"; @@ -164,10 +162,8 @@ echo "
{$lang['strname']}", $misc->printVal($report->f['report_name']), "
{$lang['strdatabase']}
\n"; echo "

\n"; echo "\n"; - echo "

\n"; + echo "

\n"; echo "\n"; - - echo "

{$lang['strshowallreports']}

\n"; } /** @@ -213,7 +209,8 @@ echo "
\n"; echo "\n"; echo "\n"; - echo " \n"; + echo "\n"; + echo "\n"; echo "
\n"; } else { @@ -277,7 +274,8 @@ switch ($action) { case 'save_edit': - doSaveEdit(); + if (isset($_POST['cancel'])) doDefault(); + else doSaveEdit(); break; case 'edit': doEdit(); @@ -286,13 +284,14 @@ 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': -- 2.39.5