2 /// @TODO no longer used?
3 use \Friendica\Core\Config;
5 function directory_run(&$argv, &$argc){
6 $dir = get_config('system', 'directory');
13 directory_update_all();
19 $arr = array('url' => $argv[1]);
21 call_hooks('globaldir_update', $arr);
23 logger('Updating directory: ' . $arr['url'], LOGGER_DEBUG);
24 if (strlen($arr['url'])) {
25 fetch_url($dir . '?url=' . bin2hex($arr['url']));
31 function directory_update_all() {
32 $r = q("SELECT `url` FROM `contact`
33 INNER JOIN `profile` ON `profile`.`uid` = `contact`.`uid`
34 INNER JOIN `user` ON `user`.`uid` = `contact`.`uid`
35 WHERE `contact`.`self` AND `profile`.`net-publish` AND `profile`.`is-default` AND
36 NOT `user`.`account_expired` AND `user`.`verified`");
38 if (dbm::is_result($r)) {
39 foreach ($r AS $user) {
40 proc_run(PRIORITY_LOW, 'include/directory.php', $user['url']);