X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fdirectory.php;h=41a3dd784c0b1876807ab81a9d9e06cd83098843;hb=7f1c71c9fd2dbcc8c85c0042602766bc8767f744;hp=088adbe789fd1fcfea3132cda0285fb8ccc88ab9;hpb=3cef98caf68d9fa28ba1beacedeaa77917987772;p=friendica.git diff --git a/include/directory.php b/include/directory.php index 088adbe789..41a3dd784c 100644 --- a/include/directory.php +++ b/include/directory.php @@ -1,17 +1,19 @@ $argv[1]); @@ -22,5 +24,20 @@ function directory_run(&$argv, &$argc){ if (strlen($arr['url'])) { fetch_url($dir . '?url=' . bin2hex($arr['url'])); } + return; } + +function directory_update_all() { + $r = q("SELECT `url` FROM `contact` + INNER JOIN `profile` ON `profile`.`uid` = `contact`.`uid` + INNER JOIN `user` ON `user`.`uid` = `contact`.`uid` + WHERE `contact`.`self` AND `profile`.`net-publish` AND `profile`.`is-default` AND + NOT `user`.`account_expired` AND `user`.`verified`"); + + if (dbm::is_result($r)) { + foreach ($r AS $user) { + proc_run(PRIORITY_LOW, 'include/directory.php', $user['url']); + } + } +}