mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-07-31 04:00:56 -04:00
Switch the locale::$locales data structure to be an array instead of a
stdClass because we're not allowed to asort() stdClass objects in PHP 5.2.6.
This commit is contained in:
@@ -80,10 +80,10 @@ class user_Core {
|
||||
|
||||
private static function _add_locale_dropdown(&$form, $user=null) {
|
||||
$locales = locale::installed();
|
||||
$locales_array = (array) $locales;
|
||||
if (count($locales_array) > 1) {
|
||||
$locales->none = t("« none »");
|
||||
$selected_locale = ($user && $user->locale) ? $user->locale : "none";
|
||||
if (count($locales) > 1) {
|
||||
// Put "none" at the first position in the array
|
||||
$locales = array_merge(array("" => t("« none »")), $locales);
|
||||
$selected_locale = ($user && $user->locale) ? $user->locale : "";
|
||||
$form->dropdown("locale")
|
||||
->label(t("Language Preference"))
|
||||
->options($locales)
|
||||
|
||||
Reference in New Issue
Block a user