]> git.mxchange.org Git - friendica.git/blobdiff - include/post_update.php
Merge pull request #4195 from zeroadam/ContactSelector-#3878
[friendica.git] / include / post_update.php
index 7cbc6ece0db3fead0789f22a3049f9cda96d896f..fd72d888e5b6604a31596380fc2f8428b103e50e 100644 (file)
@@ -6,7 +6,7 @@
 use Friendica\Core\Config;
 use Friendica\Database\DBM;
 use Friendica\Model\Contact;
-use Friendica\Model\GlobalContact;
+use Friendica\Model\GContact;
 
 /**
  * @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 = GlobalContact::getId(array("url" => $item['author-link'], "network" => $item['network'],
+               $gcontact_id = GContact::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"]));
@@ -144,7 +144,7 @@ function post_update_1194() {
 
        logger("Progress: Start: ".$start_id." position: ".$pos_id." end: ".$end_id, LOGGER_DEBUG);
 
-       $r = q("UPDATE `item` ".$query2." SET `item`.`global` = 1 ".$query3,
+       q("UPDATE `item` ".$query2." SET `item`.`global` = 1 ".$query3,
                intval($start_id), intval($pos_id),
                dbesc(NETWORK_DFRN), dbesc(NETWORK_DIASPORA), dbesc(NETWORK_OSTATUS));