Revert "Move Objects to Model"

This commit is contained in:
Michael Vogel 2017-12-08 05:21:51 +01:00 committed by GitHub
parent e437c74d0e
commit 5747cfc79c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
77 changed files with 593 additions and 636 deletions

View file

@ -9,10 +9,10 @@ use Friendica\Core\Cache;
use Friendica\Core\Config;
use Friendica\Core\System;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
use Friendica\Model\GContact;
use Friendica\Model\GlobalContact;
use Friendica\Network\Probe;
use Friendica\Object\Image;
use Friendica\Object\Contact;
use Friendica\Object\Photo;
use Friendica\Util\Lock;
use Friendica\Util\XML;
use dba;
@ -226,9 +226,9 @@ class OStatus
$contact["generation"] = 2;
$contact["hide"] = false; // OStatus contacts are never hidden
$contact["photo"] = $author["author-avatar"];
$gcid = GContact::update($contact);
$gcid = GlobalContact::update($contact);
GContact::link($gcid, $contact["uid"], $contact["id"]);
GlobalContact::link($gcid, $contact["uid"], $contact["id"]);
}
return $author;
@ -1323,7 +1323,7 @@ class OStatus
switch ($siteinfo["type"]) {
case 'photo':
$imgdata = Image::getInfoFromURL($siteinfo["image"]);
$imgdata = Photo::getInfoFromURL($siteinfo["image"]);
$attributes = array("rel" => "enclosure",
"href" => $siteinfo["image"],
"type" => $imgdata["mime"],
@ -1343,7 +1343,7 @@ class OStatus
}
if (!Config::get('system', 'ostatus_not_attach_preview') && ($siteinfo["type"] != "photo") && isset($siteinfo["image"])) {
$imgdata = Image::getInfoFromURL($siteinfo["image"]);
$imgdata = Photo::getInfoFromURL($siteinfo["image"]);
$attributes = array("rel" => "enclosure",
"href" => $siteinfo["image"],
"type" => $imgdata["mime"],