X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fchanges%2FCategoryMembershipChange.php;h=f095b64f82682b12595057b713ad32e6ecbf7cad;hb=689c847a32e7fe8a0b3a559a88a627a252c5018e;hp=5d199612df43ac6524cc4b3562b649a2ba573e25;hpb=d41f85d42aea07375ee90606be077ffbbf590370;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/changes/CategoryMembershipChange.php b/includes/changes/CategoryMembershipChange.php index 5d199612df..f095b64f82 100644 --- a/includes/changes/CategoryMembershipChange.php +++ b/includes/changes/CategoryMembershipChange.php @@ -71,7 +71,7 @@ class CategoryMembershipChange { $this->timestamp = $revision->getTimestamp(); } $this->revision = $revision; - $this->newForCategorizationCallback = [ 'RecentChange', 'newForCategorization' ]; + $this->newForCategorizationCallback = [ RecentChange::class, 'newForCategorization' ]; } /** @@ -134,7 +134,8 @@ class CategoryMembershipChange { ), $this->pageTitle, $this->getPreviousRevisionTimestamp(), - $this->revision + $this->revision, + $type === self::CATEGORY_ADDITION ); } @@ -146,6 +147,7 @@ class CategoryMembershipChange { * @param Title $pageTitle Title of the page that is being added or removed * @param string $lastTimestamp Parent revision timestamp of this change in TS_MW format * @param Revision|null $revision + * @param bool $added true, if the category was added, false for removed * * @throws MWException */ @@ -156,7 +158,8 @@ class CategoryMembershipChange { $comment, Title $pageTitle, $lastTimestamp, - $revision + $revision, + $added ) { $deleted = $revision ? $revision->getVisibility() & Revision::SUPPRESSED_USER : 0; $newRevId = $revision ? $revision->getId() : 0; @@ -197,7 +200,8 @@ class CategoryMembershipChange { $lastTimestamp, $bot, $ip, - $deleted + $deleted, + $added ] ); $rc->save();