function export_identity(&$a, $channel_hash) { if ($channel_hash == '') { json_error_die(422, 'Unprocessable Entity', 'Must supply channel_hash parameter.'); } json_return_and_die(identity_basic_export(get_channel_id($channel_hash), $_REQUEST['posts'] ? intval($_REQUEST['posts']) : 0)); }
function migrator_update_directory(&$a, $channel_hash) { $channel_id = get_channel_id($channel_hash); if (!$channel_id) { json_error_die(404, 'Not Found', 'No such channel ' . $channel_hash); } proc_run('php', 'include/notifier.php', 'location', $channel_id); proc_run('php', 'include/directory.php', $channel_id); json_return_and_die(array("status" => 'OK', 'channel_hash' => $channel_hash, 'channel_id' => $channel_id)); }
$message = $row['message']; // remove this item from the pool now // if anything goes wrong trying to merge it we won't keep trying every pool update clean_pool($dbh, $pool_id); $urls = get_urls($message); if (count($urls) == 0) { exit; } echo "pool_id={$pool_id}; "; echo 'urls=' . count($urls) . ' '; $network_id = get_network_id($dbh, $cache, $network_name); if (!$network_id) { exit; } echo "{$network_name}({$network_id}) "; $channel_id = get_channel_id($dbh, $cache, $network_id, $channel_name); if (!$channel_id) { exit; } echo "{$channel_name}({$channel_id}) "; $nick_id = get_nick_id($dbh, $cache, $network_id, $nick_name); if (!$nick_id) { exit; } echo "{$nick_name}({$nick_id}) "; echo "\n"; $message_id = insert_urls_from_pool($dbh, $network_id, $channel_id, $nick_id, $message, $urls); if (!$message_id) { exit; } echo "message_id={$message_id} ";