aboutsummaryrefslogtreecommitdiffstats
path: root/boot.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-02-11 01:24:29 -0800
committerfriendica <info@friendica.com>2012-02-11 01:24:29 -0800
commit75a62db9c5e59adbd1d8dc2d5e0ba3544df3a15e (patch)
tree75371c0d1217c46d6b8240385421bfa86b2a9a7d /boot.php
parentd79c3351ea6692478a490f4225ea1009863dd65f (diff)
downloadvolse-hubzilla-75a62db9c5e59adbd1d8dc2d5e0ba3544df3a15e.tar.gz
volse-hubzilla-75a62db9c5e59adbd1d8dc2d5e0ba3544df3a15e.tar.bz2
volse-hubzilla-75a62db9c5e59adbd1d8dc2d5e0ba3544df3a15e.zip
show tags (pub_keywords) in advanced profile
Diffstat (limited to 'boot.php')
-rwxr-xr-xboot.php14
1 files changed, 12 insertions, 2 deletions
diff --git a/boot.php b/boot.php
index 1909abbed..d04563d53 100755
--- a/boot.php
+++ b/boot.php
@@ -819,7 +819,7 @@ function profile_load(&$a, $nickname, $profile = 0) {
}
$r = null;
-
+
if($profile) {
$profile_int = intval($profile);
$r = q("SELECT `profile`.`uid` AS `profile_uid`, `profile`.* , `contact`.`avatar-date` AS picdate, `user`.* FROM `profile`
@@ -829,7 +829,7 @@ function profile_load(&$a, $nickname, $profile = 0) {
intval($profile_int)
);
}
- if(! count($r)) {
+ if((! $r) && (! count($r))) {
$r = q("SELECT `profile`.`uid` AS `profile_uid`, `profile`.* , `contact`.`avatar-date` AS picdate, `user`.* FROM `profile`
left join `contact` on `contact`.`uid` = `profile`.`uid` LEFT JOIN `user` ON `profile`.`uid` = `user`.`uid`
WHERE `user`.`nickname` = '%s' AND `profile`.`is-default` = 1 and `contact`.`self` = 1 LIMIT 1",
@@ -842,6 +842,16 @@ function profile_load(&$a, $nickname, $profile = 0) {
$a->error = 404;
return;
}
+
+ // fetch user tags if this isn't the default profile
+
+ if(! $r[0]['is-default']) {
+ $x = q("select `pub_keywords` from `profile` where uid = %d and `is-default` = 1 limit 1",
+ intval($profile_uid)
+ );
+ if($x && count($x))
+ $r[0]['pub_keywords'] = $x[0]['pub_keywords'];
+ }
$a->profile = $r[0];