mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Scribunto
synced 2024-11-24 00:05:00 +00:00
Handle bogus entries in MediaWiki:Scribunto-doc-page-name
If someone puts something broken in MediaWiki:Scribunto-doc-page-name, it may not be possible to determine which module the page is a doc page for. In that case, just pretend it's not a doc page. Bug: 49322 Change-Id: Ia4421576b372e188cf7e3dfe2c0b8ce213d026d4
This commit is contained in:
parent
6081c4fd30
commit
e12d743986
|
@ -87,7 +87,7 @@ class Scribunto {
|
|||
$docPage = str_replace( '\\$1', '(.+)', preg_quote( $docPage, '/' ) );
|
||||
if ( preg_match( "/^$docPage$/", $title->getPrefixedText(), $m ) ) {
|
||||
$forModule = Title::makeTitleSafe( NS_MODULE, $m[1] );
|
||||
return true;
|
||||
return $forModule !== null;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue