Addshore has uploaded a new change for review. https://gerrit.wikimedia.org/r/82377
Change subject: Remove old EntityId usage from api/getclaims ...................................................................... Remove old EntityId usage from api/getclaims Change-Id: Iaf419c59032a15b97868c611489a4ed479f7a5ec --- M repo/includes/api/GetClaims.php 1 file changed, 3 insertions(+), 21 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/77/82377/1 diff --git a/repo/includes/api/GetClaims.php b/repo/includes/api/GetClaims.php index d7cd810..140cf86 100644 --- a/repo/includes/api/GetClaims.php +++ b/repo/includes/api/GetClaims.php @@ -4,38 +4,19 @@ use ApiBase; use MWException; - +use Wikibase\DataModel\Entity\EntityId; use Wikibase\Lib\ClaimGuidValidator; -use Wikibase\Lib\EntityIdFormatter; -use Wikibase\Lib\EntityIdParser; use Wikibase\Lib\Serializers\ClaimSerializer; use Wikibase\Lib\Serializers\SerializerFactory; -use Wikibase\EntityId; use Wikibase\Entity; use Wikibase\EntityContentFactory; use Wikibase\Property; -use Wikibase\Statement; use Wikibase\Claims; use Wikibase\Claim; use Wikibase\Repo\WikibaseRepo; /** * API module for getting claims. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * http://www.gnu.org/copyleft/gpl.html * * @since 0.3 * @@ -66,7 +47,8 @@ list( $id, $claimGuid ) = $this->getIdentifiers( $params ); - $entityId = EntityId::newFromPrefixedId( $id ); + $entityIdParser = WikibaseRepo::getDefaultInstance()->getEntityIdParser(); + $entityId = $entityIdParser->parse( $id ); $entity = $entityId ? $this->getEntity( $entityId ) : null; if ( !$entity ) { -- To view, visit https://gerrit.wikimedia.org/r/82377 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iaf419c59032a15b97868c611489a4ed479f7a5ec Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Addshore <addshorew...@gmail.com> Gerrit-Reviewer: jenkins-bot _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits