unbreak some more stuff
This commit is contained in:
parent
576559fd02
commit
a08666be14
6
boot.php
6
boot.php
@ -1064,7 +1064,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, entity.* FROM `profile`
|
||||
@ -1074,7 +1074,7 @@ function profile_load(&$a, $nickname, $profile = 0) {
|
||||
intval($profile_int)
|
||||
);
|
||||
}
|
||||
if((! $r) && (! count($r))) {
|
||||
if(! ($r && count($r))) {
|
||||
$r = q("SELECT `profile`.`uid` AS `profile_uid`, `profile`.* , `contact`.`avatar_date` AS picdate, `entity`.* FROM `profile`
|
||||
left join `contact` on `contact`.`uid` = `profile`.`uid` LEFT JOIN `entity` ON `profile`.`uid` = entity.entity_id
|
||||
WHERE entity.entity_address = '%s' AND `profile`.`is_default` = 1 and `contact`.`self` = 1 LIMIT 1",
|
||||
@ -1082,7 +1082,7 @@ function profile_load(&$a, $nickname, $profile = 0) {
|
||||
);
|
||||
}
|
||||
|
||||
if(($r === false) || (! count($r))) {
|
||||
if(! ($r && count($r))) {
|
||||
logger('profile error: ' . $a->query_string, LOGGER_DEBUG);
|
||||
notice( t('Requested profile is not available.') . EOL );
|
||||
$a->error = 404;
|
||||
|
@ -46,15 +46,15 @@ function nav(&$a) {
|
||||
$nav['logout'] = Array('logout',t('Logout'), "", t('End this session'));
|
||||
|
||||
// user menu
|
||||
$nav['usermenu'][] = Array('profile/' . $a->user['nickname'], t('Status'), "", t('Your posts and conversations'));
|
||||
$nav['usermenu'][] = Array('profile/' . $a->user['nickname']. '?tab=profile', t('Profile'), "", t('Your profile page'));
|
||||
$nav['usermenu'][] = Array('photos/' . $a->user['nickname'], t('Photos'), "", t('Your photos'));
|
||||
$nav['usermenu'][] = Array('profile/' . $a->identity['entity_address'], t('Status'), "", t('Your posts and conversations'));
|
||||
$nav['usermenu'][] = Array('profile/' . $a->identity['entity_address']. '?tab=profile', t('Profile'), "", t('Your profile page'));
|
||||
$nav['usermenu'][] = Array('photos/' . $a->identity['entity_address'], t('Photos'), "", t('Your photos'));
|
||||
$nav['usermenu'][] = Array('events/', t('Events'), "", t('Your events'));
|
||||
|
||||
// user info
|
||||
$r = q("SELECT micro FROM contact WHERE uid=%d AND self=1", intval($a->entity['entity_id']));
|
||||
$r = q("SELECT micro FROM contact WHERE uid=%d AND self=1", intval($a->identity['entity_id']));
|
||||
$userinfo = array(
|
||||
'icon' => $a->get_baseurl($ssl_state). $r[0]['micro'],
|
||||
'icon' => $r[0]['micro'],
|
||||
'name' => $a->identity['entity_name'],
|
||||
);
|
||||
|
||||
@ -111,7 +111,7 @@ function nav(&$a) {
|
||||
|
||||
$nav['network'] = array('network', t('Network'), "", t('Conversations from your friends'));
|
||||
|
||||
$nav['home'] = array('profile/' . $a->user['nickname'], t('Home'), "", t('Your posts and conversations'));
|
||||
$nav['home'] = array('profile/' . $a->identity['entity_address'], t('Home'), "", t('Your posts and conversations'));
|
||||
|
||||
if($a->identity['entity_pageflags'] == PAGE_NORMAL) {
|
||||
$nav['introductions'] = array('notifications/intros', t('Introductions'), "", t('Friend Requests'));
|
||||
|
@ -8,7 +8,7 @@ function profile_photo_init(&$a) {
|
||||
return;
|
||||
}
|
||||
|
||||
profile_load($a,$a->user['nickname']);
|
||||
profile_load($a,$a->identity['entity_address']);
|
||||
|
||||
}
|
||||
|
||||
@ -166,7 +166,7 @@ function profile_photo_content(&$a) {
|
||||
notice( t('Permission denied.') . EOL );
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
$newuser = false;
|
||||
|
||||
if($a->argc == 2 && $a->argv[1] === 'new')
|
||||
|
Reference in New Issue
Block a user