Addshore has uploaded a new change for review.
https://gerrit.wikimedia.org/r/78513
Change subject: Remove profileOuts that dont have a mathing IN
......................................................................
Remove profileOuts that dont have a mathing IN
Change-Id: Ic183b8107429f96fa141f420b55773d87992ba67
---
M repo/includes/api/EditEntity.php
M repo/includes/api/LinkTitles.php
2 files changed, 0 insertions(+), 15 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase
refs/changes/13/78513/1
diff --git a/repo/includes/api/EditEntity.php b/repo/includes/api/EditEntity.php
index cc8c9c0..f10cb03 100644
--- a/repo/includes/api/EditEntity.php
+++ b/repo/includes/api/EditEntity.php
@@ -190,7 +190,6 @@
$labelChangeOps = array();
if ( !is_array( $labels ) ) {
- wfProfileOut( __METHOD__ );
$this->dieUsage( "List of labels must be an array",
'not-recognized-array' );
}
@@ -223,7 +222,6 @@
$descriptionChangeOps = array();
if ( !is_array( $descriptions ) ) {
- wfProfileOut( __METHOD__ );
$this->dieUsage( "List of descriptions must be an
array", 'not-recognized-array' );
}
@@ -256,7 +254,6 @@
$aliasesChangeOps = array();
if ( !is_array( $aliases ) ) {
- wfProfileOut( __METHOD__ );
$this->dieUsage( "List of aliases must be an array",
'not-recognized-array' );
}
@@ -296,7 +293,6 @@
}
if ( !$status->isOk() ) {
- wfProfileOut( __METHOD__ );
$this->dieUsage( "Contained status: $1",
$status->getWikiText() );
}
@@ -315,7 +311,6 @@
$siteLinksChangeOps = array();
if ( !is_array( $siteLinks ) ) {
- wfProfileOut( __METHOD__ );
$this->dieUsage( "List of sitelinks must be an array",
'not-recognized-array' );
}
@@ -328,7 +323,6 @@
if ( $sites->hasSite( $globalSiteId ) ) {
$linkSite = $sites->getSite( $globalSiteId );
} else {
- wfProfileOut( __METHOD__ );
$this->dieUsage( "There is no site for global
site id '$globalSiteId'", 'no-such-site' );
}
@@ -338,7 +332,6 @@
$linkPage = $linkSite->normalizePageName(
$this->stringNormalizer->trimWhitespace( $arg['title'] ) );
if ( $linkPage === false ) {
- wfProfileOut( __METHOD__ );
$this->dieUsage( 'The external client
site did not provide page information' , 'no-external-page' );
}
@@ -382,12 +375,10 @@
'datatype' );
if ( is_null( $data ) ) {
- wfProfileOut( __METHOD__ );
$this->dieUsage( 'Invalid json: The supplied JSON
structure could not be parsed or recreated as a valid structure' ,
'invalid-json' );
}
if ( !is_array( $data ) ) { // NOTE: json_decode will decode
any JS literal or structure, not just objects!
- wfProfileOut( __METHOD__ );
$this->dieUsage( 'Top level structure must be a JSON
object', 'not-recognized-array' );
}
@@ -403,20 +394,16 @@
// conditional processing
if ( isset( $data['pageid'] ) && ( is_object( $page ) ?
$page->getId() !== $data['pageid'] : true ) ) {
- wfProfileOut( __METHOD__ );
$this->dieUsage( 'Illegal field used in call: pageid',
'param-illegal' );
}
// not completely convinced that we can use title to get the
namespace in this case
if ( isset( $data['ns'] ) && ( is_object( $title ) ?
$title->getNamespace() !== $data['ns'] : true ) ) {
- wfProfileOut( __METHOD__ );
$this->dieUsage( 'Illegal field used in call:
namespace', 'param-illegal' );
}
if ( isset( $data['title'] ) && ( is_object( $title ) ?
$title->getPrefixedText() !== $data['title'] : true ) ) {
- wfProfileOut( __METHOD__ );
$this->dieUsage( 'Illegal field used in call: title',
'param-illegal' );
}
if ( isset( $data['lastrevid'] ) && ( is_object( $revision ) ?
$revision->getId() !== $data['lastrevid'] : true ) ) {
- wfProfileOut( __METHOD__ );
$this->dieUsage( 'Illegal field used in call:
lastrevid', 'param-illegal' );
}
diff --git a/repo/includes/api/LinkTitles.php b/repo/includes/api/LinkTitles.php
index b0eb2b4..ff6276b 100644
--- a/repo/includes/api/LinkTitles.php
+++ b/repo/includes/api/LinkTitles.php
@@ -172,12 +172,10 @@
*/
protected function validateParameters( array $params ) {
if ( $params['fromsite'] === $params['tosite'] ) {
- wfProfileOut( __METHOD__ );
$this->dieUsage( 'The from site can not match the to
site' , 'param-illegal' );
}
if( !( strlen( $params['fromtitle'] ) > 0) || !( strlen(
$params['totitle'] ) > 0) ){
- wfProfileOut( __METHOD__ );
$this->dieUsage( 'The from title and to title must have
a value' , 'param-illegal' );
}
}
--
To view, visit https://gerrit.wikimedia.org/r/78513
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic183b8107429f96fa141f420b55773d87992ba67
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Addshore <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits