From f072db280fc697e332e16190fe31be62e8c2c6af Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sat, 14 Jan 2006 21:36:02 +0000 Subject: [PATCH] r701: Changing language.default to language.isdefault --- admin/language.php | 4 ++-- docs/schema_changes.sql | 4 +++- includes/language.php | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/admin/language.php b/admin/language.php index badc8a1..f04aa97 100644 --- a/admin/language.php +++ b/admin/language.php @@ -36,7 +36,7 @@ if ($_REQUEST['do'] == 'kill') } $language = $db->query_first("SELECT * FROM language WHERE languageid = " . intval($bugsys->in['languageid'])); - if ($language['default']) + if ($language['isdefault']) { $admin->error($lang->string('You cannot delete the default language. Please select another language to be the default language and then delete this one.')); } @@ -185,7 +185,7 @@ if ($_REQUEST['do'] == 'modify') $admin->row_multi_item(array( $language['title'] => 'l', $language['charset'] => 'c', - (($language['default']) ? '' . $lang->string('DEFAULT LANGUAGE') . ' / ' : '') . ($language['userselect'] ? $lang->string('User Selectable') : $lang->string('Private')) => 'c', + (($language['isdefault']) ? '' . $lang->string('DEFAULT LANGUAGE') . ' / ' : '') . ($language['userselect'] ? $lang->string('User Selectable') : $lang->string('Private')) => 'c', "[" . $lang->string('Edit Settings') . "] [" . $lang->string('Reload XML') . "]" => 'c' )); } diff --git a/docs/schema_changes.sql b/docs/schema_changes.sql index e6737d5..8549382 100644 --- a/docs/schema_changes.sql +++ b/docs/schema_changes.sql @@ -12,4 +12,6 @@ CREATE TABLE `fieldhelp` ( `body` MEDIUMTEXT NOT NULL ); -ALTER TABLE `fieldhelp` ADD PRIMARY KEY(`keystring`); \ No newline at end of file +ALTER TABLE `fieldhelp` ADD PRIMARY KEY(`keystring`); + +ALTER TABLE `language` CHANGE `default` `isdefault` INT(2) UNSIGNED NOT NULL DEFAULT '0'; \ No newline at end of file diff --git a/includes/language.php b/includes/language.php index fa1376c..006c219 100644 --- a/includes/language.php +++ b/includes/language.php @@ -95,7 +95,7 @@ function fetch_user_language() { foreach ($bugsys->datastore['language'] AS $language) { - if ($language['default']) + if ($language['isdefault']) { $languageid = $language['languageid']; $language = $bugsys->datastore['language']["$languageid"]; -- 2.43.5