mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/TitleBlacklist
synced 2024-11-23 21:53:40 +00:00
Update hooks to use PageSaveComplete
Extension requires MW 1.35+, always available Bug: T250566 Change-Id: I35a288d38e944df4498d63f1d686ee7904909c74
This commit is contained in:
parent
ac0c5edabe
commit
e5a7ed6997
|
@ -104,7 +104,7 @@
|
|||
"EditFilter": [
|
||||
"TitleBlacklistHooks::onValidateBlacklist"
|
||||
],
|
||||
"PageContentSaveComplete": [
|
||||
"PageSaveComplete": [
|
||||
"TitleBlacklistHooks::onClearBlacklist"
|
||||
],
|
||||
"ScribuntoExternalLibraries": [
|
||||
|
|
|
@ -6,6 +6,10 @@
|
|||
* @license GPL-2.0-or-later
|
||||
*/
|
||||
|
||||
use MediaWiki\Revision\RevisionRecord;
|
||||
use MediaWiki\Storage\EditResult;
|
||||
use MediaWiki\User\UserIdentity;
|
||||
|
||||
/**
|
||||
* Hooks for the TitleBlacklist class
|
||||
*
|
||||
|
@ -207,18 +211,22 @@ class TitleBlacklistHooks {
|
|||
}
|
||||
|
||||
/**
|
||||
* PageContentSaveComplete hook
|
||||
* PageSaveComplete hook
|
||||
*
|
||||
* @param WikiPage $wikiPage
|
||||
* @param User $user
|
||||
* @param Content $content
|
||||
* @param UserIdentity $userIdentity
|
||||
* @param string $summary
|
||||
* @param bool $isminor
|
||||
* @param bool $iswatch
|
||||
* @param string $section
|
||||
* @param int $flags
|
||||
* @param RevisionRecord $revisionRecord
|
||||
* @param EditResult $editResult
|
||||
*/
|
||||
public static function onClearBlacklist(
|
||||
WikiPage $wikiPage, $user, $content, $summary, $isminor, $iswatch, $section
|
||||
WikiPage $wikiPage,
|
||||
UserIdentity $userIdentity,
|
||||
string $summary,
|
||||
int $flags,
|
||||
RevisionRecord $revisionRecord,
|
||||
EditResult $editResult
|
||||
) {
|
||||
$title = $wikiPage->getTitle();
|
||||
if ( $title->getNamespace() === NS_MEDIAWIKI && $title->getDBkey() == 'Titleblacklist' ) {
|
||||
|
|
Loading…
Reference in a new issue