mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-24 16:34:21 +00:00
Make Hooks::$tags a constant
Change-Id: I63bacc9bc6fc18ef677325439b6186d1813d23cf
This commit is contained in:
parent
ffbfbc0dd8
commit
6710b80d4f
|
@ -27,7 +27,7 @@ use WebRequest;
|
|||
|
||||
class Hooks {
|
||||
|
||||
private static $tags = [
|
||||
private const TAGS = [
|
||||
'discussiontools',
|
||||
// Features:
|
||||
'discussiontools-reply',
|
||||
|
@ -319,7 +319,7 @@ class Hooks {
|
|||
* @param array &$tags Available change tags.
|
||||
*/
|
||||
public static function onListDefinedTags( array &$tags ) : void {
|
||||
$tags = array_merge( $tags, static::$tags );
|
||||
$tags = array_merge( $tags, static::TAGS );
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -338,7 +338,7 @@ class Hooks {
|
|||
$request = RequestContext::getMain()->getRequest();
|
||||
$tags = explode( ',', $request->getVal( 'dttags' ) );
|
||||
|
||||
$tags = array_values( array_intersect( $tags, static::$tags ) );
|
||||
$tags = array_values( array_intersect( $tags, static::TAGS ) );
|
||||
|
||||
if ( $tags ) {
|
||||
$recentChange->addTags( $tags );
|
||||
|
|
Loading…
Reference in a new issue