]> git.mxchange.org Git - friendica.git/blobdiff - update.php
Fix "Undefined constant Friendica\Content\Conversation::PARCEL_DIASPORA"
[friendica.git] / update.php
index 1dbf78e06f915647cf6300c4886623fe4ca8fdaa..85a06892f04c99a542545221ceba5bdfa4f0ad07 100644 (file)
@@ -1192,5 +1192,38 @@ function update_1508()
 
        $newConfig->commit();
 
-       DBA::e("TRUNCATE TABLE `config`");
+       return Update::SUCCESS;
+}
+
+function update_1509()
+{
+       $addons = DBA::selectToArray('addon');
+
+       $newConfig = DI::config()->beginTransaction();
+
+       foreach ($addons as $addon) {
+               $newConfig->set('addons', $addon['name'], [
+                       'last_update' => $addon['timestamp'],
+                       'admin' => (bool)$addon['plugin_admin'],
+               ]);
+       }
+
+       $newConfig->commit();
+
+       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;
 }