Browse Source

Update the "unsearchable" field in the "self" contact

tags/2019.09
Michael 1 month ago
parent
commit
0d32a8674b
2 changed files with 13 additions and 1 deletions
  1. 1
    1
      static/dbstructure.config.php
  2. 12
    0
      update.php

+ 1
- 1
static/dbstructure.config.php View File

@@ -34,7 +34,7 @@
34 34
 use Friendica\Database\DBA;
35 35
 
36 36
 if (!defined('DB_UPDATE_VERSION')) {
37
-	define('DB_UPDATE_VERSION', 1322);
37
+	define('DB_UPDATE_VERSION', 1323);
38 38
 }
39 39
 
40 40
 return [

+ 12
- 0
update.php View File

@@ -384,3 +384,15 @@ function update_1318()
384 384
 	Worker::add(PRIORITY_LOW, 'ProfileUpdate');
385 385
 	return Update::SUCCESS;
386 386
 }
387
+
388
+function update_1323()
389
+{
390
+	$users = DBA::select('user', ['uid']);
391
+	while ($user = DBA::fetch($users)) {
392
+		Contact::updateSelfFromUserID($user['uid']);
393
+	}
394
+	DBA::close($users);
395
+
396
+	return Update::SUCCESS;
397
+}
398
+

Loading…
Cancel
Save