From 23fa3e7707c90ffcaffafd5d771859eb0b1e8ee9 Mon Sep 17 00:00:00 2001 From: chriskl Date: Tue, 18 Mar 2003 09:14:25 +0000 Subject: [PATCH] new lang system fixes --- constraints.php | 25 +++++++++++-------------- database.php | 19 +++++++++---------- lang/english.php | 8 ++++---- lang/recoded/english.php | 8 ++++---- 4 files changed, 28 insertions(+), 32 deletions(-) diff --git a/constraints.php b/constraints.php index 693fce5a..920a092b 100644 --- a/constraints.php +++ b/constraints.php @@ -3,7 +3,7 @@ /** * List constraints on a table * - * $Id: constraints.php,v 1.6 2003/03/17 05:20:29 chriskl Exp $ + * $Id: constraints.php,v 1.7 2003/03/18 09:15:49 chriskl Exp $ */ // Include application functions @@ -17,22 +17,20 @@ */ function addCheck($confirm, $msg = '') { global $PHP_SELF, $data, $localData, $misc; - global $strAddCheck, $strTables, $strOK, $strCancel; - global $strName, $strDefinition, $strCheckNeedsDefinition; - global $strCheckAdded, $strCheckAddedBad; + global $lang; if (!isset($_POST['name'])) $_POST['name'] = ''; if (!isset($_POST['definition'])) $_POST['definition'] = ''; if ($confirm) { - echo "

", htmlspecialchars($_REQUEST['database']), ": {$strTables}: ", - htmlspecialchars($_REQUEST['table']), ": {$strAddCheck}

\n"; + echo "

", htmlspecialchars($_REQUEST['database']), ": {$lang['strtables']}: ", + htmlspecialchars($_REQUEST['table']), ": {$lang['straddcheck']}

\n"; $misc->printMsg($msg); echo "
\n"; echo "\n"; - echo "\n"; - echo "\n"; + echo "\n"; + echo "\n"; echo "\n"; @@ -44,20 +42,20 @@ echo "\n"; echo "\n"; echo $misc->form; - echo "

\n"; + echo "

\n"; echo "\n"; } else { if (trim($_POST['definition']) == '') - addCheck(true, $strCheckNeedsDefinition); + addCheck(true, $lang['strcheckneedsdefinition']); else { $status = $localData->addCheckConstraint($_POST['table'], $_POST['definition'], $_POST['name']); if ($status == 0) - doDefault($strCheckAdded); + doDefault($lang['strcheckadded']); else - addCheck(true, $strCheckAddedBad); + addCheck(true, $lang['strcheckaddedbad']); } } } @@ -68,10 +66,9 @@ function doDrop($confirm) { global $localData, $misc; global $PHP_SELF, $lang; - global $strTables; if ($confirm) { - echo "

", htmlspecialchars($_REQUEST['database']), ": {$strTables}: ", + echo "

", htmlspecialchars($_REQUEST['database']), ": {$lang['strtables']}: ", htmlspecialchars($_REQUEST['table']), ": " , htmlspecialchars($_REQUEST['constraint']), ": {$lang['strdrop']}

\n"; echo "

", sprintf($lang['strconfdropconstraint'], htmlspecialchars($_REQUEST['constraint']), diff --git a/database.php b/database.php index bbe5a617..0a7c3a35 100755 --- a/database.php +++ b/database.php @@ -3,7 +3,7 @@ /** * Manage schemas within a database * - * $Id: database.php,v 1.8 2003/03/17 05:20:29 chriskl Exp $ + * $Id: database.php,v 1.9 2003/03/18 09:14:25 chriskl Exp $ */ // Include application functions @@ -18,27 +18,26 @@ */ function doAdmin($action = '', $msg = '') { global $PHP_SELF, $localData, $misc; - global $strAdmin, $strVacuum, $strAnalyze, $strCluster, $strReindex; - global $strVacuumGood, $strVacuumBad, $strAnalyzeGood, $strAnalyzeBad; + global $lang; switch ($action) { case 'vacuum': $status = $localData->vacuumDB($_REQUEST['database']); - if ($status == 0) doAdmin('', $strVacuumGood); - else doAdmin('', $strVacuumBad); + if ($status == 0) doAdmin('', $lang['strvacuumgood']); + else doAdmin('', $lang['strvacuumbad']); break; case 'analyze': $status = $localData->analyzeDB($_REQUEST['database']); - if ($status == 0) doAdmin('', $strAnalyzeGood); - else doAdmin('', $strAnalyzeBad); + if ($status == 0) doAdmin('', $lang['stranalyzegood']); + else doAdmin('', $lang['stranalyzebad']); break; default: $misc->printDatabaseNav(); - echo "

", htmlspecialchars($_REQUEST['database']), ": {$strAdmin}

\n"; + echo "

", htmlspecialchars($_REQUEST['database']), ": {$lang['stradmin']}

\n"; $misc->printMsg($msg); echo "\n"; break; diff --git a/lang/english.php b/lang/english.php index 79305971..dd4d6266 100755 --- a/lang/english.php +++ b/lang/english.php @@ -4,7 +4,7 @@ * Language template file for WebDB. Use this to base language * files. * - * $Id: english.php,v 1.61 2003/03/18 08:11:26 chriskl Exp $ + * $Id: english.php,v 1.62 2003/03/18 09:15:49 chriskl Exp $ */ // Language and character set @@ -285,9 +285,9 @@ $lang['strconstraintdropped'] = 'Constraint dropped.'; $lang['strconstraintdroppedbad'] = 'Constraint drop failed.'; $lang['straddcheck'] = 'Add Check'; - $strCheckNeedsDefinition = 'Check constraint needs a definition.'; - $strCheckAdded = 'Check constraint added.'; - $strCheckAddedBad = 'Failed to add check constraint.'; + $lang['strcheckneedsdefinition'] = 'Check constraint needs a definition.'; + $lang['strcheckadded'] = 'Check constraint added.'; + $lang['strcheckaddedbad'] = 'Failed to add check constraint.'; // Functions $lang['strfunction'] = 'Function'; diff --git a/lang/recoded/english.php b/lang/recoded/english.php index d63468e4..fc1c4143 100644 --- a/lang/recoded/english.php +++ b/lang/recoded/english.php @@ -4,7 +4,7 @@ * Language template file for WebDB. Use this to base language * files. * - * $Id: english.php,v 1.16 2003/03/18 08:11:27 chriskl Exp $ + * $Id: english.php,v 1.17 2003/03/18 09:15:50 chriskl Exp $ */ // Language and character set @@ -285,9 +285,9 @@ $lang['strconstraintdropped'] = 'Constraint dropped.'; $lang['strconstraintdroppedbad'] = 'Constraint drop failed.'; $lang['straddcheck'] = 'Add Check'; - $strCheckNeedsDefinition = 'Check constraint needs a definition.'; - $strCheckAdded = 'Check constraint added.'; - $strCheckAddedBad = 'Failed to add check constraint.'; + $lang['strcheckneedsdefinition'] = 'Check constraint needs a definition.'; + $lang['strcheckadded'] = 'Check constraint added.'; + $lang['strcheckaddedbad'] = 'Failed to add check constraint.'; // Functions $lang['strfunction'] = 'Function'; -- 2.39.5
{$strName}{$strDefinition}
{$lang['strname']}{$lang['strdefinition']}
_maxNameLen}\" value=\"", htmlspecialchars($_POST['name']), "\">