X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fprofiles.php;h=0b8261422f3b5b36b316f44b2e95eb2edac84ebd;hb=27905cc21a523d052a0148c9802a64d6dfd9d0d2;hp=9ce478ba198a375a80d664fcfea4c8935dab4f2c;hpb=4d21671f75e35e7c2880467dddc0936e8c718d8c;p=friendica.git diff --git a/mod/profiles.php b/mod/profiles.php index 9ce478ba19..0b8261422f 100644 --- a/mod/profiles.php +++ b/mod/profiles.php @@ -1,7 +1,6 @@ get_baseurl(true) . '/profiles'); + goaway('profiles'); return; // NOTREACHED } @@ -35,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 } @@ -74,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')) { @@ -117,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 } @@ -140,10 +139,9 @@ function profiles_init(&$a) { } -} + } -if(! function_exists('profile_clean_keywords')) { function profile_clean_keywords($keywords) { $keywords = str_replace(","," ",$keywords); $keywords = explode(" ", $keywords); @@ -160,9 +158,7 @@ function profile_clean_keywords($keywords) { return $keywords; } -} -if(! function_exists('profiles_post')) { function profiles_post(&$a) { if(! local_user()) { @@ -506,9 +502,8 @@ function profiles_post(&$a) { } } } -} -if(! function_exists('profile_activity')) { + function profile_activity($changed, $value) { $a = get_app(); @@ -587,20 +582,11 @@ 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"); - } } -} -if(! function_exists('profiles_content')) { + function profiles_content(&$a) { if(! local_user()) { @@ -792,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']); } } @@ -813,16 +799,16 @@ 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') . '') )); } } return $o; } -} + }