use Friendica\Core\System;
use Friendica\Core\Config;
use Friendica\Core\PConfig;
+use Friendica\Core\Worker;
use Friendica\Network\Probe;
require_once 'include/items.php';
*/
public static function relay_list() {
- $serverdata = get_config("system", "relay_server");
+ $serverdata = Config::get("system", "relay_server");
if ($serverdata == "")
return array();
*/
public static function dispatch_public($msg) {
- $enabled = intval(get_config("system", "diaspora_enabled"));
+ $enabled = intval(Config::get("system", "diaspora_enabled"));
if (!$enabled) {
logger("diaspora is disabled");
return false;
if (!$person || $update) {
logger("create or refresh", LOGGER_DEBUG);
- $r = probe_url($handle, PROBE_DIASPORA);
+ $r = Probe::uri($handle, NETWORK_DIASPORA);
// Note that Friendica contacts will return a "Diaspora person"
// if Diaspora connectivity is enabled on their server
dba::insert('sign', array('iid' => $message_id, 'signed_text' => json_encode($data)));
// notify others
- proc_run(PRIORITY_HIGH, "include/notifier.php", "comment-import", $message_id);
+ Worker::add(PRIORITY_HIGH, "notifier", "comment-import", $message_id);
}
return true;
dba::insert('sign', array('iid' => $message_id, 'signed_text' => json_encode($data)));
// notify others
- proc_run(PRIORITY_HIGH, "include/notifier.php", "comment-import", $message_id);
+ Worker::add(PRIORITY_HIGH, "notifier", "comment-import", $message_id);
}
return true;
intval($importer["uid"])
);
- if ($r && !$r[0]["hide-friends"] && !$contact["hidden"] && intval(get_pconfig($importer["uid"], "system", "post_newfriend"))) {
+ if ($r && !$r[0]["hide-friends"] && !$contact["hidden"] && intval(PConfig::get($importer["uid"], "system", "post_newfriend"))) {
$self = q("SELECT * FROM `contact` WHERE `self` AND `uid` = %d LIMIT 1",
intval($importer["uid"])
$i = item_store($arr);
if ($i)
- proc_run(PRIORITY_HIGH, "include/notifier.php", "activity", $i);
+ Worker::add(PRIORITY_HIGH, "notifier", "activity", $i);
}
}
}
// Now check if the retraction needs to be relayed by us
if ($parent["origin"]) {
// notify others
- proc_run(PRIORITY_HIGH, "include/notifier.php", "drop", $item["id"]);
+ Worker::add(PRIORITY_HIGH, "notifier", "drop", $item["id"]);
}
}
$a = get_app();
- $enabled = intval(get_config("system", "diaspora_enabled"));
+ $enabled = intval(Config::get("system", "diaspora_enabled"));
if (!$enabled)
return 200;
if (!$queue_run && was_recently_delayed($contact["id"])) {
$return_code = 0;
} else {
- if (!intval(get_config("system", "diaspora_test"))) {
+ if (!intval(Config::get("system", "diaspora_test"))) {
$content_type = (($public_batch) ? "application/magic-envelope+xml" : "application/json");
post_url($dest_url."/", $envelope, array("Content-Type: ".$content_type));