link socgraph to zrls
This commit is contained in:
parent
f8acb32961
commit
0ca4fa78c8
2 changed files with 21 additions and 25 deletions
|
@ -36,21 +36,25 @@ function gprobe_run($argv, $argc){
|
|||
dbesc(normalise_link($url))
|
||||
);
|
||||
|
||||
if(count($r))
|
||||
return;
|
||||
if(! count($r)) {
|
||||
|
||||
$arr = probe_url($url);
|
||||
|
||||
if(count($arr) && x($arr,'network') && $arr['network'] === NETWORK_DFRN) {
|
||||
q("insert into `gcontact` (`name`,`url`,`nurl`,`photo`)
|
||||
values ( '%s', '%s', '%s', '%s') ",
|
||||
dbesc($arr['name']),
|
||||
dbesc($arr['url']),
|
||||
dbesc(normalise_link($arr['url'])),
|
||||
dbesc($arr['photo'])
|
||||
$arr = probe_url($url);
|
||||
if(count($arr) && x($arr,'network') && $arr['network'] === NETWORK_DFRN) {
|
||||
q("insert into `gcontact` (`name`,`url`,`nurl`,`photo`)
|
||||
values ( '%s', '%s', '%s', '%s') ",
|
||||
dbesc($arr['name']),
|
||||
dbesc($arr['url']),
|
||||
dbesc(normalise_link($arr['url'])),
|
||||
dbesc($arr['photo'])
|
||||
);
|
||||
}
|
||||
$r = q("select * from gcontact where nurl = '%s' limit 1",
|
||||
dbesc(normalise_link($url))
|
||||
);
|
||||
}
|
||||
|
||||
if(count($r))
|
||||
poco_load(0,0,$r[0]['id'], str_replace('/profile/','/poco/',$r[0]['url']));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue