Just some more removed baseurls ...

This commit is contained in:
Michael Vogel 2016-02-17 08:08:28 +01:00
commit c5b724828a
11 changed files with 46 additions and 39 deletions

View file

@ -420,7 +420,7 @@ function render_content(&$a, $items, $mode, $update, $preview = false) {
if(($normalised != 'mailbox') && (x($a->contacts[$normalised])))
$profile_avatar = $a->contacts[$normalised]['thumb'];
else
$profile_avatar = ((strlen($item['author-avatar'])) ? $a->get_cached_avatar_image($item['author-avatar']) : $item['thumb']);
$profile_avatar = $a->remove_baseurl(((strlen($item['author-avatar'])) ? $item['author-avatar'] : $item['thumb']));
$locate = array('location' => $item['location'], 'coord' => $item['coord'], 'html' => '');
call_hooks('render_location',$locate);
@ -791,7 +791,7 @@ function render_content(&$a, $items, $mode, $update, $preview = false) {
if(($normalised != 'mailbox') && (x($a->contacts,$normalised)))
$profile_avatar = $a->contacts[$normalised]['thumb'];
else
$profile_avatar = (((strlen($item['author-avatar'])) && $diff_author) ? $item['author-avatar'] : $a->get_cached_avatar_image($thumb));
$profile_avatar = $a->remove_baseurl(((strlen($item['author-avatar']) && $diff_author) ? $item['author-avatar'] : $thumb));
$like = ((x($alike,$item['uri'])) ? format_like($alike[$item['uri']],$alike[$item['uri'] . '-l'],'like',$item['uri']) : '');
$dislike = ((x($dlike,$item['uri'])) ? format_like($dlike[$item['uri']],$dlike[$item['uri'] . '-l'],'dislike',$item['uri']) : '');

View file

@ -158,14 +158,14 @@ function directory_content(&$a) {
else {
$location_e = $location;
}
$photo_menu = array(array(t("View Profile"), zrl($profile_link)));
$entry = array(
'id' => $rr['id'],
'url' => $profile_link,
'itemurl' => $itemurl,
'thumb' => proxy_url($a->get_cached_avatar_image($rr[$photo]), false, PROXY_SIZE_THUMB),
'thumb' => proxy_url($rr[$photo], false, PROXY_SIZE_THUMB),
'img_hover' => $rr['name'],
'name' => $rr['name'],
'details' => $details,

View file

@ -16,7 +16,7 @@ function profiles_init(&$a) {
);
if(! count($r)) {
notice( t('Profile not found.') . EOL);
goaway($a->get_baseurl(true) . '/profiles');
goaway('profiles');
return; // NOTREACHED
}
@ -34,9 +34,9 @@ function profiles_init(&$a) {
intval(local_user())
);
if($r)
info( t('Profile deleted.') . EOL);
info(t('Profile deleted.').EOL);
goaway($a->get_baseurl(true) . '/profiles');
goaway('profiles');
return; // NOTREACHED
}
@ -73,9 +73,9 @@ function profiles_init(&$a) {
info( t('New profile created.') . EOL);
if(count($r3) == 1)
goaway($a->get_baseurl(true) . '/profiles/' . $r3[0]['id']);
goaway('profiles/'.$r3[0]['id']);
goaway($a->get_baseurl(true) . '/profiles');
goaway('profiles');
}
if(($a->argc > 2) && ($a->argv[1] === 'clone')) {
@ -116,9 +116,9 @@ function profiles_init(&$a) {
);
info( t('New profile created.') . EOL);
if(count($r3) == 1)
goaway($a->get_baseurl(true) . '/profiles/' . $r3[0]['id']);
goaway('profiles/'.$r3[0]['id']);
goaway($a->get_baseurl(true) . '/profiles');
goaway('profiles');
return; // NOTREACHED
}
@ -582,15 +582,7 @@ function profile_activity($changed, $value) {
$i = item_store($arr);
if($i) {
// give it a permanent link
//q("update item set plink = '%s' where id = %d",
// dbesc($a->get_baseurl() . '/display/' . $a->user['nickname'] . '/' . $i),
// intval($i)
//);
proc_run('php',"include/notifier.php","activity","$i");
}
}
@ -786,7 +778,7 @@ function profiles_content(&$a) {
);
if(count($r)){
//Go to the default profile.
goaway($a->get_baseurl(true) . '/profiles/'.$r[0]['id']);
goaway('profiles/'.$r[0]['id']);
}
}
@ -807,12 +799,12 @@ function profiles_content(&$a) {
foreach($r as $rr) {
$o .= replace_macros($tpl, array(
'$photo' => $a->get_cached_avatar_image($rr['thumb']),
'$photo' => $a->remove_baseurl($rr['thumb']),
'$id' => $rr['id'],
'$alt' => t('Profile Image'),
'$profile_name' => $rr['profile-name'],
'$visible' => (($rr['is-default']) ? '<strong>' . t('visible to everybody') . '</strong>'
: '<a href="' . $a->get_baseurl(true) . '/profperm/' . $rr['id'] . '" />' . t('Edit visibility') . '</a>')
: '<a href="'.'profperm/'.$rr['id'].'" />' . t('Edit visibility') . '</a>')
));
}
}