2 require_once("boot.php");
4 function directory_run(&$argv, &$argc){
12 @include(".htconfig.php");
13 require_once("include/dba.php");
14 $db = new dba($db_host, $db_user, $db_pass, $db_data);
15 unset($db_host, $db_user, $db_pass, $db_data);
18 load_config('config');
19 load_config('system');
25 load_config('system');
30 $a->set_baseurl(get_config('system','url'));
32 $dir = get_config('system','directory');
39 $arr = array('url' => $argv[1]);
41 call_hooks('globaldir_update', $arr);
43 logger('Updating directory: ' . $arr['url'], LOGGER_DEBUG);
44 if(strlen($arr['url']))
45 fetch_url($dir . '?url=' . bin2hex($arr['url']));
50 if (array_search(__file__,get_included_files())===0){
51 directory_run($_SERVER["argv"],$_SERVER["argc"]);