From 539bf8cae9cc523e15e0395d47465521efcac4ff Mon Sep 17 00:00:00 2001 From: xzilla Date: Fri, 11 Jun 2004 05:08:19 +0000 Subject: [PATCH] Added help info for schemas and a few database tasks. A few items in database.php had no help (sql,find,export,etc...) but they are converted. Updated the 7.0 links. Changed base URLS to interactive docs. Also tweaked printTables to add a space before the menu/help table. I wish Chris worked this hard on the project ;-) --- classes/Misc.php | 4 ++-- classes/database/Postgres.php | 15 +++++++++++++-- classes/database/Postgres71.php | 13 ++++++++++--- classes/database/Postgres72.php | 4 ++-- classes/database/Postgres73.php | 4 ++-- classes/database/Postgres74.php | 4 ++-- database.php | 26 +++++++++++++------------- schema.php | 7 +++---- 8 files changed, 47 insertions(+), 30 deletions(-) diff --git a/classes/Misc.php b/classes/Misc.php index 77195289..6078c9d0 100644 --- a/classes/Misc.php +++ b/classes/Misc.php @@ -2,7 +2,7 @@ /** * Class to hold various commonly used functions * - * $Id: Misc.php,v 1.65 2004/06/07 11:38:38 soranzo Exp $ + * $Id: Misc.php,v 1.66 2004/06/11 05:08:26 xzilla Exp $ */ class Misc { @@ -154,7 +154,7 @@ if (!is_array($arr) || sizeof($arr) == 0) return; if ($help !== null && isset($data->help_page[$help])) { - echo "\n"; + echo "
\n"; echo "

"; // Join array with separator character echo implode($lang['strseparator'], $arr); diff --git a/classes/database/Postgres.php b/classes/database/Postgres.php index 06a198c1..ee32be08 100755 --- a/classes/database/Postgres.php +++ b/classes/database/Postgres.php @@ -4,7 +4,7 @@ * A class that implements the DB interface for Postgres * Note: This class uses ADODB and returns RecordSets. * - * $Id: Postgres.php,v 1.222 2004/06/07 11:38:39 soranzo Exp $ + * $Id: Postgres.php,v 1.223 2004/06/11 05:08:26 xzilla Exp $ */ // @@@ THOUGHT: What about inherits? ie. use of ONLY??? @@ -131,11 +131,22 @@ class Postgres extends BaseDB { var $joinOps = array('INNER JOIN' => 'INNER JOIN'); // Default help URL - var $help_base = 'http://www.postgresql.org/docs/7/static/'; + var $help_base = 'http://www.postgresql.org/docs/7/interactive/'; // Help sub pages var $help_page = array( 'create_table' => 'sql-createtable.htm' + 'drop_table' => 'sql-droptable.htm', + 'insert' => 'sql-insert.htm', + 'select' => 'sql-select.htm', + 'tables' => 'ddl.htm#DDL-BASICS', + 'schemas' => 'ddl-schemas.htm', + 'create_schema' => 'sql-createschema.htm', + 'alter_schema' => 'sql-alterschema.htm', + 'drop_schema' => 'sql-dropschema.htm', + 'runtime_config' => 'runtime-config.htm', + 'processes' => 'monitoring-stats.htm#MONITORING-STATS-VIEWS-TABLE', + 'sql' => 'sql-syntax.htm', ); /** diff --git a/classes/database/Postgres71.php b/classes/database/Postgres71.php index 59e85907..9449f19a 100644 --- a/classes/database/Postgres71.php +++ b/classes/database/Postgres71.php @@ -4,7 +4,7 @@ * A class that implements the DB interface for Postgres * Note: This class uses ADODB and returns RecordSets. * - * $Id: Postgres71.php,v 1.59 2004/06/06 08:50:28 chriskl Exp $ + * $Id: Postgres71.php,v 1.60 2004/06/11 05:08:26 xzilla Exp $ */ // @@@ THOUGHT: What about inherits? ie. use of ONLY??? @@ -52,7 +52,7 @@ class Postgres71 extends Postgres { var $joinOps = array('INNER JOIN' => 'INNER JOIN', 'LEFT JOIN' => 'LEFT JOIN', 'RIGHT JOIN' => 'RIGHT JOIN', 'FULL JOIN' => 'FULL JOIN'); // Default help URL - var $help_base = 'http://www.postgresql.org/docs/7.1/static/'; + var $help_base = 'http://www.postgresql.org/docs/7.1/interactive/'; // Help sub pages (alphabetical order) var $help_page = array( @@ -60,7 +60,14 @@ class Postgres71 extends Postgres { 'drop_table' => 'sql-droptable.html', 'insert' => 'sql-insert.html', 'select' => 'sql-select.html', - 'tables' => 'ddl.html#DDL-BASICS' + 'tables' => 'ddl.html#DDL-BASICS', + 'schemas' => 'ddl-schemas.html', + 'create_schema' => 'sql-createschema.html', + 'alter_schema' => 'sql-alterschema.html', + 'drop_schema' => 'sql-dropschema.html', + 'runtime_config' => 'runtime-config.html', + 'processes' => 'monitoring-stats.html#MONITORING-STATS-VIEWS-TABLE', + 'sql' => 'sql-syntax.html', ); /** diff --git a/classes/database/Postgres72.php b/classes/database/Postgres72.php index 14bd123e..aef5b8a5 100644 --- a/classes/database/Postgres72.php +++ b/classes/database/Postgres72.php @@ -4,7 +4,7 @@ * A class that implements the DB interface for Postgres * Note: This class uses ADODB and returns RecordSets. * - * $Id: Postgres72.php,v 1.69 2004/06/06 08:50:28 chriskl Exp $ + * $Id: Postgres72.php,v 1.70 2004/06/11 05:08:26 xzilla Exp $ */ @@ -27,7 +27,7 @@ class Postgres72 extends Postgres71 { var $extraTypes = array('SERIAL', 'BIGSERIAL'); // Default help URL - var $help_base = 'http://www.postgresql.org/docs/7.2/static/'; + var $help_base = 'http://www.postgresql.org/docs/7.2/interactive/'; /** * Constructor diff --git a/classes/database/Postgres73.php b/classes/database/Postgres73.php index 04f46d03..a4881e2d 100644 --- a/classes/database/Postgres73.php +++ b/classes/database/Postgres73.php @@ -4,7 +4,7 @@ * A class that implements the DB interface for Postgres * Note: This class uses ADODB and returns RecordSets. * - * $Id: Postgres73.php,v 1.120 2004/06/07 11:38:39 soranzo Exp $ + * $Id: Postgres73.php,v 1.121 2004/06/11 05:08:27 xzilla Exp $ */ // @@@ THOUGHT: What about inherits? ie. use of ONLY??? @@ -50,7 +50,7 @@ class Postgres73 extends Postgres72 { 'IN' => 'x', 'NOT IN' => 'x'); // Default help URL - var $help_base = 'http://www.postgresql.org/docs/7.3/static/'; + var $help_base = 'http://www.postgresql.org/docs/7.3/interactive/'; /** * Constructor diff --git a/classes/database/Postgres74.php b/classes/database/Postgres74.php index 4f7830e9..f4e184a0 100644 --- a/classes/database/Postgres74.php +++ b/classes/database/Postgres74.php @@ -4,7 +4,7 @@ * A class that implements the DB interface for Postgres * Note: This class uses ADODB and returns RecordSets. * - * $Id: Postgres74.php,v 1.33 2004/06/06 08:50:28 chriskl Exp $ + * $Id: Postgres74.php,v 1.34 2004/06/11 05:08:27 xzilla Exp $ */ include_once('./classes/database/Postgres73.php'); @@ -18,7 +18,7 @@ class Postgres74 extends Postgres73 { var $_maxNameLen = 63; // Default help URL - var $help_base = 'http://www.postgresql.org/docs/7.4/static/'; + var $help_base = 'http://www.postgresql.org/docs/7.4/interactive/'; /** * Constructor diff --git a/database.php b/database.php index f397d0ce..d7efef75 100755 --- a/database.php +++ b/database.php @@ -3,7 +3,7 @@ /** * Manage schemas within a database * - * $Id: database.php,v 1.47 2004/06/03 07:34:56 chriskl Exp $ + * $Id: database.php,v 1.48 2004/06/11 05:08:19 xzilla Exp $ */ // Include application functions @@ -27,7 +27,7 @@ if (!isset($_GET['term'])) $_GET['term'] = ''; $misc->printDatabaseNav(); - echo "

", $misc->printVal($_REQUEST['database']), ": {$lang['strfind']}

\n"; + $misc->printTitle(array($misc->printVal($_REQUEST['database']),$lang['strfind'])); $misc->printMsg($msg); echo "
\n"; @@ -64,7 +64,7 @@ else { if ($curr != '') echo "\n"; $curr = $rs->f['type']; - echo "

"; + echo "

"; switch ($curr) { case 'SCHEMA': echo $lang['strschemas']; @@ -121,7 +121,7 @@ echo $lang['stropclasses']; break; } - echo "

"; + echo ""; echo "
    \n"; } } @@ -239,7 +239,7 @@ global $PHP_SELF, $lang; $misc->printDatabaseNav(); - echo "

    ", $misc->printVal($_REQUEST['database']), ": {$lang['strexport']}

    \n"; + $misc->printTitle(array($misc->printVal($_REQUEST['database']),$lang['strexport'])); $misc->printMsg($msg); echo "\n"; @@ -291,7 +291,8 @@ $variables = &$data->getVariables(); $misc->printDatabaseNav(); - echo "

    ", $misc->printVal($_REQUEST['database']), ": {$lang['strvariables']}

    \n"; + + $misc->printTitle(array($misc->printVal($_REQUEST['database']),$lang['strvariables']),'runtime_config'); if ($variables->recordCount() > 0) { echo "\n"; @@ -325,7 +326,7 @@ $processes = &$data->getProcesses($_REQUEST['database']); $misc->printDatabaseNav(); - echo "

    ", $misc->printVal($_REQUEST['database']), ": {$lang['strprocesses']}

    \n"; + $misc->printTitle(array($misc->printVal($_REQUEST['database']),$lang['strprocesses']),'processes'); if ($processes->recordCount() > 0) { echo "
    \n"; @@ -386,7 +387,7 @@ break; default: $misc->printDatabaseNav(); - echo "

    ", $misc->printVal($_REQUEST['database']), ": {$lang['stradmin']}

    \n"; + $misc->printTitle(array($misc->printVal($_REQUEST['database']),$lang['stradmin'])); $misc->printMsg($msg); // Vacuum @@ -442,7 +443,7 @@ if (!isset($_REQUEST['query'])) $_REQUEST['query'] = ''; $misc->printDatabaseNav(); - echo "

    ", $misc->printVal($_REQUEST['database']), ": {$lang['strsql']}

    \n"; + $misc->printTitle(array($misc->printVal($_REQUEST['database']),$lang['strsql']),'sql'); echo "

    {$lang['strentersql']}

    \n"; echo "\n"; @@ -486,8 +487,7 @@ global $lang, $_reload_browser; if ($confirm) { - echo "

    ", $misc->printVal($_REQUEST['database']), ": ", - $misc->printVal($_REQUEST['schema']), ": {$lang['strdrop']}

    \n"; + $misc->printTitle(array($misc->printVal($_REQUEST['database']),$misc->printVal($_REQUEST['schema']),$lang['strdrop']),'drop_schema'); echo "

    ", sprintf($lang['strconfdropschema'], $misc->printVal($_REQUEST['schema'])), "

    \n"; @@ -529,7 +529,7 @@ // Fetch all users from the database $users = &$data->getUsers(); - echo "

    ", $misc->printVal($_REQUEST['database']), ": {$lang['strcreateschema']}

    \n"; + $misc->printTitle(array($misc->printVal($_REQUEST['database']),$lang['strcreateschema']),'create_schema'); $misc->printMsg($msg); echo "\n"; @@ -589,7 +589,7 @@ global $PHP_SELF, $lang; $misc->printDatabaseNav(); - echo "

    ", $misc->printVal($_REQUEST['database']), ": {$lang['strschemas']}

    \n"; + $misc->printTitle(array($misc->printVal($_REQUEST['database']),$lang['strschemas']),'schemas'); $misc->printMsg($msg); // Check that the DB actually supports schemas diff --git a/schema.php b/schema.php index 2158d71e..b91e3a16 100755 --- a/schema.php +++ b/schema.php @@ -3,7 +3,7 @@ /** * Display properties of a schema * - * $Id: schema.php,v 1.16 2004/05/31 13:25:49 chriskl Exp $ + * $Id: schema.php,v 1.17 2004/06/11 05:08:25 xzilla Exp $ */ include_once('./libraries/lib.inc.php'); @@ -20,8 +20,7 @@ $schema = &$data->getSchemaByName($_REQUEST['schema']); - echo "

    ", $misc->printVal($_REQUEST['database']), ": {$lang['strschemas']}: ", - $misc->printVal($_REQUEST['schema']), "

    \n"; + $misc->printTitle(array($misc->printVal($_REQUEST['database']),$lang['strschemas'],$misc->printVal($_REQUEST['schema'])),'schemas'); // Show comment if any if ($schema->f[$data->nspFields['nspcomment']] !== null) @@ -60,7 +59,7 @@ function doAlter($msg = '') { global $data, $misc,$PHP_SELF, $lang; - echo "

    ", $misc->printVal($_REQUEST['database']), ": ", $misc->printVal($_REQUEST['schema']), ": {$lang['stralter']}

    \n"; + $misc->printTitle(array($misc->printVal($_REQUEST['database']),$misc->printVal($_REQUEST['schema']),$lang['stralter']),'alter_schema'); $misc->printMsg($msg); $schema = &$data->getSchemaByName($_REQUEST['schema']); -- 2.39.5