From a59fe9aba229aff21b31a8e03a018dbbc63bbe04 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Fri, 18 Aug 2006 01:38:25 +0000 Subject: [PATCH] r1056: - Dropping language.filepath - Adding language.domain --- admin/language.php | 8 ++++---- docs/schema_changes.sql | 4 ++++ includes/api_language.php | 2 +- includes/init.php | 1 - 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/admin/language.php b/admin/language.php index 3045221..b23499e 100644 --- a/admin/language.php +++ b/admin/language.php @@ -69,7 +69,7 @@ if ($_POST['do'] == 'insert') $language->set('direction', $bugsys->in['direction']); $language->set('userselect', $bugsys->in['userselect']); $language->set('debug', $bugsys->in['debug']); - $language->set('filename', $bugsys->in['filename']); + $language->set('domain', $bugsys->in['domain']); $language->insert(); $admin->redirect('language.php?do=modify'); @@ -89,11 +89,11 @@ if ($_REQUEST['do'] == 'add') $admin->table_head(_('New Language')); $admin->row_input(_('Title'), 'title'); + $admin->row_input(_('Gettext Language Domain'), 'domain'); $admin->row_input(_('Character Set'), 'charset', 'utf-8'); $admin->list_item(_('Left-to-Right'), 'ltr', true); $admin->list_item(_('Right-to-Left'), 'rtl'); $admin->row_list(_('Direction'), 'direction'); - $admin->row_input(_('Path to XML'), 'filename'); $admin->row_yesno(_('User Selectable'), 'userselect', true); $admin->row_yesno(_('Debug Mode (run directly from XML)'), 'langdebug', false); @@ -116,7 +116,7 @@ if ($_POST['do'] == 'update') $language->set('direction', $bugsys->in['direction']); $language->set('userselect', $bugsys->in['userselect']); $language->set('debug', $bugsys->in['debug']); - $language->set('filename', $bugsys->in['filename']); + $language->set('domain', $bugsys->in['domain']); $language->update(); $admin->redirect('language.php?do=modify'); @@ -145,11 +145,11 @@ if ($_REQUEST['do'] == 'edit') $admin->form_hidden_field('languageid', $language['languageid']); $admin->row_input(_('Title'), 'title', $language['title']); + $admin->row_input(_('Gettext Language Domain'), 'domain', $language['domain']); $admin->row_input(_('Character Set'), 'charset', $language['charset']); $admin->list_item(_('Left-to-Right'), 'ltr', (($language['direction'] == 'ltr') ? true : false)); $admin->list_item(_('Right-to-Left'), 'rtl', (($language['direction'] == 'rtl') ? true : false)); $admin->row_list(_('Direction'), 'direction'); - $admin->row_input(_('Path to XML'), 'filename', $language['filename']); $admin->row_yesno(_('User Selectable'), 'userselect', $language['userselect']); $admin->row_yesno(_('Debug Mode (run directly from XML)'), 'langdebug', (bool)$language['debug']); diff --git a/docs/schema_changes.sql b/docs/schema_changes.sql index e796d88..0ebb684 100644 --- a/docs/schema_changes.sql +++ b/docs/schema_changes.sql @@ -1,3 +1,7 @@ ## SVN $Id$ DROP TABLE localization; + +ALTER TABLE language DROP filename; + +ALTER TABLE language CHANGE languagecode domain VARCHAR(5) NOT NULL; diff --git a/includes/api_language.php b/includes/api_language.php index afbd1b3..104bd95 100644 --- a/includes/api_language.php +++ b/includes/api_language.php @@ -46,7 +46,7 @@ class LanguageAPI extends API 'debug' => array(TYPE_BOOL, REQ_NO), 'direction' => array(TYPE_STR, REQ_NO, ':self'), 'userselect' => array(TYPE_BOOL, REQ_NO), - 'filename' => array(TYPE_STR, REQ_YES) + 'domain' => array(TYPE_STR, REQ_YES) ); /** diff --git a/includes/init.php b/includes/init.php index 58ce320..28b77d3 100755 --- a/includes/init.php +++ b/includes/init.php @@ -129,7 +129,6 @@ $bugsys->load('localize', 'lang', true); require_once('./includes/language.php'); $LANGDATA = fetch_user_language(); -$lang->init_with_table(array()); $stylevar['lang'] = $LANGDATA['code']; $stylevar['lang_dir'] = $LANGDATA['direction']; -- 2.43.5