X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=mod%2Fprofiles.php;h=39382fbdd5b6c14b671289b60680151c51531776;hb=49d52faab5900dfe0ec66d8eec7a51473e7c1344;hp=5c372de8ee9243067c9c5e800a5e464022c573e6;hpb=a2d025232b93ff65370f592f847de75ed784d11b;p=friendica.git
diff --git a/mod/profiles.php b/mod/profiles.php
index 5c372de8ee..39382fbdd5 100644
--- a/mod/profiles.php
+++ b/mod/profiles.php
@@ -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
}
@@ -526,6 +526,8 @@ function profile_activity($changed, $value) {
return;
$arr = array();
+
+ $arr['guid'] = get_guid(32);
$arr['uri'] = $arr['parent-uri'] = item_new_uri($a->get_hostname(), local_user());
$arr['uid'] = local_user();
$arr['contact-id'] = $self[0]['id'];
@@ -582,15 +584,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 +780,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 +801,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']) ? '' . t('visible to everybody') . ''
- : '' . t('Edit visibility') . '')
+ : '' . t('Edit visibility') . '')
));
}
}