X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fprofiles.php;h=0b8261422f3b5b36b316f44b2e95eb2edac84ebd;hb=1f7f964bb7200d4f658742a999c07f1dd6cbe97c;hp=3ba57c8831962c92df38d197c67267ab535df777;hpb=c00772204100a44267c38f7a2533268b5dff1248;p=friendica.git diff --git a/mod/profiles.php b/mod/profiles.php index 3ba57c8831..0b8261422f 100644 --- a/mod/profiles.php +++ b/mod/profiles.php @@ -1,5 +1,5 @@ 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 } @@ -482,21 +482,7 @@ function profiles_post(&$a) { } if($is_default) { - $location = $locality; - - if ($region != "") { - if ($location != "") - $location .= ", "; - - $location .= $region; - } - - if ($country_name != "") { - if ($location != "") - $location .= ", "; - - $location .= $country_name; - } + $location = formatted_location(array("locality" => $locality, "region" => $region, "country-name" => $country_name)); $r = q("UPDATE `contact` SET `about` = '%s', `location` = '%s', `keywords` = '%s', `gender` = '%s' WHERE `self` = 1 AND `uid` = %d", dbesc($about), @@ -596,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"); - } } @@ -800,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']); } } @@ -821,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']) ? '' . t('visible to everybody') . '' - : '' . t('Edit visibility') . '') + : '' . t('Edit visibility') . '') )); } }