X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=update.php;h=aa043468caa9e40ba64483ffba8a406c5fcd666f;hb=dbf9132ea61854d54b0b503a7b1fb3681e6bf864;hp=0a97b4e10cf01891ba033cc4dad6787303e575f5;hpb=6f44476c567165a6c244bedde9f7548070393315;p=friendica.git diff --git a/update.php b/update.php index 0a97b4e10c..aa043468ca 100644 --- a/update.php +++ b/update.php @@ -53,6 +53,7 @@ use Friendica\Model\ItemURI; use Friendica\Model\Notification; use Friendica\Model\Photo; use Friendica\Model\Post; +use Friendica\Model\Profile; use Friendica\Model\Storage; use Friendica\Worker\Delivery; @@ -98,8 +99,9 @@ function update_1298() DBA::update('profile', [$translateKey => $key], ['id' => $data['id']]); Logger::notice('Updated contact', ['action' => 'update', 'contact' => $data['id'], "$translateKey" => $key, 'was' => $data[$translateKey]]); - Worker::add(PRIORITY_LOW, 'ProfileUpdate', $data['id']); + Contact::updateSelfFromUserID($data['id']); + Profile::publishUpdate($data['id']); $success++; } } @@ -153,7 +155,9 @@ function update_1323() { $users = DBA::select('user', ['uid']); while ($user = DBA::fetch($users)) { - Contact::updateSelfFromUserID($user['uid']); + if (Contact::updateSelfFromUserID($user['uid'])) { + Profile::publishUpdate($user['uid']); + } } DBA::close($users); @@ -835,7 +839,7 @@ function update_1404() while ($task = DBA::fetch($tasks)) { $parameters = json_decode($task['parameter'], true); - if (in_array($parameters[0], [Delivery::MAIL, Delivery::SUGGESTION, Delivery::REMOVAL, Delivery::RELOCATION])) { + if (is_array($parameters) && count($parameters) && in_array($parameters[0], [Delivery::MAIL, Delivery::SUGGESTION, Delivery::REMOVAL, Delivery::RELOCATION])) { continue; }