]> git.mxchange.org Git - friendica.git/commitdiff
Trying to clean up a little bit more (#5517)
authorMichael Vogel <icarus@dabo.de>
Sat, 28 Jul 2018 20:04:56 +0000 (22:04 +0200)
committerHypolite Petovan <mrpetovan@eml.cc>
Sat, 28 Jul 2018 20:04:56 +0000 (16:04 -0400)
* "post-type" replaces "bookmark" and "type"

* The permission set is now removed upon expiry

* Post update now stores the permission set

* We don't store the permissions in the item table anymore

* Postupdate now handles "postopts" as well

* "post-type" replaces "bookmark" and "type"

* "post-type" replaces "bookmark" and "type"

* "post-type" replaces "bookmark" and "type"

* The permission set is now removed upon expiry

* The permission set is now removed upon expiry

* We don't store the permissions in the item table anymore

* Postupdate now handles "postopts" as well

* Multiplicated update functions

* And some more duplicated functions ...

* Removed duplicate functions

src/Database/PostUpdate.php
src/Worker/Expire.php
update.php

index fc0703fd950a40b23f8d7d94e20fd44ee7c907cf..5cc892d095c822a5600599a9146eb1ea49fdbfa3 100644 (file)
@@ -8,6 +8,7 @@ use Friendica\Core\Config;
 use Friendica\Model\Contact;
 use Friendica\Model\Item;
 use Friendica\Model\PermissionSet;
+use Friendica\Database\DBA;
 
 require_once 'include/dba.php';
 
index e7aa572ddf98384168c3a7924bba99ce94e0a2e2..efb2cb03db8a152da4794bb76f830e7fc1af7ac0 100644 (file)
@@ -43,11 +43,6 @@ class Expire
                                if (!empty($row['psid']) && !DBA::exists('item', ['psid' => $row['psid']])) {
                                        DBA::delete('permissionset', ['id' => $row['psid']]);
                                }
-                               // When the permission set will be used in photo and events as well.
-                               // this query here needs to be extended.
-                               if (!empty($row['psid']) && !dba::exists('item', ['psid' => $row['psid']])) {
-                                       dba::delete('permissionset', ['id' => $row['psid']]);
-                               }
                        }
                        DBA::close($rows);
 
index 257623ac749a36c2ed51e50439a1bfa3a198dc8d..56f285f2df9037f8f2dc405258f7bd51f495554b 100644 (file)
@@ -246,27 +246,3 @@ function update_1278() {
 
        return UPDATE_SUCCESS;
 }
-
-function update_1278() {
-       Config::set('system', 'maintenance', 1);
-       Config::set('system', 'maintenance_reason', L10n::t('%s: Updating post-type.', DBM::date().' '.date('e')));
-
-       Item::update(['post-type' => Item::PT_PAGE], ['bookmark' => true]);
-       Item::update(['post-type' => Item::PT_PERSONAL_NOTE], ['type' => 'note']);
-
-       Config::set('system', 'maintenance', 0);
-
-       return UPDATE_SUCCESS;
-}
-
-function update_1278() {
-       Config::set('system', 'maintenance', 1);
-       Config::set('system', 'maintenance_reason', L10n::t('%s: Updating post-type.', DBM::date().' '.date('e')));
-
-       Item::update(['post-type' => Item::PT_PAGE], ['bookmark' => true]);
-       Item::update(['post-type' => Item::PT_PERSONAL_NOTE], ['type' => 'note']);
-
-       Config::set('system', 'maintenance', 0);
-
-       return UPDATE_SUCCESS;
-}