mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-24 00:13:36 +00:00
Merge "Disable on LiquidThreads pages"
This commit is contained in:
commit
45fe4c3bec
|
@ -12,6 +12,7 @@ namespace MediaWiki\Extension\DiscussionTools\Hooks;
|
|||
use ExtensionRegistry;
|
||||
use IContextSource;
|
||||
use IDBAccessObject;
|
||||
use LqtDispatch;
|
||||
use MediaWiki\Extension\DiscussionTools\CommentUtils;
|
||||
use MediaWiki\Extension\DiscussionTools\ContentThreadItemSet;
|
||||
use MediaWiki\Extension\Gadgets\GadgetRepo;
|
||||
|
@ -339,6 +340,11 @@ class HookUtils {
|
|||
if ( $title->getContentModel() !== CONTENT_MODEL_WIKITEXT ) {
|
||||
return false;
|
||||
}
|
||||
// LiquidThreads needs a separate check, since it predates content models other than wikitext (T329423)
|
||||
// @phan-suppress-next-line PhanUndeclaredClassMethod
|
||||
if ( ExtensionRegistry::getInstance()->isLoaded( 'Liquid Threads' ) && LqtDispatch::isLqtPage( $title ) ) {
|
||||
return false;
|
||||
}
|
||||
if ( !$title->canExist() ) {
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue