diff options
author | friendica <info@friendica.com> | 2014-08-02 23:28:51 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2014-08-02 23:28:51 -0700 |
commit | 44ee18b810b8671c9b522b06a5d8d0e62a3bef00 (patch) | |
tree | bc0d09b607de999d0f8bef535f4df9b84dd1adae /mod/profiles.php | |
parent | ae82df4399781ab542bc0799425e0f17b9481d53 (diff) | |
download | volse-hubzilla-44ee18b810b8671c9b522b06a5d8d0e62a3bef00.tar.gz volse-hubzilla-44ee18b810b8671c9b522b06a5d8d0e62a3bef00.tar.bz2 volse-hubzilla-44ee18b810b8671c9b522b06a5d8d0e62a3bef00.zip |
Let site admin choose what profile fields to support.
Diffstat (limited to 'mod/profiles.php')
-rw-r--r-- | mod/profiles.php | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/mod/profiles.php b/mod/profiles.php index 2062f094f..03e6801d2 100644 --- a/mod/profiles.php +++ b/mod/profiles.php @@ -458,11 +458,17 @@ function profiles_content(&$a) { $o = ''; + if(! local_user()) { notice( t('Permission denied.') . EOL); return; } + require_once('include/identity.php'); + + $profile_fields_basic = get_profile_fields_basic(); + $profile_fields_advanced = get_profile_fields_advanced(); + if((argc() > 1) && (intval(argv(1)))) { $r = q("SELECT * FROM `profile` WHERE `id` = %d AND `uid` = %d LIMIT 1", intval($a->argv[1]), @@ -486,6 +492,11 @@ function profiles_content(&$a) { )); $advanced = ((feature_enabled(local_user(),'advanced_profiles')) ? true : false); + if($advanced) + $fields = $profile_fields_advanced; + else + $fields = $profile_fields_basic; + $opt_tpl = get_markup_template("profile-hide_friends.tpl"); $hide_friends = replace_macros($opt_tpl,array( @@ -511,11 +522,12 @@ function profiles_content(&$a) { '$profile_drop_link' => 'profiles/drop/' . $r[0]['id'] . '?t=' . get_form_security_token("profile_drop"), + '$fields' => $fields, '$guid' => $r[0]['profile_guid'], '$banner' => t('Edit Profile Details'), '$submit' => t('Submit'), '$viewprof' => t('View this profile'), - '$editvis' => t('Edit visibility'), + '$editvis' => t('Edit visibility'), '$profpic' => t('Change Profile Photo'), '$cr_prof' => t('Create a new profile using these settings'), '$cl_prof' => t('Clone this profile'), |