[MediaWiki-commits] [Gerrit] integration/config[master]: Add extensions/DataTypes
AnotherLadsgroup has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/378672 ) Change subject: Add extensions/DataTypes .. Add extensions/DataTypes Bug: T127292 Change-Id: I2e04a8e308e402a0b7e8a8273fb0d45cc135d31f --- M zuul/layout.yaml 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/72/378672/1 diff --git a/zuul/layout.yaml b/zuul/layout.yaml index 5a204c3..9c98df8 100644 --- a/zuul/layout.yaml +++ b/zuul/layout.yaml @@ -4293,6 +4293,12 @@ - name: extension-unittests-generic - name: mwgate-npm + - name: mediawiki/extensions/DataTypes +template: + - name: extension-unittests-composer + - name: mwgate-npm + - name: extension-qunit-composer + - name: mediawiki/extensions/DeleteOwn template: - name: extension-unittests-generic -- To view, visit https://gerrit.wikimedia.org/r/378672 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2e04a8e308e402a0b7e8a8273fb0d45cc135d31f Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: AnotherLadsgroup___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Make dbBatchSize in WikiPageUpdater configurable
AnotherLadsgroup has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/374505 ) Change subject: Make dbBatchSize in WikiPageUpdater configurable .. Make dbBatchSize in WikiPageUpdater configurable Bug: T174422 Change-Id: I9eb228a3961ce8a3f0cd9e10337d3783771aff88 --- M client/config/WikibaseClient.default.php M client/includes/Changes/WikiPageUpdater.php M client/includes/WikibaseClient.php 3 files changed, 8 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/05/374505/1 diff --git a/client/config/WikibaseClient.default.php b/client/config/WikibaseClient.default.php index 6df21cf..415b531 100644 --- a/client/config/WikibaseClient.default.php +++ b/client/config/WikibaseClient.default.php @@ -97,6 +97,9 @@ return $settings->hasSetting( 'hasFullEntityIdColumn' ) ? $settings->getSetting( 'hasFullEntityIdColumn' ) : true; }, + + // Database batch size in WikiPageUpdater which ChangeHandler uses + 'wikiPageUpdaterDbBatchSize' => 50, ]; // Some defaults depend on information not available at this time. diff --git a/client/includes/Changes/WikiPageUpdater.php b/client/includes/Changes/WikiPageUpdater.php index 2739bc9..679ecf4 100644 --- a/client/includes/Changes/WikiPageUpdater.php +++ b/client/includes/Changes/WikiPageUpdater.php @@ -10,6 +10,7 @@ use Wikibase\Client\RecentChanges\RecentChangeFactory; use Wikibase\Client\RecentChanges\RecentChangesDuplicateDetector; use Wikibase\EntityChange; +use Wikimedia\Assert\Assert; use Wikimedia\Rdbms\LBFactory; /** @@ -85,6 +86,8 @@ * @param int $dbBatchSize */ public function setDbBatchSize( $dbBatchSize ) { + Assert::parameterType( 'integer', $dbBatchSize, 'dbBatchSize' ); + $this->dbBatchSize = $dbBatchSize; } diff --git a/client/includes/WikibaseClient.php b/client/includes/WikibaseClient.php index e237046..8a0427a 100644 --- a/client/includes/WikibaseClient.php +++ b/client/includes/WikibaseClient.php @@ -1211,6 +1211,8 @@ MediaWikiServices::getInstance()->getStatsdDataFactory() ); + $pageUpdater->setDbBatchSize( $this->settings->getSetting( 'wikiPageUpdaterDbBatchSize' ) ); + $changeListTransformer = new ChangeRunCoalescer( $this->getStore()->getEntityRevisionLookup(), $this->getEntityChangeFactory(), -- To view, visit https://gerrit.wikimedia.org/r/374505 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9eb228a3961ce8a3f0cd9e10337d3783771aff88 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: AnotherLadsgroup___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Decrease dbBatchSize in WikiPageUpdater
AnotherLadsgroup has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/373521 ) Change subject: Decrease dbBatchSize in WikiPageUpdater .. Decrease dbBatchSize in WikiPageUpdater Right now, it cuases some jobs to take a very long time Bug: T173710 Change-Id: I7a16ef7b470de6a546f19b44029ca5c626817b86 --- M client/includes/Changes/WikiPageUpdater.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/21/373521/1 diff --git a/client/includes/Changes/WikiPageUpdater.php b/client/includes/Changes/WikiPageUpdater.php index 2739bc9..5006be2 100644 --- a/client/includes/Changes/WikiPageUpdater.php +++ b/client/includes/Changes/WikiPageUpdater.php @@ -41,7 +41,7 @@ /** * @var int Batch size for database operations */ - private $dbBatchSize = 100; + private $dbBatchSize = 50; /** * @var RecentChangesDuplicateDetector|null -- To view, visit https://gerrit.wikimedia.org/r/373521 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7a16ef7b470de6a546f19b44029ca5c626817b86 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: AnotherLadsgroup___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] integration/config[master]: Enable jenkins (without any tests) on wheels repo of ORES
AnotherLadsgroup has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/372759 ) Change subject: Enable jenkins (without any tests) on wheels repo of ORES .. Enable jenkins (without any tests) on wheels repo of ORES This repo doesn't need any tests as it's not hosting any code Bug: T173251 Change-Id: Ie3463a84d92d7f9fb6adfe74e9b4dc0c02a03192 --- M zuul/layout.yaml 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/59/372759/1 diff --git a/zuul/layout.yaml b/zuul/layout.yaml index 682f40c..6412f39 100644 --- a/zuul/layout.yaml +++ b/zuul/layout.yaml @@ -7417,3 +7417,9 @@ postmerge: - doxygen-publish - phpunit-coverage-publish + + - name: research/ores/wheels +test: + - noop +gate-and-submit: + - noop -- To view, visit https://gerrit.wikimedia.org/r/372759 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie3463a84d92d7f9fb6adfe74e9b4dc0c02a03192 Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: AnotherLadsgroup___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Fix dieWithError or dieError usages in GetEntities
AnotherLadsgroup has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/372148 ) Change subject: Fix dieWithError or dieError usages in GetEntities .. Fix dieWithError or dieError usages in GetEntities This takes some parts of I0d2a471 out of the patch Change-Id: I191dfbfd9fcda3939a4b7139581a5c31707db38b --- M repo/includes/Api/GetEntities.php 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/48/372148/1 diff --git a/repo/includes/Api/GetEntities.php b/repo/includes/Api/GetEntities.php index 15d0308..c645a76 100644 --- a/repo/includes/Api/GetEntities.php +++ b/repo/includes/Api/GetEntities.php @@ -120,8 +120,8 @@ $params = $this->extractRequestParams(); if ( !isset( $params['ids'] ) && ( empty( $params['sites'] ) || empty( $params['titles'] ) ) ) { - $this->errorReporter->dieError( - 'Either provide the item "ids" or pairs of "sites" and "titles" for corresponding pages', + $this->errorReporter->dieWithError( + 'wikibase-api-illegal-entity-selector', 'param-missing' ); } @@ -172,7 +172,7 @@ $ids[] = $this->idParser->parse( $id ); } catch ( EntityIdParsingException $e ) { $this->errorReporter->dieWithError( - [ 'no-such-entity', $id ], + [ 'wikibase-api-no-such-entity', $id ], 'no-such-entity', 0, [ 'id' => $id ] -- To view, visit https://gerrit.wikimedia.org/r/372148 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I191dfbfd9fcda3939a4b7139581a5c31707db38b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: AnotherLadsgroup___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Fix MediaInfo jenkins breakage on master
AnotherLadsgroup has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/367470 ) Change subject: Fix MediaInfo jenkins breakage on master .. Fix MediaInfo jenkins breakage on master See Id64b72f9f07a2721a6407ef647786b3b668839c8 Change-Id: Idcf639a46fc7297de846152d138bc5719c7d96c6 --- M repo/tests/phpunit/includes/Api/EditEntityTest.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/70/367470/1 diff --git a/repo/tests/phpunit/includes/Api/EditEntityTest.php b/repo/tests/phpunit/includes/Api/EditEntityTest.php index 50f91da..1ff8f98 100644 --- a/repo/tests/phpunit/includes/Api/EditEntityTest.php +++ b/repo/tests/phpunit/includes/Api/EditEntityTest.php @@ -980,7 +980,7 @@ 'e' => [ 'exception' => [ 'type' => ApiUsageException::class, 'code' => 'no-such-entity', - 'message' => 'Could not find such an entity' + 'message-key' => 'wikibase-api-no-such-entity' ] ], 'requires' => 'mediainfo' // skip if MediaInfo is not configured ], -- To view, visit https://gerrit.wikimedia.org/r/367470 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idcf639a46fc7297de846152d138bc5719c7d96c6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: AnotherLadsgroup___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...WikibaseLexeme[master]: Do not let Lexeme::setId accept int as Id
AnotherLadsgroup has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/367461 ) Change subject: Do not let Lexeme::setId accept int as Id .. Do not let Lexeme::setId accept int as Id Bug: T151577 Change-Id: I3fd1e61bbbcd35cad2a775155f9a9d71b67623e6 --- M src/DataModel/Lexeme.php M tests/phpunit/composer/DataModel/LexemeTest.php 2 files changed, 2 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikibaseLexeme refs/changes/61/367461/1 diff --git a/src/DataModel/Lexeme.php b/src/DataModel/Lexeme.php index 28e44cb..86152d5 100644 --- a/src/DataModel/Lexeme.php +++ b/src/DataModel/Lexeme.php @@ -106,15 +106,13 @@ } /** -* @param LexemeId|int $id +* @param LexemeId $id * * @throws InvalidArgumentException */ public function setId( $id ) { if ( $id instanceof LexemeId ) { $this->id = $id; - } elseif ( is_int( $id ) ) { - $this->id = new LexemeId( 'L' . $id ); } else { throw new InvalidArgumentException( '$id must be an instance of LexemeId or an integer.' diff --git a/tests/phpunit/composer/DataModel/LexemeTest.php b/tests/phpunit/composer/DataModel/LexemeTest.php index 8d0136c..9302a58 100644 --- a/tests/phpunit/composer/DataModel/LexemeTest.php +++ b/tests/phpunit/composer/DataModel/LexemeTest.php @@ -74,13 +74,6 @@ $this->assertSame( $id, $lexeme->getId() ); } - public function testSetNewIdAsInt() { - $lexeme = new Lexeme(); - $lexeme->setId( 1 ); - - $this->assertTrue( $lexeme->getId()->equals( new LexemeId( 'L1' ) ) ); - } - public function testOverrideId() { $lexeme = new Lexeme( new LexemeId( 'L1' ) ); $id = new LexemeId( 'L2' ); @@ -94,6 +87,7 @@ [ null ], [ false ], [ 1.0 ], + [ 1 ], [ 'L1' ], [ new ItemId( 'Q1' ) ], ]; -- To view, visit https://gerrit.wikimedia.org/r/367461 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3fd1e61bbbcd35cad2a775155f9a9d71b67623e6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikibaseLexeme Gerrit-Branch: master Gerrit-Owner: AnotherLadsgroup___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Use EntityIdComposer instead of sending numeric id to Entity...
AnotherLadsgroup has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/367024 ) Change subject: Use EntityIdComposer instead of sending numeric id to EntityId::setId() .. Use EntityIdComposer instead of sending numeric id to EntityId::setId() Bug: T151577 Change-Id: Ia9e4bcca2d55c3684507e465f455b91df5a11835 --- M repo/includes/Store/Sql/SqlStore.php M repo/includes/Store/Sql/WikiPageEntityStore.php M repo/tests/phpunit/includes/Store/Sql/WikiPageEntityStoreTest.php 3 files changed, 15 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/24/367024/1 diff --git a/repo/includes/Store/Sql/SqlStore.php b/repo/includes/Store/Sql/SqlStore.php index 837706d..4cc5508 100644 --- a/repo/includes/Store/Sql/SqlStore.php +++ b/repo/includes/Store/Sql/SqlStore.php @@ -434,7 +434,7 @@ $contentFactory = WikibaseRepo::getDefaultInstance()->getEntityContentFactory(); $idGenerator = $this->newIdGenerator(); - $store = new WikiPageEntityStore( $contentFactory, $idGenerator ); + $store = new WikiPageEntityStore( $contentFactory, $idGenerator, $this->entityIdComposer ); $store->registerWatcher( $this->getEntityStoreWatcher() ); return $store; } diff --git a/repo/includes/Store/Sql/WikiPageEntityStore.php b/repo/includes/Store/Sql/WikiPageEntityStore.php index cdcfddd..5fbd30a 100644 --- a/repo/includes/Store/Sql/WikiPageEntityStore.php +++ b/repo/includes/Store/Sql/WikiPageEntityStore.php @@ -15,6 +15,7 @@ use Wikibase\EntityContent; use Wikibase\EntityRevision; use Wikibase\IdGenerator; +use Wikibase\Lib\EntityIdComposer; use Wikibase\Lib\Store\EntityStore; use Wikibase\Lib\Store\EntityStoreWatcher; use Wikibase\Lib\Store\StorageException; @@ -47,14 +48,22 @@ */ private $dispatcher; + /** +* @var EntityIdComposer +*/ + private $entityIdComposer; + public function __construct( EntityContentFactory $contentFactory, - IdGenerator $idGenerator + IdGenerator $idGenerator, + EntityIdComposer $entityIdComposer ) { $this->contentFactory = $contentFactory; $this->idGenerator = $idGenerator; $this->dispatcher = new GenericEventDispatcher( EntityStoreWatcher::class ); + + $this->entityIdComposer = $entityIdComposer; } /** @@ -92,8 +101,8 @@ $contentModelId = $handler->getModelID(); $numericId = $this->idGenerator->getNewId( $contentModelId ); - // FIXME: this relies on setId() accepting numeric IDs! Use an EntityIdComposer instead. - $entity->setId( $numericId ); + $entityId = $this->entityIdComposer->composeEntityId( '', $type, $numericId ); + $entity->setId( $entityId ); } /** diff --git a/repo/tests/phpunit/includes/Store/Sql/WikiPageEntityStoreTest.php b/repo/tests/phpunit/includes/Store/Sql/WikiPageEntityStoreTest.php index 9343d4c..8687262 100644 --- a/repo/tests/phpunit/includes/Store/Sql/WikiPageEntityStoreTest.php +++ b/repo/tests/phpunit/includes/Store/Sql/WikiPageEntityStoreTest.php @@ -108,7 +108,8 @@ }, ] ), - new SqlIdGenerator( wfGetLB() ) + new SqlIdGenerator( wfGetLB() ), + $wikibaseRepo->getEntityIdComposer() ); return [ $store, $lookup ]; -- To view, visit https://gerrit.wikimedia.org/r/367024 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia9e4bcca2d55c3684507e465f455b91df5a11835 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: AnotherLadsgroup___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Lower level of nesting in GetEntities::getEntityIdsFromIdParam
AnotherLadsgroup has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/366846 ) Change subject: Lower level of nesting in GetEntities::getEntityIdsFromIdParam .. Lower level of nesting in GetEntities::getEntityIdsFromIdParam Cleaner code Change-Id: I541c2ea96073aa73d6f8adf670d3c426b6f7ec5f --- M repo/includes/Api/GetEntities.php 1 file changed, 14 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/46/366846/1 diff --git a/repo/includes/Api/GetEntities.php b/repo/includes/Api/GetEntities.php index 8be6b2c..1b1b603 100644 --- a/repo/includes/Api/GetEntities.php +++ b/repo/includes/Api/GetEntities.php @@ -163,14 +163,20 @@ */ private function getEntityIdsFromIdParam( array $params ) { $ids = []; - if ( isset( $params['ids'] ) ) { - foreach ( $params['ids'] as $id ) { - try { - $ids[] = $this->idParser->parse( $id ); - } catch ( EntityIdParsingException $e ) { - $this->errorReporter->dieWithError( [ 'no-such-entity', $id ], 'no-such-entity', - 0, [ 'id' => $id ] ); - } + if ( !isset( $params['ids'] ) ) { + return []; + } + + foreach ( $params['ids'] as $id ) { + try { + $ids[] = $this->idParser->parse( $id ); + } catch ( EntityIdParsingException $e ) { + $this->errorReporter->dieWithError( + [ 'no-such-entity', $id ], + 'no-such-entity', + 0, + [ 'id' => $id ] + ); } } return $ids; -- To view, visit https://gerrit.wikimedia.org/r/366846 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I541c2ea96073aa73d6f8adf670d3c426b6f7ec5f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: AnotherLadsgroup___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] integration/config[master]: Revert "Remove myself from tests whitelist"
Hello Chad, Hashar, Legoktm, jenkins-bot, I'd like you to do a code review. Please visit https://gerrit.wikimedia.org/r/366240 to review the following change. Change subject: Revert "Remove myself from tests whitelist" .. Revert "Remove myself from tests whitelist" This reverts commit 5fdebed13b82e180a193370c1f66a109161c3bc1. Change-Id: Iad68c96929abf55eda85e8ad45e9ace49bf75021 --- M zuul/layout.yaml 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/40/366240/1 diff --git a/zuul/layout.yaml b/zuul/layout.yaml index e2fb31b..c5d369b 100644 --- a/zuul/layout.yaml +++ b/zuul/layout.yaml @@ -139,6 +139,7 @@ | krinklemail@gmail\.com | kumariankita002@gmail\.com | l10n-bot@translatewiki\.net +| [Ll]adsgroup@gmail\.com | legoktm@member\.fsf\.org | lewis@lewiscawte\.me | liangent@gmail\.com @@ -391,6 +392,7 @@ - ^karsten@hoffmeyer\.info$ # Kghbln - ^krenair@gmail\.com$ - ^kumariankita002@gmail\.com$ + - ^[lL]adsgroup@gmail\.com$ # Pywikibot maintainer - ^lewis@lewiscawte\.me$ - ^liangent@gmail\.com$ - ^lokal\.profil@gmail\.com$ -- To view, visit https://gerrit.wikimedia.org/r/366240 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iad68c96929abf55eda85e8ad45e9ace49bf75021 Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: AnotherLadsgroupGerrit-Reviewer: Chad Gerrit-Reviewer: Hashar Gerrit-Reviewer: Legoktm Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Make SpecialGoToLinkedPage accept a chain of sites instead o...
AnotherLadsgroup has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/365438 ) Change subject: Make SpecialGoToLinkedPage accept a chain of sites instead of one .. Make SpecialGoToLinkedPage accept a chain of sites instead of one Bug: T166473 Change-Id: I821e645ac13d516397e5be6fc949e09614d6cfbf --- M repo/includes/Specials/SpecialGoToLinkedPage.php M repo/tests/phpunit/includes/Specials/SpecialGoToLinkedPageTest.php 2 files changed, 23 insertions(+), 13 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/38/365438/1 diff --git a/repo/includes/Specials/SpecialGoToLinkedPage.php b/repo/includes/Specials/SpecialGoToLinkedPage.php index f54599c..7cdeb06 100644 --- a/repo/includes/Specials/SpecialGoToLinkedPage.php +++ b/repo/includes/Specials/SpecialGoToLinkedPage.php @@ -79,15 +79,18 @@ /** * @param string|null $subPage * -* @return array array( string $site, string $itemString ) +* @return array array( string[] $sites, string $itemString ) */ private function getArguments( $subPage ) { $request = $this->getRequest(); $parts = ( $subPage === '' ) ? [] : explode( '/', $subPage, 2 ); - $site = trim( $request->getVal( 'site', isset( $parts[0] ) ? $parts[0] : '' ) ); + $sites = explode( + ',', + trim( $request->getVal( 'site', isset( $parts[0] ) ? $parts[0] : '' ) ) + ); $itemString = trim( $request->getVal( 'itemid', isset( $parts[1] ) ? $parts[1] : 0 ) ); - return [ $site, $itemString ]; + return [ $sites, $itemString ]; } /** @@ -186,32 +189,34 @@ */ public function execute( $subPage ) { parent::execute( $subPage ); - list( $site, $itemString ) = $this->getArguments( $subPage ); + list( $sites, $itemString ) = $this->getArguments( $subPage ); - if ( !empty( $site ) || !empty( $itemString ) ) { - $url = $this->getTargetUrl( $site, $itemString ); - if ( null !== $url ) { - $this->getOutput()->redirect( $url ); - return; + if ( !empty( $sites ) || !empty( $itemString ) ) { + foreach ( $sites as $site ) { + $url = $this->getTargetUrl( $site, $itemString ); + if ( $url !== null ) { + $this->getOutput()->redirect( $url ); + return; + } } } $this->outputError(); - $this->outputForm( $site, $itemString ); + $this->outputForm( $sites, $itemString ); } /** * Output a form via the context's OutputPage object to go to a * sitelink (linked page) for an item and site id. * -* @param string $site +* @param string[] $sites * @param string $itemString */ - private function outputForm( $site, $itemString ) { + private function outputForm( array $sites, $itemString ) { $formDescriptor = [ 'site' => [ 'name' => 'site', - 'default' => $site ?: '', + 'default' => implode( ',', $sites ), 'type' => 'text', 'id' => 'wb-gotolinkedpage-sitename', 'size' => 12, diff --git a/repo/tests/phpunit/includes/Specials/SpecialGoToLinkedPageTest.php b/repo/tests/phpunit/includes/Specials/SpecialGoToLinkedPageTest.php index 07c4c2f..9553676 100644 --- a/repo/tests/phpunit/includes/Specials/SpecialGoToLinkedPageTest.php +++ b/repo/tests/phpunit/includes/Specials/SpecialGoToLinkedPageTest.php @@ -144,6 +144,10 @@ 'XXwiki/Q23', null, 'XXwiki', 'Q23', '(wikibase-gotolinkedpage-error-page-not-found)' ], + 'notFound3' => [ + 'XXwiki,enwiki,zhwiki/Q23', null, 'XXwiki,enwiki,zhwiki', 'Q23', + '(wikibase-gotolinkedpage-error-page-not-found)' + ], ]; } @@ -171,6 +175,7 @@ $cases['found'] = [ 'dewiki/Q23', 'http://dewiki.com/TestPageName' ]; $cases['foundEntityRedirect'] = [ 'dewiki/Q24', 'http://dewiki.com/TestPageName' ]; $cases['foundWithSiteIdHack'] = [ 'de/Q23', 'http://dewiki.com/TestPageName' ]; +
[MediaWiki-commits] [Gerrit] mediawiki...WikibaseLexeme[master]: Rename "Forms" section to "Morphology"
AnotherLadsgroup has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/365412 ) Change subject: Rename "Forms" section to "Morphology" .. Rename "Forms" section to "Morphology" Bug: T170287 Change-Id: Id0ee8592ecf29a6394d33321e3b8141f494596a3 --- M i18n/en.json M i18n/qqq.json 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikibaseLexeme refs/changes/12/365412/1 diff --git a/i18n/en.json b/i18n/en.json index 42a7abb..309c10b 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -12,7 +12,7 @@ "wikibase-newlexeme-language": "Language of lexeme", "wikibase-lexeme-view-language-lexical-category": "$1 in $2", "wikibase-lexeme-statementsection-statements-about-form": "Statements about $1", - "wikibase-lexeme-view-forms": "Forms", + "wikibase-lexeme-view-forms": "Morphology", "wikibase-lexeme-enter-form-representation": "Enter new form representation", "wikibase-lexeme-empty-form-representation": "No form representation defined", "wikibase-lexeme-statementsection-statements-about-sense": "Statements about $1", diff --git a/i18n/qqq.json b/i18n/qqq.json index 0f2a3cc..6373ab2 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -17,7 +17,7 @@ "wikibase-newlexeme-language": "Label for field in the lexeme creation form.", "wikibase-lexeme-view-language-lexical-category": "Description when both lexical category and language are present\n{{Identical|In}}", "wikibase-lexeme-statementsection-statements-about-form": "Heading for the list of statements giving specific information about the currently viewed Form of a Lexeme.\n\nParameters:\n* $1 - Form ID.\n{{Identical|Statements}}", - "wikibase-lexeme-view-forms": "Subheading for the forms section on a lexeme page.\n{{Identical|Form}}", + "wikibase-lexeme-view-forms": "Subheading for the morphology section on a lexeme page.\n{{Identical|Form}}", "wikibase-lexeme-enter-form-representation": "Placeholder for the lexeme form representation input field.", "wikibase-lexeme-empty-form-representation": "Placeholder message displayed instead of the lexeme form representation in case no representation has been specified yet.", "wikibase-lexeme-statementsection-statements-about-sense": "Heading for the list of statements giving specific information about the currently viewed Sense of a Lexeme.\n\nParameters:\n* $1 - Sense ID.\n{{Identical|Statements}}", -- To view, visit https://gerrit.wikimedia.org/r/365412 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id0ee8592ecf29a6394d33321e3b8141f494596a3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikibaseLexeme Gerrit-Branch: master Gerrit-Owner: AnotherLadsgroup___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] integration/config[master]: Remove myself from tests whitelist
AnotherLadsgroup has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/364628 ) Change subject: Remove myself from tests whitelist .. Remove myself from tests whitelist We'll add it later :) Change-Id: I47d70c7e91ea943859cd3267180cb7ffe8706ef1 --- M zuul/layout.yaml 1 file changed, 0 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/28/364628/1 diff --git a/zuul/layout.yaml b/zuul/layout.yaml index c5d369b..e2fb31b 100644 --- a/zuul/layout.yaml +++ b/zuul/layout.yaml @@ -139,7 +139,6 @@ | krinklemail@gmail\.com | kumariankita002@gmail\.com | l10n-bot@translatewiki\.net -| [Ll]adsgroup@gmail\.com | legoktm@member\.fsf\.org | lewis@lewiscawte\.me | liangent@gmail\.com @@ -392,7 +391,6 @@ - ^karsten@hoffmeyer\.info$ # Kghbln - ^krenair@gmail\.com$ - ^kumariankita002@gmail\.com$ - - ^[lL]adsgroup@gmail\.com$ # Pywikibot maintainer - ^lewis@lewiscawte\.me$ - ^liangent@gmail\.com$ - ^lokal\.profil@gmail\.com$ -- To view, visit https://gerrit.wikimedia.org/r/364628 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I47d70c7e91ea943859cd3267180cb7ffe8706ef1 Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: AnotherLadsgroup___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Add props parameter to SearchEntities API module
AnotherLadsgroup has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/364623 ) Change subject: Add props parameter to SearchEntities API module .. Add props parameter to SearchEntities API module It's not a breaking change but we can easily turn off url now Bug: T103875 Change-Id: I4f1f546042a03b578f4b6736060fca40c70f13fe --- M repo/i18n/en.json M repo/i18n/qqq.json M repo/includes/Api/SearchEntities.php M repo/tests/phpunit/includes/Api/SearchEntitiesTest.php 4 files changed, 38 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/23/364623/1 diff --git a/repo/i18n/en.json b/repo/i18n/en.json index 60aaaec..cddcac8 100644 --- a/repo/i18n/en.json +++ b/repo/i18n/en.json @@ -569,12 +569,14 @@ "apihelp-wbsearchentities-param-language": "Search in this language.", "apihelp-wbsearchentities-param-strictlanguage": "Whether to disable language fallback", "apihelp-wbsearchentities-param-type": "Search for this type of entity.", + "apihelp-wbsearchentities-param-props": "Return these properties for each entity.", "apihelp-wbsearchentities-param-limit": "Maximal number of results", "apihelp-wbsearchentities-param-continue": "Offset where to continue a search", "apihelp-wbsearchentities-example-1": "Search for \"abc\" in English language, with defaults for type and limit", "apihelp-wbsearchentities-example-2": "Search for \"abc\" in English language with a limit of 50", "apihelp-wbsearchentities-example-3": "Search for \"alphabet\" in English language for type property", "apihelp-wbsearchentities-example-4": "Search for \"abc\" in English language with a limit of 2 and an offset of 2", + "apihelp-wbsearchentities-example-5": "Search for \"alphabet\" in English language omitting url parameter", "apihelp-query+wbsearch-description": "Searches for entities using labels and aliases.\nThis can be used as a generator for other queries.\nReturns the matched term that should be displayed.", "apihelp-query+wbsearch-summary": "Searches for entities using labels and aliases.", "apihelp-query+wbsearch-extended-description": "This can be used as a generator for other queries.\nReturns the matched term that should be displayed.", diff --git a/repo/i18n/qqq.json b/repo/i18n/qqq.json index f5d9889..0eabbdf 100644 --- a/repo/i18n/qqq.json +++ b/repo/i18n/qqq.json @@ -602,12 +602,14 @@ "apihelp-wbsearchentities-param-language": "{{doc-apihelp-param|wbsearchentities|language}}", "apihelp-wbsearchentities-param-strictlanguage": "{{doc-apihelp-param|wbsearchentities|strictlanguage|info = This message is used [https://www.wikidata.org/wiki/Special:ApiSandbox#action=wbsearchentities here] at param 3. If enabled only matches in the current language are shown}}", "apihelp-wbsearchentities-param-type": "{{doc-apihelp-param|wbsearchentities|type}}", + "apihelp-wbsearchentities-param-props": "{{doc-apihelp-param|wbsearchentities|props}}", "apihelp-wbsearchentities-param-limit": "{{doc-apihelp-param|wbsearchentities|limit}}", "apihelp-wbsearchentities-param-continue": "{{doc-apihelp-param|wbsearchentities|continue}}", "apihelp-wbsearchentities-example-1": "{{doc-apihelp-example|wbsearchentities}}", "apihelp-wbsearchentities-example-2": "{{doc-apihelp-example|wbsearchentities}}", "apihelp-wbsearchentities-example-3": "{{doc-apihelp-example|wbsearchentities}}", "apihelp-wbsearchentities-example-4": "{{doc-apihelp-example|wbsearchentities}}", + "apihelp-wbsearchentities-example-5": "{{doc-apihelp-example|wbsearchentities}}", "apihelp-query+wbsearch-description": "{{doc-apihelp-description|query+wbsearch}}", "apihelp-query+wbsearch-summary": "{{doc-apihelp-summary|query+wbsearch}}", "apihelp-query+wbsearch-extended-description": "{{doc-apihelp-extended-description|query+wbsearch}}", diff --git a/repo/includes/Api/SearchEntities.php b/repo/includes/Api/SearchEntities.php index afdbc6a..0131b72 100644 --- a/repo/includes/Api/SearchEntities.php +++ b/repo/includes/Api/SearchEntities.php @@ -103,7 +103,7 @@ $entries = []; foreach ( $searchResults as $match ) { - $entries[] = $this->buildTermSearchMatchEntry( $match ); + $entries[] = $this->buildTermSearchMatchEntry( $match, $params['props'] ); } return $entries; @@ -111,10 +111,11 @@ /** * @param TermSearchResult $match +* @param string[] $props * * @return array */ - private function buildTermSearchMatchEntry( TermSearchResult $match ) { + private function buildTermSearchMatchEntry( TermSearchResult $match, array $props =
[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Add hidden field for base revision id in SpecialModifyEntity
AnotherLadsgroup has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/364618 ) Change subject: Add hidden field for base revision id in SpecialModifyEntity .. Add hidden field for base revision id in SpecialModifyEntity This later will be needed when detecting edit conflicts Change-Id: Ic754ae6f0c850511a54910fdfc31ac8538c5f835 --- M repo/includes/Specials/SpecialModifyEntity.php 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/18/364618/1 diff --git a/repo/includes/Specials/SpecialModifyEntity.php b/repo/includes/Specials/SpecialModifyEntity.php index 34c455b..46a1e9d 100644 --- a/repo/includes/Specials/SpecialModifyEntity.php +++ b/repo/includes/Specials/SpecialModifyEntity.php @@ -236,6 +236,11 @@ 'id' => $id, 'default' => $entity === null ? '' : $entity->getId(), ], + 'revid' => [ + 'name' => 'revid', + 'type' => 'hidden', + 'default' => $this->entityRevision->getRevisionId() + ] ]; } -- To view, visit https://gerrit.wikimedia.org/r/364618 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic754ae6f0c850511a54910fdfc31ac8538c5f835 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: AnotherLadsgroup___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Do not show edit buttons when it's being printed
AnotherLadsgroup has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/364615 ) Change subject: Do not show edit buttons when it's being printed .. Do not show edit buttons when it's being printed Bug: T87108 Change-Id: Id4dadea9b919fbcfab2d863e56592fc407b331a6 --- M view/resources/jquery/wikibase/toolbar/themes/default/jquery.wikibase.toolbarbutton.css 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/15/364615/1 diff --git a/view/resources/jquery/wikibase/toolbar/themes/default/jquery.wikibase.toolbarbutton.css b/view/resources/jquery/wikibase/toolbar/themes/default/jquery.wikibase.toolbarbutton.css index d35e97f..05776f2 100644 --- a/view/resources/jquery/wikibase/toolbar/themes/default/jquery.wikibase.toolbarbutton.css +++ b/view/resources/jquery/wikibase/toolbar/themes/default/jquery.wikibase.toolbarbutton.css @@ -112,3 +112,9 @@ /* @embed */ background-image: linear-gradient( transparent, transparent ), url( images/icons/oojs-ui/add.svg ); } + +@media print { + .wikibase-toolbarbutton { + display: none; + } +} -- To view, visit https://gerrit.wikimedia.org/r/364615 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id4dadea9b919fbcfab2d863e56592fc407b331a6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: AnotherLadsgroup___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits