From 0d32a8674bc9c66286fecf43bb6beddd3884d859 Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 19 Sep 2019 03:54:54 +0000 Subject: [PATCH] Update the "unsearchable" field in the "self" contact --- static/dbstructure.config.php | 2 +- update.php | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/static/dbstructure.config.php b/static/dbstructure.config.php index 2c8f4b34be..53f8a8ed44 100755 --- a/static/dbstructure.config.php +++ b/static/dbstructure.config.php @@ -34,7 +34,7 @@ use Friendica\Database\DBA; if (!defined('DB_UPDATE_VERSION')) { - define('DB_UPDATE_VERSION', 1322); + define('DB_UPDATE_VERSION', 1323); } return [ diff --git a/update.php b/update.php index 18442f7958..3132677ea7 100644 --- a/update.php +++ b/update.php @@ -384,3 +384,15 @@ function update_1318() Worker::add(PRIORITY_LOW, 'ProfileUpdate'); return Update::SUCCESS; } + +function update_1323() +{ + $users = DBA::select('user', ['uid']); + while ($user = DBA::fetch($users)) { + Contact::updateSelfFromUserID($user['uid']); + } + DBA::close($users); + + return Update::SUCCESS; +} +