friendica-github/include/directory.php

27 lines
438 B
PHP
Raw Normal View History

<?php
use \Friendica\Core\Config;
function directory_run(&$argv, &$argc){
2017-02-26 23:16:49 +00:00
if ($argc != 2) {
return;
2017-02-26 23:16:49 +00:00
}
$dir = get_config('system','directory');
2017-02-26 23:16:49 +00:00
if (!strlen($dir)) {
return;
2017-02-26 23:16:49 +00:00
}
$dir .= "/submit";
$arr = array('url' => $argv[1]);
call_hooks('globaldir_update', $arr);
2012-11-19 06:53:01 +00:00
logger('Updating directory: ' . $arr['url'], LOGGER_DEBUG);
2017-02-26 23:16:49 +00:00
if (strlen($arr['url'])) {
fetch_url($dir . '?url=' . bin2hex($arr['url']));
2017-02-26 23:16:49 +00:00
}
return;
}