Remove deprecated `Category::$permissions` (#4303)
authorMatthias Schmidt <gravatronics@live.com>
Thu, 17 Jun 2021 11:24:34 +0000 (13:24 +0200)
committerGitHub <noreply@github.com>
Thu, 17 Jun 2021 11:24:34 +0000 (13:24 +0200)
This property has been deprecated for many years (since 2b59736b2592a01ee880f0cc4439622b437acd85) and is just an (internal) copy of `$this->userPermissions[$user->userID]`.

wcfsetup/install/files/lib/data/category/Category.class.php

index dd0ef510c88c1eb8577e11151c41edd5cdc5ea04..e6f49e4e0988cc6ecf9f0b187e2054ca9d46e914 100644 (file)
@@ -58,13 +58,6 @@ class Category extends ProcessibleDatabaseObject implements IPermissionObject, I
      */
     protected $parentCategory;
 
-    /**
-     * acl permissions of this category for the active user
-     * @deprecated
-     * @var bool[]
-     */
-    protected $permissions;
-
     /**
      * acl permissions of this category grouped by the id of the user they
      * belong to
@@ -218,10 +211,6 @@ class Category extends ProcessibleDatabaseObject implements IPermissionObject, I
         if (!isset($this->userPermissions[$user->userID])) {
             $this->userPermissions[$user->userID] = CategoryPermissionHandler::getInstance()
                 ->getPermissions($this, $user);
-
-            if ($user->userID == WCF::getUser()->userID) {
-                $this->permissions = $this->userPermissions[$user->userID];
-            }
         }
 
         if (isset($this->userPermissions[$user->userID][$permission])) {