diff options
| author | Bharat Mediratta <bharat@menalto.com> | 2010-01-25 19:49:17 -0800 |
|---|---|---|
| committer | Bharat Mediratta <bharat@menalto.com> | 2010-01-25 19:49:17 -0800 |
| commit | 1606961153fca681895a4f0145f7794000337539 (patch) | |
| tree | 30a8fc8ed2dfcafe1c1aea13432ccd4b5a26be40 /modules/gallery/helpers | |
| parent | cc912935731c216a57e4c291548ec503a0c1607e (diff) | |
| parent | 6023f2bb46598f9da096d63f7ab1dfb914eab6f7 (diff) | |
Merge branch 'master' of git@github.com:gallery/gallery3 into bharat_dev
Conflicts:
modules/gallery/libraries/MY_ORM.php
Diffstat (limited to 'modules/gallery/helpers')
| -rw-r--r-- | modules/gallery/helpers/gallery_event.php | 18 | ||||
| -rw-r--r-- | modules/gallery/helpers/module.php | 2 | ||||
| -rw-r--r-- | modules/gallery/helpers/user_profile.php | 3 |
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) { |
