summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers
diff options
context:
space:
mode:
authorAndy Staudacher <andy.st@gmail.com>2010-01-25 23:05:41 -0800
committerAndy Staudacher <andy.st@gmail.com>2010-01-25 23:05:41 -0800
commit119297e2adc3dfb452d2337f4b167b3e00c5b7e6 (patch)
tree9fb680c734f4c826e6ddf5b272108076073a9142 /modules/gallery/helpers
parentf8b8103c24cb50612b061cb6a4787695b600735c (diff)
Apply html::clean() to UI visible strings, and show language names instead of locale tags to be consistent with the user edit form.
Diffstat (limited to 'modules/gallery/helpers')
-rw-r--r--modules/gallery/helpers/gallery_event.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/modules/gallery/helpers/gallery_event.php b/modules/gallery/helpers/gallery_event.php
index 6b70513a..b35ae3c4 100644
--- a/modules/gallery/helpers/gallery_event.php
+++ b/modules/gallery/helpers/gallery_event.php
@@ -381,18 +381,22 @@ class gallery_event_Core {
static function show_user_profile($data) {
$v = new View("user_profile_info.html");
- $fields = array("name" => t("Name"), "locale" => t("Locale"), "email" => t("Email"),
- "full_name" => t("Full name"), "url" => "Web site");
+ $fields = array("name" => t("Name"), "locale" => t("Language Preference"),
+ "email" => t("Email"), "full_name" => t("Full name"), "url" => "Web site");
if (!$data->display_all) {
$fields = array("name" => t("Name"), "full_name" => t("Full name"), "url" => "Web site");
}
$v->fields = array();
foreach ($fields as $field => $label) {
if (!empty($data->user->$field)) {
- $v->fields[(string)$label->for_html()] = $data->user->$field;
+ $value = $data->user->$field;
+ if ($field == "locale") {
+ $value = locales::display_name($value);
+ }
+ $v->fields[(string) $label] = html::clean($value);
}
}
- $data->content[] = (object)array("title" => t("User information"), "view" => $v);
+ $data->content[] = (object) array("title" => t("User information"), "view" => $v);
}
}