<?php
use Friendica\App;
+use Friendica\Core\PConfig;
use Friendica\Core\System;
+use Friendica\Core\Worker;
use Friendica\Network\Probe;
// Included here for completeness, but this is a very dangerous operation.
// The user and related data will be deleted in "cron_expire_and_remove_users" (cronjobs.php)
q("UPDATE `user` SET `account_removed` = 1, `account_expires_on` = UTC_TIMESTAMP() WHERE `uid` = %d", intval($uid));
- proc_run(PRIORITY_HIGH, "include/notifier.php", "removeme", $uid);
+ Worker::add(PRIORITY_HIGH, "notifier", "removeme", $uid);
// Send an update to the directory
- proc_run(PRIORITY_LOW, "include/directory.php", $r['url']);
+ Worker::add(PRIORITY_LOW, "directory", $r['url']);
if($uid == local_user()) {
unset($_SESSION['authenticated']);
return;
}
- $archive = get_pconfig($r[0]['uid'], 'system','archive_removed_contacts');
+ $archive = PConfig::get($r[0]['uid'], 'system','archive_removed_contacts');
if ($archive) {
q("update contact set `archive` = 1, `network` = 'none', `writable` = 0 where id = %d",
intval($id)
dba::delete('contact', array('id' => $id));
// Delete the rest in the background
- proc_run(PRIORITY_LOW, 'include/remove_contact.php', $id);
+ Worker::add(PRIORITY_LOW, 'remove_contact', $id);
}
if ((($profile["addr"] == "") || ($profile["name"] == "")) && ($profile["gid"] != 0) &&
in_array($profile["network"], array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS))) {
- proc_run(PRIORITY_LOW, "include/update_gcontact.php", $profile["gid"]);
+ Worker::add(PRIORITY_LOW, "update_gcontact", $profile["gid"]);
}
// Show contact details of Diaspora contacts only if connected
$author_id = intval($r[0]["author-id"]);
- $contact = ($r[0]["contact-type"] = ACCOUNT_TYPE_COMMUNITY ? 'owner-id' : 'author-id');
+ $contact = ($r[0]["contact-type"] == ACCOUNT_TYPE_COMMUNITY ? 'owner-id' : 'author-id');
$r = q(item_query()." AND `item`.`".$contact."` = %d AND ".$sql.
" ORDER BY `item`.`created` DESC LIMIT %d, %d",