commit
b888382cc6
1 changed files with 20 additions and 5 deletions
|
@ -539,7 +539,8 @@
|
||||||
'verified' => true,
|
'verified' => true,
|
||||||
'statusnet_blocking' => false,
|
'statusnet_blocking' => false,
|
||||||
'notifications' => false,
|
'notifications' => false,
|
||||||
'statusnet_profile_url' => $a->get_baseurl()."/contacts/".$uinfo[0]['cid'],
|
//'statusnet_profile_url' => $a->get_baseurl()."/contacts/".$uinfo[0]['cid'],
|
||||||
|
'statusnet_profile_url' => $uinfo[0]['url'],
|
||||||
'uid' => intval($uinfo[0]['uid']),
|
'uid' => intval($uinfo[0]['uid']),
|
||||||
'cid' => intval($uinfo[0]['cid']),
|
'cid' => intval($uinfo[0]['cid']),
|
||||||
'self' => $uinfo[0]['self'],
|
'self' => $uinfo[0]['self'],
|
||||||
|
@ -2849,15 +2850,29 @@ function api_share_as_retweet(&$item) {
|
||||||
|
|
||||||
function api_get_nick($profile) {
|
function api_get_nick($profile) {
|
||||||
/* To-Do:
|
/* To-Do:
|
||||||
- remove trailing jung from profile url
|
- remove trailing junk from profile url
|
||||||
- pump.io check has to check the website
|
- pump.io check has to check the website
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$nick = "";
|
$nick = "";
|
||||||
|
|
||||||
|
$r = q("SELECT `nick` FROM `gcontact` WHERE `nurl` = '%s'",
|
||||||
|
dbesc(normalise_link($profile)));
|
||||||
|
if ($r)
|
||||||
|
$nick = $r[0]["nick"];
|
||||||
|
|
||||||
|
if (!$nick == "") {
|
||||||
|
$r = q("SELECT `nick` FROM `contact` WHERE `uid` = 0 AND `nurl` = '%s'",
|
||||||
|
dbesc(normalise_link($profile)));
|
||||||
|
if ($r)
|
||||||
|
$nick = $r[0]["nick"];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$nick == "") {
|
||||||
$friendica = preg_replace("=https?://(.*)/profile/(.*)=ism", "$2", $profile);
|
$friendica = preg_replace("=https?://(.*)/profile/(.*)=ism", "$2", $profile);
|
||||||
if ($friendica != $profile)
|
if ($friendica != $profile)
|
||||||
$nick = $friendica;
|
$nick = $friendica;
|
||||||
|
}
|
||||||
|
|
||||||
if (!$nick == "") {
|
if (!$nick == "") {
|
||||||
$diaspora = preg_replace("=https?://(.*)/u/(.*)=ism", "$2", $profile);
|
$diaspora = preg_replace("=https?://(.*)/u/(.*)=ism", "$2", $profile);
|
||||||
|
|
Loading…
Reference in a new issue