diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-07-17 18:35:06 -0700 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-07-17 18:35:06 -0700 |
commit | df22832a5b7e7c1962940becab1c90aaec3392f9 (patch) | |
tree | 1e76b7873ad53a0535f0ffe0ff35ed0c9ebf86af | |
parent | d692002bcfca1cc630ddd0e55b693744ef7fa924 (diff) |
Rename "locale" helper to "locales" to avoid conflicting with PHP 5.3.
Fixes ticket #194
-rw-r--r-- | modules/gallery/controllers/admin_languages.php | 6 | ||||
-rw-r--r-- | modules/gallery/helpers/l10n_client.php | 2 | ||||
-rw-r--r-- | modules/gallery/helpers/locales.php (renamed from modules/gallery/helpers/locale.php) | 2 | ||||
-rw-r--r-- | modules/gallery/libraries/MY_View.php | 2 | ||||
-rw-r--r-- | modules/gallery/views/l10n_client.html.php | 2 | ||||
-rw-r--r-- | modules/user/helpers/user.php | 2 |
6 files changed, 8 insertions, 8 deletions
diff --git a/modules/gallery/controllers/admin_languages.php b/modules/gallery/controllers/admin_languages.php index d1b805da..ae90ad07 100644 --- a/modules/gallery/controllers/admin_languages.php +++ b/modules/gallery/controllers/admin_languages.php @@ -36,7 +36,7 @@ class Admin_Languages_Controller extends Admin_Controller { $form = $this->_languages_form(); if ($form->validate()) { module::set_var("gallery", "default_locale", $form->choose_language->locale->value); - locale::update_installed($form->choose_language->installed_locales->value); + locales::update_installed($form->choose_language->installed_locales->value); message::success(t("Settings saved")); } url::redirect("admin/languages"); @@ -89,8 +89,8 @@ class Admin_Languages_Controller extends Admin_Controller { } private function _languages_form() { - $all_locales = locale::available(); - $installed_locales = locale::installed(); + $all_locales = locales::available(); + $installed_locales = locales::installed(); $form = new Forge("admin/languages/save", "", "post", array("id" => "gLanguageSettingsForm")); $group = $form->group("choose_language") ->label(t("Language settings")); diff --git a/modules/gallery/helpers/l10n_client.php b/modules/gallery/helpers/l10n_client.php index 6d4da0eb..b576b4e1 100644 --- a/modules/gallery/helpers/l10n_client.php +++ b/modules/gallery/helpers/l10n_client.php @@ -74,7 +74,7 @@ class l10n_client_Core { $request->locales = array(); $request->messages = new stdClass(); - $locales = locale::installed(); + $locales = locales::installed(); foreach ($locales as $locale => $locale_data) { $request->locales[] = $locale; } diff --git a/modules/gallery/helpers/locale.php b/modules/gallery/helpers/locales.php index 41b78834..3762b97b 100644 --- a/modules/gallery/helpers/locale.php +++ b/modules/gallery/helpers/locales.php @@ -21,7 +21,7 @@ /** * This is the API for handling locales. */ -class locale_Core { +class locales_Core { private static $locales; /** diff --git a/modules/gallery/libraries/MY_View.php b/modules/gallery/libraries/MY_View.php index 96dcc71b..84ee0892 100644 --- a/modules/gallery/libraries/MY_View.php +++ b/modules/gallery/libraries/MY_View.php @@ -45,7 +45,7 @@ class View extends View_Core { } public function body_attributes() { - if (locale::is_rtl()) { + if (locales::is_rtl()) { return 'class="rtl"'; } return ''; diff --git a/modules/gallery/views/l10n_client.html.php b/modules/gallery/views/l10n_client.html.php index c0cbbfa2..c73719ca 100644 --- a/modules/gallery/views/l10n_client.html.php +++ b/modules/gallery/views/l10n_client.html.php @@ -9,7 +9,7 @@ </h2></div> <div class="label source"><h2><?= t("Source") ?></div> <div class="label translation"><h2><?= t("Translation to %language", - array("language" => locale::display_name())) ?></h2></div> + array("language" => locales::display_name())) ?></h2></div> </div> <div id="l10n-client-string-select"> <ul class="string-list"> diff --git a/modules/user/helpers/user.php b/modules/user/helpers/user.php index 4105d745..53e9052c 100644 --- a/modules/user/helpers/user.php +++ b/modules/user/helpers/user.php @@ -79,7 +79,7 @@ class user_Core { } private static function _add_locale_dropdown(&$form, $user=null) { - $locales = locale::installed(); + $locales = locales::installed(); if (count($locales) > 1) { // Put "none" at the first position in the array $locales = array_merge(array("" => t("« none »")), $locales); |