[MediaWiki-commits] [Gerrit] Update ULS RL module - change (mediawiki...TwnMainPage)
jenkins-bot has submitted this change and it was merged. Change subject: Update ULS RL module .. Update ULS RL module Change-Id: I0387579eef54245919cba87dcc43e6fc704c681c --- M Resources.php 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Siebrand: Looks good to me, approved jenkins-bot: Verified diff --git a/Resources.php b/Resources.php index b035125..5e3f840 100644 --- a/Resources.php +++ b/Resources.php @@ -17,6 +17,7 @@ 'ext.translate.groupselector', 'ext.translate.mainpage.icons', 'ext.translate.statsbar', + 'ext.uls.mediawiki', 'ext.uls.interface', 'mediawiki.language', 'mediawiki.Uri', @@ -32,6 +33,7 @@ $wgResourceModules['ext.translate.mainpage.signup'] = array( 'scripts' => 'resources/js/ext.translate.mainpage.signup.js', 'dependencies' => array( + 'ext.uls.mediawiki', 'ext.uls.interface', 'mediawiki.api', 'mediawiki.api.login', -- To view, visit https://gerrit.wikimedia.org/r/94336 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0387579eef54245919cba87dcc43e6fc704c681c Gerrit-PatchSet: 6 Gerrit-Project: mediawiki/extensions/TwnMainPage Gerrit-Branch: master Gerrit-Owner: Santhosh Gerrit-Reviewer: Amire80 Gerrit-Reviewer: Siebrand Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Removed detaching of entityview DOM while initializing - change (mediawiki...Wikibase)
Henning Snater has uploaded a new change for review. https://gerrit.wikimedia.org/r/94861 Change subject: Removed detaching of entityview DOM while initializing .. Removed detaching of entityview DOM while initializing Although detaching the entityview DOM while initializing might result in some minor performance improvements, it prevents proper initialization of elements that need to be in the DOM (e.g. for measuring width) and events issued by the entityview components may not be handled out of it. Change-Id: I6fdfa9fa7f3b4ad88fff2c5475f1cc60cacd6f77 --- M repo/resources/wikibase.ui.entityViewInit.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/61/94861/1 diff --git a/repo/resources/wikibase.ui.entityViewInit.js b/repo/resources/wikibase.ui.entityViewInit.js index e5fae5b..3367066 100644 --- a/repo/resources/wikibase.ui.entityViewInit.js +++ b/repo/resources/wikibase.ui.entityViewInit.js @@ -138,7 +138,7 @@ // FIXME: Initializing entityview on $claims leads to the claim section inserted as // child of $claims. It should be direct child of ".wb-entity". - $claims.detach().entityview( { // take widget subject out of DOM while initializing + $claims.entityview( { value: wb.entity } ).appendTo( $claimsParent ); -- To view, visit https://gerrit.wikimedia.org/r/94861 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6fdfa9fa7f3b4ad88fff2c5475f1cc60cacd6f77 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Henning Snater ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Refactored inputAutoExpand jQuery plugin - change (mediawiki...DataValues)
Henning Snater has uploaded a new change for review. https://gerrit.wikimedia.org/r/94769 Change subject: Refactored inputAutoExpand jQuery plugin .. Refactored inputAutoExpand jQuery plugin (REQUIRES CHANGE I6fdfa9fa7f3b4ad88fff2c5475f1cc60cacd6f77) Extensive clean-up of $.fn.inputAutoExpand. Expanding/contracting width and height should work simultaneously now. Change-Id: I035b54d212dbb1a06d8bb18da95390b27130954b --- M ValueView/resources/jquery/jquery.inputAutoExpand.js M ValueView/tests/qunit/jquery/jquery.inputAutoExpand.tests.js 2 files changed, 667 insertions(+), 574 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DataValues refs/changes/69/94769/2 diff --git a/ValueView/resources/jquery/jquery.inputAutoExpand.js b/ValueView/resources/jquery/jquery.inputAutoExpand.js index ac9624e..292074c 100644 --- a/ValueView/resources/jquery/jquery.inputAutoExpand.js +++ b/ValueView/resources/jquery/jquery.inputAutoExpand.js @@ -1,64 +1,380 @@ /** - * Makes input or textarea elements automatically expand/contract their size according to their - * input while typing. Vertical resizing will of course work for textareas only. + * jQuery.inputAutoExpand plugin * - * Based on autoGrowInput plugin by James Padolsey - * (see: http://stackoverflow.com/questions/931207/is-there-a-jquery-autogrow-plugin-for-text-fields) - * and Autosize plugin by Jack Moore (license: MIT) - * (see: http://www.jacklmoore.com/autosize) + * Makes input or textarea elements automatically expand/contract their size according to their + * input value while typing. Vertical resizing will of course work for textareas only. + * The input/textarea element the plugin is initialized on needs to be in the DOM in order to be + * able to correctly detect the element's native width. + * Compatibility: IE >= 8 + * + * Based on: + * - autoGrowInput plugin by James Padolsey (http://jsbin.com/ahaxe) + * - Autosize plugin by Jack Moore (license: MIT) (http://www.jacklmoore.com/autosize) * * @licence GNU GPL v2+ - * @author Daniel Werner < daniel.wer...@wikimedia.de > * @author H. Snater < mediawiki at snater.com > * - * @since 0.1 (moved from WikibaseLib 0.4 alpha) + * @option expandWidth {boolean} Whether to horizontally expand/contract the input element. + * Default: true * - * @example $( 'input' ).inputAutoExpand(); - * @desc Enhances an input element with horiontal auto-expanding functionality. + * @option expandHeight {boolean} Whether to vertically expand/contract the input element. + * Default: false * - * @example $( 'textarea' ).inputAutoExpand( { expandWidth: false, expandHeight: true } ); - * @desc Enhances an input element with vertical auto-expanding functionality. + * @option maxWidth {number} Maximum width the input element may stretch. + * Default: 1000 * - * @option expandWidth {Boolean} Whether to horizontally expand/contract the input element. - * default: true + * @option minWidth {number} Minimum width. If null, the space required by the input element's + * placeholder text will be determined automatically (taking placeholder into account). + * Default: undefined * - * @option expandHeight {Boolean} Whether to vertically expand/contract the input element. - * default: false + * @option maxHeight {number} Maximum height the input element may stretch. If null, the height is + * not constrained to a maximum. + * Default: undefined * - * @option maxWidth {Number} Maximum width the input element may stretch. - * default: 1000 + * @option minHeight {number} Minimum height. If null, the height is not constrained to a minimum. + * Default: undefined * - * @option minWidth {Number} Minimum width. If not set or false, the space required by the input - * elements placeholder text will be determined automatically (taking placeholder into - * account). - * default: false + * @option comfortZone {number} White space behind the input text to prevent resize jitters while + * typing. If null, an appropriate amount of space will be calculated automatically. + * Default: undefined * - * @option maxHeigth {Number} Maximum height the input element may stretch. Set to false for not - * constraining the height to a maximum. - * default: false + * @option suppressNewLine {boolean} Whether to suppress new-line characters. + * Default: false * - * @option minHeight {Number} Minimum height. Set to false for not constraining the height to a - * minimum. - * default: false - * - * @option comfortZone {Number} White space behind the input text. If set to false, an - * appropriate amount of space will be calculated automatically. - * default: false - * - * @option expandOnResize {Boolean} Whether width should be re-calculated w
[MediaWiki-commits] [Gerrit] Implemented "eachchange" event using the jQuery.event.specia... - change (mediawiki...Wikibase)
Henning Snater has uploaded a new change for review. https://gerrit.wikimedia.org/r/93928 Change subject: Implemented "eachchange" event using the jQuery.event.special API .. Implemented "eachchange" event using the jQuery.event.special API (bug 93736) Adjustments to Wikibase component. (Requires change I8e674b825f08c656e9bb78296d074d2c73cc01e6.) Change-Id: I8ef9e56ebe69c0451575f498a6f65bcf28a40905 --- M lib/WikibaseLib.hooks.php M lib/resources/Resources.php M lib/resources/jquery.wikibase/jquery.wikibase.entityselector.js M lib/resources/jquery.wikibase/jquery.wikibase.snakview/snakview.js M lib/resources/wikibase.ui.PropertyEditTool.EditableValue.Interface.js M lib/resources/wikibase.utilities/wikibase.utilities.jQuery.ui.tagadata/wikibase.utilities.jQuery.ui.tagadata.js M repo/resources/Resources.php M repo/resources/wikibase.ui.entitysearch.js 8 files changed, 13 insertions(+), 14 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/28/93928/3 diff --git a/lib/WikibaseLib.hooks.php b/lib/WikibaseLib.hooks.php index ae5b10f..2bb1e44 100644 --- a/lib/WikibaseLib.hooks.php +++ b/lib/WikibaseLib.hooks.php @@ -139,7 +139,7 @@ 'jquery.wikibase.toolbareditgroup', 'jquery.nativeEventHandler', 'jquery.client', - 'jquery.eachchange', + 'jquery.event.special.eachchange', ) ); diff --git a/lib/resources/Resources.php b/lib/resources/Resources.php index 61623a6..6ae28ba 100644 --- a/lib/resources/Resources.php +++ b/lib/resources/Resources.php @@ -281,7 +281,7 @@ 'wikibase.utilities/wikibase.utilities.jQuery.ui.tagadata/wikibase.utilities.jQuery.ui.tagadata.css', ), 'dependencies' => array( - 'jquery.eachchange', + 'jquery.event.special.eachchange', 'jquery.effects.blind', 'jquery.inputAutoExpand', 'jquery.ui.widget' @@ -331,7 +331,7 @@ 'wikibase.ui.PropertyEditTool.css' ), 'dependencies' => array( - 'jquery.eachchange', + 'jquery.event.special.eachchange', 'jquery.nativeEventHandler', 'jquery.inputAutoExpand', 'jquery.tablesorter', @@ -544,7 +544,7 @@ 'jquery.wikibase/jquery.wikibase.snakview/themes/default/snakview.SnakTypeSelector.css', ), 'dependencies' => array( - 'jquery.eachchange', + 'jquery.event.special.eachchange', 'jquery.nativeEventHandler', 'jquery.wikibase.entityselector', 'wikibase.datamodel', @@ -684,7 +684,7 @@ ), 'dependencies' => array( 'jquery.autocompletestring', - 'jquery.eachchange', + 'jquery.event.special.eachchange', 'jquery.ui.suggester', 'jquery.ui.resizable', 'jquery.ui.widget', @@ -726,7 +726,7 @@ 'jquery.valueview.experts.staticdom', 'jquery.valueview.experts.wikibase', 'wikibase.parsers', - 'jquery.eachchange', + 'jquery.event.special.eachchange', 'jquery.inputAutoExpand', 'wikibase.utilities', ), diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.entityselector.js b/lib/resources/jquery.wikibase/jquery.wikibase.entityselector.js index dad5796..83dd7d6 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.entityselector.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.entityselector.js @@ -67,7 +67,7 @@ *(2) {String} Entity id * * @dependency jquery.autocompletestring - * @dependency jquery.eachchange + * @dependency jquery.event.special.eachchange * @dependency jquery.ui.suggester * @dependency jquery.ui.resizable * @dependency jquery.util.adaptlettercase @@ -184,7 +184,7 @@ var self = this; this.element - .eachchange( function( event, oldVal ) { +
[MediaWiki-commits] [Gerrit] Implemented "eachchange" event using the jQuery.event.specia... - change (mediawiki...DataValues)
Henning Snater has uploaded a new change for review. https://gerrit.wikimedia.org/r/93736 Change subject: Implemented "eachchange" event using the jQuery.event.special API .. Implemented "eachchange" event using the jQuery.event.special API (bug 45604) Converted the "eachchange" jQuery plug-in to a jQuery event implementation using the jQuery.event.special API. Change-Id: I8e674b825f08c656e9bb78296d074d2c73cc01e6 --- M ValueView/README M ValueView/ValueView.resources.mw.php M ValueView/ValueView.resources.php M ValueView/ValueView.tests.qunit.php M ValueView/resources/jquery.time/jquery.time.timeinput.js M ValueView/resources/jquery.ui/jquery.ui.inputextender.js M ValueView/resources/jquery.ui/jquery.ui.suggester.js M ValueView/resources/jquery.valueview/valueview.experts/experts.GlobeCoordinateInput.js M ValueView/resources/jquery.valueview/valueview.experts/experts.StringValue.js M ValueView/resources/jquery.valueview/valueview.experts/experts.SuggestedStringValue.js D ValueView/resources/jquery/jquery.eachchange.js A ValueView/resources/jquery/jquery.event.special.eachchange.js M ValueView/resources/jquery/jquery.inputAutoExpand.js D ValueView/tests/qunit/jquery/jquery.eachchange.tests.js A ValueView/tests/qunit/jquery/jquery.event.special.eachchange.tests.js 15 files changed, 433 insertions(+), 246 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DataValues refs/changes/36/93736/5 diff --git a/ValueView/README b/ValueView/README index e26b9bd..bd722bd 100644 --- a/ValueView/README +++ b/ValueView/README @@ -11,5 +11,5 @@ * Support of valueview for some basic data value types. These valueview experts can be found in jQuery.valueview.experts.. * other jQuery extensions required by this library which are not available in MediaWiki itself: - - jQuery.eachchange + - jQuery.event.special.eachchange - jQuery.inputAutoExpand \ No newline at end of file diff --git a/ValueView/ValueView.resources.mw.php b/ValueView/ValueView.resources.mw.php index 472f641..5a2156e 100644 --- a/ValueView/ValueView.resources.mw.php +++ b/ValueView/ValueView.resources.mw.php @@ -63,9 +63,9 @@ ) ), - 'jquery.eachchange' => $moduleTemplate + array( + 'jquery.event.special.eachchange' => $moduleTemplate + array( 'scripts' => array( - 'jquery/jquery.eachchange.js' + 'jquery/jquery.event.special.eachchange.js' ), 'dependencies' => array( 'jquery.client' @@ -77,7 +77,7 @@ 'jquery/jquery.inputAutoExpand.js', ), 'dependencies' => array( - 'jquery.eachchange' + 'jquery.event.special.eachchange' ) ), @@ -112,7 +112,7 @@ ), 'dependencies' => array( 'jquery.ui.widget', - 'jquery.eachchange', + 'jquery.event.special.eachchange', 'time.js' ), ), @@ -125,7 +125,7 @@ 'jquery.ui/jquery.ui.inputextender.css', ), 'dependencies' => array( - 'jquery.eachchange', + 'jquery.event.special.eachchange', 'jquery.ui.position', 'jquery.ui.widget', 'jquery.animateWithEvent', diff --git a/ValueView/ValueView.resources.php b/ValueView/ValueView.resources.php index 86a0a47..1a93eb5 100644 --- a/ValueView/ValueView.resources.php +++ b/ValueView/ValueView.resources.php @@ -6,7 +6,7 @@ * * External dependencies: * - jQuery 1.8 - * - jQuery.eachchange + * - jQuery.event.special.eachchange * - jQuery.inputAutoExpand * - jQuery.ui.suggester * - jQuery.time.timeinput @@ -185,7 +185,7 @@ ), 'dependencies' => array( 'jquery.valueview.experts', - 'jquery.eachchange', + 'jquery.event.special.eachchange', 'jquery.inputAutoExpand', 'jquery.fn.focusAt', ), @@ -196,6 +196,7 @@ 'jquery.valueview/valueview.experts/experts.GlobeCoordinateInput.js', ), 'dependencies' => array( + 'jquery.event.special.eachchange', 'jquery.valueview.expe
[MediaWiki-commits] [Gerrit] Use 'pagetitle' in content language - change (mediawiki/core)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/94862 Change subject: Use 'pagetitle' in content language .. Use 'pagetitle' in content language It often happens that wiki sysops want to change it site wide, especially when they want to change the format (eg, have {{SITENAME}} removed, or replace the hyphen with a middot). Bug: 48701 Change-Id: Iaf00fca1e89ae022c348c4fa0de32b998d7921a1 --- M includes/OutputPage.php M includes/specials/SpecialContributions.php M includes/specials/SpecialSearch.php 3 files changed, 14 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/62/94862/1 diff --git a/includes/OutputPage.php b/includes/OutputPage.php index b4fda13..6fd5111 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -891,7 +891,10 @@ $this->mPagetitle = $nameWithTags; # change "foo&bar" to "foo&bar" - $this->setHTMLTitle( $this->msg( 'pagetitle' )->rawParams( Sanitizer::stripAllTags( $nameWithTags ) ) ); + $this->setHTMLTitle( + $this->msg( 'pagetitle' )->rawParams( Sanitizer::stripAllTags( $nameWithTags ) ) + ->inContentLanguage() + ); } /** @@ -2491,7 +2494,7 @@ $ret = Html::htmlHeader( array( 'lang' => $this->getLanguage()->getHtmlCode(), 'dir' => $userdir, 'class' => 'client-nojs' ) ); if ( $this->getHTMLTitle() == '' ) { - $this->setHTMLTitle( $this->msg( 'pagetitle', $this->getPageTitle() ) ); + $this->setHTMLTitle( $this->msg( 'pagetitle', $this->getPageTitle() )->inContentLanguage() ); } $openHead = Html::openElement( 'head' ); diff --git a/includes/specials/SpecialContributions.php b/includes/specials/SpecialContributions.php index 1fe9819..5710dc4 100644 --- a/includes/specials/SpecialContributions.php +++ b/includes/specials/SpecialContributions.php @@ -94,14 +94,14 @@ $out->setHTMLTitle( $this->msg( 'pagetitle', $this->msg( 'contributions-title', $target )->plain() - ) ); + )->inContentLanguage() ); $this->getSkin()->setRelevantUser( $userObj ); } else { $out->addSubtitle( $this->msg( 'sp-contributions-newbies-sub' ) ); - $out->setHTMLTitle( $this->msg( - 'pagetitle', - $this->msg( 'sp-contributions-newbies-title' )->plain() - ) ); + $out->setHTMLTitle( + $this->msg( 'pagetitle', $this->msg( 'sp-contributions-newbies-title' ) ) + ->inContentLanguage()->plain() + ); } if ( ( $ns = $request->getVal( 'namespace', null ) ) !== null && $ns !== '' ) { diff --git a/includes/specials/SpecialSearch.php b/includes/specials/SpecialSearch.php index dd32656..08e438f 100644 --- a/includes/specials/SpecialSearch.php +++ b/includes/specials/SpecialSearch.php @@ -476,9 +476,10 @@ $out = $this->getOutput(); if ( strval( $term ) !== '' ) { $out->setPageTitle( $this->msg( 'searchresults' ) ); - $out->setHTMLTitle( $this->msg( 'pagetitle' )->rawParams( - $this->msg( 'searchresults-title' )->rawParams( $term )->text() - ) ); + $out->setHTMLTitle( $this->msg( 'pagetitle' ) + ->rawParams( $this->msg( 'searchresults-title' )->rawParams( $term ) ) + ->inContentLanguage()->text() + ); } // add javascript specific to special:search $out->addModules( 'mediawiki.special.search' ); -- To view, visit https://gerrit.wikimedia.org/r/94862 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iaf00fca1e89ae022c348c4fa0de32b998d7921a1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Siebrand ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use autonym for the initially selected language - change (mediawiki...TwnMainPage)
Nikerabbit has uploaded a new change for review. https://gerrit.wikimedia.org/r/94863 Change subject: Use autonym for the initially selected language .. Use autonym for the initially selected language For consistency with the frontend language selector Change-Id: If2e5716ffcbb9101b80922729f6c83645491b5f7 --- M specials/SpecialTwnMainPage.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TwnMainPage refs/changes/63/94863/1 diff --git a/specials/SpecialTwnMainPage.php b/specials/SpecialTwnMainPage.php index 6201846..b970321 100644 --- a/specials/SpecialTwnMainPage.php +++ b/specials/SpecialTwnMainPage.php @@ -488,7 +488,7 @@ $this->getOutput()->addModules( 'ext.translate.mainpage.signup' ); $languageCode = $this->getLanguage()->getCode(); - $languageName = TranslateUtils::getLanguageName( $languageCode ); + $languageName = TranslateUtils::getLanguageName( $languageCode, $languageCode ); $defaultLanguage = Xml::checkLabel( $languageName, -- To view, visit https://gerrit.wikimedia.org/r/94863 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If2e5716ffcbb9101b80922729f6c83645491b5f7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TwnMainPage Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Check id entered in SpecialSetSiteLink is an ItemId - change (mediawiki...Wikibase)
Aude has uploaded a new change for review. https://gerrit.wikimedia.org/r/94864 Change subject: Check id entered in SpecialSetSiteLink is an ItemId .. Check id entered in SpecialSetSiteLink is an ItemId Bug: 56933 Change-Id: I56c35d06039a34473e09225ffc551da5978a169e --- M repo/Wikibase.i18n.php M repo/includes/specials/SpecialModifyEntity.php M repo/includes/specials/SpecialSetSiteLink.php 3 files changed, 64 insertions(+), 13 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/64/94864/1 diff --git a/repo/Wikibase.i18n.php b/repo/Wikibase.i18n.php index 39d483e..6951076 100644 --- a/repo/Wikibase.i18n.php +++ b/repo/Wikibase.i18n.php @@ -179,6 +179,7 @@ 'wikibase-setsitelink-invalid-site' => 'The site id "$1" is unknown. Please use an existing site id, such as "enwiki".', 'wikibase-setsitelink-add-failed' => 'The site link could not be saved.', 'wikibase-setsitelink-remove-failed' => 'The site link could not be removed.', + 'wikibase-setsitelink-not-itemid' => '"$1" is not a valid item ID. Site links can only be set for items.', 'wikibase-setentity-id' => 'ID:', 'wikibase-setentity-language' => 'Language:', 'wikibase-setentity-invalid-langcode' => 'The language identifier "$1" is unknown. Please use a language identifier known to the system, such as "en".', @@ -863,6 +864,10 @@ * $1 - the invalid id', 'wikibase-setsitelink-add-failed' => 'Error message when the site link could not be saved.', 'wikibase-setsitelink-remove-failed' => 'Error message when the site link could not be removed.', + 'wikibase-setsitelink-not-itemid' => 'Error message when an entity id, other than item id, is entered. The message advises users that the id is invalid and only items have site links. + +Parameters: +* $1 - the invalid id', 'wikibase-setentity-id' => 'Label for the input field to select the ID of the entity. {{Identical|ID}}', 'wikibase-setentity-language' => 'Label for the input field to select the language the label should be set in. diff --git a/repo/includes/specials/SpecialModifyEntity.php b/repo/includes/specials/SpecialModifyEntity.php index c80edb7..b81e3e2 100644 --- a/repo/includes/specials/SpecialModifyEntity.php +++ b/repo/includes/specials/SpecialModifyEntity.php @@ -4,6 +4,8 @@ use Html; use UserBlockedError; +use Wikibase\DataModel\Entity\BasicEntityIdParser; +use Wikibase\DataModel\Entity\EntityIdParsingException; use Wikibase\EditEntity; use Wikibase\EntityContentFactory; use Wikibase\EntityId; @@ -112,26 +114,46 @@ $parts = ( $subPage === '' ) ? array() : explode( '/', $subPage, 2 ); // Get id - $rawId = $this->getRequest()->getVal( 'id', isset( $parts[0] ) ? $parts[0] : '' ); - $id = EntityId::newFromPrefixedId( $rawId ); + $rawId = $this->getRequest()->getVal( 'id', isset( $parts[0] ) ? $parts[0] : null ); + $id = $rawId ? $this->getId( $rawId ) : null; - if ( $id === null ) { - $this->entityContent = null; - } - else { - $this->entityContent = WikibaseRepo::getDefaultInstance()->getEntityContentFactory()->getFromId( $id ); - } + $this->setEntityContent( $id ); - if ( $rawId === '' ) { - $rawId = null; - } - - if ( $this->entityContent === null && $rawId !== null ) { + // entity is unknown + if ( $this->entityContent === null && $id !== null ) { $this->showErrorHTML( $this->msg( 'wikibase-setentity-invalid-id', $rawId )->parse() ); } } /** +* @param string $rawId +* +* @return EntityId +*/ + protected function getId( $rawId ) { + $idParser = new BasicEntityIdParser(); + + try { + $id = $idParser->parse( $rawId ); + } catch ( EntityIdParsingException $ex ) { + $this->showErrorHtml( $this->msg( 'wikibase-setentity-invalid-id', $rawId )->parse() ); + + return null; + } + + return $id; + } + + /** +* @param EntityId $id +*/ + protected function setEntityContent( EntityId $id ) { + $this->entityContent = ( $id !== null ) + ? WikibaseRepo::getDefaultInstance()->getEntityContentFactory()->getFromId( $id ) + : null; + } + + /** * Showing an error. * * @since 0.4 diff --git a/repo/includes/specials/SpecialSetSiteLink.php b/repo/includes/specials/SpecialSetSiteLink.php index 0a09bb5..2744d70 100644 --- a/repo/inclu
[MediaWiki-commits] [Gerrit] Register and deregister the bus properly - change (apps...wikipedia)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/94866 Change subject: Register and deregister the bus properly .. Register and deregister the bus properly This prevents random IllegalStateExceptions that happen. Change-Id: I69ce99c3ebaa212b6261f58c3463f0c7c1df4280 --- M wikipedia/src/main/java/org/wikimedia/wikipedia/PageActivity.java 1 file changed, 13 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/66/94866/1 diff --git a/wikipedia/src/main/java/org/wikimedia/wikipedia/PageActivity.java b/wikipedia/src/main/java/org/wikimedia/wikipedia/PageActivity.java index 23a7cf1..179394f 100644 --- a/wikipedia/src/main/java/org/wikimedia/wikipedia/PageActivity.java +++ b/wikipedia/src/main/java/org/wikimedia/wikipedia/PageActivity.java @@ -17,8 +17,6 @@ setContentView(R.layout.activity_main); app = ((WikipediaApp)getApplicationContext()); -bus = app.getBus(); -bus.register(this); } private void displayNewPage(PageTitle title) { @@ -39,4 +37,17 @@ public void onBackPressed() { getSupportFragmentManager().popBackStack(); } + +@Override +protected void onStart() { +super.onResume(); +bus = app.getBus(); +bus.register(this); +} + +@Override +protected void onStop() { +super.onStop(); +bus.unregister(this); +} } -- To view, visit https://gerrit.wikimedia.org/r/94866 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I69ce99c3ebaa212b6261f58c3463f0c7c1df4280 Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Yuvipanda ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [PEP8] pep8ify welcome.py - change (pywikibot/compat)
Xqt has uploaded a new change for review. https://gerrit.wikimedia.org/r/94867 Change subject: [PEP8] pep8ify welcome.py .. [PEP8] pep8ify welcome.py Change-Id: Ie276842e02658562f896eae34084ffbcd25cd8cd --- M welcome.py 1 file changed, 213 insertions(+), 131 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/compat refs/changes/67/94867/1 diff --git a/welcome.py b/welcome.py index 8beb8fc..8ac323b 100644 --- a/welcome.py +++ b/welcome.py @@ -181,14 +181,19 @@ __version__ = '$Id$' # -import time, re, urllib, locale +import time +import re +import urllib +import locale import codecs from datetime import timedelta from random import choice from string import capitalize import wikipedia as pywikibot from pywikibot import i18n -import config, query, userlib +import config +import query +import userlib locale.setlocale(locale.LC_ALL, '') @@ -227,7 +232,7 @@ # that is your signature (the bot has a random parameter to add different # sign, so in this way it will change according to your parameters). netext = { -'commons': {'_default': u'{{subst:welcome}} %s', } , +'commons': {'_default': u'{{subst:welcome}} %s', }, 'wikipedia': { 'am': u'{{subst:Welcome}} %s', 'ar': u'{{subst:ترحيب}} %s', @@ -246,7 +251,7 @@ 'nap': u'{{Bemmenuto}}%s', 'nl': u'{{hola|bot|%s}}', 'no': u'{{subst:bruker:jhs/vk}} %s', -'pdc':u'{{subst:Wilkum}}%s', +'pdc': u'{{subst:Wilkum}}%s', 'pt': u'{{subst:bem vindo}} %s', 'roa-tara': u'{{Bovègne}} %s', 'ru': u'{{Hello}} %s', @@ -257,17 +262,17 @@ 'zh': u'{{subst:welcome|sign=%s}}', 'zh-yue': u'{{歡迎}}--%s', }, -'wikinews':{ +'wikinews': { 'fa': u'{{خوشامد۲|%s}}', 'it': u'{{subst:benvenuto}}', 'zh': u'{{subst:welcome}} %s', }, -'wiktionary':{ +'wiktionary': { 'bn': u'{{subst:User:Wikitanvir/welcome|firma=%s}}', 'fa': u'{{جا:خوشامد|%s}}', 'it': u'{{subst:Utente:Filnik/Benve|firma=%s}}', }, -'wikiversity':{ +'wikiversity': { 'de': u'{{subst:Willkommen|%s}}', 'el': u'{{subst:καλωσόρισμα}} %s', 'en': u'{{subst:Welcome}}\n\n{{subst:Talktome}} %s', @@ -291,7 +296,7 @@ 'ja': u'利用者:Alexbot/report', 'nl': u'Project:Verzoekpagina voor moderatoren/RegBlok/Te controleren gebruikersnamen', 'no': u'Bruker:JhsBot II/Rapport', -'pdc':u'Benutzer:Xqt/Report', +'pdc': u'Benutzer:Xqt/Report', 'ru': u'Участник:LatitudeBot/Рапорт', 'sq': u'User:EagleBot/Report', 'sr': u'User:SashatoBot/Записи', @@ -303,7 +308,7 @@ # (this parameter is optional). bad_pag = { 'commons': {'_default': u'Project:Welcome log/Bad_names', }, -'wikipedia':{ +'wikipedia': { 'am': u'User:Beria/Bad_names', 'ar': u'Project:سجل الترحيب/أسماء سيئة', 'en': u'Project:Welcome log/Bad_names', @@ -320,12 +325,13 @@ } } -timeselected = u' ~' # Defining the time used after the signature +timeselected = u' ~' # Defining the time used after the signature -# The text for reporting a possibly bad username (e.g. *[[Talk_page:Username|Username]]). +# The text for reporting a possibly bad username +# e.g. *[[Talk_page:Username|Username]]). report_text = { -'commons': {'_default': u"\n*{{user3|%s}}" + timeselected,}, -'wikipedia':{ +'commons': {'_default': u"\n*{{user3|%s}}" + timeselected, }, +'wikipedia': { 'am': u"\n*[[User talk:%s]]" + timeselected, 'ar': u"\n*{{user13|%s}}" + timeselected, 'da': u'\n*[[Bruger Diskussion:%s]] ' + timeselected, @@ -338,7 +344,7 @@ 'ja': u"\n*{{User2|%s}}" + timeselected, 'nl': u'\n*{{linkgebruiker%s}} ' + timeselected, 'no': u'\n*{{bruker|%s}} ' + timeselected, -'pdc':u'\n*[[Benutzer Diskussion:%s]] ' + timeselected, +'pdc': u'\n*[[Benutzer Diskussion:%s]] ' + timeselected, 'sq': u'\n*[[User:%s]] ' + timeselected, 'zh': u"\n*{{User|%s}}" + timeselected } @@ -353,37 +359,40 @@ 'fa': u'Project:سیاهه خوشامد/امضاها', 'fr': u'Projet:Service de Parrainage Actif/Signatures', 'it': u'Project:Benvenuto_Bot/Firme', -'ja': None, #jawiki comminuty discussion oppose , [[ja:Wikipedia:Bot作業依頼/ウェルカムメッセージ貼り付け依頼]] + +# jawiki comminuty discussion oppose, +# [[ja:Wikipedia:Bot作業依頼/ウェルカムメッセージ貼り付け依頼]] +'ja': None, 'nap': u'User:Cellistbot/Firme', 'roa-tara': u'Wikipedia:Bovègne Bot/Firme', 'ru': u'Участник:LatitudeBot/Sign', 'vec': u'Utente:FriBot/Firme', 'zh': u'User:Welcomebot/欢迎日志/用户', -} +} # The page where the bot reads the real-time whitelist page. # (this parameter is optional). whitelist_pg = { '_default': None, -'ar':u'Project:سجل الترحيب/قائمة بيضاء', -'en':u'User:Filnik/whitelist',
[MediaWiki-commits] [Gerrit] [PEP8] pep8ify welcome.py - change (pywikibot/compat)
jenkins-bot has submitted this change and it was merged. Change subject: [PEP8] pep8ify welcome.py .. [PEP8] pep8ify welcome.py Change-Id: Ie276842e02658562f896eae34084ffbcd25cd8cd --- M welcome.py 1 file changed, 213 insertions(+), 131 deletions(-) Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified diff --git a/welcome.py b/welcome.py index 8beb8fc..8ac323b 100644 --- a/welcome.py +++ b/welcome.py @@ -181,14 +181,19 @@ __version__ = '$Id$' # -import time, re, urllib, locale +import time +import re +import urllib +import locale import codecs from datetime import timedelta from random import choice from string import capitalize import wikipedia as pywikibot from pywikibot import i18n -import config, query, userlib +import config +import query +import userlib locale.setlocale(locale.LC_ALL, '') @@ -227,7 +232,7 @@ # that is your signature (the bot has a random parameter to add different # sign, so in this way it will change according to your parameters). netext = { -'commons': {'_default': u'{{subst:welcome}} %s', } , +'commons': {'_default': u'{{subst:welcome}} %s', }, 'wikipedia': { 'am': u'{{subst:Welcome}} %s', 'ar': u'{{subst:ترحيب}} %s', @@ -246,7 +251,7 @@ 'nap': u'{{Bemmenuto}}%s', 'nl': u'{{hola|bot|%s}}', 'no': u'{{subst:bruker:jhs/vk}} %s', -'pdc':u'{{subst:Wilkum}}%s', +'pdc': u'{{subst:Wilkum}}%s', 'pt': u'{{subst:bem vindo}} %s', 'roa-tara': u'{{Bovègne}} %s', 'ru': u'{{Hello}} %s', @@ -257,17 +262,17 @@ 'zh': u'{{subst:welcome|sign=%s}}', 'zh-yue': u'{{歡迎}}--%s', }, -'wikinews':{ +'wikinews': { 'fa': u'{{خوشامد۲|%s}}', 'it': u'{{subst:benvenuto}}', 'zh': u'{{subst:welcome}} %s', }, -'wiktionary':{ +'wiktionary': { 'bn': u'{{subst:User:Wikitanvir/welcome|firma=%s}}', 'fa': u'{{جا:خوشامد|%s}}', 'it': u'{{subst:Utente:Filnik/Benve|firma=%s}}', }, -'wikiversity':{ +'wikiversity': { 'de': u'{{subst:Willkommen|%s}}', 'el': u'{{subst:καλωσόρισμα}} %s', 'en': u'{{subst:Welcome}}\n\n{{subst:Talktome}} %s', @@ -291,7 +296,7 @@ 'ja': u'利用者:Alexbot/report', 'nl': u'Project:Verzoekpagina voor moderatoren/RegBlok/Te controleren gebruikersnamen', 'no': u'Bruker:JhsBot II/Rapport', -'pdc':u'Benutzer:Xqt/Report', +'pdc': u'Benutzer:Xqt/Report', 'ru': u'Участник:LatitudeBot/Рапорт', 'sq': u'User:EagleBot/Report', 'sr': u'User:SashatoBot/Записи', @@ -303,7 +308,7 @@ # (this parameter is optional). bad_pag = { 'commons': {'_default': u'Project:Welcome log/Bad_names', }, -'wikipedia':{ +'wikipedia': { 'am': u'User:Beria/Bad_names', 'ar': u'Project:سجل الترحيب/أسماء سيئة', 'en': u'Project:Welcome log/Bad_names', @@ -320,12 +325,13 @@ } } -timeselected = u' ~' # Defining the time used after the signature +timeselected = u' ~' # Defining the time used after the signature -# The text for reporting a possibly bad username (e.g. *[[Talk_page:Username|Username]]). +# The text for reporting a possibly bad username +# e.g. *[[Talk_page:Username|Username]]). report_text = { -'commons': {'_default': u"\n*{{user3|%s}}" + timeselected,}, -'wikipedia':{ +'commons': {'_default': u"\n*{{user3|%s}}" + timeselected, }, +'wikipedia': { 'am': u"\n*[[User talk:%s]]" + timeselected, 'ar': u"\n*{{user13|%s}}" + timeselected, 'da': u'\n*[[Bruger Diskussion:%s]] ' + timeselected, @@ -338,7 +344,7 @@ 'ja': u"\n*{{User2|%s}}" + timeselected, 'nl': u'\n*{{linkgebruiker%s}} ' + timeselected, 'no': u'\n*{{bruker|%s}} ' + timeselected, -'pdc':u'\n*[[Benutzer Diskussion:%s]] ' + timeselected, +'pdc': u'\n*[[Benutzer Diskussion:%s]] ' + timeselected, 'sq': u'\n*[[User:%s]] ' + timeselected, 'zh': u"\n*{{User|%s}}" + timeselected } @@ -353,37 +359,40 @@ 'fa': u'Project:سیاهه خوشامد/امضاها', 'fr': u'Projet:Service de Parrainage Actif/Signatures', 'it': u'Project:Benvenuto_Bot/Firme', -'ja': None, #jawiki comminuty discussion oppose , [[ja:Wikipedia:Bot作業依頼/ウェルカムメッセージ貼り付け依頼]] + +# jawiki comminuty discussion oppose, +# [[ja:Wikipedia:Bot作業依頼/ウェルカムメッセージ貼り付け依頼]] +'ja': None, 'nap': u'User:Cellistbot/Firme', 'roa-tara': u'Wikipedia:Bovègne Bot/Firme', 'ru': u'Участник:LatitudeBot/Sign', 'vec': u'Utente:FriBot/Firme', 'zh': u'User:Welcomebot/欢迎日志/用户', -} +} # The page where the bot reads the real-time whitelist page. # (this parameter is optional). whitelist_pg = { '_default': None, -'ar':u'Project:سجل الترحيب/قائمة بيضاء', -'en':u'User:Filnik/whitelist', -'ga':u'Project:Log fáilte/Bánliosta
[MediaWiki-commits] [Gerrit] monitoring for text-varnish wikipedia in eqiad - change (operations/puppet)
ArielGlenn has uploaded a new change for review. https://gerrit.wikimedia.org/r/94868 Change subject: monitoring for text-varnish wikipedia in eqiad .. monitoring for text-varnish wikipedia in eqiad Change-Id: I523647f826f705d16c543c74f0c630c50e565dd2 --- M manifests/lvs.pp 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/68/94868/1 diff --git a/manifests/lvs.pp b/manifests/lvs.pp index 25051d6..851c1ea 100644 --- a/manifests/lvs.pp +++ b/manifests/lvs.pp @@ -1248,7 +1248,7 @@ ip_address => $ip['text-varnish']['eqiad']['wikimedialb'], uri => "meta.wikimedia.org!/wiki/Main_Page"; "wikipedia-lb.eqiad.wikimedia.org": - ip_address => $ip['text']['eqiad']['wikipedialb'], + ip_address => $ip['text-varnish']['eqiad']['wikipedialb'], uri => "en.wikipedia.org!/wiki/Main_Page"; "wiktionary-lb.eqiad.wikimedia.org": ip_address => $ip['text-varnish']['eqiad']['wiktionarylb'], -- To view, visit https://gerrit.wikimedia.org/r/94868 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I523647f826f705d16c543c74f0c630c50e565dd2 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: ArielGlenn ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] monitoring for text-varnish wikipedia in eqiad - change (operations/puppet)
ArielGlenn has submitted this change and it was merged. Change subject: monitoring for text-varnish wikipedia in eqiad .. monitoring for text-varnish wikipedia in eqiad Change-Id: I523647f826f705d16c543c74f0c630c50e565dd2 --- M manifests/lvs.pp 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: ArielGlenn: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/lvs.pp b/manifests/lvs.pp index 25051d6..851c1ea 100644 --- a/manifests/lvs.pp +++ b/manifests/lvs.pp @@ -1248,7 +1248,7 @@ ip_address => $ip['text-varnish']['eqiad']['wikimedialb'], uri => "meta.wikimedia.org!/wiki/Main_Page"; "wikipedia-lb.eqiad.wikimedia.org": - ip_address => $ip['text']['eqiad']['wikipedialb'], + ip_address => $ip['text-varnish']['eqiad']['wikipedialb'], uri => "en.wikipedia.org!/wiki/Main_Page"; "wiktionary-lb.eqiad.wikimedia.org": ip_address => $ip['text-varnish']['eqiad']['wiktionarylb'], -- To view, visit https://gerrit.wikimedia.org/r/94868 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I523647f826f705d16c543c74f0c630c50e565dd2 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: ArielGlenn Gerrit-Reviewer: ArielGlenn Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [PEP8]ify fixes.py - change (pywikibot/compat)
Xqt has uploaded a new change for review. https://gerrit.wikimedia.org/r/94869 Change subject: [PEP8]ify fixes.py .. [PEP8]ify fixes.py Change-Id: I6ef4a5fa5671f462a5042fd766887f90b2b7075d --- M fixes.py 1 file changed, 121 insertions(+), 117 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/compat refs/changes/69/94869/1 diff --git a/fixes.py b/fixes.py index 58cbcfa..1bbf6ac 100644 --- a/fixes.py +++ b/fixes.py @@ -49,28 +49,28 @@ 'HTML': { 'regex': True, 'msg': { -'ar':u'روبوت: تحويل/تصليح HTML', -'be':u'Бот: карэкцыя HTML', -'be-x-old':u'Бот: карэкцыя HTML', -'cs':u'převod/oprava HTML', -'en':u'Robot: Converting/fixing HTML', -'eo':u'Bot: koredtado de HTMLa teksto', -'fa':u'ربات:تبدیل/تصحیح کدهای اچتیامال', -'de':u'Bot: konvertiere/korrigiere HTML', -'fr':u'Robot: convertit/fixe HTML', -'he':u'בוט: ממיר/מתקן HTML', -'ja':u'ロボットによる: HTML転換', -'ksh':u'Bot: vun HTML en Wikikood wandelle', -'ia':u'Robot: conversion/reparation de HTML', -'lt':u'robotas: konvertuojamas/taisomas HTML', -'nl':u'Bot: conversie/reparatie HTML', -'pl':u'Robot konwertuje/naprawia HTML', -'pt':u'Bot: Corrigindo HTML', -'ru':u'Бот: коррекция HTML', -'sr':u'Бот: Поправка HTML-а', -'sv':u'Bot: Konverterar/korrigerar HTML', -'uk':u'Бот: корекцiя HTML', -'zh':u'機器人: 轉換HTML', +'ar': u'روبوت: تحويل/تصليح HTML', +'be': u'Бот: карэкцыя HTML', +'be-x-old': u'Бот: карэкцыя HTML', +'cs': u'převod/oprava HTML', +'en': u'Robot: Converting/fixing HTML', +'eo': u'Bot: koredtado de HTMLa teksto', +'fa': u'ربات:تبدیل/تصحیح کدهای اچتیامال', +'de': u'Bot: konvertiere/korrigiere HTML', +'fr': u'Robot: convertit/fixe HTML', +'he': u'בוט: ממיר/מתקן HTML', +'ja': u'ロボットによる: HTML転換', +'ksh': u'Bot: vun HTML en Wikikood wandelle', +'ia': u'Robot: conversion/reparation de HTML', +'lt': u'robotas: konvertuojamas/taisomas HTML', +'nl': u'Bot: conversie/reparatie HTML', +'pl': u'Robot konwertuje/naprawia HTML', +'pt': u'Bot: Corrigindo HTML', +'ru': u'Бот: коррекция HTML', +'sr': u'Бот: Поправка HTML-а', +'sv': u'Bot: Konverterar/korrigerar HTML', +'uk': u'Бот: корекцiя HTML', +'zh': u'機器人: 轉換HTML', }, 'replacements': [ # Everything case-insensitive (?i) @@ -92,12 +92,12 @@ # so we only make it XHTML compliant (r'(?i)/]+?)>',r''), # a header where only spaces are in the same line -(r'(?i)([\r\n]) * *([^<]+?) * *([\r\n])', r"\1= \2 =\3"), -(r'(?i)([\r\n]) * *([^<]+?) * *([\r\n])', r"\1== \2 ==\3"), -(r'(?i)([\r\n]) * *([^<]+?) * *([\r\n])', r"\1=== \2 ===\3"), -(r'(?i)([\r\n]) * *([^<]+?) * *([\r\n])', r"\1 \2 \3"), -(r'(?i)([\r\n]) * *([^<]+?) * *([\r\n])', r"\1= \2 =\3"), -(r'(?i)([\r\n]) * *([^<]+?) * *([\r\n])', r"\1== \2 ==\3"), +(r'(?i)([\r\n]) * *([^<]+?) * *([\r\n])', r"\1= \2 =\3"), +(r'(?i)([\r\n]) * *([^<]+?) * *([\r\n])', r"\1== \2 ==\3"), +(r'(?i)([\r\n]) * *([^<]+?) * *([\r\n])', r"\1=== \2 ===\3"), +(r'(?i)([\r\n]) * *([^<]+?) * *([\r\n])', r"\1 \2 \3"), +(r'(?i)([\r\n]) * *([^<]+?) * *([\r\n])', r"\1= \2 =\3"), +(r'(?i)([\r\n]) * *([^<]+?) * *([\r\n])', r"\1== \2 ==\3"), # TODO: maybe we can make the bot replace tags with \r\n's. ], 'exceptions': { @@ -115,7 +115,7 @@ 'grammar-de': { 'regex': True, 'msg': { -'de':u'Bot: korrigiere Grammatik', +'de': u'Bot: korrigiere Grammatik', }, 'replacements': [ #(u'([Ss]owohl) ([^,\.]+?), als auch', r'\1 \2 als auch'), @@ -157,26 +157,28 @@ r'20min.ch', # Schweizer News-Seite ], 'inside': [ -r'.*', # because of code examples +r'.*', # because of code examples r'{{[Zz]itat\|.*?}}', -ur'{{§\|.*?}}', # Gesetzesparagraph +ur'{{§\|.*?}}', # Gesetzesparagraph ur'§ ?\d+[a-z]', # Gesetzesparagraph -r'Ju 52/1m', # Flugzeugbezeichnung -r'Ju 52/3m', # Flugzeugbezeichnung -r'AH-1W',# Hubschrauberbezeichnung -r'ZPG-
[MediaWiki-commits] [Gerrit] [PEP8]ify fixes.py - change (pywikibot/compat)
jenkins-bot has submitted this change and it was merged. Change subject: [PEP8]ify fixes.py .. [PEP8]ify fixes.py Change-Id: I6ef4a5fa5671f462a5042fd766887f90b2b7075d --- M fixes.py 1 file changed, 121 insertions(+), 117 deletions(-) Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified diff --git a/fixes.py b/fixes.py index 58cbcfa..1bbf6ac 100644 --- a/fixes.py +++ b/fixes.py @@ -49,28 +49,28 @@ 'HTML': { 'regex': True, 'msg': { -'ar':u'روبوت: تحويل/تصليح HTML', -'be':u'Бот: карэкцыя HTML', -'be-x-old':u'Бот: карэкцыя HTML', -'cs':u'převod/oprava HTML', -'en':u'Robot: Converting/fixing HTML', -'eo':u'Bot: koredtado de HTMLa teksto', -'fa':u'ربات:تبدیل/تصحیح کدهای اچتیامال', -'de':u'Bot: konvertiere/korrigiere HTML', -'fr':u'Robot: convertit/fixe HTML', -'he':u'בוט: ממיר/מתקן HTML', -'ja':u'ロボットによる: HTML転換', -'ksh':u'Bot: vun HTML en Wikikood wandelle', -'ia':u'Robot: conversion/reparation de HTML', -'lt':u'robotas: konvertuojamas/taisomas HTML', -'nl':u'Bot: conversie/reparatie HTML', -'pl':u'Robot konwertuje/naprawia HTML', -'pt':u'Bot: Corrigindo HTML', -'ru':u'Бот: коррекция HTML', -'sr':u'Бот: Поправка HTML-а', -'sv':u'Bot: Konverterar/korrigerar HTML', -'uk':u'Бот: корекцiя HTML', -'zh':u'機器人: 轉換HTML', +'ar': u'روبوت: تحويل/تصليح HTML', +'be': u'Бот: карэкцыя HTML', +'be-x-old': u'Бот: карэкцыя HTML', +'cs': u'převod/oprava HTML', +'en': u'Robot: Converting/fixing HTML', +'eo': u'Bot: koredtado de HTMLa teksto', +'fa': u'ربات:تبدیل/تصحیح کدهای اچتیامال', +'de': u'Bot: konvertiere/korrigiere HTML', +'fr': u'Robot: convertit/fixe HTML', +'he': u'בוט: ממיר/מתקן HTML', +'ja': u'ロボットによる: HTML転換', +'ksh': u'Bot: vun HTML en Wikikood wandelle', +'ia': u'Robot: conversion/reparation de HTML', +'lt': u'robotas: konvertuojamas/taisomas HTML', +'nl': u'Bot: conversie/reparatie HTML', +'pl': u'Robot konwertuje/naprawia HTML', +'pt': u'Bot: Corrigindo HTML', +'ru': u'Бот: коррекция HTML', +'sr': u'Бот: Поправка HTML-а', +'sv': u'Bot: Konverterar/korrigerar HTML', +'uk': u'Бот: корекцiя HTML', +'zh': u'機器人: 轉換HTML', }, 'replacements': [ # Everything case-insensitive (?i) @@ -92,12 +92,12 @@ # so we only make it XHTML compliant (r'(?i)/]+?)>',r''), # a header where only spaces are in the same line -(r'(?i)([\r\n]) * *([^<]+?) * *([\r\n])', r"\1= \2 =\3"), -(r'(?i)([\r\n]) * *([^<]+?) * *([\r\n])', r"\1== \2 ==\3"), -(r'(?i)([\r\n]) * *([^<]+?) * *([\r\n])', r"\1=== \2 ===\3"), -(r'(?i)([\r\n]) * *([^<]+?) * *([\r\n])', r"\1 \2 \3"), -(r'(?i)([\r\n]) * *([^<]+?) * *([\r\n])', r"\1= \2 =\3"), -(r'(?i)([\r\n]) * *([^<]+?) * *([\r\n])', r"\1== \2 ==\3"), +(r'(?i)([\r\n]) * *([^<]+?) * *([\r\n])', r"\1= \2 =\3"), +(r'(?i)([\r\n]) * *([^<]+?) * *([\r\n])', r"\1== \2 ==\3"), +(r'(?i)([\r\n]) * *([^<]+?) * *([\r\n])', r"\1=== \2 ===\3"), +(r'(?i)([\r\n]) * *([^<]+?) * *([\r\n])', r"\1 \2 \3"), +(r'(?i)([\r\n]) * *([^<]+?) * *([\r\n])', r"\1= \2 =\3"), +(r'(?i)([\r\n]) * *([^<]+?) * *([\r\n])', r"\1== \2 ==\3"), # TODO: maybe we can make the bot replace tags with \r\n's. ], 'exceptions': { @@ -115,7 +115,7 @@ 'grammar-de': { 'regex': True, 'msg': { -'de':u'Bot: korrigiere Grammatik', +'de': u'Bot: korrigiere Grammatik', }, 'replacements': [ #(u'([Ss]owohl) ([^,\.]+?), als auch', r'\1 \2 als auch'), @@ -157,26 +157,28 @@ r'20min.ch', # Schweizer News-Seite ], 'inside': [ -r'.*', # because of code examples +r'.*', # because of code examples r'{{[Zz]itat\|.*?}}', -ur'{{§\|.*?}}', # Gesetzesparagraph +ur'{{§\|.*?}}', # Gesetzesparagraph ur'§ ?\d+[a-z]', # Gesetzesparagraph -r'Ju 52/1m', # Flugzeugbezeichnung -r'Ju 52/3m', # Flugzeugbezeichnung -r'AH-1W',# Hubschrauberbezeichnung -r'ZPG-3W', # Luftschiffbezeichnung -
[MediaWiki-commits] [Gerrit] Fix vertical alignment for language selector - change (mediawiki...TwnMainPage)
Pginer has uploaded a new change for review. https://gerrit.wikimedia.org/r/94870 Change subject: Fix vertical alignment for language selector .. Fix vertical alignment for language selector The language selector trigger has an icon next to it that should point to the language label but was missaligned. Padding-based positioning uses now margin so that the background image affect the pecific element. Change-Id: Id27c862d34fa2ec71356c6932ca210ba2d264014 --- M resources/css/ext.translate.mainpage.css 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TwnMainPage refs/changes/70/94870/1 diff --git a/resources/css/ext.translate.mainpage.css b/resources/css/ext.translate.mainpage.css index e5d0aba..291c8e9 100644 --- a/resources/css/ext.translate.mainpage.css +++ b/resources/css/ext.translate.mainpage.css @@ -27,10 +27,10 @@ } .twn-mainpage-header .uls-trigger { - background-position: bottom left; + background-position: center left; padding-left: 30px; color: #3366BB; - padding-top: 50px; + margin-top: 50px; cursor: pointer; display: inline-block; } -- To view, visit https://gerrit.wikimedia.org/r/94870 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id27c862d34fa2ec71356c6932ca210ba2d264014 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TwnMainPage Gerrit-Branch: master Gerrit-Owner: Pginer ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Validate the dirty flag before saving preferences in each mo... - change (mediawiki...UniversalLanguageSelector)
Santhosh has uploaded a new change for review. https://gerrit.wikimedia.org/r/94871 Change subject: Validate the dirty flag before saving preferences in each modules .. Validate the dirty flag before saving preferences in each modules Pressing apply button is applicable to all settings module, not only for the one that is visible. Unless we do a validation before we save preferences, other module can cause incorrect(old) preferences to be saved. Bug: 56885 Change-Id: I31df2ee0bf8b600a94e8fed1a784daf529186b16 --- M resources/js/ext.uls.displaysettings.js M resources/js/ext.uls.inputsettings.js 2 files changed, 17 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector refs/changes/71/94871/1 diff --git a/resources/js/ext.uls.displaysettings.js b/resources/js/ext.uls.displaysettings.js index 8c3f806..e09750d 100644 --- a/resources/js/ext.uls.displaysettings.js +++ b/resources/js/ext.uls.displaysettings.js @@ -570,9 +570,17 @@ /** * Handle the apply button press +* Note that the button press may not be from the input settings module. +* For eg: A user can change input settings and then go to display settings panel, +* do some changes and press apply button there. That press is applicable for all +* modules. */ apply: function () { var displaySettings = this; + if ( !displaySettings.dirty ) { + // No changes to save in this module. + return; + } // Save the preferences mw.webfonts.preferences.save( function ( result ) { diff --git a/resources/js/ext.uls.inputsettings.js b/resources/js/ext.uls.inputsettings.js index 2d7c097..b41aef4 100644 --- a/resources/js/ext.uls.inputsettings.js +++ b/resources/js/ext.uls.inputsettings.js @@ -501,6 +501,10 @@ /** * Handle the apply button press +* Note that the button press may not be from the input settings module. +* For eg: A user can change input settings and then go to display settings panel, +* do some changes and press apply button there. That press is applicable for all +* modules. */ apply: function () { var previousIM, @@ -510,6 +514,11 @@ currentLanguage = $.ime.preferences.getLanguage(), currentIM = $.ime.preferences.getIM( currentLanguage ); + if ( !inputSettings.dirty ) { + // No changes to save in this module. + return; + } + if ( previousLanguage ) { previousIM = inputSettings.savedRegistry.imes[previousLanguage]; } -- To view, visit https://gerrit.wikimedia.org/r/94871 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I31df2ee0bf8b600a94e8fed1a784daf529186b16 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner: Santhosh ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use autonym for the initially selected language - change (mediawiki...TwnMainPage)
jenkins-bot has submitted this change and it was merged. Change subject: Use autonym for the initially selected language .. Use autonym for the initially selected language For consistency with the frontend language selector Change-Id: If2e5716ffcbb9101b80922729f6c83645491b5f7 --- M specials/SpecialTwnMainPage.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Siebrand: Looks good to me, approved jenkins-bot: Verified diff --git a/specials/SpecialTwnMainPage.php b/specials/SpecialTwnMainPage.php index 6201846..b970321 100644 --- a/specials/SpecialTwnMainPage.php +++ b/specials/SpecialTwnMainPage.php @@ -488,7 +488,7 @@ $this->getOutput()->addModules( 'ext.translate.mainpage.signup' ); $languageCode = $this->getLanguage()->getCode(); - $languageName = TranslateUtils::getLanguageName( $languageCode ); + $languageName = TranslateUtils::getLanguageName( $languageCode, $languageCode ); $defaultLanguage = Xml::checkLabel( $languageName, -- To view, visit https://gerrit.wikimedia.org/r/94863 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If2e5716ffcbb9101b80922729f6c83645491b5f7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TwnMainPage Gerrit-Branch: master Gerrit-Owner: Nikerabbit Gerrit-Reviewer: Siebrand 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 for button sizes - change (mediawiki...TwnMainPage)
Pginer has uploaded a new change for review. https://gerrit.wikimedia.org/r/94872 Change subject: Fix for button sizes .. Fix for button sizes The CSS avoids using explicit height to make sure that the buttons can grow when the text inside becomes longer in some languages (where it may need an addiional line). The selector rule has been modified to make sure that min-height was not overriden by the one defined at .column class. Change-Id: I7afb9fa1ad006685cd9946a632312645b75c7066 --- M resources/css/ext.translate.mainpage.css 1 file changed, 3 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TwnMainPage refs/changes/72/94872/1 diff --git a/resources/css/ext.translate.mainpage.css b/resources/css/ext.translate.mainpage.css index e5d0aba..528b030 100644 --- a/resources/css/ext.translate.mainpage.css +++ b/resources/css/ext.translate.mainpage.css @@ -164,10 +164,9 @@ color: #252525; } -.main-widget button { - height: 32px; +.main-widget button.button { + min-height: 32px; padding: 10px; - font-size: 20pt; margin: 10px; } @@ -257,7 +256,7 @@ .ranking .button { min-width: 80%; - min-height: 30px; + min-height: 32px; } .ranking .count-description { -- To view, visit https://gerrit.wikimedia.org/r/94872 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7afb9fa1ad006685cd9946a632312645b75c7066 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TwnMainPage Gerrit-Branch: master Gerrit-Owner: Pginer ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix for button sizes - change (mediawiki...TwnMainPage)
jenkins-bot has submitted this change and it was merged. Change subject: Fix for button sizes .. Fix for button sizes The CSS avoids using explicit height to make sure that the buttons can grow when the text inside becomes longer in some languages (where it may need an addiional line). The selector rule has been modified to make sure that min-height was not overriden by the one defined at .column class. Bug: 54477 Change-Id: I7afb9fa1ad006685cd9946a632312645b75c7066 --- M resources/css/ext.translate.mainpage.css 1 file changed, 3 insertions(+), 4 deletions(-) Approvals: Siebrand: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/css/ext.translate.mainpage.css b/resources/css/ext.translate.mainpage.css index e5d0aba..528b030 100644 --- a/resources/css/ext.translate.mainpage.css +++ b/resources/css/ext.translate.mainpage.css @@ -164,10 +164,9 @@ color: #252525; } -.main-widget button { - height: 32px; +.main-widget button.button { + min-height: 32px; padding: 10px; - font-size: 20pt; margin: 10px; } @@ -257,7 +256,7 @@ .ranking .button { min-width: 80%; - min-height: 30px; + min-height: 32px; } .ranking .count-description { -- To view, visit https://gerrit.wikimedia.org/r/94872 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7afb9fa1ad006685cd9946a632312645b75c7066 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/TwnMainPage Gerrit-Branch: master Gerrit-Owner: Pginer Gerrit-Reviewer: Nikerabbit Gerrit-Reviewer: Siebrand Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Get rid of 3rd argument in calls to Templating::renderPost() - change (mediawiki...Flow)
Matthias Mullie has uploaded a new change for review. https://gerrit.wikimedia.org/r/94873 Change subject: Get rid of 3rd argument in calls to Templating::renderPost() .. Get rid of 3rd argument in calls to Templating::renderPost() 3rd parameter is $return, not some instance of PostRevision; root post being tossed in is incorrect Change-Id: I4f48cf1b198e687d56d844206b95ef6b1b5b3c9e --- M includes/Block/Topic.php M templates/topic.html.php 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/73/94873/1 diff --git a/includes/Block/Topic.php b/includes/Block/Topic.php index f3c1c06..aa322a1 100644 --- a/includes/Block/Topic.php +++ b/includes/Block/Topic.php @@ -292,7 +292,7 @@ }; } else { $renderFunction = function( $templating ) use ( $self, $newRevision, $rootPost ) { - return $templating->renderPost( $newRevision, $self, $rootPost ); + return $templating->renderPost( $newRevision, $self ); }; } diff --git a/templates/topic.html.php b/templates/topic.html.php index 6ed41b7..5ba16fa 100644 --- a/templates/topic.html.php +++ b/templates/topic.html.php @@ -134,7 +134,7 @@ getChildren() as $child ) { - echo $this->renderPost( $child, $block, $root ); + echo $this->renderPost( $child, $block ); } if ( $permissions->isAllowed( $root, 'reply' ) ) { -- To view, visit https://gerrit.wikimedia.org/r/94873 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4f48cf1b198e687d56d844206b95ef6b1b5b3c9e 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] Fix vertical alignment for language selector - change (mediawiki...TwnMainPage)
jenkins-bot has submitted this change and it was merged. Change subject: Fix vertical alignment for language selector .. Fix vertical alignment for language selector The language selector trigger has an icon next to it that should point to the language label but was misaligned. Padding-based positioning uses now margin so that the background image affects the specific element. Change-Id: Id27c862d34fa2ec71356c6932ca210ba2d264014 --- M resources/css/ext.translate.mainpage.css 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Nikerabbit: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/css/ext.translate.mainpage.css b/resources/css/ext.translate.mainpage.css index e5d0aba..291c8e9 100644 --- a/resources/css/ext.translate.mainpage.css +++ b/resources/css/ext.translate.mainpage.css @@ -27,10 +27,10 @@ } .twn-mainpage-header .uls-trigger { - background-position: bottom left; + background-position: center left; padding-left: 30px; color: #3366BB; - padding-top: 50px; + margin-top: 50px; cursor: pointer; display: inline-block; } -- To view, visit https://gerrit.wikimedia.org/r/94870 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id27c862d34fa2ec71356c6932ca210ba2d264014 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/TwnMainPage Gerrit-Branch: master Gerrit-Owner: Pginer Gerrit-Reviewer: Nikerabbit Gerrit-Reviewer: Santhosh 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 references to 'olivneh' account from node defs - change (operations/puppet)
Faidon Liambotis has submitted this change and it was merged. Change subject: Remove references to 'olivneh' account from node defs .. Remove references to 'olivneh' account from node defs 'olivneh' is now disabled; I use 'ori'. Because I have files in my home directory on some of these systems, I am not purging the account from the systems it was on, merely removing it from the manifest. I also removed groups::wikidev from vanadium, professor, nickel & tungsten, where it was added as part of granting me access. No other accounts in the wikidev group were specified for these systems. Change-Id: Ic90a73af0df6f608085721866b46d1e431eaed47 --- M manifests/site.pp 1 file changed, 3 insertions(+), 31 deletions(-) Approvals: Faidon Liambotis: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/site.pp b/manifests/site.pp index 150b74e..15a460e 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -2145,15 +2145,9 @@ include standard, ganglia::web, -misc::monitoring::views, -groups::wikidev, -accounts::olivneh +misc::monitoring::views install_certificate{ "star.wikimedia.org": } - - sudo_user { 'olivneh': - privileges => ['ALL = (ALL) NOPASSWD: ALL'], - } } node /^osm-cp100[1-4]\.wikimedia\.org$/ { @@ -2247,13 +2241,7 @@ ganglia, ntp::client, udpprofile::collector, -misc::graphite, -groups::wikidev, -accounts::olivneh - -sudo_user { 'olivneh': -privileges => ['ALL = (ALL) NOPASSWD: ALL'], -} +misc::graphite } node "potassium.eqiad.wmnet" { @@ -2623,7 +2611,6 @@ accounts::mflaschen, # RT 4796 accounts::mgrover, # RT 4600 accounts::mlitn, # RT 4959 -accounts::olivneh, # RT 3451 accounts::otto, accounts::reedy, accounts::rfaulk,# RT 5040 @@ -2829,13 +2816,11 @@ $gid=500 include standard, -groups::wikidev, -accounts::olivneh, role::eventlogging, role::ipython_notebook, role::logging::mediawiki::errors -sudo_user { [ 'otto', 'olivneh' ]: +sudo_user { 'otto': privileges => ['ALL = (ALL) NOPASSWD: ALL'], } } @@ -2844,28 +2829,15 @@ # and MediaWiki errors. Non-critical at the moment. See RT #5514. node 'hafnium.wikimedia.org' { include standard, -groups::wikidev, -accounts::olivneh, role::eventlogging::graphite, misc::graphite::navtiming, webperf - -sudo_user { 'olivneh': -privileges => ['ALL = (ALL) NOPASSWD: ALL'], -} } # StatsD & Graphite host for eqiad. Slotted to replace professor.pmtpa. # RT #5871 node 'tungsten.eqiad.wmnet' { -# services include standard, role::statsd, role::graphite - -# access -include groups::wikidev, accounts::olivneh -sudo_user { 'olivneh': -privileges => ['ALL = (ALL) NOPASSWD: ALL'], -} } node "virt1000.wikimedia.org" { -- To view, visit https://gerrit.wikimedia.org/r/92267 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic90a73af0df6f608085721866b46d1e431eaed47 Gerrit-PatchSet: 3 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ori.livneh Gerrit-Reviewer: Faidon Liambotis 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 operator T_FOREACH - change (mediawiki...Foxway)
Pastakhov has uploaded a new change for review. https://gerrit.wikimedia.org/r/94874 Change subject: add operator T_FOREACH .. add operator T_FOREACH * show exception foxway as string * fix double variables '$bar' for 'echo "$foo[$bar]";' Time: 485 ms, Memory: 24.75Mb OK (487 tests, 493 assertions) Change-Id: Id917d91f56f0daef19fa0ee716feba284c35620c --- M Foxway.body.php M includes/Compiler.php M includes/ExceptionFoxway.php M includes/Runtime.php M tests/phpunit/includes/RuntimeTest.php 5 files changed, 169 insertions(+), 24 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Foxway refs/changes/74/94874/1 diff --git a/Foxway.body.php b/Foxway.body.php index bfcfcb5..4ffbcff 100644 --- a/Foxway.body.php +++ b/Foxway.body.php @@ -51,6 +51,8 @@ array( 'Parser'=>&$parser, 'PPFrame'=>&$frame ) ); $return = implode($result); + } catch (\Foxway\ExceptionFoxway $exc) { + $return = (string) $exc; } catch (Exception $exc) { $return = $exc->getTraceAsString(); } @@ -85,7 +87,10 @@ self::getScope($frame), array( 'Parser'=>&$parser, 'PPFrame'=>&$frame ) ); - } catch (Exception $exc) { + } catch ( \Foxway\ExceptionFoxway $exc ) { + \Foxway\Runtime::$time += microtime(true) - self::$startTime; + return (string) $exc; + } catch ( Exception $exc ) { \Foxway\Runtime::$time += microtime(true) - self::$startTime; return $exc->getTraceAsString(); } diff --git a/includes/Compiler.php b/includes/Compiler.php index 14fa2cf..bc0cc55 100644 --- a/includes/Compiler.php +++ b/includes/Compiler.php @@ -28,6 +28,7 @@ define( 'FOXWAY_ALLOW_ONLY_VARIABLES', 1 << 22 ); define( 'FOXWAY_ALLOW_SKIP_PARAMS', 1 << 23 ); // used in operator T_LIST define( 'FOXWAY_DOUBLE_ARROW_WAS_USED', 1 << 24 ); +define( 'FOXWAY_EXPECT_OPERATOR_AS', 1 << 25 ); // for operator T_FOREACH define( 'FOXWAY_CLEAR_FLAG_FOR_SHIFT_BEFORE_PARENTHESES', FOXWAY_EXPECT_PARENTHESES_WITH_LIST_PARAMS ); //define( 'FOXWAY_CLEAR_FLAG_FOR_SHIFT_AFTER_PARENTHESES', FOXWAY_EXPECT_PARENTHESES_WITH_LIST_PARAMS ); @@ -287,6 +288,7 @@ }else{ // right operator was not used $lastValue = &$tmp; } + $values = array(); // there is variables of array index. Example '$bar' for : echo "$foo[$bar]"; unset($tmp); $stackEncapsed = false; break; @@ -462,14 +464,21 @@ case T_XOR_EQUAL: // ^= case T_SL_EQUAL:// <<= case T_SR_EQUAL:// >>= + if ( $parentFlags & FOXWAY_ALLOW_ONLY_VARIABLES ) { throw new ExceptionFoxway($id, FOXWAY_PHP_SYNTAX_ERROR_UNEXPECTED, $tokenLine); } + // break is not necessary here case T_DOUBLE_ARROW:// => - if ( !$needOperator || !isset($lastValue) || $rightOperators || $parentFlags & FOXWAY_ALLOW_ONLY_VARIABLES ) { throw new ExceptionFoxway($id, FOXWAY_PHP_SYNTAX_ERROR_UNEXPECTED, $tokenLine); } + if ( !$needOperator || !isset($lastValue) || $rightOperators ) { throw new ExceptionFoxway($id, FOXWAY_PHP_SYNTAX_ERROR_UNEXPECTED, $tokenLine); } $needOperator = false; array_unshift( $needParams, array(FOXWAY_STACK_COMMAND=>$id, FOXWAY_STACK_RESULT=>&$lastValue[FOXWAY_STACK_RESULT], FOXWAY_STACK_PARAM=>&$lastValue, FOXWAY_STACK_TOKEN_LINE=>$tokenLine) ); if ( $id == T_DOUBLE_ARROW ) { - if( $parentFlags & FOXWAY_ALLOW_DOUBLE_ARROW == 0 ) { throw new ExceptionFoxway($id, FOXWAY_PHP_SYNTAX_ERROR_UNEXPECTED, $tokenLine); } + if ( $parentFlags & FOXWAY_ALLOW_DOUBLE_ARROW == 0 ) { throw new ExceptionFoxway($id, FOXWAY_PHP_SYNTAX_ERROR_UNEXPECTED, $tokenLine); } $parentFlags = ( $parentFlags & ~FOXWAY_ALLOW_DOUBLE_ARROW ) | FOXWAY_DOUBLE_ARROW_WAS_USED; // Mark double arrow was used +
[MediaWiki-commits] [Gerrit] CSS should be shown to non-JS users - change (mediawiki...Flow)
Matthias Mullie has uploaded a new change for review. https://gerrit.wikimedia.org/r/94875 Change subject: CSS should be shown to non-JS users .. CSS should be shown to non-JS users Having just addModules() will require JS to load all styles, via resourceloader. Change-Id: I55f416e94d1929f142b902d5f79665c3addf44ff --- M includes/Block/Header.php M includes/Block/Topic.php M includes/Block/TopicList.php M includes/View.php 4 files changed, 12 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/75/94875/1 diff --git a/includes/Block/Header.php b/includes/Block/Header.php index a90fd6c..26a1afe 100644 --- a/includes/Block/Header.php +++ b/includes/Block/Header.php @@ -91,7 +91,8 @@ // Render board history view in header block, topiclist block will not be renderred // when action = 'board-history' if ( $this->action === 'board-history' ) { - $templating->getOutput()->addModules( 'ext.flow.history' ); + $templating->getOutput()->addModuleStyles( array( 'ext.flow.history' ) ); + $templating->getOutput()->addModules( array( 'ext.flow.history' ) ); $tplVars = array( 'title' => wfMessage( 'flow-board-history', $this->workflow->getArticleTitle() )->escaped(), 'historyExists' => false, @@ -106,7 +107,8 @@ $templating->render( "flow:board-history.html.php", $tplVars ); } else { - $templating->getOutput()->addModules( 'ext.flow.header' ); + $templating->getOutput()->addModuleStyles( array( 'ext.flow.history' ) ); + $templating->getOutput()->addModules( array( 'ext.flow.header' ) ); $templateName = ( $this->action == 'edit-header' ) ? 'edit-header' : 'header'; $templating->render( "flow:$templateName.html.php", array( 'block' => $this, diff --git a/includes/Block/Topic.php b/includes/Block/Topic.php index f3c1c06..bf7a38c 100644 --- a/includes/Block/Topic.php +++ b/includes/Block/Topic.php @@ -318,16 +318,19 @@ } public function render( Templating $templating, array $options, $return = false ) { - $templating->getOutput()->addModules( 'ext.flow.discussion' ); + $templating->getOutput()->addModuleStyles( array( 'ext.flow.discussion' ) ); + $templating->getOutput()->addModules( array( 'ext.flow.discussion' ) ); $prefix = ''; switch( $this->action ) { case 'post-history': - $templating->getOutput()->addModules( 'ext.flow.history' ); + $templating->getOutput()->addModuleStyles( array( 'ext.flow.history' ) ); + $templating->getOutput()->addModules( array( 'ext.flow.history' ) ); return $prefix . $this->renderPostHistory( $templating, $options, $return ); case 'topic-history': - $templating->getOutput()->addModules( 'ext.flow.history' ); + $templating->getOutput()->addModuleStyles( array( 'ext.flow.history' ) ); + $templating->getOutput()->addModules( array( 'ext.flow.history' ) ); $history = $this->loadTopicHistory(); if ( !$this->permissions->isAllowed( reset( $history ), 'post-history' ) ) { throw new \MWException( 'Not Allowed' ); diff --git a/includes/Block/TopicList.php b/includes/Block/TopicList.php index 7821605..64255f9 100644 --- a/includes/Block/TopicList.php +++ b/includes/Block/TopicList.php @@ -102,6 +102,7 @@ public function render( Templating $templating, array $options ) { // Don't render the topcilist block for some actions, eg: board-history if ( !in_array( $this->action, $this->suppressedActions, true ) ) { + $templating->getOutput()->addModuleStyles( array( 'ext.flow.discussion' ) ); $templating->getOutput()->addModules( array( 'ext.flow.discussion' ) ); if ( $this->workflow->isNew() ) { $templating->render( "flow:topiclist.html.php", array( diff --git a/includes/View.php b/includes/View.php index d43f1b5..93756d9 100644 --- a/includes/View.php +++ b/includes/View.php @@ -19,7 +19,7 @@ } public function show( WorkflowLoader $loader, $action ) { - $this->output->addModuleStyles( array( 'mediawiki.ui' ) ); + $this->output->addModuleStyles( array( 'mediawiki.ui', 'ext.flow.base' ) ); $this->output->addM
[MediaWiki-commits] [Gerrit] remove rose (long gone); fix range comments - change (operations/dns)
ArielGlenn has uploaded a new change for review. https://gerrit.wikimedia.org/r/94876 Change subject: remove rose (long gone); fix range comments .. remove rose (long gone); fix range comments Change-Id: Ie1fd5a0e75ff12d76dbe8568d06ffa523bac136b --- M templates/wmnet 1 file changed, 2 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/dns refs/changes/76/94876/1 diff --git a/templates/wmnet b/templates/wmnet index d503e3c..b7dd962 100644 --- a/templates/wmnet +++ b/templates/wmnet @@ -153,7 +153,6 @@ pc11H IN A10.0.0.221 pc21H IN A10.0.0.222 pc31H IN A10.0.0.223 -rose 1H IN A10.0.0.26 searchidx2 1H IN A10.0.3.52 snapshot1 1H IN A10.0.10.1 @@ -194,12 +193,12 @@ ; GENERATES -; mw1-mw50 +; mw1-mw49 {% for i in range(1, 50) %} mw{{ i }} 1H IN A10.0.11.{{ i }} {%- endfor %} -; mw51-mw110 +; mw51-mw109 {% for i in range(51, 110) %} mw{{ i }} 1H IN A10.0.11.{{ i }} {%- endfor %} -- To view, visit https://gerrit.wikimedia.org/r/94876 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie1fd5a0e75ff12d76dbe8568d06ffa523bac136b Gerrit-PatchSet: 1 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: ArielGlenn ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] remove rose (long gone); fix range comments - change (operations/dns)
ArielGlenn has submitted this change and it was merged. Change subject: remove rose (long gone); fix range comments .. remove rose (long gone); fix range comments Change-Id: Ie1fd5a0e75ff12d76dbe8568d06ffa523bac136b --- M templates/wmnet 1 file changed, 2 insertions(+), 3 deletions(-) Approvals: ArielGlenn: Looks good to me, approved jenkins-bot: Verified diff --git a/templates/wmnet b/templates/wmnet index d503e3c..b7dd962 100644 --- a/templates/wmnet +++ b/templates/wmnet @@ -153,7 +153,6 @@ pc11H IN A10.0.0.221 pc21H IN A10.0.0.222 pc31H IN A10.0.0.223 -rose 1H IN A10.0.0.26 searchidx2 1H IN A10.0.3.52 snapshot1 1H IN A10.0.10.1 @@ -194,12 +193,12 @@ ; GENERATES -; mw1-mw50 +; mw1-mw49 {% for i in range(1, 50) %} mw{{ i }} 1H IN A10.0.11.{{ i }} {%- endfor %} -; mw51-mw110 +; mw51-mw109 {% for i in range(51, 110) %} mw{{ i }} 1H IN A10.0.11.{{ i }} {%- endfor %} -- To view, visit https://gerrit.wikimedia.org/r/94876 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie1fd5a0e75ff12d76dbe8568d06ffa523bac136b Gerrit-PatchSet: 1 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: ArielGlenn Gerrit-Reviewer: ArielGlenn Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Do not load jquery.jStorage for logged in users - change (mediawiki...UniversalLanguageSelector)
jenkins-bot has submitted this change and it was merged. Change subject: Do not load jquery.jStorage for logged in users .. Do not load jquery.jStorage for logged in users Change-Id: Ibe77962cecd6aa8504aa60d5d2b8d17a56e1319f --- M Resources.php M UniversalLanguageSelector.hooks.php M resources/js/ext.uls.preferences.js 3 files changed, 18 insertions(+), 7 deletions(-) Approvals: Nikerabbit: Looks good to me, approved jenkins-bot: Verified diff --git a/Resources.php b/Resources.php index f5d4d99..2f64303 100644 --- a/Resources.php +++ b/Resources.php @@ -118,6 +118,10 @@ 'position' => 'top', ) + $resourcePaths; +// Anonymous users need 'jquery.jStorage' module for client side preference persistence. +$wgResourceModules['ext.uls.interface.anon'] = $wgResourceModules['ext.uls.interface']; +$wgResourceModules['ext.uls.interface.anon']['dependencies'][] = 'jquery.jStorage'; + $wgResourceModules['ext.uls.languagesettings'] = array( 'scripts' => 'resources/js/ext.uls.languagesettings.js', 'styles' => 'resources/css/ext.uls.languagesettings.css', @@ -133,7 +137,10 @@ 'dependencies' => array( 'mediawiki.user', 'mediawiki.api', - 'jquery.jStorage', + 'jquery.json', + // This is quite a big module and only needed for anons. + // Loaded conditionally in ext.uls.interface(.anon). + //'jquery.jStorage', ), ) + $resourcePaths; diff --git a/UniversalLanguageSelector.hooks.php b/UniversalLanguageSelector.hooks.php index 44436a7..82a9c59 100644 --- a/UniversalLanguageSelector.hooks.php +++ b/UniversalLanguageSelector.hooks.php @@ -67,7 +67,11 @@ if ( self::isToolbarEnabled( $out->getUser() ) ) { // Enable UI language selection for the user. - $out->addModules( 'ext.uls.interface' ); + if ( $out->getUser()->isAnon() ) { + $out->addModules( 'ext.uls.interface.anon' ); + } else { + $out->addModules( 'ext.uls.interface' ); + } } return true; diff --git a/resources/js/ext.uls.preferences.js b/resources/js/ext.uls.preferences.js index f0cbb5f..5edde74 100644 --- a/resources/js/ext.uls.preferences.js +++ b/resources/js/ext.uls.preferences.js @@ -115,13 +115,14 @@ * Initialize */ init: function () { + var options; + if ( this.isAnon ) { - this.preferences = $.jStorage.get( this.preferenceName ); + this.preferences = $.jStorage.get( this.preferenceName ) || {}; } else { - var options = mw.user.options.get( this.preferenceName ); - this.preferences = $.parseJSON( options ); + options = mw.user.options.get( this.preferenceName ); + this.preferences = $.parseJSON( options ) || {}; } - this.preferences = this.preferences || {}; }, /** @@ -157,7 +158,6 @@ $.jStorage.set( this.preferenceName, this.preferences ); callback.call( this, true ); } else { - // Logged in user. Use MW APIs to change preferences saveOptionsWithToken( { action: 'options', -- To view, visit https://gerrit.wikimedia.org/r/93051 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibe77962cecd6aa8504aa60d5d2b8d17a56e1319f Gerrit-PatchSet: 6 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner: Nikerabbit Gerrit-Reviewer: Nikerabbit Gerrit-Reviewer: Santhosh 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 actions box available to non-JS users - change (mediawiki...Flow)
Matthias Mullie has uploaded a new change for review. https://gerrit.wikimedia.org/r/94877 Change subject: Make actions box available to non-JS users .. Make actions box available to non-JS users Action boxes (currently only used for moderation) are represented by some icon (.flow-actions-link) that, when clicked, display a flyout window (.flow-actions-flyout) Non-JS users won't have javascript bind the event to display the flyout, so let's make sure the functionality is not hidden from them. Change-Id: I0f989bb5c1df5c0971df1bf141fad4ce4fc489ba --- M modules/base/styles/actionbox.less 1 file changed, 11 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/77/94877/1 diff --git a/modules/base/styles/actionbox.less b/modules/base/styles/actionbox.less index 714b09d..fe2bf03 100644 --- a/modules/base/styles/actionbox.less +++ b/modules/base/styles/actionbox.less @@ -47,3 +47,14 @@ } } } + +// for non-JS users, hide the action link & show flyout immediately +.client-nojs { + .flow-actions-link { + display: none; + } + + .flow-actions-flyout { + display: block; + } +} -- To view, visit https://gerrit.wikimedia.org/r/94877 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0f989bb5c1df5c0971df1bf141fad4ce4fc489ba 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] rake validate now let puppet output colors - change (operations/puppet)
Faidon Liambotis has submitted this change and it was merged. Change subject: rake validate now let puppet output colors .. rake validate now let puppet output colors We have a plugin in Jenkins that let us generate the HTML counterpart of ANSI escape codes. That will make the console output slighlty nicer. Change-Id: I3c8f68f0de04a247278acb468e1cf94c434b6d77 --- M rakefile 1 file changed, 5 insertions(+), 14 deletions(-) Approvals: Faidon Liambotis: Looks good to me, approved jenkins-bot: Verified diff --git a/rakefile b/rakefile index 40b67a3..476b0c4 100644 --- a/rakefile +++ b/rakefile @@ -27,8 +27,6 @@ =end -$enable_color=false - # Only care about color when using a tty if Rake.application.tty_output? # Since we are going to use puppet internal stuff, we might as @@ -40,18 +38,11 @@ $enable_color=true rescue LoadError puts "Cant load puppet/util/colors .. no color for you!" + # define our own colorization method that simply output the message + def console_color( level, message ) + return message + end end -end - -# Setup colorization if need be -if $enable_color - $puppetcolor = '--color true' -else - # define our own colorization method that simply output the message - def console_color( level, message ) - return message - end - $puppetcolor = '--color none' end task :default => [:help] @@ -184,7 +175,7 @@ # Validate manifests passed as an array of filenames def puppet_parser_validate(*manifests) manifests = manifests.join(' ') - sh "puppet parser validate #{$puppetcolor} #{manifests}" + sh "puppet parser validate #{manifests}" end desc "Run spec tests found in modules" -- To view, visit https://gerrit.wikimedia.org/r/77381 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3c8f68f0de04a247278acb468e1cf94c434b6d77 Gerrit-PatchSet: 3 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Hashar Gerrit-Reviewer: Faidon Liambotis 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 Autonym font (20131112) - change (mediawiki...UniversalLanguageSelector)
KartikMistry has uploaded a new change for review. https://gerrit.wikimedia.org/r/94878 Change subject: Update Autonym font (20131112) .. Update Autonym font (20131112) * Fix rendering of Telugu. Bug: 56841 Change-Id: Ia43e404ed67346b65e9344c4fb7ae655ed303558 --- M data/fontrepo/fonts/Autonym/Autonym.eot M data/fontrepo/fonts/Autonym/Autonym.ttf M data/fontrepo/fonts/Autonym/Autonym.woff M data/fontrepo/fonts/Autonym/font.ini M resources/js/ext.uls.webfonts.repository.js 5 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector refs/changes/78/94878/1 diff --git a/data/fontrepo/fonts/Autonym/Autonym.eot b/data/fontrepo/fonts/Autonym/Autonym.eot index 00e036c..fd0a088 100644 --- a/data/fontrepo/fonts/Autonym/Autonym.eot +++ b/data/fontrepo/fonts/Autonym/Autonym.eot Binary files differ diff --git a/data/fontrepo/fonts/Autonym/Autonym.ttf b/data/fontrepo/fonts/Autonym/Autonym.ttf index 6e5fb54..c3cfeb7 100644 --- a/data/fontrepo/fonts/Autonym/Autonym.ttf +++ b/data/fontrepo/fonts/Autonym/Autonym.ttf Binary files differ diff --git a/data/fontrepo/fonts/Autonym/Autonym.woff b/data/fontrepo/fonts/Autonym/Autonym.woff index 25f7c43..9147c14 100644 --- a/data/fontrepo/fonts/Autonym/Autonym.woff +++ b/data/fontrepo/fonts/Autonym/Autonym.woff Binary files differ diff --git a/data/fontrepo/fonts/Autonym/font.ini b/data/fontrepo/fonts/Autonym/font.ini index 3d2d1aa..89adaf1 100644 --- a/data/fontrepo/fonts/Autonym/font.ini +++ b/data/fontrepo/fonts/Autonym/font.ini @@ -1,6 +1,6 @@ [Autonym] languages=mul -version=20131104 +version=20131112 license=OFL-1.1 licensefile=OFL.txt url=https://github.com/santhoshtr/AutonymFont/ diff --git a/resources/js/ext.uls.webfonts.repository.js b/resources/js/ext.uls.webfonts.repository.js index 4cc443f..7abf913 100644 --- a/resources/js/ext.uls.webfonts.repository.js +++ b/resources/js/ext.uls.webfonts.repository.js @@ -1,5 +1,5 @@ // Do not edit! This file is generated from data/fontrepo by data/fontrepo/scripts/compile.php ( function ( $ ) { $.webfonts = $.webfonts || {}; - $.webfonts.repository = {"base":"..\/data\/fontrepo\/fonts\/","languages":{"adx":["Jomolhari"],"af":["system","OpenDyslexic"],"ahr":["Lohit Marathi"],"akk":["Akkadian"],"am":["AbyssinicaSIL"],"ang":["system","Junicode"],"ar":["system","Amiri"],"arb":["system","Amiri"],"arc":["Estrangelo Edessa","East Syriac Adiabene","SertoUrhoy"],"as":["system","Lohit Assamese"],"bbc":["system","Pangururan"],"bh":["Lohit Devanagari"],"bho":["Lohit Devanagari"],"bk":["system","OpenDyslexic"],"bn":["Siyam Rupali","Lohit Bengali"],"bo":["Jomolhari"],"bod":["Jomolhari"],"bpy":["Siyam Rupali","Lohit Bengali"],"btk":["system","Pangururan"],"bug":["Saweri"],"ca":["system","OpenDyslexic"],"cdo":["system","CharisSIL"],"cr":["OskiEast"],"cy":["system","OpenDyslexic"],"da":["system","OpenDyslexic"],"de":["system","OpenDyslexic"],"dre":["Jomolhari"],"dv":["FreeFont-Thaana"],"dz":["Jomolhari"],"en":["system","OpenDyslexic"],"es":["system","OpenDyslexic"],"et":["system","OpenDyslexic"],"fa":["system","Iranian Sans","Nazli","Amiri"],"fi":["system","OpenDyslexic"],"fo":["system","OpenDyslexic"],"fr":["system","OpenDyslexic"],"fy":["system","OpenDyslexic"],"ga":["system","OpenDyslexic"],"gd":["system","OpenDyslexic"],"gez":["AbyssinicaSIL"],"gl":["system","OpenDyslexic"],"goe":["Jomolhari"],"gom":["Lohit Devanagari"],"grc":["system","GentiumPlus"],"gu":["Lohit Gujarati"],"hbo":["Taamey Frank CLM","Alef"],"he":["system","Alef","Miriam CLM","Taamey Frank
[MediaWiki-commits] [Gerrit] Fix typos in dumpJson command options - change (mediawiki...Wikibase)
Aude has uploaded a new change for review. https://gerrit.wikimedia.org/r/94879 Change subject: Fix typos in dumpJson command options .. Fix typos in dumpJson command options Change-Id: I9379b2f175a2e1a3d712849ef7a3db772bb985e9 --- M repo/maintenance/dumpJson.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/79/94879/1 diff --git a/repo/maintenance/dumpJson.php b/repo/maintenance/dumpJson.php index b114de6..75da1ea 100644 --- a/repo/maintenance/dumpJson.php +++ b/repo/maintenance/dumpJson.php @@ -55,9 +55,9 @@ $this->mDescription = 'Generate a JSON dump from entities in the repository.'; $this->addOption( 'list-file', "A file containing one entity ID per line.", false, true ); - $this->addOption( 'entity-type', "Only dump this kind of entitiy, e.g. `item` or `property`.", false, true ); + $this->addOption( 'entity-type', "Only dump this kind of entity, e.g. `item` or `property`.", false, true ); $this->addOption( 'sharding-factor', "The number of shards (must be >= 1)", false, true ); - $this->addOption( 'shard', "A the shard to output (must be lett than the sharding-factor) ", false, true ); + $this->addOption( 'shard', "The shard to output (must be less than the sharding-factor) ", false, true ); $this->addOption( 'output', "Output file (default is stdout) ", false, true ); $this->addOption( 'quiet', "Disable progress reporting", false, false ); } -- To view, visit https://gerrit.wikimedia.org/r/94879 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9379b2f175a2e1a3d712849ef7a3db772bb985e9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Aude ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] (bug 49434) Support diff=0 in Wikibase - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: (bug 49434) Support diff=0 in Wikibase .. (bug 49434) Support diff=0 in Wikibase This adds support for requests with diff=0. Also, moves the revision calculating code and getContent() out of ViewEntityAction and adds/improves tests. Ultimately, much of this code should be in core, with stuff factored out of Article and DifferenceEngine and merged together with this code, in a new core class. But best not to block fixing this bug on that for now. Change-Id: I6d160aa13f12feb98f2e95128e7e7a07ee6831d6 --- M repo/Wikibase.classes.php A repo/includes/ContentRetriever.php M repo/includes/actions/ViewEntityAction.php A repo/tests/phpunit/includes/ContentRetrieverTest.php 4 files changed, 234 insertions(+), 65 deletions(-) Approvals: Daniel Kinzler: Looks good to me, approved jenkins-bot: Verified diff --git a/repo/Wikibase.classes.php b/repo/Wikibase.classes.php index 581d1f8..8f7d4a9 100644 --- a/repo/Wikibase.classes.php +++ b/repo/Wikibase.classes.php @@ -34,6 +34,7 @@ // includes 'Wikibase\ClaimSaver' => 'includes/ClaimSaver.php', 'Wikibase\ClaimSummaryBuilder' => 'includes/ClaimSummaryBuilder.php', + 'Wikibase\ContentRetriever' => 'includes/ContentRetriever.php', 'Wikibase\DataTypeSelector' => 'includes/DataTypeSelector.php', 'Wikibase\EditEntity' => 'includes/EditEntity.php', 'Wikibase\EntityContentDiffView' => 'includes/EntityContentDiffView.php', diff --git a/repo/includes/ContentRetriever.php b/repo/includes/ContentRetriever.php new file mode 100644 index 000..4d565b9 --- /dev/null +++ b/repo/includes/ContentRetriever.php @@ -0,0 +1,107 @@ + + */ +class ContentRetriever { + + /** +* Returns the content to display on a page, given request params. +* +* If it is a diff request, then display the revision specified +* in the 'diff=' request param. +* +* @todo split out the get revision id stuff, add tests and see if +* any core code can be shared here +* +* @param Article $article +* @param Title $title +* @param WebRequest $request +* +* @return Content|null +*/ + public function getContentForRequest( Article $article, Title $title, WebRequest $request ) { + $queryValues = $request->getQueryValues(); + $oldId = $article->getOldID(); + + if ( array_key_exists( 'diff', $queryValues ) ) { + $revision = $this->getDiffRevision( $oldId, $queryValues['diff'] ); + } else { + $revision = Revision::newFromTitle( $title, $oldId ); + } + + return $revision !== null ? $revision->getContent() : null; + } + + /** +* Get the revision specified in the diff parameter or prev/next revision of oldid +* +* @since 0.5 +* +* @param int $oldId +* @param string|int $diffValue +* +* @return Revision|null +*/ + public function getDiffRevision( $oldId, $diffValue ) { + if ( $this->isSpecialDiffParam( $diffValue ) ) { + return $this->resolveDiffRevision( $oldId, $diffValue ); + } + + if ( is_numeric( $diffValue ) ) { + $revId = (int)$diffValue; + return Revision::newFromId( $revId ); + } + + // uses default handling for revision not found + // @todo error handling could be improved! + return null; + } + + /** +* @param mixed $diffValue +* +* @return boolean +*/ + protected function isSpecialDiffParam( $diffValue ) { + return in_array( $diffValue, array( 'prev', 'next', 'cur', '0' ), true ); + } + + /** +* For non-revision ids in the diff request param, get the correct revision +* +* @param int $oldId +* @param string|int $diffValue +* +* @return Revision +*/ + protected function resolveDiffRevision( $oldId, $diffValue ) { + $oldIdRev = Revision::newFromId( $oldId ); + + if ( $diffValue === 0 || $diffValue === 'cur' ) { + $curId = $oldIdRev->getTitle()->getLatestRevID(); + return Revision::newFromId( $curId ); + } elseif ( $diffValue === 'next' ) { + return $oldIdRev->getNext(); + } + + return $oldIdRev; + } + +} diff --git a/repo/includes/actions/ViewEntityAction.php b/repo/includes/actions/ViewEntityAction.php index 24720a1..eae6cf1 100644 --- a/repo/includes/actions/ViewEntityAction.php +++
[MediaWiki-commits] [Gerrit] rake validate was failling on non tty - change (operations/puppet)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/94880 Change subject: rake validate was failling on non tty .. rake validate was failling on non tty When running out of a tty, the console_color() would not be defined :-/ Change-Id: I6fc6e8511a6c888ac00bdbab7006a538deb67f49 --- M rakefile 1 file changed, 7 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/80/94880/1 diff --git a/rakefile b/rakefile index 476b0c4..fe36d84 100644 --- a/rakefile +++ b/rakefile @@ -38,10 +38,13 @@ $enable_color=true rescue LoadError puts "Cant load puppet/util/colors .. no color for you!" - # define our own colorization method that simply output the message - def console_color( level, message ) - return message - end + end +end + +unless respond_to? :console_color + # define our own colorization method that simply output the message + def console_color( level, message ) + return message end end -- To view, visit https://gerrit.wikimedia.org/r/94880 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6fc6e8511a6c888ac00bdbab7006a538deb67f49 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Hashar ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Get rid of post-specific rendering - change (mediawiki...Flow)
Matthias Mullie has uploaded a new change for review. https://gerrit.wikimedia.org/r/94881 Change subject: Get rid of post-specific rendering .. Get rid of post-specific rendering AFAIK, this is no longer used; post permalink now links to topic, with the postId as anchor to highlight the specific post Change-Id: Ib6d2ac19b27d4354cf3d3f2654836519546db41d --- M includes/Block/Topic.php 1 file changed, 6 insertions(+), 20 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/81/94881/1 diff --git a/includes/Block/Topic.php b/includes/Block/Topic.php index f3c1c06..39c4873 100644 --- a/includes/Block/Topic.php +++ b/includes/Block/Topic.php @@ -363,7 +363,7 @@ if ( !$this->permissions->isAllowed( $root, 'view' ) ) { throw new \MWException( 'Not Allowed' ); } - if ( ! isset( $options['topiclist-block'] ) ) { + if ( !isset( $options['topiclist-block'] ) ) { $prefix = $templating->render( 'flow:topic-permalink-warning.html.php', array( @@ -373,25 +373,11 @@ ); } - if ( isset( $options['postId'] ) ) { - $indexDescendant = $root->registerDescendant( $options['postId'] ); - $post = $root->getRecursiveResult( $indexDescendant ); - if ( $post === null ) { - throw new \MWException( 'Requested postId is not available within post tree' ); - } - - return $prefix . $templating->renderPost( - $post, - $this, - $return - ); - } else { - return $prefix . $templating->renderTopic( - $root, - $this, - $return - ); - } + return $prefix . $templating->renderTopic( + $root, + $this, + $return + ); } } -- To view, visit https://gerrit.wikimedia.org/r/94881 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib6d2ac19b27d4354cf3d3f2654836519546db41d 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] Jobs for GlobalCssJs extension - change (integration/jenkins-job-builder-config)
jenkins-bot has submitted this change and it was merged. Change subject: Jobs for GlobalCssJs extension .. Jobs for GlobalCssJs extension Change-Id: I5e8b233c274cec2fc9fc4e1660ff4010744d --- M mediawiki-extensions.yaml 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/mediawiki-extensions.yaml b/mediawiki-extensions.yaml index 963fd2d..0f95712 100644 --- a/mediawiki-extensions.yaml +++ b/mediawiki-extensions.yaml @@ -249,6 +249,7 @@ - GeoData - GettingStarted - GlobalBlocking + - GlobalCssJs - GlobalUsage - GoogleAdSense - GoogleCustomWikiSearch -- To view, visit https://gerrit.wikimedia.org/r/94853 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5e8b233c274cec2fc9fc4e1660ff4010744d Gerrit-PatchSet: 1 Gerrit-Project: integration/jenkins-job-builder-config Gerrit-Branch: master Gerrit-Owner: Legoktm Gerrit-Reviewer: Hashar Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] PageLayout -> PagedLayout in test/demo - change (mediawiki...VisualEditor)
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/94882 Change subject: PageLayout -> PagedLayout in test/demo .. PageLayout -> PagedLayout in test/demo Typo from oojs-ui refactor. Change-Id: Ib8615f33cc32e18ed12aee0320755a379915fb86 --- M demos/ve/index.php M modules/ve/test/index.php 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/82/94882/1 diff --git a/demos/ve/index.php b/demos/ve/index.php index 4a5c859..9934a6d 100644 --- a/demos/ve/index.php +++ b/demos/ve/index.php @@ -129,7 +129,7 @@ - + diff --git a/modules/ve/test/index.php b/modules/ve/test/index.php index 479ac55..d84c2f9 100644 --- a/modules/ve/test/index.php +++ b/modules/ve/test/index.php @@ -73,7 +73,7 @@ - + -- To view, visit https://gerrit.wikimedia.org/r/94882 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib8615f33cc32e18ed12aee0320755a379915fb86 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] Throttle rule for WikiCon - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: Throttle rule for WikiCon .. Throttle rule for WikiCon From . 2013-11-21T00:00 +0:00 To ... 2013-11-24T23:00 +0:00 IP ... 195.37.186.62 Wikis de.wikipedia, en.wikipedia de.wikisource, en.wikisource commons. Amount ... 60 Bug: 56930 Change-Id: Icede39e41ad2d49ed5a05959324eade8865023b5 --- M wmf-config/throttle.php 1 file changed, 5 insertions(+), 6 deletions(-) Approvals: Hashar: Looks good to me, approved Dereckson: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/wmf-config/throttle.php b/wmf-config/throttle.php index e0b16b2..86c4fd3 100644 --- a/wmf-config/throttle.php +++ b/wmf-config/throttle.php @@ -19,14 +19,13 @@ # (default: any project) ## Add throttling definitions below. -$wmgThrottlingExceptions[] = array( // bug 55687 - 'from' => '2013-10-18T23:00 +0:00', - 'to' => '2013-10-19T11:00 +0:00', - 'IP' => array( '210.4.97.200' ), - 'dbname' => array( 'enwiki', 'tlwiki', 'pamwiki', 'pagwiki', 'commonswiki' ), +$wmgThrottlingExceptions[] = array( // bug 56930 + 'from' => '2013-11-21T00:00 +0:00', + 'to' => '2013-11-24T23:00 +0:00', + 'IP' => array( '195.37.186.62' ), + 'dbname' => array( 'dewiki', 'enwiki', 'dewikisource', 'enwikisource', 'commonswiki' ), 'value' => 60, ); - ## Add throttling definitions above. # Will eventually raise value when MediaWiki is fully initialized: -- To view, visit https://gerrit.wikimedia.org/r/94860 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icede39e41ad2d49ed5a05959324eade8865023b5 Gerrit-PatchSet: 2 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Raimond Spekking Gerrit-Reviewer: Dereckson Gerrit-Reviewer: Hashar Gerrit-Reviewer: Reedy Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] more extensions - change (mediawiki/extensions)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/94883 Change subject: more extensions .. more extensions GlobalCssJs LanguageTag MultiUpload SubpageWatchlist YotpoReviews Change-Id: Id3771dfb0ef2fd4426f59c38e1db29f298f2cc35 --- M .gitmodules A GlobalCssJs A LanguageTag A MultiUpload A SubpageWatchlist A YotpoReviews 6 files changed, 24 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions refs/changes/83/94883/1 diff --git a/.gitmodules b/.gitmodules index 928fa72..f2315d2 100644 --- a/.gitmodules +++ b/.gitmodules @@ -230,6 +230,10 @@ path = Campaigns url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Campaigns.git branch = . +[submodule "Capiunto"] + path = Capiunto + url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Capiunto.git + branch = . [submodule "Carp"] path = Carp url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Carp.git @@ -774,6 +778,10 @@ path = GlobalBlocking url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/GlobalBlocking.git branch = . +[submodule "GlobalCssJs"] + path = GlobalCssJs + url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/GlobalCssJs.git + branch = . [submodule "GlobalNotice"] path = GlobalNotice url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/GlobalNotice.git @@ -973,6 +981,10 @@ [submodule "LanguageSelector"] path = LanguageSelector url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/LanguageSelector.git + branch = . +[submodule "LanguageTag"] + path = LanguageTag + url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/LanguageTag.git branch = . [submodule "LastModified"] path = LastModified @@ -1181,6 +1193,10 @@ [submodule "MultiMaps"] path = MultiMaps url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/MultiMaps.git + branch = . +[submodule "MultiUpload"] + path = MultiUpload + url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/MultiUpload.git branch = . [submodule "MultimediaViewer"] path = MultimediaViewer @@ -2034,6 +2050,10 @@ path = SubpageSortkey url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/SubpageSortkey.git branch = . +[submodule "SubpageWatchlist"] + path = SubpageWatchlist + url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/SubpageWatchlist.git + branch = . [submodule "Sudo"] path = Sudo url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Sudo.git @@ -2486,6 +2506,10 @@ path = YetAnotherKeywords url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/YetAnotherKeywords.git branch = . +[submodule "YotpoReviews"] + path = YotpoReviews + url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/YotpoReviews.git + branch = . [submodule "YouTube"] path = YouTube url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/YouTube.git diff --git a/GlobalCssJs b/GlobalCssJs new file mode 16 index 000..beb6009 --- /dev/null +++ b/GlobalCssJs +Subproject commit beb6009a1418bde929678f305569aa59d570f1c1 diff --git a/LanguageTag b/LanguageTag new file mode 16 index 000..3d05ed9 --- /dev/null +++ b/LanguageTag +Subproject commit 3d05ed9572c85a39a1c4991ead5796a8a6d4ed7f diff --git a/MultiUpload b/MultiUpload new file mode 16 index 000..e4c1329 --- /dev/null +++ b/MultiUpload +Subproject commit e4c132967febc9f51b95a00739633f81c4144969 diff --git a/SubpageWatchlist b/SubpageWatchlist new file mode 16 index 000..9a0d1e5 --- /dev/null +++ b/SubpageWatchlist +Subproject commit 9a0d1e54bbc9e849cc575a0a1e42c46b9c7db1f1 diff --git a/YotpoReviews b/YotpoReviews new file mode 16 index 000..08392ba --- /dev/null +++ b/YotpoReviews +Subproject commit 08392bab870b2ea979d0b14c66947d73f07ce7fb -- To view, visit https://gerrit.wikimedia.org/r/94883 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id3771dfb0ef2fd4426f59c38e1db29f298f2cc35 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions Gerrit-Branch: master Gerrit-Owner: Hashar ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update Autonym font (20131112) - change (mediawiki...UniversalLanguageSelector)
jenkins-bot has submitted this change and it was merged. Change subject: Update Autonym font (20131112) .. Update Autonym font (20131112) * Fix rendering of Telugu. Bug: 56841 Change-Id: Ia43e404ed67346b65e9344c4fb7ae655ed303558 --- M data/fontrepo/fonts/Autonym/Autonym.eot M data/fontrepo/fonts/Autonym/Autonym.ttf M data/fontrepo/fonts/Autonym/Autonym.woff M data/fontrepo/fonts/Autonym/font.ini M resources/js/ext.uls.webfonts.repository.js 5 files changed, 2 insertions(+), 2 deletions(-) Approvals: Amire80: Looks good to me, approved jenkins-bot: Verified diff --git a/data/fontrepo/fonts/Autonym/Autonym.eot b/data/fontrepo/fonts/Autonym/Autonym.eot index 00e036c..fd0a088 100644 --- a/data/fontrepo/fonts/Autonym/Autonym.eot +++ b/data/fontrepo/fonts/Autonym/Autonym.eot Binary files differ diff --git a/data/fontrepo/fonts/Autonym/Autonym.ttf b/data/fontrepo/fonts/Autonym/Autonym.ttf index 6e5fb54..c3cfeb7 100644 --- a/data/fontrepo/fonts/Autonym/Autonym.ttf +++ b/data/fontrepo/fonts/Autonym/Autonym.ttf Binary files differ diff --git a/data/fontrepo/fonts/Autonym/Autonym.woff b/data/fontrepo/fonts/Autonym/Autonym.woff index 25f7c43..9147c14 100644 --- a/data/fontrepo/fonts/Autonym/Autonym.woff +++ b/data/fontrepo/fonts/Autonym/Autonym.woff Binary files differ diff --git a/data/fontrepo/fonts/Autonym/font.ini b/data/fontrepo/fonts/Autonym/font.ini index 3d2d1aa..89adaf1 100644 --- a/data/fontrepo/fonts/Autonym/font.ini +++ b/data/fontrepo/fonts/Autonym/font.ini @@ -1,6 +1,6 @@ [Autonym] languages=mul -version=20131104 +version=20131112 license=OFL-1.1 licensefile=OFL.txt url=https://github.com/santhoshtr/AutonymFont/ diff --git a/resources/js/ext.uls.webfonts.repository.js b/resources/js/ext.uls.webfonts.repository.js index 4cc443f..7abf913 100644 --- a/resources/js/ext.uls.webfonts.repository.js +++ b/resources/js/ext.uls.webfonts.repository.js @@ -1,5 +1,5 @@ // Do not edit! This file is generated from data/fontrepo by data/fontrepo/scripts/compile.php ( function ( $ ) { $.webfonts = $.webfonts || {}; - $.webfonts.repository = {"base":"..\/data\/fontrepo\/fonts\/","languages":{"adx":["Jomolhari"],"af":["system","OpenDyslexic"],"ahr":["Lohit Marathi"],"akk":["Akkadian"],"am":["AbyssinicaSIL"],"ang":["system","Junicode"],"ar":["system","Amiri"],"arb":["system","Amiri"],"arc":["Estrangelo Edessa","East Syriac Adiabene","SertoUrhoy"],"as":["system","Lohit Assamese"],"bbc":["system","Pangururan"],"bh":["Lohit Devanagari"],"bho":["Lohit Devanagari"],"bk":["system","OpenDyslexic"],"bn":["Siyam Rupali","Lohit Bengali"],"bo":["Jomolhari"],"bod":["Jomolhari"],"bpy":["Siyam Rupali","Lohit Bengali"],"btk":["system","Pangururan"],"bug":["Saweri"],"ca":["system","OpenDyslexic"],"cdo":["system","CharisSIL"],"cr":["OskiEast"],"cy":["system","OpenDyslexic"],"da":["system","OpenDyslexic"],"de":["system","OpenDyslexic"],"dre":["Jomolhari"],"dv":["FreeFont-Thaana"],"dz":["Jomolhari"],"en":["system","OpenDyslexic"],"es":["system","OpenDyslexic"],"et":["system","OpenDyslexic"],"fa":["system","Iranian Sans","Nazli","Amiri"],"fi":["system","OpenDyslexic"],"fo":["system","OpenDyslexic"],"fr":["system","OpenDyslexic"],"fy":["system","OpenDyslexic"],"ga":["system","OpenDyslexic"],"gd":["system","OpenDyslexic"],"gez":["AbyssinicaSIL"],"gl":["system","OpenDyslexic"],"goe":["Jomolhari"],"gom":["Lohit Devanagari"],"grc":["system","GentiumPlus"],"gu":["Lohit Gujarati"],"hbo":["Taamey Frank CLM","Alef"],"he":["system","Alef","Miriam CLM","Taamey Frank CLM"],"hi":["Lohit Devanagari"],"hu":[
[MediaWiki-commits] [Gerrit] more extensions - change (mediawiki/extensions)
Hashar has submitted this change and it was merged. Change subject: more extensions .. more extensions GlobalCssJs LanguageTag MultiUpload SubpageWatchlist YotpoReviews Change-Id: Id3771dfb0ef2fd4426f59c38e1db29f298f2cc35 --- M .gitmodules A GlobalCssJs A LanguageTag A MultiUpload A SubpageWatchlist A YotpoReviews 6 files changed, 24 insertions(+), 0 deletions(-) Approvals: Hashar: Verified; Looks good to me, approved diff --git a/.gitmodules b/.gitmodules index 928fa72..f2315d2 100644 --- a/.gitmodules +++ b/.gitmodules @@ -230,6 +230,10 @@ path = Campaigns url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Campaigns.git branch = . +[submodule "Capiunto"] + path = Capiunto + url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Capiunto.git + branch = . [submodule "Carp"] path = Carp url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Carp.git @@ -774,6 +778,10 @@ path = GlobalBlocking url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/GlobalBlocking.git branch = . +[submodule "GlobalCssJs"] + path = GlobalCssJs + url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/GlobalCssJs.git + branch = . [submodule "GlobalNotice"] path = GlobalNotice url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/GlobalNotice.git @@ -973,6 +981,10 @@ [submodule "LanguageSelector"] path = LanguageSelector url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/LanguageSelector.git + branch = . +[submodule "LanguageTag"] + path = LanguageTag + url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/LanguageTag.git branch = . [submodule "LastModified"] path = LastModified @@ -1181,6 +1193,10 @@ [submodule "MultiMaps"] path = MultiMaps url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/MultiMaps.git + branch = . +[submodule "MultiUpload"] + path = MultiUpload + url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/MultiUpload.git branch = . [submodule "MultimediaViewer"] path = MultimediaViewer @@ -2034,6 +2050,10 @@ path = SubpageSortkey url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/SubpageSortkey.git branch = . +[submodule "SubpageWatchlist"] + path = SubpageWatchlist + url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/SubpageWatchlist.git + branch = . [submodule "Sudo"] path = Sudo url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Sudo.git @@ -2486,6 +2506,10 @@ path = YetAnotherKeywords url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/YetAnotherKeywords.git branch = . +[submodule "YotpoReviews"] + path = YotpoReviews + url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/YotpoReviews.git + branch = . [submodule "YouTube"] path = YouTube url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/YouTube.git diff --git a/GlobalCssJs b/GlobalCssJs new file mode 16 index 000..beb6009 --- /dev/null +++ b/GlobalCssJs +Subproject commit beb6009a1418bde929678f305569aa59d570f1c1 diff --git a/LanguageTag b/LanguageTag new file mode 16 index 000..3d05ed9 --- /dev/null +++ b/LanguageTag +Subproject commit 3d05ed9572c85a39a1c4991ead5796a8a6d4ed7f diff --git a/MultiUpload b/MultiUpload new file mode 16 index 000..e4c1329 --- /dev/null +++ b/MultiUpload +Subproject commit e4c132967febc9f51b95a00739633f81c4144969 diff --git a/SubpageWatchlist b/SubpageWatchlist new file mode 16 index 000..9a0d1e5 --- /dev/null +++ b/SubpageWatchlist +Subproject commit 9a0d1e54bbc9e849cc575a0a1e42c46b9c7db1f1 diff --git a/YotpoReviews b/YotpoReviews new file mode 16 index 000..08392ba --- /dev/null +++ b/YotpoReviews +Subproject commit 08392bab870b2ea979d0b14c66947d73f07ce7fb -- To view, visit https://gerrit.wikimedia.org/r/94883 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id3771dfb0ef2fd4426f59c38e1db29f298f2cc35 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions Gerrit-Branch: master Gerrit-Owner: Hashar Gerrit-Reviewer: Hashar ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] triggers for GlobalCssJs extension - change (integration/zuul-config)
jenkins-bot has submitted this change and it was merged. Change subject: triggers for GlobalCssJs extension .. triggers for GlobalCssJs extension Just lint jobs for now Change-Id: I081a5e391775b16846e0a7a3a8345c678c650baf --- M layout.yaml 1 file changed, 5 insertions(+), 0 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/layout.yaml b/layout.yaml index 9df875a..c9b8948 100644 --- a/layout.yaml +++ b/layout.yaml @@ -1536,6 +1536,11 @@ - name: extension-checks extname: GlobalBlocking + - name: mediawiki/extensions/GlobalCssJs +template: + - name: extension-checks +extname: GlobalCssJs + - name: mediawiki/extensions/GlobalUsage template: - name: extension-checks -- To view, visit https://gerrit.wikimedia.org/r/94852 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I081a5e391775b16846e0a7a3a8345c678c650baf Gerrit-PatchSet: 1 Gerrit-Project: integration/zuul-config Gerrit-Branch: master Gerrit-Owner: Legoktm Gerrit-Reviewer: Hashar Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use a global resizing flag on the surface to hide phantoms - change (mediawiki...VisualEditor)
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/94884 Change subject: Use a global resizing flag on the surface to hide phantoms .. Use a global resizing flag on the surface to hide phantoms Otherwise you get rendering issues when you resizing adjacent resizable nodes and you drag over the other node. Change-Id: Ie70833fa6ae38879b70a19e8d7ecec13a1d54e92 --- M modules/ve/ce/ve.ce.ProtectedNode.js M modules/ve/ce/ve.ce.ResizableNode.js M modules/ve/ce/ve.ce.Surface.js 3 files changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/84/94884/1 diff --git a/modules/ve/ce/ve.ce.ProtectedNode.js b/modules/ve/ce/ve.ce.ProtectedNode.js index b32d07c..407ec37 100644 --- a/modules/ve/ce/ve.ce.ProtectedNode.js +++ b/modules/ve/ce/ve.ce.ProtectedNode.js @@ -163,7 +163,7 @@ * @method */ ve.ce.ProtectedNode.prototype.onProtectedMouseEnter = function () { - if ( !this.root.getSurface().dragging && !this.resizing ) { + if ( !this.root.getSurface().dragging && !this.root.getSurface().resizing ) { this.createPhantoms(); } }; diff --git a/modules/ve/ce/ve.ce.ResizableNode.js b/modules/ve/ce/ve.ce.ResizableNode.js index 94cba3b..58bab9b 100644 --- a/modules/ve/ce/ve.ce.ResizableNode.js +++ b/modules/ve/ce/ve.ce.ResizableNode.js @@ -246,6 +246,7 @@ // Bind resize events this.resizing = true; + this.root.getSurface().resizing = true; this.updateSizeLabel( this.resizeInfo ); this.$( this.getElementDocument() ).on( { 'mousemove.ve-ce-resizableNode': ve.bind( this.onDocumentMouseMove, this ), @@ -409,6 +410,7 @@ this.$resizeHandles.removeClass( 've-ce-resizableNode-handles-resizing' ); this.$( this.getElementDocument() ).off( '.ve-ce-resizableNode' ); this.resizing = false; + this.root.getSurface().resizing = false; this.updateSizeLabel(); // Apply changes to the model diff --git a/modules/ve/ce/ve.ce.Surface.js b/modules/ve/ce/ve.ce.Surface.js index 125b7d9..4daa7ab 100644 --- a/modules/ve/ce/ve.ce.Surface.js +++ b/modules/ve/ce/ve.ce.Surface.js @@ -45,6 +45,7 @@ this.dragging = false; this.relocating = false; this.selecting = false; + this.resizing = false; this.contentBranchNodeChanged = false; this.$phantoms = this.$( '' ); this.$highlights = this.$( '' ); -- To view, visit https://gerrit.wikimedia.org/r/94884 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie70833fa6ae38879b70a19e8d7ecec13a1d54e92 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] rake validate was failling on non tty - change (operations/puppet)
Faidon Liambotis has submitted this change and it was merged. Change subject: rake validate was failling on non tty .. rake validate was failling on non tty When running out of a tty, the console_color() would not be defined :-/ Change-Id: I6fc6e8511a6c888ac00bdbab7006a538deb67f49 --- M rakefile 1 file changed, 7 insertions(+), 4 deletions(-) Approvals: Faidon Liambotis: Looks good to me, approved jenkins-bot: Verified diff --git a/rakefile b/rakefile index 476b0c4..fe36d84 100644 --- a/rakefile +++ b/rakefile @@ -38,10 +38,13 @@ $enable_color=true rescue LoadError puts "Cant load puppet/util/colors .. no color for you!" - # define our own colorization method that simply output the message - def console_color( level, message ) - return message - end + end +end + +unless respond_to? :console_color + # define our own colorization method that simply output the message + def console_color( level, message ) + return message end end -- To view, visit https://gerrit.wikimedia.org/r/94880 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6fc6e8511a6c888ac00bdbab7006a538deb67f49 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Hashar Gerrit-Reviewer: ArielGlenn Gerrit-Reviewer: Faidon Liambotis 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 byPropertyListSerialization Options and use - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Add byPropertyListSerialization Options and use .. Add byPropertyListSerialization Options and use This introduces options to make grouping by property in serialization optional for claims, qualifiers and references as well as using them! The default is that all of the three above are grouped by property REQUIRES I523536b8bf6e0 in WikibaseDataModel Change-Id: I3fdb0b6ed2dfee751316662f9cd91fe9c4421c45 --- M lib/includes/serializers/ClaimSerializer.php M lib/includes/serializers/ClaimsSerializer.php M lib/includes/serializers/ReferenceSerializer.php M lib/includes/serializers/SerializationOptions.php M lib/includes/serializers/SerializerObject.php M lib/tests/phpunit/serializers/ClaimSerializerTest.php M lib/tests/phpunit/serializers/ClaimsSerializerTest.php M lib/tests/phpunit/serializers/ReferenceSerializerTest.php 8 files changed, 130 insertions(+), 62 deletions(-) Approvals: Daniel Kinzler: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/includes/serializers/ClaimSerializer.php b/lib/includes/serializers/ClaimSerializer.php index 2a82a08..f63ccea 100644 --- a/lib/includes/serializers/ClaimSerializer.php +++ b/lib/includes/serializers/ClaimSerializer.php @@ -4,6 +4,7 @@ use InvalidArgumentException; use OutOfBoundsException; +use Wikibase\Reference; use Wikibase\ReferenceList; use Wikibase\Snak; use Wikibase\SnakList; @@ -93,10 +94,16 @@ $serialization['id'] = $claim->getGuid(); $snakSerializer = new SnakSerializer( $this->options ); + $serialization['mainsnak'] = $snakSerializer->getSerialized( $claim->getMainSnak() ); - $snaksSerializer = new ByPropertyListSerializer( 'qualifiers', $snakSerializer, $this->options ); - $qualifiers = $snaksSerializer->getSerialized( $claim->getQualifiers() ); + if( in_array( 'qualifiers', $this->options->getOption( SerializationOptions::OPT_GROUP_BY_PROPERTIES ) ) ){ + $listSerializer = new ByPropertyListSerializer( 'qualifiers', $snakSerializer, $this->options ); + } else { + $listSerializer = new ListSerializer( 'qualifiers', $snakSerializer, $this->options ); + } + + $qualifiers = $listSerializer->getSerialized( $claim->getQualifiers() ); if ( $qualifiers !== array() ) { $serialization['qualifiers'] = $qualifiers; @@ -219,41 +226,25 @@ * @param array $serialization * @param SnakSerializer $snakUnserializer * @return SnakList -* @throws OutOfBoundsException */ protected function unserializeQualifiers( $serialization, $snakUnserializer ) { if ( !array_key_exists( 'qualifiers', $serialization ) ) { return new SnakList(); + } else { - $sortedQualifiers = array(); - if( !array_key_exists( 'qualifiers-order', $serialization ) ) { - $sortedQualifiers = $serialization['qualifiers']; - + if( $this->isAssociative( $serialization['qualifiers'] ) ){ + $unserializer = new ByPropertyListUnserializer( $snakUnserializer ); } else { - foreach( $serialization['qualifiers-order'] as $propertyId ) { - if( !isset( $serialization['qualifiers'][$propertyId] ) ) { - throw new OutOfBoundsException( 'No snaks with property id "' . $propertyId . '" ' - . 'found in "qualifiers" parameter although specified in ' - . '"qualifiers-order"' ); - } + $unserializer = new ListUnserializer( $snakUnserializer ); + } + $snakList = new SnakList( $unserializer->newFromSerialization( $serialization['qualifiers'] ) ); - $sortedQualifiers[$propertyId] = $serialization['qualifiers'][$propertyId]; - } - - $missingProperties = array_diff_key( - $sortedQualifiers, - $serialization['qualifiers'] - ); - - if( count( $missingProperties ) > 0 ) { - throw new OutOfBoundsException( 'Property ids ' . implode( ', ', $missingProperties ) - . ' have not been specified in "qualifiers-order"' ); - } +
[MediaWiki-commits] [Gerrit] Create a new package for Event objects - change (apps...wikipedia)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/94885 Change subject: Create a new package for Event objects .. Create a new package for Event objects Change-Id: Ida796fca981466526b07bcb9a4293af4aa32726d --- M wikipedia/src/main/java/org/wikimedia/wikipedia/LinkHandler.java M wikipedia/src/main/java/org/wikimedia/wikipedia/PageActivity.java M wikipedia/src/main/java/org/wikimedia/wikipedia/SearchArticlesFragment.java A wikipedia/src/main/java/org/wikimedia/wikipedia/events/NewWikiPageNavigationEvent.java 4 files changed, 21 insertions(+), 17 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/85/94885/1 diff --git a/wikipedia/src/main/java/org/wikimedia/wikipedia/LinkHandler.java b/wikipedia/src/main/java/org/wikimedia/wikipedia/LinkHandler.java index 19a795d..b71a1e1 100644 --- a/wikipedia/src/main/java/org/wikimedia/wikipedia/LinkHandler.java +++ b/wikipedia/src/main/java/org/wikimedia/wikipedia/LinkHandler.java @@ -7,6 +7,7 @@ import com.squareup.otto.Bus; import org.json.JSONException; import org.json.JSONObject; +import org.wikimedia.wikipedia.events.NewWikiPageNavigationEvent; /** * Handles any html links coming from a {@link PageViewFragment} @@ -16,18 +17,6 @@ private final CommunicationBridge bridge; private final Bus bus; private final WikipediaApp app; - -public static class NewWikiPageNavigationEvent { -private final PageTitle title; - -public NewWikiPageNavigationEvent(PageTitle title) { -this.title = title; -} - -public PageTitle getTitle() { -return title; -} -} public LinkHandler(Context context, CommunicationBridge bridge) { this.context = context; diff --git a/wikipedia/src/main/java/org/wikimedia/wikipedia/PageActivity.java b/wikipedia/src/main/java/org/wikimedia/wikipedia/PageActivity.java index 179394f..e170f3b 100644 --- a/wikipedia/src/main/java/org/wikimedia/wikipedia/PageActivity.java +++ b/wikipedia/src/main/java/org/wikimedia/wikipedia/PageActivity.java @@ -2,10 +2,9 @@ import android.os.Bundle; import android.support.v4.app.FragmentActivity; -import android.view.*; -import android.widget.*; import com.squareup.otto.Bus; import com.squareup.otto.Subscribe; +import org.wikimedia.wikipedia.events.NewWikiPageNavigationEvent; public class PageActivity extends FragmentActivity { private Bus bus; @@ -29,7 +28,7 @@ } @Subscribe -public void onNewWikiPageNavigationEvent(LinkHandler.NewWikiPageNavigationEvent event) { +public void onNewWikiPageNavigationEvent(NewWikiPageNavigationEvent event) { displayNewPage(event.getTitle()); } diff --git a/wikipedia/src/main/java/org/wikimedia/wikipedia/SearchArticlesFragment.java b/wikipedia/src/main/java/org/wikimedia/wikipedia/SearchArticlesFragment.java index 9516624..d37c788 100644 --- a/wikipedia/src/main/java/org/wikimedia/wikipedia/SearchArticlesFragment.java +++ b/wikipedia/src/main/java/org/wikimedia/wikipedia/SearchArticlesFragment.java @@ -8,6 +8,7 @@ import android.view.*; import android.view.inputmethod.InputMethodManager; import android.widget.*; +import org.wikimedia.wikipedia.events.NewWikiPageNavigationEvent; import java.util.ArrayList; import java.util.List; @@ -34,7 +35,7 @@ searchTermText.setOnLongClickListener(new View.OnLongClickListener() { @Override public boolean onLongClick(View v) { -app.getBus().post(new LinkHandler.NewWikiPageNavigationEvent(new PageTitle(null, searchTermText.getText().toString(), app.getPrimarySite(; +app.getBus().post(new NewWikiPageNavigationEvent(new PageTitle(null, searchTermText.getText().toString(), app.getPrimarySite(; return true; } }); @@ -43,7 +44,7 @@ @Override public void onItemClick(AdapterView parent, View view, int position, long id) { PageTitle title = (PageTitle) searchResultsList.getAdapter().getItem(position); -app.getBus().post(new LinkHandler.NewWikiPageNavigationEvent(title)); +app.getBus().post(new NewWikiPageNavigationEvent(title)); currentResults.clear(); ((BaseAdapter)searchResultsList.getAdapter()).notifyDataSetInvalidated(); // Stupid android, making me hide the keyboard manually diff --git a/wikipedia/src/main/java/org/wikimedia/wikipedia/events/NewWikiPageNavigationEvent.java b/wikipedia/src/main/java/org/wikimedia/wikipedia/events/NewWikiPageNavigationEvent.java new file mode 100644 index 000..042e0fc --- /dev/null +++ b/wikipedia/src/main/java/org/wikimedia/wikipedia/events/NewWikiPageNavigationEvent.java @@ -0,0 +1,15 @@ +package org.wikimedia.wikipedia.events; + +import org.wikimedia.wikipedia.PageTi
[MediaWiki-commits] [Gerrit] Guard against detached nodes in ve.ce.GeneratedContentNode#d... - change (mediawiki...VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: Guard against detached nodes in ve.ce.GeneratedContentNode#doneGenerating .. Guard against detached nodes in ve.ce.GeneratedContentNode#doneGenerating The generation promise can get resolved (e.g. AJAX request can complete) after the node has been detached. In that case accessing this.model.doc will fail, so check for this in doneGenerating(). Also attempt to abort the pending promise on teardown. Bug: 56649 Change-Id: Ia55f1c2c8dc3a3619c0b50795e50fcae4bc6471f --- M modules/ve/ce/nodes/ve.ce.GeneratedContentNode.js 1 file changed, 32 insertions(+), 11 deletions(-) Approvals: Esanders: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ve/ce/nodes/ve.ce.GeneratedContentNode.js b/modules/ve/ce/nodes/ve.ce.GeneratedContentNode.js index c2b7223..384b97d 100644 --- a/modules/ve/ce/nodes/ve.ce.GeneratedContentNode.js +++ b/modules/ve/ce/nodes/ve.ce.GeneratedContentNode.js @@ -22,6 +22,7 @@ // Events this.model.connect( this, { 'update': 'onGeneratedContentNodeUpdate' } ); + this.connect( this, { 'teardown': 'abortGenerating' } ); // Initialization this.update(); @@ -181,17 +182,12 @@ */ ve.ce.GeneratedContentNode.prototype.forceUpdate = function ( config ) { var promise, node = this; + if ( this.generatingPromise ) { // Abort the currently pending generation process if possible - // Unset this.generatingPromise first so that if the promise is resolved or rejected - // when we abort, this is ignored as it should be - promise = this.generatingPromise; - this.generatingPromise = null; - if ( $.isFunction( promise.abort ) ) { - promise.abort(); - } + this.abortGenerating(); } else { - // Only call startGenerating() if we weren't generating before + // Only call startGenerating if we weren't generating before this.startGenerating(); } @@ -225,6 +221,25 @@ }; /** + * Abort the currently pending generation, if any, and remove the generating CSS class. + * + * This invokes .abort() on the pending promise if the promise has that method. It also ensures + * that if the promise does get resolved or rejected later, this is ignored. + */ +ve.ce.GeneratedContentNode.prototype.abortGenerating = function () { + var promise = this.generatingPromise; + if ( promise ) { + // Unset this.generatingPromise first so that if the promise is resolved or rejected + // from within .abort(), this is ignored as it should be + this.generatingPromise = null; + if ( $.isFunction( promise.abort ) ) { + promise.abort(); + } + } + this.$element.removeClass( 've-ce-generatedContentNode-generating' ); +}; + +/** * Called when the node successfully finishes generating new content. * * @method @@ -232,10 +247,16 @@ * @param {Object} [config] Config object passed to forceUpdate() */ ve.ce.GeneratedContentNode.prototype.doneGenerating = function ( generatedContents, config ) { - var store = this.model.doc.getStore(), - hash = OO.getHash( [ this.model, config ] ); + var store, hash; - store.index( generatedContents, hash ); + // Because doneGenerating is invoked asynchronously, the model node may have become detached + // in the meantime. Handle this gracefully. + if ( this.model.doc ) { + store = this.model.doc.getStore(); + hash = OO.getHash( [ this.model, config ] ); + store.index( generatedContents, hash ); + } + this.$element.removeClass( 've-ce-generatedContentNode-generating' ); this.generatingPromise = null; this.render( generatedContents ); -- To view, visit https://gerrit.wikimedia.org/r/93920 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia55f1c2c8dc3a3619c0b50795e50fcae4bc6471f Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Catrope Gerrit-Reviewer: Catrope Gerrit-Reviewer: Esanders Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Filter out some noise requests - change (operations/puppet)
Mark Bergsma has uploaded a new change for review. https://gerrit.wikimedia.org/r/94886 Change subject: Filter out some noise requests .. Filter out some noise requests Currently these are forwarded to the backend and result as 503s there. Filtering them out early reduces some load as well as noise in our (5xx) statistics. Change-Id: I8e75c285d79c89f141171d3e63058efe4743ccb4 --- M templates/varnish/text-frontend.inc.vcl.erb 1 file changed, 7 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/86/94886/1 diff --git a/templates/varnish/text-frontend.inc.vcl.erb b/templates/varnish/text-frontend.inc.vcl.erb index 3565a05..90f47cb 100644 --- a/templates/varnish/text-frontend.inc.vcl.erb +++ b/templates/varnish/text-frontend.inc.vcl.erb @@ -45,8 +45,15 @@ } } +sub filter_noise { + if (req.method == "POST" && req.url ~ "index\.php\?option=com_jce&task=plugin&plugin=imgmanager&file=imgmanager&method=form&cid=20&6bc427c8a7981f4fe1f5ac65c1246b5f=cf6dd3cf1923c950586d0dd595c8e20b$") { + error 403 "Noise"; + } +} + sub vcl_recv { call filter_headers; + call filter_noise; /* Allow purging */ call vcl_recv_purge; -- To view, visit https://gerrit.wikimedia.org/r/94886 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8e75c285d79c89f141171d3e63058efe4743ccb4 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Filter out some noise requests - change (operations/puppet)
Mark Bergsma has submitted this change and it was merged. Change subject: Filter out some noise requests .. Filter out some noise requests Currently these are forwarded to the backend and result as 503s there. Filtering them out early reduces some load as well as noise in our (5xx) statistics. Change-Id: I8e75c285d79c89f141171d3e63058efe4743ccb4 --- M templates/varnish/text-frontend.inc.vcl.erb 1 file changed, 7 insertions(+), 0 deletions(-) Approvals: Mark Bergsma: Verified; Looks good to me, approved diff --git a/templates/varnish/text-frontend.inc.vcl.erb b/templates/varnish/text-frontend.inc.vcl.erb index 3565a05..90f47cb 100644 --- a/templates/varnish/text-frontend.inc.vcl.erb +++ b/templates/varnish/text-frontend.inc.vcl.erb @@ -45,8 +45,15 @@ } } +sub filter_noise { + if (req.method == "POST" && req.url ~ "index\.php\?option=com_jce&task=plugin&plugin=imgmanager&file=imgmanager&method=form&cid=20&6bc427c8a7981f4fe1f5ac65c1246b5f=cf6dd3cf1923c950586d0dd595c8e20b$") { + error 403 "Noise"; + } +} + sub vcl_recv { call filter_headers; + call filter_noise; /* Allow purging */ call vcl_recv_purge; -- To view, visit https://gerrit.wikimedia.org/r/94886 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8e75c285d79c89f141171d3e63058efe4743ccb4 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma Gerrit-Reviewer: Mark Bergsma ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] req.request instead of req.method - change (operations/puppet)
Mark Bergsma has submitted this change and it was merged. Change subject: req.request instead of req.method .. req.request instead of req.method req.method is Varnish 4, apparently. Change-Id: I0d6c40f4e4782f96f90a01efa977c1d0f2cab12b --- M templates/varnish/text-frontend.inc.vcl.erb 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Mark Bergsma: Verified; Looks good to me, approved diff --git a/templates/varnish/text-frontend.inc.vcl.erb b/templates/varnish/text-frontend.inc.vcl.erb index 90f47cb..f61f125 100644 --- a/templates/varnish/text-frontend.inc.vcl.erb +++ b/templates/varnish/text-frontend.inc.vcl.erb @@ -46,7 +46,7 @@ } sub filter_noise { - if (req.method == "POST" && req.url ~ "index\.php\?option=com_jce&task=plugin&plugin=imgmanager&file=imgmanager&method=form&cid=20&6bc427c8a7981f4fe1f5ac65c1246b5f=cf6dd3cf1923c950586d0dd595c8e20b$") { + if (req.request == "POST" && req.url ~ "index\.php\?option=com_jce&task=plugin&plugin=imgmanager&file=imgmanager&method=form&cid=20&6bc427c8a7981f4fe1f5ac65c1246b5f=cf6dd3cf1923c950586d0dd595c8e20b$") { error 403 "Noise"; } } -- To view, visit https://gerrit.wikimedia.org/r/94887 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0d6c40f4e4782f96f90a01efa977c1d0f2cab12b Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma Gerrit-Reviewer: Mark Bergsma ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] req.request instead of req.method - change (operations/puppet)
Mark Bergsma has uploaded a new change for review. https://gerrit.wikimedia.org/r/94887 Change subject: req.request instead of req.method .. req.request instead of req.method req.method is Varnish 4, apparently. Change-Id: I0d6c40f4e4782f96f90a01efa977c1d0f2cab12b --- M templates/varnish/text-frontend.inc.vcl.erb 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/87/94887/1 diff --git a/templates/varnish/text-frontend.inc.vcl.erb b/templates/varnish/text-frontend.inc.vcl.erb index 90f47cb..f61f125 100644 --- a/templates/varnish/text-frontend.inc.vcl.erb +++ b/templates/varnish/text-frontend.inc.vcl.erb @@ -46,7 +46,7 @@ } sub filter_noise { - if (req.method == "POST" && req.url ~ "index\.php\?option=com_jce&task=plugin&plugin=imgmanager&file=imgmanager&method=form&cid=20&6bc427c8a7981f4fe1f5ac65c1246b5f=cf6dd3cf1923c950586d0dd595c8e20b$") { + if (req.request == "POST" && req.url ~ "index\.php\?option=com_jce&task=plugin&plugin=imgmanager&file=imgmanager&method=form&cid=20&6bc427c8a7981f4fe1f5ac65c1246b5f=cf6dd3cf1923c950586d0dd595c8e20b$") { error 403 "Noise"; } } -- To view, visit https://gerrit.wikimedia.org/r/94887 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0d6c40f4e4782f96f90a01efa977c1d0f2cab12b Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make the number of threads available for a Task customizable - change (apps...wikipedia)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/94888 Change subject: Make the number of threads available for a Task customizable .. Make the number of threads available for a Task customizable Also gives search tasks 2 threads by default. Change-Id: I7e1d4db559f39faa92641068e7ac433675dd5ef5 --- M wikipedia/src/main/java/org/wikimedia/wikipedia/PageFetchTask.java M wikipedia/src/main/java/org/wikimedia/wikipedia/SearchArticlesTask.java M wikipedia/src/main/java/org/wikimedia/wikipedia/concurrency/ExecutorService.java 3 files changed, 4 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/88/94888/1 diff --git a/wikipedia/src/main/java/org/wikimedia/wikipedia/PageFetchTask.java b/wikipedia/src/main/java/org/wikimedia/wikipedia/PageFetchTask.java index cede91c..fede8c9 100644 --- a/wikipedia/src/main/java/org/wikimedia/wikipedia/PageFetchTask.java +++ b/wikipedia/src/main/java/org/wikimedia/wikipedia/PageFetchTask.java @@ -14,7 +14,7 @@ Api api; public PageFetchTask(Api api, PageTitle title) { -super(ExecutorService.getSingleton().getExecutor(PageFetchTask.class)); +super(ExecutorService.getSingleton().getExecutor(PageFetchTask.class, 1)); this.title = title; this.api = api; } diff --git a/wikipedia/src/main/java/org/wikimedia/wikipedia/SearchArticlesTask.java b/wikipedia/src/main/java/org/wikimedia/wikipedia/SearchArticlesTask.java index c82af6c..240a93e 100644 --- a/wikipedia/src/main/java/org/wikimedia/wikipedia/SearchArticlesTask.java +++ b/wikipedia/src/main/java/org/wikimedia/wikipedia/SearchArticlesTask.java @@ -18,7 +18,7 @@ private ApiResult result; public SearchArticlesTask(Context context, Site site, String prefix) { -super(ExecutorService.getSingleton().getExecutor(PageFetchTask.class)); +super(ExecutorService.getSingleton().getExecutor(PageFetchTask.class, 2)); this.app = (WikipediaApp)context.getApplicationContext(); this.site = site; this.prefix = prefix; diff --git a/wikipedia/src/main/java/org/wikimedia/wikipedia/concurrency/ExecutorService.java b/wikipedia/src/main/java/org/wikimedia/wikipedia/concurrency/ExecutorService.java index f1ea571..58213e5 100644 --- a/wikipedia/src/main/java/org/wikimedia/wikipedia/concurrency/ExecutorService.java +++ b/wikipedia/src/main/java/org/wikimedia/wikipedia/concurrency/ExecutorService.java @@ -22,10 +22,9 @@ executors = new HashMap(); } -public Executor getExecutor(Class cls) { +public Executor getExecutor(Class cls, int threads) { if (!executors.containsKey(cls)) { -// TODO: Custom number of threads for services -executors.put(cls, new ScheduledThreadPoolExecutor(1)); +executors.put(cls, new ScheduledThreadPoolExecutor(threads)); } return executors.get(cls); } -- To view, visit https://gerrit.wikimedia.org/r/94888 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7e1d4db559f39faa92641068e7ac433675dd5ef5 Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Yuvipanda ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Revert "Do not load jquery.jStorage for logged in users" - change (mediawiki...UniversalLanguageSelector)
jenkins-bot has submitted this change and it was merged. Change subject: Revert "Do not load jquery.jStorage for logged in users" .. Revert "Do not load jquery.jStorage for logged in users" This reverts commit 5884337c9f97dc36cc31c1623ddbb3233a0c4357. Change-Id: Icfdfd89059a417a6aaea30d12164e7174dd5f58b --- M Resources.php M UniversalLanguageSelector.hooks.php M resources/js/ext.uls.preferences.js 3 files changed, 7 insertions(+), 18 deletions(-) Approvals: Nikerabbit: Looks good to me, approved jenkins-bot: Verified diff --git a/Resources.php b/Resources.php index 2f64303..f5d4d99 100644 --- a/Resources.php +++ b/Resources.php @@ -118,10 +118,6 @@ 'position' => 'top', ) + $resourcePaths; -// Anonymous users need 'jquery.jStorage' module for client side preference persistence. -$wgResourceModules['ext.uls.interface.anon'] = $wgResourceModules['ext.uls.interface']; -$wgResourceModules['ext.uls.interface.anon']['dependencies'][] = 'jquery.jStorage'; - $wgResourceModules['ext.uls.languagesettings'] = array( 'scripts' => 'resources/js/ext.uls.languagesettings.js', 'styles' => 'resources/css/ext.uls.languagesettings.css', @@ -137,10 +133,7 @@ 'dependencies' => array( 'mediawiki.user', 'mediawiki.api', - 'jquery.json', - // This is quite a big module and only needed for anons. - // Loaded conditionally in ext.uls.interface(.anon). - //'jquery.jStorage', + 'jquery.jStorage', ), ) + $resourcePaths; diff --git a/UniversalLanguageSelector.hooks.php b/UniversalLanguageSelector.hooks.php index 82a9c59..44436a7 100644 --- a/UniversalLanguageSelector.hooks.php +++ b/UniversalLanguageSelector.hooks.php @@ -67,11 +67,7 @@ if ( self::isToolbarEnabled( $out->getUser() ) ) { // Enable UI language selection for the user. - if ( $out->getUser()->isAnon() ) { - $out->addModules( 'ext.uls.interface.anon' ); - } else { - $out->addModules( 'ext.uls.interface' ); - } + $out->addModules( 'ext.uls.interface' ); } return true; diff --git a/resources/js/ext.uls.preferences.js b/resources/js/ext.uls.preferences.js index 5edde74..f0cbb5f 100644 --- a/resources/js/ext.uls.preferences.js +++ b/resources/js/ext.uls.preferences.js @@ -115,14 +115,13 @@ * Initialize */ init: function () { - var options; - if ( this.isAnon ) { - this.preferences = $.jStorage.get( this.preferenceName ) || {}; + this.preferences = $.jStorage.get( this.preferenceName ); } else { - options = mw.user.options.get( this.preferenceName ); - this.preferences = $.parseJSON( options ) || {}; + var options = mw.user.options.get( this.preferenceName ); + this.preferences = $.parseJSON( options ); } + this.preferences = this.preferences || {}; }, /** @@ -158,6 +157,7 @@ $.jStorage.set( this.preferenceName, this.preferences ); callback.call( this, true ); } else { + // Logged in user. Use MW APIs to change preferences saveOptionsWithToken( { action: 'options', -- To view, visit https://gerrit.wikimedia.org/r/94889 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icfdfd89059a417a6aaea30d12164e7174dd5f58b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner: Nikerabbit Gerrit-Reviewer: Nikerabbit Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Page scrolls when opening language selector - change (mediawiki...UniversalLanguageSelector)
Nikerabbit has uploaded a new change for review. https://gerrit.wikimedia.org/r/94891 Change subject: Page scrolls when opening language selector .. Page scrolls when opening language selector Was happening mostly on Firefox when ULS was in personal position and you were logged out and allowed to change language. Loading grid here already prevents graphical glitch and delaying the click seems to prevent scrolling to wrong position. Bug: 56937 Change-Id: Ie9acaa5a46fd903221d30c94dbc26a83355cdb64 --- M resources/js/ext.uls.interface.js 1 file changed, 8 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector refs/changes/91/94891/1 diff --git a/resources/js/ext.uls.interface.js b/resources/js/ext.uls.interface.js index 864a7b6..c6a2e4c 100644 --- a/resources/js/ext.uls.interface.js +++ b/resources/js/ext.uls.interface.js @@ -423,7 +423,7 @@ mw.hook( 'mw.uls.settings.open' ).fire( eventParams && eventParams.source || 'personal' ); } } else { - mw.loader.using( 'ext.uls.mediawiki', function () { + mw.loader.using( ['ext.uls.mediawiki', 'jquery.uls.grid'], function () { $ulsTrigger.uls( { quickList: function () { return mw.uls.getFrequentLanguageList(); @@ -441,7 +441,13 @@ onVisible: function () { mw.uls.addEventLoggingTriggers(); } - } ).trigger( 'click', eventParams ); + } ); + + // Allow styles to apply first and position to work by + // delaying the activation after them. + window.setTimeout( function () { + $ulsTrigger.trigger( 'click', eventParams ); + }, 0 ); e.stopPropagation(); } ); -- To view, visit https://gerrit.wikimedia.org/r/94891 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie9acaa5a46fd903221d30c94dbc26a83355cdb64 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix WikitextContentHandlerTest::testMakeRedirectContent() wh... - change (mediawiki/core)
IAlex has uploaded a new change for review. https://gerrit.wikimedia.org/r/94892 Change subject: Fix WikitextContentHandlerTest::testMakeRedirectContent() when content language is not english .. Fix WikitextContentHandlerTest::testMakeRedirectContent() when content language is not english Clear the MagicWord object cache, otherwise the magic word names can be cached in the wrong language, thus making the test fail. Change-Id: Ia6da94ca2c4f9ca892c81b4aa7cf96108b42ccd5 --- M tests/phpunit/includes/content/WikitextContentHandlerTest.php 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/92/94892/1 diff --git a/tests/phpunit/includes/content/WikitextContentHandlerTest.php b/tests/phpunit/includes/content/WikitextContentHandlerTest.php index 75a7278..7c62dca 100644 --- a/tests/phpunit/includes/content/WikitextContentHandlerTest.php +++ b/tests/phpunit/includes/content/WikitextContentHandlerTest.php @@ -79,6 +79,8 @@ global $wgContLang; $wgContLang->resetNamespaces(); + MagicWord::clearCache(); + if ( is_string( $title ) ) { $title = Title::newFromText( $title ); } -- To view, visit https://gerrit.wikimedia.org/r/94892 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia6da94ca2c4f9ca892c81b4aa7cf96108b42ccd5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: IAlex ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Change default name to 'MediaWiki message delivery' - change (mediawiki...MassMessage)
jenkins-bot has submitted this change and it was merged. Change subject: Change default name to 'MediaWiki message delivery' .. Change default name to 'MediaWiki message delivery' Change-Id: I048bb36ff93df1333d3c6d8df1701222ce027258 Suggestion: https://www.mediawiki.org/wiki/Thread:Extension_talk:MassMessage/Default_accoount_name --- M MassMessage.php M README.md 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: MZMcBride: Looks good to me, approved jenkins-bot: Verified diff --git a/MassMessage.php b/MassMessage.php index 166b1f4..344b39f 100644 --- a/MassMessage.php +++ b/MassMessage.php @@ -40,7 +40,7 @@ * This ensures that local administrators cannot change the bot's username * by editing a system message, which would interfere with global messages */ -$wgMassMessageAccountUsername = 'MessengerBot'; +$wgMassMessageAccountUsername = 'MediaWiki message delivery'; /** * Whether to allow sending messages to another wiki diff --git a/README.md b/README.md index 9de34bc..6c13dc5 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ This allows a user to specify a page in the User: namespace, and the bot will automatically convert it to the User talk: namespace. -$wgMassMessageAccountUsername = 'MessengerBot'; +$wgMassMessageAccountUsername = 'MediaWiki message delivery'; The account name that the bot will post with. If this is an existing account, the extension will automatically take it over. -- To view, visit https://gerrit.wikimedia.org/r/94697 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I048bb36ff93df1333d3c6d8df1701222ce027258 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MassMessage Gerrit-Branch: master Gerrit-Owner: Legoktm Gerrit-Reviewer: MZMcBride Gerrit-Reviewer: Nemo bis Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Change interlanguage link title message key - change (mediawiki/core)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/94893 Change subject: Change interlanguage link title message key .. Change interlanguage link title message key The term or abbreviation "iwiki" doesn't exist and has no meaning in MediaWiki. Bug: 56129 Change-Id: I0796b897e9646c122a46de449aaabf4d7a867f00 --- M includes/SkinTemplate.php M languages/messages/MessagesEn.php M languages/messages/MessagesQqq.php M maintenance/language/messages.inc 4 files changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/93/94893/1 diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php index 1704570..8671ff8 100644 --- a/includes/SkinTemplate.php +++ b/includes/SkinTemplate.php @@ -159,7 +159,7 @@ $language_urls[] = array( 'href' => $languageLinkTitle->getFullURL(), 'text' => $ilLangName, - 'title' => wfMessage( 'tooltip-iwiki', $languageLinkTitle->getText(), $ilLangLocalName )->text(), + 'title' => wfMessage( 'interlanguage-link-title', $languageLinkTitle->getText(), $ilLangLocalName )->text(), 'class' => $class, 'lang' => wfBCP47( $ilInterwikiCode ), 'hreflang' => wfBCP47( $ilInterwikiCode ), diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index be2b51e..4931944 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -556,7 +556,7 @@ 'editsectionhint', 'help', 'helppage', - 'tooltip-iwiki', + 'interlanguage-link-title', 'jumpto', 'jumptonavigation', 'jumptosearch', @@ -976,7 +976,7 @@ 'red-link-title' => '$1 (page does not exist)', 'sort-descending' => 'Sort descending', 'sort-ascending' => 'Sort ascending', -'tooltip-iwiki'=> '$1 – $2', # only translate this message to other languages if you have to change it +'interlanguage-link-title' => '$1 – $2', # only translate this message to other languages if you have to change it # Short words for each namespace, by default used in the namespace tab in monobook 'nstab-main' => 'Page', diff --git a/languages/messages/MessagesQqq.php b/languages/messages/MessagesQqq.php index c093e67..b42e5af 100644 --- a/languages/messages/MessagesQqq.php +++ b/languages/messages/MessagesQqq.php @@ -7843,7 +7843,7 @@ * {{msg-mw|Summary}} * {{msg-mw|Accesskey-summary}} * {{msg-mw|Tooltip-summary}}', -'tooltip-iwiki' => 'Format of a sidebar interwiki link tooltip. Parameters: +'interlanguage-link-title' => 'Format of a sidebar interwiki link tooltip. Parameters: * $1 - page name in the target wiki * $2 - target wiki language autonym', diff --git a/maintenance/language/messages.inc b/maintenance/language/messages.inc index 05ef7dc..773f9c4 100644 --- a/maintenance/language/messages.inc +++ b/maintenance/language/messages.inc @@ -2720,7 +2720,7 @@ 'tooltip-undo', 'tooltip-preferences-save', 'tooltip-summary', - 'tooltip-iwiki', + 'interlanguage-link-title', ), 'stylesheets' => array( 'common.css', -- To view, visit https://gerrit.wikimedia.org/r/94893 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0796b897e9646c122a46de449aaabf4d7a867f00 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Siebrand ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Allow caching of login.wikimedia.org requests - change (operations/puppet)
Mark Bergsma has submitted this change and it was merged. Change subject: Allow caching of login.wikimedia.org requests .. Allow caching of login.wikimedia.org requests Change-Id: I1a261acddf24a3be54a57c94b3f1f9cc78d49ab2 --- M templates/varnish/text-common.inc.vcl.erb 1 file changed, 0 insertions(+), 3 deletions(-) Approvals: Mark Bergsma: Looks good to me, approved jenkins-bot: Verified diff --git a/templates/varnish/text-common.inc.vcl.erb b/templates/varnish/text-common.inc.vcl.erb index 2d70db1..010b274 100644 --- a/templates/varnish/text-common.inc.vcl.erb +++ b/templates/varnish/text-common.inc.vcl.erb @@ -7,9 +7,6 @@ if (req.http.Host ~ "^test\.") { return (pass); } - if (req.http.Host == "login.wikimedia.org") { - return (pass); - } } sub cookie_munging { -- To view, visit https://gerrit.wikimedia.org/r/94765 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1a261acddf24a3be54a57c94b3f1f9cc78d49ab2 Gerrit-PatchSet: 4 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma Gerrit-Reviewer: Mark Bergsma Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Some cleanup in LangLinkHandler - change (mediawiki...Wikibase)
Aude has uploaded a new change for review. https://gerrit.wikimedia.org/r/94894 Change subject: Some cleanup in LangLinkHandler .. Some cleanup in LangLinkHandler Change-Id: I1d42bf7ac9c9f6d184abb0a77d9f95d76dd82682 --- M client/includes/LangLinkHandler.php 1 file changed, 38 insertions(+), 39 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/94/94894/1 diff --git a/client/includes/LangLinkHandler.php b/client/includes/LangLinkHandler.php index 437f039..661e671 100644 --- a/client/includes/LangLinkHandler.php +++ b/client/includes/LangLinkHandler.php @@ -1,37 +1,19 @@ http://www.gnu.org/copyleft/gpl.html - * * @since 0.1 - * - * @file - * @ingroup WikibaseClient - * @ingroup RefuctoredCode * * @licence GNU GPL v2+ * @author Nikola Smolenski @@ -40,40 +22,57 @@ */ class LangLinkHandler { + /** +* @var string +*/ protected $siteId; + + /** +* @var array +*/ protected $namespaces; + + /** +* @var array +*/ protected $excludeNamespaces; /** * @var SiteLinkLookup */ - protected $siteLinksLookup; + protected $siteLinkLookup; /** * @var SiteStore */ protected $sites; + /** +* @var Site[] +*/ private $sitesByNavigationId = null; + /** +* @var string +*/ private $siteGroup; /** * Constructs a new LangLinkHandler using the given service instances. * -* @param string $siteIdThe global site ID for the local wiki -* @param array $namespacesThe list of namespaces for which language links should be handled. -* @param array $excludeNamespaces List of namespaces to exclude language links -* @param SiteLinkLookup $siteLinksLookup A site link lookup service +* @param string $siteIdThe global site ID for the local wiki +* @param array $namespacesThe list of namespaces for which language links should be handled. +* @param array $excludeNamespaces List of namespaces to exclude language links +* @param SiteLinkLookup $siteLinkLookup A site link lookup service * @param SiteStore $sites A site definition lookup service * @param string $siteGroup The ID of the site group to use for showing language links. */ public function __construct( $siteId, array $namespaces, array $excludeNamespaces, - SiteLinkLookup $siteLinksLookup, SiteStore $sites, $siteGroup ) { + SiteLinkLookup $siteLinkLookup, SiteStore $sites, $siteGroup ) { $this->siteId = $siteId; $this->namespaces = $namespaces; $this->excludeNamespaces = $excludeNamespaces; - $this->siteLinksLookup = $siteLinksLookup; + $this->siteLinkLookup = $siteLinkLookup; $this->sites = $sites; $this->siteGroup = $siteGroup; } @@ -81,7 +80,7 @@ /** * Finds the corresponding item on the repository and returns the item's site links. * -* @since0.1 +* @since 0.1 * * @param Title $title * @@ -94,11 +93,11 @@ $links = array(); $siteLink = new SimpleSiteLink( $this->siteId, $title->getFullText() ); - $itemId = $this->siteLinksLookup->getEntityIdForSiteLink( $siteLink ); + $itemId = $this->siteLinkLookup->getEntityIdForSiteLink( $siteLink ); if ( $itemId !== null ) { wfDebugLog( __CLASS__, __FUNCTION__ . ": Item ID for " . $title->getFullText() . " is " . $itemId->getPrefixedId() ); - $links = $this->siteLinksLookup->getSiteLinksForItem( $itemId ); + $links = $this->siteLinkLookup->getSiteLinksForItem( $itemId ); } else { wfDebugLog( __CLASS__, __FUNCTION__ . ": No corresponding item found for " . $title->getFullText() ); } @@ -117,8 +116,8 @@ * * @since 0.1 * -* @param \Title$title -* @param \ParserOutput $out +* @param Title $title +* @param ParserOutput $out * * @return boolean */ @@ -232,7 +231,7 @@ * * @since 0.4 * -* @param \ParserOutput $out +* @param ParserOutput $out * @param $langs[] */ public function excludeRepoLangLinks( ParserOutput $out, array $langs ) { @@ -244,7 +243,7 @@ * Get the noexternallanglinks page property from the ParserOutput, * which is set by the {{#n
[MediaWiki-commits] [Gerrit] Add DataValues qunit test - change (integration/jenkins-job-builder-config)
jenkins-bot has submitted this change and it was merged. Change subject: Add DataValues qunit test .. Add DataValues qunit test Creates mwext-DataValues-qunit, should be non voting at start. Change-Id: Ib73d49065dae0adce7a8b157567b5bbc3a1e2ca3 --- M mediawiki-extensions.yaml 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/mediawiki-extensions.yaml b/mediawiki-extensions.yaml index 0f95712..ac120fa 100644 --- a/mediawiki-extensions.yaml +++ b/mediawiki-extensions.yaml @@ -517,6 +517,9 @@ - '{name}-{ext-name}-qunit': name: mwext +ext-name: DataValues + - '{name}-{ext-name}-qunit': +name: mwext ext-name: EventLogging - '{name}-{ext-name}-qunit': name: mwext -- To view, visit https://gerrit.wikimedia.org/r/94772 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib73d49065dae0adce7a8b157567b5bbc3a1e2ca3 Gerrit-PatchSet: 4 Gerrit-Project: integration/jenkins-job-builder-config Gerrit-Branch: master Gerrit-Owner: Addshore Gerrit-Reviewer: Hashar Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] triggers mwext-DataValues-qunit (non voting) - change (integration/zuul-config)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/94895 Change subject: triggers mwext-DataValues-qunit (non voting) .. triggers mwext-DataValues-qunit (non voting) Change-Id: Ib73d49065dae0adce7a8b157567b5bbc3a1e2ca3 --- M layout.yaml 1 file changed, 16 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/zuul-config refs/changes/95/94895/1 diff --git a/layout.yaml b/layout.yaml index c9b8948..64a8152 100644 --- a/layout.yaml +++ b/layout.yaml @@ -457,6 +457,9 @@ branch: (?!REL1_19) # Experimental + - name: ^mwext-DataValues-qunit$ +voting: false + - name: ^mwext-Wikibase-qunit$ voting: false @@ -1330,9 +1333,19 @@ extname: CustomUserSignup - name: mediawiki/extensions/DataValues -template: - - name: extension-unittests -extname: DataValues +check: + - mwext-DataValues-jslint + - mwext-DataValues-lint +test: + - mwext-DataValues-jslint + - mwext-DataValues-lint: + - mwext-DataValues-testextensions-master + - mwext-DataValues-qunit +gate-and-submit: + - mwext-DataValues-jslint + - mwext-DataValues-lint: + - mwext-DataValues-testextensions-master + - mwext-DataValues-qunit - name: mediawiki/extensions/DataTypes template: -- To view, visit https://gerrit.wikimedia.org/r/94895 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib73d49065dae0adce7a8b157567b5bbc3a1e2ca3 Gerrit-PatchSet: 1 Gerrit-Project: integration/zuul-config Gerrit-Branch: master Gerrit-Owner: Hashar ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] triggers mwext-DataValues-qunit (non voting) - change (integration/zuul-config)
jenkins-bot has submitted this change and it was merged. Change subject: triggers mwext-DataValues-qunit (non voting) .. triggers mwext-DataValues-qunit (non voting) Change-Id: Ib73d49065dae0adce7a8b157567b5bbc3a1e2ca3 --- M layout.yaml 1 file changed, 16 insertions(+), 3 deletions(-) Approvals: Hashar: Looks good to me, approved Addshore: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/layout.yaml b/layout.yaml index c9b8948..64a8152 100644 --- a/layout.yaml +++ b/layout.yaml @@ -457,6 +457,9 @@ branch: (?!REL1_19) # Experimental + - name: ^mwext-DataValues-qunit$ +voting: false + - name: ^mwext-Wikibase-qunit$ voting: false @@ -1330,9 +1333,19 @@ extname: CustomUserSignup - name: mediawiki/extensions/DataValues -template: - - name: extension-unittests -extname: DataValues +check: + - mwext-DataValues-jslint + - mwext-DataValues-lint +test: + - mwext-DataValues-jslint + - mwext-DataValues-lint: + - mwext-DataValues-testextensions-master + - mwext-DataValues-qunit +gate-and-submit: + - mwext-DataValues-jslint + - mwext-DataValues-lint: + - mwext-DataValues-testextensions-master + - mwext-DataValues-qunit - name: mediawiki/extensions/DataTypes template: -- To view, visit https://gerrit.wikimedia.org/r/94895 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib73d49065dae0adce7a8b157567b5bbc3a1e2ca3 Gerrit-PatchSet: 1 Gerrit-Project: integration/zuul-config Gerrit-Branch: master Gerrit-Owner: Hashar Gerrit-Reviewer: Addshore Gerrit-Reviewer: Hashar Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Change interlanguage link title message key - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Change interlanguage link title message key .. Change interlanguage link title message key The term or abbreviation "iwiki" doesn't exist and has no meaning in MediaWiki. Bug: 56129 Change-Id: I0796b897e9646c122a46de449aaabf4d7a867f00 --- M includes/SkinTemplate.php M languages/messages/MessagesEn.php M languages/messages/MessagesQqq.php M maintenance/language/messages.inc 4 files changed, 5 insertions(+), 5 deletions(-) Approvals: Raimond Spekking: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php index 1704570..8671ff8 100644 --- a/includes/SkinTemplate.php +++ b/includes/SkinTemplate.php @@ -159,7 +159,7 @@ $language_urls[] = array( 'href' => $languageLinkTitle->getFullURL(), 'text' => $ilLangName, - 'title' => wfMessage( 'tooltip-iwiki', $languageLinkTitle->getText(), $ilLangLocalName )->text(), + 'title' => wfMessage( 'interlanguage-link-title', $languageLinkTitle->getText(), $ilLangLocalName )->text(), 'class' => $class, 'lang' => wfBCP47( $ilInterwikiCode ), 'hreflang' => wfBCP47( $ilInterwikiCode ), diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index be2b51e..4931944 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -556,7 +556,7 @@ 'editsectionhint', 'help', 'helppage', - 'tooltip-iwiki', + 'interlanguage-link-title', 'jumpto', 'jumptonavigation', 'jumptosearch', @@ -976,7 +976,7 @@ 'red-link-title' => '$1 (page does not exist)', 'sort-descending' => 'Sort descending', 'sort-ascending' => 'Sort ascending', -'tooltip-iwiki'=> '$1 – $2', # only translate this message to other languages if you have to change it +'interlanguage-link-title' => '$1 – $2', # only translate this message to other languages if you have to change it # Short words for each namespace, by default used in the namespace tab in monobook 'nstab-main' => 'Page', diff --git a/languages/messages/MessagesQqq.php b/languages/messages/MessagesQqq.php index c093e67..b42e5af 100644 --- a/languages/messages/MessagesQqq.php +++ b/languages/messages/MessagesQqq.php @@ -7843,7 +7843,7 @@ * {{msg-mw|Summary}} * {{msg-mw|Accesskey-summary}} * {{msg-mw|Tooltip-summary}}', -'tooltip-iwiki' => 'Format of a sidebar interwiki link tooltip. Parameters: +'interlanguage-link-title' => 'Format of a sidebar interwiki link tooltip. Parameters: * $1 - page name in the target wiki * $2 - target wiki language autonym', diff --git a/maintenance/language/messages.inc b/maintenance/language/messages.inc index 05ef7dc..773f9c4 100644 --- a/maintenance/language/messages.inc +++ b/maintenance/language/messages.inc @@ -2720,7 +2720,7 @@ 'tooltip-undo', 'tooltip-preferences-save', 'tooltip-summary', - 'tooltip-iwiki', + 'interlanguage-link-title', ), 'stylesheets' => array( 'common.css', -- To view, visit https://gerrit.wikimedia.org/r/94893 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0796b897e9646c122a46de449aaabf4d7a867f00 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Siebrand Gerrit-Reviewer: Bartosz Dziewoński Gerrit-Reviewer: Brion VIBBER Gerrit-Reviewer: Jforrester Gerrit-Reviewer: Krinkle Gerrit-Reviewer: Raimond Spekking Gerrit-Reviewer: Siebrand Gerrit-Reviewer: Wizardist Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Some cleanup in LangLinkHandler - change (mediawiki...Wikibase)
Jeroen De Dauw has submitted this change and it was merged. Change subject: Some cleanup in LangLinkHandler .. Some cleanup in LangLinkHandler Change-Id: I1d42bf7ac9c9f6d184abb0a77d9f95d76dd82682 --- M client/includes/LangLinkHandler.php 1 file changed, 38 insertions(+), 39 deletions(-) Approvals: Jeroen De Dauw: Looks good to me, approved jenkins-bot: Verified diff --git a/client/includes/LangLinkHandler.php b/client/includes/LangLinkHandler.php index 437f039..661e671 100644 --- a/client/includes/LangLinkHandler.php +++ b/client/includes/LangLinkHandler.php @@ -1,37 +1,19 @@ http://www.gnu.org/copyleft/gpl.html - * * @since 0.1 - * - * @file - * @ingroup WikibaseClient - * @ingroup RefuctoredCode * * @licence GNU GPL v2+ * @author Nikola Smolenski @@ -40,40 +22,57 @@ */ class LangLinkHandler { + /** +* @var string +*/ protected $siteId; + + /** +* @var array +*/ protected $namespaces; + + /** +* @var array +*/ protected $excludeNamespaces; /** * @var SiteLinkLookup */ - protected $siteLinksLookup; + protected $siteLinkLookup; /** * @var SiteStore */ protected $sites; + /** +* @var Site[] +*/ private $sitesByNavigationId = null; + /** +* @var string +*/ private $siteGroup; /** * Constructs a new LangLinkHandler using the given service instances. * -* @param string $siteIdThe global site ID for the local wiki -* @param array $namespacesThe list of namespaces for which language links should be handled. -* @param array $excludeNamespaces List of namespaces to exclude language links -* @param SiteLinkLookup $siteLinksLookup A site link lookup service +* @param string $siteIdThe global site ID for the local wiki +* @param array $namespacesThe list of namespaces for which language links should be handled. +* @param array $excludeNamespaces List of namespaces to exclude language links +* @param SiteLinkLookup $siteLinkLookup A site link lookup service * @param SiteStore $sites A site definition lookup service * @param string $siteGroup The ID of the site group to use for showing language links. */ public function __construct( $siteId, array $namespaces, array $excludeNamespaces, - SiteLinkLookup $siteLinksLookup, SiteStore $sites, $siteGroup ) { + SiteLinkLookup $siteLinkLookup, SiteStore $sites, $siteGroup ) { $this->siteId = $siteId; $this->namespaces = $namespaces; $this->excludeNamespaces = $excludeNamespaces; - $this->siteLinksLookup = $siteLinksLookup; + $this->siteLinkLookup = $siteLinkLookup; $this->sites = $sites; $this->siteGroup = $siteGroup; } @@ -81,7 +80,7 @@ /** * Finds the corresponding item on the repository and returns the item's site links. * -* @since0.1 +* @since 0.1 * * @param Title $title * @@ -94,11 +93,11 @@ $links = array(); $siteLink = new SimpleSiteLink( $this->siteId, $title->getFullText() ); - $itemId = $this->siteLinksLookup->getEntityIdForSiteLink( $siteLink ); + $itemId = $this->siteLinkLookup->getEntityIdForSiteLink( $siteLink ); if ( $itemId !== null ) { wfDebugLog( __CLASS__, __FUNCTION__ . ": Item ID for " . $title->getFullText() . " is " . $itemId->getPrefixedId() ); - $links = $this->siteLinksLookup->getSiteLinksForItem( $itemId ); + $links = $this->siteLinkLookup->getSiteLinksForItem( $itemId ); } else { wfDebugLog( __CLASS__, __FUNCTION__ . ": No corresponding item found for " . $title->getFullText() ); } @@ -117,8 +116,8 @@ * * @since 0.1 * -* @param \Title$title -* @param \ParserOutput $out +* @param Title $title +* @param ParserOutput $out * * @return boolean */ @@ -232,7 +231,7 @@ * * @since 0.4 * -* @param \ParserOutput $out +* @param ParserOutput $out * @param $langs[] */ public function excludeRepoLangLinks( ParserOutput $out, array $langs ) { @@ -244,7 +243,7 @@ * Get the noexternallanglinks page property from the ParserOutput, * which is set by the {{#noexternallanglinks}} parser function.
[MediaWiki-commits] [Gerrit] Fix action=info in client, split logic to own class, add tests - change (mediawiki...Wikibase)
Jeroen De Dauw has submitted this change and it was merged. Change subject: Fix action=info in client, split logic to own class, add tests .. Fix action=info in client, split logic to own class, add tests Change-Id: I8c0ab9c729b2c90479afb1083cbe01a80fb4e67c --- M client/WikibaseClient.classes.php M client/WikibaseClient.hooks.php M client/includes/RepoLinker.php A client/includes/hooks/InfoActionHookHandler.php M client/tests/phpunit/includes/RepoLinkerTest.php A client/tests/phpunit/includes/hooks/InfoActionHookHandlerTest.php 6 files changed, 280 insertions(+), 37 deletions(-) Approvals: Jeroen De Dauw: Looks good to me, approved jenkins-bot: Verified diff --git a/client/WikibaseClient.classes.php b/client/WikibaseClient.classes.php index ad69ac6..ad0dae0 100644 --- a/client/WikibaseClient.classes.php +++ b/client/WikibaseClient.classes.php @@ -33,6 +33,7 @@ 'Wikibase\ApiClientInfo' => 'includes/api/ApiClientInfo.php', // includes/hooks + 'Wikibase\Client\Hooks\InfoActionHookHandler' => 'includes/hooks/InfoActionHookHandler.php', 'Wikibase\Client\MovePageNotice' => 'includes/hooks/MovePageNotice.php', // includes/modules diff --git a/client/WikibaseClient.hooks.php b/client/WikibaseClient.hooks.php index e0a5831..a626530 100644 --- a/client/WikibaseClient.hooks.php +++ b/client/WikibaseClient.hooks.php @@ -726,44 +726,20 @@ * @return bool */ public static function onInfoAction( IContextSource $context, array &$pageInfo ) { - // Check if wikibase namespace is enabled - $title = $context->getTitle(); $namespaceChecker = new NamespaceChecker( Settings::get( 'excludeNamespaces' ), Settings::get( 'namespaces' ) ); - if ( $title->exists() && $namespaceChecker->isWikibaseEnabled( $title->getNamespace() ) ) { + $infoActionHookHandler = new InfoActionHookHandler( + $namespaceChecker, + WikibaseClient::getDefaultInstance()->newRepoLinker(), + WikibaseClient::getDefaultInstance()->getStore()->getSiteLinkTable(), + Settings::get( 'siteGlobalID' ) + ); - $siteLinkLookup = WikibaseClient::getDefaultInstance()->getStore()->getSiteLinkTable(); - $entityId = $siteLinkLookup->getEntityIdForSiteLink( - new SimpleSiteLink( Settings::get( 'siteGlobalID' ), $title->getFullText() ) - ); + $pageInfo = $infoActionHookHandler->handle( $context, $pageInfo ); - if( $entityId ) { - // Creating a Repo link with Item ID as anchor text - $repoLinker = WikibaseClient::getDefaultInstance()->newRepoLinker(); - $idFormatter = WikibaseClient::getDefaultInstance()->getEntityIdFormatter(); - $idString = $idFormatter->format( $entityId ); - $itemLink = Linker::makeExternalLink( - $repoLinker->repoItemUrl( $entityId ), - $idString, - true, - 'plainlink' - ); - - // Adding the Repo link to array &$pageInfo - $pageInfo['header-basic'][] = array( - $context->msg( 'wikibase-pageinfo-entity-id' ), - $itemLink - ); - } else { - $pageInfo['header-basic'][] = array( - $context->msg( 'wikibase-pageinfo-entity-id' ), - $context->msg( 'wikibase-pageinfo-entity-id-none' ) - ); - } - } return true; } diff --git a/client/includes/RepoLinker.php b/client/includes/RepoLinker.php index a7df5ea..963ecff 100644 --- a/client/includes/RepoLinker.php +++ b/client/includes/RepoLinker.php @@ -114,16 +114,23 @@ * @since 0.4 * * @param ExternalChange $externalChange +* @param array $classes * * @return string */ - public function buildEntityLink( EntityId $entityId ) { - $prefixedId = $entityId->getPrefixedId(); + public function buildEntityLink( EntityId $entityId, array $classes = array() ) { + $prefixedId = $entityId->getSerialization(); + + $class = 'wb-entity-link'; + +
[MediaWiki-commits] [Gerrit] Disable plural checks for complex messages - change (translatewiki)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/94897 Change subject: Disable plural checks for complex messages .. Disable plural checks for complex messages Related to bug 42631. Change-Id: If62a02565ef9b7f8aa9ea7941742e14b50a03738 --- M groups/check-blacklist.php 1 file changed, 10 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/97/94897/1 diff --git a/groups/check-blacklist.php b/groups/check-blacklist.php index c7432ac..89c4ac4 100644 --- a/groups/check-blacklist.php +++ b/groups/check-blacklist.php @@ -394,6 +394,16 @@ ) ), array( + 'group' => 'ext-mobilefrontend', + 'check' => 'plural', + 'message' => array( + // All work arounds for http://bugzilla.wikimedia.org/42631 + 'mobile-frontend-profile-footer-days', + 'mobile-frontend-profile-footer-months', + 'mobile-frontend-profile-footer-years', + ) + ), + array( 'group' => 'ext-newusernotification', 'check' => 'variable', 'message' => array( -- To view, visit https://gerrit.wikimedia.org/r/94897 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If62a02565ef9b7f8aa9ea7941742e14b50a03738 Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Siebrand ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Moving esams to new puppet infrastructure - change (operations/dns)
Akosiaris has uploaded a new change for review. https://gerrit.wikimedia.org/r/94898 Change subject: Moving esams to new puppet infrastructure .. Moving esams to new puppet infrastructure Using palladium since we know have our own MPLS link Change-Id: I188dbca2bbaf609024ac3b7a9545f7ee5ef8441c --- M templates/wikimedia.org 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/dns refs/changes/98/94898/1 diff --git a/templates/wikimedia.org b/templates/wikimedia.org index f5f21e1..2c1cdc9 100644 --- a/templates/wikimedia.org +++ b/templates/wikimedia.org @@ -804,7 +804,7 @@ ; Service aliases ntp1H IN A91.198.174.118 ; pascal -puppet 5M IN CNAMEbrewster.wikimedia.org. +puppet 5M IN CNAMEpalladium.eqiad.wmnet. recursor0 1H IN A91.198.174.6 ; Servers -- To view, visit https://gerrit.wikimedia.org/r/94898 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I188dbca2bbaf609024ac3b7a9545f7ee5ef8441c Gerrit-PatchSet: 1 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: Akosiaris ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Moving esams to new puppet infrastructure - change (operations/dns)
Akosiaris has submitted this change and it was merged. Change subject: Moving esams to new puppet infrastructure .. Moving esams to new puppet infrastructure Using palladium since we know have our own MPLS link Change-Id: I188dbca2bbaf609024ac3b7a9545f7ee5ef8441c --- M templates/wikimedia.org 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Akosiaris: Looks good to me, approved jenkins-bot: Verified diff --git a/templates/wikimedia.org b/templates/wikimedia.org index f5f21e1..2c1cdc9 100644 --- a/templates/wikimedia.org +++ b/templates/wikimedia.org @@ -804,7 +804,7 @@ ; Service aliases ntp1H IN A91.198.174.118 ; pascal -puppet 5M IN CNAMEbrewster.wikimedia.org. +puppet 5M IN CNAMEpalladium.eqiad.wmnet. recursor0 1H IN A91.198.174.6 ; Servers -- To view, visit https://gerrit.wikimedia.org/r/94898 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I188dbca2bbaf609024ac3b7a9545f7ee5ef8441c Gerrit-PatchSet: 1 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: Akosiaris Gerrit-Reviewer: Akosiaris Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Disable plural checks for complex messages - change (translatewiki)
jenkins-bot has submitted this change and it was merged. Change subject: Disable plural checks for complex messages .. Disable plural checks for complex messages Related to bug 42631. Change-Id: If62a02565ef9b7f8aa9ea7941742e14b50a03738 --- M groups/check-blacklist.php 1 file changed, 10 insertions(+), 0 deletions(-) Approvals: Siebrand: Looks good to me, approved jenkins-bot: Verified diff --git a/groups/check-blacklist.php b/groups/check-blacklist.php index c7432ac..89c4ac4 100644 --- a/groups/check-blacklist.php +++ b/groups/check-blacklist.php @@ -394,6 +394,16 @@ ) ), array( + 'group' => 'ext-mobilefrontend', + 'check' => 'plural', + 'message' => array( + // All work arounds for http://bugzilla.wikimedia.org/42631 + 'mobile-frontend-profile-footer-days', + 'mobile-frontend-profile-footer-months', + 'mobile-frontend-profile-footer-years', + ) + ), + array( 'group' => 'ext-newusernotification', 'check' => 'variable', 'message' => array( -- To view, visit https://gerrit.wikimedia.org/r/94897 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If62a02565ef9b7f8aa9ea7941742e14b50a03738 Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Siebrand Gerrit-Reviewer: Siebrand 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 operator T_FOREACH - change (mediawiki...Foxway)
jenkins-bot has submitted this change and it was merged. Change subject: add operator T_FOREACH .. add operator T_FOREACH * show exception foxway as string * fix double variables '$bar' in $code for source 'echo "$foo[$bar]";' * fix double while without braces Time: 498 ms, Memory: 24.75Mb OK (492 tests, 498 assertions) Change-Id: Id917d91f56f0daef19fa0ee716feba284c35620c --- M Foxway.body.php M includes/Compiler.php M includes/ExceptionFoxway.php M includes/Runtime.php M tests/phpunit/includes/RuntimeTest.php 5 files changed, 198 insertions(+), 25 deletions(-) Approvals: Pastakhov: Looks good to me, approved jenkins-bot: Verified diff --git a/Foxway.body.php b/Foxway.body.php index bfcfcb5..4ffbcff 100644 --- a/Foxway.body.php +++ b/Foxway.body.php @@ -51,6 +51,8 @@ array( 'Parser'=>&$parser, 'PPFrame'=>&$frame ) ); $return = implode($result); + } catch (\Foxway\ExceptionFoxway $exc) { + $return = (string) $exc; } catch (Exception $exc) { $return = $exc->getTraceAsString(); } @@ -85,7 +87,10 @@ self::getScope($frame), array( 'Parser'=>&$parser, 'PPFrame'=>&$frame ) ); - } catch (Exception $exc) { + } catch ( \Foxway\ExceptionFoxway $exc ) { + \Foxway\Runtime::$time += microtime(true) - self::$startTime; + return (string) $exc; + } catch ( Exception $exc ) { \Foxway\Runtime::$time += microtime(true) - self::$startTime; return $exc->getTraceAsString(); } diff --git a/includes/Compiler.php b/includes/Compiler.php index 14fa2cf..8c9cbce 100644 --- a/includes/Compiler.php +++ b/includes/Compiler.php @@ -28,6 +28,7 @@ define( 'FOXWAY_ALLOW_ONLY_VARIABLES', 1 << 22 ); define( 'FOXWAY_ALLOW_SKIP_PARAMS', 1 << 23 ); // used in operator T_LIST define( 'FOXWAY_DOUBLE_ARROW_WAS_USED', 1 << 24 ); +define( 'FOXWAY_EXPECT_OPERATOR_AS', 1 << 25 ); // for operator T_FOREACH define( 'FOXWAY_CLEAR_FLAG_FOR_SHIFT_BEFORE_PARENTHESES', FOXWAY_EXPECT_PARENTHESES_WITH_LIST_PARAMS ); //define( 'FOXWAY_CLEAR_FLAG_FOR_SHIFT_AFTER_PARENTHESES', FOXWAY_EXPECT_PARENTHESES_WITH_LIST_PARAMS ); @@ -287,6 +288,7 @@ }else{ // right operator was not used $lastValue = &$tmp; } + $values = array(); // there is variables of array index. Example '$bar' for : echo "$foo[$bar]"; unset($tmp); $stackEncapsed = false; break; @@ -462,14 +464,21 @@ case T_XOR_EQUAL: // ^= case T_SL_EQUAL:// <<= case T_SR_EQUAL:// >>= + if ( $parentFlags & FOXWAY_ALLOW_ONLY_VARIABLES ) { throw new ExceptionFoxway($id, FOXWAY_PHP_SYNTAX_ERROR_UNEXPECTED, $tokenLine); } + // break is not necessary here case T_DOUBLE_ARROW:// => - if ( !$needOperator || !isset($lastValue) || $rightOperators || $parentFlags & FOXWAY_ALLOW_ONLY_VARIABLES ) { throw new ExceptionFoxway($id, FOXWAY_PHP_SYNTAX_ERROR_UNEXPECTED, $tokenLine); } + if ( !$needOperator || !isset($lastValue) || $rightOperators ) { throw new ExceptionFoxway($id, FOXWAY_PHP_SYNTAX_ERROR_UNEXPECTED, $tokenLine); } $needOperator = false; array_unshift( $needParams, array(FOXWAY_STACK_COMMAND=>$id, FOXWAY_STACK_RESULT=>&$lastValue[FOXWAY_STACK_RESULT], FOXWAY_STACK_PARAM=>&$lastValue, FOXWAY_STACK_TOKEN_LINE=>$tokenLine) ); if ( $id == T_DOUBLE_ARROW ) { - if( $parentFlags & FOXWAY_ALLOW_DOUBLE_ARROW == 0 ) { throw new ExceptionFoxway($id, FOXWAY_PHP_SYNTAX_ERROR_UNEXPECTED, $tokenLine); } + if ( $parentFlags & FOXWAY_ALLOW_DOUBLE_ARROW == 0 ) { throw new ExceptionFoxway($id, FOXWAY_PHP_SYNTAX_ERROR_UNEXPECTED, $tokenLine); } $parentFlags = ( $parentFlags & ~FOXWAY_ALLOW_DOUBLE_ARROW ) | FOXWAY_DOUBLE_ARROW_WAS_USED; // Mark double arrow was used +
[MediaWiki-commits] [Gerrit] Some documentation updates - change (mediawiki...DataValues)
Jeroen De Dauw has submitted this change and it was merged. Change subject: Some documentation updates .. Some documentation updates Change-Id: I67a3ea0114aed6673009dfcd0c5c3c89cf68da56 --- M ValueView/README A ValueView/resources/jquery.valueview/README M ValueView/resources/jquery.valueview/valueview.BifidExpert.js M ValueView/resources/jquery.valueview/valueview.Expert.js M ValueView/resources/jquery.valueview/valueview.ExpertFactory.js M ValueView/resources/jquery.valueview/valueview.experts/experts.js 6 files changed, 129 insertions(+), 56 deletions(-) Approvals: Jeroen De Dauw: Looks good to me, approved jenkins-bot: Verified diff --git a/ValueView/README b/ValueView/README index e26b9bd..1268320 100644 --- a/ValueView/README +++ b/ValueView/README @@ -1,15 +1,23 @@ -# ValueView += MediaWiki Extension:ValueView = -"ValueView" introduces the jQuery.ui.widget based frontend component jQuery.valueview which allows -to display and edit data values defined by the "DataValues" extension. When added as a dependency in -a resource loader definition, the following components introduced by this extension will be available: +''ValueView'' introduces the jQuery.ui.widget based front-end component ''jquery.valueview'' which allows to display and edit data values defined by the ''DataValues'' extension. -* jQuery.valueview: Widget definition for displaying and editing data values. Each data value which - should be supported by the valueview widget has to be implemented as a jQuery.valueview.Expert. -* jQuery.fn.valueview: jQuery widget bridge to instantiate a jQuery.valueview widget in the DOM. -* mediaWiki.ext.valueView: Object representing the "ValueView" MediaWiki extension. -* Support of valueview for some basic data value types. These valueview experts can be found in - jQuery.valueview.experts.. -* other jQuery extensions required by this library which are not available in MediaWiki itself: - - jQuery.eachchange - - jQuery.inputAutoExpand \ No newline at end of file + +== Components == +When loading the ''jquery.valueview'' resource loader definition, the following components introduced by this extension will be available: + +* '''jquery.valueview:''' Widget for displaying and editing data values. +* '''mediaWiki.ext.valueView:''' Object representing the "ValueView" MediaWiki extension. When loaded, this will hook ''jQuery.valueview'' up to some of its basic formatters by overwriting jQuery.valueview.valueview.prototype.options.expertProvider + + +== jquery.valueview == +@see resources/jquery.valueview/README + + +=== Dependencies === +See ValueView.resources.mw.php for dependencies of this library. These dependencies are shipped as part of the MediaWiki extension while the core jQuery.valueview component can be found under resources/jQuery.valueview. + + +== Requirements == +* [[Extension:DataValues|DataValues]] extension must be installed +* [[Extension:DataTypes|DataTypes]] extension must be installed diff --git a/ValueView/resources/jquery.valueview/README b/ValueView/resources/jquery.valueview/README new file mode 100644 index 000..d5d1972 --- /dev/null +++ b/ValueView/resources/jquery.valueview/README @@ -0,0 +1,61 @@ += jquery.valueview = + +''jquery.valueview'' introduces a jQuery widget for displaying and editing data values, open for extension to support custom data value implementations. +It consists out of the following parts: + +; jQuery.valueview.valueview : Widget definition for displaying and editing data values. Can be instantiated via the widget's bridge jQuery.fn.valueview. +; jQuery.valueview.Expert : Base for strategies defining how to handle (edit/display) data values of a specific data value type or data values suitable for a certain data type. +; jQuery.valueview.ExpertFactory : Factory for creating jQuery.valueview.Expert instances. +; jQuery.valueview.ViewState : Link between experts and valueview widget in form of a facade that allows experts to observe certain aspects of a valueview. +; jQuery.valueview.experts : Expert definitions for some basic data value types. + + +== Usage == +When using the jQuery valueview widget for handling a data value of some sort, an ExpertFactory with knowledge about an Expert dedicated to the used data value type is required and can be set up as follows: + + +var dv = dataValues; +var vv = jQuery.valueview; +var experts = new vv.ExpertFactory(); + +// Consider this a data value using the "string" data value type internally. +var urlDataType = dataTypes.getDataType( 'url' ); + + +experts.registerExpert( dv.StringValue, vv.experts.StringValue ); + +console.log( + experts.getExpert( new dv.StringValue( 'foo' ) ) === experts.getExpert( urlDataType ) ); + // true because "url" data type's data value type is "string". + // The string expert will be used as fallback. + + +experts.registerExpert( urlDataType, vv.experts.UrlType ); + +c
[MediaWiki-commits] [Gerrit] Add missing @authors to LinkTitles api module - change (mediawiki...Wikibase)
Jeroen De Dauw has submitted this change and it was merged. Change subject: Add missing @authors to LinkTitles api module .. Add missing @authors to LinkTitles api module Change-Id: I0deda4f71d5a19fd84f62ebed36363d0d4637a53 --- M repo/includes/api/LinkTitles.php 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Jeroen De Dauw: Looks good to me, approved jenkins-bot: Verified diff --git a/repo/includes/api/LinkTitles.php b/repo/includes/api/LinkTitles.php index 58648c9..8fcfb8f 100644 --- a/repo/includes/api/LinkTitles.php +++ b/repo/includes/api/LinkTitles.php @@ -17,6 +17,8 @@ * * @since 0.1 * @licence GNU GPL v2+ + * @author John Erling Blad < jeb...@gmail.com > + * @author Adam Shorland */ class LinkTitles extends ApiWikibase { -- To view, visit https://gerrit.wikimedia.org/r/94750 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0deda4f71d5a19fd84f62ebed36363d0d4637a53 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Addshore 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] Add api param descriptions where missing - change (mediawiki...WikibaseQuery)
Jeroen De Dauw has submitted this change and it was merged. Change subject: Add api param descriptions where missing .. Add api param descriptions where missing Change-Id: Iee624159d586a49e797f964a625a3e13e6cd74c3 --- M src/Wikibase/Query/Api/EntitiesByPropertyValue.php 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Addshore: Verified Jeroen De Dauw: Looks good to me, approved diff --git a/src/Wikibase/Query/Api/EntitiesByPropertyValue.php b/src/Wikibase/Query/Api/EntitiesByPropertyValue.php index 1c98b12..22b94f6 100644 --- a/src/Wikibase/Query/Api/EntitiesByPropertyValue.php +++ b/src/Wikibase/Query/Api/EntitiesByPropertyValue.php @@ -98,6 +98,8 @@ 'property' => 'The id of the property for which values should match', 'value' => 'The value to match against', 'entitytype' => 'The type of entities to limit the search to', + 'limit' => 'Maximum number of results', + 'offset' => 'When more results are available, use this to continue', ); } -- To view, visit https://gerrit.wikimedia.org/r/94050 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iee624159d586a49e797f964a625a3e13e6cd74c3 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/WikibaseQuery Gerrit-Branch: master Gerrit-Owner: Addshore Gerrit-Reviewer: Addshore Gerrit-Reviewer: Aude Gerrit-Reviewer: Daniel Kinzler Gerrit-Reviewer: Jeroen De Dauw Gerrit-Reviewer: Tobias Gritschacher ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove verbose headers - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Remove verbose headers .. Remove verbose headers Change-Id: I58c060ce436afe827b43fa193b0ed9c2708b4075 --- M lib/includes/store/CachingPropertyInfoStore.php 1 file changed, 10 insertions(+), 34 deletions(-) Approvals: Jeroen De Dauw: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/includes/store/CachingPropertyInfoStore.php b/lib/includes/store/CachingPropertyInfoStore.php index 3779d89..4b19dfc 100644 --- a/lib/includes/store/CachingPropertyInfoStore.php +++ b/lib/includes/store/CachingPropertyInfoStore.php @@ -1,33 +1,8 @@ http://www.gnu.org/copyleft/gpl.html - * - * @license GPL 2+ - * @file - * @ingroup WikibaseLib - * - * @author Daniel Kinzler - */ - namespace Wikibase; +use BagOStuff; use InvalidArgumentException; use Wikibase\DataModel\Entity\PropertyId; @@ -36,8 +11,8 @@ * that maintains a cached copy of the property info in memcached. * * @since 0.4 - * - * @package Wikibase + * @license GPL 2+ + * @author Daniel Kinzler */ class CachingPropertyInfoStore implements PropertyInfoStore { @@ -47,7 +22,7 @@ protected $store; /** -* @var \BagOStuff +* @var BagOStuff */ protected $cache; @@ -70,7 +45,7 @@ /** * @param PropertyInfoStore $store The info store to call back to. -* @param \BagOStuff $cacheThe cache to use for labels (typically from wfGetMainCache()) +* @param BagOStuff $cacheThe cache to use for labels (typically from wfGetMainCache()) * @param int $cacheDurationNumber of seconds to keep the cached version for. * Defaults to 3600 seconds = 1 hour. * @param string|null $cacheKey The cache key to use, auto-generated per default. @@ -79,7 +54,7 @@ */ public function __construct( PropertyInfoStore $store, - \BagOStuff $cache, + BagOStuff $cache, $cacheDuration = 3600, $cacheKey = null ) { @@ -115,7 +90,7 @@ } /** -* @see PropertyInfoStore::getAllPropertyInfo +* @see PropertyInfoStore::getAllPropertyInfo * * @return array[] */ @@ -141,11 +116,12 @@ * * @param PropertyId $propertyId * @param array $info -* @throws \InvalidArgumentException +* +* @throws InvalidArgumentException */ public function setPropertyInfo( PropertyId $propertyId, array $info ) { if ( !isset( $info[ PropertyInfoStore::KEY_DATA_TYPE ]) ) { - throw new \InvalidArgumentException( 'Missing required info field: ' . PropertyInfoStore::KEY_DATA_TYPE ); + throw new InvalidArgumentException( 'Missing required info field: ' . PropertyInfoStore::KEY_DATA_TYPE ); } // update primary store -- To view, visit https://gerrit.wikimedia.org/r/94782 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I58c060ce436afe827b43fa193b0ed9c2708b4075 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Addshore 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] More fixes for file permissions/ownerships - change (operations/puppet)
Akosiaris has submitted this change and it was merged. Change subject: More fixes for file permissions/ownerships .. More fixes for file permissions/ownerships Turning ulsfo to the new puppetmaster infrastructure revealed a few more permissions/ownerships inconsistencies. Fixing them and linting a bit in the process Change-Id: I68c2376d990ff9e8a9635e3106a1bfd15a2806e3 --- M manifests/misc/monitoring.pp M modules/varnish/manifests/monitoring/ganglia/vhtcpd.pp 2 files changed, 39 insertions(+), 21 deletions(-) Approvals: Akosiaris: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/misc/monitoring.pp b/manifests/misc/monitoring.pp index a4763d4..4ffe089 100644 --- a/manifests/misc/monitoring.pp +++ b/manifests/misc/monitoring.pp @@ -10,20 +10,35 @@ # Ganglia file { -"/usr/lib/ganglia/python_modules/htcpseqcheck.py": -source => "puppet:///files/ganglia/plugins/htcpseqcheck.py"; -"/usr/lib/ganglia/python_modules/htcpseqcheck_ganglia.py": -source => "puppet:///files/ganglia/plugins/htcpseqcheck_ganglia.py"; -"/usr/lib/ganglia/python_modules/util.py": -source => "puppet:///files/ganglia/plugins/util.py"; -"/usr/lib/ganglia/python_modules/compat.py": -source => "puppet:///files/ganglia/plugins/compat.py"; -"/etc/ganglia/conf.d/htcpseqcheck.pyconf": +'/usr/lib/ganglia/python_modules/htcpseqcheck.py': +owner => 'root', +group => 'root', +mode=> '0444', +source => 'puppet:///files/ganglia/plugins/htcpseqcheck.py'; +'/usr/lib/ganglia/python_modules/htcpseqcheck_ganglia.py': +owner => 'root', +group => 'root', +mode=> '0444', +source => 'puppet:///files/ganglia/plugins/htcpseqcheck_ganglia.py'; +'/usr/lib/ganglia/python_modules/util.py': +owner => 'root', +group => 'root', +mode=> '0444', +source => 'puppet:///files/ganglia/plugins/util.py'; +'/usr/lib/ganglia/python_modules/compat.py': +owner => 'root', +group => 'root', +mode=> '0444', +source => 'puppet:///files/ganglia/plugins/compat.py'; +'/etc/ganglia/conf.d/htcpseqcheck.pyconf': # Disabled due to excessive memory and CPU usage -- TS -notify => Service['gmond'], -ensure => absent; +#owner => 'root', +#group => 'root', +#mode=> '0444', +notify => Service['gmond'], +ensure => absent; #require => File["/etc/ganglia/conf.d"], -#source => "puppet:///files/ganglia/plugins/htcpseqcheck.pyconf"; +#source => "puppet:///files/ganglia/plugins/htcpseqcheck.pyconf"; } } diff --git a/modules/varnish/manifests/monitoring/ganglia/vhtcpd.pp b/modules/varnish/manifests/monitoring/ganglia/vhtcpd.pp index 6226ca2..52969cc 100644 --- a/modules/varnish/manifests/monitoring/ganglia/vhtcpd.pp +++ b/modules/varnish/manifests/monitoring/ganglia/vhtcpd.pp @@ -1,14 +1,17 @@ -class varnish::monitoring::ganglia::vhtcpd() { +class varnish::monitoring::ganglia::vhtcpd { file { -"/usr/lib/ganglia/python_modules/vhtcpd.py": -source => "puppet:///modules/${module_name}/ganglia/ganglia-vhtcpd.py", -notify => Service['gmond']; +'/usr/lib/ganglia/python_modules/vhtcpd.py': +source => "puppet:///modules/${module_name}/ganglia/ganglia-vhtcpd.py", +owner => 'root', +group => 'root', +mode=> '0444', +notify => Service['gmond']; -"/etc/ganglia/conf.d/vhtcpd.pyconf": -owner => root, -group => root, -mode => 0444, +'/etc/ganglia/conf.d/vhtcpd.pyconf': +owner => 'root', +group => 'root', +mode=> '0444', content => template("${module_name}/ganglia/vhtcpd.pyconf.erb"), -notify => Service['gmond']; +notify => Service['gmond']; } } -- To view, visit https://gerrit.wikimedia.org/r/94777 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I68c2376d990ff9e8a9635e3106a1bfd15a2806e3 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Akosiaris Gerrit-Reviewer: Akosiaris 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 a class to interlanguage links - change (mediawiki/core)
Amire80 has uploaded a new change for review. https://gerrit.wikimedia.org/r/94899 Change subject: Add a class to interlanguage links .. Add a class to interlanguage links The elements in the interlanguage links list are not necessarily links to other languages. They may also be links to Wikidata, for example. This commit adds a class that identifies the actual links as such. Change-Id: Ia995f89504d19ac281d55e0c19c51c9dc6442d8e --- M includes/SkinTemplate.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/99/94899/1 diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php index 8671ff8..c50ca75 100644 --- a/includes/SkinTemplate.php +++ b/includes/SkinTemplate.php @@ -139,7 +139,7 @@ if ( !$wgHideInterlanguageLinks ) { foreach ( $out->getLanguageLinks() as $languageLinkText ) { $languageLinkParts = explode( ':', $languageLinkText, 2 ); - $class = 'interwiki-' . $languageLinkParts[0]; + $class = 'interlanguage-link interwiki-' . $languageLinkParts[0]; unset( $languageLinkParts ); $languageLinkTitle = Title::newFromText( $languageLinkText ); if ( $languageLinkTitle ) { -- To view, visit https://gerrit.wikimedia.org/r/94899 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia995f89504d19ac281d55e0c19c51c9dc6442d8e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Amire80 ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Less hacky, configurable, way to limit threading - change (mediawiki...Flow)
Matthias Mullie has uploaded a new change for review. https://gerrit.wikimedia.org/r/94900 Change subject: Less hacky, configurable, way to limit threading .. Less hacky, configurable, way to limit threading Change-Id: Iadd78ec6d71285c79f086601c46ffcfa5e3d9374 --- M Flow.php M container.php M includes/Data/ObjectManager.php M includes/Data/RootPostLoader.php M includes/Model/PostRevision.php M modules/discussion/styles/post.less M modules/discussion/ui.js M templates/post.html.php 8 files changed, 55 insertions(+), 42 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/00/94900/1 diff --git a/Flow.php b/Flow.php index 41cf04c..e91662a 100755 --- a/Flow.php +++ b/Flow.php @@ -227,6 +227,9 @@ // Namespaces to occupy is an array of NS_* constants, e.g. array( NS_USER_TALK ). $wgFlowOccupyNamespaces = array( NS_TALK ); +// Max threading depth +$wgFlowMaxThreadingDepth = 2; + // Action details config file require $dir . 'FlowActions.php'; diff --git a/container.php b/container.php index 582a00b..7908cb3 100644 --- a/container.php +++ b/container.php @@ -41,11 +41,12 @@ 'flow' => __DIR__ . '/templates', ); $c['templating.global_variables'] = $c->share( function( $c ) { - global $wgFlowTokenSalt; + global $wgFlowTokenSalt, $wgFlowMaxThreadingDepth; return array( 'user' => $c['user'], 'editToken' => $c['user']->getEditToken( $wgFlowTokenSalt ), + 'maxThreadingDepth' => $wgFlowMaxThreadingDepth, ); } ); $c['templating'] = $c->share( function( $c ) { diff --git a/includes/Data/ObjectManager.php b/includes/Data/ObjectManager.php index 5c88eef..b768b72 100644 --- a/includes/Data/ObjectManager.php +++ b/includes/Data/ObjectManager.php @@ -142,7 +142,7 @@ /** - * A little glue code to allow passing arround and manipulating multiple + * A little glue code to allow passing around and manipulating multiple * ObjectManagers more convenient. */ class ManagerGroup { diff --git a/includes/Data/RootPostLoader.php b/includes/Data/RootPostLoader.php index 0ccdeca..1ed41f2 100644 --- a/includes/Data/RootPostLoader.php +++ b/includes/Data/RootPostLoader.php @@ -66,18 +66,30 @@ throw new \MWException( 'Found posts with unrequested parents: ' . json_encode( $extraParents ) ); } - // link parents to their children foreach ( $posts as $postId => $post ) { + $postChildren = array(); + $postDepth = 0; + + // link parents to their children if ( isset( $children[$postId] ) ) { // sort children with oldest items first usort( $children[$postId], function( $a, $b ) { return $b->compareCreateTime( $a ); } ); - $post->setChildren( $children[$postId] ); - } else { - $post->setChildren( array() ); + $postChildren = $children[$postId]; } + + // determine threading depth of post + $replyToId = $post->getReplyToId(); + while ( $replyToId && isset( $children[$replyToId->getHex()] ) ) { + $postDepth++; + $replyToId = $posts[$replyToId->getHex()]->getReplyToId(); + } + + $post->setChildren( $postChildren ); + $post->setDepth( $postDepth ); } + // return only the requested posts, rest are available as children. // Return in same order as requested $roots = array(); diff --git a/includes/Model/PostRevision.php b/includes/Model/PostRevision.php index 8e3eb93..01fc18e 100644 --- a/includes/Model/PostRevision.php +++ b/includes/Model/PostRevision.php @@ -16,6 +16,7 @@ // Data that is loaded externally and set protected $children; + protected $depth; /** * Variables callback functions & their results will be saved to. @@ -166,6 +167,17 @@ return $this->children; } + public function setDepth( $depth ) { + $this->depth = $depth; + } + + public function getDepth() { + if ( $this->depth === null ) { + throw new \MWException( 'Depth not loaded for post: ' . $this->postId->getHex() ); + } + return $this->depth; + } + /** * Get the amount of posts in this topic. * diff --git a/modules/discussion/styles/post.less b/modules/discussion/styles/post.less index 1067c1f.
[MediaWiki-commits] [Gerrit] Add messages for "over 500 uploads" - change (mediawiki...MobileFrontend)
Shirayuki has uploaded a new change for review. https://gerrit.wikimedia.org/r/94901 Change subject: Add messages for "over 500 uploads" .. Add messages for "over 500 uploads" Change-Id: Ia4eea76d8f616a9dfc9c379ae98054d062b486ec --- M MobileFrontend.i18n.php M includes/specials/SpecialUserProfile.php 2 files changed, 41 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/01/94901/1 diff --git a/MobileFrontend.i18n.php b/MobileFrontend.i18n.php index 8c2ad54..b190f6f 100644 --- a/MobileFrontend.i18n.php +++ b/MobileFrontend.i18n.php @@ -346,9 +346,12 @@ 'mobile-frontend-requires-optin' => 'This page is not available unless you opt into our beta mode. Visit the [[Special:MobileOptions|settings page]] to opt in.', 'mobile-frontend-profile-last-thanked' => '{{GENDER:$1|Last thanked}} by [[Special:UserProfile/$1|$1]] for an edit to [[$2]].', 'mobile-frontend-profile-last-edit' => '{{GENDER:$3|Edited}} the page [[$1]], {{PLURAL:$2|yesterday|$2 days ago|0=earlier today}}.', - 'mobile-frontend-profile-footer-days' => 'Registered for {{PLURAL:$2|1 day|$2 days}} with [[Special:Contributions/$1|{{PLURAL:$3|1 edit|$3 edits}}]] and [[Special:Uploads/$1|{{PLURAL:$4|1 upload|$4 uploads|500=500+ uploads}}]].', - 'mobile-frontend-profile-footer-months' => 'Registered for over {{PLURAL:$2|1 month|$2 months}} with [[Special:Contributions/$1|{{PLURAL:$3|1 edit|$3 edits}}]] and [[Special:Uploads/$1|{{PLURAL:$4|1 upload|$4 uploads|500=500+ uploads}}]].', - 'mobile-frontend-profile-footer-years' => 'Registered for over {{PLURAL:$2|1 year|$2 years}} with [[Special:Contributions/$1|{{PLURAL:$3|1 edit|$3 edits}}]] and [[Special:Uploads/$1|{{PLURAL:$4|1 upload|$4 uploads|500=500+ uploads}}]].', + 'mobile-frontend-profile-footer-days' => 'Registered for {{PLURAL:$2|1 day|$2 days}} with [[Special:Contributions/$1|{{PLURAL:$3|1 edit|$3 edits}}]] and [[Special:Uploads/$1|{{PLURAL:$4|1 upload|$4 uploads}}]].', + 'mobile-frontend-profile-footer-days2' => 'Registered for {{PLURAL:$2|1 day|$2 days}} with [[Special:Contributions/$1|{{PLURAL:$3|1 edit|$3 edits}}]] and [[Special:Uploads/$1|$4+ uploads]].', + 'mobile-frontend-profile-footer-months' => 'Registered for over {{PLURAL:$2|1 month|$2 months}} with [[Special:Contributions/$1|{{PLURAL:$3|1 edit|$3 edits}}]] and [[Special:Uploads/$1|{{PLURAL:$4|1 upload|$4 uploads}}]].', + 'mobile-frontend-profile-footer-months2' => 'Registered for over {{PLURAL:$2|1 month|$2 months}} with [[Special:Contributions/$1|{{PLURAL:$3|1 edit|$3 edits}}]] and [[Special:Uploads/$1|$4+ uploads]].', + 'mobile-frontend-profile-footer-years' => 'Registered for over {{PLURAL:$2|1 year|$2 years}} with [[Special:Contributions/$1|{{PLURAL:$3|1 edit|$3 edits}}]] and [[Special:Uploads/$1|{{PLURAL:$4|1 upload|$4 uploads}}]].', + 'mobile-frontend-profile-footer-years2' => 'Registered for over {{PLURAL:$2|1 year|$2 years}} with [[Special:Contributions/$1|{{PLURAL:$3|1 edit|$3 edits}}]] and [[Special:Uploads/$1|$4+ uploads]].', // geo not a hack 'mobile-frontend-geonotahack' => 'Near this page', @@ -951,15 +954,42 @@ * $1 - Username of user (used for link generation and can be used for GENDER) * $2 - Number of days the user has been a member for. * $3 - Number of edits -* $4 - Number of uploads, capped to 500', - 'mobile-frontend-profile-footer-months' => 'See {{msg-mw|mobile-frontend-profile-footer-days}} with one variation: +* $4 - Number of uploads', + 'mobile-frontend-profile-footer-days2' => 'Generates the informative footer on Special:UserProfile Parameters: -* $2 - Number of full months the user has been a member for', - 'mobile-frontend-profile-footer-years' => 'See {{msg-mw|mobile-frontend-profile-footer-days}} with one variation: +* $1 - Username of user (used for link generation and can be used for GENDER) +* $2 - Number of days the user has been a member for. +* $3 - Number of edits +* $4 - Number of uploads, 500 (hard-coded)', + 'mobile-frontend-profile-footer-months' => 'Generates the informative footer on Special:UserProfile Parameters: -* $2 - Number of full years the user has been a member for', +* $1 - Username of user (used for link generation and can be used for GENDER) +* $2 - Number of full months the user has been a member for +* $3 - Number of edits +* $4 - Number of uploads', + 'mobile-frontend-profile-footer-months2' => 'Generates the informative footer on Special:UserProfile + +Parameters: +* $1 - Username of user (used for link generation and can be used for GENDER) +* $2 - Number of full months the user has been a member for +* $3 - Number of edits +* $4 - Number of uploads, 500 (hard-coded)', + 'mobile-frontend-profile-footer-years' => 'Generates the informative footer on Special
[MediaWiki-commits] [Gerrit] Remove misc::maintenance::foundationwiki cronjobs - change (operations/puppet)
Faidon Liambotis has submitted this change and it was merged. Change subject: Remove misc::maintenance::foundationwiki cronjobs .. Remove misc::maintenance::foundationwiki cronjobs db1008 is no more (NXDOMAIN) and this besides being noop, produced confusing errors in production logs. Kill with fire. Change-Id: Ia0617a147164f4153b63b3b281299b38f26f3dd3 --- M manifests/misc/maintenance.pp M manifests/site.pp 2 files changed, 0 insertions(+), 32 deletions(-) Approvals: Faidon Liambotis: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/misc/maintenance.pp b/manifests/misc/maintenance.pp index a2623a6..861c46f 100644 --- a/manifests/misc/maintenance.pp +++ b/manifests/misc/maintenance.pp @@ -2,35 +2,6 @@ # mw maintenance/batch hosts -class misc::maintenance::foundationwiki( $enabled = false ) { - - system::role { "misc::maintenance::foundationwiki": description => "Misc - Maintenance Server: foundationwiki" } - - # This is broken and points to a non-existing DB - cron { 'updatedays': - user => apache, - minute => '*/15', - command => '/usr/local/bin/mwscript extensions/ContributionReporting/PopulateFundraisingStatistics.php foundationwiki --op updatedays > /tmp/PopulateFundraisingStatistics-updatedays.log', - ensure => $enabled ?{ - true => present, - false => absent, - default => absent - }; - } - - # This is broken and points to a non-existing DB - cron { 'populatefundraisers': - user => apache, - minute => 5, - command => '/usr/local/bin/mwscript extensions/ContributionReporting/PopulateFundraisingStatistics.php foundationwiki --op populatefundraisers > /tmp/PopulateFundraisingStatistics-populatefundraisers.log', - ensure => $enabled ?{ - true => present, - false => absent, - default => absent - }; - } -} - class misc::maintenance::refreshlinks( $enabled = false ) { require mediawiki diff --git a/manifests/site.pp b/manifests/site.pp index 15a460e..7a93799 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -2750,9 +2750,6 @@ # (bug 15434) Periodical run of currently disabled special pages # to be run against PMTPA slaves class { misc::maintenance::updatequerypages: enabled => true } - -# totally broken, misconfigured in non-version reporting-setup.php -class { misc::maintenance::foundationwiki: enabled => false } } node /^testsearch100[1-3]\.eqiad\.wmnet/ { -- To view, visit https://gerrit.wikimedia.org/r/91676 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia0617a147164f4153b63b3b281299b38f26f3dd3 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Reedy Gerrit-Reviewer: Faidon Liambotis Gerrit-Reviewer: Jgreen Gerrit-Reviewer: Mwalker Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Ignore Range requests - change (operations/puppet)
Mark Bergsma has uploaded a new change for review. https://gerrit.wikimedia.org/r/94902 Change subject: Ignore Range requests .. Ignore Range requests We're seeing elevated 503s due to Varnish range request handling in combination with gzip/gunzip support. Because Varnish receives most objects from the backend(s) compressed, it needs to gunzip and gzip to serve a response, which appears to be failing often in various ways. Until we have time to debug this properly, let's disable Range requests for the Text cluster, as they're not tremendously helpful anyway. Change-Id: I2524a8d9ca1006da26bae174d6067e6e71d50c37 --- M templates/varnish/text-frontend.inc.vcl.erb 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/02/94902/1 diff --git a/templates/varnish/text-frontend.inc.vcl.erb b/templates/varnish/text-frontend.inc.vcl.erb index f61f125..510f0af 100644 --- a/templates/varnish/text-frontend.inc.vcl.erb +++ b/templates/varnish/text-frontend.inc.vcl.erb @@ -58,6 +58,11 @@ /* Allow purging */ call vcl_recv_purge; + /* FIXME: we're seeing an issue with Range requests and gzip/gunzip. +* Disable Range requests for now. +*/ + unset req.http.Range; + call rewrite_proxy_urls; call mobile_redirect; call pass_requests; -- To view, visit https://gerrit.wikimedia.org/r/94902 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2524a8d9ca1006da26bae174d6067e6e71d50c37 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Ignore Range requests - change (operations/puppet)
Mark Bergsma has submitted this change and it was merged. Change subject: Ignore Range requests .. Ignore Range requests We're seeing elevated 503s due to Varnish range request handling in combination with gzip/gunzip support. Because Varnish receives most objects from the backend(s) compressed, it needs to gunzip and gzip to serve a response, which appears to be failing often in various ways. Until we have time to debug this properly, let's disable Range requests for the Text cluster, as they're not tremendously helpful anyway. Change-Id: I2524a8d9ca1006da26bae174d6067e6e71d50c37 --- M templates/varnish/text-frontend.inc.vcl.erb 1 file changed, 5 insertions(+), 0 deletions(-) Approvals: Mark Bergsma: Looks good to me, approved jenkins-bot: Verified diff --git a/templates/varnish/text-frontend.inc.vcl.erb b/templates/varnish/text-frontend.inc.vcl.erb index f61f125..510f0af 100644 --- a/templates/varnish/text-frontend.inc.vcl.erb +++ b/templates/varnish/text-frontend.inc.vcl.erb @@ -58,6 +58,11 @@ /* Allow purging */ call vcl_recv_purge; + /* FIXME: we're seeing an issue with Range requests and gzip/gunzip. +* Disable Range requests for now. +*/ + unset req.http.Range; + call rewrite_proxy_urls; call mobile_redirect; call pass_requests; -- To view, visit https://gerrit.wikimedia.org/r/94902 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2524a8d9ca1006da26bae174d6067e6e71d50c37 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma Gerrit-Reviewer: Mark Bergsma 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 typos in dumpJson command options - change (mediawiki...Wikibase)
Jeroen De Dauw has submitted this change and it was merged. Change subject: Fix typos in dumpJson command options .. Fix typos in dumpJson command options Change-Id: I9379b2f175a2e1a3d712849ef7a3db772bb985e9 --- M repo/maintenance/dumpJson.php 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Jeroen De Dauw: Looks good to me, approved jenkins-bot: Verified diff --git a/repo/maintenance/dumpJson.php b/repo/maintenance/dumpJson.php index b114de6..75da1ea 100644 --- a/repo/maintenance/dumpJson.php +++ b/repo/maintenance/dumpJson.php @@ -55,9 +55,9 @@ $this->mDescription = 'Generate a JSON dump from entities in the repository.'; $this->addOption( 'list-file', "A file containing one entity ID per line.", false, true ); - $this->addOption( 'entity-type', "Only dump this kind of entitiy, e.g. `item` or `property`.", false, true ); + $this->addOption( 'entity-type', "Only dump this kind of entity, e.g. `item` or `property`.", false, true ); $this->addOption( 'sharding-factor', "The number of shards (must be >= 1)", false, true ); - $this->addOption( 'shard', "A the shard to output (must be lett than the sharding-factor) ", false, true ); + $this->addOption( 'shard', "The shard to output (must be less than the sharding-factor) ", false, true ); $this->addOption( 'output', "Output file (default is stdout) ", false, true ); $this->addOption( 'quiet', "Disable progress reporting", false, false ); } -- To view, visit https://gerrit.wikimedia.org/r/94879 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9379b2f175a2e1a3d712849ef7a3db772bb985e9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Aude 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] (bug #56686) Use exponent to represent sig digits - change (mediawiki...DataValues)
Jeroen De Dauw has submitted this change and it was merged. Change subject: (bug #56686) Use exponent to represent sig digits .. (bug #56686) Use exponent to represent sig digits Change-Id: Idf91f194dde9748a508ff47495c8b09c110f8a1d --- M DataValuesCommon/src/DataValues/DecimalMath.php M DataValuesCommon/src/DataValues/QuantityValue.php M DataValuesCommon/src/ValueFormatters/QuantityFormatter.php M DataValuesCommon/tests/DataValues/DecimalMathTest.php M DataValuesCommon/tests/DataValues/QuantityValueTest.php 5 files changed, 245 insertions(+), 120 deletions(-) Approvals: Jeroen De Dauw: Looks good to me, approved diff --git a/DataValuesCommon/src/DataValues/DecimalMath.php b/DataValuesCommon/src/DataValues/DecimalMath.php index 12780c6..345d979 100644 --- a/DataValuesCommon/src/DataValues/DecimalMath.php +++ b/DataValuesCommon/src/DataValues/DecimalMath.php @@ -47,23 +47,20 @@ /** * Returns the given value, with any insignificant digits removed or zeroed. +* * Rounding is applied using the "round half away from zero" rule (that is, +0.5 is * rounded to +1 and -0.5 is rounded to -1). * * @since 0.1 * -* @todo: change this (or provide an alternative) to work based on the exponent -* of the least significant digit, instead of its position. E.g. -1 would -* mean "the first digit after the decimal point", 0 would mean "the first -* digit before the decimal point", and so on. -* * @param DecimalValue $decimal -* @param int $significantDigits +* @param int $significantDigits The number of digits to retain, counting the decimal point, +*but not counting the leading sign. * * @throws \InvalidArgumentException * @return DecimalValue */ - public function round( DecimalValue $decimal, $significantDigits ) { + public function roundToDigit( DecimalValue $decimal, $significantDigits ) { $value = $decimal->getValue(); $rounded = $this->roundDigits( $value, $significantDigits ); return new DecimalValue( $rounded ); @@ -71,6 +68,63 @@ /** * Returns the given value, with any insignificant digits removed or zeroed. +* +* Rounding is applied using the "round half away from zero" rule (that is, +0.5 is +* rounded to +1 and -0.5 is rounded to -1). +* +* @since 0.1 +* +* @param DecimalValue $decimal +* @param int $significantExponent The exponent of the last significant digit, +*e.g. -1 for "keep the first digit after the decimal point", or 2 for +*"zero the last two digits before the decimal point". +* +* @throws \InvalidArgumentException +* @return DecimalValue +*/ + public function roundToExponent( DecimalValue $decimal, $significantExponent ) { + //NOTE: the number of digits to keep (without the leading sign) + // is the same as the exponent's offset (with the leaqding sign). + $digits = $this->getPositionForExponent( $significantExponent, $decimal ); + return $this->roundToDigit( $decimal, $digits ); + } + + /** +* Returns the (zero based) position for the given exponent in +* the given decimal string, counting the decimal point and the leading sign. +* +* @example: the position of exponent 0 in "+10.03" is 2. +* @example: the position of exponent 1 in "+210.03" is 2. +* @example: the position of exponent -2 in "+1.037" is 4. +* +* @param int $exponent +* @param string $decimal +*/ + public function getPositionForExponent( $exponent, DecimalValue $decimal ) { + $decimal = $decimal->getValue(); + + $pointPos = strpos( $decimal, '.' ); + if ( $pointPos === false ) { + $pointPos = strlen( $decimal ); + } + + // account for leading sign + $pointPos--; + + if ( $exponent < 0 ) { + // account for decimal point + $position = $pointPos +1 - $exponent; + } else { + // make sure we don't remove more digits than are there + $position = max( 0, $pointPos - $exponent ); + } + + return $position; + } + + /** +* Returns the given value, with any insignificant digits removed or zeroed. +* * Rounding is applied using the "round half away from zero" rule (that is, +0.5 is * rounded to +1 and -0.5 is rounded to -1). * @@ -79,7 +133,7 @@ * @param string $value * @param int $s
[MediaWiki-commits] [Gerrit] (bug #56714) option for disabling rounding. - change (mediawiki...DataValues)
jenkins-bot has submitted this change and it was merged. Change subject: (bug #56714) option for disabling rounding. .. (bug #56714) option for disabling rounding. The rounding applied to QuantityValues is now configurable via an option key. Change-Id: Ieea60f847923a3e5ac26cc5ee08dc0e3dfada8ad --- M DataValuesCommon/src/ValueFormatters/QuantityFormatter.php M DataValuesCommon/tests/ValueFormatters/QuantityFormatterTest.php 2 files changed, 81 insertions(+), 13 deletions(-) Approvals: Addshore: Looks good to me, but someone else must approve Jeroen De Dauw: Looks good to me, approved jenkins-bot: Verified diff --git a/DataValuesCommon/src/ValueFormatters/QuantityFormatter.php b/DataValuesCommon/src/ValueFormatters/QuantityFormatter.php index 9de12cc..8a805dd 100644 --- a/DataValuesCommon/src/ValueFormatters/QuantityFormatter.php +++ b/DataValuesCommon/src/ValueFormatters/QuantityFormatter.php @@ -16,7 +16,26 @@ */ class QuantityFormatter extends ValueFormatterBase { + /** +* Option key for enabling or disabling output of the uncertainty margin (e.g. "+/-5"). +* Per default, the uncertainty margin is included in the output. +* This option must have a boolean value. +*/ const OPT_SHOW_UNCERTAINTY_MARGIN = 'showQuantityUncertaintyMargin'; + + /** +* Option key for determining what level of rounding to apply to the numbers +* included in the output. The value of this option must be an integer or a boolean. +* +* If an integer is given, this is the exponent of the last significant decimal digits +* - that is, -2 would round to two digits after the decimal point, and 1 would round +* to two digits before the decimal point. 0 would indicate rounding to integers. +* +* If the value is a boolean, false means no rounding at all (useful e.g. in diffs), +* and true means automatic rounding based on what $quantity->getOrderOfUncertainty() +* returns. +*/ + const OPT_APPLY_ROUNDING = 'applyRounding'; /** * @var DecimalMath @@ -33,6 +52,10 @@ * @param FormatterOptions $options */ public function __construct( DecimalFormatter $decimalFormatter, FormatterOptions $options ) { + $options = clone $options; // copy, so we don't modify the options that were passed in. + $options->defaultOption( self::OPT_SHOW_UNCERTAINTY_MARGIN, true ); + $options->defaultOption( self::OPT_APPLY_ROUNDING, true ); + parent::__construct( $options ); $this->decimalFormatter = $decimalFormatter; @@ -41,6 +64,26 @@ $this->decimalMath = new DecimalMath(); } + /** +* Returns the rounding exponent based on the given $quantity +* and the @see QuantityFormatter::OPT_APPLY_ROUNDING option. +* +* @param QuantityValue $quantity +* +* @return int +*/ + protected function getRoundingExponent( QuantityValue $quantity ) { + if ( $this->options->getOption( self::OPT_APPLY_ROUNDING ) === true ) { + // round to the order of uncertainty + return $quantity->getOrderOfUncertainty(); + } elseif ( $this->options->getOption( self::OPT_APPLY_ROUNDING ) === false ) { + // some number larger than the actual number of digits, + // but no where near -PHP_INT_MAX. + return -strlen( $quantity->getAmount() ) * 2 - 100; + } else { + return (int)$this->options->getOption( self::OPT_APPLY_ROUNDING ); + } + } /** * Formats a QuantityValue data value @@ -57,7 +100,7 @@ throw new InvalidArgumentException( 'DataValue is not a QuantityValue.' ); } - $roundingExponent = $dataValue->getOrderOfUncertainty(); + $roundingExponent = $this->getRoundingExponent( $dataValue ); $amountValue = $dataValue->getAmount(); $amountValue = $this->decimalMath->roundToExponent( $amountValue, $roundingExponent ); @@ -67,9 +110,9 @@ $margin = ''; - if ( !$this->options->hasOption( self::OPT_SHOW_UNCERTAINTY_MARGIN ) - || $this->options->getOption( self::OPT_SHOW_UNCERTAINTY_MARGIN ) == true ) { + if ( $this->options->getOption( self::OPT_SHOW_UNCERTAINTY_MARGIN ) ) { + // TODO: never round to 0! See bug #56892 $marginValue = $dataValue->getUncertaintyMargin(); $marginValue = $this->decimalMath->roundToExponent( $marginValue, $roundingExponent ); diff --git a/DataValuesCommon/tests/ValueFormatter
[MediaWiki-commits] [Gerrit] Add a tracking category - change (mediawiki...Maps)
jenkins-bot has submitted this change and it was merged. Change subject: Add a tracking category .. Add a tracking category Bug: 56917 Change-Id: I228919de5c7c550ec0a6e91397475b57a5e49079 --- M Maps.i18n.php M includes/parserhooks/Maps_DisplayMap.php 2 files changed, 4 insertions(+), 1 deletion(-) Approvals: Wikinaut: Looks good to me, but someone else must approve Jeroen De Dauw: Looks good to me, approved jenkins-bot: Verified diff --git a/Maps.i18n.php b/Maps.i18n.php index 3d4424e..58e281e 100644 --- a/Maps.i18n.php +++ b/Maps.i18n.php @@ -21,6 +21,7 @@ 'right-geocode' => 'Geocode', 'maps_map' => 'Map', + 'maps-tracking-category' => 'Pages with a map rendered by the Maps extension', 'maps-loading-map' => 'Loading map...', 'maps-load-failed' => 'Could not load the map!', 'maps-markers' => 'Markers', @@ -263,6 +264,7 @@ 'maps-desc' => '{{desc|name=Maps|url=http://www.mediawiki.org/wiki/Extension:Maps}}', 'right-geocode' => '{{doc-right|geocode}}', 'maps_map' => '{{Identical|Map}}', + 'maps-tracking-category' => 'The name of a category for all pages which use the display_map parser extension function or tag. The category is automatically added unless the feature is disabled.', 'maps-copycoords-prompt' => 'text displayed in javascript prompt to indicate first press ctrl+c to copy text, and press enter to close prompt', 'maps-others' => '{{Identical|Other}}', 'maps-kml-parsing-failed' => 'text displayed in the event of parsing failure of kml file(s).', diff --git a/includes/parserhooks/Maps_DisplayMap.php b/includes/parserhooks/Maps_DisplayMap.php index a6136d9..96ad9fd 100644 --- a/includes/parserhooks/Maps_DisplayMap.php +++ b/includes/parserhooks/Maps_DisplayMap.php @@ -198,11 +198,12 @@ $parameters['zoom'] = false; } + $this->parser->addTrackingCategory( 'maps-tracking-category' ); return $mapClass->renderMap( $parameters, $this->parser ); } /** -* Returns the parser function otpions. +* Returns the parser function options. * @see ParserHook::getFunctionOptions * * @since 0.7 -- To view, visit https://gerrit.wikimedia.org/r/93499 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I228919de5c7c550ec0a6e91397475b57a5e49079 Gerrit-PatchSet: 7 Gerrit-Project: mediawiki/extensions/Maps Gerrit-Branch: master Gerrit-Owner: Wikinaut Gerrit-Reviewer: Jeroen De Dauw Gerrit-Reviewer: Siebrand Gerrit-Reviewer: Wikinaut 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 'quotation-marks' message non-optional - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Make 'quotation-marks' message non-optional .. Make 'quotation-marks' message non-optional Followup to Iebf62805. Change-Id: I9282c787cd35b2cc531418f84a47bab4c06121ed --- M languages/messages/MessagesEn.php M languages/messages/MessagesQqq.php M maintenance/language/messageTypes.inc 3 files changed, 4 insertions(+), 3 deletions(-) Approvals: Siebrand: Looks good to me, approved Dereckson: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index ef3e1b1..99dd4d5 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -4647,7 +4647,7 @@ 'percent' => '$1%', # only translate this message to other languages if you have to change it 'parentheses' => '($1)', # only translate this message to other languages if you have to change it 'brackets'=> '[$1]', # only translate this message to other languages if you have to change it -'quotation-marks' => '"$1"', # only translate this message to other languages if you have to change it +'quotation-marks' => '"$1"', # Multipage image navigation 'imgmultipageprev' => '← previous page', diff --git a/languages/messages/MessagesQqq.php b/languages/messages/MessagesQqq.php index 77fc8aa..b979416 100644 --- a/languages/messages/MessagesQqq.php +++ b/languages/messages/MessagesQqq.php @@ -9547,7 +9547,9 @@ 'percent' => '{{optional}}', 'parentheses' => '{{optional}}', 'brackets' => '{{Optional}}', -'quotation-marks' => '{{optional}}', +'quotation-marks' => 'Quotation marks, for citing, sometimes titles etc., depending on the language. + +See: https://en.wikipedia.org/wiki/Non-English_usage_of_quotation_marks', # Multipage image navigation 'imgmultipageprev' => '{{Identical|Previous page}}', diff --git a/maintenance/language/messageTypes.inc b/maintenance/language/messageTypes.inc index b23155b..8676d74 100644 --- a/maintenance/language/messageTypes.inc +++ b/maintenance/language/messageTypes.inc @@ -457,7 +457,6 @@ 'percent', 'parentheses', 'brackets', - 'quotation-marks', 'listgrouprights-right-display', 'listgrouprights-right-revoked', 'timezone-utc', -- To view, visit https://gerrit.wikimedia.org/r/94827 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9282c787cd35b2cc531418f84a47bab4c06121ed Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Bartosz Dziewoński Gerrit-Reviewer: Bartosz Dziewoński Gerrit-Reviewer: Dereckson Gerrit-Reviewer: Kaldari Gerrit-Reviewer: Nikerabbit Gerrit-Reviewer: Siebrand Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use country neutral "national identification number" - change (mediawiki/core)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/94903 Change subject: Use country neutral "national identification number" .. Use country neutral "national identification number" Bug: 56655 Change-Id: I66368685f59e9ca75ec3e752be6bbe4f83fe2c55 --- M languages/messages/MessagesEn.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/03/94903/1 diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 1cc20b9..0c4ca01 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -1708,7 +1708,7 @@ 'revdelete-suppress-text' => "Suppression should '''only''' be used for the following cases: * Potentially libelous information * Inappropriate personal information -*: ''home addresses and telephone numbers, social security numbers, etc.''", +*: ''home addresses and telephone numbers, national identification numbers, etc.''", 'revdelete-legend'=> 'Set visibility restrictions', 'revdelete-hide-text' => 'Revision text', 'revdelete-hide-image'=> 'Hide file content', -- To view, visit https://gerrit.wikimedia.org/r/94903 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I66368685f59e9ca75ec3e752be6bbe4f83fe2c55 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Siebrand ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use country neutral "national identification number" - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Use country neutral "national identification number" .. Use country neutral "national identification number" Bug: 56655 Change-Id: I66368685f59e9ca75ec3e752be6bbe4f83fe2c55 --- M languages/messages/MessagesEn.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Raimond Spekking: Looks good to me, approved jenkins-bot: Verified diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 1cc20b9..0c4ca01 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -1708,7 +1708,7 @@ 'revdelete-suppress-text' => "Suppression should '''only''' be used for the following cases: * Potentially libelous information * Inappropriate personal information -*: ''home addresses and telephone numbers, social security numbers, etc.''", +*: ''home addresses and telephone numbers, national identification numbers, etc.''", 'revdelete-legend'=> 'Set visibility restrictions', 'revdelete-hide-text' => 'Revision text', 'revdelete-hide-image'=> 'Hide file content', -- To view, visit https://gerrit.wikimedia.org/r/94903 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I66368685f59e9ca75ec3e752be6bbe4f83fe2c55 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Siebrand Gerrit-Reviewer: Liangent Gerrit-Reviewer: Raimond Spekking Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Automagically put username of user I'm replying to in replie... - change (mediawiki...Flow)
Matthias Mullie has uploaded a new change for review. https://gerrit.wikimedia.org/r/94906 Change subject: Automagically put username of user I'm replying to in replies to tangents .. Automagically put username of user I'm replying to in replies to tangents Change-Id: Ib6d6ac911d8959beaecacbea2b0ac04d826c --- M Resources.php M modules/discussion/ui.js 2 files changed, 11 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/06/94906/1 diff --git a/Resources.php b/Resources.php index 2212417..5b6116a 100644 --- a/Resources.php +++ b/Resources.php @@ -59,6 +59,7 @@ 'ext.flow.base', 'ext.flow.editor', 'jquery.spinner', + 'mediawiki.Title', ), 'messages' => array( 'flow-newtopic-start-placeholder', diff --git a/modules/discussion/ui.js b/modules/discussion/ui.js index 845d849..2682542 100644 --- a/modules/discussion/ui.js +++ b/modules/discussion/ui.js @@ -48,14 +48,21 @@ e.preventDefault(); var $formContainer, - $viewport = $('main, html'); + $viewport = $( 'main, html' ), + username = '', + defaultContent = ''; if ( $( this ).is( '.flow-topic-comments .flow-reply-link' ) ) { // We're in the topic title $formContainer = $( this ).closest( '.flow-topic-container' ); + } else { $formContainer = $( this ).closest( '.flow-post-container:not(.flow-post-max-depth)' ).find( '.flow-post-reply-container' ); $( this ).closest( '.flow-topic-container' ).find( '.flow-topic-reply-container' ).hide(); + + // Prefill reply textarea with link to User we're replying to + username = $( this ).closest( '.flow-post-container' ).data( 'creator-name' ); + defaultContent = '[[' + mw.Title.newFromText( username, 2 ).getPrefixedText() + ']]: '; } $formContainer @@ -73,11 +80,11 @@ $textarea .focus() .removeClass( 'flow-reply-box-closed' ); - mw.flow.editor.load( $textarea ); + mw.flow.editor.load( $textarea, defaultContent, 'wikitext' ); // Scroll to the form $viewport.animate( { - 'scrollTop' : $formContainer.offset().top - $viewport.height()/2 + 'scrollTop' : $formContainer.offset().top - $viewport.height() / 2 }, 500 ); } ); -- To view, visit https://gerrit.wikimedia.org/r/94906 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib6d6ac911d8959beaecacbea2b0ac04d826c 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] Remove unused SearchEntityArtefacts - change (mediawiki...Wikibase)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/94907 Change subject: Remove unused SearchEntityArtefacts .. Remove unused SearchEntityArtefacts Change-Id: I2fc2f4de5e9adb2422e19f1bfed3195f225135af --- D repo/maintenance/searchEntityArtefacts.php 1 file changed, 0 insertions(+), 115 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/07/94907/1 diff --git a/repo/maintenance/searchEntityArtefacts.php b/repo/maintenance/searchEntityArtefacts.php deleted file mode 100644 index 096f25c..000 --- a/repo/maintenance/searchEntityArtefacts.php +++ /dev/null @@ -1,115 +0,0 @@ -http://www.gnu.org/copyleft/gpl.html - * - * @file - * @ingroup Maintenance - * - * @licence GNU GPL v2+ - * @author Jens Ohlig - */ -$basePath = getenv( 'MW_INSTALL_PATH' ) !== false ? getenv( 'MW_INSTALL_PATH' ) : __DIR__ . '/../../../..'; -require_once $basePath . '/maintenance/Maintenance.php'; - -/** - * Query the database for entity artifacts - * - * @ingroup Maintenance - */ -class SearchEntityArtefacts extends Maintenance { - public function __construct() { - parent::__construct(); - $this->mDescription = ""; - } - - public function execute() { - if ( !defined( 'WB_VERSION' ) ) { - $this->output( "You need to have Wikibase enabled in order to use this maintenance script!\n\n" ); - exit; - } - - $force = $this->getOption( 'force', false ); - $pidfile = Utils::makePidFilename( 'WBsearchEntityArtefacts', wfWikiID() ); - - if ( !Utils::getPidLock( $pidfile, $force ) ) { - $this->output( date( 'H:i:s' ) . " already running, exiting\n" ); - exit( 5 ); - } - - $this->searchArtefacts(); - - $this->output( date( 'H:i:s' ) . " done, exiting\n" ); - unlink( $pidfile ); // delete lockfile on normal exit - } - - public function searchArtefacts() { - $dbw = wfGetDB( DB_MASTER ); - $begin = 0; - $entityContentFactory = WikibaseRepo::getDefaultInstance()->getEntityContentFactory(); - $pageArray = array(); - do { - $pages = $dbw->select( - array( 'page' ), - array( 'page_title' ), - array( 'page_namespace' => NamespaceUtils::getEntityNamespaces() ), - __METHOD__, - array( 'LIMIT' => 1000, 'OFFSET' => $begin ) - ); - - foreach ( $pages as $pageRow ) { - $id = EntityId::newFromPrefixedId( $pageRow->page_title ); - - if ( $id !== null ) { - $entityContent = $entityContentFactory->getFromId( $id, \Revision::RAW ); - $pageArray[] = $entityContent; - } - } - $begin += 1000; - } while ( $pages->numRows() === 1000 ); - $rows = $dbw->select( - array( 'wb_entity_per_page' ), - array( - 'entity_id' => 'epp_entity_id', - 'entity_type' => 'epp_entity_type', - ), - array(), - __METHOD__, - array(), - array() - ); - - $entities = array(); - foreach ( $rows as $row ) { - $entities[] = new EntityId( $row->entity_type, (int)$row->entity_id ); - } - foreach ( $entities as $entity ) { - $content = $entityContentFactory->getFromId( $entity, \Revision::RAW ); - if ( !in_array( $content, $pageArray ) ) { - print_r( $content ); - } - } - } -} - -$maintClass = 'Wikibase\SearchEntityArtefacts'; -require_once( RUN_MAINTENANCE_IF_MAIN ); -- To view, visit https://gerrit.wikimedia.org/r/94907 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2fc2f4de5e9adb2422e19f1bfed3195f225135af Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase 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] Use correct case for SpecialRecentChanges class in SpecialPa... - change (mediawiki/core)
IAlex has uploaded a new change for review. https://gerrit.wikimedia.org/r/94908 Change subject: Use correct case for SpecialRecentChanges class in SpecialPageFactory::$mList .. Use correct case for SpecialRecentChanges class in SpecialPageFactory::$mList Was giving the following message in the debug log: Class SpecialRecentchanges was loaded using incorrect case. Change-Id: I11c90eebeed135d03cb326d484f849cae21d87da --- M includes/SpecialPageFactory.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/08/94908/1 diff --git a/includes/SpecialPageFactory.php b/includes/SpecialPageFactory.php index 11edc8a..1ede0c1 100644 --- a/includes/SpecialPageFactory.php +++ b/includes/SpecialPageFactory.php @@ -108,7 +108,7 @@ 'Log' => 'SpecialLog', 'Watchlist' => 'SpecialWatchlist', 'Newpages' => 'SpecialNewpages', - 'Recentchanges' => 'SpecialRecentchanges', + 'Recentchanges' => 'SpecialRecentChanges', 'Recentchangeslinked' => 'SpecialRecentchangeslinked', 'Tags' => 'SpecialTags', -- To view, visit https://gerrit.wikimedia.org/r/94908 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I11c90eebeed135d03cb326d484f849cae21d87da Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: IAlex ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove references to /etc/puppet/software - change (operations/puppet)
Akosiaris has submitted this change and it was merged. Change subject: Remove references to /etc/puppet/software .. Remove references to /etc/puppet/software The software mount point is inexistant in all of our puppetservers and not having it causes it to be logged whenever the puppet process restarts for no reason. Change-Id: I0384bb0dcfae344e28b2b44a759431637f0cf3f5 --- M modules/puppet/templates/fileserver-self.conf.erb M modules/puppetmaster/templates/fileserver.conf.erb 2 files changed, 0 insertions(+), 13 deletions(-) Approvals: Akosiaris: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/puppet/templates/fileserver-self.conf.erb b/modules/puppet/templates/fileserver-self.conf.erb index 2120a0f..86a67ac 100644 --- a/modules/puppet/templates/fileserver-self.conf.erb +++ b/modules/puppet/templates/fileserver-self.conf.erb @@ -23,7 +23,3 @@ [volatile] path /var/lib/puppet/volatile allow <%= puppet_client_subnet %> - -[software] - path /etc/puppet/software - allow <%= puppet_client_subnet %> diff --git a/modules/puppetmaster/templates/fileserver.conf.erb b/modules/puppetmaster/templates/fileserver.conf.erb index 82f8c80..3dcf2ba 100644 --- a/modules/puppetmaster/templates/fileserver.conf.erb +++ b/modules/puppetmaster/templates/fileserver.conf.erb @@ -50,12 +50,3 @@ <% scope.lookupvar('puppetmaster::deny_from').each do |entry| -%> deny <%= entry %> <% end -%> - -[software] - path <%= scope.lookupvar('puppetmaster::config').fetch('softwaredir', "/etc/puppet/software") %> -<% scope.lookupvar('puppetmaster::allow_from').each do |entry| -%> - allow <%= entry %> -<% end -%> -<% scope.lookupvar('puppetmaster::deny_from').each do |entry| -%> - deny <%= entry %> -<% end -%> -- To view, visit https://gerrit.wikimedia.org/r/94779 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0384bb0dcfae344e28b2b44a759431637f0cf3f5 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Akosiaris Gerrit-Reviewer: Akosiaris Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Revert "Some documentation updates" - change (mediawiki...DataValues)
Henning Snater has submitted this change and it was merged. Change subject: Revert "Some documentation updates" .. Revert "Some documentation updates" This reverts commit f624c697f855d90f6b9f89181953b6cb38b93b7a.^ This broke all of the JS. Change-Id: I56aa3f8b38a9cc74069d3e6c188dac936a1afacc --- M ValueView/README D ValueView/resources/jquery.valueview/README M ValueView/resources/jquery.valueview/valueview.BifidExpert.js M ValueView/resources/jquery.valueview/valueview.Expert.js M ValueView/resources/jquery.valueview/valueview.ExpertFactory.js M ValueView/resources/jquery.valueview/valueview.experts/experts.js 6 files changed, 56 insertions(+), 129 deletions(-) Approvals: Henning Snater: Looks good to me, approved diff --git a/ValueView/README b/ValueView/README index 1268320..e26b9bd 100644 --- a/ValueView/README +++ b/ValueView/README @@ -1,23 +1,15 @@ -= MediaWiki Extension:ValueView = +# ValueView -''ValueView'' introduces the jQuery.ui.widget based front-end component ''jquery.valueview'' which allows to display and edit data values defined by the ''DataValues'' extension. +"ValueView" introduces the jQuery.ui.widget based frontend component jQuery.valueview which allows +to display and edit data values defined by the "DataValues" extension. When added as a dependency in +a resource loader definition, the following components introduced by this extension will be available: - -== Components == -When loading the ''jquery.valueview'' resource loader definition, the following components introduced by this extension will be available: - -* '''jquery.valueview:''' Widget for displaying and editing data values. -* '''mediaWiki.ext.valueView:''' Object representing the "ValueView" MediaWiki extension. When loaded, this will hook ''jQuery.valueview'' up to some of its basic formatters by overwriting jQuery.valueview.valueview.prototype.options.expertProvider - - -== jquery.valueview == -@see resources/jquery.valueview/README - - -=== Dependencies === -See ValueView.resources.mw.php for dependencies of this library. These dependencies are shipped as part of the MediaWiki extension while the core jQuery.valueview component can be found under resources/jQuery.valueview. - - -== Requirements == -* [[Extension:DataValues|DataValues]] extension must be installed -* [[Extension:DataTypes|DataTypes]] extension must be installed +* jQuery.valueview: Widget definition for displaying and editing data values. Each data value which + should be supported by the valueview widget has to be implemented as a jQuery.valueview.Expert. +* jQuery.fn.valueview: jQuery widget bridge to instantiate a jQuery.valueview widget in the DOM. +* mediaWiki.ext.valueView: Object representing the "ValueView" MediaWiki extension. +* Support of valueview for some basic data value types. These valueview experts can be found in + jQuery.valueview.experts.. +* other jQuery extensions required by this library which are not available in MediaWiki itself: + - jQuery.eachchange + - jQuery.inputAutoExpand \ No newline at end of file diff --git a/ValueView/resources/jquery.valueview/README b/ValueView/resources/jquery.valueview/README deleted file mode 100644 index d5d1972..000 --- a/ValueView/resources/jquery.valueview/README +++ /dev/null @@ -1,61 +0,0 @@ -= jquery.valueview = - -''jquery.valueview'' introduces a jQuery widget for displaying and editing data values, open for extension to support custom data value implementations. -It consists out of the following parts: - -; jQuery.valueview.valueview : Widget definition for displaying and editing data values. Can be instantiated via the widget's bridge jQuery.fn.valueview. -; jQuery.valueview.Expert : Base for strategies defining how to handle (edit/display) data values of a specific data value type or data values suitable for a certain data type. -; jQuery.valueview.ExpertFactory : Factory for creating jQuery.valueview.Expert instances. -; jQuery.valueview.ViewState : Link between experts and valueview widget in form of a facade that allows experts to observe certain aspects of a valueview. -; jQuery.valueview.experts : Expert definitions for some basic data value types. - - -== Usage == -When using the jQuery valueview widget for handling a data value of some sort, an ExpertFactory with knowledge about an Expert dedicated to the used data value type is required and can be set up as follows: - - -var dv = dataValues; -var vv = jQuery.valueview; -var experts = new vv.ExpertFactory(); - -// Consider this a data value using the "string" data value type internally. -var urlDataType = dataTypes.getDataType( 'url' ); - - -experts.registerExpert( dv.StringValue, vv.experts.StringValue ); - -console.log( - experts.getExpert( new dv.StringValue( 'foo' ) ) === experts.getExpert( urlDataType ) ); - // true because "url" data type's data value type is "string". - // The string expert will
[MediaWiki-commits] [Gerrit] Documentation updates with assignment consistency - change (mediawiki...DataValues)
jenkins-bot has submitted this change and it was merged. Change subject: Documentation updates with assignment consistency .. Documentation updates with assignment consistency This reverts commit bbc934d0bf9872509e1b30fc0461668d9e6edcf3 re-submitting the original change set with fixed code manipulations. Change-Id: I3d78eed4dac191e4ee775d2ce4f6fcc935e7d204 --- M ValueView/README A ValueView/resources/jquery.valueview/README M ValueView/resources/jquery.valueview/valueview.BifidExpert.js M ValueView/resources/jquery.valueview/valueview.Expert.js M ValueView/resources/jquery.valueview/valueview.ExpertFactory.js M ValueView/resources/jquery.valueview/valueview.experts/experts.js 6 files changed, 129 insertions(+), 56 deletions(-) Approvals: Tobias Gritschacher: Looks good to me, approved jenkins-bot: Verified diff --git a/ValueView/README b/ValueView/README index e26b9bd..1268320 100644 --- a/ValueView/README +++ b/ValueView/README @@ -1,15 +1,23 @@ -# ValueView += MediaWiki Extension:ValueView = -"ValueView" introduces the jQuery.ui.widget based frontend component jQuery.valueview which allows -to display and edit data values defined by the "DataValues" extension. When added as a dependency in -a resource loader definition, the following components introduced by this extension will be available: +''ValueView'' introduces the jQuery.ui.widget based front-end component ''jquery.valueview'' which allows to display and edit data values defined by the ''DataValues'' extension. -* jQuery.valueview: Widget definition for displaying and editing data values. Each data value which - should be supported by the valueview widget has to be implemented as a jQuery.valueview.Expert. -* jQuery.fn.valueview: jQuery widget bridge to instantiate a jQuery.valueview widget in the DOM. -* mediaWiki.ext.valueView: Object representing the "ValueView" MediaWiki extension. -* Support of valueview for some basic data value types. These valueview experts can be found in - jQuery.valueview.experts.. -* other jQuery extensions required by this library which are not available in MediaWiki itself: - - jQuery.eachchange - - jQuery.inputAutoExpand \ No newline at end of file + +== Components == +When loading the ''jquery.valueview'' resource loader definition, the following components introduced by this extension will be available: + +* '''jquery.valueview:''' Widget for displaying and editing data values. +* '''mediaWiki.ext.valueView:''' Object representing the "ValueView" MediaWiki extension. When loaded, this will hook ''jQuery.valueview'' up to some of its basic formatters by overwriting jQuery.valueview.valueview.prototype.options.expertProvider + + +== jquery.valueview == +@see resources/jquery.valueview/README + + +=== Dependencies === +See ValueView.resources.mw.php for dependencies of this library. These dependencies are shipped as part of the MediaWiki extension while the core jQuery.valueview component can be found under resources/jQuery.valueview. + + +== Requirements == +* [[Extension:DataValues|DataValues]] extension must be installed +* [[Extension:DataTypes|DataTypes]] extension must be installed diff --git a/ValueView/resources/jquery.valueview/README b/ValueView/resources/jquery.valueview/README new file mode 100644 index 000..d5d1972 --- /dev/null +++ b/ValueView/resources/jquery.valueview/README @@ -0,0 +1,61 @@ += jquery.valueview = + +''jquery.valueview'' introduces a jQuery widget for displaying and editing data values, open for extension to support custom data value implementations. +It consists out of the following parts: + +; jQuery.valueview.valueview : Widget definition for displaying and editing data values. Can be instantiated via the widget's bridge jQuery.fn.valueview. +; jQuery.valueview.Expert : Base for strategies defining how to handle (edit/display) data values of a specific data value type or data values suitable for a certain data type. +; jQuery.valueview.ExpertFactory : Factory for creating jQuery.valueview.Expert instances. +; jQuery.valueview.ViewState : Link between experts and valueview widget in form of a facade that allows experts to observe certain aspects of a valueview. +; jQuery.valueview.experts : Expert definitions for some basic data value types. + + +== Usage == +When using the jQuery valueview widget for handling a data value of some sort, an ExpertFactory with knowledge about an Expert dedicated to the used data value type is required and can be set up as follows: + + +var dv = dataValues; +var vv = jQuery.valueview; +var experts = new vv.ExpertFactory(); + +// Consider this a data value using the "string" data value type internally. +var urlDataType = dataTypes.getDataType( 'url' ); + + +experts.registerExpert( dv.StringValue, vv.experts.StringValue ); + +console.log( + experts.getExpert( new dv.StringValue( 'foo' ) ) === experts.getExpert( urlDataType ) ); + /
[MediaWiki-commits] [Gerrit] Remove broken and pointless test - change (mediawiki...WikibaseDataModel)
jenkins-bot has submitted this change and it was merged. Change subject: Remove broken and pointless test .. Remove broken and pointless test Change-Id: Ie1aed6b65803e63114cf9d6e26a28362287b65b6 --- M tests/phpunit/Claim/ClaimsTest.php 1 file changed, 1 insertion(+), 17 deletions(-) Approvals: Aude: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/phpunit/Claim/ClaimsTest.php b/tests/phpunit/Claim/ClaimsTest.php index b3bd0a3..292c973 100644 --- a/tests/phpunit/Claim/ClaimsTest.php +++ b/tests/phpunit/Claim/ClaimsTest.php @@ -62,23 +62,6 @@ } /** -* @dataProvider constructorProvider -*/ - public function testConstructor() { - $class = new ReflectionClass( 'Wikibase\Claims' ); - $class->newInstanceArgs( func_get_args() ); - } - - public function constructorProvider() { - return array( - array(), - array( null ), - array( array() ), - array( array( $this->makeClaim( new PropertyNoValueSnak( new PropertyId( "P15" ) ) ) ) ), - ); - } - - /** * @dataProvider constructorErrorProvider */ public function testConstructorError() { @@ -668,4 +651,5 @@ $claims->removeClaim( $claim1 ); $this->assertTrue( $claims->isEmpty() ); } + } -- To view, visit https://gerrit.wikimedia.org/r/94727 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie1aed6b65803e63114cf9d6e26a28362287b65b6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikibaseDataModel Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw Gerrit-Reviewer: Addshore Gerrit-Reviewer: Aude 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 tests for Property::getId - change (mediawiki...WikibaseDataModel)
jenkins-bot has submitted this change and it was merged. Change subject: Add tests for Property::getId .. Add tests for Property::getId Change-Id: Ia0e46ea01e98fd873e1744be894a0a6131e4466a --- M tests/phpunit/Entity/PropertyTest.php 1 file changed, 28 insertions(+), 8 deletions(-) Approvals: Aude: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/phpunit/Entity/PropertyTest.php b/tests/phpunit/Entity/PropertyTest.php index 0327a41..68760d2 100644 --- a/tests/phpunit/Entity/PropertyTest.php +++ b/tests/phpunit/Entity/PropertyTest.php @@ -2,19 +2,12 @@ namespace Wikibase\Test; -use Wikibase\Claim; -use Wikibase\Item; +use Wikibase\DataModel\Entity\EntityId; use Wikibase\Property; /** * @covers Wikibase\Property * @covers Wikibase\Entity - * - * @file - * @since 0.1 - * - * @ingroup WikibaseLib - * @ingroup Test * * @group Wikibase * @group WikibaseProperty @@ -74,4 +67,31 @@ } } + public function testWhenIdSetWithNumber_GetIdReturnsPropertyId() { + $property = Property::newFromType( 'string' ); + $property->setId( 42 ); + + $this->assertHasCorrectIdType( $property ); + } + + protected function assertHasCorrectIdType( Property $property ) { + $this->assertInstanceOf( 'Wikibase\DataModel\Entity\PropertyId', $property->getId() ); + } + + public function testWhenIdSetWithEntityId_GetIdReturnsPropertyId() { + $property = Property::newFromType( 'string' ); + $property->setId( new EntityId( 'property', 42 ) ); + + $this->assertHasCorrectIdType( $property ); + } + + public function testWhenIdSetViaLegacyFormat_GetIdReturnsPropertyId() { + $property = Property::newFromArray( array( + 'datatype' => 'string', + 'entity' => array( 'property', 42 ), + ) ); + + $this->assertHasCorrectIdType( $property ); + } + } \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/94747 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia0e46ea01e98fd873e1744be894a0a6131e4466a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikibaseDataModel Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw Gerrit-Reviewer: Addshore Gerrit-Reviewer: Aude Gerrit-Reviewer: Tobias Gritschacher Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] (bug 54324) sequence in Lua should start with 1 - change (mediawiki...Wikibase)
Jens Ohlig has uploaded a new change for review. https://gerrit.wikimedia.org/r/94909 Change subject: (bug 54324) sequence in Lua should start with 1 .. (bug 54324) sequence in Lua should start with 1 Change-Id: Ieeaca61a027e7461bb91477243c9bce76e221f97 --- M client/includes/WikibaseLibrary.php 1 file changed, 22 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/09/94909/1 diff --git a/client/includes/WikibaseLibrary.php b/client/includes/WikibaseLibrary.php index 91be67b..a2203b4 100644 --- a/client/includes/WikibaseLibrary.php +++ b/client/includes/WikibaseLibrary.php @@ -45,7 +45,26 @@ 'getGlobalSiteId' => array( $this, 'getGlobalSiteId' ) ); $this->getEngine()->registerInterface( dirname( __FILE__ ) . '/../resources/' . 'mw.wikibase.lua', $lib, array() ); - } +} + + /** + * Recursively renumber a serialized array in place, so it is indexed at 1, not 0. + * Just like Lua wants it. +* +* @since 0.5 +* +* @param array &$entityArr + */ +public function renumber( &$entityArr ) { +foreach( $entityArr as $key => &$value ) { +if ( is_array( $value ) ) { +if ( array_key_exists( 0, $value ) ) { +$value = array_combine( range( 1, count( $value ) ), array_values( $value ) ); +} +$this->renumber( $value ); +} +} +} /** * Get entity from prefixed ID (e.g. "Q23") and return it as serialized array. @@ -104,7 +123,8 @@ try { $entityArr = $serializer->getSerialized( $entityObject ); - return array( $entityArr ); +$this->renumber( $entityArr ); // Renumber the array +return array( $entityArr ); } catch ( \Exception $e ) { throw $this->getEngine()->newException( 'wikibase-error-serialize-error' ); } -- To view, visit https://gerrit.wikimedia.org/r/94909 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ieeaca61a027e7461bb91477243c9bce76e221f97 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Jens Ohlig ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove unused caching facilities in Wikibase Client - change (mediawiki...Wikibase)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/94910 Change subject: Remove unused caching facilities in Wikibase Client .. Remove unused caching facilities in Wikibase Client Change-Id: I037b9545d31165a064e470971e95e487a6ab6403 --- M client/WikibaseClient.classes.php M client/WikibaseClient.php D client/includes/CachedEntity.php M client/includes/ChangeHandler.php D client/includes/EntityCacheUpdater.php M client/includes/WikibaseClient.php D client/includes/store/EntityCache.php D client/includes/store/sql/CachingSqlStore.php M client/includes/store/sql/DirectSqlStore.php D client/includes/store/sql/EntityCacheTable.php D client/tests/phpunit/includes/CachedEntityTest.php D client/tests/phpunit/includes/EntityCacheUpdaterTest.php D client/tests/phpunit/includes/store/EntityCacheTableTest.php 13 files changed, 3 insertions(+), 1,134 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/10/94910/1 diff --git a/client/WikibaseClient.classes.php b/client/WikibaseClient.classes.php index ad0dae0..b922e4f 100644 --- a/client/WikibaseClient.classes.php +++ b/client/WikibaseClient.classes.php @@ -12,8 +12,6 @@ // Autoloading 'Wikibase\ClientHooks' => 'WikibaseClient.hooks.php', - 'Wikibase\CachedEntity' => 'includes/CachedEntity.php', - 'Wikibase\EntityCacheUpdater' => 'includes/EntityCacheUpdater.php', 'Wikibase\EntityIdPropertyUpdater' => 'includes/EntityIdPropertyUpdater.php', 'Wikibase\InterwikiSorter' => 'includes/InterwikiSorter.php', 'Wikibase\LangLinkHandler' => 'includes/LangLinkHandler.php', @@ -55,12 +53,9 @@ // includes/store 'Wikibase\ClientStore' => 'includes/store/ClientStore.php', - 'Wikibase\EntityCache' => 'includes/store/EntityCache.php', // includes/store/sql - 'Wikibase\CachingSqlStore' => 'includes/store/sql/CachingSqlStore.php', 'Wikibase\DirectSqlStore' => 'includes/store/sql/DirectSqlStore.php', - 'Wikibase\EntityCacheTable' => 'includes/store/sql/EntityCacheTable.php', // test 'Wikibase\Test\MockPageUpdater' => 'tests/phpunit/MockPageUpdater.php' diff --git a/client/WikibaseClient.php b/client/WikibaseClient.php index e40859e..83a7522 100644 --- a/client/WikibaseClient.php +++ b/client/WikibaseClient.php @@ -114,7 +114,6 @@ $wgResourceModules = array_merge( $wgResourceModules, include( "$dir/resources/Resources.php" ) ); $wgWBClientStores = array(); - $wgWBClientStores['CachingSqlStore'] = 'Wikibase\CachingSqlStore'; $wgWBClientStores['DirectSqlStore'] = 'Wikibase\DirectSqlStore'; $wgWBClientSettings = array_merge( diff --git a/client/includes/CachedEntity.php b/client/includes/CachedEntity.php deleted file mode 100644 index 610b1eb..000 --- a/client/includes/CachedEntity.php +++ /dev/null @@ -1,45 +0,0 @@ -http://www.gnu.org/copyleft/gpl.html - * - * @since 0.1 - * - * @file - * @ingroup WikibaseClient - * - * @licence GNU GPL v2+ - * @author Jeroen De Dauw < jeroended...@gmail.com > - * - * @todo: rename to MirroredEntity - */ -class CachedEntity extends ORMRow { - - /** -* @since 0.1 -* -* @return Entity -*/ - public function getEntity() { - return $this->getField( 'entity_data' ); - } - -} \ No newline at end of file diff --git a/client/includes/ChangeHandler.php b/client/includes/ChangeHandler.php index b177bc3..e840f2f 100644 --- a/client/includes/ChangeHandler.php +++ b/client/includes/ChangeHandler.php @@ -163,11 +163,7 @@ $this->injectRC = Settings::get( 'injectRecentChanges' ); - if ( Settings::get( 'repoDatabase' ) === null ) { - $this->mirrorUpdater = new EntityCacheUpdater( new EntityCacheTable() ); - } else { - $this->mirrorUpdater = null; - } + $this->mirrorUpdater = null; $this->dataTransclusionAllowed = Settings::get( 'allowDataTransclusion' ); $this->actionMask = 0x; //TODO: use changeHanderActions setting diff --git a/client/includes/EntityCacheUpdater.php b/client/includes/EntityCacheUpdater.php deleted file mode 100644 index 74d8d94..000 --- a/client/includes/EntityCacheUpdater.php +++ /dev/null @@ -1,86 +0,0 @@ -http://www.gnu.org/copyleft/gpl.html - * - * @since 0.1 - * - * @file - * @ingroup WikibaseClient - * - * @licence GNU GPL v2+ - * @author Jeroen De Dauw < jeroended...@gmail.com > - * - * @todo: rename to MirrorUpdater - */ -class EntityCacheUpdater { - - protected $entityCache; - - public function __construct( EntityCache $entityCache ) { -
[MediaWiki-commits] [Gerrit] Fix icon opacities - change (mediawiki...VisualEditor)
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/94911 Change subject: Fix icon opacities .. Fix icon opacities * parameter.svg had no opacity set * replace.svg had a document opacity of 80% in addition to the normal 75% Change-Id: I9c990fefaf4f5a7536b884b92523408146d7b2c7 --- M modules/syntaxhighlight/styles/images/replace.svg M modules/ve-mw/ui/styles/images/icons/parameter.svg 2 files changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/11/94911/1 diff --git a/modules/syntaxhighlight/styles/images/replace.svg b/modules/syntaxhighlight/styles/images/replace.svg index 72ecd7c..889d99f 100644 --- a/modules/syntaxhighlight/styles/images/replace.svg +++ b/modules/syntaxhighlight/styles/images/replace.svg @@ -1,7 +1,7 @@ - + http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd";> -http://www.w3.org/2000/svg"; xmlns:xlink="http://www.w3.org/1999/xlink"; -x="0px" y="0px" width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve"> +http://www.w3.org/2000/svg"; xmlns:xlink="http://www.w3.org/1999/xlink"; x="0px" y="0px" width="24px" +height="24px" viewBox="0 0 24 24" style="enable-background:new 0 0 24 24;" xml:space="preserve"> http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd";> http://www.w3.org/2000/svg"; xmlns:xlink="http://www.w3.org/1999/xlink"; x="0px" y="0px" width="24px" height="24px" viewBox="0 0 24 24" style="enable-background:new 0 0 24 24;" xml:space="preserve"> - + -- To view, visit https://gerrit.wikimedia.org/r/94911 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9c990fefaf4f5a7536b884b92523408146d7b2c7 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] Don't send additional notifications if user already received... - change (mediawiki...Flow)
Matthias Mullie has uploaded a new change for review. https://gerrit.wikimedia.org/r/94912 Change subject: Don't send additional notifications if user already received mention notification .. Don't send additional notifications if user already received mention notification Change-Id: Id7b9d6f18b163765f01b205ed21039d626757f8f --- M includes/Notifications/Controller.php 1 file changed, 7 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/12/94912/1 diff --git a/includes/Notifications/Controller.php b/includes/Notifications/Controller.php index 6891779..0be32fb 100644 --- a/includes/Notifications/Controller.php +++ b/includes/Notifications/Controller.php @@ -362,6 +362,13 @@ $ids[] = $topic; } $users += self::getCreatorsFromPostIDs( $ids ); + + // ignore mentioned users, they'll get another notification already + if ( isset( $extra['mentioned-users'] ) ) { + foreach ( $extra['mentioned-users'] as $uid => $user ) { + unset( $users[$uid] ); + } + } break; default: // Do nothing -- To view, visit https://gerrit.wikimedia.org/r/94912 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id7b9d6f18b163765f01b205ed21039d626757f8f 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