From f5fe48d5510c0689912acc2ae8a1209690da5b09 Mon Sep 17 00:00:00 2001 From: soranzo Date: Thu, 1 Apr 2004 15:10:30 +0000 Subject: [PATCH] Fix comment for createTable(). In doCreate() move the input field for table comment in stage 1 and better HTML identation --- classes/database/Postgres.php | 7 ++-- tables.php | 68 ++++++++++++++++++----------------- 2 files changed, 39 insertions(+), 36 deletions(-) diff --git a/classes/database/Postgres.php b/classes/database/Postgres.php index 3571cfb5..6214ba2c 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.189 2004/04/01 01:13:22 chriskl Exp $ + * $Id: Postgres.php,v 1.190 2004/04/01 15:10:31 soranzo Exp $ */ // @@@ THOUGHT: What about inherits? ie. use of ONLY??? @@ -1133,17 +1133,18 @@ class Postgres extends BaseDB { * @param $fields The number of fields * @param $field An array of field names * @param $type An array of field types - * @param $array An array of '' or [] for each type if it's an array or not + * @param $array An array of '' or '[]' for each type if it's an array or not * @param $length An array of field lengths * @param $notnull An array of not null * @param $default An array of default values * @param $withoutoids True if WITHOUT OIDS, false otherwise + * @param $colcomment An array of comments * @param $comment Table comment * @return 0 success * @return -1 no fields supplied */ function createTable($name, $fields, $field, $type, $array, $length, $notnull, - $default, $withoutoids, $colcomment, $tblcomment) { + $default, $withoutoids, $colcomment, $tblcomment) { $this->fieldClean($name); $this->fieldClean($tblcomment); diff --git a/tables.php b/tables.php index 88f3d4fc..f8bbe434 100644 --- a/tables.php +++ b/tables.php @@ -3,7 +3,7 @@ /** * List tables in a database * - * $Id: tables.php,v 1.46 2004/03/29 02:05:31 chriskl Exp $ + * $Id: tables.php,v 1.47 2004/04/01 15:10:30 soranzo Exp $ */ // Include application functions @@ -31,18 +31,22 @@ echo "
\n"; echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; if ($data->hasWithoutOIDs()) { - echo "\n"; - echo "\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; } + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "
{$lang['strname']}_maxNameLen}\" value=\"", - htmlspecialchars($_REQUEST['name']), "\" />
{$lang['strnumfields']}_maxNameLen}\" value=\"", - htmlspecialchars($_REQUEST['fields']), "\" />
{$lang['strname']}_maxNameLen}\" value=\"", + htmlspecialchars($_REQUEST['name']), "\" />
{$lang['strnumfields']}_maxNameLen}\" value=\"", + htmlspecialchars($_REQUEST['fields']), "\" />
{$lang['stroptions']}WITHOUT OIDS
{$lang['stroptions']}WITHOUT OIDS
{$lang['strcomment']}
\n"; echo "

\n"; echo "\n"; @@ -76,10 +80,7 @@ // Output table header echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; + echo "\t\n"; for ($i = 0; $i < $_REQUEST['fields']; $i++) { if (!isset($_REQUEST['field'][$i])) $_REQUEST['field'][$i] = ''; @@ -87,39 +88,39 @@ if (!isset($_REQUEST['default'][$i])) $_REQUEST['default'][$i] = ''; if (!isset($_REQUEST['colcomment'][$i])) $_REQUEST['colcomment'][$i] = ''; - echo ""; - echo ""; - echo "\n\t\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\t\t\n\t\t\n"; - echo ""; - echo ""; - echo ""; - echo "\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\t\n\t\n"; } echo "
{$lang['strcomment']}
 
{$lang['strfield']}{$lang['strtype']}{$lang['strlength']}{$lang['strnotnull']}{$lang['strdefault']}{$lang['strcomment']}
{$lang['strfield']}{$lang['strtype']}{$lang['strlength']}{$lang['strnotnull']}{$lang['strdefault']}{$lang['strcomment']}
", $i + 1, ". _maxNameLen}\" value=\"", - htmlspecialchars($_REQUEST['field'][$i]), "\" />
", $i + 1, ". _maxNameLen}\" value=\"", + htmlspecialchars($_REQUEST['field'][$i]), "\" />\n\t\t\t"; + echo "\t\t\t\n"; // Output array type selector - echo "
\n"; echo "

\n"; @@ -128,8 +129,9 @@ echo "\n"; echo "\n"; if (isset($_REQUEST['withoutoids'])) { - echo "\n"; + echo "\n"; } + echo "\n"; echo "\n"; echo "

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