summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gallery/helpers')
-rw-r--r--modules/gallery/helpers/gallery_event.php18
-rw-r--r--modules/gallery/helpers/module.php2
-rw-r--r--modules/gallery/helpers/user_profile.php3
3 files changed, 20 insertions, 3 deletions
diff --git a/modules/gallery/helpers/gallery_event.php b/modules/gallery/helpers/gallery_event.php
index 255176c4..1df3a507 100644
--- a/modules/gallery/helpers/gallery_event.php
+++ b/modules/gallery/helpers/gallery_event.php
@@ -395,4 +395,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");
+ 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;
+ }
+ }
+ $data->content[] = (object)array("title" => t("User information"), "view" => $v);
+
+ }
}
diff --git a/modules/gallery/helpers/module.php b/modules/gallery/helpers/module.php
index f680ff6a..95e426c4 100644
--- a/modules/gallery/helpers/module.php
+++ b/modules/gallery/helpers/module.php
@@ -98,7 +98,7 @@ class module_Core {
$m->active = self::is_active($module_name);
$m->code_version = $m->version;
$m->version = self::get_version($module_name);
- $m->locked = !empty($m->no_module_admin);
+ $m->locked = false;
}
// Lock certain modules
diff --git a/modules/gallery/helpers/user_profile.php b/modules/gallery/helpers/user_profile.php
index 018e1bd1..95a994bc 100644
--- a/modules/gallery/helpers/user_profile.php
+++ b/modules/gallery/helpers/user_profile.php
@@ -24,8 +24,7 @@ class user_profile_Core {
* @return url for the profile display
*/
static function url($user_id) {
- $return_url = urlencode(url::abs_current());
- return url::site("user_profile/show/{$user_id}?return=$return_url");
+ return url::site("user_profile/show/{$user_id}");
}
static function get_contact_form($user) {