Thiemo Mättig (WMDE) has uploaded a new change for review.
https://gerrit.wikimedia.org/r/204236
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(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase
refs/changes/36/204236/1
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 512c14b..602e86e 100644
--- a/repo/includes/specials/SpecialSetSiteLink.php
+++ b/repo/includes/specials/SpecialSetSiteLink.php
@@ -143,7 +143,7 @@
}
// to provide removing after posting the full form
- if ( $request->getVal( 'remove' ) === null && $this->page ===
'' ) {
+ if ( !$request->getCheck( 'remove' ) && $this->page === '' ) {
$this->showErrorHTML(
$this->msg(
'wikibase-setsitelink-warning-remove',
--
To view, visit https://gerrit.wikimedia.org/r/204236
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5969f2d099fc464d614970b19dcc2a78c98843b9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits