1
1
Fork 0

GlobalContact created

Moved DirSearch and GlobalContact related functions to Friendica\Model namespace
This commit is contained in:
Adam Magness 2017-11-15 09:47:28 -05:00
commit 47db624105
26 changed files with 2715 additions and 2610 deletions

View file

@ -5,6 +5,7 @@
use Friendica\Core\Config;
use Friendica\Database\DBM;
use Friendica\Model\GlobalContact;
/**
* @brief Calls the post update functions
@ -72,7 +73,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 = get_gcontact_id(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"]));