2 use \Friendica\Core\Config;
4 function directory_run(&$argv, &$argc){
5 $dir = get_config('system', 'directory');
12 directory_update_all();
18 $arr = array('url' => $argv[1]);
20 call_hooks('globaldir_update', $arr);
22 logger('Updating directory: ' . $arr['url'], LOGGER_DEBUG);
23 if (strlen($arr['url'])) {
24 fetch_url($dir . '?url=' . bin2hex($arr['url']));
29 function directory_update_all() {
30 $r = q("SELECT `url` FROM `contact`
31 INNER JOIN `profile` ON `profile`.`uid` = `contact`.`uid`
32 INNER JOIN `user` ON `user`.`uid` = `contact`.`uid`
33 WHERE `contact`.`self` AND `profile`.`net-publish` AND `profile`.`is-default` AND
34 NOT `user`.`account_expired` AND `user`.`verified`");
36 if (dbm::is_result($r)) {
37 foreach ($r AS $user) {
38 proc_run(PRIORITY_LOW, 'include/directory.php', $user['url']);