aboutsummaryrefslogtreecommitdiffstats
path: root/mod/profiles.php
diff options
context:
space:
mode:
authoranaqreon <tamanning@zoho.com>2014-12-30 16:06:35 -0600
committeranaqreon <tamanning@zoho.com>2014-12-30 16:06:35 -0600
commitb78a545a1056e6db9f4b6b4f262182b0a5c56e67 (patch)
tree515c2f742a5a39e18b00debf1849ee9703fa4a42 /mod/profiles.php
parentd67c5a6ffd134602084a6dcb37b316bf768bf715 (diff)
parent43671a0a323afa758df56c06822ce3c46da026df (diff)
downloadvolse-hubzilla-b78a545a1056e6db9f4b6b4f262182b0a5c56e67.tar.gz
volse-hubzilla-b78a545a1056e6db9f4b6b4f262182b0a5c56e67.tar.bz2
volse-hubzilla-b78a545a1056e6db9f4b6b4f262182b0a5c56e67.zip
Merge pull request #1 from friendica/master
Pull from upstream
Diffstat (limited to 'mod/profiles.php')
-rw-r--r--mod/profiles.php22
1 files changed, 16 insertions, 6 deletions
diff --git a/mod/profiles.php b/mod/profiles.php
index 910c48743..f2695f332 100644
--- a/mod/profiles.php
+++ b/mod/profiles.php
@@ -156,9 +156,14 @@ function profiles_init(&$a) {
// Run profile_load() here to make sure the theme is set before
// we start loading content
- if((argc() > 1) && (intval(argv(1)))) {
+ if(((argc() > 1) && (intval(argv(1)))) || !feature_enabled(local_user(),'multi_profiles')) {
+ if(feature_enabled(local_user(),'multi_profiles'))
+ $id = $a->argv[1];
+ else
+ $id = q("select id from profile where uid = %d and is_default = 1",local_user())[0]['id'];
+
$r = q("SELECT * FROM `profile` WHERE `id` = %d AND `uid` = %d LIMIT 1",
- intval($a->argv[1]),
+ intval($id),
intval(local_user())
);
if(! count($r)) {
@@ -556,9 +561,14 @@ function profiles_content(&$a) {
$profile_fields_basic = get_profile_fields_basic();
$profile_fields_advanced = get_profile_fields_advanced();
- if((argc() > 1) && (intval(argv(1)))) {
+ if(((argc() > 1) && (intval(argv(1)))) || !feature_enabled(local_user(),'multi_profiles')) {
+ if(feature_enabled(local_user(),'multi_profiles'))
+ $id = $a->argv[1];
+ else
+ $id = q("select id from profile where uid = %d and is_default = 1",local_user())[0]['id'];
+
$r = q("SELECT * FROM `profile` WHERE `id` = %d AND `uid` = %d LIMIT 1",
- intval($a->argv[1]),
+ intval($id),
intval(local_user())
);
if(! count($r)) {
@@ -585,7 +595,7 @@ function profiles_content(&$a) {
$fields = $profile_fields_basic;
- $opt_tpl = get_markup_template("profile-hide_friends.tpl");
+ $opt_tpl = get_markup_template("profile_hide_friends.tpl");
$hide_friends = replace_macros($opt_tpl,array(
'$desc' => t('Hide your contact/friend list from viewers of this profile?'),
'$yes_str' => t('Yes'),
@@ -611,7 +621,7 @@ function profiles_content(&$a) {
}
}
-logger('extra_fields: ' . print_r($extra_fields,true));
+//logger('extra_fields: ' . print_r($extra_fields,true));
$f = get_config('system','birthday_input_format');
if(! $f)