2 require_once("boot.php");
4 use \Friendica\Core\Config;
6 function directory_run(&$argv, &$argc){
14 @include(".htconfig.php");
15 require_once("include/dba.php");
16 $db = new dba($db_host, $db_user, $db_pass, $db_data);
17 unset($db_host, $db_user, $db_pass, $db_data);
28 $a->set_baseurl(get_config('system','url'));
30 $dir = get_config('system','directory');
37 $arr = array('url' => $argv[1]);
39 call_hooks('globaldir_update', $arr);
41 logger('Updating directory: ' . $arr['url'], LOGGER_DEBUG);
42 if(strlen($arr['url']))
43 fetch_url($dir . '?url=' . bin2hex($arr['url']));
48 if (array_search(__file__,get_included_files())===0){
49 directory_run($_SERVER["argv"],$_SERVER["argc"]);