*/
use Friendica\App;
-use Friendica\Core\System;
use Friendica\ParseUrl;
-use Friendica\Util\Lock;
use Friendica\Core\Config;
use Friendica\Core\PConfig;
use Friendica\Core\Worker;
+use Friendica\Core\System;
use Friendica\Database\DBM;
+use Friendica\Model\GlobalContact;
+use Friendica\Object\Contact;
use Friendica\Protocol\DFRN;
+use Friendica\Protocol\OStatus;
+use Friendica\Util\Lock;
require_once 'include/bbcode.php';
require_once 'include/oembed.php';
require_once 'include/text.php';
require_once 'include/email.php';
require_once 'include/threads.php';
-require_once 'include/socgraph.php';
require_once 'include/plaintext.php';
-require_once 'include/ostatus.php';
require_once 'include/feed.php';
require_once 'include/Contact.php';
require_once 'mod/share.php';
require_once 'include/enotify.php';
require_once 'include/group.php';
-/// @TODO one day with composer autoloader no more needed
-require_once 'library/defuse/php-encryption-1.2.1/Crypto.php';
-
function construct_verb($item) {
if ($item['verb']) {
return $item['verb'];
/// @todo Check if this is really still needed
if ($arr['network'] == NETWORK_OSTATUS) {
if (isset($arr['plink'])) {
- $arr['plink'] = ostatus::convert_href($arr['plink']);
+ $arr['plink'] = OStatus::convertHref($arr['plink']);
} elseif (isset($arr['uri'])) {
- $arr['plink'] = ostatus::convert_href($arr['uri']);
+ $arr['plink'] = OStatus::convertHref($arr['uri']);
}
}
* On comments the author is the better choice.
*/
if ($arr['parent-uri'] === $arr['uri']) {
- $arr["gcontact-id"] = get_gcontact_id(array("url" => $arr['owner-link'], "network" => $arr['network'],
+ $arr["gcontact-id"] = GlobalContact::getId(array("url" => $arr['owner-link'], "network" => $arr['network'],
"photo" => $arr['owner-avatar'], "name" => $arr['owner-name']));
} else {
- $arr["gcontact-id"] = get_gcontact_id(array("url" => $arr['author-link'], "network" => $arr['network'],
+ $arr["gcontact-id"] = GlobalContact::getId(array("url" => $arr['author-link'], "network" => $arr['network'],
"photo" => $arr['author-avatar'], "name" => $arr['author-name']));
}
}
check_item_notification($current_post, $uid);
if ($notify) {
- Worker::add(array('priority' => PRIORITY_HIGH, 'dont_fork' => true), "notifier", $notify_type, $current_post);
+ Worker::add(array('priority' => PRIORITY_HIGH, 'dont_fork' => true), "Notifier", $notify_type, $current_post);
}
return $current_post;
);
update_thread($item_id);
- Worker::add(array('priority' => PRIORITY_HIGH, 'dont_fork' => true), 'notifier', 'tgroup', $item_id);
+ Worker::add(array('priority' => PRIORITY_HIGH, 'dont_fork' => true), 'Notifier', 'tgroup', $item_id);
}
//$tempfile = tempnam(get_temppath(), "ostatus2");
//file_put_contents($tempfile, $xml);
logger("Consume OStatus messages ", LOGGER_DEBUG);
- ostatus::import($xml, $importer, $contact, $hub);
+ OStatus::import($xml, $importer, $contact, $hub);
}
return;
}
drop_item($item['id'], false);
}
- Worker::add(array('priority' => PRIORITY_LOW, 'dont_fork' => true), "notifier", "expire", $uid);
+ Worker::add(array('priority' => PRIORITY_LOW, 'dont_fork' => true), "Notifier", "expire", $uid);
}
/// @TODO type-hint is array
// multiple threads may have been deleted, send an expire notification
if ($uid) {
- Worker::add(array('priority' => PRIORITY_LOW, 'dont_fork' => true), "notifier", "expire", $uid);
+ Worker::add(array('priority' => PRIORITY_LOW, 'dont_fork' => true), "Notifier", "expire", $uid);
}
}
$drop_id = intval($item['id']);
$priority = ($interactive ? PRIORITY_HIGH : PRIORITY_LOW);
- Worker::add(array('priority' => $priority, 'dont_fork' => true), "notifier", "drop", $drop_id);
+ Worker::add(array('priority' => $priority, 'dont_fork' => true), "Notifier", "drop", $drop_id);
if (! $interactive) {
return $owner;