From d504e04214932d06db3dadbe3eec1059e3d3df6a Mon Sep 17 00:00:00 2001 From: soranzo Date: Wed, 1 Jun 2005 10:38:14 +0000 Subject: [PATCH] Re-enable access to reports and other pages broken after multiserver merge. Uniform use of ->href --- database.php | 18 +++++++----------- display.php | 4 ++-- info.php | 8 ++++---- reports.php | 4 ++-- sql.php | 6 +++--- tablespaces.php | 12 +++++------- 6 files changed, 23 insertions(+), 29 deletions(-) diff --git a/database.php b/database.php index a3aee0ca..aed4722f 100755 --- a/database.php +++ b/database.php @@ -3,7 +3,7 @@ /** * Manage schemas within a database * - * $Id: database.php,v 1.66 2005/05/02 15:47:23 chriskl Exp $ + * $Id: database.php,v 1.67 2005/06/01 10:38:14 soranzo Exp $ */ // Include application functions @@ -390,12 +390,10 @@ if ($data->hasSignals()) { $columns['actions'] = array('title' => $lang['stractions']); - $href = $misc->getHREF('schema'); - $actions = array( 'cancel' => array( 'title' => $lang['strcancel'], - 'url' => "{$PHP_SELF}?action=signal&signal=CANCEL&{$href}&", + 'url' => "{$PHP_SELF}?action=signal&signal=CANCEL&{$misc->href}&", 'vars' => array('procpid' => 'procpid') ) ); @@ -679,34 +677,32 @@ ), ); - $href = $misc->getHREF('schema'); - $actions = array( 'properties' => array( 'title' => $lang['strproperties'], - 'url' => "redirect.php?subject=schema&{$href}&", + 'url' => "redirect.php?subject=schema&{$misc->href}&", 'vars' => array('schema' => 'nspname'), ), 'drop' => array( 'title' => $lang['strdrop'], - 'url' => "{$PHP_SELF}?action=confirm_drop&{$href}&", + 'url' => "{$PHP_SELF}?action=confirm_drop&{$misc->href}&", 'vars' => array('schema' => 'nspname'), ), 'privileges' => array( 'title' => $lang['strprivileges'], - 'url' => "privileges.php?subject=schema&{$href}&", + 'url' => "privileges.php?subject=schema&{$misc->href}&", 'vars' => array('schema' => 'nspname'), ), 'alter' => array( 'title' => $lang['stralter'], - 'url' => "{$PHP_SELF}?action=alter_schema&{$href}&", + 'url' => "{$PHP_SELF}?action=alter_schema&{$misc->href}&", 'vars' => array('schema' => 'nspname'), ), ); $misc->printTable($schemas, $columns, $actions, $lang['strnoschemas']); - echo "

{$lang['strcreateschema']}

\n"; + echo "

href}\">{$lang['strcreateschema']}

\n"; } else { // If the database does not support schemas... echo "

{$lang['strnoschemas']}

\n"; diff --git a/display.php b/display.php index fa335c1d..3154010c 100644 --- a/display.php +++ b/display.php @@ -9,7 +9,7 @@ * @param $return_desc The return link name * @param $page The current page * - * $Id: display.php,v 1.49 2005/05/02 15:47:23 chriskl Exp $ + * $Id: display.php,v 1.50 2005/06/01 10:38:14 soranzo Exp $ */ // Prevent timeouts on large exports (non-safe mode only) @@ -390,7 +390,7 @@ urlencode($_REQUEST['page']), "\">{$lang['strexpand']}\n"; // Create report if (isset($_REQUEST['query']) && $conf['show_reports'] && isset($rs) && is_object($rs) && $rs->recordCount() > 0) { - echo " | href}&action=create&report_sql=", urlencode($_REQUEST['query']), "\">{$lang['strcreatereport']}\n"; } // Create view and download diff --git a/info.php b/info.php index 81a38f48..d218f846 100644 --- a/info.php +++ b/info.php @@ -3,7 +3,7 @@ /** * List extra information on a table * - * $Id: info.php,v 1.9 2004/09/01 16:35:58 jollytoad Exp $ + * $Id: info.php,v 1.10 2005/06/01 10:38:14 soranzo Exp $ */ // Include application functions @@ -69,7 +69,7 @@ echo "", $misc->printVal($referrers->f['relname']), ""; echo "", $misc->printVal($referrers->f['conname']), ""; echo "", $misc->printVal($referrers->f['consrc']), ""; - echo "href}", "&schema=", urlencode($referrers->f['nspname']), "&table=", urlencode($referrers->f['relname']), "\">{$lang['strproperties']}\n"; echo "\t\n"; @@ -100,7 +100,7 @@ echo "\t\t", $misc->printVal($parents->f['schemaname']), ""; } echo "", $misc->printVal($parents->f['relname']), ""; - echo "href}", "&schema=", urlencode($parents->f['schemaname']), "&table=", urlencode($parents->f['relname']), "\">{$lang['strproperties']}\n"; echo "\t\n"; @@ -131,7 +131,7 @@ echo "\t\t", $misc->printVal($children->f['schemaname']), ""; } echo "", $misc->printVal($children->f['relname']), ""; - echo "href}", "&schema=", urlencode($children->f['schemaname']), "&table=", urlencode($children->f['relname']), "\">{$lang['strproperties']}\n"; echo "\t\n"; diff --git a/reports.php b/reports.php index 05a24b3d..042a2897 100644 --- a/reports.php +++ b/reports.php @@ -3,7 +3,7 @@ /** * List reports in a database * - * $Id: reports.php,v 1.20 2005/05/02 15:47:24 chriskl Exp $ + * $Id: reports.php,v 1.21 2005/06/01 10:38:14 soranzo Exp $ */ // Include application functions @@ -130,7 +130,7 @@ global $PHP_SELF, $lang; if (!isset($_REQUEST['report_name'])) $_REQUEST['report_name'] = ''; - if (!isset($_REQUEST['db_name'])) $_REQUEST['db_name'] = ''; + if (!isset($_REQUEST['db_name'])) $_REQUEST['db_name'] = (isset($_REQUEST['database']) ? $_REQUEST['database'] : ''); if (!isset($_REQUEST['descr'])) $_REQUEST['descr'] = ''; if (!isset($_REQUEST['report_sql'])) $_REQUEST['report_sql'] = ''; diff --git a/sql.php b/sql.php index b0501e04..a144582b 100644 --- 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.30 2005/03/26 10:47:03 chriskl Exp $ + * $Id: sql.php,v 1.31 2005/06/01 10:38:14 soranzo Exp $ */ // Prevent timeouts on large exports (non-safe mode only) @@ -170,10 +170,10 @@ echo "

{$lang['strsqlexecuted']}

\n"; - echo "

href}", "&action=sql&query=", urlencode($_POST['query']), "\">{$lang['streditsql']}"; if ($conf['show_reports'] && isset($rs) && is_object($rs) && $rs->recordCount() > 0) { - echo " | href}&action=create&report_sql=", urlencode($_POST['query']), "\">{$lang['strcreatereport']}"; } echo "

\n"; diff --git a/tablespaces.php b/tablespaces.php index 3c96590d..dc65e003 100755 --- a/tablespaces.php +++ b/tablespaces.php @@ -3,7 +3,7 @@ /** * Manage tablespaces in a database cluster * - * $Id: tablespaces.php,v 1.7 2005/05/02 15:47:24 chriskl Exp $ + * $Id: tablespaces.php,v 1.8 2005/06/01 10:38:14 soranzo Exp $ */ // Include application functions @@ -209,29 +209,27 @@ ) ); - $href = $misc->getHREF('database'); - $actions = array( 'alter' => array( 'title' => $lang['stralter'], - 'url' => "{$PHP_SELF}?action=edit&{$href}&", + 'url' => "{$PHP_SELF}?action=edit&{$misc->href}&", 'vars' => array('tablespace' => 'spcname') ), 'drop' => array( 'title' => $lang['strdrop'], - 'url' => "{$PHP_SELF}?action=confirm_drop&{$href}&", + 'url' => "{$PHP_SELF}?action=confirm_drop&{$misc->href}&", 'vars' => array('tablespace' => 'spcname') ), 'privileges' => array( 'title' => $lang['strprivileges'], - 'url' => "privileges.php?subject=tablespace&{$href}&", + 'url' => "privileges.php?subject=tablespace&{$misc->href}&", 'vars' => array('tablespace' => 'spcname') ) ); $misc->printTable($tablespaces, $columns, $actions, $lang['strnotablespaces']); - echo "

{$lang['strcreatetablespace']}

\n"; + echo "

href}\">{$lang['strcreatetablespace']}

\n"; } -- 2.39.5