X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fitems.php;h=64ee3ffbf1f47245c0bf9f5d9e3dec7d545fe3a4;hb=f3c8af485f67eda7cefb602793b94aebc17ffeb1;hp=64aeabceab13206b1754cf4e4650084a2bd91716;hpb=4ca68c7af05b7b41e1b04936b9080802ca2b7716;p=friendica.git diff --git a/include/items.php b/include/items.php index 64aeabceab..64ee3ffbf1 100644 --- a/include/items.php +++ b/include/items.php @@ -5,14 +5,16 @@ */ 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\Protocol\DFRN; +use Friendica\Protocol\OStatus; +use Friendica\Util\Lock; require_once 'include/bbcode.php'; require_once 'include/oembed.php'; @@ -24,18 +26,13 @@ require_once 'include/files.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']; @@ -545,9 +542,9 @@ function item_store($arr, $force_parent = false, $notify = false, $dontcache = f /// @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']); } } @@ -748,10 +745,10 @@ function item_store($arr, $force_parent = false, $notify = false, $dontcache = f * 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'])); } } @@ -1535,7 +1532,7 @@ function consume_feed($xml, $importer, &$contact, &$hub, $datedir = 0, $pass = 0 //$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; }