jenkins-bot has submitted this change and it was merged. Change subject: Prefer WebRequest::getCheck if possible ......................................................................
Prefer WebRequest::getCheck if possible Change-Id: I5969f2d099fc464d614970b19dcc2a78c98843b9 --- M repo/includes/specials/SpecialModifyTerm.php M repo/includes/specials/SpecialNewItem.php M repo/includes/specials/SpecialSetSiteLink.php 3 files changed, 4 insertions(+), 4 deletions(-) Approvals: Hoo man: Looks good to me, approved jenkins-bot: Verified diff --git a/repo/includes/specials/SpecialModifyTerm.php b/repo/includes/specials/SpecialModifyTerm.php index 4914573..81eed13 100644 --- a/repo/includes/specials/SpecialModifyTerm.php +++ b/repo/includes/specials/SpecialModifyTerm.php @@ -128,7 +128,7 @@ // If the user just enters an item id and a language, dont remove the term. // The user can remove the term in the second form where it has to be // actually removed. This prevents users from removing terms accidentally. - if ( $request->getVal( 'remove' ) === null && $this->value === '' ) { + if ( !$request->getCheck( 'remove' ) && $this->value === '' ) { $this->value = null; return false; } diff --git a/repo/includes/specials/SpecialNewItem.php b/repo/includes/specials/SpecialNewItem.php index fa4497f..3b34eff 100644 --- a/repo/includes/specials/SpecialNewItem.php +++ b/repo/includes/specials/SpecialNewItem.php @@ -40,8 +40,8 @@ protected function prepareArguments() { parent::prepareArguments(); - $this->site = $this->getRequest()->getVal( 'site', null ); - $this->page = $this->getRequest()->getVal( 'page', null ); + $this->site = $this->getRequest()->getVal( 'site' ); + $this->page = $this->getRequest()->getVal( 'page' ); } /** diff --git a/repo/includes/specials/SpecialSetSiteLink.php b/repo/includes/specials/SpecialSetSiteLink.php index 9eee06a..b8c6188 100644 --- a/repo/includes/specials/SpecialSetSiteLink.php +++ b/repo/includes/specials/SpecialSetSiteLink.php @@ -145,7 +145,7 @@ // If the user just enters an item id and a site, dont remove the site link. // The user can remove the site link in the second form where it has to be // actually removed. This prevents users from removing site links accidentally. - if ( $request->getVal( 'remove' ) === null && $this->page === '' ) { + if ( !$request->getCheck( 'remove' ) && $this->page === '' ) { $this->page = null; return false; } -- To view, visit https://gerrit.wikimedia.org/r/204236 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5969f2d099fc464d614970b19dcc2a78c98843b9 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Thiemo Mättig (WMDE) <thiemo.maet...@wikimedia.de> Gerrit-Reviewer: Addshore <addshorew...@gmail.com> Gerrit-Reviewer: Bene <benestar.wikime...@gmail.com> Gerrit-Reviewer: Hoo man <h...@online.de> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits