[MediaWiki-commits] [Gerrit] Fix mw.notify not being visible if first loaded when scrolle... - change (mediawiki/core)
Majr has uploaded a new change for review. https://gerrit.wikimedia.org/r/243605 Change subject: Fix mw.notify not being visible if first loaded when scrolled down .. Fix mw.notify not being visible if first loaded when scrolled down This regression was caused by using $().offset() on a hidden element, which returns the current scroll position making the script think the notification area starts where the scroll position is, so it would not become fixed until you scroll further. Bug: T114606 Change-Id: Ice62cf3ea7b1a29e33baeca05d1a088a68c9a785 --- M resources/src/mediawiki/mediawiki.notification.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/05/243605/1 diff --git a/resources/src/mediawiki/mediawiki.notification.js b/resources/src/mediawiki/mediawiki.notification.js index f361ec8..e576ccf 100644 --- a/resources/src/mediawiki/mediawiki.notification.js +++ b/resources/src/mediawiki/mediawiki.notification.js @@ -394,11 +394,11 @@ .on( 'click', 'a', function ( e ) { e.stopPropagation(); } ) - .hide(); // Prepend the notification area to the content area and save it's object. mw.util.$content.prepend( $area ); offset = $area.offset(); + $area.hide(); function updateAreaMode() { var isFloating = $window.scrollTop() > offset.top; -- To view, visit https://gerrit.wikimedia.org/r/243605 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ice62cf3ea7b1a29e33baeca05d1a088a68c9a785 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Majr___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Clarify responsibility for Parsoid/RESTBase errors - change (mediawiki...ContentTranslation)
jenkins-bot has submitted this change and it was merged. Change subject: Clarify responsibility for Parsoid/RESTBase errors .. Clarify responsibility for Parsoid/RESTBase errors This makes CX's messages consistent with Visual Editor (T112339), and is a follow-up to https://gerrit.wikimedia.org/r/237421. Bug: T112565 Change-Id: I50876e895de4f039cbb2ff88a52f2f8ff8eb56aa --- M api/ApiContentTranslationPublish.php 1 file changed, 11 insertions(+), 4 deletions(-) Approvals: KartikMistry: Looks good to me, but someone else must approve Subramanya Sastry: Looks good to me, but someone else must approve Santhosh: Looks good to me, approved jenkins-bot: Verified diff --git a/api/ApiContentTranslationPublish.php b/api/ApiContentTranslationPublish.php index 2015094..b992605 100755 --- a/api/ApiContentTranslationPublish.php +++ b/api/ApiContentTranslationPublish.php @@ -26,6 +26,9 @@ public function __construct( ApiMain $main, $name ) { parent::__construct( $main, $name ); $this->serviceClient = new VirtualRESTServiceClient( new MultiHttpClient( array() ) ); + // Mounted at /restbase/ because it is a service speaking the + // RESTBase v1 API -- but the service responding to these API + // requests could be either Parsoid or RESTBase. $this->serviceClient->mount( '/restbase/', $this->getVRSObject() ); } @@ -82,6 +85,8 @@ return new $class( $params ); } + // Make a RESTBase v1 API request (which could be to either Parsoid or + // RESTBase; the VRS makes these appear identical). private function requestRestbase( $method, $path, $params ) { $request = array( 'method' => $method, @@ -96,9 +101,9 @@ if ( $response['code'] === 200 && $response['error'] === '' ) { return $response['body']; } elseif ( $response['error'] !== '' ) { - $this->dieUsage( 'restbase-http-error: ' . $response['code'], $response['error'] ); + $this->dieUsage( 'docserver-http-error: ' . $response['code'], $response['error'] ); } else { // error null, code not 200 - $this->dieUsage( 'restbase-http: HTTP ' . $response['code'], $response['code'] ); + $this->dieUsage( 'docserver-http: HTTP ' . $response['code'], $response['code'] ); } } @@ -119,7 +124,9 @@ ) ); if ( $wikitext === false ) { - $this->dieUsage( 'Error contacting the Parsoid server', 'parsoidserver' ); + $vrsInfo = $this->serviceClient->getMountAndService( '/restbase/' ); + $name = $vrsInfo[1] ? $vrsInfo[1]->getName() : 'unknown VRS service'; + $this->dieUsage( 'Error contacting ' . $name, 'docserver' ); } return $wikitext; } @@ -227,7 +234,7 @@ try { $wikitext = $this->convertHtmlToWikitext( $title, $params['html'] ); } catch ( MWException $e ) { - $this->dieUsage( $e->getMessage(), 'parsoidserver' ); + $this->dieUsage( $e->getMessage(), 'docserver' ); } $saveresult = $this->saveWikitext( $title, $wikitext, $params ); -- To view, visit https://gerrit.wikimedia.org/r/242928 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I50876e895de4f039cbb2ff88a52f2f8ff8eb56aa Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: CscottGerrit-Reviewer: KartikMistry Gerrit-Reviewer: Santhosh Gerrit-Reviewer: Subramanya Sastry Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] ext.centralNotice.display: public getData() -> getDataProper... - change (mediawiki...CentralNotice)
AndyRussG has uploaded a new change for review. https://gerrit.wikimedia.org/r/243604 Change subject: ext.centralNotice.display: public getData() -> getDataProperty() .. ext.centralNotice.display: public getData() -> getDataProperty() Renames the public getData() method, since it's easily confused with the method with the same name on the state object. Change-Id: I3e16414a82cdd4e22f8b418bfabd024c70e455d5 --- M resources/subscribing/ext.centralNotice.display.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralNotice refs/changes/04/243604/1 diff --git a/resources/subscribing/ext.centralNotice.display.js b/resources/subscribing/ext.centralNotice.display.js index dd5dddb..d709dfd 100644 --- a/resources/subscribing/ext.centralNotice.display.js +++ b/resources/subscribing/ext.centralNotice.display.js @@ -530,7 +530,7 @@ * Get the value of a property used in campaign/banner selection and * display, and for recording the results of that process. */ - getData: function( prop ) { + getDataProperty: function( prop ) { return cn.internal.state.getData()[prop]; } }; -- To view, visit https://gerrit.wikimedia.org/r/243604 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3e16414a82cdd4e22f8b418bfabd024c70e455d5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CentralNotice Gerrit-Branch: master Gerrit-Owner: AndyRussG___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Updated various @params from DatabaseBase to IDatabase - change (mediawiki/core)
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/243488 Change subject: Updated various @params from DatabaseBase to IDatabase .. Updated various @params from DatabaseBase to IDatabase Change-Id: I98e44cdffb0fc0d729f69f702799139afb988c20 --- M includes/Block.php M includes/Export.php M includes/Revision.php M includes/RevisionList.php M includes/SiteStats.php M includes/Title.php M includes/UserRightsProxy.php M includes/api/ApiBase.php M includes/api/ApiPageSet.php M includes/cache/BacklinkCache.php M includes/cache/LinkBatch.php M includes/changetags/ChangeTagsLogList.php M includes/changetags/ChangeTagsRevisionList.php M includes/deferred/SiteStatsUpdate.php M includes/externalstore/ExternalStoreDB.php M includes/filerepo/file/LocalFile.php M includes/logging/LogEventsList.php M includes/page/WikiPage.php M includes/search/SearchDatabase.php M includes/utils/BatchRowIterator.php M includes/utils/BatchRowWriter.php 21 files changed, 46 insertions(+), 46 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/88/243488/1 diff --git a/includes/Block.php b/includes/Block.php index c5a16fc..0ec4ad1 100644 --- a/includes/Block.php +++ b/includes/Block.php @@ -452,7 +452,7 @@ * Insert a block into the block table. Will fail if there is a conflicting * block (same name and options) already in the database. * -* @param DatabaseBase $dbw If you have one available +* @param IDatabase $dbw If you have one available * @return bool|array False on failure, assoc array on success: * ('id' => block ID, 'autoIds' => array of autoblock IDs) */ @@ -556,7 +556,7 @@ /** * Get an array suitable for passing to $dbw->insert() or $dbw->update() -* @param DatabaseBase $db +* @param IDatabase $db * @return array */ protected function getDatabaseArray( $db = null ) { diff --git a/includes/Export.php b/includes/Export.php index adab21c..b4d7737 100644 --- a/includes/Export.php +++ b/includes/Export.php @@ -79,7 +79,7 @@ * make additional queries to pull source data while the * main query is still running. * -* @param DatabaseBase $db +* @param IDatabase $db * @param int|array $history One of WikiExporter::FULL, WikiExporter::CURRENT, * WikiExporter::RANGE or WikiExporter::STABLE, or an associative array: * - offset: non-inclusive offset at which to start the query diff --git a/includes/Revision.php b/includes/Revision.php index a7a87e8..24c025f 100644 --- a/includes/Revision.php +++ b/includes/Revision.php @@ -223,7 +223,7 @@ * Load a page revision from a given revision ID number. * Returns null if no such revision can be found. * -* @param DatabaseBase $db +* @param IDatabase $db * @param int $id * @return Revision|null */ @@ -236,7 +236,7 @@ * that's attached to a given page. If not attached * to that page, will return null. * -* @param DatabaseBase $db +* @param IDatabase $db * @param int $pageid * @param int $id * @return Revision|null @@ -256,7 +256,7 @@ * that's attached to a given page. If not attached * to that page, will return null. * -* @param DatabaseBase $db +* @param IDatabase $db * @param Title $title * @param int $id * @return Revision|null @@ -281,7 +281,7 @@ * WARNING: Timestamps may in some circumstances not be unique, * so this isn't the best key to use. * -* @param DatabaseBase $db +* @param IDatabase $db * @param Title $title * @param string $timestamp * @return Revision|null @@ -333,7 +333,7 @@ * Given a set of conditions, fetch a revision from * the given database connection. * -* @param DatabaseBase $db +* @param IDatabase $db * @param array $conditions * @param int $flags (optional) * @return Revision|null @@ -375,7 +375,7 @@ * which will return matching database rows with the * fields necessary to build Revision objects. * -* @param DatabaseBase $db +* @param IDatabase $db * @param array $conditions * @param int $flags (optional) * @return ResultWrapper @@ -519,7 +519,7 @@ /** * Do a batched query to get the parent revision lengths -* @param DatabaseBase $db +* @param IDatabase $db * @param array $revIds * @return array */ @@ -1206,7 +1206,7 @@ * Get previous revision Id for this page_id * This is used to populate rev_parent_id on save * -* @param
[MediaWiki-commits] [Gerrit] Simplify TimeValueComparer switch a lot - change (mediawiki...WikibaseQualityExternalValidation)
jenkins-bot has submitted this change and it was merged. Change subject: Simplify TimeValueComparer switch a lot .. Simplify TimeValueComparer switch a lot Change-Id: Ibad8370656378dbf577b1530a99391f0e5a22e25 --- M includes/CrossCheck/Comparer/TimeValueComparer.php M tests/phpunit/CrossCheck/Comparer/TimeValueComparerTest.php 2 files changed, 44 insertions(+), 15 deletions(-) Approvals: Jeroen De Dauw: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/CrossCheck/Comparer/TimeValueComparer.php b/includes/CrossCheck/Comparer/TimeValueComparer.php index ea821a4..2ea130c 100644 --- a/includes/CrossCheck/Comparer/TimeValueComparer.php +++ b/includes/CrossCheck/Comparer/TimeValueComparer.php @@ -78,9 +78,11 @@ $result = true; switch ( $precision ) { + case TimeValue::PRECISION_SECOND: + $result = $result && $diff->s === 0; + // Fall through with no break/return. This is critical for this algorithm. case TimeValue::PRECISION_MINUTE: $result = $result && $diff->i === 0; - // Fall through with no break/return. This is critical for this algorithm. case TimeValue::PRECISION_HOUR: $result = $result && $diff->h === 0; case TimeValue::PRECISION_DAY: @@ -88,31 +90,28 @@ case TimeValue::PRECISION_MONTH: $result = $result && $diff->m === 0; case TimeValue::PRECISION_YEAR: - $result = $result && $diff->y === 0; + return $result && $diff->y === 0; case TimeValue::PRECISION_YEAR10: - $result = $result && $diff->y < 10; + return $diff->y < 10; case TimeValue::PRECISION_YEAR100: - $result = $result && $diff->y < 100; + return $diff->y < 100; case TimeValue::PRECISION_YEAR1K: - $result = $result && $diff->y < 1000; + return $diff->y < 1000; case TimeValue::PRECISION_YEAR10K: - $result = $result && $diff->y < 1; + return $diff->y < 1; case TimeValue::PRECISION_YEAR100K: - $result = $result && $diff->y < 10; + return $diff->y < 10; case TimeValue::PRECISION_YEAR1M: - $result = $result && $diff->y < 100; + return $diff->y < 100; case TimeValue::PRECISION_YEAR10M: - $result = $result && $diff->y < 1000; + return $diff->y < 1000; case TimeValue::PRECISION_YEAR100M: - $result = $result && $diff->y < 1; + return $diff->y < 1; case TimeValue::PRECISION_YEAR1G: - $result = $result && $diff->y < 10; - break; + return $diff->y < 10; default: - $result = false; + return false; } - - return $result; } /** diff --git a/tests/phpunit/CrossCheck/Comparer/TimeValueComparerTest.php b/tests/phpunit/CrossCheck/Comparer/TimeValueComparerTest.php index 066a306..33f07e6 100644 --- a/tests/phpunit/CrossCheck/Comparer/TimeValueComparerTest.php +++ b/tests/phpunit/CrossCheck/Comparer/TimeValueComparerTest.php @@ -60,6 +60,11 @@ $localValue2016 = new TimeValue( '+2016-03-00T00:00:00Z', 0, 0, 0, TimeValue::PRECISION_MONTH, $g ); return array( + 'Same second' => array( + ComparisonResult::STATUS_MATCH, + new TimeValue( '+2015-01-01T01:01:01Z', 0, 0, 0, TimeValue::PRECISION_SECOND, $g ), + new TimeValue( '+2015-01-01T01:01:01Z', 0, 0, 0, TimeValue::PRECISION_SECOND, $g ) + ), 'Same day' => array( ComparisonResult::STATUS_MATCH, $localValue1955, @@ -90,16 +95,41 @@ new TimeValue( '+11980-08-00T00:00:00Z', 0, 0, 0, TimeValue::PRECISION_YEAR, $g ), new TimeValue(
[MediaWiki-commits] [Gerrit] Remove not needed and - change (mediawiki...WikibaseQualityExternalValidation)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/243491 Change subject: Remove not needed and .. Remove not needed and Change-Id: I06b99bc77318c03595377614ee75715031a60923 --- M includes/CrossCheck/Comparer/TimeValueComparer.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikibaseQualityExternalValidation refs/changes/91/243491/1 diff --git a/includes/CrossCheck/Comparer/TimeValueComparer.php b/includes/CrossCheck/Comparer/TimeValueComparer.php index 2ea130c..d5f231c 100644 --- a/includes/CrossCheck/Comparer/TimeValueComparer.php +++ b/includes/CrossCheck/Comparer/TimeValueComparer.php @@ -79,7 +79,7 @@ switch ( $precision ) { case TimeValue::PRECISION_SECOND: - $result = $result && $diff->s === 0; + $result = $diff->s === 0; // Fall through with no break/return. This is critical for this algorithm. case TimeValue::PRECISION_MINUTE: $result = $result && $diff->i === 0; -- To view, visit https://gerrit.wikimedia.org/r/243491 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I06b99bc77318c03595377614ee75715031a60923 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikibaseQualityExternalValidation Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] toollabs: install hugin-tools - change (operations/puppet)
Merlijn van Deen has uploaded a new change for review. https://gerrit.wikimedia.org/r/243500 Change subject: toollabs: install hugin-tools .. toollabs: install hugin-tools precise: hugin-tools (2011.4.0) trusty: hugin-tools (2013.0.0) jessie: hugin-tools (2014.0.0) Bug: T108210 Change-Id: I07d81b0832612885dcbf7ce1f4e2afd1ae82a11e --- M modules/toollabs/manifests/exec_environ.pp 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/00/243500/1 diff --git a/modules/toollabs/manifests/exec_environ.pp b/modules/toollabs/manifests/exec_environ.pp index 88aa2d4..d514d9c 100644 --- a/modules/toollabs/manifests/exec_environ.pp +++ b/modules/toollabs/manifests/exec_environ.pp @@ -252,6 +252,7 @@ 'gnuplot-nox', 'graphicsmagick', # T58995 'graphviz', +'hugin-tools', # T108210 'imagemagick', # T65000 'iotop', # useful for labs admins to monitor tools 'jq', # T67049. -- To view, visit https://gerrit.wikimedia.org/r/243500 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I07d81b0832612885dcbf7ce1f4e2afd1ae82a11e Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Merlijn van Deen___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove redundant argument - change (mediawiki...WikibaseQualityExternalValidation)
jenkins-bot has submitted this change and it was merged. Change subject: Remove redundant argument .. Remove redundant argument Change-Id: Ia74a7b828945e38578885e64d8c2b676695e5eae --- M includes/CrossCheck/Comparer/TimeValueComparer.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Thiemo Mättig (WMDE): Looks good to me, approved jenkins-bot: Verified diff --git a/includes/CrossCheck/Comparer/TimeValueComparer.php b/includes/CrossCheck/Comparer/TimeValueComparer.php index 2ea130c..04117e8 100644 --- a/includes/CrossCheck/Comparer/TimeValueComparer.php +++ b/includes/CrossCheck/Comparer/TimeValueComparer.php @@ -46,7 +46,7 @@ // FIXME: MWTimestamp does not support years with more than 4 digits! $localTimestamp = new MWTimestamp( substr( $value->getTime(), 1 ) ); $externalTimestamp = new MWTimestamp( substr( $comparativeValue->getTime(), 1 ) ); - $diff = $localTimestamp->diff( $externalTimestamp, true ); + $diff = $localTimestamp->diff( $externalTimestamp ); if ( $value->getPrecision() === $comparativeValue->getPrecision() && $this->resultOfDiffWithPrecision( $diff, $value->getPrecision() ) -- To view, visit https://gerrit.wikimedia.org/r/243490 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia74a7b828945e38578885e64d8c2b676695e5eae Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/WikibaseQualityExternalValidation Gerrit-Branch: master Gerrit-Owner: Jeroen De DauwGerrit-Reviewer: Thiemo Mättig (WMDE) Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove not needed and - change (mediawiki...WikibaseQualityExternalValidation)
jenkins-bot has submitted this change and it was merged. Change subject: Remove not needed and .. Remove not needed and Change-Id: I06b99bc77318c03595377614ee75715031a60923 --- M includes/CrossCheck/Comparer/TimeValueComparer.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Thiemo Mättig (WMDE): Looks good to me, approved jenkins-bot: Verified diff --git a/includes/CrossCheck/Comparer/TimeValueComparer.php b/includes/CrossCheck/Comparer/TimeValueComparer.php index 2ea130c..d5f231c 100644 --- a/includes/CrossCheck/Comparer/TimeValueComparer.php +++ b/includes/CrossCheck/Comparer/TimeValueComparer.php @@ -79,7 +79,7 @@ switch ( $precision ) { case TimeValue::PRECISION_SECOND: - $result = $result && $diff->s === 0; + $result = $diff->s === 0; // Fall through with no break/return. This is critical for this algorithm. case TimeValue::PRECISION_MINUTE: $result = $result && $diff->i === 0; -- To view, visit https://gerrit.wikimedia.org/r/243491 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I06b99bc77318c03595377614ee75715031a60923 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/WikibaseQualityExternalValidation Gerrit-Branch: master Gerrit-Owner: Jeroen De DauwGerrit-Reviewer: Thiemo Mättig (WMDE) Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Store text inputs to find and replace between sessions - change (VisualEditor/VisualEditor)
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/243501 Change subject: Store text inputs to find and replace between sessions .. Store text inputs to find and replace between sessions Change-Id: I8ae8d49d86fd1210f2ad636178d086d4c06f57e5 --- M src/ui/dialogs/ve.ui.FindAndReplaceDialog.js 1 file changed, 18 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/01/243501/1 diff --git a/src/ui/dialogs/ve.ui.FindAndReplaceDialog.js b/src/ui/dialogs/ve.ui.FindAndReplaceDialog.js index def429c..dedf0b1 100644 --- a/src/ui/dialogs/ve.ui.FindAndReplaceDialog.js +++ b/src/ui/dialogs/ve.ui.FindAndReplaceDialog.js @@ -62,6 +62,7 @@ this.query = null; this.findText = new OO.ui.TextInputWidget( { placeholder: ve.msg( 'visualeditor-find-and-replace-find-text' ), + value: ve.userConfig( 'visualeditor-findAndReplace-findText' ), validate: ( function ( dialog ) { return function () { return !dialog.invalidRegex; @@ -90,7 +91,8 @@ ve.ui.triggerRegistry.getMessages( 'findNext' ).join( ', ' ) } ); this.replaceText = new OO.ui.TextInputWidget( { - placeholder: ve.msg( 'visualeditor-find-and-replace-replace-text' ) + placeholder: ve.msg( 'visualeditor-find-and-replace-replace-text' ), + value: ve.userConfig( 'visualeditor-findAndReplace-replaceText' ) } ); this.replaceButton = new OO.ui.ButtonWidget( { label: ve.msg( 'visualeditor-find-and-replace-replace-button' ) @@ -133,7 +135,11 @@ this.renderFragmentsDebounced = ve.debounce( this.renderFragments.bind( this ) ); this.findText.connect( this, { change: 'onFindChange', - enter: 'onFindTextEnter' + enter: 'onFindReplaceTextEnter' + } ); + this.replaceText.connect( this, { + change: 'onReplaceChange', + enter: 'onFindReplaceTextEnter' } ); this.matchCaseToggle.connect( this, { change: 'onFindChange' } ); this.regexToggle.connect( this, { change: 'onFindChange' } ); @@ -259,17 +265,25 @@ this.renderFragments(); this.highlightFocused( true ); ve.userConfig( { + 'visualeditor-findAndReplace-findText': this.findText.getValue(), 'visualeditor-findAndReplace-matchCase': this.matchCaseToggle.getValue(), 'visualeditor-findAndReplace-regex': this.regexToggle.getValue() } ); }; /** - * Handle enter events on the find text input + * Handle change events to the replace input + */ +ve.ui.FindAndReplaceDialog.prototype.onReplaceChange = function () { + ve.userConfig( 'visualeditor-findAndReplace-replaceText', this.replaceText.getValue() ); +}; + +/** + * Handle enter events on the find text and replace text inputs * * @param {jQuery.Event} e */ -ve.ui.FindAndReplaceDialog.prototype.onFindTextEnter = function ( e ) { +ve.ui.FindAndReplaceDialog.prototype.onFindReplace = function ( e ) { if ( !this.results ) { return; } -- To view, visit https://gerrit.wikimedia.org/r/243501 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8ae8d49d86fd1210f2ad636178d086d4c06f57e5 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Converted DatabaseBase::mTrxAtomicLevels to an array - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Converted DatabaseBase::mTrxAtomicLevels to an array .. Converted DatabaseBase::mTrxAtomicLevels to an array * This simplifies the code and cleans up __construct() a bit while also making it less likely to cause trouble with unit testing mocks. * Also add a sanity mTrxLevel check around usage of mTrxAtomicLevels in the one place it was missing Change-Id: Ia0a7f22f5c27b3d4d8b51e04629f42a1ed9c3993 --- M includes/db/Database.php 1 file changed, 10 insertions(+), 12 deletions(-) Approvals: Parent5446: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/db/Database.php b/includes/db/Database.php index 4bbb491..05d1934 100644 --- a/includes/db/Database.php +++ b/includes/db/Database.php @@ -124,9 +124,9 @@ /** * Array of levels of atomicity within transactions * -* @var SplStack +* @var array */ - private $mTrxAtomicLevels; + private $mTrxAtomicLevels = array(); /** * Record if the current transaction was started implicitly by DatabaseBase::startAtomic @@ -608,8 +608,6 @@ */ function __construct( array $params ) { global $wgDBprefix, $wgDBmwschema, $wgCommandLineMode, $wgDebugDBTransactions; - - $this->mTrxAtomicLevels = new SplStack; $server = $params['host']; $user = $params['user']; @@ -3395,7 +3393,7 @@ } } - $this->mTrxAtomicLevels->push( $fname ); + $this->mTrxAtomicLevels[] = $fname; } /** @@ -3413,13 +3411,13 @@ if ( !$this->mTrxLevel ) { throw new DBUnexpectedError( $this, 'No atomic transaction is open.' ); } - if ( $this->mTrxAtomicLevels->isEmpty() || - $this->mTrxAtomicLevels->pop() !== $fname + if ( !$this->mTrxAtomicLevels || + array_pop( $this->mTrxAtomicLevels ) !== $fname ) { throw new DBUnexpectedError( $this, 'Invalid atomic section ended.' ); } - if ( $this->mTrxAtomicLevels->isEmpty() && $this->mTrxAutomaticAtomic ) { + if ( !$this->mTrxAtomicLevels && $this->mTrxAutomaticAtomic ) { $this->commit( $fname, 'flush' ); } } @@ -3443,7 +3441,7 @@ global $wgDebugDBTransactions; if ( $this->mTrxLevel ) { // implicit commit - if ( !$this->mTrxAtomicLevels->isEmpty() ) { + if ( $this->mTrxAtomicLevels ) { // If the current transaction was an automatic atomic one, then we definitely have // a problem. Same if there is any unclosed atomic level. throw new DBUnexpectedError( $this, @@ -3491,7 +3489,7 @@ $this->mTrxDoneWrites = false; $this->mTrxAutomatic = false; $this->mTrxAutomaticAtomic = false; - $this->mTrxAtomicLevels = new SplStack; + $this->mTrxAtomicLevels = array(); $this->mTrxIdleCallbacks = array(); $this->mTrxPreCommitCallbacks = array(); $this->mTrxShortId = wfRandomString( 12 ); @@ -3524,7 +3522,7 @@ * @throws DBUnexpectedError */ final public function commit( $fname = __METHOD__, $flush = '' ) { - if ( !$this->mTrxAtomicLevels->isEmpty() ) { + if ( $this->mTrxLevel && $this->mTrxAtomicLevels ) { // There are still atomic sections open. This cannot be ignored throw new DBUnexpectedError( $this, @@ -3610,7 +3608,7 @@ $this->doRollback( $fname ); $this->mTrxIdleCallbacks = array(); // cancel $this->mTrxPreCommitCallbacks = array(); // cancel - $this->mTrxAtomicLevels = new SplStack; + $this->mTrxAtomicLevels = array(); if ( $this->mTrxDoneWrites ) { $this->getTransactionProfiler()->transactionWritingOut( $this->mServer, $this->mDBname, $this->mTrxShortId ); -- To view, visit https://gerrit.wikimedia.org/r/243476 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia0a7f22f5c27b3d4d8b51e04629f42a1ed9c3993 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron SchulzGerrit-Reviewer: Krinkle Gerrit-Reviewer: Parent5446 Gerrit-Reviewer: jenkins-bot <>
[MediaWiki-commits] [Gerrit] WikidataQuality → WikibaseQuality - change (mediawiki...WikibaseQuality)
jenkins-bot has submitted this change and it was merged. Change subject: WikidataQuality → WikibaseQuality .. WikidataQuality → WikibaseQuality Change-Id: I4bad799a39b93ab78f0c210e6fcfe607c6639f7e --- M README.md 1 file changed, 5 insertions(+), 5 deletions(-) Approvals: Jeroen De Dauw: Looks good to me, approved jenkins-bot: Verified diff --git a/README.md b/README.md index 23dcdb3..5fa4323 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ -# Wikibase Quality [![Build Status](https://travis-ci.org/wikimedia/mediawiki-extensions-WikidataQuality.svg?branch=master)](https://travis-ci.org/wikimedia/mediawiki-extensions-WikidataQuality) [![Coverage Status](https://coveralls.io/repos/wikimedia/mediawiki-extensions-WikidataQuality/badge.svg)](https://coveralls.io/r/wikimedia/mediawiki-extensions-WikidataQuality) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/wikimedia/mediawiki-extensions-WikidataQuality/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/wikimedia/mediawiki-extensions-WikidataQuality/?branch=master) +# Wikibase Quality [![Build Status](https://travis-ci.org/wikimedia/mediawiki-extensions-WikibaseQuality.svg?branch=master)](https://travis-ci.org/wikimedia/mediawiki-extensions-WikibaseQuality) [![Coverage Status](https://coveralls.io/repos/wikimedia/mediawiki-extensions-WikibaseQuality/badge.svg)](https://coveralls.io/r/wikimedia/mediawiki-extensions-WikibaseQuality) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/wikimedia/mediawiki-extensions-WikibaseQuality/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/wikimedia/mediawiki-extensions-WikibaseQuality/?branch=master) This is the base extension for our Wikibase Quality extensions. It doesn't do anything without at least one complementary Wikibase Quality extension (listed below). There you can also find installation instructions. -[![Build Status](https://travis-ci.org/wikimedia/mediawiki-extensions-WikidataQualityConstraints.svg?branch=master)](https://travis-ci.org/wikimedia/mediawiki-extensions-WikidataQualityConstraints) - [WikidataQualityConstraints](https://github.com/wikimedia/mediawiki-extensions-WikidataQualityConstraints) +[![Build Status](https://travis-ci.org/wikimedia/mediawiki-extensions-WikibaseQualityConstraints.svg?branch=master)](https://travis-ci.org/wikimedia/mediawiki-extensions-WikibaseQualityConstraints) + [WikibaseQualityConstraints](https://github.com/wikimedia/mediawiki-extensions-WikibaseQualityConstraints) -[![Build Status](https://travis-ci.org/wikimedia/mediawiki-extensions-WikidataQualityExternalValidation.svg?branch=master)](https://travis-ci.org/wikimedia/mediawiki-extensions-WikidataQualityExternalValidation) - [WikidataQualityExternalValidation](https://github.com/wikimedia/mediawiki-extensions-WikidataQualityExternalValidation) \ No newline at end of file +[![Build Status](https://travis-ci.org/wikimedia/mediawiki-extensions-WikibaseQualityExternalValidation.svg?branch=master)](https://travis-ci.org/wikimedia/mediawiki-extensions-WikibaseQualityExternalValidation) + [WikibaseQualityExternalValidation](https://github.com/wikimedia/mediawiki-extensions-WikibaseQualityExternalValidation) -- To view, visit https://gerrit.wikimedia.org/r/243483 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4bad799a39b93ab78f0c210e6fcfe607c6639f7e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikibaseQuality Gerrit-Branch: master Gerrit-Owner: RicordisamoaGerrit-Reviewer: Hoo man Gerrit-Reviewer: Jeroen De Dauw Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make generalizeSQL() protected - change (mediawiki/core)
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/243492 Change subject: Make generalizeSQL() protected .. Make generalizeSQL() protected Change-Id: Ib1317576b82993adf5ae454f9ecd8bd148a58cc9 --- M includes/db/Database.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/92/243492/1 diff --git a/includes/db/Database.php b/includes/db/Database.php index 4bbb491..ab61408 100644 --- a/includes/db/Database.php +++ b/includes/db/Database.php @@ -1756,7 +1756,7 @@ * * @return string */ - static function generalizeSQL( $sql ) { + protected static function generalizeSQL( $sql ) { # This does the same as the regexp below would do, but in such a way # as to avoid crashing php on some large strings. # $sql = preg_replace( "/'([^']|.)*'|\"([^\"]|.)*\"/", "'X'", $sql ); -- To view, visit https://gerrit.wikimedia.org/r/243492 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib1317576b82993adf5ae454f9ecd8bd148a58cc9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use ViewFactory for constructing statementlistviews in state... - change (mediawiki...Wikibase)
Adrian Lang has uploaded a new change for review. https://gerrit.wikimedia.org/r/243494 Change subject: Use ViewFactory for constructing statementlistviews in statementgroupview .. Use ViewFactory for constructing statementlistviews in statementgroupview This change introduces a `ViewFactory` method for creating `statementlistview` widgets. This method is passed to the `statementgroupview` so that it can create widgets without having to pass it all their dependencies. It improves separation between the `statementgroupview` and `statementlistview`, since the `statementgroupview` doesn't have to know how to construct a `statementlistview` anymore. It also allows to inject a different implementation, for example in tests. This is a third step for T75380. Change-Id: Ifeaa600d7746c0056668b754e4df67ca71cb9b2c --- M view/resources/jquery/wikibase/jquery.wikibase.statementgroupview.js M view/resources/jquery/wikibase/resources.php M view/resources/wikibase/view/ViewFactory.js M view/resources/wikibase/view/resources.php M view/tests/qunit/jquery/wikibase/jquery.wikibase.statementgroupview.tests.js M view/tests/qunit/wikibase/view/ViewFactory.tests.js 6 files changed, 102 insertions(+), 104 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/94/243494/1 diff --git a/view/resources/jquery/wikibase/jquery.wikibase.statementgroupview.js b/view/resources/jquery/wikibase/jquery.wikibase.statementgroupview.js index d933662..b2493ef 100644 --- a/view/resources/jquery/wikibase/jquery.wikibase.statementgroupview.js +++ b/view/resources/jquery/wikibase/jquery.wikibase.statementgroupview.js @@ -8,9 +8,6 @@ * `Property` id by managing a list of `jQuery.wikibase.statementview` widgets encapsulated by a * `jquery.wikibase.statementlistview` widget. * @see wikibase.datamodel.StatementGroup - * @uses jQuery.wikibase.statementlistview - * @uses jQuery.wikibase.listview - * @uses jQuery.wikibase.listview.ListItemAdapter * @since 0.5 * @extends jQuery.ui.TemplatedWidget * @licence GNU GPL v2+ @@ -22,23 +19,9 @@ * @param {wikibase.datamodel.StatementGroup} [options.value=null] *The `Statements` to be displayed by this view. If `null`, the view will only display an *"add" button to add new `Statements`. - * @param {wikibase.utilities.ClaimGuidGenerator} options.claimGuidGenerator - *Required for dynamically generating GUIDs for new `Statement`s. * @param {wikibase.entityIdFormatter.EntityIdHtmlFormatter} options.entityIdHtmlFormatter *Required for dynamically rendering links to `Entity`s. - * @param {wikibase.entityIdFormatter.EntityIdPlainFormatter} options.entityIdPlainFormatter - *Required for dynamically rendering plain text references to `Entity`s. - * @param {wikibase.store.EntityStore} options.entityStore - *Required for dynamically gathering `Entity`/`Property` information. - * @param {wikibase.ValueViewBuilder} options.valueViewBuilder - *Required by the `snakview` interfacing a `snakview` "value" `Variation` to - *`jQuery.valueview`. - * @param {wikibase.entityChangers.EntityChangersFactory} options.entityChangersFactory - *Required to store the `Reference`s gathered from the `referenceview`s aggregated by the - *`statementview`. - * @param {dataTypes.DataTypeStore} options.dataTypeStore - *Required by the `snakview` for retrieving and evaluating a proper `dataTypes.DataType` - *object when interacting on a "value" `Variation`. + * @param {Function} options.buildStatementListView */ /** * @event afterremove @@ -63,13 +46,8 @@ $propertyLabel: '.wikibase-statementgroupview-property-label' }, value: null, - claimGuidGenerator: null, - entityIdHtmlFormatter: null, - entityIdPlainFormatter: null, - entityStore: null, - valueViewBuilder: null, - entityChangersFactory: null, - dataTypeStore: null + buildStatementListView: null, + entityIdHtmlFormatter: null }, /** @@ -84,13 +62,7 @@ * @throws {Error} if a required option is not specified properly. */ _create: function() { - if ( !this.options.claimGuidGenerator - || !this.options.entityIdHtmlFormatter - || !this.options.entityStore - || !this.options.valueViewBuilder - || !this.options.entityChangersFactory - || !this.options.dataTypeStore - ) { + if ( !this.options.entityIdHtmlFormatter || !this.options.buildStatementListView ) { throw new Error( 'Required option not specified properly' ); } @@ -142,20
[MediaWiki-commits] [Gerrit] Use ViewFactory for building statementviews in statementlist... - change (mediawiki...Wikibase)
Adrian Lang has uploaded a new change for review. https://gerrit.wikimedia.org/r/243496 Change subject: Use ViewFactory for building statementviews in statementlistview .. Use ViewFactory for building statementviews in statementlistview This change introduces a `ViewFactory` method for building `ListItemAdapter`s for `statementview` widgets. This `ListItemAdapter` is passed to the `statementlistview` so that it can create the widgets without having to pass them all their dependencies. This change leaves `listview` as an implementation detail of `statementlistview`. This implementation detail is publicly represented by having to pass in a `listview.ListItemAdapter`. It improves separation between the `statementlistview` and `statementview`, since the `statementlistview` doesn't have to know how to construct a `statementview` anymore. It also allows to inject a different implementation, for example in tests. This is a fourth step for T75380. TODO: * simpleWidget rausziehen * getListItemAdapter rausziehen Change-Id: I293e6f745fc96f1dab9951e21af613ede8471501 --- M view/resources/jquery/wikibase/jquery.wikibase.statementlistview.js M view/resources/jquery/wikibase/resources.php M view/resources/wikibase/view/ViewFactory.js M view/resources/wikibase/view/resources.php M view/tests/qunit/jquery/wikibase/jquery.wikibase.statementlistview.tests.js M view/tests/qunit/wikibase/view/ViewFactory.tests.js M view/tests/qunit/wikibase/view/resources.php 7 files changed, 211 insertions(+), 137 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/96/243496/1 diff --git a/view/resources/jquery/wikibase/jquery.wikibase.statementlistview.js b/view/resources/jquery/wikibase/jquery.wikibase.statementlistview.js index 89a71eb..564083f 100644 --- a/view/resources/jquery/wikibase/jquery.wikibase.statementlistview.js +++ b/view/resources/jquery/wikibase/jquery.wikibase.statementlistview.js @@ -13,9 +13,6 @@ * @extends jQuery.ui.TemplatedWidget * @uses jQuery.wikibase.listview * @uses jQuery.wikibase.listview.ListItemAdapter - * @uses jQuery.wikibase.statementview - * @uses mediaWiki - * @uses wikibase.utilities * @since 0.4 * @licence GNU GPL v2+ * @author H. Snater < mediaw...@snater.com > @@ -26,23 +23,8 @@ * @param {wikibase.datamodel.StatementList} options.value *The list of `Statement`s to be displayed by this view. If null, the view will initialize *with edit mode being started. - * @param {wikibase.utilities.ClaimGuidGenerator} options.claimGuidGenerator - *Required for dynamically generating GUIDs for new `Statement`s. - * @param {wikibase.entityIdFormatter.EntityIdHtmlFormatter} options.entityIdHtmlFormatter - *Required for dynamically rendering links to `Entity`s. - * @param {wikibase.entityIdFormatter.EntityIdPlainFormatter} options.entityIdPlainFormatter - *Required for dynamically rendering plain text references to `Entity`s. - * @param {wikibase.store.EntityStore} options.entityStore - *Required for dynamically gathering `Entity`/`Property` information. - * @param {wikibase.ValueViewBuilder} options.valueViewBuilder - *Required by the `snakview` interfacing a `snakview` "value" `Variation` to - *`jQuery.valueview`. - * @param {wikibase.entityChangers.EntityChangersFactory} options.entityChangersFactory - *Required to store the `Reference`s gathered from the `referenceview`s aggregated by the - *`statementview`. - * @param {dataTypes.DataTypeStore} options.dataTypeStore - *Required by the `snakview` for retrieving and evaluating a proper `dataTypes.DataType` - *object when interacting on a "value" `Variation`. + * @param {wikibase.entityChangers.ClaimsChanger} options.claimsChanger + * @param {jQuery.wikibase.listview.ListItemAdapter} options.listItemAdapter /** * @event afterstartediting * Triggered when edit mode has been started for one of the `statementview` widgets managed by the @@ -84,13 +66,8 @@ $listview: '.wikibase-statementlistview-listview' }, value: null, - claimGuidGenerator: null, - entityIdHtmlFormatter: null, - entityIdPlainFormatter: null, - entityStore: null, - valueViewBuilder: null, - entityChangersFactory: null, - dataTypeStore: null + claimsChanger: null, + listItemAdapter: null }, /** @@ -100,38 +77,20 @@ _listview: null, /** -* @type {wikibase.entityChangers.ClaimsChanger} -* @private -*/ - _claimsChanger: null, - - /** -* @type {wikibase.entityChangers.ReferencesChanger} -* @private -*/ - _referencesChanger: null, - - /** * @inheritdoc
[MediaWiki-commits] [Gerrit] toollabs-genpp: add simple tool to check package availability - change (operations/puppet)
Merlijn van Deen has uploaded a new change for review. https://gerrit.wikimedia.org/r/243498 Change subject: toollabs-genpp: add simple tool to check package availability .. toollabs-genpp: add simple tool to check package availability Usage: python3 checkversion.py hugin-tools Change-Id: Iedcbb700c05d632c42493fa42a1c038466eb002f --- A modules/toollabs/manifests/genpp/checkversion.py 1 file changed, 31 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/98/243498/1 diff --git a/modules/toollabs/manifests/genpp/checkversion.py b/modules/toollabs/manifests/genpp/checkversion.py new file mode 100644 index 000..ab13f9f --- /dev/null +++ b/modules/toollabs/manifests/genpp/checkversion.py @@ -0,0 +1,31 @@ +#!/usr/bin/env python3 +import genpp +import argparse +import fnmatch + +parser = argparse.ArgumentParser( +description='Report package version in supported OS releases' +) +parser.add_argument( +'name', +help='The name of the package. Shell-style wildcards are supported.' +) + +if __name__=="__main__": +args = parser.parse_args() +print("Searching for {name} in {releases}".format( +name=args.name, +releases=list(genpp.releases.keys()) +)) +for release in genpp.releases: +packages = genpp.load_release(release) +matches = fnmatch.filter(packages.keys(), args.name) +if not matches: +print("{release}: (no matches)".format(release=release)) +else: +for match in matches: +print("{release}: {match} ({version})".format( +release=release, +match=match, +version=packages[match] +)) -- To view, visit https://gerrit.wikimedia.org/r/243498 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iedcbb700c05d632c42493fa42a1c038466eb002f Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Merlijn van Deen___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove jshint from package.json - change (mediawiki...Echo)
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/243502 Change subject: Remove jshint from package.json .. Remove jshint from package.json We use grunt-contrib-jshint for jshint. Change-Id: I83e96471a3253a635107d351fc8f8f2f3d8c6286 --- M package.json 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo refs/changes/02/243502/1 diff --git a/package.json b/package.json index 30a882b..5828d34 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,6 @@ "grunt-contrib-watch": "0.6.1", "grunt-banana-checker": "0.2.2", "grunt-jscs": "1.8.0", - "jshint": "2.8.0", "grunt-jsonlint": "1.0.4" } } -- To view, visit https://gerrit.wikimedia.org/r/243502 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I83e96471a3253a635107d351fc8f8f2f3d8c6286 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: Paladox___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] proofreadpage_tests.py: remove duplicated code - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: proofreadpage_tests.py: remove duplicated code .. proofreadpage_tests.py: remove duplicated code Remove duplicate code of test_get_labels(), left in code by mistake. Moved a comment present in duplicated code to test_get_labels(). Change-Id: I8cc7383399f47710aec38a692cf0ea775205d12e --- M tests/proofreadpage_tests.py 1 file changed, 1 insertion(+), 20 deletions(-) Approvals: XZise: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/proofreadpage_tests.py b/tests/proofreadpage_tests.py index 8a1715f..33d67d5 100644 --- a/tests/proofreadpage_tests.py +++ b/tests/proofreadpage_tests.py @@ -345,11 +345,11 @@ # Get label from number. self.assertEqual(index_page.get_label_from_page_number(num), label) +# Error if number does not exists. self.assertRaises(KeyError, index_page.get_label_from_page_number, -1) # Get label from page. self.assertEqual(index_page.get_label_from_page(proofread_page), label) - # Error if page does not exists. self.assertRaises(KeyError, index_page.get_label_from_page, None) @@ -395,25 +395,6 @@ for n in num_set: p = index_page.get_page_from_number(n) self.assertEqual(index_page._numbers_from_page[p], n) - -def test_page_number_mapping(self, key): -"""Test consistency of page <-> mapping.""" -data = self.sites[key] -num, title_num, label = data['get_label'] - -index_page = IndexPage(self.site, self.sites[key]['index']) -page_title = self.sites[key]['page'].format(title_num) -proofread_page = ProofreadPage(self.site, page_title) - -# Get label from number. -self.assertEqual(index_page.get_label_from_page_number(num), label) -# Error if number does not exists. -self.assertRaises(KeyError, index_page.get_label_from_page_number, -1) - -# Get label from page. -self.assertEqual(index_page.get_label_from_page(proofread_page), label) -# Error if page does not exists. -self.assertRaises(KeyError, index_page.get_label_from_page, None) if __name__ == '__main__': -- To view, visit https://gerrit.wikimedia.org/r/243416 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8cc7383399f47710aec38a692cf0ea775205d12e Gerrit-PatchSet: 2 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: MpaaGerrit-Reviewer: John Vandenberg Gerrit-Reviewer: Ladsgroup Gerrit-Reviewer: XZise Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update grunt-jscs to 2.1.0 - change (mediawiki...Echo)
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/243503 Change subject: Update grunt-jscs to 2.1.0 .. Update grunt-jscs to 2.1.0 Change-Id: I1e4f5d444dd46427a972179be87d40fc08d5e795 --- M package.json 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo refs/changes/03/243503/1 diff --git a/package.json b/package.json index 30a882b..fe03ba1 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "grunt-contrib-jshint": "0.11.3", "grunt-contrib-watch": "0.6.1", "grunt-banana-checker": "0.2.2", - "grunt-jscs": "1.8.0", + "grunt-jscs": "2.1.0", "jshint": "2.8.0", "grunt-jsonlint": "1.0.4" } -- To view, visit https://gerrit.wikimedia.org/r/243503 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1e4f5d444dd46427a972179be87d40fc08d5e795 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: Paladox___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] proofreadpage.py: add ProofreadPage.index property and other... - change (pywikibot/core)
Mpaa has uploaded a new change for review. https://gerrit.wikimedia.org/r/243489 Change subject: proofreadpage.py: add ProofreadPage.index property and other methods .. proofreadpage.py: add ProofreadPage.index property and other methods Add: - ProofreadPage.index property to get Index page containing the page - IndexPage.page_generator() to load pages related to an Index page in specified page range (filters are available for quality level and page existance) - IndexPage.get_number() to get page number of a page Rename: - IndexPage.get_page_from_number() to get_page() Added and cleaned up docstrings. Added related tests. Change-Id: I9dab8c2e75dc27fe87500eac3202f14553525a82 --- M pywikibot/proofreadpage.py M tests/proofreadpage_tests.py 2 files changed, 160 insertions(+), 13 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/89/243489/1 diff --git a/pywikibot/proofreadpage.py b/pywikibot/proofreadpage.py index edc0060..602c95b 100644 --- a/pywikibot/proofreadpage.py +++ b/pywikibot/proofreadpage.py @@ -28,6 +28,8 @@ import pywikibot +from pywikibot.pagegenerators import PreloadingGenerator + class FullHeader(object): @@ -70,6 +72,11 @@ PROOFREAD = 3 VALIDATED = 4 +# Indicate if page is linked to no/several Index pages. +UNLINKED = 0 +LINKED = 1 +MULTILINKED = 2 + open_tag = '' close_tag = '' p_open = re.compile(r'') @@ -89,6 +96,48 @@ if self.namespace() != site.proofread_page_ns: raise ValueError('Page %s must belong to %s namespace' % (self.title(), ns)) + +@property +def index(self): +"""Get the Index page which contains ProofreadPage. + +To force reload, delete index and call it again. + +Returns: +None: if ProofreadPage is linked to no or several Index pages. +IndexPage: if ProofreadPage is linked to one Index page. +""" +if not hasattr(self, '_index'): +index_ns = self.site.proofread_index_ns +what_links_here = list(self.getReferences(namespaces=index_ns)) +if not what_links_here: +self._index = (self.UNLINKED, None) +elif len(what_links_here) > 1: +self._index = (self.MULTILINKED, what_links_here) +else: +self._index = (self.LINKED, IndexPage(what_links_here[0])) + +status, page = self._index +if status == self.UNLINKED: +pywikibot.warning('Page %s is not linked to any Index page' + % self) +elif status == self.MULTILINKED: +pywikibot.warning('Page %s is linked to several Index pages: %s' + % (self, page)) +else: +return page + +@index.setter +def index(self, value): +if not isinstance(value, IndexPage): +raise ValueError('value %s must be a IndexPage object.' + % value) +self._index = (self.LINKED, value) + +@index.deleter +def index(self): +if hasattr(self, "_index"): +del self._index def decompose(fn): """Decorator. @@ -347,6 +396,13 @@ on de wikisource). page label is the label associated with a page in the Index page. +This class provides methods to get pages contained in Index page, +and relative page numbers and labels by means of several helper +functions. + +It also providesa generator to pages contained in Index page, with +possibility to define range, filter by quality levels and page existance. + Raises UnknownExtension if source Site has no ProofreadPage Extension. """ # Check if BeautifulSoup is imported. @@ -393,6 +449,7 @@ title = a_tag.get('title') page = ProofreadPage(self.site, title) +page.index = self # set index property for page if page not in self._all_page_links: raise pywikibot.Error('Page %s not recognised.' % page) @@ -434,6 +491,41 @@ self._get_page_mappings() return len(self._page_from_numbers) +def page_generator(self, start=1, end=None, filter_ql=None, + only_existing=False, preload=True): +"""Return a page generator which yields pages contained in Index page. + +@param start: first page +@type start: int +@param end: last page (num_pages if end is greater than num_pages) +@type end: int +@param filter_ql: filters quality levels (default: all but Without Text). +@type filter_ql: list of ints (corresponding to ql constants + defined in ProofreadPage). +@param only_exist: yields only existing pages. +@type only_exist: bool +""" +
[MediaWiki-commits] [Gerrit] New Wikidata Build - 2015-10-04T10:00:01+0000 - change (mediawiki...Wikidata)
WikidataBuilder has uploaded a new change for review. https://gerrit.wikimedia.org/r/243493 Change subject: New Wikidata Build - 2015-10-04T10:00:01+ .. New Wikidata Build - 2015-10-04T10:00:01+ Change-Id: I2e7f35d6b80d41bb9661aade4535e4b5c4668ef5 --- M composer.lock M extensions/ExternalValidation/i18n/fr.json M extensions/ExternalValidation/includes/CrossCheck/Comparer/TimeValueComparer.php M extensions/ExternalValidation/tests/phpunit/CrossCheck/Comparer/TimeValueComparerTest.php M extensions/Quality/Gruntfile.js M extensions/Quality/README.md M extensions/Quality/package.json M extensions/Wikibase/client/i18n/nb.json M extensions/Wikibase/lib/i18n/gu.json M extensions/Wikibase/lib/i18n/nb.json M extensions/Wikibase/repo/i18n/be-tarask.json M extensions/Wikibase/repo/i18n/cs.json M extensions/Wikibase/repo/i18n/fr.json M extensions/Wikibase/repo/i18n/he.json M extensions/Wikibase/repo/i18n/min.json M extensions/Wikibase/repo/i18n/qqq.json M extensions/Wikibase/repo/i18n/zh-hans.json M extensions/Wikibase/repo/resources/wikibase.special/wikibase.special.languageLabelDescriptionAliases.js M extensions/Wikibase/repo/tests/phpunit/includes/content/ItemContentTest.php M vendor/composer/installed.json 20 files changed, 224 insertions(+), 215 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikidata refs/changes/93/243493/1 diff --git a/composer.lock b/composer.lock index 39cb028..04ed863 100644 --- a/composer.lock +++ b/composer.lock @@ -1187,7 +1187,7 @@ "source": { "type": "git", "url": "https://gerrit.wikimedia.org/r/mediawiki/extensions/WikibaseQualityExternalValidation;, -"reference": "dd9bc4f8eac8caa0a102c02c51581470fb17bec2" +"reference": "ad4741945ddb1ed9f5cd02106ff7484fa0d3ec37" }, "require": { "php": ">=5.3.0", @@ -1235,7 +1235,7 @@ "support": { "issues": "https://phabricator.wikimedia.org/project/profile/1203/; }, -"time": "2015-10-02 21:51:36" +"time": "2015-10-04 09:34:39" }, { "name": "wikibase/internal-serialization", @@ -1348,7 +1348,7 @@ "source": { "type": "git", "url": "https://gerrit.wikimedia.org/r/mediawiki/extensions/WikibaseQuality;, -"reference": "08bbfb83c2f91aa14fd6e501a7cc6c85e63b284d" +"reference": "a77e551ff7bdb0ca3f676fa810d2f9ceeabf0a1d" }, "require": { "php": ">=5.3.0", @@ -1392,7 +1392,7 @@ "support": { "issues": "https://phabricator.wikimedia.org/project/profile/989/; }, -"time": "2015-10-02 11:58:35" +"time": "2015-10-04 06:30:15" }, { "name": "wikibase/serialization-javascript", @@ -1441,12 +1441,12 @@ "source": { "type": "git", "url": "https://github.com/wikimedia/mediawiki-extensions-Wikibase.git;, -"reference": "298a5a0ae8fbfa7e5ad8ab3e14935aaef5cb0774" +"reference": "e3faedc21981abc17a0489fd7890b438c4a1b7c3" }, "dist": { "type": "zip", -"url": "https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/298a5a0ae8fbfa7e5ad8ab3e14935aaef5cb0774;, -"reference": "298a5a0ae8fbfa7e5ad8ab3e14935aaef5cb0774", +"url": "https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/e3faedc21981abc17a0489fd7890b438c4a1b7c3;, +"reference": "e3faedc21981abc17a0489fd7890b438c4a1b7c3", "shasum": "" }, "require": { @@ -1515,7 +1515,7 @@ "wikibaserepo", "wikidata" ], -"time": "2015-10-02 21:51:33" +"time": "2015-10-03 20:14:52" }, { "name": "wikibase/wikimedia-badges", diff --git a/extensions/ExternalValidation/i18n/fr.json b/extensions/ExternalValidation/i18n/fr.json index d0fb7d4..e9598b2 100644 --- a/extensions/ExternalValidation/i18n/fr.json +++ b/extensions/ExternalValidation/i18n/fr.json @@ -8,7 +8,7 @@ "Orlodrim" ] }, - "wbqev-desc": "Vérifie les données par croisement avec des bases de données externes", + "wbqev-desc": "Vérifier les données par croisement avec des bases de données externes", "wbqev-crosscheck": "Recoupement avec des bases de données externes", "wbqev-crosscheck-explanation-general": "Cette page spéciale effectue des contrôles croisés entre les éléments de Wikidata et des bases de données externes. Vous pouvez vérifier les bases de données que nous utilisons sur la page
[MediaWiki-commits] [Gerrit] Fix some old code leftovers - change (mediawiki...Flow)
Matthias Mullie has uploaded a new change for review. https://gerrit.wikimedia.org/r/243497 Change subject: Fix some old code leftovers .. Fix some old code leftovers This class was refactored in Ideaba2a1431c4dca10e8706536db30f410930ed0 but some minor bits and pieces were left behind. They're not breaking anything, though. This is just some small cleanup. Change-Id: I00f12c028a75125db968f8676c745db12a87d27e --- M includes/Data/Index/PostRevisionTopicHistoryIndex.php M includes/Data/Storage/PostRevisionTopicHistoryStorage.php 2 files changed, 10 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/97/243497/1 diff --git a/includes/Data/Index/PostRevisionTopicHistoryIndex.php b/includes/Data/Index/PostRevisionTopicHistoryIndex.php index 301777b..c7e7ab1 100644 --- a/includes/Data/Index/PostRevisionTopicHistoryIndex.php +++ b/includes/Data/Index/PostRevisionTopicHistoryIndex.php @@ -24,42 +24,42 @@ } /** -* @param PostRevision|PostSummary $object +* @param PostRevision $object * @param array $row */ public function cachePurge( $object, array $row ) { - $row['topic_root_id'] = $this->findTopicId( $object, array() ); + $row['topic_root_id'] = $this->findTopicId( $object ); parent::cachePurge( $object, $row ); } /** -* @param PostRevision|PostSummary $object +* @param PostRevision $object * @param string[] $new * @param array $metadata */ public function onAfterInsert( $object, array $new, array $metadata ) { - $new['topic_root_id'] = $this->findTopicId( $object, $metadata ); + $new['topic_root_id'] = $this->findTopicId( $object ); parent::onAfterInsert( $object, $new, $metadata ); } /** -* @param PostRevision|PostSummary $object +* @param PostRevision $object * @param string[] $old * @param string[] $new * @param array $metadata */ public function onAfterUpdate( $object, array $old, array $new, array $metadata ) { - $old['topic_root_id'] = $new['topic_root_id'] = $this->findTopicId( $object, $metadata ); + $old['topic_root_id'] = $new['topic_root_id'] = $this->findTopicId( $object ); parent::onAfterUpdate( $object, $old, $new, $metadata ); } /** -* @param PostRevision|PostSummary $object +* @param PostRevision $object * @param string[] $old * @param array $metadata */ public function onAfterRemove( $object, array $old, array $metadata ) { - $old['topic_root_id'] = $this->findTopicId( $object, $metadata ); + $old['topic_root_id'] = $this->findTopicId( $object ); parent::onAfterRemove( $object, $old, $metadata ); } @@ -67,7 +67,7 @@ * Finds topic ID for given Post * * @param PostRevision $post -* return UUID Topic ID +* @return UUID Topic ID */ protected function findTopicId( PostRevision $post ) { return $post->getRootPost()->getPostId(); diff --git a/includes/Data/Storage/PostRevisionTopicHistoryStorage.php b/includes/Data/Storage/PostRevisionTopicHistoryStorage.php index d1ffb0a..ec2da39 100644 --- a/includes/Data/Storage/PostRevisionTopicHistoryStorage.php +++ b/includes/Data/Storage/PostRevisionTopicHistoryStorage.php @@ -8,7 +8,7 @@ use Flow\Repository\TreeRepository; /** - * Query-only storage implementation providess history of all post revisions in a topic. + * Query-only storage implementation provides history of all post revisions in a topic. */ class PostRevisionTopicHistoryStorage implements ObjectStorage { -- To view, visit https://gerrit.wikimedia.org/r/243497 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I00f12c028a75125db968f8676c745db12a87d27e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Matthias Mullie___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Follow-up I553e31: Don't show error for non-rendered GCNs - change (VisualEditor/VisualEditor)
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/243499 Change subject: Follow-up I553e31: Don't show error for non-rendered GCNs .. Follow-up I553e31: Don't show error for non-rendered GCNs To avoid all issues with generatedContextValid meaning 'true' when it is undefined or null, invert it to '..Invalid' which is only true when we know we have a GCN which has rendered and failed validation. Also always perform this check, even on first render as the node may load in an error state. Bug: T114527 Change-Id: Ia08d8e7b74e37edc5e73b2ed8adc8ece90764ada --- M src/ce/nodes/ve.ce.GeneratedContentNode.js M src/ce/ve.ce.FocusableNode.js 2 files changed, 4 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/99/243499/1 diff --git a/src/ce/nodes/ve.ce.GeneratedContentNode.js b/src/ce/nodes/ve.ce.GeneratedContentNode.js index 3bb5cb3..444eb65 100644 --- a/src/ce/nodes/ve.ce.GeneratedContentNode.js +++ b/src/ce/nodes/ve.ce.GeneratedContentNode.js @@ -15,7 +15,7 @@ ve.ce.GeneratedContentNode = function VeCeGeneratedContentNode() { // Properties this.generatingPromise = null; - this.generatedContentsValid = false; + this.generatedContentsInvalid = null; this.generatedContentsFirstRender = true; // Events @@ -145,11 +145,11 @@ this.emit( 'teardown' ); } $newElements = $( this.getRenderedDomElements( ve.copyDomElements( generatedContents ) ) ); + this.generatedContentsInvalid = !this.validateGeneratedContents( $( generatedContents ) ); // Render if this is the first time rendering, regardless of whether there is an error; otherwise only // render if there is no error - if ( this.generatedContentsFirstRender || this.validateGeneratedContents( $( generatedContents ) ) ) { + if ( this.generatedContentsFirstRender || !this.generatedContentsInvalid ) { this.generatedContentsFirstRender = false; - this.generatedContentsValid = true; if ( !this.$element[ 0 ].parentNode ) { // this.$element hasn't been attached yet, so just overwrite it this.$element = $newElements; @@ -159,8 +159,6 @@ this.$element.remove(); this.$element = $newElements; } - } else { - this.generatedContentsValid = false; } // Update focusable and resizable elements if necessary diff --git a/src/ce/ve.ce.FocusableNode.js b/src/ce/ve.ce.FocusableNode.js index 293ea2f..bc59eca 100644 --- a/src/ce/ve.ce.FocusableNode.js +++ b/src/ce/ve.ce.FocusableNode.js @@ -80,8 +80,7 @@ * @return {jQuery} A highlight element */ ve.ce.FocusableNode.prototype.createHighlight = function () { - // For GCNs check this.generatedContentsValid; for non-GCNs it is undefined (and therefore falsey) - var extraClasses = ( this.generatedContentsValid === undefined || this.generatedContentsValid ) ? '' : ' ve-ce-focusableNode-highlight-error'; + var extraClasses = this.generatedContentsInvalid ? ' ve-ce-focusableNode-highlight-error' : ''; return $( '' ) .addClass( 've-ce-focusableNode-highlight' + extraClasses ) .prop( { -- To view, visit https://gerrit.wikimedia.org/r/243499 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia08d8e7b74e37edc5e73b2ed8adc8ece90764ada Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] deprecated and simpleemptycheck added - change (pywikibot/core)
Rajdeep05 has uploaded a new change for review. https://gerrit.wikimedia.org/r/243487 Change subject: deprecated and simpleemptycheck added .. deprecated and simpleemptycheck added Change-Id: Ib53708cbd5bf2aa92846370a917a14256ff64df9 --- M pywikibot/page.py M scripts/interwiki.py 2 files changed, 9 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/87/243487/1 diff --git a/pywikibot/page.py b/pywikibot/page.py index ec7430a..20df100 100644 --- a/pywikibot/page.py +++ b/pywikibot/page.py @@ -738,7 +738,7 @@ if self.isCategoryRedirect(): return Category(Link(self._catredirect, self.site)) raise pywikibot.IsNotRedirectPage(self) - +@@deprecated('') def isEmpty(self): """Return True if the page text has less than 4 characters. diff --git a/scripts/interwiki.py b/scripts/interwiki.py index 5cd4406..6af4dc0 100755 --- a/scripts/interwiki.py +++ b/scripts/interwiki.py @@ -2441,6 +2441,14 @@ return False return True +def simpleEmptyCheck(page): +try: +# get the 50th character, if it exists +page.text[50] +return False +except IndexError: +return True + def readWarnfile(filename, bot): import warnfile -- To view, visit https://gerrit.wikimedia.org/r/243487 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib53708cbd5bf2aa92846370a917a14256ff64df9 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Rajdeep05___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove redundant argument - change (mediawiki...WikibaseQualityExternalValidation)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/243490 Change subject: Remove redundant argument .. Remove redundant argument Change-Id: Ia74a7b828945e38578885e64d8c2b676695e5eae --- M includes/CrossCheck/Comparer/TimeValueComparer.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikibaseQualityExternalValidation refs/changes/90/243490/1 diff --git a/includes/CrossCheck/Comparer/TimeValueComparer.php b/includes/CrossCheck/Comparer/TimeValueComparer.php index 2ea130c..04117e8 100644 --- a/includes/CrossCheck/Comparer/TimeValueComparer.php +++ b/includes/CrossCheck/Comparer/TimeValueComparer.php @@ -46,7 +46,7 @@ // FIXME: MWTimestamp does not support years with more than 4 digits! $localTimestamp = new MWTimestamp( substr( $value->getTime(), 1 ) ); $externalTimestamp = new MWTimestamp( substr( $comparativeValue->getTime(), 1 ) ); - $diff = $localTimestamp->diff( $externalTimestamp, true ); + $diff = $localTimestamp->diff( $externalTimestamp ); if ( $value->getPrecision() === $comparativeValue->getPrecision() && $this->resultOfDiffWithPrecision( $diff, $value->getPrecision() ) -- To view, visit https://gerrit.wikimedia.org/r/243490 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia74a7b828945e38578885e64d8c2b676695e5eae Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikibaseQualityExternalValidation Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add critical tests to TimeValueComparer - change (mediawiki...WikibaseQualityExternalValidation)
jenkins-bot has submitted this change and it was merged. Change subject: Add critical tests to TimeValueComparer .. Add critical tests to TimeValueComparer Change-Id: I6b0a78789fb03c33f98b841cd294c49284d3a537 --- M includes/CrossCheck/Comparer/TimeValueComparer.php M tests/phpunit/CrossCheck/Comparer/TimeValueComparerTest.php 2 files changed, 78 insertions(+), 45 deletions(-) Approvals: Jeroen De Dauw: Looks good to me, approved jenkins-bot: Verified Objections: Hoo man: There's a problem with this change, please improve diff --git a/includes/CrossCheck/Comparer/TimeValueComparer.php b/includes/CrossCheck/Comparer/TimeValueComparer.php index 7b9e091..ea821a4 100644 --- a/includes/CrossCheck/Comparer/TimeValueComparer.php +++ b/includes/CrossCheck/Comparer/TimeValueComparer.php @@ -2,17 +2,17 @@ namespace WikibaseQuality\ExternalValidation\CrossCheck\Comparer; -use InvalidArgumentException; -use DateInterval; use DataValues\DataValue; use DataValues\TimeValue; +use DateInterval; +use InvalidArgumentException; +use MWTimestamp; +use TimestampException; use ValueParsers\ParserOptions; use ValueParsers\ValueParser; use Wikibase\Repo\Parsers\TimeParserFactory; use WikibaseQuality\ExternalValidation\CrossCheck\Result\ComparisonResult; use WikibaseQuality\ExternalValidation\DumpMetaInformation\DumpMetaInformation; -use MWTimestamp; -use TimestampException; /** * @package WikibaseQuality\ExternalValidation\CrossCheck\Comparer @@ -26,22 +26,31 @@ * * @param DataValue $value * @param DataValue $comparativeValue +* +* @throws InvalidArgumentException * @return string */ public function compare( DataValue $value, DataValue $comparativeValue ) { - if( !$this->canCompare( $value, $comparativeValue ) ) { + if ( !$this->canCompare( $value, $comparativeValue ) ) { throw new InvalidArgumentException( 'Given values can not be compared using this comparer.' ); } + + /** +* @var TimeValue $value +* @var TimeValue $comparativeValue +*/ $result = ComparisonResult::STATUS_MISMATCH; try { - $localTimestamp = new MWTimestamp(substr($value->getTime(), 1)); - $externalTimestamp = new MWTimestamp(substr($comparativeValue->getTime(), 1)); - $diff = $localTimestamp->diff( $externalTimestamp ); + // FIXME: MWTimestamp does not support years with more than 4 digits! + $localTimestamp = new MWTimestamp( substr( $value->getTime(), 1 ) ); + $externalTimestamp = new MWTimestamp( substr( $comparativeValue->getTime(), 1 ) ); + $diff = $localTimestamp->diff( $externalTimestamp, true ); if ( $value->getPrecision() === $comparativeValue->getPrecision() - && $this->resultOfDiffWithPrecision( $diff, $value->getPrecision() ) ) { + && $this->resultOfDiffWithPrecision( $diff, $value->getPrecision() ) + ) { $result = ComparisonResult::STATUS_MATCH; } elseif ( $this->resultOfDiffWithPrecision( @@ -51,7 +60,8 @@ ) { $result = ComparisonResult::STATUS_PARTIAL_MATCH; } - } catch ( TimestampException $e ){ } + } catch ( TimestampException $ex ) { + } return $result; } @@ -64,11 +74,13 @@ * * @return bool */ - private function resultOfDiffWithPrecision( $diff, $precision ) { + private function resultOfDiffWithPrecision( DateInterval $diff, $precision ) { $result = true; + switch ( $precision ) { case TimeValue::PRECISION_MINUTE: $result = $result && $diff->i === 0; + // Fall through with no break/return. This is critical for this algorithm. case TimeValue::PRECISION_HOUR: $result = $result && $diff->h === 0; case TimeValue::PRECISION_DAY: @@ -77,23 +89,23 @@ $result = $result && $diff->m === 0; case TimeValue::PRECISION_YEAR: $result = $result && $diff->y === 0; - case TimeValue::PRECISION_10a: + case TimeValue::PRECISION_YEAR10: $result = $result && $diff->y < 10; - case TimeValue::PRECISION_100a: +
[MediaWiki-commits] [Gerrit] distutils build_modules requires str on Python 2 - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: distutils build_modules requires str on Python 2 .. distutils build_modules requires str on Python 2 When setup parameter packages contains unicode, distutils fails with: TypeError: 'package' must be a string (dot-separated), list, or tuple Bug: T114487 Change-Id: Ibf70fb66f001b6d11b99c21904ed22015452b421 --- M setup.py 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: XZise: Looks good to me, approved jenkins-bot: Verified diff --git a/setup.py b/setup.py index fe4b1b1..9441c84 100644 --- a/setup.py +++ b/setup.py @@ -190,9 +190,9 @@ maintainer='The Pywikibot team', maintainer_email='pywiki...@lists.wikimedia.org', license='MIT License', -packages=['pywikibot'] + [package - for package in find_packages() - if package.startswith('pywikibot.')], +packages=[str(name)] + [package +for package in find_packages() +if package.startswith('pywikibot.')], install_requires=dependencies, dependency_links=dependency_links, extras_require=extra_deps, -- To view, visit https://gerrit.wikimedia.org/r/243362 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibf70fb66f001b6d11b99c21904ed22015452b421 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: John VandenbergGerrit-Reviewer: Ladsgroup Gerrit-Reviewer: XZise Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] @@deprecated is changed to single @ - change (pywikibot/core)
Rajdeep05 has uploaded a new change for review. https://gerrit.wikimedia.org/r/243495 Change subject: @@deprecated is changed to single @ .. @@deprecated is changed to single @ Change-Id: I0829c021f48b9804d71c2008b143ffaba7906274 --- M pywikibot/page.py 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/95/243495/1 diff --git a/pywikibot/page.py b/pywikibot/page.py index 20df100..20256c8 100644 --- a/pywikibot/page.py +++ b/pywikibot/page.py @@ -738,7 +738,7 @@ if self.isCategoryRedirect(): return Category(Link(self._catredirect, self.site)) raise pywikibot.IsNotRedirectPage(self) -@@deprecated('') +@deprecated('') def isEmpty(self): """Return True if the page text has less than 4 characters. -- To view, visit https://gerrit.wikimedia.org/r/243495 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0829c021f48b9804d71c2008b143ffaba7906274 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Rajdeep05___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [FIX] Don't stop iterators using StopIteration - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: [FIX] Don't stop iterators using StopIteration .. [FIX] Don't stop iterators using StopIteration With PEP 479 [1] it has been discouraged that a generator is stopped using `StopIteration`. Instead if should just return from the function or method. With 3.7 it'll convert that `StopIteration` into `RuntimeError` while 3.5 and 3.6 only issue deprecation warnings. [1]: https://www.python.org/dev/peps/pep-0479/ Bug: T106224 Change-Id: I2743962594bc099dfeabc6f88d3654b178fb024d --- M pywikibot/pagegenerators.py M pywikibot/tools/__init__.py 2 files changed, 7 insertions(+), 4 deletions(-) Approvals: John Vandenberg: Looks good to me, approved jenkins-bot: Verified diff --git a/pywikibot/pagegenerators.py b/pywikibot/pagegenerators.py index d9a4ead..2263ed5 100644 --- a/pywikibot/pagegenerators.py +++ b/pywikibot/pagegenerators.py @@ -1685,7 +1685,7 @@ while True: page_count = min(len(generator), step) if not page_count: -raise StopIteration +return for page in PreloadingGenerator(generator, page_count): yield page diff --git a/pywikibot/tools/__init__.py b/pywikibot/tools/__init__.py index ce07b8d..4ce740c 100644 --- a/pywikibot/tools/__init__.py +++ b/pywikibot/tools/__init__.py @@ -786,9 +786,12 @@ add = container_setitem for item in iterable: -if (key(item) if key else item) not in container: -add(item) -yield item +try: +if (key(item) if key else item) not in container: +add(item) +yield item +except StopIteration: +return class CombinedError(KeyError, IndexError): -- To view, visit https://gerrit.wikimedia.org/r/242409 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2743962594bc099dfeabc6f88d3654b178fb024d Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: XZiseGerrit-Reviewer: John Vandenberg Gerrit-Reviewer: Ladsgroup Gerrit-Reviewer: XZise Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Toolbar config: Prevent 'Table' from moving after menu expand - change (mediawiki...VisualEditor)
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/243504 Change subject: Toolbar config: Prevent 'Table' from moving after menu expand .. Toolbar config: Prevent 'Table' from moving after menu expand Change-Id: I9f472668e0cf8f3014c681f6f2430e685bf50534 --- M modules/ve-mw/init/ve.init.mw.Target.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/04/243504/1 diff --git a/modules/ve-mw/init/ve.init.mw.Target.js b/modules/ve-mw/init/ve.init.mw.Target.js index a171d35..de9fe07 100644 --- a/modules/ve-mw/init/ve.init.mw.Target.js +++ b/modules/ve-mw/init/ve.init.mw.Target.js @@ -206,7 +206,7 @@ indicator: 'down', include: '*', forceExpand: [ 'media', 'transclusion', 'insertTable' ], - promote: [ 'media', 'transclusion' ] + promote: [ 'media', 'transclusion', 'insertTable' ] }, // Table { -- To view, visit https://gerrit.wikimedia.org/r/243504 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9f472668e0cf8f3014c681f6f2430e685bf50534 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Find and replace: Add pref keys for find/replace text inputs - change (mediawiki...VisualEditor)
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/243505 Change subject: Find and replace: Add pref keys for find/replace text inputs .. Find and replace: Add pref keys for find/replace text inputs Adds support for storing find and replace text inputs added in core in I8ae8d49. Change-Id: I78dea87025e2bfa1b3ff977b16986e8431ddfb22 --- M VisualEditor.hooks.php 1 file changed, 7 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/05/243505/1 diff --git a/VisualEditor.hooks.php b/VisualEditor.hooks.php index d499960..111cf8f 100644 --- a/VisualEditor.hooks.php +++ b/VisualEditor.hooks.php @@ -342,18 +342,13 @@ 'default' => $user->getOption( 'visualeditor-betatempdisable' ) || $user->getOption( 'visualeditor-autodisable' ) ); - $preferences['visualeditor-autodisable'] = array( - 'type' => 'api' - ); - $preferences['visualeditor-hidebetawelcome'] = array( - 'type' => 'api' - ); - $preferences['visualeditor-findAndReplace-regex'] = array( - 'type' => 'api' - ); - $preferences['visualeditor-findAndReplace-matchCase'] = array( - 'type' => 'api' - ); + $api = array( 'type' => 'api' ); + $preferences['visualeditor-autodisable'] = $api; + $preferences['visualeditor-hidebetawelcome'] = $api; + $preferences['visualeditor-findAndReplace-findText'] = $api; + $preferences['visualeditor-findAndReplace-replaceText'] = $api; + $preferences['visualeditor-findAndReplace-regex'] = $api; + $preferences['visualeditor-findAndReplace-matchCase'] = $api; return true; } -- To view, visit https://gerrit.wikimedia.org/r/243505 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I78dea87025e2bfa1b3ff977b16986e8431ddfb22 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Space added according to convention - change (mediawiki/core)
Saptak013 has uploaded a new change for review. https://gerrit.wikimedia.org/r/243480 Change subject: Space added according to convention .. Space added according to convention Change-Id: I406fd2251981aa942e73e6ebba94ca279b30dd9d --- M includes/skins/Skin.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/80/243480/1 diff --git a/includes/skins/Skin.php b/includes/skins/Skin.php index 33559ed..d7b088d 100644 --- a/includes/skins/Skin.php +++ b/includes/skins/Skin.php @@ -918,7 +918,7 @@ } if ( $url ) { global $wgExternalLinkTarget; - $html = Html::rawElement( 'a', array( "href" => $url, "target" => $wgExternalLinkTarget), $html ); + $html = Html::rawElement( 'a', array( "href" => $url, "target" => $wgExternalLinkTarget ), $html ); } } return $html; -- To view, visit https://gerrit.wikimedia.org/r/243480 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I406fd2251981aa942e73e6ebba94ca279b30dd9d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Saptak013___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Updated BagOStuff subclass to implement getWithToken() - change (mediawiki...Flow)
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/243481 Change subject: Updated BagOStuff subclass to implement getWithToken() .. Updated BagOStuff subclass to implement getWithToken() Change-Id: I7ca44e6ba7f7c6eb87a1526fd6e27c15107d2b68 --- M includes/Data/BagOStuff/BufferedBagOStuff.php M includes/Data/BagOStuff/LocalBufferedBagOStuff.php 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/81/243481/1 diff --git a/includes/Data/BagOStuff/BufferedBagOStuff.php b/includes/Data/BagOStuff/BufferedBagOStuff.php index 63375bf..27c51bc 100644 --- a/includes/Data/BagOStuff/BufferedBagOStuff.php +++ b/includes/Data/BagOStuff/BufferedBagOStuff.php @@ -91,7 +91,7 @@ * @param int $flags [optional] * @return bool|mixed */ - public function get( $key, &$casToken = null, $flags = 0 ) { + protected function getWithToken( $key, &$casToken = null, $flags = 0 ) { if ( !isset( $this->bag[$key] ) ) { // Unknown in local cache = fetch from source cache $value = $this->cache->get( $key, $casToken ); diff --git a/includes/Data/BagOStuff/LocalBufferedBagOStuff.php b/includes/Data/BagOStuff/LocalBufferedBagOStuff.php index 22ae4ac..74b0bc1 100644 --- a/includes/Data/BagOStuff/LocalBufferedBagOStuff.php +++ b/includes/Data/BagOStuff/LocalBufferedBagOStuff.php @@ -18,7 +18,7 @@ return array_key_exists( $key, $this->bag ); } - public function get( $key, &$casToken = null, $flags = 0 ) { + protected function getWithToken( $key, &$casToken = null, $flags = 0 ) { $value = parent::get( $key, $casToken ); $this->bag[$key] = array( $value, 0 ); return $value; -- To view, visit https://gerrit.wikimedia.org/r/243481 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7ca44e6ba7f7c6eb87a1526fd6e27c15107d2b68 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Aaron Schulz___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Clean up BagOStuff:get() interface - change (mediawiki/core)
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/243482 Change subject: Clean up BagOStuff:get() interface .. Clean up BagOStuff:get() interface * Callers of get() no longer have to content with the annoying $casToken parameter, which is there but totally unusable to non-BagOStuff code. * The default get() now delegates to getWithToken(), which callers must implement instead. They can ignore the overhead of generating $casToken if they do not implement cas(), which applies to callers that use the stock merge(). * Also add BagOStuff::READ_LATEST to mergeViaCas() for sanity, as that missing before. Likewise with mergeViaLock(). Change-Id: I4efce6a9ab4b1eadd2f161dff641004a7239c516 --- M includes/libs/objectcache/APCBagOStuff.php M includes/libs/objectcache/BagOStuff.php M includes/libs/objectcache/EmptyBagOStuff.php M includes/libs/objectcache/HashBagOStuff.php M includes/libs/objectcache/ReplicatedBagOStuff.php M includes/libs/objectcache/WinCacheBagOStuff.php M includes/libs/objectcache/XCacheBagOStuff.php M includes/objectcache/MemcachedBagOStuff.php M includes/objectcache/MemcachedPeclBagOStuff.php M includes/objectcache/MultiWriteBagOStuff.php M includes/objectcache/RedisBagOStuff.php M includes/objectcache/SqlBagOStuff.php 12 files changed, 33 insertions(+), 22 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/82/243482/1 diff --git a/includes/libs/objectcache/APCBagOStuff.php b/includes/libs/objectcache/APCBagOStuff.php index 0dbbaba..4231265 100644 --- a/includes/libs/objectcache/APCBagOStuff.php +++ b/includes/libs/objectcache/APCBagOStuff.php @@ -34,10 +34,8 @@ **/ const KEY_SUFFIX = ':1'; - public function get( $key, &$casToken = null, $flags = 0 ) { + protected function getWithToken( $key, &$casToken = null, $flags = 0 ) { $val = apc_fetch( $key . self::KEY_SUFFIX ); - - $casToken = $val; return $val; } diff --git a/includes/libs/objectcache/BagOStuff.php b/includes/libs/objectcache/BagOStuff.php index ddbe8ea..6503274 100644 --- a/includes/libs/objectcache/BagOStuff.php +++ b/includes/libs/objectcache/BagOStuff.php @@ -88,12 +88,28 @@ /** * Get an item with the given key. Returns false if it does not exist. +* @param $key +* @param integer $flags Bitfield; supports READ_LATEST [optional] +* @param integer $oldFlags [unused] +* @return mixed Returns false on failure +*/ + public function get( $key, $flags = 0, $oldFlags = null ) { + // B/C for ( $key, &$casToken = null, $flags = 0 ) + $flags = is_int( $oldFlags ) ? $oldFlags : $flags; + $casToken = null; + + return $this->getWithToken( $key, $casToken, $flags ); + } + + /** +* @note: If cas() is not implemented, then $casToken can be ignored +* * @param string $key * @param mixed $casToken [optional] * @param integer $flags Bitfield; supports READ_LATEST [optional] * @return mixed Returns false on failure */ - abstract public function get( $key, &$casToken = null, $flags = 0 ); + abstract protected function getWithToken( $key, &$casToken = null, $flags = 0 ); /** * Set an item. @@ -145,7 +161,7 @@ do { $this->clearLastError(); $casToken = null; // passed by reference - $currentValue = $this->get( $key, $casToken ); + $currentValue = $this->getWithToken( $key, $casToken, BagOStuff::READ_LATEST ); if ( $this->getLastError() ) { return false; // don't spam retries (retry only on races) } @@ -200,7 +216,7 @@ } $this->clearLastError(); - $currentValue = $this->get( $key ); + $currentValue = $this->get( $key, BagOStuff::READ_LATEST ); if ( $this->getLastError() ) { $success = false; } else { diff --git a/includes/libs/objectcache/EmptyBagOStuff.php b/includes/libs/objectcache/EmptyBagOStuff.php index 55e84b0..4d1dd7f 100644 --- a/includes/libs/objectcache/EmptyBagOStuff.php +++ b/includes/libs/objectcache/EmptyBagOStuff.php @@ -27,7 +27,7 @@ * @ingroup Cache */ class EmptyBagOStuff extends BagOStuff { - public function get( $key, &$casToken = null, $flags = 0 ) { + protected function getWithToken( $key, &$casToken = null, $flags = 0 ) { return false; } diff --git a/includes/libs/objectcache/HashBagOStuff.php b/includes/libs/objectcache/HashBagOStuff.php index b685e41..a13f04b 100644 --- a/includes/libs/objectcache/HashBagOStuff.php +++
[MediaWiki-commits] [Gerrit] WikidataQuality → WikibaseQuality - change (mediawiki...WikibaseQuality)
Ricordisamoa has uploaded a new change for review. https://gerrit.wikimedia.org/r/243483 Change subject: WikidataQuality → WikibaseQuality .. WikidataQuality → WikibaseQuality Change-Id: I4bad799a39b93ab78f0c210e6fcfe607c6639f7e --- M README.md 1 file changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikibaseQuality refs/changes/83/243483/1 diff --git a/README.md b/README.md index 23dcdb3..5fa4323 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ -# Wikibase Quality [![Build Status](https://travis-ci.org/wikimedia/mediawiki-extensions-WikidataQuality.svg?branch=master)](https://travis-ci.org/wikimedia/mediawiki-extensions-WikidataQuality) [![Coverage Status](https://coveralls.io/repos/wikimedia/mediawiki-extensions-WikidataQuality/badge.svg)](https://coveralls.io/r/wikimedia/mediawiki-extensions-WikidataQuality) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/wikimedia/mediawiki-extensions-WikidataQuality/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/wikimedia/mediawiki-extensions-WikidataQuality/?branch=master) +# Wikibase Quality [![Build Status](https://travis-ci.org/wikimedia/mediawiki-extensions-WikibaseQuality.svg?branch=master)](https://travis-ci.org/wikimedia/mediawiki-extensions-WikibaseQuality) [![Coverage Status](https://coveralls.io/repos/wikimedia/mediawiki-extensions-WikibaseQuality/badge.svg)](https://coveralls.io/r/wikimedia/mediawiki-extensions-WikibaseQuality) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/wikimedia/mediawiki-extensions-WikibaseQuality/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/wikimedia/mediawiki-extensions-WikibaseQuality/?branch=master) This is the base extension for our Wikibase Quality extensions. It doesn't do anything without at least one complementary Wikibase Quality extension (listed below). There you can also find installation instructions. -[![Build Status](https://travis-ci.org/wikimedia/mediawiki-extensions-WikidataQualityConstraints.svg?branch=master)](https://travis-ci.org/wikimedia/mediawiki-extensions-WikidataQualityConstraints) - [WikidataQualityConstraints](https://github.com/wikimedia/mediawiki-extensions-WikidataQualityConstraints) +[![Build Status](https://travis-ci.org/wikimedia/mediawiki-extensions-WikibaseQualityConstraints.svg?branch=master)](https://travis-ci.org/wikimedia/mediawiki-extensions-WikibaseQualityConstraints) + [WikibaseQualityConstraints](https://github.com/wikimedia/mediawiki-extensions-WikibaseQualityConstraints) -[![Build Status](https://travis-ci.org/wikimedia/mediawiki-extensions-WikidataQualityExternalValidation.svg?branch=master)](https://travis-ci.org/wikimedia/mediawiki-extensions-WikidataQualityExternalValidation) - [WikidataQualityExternalValidation](https://github.com/wikimedia/mediawiki-extensions-WikidataQualityExternalValidation) \ No newline at end of file +[![Build Status](https://travis-ci.org/wikimedia/mediawiki-extensions-WikibaseQualityExternalValidation.svg?branch=master)](https://travis-ci.org/wikimedia/mediawiki-extensions-WikibaseQualityExternalValidation) + [WikibaseQualityExternalValidation](https://github.com/wikimedia/mediawiki-extensions-WikibaseQualityExternalValidation) -- To view, visit https://gerrit.wikimedia.org/r/243483 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4bad799a39b93ab78f0c210e6fcfe607c6639f7e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikibaseQuality Gerrit-Branch: master Gerrit-Owner: Ricordisamoa___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Footer icons modified to follow $wgExternalLinkTarget - change (mediawiki/core)
Saptak013 has uploaded a new change for review. https://gerrit.wikimedia.org/r/243484 Change subject: Footer icons modified to follow $wgExternalLinkTarget .. Footer icons modified to follow $wgExternalLinkTarget Change-Id: Ie3d30c4070e8d336b735bac0a389564ae6115234 --- M includes/skins/Skin.php 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/84/243484/1 diff --git a/includes/skins/Skin.php b/includes/skins/Skin.php index 4e6201c..d7b088d 100644 --- a/includes/skins/Skin.php +++ b/includes/skins/Skin.php @@ -917,7 +917,8 @@ $html = htmlspecialchars( $icon["alt"] ); } if ( $url ) { - $html = Html::rawElement( 'a', array( "href" => $url ), $html ); + global $wgExternalLinkTarget; + $html = Html::rawElement( 'a', array( "href" => $url, "target" => $wgExternalLinkTarget ), $html ); } } return $html; -- To view, visit https://gerrit.wikimedia.org/r/243484 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie3d30c4070e8d336b735bac0a389564ae6115234 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Saptak013___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Switch "npm test" to Grunt - change (mediawiki...WikibaseQualityConstraints)
Ricordisamoa has uploaded a new change for review. https://gerrit.wikimedia.org/r/243485 Change subject: Switch "npm test" to Grunt .. Switch "npm test" to Grunt Needed for integration with other Grunt-based linters such as grunt-banana-checker, etc. Like commit 4e269b733f60645ed88c035abd4e09258a385e8d for mediawiki/extensions/Wikibase and commit 08bbfb83c2f91aa14fd6e501a7cc6c85e63b284d for mediawiki/extensions/WikibaseQuality Change-Id: Ie28f4156b3c478995bd4621fe155822abda117aa --- A Gruntfile.js M package.json 2 files changed, 24 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikibaseQualityConstraints refs/changes/85/243485/1 diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 000..d931395 --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,19 @@ +/* jshint node: true, strict: false */ +module.exports = function ( grunt ) { + grunt.loadNpmTasks( 'grunt-contrib-jshint' ); + grunt.loadNpmTasks( 'grunt-jscs' ); + + grunt.initConfig( { + jshint: { + options: { + jshintrc: true + }, + all: '.' + }, + jscs: { + all: '.' + } + } ); + + grunt.registerTask( 'test', [ 'jshint', 'jscs' ] ); +}; diff --git a/package.json b/package.json index d260b86..cf665df 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "WikibaseQualityConstraints", "version": "0.0.0", "scripts": { - "test": "jshint . && jscs ." + "test": "grunt test" }, "repository": { "type": "git", @@ -11,7 +11,9 @@ "author": "BP2014N1", "license": "GPL-2.0+", "devDependencies": { - "jscs": ">=2.0", - "jshint": "" + "grunt": "0.4.5", + "grunt-cli": "0.1.13", + "grunt-contrib-jshint": "0.11.3", + "grunt-jscs": "2.1.0" } } -- To view, visit https://gerrit.wikimedia.org/r/243485 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie28f4156b3c478995bd4621fe155822abda117aa Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikibaseQualityConstraints Gerrit-Branch: master Gerrit-Owner: Ricordisamoa___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Switch "npm test" to Grunt - change (mediawiki...WikibaseQualityExternalValidation)
Ricordisamoa has uploaded a new change for review. https://gerrit.wikimedia.org/r/243486 Change subject: Switch "npm test" to Grunt .. Switch "npm test" to Grunt Needed for integration with other Grunt-based linters such as grunt-banana-checker, etc. Like commit 4e269b733f60645ed88c035abd4e09258a385e8d for mediawiki/extensions/Wikibase and commit 08bbfb83c2f91aa14fd6e501a7cc6c85e63b284d for mediawiki/extensions/WikibaseQuality Change-Id: Ibd4cea3b698b834ab6a1e83c2f0dbd6253a0 --- A Gruntfile.js M package.json 2 files changed, 25 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikibaseQualityExternalValidation refs/changes/86/243486/1 diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 000..d931395 --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,19 @@ +/* jshint node: true, strict: false */ +module.exports = function ( grunt ) { + grunt.loadNpmTasks( 'grunt-contrib-jshint' ); + grunt.loadNpmTasks( 'grunt-jscs' ); + + grunt.initConfig( { + jshint: { + options: { + jshintrc: true + }, + all: '.' + }, + jscs: { + all: '.' + } + } ); + + grunt.registerTask( 'test', [ 'jshint', 'jscs' ] ); +}; diff --git a/package.json b/package.json index b7ea5e1..dc9d960 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "WikibaseQualityExternalValidation", "version": "0.0.0", "scripts": { - "test": "jshint . && jscs ." + "test": "grunt test" }, "repository": { "type": "git", @@ -11,7 +11,9 @@ "author": "BP2014N1", "license": "GPL-2.0+", "devDependencies": { - "jscs": "", - "jshint": "" + "grunt": "0.4.5", + "grunt-cli": "0.1.13", + "grunt-contrib-jshint": "0.11.3", + "grunt-jscs": "2.1.0" } -} \ No newline at end of file +} -- To view, visit https://gerrit.wikimedia.org/r/243486 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibd4cea3b698b834ab6a1e83c2f0dbd6253a0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikibaseQualityExternalValidation Gerrit-Branch: master Gerrit-Owner: Ricordisamoa___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [IMPROV] nowcommons: Query at most one users - change (pywikibot/core)
Merlijn van Deen has uploaded a new change for review. https://gerrit.wikimedia.org/r/243507 Change subject: [IMPROV] nowcommons: Query at most one users .. [IMPROV] nowcommons: Query at most one users To verify if a page is used it's only necessary to query one using page instead of all. Conflicts: scripts/nowcommons.py Change-Id: I9bbb206ede1723c33410c3b50e05dae71ecc265f --- M scripts/nowcommons.py 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/07/243507/1 diff --git a/scripts/nowcommons.py b/scripts/nowcommons.py index b462ec7..3e4e5b7 100755 --- a/scripts/nowcommons.py +++ b/scripts/nowcommons.py @@ -369,9 +369,9 @@ oImageRobot.run() # If the image is used with the urlname the # previous function won't work -if len(list(pywikibot.FilePage(self.site, - page.title()).usingPages())) > 0 and \ - self.getOption('replaceloose'): +is_used = bool(list(pywikibot.FilePage( +self.site, page.title()).usingPages(total=1))) +if is_used and self.getOption('replaceloose'): oImageRobot = image.ImageRobot( pg.FileLinksGenerator( localImagePage), -- To view, visit https://gerrit.wikimedia.org/r/243507 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9bbb206ede1723c33410c3b50e05dae71ecc265f Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: 2.0 Gerrit-Owner: Merlijn van DeenGerrit-Reviewer: XZise ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update revId upon claim change - change (pywikibot/core)
Merlijn van Deen has uploaded a new change for review. https://gerrit.wikimedia.org/r/243515 Change subject: Update revId upon claim change .. Update revId upon claim change changeTarget, removeSources: Prevents edit conflicts addSources: No need to set every time through the loop Conflicts: pywikibot/page.py Change-Id: I2d8b69a3894aaf6d58a62ecba48f5dc584617e82 --- M pywikibot/page.py 1 file changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/15/243515/1 diff --git a/pywikibot/page.py b/pywikibot/page.py index 5be034b..ab6699a 100644 --- a/pywikibot/page.py +++ b/pywikibot/page.py @@ -4115,6 +4115,7 @@ **kwargs) # TODO: Re-create the entire item from JSON, not just id self.snak = data['claim']['id'] +self.on_item.latest_revision_id = data['pageinfo']['lastrevid'] def getTarget(self): """ @@ -4194,10 +4195,10 @@ @type claims: list of pywikibot.Claim """ data = self.repo.editSource(self, claims, new=True, **kwargs) +self.on_item.latest_revision_id = data['pageinfo']['lastrevid'] source = defaultdict(list) for claim in claims: claim.hash = data['reference']['hash'] -self.on_item.lastrevid = data['pageinfo']['lastrevid'] source[claim.getID()].append(claim) self.sources.append(source) @@ -4217,7 +4218,8 @@ @param sources: the sources to remove @type sources: list of pywikibot.Claim """ -self.repo.removeSources(self, sources, **kwargs) +data = self.repo.removeSources(self, sources, **kwargs) +self.on_item.latest_revision_id = data['pageinfo']['lastrevid'] for source in sources: source_dict = defaultdict(list) source_dict[source.getID()].append(source) -- To view, visit https://gerrit.wikimedia.org/r/243515 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2d8b69a3894aaf6d58a62ecba48f5dc584617e82 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: 2.0 Gerrit-Owner: Merlijn van DeenGerrit-Reviewer: Lokal Profil ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] New Wikidata Build - 2015-10-04T10:00:01+0000 - change (mediawiki...Wikidata)
jenkins-bot has submitted this change and it was merged. Change subject: New Wikidata Build - 2015-10-04T10:00:01+ .. New Wikidata Build - 2015-10-04T10:00:01+ Change-Id: I2e7f35d6b80d41bb9661aade4535e4b5c4668ef5 --- M composer.lock M extensions/ExternalValidation/i18n/fr.json M extensions/ExternalValidation/includes/CrossCheck/Comparer/TimeValueComparer.php M extensions/ExternalValidation/tests/phpunit/CrossCheck/Comparer/TimeValueComparerTest.php M extensions/Quality/Gruntfile.js M extensions/Quality/README.md M extensions/Quality/package.json M extensions/Wikibase/client/i18n/nb.json M extensions/Wikibase/lib/i18n/gu.json M extensions/Wikibase/lib/i18n/nb.json M extensions/Wikibase/repo/i18n/be-tarask.json M extensions/Wikibase/repo/i18n/cs.json M extensions/Wikibase/repo/i18n/fr.json M extensions/Wikibase/repo/i18n/he.json M extensions/Wikibase/repo/i18n/min.json M extensions/Wikibase/repo/i18n/qqq.json M extensions/Wikibase/repo/i18n/zh-hans.json M extensions/Wikibase/repo/resources/wikibase.special/wikibase.special.languageLabelDescriptionAliases.js M extensions/Wikibase/repo/tests/phpunit/includes/content/ItemContentTest.php M vendor/composer/installed.json 20 files changed, 224 insertions(+), 215 deletions(-) Approvals: Aude: Looks good to me, approved jenkins-bot: Verified diff --git a/composer.lock b/composer.lock index 39cb028..04ed863 100644 --- a/composer.lock +++ b/composer.lock @@ -1187,7 +1187,7 @@ "source": { "type": "git", "url": "https://gerrit.wikimedia.org/r/mediawiki/extensions/WikibaseQualityExternalValidation;, -"reference": "dd9bc4f8eac8caa0a102c02c51581470fb17bec2" +"reference": "ad4741945ddb1ed9f5cd02106ff7484fa0d3ec37" }, "require": { "php": ">=5.3.0", @@ -1235,7 +1235,7 @@ "support": { "issues": "https://phabricator.wikimedia.org/project/profile/1203/; }, -"time": "2015-10-02 21:51:36" +"time": "2015-10-04 09:34:39" }, { "name": "wikibase/internal-serialization", @@ -1348,7 +1348,7 @@ "source": { "type": "git", "url": "https://gerrit.wikimedia.org/r/mediawiki/extensions/WikibaseQuality;, -"reference": "08bbfb83c2f91aa14fd6e501a7cc6c85e63b284d" +"reference": "a77e551ff7bdb0ca3f676fa810d2f9ceeabf0a1d" }, "require": { "php": ">=5.3.0", @@ -1392,7 +1392,7 @@ "support": { "issues": "https://phabricator.wikimedia.org/project/profile/989/; }, -"time": "2015-10-02 11:58:35" +"time": "2015-10-04 06:30:15" }, { "name": "wikibase/serialization-javascript", @@ -1441,12 +1441,12 @@ "source": { "type": "git", "url": "https://github.com/wikimedia/mediawiki-extensions-Wikibase.git;, -"reference": "298a5a0ae8fbfa7e5ad8ab3e14935aaef5cb0774" +"reference": "e3faedc21981abc17a0489fd7890b438c4a1b7c3" }, "dist": { "type": "zip", -"url": "https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/298a5a0ae8fbfa7e5ad8ab3e14935aaef5cb0774;, -"reference": "298a5a0ae8fbfa7e5ad8ab3e14935aaef5cb0774", +"url": "https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/e3faedc21981abc17a0489fd7890b438c4a1b7c3;, +"reference": "e3faedc21981abc17a0489fd7890b438c4a1b7c3", "shasum": "" }, "require": { @@ -1515,7 +1515,7 @@ "wikibaserepo", "wikidata" ], -"time": "2015-10-02 21:51:33" +"time": "2015-10-03 20:14:52" }, { "name": "wikibase/wikimedia-badges", diff --git a/extensions/ExternalValidation/i18n/fr.json b/extensions/ExternalValidation/i18n/fr.json index d0fb7d4..e9598b2 100644 --- a/extensions/ExternalValidation/i18n/fr.json +++ b/extensions/ExternalValidation/i18n/fr.json @@ -8,7 +8,7 @@ "Orlodrim" ] }, - "wbqev-desc": "Vérifie les données par croisement avec des bases de données externes", + "wbqev-desc": "Vérifier les données par croisement avec des bases de données externes", "wbqev-crosscheck": "Recoupement avec des bases de données externes", "wbqev-crosscheck-explanation-general": "Cette page spéciale effectue des contrôles croisés entre les éléments de Wikidata et des bases de données externes. Vous pouvez vérifier les bases de données que nous utilisons sur la page spéciale.", "wbqev-crosscheck-explanation-detail": "Pour
[MediaWiki-commits] [Gerrit] Update DB size lists - change (operations/mediawiki-config)
Alex Monk has uploaded a new change for review. https://gerrit.wikimedia.org/r/243517 Change subject: Update DB size lists .. Update DB size lists Change-Id: I87cd9341634773881ca17a42641e1d3f4fe46973 --- M large.dblist M medium.dblist M small.dblist 3 files changed, 18 insertions(+), 17 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/17/243517/1 diff --git a/large.dblist b/large.dblist index 8b86a84..a76a703 100644 --- a/large.dblist +++ b/large.dblist @@ -9,9 +9,11 @@ enwiktionary eswiki fawiki +fiwiki frwiki frwikisource frwiktionary +huwiki idwiki incubatorwiki itwiki @@ -19,13 +21,13 @@ kowiki metawiki mgwiktionary -mkwiki nlwiki nowiki plwiki ptwiki rowiki ruwiki +ruwiktionary shwiki srwiki svwiki diff --git a/medium.dblist b/medium.dblist index f190273..9460608 100644 --- a/medium.dblist +++ b/medium.dblist @@ -17,6 +17,7 @@ azwiki azwikisource azwiktionary +azbwiki barwiki bat_smgwiki bawiki @@ -46,6 +47,7 @@ cowiki crhwiki cswiki +cswikiquote cswikisource cswiktionary cvwiki @@ -77,18 +79,20 @@ eswikinews eswikiquote eswikisource +eswikiversity eswiktionary etwiki etwikisource etwiktionary euwiki euwiktionary +fawikibooks fawikinews fawikiquote fawikisource fawikivoyage fawiktionary -fiwiki +fiwikibooks fiwikisource fiwiktionary fjwiktionary @@ -109,7 +113,9 @@ glwiki glwiktionary guwiki +guwikisource gvwiki +hakwiki hewiki hewikibooks hewikisource @@ -123,7 +129,6 @@ hrwiktionary hsbwiki htwiki -huwiki huwikibooks huwikisource huwiktionary @@ -166,6 +171,7 @@ kvwiki kywiki kywiktionary +labswiki ladwiki lawiki lawikisource @@ -187,6 +193,7 @@ mhrwiki minwiki miwiki +mkwiki mlwiki mlwikisource mlwiktionary @@ -249,7 +256,7 @@ ruwikiquote ruwikisource ruwikiversity -ruwiktionary +ruwikivoyage sahwiki sawiki sawikisource @@ -277,6 +284,7 @@ strategywiki suwiki svwikisource +svwikivoyage svwiktionary swwiki swwiktionary @@ -290,6 +298,7 @@ tewikisource tewiktionary tgwiki +tgwiktionary thwiki thwikisource thwiktionary @@ -308,6 +317,7 @@ uzwiki uzwiktionary vecwiki +vepwiki viwikisource viwiktionary vlswiki @@ -315,6 +325,8 @@ vowiktionary wawiki wawiktionary +wikimania2014wiki +wikimania2015wiki wuuwiki xmfwiki yiwiki diff --git a/small.dblist b/small.dblist index 2d85ee9..c28c93e 100644 --- a/small.dblist +++ b/small.dblist @@ -39,7 +39,6 @@ aywiktionary azwikibooks azwikiquote -azbwiki bawikibooks bdwikimedia bewikibooks @@ -100,7 +99,6 @@ csbwiktionary cswikibooks cswikinews -cswikiquote cswikiversity cuwiki cvwikibooks @@ -125,7 +123,6 @@ eowikinews eowikiquote eowikisource -eswikiversity eswikivoyage etwikibooks etwikimedia @@ -134,11 +131,9 @@ euwikiquote execwiki extwiki -fawikibooks fdcwiki ffwiki fiu_vrowiki -fiwikibooks fiwikimedia fiwikinews fiwikiquote @@ -166,10 +161,8 @@ grantswiki guwikibooks guwikiquote -guwikisource guwiktionary gvwiktionary -hakwiki hawiki hawiktionary hawwiki @@ -365,7 +358,6 @@ rswikimedia ruewiki ruwikimedia -ruwikivoyage rwwiki rwwiktionary sahwikisource @@ -417,7 +409,6 @@ svwikinews svwikiquote svwikiversity -svwikivoyage swwikibooks tawikibooks tawikiquote @@ -428,7 +419,6 @@ tewikibooks tewikiquote tgwikibooks -tgwiktionary thwikibooks thwikinews thwikiquote @@ -475,7 +465,6 @@ uzwikiquote vecwikisource vecwiktionary -vepwiki vewiki viwikibooks viwikiquote @@ -494,8 +483,6 @@ wikimania2011wiki wikimania2012wiki wikimania2013wiki -wikimania2014wiki -wikimania2015wiki wikimania2016wiki wikimaniateamwiki wowiki -- To view, visit https://gerrit.wikimedia.org/r/243517 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I87cd9341634773881ca17a42641e1d3f4fe46973 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Alex Monk___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update .jshintignore - change (mediawiki...Metrolook)
jenkins-bot has submitted this change and it was merged. Change subject: Update .jshintignore .. Update .jshintignore Change-Id: I7368f9552358d5fb859dc6cc047c059122a3a3c3 --- M .jshintignore M js/collapsibleNav.js 2 files changed, 4 insertions(+), 2 deletions(-) Approvals: Paladox: Looks good to me, approved jenkins-bot: Verified diff --git a/.jshintignore b/.jshintignore index 3c3629e..9836c42 100644 --- a/.jshintignore +++ b/.jshintignore @@ -1 +1,3 @@ node_modules + +js/overthrow.js diff --git a/js/collapsibleNav.js b/js/collapsibleNav.js index 01201c9..dd62e58 100644 --- a/js/collapsibleNav.js +++ b/js/collapsibleNav.js @@ -59,7 +59,7 @@ } $( function ( $ ) { - var $headings, tabIndex; + var $headings; /* General Portal Modification */ @@ -212,7 +212,7 @@ } $( function ( $ ) { - var $headings, tabIndex; + var $headings; /* General Portal Modification */ -- To view, visit https://gerrit.wikimedia.org/r/243519 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7368f9552358d5fb859dc6cc047c059122a3a3c3 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/skins/Metrolook Gerrit-Branch: master Gerrit-Owner: PaladoxGerrit-Reviewer: Paladox Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add grunt linting tasks - change (mediawiki...Score)
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/243523 Change subject: Add grunt linting tasks .. Add grunt linting tasks Change-Id: Ida8ec3de35d810ebb21176bf71359b16c0c29049 --- M Gruntfile.js M package.json 2 files changed, 40 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Score refs/changes/23/243523/1 diff --git a/Gruntfile.js b/Gruntfile.js index 9c56558..a2f24cf 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -1,10 +1,43 @@ /*jshint node:true */ module.exports = function ( grunt ) { + grunt.loadNpmTasks( 'grunt-contrib-csslint' ); + grunt.loadNpmTasks( 'grunt-contrib-jshint' ); + grunt.loadNpmTasks( 'grunt-contrib-watch' ); grunt.loadNpmTasks( 'grunt-banana-checker' ); grunt.loadNpmTasks( 'grunt-jsonlint' ); + grunt.loadNpmTasks( 'grunt-jscs' ); grunt.initConfig( { + jshint: { + options: { + jshintrc: true + }, + all: [ + '*.js', + 'js/*.js', + 'modules/ve-score/**/*.js' + ] + }, + jscs: { + src: '<%= jshint.all %>' + }, + csslint: { + options: { + csslintrc: '.csslintrc' + }, + all: 'modules/ve-score/**/*.css' + }, + watch: { + files: [ + '.{jscsrc,jshintignore,jshintrc}', + '<%= jshint.all %>' + ], + tasks: 'lint' + }, banana: { + options: { + disallowDuplicateTranslations: false + }, all: 'i18n/' }, jsonlint: { @@ -15,6 +48,7 @@ } } ); - grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] ); + grunt.registerTask( 'lint', [ 'jshint', 'jscs', 'jsonlint', 'csslint', 'banana' ] ); + grunt.registerTask( 'test', 'lint' ); grunt.registerTask( 'default', 'test' ); }; diff --git a/package.json b/package.json index 76e8a82..b6086db 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,11 @@ "devDependencies": { "grunt": "0.4.5", "grunt-cli": "0.1.13", -"grunt-banana-checker": "0.2.2", +"grunt-contrib-csslint": "0.5.0", +"grunt-contrib-jshint": "0.11.3", +"grunt-contrib-watch": "0.6.1", +"grunt-jscs": "2.1.0", +"grunt-banana-checker": "0.3.0", "grunt-jsonlint": "1.0.4" } } -- To view, visit https://gerrit.wikimedia.org/r/243523 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ida8ec3de35d810ebb21176bf71359b16c0c29049 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Score Gerrit-Branch: master Gerrit-Owner: Esanders___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Consistently use spaces inside brackets in CSS - change (mediawiki...Score)
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/243524 Change subject: Consistently use spaces inside brackets in CSS .. Consistently use spaces inside brackets in CSS Change-Id: I27adc2a003cbf7109d5b4193bf9f8b91bb5bd0f6 --- M modules/ve-score/ve.ui.MWScoreIcons.css 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Score refs/changes/24/243524/1 diff --git a/modules/ve-score/ve.ui.MWScoreIcons.css b/modules/ve-score/ve.ui.MWScoreIcons.css index 13188c7..081ddf3 100644 --- a/modules/ve-score/ve.ui.MWScoreIcons.css +++ b/modules/ve-score/ve.ui.MWScoreIcons.css @@ -7,5 +7,5 @@ .oo-ui-icon-score { /* @embed */ - background-image: url(score.svg); + background-image: url( score.svg ); } -- To view, visit https://gerrit.wikimedia.org/r/243524 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I27adc2a003cbf7109d5b4193bf9f8b91bb5bd0f6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Score Gerrit-Branch: master Gerrit-Owner: Esanders___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix ve.ce.Document HTML tests - change (VisualEditor/VisualEditor)
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/243511 Change subject: Fix ve.ce.Document HTML tests .. Fix ve.ce.Document HTML tests Currently we assume there is only one child of the body, fix this assumption and add some tests to use it. Change-Id: Ic41e504a162bd53077593b1cc0dcdc49feaab804 --- M tests/ce/ve.ce.Document.test.js M tests/dm/ve.dm.example.js 2 files changed, 11 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/11/243511/1 diff --git a/tests/ce/ve.ce.Document.test.js b/tests/ce/ve.ce.Document.test.js index 3469fb6..4c64886 100644 --- a/tests/ce/ve.ce.Document.test.js +++ b/tests/ce/ve.ce.Document.test.js @@ -28,8 +28,13 @@ view = new ve.ce.Document( model ); $documentElement = view.getDocumentNode().$element; // Simplify slugs - $documentElement.find( '.ve-ce-branchNode-slug' ).children().remove(); - assert.equalDomElement( $documentElement[ 0 ].firstChild, ve.createDocumentFromHtml( caseItem.ceHtml ).body.firstChild, msg ); + $documentElement.find( '.ve-ce-branchNode-slug' ).contents().remove(); + assert.equalDomElement( + // Wrap both in plain DIVs as we are only comparing the child nodes + $( '' ).append( $documentElement.contents() )[ 0 ], + $( '' ).append( ve.createDocumentFromHtml( caseItem.ceHtml ).body.childNodes )[ 0 ], + msg + ); } } } ); diff --git a/tests/dm/ve.dm.example.js b/tests/dm/ve.dm.example.js index 64a7b4b..f6e203b 100644 --- a/tests/dm/ve.dm.example.js +++ b/tests/dm/ve.dm.example.js @@ -3204,7 +3204,10 @@ { type: '/blockquote' }, { type: 'internalList' }, { type: '/internalList' } - ] + ], + ceHtml: '' + + 'Foo' + + 'Bar' } }; -- To view, visit https://gerrit.wikimedia.org/r/243511 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic41e504a162bd53077593b1cc0dcdc49feaab804 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Changes are wrongly detected in the last langlink - change (pywikibot/core)
Merlijn van Deen has uploaded a new change for review. https://gerrit.wikimedia.org/r/243514 Change subject: Changes are wrongly detected in the last langlink .. Changes are wrongly detected in the last langlink This was first detected in cosmetic_changes.py, where pages not needing any cosmetic changes were still being updated, and the supposed changed was an unchanged langlink (the last one). Then I realized this also happens in interwiki.py, but only when changes are supposed to be made to the page. After checking textlib.py, I noticed that removeLanguageLinks() returns a stripped version of the text whereas replaceLanguageLinks() does not. So the actual difference is related to blank space. This explains why cosmetic_changes.py detects a change and updates the page, but interwiki.py does not: interwiki.py does not rely in differences in the final text to make an update, but when it does need to make an update, it outputs that diff. This patch strips the text in replaceLanguageLinks() before returning if the original text is stripped itself. Conflicts: pywikibot/textlib.py Change-Id: Icd7252be8dbccf3fb04a4b4a465f6b057e3a8e3a --- M pywikibot/textlib.py 1 file changed, 9 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/14/243514/1 diff --git a/pywikibot/textlib.py b/pywikibot/textlib.py index b40aba4..206a86d 100644 --- a/pywikibot/textlib.py +++ b/pywikibot/textlib.py @@ -31,7 +31,11 @@ from pywikibot import config2 as config from pywikibot.family import Family -from pywikibot.tools import OrderedDict +from pywikibot.tools import ( +DeprecatedRegex, +OrderedDict, +issue_deprecation_warning +) # cache for replaceExcept to avoid recompile or regexes each call _regex_cache = {} @@ -595,6 +599,9 @@ cseparator = site.family.category_text_separator separatorstripped = separator.strip() cseparatorstripped = cseparator.strip() +do_not_strip = oldtext.strip() != oldtext +if do_not_strip: +issue_deprecation_warning('Using unstripped text', 'stripped text', 2) if addOnly: s2 = oldtext else: @@ -662,7 +669,7 @@ newtext = s2.replace(marker, '').strip() + separator + s else: newtext = s2.replace(marker, '') -return newtext +return newtext if do_not_strip else newtext.strip() def interwikiFormat(links, insite=None): -- To view, visit https://gerrit.wikimedia.org/r/243514 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icd7252be8dbccf3fb04a4b4a465f6b057e3a8e3a Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: 2.0 Gerrit-Owner: Merlijn van DeenGerrit-Reviewer: Malafaya ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update WOW subdomains - change (pywikibot/core)
Merlijn van Deen has uploaded a new change for review. https://gerrit.wikimedia.org/r/243513 Change subject: Update WOW subdomains .. Update WOW subdomains Several WOW subdomain overrides are not necessary en: www.wowwiki.com and en.wow.wikia.com redirect to wowwiki.wikia.com da: da.wowwiki.com and da.wow.wikia.com redirect to da.wowwiki.wikia.com fr: fr.wowwiki.com and fr.wow.wikia.com redirect to fr.wowwiki.wikia.com no: no.wowwiki.com and no.wow.wikia.com redirect to no.wowwiki.wikia.com Use the default .wow.wikia.com for all of them. Add some information about the remaining override for 'sv'. Conflicts: pywikibot/families/wowwiki_family.py [this version is a copy from master] Change-Id: I2511dc1487518dc364e50af7597471fb2f5f763b --- M pywikibot/families/wowwiki_family.py 1 file changed, 16 insertions(+), 36 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/13/243513/1 diff --git a/pywikibot/families/wowwiki_family.py b/pywikibot/families/wowwiki_family.py index 11c319e..b78c543 100644 --- a/pywikibot/families/wowwiki_family.py +++ b/pywikibot/families/wowwiki_family.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- """Family module for WOW Wiki.""" -from __future__ import unicode_literals +from __future__ import absolute_import, unicode_literals __version__ = '$Id$' @@ -8,48 +8,27 @@ from pywikibot.tools import deprecated -class Family(family.Family): +class Family(family.SubdomainFamily, family.WikiaFamily): """Family class for WOW Wiki.""" name = 'wowwiki' +domain = 'wow.wikia.com' + +languages_by_size = [ +'cs', 'da', 'de', 'el', 'en', 'es', 'fa', 'fi', 'fr', 'he', 'hu', 'is', +'it', 'ja', 'ko', 'lt', 'lv', 'nl', 'no', 'pl', 'pt', 'pt-br', 'ru', +'sk', 'sv', 'tr', 'zh', 'zh-tw' +] interwiki_removals = ['hr', 'ro', 'sr'] def __init__(self): """Constructor.""" super(Family, self).__init__() - -self.langs = { -'cs': 'cs.wow.wikia.com', -'da': 'da.wowwiki.com', -'de': 'de.wow.wikia.com', -'el': 'el.wow.wikia.com', -'en': 'www.wowwiki.com', -'es': 'es.wow.wikia.com', -'fa': 'fa.wow.wikia.com', -'fi': 'fi.wow.wikia.com', -'fr': 'fr.wowwiki.com', -'he': 'he.wow.wikia.com', -'hu': 'hu.wow.wikia.com', -'is': 'is.wow.wikia.com', -'it': 'it.wow.wikia.com', -'ja': 'ja.wow.wikia.com', -'ko': 'ko.wow.wikia.com', -'lt': 'lt.wow.wikia.com', -'lv': 'lv.wow.wikia.com', -'nl': 'nl.wow.wikia.com', -'no': 'no.wowwiki.com', -'pl': 'pl.wow.wikia.com', -'pt': 'pt.wow.wikia.com', -'pt-br': 'pt-br.wow.wikia.com', -'ru': 'ru.wow.wikia.com', -'sk': 'sk.wow.wikia.com', -'sv': 'sv.warcraft.wikia.com', -'tr': 'tr.wow.wikia.com', -'zh-tw': 'zh-tw.wow.wikia.com', -'zh': 'zh.wow.wikia.com' -} +# Override 'sv'. http://sv.wow.wikia.com is an empty wiki. +# The interwikimap in this family map 'sv' to this empty wiki. +self.langs['sv'] = 'sv.warcraft.wikia.com' self.disambiguationTemplates['en'] = ['disambig', 'disambig/quest', 'disambig/quest2', @@ -59,9 +38,10 @@ # Wikia's default CategorySelect extension always puts categories last self.categories_last = self.langs.keys() -def scriptpath(self, code): -"""Return the script path for this family.""" -return '' +@property +def domains(self): +"""List of domains used by family wowwiki.""" +return (self.domain, 'wowwiki.com', 'warcraft.wikia.com') @deprecated('APISite.version()') def version(self, code): -- To view, visit https://gerrit.wikimedia.org/r/243513 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2511dc1487518dc364e50af7597471fb2f5f763b Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: 2.0 Gerrit-Owner: Merlijn van DeenGerrit-Reviewer: John Vandenberg ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Follow-up I553e31: Don't show error for non-rendered GCNs - change (VisualEditor/VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: Follow-up I553e31: Don't show error for non-rendered GCNs .. Follow-up I553e31: Don't show error for non-rendered GCNs To avoid all issues with generatedContextValid meaning 'true' when it is undefined or null, invert it to '..Invalid' which is only true when we know we have a GCN which has rendered and failed validation. Also always perform this check, even on first render as the node may load in an error state. Bug: T114527 Change-Id: Ia08d8e7b74e37edc5e73b2ed8adc8ece90764ada --- M src/ce/nodes/ve.ce.GeneratedContentNode.js M src/ce/ve.ce.FocusableNode.js 2 files changed, 4 insertions(+), 7 deletions(-) Approvals: Alex Monk: Looks good to me, approved jenkins-bot: Verified diff --git a/src/ce/nodes/ve.ce.GeneratedContentNode.js b/src/ce/nodes/ve.ce.GeneratedContentNode.js index 3bb5cb3..444eb65 100644 --- a/src/ce/nodes/ve.ce.GeneratedContentNode.js +++ b/src/ce/nodes/ve.ce.GeneratedContentNode.js @@ -15,7 +15,7 @@ ve.ce.GeneratedContentNode = function VeCeGeneratedContentNode() { // Properties this.generatingPromise = null; - this.generatedContentsValid = false; + this.generatedContentsInvalid = null; this.generatedContentsFirstRender = true; // Events @@ -145,11 +145,11 @@ this.emit( 'teardown' ); } $newElements = $( this.getRenderedDomElements( ve.copyDomElements( generatedContents ) ) ); + this.generatedContentsInvalid = !this.validateGeneratedContents( $( generatedContents ) ); // Render if this is the first time rendering, regardless of whether there is an error; otherwise only // render if there is no error - if ( this.generatedContentsFirstRender || this.validateGeneratedContents( $( generatedContents ) ) ) { + if ( this.generatedContentsFirstRender || !this.generatedContentsInvalid ) { this.generatedContentsFirstRender = false; - this.generatedContentsValid = true; if ( !this.$element[ 0 ].parentNode ) { // this.$element hasn't been attached yet, so just overwrite it this.$element = $newElements; @@ -159,8 +159,6 @@ this.$element.remove(); this.$element = $newElements; } - } else { - this.generatedContentsValid = false; } // Update focusable and resizable elements if necessary diff --git a/src/ce/ve.ce.FocusableNode.js b/src/ce/ve.ce.FocusableNode.js index 293ea2f..bc59eca 100644 --- a/src/ce/ve.ce.FocusableNode.js +++ b/src/ce/ve.ce.FocusableNode.js @@ -80,8 +80,7 @@ * @return {jQuery} A highlight element */ ve.ce.FocusableNode.prototype.createHighlight = function () { - // For GCNs check this.generatedContentsValid; for non-GCNs it is undefined (and therefore falsey) - var extraClasses = ( this.generatedContentsValid === undefined || this.generatedContentsValid ) ? '' : ' ve-ce-focusableNode-highlight-error'; + var extraClasses = this.generatedContentsInvalid ? ' ve-ce-focusableNode-highlight-error' : ''; return $( '' ) .addClass( 've-ce-focusableNode-highlight' + extraClasses ) .prop( { -- To view, visit https://gerrit.wikimedia.org/r/243499 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia08d8e7b74e37edc5e73b2ed8adc8ece90764ada Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: EsandersGerrit-Reviewer: Alex Monk Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update to 0.2.4 - change (mediawiki...Metrolook)
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/243518 Change subject: Update to 0.2.4 .. Update to 0.2.4 This will probaly be the last update for MediaWiki 1.21 for metrolook. This includes just one new features like new tiles format please changelog on details on it. Renamed settings please also see changelog. Change-Id: I8d20e10e9600a7d11a028e3e726eed22bf00a49d --- M CHANGELOG.md M Metrolook.i18n.php M Metrolook.php M MetrolookTemplate.php M README.md M js/metrolook.js M js/metrolook.search.js M mobile.css M package.json M screen.css M tablet.css 11 files changed, 225 insertions(+), 401 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Metrolook refs/changes/18/243518/1 diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c305b3..085b7a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,44 @@ Changelog = +0.2.4 +=== + +### New features + +To set tiles now please do the following + +go to MediaWiki:metrolook-tiles + + +Then add + +for example + +Doint forget to add * in front of the code. It wont work without doing * in fornt of code. + +* URL to the site|alternative text|image URL + +* http://example.com|Example name|http://example.com/example.png + +You can now set different tiles for different languges. + +(for french) + +For example MediaWiki:metrolook-tiles/fr + +Renamed settings + +VectorUseSimpleSearch -> MetrolookUseSimpleSearch + +VectorUseIconWatch -> MetrolookUseIconWatch + + +Remove settings + +$wgMetrolookTile1-10 + + 0.2.3 === diff --git a/Metrolook.i18n.php b/Metrolook.i18n.php index dbc536d..ac96828 100644 --- a/Metrolook.i18n.php +++ b/Metrolook.i18n.php @@ -89,22 +89,19 @@ 'metrolook-guest' => 'Meyman', ); -/** - * @author Caliburn - */ -$messages['en-gb'] = array( - 'metrolook-desc' => 'Metrolook skin for MediaWiki', - 'metrolook-guest' => 'Guest', -); - /** English * @author paladox */ $messages['en'] = array( 'skinname-metrolook' => 'Metrolook', + 'metrolook-desc' => 'Metrolook is a [https://en.wikipedia.org/wiki/Metro_(design_language) Metro-inspired] fork of the Vector skin', 'skinmetrolook-collapsiblenav-preference' => 'Enable collapsing of items in the sidebar in Metrolook skin', - 'metrolook-desc' => 'Metrolook skin for MediaWiki', 'metrolook-guest' => 'Guest', + 'metrolook-tiles' => '* http://www.pidgi.net/wiki/|PidgiWiki|http://images.pidgi.net/pidgiwikitiletop.png +* http://www.pidgi.net/press/|PidgiWiki Press|http://images.pidgi.net/pidgipresstiletop.png +* http://www.petalburgwoods.com/|Petalburg Woods|http://images.pidgi.net/pwntiletop.png +* http://burstcade.pidgi.net/|Burstcade|http://images.pidgi.net/burstcadetiletop.png', + 'metrolook-tiles-second' => '', ); /** diff --git a/Metrolook.php b/Metrolook.php index f1e0880..d297842 100644 --- a/Metrolook.php +++ b/Metrolook.php @@ -26,7 +26,7 @@ 'name' => 'Metrolook', 'namemsg' => 'skinname-metrolook', 'descriptionmsg' => 'metrolook-desc', - 'version' => '0.2.3', + 'version' => '0.2.4', 'url' => 'https://www.mediawiki.org/wiki/Skin:Metrolook', 'author' => array( 'immewnity', 'Paladox', 'Craig Davison', 'lagleki' ), 'license-name' => 'GPLv2+', @@ -72,14 +72,14 @@ * - true = use an icon search button * - false = use Go & Search buttons */ -$wgVectorUseSimpleSearch = true; +$wgMetrolookUseSimpleSearch = true; /** * Watch and unwatch as an icon rather than a link. * - true = use an icon watch/unwatch button * - false = use watch/unwatch text link */ -$wgVectorUseIconWatch = true; +$wgMetrolookUseIconWatch = true; $wgMetrolookLogo = true; @@ -101,16 +101,7 @@ $wgMetrolookMobile = true; -/* To use tile 5 to 10 please diable this */ $wgMetrolookBartile = true; - -$wgMetrolookTile1 = true; - -$wgMetrolookTile2 = true; - -$wgMetrolookTile3 = true; - -$wgMetrolookTile4 = true; // Register modules $wgResourceModules['skins.metrolook'] = array( diff --git a/MetrolookTemplate.php b/MetrolookTemplate.php index 3628c67..f72e5c0 100644 --- a/MetrolookTemplate.php +++ b/MetrolookTemplate.php @@ -33,6 +33,52 @@ /** @var string $mPersonalToolsEcho Saves Echo notifications */ private $mPersonalToolsEcho = ''; + private function getTiles( $messageName = 'metrolook-tiles' ) { + /** +* The message's format is: +* * URL to the site|alternative text|image URL +* +* For example: +* * http://www.pidgi.net/wiki/|PidgiWiki|http://images.pidgi.net/pidgiwikitiletop.png +* * http://www.pidgi.net/press/|PidgiWiki Press|http://images.pidgi.net/pidgipresstiletop.png +* * http://www.pidgi.net/jcc/|The JCC|http://images.pidgi.net/jcctiletop.png +* *
[MediaWiki-commits] [Gerrit] Allow Subject.originPage to be updated - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: Allow Subject.originPage to be updated .. Allow Subject.originPage to be updated 3488a4b1bb introduced a bug by changing a attribute to be a property without a setter, however interwiki.py frequently sets this value. Change-Id: I656e03a1d7499f7e1ba79185a8c55a5d3061681a (cherry picked from commit 9011580e19c2aedfb0ba30c93daae04bd7d50151) --- M pywikibot/interwiki_graph.py 1 file changed, 13 insertions(+), 0 deletions(-) Approvals: John Vandenberg: Looks good to me, but someone else must approve Mpaa: Looks good to me, approved Merlijn van Deen: Looks good to me, approved jenkins-bot: Verified diff --git a/pywikibot/interwiki_graph.py b/pywikibot/interwiki_graph.py index 6f2c49a..c9e2918 100644 --- a/pywikibot/interwiki_graph.py +++ b/pywikibot/interwiki_graph.py @@ -91,6 +91,11 @@ """Page on the origin wiki.""" return self._origin +@origin.setter +def origin(self, value): +"""Page on the origin wiki.""" +self._origin = value + @property def originPage(self): """Deprecated property for the origin page. @@ -100,6 +105,14 @@ # TODO: deprecate this property return self.origin +@originPage.setter +def originPage(self, value): +"""Deprecated property for the origin page. + +DEPRECATED. Use origin. +""" +self.origin = value + @property def foundIn(self): """Mapping of pages to others pages interwiki linked to it. -- To view, visit https://gerrit.wikimedia.org/r/242518 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I656e03a1d7499f7e1ba79185a8c55a5d3061681a Gerrit-PatchSet: 2 Gerrit-Project: pywikibot/core Gerrit-Branch: 2.0 Gerrit-Owner: XZiseGerrit-Reviewer: John Vandenberg Gerrit-Reviewer: Ladsgroup Gerrit-Reviewer: Merlijn van Deen Gerrit-Reviewer: Mpaa Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix interwikiFormat support for Link - change (pywikibot/core)
Merlijn van Deen has uploaded a new change for review. https://gerrit.wikimedia.org/r/243510 Change subject: Fix interwikiFormat support for Link .. Fix interwikiFormat support for Link interwikiFormat is supposed to support a dictionary of Page or Link objects. There were several merges of core and compat 'textlib' to keep the two in sync, such as core's 8978bfb6, and the support for Link was broken somewhere along the way. Add tests for Link in addition to existing tests for Page. Also add a ValueError exception if it contains any other type. Conflicts: pywikibot/textlib.py tests/textlib_tests.py Change-Id: Ibb39ea8b3079083feec93249eb6abe4b997feb74 --- M pywikibot/textlib.py M tests/textlib_tests.py 2 files changed, 17 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/10/243510/1 diff --git a/pywikibot/textlib.py b/pywikibot/textlib.py index b40aba4..9022316 100644 --- a/pywikibot/textlib.py +++ b/pywikibot/textlib.py @@ -686,14 +686,15 @@ ar = interwikiSort(list(links.keys()), insite) s = [] for site in ar: -try: +if isinstance(links[site], pywikibot.Link): +links[site] = pywikibot.Page(links[site]) +if isinstance(links[site], pywikibot.Page): title = links[site].title(asLink=True, forceInterwiki=True, insite=insite) link = title.replace('[[:', '[[') s.append(link) -except AttributeError: -s.append(pywikibot.Site(site, insite.family).linkto( -links[site], othersite=insite)) + else: +raise ValueError('links dict must contain Page or Link objects') if insite.lang in insite.family.interwiki_on_one_line: sep = u' ' else: diff --git a/tests/textlib_tests.py b/tests/textlib_tests.py index 468d3f2..ce5a7c7 100644 --- a/tests/textlib_tests.py +++ b/tests/textlib_tests.py @@ -90,7 +90,8 @@ cached = True -def test_interwiki_format(self): + def test_interwiki_format_Page(self): +"""Test formatting interwiki links using Page instances.""" interwikis = { 'de': pywikibot.Page(pywikibot.Link('de:German', self.site)), 'fr': pywikibot.Page(pywikibot.Link('fr:French', self.site)) @@ -99,6 +100,16 @@ % {'LS': config.LS}, textlib.interwikiFormat(interwikis, self.site)) +def test_interwiki_format_Link(self): +"""Test formatting interwiki links using Page instances.""" +interwikis = { +'de': pywikibot.Link('de:German', self.site), +'fr': pywikibot.Link('fr:French', self.site), +} +self.assertEqual('[[de:German]]%(LS)s[[fr:French]]%(LS)s' + % {'LS': config.LS}, + textlib.interwikiFormat(interwikis, self.site)) + class TestFormatCategory(DefaultDrySiteTestCase): -- To view, visit https://gerrit.wikimedia.org/r/243510 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibb39ea8b3079083feec93249eb6abe4b997feb74 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: 2.0 Gerrit-Owner: Merlijn van DeenGerrit-Reviewer: John Vandenberg ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] adds data files from remote - change (wikidata...dashboard)
Christopher Johnson (WMDE) has submitted this change and it was merged. Change subject: adds data files from remote .. adds data files from remote Change-Id: I7caf06b32bc664e92c859fd1bcade465ccf0044a --- M assets/css/custom.css M assets/dashboard.md M config.R M model.R M server.R M ui.R M utils.R 7 files changed, 116 insertions(+), 138 deletions(-) Approvals: Christopher Johnson (WMDE): Verified; Looks good to me, approved diff --git a/assets/css/custom.css b/assets/css/custom.css index 1e2f363..011d195 100644 --- a/assets/css/custom.css +++ b/assets/css/custom.css @@ -2,20 +2,7 @@ background-color: #ECF0F5 !important; } -.skin-blue .main-header .navbar{background-color:#33}.skin-blue - -.skin-blue .main-header .logo:hover { -background-color: #33; -} - -.skin-blue .main-header .logo { -background-color: #33; -color: #fff; -border-bottom: 0 solid transparent; -} - hr { height: 3px; background-color:#33; } - diff --git a/assets/dashboard.md b/assets/dashboard.md index 609851a..60593df 100644 --- a/assets/dashboard.md +++ b/assets/dashboard.md @@ -1,2 +1 @@ Welcome to the Wikidata Metrics Dashboard - diff --git a/config.R b/config.R index aa36548..725f49c 100644 --- a/config.R +++ b/config.R @@ -12,6 +12,7 @@ library(curl) library(rrdf) library(data.table) +library(DT) data_uri <- "http://localhost/data/; source_data_uri <- "http://wdm-data.wmflabs.org/data/; agg_data_uri <- "http://datasets.wikimedia.org/aggregate-datasets/wikidata/; diff --git a/model.R b/model.R index f488c7d..1cee713 100644 --- a/model.R +++ b/model.R @@ -1,11 +1,8 @@ -get_datasets <- function(){ - wikidata_edits <<- download_set("wikidata_eng_edits.tsv") - wikidata_active_users <<- download_set("wikidata_eng_active_users.tsv") +get_local_datasets <- function(){ wikidata_social_media <<- download_set("wikidata_eng_social_media.tsv") wikidata_mailing_lists <<-download_set("wikidata_eng_mailing_lists.tsv") wikidata_mailing_lists_messages <<-download_set("wikidata_eng_mailing_lists_messages.tsv") wikidata_references_overview <<- download_set("wikidata_content_references_overview.tsv") - wikidata_pages <<- download_set("wikidata_content_pages.tsv") wikidata_content_items <<- download_set("wikidata_content_items.tsv") wikidata_properties <<- download_set("wikidata_content_properties.tsv") wikidata_content_refstmts <<-download_set("wikidata_content_refstmts.tsv") @@ -18,12 +15,41 @@ wikidata_content_descriptions_item <<- download_set("wikidata_content_descriptions_item.tsv") wikidata_content_wikilinks_item <<- download_set("wikidata_content_wikimedia_links_item.tsv") wikidata_kpi_active_editors <<- download_set("wikidata_kpi_active_editors.tsv") - wikidata_daily_social <<- download_set("social.tsv", agg_data_uri) - wikidata_daily_site <<- download_set("site_stats.tsv", agg_data_uri) - wikidata_daily_getclaims_property_use <<- download_set("getclaims_property_use.tsv", agg_data_uri) return(invisible()) } +get_remote_datasets <- function(){ + out <- tryCatch({ +con <- curl(agg_data_uri) +readLines(con) + }, + warning = function(cond){ +message(paste("URL caused a warning:", uri)) +message("Warning message:") +message(cond) +return(NULL) + }, + error = function(cond){ +message(paste("URL does not exist:", uri)) +message("Error message:") +message(cond) +return(NA) + }, + finally = { + wikidata_edits <<- download_set("site_stats_total_edits.tsv", agg_data_uri) + wikidata_active_users <<- download_set("site_stats_active_users.tsv", agg_data_uri) + wikidata_pages <<- download_set("site_stats_total_pages.tsv", agg_data_uri) + wikidata_gooditems <<- download_set("site_stats_good_articles.tsv", agg_data_uri) + wikidata_daily_getclaims_property_use <<- download_set("getclaims_property_use.tsv", agg_data_uri) + wikidata_facebook <<- download_set("social_facebook.tsv", agg_data_uri) + wikidata_googleplus <<- download_set("social_googleplus.tsv", agg_data_uri) + wikidata_twitter <<- download_set("social_twitter.tsv", agg_data_uri) + wikidata_identica <<- download_set("social_identica.tsv", agg_data_uri) + wikidata_irc <<- download_set("social_irc.tsv", agg_data_uri) + }) + return(out) +} + load_rdf_model <-function(){ metrics_model <<- load.rdf(metrics_rdf) } diff --git a/server.R b/server.R index 5f8f431..08d8003 100644 --- a/server.R +++ b/server.R @@ -8,24 +8,32 @@ shinyServer(function(input, output, session) { if(Sys.Date() != existing_date){ - get_datasets() + get_local_datasets() + get_remote_datasets() load_rdf_model() get_rdf_objects() existing_date <<- Sys.Date() } -observeEvent(input$switchtab, { -updateTabItems(session, "tabs", input$switchtab) -}) -#Daily Site -wikidata_recent_site <- wikidata_daily_site[which(wikidata_daily_site$date >
[MediaWiki-commits] [Gerrit] Fixes T114604 - change (mediawiki/core)
Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/243521 Change subject: Fixes T114604 .. Fixes T114604 Change-Id: I9d99a2ebc2553bc6ef04d8f212d021f8b9684f2d --- M resources/src/jquery/jquery.tablesorter.js 1 file changed, 13 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/21/243521/1 diff --git a/resources/src/jquery/jquery.tablesorter.js b/resources/src/jquery/jquery.tablesorter.js index 0eefae6..ac144ba 100644 --- a/resources/src/jquery/jquery.tablesorter.js +++ b/resources/src/jquery/jquery.tablesorter.js @@ -268,7 +268,7 @@ * @param {jQuery} $table object for a */ function emulateTHeadAndFoot( $table ) { - var $thead, $tfoot, i, len, + var $thead, $tfoot, i, len, tfootAdditions = [], rowspan, ii $rows = $table.find( '> tbody > tr' ); if ( !$table.get( 0 ).tHead ) { $thead = $( '' ); @@ -287,8 +287,19 @@ len = $rows.length; for ( i = len - 1; i >= 0; i-- ) { if ( $( $rows[ i ] ).children( 'td' ).length ) { - break; + rowspanNum = $( $rows[ i ] ).children( 'td' ).attr( 'rowspan' ); + if ( rowspan !== undefined ) { + for ( ii = parseInt( rowspan ); ii < parseInt( rowspan ).length; ii++ ) { + if ( tfootAdditions.indexOf( i + parseInt( rowspan ) ) !== -1 ) { + tfootAdditions.splice( tfootAdditions.indexOf( i + parseInt( rowspan ) ) ); + } + } + } + continue; } + tfootAdditions.push( i ); + } + for ( i = 0; i < tfootAdditions.length; i++ ) { $tfoot.prepend( $( $rows[ i ] ) ); } $table.append( $tfoot ); -- To view, visit https://gerrit.wikimedia.org/r/243521 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9d99a2ebc2553bc6ef04d8f212d021f8b9684f2d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Gerrit Patch UploaderGerrit-Reviewer: Cblair91 Gerrit-Reviewer: Gerrit Patch Uploader ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fixes T114604 - change (mediawiki/core)
Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/243525 Change subject: Fixes T114604 .. Fixes T114604 Change-Id: Ibe8c500e0a365bc059de9000c7a2c338e2da828b --- M resources/src/jquery/jquery.tablesorter.js 1 file changed, 13 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/25/243525/1 diff --git a/resources/src/jquery/jquery.tablesorter.js b/resources/src/jquery/jquery.tablesorter.js index 0eefae6..a75bb0e 100644 --- a/resources/src/jquery/jquery.tablesorter.js +++ b/resources/src/jquery/jquery.tablesorter.js @@ -268,7 +268,7 @@ * @param {jQuery} $table object for a */ function emulateTHeadAndFoot( $table ) { - var $thead, $tfoot, i, len, + var $thead, $tfoot, i, len, tfootAdditions = [], rowspan, ii, $rows = $table.find( '> tbody > tr' ); if ( !$table.get( 0 ).tHead ) { $thead = $( '' ); @@ -287,8 +287,19 @@ len = $rows.length; for ( i = len - 1; i >= 0; i-- ) { if ( $( $rows[ i ] ).children( 'td' ).length ) { - break; + rowspan = $( $rows[ i ] ).children( 'td' ).attr( 'rowspan' ); + if ( rowspan !== undefined ) { + for ( ii = parseInt( rowspan, 10 ); ii < parseInt( rowspan, 10 ).length; ii++ ) { + if ( tfootAdditions.indexOf( i + parseInt( rowspan, 10 ) ) !== -1 ) { + tfootAdditions.splice( tfootAdditions.indexOf( i + parseInt( rowspan, 10 ) ) ); + } + } + } + continue; } + tfootAdditions.push( i ); + } + for ( i = 0; i < tfootAdditions.length; i++ ) { $tfoot.prepend( $( $rows[ i ] ) ); } $table.append( $tfoot ); -- To view, visit https://gerrit.wikimedia.org/r/243525 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibe8c500e0a365bc059de9000c7a2c338e2da828b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Gerrit Patch UploaderGerrit-Reviewer: Cblair91 ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [IMPROV] Optimize/remove unneeded calls to Page.isEmpty() - change (pywikibot/core)
Merlijn van Deen has uploaded a new change for review. https://gerrit.wikimedia.org/r/243506 Change subject: [IMPROV] Optimize/remove unneeded calls to Page.isEmpty() .. [IMPROV] Optimize/remove unneeded calls to Page.isEmpty() A check for Page.isEmpty() is unnecessary as it will never be checked when it would yield True. A sequence of conditions was also optimized (quicker condition check first) when replacing links. Change-Id: Ib68446a77f52f59440d9f50fef416b9bfdb39827 --- M scripts/interwiki.py 1 file changed, 1 insertion(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/06/243506/1 diff --git a/scripts/interwiki.py b/scripts/interwiki.py index 9854bc6..f1b314a 100755 --- a/scripts/interwiki.py +++ b/scripts/interwiki.py @@ -1446,14 +1446,6 @@ pywikibot.output(u'File autonomous_problems.dat open or corrupted! Try again with -restore.') sys.exit() iw = () -elif not page.isCategory() and page.isEmpty(): -globalvar.remove.append(unicode(page)) -if not globalvar.quiet: -pywikibot.output(u"NOTE: %s is empty; ignoring it and its interwiki links" - % page) -# Ignore the interwiki links -self.done.remove(page) -iw = () for link in iw: linkedPage = pywikibot.Page(link) @@ -1834,7 +1826,7 @@ except pywikibot.NoPage: pywikibot.output(u"Not editing %s: page does not exist" % page) raise SaveError(u'Page doesn\'t exist') -if page.isEmpty() and not page.isCategory(): +if not page.isCategory() and page.isEmpty(): pywikibot.output(u"Not editing %s: page is empty" % page) raise SaveError(u'Page is empty.') -- To view, visit https://gerrit.wikimedia.org/r/243506 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib68446a77f52f59440d9f50fef416b9bfdb39827 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: 2.0 Gerrit-Owner: Merlijn van DeenGerrit-Reviewer: Malafaya ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Wrap s so their margins are clickable - change (VisualEditor/VisualEditor)
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/243509 Change subject: Wrap s so their margins are clickable .. Wrap s so their margins are clickable Otherwise you have a click target that is ~2px high. Bug: T52770 Change-Id: Iaae21ecb295f90a81800d4fd8947e309a9dc5790 --- M build/modules.json M demos/ve/desktop.html M demos/ve/mobile.html M demos/ve/pages/empty.html A src/ce/nodes/ve.ce.HorizontalRuleNode.js A src/ce/styles/nodes/ve.ce.HorizontalRuleNode.css A src/dm/nodes/ve.dm.HorizontalRuleNode.js M tests/ce/ve.ce.Document.test.js M tests/dm/ve.dm.example.js M tests/index.html 10 files changed, 125 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/09/243509/1 diff --git a/build/modules.json b/build/modules.json index c4b6965..b4a4672 100644 --- a/build/modules.json +++ b/build/modules.json @@ -263,6 +263,7 @@ "src/dm/nodes/ve.dm.DivNode.js", "src/dm/nodes/ve.dm.DocumentNode.js", "src/dm/nodes/ve.dm.HeadingNode.js", + "src/dm/nodes/ve.dm.HorizontalRuleNode.js", "src/dm/nodes/ve.dm.InternalItemNode.js", "src/dm/nodes/ve.dm.InternalListNode.js", "src/dm/nodes/ve.dm.ListItemNode.js", @@ -333,6 +334,7 @@ "src/ce/nodes/ve.ce.DivNode.js", "src/ce/nodes/ve.ce.DocumentNode.js", "src/ce/nodes/ve.ce.HeadingNode.js", + "src/ce/nodes/ve.ce.HorizontalRuleNode.js", "src/ce/nodes/ve.ce.InternalItemNode.js", "src/ce/nodes/ve.ce.InternalListNode.js", "src/ce/nodes/ve.ce.ListItemNode.js", @@ -475,6 +477,7 @@ "src/ce/styles/nodes/ve.ce.CommentNode.css", "src/ce/styles/nodes/ve.ce.DocumentNode.css", "src/ce/styles/nodes/ve.ce.GeneratedContentNode.css", + "src/ce/styles/nodes/ve.ce.HorizontalRuleNode.css", "src/ce/styles/annotations/ve.ce.LanguageAnnotation.css", "src/ce/styles/annotations/ve.ce.LinkAnnotation.css", "src/ce/styles/nodes/ve.ce.ResizableNode.css", diff --git a/demos/ve/desktop.html b/demos/ve/desktop.html index e28f952..5e1424a 100644 --- a/demos/ve/desktop.html +++ b/demos/ve/desktop.html @@ -34,6 +34,7 @@ + @@ -223,6 +224,7 @@ + @@ -293,6 +295,7 @@ + diff --git a/demos/ve/mobile.html b/demos/ve/mobile.html index 0b604a7..361d15f 100644 --- a/demos/ve/mobile.html +++ b/demos/ve/mobile.html @@ -34,6 +34,7 @@ + @@ -225,6 +226,7 @@ + @@ -295,6 +297,7 @@ + diff --git a/demos/ve/pages/empty.html b/demos/ve/pages/empty.html index e69de29..ce10d2a 100644 --- a/demos/ve/pages/empty.html +++ b/demos/ve/pages/empty.html @@ -0,0 +1 @@ +FooBar \ No newline at end of file diff --git a/src/ce/nodes/ve.ce.HorizontalRuleNode.js b/src/ce/nodes/ve.ce.HorizontalRuleNode.js new file mode 100644 index 000..4ab1fe5 --- /dev/null +++ b/src/ce/nodes/ve.ce.HorizontalRuleNode.js @@ -0,0 +1,47 @@ +/*! + * VisualEditor ContentEditable HorizontalRuleNode class. + * + * @copyright 2011-2015 VisualEditor Team and others; see http://ve.mit-license.org + */ + +/** + * ContentEditable horizontal rule node. + * + * @class + * @extends ve.ce.LeafNode + * @mixins ve.ce.FocusableNode + * + * @constructor + * @param {ve.dm.HorizontalRuleNode} model Model to observe + * @param {Object} [config] Configuration options + */ +ve.ce.HorizontalRuleNode = function VeCeHorizontalRuleNode() { + // Parent constructor + ve.ce.HorizontalRuleNode.super.apply( this, arguments ); + + // Wrap the in a div so the margins become focusable + // and the user has a click target of more than 2px + this.$element = $( '' ).append( this.$element ); + + // Mixin constructors + ve.ce.FocusableNode.call( this ); + + // DOM changes + this.$element.addClass( 've-ce-horizontalRuleNode' ); +}; + +/* Inheritance */ + +OO.inheritClass( ve.ce.HorizontalRuleNode, ve.ce.LeafNode
[MediaWiki-commits] [Gerrit] Update .jshintignore - change (mediawiki...Metrolook)
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/243519 Change subject: Update .jshintignore .. Update .jshintignore Change-Id: I7368f9552358d5fb859dc6cc047c059122a3a3c3 --- M .jshintignore 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Metrolook refs/changes/19/243519/1 diff --git a/.jshintignore b/.jshintignore index 3c3629e..9836c42 100644 --- a/.jshintignore +++ b/.jshintignore @@ -1 +1,3 @@ node_modules + +js/overthrow.js -- To view, visit https://gerrit.wikimedia.org/r/243519 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7368f9552358d5fb859dc6cc047c059122a3a3c3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/Metrolook Gerrit-Branch: master Gerrit-Owner: Paladox___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix verson numbering - change (pywikibot/wikibase)
Ladsgroup has uploaded a new change for review. https://gerrit.wikimedia.org/r/243520 Change subject: Fix verson numbering .. Fix verson numbering It seems pip can't work with 0.1a Change-Id: I81408d11d8a6d5c954f101d8bde1e969e385d8a1 --- M ChangeLog M setup.py 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/wikibase refs/changes/20/243520/1 diff --git a/ChangeLog b/ChangeLog index 4c1a98b..1d4fbe8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,4 @@ -Release 0.1a (29 September 2015) +Release 0.0.2 (29 September 2015) Major improvements include: - Tests added covering 83% diff --git a/setup.py b/setup.py index 02f4126..9ea2798 100644 --- a/setup.py +++ b/setup.py @@ -39,7 +39,7 @@ name = 'pywikibase' -version = '0.1a' +version = '0.0.2' github_url = 'https://github.com/wikimedia/pywikibot-wikibase' setup( -- To view, visit https://gerrit.wikimedia.org/r/243520 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I81408d11d8a6d5c954f101d8bde1e969e385d8a1 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/wikibase Gerrit-Branch: master Gerrit-Owner: Ladsgroup___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Disable l10n tests by default - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: Disable l10n tests by default .. Disable l10n tests by default The pywikibot-i18n repository now runs l10n tests on travis. Conflicts: tests/__init__.py Change-Id: I91ee6719c68bf6668749cd7857dd6634aa1f4c73 --- M tests/__init__.py 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/__init__.py b/tests/__init__.py index 3f213d2..6c0a77e 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -92,6 +92,7 @@ disabled_test_modules = [ 'tests', # tests of the tests package +'l10n', ] if not i18n.messages_available(): disabled_test_modules.append('l10n') -- To view, visit https://gerrit.wikimedia.org/r/243516 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I91ee6719c68bf6668749cd7857dd6634aa1f4c73 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: 2.0 Gerrit-Owner: Merlijn van DeenGerrit-Reviewer: John Vandenberg Gerrit-Reviewer: Ladsgroup Gerrit-Reviewer: Xqt Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Mark site.patrol() as a user write action - change (pywikibot/core)
Merlijn van Deen has uploaded a new change for review. https://gerrit.wikimedia.org/r/243508 Change subject: Mark site.patrol() as a user write action .. Mark site.patrol() as a user write action Set the patrol test case to be 'write' so that it is disabled by default, and only run on the 'test:test' site. Fix SiteWriteMixin so that - use of 'write' and 'cached' attributes always cause an error even if write tests are not enabled with PYWIKIBOT2_TEST_WRITE - an error occurs if write tests are run on sites which haven't been configured as test sites using Family.test_codes, however they are skipped on non-test sites when PYWIKIBOT2_TEST_WRITE is not enabled. Conflicts: pywikibot/families/test_family.py pywikibot/site.py tests/aspects.py tests/site_tests.py Change-Id: I0ab4dc20f82857505236c0c678a602c02c001e37 --- M pywikibot/families/test_family.py M pywikibot/site.py M tests/aspects.py M tests/site_tests.py 4 files changed, 27 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/08/243508/1 diff --git a/pywikibot/families/test_family.py b/pywikibot/families/test_family.py index 2a943b9..4502a50 100644 --- a/pywikibot/families/test_family.py +++ b/pywikibot/families/test_family.py @@ -18,3 +18,4 @@ def from_url(self, url): """Return None to indicate no code of this family is accepted.""" return None # Don't accept this, but 'test' of 'wikipedia' +test_codes = ('test', ) diff --git a/pywikibot/site.py b/pywikibot/site.py index 312bb39..e85b821 100644 --- a/pywikibot/site.py +++ b/pywikibot/site.py @@ -4665,6 +4665,8 @@ "notpatrollable": "The revision %(revid)s can't be patrolled as it's too old." } +@must_be(group='user') +@deprecated_args(token=None) def patrol(self, rcid=None, revid=None, revision=None): """Return a generator of patrolled pages. diff --git a/tests/aspects.py b/tests/aspects.py index f96d9f0..66c584c 100644 --- a/tests/aspects.py +++ b/tests/aspects.py @@ -529,10 +529,15 @@ Otherwise the test class is skipped unless environment variable PYWIKIBOT2_TEST_WRITE is set to 1. """ +if issubclass(cls, ForceCacheMixin): +raise Exception( +'%s can not be a subclass of both ' +'SiteWriteMixin and ForceCacheMixin' +% cls.__name__) + super(SiteWriteMixin, cls).setUpClass() site = cls.get_site() -assert('test' in (site.family.name, site.code)) if cls.write == -1: env_var = 'PYWIKIBOT2_TEST_WRITE_FAIL' @@ -545,11 +550,13 @@ 'Set %s=1 to enable.' % (cls.__name__, env_var)) -if issubclass(cls, ForceCacheMixin): +if (not hasattr(site.family, 'test_codes') or +site.code not in site.family.test_codes): raise Exception( -'%s can not be a subclass of both ' -'SiteEditTestCase and ForceCacheMixin' -% cls.__name__) +'%s should only be run on test sites. ' +'To run this test, add \'%s\' to the %s family ' +'attribute \'test_codes\'.' +% (cls.__name__, site.code, site.family.name)) class RequireUserMixin(TestCaseBase): diff --git a/tests/site_tests.py b/tests/site_tests.py index d9bd295..caaf55e 100644 --- a/tests/site_tests.py +++ b/tests/site_tests.py @@ -1372,6 +1372,18 @@ self.assertTrue(user["name"] in ["Jimbo Wales", "Brion VIBBER", "Tim Starling"]) + +class PatrolTestCase(TokenTestBase, TestCase): + +"""Test patrol method.""" + +family = 'test' +code = 'test' + +user = True +token_type = 'patrol' +write = True + def testPatrol(self): """Test the site.patrol() method.""" mysite = self.get_site() -- To view, visit https://gerrit.wikimedia.org/r/243508 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0ab4dc20f82857505236c0c678a602c02c001e37 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: 2.0 Gerrit-Owner: Merlijn van DeenGerrit-Reviewer: John Vandenberg ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Import textlib.TimeStripper - change (pywikibot/core)
Merlijn van Deen has uploaded a new change for review. https://gerrit.wikimedia.org/r/243512 Change subject: Import textlib.TimeStripper .. Import textlib.TimeStripper 2cddfcd1 remove TimeStripper from pywikibot.* Conflicts: pywikibot/__init__.py Bug: T111615 Change-Id: I197d54c080683b08582dc53fa63811cf0782604f --- M pywikibot/__init__.py 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/12/243512/1 diff --git a/pywikibot/__init__.py b/pywikibot/__init__.py index 9571873..1191b6e 100644 --- a/pywikibot/__init__.py +++ b/pywikibot/__init__.py @@ -65,12 +65,13 @@ 'getCategoryLinks', 'categoryFormat', 'replaceCategoryLinks', 'removeCategoryLinks', 'removeCategoryLinksAndSeparator', 'replaceCategoryInPlace', 'compileLinkR', 'extract_templates_and_params', +'TimeStripper', ) # pep257 doesn't understand when the first entry is on the next line __all__ = ('config', 'ui', 'UnicodeMixin', 'translate', 'Page', 'FilePage', 'Category', 'Link', 'User', - 'ItemPage', 'PropertyPage', 'Claim', 'TimeStripper', + 'ItemPage', 'PropertyPage', 'Claim', 'html2unicode', 'url2unicode', 'unicode2html', 'stdout', 'output', 'warning', 'error', 'critical', 'debug', 'exception', 'input_choice', 'input', 'input_yn', 'inputChoice', -- To view, visit https://gerrit.wikimedia.org/r/243512 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I197d54c080683b08582dc53fa63811cf0782604f Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: 2.0 Gerrit-Owner: Merlijn van DeenGerrit-Reviewer: John Vandenberg ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Disable l10n tests by default - change (pywikibot/core)
Merlijn van Deen has uploaded a new change for review. https://gerrit.wikimedia.org/r/243516 Change subject: Disable l10n tests by default .. Disable l10n tests by default The pywikibot-i18n repository now runs l10n tests on travis. Conflicts: tests/__init__.py Change-Id: I91ee6719c68bf6668749cd7857dd6634aa1f4c73 --- M tests/__init__.py 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/16/243516/1 diff --git a/tests/__init__.py b/tests/__init__.py index 3f213d2..6c0a77e 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -92,6 +92,7 @@ disabled_test_modules = [ 'tests', # tests of the tests package +'l10n', ] if not i18n.messages_available(): disabled_test_modules.append('l10n') -- To view, visit https://gerrit.wikimedia.org/r/243516 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I91ee6719c68bf6668749cd7857dd6634aa1f4c73 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: 2.0 Gerrit-Owner: Merlijn van DeenGerrit-Reviewer: John Vandenberg ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update to 0.2.4 - change (mediawiki...Metrolook)
jenkins-bot has submitted this change and it was merged. Change subject: Update to 0.2.4 .. Update to 0.2.4 This will probaly be the last update for MediaWiki 1.21 for metrolook. This includes just one new features like new tiles format please changelog on details on it. Renamed settings please also see changelog. Change-Id: I8d20e10e9600a7d11a028e3e726eed22bf00a49d --- A .jshintignore M CHANGELOG.md M Metrolook.i18n.php M Metrolook.php M MetrolookTemplate.php M README.md M js/metrolook.js M js/metrolook.search.js M mobile.css M package.json M screen.css M tablet.css 12 files changed, 226 insertions(+), 401 deletions(-) Approvals: Paladox: Looks good to me, approved jenkins-bot: Verified diff --git a/.jshintignore b/.jshintignore new file mode 100644 index 000..aea60a1 --- /dev/null +++ b/.jshintignore @@ -0,0 +1 @@ +js/overthrow.js diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c305b3..085b7a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,44 @@ Changelog = +0.2.4 +=== + +### New features + +To set tiles now please do the following + +go to MediaWiki:metrolook-tiles + + +Then add + +for example + +Doint forget to add * in front of the code. It wont work without doing * in fornt of code. + +* URL to the site|alternative text|image URL + +* http://example.com|Example name|http://example.com/example.png + +You can now set different tiles for different languges. + +(for french) + +For example MediaWiki:metrolook-tiles/fr + +Renamed settings + +VectorUseSimpleSearch -> MetrolookUseSimpleSearch + +VectorUseIconWatch -> MetrolookUseIconWatch + + +Remove settings + +$wgMetrolookTile1-10 + + 0.2.3 === diff --git a/Metrolook.i18n.php b/Metrolook.i18n.php index dbc536d..ac96828 100644 --- a/Metrolook.i18n.php +++ b/Metrolook.i18n.php @@ -89,22 +89,19 @@ 'metrolook-guest' => 'Meyman', ); -/** - * @author Caliburn - */ -$messages['en-gb'] = array( - 'metrolook-desc' => 'Metrolook skin for MediaWiki', - 'metrolook-guest' => 'Guest', -); - /** English * @author paladox */ $messages['en'] = array( 'skinname-metrolook' => 'Metrolook', + 'metrolook-desc' => 'Metrolook is a [https://en.wikipedia.org/wiki/Metro_(design_language) Metro-inspired] fork of the Vector skin', 'skinmetrolook-collapsiblenav-preference' => 'Enable collapsing of items in the sidebar in Metrolook skin', - 'metrolook-desc' => 'Metrolook skin for MediaWiki', 'metrolook-guest' => 'Guest', + 'metrolook-tiles' => '* http://www.pidgi.net/wiki/|PidgiWiki|http://images.pidgi.net/pidgiwikitiletop.png +* http://www.pidgi.net/press/|PidgiWiki Press|http://images.pidgi.net/pidgipresstiletop.png +* http://www.petalburgwoods.com/|Petalburg Woods|http://images.pidgi.net/pwntiletop.png +* http://burstcade.pidgi.net/|Burstcade|http://images.pidgi.net/burstcadetiletop.png', + 'metrolook-tiles-second' => '', ); /** diff --git a/Metrolook.php b/Metrolook.php index f1e0880..d297842 100644 --- a/Metrolook.php +++ b/Metrolook.php @@ -26,7 +26,7 @@ 'name' => 'Metrolook', 'namemsg' => 'skinname-metrolook', 'descriptionmsg' => 'metrolook-desc', - 'version' => '0.2.3', + 'version' => '0.2.4', 'url' => 'https://www.mediawiki.org/wiki/Skin:Metrolook', 'author' => array( 'immewnity', 'Paladox', 'Craig Davison', 'lagleki' ), 'license-name' => 'GPLv2+', @@ -72,14 +72,14 @@ * - true = use an icon search button * - false = use Go & Search buttons */ -$wgVectorUseSimpleSearch = true; +$wgMetrolookUseSimpleSearch = true; /** * Watch and unwatch as an icon rather than a link. * - true = use an icon watch/unwatch button * - false = use watch/unwatch text link */ -$wgVectorUseIconWatch = true; +$wgMetrolookUseIconWatch = true; $wgMetrolookLogo = true; @@ -101,16 +101,7 @@ $wgMetrolookMobile = true; -/* To use tile 5 to 10 please diable this */ $wgMetrolookBartile = true; - -$wgMetrolookTile1 = true; - -$wgMetrolookTile2 = true; - -$wgMetrolookTile3 = true; - -$wgMetrolookTile4 = true; // Register modules $wgResourceModules['skins.metrolook'] = array( diff --git a/MetrolookTemplate.php b/MetrolookTemplate.php index 3628c67..f72e5c0 100644 --- a/MetrolookTemplate.php +++ b/MetrolookTemplate.php @@ -33,6 +33,52 @@ /** @var string $mPersonalToolsEcho Saves Echo notifications */ private $mPersonalToolsEcho = ''; + private function getTiles( $messageName = 'metrolook-tiles' ) { + /** +* The message's format is: +* * URL to the site|alternative text|image URL +* +* For example: +* * http://www.pidgi.net/wiki/|PidgiWiki|http://images.pidgi.net/pidgiwikitiletop.png +* * http://www.pidgi.net/press/|PidgiWiki Press|http://images.pidgi.net/pidgipresstiletop.png +
[MediaWiki-commits] [Gerrit] Import textlib.TimeStripper - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: Import textlib.TimeStripper .. Import textlib.TimeStripper 2cddfcd1 remove TimeStripper from pywikibot.* Conflicts: pywikibot/__init__.py Bug: T111615 Change-Id: I197d54c080683b08582dc53fa63811cf0782604f --- M pywikibot/__init__.py 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified diff --git a/pywikibot/__init__.py b/pywikibot/__init__.py index 9571873..1191b6e 100644 --- a/pywikibot/__init__.py +++ b/pywikibot/__init__.py @@ -65,12 +65,13 @@ 'getCategoryLinks', 'categoryFormat', 'replaceCategoryLinks', 'removeCategoryLinks', 'removeCategoryLinksAndSeparator', 'replaceCategoryInPlace', 'compileLinkR', 'extract_templates_and_params', +'TimeStripper', ) # pep257 doesn't understand when the first entry is on the next line __all__ = ('config', 'ui', 'UnicodeMixin', 'translate', 'Page', 'FilePage', 'Category', 'Link', 'User', - 'ItemPage', 'PropertyPage', 'Claim', 'TimeStripper', + 'ItemPage', 'PropertyPage', 'Claim', 'html2unicode', 'url2unicode', 'unicode2html', 'stdout', 'output', 'warning', 'error', 'critical', 'debug', 'exception', 'input_choice', 'input', 'input_yn', 'inputChoice', -- To view, visit https://gerrit.wikimedia.org/r/243512 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I197d54c080683b08582dc53fa63811cf0782604f Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: 2.0 Gerrit-Owner: Merlijn van DeenGerrit-Reviewer: John Vandenberg Gerrit-Reviewer: Ladsgroup Gerrit-Reviewer: Xqt Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fixes T114604 - change (mediawiki/core)
Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/243522 Change subject: Fixes T114604 .. Fixes T114604 Change-Id: I4e6ed349ad18648c9ce43ac6613b7fd298dcc293 --- M resources/src/jquery/jquery.tablesorter.js 1 file changed, 13 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/22/243522/1 diff --git a/resources/src/jquery/jquery.tablesorter.js b/resources/src/jquery/jquery.tablesorter.js index 0eefae6..ffc5b7e 100644 --- a/resources/src/jquery/jquery.tablesorter.js +++ b/resources/src/jquery/jquery.tablesorter.js @@ -268,7 +268,7 @@ * @param {jQuery} $table object for a */ function emulateTHeadAndFoot( $table ) { - var $thead, $tfoot, i, len, + var $thead, $tfoot, i, len, tfootAdditions = [], rowspan, ii, $rows = $table.find( '> tbody > tr' ); if ( !$table.get( 0 ).tHead ) { $thead = $( '' ); @@ -287,8 +287,19 @@ len = $rows.length; for ( i = len - 1; i >= 0; i-- ) { if ( $( $rows[ i ] ).children( 'td' ).length ) { - break; + rowspanNum = $( $rows[ i ] ).children( 'td' ).attr( 'rowspan' ); + if ( rowspan !== undefined ) { + for ( ii = parseInt( rowspan ); ii < parseInt( rowspan ).length; ii++ ) { + if ( tfootAdditions.indexOf( i + parseInt( rowspan ) ) !== -1 ) { + tfootAdditions.splice( tfootAdditions.indexOf( i + parseInt( rowspan ) ) ); + } + } + } + continue; } + tfootAdditions.push( i ); + } + for ( i = 0; i < tfootAdditions.length; i++ ) { $tfoot.prepend( $( $rows[ i ] ) ); } $table.append( $tfoot ); -- To view, visit https://gerrit.wikimedia.org/r/243522 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4e6ed349ad18648c9ce43ac6613b7fd298dcc293 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Gerrit Patch UploaderGerrit-Reviewer: Cblair91 ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Database debug log cleanup - change (mediawiki/core)
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/243526 Change subject: Database debug log cleanup .. Database debug log cleanup * Simplify the debug log call and use queries group * Remove $wgDebugDumpSqlLength, as profiler output already has shortened query strings (one can use profiling without DBO_DEBUG) * Removed $wgDebugDBTransactions as BEGIN/COMMIT already show * Removed PostgresTransactionState as it was only used for $wgDebugDBTransactions handling * This cuts down on lots of global variable usage Change-Id: I185adb1694441d074dea965960429b4910727620 --- M RELEASE-NOTES-1.27 M autoload.php M includes/DefaultSettings.php M includes/db/Database.php M includes/db/DatabasePostgres.php M includes/objectcache/SqlBagOStuff.php 6 files changed, 8 insertions(+), 149 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/26/243526/1 diff --git a/RELEASE-NOTES-1.27 b/RELEASE-NOTES-1.27 index 1670552..d82e075 100644 --- a/RELEASE-NOTES-1.27 +++ b/RELEASE-NOTES-1.27 @@ -14,6 +14,8 @@ $wgResourceLoaderMinifierMaxLineLength, because there was little value in making the behavior configurable. The default values (`false` for the former, 1000 for the latter) are now hard-coded. +* $wgDebugDumpSqlLength was removed. +* $wgDebugDBTransactions was removed. === New features in 1.27 === * $wgDataCenterId and $wgDataCenterRoles where added, which will serve as diff --git a/autoload.php b/autoload.php index 9c859b7..413a0f1 100644 --- a/autoload.php +++ b/autoload.php @@ -933,7 +933,6 @@ 'PostgresBlob' => __DIR__ . '/includes/db/DatabasePostgres.php', 'PostgresField' => __DIR__ . '/includes/db/DatabasePostgres.php', 'PostgresInstaller' => __DIR__ . '/includes/installer/PostgresInstaller.php', - 'PostgresTransactionState' => __DIR__ . '/includes/db/DatabasePostgres.php', 'PostgresUpdater' => __DIR__ . '/includes/installer/PostgresUpdater.php', 'Preferences' => __DIR__ . '/includes/Preferences.php', 'PreferencesForm' => __DIR__ . '/includes/Preferences.php', diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 339ae9b..deb85f5 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -5454,13 +5454,6 @@ $wgDebugComments = false; /** - * Extensive database transaction state debugging - * - * @since 1.20 - */ -$wgDebugDBTransactions = false; - -/** * Write SQL queries to the debug log. * * This setting is only used $wgLBFactoryConf['class'] is set to @@ -5469,13 +5462,6 @@ * connection to achieve the same functionality. */ $wgDebugDumpSql = false; - -/** - * Trim logged SQL queries to this many bytes. Set 0/false/null to do no - * trimming. - * @since 1.24 - */ -$wgDebugDumpSqlLength = 500; /** * Performance expectations for DB usage diff --git a/includes/db/Database.php b/includes/db/Database.php index 05d1934..41e6e77 100644 --- a/includes/db/Database.php +++ b/includes/db/Database.php @@ -479,11 +479,7 @@ * - DBO_PERSISTENT: use persistant database connection */ public function setFlag( $flag ) { - global $wgDebugDBTransactions; $this->mFlags |= $flag; - if ( ( $flag & DBO_TRX ) && $wgDebugDBTransactions ) { - wfDebug( "Implicit transactions are now enabled.\n" ); - } } /** @@ -498,11 +494,7 @@ * - DBO_PERSISTENT: use persistant database connection */ public function clearFlag( $flag ) { - global $wgDebugDBTransactions; $this->mFlags &= ~$flag; - if ( ( $flag & DBO_TRX ) && $wgDebugDBTransactions ) { - wfDebug( "Implicit transactions are now disabled.\n" ); - } } /** @@ -607,7 +599,7 @@ * @param array $params Parameters passed from DatabaseBase::factory() */ function __construct( array $params ) { - global $wgDBprefix, $wgDBmwschema, $wgCommandLineMode, $wgDebugDBTransactions; + global $wgDBprefix, $wgDBmwschema, $wgCommandLineMode; $server = $params['host']; $user = $params['user']; @@ -622,14 +614,8 @@ if ( $this->mFlags & DBO_DEFAULT ) { if ( $wgCommandLineMode ) { $this->mFlags &= ~DBO_TRX; - if ( $wgDebugDBTransactions ) { - wfDebug( "Implicit transaction open disabled.\n" ); - } } else { $this->mFlags |= DBO_TRX; - if ( $wgDebugDBTransactions ) { - wfDebug( "Implicit transaction open enabled.\n" ); -
[MediaWiki-commits] [Gerrit] [IMPROV] Optimize/remove unneeded calls to Page.isEmpty() - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: [IMPROV] Optimize/remove unneeded calls to Page.isEmpty() .. [IMPROV] Optimize/remove unneeded calls to Page.isEmpty() A check for Page.isEmpty() is unnecessary as it will never be checked when it would yield True. A sequence of conditions was also optimized (quicker condition check first) when replacing links. Change-Id: Ib68446a77f52f59440d9f50fef416b9bfdb39827 --- M scripts/interwiki.py 1 file changed, 1 insertion(+), 9 deletions(-) Approvals: John Vandenberg: Looks good to me, approved jenkins-bot: Verified diff --git a/scripts/interwiki.py b/scripts/interwiki.py index 9854bc6..f1b314a 100755 --- a/scripts/interwiki.py +++ b/scripts/interwiki.py @@ -1446,14 +1446,6 @@ pywikibot.output(u'File autonomous_problems.dat open or corrupted! Try again with -restore.') sys.exit() iw = () -elif not page.isCategory() and page.isEmpty(): -globalvar.remove.append(unicode(page)) -if not globalvar.quiet: -pywikibot.output(u"NOTE: %s is empty; ignoring it and its interwiki links" - % page) -# Ignore the interwiki links -self.done.remove(page) -iw = () for link in iw: linkedPage = pywikibot.Page(link) @@ -1834,7 +1826,7 @@ except pywikibot.NoPage: pywikibot.output(u"Not editing %s: page does not exist" % page) raise SaveError(u'Page doesn\'t exist') -if page.isEmpty() and not page.isCategory(): +if not page.isCategory() and page.isEmpty(): pywikibot.output(u"Not editing %s: page is empty" % page) raise SaveError(u'Page is empty.') -- To view, visit https://gerrit.wikimedia.org/r/243506 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib68446a77f52f59440d9f50fef416b9bfdb39827 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: 2.0 Gerrit-Owner: Merlijn van DeenGerrit-Reviewer: John Vandenberg Gerrit-Reviewer: Ladsgroup Gerrit-Reviewer: Malafaya Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update version to 0.3.14 - change (mediawiki...Metrolook)
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/243533 Change subject: Update version to 0.3.14 .. Update version to 0.3.14 Backports some changes not all from master branch. Includes changes like new title format Please see changelog for details including rename of configs. Includes fix for toc. Change-Id: I6799e0013c557ed91a72827084841f878a603dec --- A .jshintignore M CHANGELOG.md M Metrolook.i18n.php M Metrolook.php M MetrolookTemplate.php M README.md M js/metrolook.js M js/metrolook.search.js M mobile.less M package.json M screen.less M tablet.less 12 files changed, 288 insertions(+), 411 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Metrolook refs/changes/33/243533/1 diff --git a/.jshintignore b/.jshintignore new file mode 100644 index 000..aea60a1 --- /dev/null +++ b/.jshintignore @@ -0,0 +1 @@ +js/overthrow.js diff --git a/CHANGELOG.md b/CHANGELOG.md index 03a6cc7..8223ab2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,43 @@ ### New features +To set tiles now please do the following + +go to MediaWiki:metrolook-tiles + + +Then add + +for example + +Doint forget to add * in front of the code. It wont work without doing * in fornt of code. + +* URL to the site|alternative text|image URL + +* http://example.com|Example name|http://example.com/example.png + +You can now set different tiles for different languges. + +(for french) + +For example MediaWiki:metrolook-tiles/fr + +Renamed settings + +VectorUseSimpleSearch -> MetrolookUseSimpleSearch + +VectorUseIconWatch -> MetrolookUseIconWatch + + +Remove settings + +$wgMetrolookTile1-10 + +0.3.13 +=== + +### New features + Refractured code in metrolook.js and MetrolookTemplate.php * New metrolook.search.js that holds search js that was in metrolook.js. diff --git a/Metrolook.i18n.php b/Metrolook.i18n.php index dbc536d..ac96828 100644 --- a/Metrolook.i18n.php +++ b/Metrolook.i18n.php @@ -89,22 +89,19 @@ 'metrolook-guest' => 'Meyman', ); -/** - * @author Caliburn - */ -$messages['en-gb'] = array( - 'metrolook-desc' => 'Metrolook skin for MediaWiki', - 'metrolook-guest' => 'Guest', -); - /** English * @author paladox */ $messages['en'] = array( 'skinname-metrolook' => 'Metrolook', + 'metrolook-desc' => 'Metrolook is a [https://en.wikipedia.org/wiki/Metro_(design_language) Metro-inspired] fork of the Vector skin', 'skinmetrolook-collapsiblenav-preference' => 'Enable collapsing of items in the sidebar in Metrolook skin', - 'metrolook-desc' => 'Metrolook skin for MediaWiki', 'metrolook-guest' => 'Guest', + 'metrolook-tiles' => '* http://www.pidgi.net/wiki/|PidgiWiki|http://images.pidgi.net/pidgiwikitiletop.png +* http://www.pidgi.net/press/|PidgiWiki Press|http://images.pidgi.net/pidgipresstiletop.png +* http://www.petalburgwoods.com/|Petalburg Woods|http://images.pidgi.net/pwntiletop.png +* http://burstcade.pidgi.net/|Burstcade|http://images.pidgi.net/burstcadetiletop.png', + 'metrolook-tiles-second' => '', ); /** diff --git a/Metrolook.php b/Metrolook.php index b3794e8..c54397b 100644 --- a/Metrolook.php +++ b/Metrolook.php @@ -26,7 +26,7 @@ 'name' => 'Metrolook', 'namemsg' => 'skinname-metrolook', 'descriptionmsg' => 'metrolook-desc', - 'version' => '0.3.13', + 'version' => '0.3.14', 'url' => 'https://www.mediawiki.org/wiki/Skin:Metrolook', 'author' => array( 'immewnity', 'Paladox', 'Craig Davison', 'lagleki' ), 'license-name' => 'GPLv2+', @@ -70,14 +70,14 @@ * - true = use an icon search button * - false = use Go & Search buttons */ -$GLOBALS['wgVectorUseSimpleSearch'] = true; +$GLOBALS['wgMetrolookUseSimpleSearch'] = true; /** * Watch and unwatch as an icon rather than a link. * - true = use an icon watch/unwatch button * - false = use watch/unwatch text link */ -$GLOBALS['wgVectorUseIconWatch'] = true; +$GLOBALS['wgMetrolookUseIconWatch'] = true; /** * Logo @@ -104,16 +104,7 @@ $GLOBALS['wgMetrolookMobile'] = true; -/* To use tile 5 to 10 please diable this */ $GLOBALS['wgMetrolookBartile'] = true; - -$GLOBALS['wgMetrolookTile1'] = true; - -$GLOBALS['wgMetrolookTile2'] = true; - -$GLOBALS['wgMetrolookTile3'] = true; - -$GLOBALS['wgMetrolookTile4'] = true; // Register modules $GLOBALS['wgResourceModules']['skins.metrolook'] = array( @@ -140,6 +131,7 @@ 'scripts' => array( 'Metrolook/js/collapsibleTabs.js', 'Metrolook/js/metrolook.js', + 'Metrolook/js/metrolook.search.js', 'Metrolook/js/vector.js', 'Metrolook/js/mediawiki.searchSuggest.custom.js', 'Metrolook/js/overthrow.js', diff --git a/MetrolookTemplate.php b/MetrolookTemplate.php index cd40e90..7a1ddc6 100644 --- a/MetrolookTemplate.php +++ b/MetrolookTemplate.php
[MediaWiki-commits] [Gerrit] [i18n] use twn translations - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: [i18n] use twn translations .. [i18n] use twn translations self.comment is used without fallback because it contains L10N parts. Fallback may be enabled when a -summary option is provided or settings could be retrieved from a local wiki page. Change-Id: Ic1c69d6531f810560ba930af52db73bfe8c4acaa --- M scripts/checkimages.py 1 file changed, 5 insertions(+), 38 deletions(-) Approvals: John Vandenberg: Looks good to me, approved jenkins-bot: Verified diff --git a/scripts/checkimages.py b/scripts/checkimages.py index 4ab4405..e7c5cbc 100755 --- a/scripts/checkimages.py +++ b/scripts/checkimages.py @@ -155,25 +155,6 @@ 'zh': [u'{{no source', u'{{unknown', u'{{No license'], } -# Summary for when the will add the no source -msg_comm = { -'ar': u'بوت: التعليم على ملف مرفوع حديثا غير موسوم', -'commons': u'Bot: Marking newly uploaded untagged file', -'de': u'Bot: Markiere mit {{[[Wikipedia:Dateiüberprüfung/Anleitung|DÜP]]}},' - u' da keine Lizenzvorlage gefunden — bitte nicht entfernen,' - u' Informationen bald auf der Benutzerdiskussion des Uploaders.', -'en': u'Bot: Marking newly uploaded untagged file', -'fa': u'ربات: حق تکثیر تصویر تازه بارگذاری شده نامعلوم است.', -'ga': u'Róbó: Ag márcáil comhad nua-uaslódáilte gan ceadúnas', -'hu': u'Robot: Frissen feltöltött licencsablon nélküli fájl megjelölése', -'it': u"Bot: Aggiungo unverified", -'ja': u'ロボットによる:著作権情報なしの画像をタグ', -'ko': u'로봇:라이선스 없음', -'ta': u'தானியங்கி:காப்புரிமை வழங்கப்படா படிமத்தை சுட்டுதல்', -'ur': u'روبالہ:نشان زدگی جدید زبراثقال شدہ املاف', -'zh': u'機器人:標示新上傳且未包含必要資訊的檔案', -} - # When the Bot find that the usertalk is empty is not pretty to put only the # no source without the welcome, isn't it? empty = { @@ -192,23 +173,6 @@ 'ta': u'{{welcome}}\n\n', 'ur': u'{{خوش آمدید}}\n\n', 'zh': u'{{subst:welcome|sign=}}', -} - -# Summary that the bot use when it notify the problem with the image's license -msg_comm2 = { -'ar': u'بوت: طلب معلومات المصدر.', -'commons': u'Bot: Requesting source information.', -'de': u'Bot: Benachrichtigung über Lizenzprobleme', -'en': u'Robot: Requesting source information.', -'fa': u'ربات: درخواست منبع تصویر', -'ga': u'Róbó: Ag iarraidh eolais foinse.', -'it': u"Bot: Notifico l'unverified", -'hu': u'Robot: Forrásinformáció kérése', -'ja': u'ロボットによる:著作権情報明記のお願い', -'ko': u'로봇:라이선스 정보 요청', -'ta': u'தானியங்கி:மூலம் வழங்கப்படா படிமத்தை சுட்டுதல்', -'ur': u'روبالہ:درخواست ماخذ تصویر', -'zh': u'機器人:告知用戶', } # if the file has an unknown extension it will be tagged with this template. @@ -618,7 +582,9 @@ for tmp in hiddentemplatesRaw]) self.pageHidden = i18n.translate(self.site, PageWithHiddenTemplates) self.pageAllowed = i18n.translate(self.site, PageWithAllowedTemplates) -self.comment = i18n.translate(self.site, msg_comm, fallback=True) +self.comment = i18n.twtranslate(self.site, +'checkimages-source-tag-comment', +fallback=False) # Adding the bot's nickname at the notification text if needed. self.bots = i18n.translate(self.site, bot_list) if self.bots: @@ -774,7 +740,8 @@ def put_mex_in_talk(self): """Function to put the warning in talk page of the uploader.""" -commento2 = i18n.translate(self.site, msg_comm2, fallback=True) +commento2 = i18n.twtranslate(self.site, + 'checkimages-source-notice-comment') emailPageName = i18n.translate(self.site, emailPageWithText) emailSubj = i18n.translate(self.site, emailSubject) if self.notification2: -- To view, visit https://gerrit.wikimedia.org/r/239664 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic1c69d6531f810560ba930af52db73bfe8c4acaa Gerrit-PatchSet: 2 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: XqtGerrit-Reviewer: John Vandenberg Gerrit-Reviewer: Ladsgroup Gerrit-Reviewer: XZise Gerrit-Reviewer: Xqt Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fail gracefully if SiteLink not found in ParserOutputDataUpd... - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Fail gracefully if SiteLink not found in ParserOutputDataUpdater .. Fail gracefully if SiteLink not found in ParserOutputDataUpdater Bug: T114576 Change-Id: I4f0578065cfa357dff56c98043fd8a0f9b93dfe1 --- M client/includes/ParserOutputDataUpdater.php M client/tests/phpunit/includes/ParserOutputDataUpdaterTest.php 2 files changed, 55 insertions(+), 7 deletions(-) Approvals: JanZerebecki: Looks good to me, approved jenkins-bot: Verified diff --git a/client/includes/ParserOutputDataUpdater.php b/client/includes/ParserOutputDataUpdater.php index da47ad0..774659f 100644 --- a/client/includes/ParserOutputDataUpdater.php +++ b/client/includes/ParserOutputDataUpdater.php @@ -118,13 +118,28 @@ } if ( $itemId ) { - /** @var Item $item */ - $item = $this->entityLookup->getEntity( $itemId ); - $siteLink = $item->getSiteLinkList()->getBySiteId( $this->siteId ); + $this->setBadgesProperty( $itemId, $out ); + } + } - foreach ( $siteLink->getBadges() as $badge ) { - $out->setProperty( 'wikibase-badge-' . $badge->getSerialization(), true ); - } + private function setBadgesProperty( ItemId $itemId, ParserOutput $out ) { + /** @var Item $item */ + $item = $this->entityLookup->getEntity( $itemId ); + + if ( !$item->getSiteLinkList()->hasLinkWithSiteId( $this->siteId ) ) { + // Probably some sort of race condition or data inconsistency, better log a warning + wfLogWarning( + 'According to a SiteLinkLookup ' . $itemId->getSerialization() . + ' is linked to ' . $this->siteId . ' while it apparently is not.' + ); + + return; + } + + $siteLink = $item->getSiteLinkList()->getBySiteId( $this->siteId ); + + foreach ( $siteLink->getBadges() as $badge ) { + $out->setProperty( 'wikibase-badge-' . $badge->getSerialization(), true ); } } diff --git a/client/tests/phpunit/includes/ParserOutputDataUpdaterTest.php b/client/tests/phpunit/includes/ParserOutputDataUpdaterTest.php index af2f10e..f2d93a5 100644 --- a/client/tests/phpunit/includes/ParserOutputDataUpdaterTest.php +++ b/client/tests/phpunit/includes/ParserOutputDataUpdaterTest.php @@ -11,6 +11,7 @@ use Wikibase\Client\Usage\ParserOutputUsageAccumulator; use Wikibase\DataModel\Entity\Item; use Wikibase\DataModel\Entity\ItemId; +use Wikibase\DataModel\SiteLinkList; use Wikibase\Test\MockRepository; /** @@ -203,7 +204,7 @@ $this->assertTrue( $parserOutput->getProperty( 'wikibase-badge-Q17' ) ); } - public function testUpdateBadgesPropertyRemovesPreviousData() { + public function testUpdateBadgesProperty_removesPreviousData() { $parserOutput = new ParserOutput(); $parserOutput->setProperty( 'wikibase-badge-Q17', true ); @@ -215,4 +216,36 @@ $this->assertFalse( $parserOutput->getProperty( 'wikibase-badge-Q17' ) ); } + public function testUpdateBadgesProperty_inconsistentSiteLinkLookup() { + $parserOutput = new ParserOutput(); + + $title = Title::newFromText( 'Foo sr' ); + + $siteLinkLookup = new MockRepository(); + $mockRepoNoSiteLinks = new MockRepository(); + foreach ( $this->getItems() as $item ) { + $siteLinkLookup->putEntity( $item ); + + $itemNoSiteLinks = unserialize( serialize( $item ) ); + $itemNoSiteLinks->setSiteLinkList( new SiteLinkList() ); + + $mockRepoNoSiteLinks->putEntity( $itemNoSiteLinks ); + } + + $parserOutputDataUpdater = new ParserOutputDataUpdater( + $this->getOtherProjectsSidebarGeneratorFactory( array() ), + $siteLinkLookup, + $mockRepoNoSiteLinks, + 'srwiki' + ); + + // Suppress warnings as this is supposed to throw one. + \MediaWiki\suppressWarnings(); + $parserOutputDataUpdater->updateBadgesProperty( $title, $parserOutput ); + \MediaWiki\restoreWarnings(); + + // Stuff didn't blow up + $this->assertTrue( true ); + } + } -- To view, visit https://gerrit.wikimedia.org/r/243398 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id:
[MediaWiki-commits] [Gerrit] ve.ui.MWParameterPage: Use more natural DOM order for text f... - change (mediawiki...VisualEditor)
Bartosz Dziewoński has uploaded a new change for review. https://gerrit.wikimedia.org/r/243527 Change subject: ve.ui.MWParameterPage: Use more natural DOM order for text field and buttons .. ve.ui.MWParameterPage: Use more natural DOM order for text field and buttons OO.ui.BookletLayout does not respect tabindices when trying to focus the first focusable element after a page is switched. Remove the need for manually set tabindices in ve.ui.MWTemplateDialog by using natural DOM order and absolutely positioning things to keep current design. Bug: T114562 Change-Id: I7a18a455f9fa80eb3d2ea17bff8139e0194c0fbf --- M modules/ve-mw/ui/dialogs/ve.ui.MWTemplateDialog.js M modules/ve-mw/ui/pages/ve.ui.MWParameterPage.js M modules/ve-mw/ui/themes/default/pages/ve.ui.MWParameterPage.css 3 files changed, 5 insertions(+), 19 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/27/243527/1 diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWTemplateDialog.js b/modules/ve-mw/ui/dialogs/ve.ui.MWTemplateDialog.js index f665c62..8e55a0a 100644 --- a/modules/ve-mw/ui/dialogs/ve.ui.MWTemplateDialog.js +++ b/modules/ve-mw/ui/dialogs/ve.ui.MWTemplateDialog.js @@ -213,22 +213,6 @@ } else { this.onAddParameterBeforeLoad( page ); } - - // Recalculate tab indexes - this.$body.find( '.ve-ui-mwParameterPage' ).each( function ( index ) { - $( this ) - .find( '.ve-ui-mwParameterPage-field > .oo-ui-textInputWidget > textarea' ) - .attr( 'tabindex', index * 3 + 1 ) - .end() - .find( '.ve-ui-mwParameterPage-infoButton > a' ) - .attr( 'tabindex', index * 3 + 2 ) - .end() - .find( '.ve-ui-mwParameterPage-removeButton > a' ) - .attr( 'tabindex', index * 3 + 3 ) - .end() - .find( '.ve-ui-mwParameterPage-more a' ) - .attr( 'tabindex', index * 3 + 4 ); - } ); }; /** diff --git a/modules/ve-mw/ui/pages/ve.ui.MWParameterPage.js b/modules/ve-mw/ui/pages/ve.ui.MWParameterPage.js index b852e87..569641c 100644 --- a/modules/ve-mw/ui/pages/ve.ui.MWParameterPage.js +++ b/modules/ve-mw/ui/pages/ve.ui.MWParameterPage.js @@ -110,7 +110,7 @@ .focus( this.onAddButtonFocus.bind( this ) ); this.$element .addClass( 've-ui-mwParameterPage' ) - .append( this.$info, this.$actions, this.$field, this.$more ); + .append( this.$info, this.$field, this.$actions, this.$more ); this.$description .addClass( 've-ui-mwParameterPage-description' ) .append( $( '' ).text( this.spec.getParameterDescription( paramName ) || '' ) ); diff --git a/modules/ve-mw/ui/themes/default/pages/ve.ui.MWParameterPage.css b/modules/ve-mw/ui/themes/default/pages/ve.ui.MWParameterPage.css index 44baaf3..e323dbd 100644 --- a/modules/ve-mw/ui/themes/default/pages/ve.ui.MWParameterPage.css +++ b/modules/ve-mw/ui/themes/default/pages/ve.ui.MWParameterPage.css @@ -8,6 +8,7 @@ .ve-ui-mwParameterPage.oo-ui-pageLayout { padding-top: 0; padding-bottom: 0; + position: relative; } .ve-ui-mwParameterPage.oo-ui-pageLayout:last-of-type { @@ -29,9 +30,10 @@ } .ve-ui-mwParameterPage-actions { - float: right; cursor: default; - padding-right: 2.5em; + position: absolute; + top: 0; + right: 4em; /* 1.5em for PanelLayout's padding + 2.5em */ width: 20%; text-align: right; -webkit-box-sizing: border-box; -- To view, visit https://gerrit.wikimedia.org/r/243527 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7a18a455f9fa80eb3d2ea17bff8139e0194c0fbf Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Bartosz Dziewoński___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VE: Require RESTBase instead of Parsoid and expose the neede... - change (mediawiki/vagrant)
Mobrovac has uploaded a new change for review. https://gerrit.wikimedia.org/r/243530 Change subject: VE: Require RESTBase instead of Parsoid and expose the needed ports .. VE: Require RESTBase instead of Parsoid and expose the needed ports This patch switches the visualeditor role to use directly RESTBase instead of Parsoid. It also makes Vagrant expose the ports of the services used by VE - Citoid, RESTBase and Parsoid. Also in this patch: expose Parsoid's port when its role is enabled. Do the same for RESTBase, since it uses Parsoid behind the scenes. Bug: T111223 Change-Id: Iffeb34085ca51e29bc2768acdc631f4bbee2f601 --- M puppet/modules/role/manifests/visualeditor.pp A puppet/modules/role/settings/parsoid.yaml M puppet/modules/role/settings/restbase.yaml A puppet/modules/role/settings/visualeditor.yaml 4 files changed, 8 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant refs/changes/30/243530/1 diff --git a/puppet/modules/role/manifests/visualeditor.pp b/puppet/modules/role/manifests/visualeditor.pp index f4e7f18..7c8b6a9 100644 --- a/puppet/modules/role/manifests/visualeditor.pp +++ b/puppet/modules/role/manifests/visualeditor.pp @@ -5,7 +5,7 @@ include ::role::cite include ::role::citoid include ::role::parserfunctions -include ::role::parsoid +include ::role::restbase include ::role::scribunto include ::role::templatedata include ::role::uls diff --git a/puppet/modules/role/settings/parsoid.yaml b/puppet/modules/role/settings/parsoid.yaml new file mode 100644 index 000..29b1c17 --- /dev/null +++ b/puppet/modules/role/settings/parsoid.yaml @@ -0,0 +1,2 @@ +forward_ports: + 8000: 8000 diff --git a/puppet/modules/role/settings/restbase.yaml b/puppet/modules/role/settings/restbase.yaml index b260857..78b849e 100644 --- a/puppet/modules/role/settings/restbase.yaml +++ b/puppet/modules/role/settings/restbase.yaml @@ -1,3 +1,3 @@ forward_ports: 7231: 7231 - + 8000: 8000 diff --git a/puppet/modules/role/settings/visualeditor.yaml b/puppet/modules/role/settings/visualeditor.yaml new file mode 100644 index 000..78e6262 --- /dev/null +++ b/puppet/modules/role/settings/visualeditor.yaml @@ -0,0 +1,4 @@ +forward_ports: + 1970: 1970 # Citoid + 7231: 7231 # RESTBase + 8000: 8000 # Parsoid -- To view, visit https://gerrit.wikimedia.org/r/243530 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iffeb34085ca51e29bc2768acdc631f4bbee2f601 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: Mobrovac___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Clean up Special:Undelete read-only checks - change (mediawiki/core)
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/243593 Change subject: Clean up Special:Undelete read-only checks .. Clean up Special:Undelete read-only checks * Use the standard SpecialPage method * Show the error when trying to view the form for a page Change-Id: I60a939e7d1a1164db2dc90525a750573be75fbcc --- M includes/specials/SpecialUndelete.php 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/93/243593/1 diff --git a/includes/specials/SpecialUndelete.php b/includes/specials/SpecialUndelete.php index b168b12..00ee327 100644 --- a/includes/specials/SpecialUndelete.php +++ b/includes/specials/SpecialUndelete.php @@ -1210,6 +1210,8 @@ } protected function showHistory() { + $this->checkReadOnly(); + $out = $this->getOutput(); if ( $this->mAllowed ) { $out->addModules( 'mediawiki.special.undelete' ); @@ -1639,9 +1641,7 @@ throw new ErrorPageError( 'undelete-error', 'filedelete-maintenance' ); } - if ( wfReadOnly() ) { - throw new ReadOnlyError; - } + $this->checkReadOnly(); $out = $this->getOutput(); $archive = new PageArchive( $this->mTargetObj, $this->getConfig() ); -- To view, visit https://gerrit.wikimedia.org/r/243593 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I60a939e7d1a1164db2dc90525a750573be75fbcc Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Switch "npm test" to Grunt - change (mediawiki...WikibaseQualityConstraints)
jenkins-bot has submitted this change and it was merged. Change subject: Switch "npm test" to Grunt .. Switch "npm test" to Grunt Needed for integration with other Grunt-based linters such as grunt-banana-checker, etc. Like commit 4e269b733f60645ed88c035abd4e09258a385e8d for mediawiki/extensions/Wikibase and commit 08bbfb83c2f91aa14fd6e501a7cc6c85e63b284d for mediawiki/extensions/WikibaseQuality Change-Id: Ie28f4156b3c478995bd4621fe155822abda117aa --- A Gruntfile.js M package.json 2 files changed, 24 insertions(+), 3 deletions(-) Approvals: JanZerebecki: Looks good to me, approved Jeroen De Dauw: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 000..d931395 --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,19 @@ +/* jshint node: true, strict: false */ +module.exports = function ( grunt ) { + grunt.loadNpmTasks( 'grunt-contrib-jshint' ); + grunt.loadNpmTasks( 'grunt-jscs' ); + + grunt.initConfig( { + jshint: { + options: { + jshintrc: true + }, + all: '.' + }, + jscs: { + all: '.' + } + } ); + + grunt.registerTask( 'test', [ 'jshint', 'jscs' ] ); +}; diff --git a/package.json b/package.json index d260b86..cf665df 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "WikibaseQualityConstraints", "version": "0.0.0", "scripts": { - "test": "jshint . && jscs ." + "test": "grunt test" }, "repository": { "type": "git", @@ -11,7 +11,9 @@ "author": "BP2014N1", "license": "GPL-2.0+", "devDependencies": { - "jscs": ">=2.0", - "jshint": "" + "grunt": "0.4.5", + "grunt-cli": "0.1.13", + "grunt-contrib-jshint": "0.11.3", + "grunt-jscs": "2.1.0" } } -- To view, visit https://gerrit.wikimedia.org/r/243485 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie28f4156b3c478995bd4621fe155822abda117aa Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikibaseQualityConstraints Gerrit-Branch: master Gerrit-Owner: RicordisamoaGerrit-Reviewer: JanZerebecki Gerrit-Reviewer: Jeroen De Dauw Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Switch "npm test" to Grunt - change (mediawiki...WikibaseQualityExternalValidation)
jenkins-bot has submitted this change and it was merged. Change subject: Switch "npm test" to Grunt .. Switch "npm test" to Grunt Needed for integration with other Grunt-based linters such as grunt-banana-checker, etc. Like commit 4e269b733f60645ed88c035abd4e09258a385e8d for mediawiki/extensions/Wikibase and commit 08bbfb83c2f91aa14fd6e501a7cc6c85e63b284d for mediawiki/extensions/WikibaseQuality Change-Id: Ibd4cea3b698b834ab6a1e83c2f0dbd6253a0 --- A Gruntfile.js M package.json 2 files changed, 25 insertions(+), 4 deletions(-) Approvals: JanZerebecki: Looks good to me, approved Jeroen De Dauw: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 000..d931395 --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,19 @@ +/* jshint node: true, strict: false */ +module.exports = function ( grunt ) { + grunt.loadNpmTasks( 'grunt-contrib-jshint' ); + grunt.loadNpmTasks( 'grunt-jscs' ); + + grunt.initConfig( { + jshint: { + options: { + jshintrc: true + }, + all: '.' + }, + jscs: { + all: '.' + } + } ); + + grunt.registerTask( 'test', [ 'jshint', 'jscs' ] ); +}; diff --git a/package.json b/package.json index b7ea5e1..dc9d960 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "WikibaseQualityExternalValidation", "version": "0.0.0", "scripts": { - "test": "jshint . && jscs ." + "test": "grunt test" }, "repository": { "type": "git", @@ -11,7 +11,9 @@ "author": "BP2014N1", "license": "GPL-2.0+", "devDependencies": { - "jscs": "", - "jshint": "" + "grunt": "0.4.5", + "grunt-cli": "0.1.13", + "grunt-contrib-jshint": "0.11.3", + "grunt-jscs": "2.1.0" } -} \ No newline at end of file +} -- To view, visit https://gerrit.wikimedia.org/r/243486 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibd4cea3b698b834ab6a1e83c2f0dbd6253a0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikibaseQualityExternalValidation Gerrit-Branch: master Gerrit-Owner: RicordisamoaGerrit-Reviewer: JanZerebecki Gerrit-Reviewer: Jeroen De Dauw Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Break numerous long lines in InfoAction - change (mediawiki/core)
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/243529 Change subject: Break numerous long lines in InfoAction .. Break numerous long lines in InfoAction Change-Id: Ia873dce8aeab3c7ce93610a70fe78034addd39d7 --- M includes/actions/InfoAction.php 1 file changed, 29 insertions(+), 21 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/29/243529/1 diff --git a/includes/actions/InfoAction.php b/includes/actions/InfoAction.php index 9e3fe40..8cb4f1b 100644 --- a/includes/actions/InfoAction.php +++ b/includes/actions/InfoAction.php @@ -139,11 +139,6 @@ $content .= $this->msg( 'pageinfo-footer' )->parse(); } - // Page credits - /*if ( $this->page->exists() ) { - $content .= Html::rawElement( 'div', array( 'id' => 'mw-credits' ), $this->getContributors() ); - }*/ - return $content; } @@ -169,10 +164,13 @@ * @return string The table with the row added */ protected function addRow( $table, $name, $value, $id ) { - return $table . Html::rawElement( 'tr', $id === null ? array() : array( 'id' => 'mw-' . $id ), - Html::rawElement( 'td', array( 'style' => 'vertical-align: top;' ), $name ) . - Html::rawElement( 'td', array(), $value ) - ); + return $table . + Html::rawElement( + 'tr', + $id === null ? array() : array( 'id' => 'mw-' . $id ), + Html::rawElement( 'td', array( 'style' => 'vertical-align: top;' ), $name ) . + Html::rawElement( 'td', array(), $value ) + ); } /** @@ -305,7 +303,8 @@ $policy = $this->page->getRobotPolicy( 'view', $pOutput ); $pageInfo['header-basic'][] = array( // Messages: pageinfo-robot-index, pageinfo-robot-noindex - $this->msg( 'pageinfo-robot-policy' ), $this->msg( "pageinfo-robot-${policy['index']}" ) + $this->msg( 'pageinfo-robot-policy' ), + $this->msg( "pageinfo-robot-${policy['index']}" ) ); $unwatchedPageThreshold = $config->get( 'UnwatchedPageThreshold' ); @@ -371,7 +370,8 @@ // Subpages of this page, if subpages are enabled for the current NS if ( MWNamespace::hasSubpages( $title->getNamespace() ) ) { - $prefixIndex = SpecialPage::getTitleFor( 'Prefixindex', $title->getPrefixedText() . '/' ); + $prefixIndex = SpecialPage::getTitleFor( + 'Prefixindex', $title->getPrefixedText() . '/' ); $pageInfo['header-basic'][] = array( Linker::link( $prefixIndex, $this->msg( 'pageinfo-subpages-name' )->escaped() ), $this->msg( 'pageinfo-subpages-value' ) @@ -421,7 +421,8 @@ $sources = $title->getCascadeProtectionSources(); // Array deferencing is in PHP 5.4 :( foreach ( $sources[0] as $sourceTitle ) { - $cascadingFrom .= Html::rawElement( 'li', array(), Linker::linkKnown( $sourceTitle ) ); + $cascadingFrom .= Html::rawElement( + 'li', array(), Linker::linkKnown( $sourceTitle ) ); } $cascadingFrom = Html::rawElement( 'ul', array(), $cascadingFrom ); @@ -529,7 +530,9 @@ $this->msg( 'pageinfo-lasttime' ), Linker::linkKnown( $title, - htmlspecialchars( $lang->userTimeAndDate( $this->page->getTimestamp(), $user ) ), + htmlspecialchars( + $lang->userTimeAndDate( $this->page->getTimestamp(), $user ) + ), array(), array( 'oldid' => $this->page->getLatest() ) ) @@ -550,13 +553,15 @@ // Recent number of edits (within past 30 days) $pageInfo['header-edits'][] = array( - $this->msg( 'pageinfo-recent-edits', $lang->formatDuration( $config->get( 'RCMaxAge' ) ) ), + $this->msg( 'pageinfo-recent-edits', + $lang->formatDuration( $config->get( 'RCMaxAge' ) ) ), $lang->formatNum(
[MediaWiki-commits] [Gerrit] Minor code fixes - change (mediawiki...BreadCrumbs2)
tosfos has uploaded a new change for review. https://gerrit.wikimedia.org/r/243532 Change subject: Minor code fixes .. Minor code fixes * Bring up to coding standards * Fix documentation Change-Id: I42a95690a57e44ade69fecf7cef96469d281848a --- M BreadCrumbs2.php 1 file changed, 104 insertions(+), 70 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BreadCrumbs2 refs/changes/32/243532/1 diff --git a/BreadCrumbs2.php b/BreadCrumbs2.php index af061dc..499050b 100644 --- a/BreadCrumbs2.php +++ b/BreadCrumbs2.php @@ -1,39 +1,39 @@ http://www.ehartwell.com/InfoDabble/BreadCrumbs2) + * @author Ike Hecht * @license Creative Commons Attribution 3.0 -This extension generates "breadcrumbs" in the web navigation sense ("Where am I?") + This extension generates "breadcrumbs" in the web navigation sense ("Where am I?") -To activate the functionality of this extension include the following in your -LocalSettings.php file: - require_once('$IP/extensions/BreadCrumbs2.php'); + To activate the functionality of this extension include the following in your + LocalSettings.php file: + require_once('$IP/extensions/BreadCrumbs2.php'); -Offered to the community for any use whatsoever with no restrictions other -than that credit be given to Eric Hartwell, at least in the source code, -according to the Creative Commons Attribution 3.0 License. -***/ + Offered to the community for any use whatsoever with no restrictions other + than that credit be given to Eric Hartwell, at least in the source code, + according to the Creative Commons Attribution 3.0 License. + */ +// Change these constants to customize your installation +define( 'DELIM', '@' ); // Delimiter/marker for parameters and keywords +define( 'CRUMBPAGE', 'MediaWiki:Breadcrumbs' ); // Default is 'MediaWiki:Breadcrumbs' -# Change these constants to customize your installation -define ("DELIM", '@'); // Delimiter/marker for parameters and keywords -define ("CRUMBPAGE", 'MediaWiki:Breadcrumbs'); // Default is 'MediaWiki:Breadcrumbs' - -# Standard sanity check +// Standard sanity check if ( !defined( 'MEDIAWIKI' ) ) { - echo( "This is an extension to the MediaWiki package and cannot be run standalone.\n" ); - die( -1 ); + echo "This is an extension to the MediaWiki package and cannot be run standalone.\n"; + die( -1 ); } # Credits for Special:Version $wgExtensionCredits['other'][] = array( - 'name' => 'BreadCrumbs2', - 'version' => '0.9', - 'author' => 'Eric Hartwell', - 'url' => 'https://www.mediawiki.org/wiki/Extension:BreadCrumbs2', - 'description' => 'Implements a Breadcrumb navigation based on categories' + 'name' => 'BreadCrumbs2', + 'version' => '0.9.1', + 'author' => 'Eric Hartwell', 'Ike Hecht', + 'url' => 'https://www.mediawiki.org/wiki/Extension:BreadCrumbs2', + 'description' => 'Implements a Breadcrumb navigation based on categories' ); $wgResourceModules['ext.breadcrumbs2'] = array( @@ -52,12 +52,19 @@ return true; } -# This is the main function. Identify the categories for the current page, -# then locate the first match in the navigation list. +/** + * This is the main function. Identify the categories for the current page, + * then locate the first match in the navigation list. + * @global string $wgLogo + * @global string $wgScriptPath + * @param Skin $skin + * @param QuickTemplate $template + * @return boolean + */ function buildBreadcrumbs( $skin, $template ) { # Only show breadcrumbs when viewing the page, not editing, etc. # The following line should perhaps utilize Action::getActionName( $skin->getContext() ); - if ( $skin->getRequest()->getVal( 'action', 'view') != 'view' ) { + if ( $skin->getRequest()->getVal( 'action', 'view' ) != 'view' ) { return true; } @@ -75,41 +82,42 @@ # add current title $breadcrumb = trim( $crumbs[0] . ' ' . $title->getText() ); - $breadcrumbHTML = Xml::openElement( 'div', array ( 'id' => 'breadcrumbs2' ) ) . $breadcrumb . Xml::closeElement( 'div' ); + $breadcrumbHTML = Xml::openElement( 'div', array( 'id' => 'breadcrumbs2' ) ) . $breadcrumb . + Xml::closeElement( 'div' ); $skin->getOutput()->prependHTML( $breadcrumbHTML ); # If the current page is a category page, add it to the list # We didn't add it before because we don't want Category > Category' $pagecat = strstr( $title->getPrefixedText(), 'Category:' ); - if ( $pagecat !== FALSE ) - $categories[] = substr( $pagecat, strlen('Category:') ); - # If it's not a category page, try for an exact match of the title (e.g. 'Main') - else + if ( $pagecat !== false ) { +
[MediaWiki-commits] [Gerrit] Update version to 0.3.14 - change (mediawiki...Metrolook)
jenkins-bot has submitted this change and it was merged. Change subject: Update version to 0.3.14 .. Update version to 0.3.14 Backports some changes not all from master branch. Includes changes like new title format Please see changelog for details including rename of configs. Includes fix for toc. Change-Id: I6799e0013c557ed91a72827084841f878a603dec --- A .jshintignore M CHANGELOG.md M Metrolook.i18n.php M Metrolook.php M MetrolookTemplate.php M README.md M js/metrolook.js M js/metrolook.search.js M mobile.less M package.json M screen.less M tablet.less 12 files changed, 288 insertions(+), 411 deletions(-) Approvals: Paladox: Looks good to me, approved jenkins-bot: Verified diff --git a/.jshintignore b/.jshintignore new file mode 100644 index 000..aea60a1 --- /dev/null +++ b/.jshintignore @@ -0,0 +1 @@ +js/overthrow.js diff --git a/CHANGELOG.md b/CHANGELOG.md index 03a6cc7..8223ab2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,43 @@ ### New features +To set tiles now please do the following + +go to MediaWiki:metrolook-tiles + + +Then add + +for example + +Doint forget to add * in front of the code. It wont work without doing * in fornt of code. + +* URL to the site|alternative text|image URL + +* http://example.com|Example name|http://example.com/example.png + +You can now set different tiles for different languges. + +(for french) + +For example MediaWiki:metrolook-tiles/fr + +Renamed settings + +VectorUseSimpleSearch -> MetrolookUseSimpleSearch + +VectorUseIconWatch -> MetrolookUseIconWatch + + +Remove settings + +$wgMetrolookTile1-10 + +0.3.13 +=== + +### New features + Refractured code in metrolook.js and MetrolookTemplate.php * New metrolook.search.js that holds search js that was in metrolook.js. diff --git a/Metrolook.i18n.php b/Metrolook.i18n.php index dbc536d..ac96828 100644 --- a/Metrolook.i18n.php +++ b/Metrolook.i18n.php @@ -89,22 +89,19 @@ 'metrolook-guest' => 'Meyman', ); -/** - * @author Caliburn - */ -$messages['en-gb'] = array( - 'metrolook-desc' => 'Metrolook skin for MediaWiki', - 'metrolook-guest' => 'Guest', -); - /** English * @author paladox */ $messages['en'] = array( 'skinname-metrolook' => 'Metrolook', + 'metrolook-desc' => 'Metrolook is a [https://en.wikipedia.org/wiki/Metro_(design_language) Metro-inspired] fork of the Vector skin', 'skinmetrolook-collapsiblenav-preference' => 'Enable collapsing of items in the sidebar in Metrolook skin', - 'metrolook-desc' => 'Metrolook skin for MediaWiki', 'metrolook-guest' => 'Guest', + 'metrolook-tiles' => '* http://www.pidgi.net/wiki/|PidgiWiki|http://images.pidgi.net/pidgiwikitiletop.png +* http://www.pidgi.net/press/|PidgiWiki Press|http://images.pidgi.net/pidgipresstiletop.png +* http://www.petalburgwoods.com/|Petalburg Woods|http://images.pidgi.net/pwntiletop.png +* http://burstcade.pidgi.net/|Burstcade|http://images.pidgi.net/burstcadetiletop.png', + 'metrolook-tiles-second' => '', ); /** diff --git a/Metrolook.php b/Metrolook.php index b3794e8..c54397b 100644 --- a/Metrolook.php +++ b/Metrolook.php @@ -26,7 +26,7 @@ 'name' => 'Metrolook', 'namemsg' => 'skinname-metrolook', 'descriptionmsg' => 'metrolook-desc', - 'version' => '0.3.13', + 'version' => '0.3.14', 'url' => 'https://www.mediawiki.org/wiki/Skin:Metrolook', 'author' => array( 'immewnity', 'Paladox', 'Craig Davison', 'lagleki' ), 'license-name' => 'GPLv2+', @@ -70,14 +70,14 @@ * - true = use an icon search button * - false = use Go & Search buttons */ -$GLOBALS['wgVectorUseSimpleSearch'] = true; +$GLOBALS['wgMetrolookUseSimpleSearch'] = true; /** * Watch and unwatch as an icon rather than a link. * - true = use an icon watch/unwatch button * - false = use watch/unwatch text link */ -$GLOBALS['wgVectorUseIconWatch'] = true; +$GLOBALS['wgMetrolookUseIconWatch'] = true; /** * Logo @@ -104,16 +104,7 @@ $GLOBALS['wgMetrolookMobile'] = true; -/* To use tile 5 to 10 please diable this */ $GLOBALS['wgMetrolookBartile'] = true; - -$GLOBALS['wgMetrolookTile1'] = true; - -$GLOBALS['wgMetrolookTile2'] = true; - -$GLOBALS['wgMetrolookTile3'] = true; - -$GLOBALS['wgMetrolookTile4'] = true; // Register modules $GLOBALS['wgResourceModules']['skins.metrolook'] = array( @@ -140,6 +131,7 @@ 'scripts' => array( 'Metrolook/js/collapsibleTabs.js', 'Metrolook/js/metrolook.js', + 'Metrolook/js/metrolook.search.js', 'Metrolook/js/vector.js', 'Metrolook/js/mediawiki.searchSuggest.custom.js', 'Metrolook/js/overthrow.js', diff --git a/MetrolookTemplate.php b/MetrolookTemplate.php index cd40e90..7a1ddc6 100644 --- a/MetrolookTemplate.php +++ b/MetrolookTemplate.php @@ -33,6 +33,52 @@ /** @var string
[MediaWiki-commits] [Gerrit] Remove unused checkExecutePermissions() return value - change (mediawiki...ListSignup)
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/243591 Change subject: Remove unused checkExecutePermissions() return value .. Remove unused checkExecutePermissions() return value Change-Id: I9827a34ab0770f5a097df31fd15aec7bf00fed5d --- M specials/SpecialListSignupPurge.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ListSignup refs/changes/91/243591/1 diff --git a/specials/SpecialListSignupPurge.php b/specials/SpecialListSignupPurge.php index ad392c5..8706d92 100644 --- a/specials/SpecialListSignupPurge.php +++ b/specials/SpecialListSignupPurge.php @@ -20,7 +20,7 @@ if ( !$this->getUser()->isAllowed( 'purgelistsignupdisplay' ) ) { throw new PermissionsError( 'purgelistsignupdisplay' ); } - return parent::checkExecutePermissions( $user ); + parent::checkExecutePermissions( $user ); } protected function alterForm( HTMLForm $form ) { -- To view, visit https://gerrit.wikimedia.org/r/243591 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9827a34ab0770f5a097df31fd15aec7bf00fed5d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ListSignup Gerrit-Branch: master Gerrit-Owner: Aaron Schulz___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove return value from FormSpecialPage::checkExecutePermis... - change (mediawiki/core)
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/243590 Change subject: Remove return value from FormSpecialPage::checkExecutePermissions .. Remove return value from FormSpecialPage::checkExecutePermissions It is unused and few callers comply with it Change-Id: I3ac02ca996b57bf006712cc988a064dc38e5 --- M includes/specialpage/FormSpecialPage.php M includes/specials/SpecialPasswordReset.php 2 files changed, 1 insertion(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/90/243590/1 diff --git a/includes/specialpage/FormSpecialPage.php b/includes/specialpage/FormSpecialPage.php index 42c5980..d22875b 100644 --- a/includes/specialpage/FormSpecialPage.php +++ b/includes/specialpage/FormSpecialPage.php @@ -169,7 +169,6 @@ * Failures here must throw subclasses of ErrorPageError. * @param User $user * @throws UserBlockedError -* @return bool True */ protected function checkExecutePermissions( User $user ) { $this->checkPermissions(); @@ -182,8 +181,6 @@ if ( $this->requiresWrite() ) { $this->checkReadOnly(); } - - return true; } /** diff --git a/includes/specials/SpecialPasswordReset.php b/includes/specials/SpecialPasswordReset.php index 9e72807..f1eb8c2 100644 --- a/includes/specials/SpecialPasswordReset.php +++ b/includes/specials/SpecialPasswordReset.php @@ -58,7 +58,7 @@ throw new ErrorPageError( 'internalerror', 'resetpass_forbidden' ); } - return parent::checkExecutePermissions( $user ); + parent::checkExecutePermissions( $user ); } protected function getFormFields() { -- To view, visit https://gerrit.wikimedia.org/r/243590 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3ac02ca996b57bf006712cc988a064dc38e5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Pass the search term into the SpecialSearchResultsAppend hook - change (mediawiki/core)
Hoo man has uploaded a new change for review. https://gerrit.wikimedia.org/r/243594 Change subject: Pass the search term into the SpecialSearchResultsAppend hook .. Pass the search term into the SpecialSearchResultsAppend hook Very useful to do things that need to know the actual search term (eg. to show further things related to that). The old hook supported that as well, as documented on https://www.mediawiki.org/wiki/Manual:Hooks/SpecialSearchResultsAppend That hook has been re-introduced with e7551f16 Change-Id: I7ac6ad95b29f9da0802eb3340e27b8683bf9f76d --- M docs/hooks.txt M includes/specials/SpecialSearch.php 2 files changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/94/243594/1 diff --git a/docs/hooks.txt b/docs/hooks.txt index 2d268b8..a36e314 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -2907,6 +2907,7 @@ on the search results page. Useful for including a feedback link. $specialSearch: SpecialSearch object ($this) $output: $wgOut +$term: Search term specified by the user 'SpecialSearchSetupEngine': Allows passing custom data to search engine. $search: SpecialSearch special page object diff --git a/includes/specials/SpecialSearch.php b/includes/specials/SpecialSearch.php index 91e84e4..fc7eeb1 100644 --- a/includes/specials/SpecialSearch.php +++ b/includes/specials/SpecialSearch.php @@ -396,7 +396,7 @@ $out->addHtml( "" ); - Hooks::run( 'SpecialSearchResultsAppend', array( $this, $out ) ); + Hooks::run( 'SpecialSearchResultsAppend', array( $this, $out, $term ) ); } -- To view, visit https://gerrit.wikimedia.org/r/243594 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7ac6ad95b29f9da0802eb3340e27b8683bf9f76d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Hoo man___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [timeline] Update jenkins tests - change (integration/config)
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/243596 Change subject: [timeline] Update jenkins tests .. [timeline] Update jenkins tests Add extension-unittests-generic And remove unneded tests that are covered by the extension-unittests-generic test Change-Id: Iaa8f6c9a70e0b9dd311ac6c4f9695efa5014be8c --- M zuul/layout.yaml 1 file changed, 3 insertions(+), 13 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/96/243596/1 diff --git a/zuul/layout.yaml b/zuul/layout.yaml index ed32a8d..9dad088 100644 --- a/zuul/layout.yaml +++ b/zuul/layout.yaml @@ -7183,21 +7183,11 @@ - name: mediawiki/extensions/timeline template: + - name: extension-unittests-generic + - name: jshint - name: npm check: - - jsonlint - - phplint - - perllint - - php-composer-validate -test: - - phplint - - perllint - - php-composer-validate -gate-and-submit: - - mediawiki-gate - - phplint - - perllint - - php-composer-validate + - name: jsonlint - name: mediawiki/extensions/TitleBlacklist template: -- To view, visit https://gerrit.wikimedia.org/r/243596 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iaa8f6c9a70e0b9dd311ac6c4f9695efa5014be8c Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Paladox___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Test aspects passed to UsageLookup in AffectedPagesFinder - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Test aspects passed to UsageLookup in AffectedPagesFinder .. Test aspects passed to UsageLookup in AffectedPagesFinder As passing the ALL_USAGE is currently broken, but clearly intended (see AffectedPagesFinder::getAffectedPages), I commented that code out. A follow-up will fix it. Change-Id: I20c9f4a4483c74144defa11d631330cf437c1ff2 --- M client/tests/phpunit/includes/Changes/AffectedPagesFinderTest.php 1 file changed, 23 insertions(+), 4 deletions(-) Approvals: Jonas Kress (WMDE): Looks good to me, but someone else must approve JanZerebecki: Looks good to me, approved jenkins-bot: Verified diff --git a/client/tests/phpunit/includes/Changes/AffectedPagesFinderTest.php b/client/tests/phpunit/includes/Changes/AffectedPagesFinderTest.php index fd8784e..327a27c 100644 --- a/client/tests/phpunit/includes/Changes/AffectedPagesFinderTest.php +++ b/client/tests/phpunit/includes/Changes/AffectedPagesFinderTest.php @@ -15,7 +15,6 @@ use Wikibase\DataModel\Entity\ItemId; use Wikibase\DataModel\Entity\PropertyId; use Wikibase\DataModel\Snak\PropertyValueSnak; -use Wikibase\DataModel\Statement\Statement; use Wikibase\ItemChange; use Wikibase\Lib\Store\StorageException; use Wikibase\Test\TestChanges; @@ -67,11 +66,12 @@ return $titleFactory; } - private function getAffectedPagesFinder( array $usage ) { + private function getAffectedPagesFinder( array $usage, array $expectedAspects = array() ) { $usageLookup = $this->getMock( 'Wikibase\Client\Usage\UsageLookup' ); $usageLookup->expects( $this->any() ) ->method( 'getPagesUsing' ) + ->with( $this->anything(), $expectedAspects ) ->will( $this->returnValue( new ArrayIterator( $usage ) ) ); $affectedPagesFinder = new AffectedPagesFinder( @@ -202,6 +202,9 @@ } public function getAffectedUsagesByPageProvider() { + $labelUsageDe = EntityUsage::LABEL_USAGE . '.de'; + $labelUsageEn = EntityUsage::LABEL_USAGE . '.en'; + $changeFactory = TestChanges::getEntityChangeFactory(); $q1 = new ItemId( 'Q1' ); @@ -259,6 +262,7 @@ array( new PageEntityUsages( 1, array( $q1SitelinkUsage ) ), ), + array( EntityUsage::SITELINK_USAGE, EntityUsage::TITLE_USAGE ), array(), // No usages recorded yet $changeFactory->newFromUpdate( ItemChange::ADD, @@ -272,6 +276,7 @@ new PageEntityUsages( 1, array( $q1SitelinkUsage ) ), new PageEntityUsages( 2, array( $q1TitleUsage ) ), ), + array( EntityUsage::SITELINK_USAGE, EntityUsage::TITLE_USAGE ), array( $page1Q1Usages, $page2Q1Usages ), // "1" was recorded to be linked to Q1 and the local title used on page "2" $changeFactory->newFromUpdate( ItemChange::UPDATE, @@ -285,6 +290,7 @@ new PageEntityUsages( 1, array( $q2TitleUsage ) ), new PageEntityUsages( 2, array( $q2TitleUsage, $q2SitelinkUsage ) ), ), + array( EntityUsage::SITELINK_USAGE, EntityUsage::TITLE_USAGE ), array( $page1Q2Usages, $page2Q2Usages ), $changeFactory->newFromUpdate( ItemChange::UPDATE, @@ -298,6 +304,7 @@ new PageEntityUsages( 1, array( $q1SitelinkUsage ) ), new PageEntityUsages( 2, array( $q1SitelinkUsage ) ), ), + array( EntityUsage::SITELINK_USAGE, EntityUsage::TITLE_USAGE ), array(), $changeFactory->newFromUpdate( ItemChange::UPDATE, @@ -311,6 +318,7 @@ new PageEntityUsages( 1, array( $q1SitelinkUsage ) ), new PageEntityUsages( 2, array( $q1SitelinkUsage, $q1TitleUsage ) ), ), + array( EntityUsage::SITELINK_USAGE, EntityUsage::TITLE_USAGE ), array( $page1Q1Usages, $page2Q1Usages ), $changeFactory->newFromUpdate( ItemChange::UPDATE, @@ -324,6 +332,7 @@ array( new PageEntityUsages( 1, array( $q1SitelinkUsage ) ), ), + array(
[MediaWiki-commits] [Gerrit] Require bs4 for IndexPage BasePage tests - change (pywikibot/core)
John Vandenberg has uploaded a new change for review. https://gerrit.wikimedia.org/r/243598 Change subject: Require bs4 for IndexPage BasePage tests .. Require bs4 for IndexPage BasePage tests 458dd0ac introduced tests for BasePage methods to IndexPage, however these tests can only be run when bs4 is available. Change-Id: Ief32075086d36368082283ded8c87cd0e4c0a891 --- M tests/proofreadpage_tests.py 1 file changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/98/243598/1 diff --git a/tests/proofreadpage_tests.py b/tests/proofreadpage_tests.py index 45ad5fc..03ef7d0 100644 --- a/tests/proofreadpage_tests.py +++ b/tests/proofreadpage_tests.py @@ -270,7 +270,7 @@ self.assertEqual(page.namespace(), source.namespace) -class TestBasePageMethodsIndexPage(BasePageMethodsTestBase): +class TestBasePageMethodsIndexPage(IndexPageTestCase, BasePageMethodsTestBase): """Test behavior of ProofreadPage methods inherited from BasePage.""" @@ -289,7 +289,8 @@ self._test_return_datatypes() -class TestLoadRevisionsCachingIndexPage(BasePageLoadRevisionsCachingTestBase): +class TestLoadRevisionsCachingIndexPage(IndexPageTestCase, +BasePageLoadRevisionsCachingTestBase): """Test site.loadrevisions() caching.""" -- To view, visit https://gerrit.wikimedia.org/r/243598 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ief32075086d36368082283ded8c87cd0e4c0a891 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: John Vandenberg___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Start rename of DatabaseBase => Database - change (mediawiki/core)
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/243528 Change subject: Start rename of DatabaseBase => Database .. Start rename of DatabaseBase => Database This gives static method callers the option to use methods like Database::factory() instead of having to use the uglier DatabaseBase::factory(). Change-Id: I61800626b71ad2803a897df060059dbaf8778679 --- M includes/db/Database.php M includes/db/DatabaseMssql.php M includes/db/DatabaseMysqlBase.php M includes/db/DatabaseOracle.php M includes/db/DatabasePostgres.php M includes/db/DatabaseSqlite.php 6 files changed, 10 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/28/243528/1 diff --git a/includes/db/Database.php b/includes/db/Database.php index 05d1934..c1ca59c 100644 --- a/includes/db/Database.php +++ b/includes/db/Database.php @@ -4246,3 +4246,8 @@ } } } + +abstract class Database extends DatabaseBase { + // B/C until nothing type hints for DatabaseBase + // @TODO: finish renaming DatabaseBase => Database +} \ No newline at end of file diff --git a/includes/db/DatabaseMssql.php b/includes/db/DatabaseMssql.php index 354afc5..5acbc6c 100644 --- a/includes/db/DatabaseMssql.php +++ b/includes/db/DatabaseMssql.php @@ -28,7 +28,7 @@ /** * @ingroup Database */ -class DatabaseMssql extends DatabaseBase { +class DatabaseMssql extends Database { protected $mInsertId = null; protected $mLastResult = null; protected $mAffectedRows = null; diff --git a/includes/db/DatabaseMysqlBase.php b/includes/db/DatabaseMysqlBase.php index ac7ce10..988b5e4 100644 --- a/includes/db/DatabaseMysqlBase.php +++ b/includes/db/DatabaseMysqlBase.php @@ -29,7 +29,7 @@ * @since 1.22 * @see Database */ -abstract class DatabaseMysqlBase extends DatabaseBase { +abstract class DatabaseMysqlBase extends Database { /** @var MysqlMasterPos */ protected $lastKnownSlavePos; /** @var string Method to detect slave lag */ diff --git a/includes/db/DatabaseOracle.php b/includes/db/DatabaseOracle.php index ad38c1d..66004ec 100644 --- a/includes/db/DatabaseOracle.php +++ b/includes/db/DatabaseOracle.php @@ -185,7 +185,7 @@ /** * @ingroup Database */ -class DatabaseOracle extends DatabaseBase { +class DatabaseOracle extends Database { /** @var resource */ protected $mLastResult = null; diff --git a/includes/db/DatabasePostgres.php b/includes/db/DatabasePostgres.php index aaa1c6e..f2d1e9f 100644 --- a/includes/db/DatabasePostgres.php +++ b/includes/db/DatabasePostgres.php @@ -291,7 +291,7 @@ /** * @ingroup Database */ -class DatabasePostgres extends DatabaseBase { +class DatabasePostgres extends Database { /** @var resource */ protected $mLastResult = null; diff --git a/includes/db/DatabaseSqlite.php b/includes/db/DatabaseSqlite.php index e909597..77de972 100644 --- a/includes/db/DatabaseSqlite.php +++ b/includes/db/DatabaseSqlite.php @@ -25,7 +25,7 @@ /** * @ingroup Database */ -class DatabaseSqlite extends DatabaseBase { +class DatabaseSqlite extends Database { /** @var bool Whether full text is enabled */ private static $fulltextEnabled = null; -- To view, visit https://gerrit.wikimedia.org/r/243528 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I61800626b71ad2803a897df060059dbaf8778679 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 5124a70..2910654 - change (mediawiki/extensions)
Jenkins-mwext-sync has uploaded a new change for review. https://gerrit.wikimedia.org/r/243531 Change subject: Syncronize VisualEditor: 5124a70..2910654 .. Syncronize VisualEditor: 5124a70..2910654 Change-Id: I677dd98d8ebbf61b52ec110f5802ad4a93e57e54 --- M VisualEditor 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions refs/changes/31/243531/1 diff --git a/VisualEditor b/VisualEditor index 5124a70..2910654 16 --- a/VisualEditor +++ b/VisualEditor -Subproject commit 5124a7075bea9bf6ec0f688edb465e5bb109f597 +Subproject commit 291065459cf2c064d56e69cdeeb9f1e74f6d7325 -- To view, visit https://gerrit.wikimedia.org/r/243531 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I677dd98d8ebbf61b52ec110f5802ad4a93e57e54 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions Gerrit-Branch: master Gerrit-Owner: Jenkins-mwext-sync___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use ve.setProp to set new pages list in MWTemplateTitleInput... - change (mediawiki...VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: Use ve.setProp to set new pages list in MWTemplateTitleInputWidget#getLookupRequest .. Use ve.setProp to set new pages list in MWTemplateTitleInputWidget#getLookupRequest Bug: T113647 Change-Id: I537a235064cf8e95b0e1cde46f3079e0af082e7c --- M modules/ve-mw/ui/widgets/ve.ui.MWTemplateTitleInputWidget.js 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Ferdbold: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ve-mw/ui/widgets/ve.ui.MWTemplateTitleInputWidget.js b/modules/ve-mw/ui/widgets/ve.ui.MWTemplateTitleInputWidget.js index ca78338..274779a 100644 --- a/modules/ve-mw/ui/widgets/ve.ui.MWTemplateTitleInputWidget.js +++ b/modules/ve-mw/ui/widgets/ve.ui.MWTemplateTitleInputWidget.js @@ -83,7 +83,7 @@ titles.push( newPages[ index ].title ); } - response.query.pages = newPages; + ve.setProp( response, 'query', 'pages', newPages ); originalResponse = response; // lie! // Also get descriptions -- To view, visit https://gerrit.wikimedia.org/r/240904 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I537a235064cf8e95b0e1cde46f3079e0af082e7c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Alex MonkGerrit-Reviewer: DLynch Gerrit-Reviewer: Esanders Gerrit-Reviewer: Ferdbold Gerrit-Reviewer: Jforrester Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 5124a70..2910654 - change (mediawiki/extensions)
Jenkins-mwext-sync has submitted this change and it was merged. Change subject: Syncronize VisualEditor: 5124a70..2910654 .. Syncronize VisualEditor: 5124a70..2910654 Change-Id: I677dd98d8ebbf61b52ec110f5802ad4a93e57e54 --- M VisualEditor 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Jenkins-mwext-sync: Verified; Looks good to me, approved diff --git a/VisualEditor b/VisualEditor index 5124a70..2910654 16 --- a/VisualEditor +++ b/VisualEditor -Subproject commit 5124a7075bea9bf6ec0f688edb465e5bb109f597 +Subproject commit 291065459cf2c064d56e69cdeeb9f1e74f6d7325 -- To view, visit https://gerrit.wikimedia.org/r/243531 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I677dd98d8ebbf61b52ec110f5802ad4a93e57e54 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions Gerrit-Branch: master Gerrit-Owner: Jenkins-mwext-syncGerrit-Reviewer: Jenkins-mwext-sync ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 2910654..4eb7a05 - change (mediawiki/extensions)
Jenkins-mwext-sync has uploaded a new change for review. https://gerrit.wikimedia.org/r/243589 Change subject: Syncronize VisualEditor: 2910654..4eb7a05 .. Syncronize VisualEditor: 2910654..4eb7a05 Change-Id: I3f04a9db5b3108f243c001a3fa5d3a8183a0868d --- M VisualEditor 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions refs/changes/89/243589/1 diff --git a/VisualEditor b/VisualEditor index 2910654..4eb7a05 16 --- a/VisualEditor +++ b/VisualEditor -Subproject commit 291065459cf2c064d56e69cdeeb9f1e74f6d7325 +Subproject commit 4eb7a0554b4974b057eb579a91e799b2e84e606f -- To view, visit https://gerrit.wikimedia.org/r/243589 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3f04a9db5b3108f243c001a3fa5d3a8183a0868d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions Gerrit-Branch: master Gerrit-Owner: Jenkins-mwext-sync___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 2910654..4eb7a05 - change (mediawiki/extensions)
Jenkins-mwext-sync has submitted this change and it was merged. Change subject: Syncronize VisualEditor: 2910654..4eb7a05 .. Syncronize VisualEditor: 2910654..4eb7a05 Change-Id: I3f04a9db5b3108f243c001a3fa5d3a8183a0868d --- M VisualEditor 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Jenkins-mwext-sync: Verified; Looks good to me, approved diff --git a/VisualEditor b/VisualEditor index 2910654..4eb7a05 16 --- a/VisualEditor +++ b/VisualEditor -Subproject commit 291065459cf2c064d56e69cdeeb9f1e74f6d7325 +Subproject commit 4eb7a0554b4974b057eb579a91e799b2e84e606f -- To view, visit https://gerrit.wikimedia.org/r/243589 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3f04a9db5b3108f243c001a3fa5d3a8183a0868d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions Gerrit-Branch: master Gerrit-Owner: Jenkins-mwext-syncGerrit-Reviewer: Jenkins-mwext-sync ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] adds static bindings to DT to avoid deprecated shiny js - change (wikidata...dashboard)
Christopher Johnson (WMDE) has submitted this change and it was merged. Change subject: adds static bindings to DT to avoid deprecated shiny js .. adds static bindings to DT to avoid deprecated shiny js Change-Id: I02d9c98eee696832b41b0cd5eae9e971829d2f8e --- M server.R M ui.R 2 files changed, 6 insertions(+), 7 deletions(-) Approvals: Christopher Johnson (WMDE): Verified; Looks good to me, approved diff --git a/server.R b/server.R index 08d8003..33b110e 100644 --- a/server.R +++ b/server.R @@ -19,13 +19,13 @@ updateTabItems(session, "tabs", input$switchtab) }) #Home -latest_frame <- data.frame(tail(wikidata_edits,1), tail(wikidata_active_users,1), tail(wikidata_pages,1),tail(wikidata_gooditems,1),tail(wikidata_facebook,1),tail(wikidata_googleplus,1),tail(wikidata_twitter,1),tail(wikidata_identica,1),tail(wikidata_irc,1)) + latest_frame <- data.frame(tail(wikidata_edits,1), tail(wikidata_active_users,1), tail(wikidata_pages,1),tail(wikidata_gooditems,1),tail(wikidata_facebook,1),tail(wikidata_googleplus,1),tail(wikidata_twitter,1),tail(wikidata_identica,1),tail(wikidata_irc,1)) dt_latest <- data.table(latest_frame) dt_latest <- setnames(dt_latest, c("Date", "Edits", "date.1", "Active Users", "date.2", "Pages", "date.3", "Content Pages", "date.4", "Facebook Likes", "date.5", "Google+ Followers", "date.6","Twitter Followers", "date.7","Identica Followers", "date.8","IRC")) dt_latest <- dt_latest[, list(Date, Edits, `Active Users`,Pages,`Content Pages`,`Facebook Likes`,`Google+ Followers`,`Twitter Followers`,`Identica Followers`,IRC)] df_out <- t(dt_latest) -output$wikidata_daily_summary_table <- renderDataTable( - datatable(df_out, class = "display compact", colnames = c("Property", "Value"), caption = "Statistics Today")) +output$wikidata_daily_summary_table <- DT::renderDataTable( + datatable(df_out, class = "display compact", colnames = c("Property", "Value"), caption = "Statistics Today")) # http://wikiba.se/metrics#RecentEdits wikidata_recent_edits <- wikidata_edits[which(wikidata_edits$date > existing_date - 7),] df_recent_edits <- wikidata_recent_edits[order(wikidata_recent_edits$date, decreasing =TRUE),] @@ -109,8 +109,7 @@ }) aggr_props <- aggregate(wikidata_daily_getclaims_property_use$count, by=list(wikidata_daily_getclaims_property_use$property), FUN = sum) aggr_props_ordered <- aggr_props[order(aggr_props$x, decreasing = TRUE),] -output$wikidata_daily_getclaims_property_use_table <-renderDataTable(aggr_props_ordered, options = list(pageLength = 50)) -# http://wikiba.se/metrics#Edits +output$wikidata_daily_getclaims_property_use_table <-DT::renderDataTable(datatable(aggr_props_ordered, class = "display compact", colnames = c("Property", "Value"), rownames = FALSE, options = list(pageLength = 50, autoWidth = TRUE, columnDefs = list(list(className = 'dt-left', targets = c(0,1)) output$wikidata_edits_plot <- renderDygraph({ make_dygraph(wikidata_edits, "", "Edits", "Wikidata Edits") diff --git a/ui.R b/ui.R index 64b48d8..6f56c26 100644 --- a/ui.R +++ b/ui.R @@ -58,7 +58,7 @@ tabItem(tabName="dashboard", includeMarkdown("./assets/dashboard.md"), selectInput('switchtab', "Metric Selector", c("Home" = "dashboard", "Edits" = "wikidata_edits", "Pages" = "wikidata_pages", "Active Editors" = "wikidata_community_health")), -dataTableOutput("wikidata_daily_summary_table")), +DT::dataTableOutput("wikidata_daily_summary_table")), tabItem(tabName = "wikidata_daily_edits_delta", dygraphOutput("wikidata_daily_edits_delta_plot"), tags$br(), @@ -83,7 +83,7 @@ fluidRow( uiOutput("metric_meta_getclaims_title") ), -dataTableOutput("wikidata_daily_getclaims_property_use_table")), + DT::dataTableOutput("wikidata_daily_getclaims_property_use_table")), tabItem(tabName = "wikidata_edits", fluidRow( infoBoxOutput("editdelta") -- To view, visit https://gerrit.wikimedia.org/r/243592 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I02d9c98eee696832b41b0cd5eae9e971829d2f8e Gerrit-PatchSet: 1 Gerrit-Project: wikidata/analytics/dashboard Gerrit-Branch: master Gerrit-Owner: Christopher Johnson (WMDE)Gerrit-Reviewer: Christopher Johnson (WMDE) ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [FEAT] Support assertAPIError - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: [FEAT] Support assertAPIError .. [FEAT] Support assertAPIError To assert a specific APIError the base class supports `assertAPIError` which wraps around `assertRaises` and additionally checks if the error is of a specific code and optionally a specific info. Like `assertRaises` it can be used as a context manager when additional checks should be done afterwards. Change-Id: Ib211974ec3acd17fb45c2280e084723257a88650 --- M tests/aspects.py M tests/upload_tests.py M tests/utils.py 3 files changed, 72 insertions(+), 6 deletions(-) Approvals: John Vandenberg: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/aspects.py b/tests/aspects.py index 0503077..2dfcc09 100644 --- a/tests/aspects.py +++ b/tests/aspects.py @@ -56,7 +56,7 @@ from tests import unittest, patch_request, unpatch_request from tests.utils import ( add_metaclass, execute_pwb, DrySite, DryRequest, -WarningSourceSkipContextManager, +WarningSourceSkipContextManager, AssertAPIErrorContextManager, ) OSWIN32 = (sys.platform == 'win32') @@ -263,6 +263,33 @@ assertPagelistTitles = assertPageTitlesEqual +def assertAPIError(self, code, info=None, callable_obj=None, *args, + **kwargs): +""" +Assert that a specific APIError wrapped around L{assertRaises}. + +If no callable object is defined and it returns a context manager, that +context manager will return the underlying context manager used by +L{assertRaises}. So it's possible to access the APIError by using it's +C{exception} attribute. + +@param code: The code of the error which must have happened. +@type code: str +@param info: The info string of the error or None if no it shouldn't be +checked. +@type info: str or None +@param callable_obj: The object that will be tested. If None it returns +a context manager like L{assertRaises}. +@type callable_obj: callable +@param args: The positional arguments forwarded to the callable object. +@param kwargs: The keyword arguments forwared to the callable object. +@return: The context manager if callable_obj is None and None otherwise. +@rtype: None or context manager +""" +msg = kwargs.pop('msg', None) +return AssertAPIErrorContextManager( +code, info, msg, self).handle(callable_obj, args, kwargs) + class TestTimerMixin(TestCaseBase): diff --git a/tests/upload_tests.py b/tests/upload_tests.py index a7987d8..7968f01 100644 --- a/tests/upload_tests.py +++ b/tests/upload_tests.py @@ -15,8 +15,6 @@ import pywikibot -from pywikibot.data.api import APIError - from tests import join_images_path from tests.aspects import unittest, TestCase @@ -103,9 +101,8 @@ self._finish_upload(chunk_size, self.sounds_png) # Check if it's still cached -with self.assertRaises(APIError) as cm: +with self.assertAPIError('siiinvalidsessiondata') as cm: self.site.stash_info(self._file_key) -self.assertEqual(cm.exception.code, 'siiinvalidsessiondata') self.assertTrue(cm.exception.info.startswith('File not found'), 'info ({0}) did not start with ' '"File not found"'.format(cm.exception.info)) diff --git a/tests/utils.py b/tests/utils.py index 7cb96d6..6884cb1 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -32,7 +32,7 @@ from pywikibot import config from pywikibot.comms import threadedhttp from pywikibot.site import Namespace -from pywikibot.data.api import CachedRequest +from pywikibot.data.api import CachedRequest, APIError from pywikibot.data.api import Request as _original_Request from pywikibot.tools import ( PYTHON_VERSION, @@ -244,6 +244,48 @@ return log +class AssertAPIErrorContextManager(object): + +""" +Context manager to assert certain APIError exceptions. + +This is build similar to the L{unittest.TestCase.assertError} implementation +which creates an context manager. It then calls L{handle} which either +returns this manager if no executing object given or calls the callable +object. +""" + +def __init__(self, code, info, msg, test_case): +"""Create instance expecting the code and info.""" +self.code = code +self.info = info +self.msg = msg +self.test_case = test_case + +def __enter__(self): +"""Enter this context manager and the unittest's context manager.""" +self.cm = self.test_case.assertRaises(APIError, msg=self.msg) +self.cm.__enter__() +return self.cm + +def __exit__(self, exc_type, exc_value, tb): +"""Exit the context manager and assert code and optionally info.""" +result =
[MediaWiki-commits] [Gerrit] adds static bindings to DT to avoid deprecated shiny js - change (wikidata...dashboard)
Christopher Johnson (WMDE) has uploaded a new change for review. https://gerrit.wikimedia.org/r/243592 Change subject: adds static bindings to DT to avoid deprecated shiny js .. adds static bindings to DT to avoid deprecated shiny js Change-Id: I02d9c98eee696832b41b0cd5eae9e971829d2f8e --- M server.R M ui.R 2 files changed, 6 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikidata/analytics/dashboard refs/changes/92/243592/1 diff --git a/server.R b/server.R index 08d8003..33b110e 100644 --- a/server.R +++ b/server.R @@ -19,13 +19,13 @@ updateTabItems(session, "tabs", input$switchtab) }) #Home -latest_frame <- data.frame(tail(wikidata_edits,1), tail(wikidata_active_users,1), tail(wikidata_pages,1),tail(wikidata_gooditems,1),tail(wikidata_facebook,1),tail(wikidata_googleplus,1),tail(wikidata_twitter,1),tail(wikidata_identica,1),tail(wikidata_irc,1)) + latest_frame <- data.frame(tail(wikidata_edits,1), tail(wikidata_active_users,1), tail(wikidata_pages,1),tail(wikidata_gooditems,1),tail(wikidata_facebook,1),tail(wikidata_googleplus,1),tail(wikidata_twitter,1),tail(wikidata_identica,1),tail(wikidata_irc,1)) dt_latest <- data.table(latest_frame) dt_latest <- setnames(dt_latest, c("Date", "Edits", "date.1", "Active Users", "date.2", "Pages", "date.3", "Content Pages", "date.4", "Facebook Likes", "date.5", "Google+ Followers", "date.6","Twitter Followers", "date.7","Identica Followers", "date.8","IRC")) dt_latest <- dt_latest[, list(Date, Edits, `Active Users`,Pages,`Content Pages`,`Facebook Likes`,`Google+ Followers`,`Twitter Followers`,`Identica Followers`,IRC)] df_out <- t(dt_latest) -output$wikidata_daily_summary_table <- renderDataTable( - datatable(df_out, class = "display compact", colnames = c("Property", "Value"), caption = "Statistics Today")) +output$wikidata_daily_summary_table <- DT::renderDataTable( + datatable(df_out, class = "display compact", colnames = c("Property", "Value"), caption = "Statistics Today")) # http://wikiba.se/metrics#RecentEdits wikidata_recent_edits <- wikidata_edits[which(wikidata_edits$date > existing_date - 7),] df_recent_edits <- wikidata_recent_edits[order(wikidata_recent_edits$date, decreasing =TRUE),] @@ -109,8 +109,7 @@ }) aggr_props <- aggregate(wikidata_daily_getclaims_property_use$count, by=list(wikidata_daily_getclaims_property_use$property), FUN = sum) aggr_props_ordered <- aggr_props[order(aggr_props$x, decreasing = TRUE),] -output$wikidata_daily_getclaims_property_use_table <-renderDataTable(aggr_props_ordered, options = list(pageLength = 50)) -# http://wikiba.se/metrics#Edits +output$wikidata_daily_getclaims_property_use_table <-DT::renderDataTable(datatable(aggr_props_ordered, class = "display compact", colnames = c("Property", "Value"), rownames = FALSE, options = list(pageLength = 50, autoWidth = TRUE, columnDefs = list(list(className = 'dt-left', targets = c(0,1)) output$wikidata_edits_plot <- renderDygraph({ make_dygraph(wikidata_edits, "", "Edits", "Wikidata Edits") diff --git a/ui.R b/ui.R index 64b48d8..6f56c26 100644 --- a/ui.R +++ b/ui.R @@ -58,7 +58,7 @@ tabItem(tabName="dashboard", includeMarkdown("./assets/dashboard.md"), selectInput('switchtab', "Metric Selector", c("Home" = "dashboard", "Edits" = "wikidata_edits", "Pages" = "wikidata_pages", "Active Editors" = "wikidata_community_health")), -dataTableOutput("wikidata_daily_summary_table")), +DT::dataTableOutput("wikidata_daily_summary_table")), tabItem(tabName = "wikidata_daily_edits_delta", dygraphOutput("wikidata_daily_edits_delta_plot"), tags$br(), @@ -83,7 +83,7 @@ fluidRow( uiOutput("metric_meta_getclaims_title") ), -dataTableOutput("wikidata_daily_getclaims_property_use_table")), + DT::dataTableOutput("wikidata_daily_getclaims_property_use_table")), tabItem(tabName = "wikidata_edits", fluidRow( infoBoxOutput("editdelta") -- To view, visit https://gerrit.wikimedia.org/r/243592 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I02d9c98eee696832b41b0cd5eae9e971829d2f8e Gerrit-PatchSet: 1 Gerrit-Project: wikidata/analytics/dashboard Gerrit-Branch: master Gerrit-Owner: Christopher Johnson (WMDE)___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [CentralAuth] Add qunit test - change (integration/config)
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/243595 Change subject: [CentralAuth] Add qunit test .. [CentralAuth] Add qunit test Bug: T110494 Change-Id: I7788da02961b083c226b25044aee216c0946f332 --- M zuul/layout.yaml 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/95/243595/1 diff --git a/zuul/layout.yaml b/zuul/layout.yaml index ed32a8d..e025737 100644 --- a/zuul/layout.yaml +++ b/zuul/layout.yaml @@ -3152,6 +3152,7 @@ - name: mediawiki/extensions/CentralAuth template: + - name: extension-qunit-generic - name: extension-unittests-generic - name: extension-rubylint - name: npm -- To view, visit https://gerrit.wikimedia.org/r/243595 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7788da02961b083c226b25044aee216c0946f332 Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Paladox___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [WikibaseJavaScriptApi] Update jenkins tests - change (integration/config)
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/243597 Change subject: [WikibaseJavaScriptApi] Update jenkins tests .. [WikibaseJavaScriptApi] Update jenkins tests Add tests: - mwext-testextension-zend-composer mwext-testextension-hhvm-composer Bug: T100654 Change-Id: I4140996d42eb1ac6617e0f58db1256fb702fc340 --- M zuul/layout.yaml 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/97/243597/1 diff --git a/zuul/layout.yaml b/zuul/layout.yaml index ed32a8d..d96b695 100644 --- a/zuul/layout.yaml +++ b/zuul/layout.yaml @@ -7472,6 +7472,12 @@ - name: jshint - name: jsonlint - name: extension-unittests +check: + - mwext-testextension-zend-composer + - mwext-testextension-hhvm-composer +gate-and-submit: + - mwext-testextension-zend-composer + - mwext-testextension-hhvm-composer - name: mediawiki/extensions/Wikidata template: -- To view, visit https://gerrit.wikimedia.org/r/243597 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4140996d42eb1ac6617e0f58db1256fb702fc340 Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Paladox___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] site.py: fix intersection of sets of namespaces - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: site.py: fix intersection of sets of namespaces .. site.py: fix intersection of sets of namespaces Bug: T114563 Change-Id: I6c8ce15dffdabe11a49f51d45b04574d8af94f44 (cherry picked from commit 250478a) --- M pywikibot/site.py 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Mpaa: Looks good to me, approved jenkins-bot: Verified Objections: XZise: There's a problem with this change, please improve diff --git a/pywikibot/site.py b/pywikibot/site.py index 312bb39..ffd37fc 100644 --- a/pywikibot/site.py +++ b/pywikibot/site.py @@ -3175,7 +3175,7 @@ excluded_namespaces.add(14) if namespaces: -if excluded_namespaces.intersect(namespaces): +if excluded_namespaces.intersection(namespaces): raise ValueError( 'incompatible namespaces %r and member_type %r' % (namespaces, member_type)) -- To view, visit https://gerrit.wikimedia.org/r/243475 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6c8ce15dffdabe11a49f51d45b04574d8af94f44 Gerrit-PatchSet: 2 Gerrit-Project: pywikibot/core Gerrit-Branch: 2.0 Gerrit-Owner: John VandenbergGerrit-Reviewer: John Vandenberg Gerrit-Reviewer: Ladsgroup Gerrit-Reviewer: Mpaa Gerrit-Reviewer: XZise Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Pass generated content error to inspector - change (VisualEditor/VisualEditor)
Tchanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/243599 Change subject: Pass generated content error to inspector .. Pass generated content error to inspector If an error is returned in generated content, pass it to the inspector so it can be rendered there. Bug: T113172 Change-Id: I6002d9870d2b38275245fbf48f0e19b57c41de01 --- M src/ce/nodes/ve.ce.GeneratedContentNode.js 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/99/243599/1 diff --git a/src/ce/nodes/ve.ce.GeneratedContentNode.js b/src/ce/nodes/ve.ce.GeneratedContentNode.js index 444eb65..66747b1 100644 --- a/src/ce/nodes/ve.ce.GeneratedContentNode.js +++ b/src/ce/nodes/ve.ce.GeneratedContentNode.js @@ -159,6 +159,9 @@ this.$element.remove(); this.$element = $newElements; } + } else { + this.generatedContentsValid = false; + this.model.emit( 'generatedContentsError', $newElements ); } // Update focusable and resizable elements if necessary -- To view, visit https://gerrit.wikimedia.org/r/243599 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6002d9870d2b38275245fbf48f0e19b57c41de01 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Tchanders___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Append error container to inspector - change (mediawiki...Score)
Tchanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/243601 Change subject: Append error container to inspector .. Append error container to inspector Also modify method that formats the error so only the text is appended, with white-space preserved. Additionally make sure the error is always appended to the current card. Depends on Ie84130d4ac0 in VE-MW. Bug: T113172 Change-Id: Id62d60f465f6c2eae7b9f30565a2d07d3247a866 --- M modules/ve-score/ve.ui.MWScoreInspector.css M modules/ve-score/ve.ui.MWScoreInspector.js 2 files changed, 22 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Score refs/changes/01/243601/1 diff --git a/modules/ve-score/ve.ui.MWScoreInspector.css b/modules/ve-score/ve.ui.MWScoreInspector.css index 1b3ec20..0d8ed06 100644 --- a/modules/ve-score/ve.ui.MWScoreInspector.css +++ b/modules/ve-score/ve.ui.MWScoreInspector.css @@ -8,3 +8,7 @@ .ve-ui-mwScoreInspector-content .ve-ui-mwExtensionWindow-input textarea { font-family: monospace, Courier; } + +.ve-ui-mwScoreInspector-content .ve-ui-mwLiveExtensionInspector-error-expanded { + white-space: pre-wrap; +} diff --git a/modules/ve-score/ve.ui.MWScoreInspector.js b/modules/ve-score/ve.ui.MWScoreInspector.js index 2b0f11c..66a053e 100644 --- a/modules/ve-score/ve.ui.MWScoreInspector.js +++ b/modules/ve-score/ve.ui.MWScoreInspector.js @@ -142,8 +142,10 @@ // Initialization this.$content.addClass( 've-ui-mwScoreInspector-content' ); + notationCard.$element.append( inputField.$element, + this.$generatedContentsErrorContainer, langField.$element, rawField.$element ); @@ -195,6 +197,7 @@ this.overrideMidiInput.on( 'change', this.onChangeHandler ); this.overrideOggInput.on( 'change', this.onChangeHandler ); + this.indexLayout.connect( this, { set: 'onCardSet' } ); this.indexLayout.connect( this, { set: 'updateSize' } ); this.langMenu.connect( this, { choose: 'toggleDisableRawCheckbox' } ); this.midiCheckbox.connect( this, { change: 'toggleDisableOverrideMidiInput' } ); @@ -215,6 +218,7 @@ this.overrideMidiInput.off( 'change', this.onChangeHandler ); this.overrideOggInput.off( 'change', this.onChangeHandler ); + this.indexLayout.disconnect( this ); this.langMenu.disconnect( this ); this.midiCheckbox.disconnect( this ); this.vorbisCheckbox.disconnect( this ); @@ -273,6 +277,20 @@ this.overrideOggInput.setDisabled( this.vorbisCheckbox.isSelected() ); }; +/** + * @inheritdoc + */ +ve.ui.MWScoreInspector.prototype.formatGeneratedContentsError = function ( $element ) { + return $element.text(); +}; + +/** + * Append the error to the current card. + */ +ve.ui.MWScoreInspector.prototype.onCardSet = function () { + this.indexLayout.getCurrentCard().$element.append( this.$generatedContentsErrorContainer ); +}; + /* Registration */ ve.ui.windowFactory.register( ve.ui.MWScoreInspector ); -- To view, visit https://gerrit.wikimedia.org/r/243601 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id62d60f465f6c2eae7b9f30565a2d07d3247a866 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Score Gerrit-Branch: master Gerrit-Owner: Tchanders___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Require bs4 for IndexPage BasePage tests - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: Require bs4 for IndexPage BasePage tests .. Require bs4 for IndexPage BasePage tests 458dd0ac introduced tests for BasePage methods to IndexPage, however these tests can only be run when bs4 is available. Change-Id: Ief32075086d36368082283ded8c87cd0e4c0a891 --- M tests/proofreadpage_tests.py 1 file changed, 3 insertions(+), 2 deletions(-) Approvals: XZise: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/proofreadpage_tests.py b/tests/proofreadpage_tests.py index 45ad5fc..03ef7d0 100644 --- a/tests/proofreadpage_tests.py +++ b/tests/proofreadpage_tests.py @@ -270,7 +270,7 @@ self.assertEqual(page.namespace(), source.namespace) -class TestBasePageMethodsIndexPage(BasePageMethodsTestBase): +class TestBasePageMethodsIndexPage(IndexPageTestCase, BasePageMethodsTestBase): """Test behavior of ProofreadPage methods inherited from BasePage.""" @@ -289,7 +289,8 @@ self._test_return_datatypes() -class TestLoadRevisionsCachingIndexPage(BasePageLoadRevisionsCachingTestBase): +class TestLoadRevisionsCachingIndexPage(IndexPageTestCase, +BasePageLoadRevisionsCachingTestBase): """Test site.loadrevisions() caching.""" -- To view, visit https://gerrit.wikimedia.org/r/243598 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ief32075086d36368082283ded8c87cd0e4c0a891 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: John VandenbergGerrit-Reviewer: Ladsgroup Gerrit-Reviewer: XZise Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits