X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fgprobe.php;h=52c5483c87c2ef213f114fb88b5aa38a33f69f3c;hb=dbe8275ae5de7610ce21c90088b94a1e18d02921;hp=b4edbe4dba72466c9fec352f78bb4db9323040e3;hpb=dd273283900409da66ecc4e9ae5a188d5c2db605;p=friendica.git diff --git a/include/gprobe.php b/include/gprobe.php index b4edbe4dba..52c5483c87 100644 --- a/include/gprobe.php +++ b/include/gprobe.php @@ -4,16 +4,16 @@ require_once("boot.php"); require_once('include/Scrape.php'); require_once('include/socgraph.php'); -function gprobe_run($argv, $argc){ +function gprobe_run(&$argv, &$argc){ global $a, $db; if(is_null($a)) { $a = new App; } - + if(is_null($db)) { @include(".htconfig.php"); - require_once("dba.php"); + require_once("include/dba.php"); $db = new dba($db_host, $db_user, $db_pass, $db_data); unset($db_host, $db_user, $db_pass, $db_data); }; @@ -33,13 +33,12 @@ function gprobe_run($argv, $argc){ $url = hex2bin($argv[1]); - if(! validate_url($url)) - return; - $r = q("select * from gcontact where nurl = '%s' limit 1", dbesc(normalise_link($url)) ); + logger("gprobe start for ".normalise_link($url), LOGGER_DEBUG); + if(! count($r)) { $arr = probe_url($url); @@ -58,11 +57,12 @@ function gprobe_run($argv, $argc){ } if(count($r)) poco_load(0,0,$r[0]['id'], str_replace('/profile/','/poco/',$r[0]['url'])); - + + logger("gprobe end for ".normalise_link($url), LOGGER_DEBUG); return; } if (array_search(__file__,get_included_files())===0){ - gprobe_run($argv,$argc); + gprobe_run($_SERVER["argv"],$_SERVER["argc"]); killme(); }