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

@ -5,8 +5,8 @@
use Friendica\Core\Config;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
use Friendica\Model\GContact;
use Friendica\Model\GlobalContact;
use Friendica\Object\Contact;
/**
* @brief Calls the post update functions
@ -74,7 +74,7 @@ function post_update_1192() {
// Set the "gcontact-id" in the item table and add a new gcontact entry if needed
foreach ($item_arr AS $item) {
$gcontact_id = GContact::getId(array("url" => $item['author-link'], "network" => $item['network'],
$gcontact_id = GlobalContact::getId(array("url" => $item['author-link'], "network" => $item['network'],
"photo" => $item['author-avatar'], "name" => $item['author-name']));
q("UPDATE `item` SET `gcontact-id` = %d WHERE `uid` = %d AND `author-link` = '%s' AND `gcontact-id` = 0",
intval($gcontact_id), intval($item["uid"]), dbesc($item["author-link"]));