镜像自地址
https://github.com/wikimedia/mediawiki-extensions-3D.git
已同步 2024-06-02 19:20:16 +08:00
Simplify check for special page UploadWizard
Use build in function Title::isSpecial instead of testing if name is identical or subpage of the special page title. Change-Id: Iaf7d42267a6b6bb16201fe5859dd0d9e72c0fd9b
这个提交包含在:
父节点
eb9b2866dd
当前提交
eb8ba5cb62
|
@ -26,7 +26,6 @@ use MediaWiki\Hook\UploadForm_getInitialPageTextHook;
|
|||
use MediaWiki\Hook\UploadFormInitDescriptorHook;
|
||||
use MediaWiki\MediaWikiServices;
|
||||
use MediaWiki\Output\OutputPage;
|
||||
use MediaWiki\SpecialPage\SpecialPage;
|
||||
use RequestContext;
|
||||
use Skin;
|
||||
|
||||
|
@ -72,8 +71,7 @@ class Hooks implements
|
|||
// fallback when no JS is available...
|
||||
$context = RequestContext::getMain();
|
||||
$title = $context->getTitle();
|
||||
$titleUW = SpecialPage::getTitleFor( 'UploadWizard' );
|
||||
$addJs = $title && !$title->equals( $titleUW ) && !$title->isSubpageOf( $titleUW );
|
||||
$addJs = $title && !$title->isSpecial( 'UploadWizard' );
|
||||
|
||||
$patentDescriptor = [
|
||||
'Patent' => [
|
||||
|
|
正在加载...
在新工单中引用
屏蔽一个用户