]> git.mxchange.org Git - friendica.git/blobdiff - update.php
Fix "Undefined constant Friendica\Content\Conversation::PARCEL_DIASPORA"
[friendica.git] / update.php
index 584b8d788c7c01f0fe36420ec05ba1767403f1da..85a06892f04c99a542545221ceba5bdfa4f0ad07 100644 (file)
@@ -1192,7 +1192,7 @@ function update_1508()
 
        $newConfig->commit();
 
-       return DBA::e("TRUNCATE TABLE `config`") ? Update::SUCCESS : Update::FAILED;
+       return Update::SUCCESS;
 }
 
 function update_1509()
@@ -1210,5 +1210,20 @@ function update_1509()
 
        $newConfig->commit();
 
-       return DBA::e("TRUNCATE TABLE `addon`") ? Update::SUCCESS : Update::FAILED;
+       return Update::SUCCESS;
+}
+
+function update_1510()
+{
+       $blocks = DBA::select('pconfig', ['uid', 'v'], ['cat' => 'blockem', 'k' => 'words']);
+       while ($block = DBA::fetch($blocks)) {
+               foreach (explode(',', $block['v']) as $account) {
+                       $id = Contact::getIdForURL(trim($account), 0, false);
+                       if (empty($id)) {
+                               continue;
+                       }
+                       Contact\User::setCollapsed($id, $block['uid'], true);
+               }
+       }
+       return Update::SUCCESS;
 }