[MediaWiki-commits] [Gerrit] Source Selector: Refactor source selector - change (mediawiki...ContentTranslation)
jenkins-bot has submitted this change and it was merged. Change subject: Source Selector: Refactor source selector .. Source Selector: Refactor source selector * Updates error message logic for when: * Source page does not exist * An equivalent target page exists * An equivalent target page exists and the chosen target title is in use * The chosen target title is in use * Start translation button only enabled after entering a source title and choosing languages; disabled if source page does not exist * New labels and message strings: From, To, placeholders * Styling improvements to match design mocks * Start translation on enter key if necessary fields are filled in Change-Id: I6dbf7bfe79d5885e5507f3b3a22a488f8fbab6c0 --- M Resources.php M i18n/en.json M i18n/qqq.json M modules/source/ext.cx.source.selector.js M modules/source/styles/ext.cx.source.selector.less 5 files changed, 409 insertions(+), 32 deletions(-) Approvals: Santhosh: Looks good to me, approved jenkins-bot: Verified diff --git a/Resources.php b/Resources.php index 328a56d..61cad91 100644 --- a/Resources.php +++ b/Resources.php @@ -148,6 +148,12 @@ 'cx-sourceselector-dialog-button-start-translation', 'cx-sourceselector-dialog-source-language-label', 'cx-sourceselector-dialog-target-language-label', + 'cx-sourceselector-dialog-source-title-placeholder', + 'cx-sourceselector-dialog-target-title-placeholder', + 'cx-sourceselector-dialog-error-page-and-title-exist', + 'cx-sourceselector-dialog-error-page-exists', + 'cx-sourceselector-dialog-error-title-in-use', + 'cx-sourceselector-dialog-error-no-source-article', ), ) + $resourcePaths; diff --git a/i18n/en.json b/i18n/en.json index c34d025..7d0e982 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -79,8 +79,14 @@ cx-error-page-not-found: The \$1\ page could not be found in $2 Wikipedia, cx-sourceselector-dialog-new-translation: New translation, cx-sourceselector-dialog-button-start-translation: Start translation, - cx-sourceselector-dialog-source-language-label: Source:, - cx-sourceselector-dialog-target-language-label: Target:, + cx-sourceselector-dialog-source-language-label: From:, + cx-sourceselector-dialog-target-language-label: To:, + cx-sourceselector-dialog-source-title-placeholder: Search for source article, + cx-sourceselector-dialog-target-title-placeholder: Translation title (if different from source), + cx-sourceselector-dialog-error-page-and-title-exist: The page already exists in [$1 $2] and the title is used by [$3 a different article], + cx-sourceselector-dialog-error-page-exists: The page [$1 already exists] in $2, + cx-sourceselector-dialog-error-title-in-use: The title for the new page is [$1 already in use], + cx-sourceselector-dialog-error-no-source-article: The page to translate does not exist in $1, cx-mt-abuse-warning-title: Your translation contains $1% of unmodified machine-translated text, cx-mt-abuse-warning-text: Machine translations are provided only as a template. You need to make sure that the content is accurate and reads naturally in your language., cx-publish-captcha-title: Security question, diff --git a/i18n/qqq.json b/i18n/qqq.json index a3d413f..455086d 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -85,6 +85,12 @@ cx-sourceselector-dialog-button-start-translation: Button label for translation selector. Clicking on it starts a new translation in Special:ContentTranslation., cx-sourceselector-dialog-source-language-label: Label text for source language and title selector.\n{{Identical|Source}}, cx-sourceselector-dialog-target-language-label: Label text for target language and title selector.\n{{Identical|Target}}, + cx-sourceselector-dialog-source-title-placeholder: Placeholder for the source title input. Provides prompt to search for source title., + cx-sourceselector-dialog-target-title-placeholder: Placeholder for the target title input. Provides prompt to enter translation title (optional)., + cx-sourceselector-dialog-error-page-and-title-exist: Error that indicates there is page in the target wiki with the same title as the proposed source title and the target title is used elsewhere.\n\nParameters:\n* $1 - link to existing target article.\n* $2 - target language name.\n* $3 - link to article using proposed target title., + cx-sourceselector-dialog-error-page-exists: Error that indicates there is a page in the target wiki with the same title as the proposed source title.\n\nParameters:\n* $1 - link to existing target article.\n* $2 - target language name., + cx-sourceselector-dialog-error-title-in-use: Error that indicates there
[MediaWiki-commits] [Gerrit] Strip tags from preview text - change (mediawiki...BlueSpiceExtensions)
Robert Vogel has submitted this change and it was merged. Change subject: Strip tags from preview text .. Strip tags from preview text When showtext parameter is set a little preview of the page content is shown. It looks strange when tags are included in this preview. Change-Id: I07ad32bd6aeb1050f412af6fa9593afba9eba44e --- M SmartList/SmartList.class.php 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Robert Vogel: Verified; Looks good to me, approved diff --git a/SmartList/SmartList.class.php b/SmartList/SmartList.class.php index 1a447db..fb8e9bf 100644 --- a/SmartList/SmartList.class.php +++ b/SmartList/SmartList.class.php @@ -850,6 +850,7 @@ if ( $aArgs['showtext'] ( $iItems = $aArgs['numwithtext'] ) ) { $oSmartListListEntryView-setTemplate( '*[[:{NAMESPACE}:{TITLE}|{DISPLAYTITLE}]]{META}br/{TEXT}' . \n ); $sText = BsPageContentProvider::getInstance()-getContentFromTitle( $oTitle ); + $sText = Sanitizer::stripAllTags( $sText ); $sText = BsStringHelper::shorten( $sText, array( 'max-length' = $aArgs['trimtext'], 'position' = 'end' ) ); $sText = 'nowiki' . $sText . '/nowiki'; } else { -- To view, visit https://gerrit.wikimedia.org/r/172712 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I07ad32bd6aeb1050f412af6fa9593afba9eba44e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions Gerrit-Branch: master Gerrit-Owner: Smuggli mug...@hallowelt.biz Gerrit-Reviewer: Mglaser gla...@hallowelt.biz Gerrit-Reviewer: Pigpen reym...@hallowelt.biz Gerrit-Reviewer: Robert Vogel vo...@hallowelt.biz Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Don't fiddle with $wgLanguageCode in KkConverter - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Don't fiddle with $wgLanguageCode in KkConverter .. Don't fiddle with $wgLanguageCode in KkConverter This was causing problems with the setlang= and uselang= parameters in the URL being ignored on kkwiki. Bug: 64440 Change-Id: I4e2a20c707fd4b9b8a581a9d14e04b6cfc8b4b5c --- M RELEASE-NOTES-1.25 M languages/classes/LanguageKk.php 2 files changed, 3 insertions(+), 5 deletions(-) Approvals: Nikerabbit: Looks good to me, approved jenkins-bot: Verified diff --git a/RELEASE-NOTES-1.25 b/RELEASE-NOTES-1.25 index b649c2b..7ab8772 100644 --- a/RELEASE-NOTES-1.25 +++ b/RELEASE-NOTES-1.25 @@ -150,6 +150,9 @@ regularly. Below only new and removed languages are listed, as well as changes to languages because of Bugzilla reports. +* (bug 64440) Kazakh (kk) wikis should no longer forcefully reset the user's + interface language to kk where unexpected. + === Other changes in 1.25 === * The skin autodiscovery mechanism, deprecated in MediaWiki 1.23, has been removed. See https://www.mediawiki.org/wiki/Manual:Skin_autodiscovery for diff --git a/languages/classes/LanguageKk.php b/languages/classes/LanguageKk.php index 1a09818..39e62f5 100644 --- a/languages/classes/LanguageKk.php +++ b/languages/classes/LanguageKk.php @@ -279,27 +279,22 @@ * @return string */ function translate( $text, $toVariant ) { - global $wgLanguageCode; $text = parent::translate( $text, $toVariant ); switch ( $toVariant ) { case 'kk-cyrl': case 'kk-kz': $letters = KK_L_UC . KK_L_LC . 'ʺʹ#0123456789'; - $wgLanguageCode = 'kk'; break; case 'kk-latn': case 'kk-tr': $letters = KK_C_UC . KK_C_LC . '№0123456789'; - $wgLanguageCode = 'kk-Latn'; break; case 'kk-arab': case 'kk-cn': $letters = KK_C_UC . KK_C_LC . /*KK_L_UC.KK_L_LC.'ʺʹ'.*/',;\?%\*№0123456789'; - $wgLanguageCode = 'kk-Arab'; break; default: - $wgLanguageCode = 'kk'; return $text; } // disable conversion variables like $1, $2... -- To view, visit https://gerrit.wikimedia.org/r/172020 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4e2a20c707fd4b9b8a581a9d14e04b6cfc8b4b5c Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: TTO at.li...@live.com.au Gerrit-Reviewer: Greg Grossmeier g...@wikimedia.org Gerrit-Reviewer: Nemo bis federicol...@tiscali.it Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com Gerrit-Reviewer: Raimond Spekking raimond.spekk...@gmail.com Gerrit-Reviewer: Siebrand siebr...@kitano.nl Gerrit-Reviewer: TTO at.li...@live.com.au 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 missing method visibility in all Lib/Repo classes - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Add missing method visibility in all Lib/Repo classes .. Add missing method visibility in all Lib/Repo classes Change-Id: Icac00c94f43fbc202e39c613ae2b32e07894a91c --- M lib/includes/Validators/ValidatorErrorLocalizer.php M lib/includes/formatters/EscapingValueFormatter.php M lib/includes/formatters/MessageSnakFormatter.php M lib/includes/store/EntityContentDataCodec.php M repo/includes/Localizer/MessageParameterFormatter.php M repo/includes/Validators/LabelUniquenessValidator.php M repo/includes/Validators/SiteLinkUniquenessValidator.php M repo/includes/Validators/TermValidatorFactory.php M repo/tests/phpunit/includes/EditEntityTest.php M repo/tests/phpunit/includes/Interactors/ItemMergeInteractorTest.php M repo/tests/phpunit/includes/actions/ActionTestCase.php M repo/tests/phpunit/includes/api/EditPageTest.php M repo/tests/phpunit/includes/api/MergeItemsTest.php M repo/tests/phpunit/includes/content/EntityContentTest.php 14 files changed, 27 insertions(+), 25 deletions(-) Approvals: Adrian Lang: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/includes/Validators/ValidatorErrorLocalizer.php b/lib/includes/Validators/ValidatorErrorLocalizer.php index 2022321..daea4da 100644 --- a/lib/includes/Validators/ValidatorErrorLocalizer.php +++ b/lib/includes/Validators/ValidatorErrorLocalizer.php @@ -27,7 +27,7 @@ * parameters. MUST return wikitext. This is typically some kind of dispatcher. If not * provided, naive formatting will be used, which will fail on non-primitive parameters. */ - function __construct( ValueFormatter $paramFormatter = null ) { + public function __construct( ValueFormatter $paramFormatter = null ) { $this-paramFormatter = $paramFormatter; } diff --git a/lib/includes/formatters/EscapingValueFormatter.php b/lib/includes/formatters/EscapingValueFormatter.php index ae6c6d3..0ec35f7 100644 --- a/lib/includes/formatters/EscapingValueFormatter.php +++ b/lib/includes/formatters/EscapingValueFormatter.php @@ -24,7 +24,7 @@ */ private $escapeCallback; - function __construct( ValueFormatter $formatter, $escapeCallback ) { + public function __construct( ValueFormatter $formatter, $escapeCallback ) { if ( !is_callable( $escapeCallback ) ) { throw new InvalidArgumentException( '$escapeCallback must be callable' ); } diff --git a/lib/includes/formatters/MessageSnakFormatter.php b/lib/includes/formatters/MessageSnakFormatter.php index 3310509..2c8828d 100644 --- a/lib/includes/formatters/MessageSnakFormatter.php +++ b/lib/includes/formatters/MessageSnakFormatter.php @@ -38,7 +38,7 @@ * * @throws \InvalidArgumentException */ - function __construct( $snakType, Message $message, $format ) { + public function __construct( $snakType, Message $message, $format ) { if ( !is_string( $snakType ) ) { throw new InvalidArgumentException( '$snakType must be a string' ); } diff --git a/lib/includes/store/EntityContentDataCodec.php b/lib/includes/store/EntityContentDataCodec.php index 27e4c0d..e3487ce 100644 --- a/lib/includes/store/EntityContentDataCodec.php +++ b/lib/includes/store/EntityContentDataCodec.php @@ -51,7 +51,7 @@ * @param Serializer $entitySerializer * @param Deserializer $entityDeserializer */ - function __construct( + public function __construct( EntityIdParser $entityIdParser, Serializer $entitySerializer, Deserializer $entityDeserializer diff --git a/repo/includes/Localizer/MessageParameterFormatter.php b/repo/includes/Localizer/MessageParameterFormatter.php index 16528e1..7d54deb 100644 --- a/repo/includes/Localizer/MessageParameterFormatter.php +++ b/repo/includes/Localizer/MessageParameterFormatter.php @@ -53,7 +53,7 @@ * @param SiteStore $sites * @param Language $language */ - function __construct( + public function __construct( ValueFormatter $dataValueFormatter, EntityTitleLookup $entityTitleLookup, SiteStore $sites, @@ -152,4 +152,5 @@ return [$url $siteId:$page]; } + } diff --git a/repo/includes/Validators/LabelUniquenessValidator.php b/repo/includes/Validators/LabelUniquenessValidator.php index 09bb2c0..4d52c85 100644 --- a/repo/includes/Validators/LabelUniquenessValidator.php +++ b/repo/includes/Validators/LabelUniquenessValidator.php @@ -28,7 +28,7 @@ /** * @param LabelDescriptionDuplicateDetector $duplicateDetector */ - function __construct( LabelDescriptionDuplicateDetector $duplicateDetector ) { + public function __construct(
[MediaWiki-commits] [Gerrit] Fix bug in MonitoringProtocol._getConfigStringList - change (operations...pybal)
Ori.livneh has uploaded a new change for review. https://gerrit.wikimedia.org/r/172949 Change subject: Fix bug in MonitoringProtocol._getConfigStringList .. Fix bug in MonitoringProtocol._getConfigStringList This code is designed to verify that `val` is a list of strings: type(val) == list and reduce(lambda x, y: type(x) == str and y, val) But it doesn't work correctly if the last element isn't a string (try ['abc', 123], for example) or if the last element is the empty string. Change-Id: If4d639980c69c2ab0d46a7590f1e8c946f8fcdac --- M pybal/monitor.py 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/debs/pybal refs/changes/49/172949/1 diff --git a/pybal/monitor.py b/pybal/monitor.py index 57c11b3..7a03c63 100644 --- a/pybal/monitor.py +++ b/pybal/monitor.py @@ -98,9 +98,9 @@ val = eval(self.configuration[self.__name__.lower() + '.' + optionname], locals, globals) if type(val) == str: return val -elif type(val) == list and reduce(lambda x, y: type(x) == str and y, val): +elif type(val) == list and all(isinstance(x, str) for x in val): # Checked that each list member is a string return val else: raise ValueError, Value of %s is not a string or stringlist % optionname - \ No newline at end of file + -- To view, visit https://gerrit.wikimedia.org/r/172949 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If4d639980c69c2ab0d46a7590f1e8c946f8fcdac Gerrit-PatchSet: 1 Gerrit-Project: operations/debs/pybal Gerrit-Branch: master Gerrit-Owner: Ori.livneh o...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Throw StorageException in EntityTermLookup for non-existing ... - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Throw StorageException in EntityTermLookup for non-existing entities .. Throw StorageException in EntityTermLookup for non-existing entities consistent with the EntityRetrievingTermLookup and to allow different handling of the case of Entity does not exist vs. Entity exists but term not found. also updated documentation of LabelLookup. Change-Id: I63ccb80447a19396cde607308ef75d38b4234861 --- M lib/includes/store/EntityTermLookup.php M lib/includes/store/LabelLookup.php M lib/tests/phpunit/store/EntityTermLookupTest.php 3 files changed, 65 insertions(+), 56 deletions(-) Approvals: Adrian Lang: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/includes/store/EntityTermLookup.php b/lib/includes/store/EntityTermLookup.php index a8b282b..227f7e9 100644 --- a/lib/includes/store/EntityTermLookup.php +++ b/lib/includes/store/EntityTermLookup.php @@ -20,16 +20,24 @@ private $termIndex; /** -* @param TermIndex $termIndex +* @var EntityLookup */ - public function __construct( TermIndex $termIndex ) { + private $entityLookup; + + /** +* @param TermIndex $termIndex +* @param EntityLookup $entityLookup +*/ + public function __construct( TermIndex $termIndex, EntityLookup $entityLookup ) { $this-termIndex = $termIndex; + $this-entityLookup = $entityLookup; } /** * @param EntityId $entityId * @param string $languageCode * +* @throws StorageException if entity does not exist * @throws OutOfBoundsException * @return string */ @@ -41,6 +49,7 @@ /** * @param EntityId $entityId * +* @throws StorageException if entity does not exist * @return string[] */ public function getLabels( EntityId $entityId ) { @@ -51,6 +60,7 @@ * @param EntityId $entityId * @param string $languageCode * +* @throws StorageException if entity does not exist * @throws OutOfBoundsException * @return string */ @@ -62,6 +72,7 @@ /** * @param EntityId $entityId * +* @throws StorageException if entity does not exist * @return string[] */ public function getDescriptions( EntityId $entityId ) { @@ -72,26 +83,35 @@ * @param EntityId $entityId * @param string $termType * +* @throws StorageException if entity does not exist. * @return string[] */ private function getTermsOfType( EntityId $entityId, $termType ) { $wikibaseTerms = $this-termIndex-getTermsOfEntity( $entityId ); + + if ( $wikibaseTerms === array() ) { + if ( !$this-entityLookup-hasEntity( $entityId ) ) { + throw new StorageException( 'Entity not found for ' + . $entityId-getSerialization() ); + } + } + return $this-convertTermsToTermTypeArray( $wikibaseTerms, $termType ); } /** -* @param string[] $labels +* @param string[] $terms * @param string $languageCode * * @throws OutOfBoundsException * @return string */ - private function filterByLanguage( array $labels, $languageCode ) { - if ( array_key_exists( $languageCode, $labels ) ) { - return $labels[$languageCode]; + private function filterByLanguage( array $terms, $languageCode ) { + if ( array_key_exists( $languageCode, $terms ) ) { + return $terms[$languageCode]; } - throw new OutOfBoundsException( 'Label not found for ' . $languageCode ); + throw new OutOfBoundsException( 'Term not found for ' . $languageCode ); } /** diff --git a/lib/includes/store/LabelLookup.php b/lib/includes/store/LabelLookup.php index 2c9d947..c91f36c 100644 --- a/lib/includes/store/LabelLookup.php +++ b/lib/includes/store/LabelLookup.php @@ -17,6 +17,7 @@ * @param EntityId $entityId * * @throws OutOfBoundsException +* @throws StorageException for entity not found * @return string */ public function getLabel( EntityId $entityId ); diff --git a/lib/tests/phpunit/store/EntityTermLookupTest.php b/lib/tests/phpunit/store/EntityTermLookupTest.php index f1236b8..507a2dc 100644 --- a/lib/tests/phpunit/store/EntityTermLookupTest.php +++ b/lib/tests/phpunit/store/EntityTermLookupTest.php @@ -21,35 +21,33 @@ $this-assertEquals( 'New York City', $label ); } - public function
[MediaWiki-commits] [Gerrit] Move wikibase.utilities from lib to repo - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Move wikibase.utilities from lib to repo .. Move wikibase.utilities from lib to repo This is currently only used by jquery.wikibase.*, which will soon be moved to repo, too. Change-Id: Ibc9f7d56e07ed5016fc63712f052684247fe36fb --- M lib/resources/Resources.php M lib/tests/qunit/resources.php M repo/resources/Resources.php R repo/resources/utilities/resources.php R repo/resources/utilities/wikibase.utilities.ClaimGuidGenerator.js R repo/resources/utilities/wikibase.utilities.GuidGenerator.js R repo/resources/utilities/wikibase.utilities.js R repo/resources/utilities/wikibase.utilities.ui.css R repo/resources/utilities/wikibase.utilities.ui.js M repo/tests/qunit/resources.php R repo/tests/qunit/utilities/ClaimGuidGenerator.tests.js R repo/tests/qunit/utilities/GuidGenerator.tests.js A repo/tests/qunit/utilities/resources.php 13 files changed, 47 insertions(+), 22 deletions(-) Approvals: Jeroen De Dauw: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/resources/Resources.php b/lib/resources/Resources.php index 7846e87..458cfa8 100644 --- a/lib/resources/Resources.php +++ b/lib/resources/Resources.php @@ -174,8 +174,7 @@ include( __DIR__ . '/jquery.wikibase/resources.php' ), include( __DIR__ . '/parsers/resources.php' ), include( __DIR__ . '/wikibase.RepoApi/resources.php' ), - include( __DIR__ . '/wikibase.store/resources.php' ), - include( __DIR__ . '/wikibase.utilities/resources.php' ) + include( __DIR__ . '/wikibase.store/resources.php' ) ); if ( defined( 'ULS_VERSION' ) ) { diff --git a/lib/tests/qunit/resources.php b/lib/tests/qunit/resources.php index 1fda429..e5e524b 100644 --- a/lib/tests/qunit/resources.php +++ b/lib/tests/qunit/resources.php @@ -117,24 +117,6 @@ ), ), - 'wikibase.utilities.ClaimGuidGenerator.tests' = $moduleBase + array( - 'scripts' = array( - 'wikibase.utilities/wikibase.utilities.ClaimGuidGenerator.tests.js', - ), - 'dependencies' = array( - 'wikibase.utilities.ClaimGuidGenerator', - ), - ), - - 'wikibase.utilities.GuidGenerator.tests' = $moduleBase + array( - 'scripts' = array( - 'wikibase.utilities/wikibase.utilities.GuidGenerator.tests.js', - ), - 'dependencies' = array( - 'wikibase.utilities.GuidGenerator', - ), - ), - 'wikibase.Site.tests' = $moduleBase + array( 'scripts' = array( 'wikibase.Site.tests.js', diff --git a/repo/resources/Resources.php b/repo/resources/Resources.php index 2fc36a9..17476de 100644 --- a/repo/resources/Resources.php +++ b/repo/resources/Resources.php @@ -181,6 +181,9 @@ $modules['wikibase.special.entitiesWithout']['dependencies'][] = 'ext.uls.mediawiki'; } - return $modules; + return array_merge( + $modules, + include( __DIR__ . '/utilities/resources.php' ) + ); } ); // @codeCoverageIgnoreEnd diff --git a/lib/resources/wikibase.utilities/resources.php b/repo/resources/utilities/resources.php similarity index 100% rename from lib/resources/wikibase.utilities/resources.php rename to repo/resources/utilities/resources.php diff --git a/lib/resources/wikibase.utilities/wikibase.utilities.ClaimGuidGenerator.js b/repo/resources/utilities/wikibase.utilities.ClaimGuidGenerator.js similarity index 100% rename from lib/resources/wikibase.utilities/wikibase.utilities.ClaimGuidGenerator.js rename to repo/resources/utilities/wikibase.utilities.ClaimGuidGenerator.js diff --git a/lib/resources/wikibase.utilities/wikibase.utilities.GuidGenerator.js b/repo/resources/utilities/wikibase.utilities.GuidGenerator.js similarity index 100% rename from lib/resources/wikibase.utilities/wikibase.utilities.GuidGenerator.js rename to repo/resources/utilities/wikibase.utilities.GuidGenerator.js diff --git a/lib/resources/wikibase.utilities/wikibase.utilities.js b/repo/resources/utilities/wikibase.utilities.js similarity index 100% rename from lib/resources/wikibase.utilities/wikibase.utilities.js rename to repo/resources/utilities/wikibase.utilities.js diff --git a/lib/resources/wikibase.utilities/wikibase.utilities.ui.css b/repo/resources/utilities/wikibase.utilities.ui.css similarity index 100% rename from lib/resources/wikibase.utilities/wikibase.utilities.ui.css rename to repo/resources/utilities/wikibase.utilities.ui.css diff --git
[MediaWiki-commits] [Gerrit] Whitespace cleanup - change (mediawiki...ContentTranslation)
Nikerabbit has uploaded a new change for review. https://gerrit.wikimedia.org/r/172950 Change subject: Whitespace cleanup .. Whitespace cleanup Change-Id: Ic3eaf12659a502c68c0756519891c99f85a7b4fd --- M modules/source/styles/ext.cx.source.selector.less 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/50/172950/1 diff --git a/modules/source/styles/ext.cx.source.selector.less b/modules/source/styles/ext.cx.source.selector.less index a788989..27ff49d 100644 --- a/modules/source/styles/ext.cx.source.selector.less +++ b/modules/source/styles/ext.cx.source.selector.less @@ -76,7 +76,7 @@ } - .cx-sourceselector-dialog__messagebar { +.cx-sourceselector-dialog__messagebar { .mw-ui-item; .mw-ui-one-whole; padding: 10px; -- To view, visit https://gerrit.wikimedia.org/r/172950 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic3eaf12659a502c68c0756519891c99f85a7b4fd Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove _fetchItems - change (mediawiki...Wikibase)
Adrian Lang has uploaded a new change for review. https://gerrit.wikimedia.org/r/172952 Change subject: Remove _fetchItems .. Remove _fetchItems Change-Id: I69a7a282e2760d931677d3fefa1bc18bb9cba1e3 --- M lib/resources/jquery.wikibase/jquery.wikibase.badgeselector.js 1 file changed, 12 insertions(+), 41 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/52/172952/1 diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.badgeselector.js b/lib/resources/jquery.wikibase/jquery.wikibase.badgeselector.js index 7431b97..1829847 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.badgeselector.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.badgeselector.js @@ -193,10 +193,10 @@ this._addPlaceholderBadge( this.options.value[i] ); } - this._fetchItems( this.options.value ) + this.options.entityStore.getMultiple( this.options.value ) .done( function( items ) { - for( var i = 0; i self.options.value.length; i++ ) { - self._addBadge( items[ self.options.value[i] ] ); + for( var i = 0; i items.length; i++ ) { + self._addBadge( items[ i ].getContent() ); } deferred.resolve(); } ) @@ -273,16 +273,18 @@ var self = this, deferred = $.Deferred(); - this._fetchItems( $.map( this.options.badges, function( cssClasses, itemId ) { + this.options.entityStore.getMultiple( $.map( this.options.badges, function( cssClasses, itemId ) { return itemId; } ) ) .done( function( badges ) { $menu.empty(); - $.each( self.options.badges, function( itemId, cssClasses ) { - var item = badges[itemId], + $.each( badges, function( badge ) { + var item = badge.getContent(), term = item item.getFingerprint().getLabelFor( self.options.languageCode ), - label = term term.getText(); + label = term term.getText(), + itemId = item.getId(), + cssClasses = self.options.badges[ itemId ]; var $item = $( 'a/' ) .on( 'click.' + self.widgetName, function( event ) { @@ -318,37 +320,6 @@ } ); return deferred; - }, - - /** -* Fetches item data for a list of item ids. -* -* @param {string[]} itemIds -* @return {jQuery.Promise} -* No resolved parameters. -* No rejected parameters. -*/ - _fetchItems: function( itemIds ) { - var deferred = $.Deferred(); - - this.options.entityStore.getMultiple( itemIds ) - .done( function( items ) { - var item, - itemsObj = {}; - for( var i = 0; i items.length; ++i ) { - if( items[i] ) { - item = items[i].getContent(); - itemsObj[item.getId()] = item; - } - } - deferred.resolve( itemsObj ); - } ) - .fail( function() { - // TODO: Have entityStore return a proper RepoApiError object. - deferred.reject(); - } ); - - return deferred.promise(); }, /** @@ -479,10 +450,10 @@ // Since the widget might have been initialized on pre-existing DOM, badges need to be // fetched to ensure their data is available for resetting: - this._fetchItems( this.options.value ) + this.options.entityStore.getMultiple( this.options.value ) .done( function( items ) { - for( var i = 0; i self.options.value.length; i++ ) { - self._addBadge( items[ self.options.value[i] ] ); + for( var i = 0; i items.length; i++ ) { + self._addBadge( items[ i ].getContent() ); } self._trigger( 'afterstopediting', null, [dropValue] ); } ); -- To view, visit
[MediaWiki-commits] [Gerrit] Remove global state, the entity store caches results - change (mediawiki...Wikibase)
Adrian Lang has uploaded a new change for review. https://gerrit.wikimedia.org/r/172951 Change subject: Remove global state, the entity store caches results .. Remove global state, the entity store caches results Change-Id: Ia3f375872b7858aaf3fc9a3d18c5f6ea4c54e101 --- M lib/resources/jquery.wikibase/jquery.wikibase.badgeselector.js 1 file changed, 22 insertions(+), 23 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/51/172951/1 diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.badgeselector.js b/lib/resources/jquery.wikibase/jquery.wikibase.badgeselector.js index 1d06b7d..7431b97 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.badgeselector.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.badgeselector.js @@ -14,12 +14,6 @@ var $menu = null; /** - * Cache for all badges that may be assigned. - * @type {Object} Structure: {{string} item id: {wikibase.datamodel.Item}} - */ -var badges = {}; - -/** * Selector for toggling badges. * @since 0.5 * @extends jQuery.ui.TemplatedWidget @@ -200,9 +194,9 @@ } this._fetchItems( this.options.value ) - .done( function() { + .done( function( items ) { for( var i = 0; i self.options.value.length; i++ ) { - self._addBadge( self.options.value[i] ); + self._addBadge( items[ self.options.value[i] ] ); } deferred.resolve(); } ) @@ -282,7 +276,7 @@ this._fetchItems( $.map( this.options.badges, function( cssClasses, itemId ) { return itemId; } ) ) - .done( function() { + .done( function( badges ) { $menu.empty(); $.each( self.options.badges, function( itemId, cssClasses ) { @@ -339,14 +333,15 @@ this.options.entityStore.getMultiple( itemIds ) .done( function( items ) { - var item; + var item, + itemsObj = {}; for( var i = 0; i items.length; ++i ) { if( items[i] ) { item = items[i].getContent(); - badges[item.getId()] = item; + itemsObj[item.getId()] = item; } } - deferred.resolve(); + deferred.resolve( itemsObj ); } ) .fail( function() { // TODO: Have entityStore return a proper RepoApiError object. @@ -363,17 +358,21 @@ * @param {boolean} targetState */ _toggleBadge: function( badgeId, targetState ) { + var self = this; if( targetState ) { this.element.children( '.wb-badge-' + badgeId ).remove(); if( !this.element.children( '.wb-badge' ).length ) { this._addEmptyBadge(); } - } else { - this._addBadge( badgeId ); - this._getEmptyBadge().remove(); - } - this._trigger( 'change' ); + this._trigger( 'change' ); + } else { + this.options.entityStore.get( badgeId ).done( function( badgeItem ) { + self._addBadge( badgeItem.getContent() ); + self._getEmptyBadge().remove(); + self._trigger( 'change' ); + } ); + } }, /** @@ -396,11 +395,11 @@ }, /** -* @param {string} badgeId +* @param {wikibase.datamodel.Item} badgeItem */ - _addBadge: function( badgeId ) { - var badgeItem = badges[badgeId], - badgeLabelTerm = badgeItem badgeItem.getFingerprint().getLabelFor( + _addBadge: function( badgeItem ) { + var badgeId = badgeItem.getId(), + badgeLabelTerm = badgeItem.getFingerprint().getLabelFor( this.options.languageCode ), badgeLabel = badgeLabelTerm badgeLabelTerm.getText(), @@ -481,9 +480,9 @@ // Since the widget might have been initialized on pre-existing DOM, badges need to be // fetched to ensure their data is available for resetting: this._fetchItems( this.options.value ) - .done( function() { +
[MediaWiki-commits] [Gerrit] Only trigger JJB config diff when changed - change (integration/config)
jenkins-bot has submitted this change and it was merged. Change subject: Only trigger JJB config diff when changed .. Only trigger JJB config diff when changed integration-jjb-config-diff generates the Jenkins jobs twice which takes roughly 3 minutes. That is rather useless when there is no modifications to any of the JJB configuration files, for example a change to the Zuul configuration file. Skip the job unless the change touch files under jjb/. Change-Id: Id5a13a0bf4b7ebb9f822f6907a04a06bed146a9b --- M zuul/layout.yaml 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/zuul/layout.yaml b/zuul/layout.yaml index 0eec41e..65ce9bf 100644 --- a/zuul/layout.yaml +++ b/zuul/layout.yaml @@ -1567,6 +1567,7 @@ - name: 'integration-jjb-config-diff' success-message: 'Please carefully review the XML difference before deploying/merging your change.' failure-message: 'FAILURE while comparing your patchset with the current configuration version' +files: '^jjb/.*' - name: 'integration-zuul-layoutdiff' voting: false -- To view, visit https://gerrit.wikimedia.org/r/170323 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id5a13a0bf4b7ebb9f822f6907a04a06bed146a9b Gerrit-PatchSet: 3 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Hashar has...@free.fr Gerrit-Reviewer: Cmcmahon cmcma...@wikimedia.org Gerrit-Reviewer: Cscott canan...@wikimedia.org Gerrit-Reviewer: Hashar has...@free.fr Gerrit-Reviewer: Krinkle krinklem...@gmail.com Gerrit-Reviewer: Zfilipin zfili...@wikimedia.org 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 sure that the metadata panel isn't expanded by default ... - change (mediawiki...MultimediaViewer)
Gilles has uploaded a new change for review. https://gerrit.wikimedia.org/r/172953 Change subject: Make sure that the metadata panel isn't expanded by default in IE .. Make sure that the metadata panel isn't expanded by default in IE Also fixes issue where stale scroll state from previous image could be memorised and recalled when closing/reopening MV. Change-Id: Id29c7b28887afebcb742f49b4d7c20e1210e6c1d Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/996 --- M resources/mmv/mmv.lightboxinterface.js M resources/mmv/ui/mmv.ui.metadataPanel.js M resources/mmv/ui/mmv.ui.metadataPanelScroller.js 3 files changed, 13 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MultimediaViewer refs/changes/53/172953/1 diff --git a/resources/mmv/mmv.lightboxinterface.js b/resources/mmv/mmv.lightboxinterface.js index 2850671..0eac0bf 100644 --- a/resources/mmv/mmv.lightboxinterface.js +++ b/resources/mmv/mmv.lightboxinterface.js @@ -224,11 +224,12 @@ LIP.unattach = function () { mw.mmv.actionLogger.log( 'close' ); + // Has to happen first so that the scroller can freeze with visible elements + this.panel.unattach(); + this.$wrapper.detach(); this.currentlyAttached = false; - - this.panel.unattach(); this.canvas.unattach(); diff --git a/resources/mmv/ui/mmv.ui.metadataPanel.js b/resources/mmv/ui/mmv.ui.metadataPanel.js index 793a6ff..e845ca0 100644 --- a/resources/mmv/ui/mmv.ui.metadataPanel.js +++ b/resources/mmv/ui/mmv.ui.metadataPanel.js @@ -83,6 +83,8 @@ }; MPP.unattach = function() { + this.scroller.freezeHeight(); + this.$title.add( this.title.$ellipsis ).tipsy( 'hide' ); this.$authorAndSource.add( this.creditField.$ellipsis ).tipsy( 'hide' ); diff --git a/resources/mmv/ui/mmv.ui.metadataPanelScroller.js b/resources/mmv/ui/mmv.ui.metadataPanelScroller.js index 57fbf5b..8394021 100644 --- a/resources/mmv/ui/mmv.ui.metadataPanelScroller.js +++ b/resources/mmv/ui/mmv.ui.metadataPanelScroller.js @@ -114,6 +114,10 @@ * unfreezeHeight after the panel has been populeted with the new metadata. */ MPSP.freezeHeight = function () { + if ( !this.$container.is( ':visible' ) ) { + return; + } + var scrollTop = $.scrollTo().scrollTop(), scrollTopWhenOpen = this.getScrollTopWhenOpen(); @@ -122,6 +126,10 @@ }; MPSP.unfreezeHeight = function () { + if ( !this.$container.is( ':visible' ) ) { + return; + } + this.$container.css( 'min-height', '' ); if ( this.panelWasFullyOpen ) { $.scrollTo( this.getScrollTopWhenOpen() ); -- To view, visit https://gerrit.wikimedia.org/r/172953 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id29c7b28887afebcb742f49b4d7c20e1210e6c1d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MultimediaViewer Gerrit-Branch: master Gerrit-Owner: Gilles gdu...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Trigger analytics-aggregator-tox-py27 - change (integration/config)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/172954 Change subject: Trigger analytics-aggregator-tox-py27 .. Trigger analytics-aggregator-tox-py27 Requires upstream change https://gerrit.wikimedia.org/r/#/c/172195/ which introduces the 'py27' tox env. Change-Id: Ifd80ac7855a276b07e8b7aca36558a6bc5c4d716 --- M jjb/analytics.yaml M zuul/layout.yaml 2 files changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/54/172954/1 diff --git a/jjb/analytics.yaml b/jjb/analytics.yaml index aa90f0c..fc676f2 100644 --- a/jjb/analytics.yaml +++ b/jjb/analytics.yaml @@ -11,6 +11,7 @@ toxenv: - flake8 - flake8-bin + - py27 jobs: - '{name}-tox-{toxenv}' diff --git a/zuul/layout.yaml b/zuul/layout.yaml index 65ce9bf..851a812 100644 --- a/zuul/layout.yaml +++ b/zuul/layout.yaml @@ -1943,9 +1943,11 @@ check-voter: - analytics-aggregator-tox-flake8 - analytics-aggregator-tox-flake8-bin + - analytics-aggregator-tox-py27 gate-and-submit: - analytics-aggregator-tox-flake8 - analytics-aggregator-tox-flake8-bin + - analytics-aggregator-tox-py27 - name: analytics/geowiki check-voter: -- To view, visit https://gerrit.wikimedia.org/r/172954 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifd80ac7855a276b07e8b7aca36558a6bc5c4d716 Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Hashar has...@free.fr ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Move entityChangers from lib to repo - change (mediawiki...Wikibase)
Adrian Lang has uploaded a new change for review. https://gerrit.wikimedia.org/r/172955 Change subject: Move entityChangers from lib to repo .. Move entityChangers from lib to repo They are only used in repo. Change-Id: Ib2e7f5e5e82fb4404ef107627f69b7c0e148edb4 --- M lib/resources/Resources.php M lib/tests/qunit/resources.php M repo/resources/Resources.php R repo/resources/entityChangers/AliasesChanger.js R repo/resources/entityChangers/ClaimsChanger.js R repo/resources/entityChangers/DescriptionsChanger.js R repo/resources/entityChangers/EntityChangersFactory.js R repo/resources/entityChangers/LabelsChanger.js R repo/resources/entityChangers/ReferencesChanger.js R repo/resources/entityChangers/SiteLinksChanger.js R repo/resources/entityChangers/namespace.js R repo/resources/entityChangers/resources.php R repo/tests/qunit/entityChangers/AliasesChanger.tests.js R repo/tests/qunit/entityChangers/ClaimsChanger.tests.js R repo/tests/qunit/entityChangers/DescriptionsChanger.tests.js R repo/tests/qunit/entityChangers/LabelsChanger.tests.js R repo/tests/qunit/entityChangers/ReferencesChanger.tests.js R repo/tests/qunit/entityChangers/SiteLinksChanger.tests.js R repo/tests/qunit/entityChangers/resources.php M repo/tests/qunit/resources.php 20 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/55/172955/1 diff --git a/lib/resources/Resources.php b/lib/resources/Resources.php index 5466f36..5287ad1 100644 --- a/lib/resources/Resources.php +++ b/lib/resources/Resources.php @@ -169,7 +169,6 @@ $modules, include( __DIR__ . '/api/resources.php' ), include( __DIR__ . '/deprecated/resources.php' ), - include( __DIR__ . '/entityChangers/resources.php' ), include( __DIR__ . '/experts/resources.php' ), include( __DIR__ . '/formatters/resources.php' ), include( __DIR__ . '/jquery.wikibase/resources.php' ), diff --git a/lib/tests/qunit/resources.php b/lib/tests/qunit/resources.php index e5e524b..1d0c361 100644 --- a/lib/tests/qunit/resources.php +++ b/lib/tests/qunit/resources.php @@ -161,7 +161,6 @@ return array_merge( $modules, - include( __DIR__ . '/entityChangers/resources.php' ), include( __DIR__ . '/jquery.wikibase/resources.php' ) ); diff --git a/repo/resources/Resources.php b/repo/resources/Resources.php index f6bcb66..9f4f707 100644 --- a/repo/resources/Resources.php +++ b/repo/resources/Resources.php @@ -183,6 +183,7 @@ return array_merge( $modules, + include( __DIR__ . '/entityChangers/resources.php' ), include( __DIR__ . '/utilities/resources.php' ) ); } ); diff --git a/lib/resources/entityChangers/AliasesChanger.js b/repo/resources/entityChangers/AliasesChanger.js similarity index 100% rename from lib/resources/entityChangers/AliasesChanger.js rename to repo/resources/entityChangers/AliasesChanger.js diff --git a/lib/resources/entityChangers/ClaimsChanger.js b/repo/resources/entityChangers/ClaimsChanger.js similarity index 100% rename from lib/resources/entityChangers/ClaimsChanger.js rename to repo/resources/entityChangers/ClaimsChanger.js diff --git a/lib/resources/entityChangers/DescriptionsChanger.js b/repo/resources/entityChangers/DescriptionsChanger.js similarity index 100% rename from lib/resources/entityChangers/DescriptionsChanger.js rename to repo/resources/entityChangers/DescriptionsChanger.js diff --git a/lib/resources/entityChangers/EntityChangersFactory.js b/repo/resources/entityChangers/EntityChangersFactory.js similarity index 100% rename from lib/resources/entityChangers/EntityChangersFactory.js rename to repo/resources/entityChangers/EntityChangersFactory.js diff --git a/lib/resources/entityChangers/LabelsChanger.js b/repo/resources/entityChangers/LabelsChanger.js similarity index 100% rename from lib/resources/entityChangers/LabelsChanger.js rename to repo/resources/entityChangers/LabelsChanger.js diff --git a/lib/resources/entityChangers/ReferencesChanger.js b/repo/resources/entityChangers/ReferencesChanger.js similarity index 100% rename from lib/resources/entityChangers/ReferencesChanger.js rename to repo/resources/entityChangers/ReferencesChanger.js diff --git a/lib/resources/entityChangers/SiteLinksChanger.js b/repo/resources/entityChangers/SiteLinksChanger.js similarity index 100% rename from lib/resources/entityChangers/SiteLinksChanger.js rename to repo/resources/entityChangers/SiteLinksChanger.js diff --git a/lib/resources/entityChangers/namespace.js b/repo/resources/entityChangers/namespace.js similarity index 100% rename from lib/resources/entityChangers/namespace.js rename to repo/resources/entityChangers/namespace.js diff --git a/lib/resources/entityChangers/resources.php
[MediaWiki-commits] [Gerrit] Move RevisionStore and ValueViewBuilder to repo - change (mediawiki...Wikibase)
Adrian Lang has uploaded a new change for review. https://gerrit.wikimedia.org/r/172956 Change subject: Move RevisionStore and ValueViewBuilder to repo .. Move RevisionStore and ValueViewBuilder to repo They are only used in repo or jquery.wikibase, which will be moved to repo. Change-Id: If227e928e9ca8153083d85ada451f30da41fad55 --- M lib/resources/Resources.php M lib/tests/qunit/resources.php M repo/resources/Resources.php R repo/resources/wikibase.RevisionStore.js R repo/resources/wikibase.ValueViewBuilder.js M repo/tests/qunit/resources.php R repo/tests/qunit/wikibase.ValueViewBuilder.tests.js 7 files changed, 29 insertions(+), 29 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/56/172956/1 diff --git a/lib/resources/Resources.php b/lib/resources/Resources.php index 5287ad1..4198b19 100644 --- a/lib/resources/Resources.php +++ b/lib/resources/Resources.php @@ -80,15 +80,6 @@ ), ), - 'wikibase.RevisionStore' = $moduleTemplate + array( - 'scripts' = array( - 'wikibase.RevisionStore.js', - ), - 'dependencies' = array( - 'wikibase' - ) - ), - 'wikibase.Site' = $moduleTemplate + array( 'scripts' = array( 'wikibase.Site.js', @@ -108,16 +99,6 @@ 'mw.config.values.wbSiteDetails', 'wikibase', 'wikibase.Site', - ), - ), - - 'wikibase.ValueViewBuilder' = $moduleTemplate + array( - 'scripts' = array( - 'wikibase.ValueViewBuilder.js', - ), - 'dependencies' = array( - 'wikibase', - 'jquery.valueview', ), ), diff --git a/lib/tests/qunit/resources.php b/lib/tests/qunit/resources.php index 1d0c361..4bea8bb 100644 --- a/lib/tests/qunit/resources.php +++ b/lib/tests/qunit/resources.php @@ -147,16 +147,6 @@ ), ), - 'wikibase.ValueViewBuilder.tests' = $moduleBase + array( - 'scripts' = array( - 'wikibase.ValueViewBuilder.tests.js' - ), - 'dependencies' = array( - 'test.sinonjs', - 'wikibase.ValueViewBuilder' - ) - ), - ); return array_merge( diff --git a/repo/resources/Resources.php b/repo/resources/Resources.php index 9f4f707..216926b 100644 --- a/repo/resources/Resources.php +++ b/repo/resources/Resources.php @@ -50,11 +50,30 @@ ), ), + 'wikibase.RevisionStore' = $moduleTemplate + array( + 'scripts' = array( + 'wikibase.RevisionStore.js', + ), + 'dependencies' = array( + 'wikibase' + ) + ), + 'wikibase.templates' = $moduleTemplate + array( 'class' = 'Wikibase\TemplateModule', 'scripts' = 'templates.js', ), + 'wikibase.ValueViewBuilder' = $moduleTemplate + array( + 'scripts' = array( + 'wikibase.ValueViewBuilder.js', + ), + 'dependencies' = array( + 'wikibase', + 'jquery.valueview', + ), + ), + 'wikibase.ui.entityViewInit' = $moduleTemplate + array( 'scripts' = array( 'wikibase.ui.entityViewInit.js' // should probably be adjusted for more modularity diff --git a/lib/resources/wikibase.RevisionStore.js b/repo/resources/wikibase.RevisionStore.js similarity index 100% rename from lib/resources/wikibase.RevisionStore.js rename to repo/resources/wikibase.RevisionStore.js diff --git a/lib/resources/wikibase.ValueViewBuilder.js b/repo/resources/wikibase.ValueViewBuilder.js similarity index 100% rename from lib/resources/wikibase.ValueViewBuilder.js rename to repo/resources/wikibase.ValueViewBuilder.js diff --git a/repo/tests/qunit/resources.php b/repo/tests/qunit/resources.php index 56b86b4..0d2502d 100644 --- a/repo/tests/qunit/resources.php +++ b/repo/tests/qunit/resources.php @@ -36,6 +36,16 @@ ), ), +
[MediaWiki-commits] [Gerrit] Tests for BannerAllocationCalculator - change (mediawiki...CentralNotice)
Awight has uploaded a new change for review. https://gerrit.wikimedia.org/r/172958 Change subject: Tests for BannerAllocationCalculator .. Tests for BannerAllocationCalculator * Introduces expected allocations for test fixtures. * Lenient float comparison. Change-Id: Ifcc1ae015ec7f0d5789f7cd3a0918d4907a56b1e --- M CentralNotice.hooks.php A tests/BannerAllocationCalculatorTest.php M tests/CentralNoticeTestFixtures.php M tests/ComparisonUtil.php 4 files changed, 167 insertions(+), 24 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralNotice refs/changes/58/172958/1 diff --git a/CentralNotice.hooks.php b/CentralNotice.hooks.php index 919dc13..d5c5ecc 100644 --- a/CentralNotice.hooks.php +++ b/CentralNotice.hooks.php @@ -362,6 +362,7 @@ $files[ ] = __DIR__ . '/tests/AllocationsTest.php'; $files[ ] = __DIR__ . '/tests/ApiAllocationsTest.php'; $files[ ] = __DIR__ . '/tests/CentralNoticeTest.php'; + $files[ ] = __DIR__ . '/tests/BannerAllocationCalculatorTest.php'; $files[ ] = __DIR__ . '/tests/BannerChoiceDataProviderTest.php'; $files[ ] = __DIR__ . '/tests/BannerTest.php'; return true; diff --git a/tests/BannerAllocationCalculatorTest.php b/tests/BannerAllocationCalculatorTest.php new file mode 100644 index 000..2e3b298 --- /dev/null +++ b/tests/BannerAllocationCalculatorTest.php @@ -0,0 +1,48 @@ +?php + +/** + * @group CentralNotice + * @group medium + * @group Database + */ +class BannerAllocationCalculatorTest extends MediaWikiTestCase { + /** @var CentralNoticeTestFixtures */ + protected $cnFixtures; + + protected function setUp() { + parent::setUp(); + + $this-cnFixtures = new CentralNoticeTestFixtures(); + } + + protected function tearDown() { + $this-cnFixtures-removeFixtures(); + parent::tearDown(); + } + + /** +* @dataProvider CentralNoticeTestFixtures::allocationsData +*/ + public function testAllocations( $fixtures, $expectedChoices, $expectedAllocations ) { + $this-cnFixtures-addFixtures( $fixtures ); + + $allocationsProvider = new BannerChoiceDataProvider( + CentralNoticeTestFixtures::getDefaultProject(), + CentralNoticeTestFixtures::getDefaultLanguage(), + BannerChoiceDataProvider::ANONYMOUS + ); + $choices = $allocationsProvider-getChoicesForCountry( + CentralNoticeTestFixtures::getDefaultCountry() + ); + $banners = BannerAllocationCalculator::filterAndTransformBanners( + $choices, + CentralNoticeTestFixtures::getDefaultDevice(), + 0 + ); + $allocations = BannerAllocationCalculator::calculateAllocations( $banners ); + + $this-assertTrue( + ComparisonUtil::assertEqualAllocations( $allocations, $expectedAllocations ) + ); + } +} diff --git a/tests/CentralNoticeTestFixtures.php b/tests/CentralNoticeTestFixtures.php index da43cba..6e64eaf 100644 --- a/tests/CentralNoticeTestFixtures.php +++ b/tests/CentralNoticeTestFixtures.php @@ -7,7 +7,7 @@ // Use exactly the api defaults where available static public $defaultCampaign; static public $defaultBanner; - + function __construct() { $this-user = User::newFromName( 'UTSysop' ); @@ -15,11 +15,11 @@ 'enabled' = 1, // inclusive comparison is used, so this does not cause a race condition. 'startTs' = wfTimestamp( TS_MW ), - 'projects' = array( ApiCentralNoticeAllocations::DEFAULT_PROJECT ), - 'project_languages' = array( ApiCentralNoticeAllocations::DEFAULT_LANGUAGE ), + 'projects' = array( CentralNoticeTestFixtures::getDefaultProject() ), + 'project_languages' = array( CentralNoticeTestFixtures::getDefaultLanguage() ), 'preferred' = CentralNotice::NORMAL_PRIORITY, 'geotargetted' = 0, - 'geo_countries' = array( ApiCentralNoticeAllocations::DEFAULT_COUNTRY ), + 'geo_countries' = array( CentralNoticeTestFixtures::getDefaultCountry() ), 'throttle' = 100, 'banners' = array(), ); @@ -35,8 +35,27 @@ ); } + static function getDefaultLanguage() { + return ApiCentralNoticeAllocations::DEFAULT_LANGUAGE; + } + + static function getDefaultProject() { + return ApiCentralNoticeAllocations::DEFAULT_PROJECT; + } + +
[MediaWiki-commits] [Gerrit] minor fixups to WIP - change (mediawiki...CentralNotice)
Awight has uploaded a new change for review. https://gerrit.wikimedia.org/r/172957 Change subject: minor fixups to WIP .. minor fixups to WIP Change-Id: I74a4e50256b955de2ec13a7a6e7dbce375ea4c04 --- M includes/BannerAllocationCalculator.php M includes/BannerChoiceDataProvider.php 2 files changed, 7 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralNotice refs/changes/57/172957/1 diff --git a/includes/BannerAllocationCalculator.php b/includes/BannerAllocationCalculator.php index e130459..2ff8edd 100644 --- a/includes/BannerAllocationCalculator.php +++ b/includes/BannerAllocationCalculator.php @@ -88,6 +88,8 @@ $banner['allocation'] = $banner['max_allocation'] * $scaling; } } + + return $banners; } /** @@ -101,7 +103,7 @@ * @return array banners with properties suitable for * @see BannerAllocationCalculator::calculateAllocations */ - function filterAndTransformBanners( $campaigns, $device, $bucket ) { + static function filterAndTransformBanners( $campaigns, $device, $bucket ) { $banners = array(); foreach( $campaigns as $campaign ) { foreach ( $campaign['banners'] as $banner ) { diff --git a/includes/BannerChoiceDataProvider.php b/includes/BannerChoiceDataProvider.php index 65553a0..5c84f46 100644 --- a/includes/BannerChoiceDataProvider.php +++ b/includes/BannerChoiceDataProvider.php @@ -310,11 +310,13 @@ $choices = $this-getChoices(); // Remove campaigns that are geotargetted but not to selected country + $out = array(); foreach( $choices as $index = $campaign ) { if ( $campaign['geotargetted'] !in_array( $country, $campaign['countries'] ) ) { - unset( $choices[$index] ); + continue; } + $out[$index] = $campaign; } - return $choices; + return $out; } } -- To view, visit https://gerrit.wikimedia.org/r/172957 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I74a4e50256b955de2ec13a7a6e7dbce375ea4c04 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CentralNotice Gerrit-Branch: master Gerrit-Owner: Awight awi...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Move store from lib to repo - change (mediawiki...Wikibase)
Adrian Lang has uploaded a new change for review. https://gerrit.wikimedia.org/r/172959 Change subject: Move store from lib to repo .. Move store from lib to repo It's only used by repo and jquery.wikibase tests, which will be moved to repo. Change-Id: I770ae34e62feab42b047ee12bdd372045cf464d8 --- M lib/resources/Resources.php M lib/tests/qunit/resources.php M repo/resources/Resources.php R repo/resources/store/resources.php R repo/resources/store/store.ApiEntityStore.js R repo/resources/store/store.CombiningEntityStore.js R repo/resources/store/store.EntityStore.js R repo/resources/store/store.FetchedContent.js R repo/resources/store/store.FetchedContentUnserializer.js R repo/resources/store/store.MwConfigEntityStore.js R repo/resources/store/store.js M repo/tests/qunit/resources.php A repo/tests/qunit/store/resources.php R repo/tests/qunit/store/store.CombiningEntityStore.tests.js R repo/tests/qunit/store/store.MwConfigEntityStore.tests.js 15 files changed, 46 insertions(+), 21 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/59/172959/1 diff --git a/lib/resources/Resources.php b/lib/resources/Resources.php index 4198b19..72d8d32 100644 --- a/lib/resources/Resources.php +++ b/lib/resources/Resources.php @@ -154,8 +154,7 @@ include( __DIR__ . '/formatters/resources.php' ), include( __DIR__ . '/jquery.wikibase/resources.php' ), include( __DIR__ . '/parsers/resources.php' ), - include( __DIR__ . '/wikibase.RepoApi/resources.php' ), - include( __DIR__ . '/wikibase.store/resources.php' ) + include( __DIR__ . '/wikibase.RepoApi/resources.php' ) ); if ( defined( 'ULS_VERSION' ) ) { diff --git a/lib/tests/qunit/resources.php b/lib/tests/qunit/resources.php index 4bea8bb..8d6662d 100644 --- a/lib/tests/qunit/resources.php +++ b/lib/tests/qunit/resources.php @@ -98,25 +98,6 @@ ), ), - 'wikibase.store.CombiningEntityStore.tests' = $moduleBase + array( - 'scripts' = array( - 'wikibase.store/store.CombiningEntityStore.tests.js', - ), - 'dependencies' = array( - 'wikibase.store.CombiningEntityStore', - 'wikibase.store.EntityStore', - ), - ), - - 'wikibase.store.MwConfigEntityStore.tests' = $moduleBase + array( - 'scripts' = array( - 'wikibase.store/store.MwConfigEntityStore.tests.js', - ), - 'dependencies' = array( - 'wikibase.store.MwConfigEntityStore', - ), - ), - 'wikibase.Site.tests' = $moduleBase + array( 'scripts' = array( 'wikibase.Site.tests.js', diff --git a/repo/resources/Resources.php b/repo/resources/Resources.php index 216926b..7895024 100644 --- a/repo/resources/Resources.php +++ b/repo/resources/Resources.php @@ -203,6 +203,7 @@ return array_merge( $modules, include( __DIR__ . '/entityChangers/resources.php' ), + include( __DIR__ . '/store/resources.php' ), include( __DIR__ . '/utilities/resources.php' ) ); } ); diff --git a/lib/resources/wikibase.store/resources.php b/repo/resources/store/resources.php similarity index 100% rename from lib/resources/wikibase.store/resources.php rename to repo/resources/store/resources.php diff --git a/lib/resources/wikibase.store/store.ApiEntityStore.js b/repo/resources/store/store.ApiEntityStore.js similarity index 100% rename from lib/resources/wikibase.store/store.ApiEntityStore.js rename to repo/resources/store/store.ApiEntityStore.js diff --git a/lib/resources/wikibase.store/store.CombiningEntityStore.js b/repo/resources/store/store.CombiningEntityStore.js similarity index 100% rename from lib/resources/wikibase.store/store.CombiningEntityStore.js rename to repo/resources/store/store.CombiningEntityStore.js diff --git a/lib/resources/wikibase.store/store.EntityStore.js b/repo/resources/store/store.EntityStore.js similarity index 100% rename from lib/resources/wikibase.store/store.EntityStore.js rename to repo/resources/store/store.EntityStore.js diff --git a/lib/resources/wikibase.store/store.FetchedContent.js b/repo/resources/store/store.FetchedContent.js similarity index 100% rename from lib/resources/wikibase.store/store.FetchedContent.js rename to repo/resources/store/store.FetchedContent.js diff --git a/lib/resources/wikibase.store/store.FetchedContentUnserializer.js b/repo/resources/store/store.FetchedContentUnserializer.js similarity index 100%
[MediaWiki-commits] [Gerrit] Revert Enable JPG thumbnail chaining on all wikis except co... - change (operations/mediawiki-config)
Gilles has uploaded a new change for review. https://gerrit.wikimedia.org/r/172960 Change subject: Revert Enable JPG thumbnail chaining on all wikis except commons .. Revert Enable JPG thumbnail chaining on all wikis except commons This reverts commit bc227c0fd130832e362491a6f4cba9da24b74f90. Change-Id: I129ca70eb2a5e4c644779b4ecc0a20f6d37868e9 --- M wmf-config/InitialiseSettings.php 1 file changed, 0 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/60/172960/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 37615ed..743a0a0 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -14277,16 +14277,6 @@ 'default' = 'upload.svc.eqiad.wmnet', ), -// Thumbnail chaining -'wgThumbnailBuckets' = array( - 'default' = array( 128, 256, 512, 1024, 2048, 4096 ), - 'commonswiki' = array(), -), - -'wgThumbnailMinimumBucketDistance' = array( - 'default' = 32, -), - ); -- To view, visit https://gerrit.wikimedia.org/r/172960 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I129ca70eb2a5e4c644779b4ecc0a20f6d37868e9 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Gilles gdu...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove dead styles and dead template - change (mediawiki...Wikibase)
Adrian Lang has uploaded a new change for review. https://gerrit.wikimedia.org/r/172961 Change subject: Remove dead styles and dead template .. Remove dead styles and dead template Change-Id: I14a85ad67c50ed2ba4ebd48a7a12ed9f7bc4490e --- M lib/resources/wikibase.css M repo/resources/templates.php 2 files changed, 0 insertions(+), 36 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/61/172961/1 diff --git a/lib/resources/wikibase.css b/lib/resources/wikibase.css index b184c07..4ec7ed2 100644 --- a/lib/resources/wikibase.css +++ b/lib/resources/wikibase.css @@ -82,31 +82,12 @@ font-family: inherit; } -/* container for the value itself */ -.wb-value, -.wb-gridhelper { - word-wrap: break-word; /* force word wrap for that toolbar will not overlay very long values */ - display: block; /* need to force block explicitly to achieve 100% width */ -} - /* horizontal rule below the description */ .wb-hr { float: left; width: 100%; height: 1px; margin: 0; -} - -.wb-widget-container { - float: left; -} - -/* basically, a row in the grid layout */ -.wb-value-row { - float: left; /* make row to take the dimensions of its containing blocks avoiding clipping */ - font-size: 100%; /* font size needs to be set since it influences positioning */ - position: relative; /* make absolute positioned toolbar align to the right edge */ - width: 100%; } .wikibase-entityview .wikibase-toolbar-container { @@ -119,15 +100,6 @@ .wikibase-entityview .wikibase-toolbar-container .wikibase-toolbar-container { position: static; width: auto; -} - -.wb-value-container { - margin-left: 0; - display: block; /* need to force block explicitly to achieve 100% width */ -} - -.wb-value { - display: inline; } .wb-empty { diff --git a/repo/resources/templates.php b/repo/resources/templates.php index 5356bf0..81201e0 100644 --- a/repo/resources/templates.php +++ b/repo/resources/templates.php @@ -186,14 +186,6 @@ /div HTML; - $templates['wb-property'] = -HTML -span class=wb-property-container-value wb-value-container - span class=wb-value $1 dir=auto$2/span - $3 -/span -HTML; - $templates['wikibase-aliasesview'] = HTML div class=wikibase-aliasesview $1 -- To view, visit https://gerrit.wikimedia.org/r/172961 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I14a85ad67c50ed2ba4ebd48a7a12ed9f7bc4490e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Adrian Lang adrian.l...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Replace datalist with jquery.suggest for source article sele... - change (mediawiki...ContentTranslation)
Nikerabbit has uploaded a new change for review. https://gerrit.wikimedia.org/r/172962 Change subject: Replace datalist with jquery.suggest for source article selection .. Replace datalist with jquery.suggest for source article selection Change-Id: Ida9e110765537bef7f13d5b888c89f5efe972497 --- M Resources.php M modules/source/ext.cx.source.selector.js 2 files changed, 12 insertions(+), 17 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/62/172962/1 diff --git a/Resources.php b/Resources.php index 61cad91..cf831e4 100644 --- a/Resources.php +++ b/Resources.php @@ -140,6 +140,7 @@ ), 'dependencies' = array( 'ext.cx.sitemapper', + 'jquery.suggestions', 'jquery.throttle-debounce', 'jquery.uls.data', ), diff --git a/modules/source/ext.cx.source.selector.js b/modules/source/ext.cx.source.selector.js index a561f21..702ff31 100644 --- a/modules/source/ext.cx.source.selector.js +++ b/modules/source/ext.cx.source.selector.js @@ -21,14 +21,13 @@ // @todo Refactor this.siteMapper = mw.cx.siteMapper; - this.$dialog = null; this.languagePairs = null; this.sourceLanguages = []; this.targetLanguages = []; + + this.$dialog = null; this.$sourceLanguage = null; this.$targetLanguage = null; - this.sourceLanguage = null; - this.targetLanguage = null; this.$messageBar = null; this.$sourceTitleInput = null; this.$targetTitleInput = null; @@ -170,17 +169,13 @@ * Handles searching for titles based on source title input */ CXSourceSelector.prototype.searchHandler = function () { - var selector = this; + var $input = this.$sourceTitleInput; - this.sourceLanguage = this.$sourceLanguage.val(); - this.searchTitles( this.sourceLanguage, this.$sourceTitleInput.val() ).done( function ( response ) { - var i, len, suggestions = response[ 1 ]; - selector.$titleList.empty(); - if ( suggestions.length ) { - for ( i = 0, len = suggestions.length; i len; i++ ) { - selector.$titleList.append( $( 'option' ).attr( 'value', suggestions[ i ] ) ); - } - } + this.searchTitles( + this.$sourceLanguage.val(), + $input.val() + ).done( function ( response ) { + $input.suggestions( 'suggestions', response[ 1 ] ); } ); }; @@ -590,7 +585,6 @@ placeholder: mw.msg( 'cx-sourceselector-dialog-target-title-placeholder' ) } ); - this.$titleList = $( 'datalist' ).prop( 'id', 'searchresults' ); $sourceInputs = $( 'div' ) .addClass( 'cx-sourceselector-dialog__source-inputs' ) .append( $sourceLanguageLabel, @@ -618,15 +612,15 @@ .prop( 'disabled', true ) .click( $.proxy( this.startPageInCX, this ) ); - $actions = $( 'div' ).addClass( 'cx-sourceselector-dialog__actions' ) + $actions = $( 'div' ) + .addClass( 'cx-sourceselector-dialog__actions' ) .append( this.$translateFromButton ); this.$dialog.append( $heading, $sourceInputs, $targetInputs, this.$messageBar, - $actions, - this.$titleList + $actions ); if ( localStorage localStorage.cxSourceLanguage ) { -- To view, visit https://gerrit.wikimedia.org/r/172962 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ida9e110765537bef7f13d5b888c89f5efe972497 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove styles dependency from resource loader module wikibase - change (mediawiki...Wikibase)
Adrian Lang has uploaded a new change for review. https://gerrit.wikimedia.org/r/172963 Change subject: Remove styles dependency from resource loader module wikibase .. Remove styles dependency from resource loader module wikibase client does not need these styles, repo already takes care of loading them. Change-Id: Idfb2ffe47755735b704e7766ebe76550bd63fd31 --- M lib/resources/Resources.php 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/63/172963/1 diff --git a/lib/resources/Resources.php b/lib/resources/Resources.php index 5466f36..304195b 100644 --- a/lib/resources/Resources.php +++ b/lib/resources/Resources.php @@ -72,7 +72,6 @@ 'wikibase.js', ), 'dependencies' = array( - 'wikibase.common', ), 'messages' = array( 'special-createitem', -- To view, visit https://gerrit.wikimedia.org/r/172963 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idfb2ffe47755735b704e7766ebe76550bd63fd31 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Adrian Lang adrian.l...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update python shebang to use /usr/bin/env - change (mediawiki...release)
jenkins-bot has submitted this change and it was merged. Change subject: Update python shebang to use /usr/bin/env .. Update python shebang to use /usr/bin/env Not everyone has python as /usr/bin/python. Use the env utility to figure out the local environement python. Change-Id: Iac45e63fff116509fc58769b4e3e9af96ae1dffb --- M git-logs/log_updates.py M make-release/make-release.py 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/git-logs/log_updates.py b/git-logs/log_updates.py index 7155aed..e3e62e1 100755 --- a/git-logs/log_updates.py +++ b/git-logs/log_updates.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python from subprocess import check_output from datetime import date diff --git a/make-release/make-release.py b/make-release/make-release.py index 51d3ce2..f07d9b5 100755 --- a/make-release/make-release.py +++ b/make-release/make-release.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python # vim:sw=4:ts=4:et: -- To view, visit https://gerrit.wikimedia.org/r/172260 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iac45e63fff116509fc58769b4e3e9af96ae1dffb Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/tools/release Gerrit-Branch: master Gerrit-Owner: Hashar has...@free.fr Gerrit-Reviewer: Awjrichards aricha...@wikimedia.org Gerrit-Reviewer: Hashar has...@free.fr Gerrit-Reviewer: MarkAHershberger m...@nichework.com Gerrit-Reviewer: Reedy re...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Move parsers from lib to repo - change (mediawiki...Wikibase)
Adrian Lang has uploaded a new change for review. https://gerrit.wikimedia.org/r/172966 Change subject: Move parsers from lib to repo .. Move parsers from lib to repo They are only used in repo. Change-Id: I08bd8883614f1c85b71b52a3f5f56a9646b9f410 --- M lib/resources/Resources.php M repo/resources/Resources.php R repo/resources/parsers/getApiBasedValueParserConstructor.js R repo/resources/parsers/getStore.js R repo/resources/parsers/resources.php 5 files changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/66/172966/1 diff --git a/lib/resources/Resources.php b/lib/resources/Resources.php index 8d2371d..c1d7968 100644 --- a/lib/resources/Resources.php +++ b/lib/resources/Resources.php @@ -137,7 +137,6 @@ include( __DIR__ . '/deprecated/resources.php' ), include( __DIR__ . '/experts/resources.php' ), include( __DIR__ . '/jquery.wikibase/resources.php' ), - include( __DIR__ . '/parsers/resources.php' ), include( __DIR__ . '/wikibase.RepoApi/resources.php' ) ); diff --git a/repo/resources/Resources.php b/repo/resources/Resources.php index 2b49904..fc4d4d5 100644 --- a/repo/resources/Resources.php +++ b/repo/resources/Resources.php @@ -219,6 +219,7 @@ $modules, include( __DIR__ . '/entityChangers/resources.php' ), include( __DIR__ . '/formatters/resources.php' ), + include( __DIR__ . '/parsers/resources.php' ), include( __DIR__ . '/store/resources.php' ), include( __DIR__ . '/utilities/resources.php' ) ); diff --git a/lib/resources/parsers/getApiBasedValueParserConstructor.js b/repo/resources/parsers/getApiBasedValueParserConstructor.js similarity index 100% rename from lib/resources/parsers/getApiBasedValueParserConstructor.js rename to repo/resources/parsers/getApiBasedValueParserConstructor.js diff --git a/lib/resources/parsers/getStore.js b/repo/resources/parsers/getStore.js similarity index 100% rename from lib/resources/parsers/getStore.js rename to repo/resources/parsers/getStore.js diff --git a/lib/resources/parsers/resources.php b/repo/resources/parsers/resources.php similarity index 100% rename from lib/resources/parsers/resources.php rename to repo/resources/parsers/resources.php -- To view, visit https://gerrit.wikimedia.org/r/172966 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I08bd8883614f1c85b71b52a3f5f56a9646b9f410 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Adrian Lang adrian.l...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Move formatters from lib to repo - change (mediawiki...Wikibase)
Adrian Lang has uploaded a new change for review. https://gerrit.wikimedia.org/r/172965 Change subject: Move formatters from lib to repo .. Move formatters from lib to repo They are only used in repo. Change-Id: Ib86ab7d30155e466b9bfcee09126844795fc --- M lib/resources/Resources.php M repo/resources/Resources.php R repo/resources/formatters/getApiBasedValueFormatterConstructor.js R repo/resources/formatters/getStore.js R repo/resources/formatters/resources.php 5 files changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/65/172965/1 diff --git a/lib/resources/Resources.php b/lib/resources/Resources.php index 6f34f7b..8d2371d 100644 --- a/lib/resources/Resources.php +++ b/lib/resources/Resources.php @@ -136,7 +136,6 @@ include( __DIR__ . '/api/resources.php' ), include( __DIR__ . '/deprecated/resources.php' ), include( __DIR__ . '/experts/resources.php' ), - include( __DIR__ . '/formatters/resources.php' ), include( __DIR__ . '/jquery.wikibase/resources.php' ), include( __DIR__ . '/parsers/resources.php' ), include( __DIR__ . '/wikibase.RepoApi/resources.php' ) diff --git a/repo/resources/Resources.php b/repo/resources/Resources.php index e99a924..2b49904 100644 --- a/repo/resources/Resources.php +++ b/repo/resources/Resources.php @@ -218,6 +218,7 @@ return array_merge( $modules, include( __DIR__ . '/entityChangers/resources.php' ), + include( __DIR__ . '/formatters/resources.php' ), include( __DIR__ . '/store/resources.php' ), include( __DIR__ . '/utilities/resources.php' ) ); diff --git a/lib/resources/formatters/getApiBasedValueFormatterConstructor.js b/repo/resources/formatters/getApiBasedValueFormatterConstructor.js similarity index 100% rename from lib/resources/formatters/getApiBasedValueFormatterConstructor.js rename to repo/resources/formatters/getApiBasedValueFormatterConstructor.js diff --git a/lib/resources/formatters/getStore.js b/repo/resources/formatters/getStore.js similarity index 100% rename from lib/resources/formatters/getStore.js rename to repo/resources/formatters/getStore.js diff --git a/lib/resources/formatters/resources.php b/repo/resources/formatters/resources.php similarity index 100% rename from lib/resources/formatters/resources.php rename to repo/resources/formatters/resources.php -- To view, visit https://gerrit.wikimedia.org/r/172965 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib86ab7d30155e466b9bfcee09126844795fc Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Adrian Lang adrian.l...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Move jquery.ui.tagadata from lib to repo - change (mediawiki...Wikibase)
Adrian Lang has uploaded a new change for review. https://gerrit.wikimedia.org/r/172964 Change subject: Move jquery.ui.tagadata from lib to repo .. Move jquery.ui.tagadata from lib to repo It's only used by jquery.wikibase.aliasesview, which will be moved to repo, too. Change-Id: I3eacaf0e3a43fe177daa9509bcff2803b963eaf2 --- M lib/resources/Resources.php M lib/tests/qunit/resources.php M repo/resources/Resources.php R repo/resources/jquery.ui/jquery.ui.tagadata.LICENSE R repo/resources/jquery.ui/jquery.ui.tagadata.css R repo/resources/jquery.ui/jquery.ui.tagadata.js R repo/tests/qunit/jquery.ui/jquery.ui.tagadata.tests.js M repo/tests/qunit/resources.php 8 files changed, 24 insertions(+), 24 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/64/172964/1 diff --git a/lib/resources/Resources.php b/lib/resources/Resources.php index 72d8d32..6f34f7b 100644 --- a/lib/resources/Resources.php +++ b/lib/resources/Resources.php @@ -117,21 +117,6 @@ ), ), - 'jquery.ui.tagadata' = $moduleTemplate + array( - 'scripts' = array( - 'jquery.ui/jquery.ui.tagadata.js', - ), - 'styles' = array( - 'jquery.ui/jquery.ui.tagadata.css', - ), - 'dependencies' = array( - 'jquery.event.special.eachchange', - 'jquery.effects.blind', - 'jquery.inputautoexpand', - 'jquery.ui.widget', - ), - ), - 'wikibase.dataTypes' = $moduleTemplate + array( 'scripts' = array( 'wikibase.dataTypes/wikibase.dataTypes.js', diff --git a/lib/tests/qunit/resources.php b/lib/tests/qunit/resources.php index 8d6662d..e43ce11 100644 --- a/lib/tests/qunit/resources.php +++ b/lib/tests/qunit/resources.php @@ -53,15 +53,6 @@ ), ), - 'jquery.ui.tagadata.tests' = $moduleBase + array( - 'scripts' = array( - 'jquery.ui/jquery.ui.tagadata.tests.js', - ), - 'dependencies' = array( - 'jquery.ui.tagadata', - ), - ), - 'wikibase.dataTypes.tests' = $moduleBase + array( 'scripts' = array( 'wikibase.dataTypes/wikibase.dataTypes.tests.js', diff --git a/repo/resources/Resources.php b/repo/resources/Resources.php index 7895024..e99a924 100644 --- a/repo/resources/Resources.php +++ b/repo/resources/Resources.php @@ -25,6 +25,21 @@ $modules = array( + 'jquery.ui.tagadata' = $moduleTemplate + array( + 'scripts' = array( + 'jquery.ui/jquery.ui.tagadata.js', + ), + 'styles' = array( + 'jquery.ui/jquery.ui.tagadata.css', + ), + 'dependencies' = array( + 'jquery.event.special.eachchange', + 'jquery.effects.blind', + 'jquery.inputautoexpand', + 'jquery.ui.widget', + ), + ), + 'jquery.ui.TemplatedWidget' = $moduleTemplate + array( 'scripts' = array( 'jquery.ui/jquery.ui.TemplatedWidget.js', diff --git a/lib/resources/jquery.ui/jquery.ui.tagadata.LICENSE b/repo/resources/jquery.ui/jquery.ui.tagadata.LICENSE similarity index 100% rename from lib/resources/jquery.ui/jquery.ui.tagadata.LICENSE rename to repo/resources/jquery.ui/jquery.ui.tagadata.LICENSE diff --git a/lib/resources/jquery.ui/jquery.ui.tagadata.css b/repo/resources/jquery.ui/jquery.ui.tagadata.css similarity index 100% rename from lib/resources/jquery.ui/jquery.ui.tagadata.css rename to repo/resources/jquery.ui/jquery.ui.tagadata.css diff --git a/lib/resources/jquery.ui/jquery.ui.tagadata.js b/repo/resources/jquery.ui/jquery.ui.tagadata.js similarity index 100% rename from lib/resources/jquery.ui/jquery.ui.tagadata.js rename to repo/resources/jquery.ui/jquery.ui.tagadata.js diff --git a/lib/tests/qunit/jquery.ui/jquery.ui.tagadata.tests.js b/repo/tests/qunit/jquery.ui/jquery.ui.tagadata.tests.js similarity index 100% rename from lib/tests/qunit/jquery.ui/jquery.ui.tagadata.tests.js rename to repo/tests/qunit/jquery.ui/jquery.ui.tagadata.tests.js diff --git a/repo/tests/qunit/resources.php b/repo/tests/qunit/resources.php index f7c81a0..4bd0868 100644
[MediaWiki-commits] [Gerrit] Yandex machine translation backend client - change (mediawiki...cxserver)
jenkins-bot has submitted this change and it was merged. Change subject: Yandex machine translation backend client .. Yandex machine translation backend client * This backend is not configured for any language. That will be considered only after legal and community consultation. * Does not work without a valid API key in configuration file. Change-Id: I22f0802d8c435714625af789d317cb077d8ce02d --- M config.defaults.js A mt/Yandex.js M mt/index.js 3 files changed, 96 insertions(+), 1 deletion(-) Approvals: Santhosh: Looks good to me, approved jenkins-bot: Verified diff --git a/config.defaults.js b/config.defaults.js index 64cbc84..7800086 100644 --- a/config.defaults.js +++ b/config.defaults.js @@ -9,6 +9,8 @@ 'parsoid.api': 'http://parsoid-lb.eqiad.wikimedia.org', // Apertium web API URL 'mt.apertium.api': 'http://apertium.wmflabs.org', + 'mt.yandex.api': 'https://translate.yandex.net', + 'mt.yandex.key': null, // Use SSL? secure: false, // SSL key filename diff --git a/mt/Yandex.js b/mt/Yandex.js new file mode 100644 index 000..0e24008 --- /dev/null +++ b/mt/Yandex.js @@ -0,0 +1,92 @@ +var errormap, + Q = require( 'q' ), + request = require( 'request' ), + conf = require( __dirname + '/../utils/Conf.js' ); + +// http://api.yandex.com/translate/doc/dg/reference/translate.xml +errormap = { + 200: 'ERR_OK', + 401: 'ERR_KEY_INVALID', + 402: 'ERR_KEY_BLOCKED', + 403: 'ERR_DAILY_REQ_LIMIT_EXCEEDED', + 404: 'ERR_DAILY_CHAR_LIMIT_EXCEEDED', + 413: 'ERR_TEXT_TOO_LONG', + 422: 'ERR_UNPROCESSABLE_TEXT', + 501: 'ERR_LANG_NOT_SUPPORTED' +}; + +/** + * Returns error name from error code. + * @return {string} + */ +function getErrorName( code ) { + if ( code in errormap ) { + return errormap[code]; + } + + return 'Unknown error'; +} + +/** + * Translate plain text with Yandex. + * + * @param {string} sourceLang Source language code + * @param {string} targetLang Target language code + * @param {string} sourceText Source language text + * @return {Q.Promise} Target language text + */ +function translate( sourceLang, targetLang, sourceText ) { + var key, postData, + deferred = Q.defer(); + + key = conf( 'mt.yandex.key' ); + if ( key === null ) { + deferred.reject( new Error( 'Yandex service is misconfigured' ) ); + return deferred.promise; + } + + if ( sourceText.length 1 ) { + deferred.reject( new Error( 'Source text too long' ) ); + return deferred.promise; + } + + // Language mapping that might be needed is be-tarask - be + postData = { + url: conf( 'mt.yandex.api' ) + '/api/v1.5/tr.json/translate', + form: { + key: key, + lang: sourceLang + '-' + targetLang, + format: 'html', + text: sourceText + } + }; + + request.post( postData, function ( error, response, body ) { + var ret; + + if ( error ) { + deferred.reject( new Error( error ) ); + return; + } + + try { + ret = JSON.parse( body ); + } catch ( err ) { + deferred.reject( err ); + return; + } + + console.log( ret ); + if ( ret.code !== 200 ) { + deferred.reject( new Error( ret.code + ': ' + getErrorName( ret.code ) ) ); + } + + deferred.resolve( ret.text[0] ); + } ); + + return deferred.promise; +} + +module.exports = { + translate: translate +}; diff --git a/mt/index.js b/mt/index.js index 6e6854b..acf5730 100644 --- a/mt/index.js +++ b/mt/index.js @@ -1,3 +1,4 @@ module.exports = { - Apertium: require( './Apertium.js' ) + Apertium: require( './Apertium.js' ), + Yandex: require( './Yandex.js' ) }; -- To view, visit https://gerrit.wikimedia.org/r/170015 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I22f0802d8c435714625af789d317cb077d8ce02d Gerrit-PatchSet: 8 Gerrit-Project: mediawiki/services/cxserver Gerrit-Branch: master Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com Gerrit-Reviewer: Santhosh santhosh.thottin...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] varnish: make varnish::instance not depend on ganglia - change (operations/puppet)
Giuseppe Lavagetto has uploaded a new change for review. https://gerrit.wikimedia.org/r/172967 Change subject: varnish: make varnish::instance not depend on ganglia .. varnish: make varnish::instance not depend on ganglia We may have situations where we don't have either ganglia or gmond, so we don't want to have varnish::instance depend on it; also, the new syntax using the spaceship operator and tags should be easier to read and maintain. This is a prerequisite to fix bug #73263 Change-Id: I6ebf100e64cb432bb073831131c6be62dfac5695 Signed-off-by: Giuseppe Lavagetto glavage...@wikimedia.org --- M modules/varnish/manifests/instance.pp M modules/varnish/manifests/monitoring/ganglia.pp 2 files changed, 6 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/67/172967/1 diff --git a/modules/varnish/manifests/instance.pp b/modules/varnish/manifests/instance.pp index d58b719..1193ddd 100644 --- a/modules/varnish/manifests/instance.pp +++ b/modules/varnish/manifests/instance.pp @@ -86,7 +86,7 @@ hasstatus = false, pattern = /var/run/varnishd${instancesuffix}.pid, subscribe = Package['varnish'], -before= Exec['generate varnish.pyconf'], +tag = 'varnish_instance' } # This mechanism with the touch/rm conditionals in the pair of execs @@ -120,14 +120,5 @@ monitor_service { varnish http ${title}: description = Varnish HTTP ${title}, check_command = check_http_generic!varnishcheck!${port} -} - -# Restart gmond if this varnish instance has been (re)started later -# than gmond was started -exec { restart gmond for varnish${instancesuffix}: -path= '/bin:/usr/bin', -command = 'true', -onlyif = test /var/run/varnishd${instancesuffix}.pid -nt /var/run/gmond.pid, -notify = Service['gmond'], } } diff --git a/modules/varnish/manifests/monitoring/ganglia.pp b/modules/varnish/manifests/monitoring/ganglia.pp index f634b9e..0ff168d 100644 --- a/modules/varnish/manifests/monitoring/ganglia.pp +++ b/modules/varnish/manifests/monitoring/ganglia.pp @@ -25,5 +25,10 @@ notify = Service['gmond'], } +# Dependencies +# Exec the config generation AFTER all varnish instances have started +Service | tag == 'varnish_instance' | - Exec['generate varnish.pyconf'] +# Restart gmond if one varnish instance has been refreshed +Service | tag == 'varnish_instance' | ~ Service['gmond'] Exec['generate varnish.pyconf'] - Exec['replace varnish.pyconf'] } -- To view, visit https://gerrit.wikimedia.org/r/172967 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6ebf100e64cb432bb073831131c6be62dfac5695 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] qunit-cleanup: rm -f when deleting file - change (integration/config)
jenkins-bot has submitted this change and it was merged. Change subject: qunit-cleanup: rm -f when deleting file .. qunit-cleanup: rm -f when deleting file The builders might fail to create the symbolic link in the Apache workspace, in such a case the publisher should not complain. So pass -f to rm to skip the error. The job definitely fails already. Change-Id: I211d0da992060f4575cc843fc754ab16ff6eed62 --- M jjb/macro.yaml 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/jjb/macro.yaml b/jjb/macro.yaml index a32b4a0..2394ebf 100644 --- a/jjb/macro.yaml +++ b/jjb/macro.yaml @@ -349,7 +349,7 @@ - postbuildscript: builders: - shell: | - rm /srv/localhost/qunit/$BUILD_TAG + rm -f /srv/localhost/qunit/$BUILD_TAG # Options are confusing, setting them both to false ensures the # postbuildscript is ALWAYS run. onsuccess: False -- To view, visit https://gerrit.wikimedia.org/r/166027 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I211d0da992060f4575cc843fc754ab16ff6eed62 Gerrit-PatchSet: 2 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Hashar has...@free.fr Gerrit-Reviewer: Hashar has...@free.fr 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 localized (in the UI language) language names in messages - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Use localized (in the UI language) language names in messages .. Use localized (in the UI language) language names in messages The word native was misleading. I turned it around. My definition of native is: the name of a language in that language. This patch changes all remaining messages like please enter a label in Deutsch to please enter a label in German. The language selector and the language names in the term box are untouched (still the native language names). Change-Id: Icad1f9e30b61fdaf33710dc50577d8e456ad0dab --- M lib/resources/jquery.wikibase/jquery.wikibase.descriptionview.js M lib/resources/jquery.wikibase/jquery.wikibase.labelview.js M lib/resources/wikibase.js 3 files changed, 18 insertions(+), 20 deletions(-) Approvals: Adrian Lang: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.descriptionview.js b/lib/resources/jquery.wikibase/jquery.wikibase.descriptionview.js index 8cdb1fa..7fccede 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.descriptionview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.descriptionview.js @@ -133,7 +133,7 @@ // TODO: Inject correct placeholder via options placeholder: mw.msg( 'wikibase-description-edit-placeholder-language-aware', - wb.getNativeLanguageNameByCode( languageCode ) + wb.getLanguageNameByCode( languageCode ) ), dir: dir } ) diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.labelview.js b/lib/resources/jquery.wikibase/jquery.wikibase.labelview.js index caf498b..f0f89ed 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.labelview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.labelview.js @@ -148,7 +148,7 @@ // TODO: Inject correct placeholder via options placeholder: mw.msg( 'wikibase-label-edit-placeholder-language-aware', - wb.getNativeLanguageNameByCode( languageCode ) + wb.getLanguageNameByCode( languageCode ) ), dir: dir } ) diff --git a/lib/resources/wikibase.js b/lib/resources/wikibase.js index 432e898..709750b 100644 --- a/lib/resources/wikibase.js +++ b/lib/resources/wikibase.js @@ -24,33 +24,31 @@ * @return {Object} Set of languages (empty object when ULS is not available) */ wb.getLanguages = function() { - return ( $.uls !== undefined ) ? $.uls.data.languages : {}; + return $.uls $.uls.data.languages || {}; }; /** -* Returns the name of a language by its language code. If the language code is unknown or ULS -* can not provide sufficient language information, the language code is returned. +* Returns the name of a language in that language, if available (currently requires ULS). +* Falls back to the language code. +* +* @param {string} langCode +* @return string +*/ + wb.getNativeLanguageName = function( langCode ) { + var language = wb.getLanguages()[ langCode ]; + return language language[2] || langCode; + }; + + /** +* Returns the name of a language in the UI language, if available (currently requires ULS). +* Falls back to getNativeLanguageName, which may fall back to the language code. * * @param {string} langCode * @return string */ wb.getLanguageNameByCode = function( langCode ) { - var language = wb.getLanguages()[ langCode ]; - if( language language[2] ) { - return language[2]; - } - return langCode; - }; - - /** -* Same getLanguageNameByCode but on user UI native language instead, fallbacks -* to getLanguageNameByCode in cases native translation wasn't available -*/ - wb.getNativeLanguageNameByCode = function( langCode ) { var ulsLanguages = mw.config.get( 'wgULSLanguages' ); - return ( ulsLanguages ulsLanguages[langCode] ) ? - ulsLanguages[langCode] : - wb.getLanguageNameByCode( langCode ); + return ulsLanguages ulsLanguages[langCode] || wb.getNativeLanguageName( langCode ); }; } )( wikibase, mediaWiki, jQuery ); -- To view, visit https://gerrit.wikimedia.org/r/167799 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id:
[MediaWiki-commits] [Gerrit] Move getLanguageNameByCode out of wikibase.js - change (mediawiki...Wikibase)
Adrian Lang has uploaded a new change for review. https://gerrit.wikimedia.org/r/172968 Change subject: Move getLanguageNameByCode out of wikibase.js .. Move getLanguageNameByCode out of wikibase.js Change-Id: I00ce9e98bb10e66c2654afa70fcd593b6c9f13d8 --- M lib/resources/Resources.php M lib/resources/jquery.wikibase/resources.php M lib/resources/wikibase.js M lib/tests/qunit/wikibase.tests.js M repo/resources/Resources.php A repo/resources/wikibase.getLanguageNameByCode.js M repo/tests/qunit/resources.php A repo/tests/qunit/wikibase.getLanguageNameByCode.tests.js 8 files changed, 107 insertions(+), 82 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/68/172968/1 diff --git a/lib/resources/Resources.php b/lib/resources/Resources.php index 5466f36..66088d0 100644 --- a/lib/resources/Resources.php +++ b/lib/resources/Resources.php @@ -179,7 +179,6 @@ ); if ( defined( 'ULS_VERSION' ) ) { - $modules['wikibase']['dependencies'][] = 'ext.uls.mediawiki'; $modules['wikibase.Site']['dependencies'][] = 'ext.uls.mediawiki'; } diff --git a/lib/resources/jquery.wikibase/resources.php b/lib/resources/jquery.wikibase/resources.php index 312fb0b..f242084 100644 --- a/lib/resources/jquery.wikibase/resources.php +++ b/lib/resources/jquery.wikibase/resources.php @@ -78,7 +78,6 @@ 'jquery.wikibase.claimlistview', 'jquery.wikibase.listview', 'jquery.wikibase.toolbarcontroller', - 'wikibase', 'wikibase.datamodel', ), ), @@ -94,7 +93,6 @@ 'jquery.wikibase.listview', 'jquery.wikibase.statementview', 'jquery.wikibase.toolbarcontroller', - 'wikibase', 'wikibase.datamodel', 'wikibase.templates', 'wikibase.utilities', @@ -134,8 +132,8 @@ 'jquery.ui.TemplatedWidget', 'jquery.wikibase.edittoolbar', 'jquery.wikibase.toolbarcontroller', - 'wikibase', 'wikibase.datamodel.Term', + 'wikibase.getLanguageNameByCode', ), 'messages' = array( 'wikibase-description-edit-placeholder', @@ -182,9 +180,9 @@ 'jquery.wikibase.toolbarcontroller', 'jquery.wikibase.sitelinkgrouplistview', 'jquery.wikibase.statementview', - 'wikibase', 'wikibase.datamodel.MultiTerm', 'wikibase.datamodel.Term', + 'wikibase.getLanguageNameByCode', 'wikibase.templates', ), 'messages' = array( @@ -217,9 +215,9 @@ 'themes/default/jquery.wikibase.fingerprintlistview.css', ), 'dependencies' = array( - 'wikibase', 'jquery.ui.TemplatedWidget', 'jquery.wikibase.fingerprintview', + 'wikibase.getLanguageNameByCode', ), 'messages' = array( 'wikibase-fingerprintview-input-help-message', @@ -240,7 +238,7 @@ 'jquery.wikibase.labelview', 'jquery.wikibase.toolbarcontroller', 'mediawiki.Title', - 'wikibase', + 'wikibase.getLanguageNameByCode', ), 'messages' = array( 'wikibase-fingerprintview-input-help-message', @@ -258,8 +256,8 @@ 'jquery.ui.TemplatedWidget', 'jquery.wikibase.edittoolbar', 'jquery.wikibase.toolbarcontroller', - 'wikibase', 'wikibase.datamodel.Term', + 'wikibase.getLanguageNameByCode', ), 'messages' = array( 'parentheses', @@ -357,7 +355,6 @@ 'jquery.wikibase.listview',
[MediaWiki-commits] [Gerrit] Don't re-apply EXIF rotation to chained thumbnails - change (mediawiki/core)
Gilles has uploaded a new change for review. https://gerrit.wikimedia.org/r/172969 Change subject: Don't re-apply EXIF rotation to chained thumbnails .. Don't re-apply EXIF rotation to chained thumbnails Change-Id: I2f0674e4aea508ad7e00b7742a9d47bd0659e399 Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/600 Bug: 67525 Bug: 73352 --- M includes/media/Bitmap.php M includes/media/TransformationalImageHandler.php 2 files changed, 9 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/69/172969/1 diff --git a/includes/media/Bitmap.php b/includes/media/Bitmap.php index e81b37d..0292af8 100644 --- a/includes/media/Bitmap.php +++ b/includes/media/Bitmap.php @@ -142,7 +142,7 @@ $env['MAGICK_TMPDIR'] = $wgImageMagickTempDir; } - $rotation = $this-getRotation( $image ); + $rotation = isset( $params['disableRotation'] ) ? 0 : $this-getRotation( $image ); list( $width, $height ) = $this-extractPreRotationDimensions( $params, $rotation ); $cmd = call_user_func_array( 'wfEscapeShellArg', array_merge( @@ -223,7 +223,7 @@ } } - $rotation = $this-getRotation( $image ); + $rotation = isset( $params['disableRotation'] ) ? 0 : $this-getRotation( $image ); list( $width, $height ) = $this-extractPreRotationDimensions( $params, $rotation ); $im-setImageBackgroundColor( new ImagickPixel( 'white' ) ); @@ -344,7 +344,7 @@ $src_image = call_user_func( $loader, $params['srcPath'] ); - $rotation = function_exists( 'imagerotate' ) ? $this-getRotation( $image ) : 0; + $rotation = function_exists( 'imagerotate' ) !isset( $params['disableRotation'] ) ? $this-getRotation( $image ) : 0; list( $width, $height ) = $this-extractPreRotationDimensions( $params, $rotation ); $dst_image = imagecreatetruecolor( $width, $height ); diff --git a/includes/media/TransformationalImageHandler.php b/includes/media/TransformationalImageHandler.php index 3e3be3d..b3ae296 100644 --- a/includes/media/TransformationalImageHandler.php +++ b/includes/media/TransformationalImageHandler.php @@ -216,6 +216,12 @@ # Transform functions and binaries need a FS source file $thumbnailSource = $this-getThumbnailSource( $image, $params ); + // If the source isn't the original, disable EXIF rotation because it's already been applied + if ( $scalerParams['srcWidth'] != $thumbnailSource['width'] + || $scalerParams['srcHeight'] != $thumbnailSource['height'] ) { + $scalerParams['disableRotation'] = true; + } + $scalerParams['srcPath'] = $thumbnailSource['path']; $scalerParams['srcWidth'] = $thumbnailSource['width']; $scalerParams['srcHeight'] = $thumbnailSource['height']; -- To view, visit https://gerrit.wikimedia.org/r/172969 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2f0674e4aea508ad7e00b7742a9d47bd0659e399 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Gilles gdu...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Whitespace cleanup - change (mediawiki...ContentTranslation)
jenkins-bot has submitted this change and it was merged. Change subject: Whitespace cleanup .. Whitespace cleanup Change-Id: Ic3eaf12659a502c68c0756519891c99f85a7b4fd --- M modules/source/styles/ext.cx.source.selector.less 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Amire80: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/source/styles/ext.cx.source.selector.less b/modules/source/styles/ext.cx.source.selector.less index a788989..27ff49d 100644 --- a/modules/source/styles/ext.cx.source.selector.less +++ b/modules/source/styles/ext.cx.source.selector.less @@ -76,7 +76,7 @@ } - .cx-sourceselector-dialog__messagebar { +.cx-sourceselector-dialog__messagebar { .mw-ui-item; .mw-ui-one-whole; padding: 10px; -- To view, visit https://gerrit.wikimedia.org/r/172950 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic3eaf12659a502c68c0756519891c99f85a7b4fd Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com Gerrit-Reviewer: Amire80 amir.ahar...@mail.huji.ac.il Gerrit-Reviewer: Jsahleen jsahl...@wikimedia.org Gerrit-Reviewer: Santhosh santhosh.thottin...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki-vendor-integration - mediawiki-phpunit - change (integration/config)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/172970 Change subject: mediawiki-vendor-integration - mediawiki-phpunit .. mediawiki-vendor-integration - mediawiki-phpunit mediawiki-vendor-integration was a lame name, lets rename it mediawiki-phpunit which is straightforward. Once merged: * we will want to delete the old workspace from all slaves to reclaim disk space. * the first run on a slave will takes up to 3 minutes to clone the mediawiki/core.git repository Bug: 72787 Change-Id: I127b352b951b9f67efe0f098968a9e59faaa78b7 --- M jjb/mediawiki.yaml M zuul/layout.yaml 2 files changed, 8 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/70/172970/1 diff --git a/jjb/mediawiki.yaml b/jjb/mediawiki.yaml index 67216df..c5f3752 100644 --- a/jjb/mediawiki.yaml +++ b/jjb/mediawiki.yaml @@ -135,7 +135,7 @@ echo Noop job, meant to gate jobs properly - job-template: -name: 'mediawiki-vendor-integration' +name: 'mediawiki-phpunit' node: productionSlaves # not on labs for now concurrent: true triggers: @@ -155,7 +155,7 @@ # Test out our PHPUnit against various MediaWiki branches # -# Essentially a copy paste of mediawiki-vendor-integration +# Essentially a copy paste of mediawiki-phpunit - job-template: name: 'integration-phpunit-mediawiki-{mwbranch}' node: productionSlaves # not on labs for now @@ -270,7 +270,7 @@ bundlecommand: - rubocop - '{name}-ruby1.9.3lint' - - mediawiki-vendor-integration + - mediawiki-phpunit # For regression testing: diff --git a/zuul/layout.yaml b/zuul/layout.yaml index 65ce9bf..08d6e69 100644 --- a/zuul/layout.yaml +++ b/zuul/layout.yaml @@ -1599,7 +1599,7 @@ - name: mediawiki-core-doxygen-publish branch: ^(master|REL.*)$ # bug 50325 - - name: mediawiki-vendor-integration + - name: mediawiki-phpunit queue-name: mediawiki - name: mediawiki-core-qunit @@ -1881,7 +1881,7 @@ - mediawiki-core-jsduck - mediawiki-core-npm - mediawiki-core-phplint: -- mediawiki-vendor-integration +- mediawiki-phpunit - mediawiki-core-qunit - mediawiki-core-bundle-rubocop - mediawiki-core-ruby1.9.3lint @@ -1894,7 +1894,7 @@ - mediawiki-core-jsduck - mediawiki-core-npm - mediawiki-core-phplint: -- mediawiki-vendor-integration +- mediawiki-phpunit - mediawiki-core-qunit - mediawiki-core-bundle-rubocop - mediawiki-core-ruby1.9.3lint @@ -1925,9 +1925,9 @@ test: - php-composer-validate - mediawiki-core-qunit - - mediawiki-vendor-integration + - mediawiki-phpunit gate-and-submit: - - mediawiki-vendor-integration + - mediawiki-phpunit - mediawiki-core-qunit - php-composer-validate experimental: -- To view, visit https://gerrit.wikimedia.org/r/172970 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I127b352b951b9f67efe0f098968a9e59faaa78b7 Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Hashar has...@free.fr ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] More whitespace cleanup - change (mediawiki...ContentTranslation)
Amire80 has uploaded a new change for review. https://gerrit.wikimedia.org/r/172971 Change subject: More whitespace cleanup .. More whitespace cleanup Follow up to Ic3eaf12659a502c68c0756519891c99f85a7b4fd Change-Id: If9e1c878d75a68616d243abbf659fbc77d585f5e --- M modules/source/styles/ext.cx.source.selector.less 1 file changed, 2 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/71/172971/1 diff --git a/modules/source/styles/ext.cx.source.selector.less b/modules/source/styles/ext.cx.source.selector.less index 27ff49d..ef72d5a 100644 --- a/modules/source/styles/ext.cx.source.selector.less +++ b/modules/source/styles/ext.cx.source.selector.less @@ -73,15 +73,14 @@ background-size: 20px; padding-left: 30px; } - - } +} .cx-sourceselector-dialog__messagebar { .mw-ui-item; .mw-ui-one-whole; padding: 10px; background-color: #F7D358; - } +} .cx-sourceselector-dialog__actions { .mw-ui-one-whole; -- To view, visit https://gerrit.wikimedia.org/r/172971 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If9e1c878d75a68616d243abbf659fbc77d585f5e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix rendering issues in MathML mode - change (mediawiki...Math)
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/172972 Change subject: Fix rendering issues in MathML mode .. Fix rendering issues in MathML mode Force display:none on a hidden MathML rendering to avoid generating focusable node highlights. Move adding of class to setup to ensure it persists after render. Change-Id: I5fc21afa61ccc07e9d2126846cf29ee898182a7c --- M Math.php A modules/VisualEditor/ve.ce.MWMathNode.css M modules/VisualEditor/ve.ce.MWMathNode.js 3 files changed, 16 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Math refs/changes/72/172972/1 diff --git a/Math.php b/Math.php index c4ccba9..89070b0 100644 --- a/Math.php +++ b/Math.php @@ -513,6 +513,7 @@ 'VisualEditor/ve.ui.MWMathInspectorTool.js', ), 'styles' = array( + 'VisualEditor/ve.ce.MWMathNode.css', 'VisualEditor/ve.ui.MWMathIcons.css', ), 'dependencies' = array( diff --git a/modules/VisualEditor/ve.ce.MWMathNode.css b/modules/VisualEditor/ve.ce.MWMathNode.css new file mode 100644 index 000..eedce52 --- /dev/null +++ b/modules/VisualEditor/ve.ce.MWMathNode.css @@ -0,0 +1,6 @@ +/** + * Hide math tag completely to avoid extra bounding boxes + */ +.ve-ce-mwMathNode .mwe-math-mathml-a11y { + display: none!important; +} diff --git a/modules/VisualEditor/ve.ce.MWMathNode.js b/modules/VisualEditor/ve.ce.MWMathNode.js index 971a6b9..0ea8bf3 100644 --- a/modules/VisualEditor/ve.ce.MWMathNode.js +++ b/modules/VisualEditor/ve.ce.MWMathNode.js @@ -20,9 +20,6 @@ ve.ce.MWMathNode = function VeCeMWMathNode( model, config ) { // Parent constructor ve.ce.MWInlineExtensionNode.call( this, model, config ); - - // DOM changes - this.$element.addClass( 've-ce-mwMathNode' ); }; /* Inheritance */ @@ -38,6 +35,15 @@ /* Methods */ /** */ +ve.ce.MWMathNode.prototype.onSetup = function () { + // Parent method + ve.ce.MWMathNode.super.prototype.onSetup.call( this ); + + // DOM changes + this.$element.addClass( 've-ce-mwMathNode' ); +}; + +/** */ ve.ce.MWMathNode.prototype.onParseSuccess = function ( deferred, response ) { var data = response.visualeditor, contentNodes = this.$( data.content ).get(); if ( contentNodes[0] contentNodes[0].childNodes ) { -- To view, visit https://gerrit.wikimedia.org/r/172972 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5fc21afa61ccc07e9d2126846cf29ee898182a7c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Math Gerrit-Branch: master Gerrit-Owner: Esanders esand...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] More whitespace cleanup - change (mediawiki...ContentTranslation)
jenkins-bot has submitted this change and it was merged. Change subject: More whitespace cleanup .. More whitespace cleanup Follow up to Ic3eaf12659a502c68c0756519891c99f85a7b4fd Change-Id: If9e1c878d75a68616d243abbf659fbc77d585f5e --- M modules/source/styles/ext.cx.source.selector.less 1 file changed, 2 insertions(+), 3 deletions(-) Approvals: Nikerabbit: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/source/styles/ext.cx.source.selector.less b/modules/source/styles/ext.cx.source.selector.less index 27ff49d..ef72d5a 100644 --- a/modules/source/styles/ext.cx.source.selector.less +++ b/modules/source/styles/ext.cx.source.selector.less @@ -73,15 +73,14 @@ background-size: 20px; padding-left: 30px; } - - } +} .cx-sourceselector-dialog__messagebar { .mw-ui-item; .mw-ui-one-whole; padding: 10px; background-color: #F7D358; - } +} .cx-sourceselector-dialog__actions { .mw-ui-one-whole; -- To view, visit https://gerrit.wikimedia.org/r/172971 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If9e1c878d75a68616d243abbf659fbc77d585f5e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] snakview: Trigger startEditing event even when there is no v... - change (mediawiki...Wikibase)
Henning Snater has uploaded a new change for review. https://gerrit.wikimedia.org/r/172973 Change subject: snakview: Trigger startEditing event even when there is no variation .. snakview: Trigger startEditing event even when there is no variation Change-Id: If6fc327424733a8acae32b875ad935ff9abca9ef --- M lib/resources/jquery.wikibase/snakview/snakview.js 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/73/172973/1 diff --git a/lib/resources/jquery.wikibase/snakview/snakview.js b/lib/resources/jquery.wikibase/snakview/snakview.js index ab6bbb5..2a50acb 100644 --- a/lib/resources/jquery.wikibase/snakview/snakview.js +++ b/lib/resources/jquery.wikibase/snakview/snakview.js @@ -343,6 +343,7 @@ this._variation.startEditing(); } else { this.draw(); + this._trigger( 'afterstartediting' ); } } } ), -- To view, visit https://gerrit.wikimedia.org/r/172973 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If6fc327424733a8acae32b875ad935ff9abca9ef Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Henning Snater henning.sna...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] snakview: Trigger startEditing event even when there is no v... - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: snakview: Trigger startEditing event even when there is no variation .. snakview: Trigger startEditing event even when there is no variation Change-Id: If6fc327424733a8acae32b875ad935ff9abca9ef --- M lib/resources/jquery.wikibase/snakview/snakview.js 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Adrian Lang: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/resources/jquery.wikibase/snakview/snakview.js b/lib/resources/jquery.wikibase/snakview/snakview.js index ab6bbb5..2a50acb 100644 --- a/lib/resources/jquery.wikibase/snakview/snakview.js +++ b/lib/resources/jquery.wikibase/snakview/snakview.js @@ -343,6 +343,7 @@ this._variation.startEditing(); } else { this.draw(); + this._trigger( 'afterstartediting' ); } } } ), -- To view, visit https://gerrit.wikimedia.org/r/172973 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If6fc327424733a8acae32b875ad935ff9abca9ef Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Henning Snater henning.sna...@wikimedia.de Gerrit-Reviewer: Adrian Lang adrian.l...@wikimedia.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] role::cache: make ganglia inclusion optional - change (operations/puppet)
Giuseppe Lavagetto has uploaded a new change for review. https://gerrit.wikimedia.org/r/172974 Change subject: role::cache: make ganglia inclusion optional .. role::cache: make ganglia inclusion optional Change-Id: If984cc6bf71723e4730982825978477d2ae86d6d Signed-off-by: Giuseppe Lavagetto glavage...@wikimedia.org --- M manifests/role/cache.pp 1 file changed, 18 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/74/172974/1 diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp index d2c4a9b..3992354 100644 --- a/manifests/role/cache.pp +++ b/manifests/role/cache.pp @@ -54,6 +54,8 @@ class configuration { include lvs::configuration +$has_ganglia = hiera('has_ganglia', true) + $active_nodes = { 'production' = { 'text' = { @@ -761,8 +763,9 @@ # unless they're overridden! $backend_weight = 10 -# Ganglia monitoring -class { 'varnish::monitoring::ganglia': } +if $::role::cache::config::has_ganglia { +include varnish::monitoring::ganglia +} } # Ancestor class for common resources of 2-layer clusters @@ -781,8 +784,10 @@ } # Ganglia monitoring -class { 'varnish::monitoring::ganglia': -varnish_instances = [ '', 'frontend' ], +if $::role::cache::config::has_ganglia{ +class { 'varnish::monitoring::ganglia': +varnish_instances = [ '', 'frontend' ], +} } } @@ -829,7 +834,9 @@ varnish_instances = [ '127.0.0.1:80', '127.0.0.1:3128' ], } -include varnish::monitoring::ganglia::vhtcpd +if $::role::cache::config::has_ganglia { +include varnish::monitoring::ganglia::vhtcpd +} $runtime_params = $::site ? { #'esams' = ['prefer_ipv6=on','default_ttl=2592000'], @@ -998,7 +1005,9 @@ varnish_instances = [ '127.0.0.1:80', '127.0.0.1:3128' ], } -include varnish::monitoring::ganglia::vhtcpd +if $::role::cache::config::has_ganglia { +include varnish::monitoring::ganglia::vhtcpd +} case $::realm { 'production': { @@ -1257,7 +1266,9 @@ varnish_instances = [ '127.0.0.1:80', '127.0.0.1:3128' ], } -include varnish::monitoring::ganglia::vhtcpd +if $::role::cache::config::has_ganglia { +include varnish::monitoring::ganglia::vhtcpd +} case $::realm { 'production': { -- To view, visit https://gerrit.wikimedia.org/r/172974 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If984cc6bf71723e4730982825978477d2ae86d6d Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use .super in nodes and annotations - change (VisualEditor/VisualEditor)
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/172975 Change subject: Use .super in nodes and annotations .. Use .super in nodes and annotations Change-Id: I5039a802d0add69b8977d1f37aaddb71b15ff90e --- M src/ce/annotations/ve.ce.AbbreviationAnnotation.js M src/ce/annotations/ve.ce.BigAnnotation.js M src/ce/annotations/ve.ce.BoldAnnotation.js M src/ce/annotations/ve.ce.CodeAnnotation.js M src/ce/annotations/ve.ce.CodeSampleAnnotation.js M src/ce/annotations/ve.ce.DatetimeAnnotation.js M src/ce/annotations/ve.ce.DefinitionAnnotation.js M src/ce/annotations/ve.ce.HighlightAnnotation.js M src/ce/annotations/ve.ce.ItalicAnnotation.js M src/ce/annotations/ve.ce.LanguageAnnotation.js M src/ce/annotations/ve.ce.LinkAnnotation.js M src/ce/annotations/ve.ce.QuotationAnnotation.js M src/ce/annotations/ve.ce.SmallAnnotation.js M src/ce/annotations/ve.ce.SpanAnnotation.js M src/ce/annotations/ve.ce.StrikethroughAnnotation.js M src/ce/annotations/ve.ce.SubscriptAnnotation.js M src/ce/annotations/ve.ce.SuperscriptAnnotation.js M src/ce/annotations/ve.ce.TextStyleAnnotation.js M src/ce/annotations/ve.ce.UnderlineAnnotation.js M src/ce/annotations/ve.ce.UserInputAnnotation.js M src/ce/annotations/ve.ce.VariableAnnotation.js M src/ce/nodes/ve.ce.AlienNode.js M src/ce/nodes/ve.ce.BlockImageCaptionNode.js M src/ce/nodes/ve.ce.BlockImageNode.js M src/ce/nodes/ve.ce.BreakNode.js M src/ce/nodes/ve.ce.CenterNode.js M src/ce/nodes/ve.ce.CommentNode.js M src/ce/nodes/ve.ce.DefinitionListItemNode.js M src/ce/nodes/ve.ce.DefinitionListNode.js M src/ce/nodes/ve.ce.DivNode.js M src/ce/nodes/ve.ce.DocumentNode.js M src/ce/nodes/ve.ce.HeadingNode.js M src/ce/nodes/ve.ce.InlineImageNode.js M src/ce/nodes/ve.ce.InternalItemNode.js M src/ce/nodes/ve.ce.InternalListNode.js M src/ce/nodes/ve.ce.ListItemNode.js M src/ce/nodes/ve.ce.ListNode.js M src/ce/nodes/ve.ce.ParagraphNode.js M src/ce/nodes/ve.ce.PreformattedNode.js M src/ce/nodes/ve.ce.TableCaptionNode.js M src/ce/nodes/ve.ce.TableCellNode.js M src/ce/nodes/ve.ce.TableNode.js M src/ce/nodes/ve.ce.TableRowNode.js M src/ce/nodes/ve.ce.TableSectionNode.js M src/ce/nodes/ve.ce.TextNode.js M src/dm/annotations/ve.dm.AbbreviationAnnotation.js M src/dm/annotations/ve.dm.BigAnnotation.js M src/dm/annotations/ve.dm.BoldAnnotation.js M src/dm/annotations/ve.dm.CodeAnnotation.js M src/dm/annotations/ve.dm.CodeSampleAnnotation.js M src/dm/annotations/ve.dm.DatetimeAnnotation.js M src/dm/annotations/ve.dm.DefinitionAnnotation.js M src/dm/annotations/ve.dm.HighlightAnnotation.js M src/dm/annotations/ve.dm.ItalicAnnotation.js M src/dm/annotations/ve.dm.LanguageAnnotation.js M src/dm/annotations/ve.dm.LinkAnnotation.js M src/dm/annotations/ve.dm.QuotationAnnotation.js M src/dm/annotations/ve.dm.SmallAnnotation.js M src/dm/annotations/ve.dm.SpanAnnotation.js M src/dm/annotations/ve.dm.StrikethroughAnnotation.js M src/dm/annotations/ve.dm.SubscriptAnnotation.js M src/dm/annotations/ve.dm.SuperscriptAnnotation.js M src/dm/annotations/ve.dm.TextStyleAnnotation.js M src/dm/annotations/ve.dm.UnderlineAnnotation.js M src/dm/annotations/ve.dm.UserInputAnnotation.js M src/dm/annotations/ve.dm.VariableAnnotation.js M src/dm/nodes/ve.dm.AlienNode.js M src/dm/nodes/ve.dm.BlockImageCaptionNode.js M src/dm/nodes/ve.dm.BlockImageNode.js M src/dm/nodes/ve.dm.BreakNode.js M src/dm/nodes/ve.dm.CenterNode.js M src/dm/nodes/ve.dm.CommentNode.js M src/dm/nodes/ve.dm.DefinitionListItemNode.js M src/dm/nodes/ve.dm.DefinitionListNode.js M src/dm/nodes/ve.dm.DivNode.js M src/dm/nodes/ve.dm.DocumentNode.js M src/dm/nodes/ve.dm.HeadingNode.js M src/dm/nodes/ve.dm.InlineImageNode.js M src/dm/nodes/ve.dm.InternalItemNode.js M src/dm/nodes/ve.dm.InternalListNode.js M src/dm/nodes/ve.dm.ListItemNode.js M src/dm/nodes/ve.dm.ListNode.js M src/dm/nodes/ve.dm.ParagraphNode.js M src/dm/nodes/ve.dm.PreformattedNode.js M src/dm/nodes/ve.dm.TableCaptionNode.js M src/dm/nodes/ve.dm.TableCellNode.js M src/dm/nodes/ve.dm.TableNode.js M src/dm/nodes/ve.dm.TableRowNode.js M src/dm/nodes/ve.dm.TableSectionNode.js M src/dm/nodes/ve.dm.TextNode.js 90 files changed, 173 insertions(+), 171 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/75/172975/1 diff --git a/src/ce/annotations/ve.ce.AbbreviationAnnotation.js b/src/ce/annotations/ve.ce.AbbreviationAnnotation.js index af6f9b6..1b32552 100644 --- a/src/ce/annotations/ve.ce.AbbreviationAnnotation.js +++ b/src/ce/annotations/ve.ce.AbbreviationAnnotation.js @@ -14,9 +14,9 @@ * @param {ve.ce.ContentBranchNode} [parentNode] Node rendering this annotation * @param {Object} [config] Configuration options */ -ve.ce.AbbreviationAnnotation = function VeCeAbbreviationAnnotation( model, parentNode, config ) { +ve.ce.AbbreviationAnnotation = function VeCeAbbreviationAnnotation() { // Parent constructor - ve.ce.TextStyleAnnotation.call(
[MediaWiki-commits] [Gerrit] Fix editing of ranks - change (mediawiki...Wikibase)
Adrian Lang has uploaded a new change for review. https://gerrit.wikimedia.org/r/172976 Change subject: Fix editing of ranks .. Fix editing of ranks Bug: 73307 Change-Id: I9e48cc31b95b4f4a5fc1a81be669064f49bcd9c0 --- M lib/resources/jquery.wikibase/jquery.wikibase.statementview.js 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/76/172976/1 diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.statementview.js b/lib/resources/jquery.wikibase/jquery.wikibase.statementview.js index fa381c7..0560329 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.statementview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.statementview.js @@ -535,7 +535,7 @@ function stopEditing() { self._isInEditMode = false; - self._claimview.stopEditing( dropValue ); + self._claimview.stopEditing( true ); self.enable(); self.element.removeClass( 'wb-edit' ); @@ -554,7 +554,7 @@ .done( function( savedStatement, pageInfo ) { if( !self._statement ) { // statement must be newly entered, create a new statement: - self._statement = new wb.datamodel.Statement( claim.getMainSnak() ); + self._statement = savedStatement; } stopEditing(); -- To view, visit https://gerrit.wikimedia.org/r/172976 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9e48cc31b95b4f4a5fc1a81be669064f49bcd9c0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Adrian Lang adrian.l...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Change @throw to @throws - change (mediawiki...Wikibase)
Thiemo Mättig (WMDE) has uploaded a new change for review. https://gerrit.wikimedia.org/r/172977 Change subject: Change @throw to @throws .. Change @throw to @throws Change-Id: I40067da35283f99ccf49f7fbc2cd76f9b62bc302 --- M lib/includes/store/CachingEntityRevisionLookup.php M lib/includes/store/EntityLookup.php M lib/includes/store/EntityRevisionLookup.php M lib/includes/store/RedirectResolvingEntityLookup.php M lib/includes/store/RevisionBasedEntityLookup.php M lib/tests/phpunit/MockRepository.php 6 files changed, 11 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/77/172977/1 diff --git a/lib/includes/store/CachingEntityRevisionLookup.php b/lib/includes/store/CachingEntityRevisionLookup.php index c6073cd..8db4bef 100644 --- a/lib/includes/store/CachingEntityRevisionLookup.php +++ b/lib/includes/store/CachingEntityRevisionLookup.php @@ -97,7 +97,7 @@ * @param EntityId $entityId * @param int $revisionId The desired revision id, 0 means current. * -* @throw StorageException +* @throws StorageException * @return EntityRevision|null */ public function getEntityRevision( EntityId $entityId, $revisionId = 0 ) { @@ -136,8 +136,8 @@ * @param EntityId $entityId * @param int $revisionId * -* @throw StorageException -* @return null|EntityRevision +* @throws StorageException +* @return EntityRevision|null */ private function fetchEntityRevision( EntityId $entityId, $revisionId = 0 ) { wfProfileIn( __METHOD__ ); diff --git a/lib/includes/store/EntityLookup.php b/lib/includes/store/EntityLookup.php index 860f040..52e6a54 100644 --- a/lib/includes/store/EntityLookup.php +++ b/lib/includes/store/EntityLookup.php @@ -28,7 +28,7 @@ * * @param EntityId $entityId * -* @throw StorageException +* @throws StorageException * @return Entity|null */ public function getEntity( EntityId $entityId ); @@ -46,7 +46,7 @@ * * @param EntityId $entityId * -* @throw StorageException +* @throws StorageException * @return bool */ public function hasEntity( EntityId $entityId ); diff --git a/lib/includes/store/EntityRevisionLookup.php b/lib/includes/store/EntityRevisionLookup.php index 60979fa..c028f4b 100644 --- a/lib/includes/store/EntityRevisionLookup.php +++ b/lib/includes/store/EntityRevisionLookup.php @@ -28,7 +28,7 @@ * @param EntityId $entityId * @param int $revisionId The desired revision id, 0 means current. * -* @throw StorageException +* @throws StorageException * @return EntityRevision|null */ public function getEntityRevision( EntityId $entityId, $revisionId = 0 ); diff --git a/lib/includes/store/RedirectResolvingEntityLookup.php b/lib/includes/store/RedirectResolvingEntityLookup.php index 685caa6..9b33c3c 100644 --- a/lib/includes/store/RedirectResolvingEntityLookup.php +++ b/lib/includes/store/RedirectResolvingEntityLookup.php @@ -43,7 +43,7 @@ * * @param EntityId $entityId * -* @throw StorageException +* @throws StorageException * @return Entity|null */ public function getEntity( EntityId $entityId ) { @@ -58,7 +58,7 @@ * * @param EntityId $entityId * -* @throw StorageException +* @throws StorageException * @return bool */ public function hasEntity( EntityId $entityId ) { diff --git a/lib/includes/store/RevisionBasedEntityLookup.php b/lib/includes/store/RevisionBasedEntityLookup.php index 32e41cd..ef455a3 100644 --- a/lib/includes/store/RevisionBasedEntityLookup.php +++ b/lib/includes/store/RevisionBasedEntityLookup.php @@ -34,7 +34,7 @@ * * @param EntityId $entityId * -* @throw StorageException +* @throws StorageException * @return Entity|null */ public function getEntity( EntityId $entityId ) { @@ -47,7 +47,7 @@ * * @param EntityId $entityId * -* @throw StorageException +* @throws StorageException * @return bool */ public function hasEntity( EntityId $entityId ) { diff --git a/lib/tests/phpunit/MockRepository.php b/lib/tests/phpunit/MockRepository.php index f644b3c..a4b9ef9 100644 --- a/lib/tests/phpunit/MockRepository.php +++ b/lib/tests/phpunit/MockRepository.php @@ -95,7 +95,7 @@ * * @return Entity|null * -* @throw StorageException +* @throws StorageException */ public function getEntity( EntityId $entityId ) { $rev = $this-getEntityRevision( $entityId );
[MediaWiki-commits] [Gerrit] Trigger claimview change event when starting snakview edit... - change (mediawiki...Wikibase)
Henning Snater has uploaded a new change for review. https://gerrit.wikimedia.org/r/172978 Change subject: Trigger claimview change event when starting snakview edit mode .. Trigger claimview change event when starting snakview edit mode Change-Id: I359683cf3e94437eb601debb8a443a47d072a7b0 --- M lib/resources/jquery.wikibase/jquery.wikibase.claimview.js 1 file changed, 9 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/78/172978/1 diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.claimview.js b/lib/resources/jquery.wikibase/jquery.wikibase.claimview.js index ebcc0f0..6d2c125 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.claimview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.claimview.js @@ -165,9 +165,14 @@ // set up event listeners: this.$mainSnak - .on ( 'snakviewchange', function( event, status ) { - self._trigger( 'change' ); - } ); + .on( [ + 'snakviewchange.' + this.widgetName, + 'snakviewafterstartediting.' + this.widgetName + ].join( ' ' ), + function( event, status ) { + self._trigger( 'change' ); + } + ); this.$mainSnak.snakview( { value: this.mainSnak() || {}, @@ -644,6 +649,7 @@ */ destroy: function() { this.$mainSnak.snakview( 'destroy' ); + this.$mainSnak.off( '.' + this.widgetName ); PARENT.prototype.destroy.call( this ); }, -- To view, visit https://gerrit.wikimedia.org/r/172978 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I359683cf3e94437eb601debb8a443a47d072a7b0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Henning Snater henning.sna...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] ParamInfo class - change (pywikibot/core)
John Vandenberg has uploaded a new change for review. https://gerrit.wikimedia.org/r/172979 Change subject: ParamInfo class .. ParamInfo class Manages data from the paraminfo which was previous managed within QueryGenerator and stored in APISite._modules. This provides preloading of an initial set of params, so the cache key is constant, and bulk loading of all query params, again so that the cache key is constant irrespective of order of queries used. Change-Id: I84a0769f19abf8740106659426109c62e8438e65 --- M pywikibot/data/api.py M pywikibot/site.py M tests/api_tests.py M tests/dry_api_tests.py 4 files changed, 606 insertions(+), 76 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/79/172979/1 diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py index 83ef419..6d007a2 100644 --- a/pywikibot/data/api.py +++ b/pywikibot/data/api.py @@ -7,7 +7,7 @@ # __version__ = '$Id$' -from collections import MutableMapping +from collections import Container, MutableMapping from pywikibot.comms import http from email.mime.nonmultipart import MIMENonMultipart import datetime @@ -25,7 +25,7 @@ import pywikibot from pywikibot import config, login -from pywikibot.tools import MediaWikiVersion as LV, deprecated +from pywikibot.tools import MediaWikiVersion as LV, deprecated, itergroup from pywikibot.exceptions import Server504Error, FatalServerError, Error import sys @@ -121,6 +121,290 @@ self.mediawiki_exception_class_name = mediawiki_exception_class_name code = 'internal_api_error_' + mediawiki_exception_class_name super(APIMWException, self).__init__(code, info, **kwargs) + + +class ParamInfo(Container): + +paraminfo_keys = frozenset(['modules', 'querymodules', 'formatmodules', +'mainmodule', 'pagesetmodule']) + +root_modules = frozenset(['main', 'pageset']) +root_module_keys = frozenset(['mainmodule', 'pagesetmodule']) + +init_modules = frozenset(['main', 'paraminfo']) + +def __init__(self, site, preloaded_modules=None, only_use_modules=None): + +Constructor. + +@param preloaded_modules: API modules to preload +@type preloaded_modules: set of string +@param only_use_modules: use the 'modules' only syntax for paraminfo +@type: only_use_modules: bool or None to only use default, which True +if the site is 1.25wm4+ + +self.site = site +self._prefixes = {} +self._with_limits = None +self._paraminfo = {} + +self._query_modules = [] # filled in fetch() +self._limit = None + +if preloaded_modules: +self.init_modules |= set(preloaded_modules) +self.__inited = False + +self.only_use_modules = only_use_modules +if self.only_use_modules: +self.paraminfo_keys = frozenset(['modules']) + +def _init(self): +# The paraminfo api deprecated the old request syntax of +# querymodules='info'; to avoid warnings sites with 1.25wm4+ +# must only use 'modules' parameter. +if self.only_use_modules is None: +self.only_use_modules = LV(self.site.version()) = LV('1.25wmf4') + +self.fetch(self.init_modules, _init=True) +main_modules_param = self.parameter('main', 'action') + +assert(main_modules_param) +assert('type' in main_modules_param) + +# FIXME: While deprecated in 1.25, paraminfo param 'querymodules' +# provides a list of all query modules. This will likely be removed +# from the API in the future. +# paraminfo for the query module contains the same info, split into +# multiple sets of data, and should be used as a fallback at least. +query_modules_param = self.parameter('paraminfo', 'querymodules') + +assert(query_modules_param) +assert('type' in query_modules_param) +assert('limit' in query_modules_param) + +self._action_modules = frozenset(main_modules_param['type']) +self._query_modules = frozenset(query_modules_param['type']) +self._limit = query_modules_param['limit'] +self.__inited = True + +def _emulate_pageset(self): +# pageset isnt a module in the new system, so it is emulated using +# a) param limit information from a limit param already fetched +# b) the query module's generator list +a_limits_param = self.parameter('paraminfo', 'modules') +limit = a_limits_param['limit'] +lowlimit = a_limits_param['lowlimit'] +highlimit = a_limits_param['lowlimit'] + +# TODO: Find out when 'generator' was added to 'pageset'; +# sometime after 1.19 and before 1.23. +assert('query' in self._paraminfo) +generators_param = self.parameter('query', 'generator') +assert('type' in
[MediaWiki-commits] [Gerrit] nagios_common: Parameterize path used for ircecho - change (operations/puppet)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/172980 Change subject: nagios_common: Parameterize path used for ircecho .. nagios_common: Parameterize path used for ircecho Change-Id: Ie3419b9d9fd068e4eb8413d1ca147bef6f8ea475 --- M modules/nagios_common/manifests/notification_commands.pp M modules/nagios_common/templates/notification_commands.cfg.erb 2 files changed, 15 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/80/172980/1 diff --git a/modules/nagios_common/manifests/notification_commands.pp b/modules/nagios_common/manifests/notification_commands.pp index ecdbb91..dbb32bb 100644 --- a/modules/nagios_common/manifests/notification_commands.pp +++ b/modules/nagios_common/manifests/notification_commands.pp @@ -21,12 +21,17 @@ # Name of thing that gives the recipient love when notifying # them via email of bad things that have happened # +# [*irc_dir_path*] +# Directory containing files that are used by ircecho to +# echo notifications to IRC +# class nagios_common::notification_commands( $ensure = present, $config_dir = '/etc/icinga', $owner = 'icinga', $group = 'icinga', $lover_name = 'Icinga', +$irc_dir_path = '/var/log/icinga', ) { file { $config_dir/notification_commands.cfg: ensure = $ensure, diff --git a/modules/nagios_common/templates/notification_commands.cfg.erb b/modules/nagios_common/templates/notification_commands.cfg.erb index 81f85f0..ea2cf48 100644 --- a/modules/nagios_common/templates/notification_commands.cfg.erb +++ b/modules/nagios_common/templates/notification_commands.cfg.erb @@ -61,45 +61,45 @@ # global IRC output for operations define command{ command_namenotify-host-by-irc - command_lineecho $NOTIFICATIONTYPE$ - Host $HOSTALIAS$ is $HOSTSTATE$: $HOSTOUTPUT$ $HOSTACKAUTHOR$ $HOSTACKCOMMENT$ /var/log/icinga/irc.log + command_lineecho $NOTIFICATIONTYPE$ - Host $HOSTALIAS$ is $HOSTSTATE$: $HOSTOUTPUT$ $HOSTACKAUTHOR$ $HOSTACKCOMMENT$ %= @irc_dir_path %/irc.log } define command{ command_namenotify-service-by-irc - command_lineecho $NOTIFICATIONTYPE$ - $SERVICEDESC$ on $HOSTNAME$ is $SERVICESTATE$: $SERVICEOUTPUT$ $SERVICEACKAUTHOR$ $SERVICEACKCOMMENT$ /var/log/icinga/irc.log + command_lineecho $NOTIFICATIONTYPE$ - $SERVICEDESC$ on $HOSTNAME$ is $SERVICESTATE$: $SERVICEOUTPUT$ $SERVICEACKAUTHOR$ $SERVICEACKCOMMENT$ %= @irc_dir_path %/irc.log } # IRC output for wikidata define command{ command_namenotify-host-by-irc-wikidata - command_lineecho $NOTIFICATIONTYPE$ - Host $HOSTALIAS$ is $HOSTSTATE$: $HOSTOUTPUT$ $HOSTACKAUTHOR$ $HOSTACKCOMMENT$ /var/log/icinga/irc-wikidata.log + command_lineecho $NOTIFICATIONTYPE$ - Host $HOSTALIAS$ is $HOSTSTATE$: $HOSTOUTPUT$ $HOSTACKAUTHOR$ $HOSTACKCOMMENT$ %= @irc_dir_path %/irc-wikidata.log } define command{ command_namenotify-service-by-irc-wikidata - command_lineecho $NOTIFICATIONTYPE$ - $SERVICEDESC$ on $HOSTNAME$ is $SERVICESTATE$: $SERVICEOUTPUT$ $SERVICEACKAUTHOR$ $SERVICEACKCOMMENT$ /var/log/icinga/irc-wikidata.log + command_lineecho $NOTIFICATIONTYPE$ - $SERVICEDESC$ on $HOSTNAME$ is $SERVICESTATE$: $SERVICEOUTPUT$ $SERVICEACKAUTHOR$ $SERVICEACKCOMMENT$ %= @irc_dir_path %/irc-wikidata.log } # IRC output for QA team define command{ command_namenotify-host-by-irc-qa - command_lineecho $NOTIFICATIONTYPE$ - Host $HOSTALIAS$ is $HOSTSTATE$: $HOSTOUTPUT$ $HOSTACKAUTHOR$ $HOSTACKCOMMENT$ /var/log/icinga/irc-qa.log + command_lineecho $NOTIFICATIONTYPE$ - Host $HOSTALIAS$ is $HOSTSTATE$: $HOSTOUTPUT$ $HOSTACKAUTHOR$ $HOSTACKCOMMENT$ %= @irc_dir_path %/irc-qa.log } define command{ command_namenotify-service-by-irc-qa - command_lineecho $NOTIFICATIONTYPE$ - $SERVICEDESC$ on $HOSTNAME$ is $SERVICESTATE$: $SERVICEOUTPUT$ $SERVICEACKAUTHOR$ $SERVICEACKCOMMENT$ /var/log/icinga/irc-qa.log + command_lineecho $NOTIFICATIONTYPE$ - $SERVICEDESC$ on $HOSTNAME$ is $SERVICESTATE$: $SERVICEOUTPUT$ $SERVICEACKAUTHOR$ $SERVICEACKCOMMENT$ %= @irc_dir_path %/irc-qa.log } # IRC output for (tool)labs define command{ command_namenotify-host-by-irc-labs - command_lineecho $NOTIFICATIONTYPE$ - Host $HOSTALIAS$ is $HOSTSTATE$: $HOSTOUTPUT$ $HOSTACKAUTHOR$ $HOSTACKCOMMENT$ /var/log/icinga/irc-labs.log + command_lineecho $NOTIFICATIONTYPE$ - Host $HOSTALIAS$ is $HOSTSTATE$: $HOSTOUTPUT$ $HOSTACKAUTHOR$ $HOSTACKCOMMENT$ %= @irc_dir_path %/irc-labs.log } define command{ command_namenotify-service-by-irc-labs - command_lineecho $NOTIFICATIONTYPE$ - $SERVICEDESC$ on $HOSTNAME$ is $SERVICESTATE$:
[MediaWiki-commits] [Gerrit] nagios_common: Parameterize path used for ircecho - change (operations/puppet)
Yuvipanda has submitted this change and it was merged. Change subject: nagios_common: Parameterize path used for ircecho .. nagios_common: Parameterize path used for ircecho Change-Id: Ie3419b9d9fd068e4eb8413d1ca147bef6f8ea475 --- M modules/nagios_common/manifests/notification_commands.pp M modules/nagios_common/templates/notification_commands.cfg.erb 2 files changed, 15 insertions(+), 10 deletions(-) Approvals: Yuvipanda: Looks good to me, approved Giuseppe Lavagetto: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/modules/nagios_common/manifests/notification_commands.pp b/modules/nagios_common/manifests/notification_commands.pp index ecdbb91..dbb32bb 100644 --- a/modules/nagios_common/manifests/notification_commands.pp +++ b/modules/nagios_common/manifests/notification_commands.pp @@ -21,12 +21,17 @@ # Name of thing that gives the recipient love when notifying # them via email of bad things that have happened # +# [*irc_dir_path*] +# Directory containing files that are used by ircecho to +# echo notifications to IRC +# class nagios_common::notification_commands( $ensure = present, $config_dir = '/etc/icinga', $owner = 'icinga', $group = 'icinga', $lover_name = 'Icinga', +$irc_dir_path = '/var/log/icinga', ) { file { $config_dir/notification_commands.cfg: ensure = $ensure, diff --git a/modules/nagios_common/templates/notification_commands.cfg.erb b/modules/nagios_common/templates/notification_commands.cfg.erb index 81f85f0..ea2cf48 100644 --- a/modules/nagios_common/templates/notification_commands.cfg.erb +++ b/modules/nagios_common/templates/notification_commands.cfg.erb @@ -61,45 +61,45 @@ # global IRC output for operations define command{ command_namenotify-host-by-irc - command_lineecho $NOTIFICATIONTYPE$ - Host $HOSTALIAS$ is $HOSTSTATE$: $HOSTOUTPUT$ $HOSTACKAUTHOR$ $HOSTACKCOMMENT$ /var/log/icinga/irc.log + command_lineecho $NOTIFICATIONTYPE$ - Host $HOSTALIAS$ is $HOSTSTATE$: $HOSTOUTPUT$ $HOSTACKAUTHOR$ $HOSTACKCOMMENT$ %= @irc_dir_path %/irc.log } define command{ command_namenotify-service-by-irc - command_lineecho $NOTIFICATIONTYPE$ - $SERVICEDESC$ on $HOSTNAME$ is $SERVICESTATE$: $SERVICEOUTPUT$ $SERVICEACKAUTHOR$ $SERVICEACKCOMMENT$ /var/log/icinga/irc.log + command_lineecho $NOTIFICATIONTYPE$ - $SERVICEDESC$ on $HOSTNAME$ is $SERVICESTATE$: $SERVICEOUTPUT$ $SERVICEACKAUTHOR$ $SERVICEACKCOMMENT$ %= @irc_dir_path %/irc.log } # IRC output for wikidata define command{ command_namenotify-host-by-irc-wikidata - command_lineecho $NOTIFICATIONTYPE$ - Host $HOSTALIAS$ is $HOSTSTATE$: $HOSTOUTPUT$ $HOSTACKAUTHOR$ $HOSTACKCOMMENT$ /var/log/icinga/irc-wikidata.log + command_lineecho $NOTIFICATIONTYPE$ - Host $HOSTALIAS$ is $HOSTSTATE$: $HOSTOUTPUT$ $HOSTACKAUTHOR$ $HOSTACKCOMMENT$ %= @irc_dir_path %/irc-wikidata.log } define command{ command_namenotify-service-by-irc-wikidata - command_lineecho $NOTIFICATIONTYPE$ - $SERVICEDESC$ on $HOSTNAME$ is $SERVICESTATE$: $SERVICEOUTPUT$ $SERVICEACKAUTHOR$ $SERVICEACKCOMMENT$ /var/log/icinga/irc-wikidata.log + command_lineecho $NOTIFICATIONTYPE$ - $SERVICEDESC$ on $HOSTNAME$ is $SERVICESTATE$: $SERVICEOUTPUT$ $SERVICEACKAUTHOR$ $SERVICEACKCOMMENT$ %= @irc_dir_path %/irc-wikidata.log } # IRC output for QA team define command{ command_namenotify-host-by-irc-qa - command_lineecho $NOTIFICATIONTYPE$ - Host $HOSTALIAS$ is $HOSTSTATE$: $HOSTOUTPUT$ $HOSTACKAUTHOR$ $HOSTACKCOMMENT$ /var/log/icinga/irc-qa.log + command_lineecho $NOTIFICATIONTYPE$ - Host $HOSTALIAS$ is $HOSTSTATE$: $HOSTOUTPUT$ $HOSTACKAUTHOR$ $HOSTACKCOMMENT$ %= @irc_dir_path %/irc-qa.log } define command{ command_namenotify-service-by-irc-qa - command_lineecho $NOTIFICATIONTYPE$ - $SERVICEDESC$ on $HOSTNAME$ is $SERVICESTATE$: $SERVICEOUTPUT$ $SERVICEACKAUTHOR$ $SERVICEACKCOMMENT$ /var/log/icinga/irc-qa.log + command_lineecho $NOTIFICATIONTYPE$ - $SERVICEDESC$ on $HOSTNAME$ is $SERVICESTATE$: $SERVICEOUTPUT$ $SERVICEACKAUTHOR$ $SERVICEACKCOMMENT$ %= @irc_dir_path %/irc-qa.log } # IRC output for (tool)labs define command{ command_namenotify-host-by-irc-labs - command_lineecho $NOTIFICATIONTYPE$ - Host $HOSTALIAS$ is $HOSTSTATE$: $HOSTOUTPUT$ $HOSTACKAUTHOR$ $HOSTACKCOMMENT$ /var/log/icinga/irc-labs.log + command_lineecho $NOTIFICATIONTYPE$ - Host $HOSTALIAS$ is $HOSTSTATE$: $HOSTOUTPUT$ $HOSTACKAUTHOR$ $HOSTACKCOMMENT$ %= @irc_dir_path %/irc-labs.log } define command{ command_namenotify-service-by-irc-labs - command_lineecho $NOTIFICATIONTYPE$ - $SERVICEDESC$ on
[MediaWiki-commits] [Gerrit] icinga: Move ircecho code into module - change (operations/puppet)
Yuvipanda has submitted this change and it was merged. Change subject: icinga: Move ircecho code into module .. icinga: Move ircecho code into module Change-Id: I92f850d4e86e13e1af8f775c3e0affed101ead5f --- D manifests/role/echoirc.pp M manifests/role/icinga.pp M manifests/site.pp A modules/icinga/manifests/ircbot.pp 4 files changed, 40 insertions(+), 42 deletions(-) Approvals: Yuvipanda: Looks good to me, approved Giuseppe Lavagetto: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/manifests/role/echoirc.pp b/manifests/role/echoirc.pp deleted file mode 100644 index ba72105..000 --- a/manifests/role/echoirc.pp +++ /dev/null @@ -1,40 +0,0 @@ -# role class for Icinga IRC bot -class role::echoirc { - -system::role { 'echoirc': description = 'server running icinga irc bot' } - -case $::realm { -'production': { -$ircecho_logs = { -'/var/log/icinga/irc.log' = '#wikimedia-operations', -'/var/log/icinga/irc-wikidata.log' = '#wikidata', -'/var/log/icinga/irc-qa.log' = '#wikimedia-qa', -'/var/log/icinga/irc-labs.log' = '#wikimedia-labs', -} -$ircecho_nick = 'icinga-wm' -$ircecho_server = 'chat.freenode.net' -} -'labs': { -$ircecho_logs = { '/var/log/icinga/irc.log' = '#wikimedia-labs' } -$ircecho_nick = 'icinga-wm-labs' -$ircecho_server = 'chat.freenode.net' -} -default: { -fail('unknown realm, please use labs or production') -} -} - -class { '::ircecho': -ircecho_logs= $ircecho_logs, -ircecho_nick= $ircecho_nick, -ircecho_server = $ircecho_server, - } - -# bug 26784 - IRC bots process need nagios monitoring -nrpe::monitor_service { 'ircecho': -description = 'ircecho_service_running', -nrpe_command = '/usr/lib/nagios/plugins/check_procs -w 1:4 -c 1:20 -a ircecho', -} - -} - diff --git a/manifests/role/icinga.pp b/manifests/role/icinga.pp index ad93ea6..abd5560 100644 --- a/manifests/role/icinga.pp +++ b/manifests/role/icinga.pp @@ -2,7 +2,15 @@ # # Sets up a icinga instance which checks services # and hosts for Wikimedia Production cluster -class role::icinga { +# +# = Parameters +# +# [*ircbot*] +# Setup an ircbot using ircecho to support echoing notifications +# +class role::icinga( +$ircbot = true, +){ include facilities::pdu_monitoring include icinga::monitor::checkpaging include icinga::nsca::firewall @@ -18,6 +26,10 @@ include nrpe include certificates::globalsign_ca +if $ircbot { +include icinga::ircbot +} + class { '::icinga':} class { '::icinga::web': } class { '::icinga::naggen':} diff --git a/manifests/site.pp b/manifests/site.pp index 44a0df8..e5caad7 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -2112,7 +2112,6 @@ include admin include role::icinga include role::ishmael -include role::echoirc include role::tendril include role::tcpircbot } diff --git a/modules/icinga/manifests/ircbot.pp b/modules/icinga/manifests/ircbot.pp new file mode 100644 index 000..322372e --- /dev/null +++ b/modules/icinga/manifests/ircbot.pp @@ -0,0 +1,27 @@ +# = Class: icinga::ircbot +# +# Sets up an ircecho instance that sends icinga alerts to IRC +class icinga::ircbot { + +$ircecho_logs = { +'/var/log/icinga/irc.log' = '#wikimedia-operations', +'/var/log/icinga/irc-wikidata.log' = '#wikidata', +'/var/log/icinga/irc-qa.log' = '#wikimedia-qa', +'/var/log/icinga/irc-labs.log' = '#wikimedia-labs', +} +$ircecho_nick = 'icinga-wm' +$ircecho_server = 'chat.freenode.net' + +class { '::ircecho': +ircecho_logs= $ircecho_logs, +ircecho_nick= $ircecho_nick, +ircecho_server = $ircecho_server, + } + +# bug 26784 - IRC bots process need nagios monitoring +nrpe::monitor_service { 'ircecho': +description = 'ircecho_service_running', +nrpe_command = '/usr/lib/nagios/plugins/check_procs -w 1:4 -c 1:20 -a ircecho', +} + +} -- To view, visit https://gerrit.wikimedia.org/r/172916 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I92f850d4e86e13e1af8f775c3e0affed101ead5f Gerrit-PatchSet: 4 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Yuvipanda yuvipa...@gmail.com Gerrit-Reviewer: Giuseppe Lavagetto glavage...@wikimedia.org Gerrit-Reviewer: Yuvipanda yuvipa...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org
[MediaWiki-commits] [Gerrit] Change @throw to @throws - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Change @throw to @throws .. Change @throw to @throws Change-Id: I40067da35283f99ccf49f7fbc2cd76f9b62bc302 --- M lib/includes/store/CachingEntityRevisionLookup.php M lib/includes/store/EntityLookup.php M lib/includes/store/EntityRevisionLookup.php M lib/includes/store/RedirectResolvingEntityLookup.php M lib/includes/store/RevisionBasedEntityLookup.php M lib/tests/phpunit/MockRepository.php 6 files changed, 11 insertions(+), 12 deletions(-) Approvals: Aude: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/includes/store/CachingEntityRevisionLookup.php b/lib/includes/store/CachingEntityRevisionLookup.php index c6073cd..8db4bef 100644 --- a/lib/includes/store/CachingEntityRevisionLookup.php +++ b/lib/includes/store/CachingEntityRevisionLookup.php @@ -97,7 +97,7 @@ * @param EntityId $entityId * @param int $revisionId The desired revision id, 0 means current. * -* @throw StorageException +* @throws StorageException * @return EntityRevision|null */ public function getEntityRevision( EntityId $entityId, $revisionId = 0 ) { @@ -136,8 +136,8 @@ * @param EntityId $entityId * @param int $revisionId * -* @throw StorageException -* @return null|EntityRevision +* @throws StorageException +* @return EntityRevision|null */ private function fetchEntityRevision( EntityId $entityId, $revisionId = 0 ) { wfProfileIn( __METHOD__ ); diff --git a/lib/includes/store/EntityLookup.php b/lib/includes/store/EntityLookup.php index 860f040..52e6a54 100644 --- a/lib/includes/store/EntityLookup.php +++ b/lib/includes/store/EntityLookup.php @@ -28,7 +28,7 @@ * * @param EntityId $entityId * -* @throw StorageException +* @throws StorageException * @return Entity|null */ public function getEntity( EntityId $entityId ); @@ -46,7 +46,7 @@ * * @param EntityId $entityId * -* @throw StorageException +* @throws StorageException * @return bool */ public function hasEntity( EntityId $entityId ); diff --git a/lib/includes/store/EntityRevisionLookup.php b/lib/includes/store/EntityRevisionLookup.php index 60979fa..c028f4b 100644 --- a/lib/includes/store/EntityRevisionLookup.php +++ b/lib/includes/store/EntityRevisionLookup.php @@ -28,7 +28,7 @@ * @param EntityId $entityId * @param int $revisionId The desired revision id, 0 means current. * -* @throw StorageException +* @throws StorageException * @return EntityRevision|null */ public function getEntityRevision( EntityId $entityId, $revisionId = 0 ); diff --git a/lib/includes/store/RedirectResolvingEntityLookup.php b/lib/includes/store/RedirectResolvingEntityLookup.php index 685caa6..9b33c3c 100644 --- a/lib/includes/store/RedirectResolvingEntityLookup.php +++ b/lib/includes/store/RedirectResolvingEntityLookup.php @@ -43,7 +43,7 @@ * * @param EntityId $entityId * -* @throw StorageException +* @throws StorageException * @return Entity|null */ public function getEntity( EntityId $entityId ) { @@ -58,7 +58,7 @@ * * @param EntityId $entityId * -* @throw StorageException +* @throws StorageException * @return bool */ public function hasEntity( EntityId $entityId ) { diff --git a/lib/includes/store/RevisionBasedEntityLookup.php b/lib/includes/store/RevisionBasedEntityLookup.php index 32e41cd..ef455a3 100644 --- a/lib/includes/store/RevisionBasedEntityLookup.php +++ b/lib/includes/store/RevisionBasedEntityLookup.php @@ -34,7 +34,7 @@ * * @param EntityId $entityId * -* @throw StorageException +* @throws StorageException * @return Entity|null */ public function getEntity( EntityId $entityId ) { @@ -47,7 +47,7 @@ * * @param EntityId $entityId * -* @throw StorageException +* @throws StorageException * @return bool */ public function hasEntity( EntityId $entityId ) { diff --git a/lib/tests/phpunit/MockRepository.php b/lib/tests/phpunit/MockRepository.php index f644b3c..a4b9ef9 100644 --- a/lib/tests/phpunit/MockRepository.php +++ b/lib/tests/phpunit/MockRepository.php @@ -95,7 +95,7 @@ * * @return Entity|null * -* @throw StorageException +* @throws StorageException */ public function getEntity( EntityId $entityId ) { $rev = $this-getEntityRevision( $entityId ); @@ -112,7 +112,6 @@ * * @throws StorageException
[MediaWiki-commits] [Gerrit] Conform to the MobileWebWikiGrok schema - change (mediawiki...MobileFrontend)
jenkins-bot has submitted this change and it was merged. Change subject: Conform to the MobileWebWikiGrok schema .. Conform to the MobileWebWikiGrok schema Make sure userEditCount is a number Change-Id: I176178185201ff52f185b3ef9c2c583c204dc008 --- M javascripts/loggingSchemas/mobileWebWikiGrok.js 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jhernandez: Looks good to me, approved jenkins-bot: Verified diff --git a/javascripts/loggingSchemas/mobileWebWikiGrok.js b/javascripts/loggingSchemas/mobileWebWikiGrok.js index d01ed69..9d00590 100644 --- a/javascripts/loggingSchemas/mobileWebWikiGrok.js +++ b/javascripts/loggingSchemas/mobileWebWikiGrok.js @@ -8,7 +8,7 @@ isLoggedIn: !user.isAnon() }; // If the user is logged in, record username and edit count - if ( !user.isAnon() ) { + if ( !user.isAnon() typeof user.getEditCount() === 'number' ) { options.userEditCount = user.getEditCount(); } return M.log( 'MobileWebWikiGrok', $.extend( options, data ) ); -- To view, visit https://gerrit.wikimedia.org/r/172443 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I176178185201ff52f185b3ef9c2c583c204dc008 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Bmansurov bmansu...@wikimedia.org Gerrit-Reviewer: Awjrichards aricha...@wikimedia.org Gerrit-Reviewer: Bmansurov bmansu...@wikimedia.org Gerrit-Reviewer: Jhernandez jhernan...@wikimedia.org Gerrit-Reviewer: Kaldari rkald...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Added contributer - change (mediawiki...BlueSpiceFoundation)
Smuggli has uploaded a new change for review. https://gerrit.wikimedia.org/r/172981 Change subject: Added contributer .. Added contributer Change-Id: Ie7d353fefbee973b50b73aa349376c6ad5a91372 --- M includes/specials/SpecialCredits.class.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceFoundation refs/changes/81/172981/1 diff --git a/includes/specials/SpecialCredits.class.php b/includes/specials/SpecialCredits.class.php index d3c66a9..ff80db1 100644 --- a/includes/specials/SpecialCredits.class.php +++ b/includes/specials/SpecialCredits.class.php @@ -35,7 +35,7 @@ ); $aContributors = array( 'Aude', 'Chad Horohoe', 'Raimond Spekking', 'Siebrand Mazeland', - 'Yuki Shira', 'TGC', 'Umherirrender' + 'Yuki Shira', 'TGC', 'Umherirrender', 'Brad Jorsch' ); $aTranslation = array( 'Siebrand Mazeland', 'Raimond Spekking', 'Stephan Muggli' -- To view, visit https://gerrit.wikimedia.org/r/172981 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie7d353fefbee973b50b73aa349376c6ad5a91372 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation Gerrit-Branch: master Gerrit-Owner: Smuggli mug...@hallowelt.biz ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] ApiResponse: return success status or die on EventLogging fail. - change (mediawiki...WikiGrok)
jenkins-bot has submitted this change and it was merged. Change subject: ApiResponse: return success status or die on EventLogging fail. .. ApiResponse: return success status or die on EventLogging fail. Added tests for invalid claims Change-Id: Ia6fbb60d56ab9e50619e761b1210ba8933263642 --- M includes/api/ApiResponse.php M tests/phpunit/api/ApiResponseTest.php 2 files changed, 105 insertions(+), 9 deletions(-) Approvals: Phuedx: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/api/ApiResponse.php b/includes/api/ApiResponse.php index 875d134..6fb54e7 100644 --- a/includes/api/ApiResponse.php +++ b/includes/api/ApiResponse.php @@ -53,12 +53,20 @@ 'value' = $claim['value'], 'response' = $claim['correct'], ); - $eventLogger-logEvent( + $result = $eventLogger-logEvent( self::SCHEMA, self::SCHEMA_REV_ID, $event ); + if ( !$result ) { + $this-dieUsage( + 'Logging claims failed. Be sure Extension:EventLogging is setup correctly.', + 'loggingfailed' + ); + } } + + $this-getResult()-addValue( 'query', $this-getModuleName(), 'success' ); } /** @@ -79,7 +87,7 @@ || !isset( $claim['valueid'] ) || !isset( $claim['value'] ) ) { - $this-dieUsage( 'Invalid claim submitted', 'invalidclaim' ); + $this-dieUsage( 'Invalid claim: ' . json_encode( $claim ), 'invalidclaim' ); } } diff --git a/tests/phpunit/api/ApiResponseTest.php b/tests/phpunit/api/ApiResponseTest.php index ca8d8ae..d209d50 100644 --- a/tests/phpunit/api/ApiResponseTest.php +++ b/tests/phpunit/api/ApiResponseTest.php @@ -59,7 +59,9 @@ protected function setUp() { parent::setUp(); - $this-setMwGlobals( 'wgAPIModules', array( 'wikigrokresponse' = 'Tests\WikiGrok\Api\StubApiResponse' ) ); + $this-setMwGlobals( 'wgAPIModules', array( + 'wikigrokresponse' = 'Tests\WikiGrok\Api\StubApiResponse' ) + ); $this-eventLogger = $this-getMock( 'WikiGrok\EventLogger' ); $this-user = new StubUser( 1234 ); @@ -72,10 +74,7 @@ ); } - /** -* @expectedException UsageException -*/ - public function testExecuteThrowsWhenThereAreNoClaims() { + private function runExecuteWithClaims( $claims ) { $request = new FauxRequest( array( 'page_id' = 1, 'user_token' = '987654321fedcba', @@ -83,11 +82,98 @@ 'subject' = 'Vessels', 'task_token' = 'abcdef0123456789', 'task_type' = 'mobile a', - 'claims' = '[]', + 'claims' = json_encode( $claims ), 'mobile_mode' = 'beta', ) ); $this-context-setRequest( $request ); $this-api-execute(); + } + + /** +* @expectedException UsageException +*/ + public function testExecuteThrowsWhenThereAreNoClaims() { + self::runExecuteWithClaims( array() ); + } + + /** +* @expectedException UsageException +*/ + public function testExecuteThrowsWhenClaimMissingPropId() { + $claims = array( + array( + // Missing propid + 'prop' = 'occupation', + 'valueid' = 'Q3423', + 'value' = 'insurance broker', + 'correct' = true, + ) + ); + self::runExecuteWithClaims( $claims ); + } + + /** +* @expectedException UsageException +*/ + public function testExecuteThrowsWhenClaimMissingProp() { + $claims = array( + array( + // Missing prop + 'propid' = 'P103', + 'valueid' = 'Q3423', + 'value' = 'insurance broker', + 'correct' = true, + ) + ); + self::runExecuteWithClaims( $claims ); + } + + /** +* @expectedException UsageException +*/ + public
[MediaWiki-commits] [Gerrit] Move entityChangers from lib to repo - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Move entityChangers from lib to repo .. Move entityChangers from lib to repo They are only used in repo. Change-Id: Ib2e7f5e5e82fb4404ef107627f69b7c0e148edb4 --- M lib/resources/Resources.php M lib/tests/qunit/resources.php M repo/resources/Resources.php R repo/resources/entityChangers/AliasesChanger.js R repo/resources/entityChangers/ClaimsChanger.js R repo/resources/entityChangers/DescriptionsChanger.js R repo/resources/entityChangers/EntityChangersFactory.js R repo/resources/entityChangers/LabelsChanger.js R repo/resources/entityChangers/ReferencesChanger.js R repo/resources/entityChangers/SiteLinksChanger.js R repo/resources/entityChangers/namespace.js R repo/resources/entityChangers/resources.php R repo/tests/qunit/entityChangers/AliasesChanger.tests.js R repo/tests/qunit/entityChangers/ClaimsChanger.tests.js R repo/tests/qunit/entityChangers/DescriptionsChanger.tests.js R repo/tests/qunit/entityChangers/LabelsChanger.tests.js R repo/tests/qunit/entityChangers/ReferencesChanger.tests.js R repo/tests/qunit/entityChangers/SiteLinksChanger.tests.js R repo/tests/qunit/entityChangers/resources.php M repo/tests/qunit/resources.php 20 files changed, 2 insertions(+), 2 deletions(-) Approvals: Thiemo Mättig (WMDE): Looks good to me, approved jenkins-bot: Verified diff --git a/lib/resources/Resources.php b/lib/resources/Resources.php index 5466f36..5287ad1 100644 --- a/lib/resources/Resources.php +++ b/lib/resources/Resources.php @@ -169,7 +169,6 @@ $modules, include( __DIR__ . '/api/resources.php' ), include( __DIR__ . '/deprecated/resources.php' ), - include( __DIR__ . '/entityChangers/resources.php' ), include( __DIR__ . '/experts/resources.php' ), include( __DIR__ . '/formatters/resources.php' ), include( __DIR__ . '/jquery.wikibase/resources.php' ), diff --git a/lib/tests/qunit/resources.php b/lib/tests/qunit/resources.php index e5e524b..1d0c361 100644 --- a/lib/tests/qunit/resources.php +++ b/lib/tests/qunit/resources.php @@ -161,7 +161,6 @@ return array_merge( $modules, - include( __DIR__ . '/entityChangers/resources.php' ), include( __DIR__ . '/jquery.wikibase/resources.php' ) ); diff --git a/repo/resources/Resources.php b/repo/resources/Resources.php index f6bcb66..9f4f707 100644 --- a/repo/resources/Resources.php +++ b/repo/resources/Resources.php @@ -183,6 +183,7 @@ return array_merge( $modules, + include( __DIR__ . '/entityChangers/resources.php' ), include( __DIR__ . '/utilities/resources.php' ) ); } ); diff --git a/lib/resources/entityChangers/AliasesChanger.js b/repo/resources/entityChangers/AliasesChanger.js similarity index 100% rename from lib/resources/entityChangers/AliasesChanger.js rename to repo/resources/entityChangers/AliasesChanger.js diff --git a/lib/resources/entityChangers/ClaimsChanger.js b/repo/resources/entityChangers/ClaimsChanger.js similarity index 100% rename from lib/resources/entityChangers/ClaimsChanger.js rename to repo/resources/entityChangers/ClaimsChanger.js diff --git a/lib/resources/entityChangers/DescriptionsChanger.js b/repo/resources/entityChangers/DescriptionsChanger.js similarity index 100% rename from lib/resources/entityChangers/DescriptionsChanger.js rename to repo/resources/entityChangers/DescriptionsChanger.js diff --git a/lib/resources/entityChangers/EntityChangersFactory.js b/repo/resources/entityChangers/EntityChangersFactory.js similarity index 100% rename from lib/resources/entityChangers/EntityChangersFactory.js rename to repo/resources/entityChangers/EntityChangersFactory.js diff --git a/lib/resources/entityChangers/LabelsChanger.js b/repo/resources/entityChangers/LabelsChanger.js similarity index 100% rename from lib/resources/entityChangers/LabelsChanger.js rename to repo/resources/entityChangers/LabelsChanger.js diff --git a/lib/resources/entityChangers/ReferencesChanger.js b/repo/resources/entityChangers/ReferencesChanger.js similarity index 100% rename from lib/resources/entityChangers/ReferencesChanger.js rename to repo/resources/entityChangers/ReferencesChanger.js diff --git a/lib/resources/entityChangers/SiteLinksChanger.js b/repo/resources/entityChangers/SiteLinksChanger.js similarity index 100% rename from lib/resources/entityChangers/SiteLinksChanger.js rename to repo/resources/entityChangers/SiteLinksChanger.js diff --git a/lib/resources/entityChangers/namespace.js b/repo/resources/entityChangers/namespace.js similarity index 100% rename from lib/resources/entityChangers/namespace.js rename to repo/resources/entityChangers/namespace.js diff --git a/lib/resources/entityChangers/resources.php b/repo/resources/entityChangers/resources.php
[MediaWiki-commits] [Gerrit] Remove require_once from some tests by adding classes to Tes... - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Remove require_once from some tests by adding classes to TestsAutoLoader .. Remove require_once from some tests by adding classes to TestsAutoLoader Change-Id: If6d0a72acb98e0971fcce2facb239b67cbe639a5 --- M tests/TestsAutoLoader.php M tests/phpunit/includes/api/ApiUploadTest.php M tests/phpunit/includes/api/query/ApiQueryBasicTest.php M tests/phpunit/includes/api/query/ApiQueryContinue2Test.php M tests/phpunit/includes/api/query/ApiQueryContinueTest.php M tests/phpunit/includes/api/query/ApiQueryContinueTestBase.php M tests/phpunit/includes/db/TestORMRowTest.php M tests/phpunit/includes/diff/DiffOpTest.php 8 files changed, 7 insertions(+), 20 deletions(-) Approvals: Aude: Looks good to me, approved Hashar: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/tests/TestsAutoLoader.php b/tests/TestsAutoLoader.php index 7391afd..d35ec26 100644 --- a/tests/TestsAutoLoader.php +++ b/tests/TestsAutoLoader.php @@ -55,7 +55,10 @@ # tests/phpunit/includes/api 'ApiFormatTestBase' = $testDir/phpunit/includes/api/format/ApiFormatTestBase.php, + 'ApiQueryTestBase' = $testDir/phpunit/includes/api/query/ApiQueryTestBase.php, + 'ApiQueryContinueTestBase' = $testDir/phpunit/includes/api/query/ApiQueryContinueTestBase.php, 'ApiTestCase' = $testDir/phpunit/includes/api/ApiTestCase.php, + 'ApiTestCaseUpload' = $testDir/phpunit/includes/api/ApiTestCaseUpload.php, 'ApiTestContext' = $testDir/phpunit/includes/api/ApiTestContext.php, 'MockApi' = $testDir/phpunit/includes/api/MockApi.php, 'MockApiQueryBase' = $testDir/phpunit/includes/api/MockApiQueryBase.php, @@ -79,6 +82,9 @@ 'PageORMTableForTesting' = $testDir/phpunit/includes/db/ORMTableTest.php, 'DatabaseTestHelper' = $testDir/phpunit/includes/db/DatabaseTestHelper.php, + # tests/phpunit/includes/diff + 'FakeDiffOp' = $testDir/phpunit/includes/diff/FakeDiffOp.php, + # tests/phpunit/includes/passwords 'PasswordTestCase' = $testDir/phpunit/includes/password/PasswordTestCase.php, diff --git a/tests/phpunit/includes/api/ApiUploadTest.php b/tests/phpunit/includes/api/ApiUploadTest.php index 8ea761f..7fdefb6 100644 --- a/tests/phpunit/includes/api/ApiUploadTest.php +++ b/tests/phpunit/includes/api/ApiUploadTest.php @@ -17,8 +17,6 @@ // @todo Port the other Upload tests, and other API tests to this framework -require_once 'ApiTestCaseUpload.php'; - /** * @group Database * @group Broken diff --git a/tests/phpunit/includes/api/query/ApiQueryBasicTest.php b/tests/phpunit/includes/api/query/ApiQueryBasicTest.php index e486c4f..fa0e4cb 100644 --- a/tests/phpunit/includes/api/query/ApiQueryBasicTest.php +++ b/tests/phpunit/includes/api/query/ApiQueryBasicTest.php @@ -23,8 +23,6 @@ * @file */ -require_once 'ApiQueryTestBase.php'; - /** * These tests validate basic functionality of the api query module * diff --git a/tests/phpunit/includes/api/query/ApiQueryContinue2Test.php b/tests/phpunit/includes/api/query/ApiQueryContinue2Test.php index 46f1b7b..2431761 100644 --- a/tests/phpunit/includes/api/query/ApiQueryContinue2Test.php +++ b/tests/phpunit/includes/api/query/ApiQueryContinue2Test.php @@ -18,8 +18,6 @@ * http://www.gnu.org/copyleft/gpl.html */ -require_once 'ApiQueryContinueTestBase.php'; - /** * @group API * @group Database diff --git a/tests/phpunit/includes/api/query/ApiQueryContinueTest.php b/tests/phpunit/includes/api/query/ApiQueryContinueTest.php index 56130f1..de9965b 100644 --- a/tests/phpunit/includes/api/query/ApiQueryContinueTest.php +++ b/tests/phpunit/includes/api/query/ApiQueryContinueTest.php @@ -18,8 +18,6 @@ * http://www.gnu.org/copyleft/gpl.html */ -require_once 'ApiQueryContinueTestBase.php'; - /** * These tests validate the new continue functionality of the api query module by * doing multiple requests with varying parameters, merging the results, and checking diff --git a/tests/phpunit/includes/api/query/ApiQueryContinueTestBase.php b/tests/phpunit/includes/api/query/ApiQueryContinueTestBase.php index a5f2684..ce2f70d 100644 --- a/tests/phpunit/includes/api/query/ApiQueryContinueTestBase.php +++ b/tests/phpunit/includes/api/query/ApiQueryContinueTestBase.php @@ -21,9 +21,6 @@ * * @file */ - -require_once 'ApiQueryTestBase.php'; - abstract class ApiQueryContinueTestBase extends ApiQueryTestBase { /** diff --git a/tests/phpunit/includes/db/TestORMRowTest.php b/tests/phpunit/includes/db/TestORMRowTest.php index ca31cf9..a5c19f9 100644 --- a/tests/phpunit/includes/db/TestORMRowTest.php +++ b/tests/phpunit/includes/db/TestORMRowTest.php @@ -35,13 +35,9 @@ * that hold the first tests in a pending state awaiting access to the database. * @group medium * + * @covers TestORMRow * @licence
[MediaWiki-commits] [Gerrit] Clarify that $wgAmericanDates is not limited to English - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Clarify that $wgAmericanDates is not limited to English .. Clarify that $wgAmericanDates is not limited to English $wgAmericanDates is used whenever the defaultDateFormat is set to dmy or mdy, which is not only true for English, but currently also (among others) for Macedonian, or Persian. Change-Id: I75fd239bc617e4fc2caa738923021b9d22adb1a1 --- M includes/DefaultSettings.php 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Aude: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index b779c01..4a35120 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -2715,8 +2715,8 @@ $wgLegacySchemaConversion = false; /** - * Enable dates like 'May 12' instead of '12 May', this only takes effect if - * the interface is set to English. + * Enable dates like 'May 12' instead of '12 May', if the default date format + * is 'dmy or mdy'. */ $wgAmericanDates = false; -- To view, visit https://gerrit.wikimedia.org/r/171223 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I75fd239bc617e4fc2caa738923021b9d22adb1a1 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: QChris christ...@quelltextlich.at Gerrit-Reviewer: Aude aude.w...@gmail.com Gerrit-Reviewer: QChris christ...@quelltextlich.at Gerrit-Reviewer: Siebrand siebr...@kitano.nl Gerrit-Reviewer: TTO at.li...@live.com.au Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Move RevisionStore and ValueViewBuilder to repo - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Move RevisionStore and ValueViewBuilder to repo .. Move RevisionStore and ValueViewBuilder to repo They are only used in repo or jquery.wikibase, which will be moved to repo. Change-Id: If227e928e9ca8153083d85ada451f30da41fad55 --- M lib/resources/Resources.php M lib/tests/qunit/resources.php M repo/resources/Resources.php R repo/resources/wikibase.RevisionStore.js R repo/resources/wikibase.ValueViewBuilder.js M repo/tests/qunit/resources.php R repo/tests/qunit/wikibase.ValueViewBuilder.tests.js 7 files changed, 29 insertions(+), 29 deletions(-) Approvals: Thiemo Mättig (WMDE): Looks good to me, approved jenkins-bot: Verified diff --git a/lib/resources/Resources.php b/lib/resources/Resources.php index 5287ad1..4198b19 100644 --- a/lib/resources/Resources.php +++ b/lib/resources/Resources.php @@ -80,15 +80,6 @@ ), ), - 'wikibase.RevisionStore' = $moduleTemplate + array( - 'scripts' = array( - 'wikibase.RevisionStore.js', - ), - 'dependencies' = array( - 'wikibase' - ) - ), - 'wikibase.Site' = $moduleTemplate + array( 'scripts' = array( 'wikibase.Site.js', @@ -108,16 +99,6 @@ 'mw.config.values.wbSiteDetails', 'wikibase', 'wikibase.Site', - ), - ), - - 'wikibase.ValueViewBuilder' = $moduleTemplate + array( - 'scripts' = array( - 'wikibase.ValueViewBuilder.js', - ), - 'dependencies' = array( - 'wikibase', - 'jquery.valueview', ), ), diff --git a/lib/tests/qunit/resources.php b/lib/tests/qunit/resources.php index 1d0c361..4bea8bb 100644 --- a/lib/tests/qunit/resources.php +++ b/lib/tests/qunit/resources.php @@ -147,16 +147,6 @@ ), ), - 'wikibase.ValueViewBuilder.tests' = $moduleBase + array( - 'scripts' = array( - 'wikibase.ValueViewBuilder.tests.js' - ), - 'dependencies' = array( - 'test.sinonjs', - 'wikibase.ValueViewBuilder' - ) - ), - ); return array_merge( diff --git a/repo/resources/Resources.php b/repo/resources/Resources.php index 9f4f707..216926b 100644 --- a/repo/resources/Resources.php +++ b/repo/resources/Resources.php @@ -50,11 +50,30 @@ ), ), + 'wikibase.RevisionStore' = $moduleTemplate + array( + 'scripts' = array( + 'wikibase.RevisionStore.js', + ), + 'dependencies' = array( + 'wikibase' + ) + ), + 'wikibase.templates' = $moduleTemplate + array( 'class' = 'Wikibase\TemplateModule', 'scripts' = 'templates.js', ), + 'wikibase.ValueViewBuilder' = $moduleTemplate + array( + 'scripts' = array( + 'wikibase.ValueViewBuilder.js', + ), + 'dependencies' = array( + 'wikibase', + 'jquery.valueview', + ), + ), + 'wikibase.ui.entityViewInit' = $moduleTemplate + array( 'scripts' = array( 'wikibase.ui.entityViewInit.js' // should probably be adjusted for more modularity diff --git a/lib/resources/wikibase.RevisionStore.js b/repo/resources/wikibase.RevisionStore.js similarity index 100% rename from lib/resources/wikibase.RevisionStore.js rename to repo/resources/wikibase.RevisionStore.js diff --git a/lib/resources/wikibase.ValueViewBuilder.js b/repo/resources/wikibase.ValueViewBuilder.js similarity index 100% rename from lib/resources/wikibase.ValueViewBuilder.js rename to repo/resources/wikibase.ValueViewBuilder.js diff --git a/repo/tests/qunit/resources.php b/repo/tests/qunit/resources.php index 56b86b4..0d2502d 100644 --- a/repo/tests/qunit/resources.php +++ b/repo/tests/qunit/resources.php @@ -36,6 +36,16 @@ ), ), + 'wikibase.ValueViewBuilder.tests'
[MediaWiki-commits] [Gerrit] Use mw.template.compile for compiling in View.js test Update... - change (mediawiki...Mantle)
jenkins-bot has submitted this change and it was merged. Change subject: Use mw.template.compile for compiling in View.js test Update tests to avoid deprecation warnings .. Use mw.template.compile for compiling in View.js test Update tests to avoid deprecation warnings Change-Id: Ic3ed72ae1ee3393b6eddf8ce2e3bef24d2913e71 --- M tests/javascripts/common/test_View.js 1 file changed, 5 insertions(+), 5 deletions(-) Approvals: Phuedx: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/javascripts/common/test_View.js b/tests/javascripts/common/test_View.js index f9e9c73..c14d796 100644 --- a/tests/javascripts/common/test_View.js +++ b/tests/javascripts/common/test_View.js @@ -20,7 +20,7 @@ } }; // Register template compiler - M.template.registerCompiler( 'xyz', compiler ); + mw.template.registerCompiler( 'xyz', compiler ); } } ); @@ -69,7 +69,7 @@ var ChildView, view; ChildView = View.extend( { className: 'my-class', - template: M.template.compile( 'h1{{title}}/h1p{{content}}/p', 'xyz' ), + template: mw.template.compile( 'h1{{title}}/h1p{{content}}/p', 'xyz' ), title: function() { return this.$( 'h1' ).text(); }, @@ -89,12 +89,12 @@ var ParentView, ChildView, view; ParentView = View.extend( { - template: M.template.compile( 'h1{{title}}/h1{{content}}', 'xyz' ) + template: mw.template.compile( 'h1{{title}}/h1{{content}}', 'xyz' ) } ); ChildView = ParentView.extend( { templatePartials: { - content: M.template.compile( 'p{{text}}/p', 'xyz' ) + content: mw.template.compile( 'p{{text}}/p', 'xyz' ) } } ); @@ -148,7 +148,7 @@ QUnit.test( 'View#preRender', 1, function( assert ) { var ChildView, view; ChildView = View.extend( { - template: M.template.compile( 'p{{text}}/p', 'xyz' ), + template: mw.template.compile( 'p{{text}}/p', 'xyz' ), preRender: function( options ) { options.text = 'hello'; } -- To view, visit https://gerrit.wikimedia.org/r/170776 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic3ed72ae1ee3393b6eddf8ce2e3bef24d2913e71 Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/extensions/Mantle Gerrit-Branch: master Gerrit-Owner: Jdlrobson jrob...@wikimedia.org Gerrit-Reviewer: Phuedx g...@samsmith.io Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Create offsets for redirects - change (mediawiki...CirrusSearch)
jenkins-bot has submitted this change and it was merged. Change subject: Create offsets for redirects .. Create offsets for redirects This should speed up highlighting for pages with many many many redirects at the cost of a little disk space. DEPLOYMENT: This requires an in place reindex to take effect. DEPLOYMENT: Probably worth doing on wikis that we've seen slow prefix searches. This is certainly the cause of some of that and might be the cause of all of it. Wikis are eswiki and frwiki. May as well do dewiki and enwiki too while we're at it. Change-Id: I1eacfcb41b622b9ed0462acb69cb4a6b96cf8912 (cherry picked from commit dbd557688a449c6991d6248731885925408ded2b) --- M includes/Maintenance/MappingConfigBuilder.php M tests/browser/features/prefix_search.feature M tests/browser/features/step_definitions/page_steps.rb 3 files changed, 37 insertions(+), 10 deletions(-) Approvals: Manybubbles: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Maintenance/MappingConfigBuilder.php b/includes/Maintenance/MappingConfigBuilder.php index 864728b..fa7c6f5 100644 --- a/includes/Maintenance/MappingConfigBuilder.php +++ b/includes/Maintenance/MappingConfigBuilder.php @@ -285,16 +285,6 @@ ), ) ); - if ( $this-optimizeForExperimentalHighlighter ) { - if ( $options MappingConfigBuilder::SPEED_UP_HIGHLIGHTING ) { - $field[ 'index_options' ] = 'offsets'; - $field[ 'fields' ][ 'plain' ][ 'index_options' ] = 'offsets'; - } - } else { - // We use the FVH on all fields so turn on term vectors - $field[ 'term_vector' ] = 'with_positions_offsets'; - $field[ 'fields' ][ 'plain' ][ 'term_vector' ] = 'with_positions_offsets'; - } $disableNorms = ( $options MappingConfigBuilder::ENABLE_NORMS ) === 0; if ( $disableNorms ) { $disableNorms = array( 'norms' = array( 'enabled' = false ) ); @@ -319,6 +309,26 @@ $field[ 'fields' ][ $extraName ], $disableNorms ); } } + if ( $this-optimizeForExperimentalHighlighter ) { + if ( $options MappingConfigBuilder::SPEED_UP_HIGHLIGHTING ) { + $field[ 'index_options' ] = 'offsets'; + $fieldNames = array( 'plain', 'prefix', 'prefix_asciifolding', 'near_match', 'near_match_asciifolding' ); + foreach ( $fieldNames as $fieldName ) { + if ( isset( $field[ 'fields' ][ $fieldName ] ) ) { + $field[ 'fields' ][ $fieldName ][ 'index_options' ] = 'offsets'; + } + } + } + } else { + // We use the FVH on all fields so turn on term vectors + $field[ 'term_vector' ] = 'with_positions_offsets'; + $fieldNames = array( 'plain', 'prefix', 'prefix_asciifolding', 'near_match', 'near_match_asciifolding' ); + foreach ( $fieldNames as $fieldName ) { + if ( isset( $field[ 'fields' ][ $fieldName ] ) ) { + $field[ 'fields' ][ $fieldName ][ 'term_vector' ] = 'with_positions_offsets'; + } + } + } return $field; } diff --git a/tests/browser/features/prefix_search.feature b/tests/browser/features/prefix_search.feature index e593453..5954919 100644 --- a/tests/browser/features/prefix_search.feature +++ b/tests/browser/features/prefix_search.feature @@ -83,3 +83,11 @@ | áccent Sorting | Áccent Sorting | Accent Sorting| | Accent Sorting | Accent Sorting | Áccent Sorting| | accent Sorting | Accent Sorting | Áccent Sorting| + + # Just take too long to run on a regular basis + # @redirect @huge + # Scenario: Prefix search on pages with tons of redirects is reasonably fast + # Given a page named IHaveTonsOfRedirects exists + # And there are 1000 redirects to IHaveTonsOfRedirects of the form TonsOfRedirects%s + # When I type TonsOfRedirects into the search box + # Then suggestions should appear diff --git a/tests/browser/features/step_definitions/page_steps.rb b/tests/browser/features/step_definitions/page_steps.rb index 2ed2819..4b76117 100644 --- a/tests/browser/features/step_definitions/page_steps.rb +++ b/tests/browser/features/step_definitions/page_steps.rb @@ -8,6 +8,15 @@ edit_page(title,
[MediaWiki-commits] [Gerrit] Create offsets for redirects - change (mediawiki...CirrusSearch)
Manybubbles has uploaded a new change for review. https://gerrit.wikimedia.org/r/172982 Change subject: Create offsets for redirects .. Create offsets for redirects This should speed up highlighting for pages with many many many redirects at the cost of a little disk space. DEPLOYMENT: This requires an in place reindex to take effect. DEPLOYMENT: Probably worth doing on wikis that we've seen slow prefix searches. This is certainly the cause of some of that and might be the cause of all of it. Wikis are eswiki and frwiki. May as well do dewiki and enwiki too while we're at it. Change-Id: I1eacfcb41b622b9ed0462acb69cb4a6b96cf8912 (cherry picked from commit dbd557688a449c6991d6248731885925408ded2b) --- M includes/Maintenance/MappingConfigBuilder.php M tests/browser/features/prefix_search.feature M tests/browser/features/step_definitions/page_steps.rb 3 files changed, 37 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch refs/changes/82/172982/1 diff --git a/includes/Maintenance/MappingConfigBuilder.php b/includes/Maintenance/MappingConfigBuilder.php index 864728b..fa7c6f5 100644 --- a/includes/Maintenance/MappingConfigBuilder.php +++ b/includes/Maintenance/MappingConfigBuilder.php @@ -285,16 +285,6 @@ ), ) ); - if ( $this-optimizeForExperimentalHighlighter ) { - if ( $options MappingConfigBuilder::SPEED_UP_HIGHLIGHTING ) { - $field[ 'index_options' ] = 'offsets'; - $field[ 'fields' ][ 'plain' ][ 'index_options' ] = 'offsets'; - } - } else { - // We use the FVH on all fields so turn on term vectors - $field[ 'term_vector' ] = 'with_positions_offsets'; - $field[ 'fields' ][ 'plain' ][ 'term_vector' ] = 'with_positions_offsets'; - } $disableNorms = ( $options MappingConfigBuilder::ENABLE_NORMS ) === 0; if ( $disableNorms ) { $disableNorms = array( 'norms' = array( 'enabled' = false ) ); @@ -319,6 +309,26 @@ $field[ 'fields' ][ $extraName ], $disableNorms ); } } + if ( $this-optimizeForExperimentalHighlighter ) { + if ( $options MappingConfigBuilder::SPEED_UP_HIGHLIGHTING ) { + $field[ 'index_options' ] = 'offsets'; + $fieldNames = array( 'plain', 'prefix', 'prefix_asciifolding', 'near_match', 'near_match_asciifolding' ); + foreach ( $fieldNames as $fieldName ) { + if ( isset( $field[ 'fields' ][ $fieldName ] ) ) { + $field[ 'fields' ][ $fieldName ][ 'index_options' ] = 'offsets'; + } + } + } + } else { + // We use the FVH on all fields so turn on term vectors + $field[ 'term_vector' ] = 'with_positions_offsets'; + $fieldNames = array( 'plain', 'prefix', 'prefix_asciifolding', 'near_match', 'near_match_asciifolding' ); + foreach ( $fieldNames as $fieldName ) { + if ( isset( $field[ 'fields' ][ $fieldName ] ) ) { + $field[ 'fields' ][ $fieldName ][ 'term_vector' ] = 'with_positions_offsets'; + } + } + } return $field; } diff --git a/tests/browser/features/prefix_search.feature b/tests/browser/features/prefix_search.feature index e593453..5954919 100644 --- a/tests/browser/features/prefix_search.feature +++ b/tests/browser/features/prefix_search.feature @@ -83,3 +83,11 @@ | áccent Sorting | Áccent Sorting | Accent Sorting| | Accent Sorting | Accent Sorting | Áccent Sorting| | accent Sorting | Accent Sorting | Áccent Sorting| + + # Just take too long to run on a regular basis + # @redirect @huge + # Scenario: Prefix search on pages with tons of redirects is reasonably fast + # Given a page named IHaveTonsOfRedirects exists + # And there are 1000 redirects to IHaveTonsOfRedirects of the form TonsOfRedirects%s + # When I type TonsOfRedirects into the search box + # Then suggestions should appear diff --git a/tests/browser/features/step_definitions/page_steps.rb b/tests/browser/features/step_definitions/page_steps.rb index 2ed2819..4b76117 100644 --- a/tests/browser/features/step_definitions/page_steps.rb +++
[MediaWiki-commits] [Gerrit] Initialize context's $element as hidden - change (VisualEditor/VisualEditor)
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/172983 Change subject: Initialize context's $element as hidden .. Initialize context's $element as hidden this.visible is set to false, so the view should be hidden too. This was also causing a scrolling issue on load in Chrome. Bug: 73208 Change-Id: I2662df89618efd2ad1a9032f89af420e73d96fbd --- M src/ui/ve.ui.Context.js 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/83/172983/1 diff --git a/src/ui/ve.ui.Context.js b/src/ui/ve.ui.Context.js index a7e7e38..76a5554 100644 --- a/src/ui/ve.ui.Context.js +++ b/src/ui/ve.ui.Context.js @@ -36,7 +36,9 @@ this.menu.connect( this, { choose: 'onContextItemChoose' } ); // Initialization - this.$element.addClass( 've-ui-context' ); + // Hide element using $.hide() not this.toggle as child implementations + // of toggle may require the instance to be fully constructed before running. + this.$element.addClass( 've-ui-context' ).hide(); this.menu.toggle( false ); this.inspectors.$element.addClass( 've-ui-context-inspectors' ); }; -- To view, visit https://gerrit.wikimedia.org/r/172983 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2662df89618efd2ad1a9032f89af420e73d96fbd Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders esand...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] SWAT update for cirrus - change (mediawiki/core)
Manybubbles has uploaded a new change for review. https://gerrit.wikimedia.org/r/172984 Change subject: SWAT update for cirrus .. SWAT update for cirrus Grabs: I1eacfcb41b622b9ed0462acb69cb4a6b96cf8912 Change-Id: I2b41801ee2f38ece300a89252e5e06b7b63ddd27 --- M extensions/CirrusSearch 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/84/172984/1 diff --git a/extensions/CirrusSearch b/extensions/CirrusSearch index 98a526c..d4eefa8 16 --- a/extensions/CirrusSearch +++ b/extensions/CirrusSearch -Subproject commit 98a526c8e6a4c2d4a99e9fdbdd4778c09422f160 +Subproject commit d4eefa8dbe153f74983f5054c22930ca5bd1274e -- To view, visit https://gerrit.wikimedia.org/r/172984 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2b41801ee2f38ece300a89252e5e06b7b63ddd27 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.25wmf8 Gerrit-Owner: Manybubbles never...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Point Doxygen input filter to Zend PHP - change (integration/jenkins)
jenkins-bot has submitted this change and it was merged. Change subject: Point Doxygen input filter to Zend PHP .. Point Doxygen input filter to Zend PHP On Trusty instances, 'php' refers to HHVM which has a rather large byte code cache overhead. That slow down the invocation of mwdoc-filter.php from 40ms (Zend) to 200+ms (PHP). Set $wgPhpCli to the Zend version of PHP ('/usr/bin/php5') so invocation of wfShellWikiCmd() ends up using it when crafting the doxygen INPUT_FILTER. With HHVM the doc generation takes up to 20 minutes. With this patch we are down to 6 minutes (without graph generation) which is slightly better. Bug: 73311 Change-Id: I48b62c9213faab2f114c41922484def8d90f9426 --- M tools/mwcore-docgen.sh 1 file changed, 5 insertions(+), 1 deletion(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/tools/mwcore-docgen.sh b/tools/mwcore-docgen.sh index 32c5854..7b8209c 100755 --- a/tools/mwcore-docgen.sh +++ b/tools/mwcore-docgen.sh @@ -58,7 +58,11 @@ # Craft a dumb LocalSettings.php which is required by Maintenance script # albeit the mwdocgen.php script does not require it. -touch $MW_INSTALL_PATH/LocalSettings.php +# +# Explicitly use Zend PHP cli (/usr/bin/php5) +# HHVM has a large bytecode cache overhead which does not play nice when +# invoking mwdoc-filter.php thousands of time (bug 73311). +echo -e ?php\n\$wgPhpCli = '/usr/bin/php5'; $MW_INSTALL_PATH/LocalSettings.php # Run the MediaWiki documentation wrapper # -- To view, visit https://gerrit.wikimedia.org/r/172756 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I48b62c9213faab2f114c41922484def8d90f9426 Gerrit-PatchSet: 3 Gerrit-Project: integration/jenkins Gerrit-Branch: master Gerrit-Owner: Hashar has...@free.fr Gerrit-Reviewer: Giuseppe Lavagetto glavage...@wikimedia.org Gerrit-Reviewer: Hashar has...@free.fr Gerrit-Reviewer: Krinkle krinklem...@gmail.com Gerrit-Reviewer: Ori.livneh o...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Trigger claimview change event when starting snakview edit... - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Trigger claimview change event when starting snakview edit mode .. Trigger claimview change event when starting snakview edit mode Bug: 73358 Change-Id: I359683cf3e94437eb601debb8a443a47d072a7b0 --- M lib/resources/jquery.wikibase/jquery.wikibase.claimview.js 1 file changed, 10 insertions(+), 3 deletions(-) Approvals: Adrian Lang: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.claimview.js b/lib/resources/jquery.wikibase/jquery.wikibase.claimview.js index ebcc0f0..1416fba 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.claimview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.claimview.js @@ -165,9 +165,15 @@ // set up event listeners: this.$mainSnak - .on ( 'snakviewchange', function( event, status ) { - self._trigger( 'change' ); - } ); + .on( + [ + 'snakviewchange.' + this.widgetName, + 'snakviewafterstartediting.' + this.widgetName + ].join( ' ' ), + function( event, status ) { + self._trigger( 'change' ); + } + ); this.$mainSnak.snakview( { value: this.mainSnak() || {}, @@ -644,6 +650,7 @@ */ destroy: function() { this.$mainSnak.snakview( 'destroy' ); + this.$mainSnak.off( '.' + this.widgetName ); PARENT.prototype.destroy.call( this ); }, -- To view, visit https://gerrit.wikimedia.org/r/172978 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I359683cf3e94437eb601debb8a443a47d072a7b0 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Henning Snater henning.sna...@wikimedia.de Gerrit-Reviewer: Adrian Lang adrian.l...@wikimedia.de 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 deprecated Linker::getExternalLinkAttributes method - change (mediawiki/core)
Aude has uploaded a new change for review. https://gerrit.wikimedia.org/r/172985 Change subject: Remove deprecated Linker::getExternalLinkAttributes method .. Remove deprecated Linker::getExternalLinkAttributes method deprecated since 1.18 and unused anywhere else in core or all the extensions in gerrit: https://github.com/search?utf8=%E2%9C%93q=getExternalLinkAttributes+%40wikimediatype=Coderef=searchresults Change-Id: Id5ae9186b3a83672c8310adb5dfdaf07bfec3d74 --- M includes/Linker.php 1 file changed, 0 insertions(+), 15 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/85/172985/1 diff --git a/includes/Linker.php b/includes/Linker.php index 40ebaea..876aa5f 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -37,21 +37,6 @@ const TOOL_LINKS_EMAIL = 2; /** -* Get the appropriate HTML attributes to add to the a element of an -* external link, as created by [wikisyntax]. -* -* @param string $class The contents of the class attribute; if an empty -* string is passed, which is the default value, defaults to 'external'. -* @return string -* @deprecated since 1.18 Just pass the external class directly to something -* using Html::expandAttributes. -*/ - static function getExternalLinkAttributes( $class = 'external' ) { - wfDeprecated( __METHOD__, '1.18' ); - return self::getLinkAttributesInternal( '', $class ); - } - - /** * Get the appropriate HTML attributes to add to the a element of an interwiki link. * * @param string $title The title text for the link, URL-encoded (???) but -- To view, visit https://gerrit.wikimedia.org/r/172985 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id5ae9186b3a83672c8310adb5dfdaf07bfec3d74 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aude aude.w...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Move $.removeClassByRegex and $.sticknode to repo - change (mediawiki...Wikibase)
Adrian Lang has uploaded a new change for review. https://gerrit.wikimedia.org/r/172986 Change subject: Move $.removeClassByRegex and $.sticknode to repo .. Move $.removeClassByRegex and $.sticknode to repo They are both only used by jquery.wikibase widgets due to be moved to repo. Change-Id: I6b0865ace791d9b3991f83c724f2d7caa3592282 --- M lib/resources/Resources.php M lib/tests/qunit/resources.php M repo/resources/Resources.php R repo/resources/jquery/jquery.removeClassByRegex.js R repo/resources/jquery/jquery.sticknode.js R repo/tests/qunit/jquery/jquery.removeClassByRegex.tests.js R repo/tests/qunit/jquery/jquery.sticknode.tests.js M repo/tests/qunit/resources.php 8 files changed, 33 insertions(+), 33 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/86/172986/1 diff --git a/lib/resources/Resources.php b/lib/resources/Resources.php index c1d7968..d183f6c 100644 --- a/lib/resources/Resources.php +++ b/lib/resources/Resources.php @@ -102,21 +102,6 @@ ), ), - 'jquery.removeClassByRegex' = $moduleTemplate + array( - 'scripts' = array( - 'jquery/jquery.removeClassByRegex.js', - ), - ), - - 'jquery.sticknode' = $moduleTemplate + array( - 'scripts' = array( - 'jquery/jquery.sticknode.js', - ), - 'dependencies' = array( - 'jquery.throttle-debounce', - ), - ), - 'wikibase.dataTypes' = $moduleTemplate + array( 'scripts' = array( 'wikibase.dataTypes/wikibase.dataTypes.js', diff --git a/lib/tests/qunit/resources.php b/lib/tests/qunit/resources.php index e43ce11..7fa6e95 100644 --- a/lib/tests/qunit/resources.php +++ b/lib/tests/qunit/resources.php @@ -35,24 +35,6 @@ ), ), - 'jquery.removeClassByRegex.tests' = $moduleBase + array( - 'scripts' = array( - 'jquery/jquery.removeClassByRegex.tests.js', - ), - 'dependencies' = array( - 'jquery.removeClassByRegex', - ), - ), - - 'jquery.sticknode.tests' = $moduleBase + array( - 'scripts' = array( - 'jquery/jquery.sticknode.tests.js', - ), - 'dependencies' = array( - 'jquery.sticknode', - ), - ), - 'wikibase.dataTypes.tests' = $moduleBase + array( 'scripts' = array( 'wikibase.dataTypes/wikibase.dataTypes.tests.js', diff --git a/repo/resources/Resources.php b/repo/resources/Resources.php index fc4d4d5..a367780 100644 --- a/repo/resources/Resources.php +++ b/repo/resources/Resources.php @@ -25,6 +25,21 @@ $modules = array( + 'jquery.removeClassByRegex' = $moduleTemplate + array( + 'scripts' = array( + 'jquery/jquery.removeClassByRegex.js', + ), + ), + + 'jquery.sticknode' = $moduleTemplate + array( + 'scripts' = array( + 'jquery/jquery.sticknode.js', + ), + 'dependencies' = array( + 'jquery.throttle-debounce', + ), + ), + 'jquery.ui.tagadata' = $moduleTemplate + array( 'scripts' = array( 'jquery.ui/jquery.ui.tagadata.js', diff --git a/lib/resources/jquery/jquery.removeClassByRegex.js b/repo/resources/jquery/jquery.removeClassByRegex.js similarity index 100% rename from lib/resources/jquery/jquery.removeClassByRegex.js rename to repo/resources/jquery/jquery.removeClassByRegex.js diff --git a/lib/resources/jquery/jquery.sticknode.js b/repo/resources/jquery/jquery.sticknode.js similarity index 100% rename from lib/resources/jquery/jquery.sticknode.js rename to repo/resources/jquery/jquery.sticknode.js diff --git a/lib/tests/qunit/jquery/jquery.removeClassByRegex.tests.js b/repo/tests/qunit/jquery/jquery.removeClassByRegex.tests.js similarity index 100% rename from lib/tests/qunit/jquery/jquery.removeClassByRegex.tests.js rename to repo/tests/qunit/jquery/jquery.removeClassByRegex.tests.js diff --git a/lib/tests/qunit/jquery/jquery.sticknode.tests.js b/repo/tests/qunit/jquery/jquery.sticknode.tests.js similarity index 100% rename from
[MediaWiki-commits] [Gerrit] Drop ResourceLoaderTemplateModule and mw.mantle.template - change (mediawiki...Mantle)
jenkins-bot has submitted this change and it was merged. Change subject: Drop ResourceLoaderTemplateModule and mw.mantle.template .. Drop ResourceLoaderTemplateModule and mw.mantle.template * Nothing is using it any more. * Drop dependency on ext.mantle.templates * Remove ResourceLoaderTemplateModule * Remove mw.mantle.template interface Dependency: I2c2db7fe162d001b223ac10f9ed493669abb81d7 Change-Id: I69f993f7ca0a98acb592499a002d4f678c4ff0f9 --- M Mantle.php M includes/Hooks.php D includes/ResourceLoaderTemplateModule.php M includes/Resources.php D javascripts/common/templates.js M javascripts/common/templates/hogan.js D tests/ResourceLoaderTemplateModuleTest.php D tests/javascripts/common/test_templates.js D tests/templates/template.html D tests/templates/template2.html D tests/templates/template_awesome.handlebars 11 files changed, 3 insertions(+), 409 deletions(-) Approvals: Phuedx: Looks good to me, approved jenkins-bot: Verified diff --git a/Mantle.php b/Mantle.php index d60a716..6fd764c 100644 --- a/Mantle.php +++ b/Mantle.php @@ -22,7 +22,6 @@ $autoloadClasses = array ( 'MantleHooks' = 'Hooks', 'ResourceLoaderParsedMessageModule' = 'ResourceLoaderParsedMessageModule', - 'ResourceLoaderTemplateModule' = 'ResourceLoaderTemplateModule', ); foreach ( $autoloadClasses as $className = $classFilename ) { diff --git a/includes/Hooks.php b/includes/Hooks.php index 6702992..3e44abe 100644 --- a/includes/Hooks.php +++ b/includes/Hooks.php @@ -25,7 +25,6 @@ $files = array_merge( $files, array_map( $callback, array( - 'ResourceLoaderTemplateModuleTest.php', 'ResourceLoaderParsedMessageModuleTest.php', ) ) diff --git a/includes/ResourceLoaderTemplateModule.php b/includes/ResourceLoaderTemplateModule.php deleted file mode 100644 index 75a16c7..000 --- a/includes/ResourceLoaderTemplateModule.php +++ /dev/null @@ -1,149 +0,0 @@ -?php -/** - * ResourceLoaderModule subclass which supports templates - */ - -/** - * ResourceLoaderTemplateModule subclass - * A deprecated module for hacking templates into ResourceLoader. - * Use ResourceLoaderFileModule or ResourceLoaderParsedMessageModule instead. - * @deprecated - */ -class ResourceLoaderTemplateModule extends ResourceLoaderParsedMessageModule { - /** @var array Saves a list of the templates named by the modules. */ - protected $legacyTemplates = array(); - /** @var string The local path to where templates are located, see __construct() */ - protected $localTemplateBasePath = ''; - - /** -* @var array Cache for mtime of templates -* @example array( [hash] = [mtime], [hash] = [mtime], ... ) -*/ - protected $templateModifiedTime = array(); - - /** -* Registers core modules and runs registration hooks. -* @param $options List of options; if not given or empty, an empty module will be constructed -*/ - public function __construct( $options ) { - foreach ( $options as $member = $option ) { - switch ( $member ) { - case 'localTemplateBasePath': - $this-{$member} = (string) $option; - break; - case 'templates': - $this-hasHackedScriptMode = true; - $this-legacyTemplates = (array)$option; - break; - } - } - - parent::__construct( $options ); - } - - /** -* This prevents Mantle from exploding when templates land in core. -* @return array List of template names -*/ - function getTemplates() { - return array(); - } - - /** -* Returns the templates named by the modules -* Each template has a corresponding html file in includes/templates/ -* @return array List of template names -*/ - function getTemplateNames() { - return $this-legacyTemplates; - } - - /** -* Get the path to load templates from. -* @param string $name name of template including file extension -* @return string -*/ - protected function getLocalTemplatePath( $name ) { - // @FIXME: Deprecate usage of template without file extension. - return {$this-localTemplateBasePath}/$name; - } - - /** -* Takes named templates by the module and adds them to the JavaScript output -* -* @return string JavaScript code -*/ - function
[MediaWiki-commits] [Gerrit] Remove deprecated Linker::getExternalLinkAttributes method - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Remove deprecated Linker::getExternalLinkAttributes method .. Remove deprecated Linker::getExternalLinkAttributes method deprecated since 1.18 and unused anywhere else in core or all the extensions in gerrit: https://github.com/search?utf8=%E2%9C%93q=getExternalLinkAttributes+%40wikimediatype=Coderef=searchresults Change-Id: Id5ae9186b3a83672c8310adb5dfdaf07bfec3d74 --- M includes/Linker.php 1 file changed, 0 insertions(+), 15 deletions(-) Approvals: Hoo man: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Linker.php b/includes/Linker.php index 40ebaea..876aa5f 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -37,21 +37,6 @@ const TOOL_LINKS_EMAIL = 2; /** -* Get the appropriate HTML attributes to add to the a element of an -* external link, as created by [wikisyntax]. -* -* @param string $class The contents of the class attribute; if an empty -* string is passed, which is the default value, defaults to 'external'. -* @return string -* @deprecated since 1.18 Just pass the external class directly to something -* using Html::expandAttributes. -*/ - static function getExternalLinkAttributes( $class = 'external' ) { - wfDeprecated( __METHOD__, '1.18' ); - return self::getLinkAttributesInternal( '', $class ); - } - - /** * Get the appropriate HTML attributes to add to the a element of an interwiki link. * * @param string $title The title text for the link, URL-encoded (???) but -- To view, visit https://gerrit.wikimedia.org/r/172985 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id5ae9186b3a83672c8310adb5dfdaf07bfec3d74 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aude aude.w...@gmail.com Gerrit-Reviewer: Hoo man h...@online.de Gerrit-Reviewer: Jackmcbarn jackmcb...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Move store from lib to repo - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Move store from lib to repo .. Move store from lib to repo It's only used by repo and jquery.wikibase tests, which will be moved to repo. Change-Id: I770ae34e62feab42b047ee12bdd372045cf464d8 --- M lib/resources/Resources.php M lib/tests/qunit/resources.php M repo/resources/Resources.php R repo/resources/store/resources.php R repo/resources/store/store.ApiEntityStore.js R repo/resources/store/store.CombiningEntityStore.js R repo/resources/store/store.EntityStore.js R repo/resources/store/store.FetchedContent.js R repo/resources/store/store.FetchedContentUnserializer.js R repo/resources/store/store.MwConfigEntityStore.js R repo/resources/store/store.js M repo/tests/qunit/resources.php A repo/tests/qunit/store/resources.php R repo/tests/qunit/store/store.CombiningEntityStore.tests.js R repo/tests/qunit/store/store.MwConfigEntityStore.tests.js 15 files changed, 46 insertions(+), 21 deletions(-) Approvals: Thiemo Mättig (WMDE): Looks good to me, approved jenkins-bot: Verified diff --git a/lib/resources/Resources.php b/lib/resources/Resources.php index 4198b19..72d8d32 100644 --- a/lib/resources/Resources.php +++ b/lib/resources/Resources.php @@ -154,8 +154,7 @@ include( __DIR__ . '/formatters/resources.php' ), include( __DIR__ . '/jquery.wikibase/resources.php' ), include( __DIR__ . '/parsers/resources.php' ), - include( __DIR__ . '/wikibase.RepoApi/resources.php' ), - include( __DIR__ . '/wikibase.store/resources.php' ) + include( __DIR__ . '/wikibase.RepoApi/resources.php' ) ); if ( defined( 'ULS_VERSION' ) ) { diff --git a/lib/tests/qunit/resources.php b/lib/tests/qunit/resources.php index 4bea8bb..8d6662d 100644 --- a/lib/tests/qunit/resources.php +++ b/lib/tests/qunit/resources.php @@ -98,25 +98,6 @@ ), ), - 'wikibase.store.CombiningEntityStore.tests' = $moduleBase + array( - 'scripts' = array( - 'wikibase.store/store.CombiningEntityStore.tests.js', - ), - 'dependencies' = array( - 'wikibase.store.CombiningEntityStore', - 'wikibase.store.EntityStore', - ), - ), - - 'wikibase.store.MwConfigEntityStore.tests' = $moduleBase + array( - 'scripts' = array( - 'wikibase.store/store.MwConfigEntityStore.tests.js', - ), - 'dependencies' = array( - 'wikibase.store.MwConfigEntityStore', - ), - ), - 'wikibase.Site.tests' = $moduleBase + array( 'scripts' = array( 'wikibase.Site.tests.js', diff --git a/repo/resources/Resources.php b/repo/resources/Resources.php index 216926b..7895024 100644 --- a/repo/resources/Resources.php +++ b/repo/resources/Resources.php @@ -203,6 +203,7 @@ return array_merge( $modules, include( __DIR__ . '/entityChangers/resources.php' ), + include( __DIR__ . '/store/resources.php' ), include( __DIR__ . '/utilities/resources.php' ) ); } ); diff --git a/lib/resources/wikibase.store/resources.php b/repo/resources/store/resources.php similarity index 100% rename from lib/resources/wikibase.store/resources.php rename to repo/resources/store/resources.php diff --git a/lib/resources/wikibase.store/store.ApiEntityStore.js b/repo/resources/store/store.ApiEntityStore.js similarity index 100% rename from lib/resources/wikibase.store/store.ApiEntityStore.js rename to repo/resources/store/store.ApiEntityStore.js diff --git a/lib/resources/wikibase.store/store.CombiningEntityStore.js b/repo/resources/store/store.CombiningEntityStore.js similarity index 100% rename from lib/resources/wikibase.store/store.CombiningEntityStore.js rename to repo/resources/store/store.CombiningEntityStore.js diff --git a/lib/resources/wikibase.store/store.EntityStore.js b/repo/resources/store/store.EntityStore.js similarity index 100% rename from lib/resources/wikibase.store/store.EntityStore.js rename to repo/resources/store/store.EntityStore.js diff --git a/lib/resources/wikibase.store/store.FetchedContent.js b/repo/resources/store/store.FetchedContent.js similarity index 100% rename from lib/resources/wikibase.store/store.FetchedContent.js rename to repo/resources/store/store.FetchedContent.js diff --git a/lib/resources/wikibase.store/store.FetchedContentUnserializer.js b/repo/resources/store/store.FetchedContentUnserializer.js similarity index 100% rename from
[MediaWiki-commits] [Gerrit] Implemented EventSingletonManager - change (mediawiki...Wikibase)
Henning Snater has uploaded a new change for review. https://gerrit.wikimedia.org/r/172987 Change subject: Implemented EventSingletonManager .. Implemented EventSingletonManager Implemented $.util.EventSingletonManager and applied it to $.sticknode plugin. The utility constructor will be used for solving 73300 as well. Change-Id: I46fed73ae4ab25284d392ce19b912ee8272b5495 --- M lib/resources/Resources.php M lib/resources/jquery/jquery.sticknode.js A lib/resources/jquery/jquery.util.EventSingletonManager.js A lib/tests/qunit/jquery/jquery.util.EventSingletonManager.tests.js M lib/tests/qunit/resources.php 5 files changed, 394 insertions(+), 58 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/87/172987/1 diff --git a/lib/resources/Resources.php b/lib/resources/Resources.php index d3fb44f..4b60548 100644 --- a/lib/resources/Resources.php +++ b/lib/resources/Resources.php @@ -133,6 +133,16 @@ ), 'dependencies' = array( 'jquery.throttle-debounce', + 'jquery.util.EventSingletonManager', + ), + ), + + 'jquery.util.EventSingletonManager' = $moduleTemplate + array( + 'scripts' = array( + 'jquery/jquery.util.EventSingletonManager.js', + ), + 'dependencies' = array( + 'jquery.throttle-debounce', ), ), diff --git a/lib/resources/jquery/jquery.sticknode.js b/lib/resources/jquery/jquery.sticknode.js index 92aa88a..4650ac4 100644 --- a/lib/resources/jquery/jquery.sticknode.js +++ b/lib/resources/jquery/jquery.sticknode.js @@ -6,7 +6,7 @@ 'use strict'; var $window = $( window ), - stickyInstances = [], + eventSingleton = new $.util.EventSingletonManager(), PLUGIN_NAME = 'sticknode'; /** @@ -34,65 +34,39 @@ return; } - register( new StickyNode( $( this ), options ) ); + var stickyNode = new StickyNode( $( this ), options ); + + eventSingleton.register( + stickyNode, + window, + 'scroll.' + PLUGIN_NAME + ' ' + 'touchmove.' + PLUGIN_NAME, + function( event, stickyNode ) { + if( stickyNode.update( $window.scrollTop() ) ) { + stickyNode.$node.triggerHandler( PLUGIN_NAME + 'update' ); + } + }, + { + throttle: 150 + } + ); + + eventSingleton.register( + stickyNode, + window, + 'resize.' + PLUGIN_NAME, + function( event, stickyNode ) { + if( stickyNode.update( $window.scrollTop(), true ) ) { + stickyNode.$node.triggerHandler( PLUGIN_NAME + 'update' ); + } + }, + { + throttle: 150 + } + ); } ); return this; }; - -/** - * @param {boolean} [force] - */ -function update( force ) { - force = force === true; - - for( var i = 0; i stickyInstances.length; i++ ) { - if( stickyInstances[i].update( $window.scrollTop(), force ) ) { - stickyInstances[i].$node.triggerHandler( PLUGIN_NAME + 'update' ); - } - } -} - -function updateAndForceTriggerEvent() { - update( true ); -} - -/** - * @param {Function} fn - * @return {Function} - */ -function throttle( fn ) { - return $.throttle ? $.throttle( 150, fn ) : fn; -} - -/** - * @param {StickyNode} sticky - */ -function register( sticky ) { - if( !stickyInstances.length ) { - $window - .on( 'scroll.' + PLUGIN_NAME + ' ' + 'touchmove.' + PLUGIN_NAME, ( function() { - return throttle( update ); - }() ) ) - .on( 'resize.' + PLUGIN_NAME, ( function() { - return throttle( updateAndForceTriggerEvent ); - }() ) ); - } - stickyInstances.push( sticky ); -} - -/** - * @param {StickyNode} sticky - */ -function deregister( sticky ) { - var index = $.inArray( sticky ); - if( index ) { - stickyInstances.splice( index, 1 ); - } - if( !stickyInstances.length ) { - $window.off( '.' + PLUGIN_NAME ); - } -} /** * @constructor @@ -133,10 +107,14 @@
[MediaWiki-commits] [Gerrit] removing all the mw-relate overrides - change (operations/puppet)
Giuseppe Lavagetto has uploaded a new change for review. https://gerrit.wikimedia.org/r/172989 Change subject: removing all the mw-relate overrides .. removing all the mw-relate overrides Change-Id: Ia28546a5fe572d960934031a22c7865c8de8593b --- D hieradata/hosts/mw1018.yaml D hieradata/hosts/mw1019.yaml D hieradata/hosts/mw1020.yaml D hieradata/hosts/mw1021.yaml D hieradata/hosts/mw1022.yaml D hieradata/hosts/mw1023.yaml D hieradata/hosts/mw1024.yaml D hieradata/hosts/mw1025.yaml D hieradata/hosts/mw1026.yaml D hieradata/hosts/mw1027.yaml D hieradata/hosts/mw1028.yaml D hieradata/hosts/mw1029.yaml D hieradata/hosts/mw1030.yaml D hieradata/hosts/mw1031.yaml D hieradata/hosts/mw1032.yaml D hieradata/hosts/mw1033.yaml D hieradata/hosts/mw1034.yaml D hieradata/hosts/mw1035.yaml D hieradata/hosts/mw1036.yaml D hieradata/hosts/mw1037.yaml D hieradata/hosts/mw1038.yaml D hieradata/hosts/mw1039.yaml D hieradata/hosts/mw1040.yaml D hieradata/hosts/mw1041.yaml D hieradata/hosts/mw1042.yaml D hieradata/hosts/mw1043.yaml D hieradata/hosts/mw1044.yaml D hieradata/hosts/mw1045.yaml D hieradata/hosts/mw1046.yaml D hieradata/hosts/mw1047.yaml D hieradata/hosts/mw1048.yaml D hieradata/hosts/mw1049.yaml D hieradata/hosts/mw1050.yaml D hieradata/hosts/mw1051.yaml D hieradata/hosts/mw1052.yaml D hieradata/hosts/mw1053.yaml D hieradata/hosts/mw1054.yaml D hieradata/hosts/mw1055.yaml D hieradata/hosts/mw1056.yaml D hieradata/hosts/mw1057.yaml D hieradata/hosts/mw1058.yaml D hieradata/hosts/mw1059.yaml D hieradata/hosts/mw1060.yaml D hieradata/hosts/mw1061.yaml D hieradata/hosts/mw1062.yaml D hieradata/hosts/mw1063.yaml D hieradata/hosts/mw1064.yaml D hieradata/hosts/mw1065.yaml D hieradata/hosts/mw1066.yaml D hieradata/hosts/mw1067.yaml D hieradata/hosts/mw1068.yaml D hieradata/hosts/mw1069.yaml D hieradata/hosts/mw1070.yaml D hieradata/hosts/mw1071.yaml D hieradata/hosts/mw1072.yaml D hieradata/hosts/mw1073.yaml D hieradata/hosts/mw1074.yaml D hieradata/hosts/mw1075.yaml D hieradata/hosts/mw1076.yaml D hieradata/hosts/mw1077.yaml D hieradata/hosts/mw1078.yaml D hieradata/hosts/mw1079.yaml D hieradata/hosts/mw1080.yaml D hieradata/hosts/mw1081.yaml D hieradata/hosts/mw1082.yaml D hieradata/hosts/mw1083.yaml D hieradata/hosts/mw1084.yaml D hieradata/hosts/mw1085.yaml D hieradata/hosts/mw1086.yaml D hieradata/hosts/mw1087.yaml D hieradata/hosts/mw1088.yaml D hieradata/hosts/mw1089.yaml D hieradata/hosts/mw1090.yaml D hieradata/hosts/mw1091.yaml D hieradata/hosts/mw1092.yaml D hieradata/hosts/mw1093.yaml D hieradata/hosts/mw1094.yaml D hieradata/hosts/mw1095.yaml D hieradata/hosts/mw1096.yaml D hieradata/hosts/mw1097.yaml D hieradata/hosts/mw1098.yaml D hieradata/hosts/mw1099.yaml D hieradata/hosts/mw1100.yaml D hieradata/hosts/mw1101.yaml D hieradata/hosts/mw1102.yaml D hieradata/hosts/mw1103.yaml D hieradata/hosts/mw1104.yaml D hieradata/hosts/mw1105.yaml D hieradata/hosts/mw1106.yaml D hieradata/hosts/mw1107.yaml D hieradata/hosts/mw1108.yaml D hieradata/hosts/mw1109.yaml D hieradata/hosts/mw1110.yaml D hieradata/hosts/mw.yaml D hieradata/hosts/mw1112.yaml D hieradata/hosts/mw1113.yaml D hieradata/hosts/mw1114.yaml D hieradata/hosts/mw1115.yaml D hieradata/hosts/mw1116.yaml D hieradata/hosts/mw1117.yaml D hieradata/hosts/mw1118.yaml D hieradata/hosts/mw1119.yaml D hieradata/hosts/mw1120.yaml D hieradata/hosts/mw1121.yaml D hieradata/hosts/mw1122.yaml D hieradata/hosts/mw1123.yaml D hieradata/hosts/mw1124.yaml D hieradata/hosts/mw1125.yaml D hieradata/hosts/mw1126.yaml D hieradata/hosts/mw1127.yaml D hieradata/hosts/mw1128.yaml D hieradata/hosts/mw1129.yaml D hieradata/hosts/mw1130.yaml D hieradata/hosts/mw1131.yaml D hieradata/hosts/mw1132.yaml D hieradata/hosts/mw1133.yaml D hieradata/hosts/mw1134.yaml D hieradata/hosts/mw1135.yaml D hieradata/hosts/mw1136.yaml D hieradata/hosts/mw1137.yaml D hieradata/hosts/mw1138.yaml D hieradata/hosts/mw1139.yaml D hieradata/hosts/mw1140.yaml D hieradata/hosts/mw1141.yaml D hieradata/hosts/mw1142.yaml D hieradata/hosts/mw1143.yaml D hieradata/hosts/mw1144.yaml D hieradata/hosts/mw1145.yaml D hieradata/hosts/mw1146.yaml D hieradata/hosts/mw1147.yaml D hieradata/hosts/mw1148.yaml D hieradata/hosts/mw1149.yaml D hieradata/hosts/mw1150.yaml D hieradata/hosts/mw1151.yaml D hieradata/hosts/mw1152.yaml D hieradata/hosts/mw1153.yaml D hieradata/hosts/mw1154.yaml D hieradata/hosts/mw1155.yaml D hieradata/hosts/mw1156.yaml D hieradata/hosts/mw1157.yaml D hieradata/hosts/mw1158.yaml D hieradata/hosts/mw1159.yaml D hieradata/hosts/mw1160.yaml D hieradata/hosts/mw1161.yaml D hieradata/hosts/mw1162.yaml D hieradata/hosts/mw1164.yaml D hieradata/hosts/mw1165.yaml D hieradata/hosts/mw1166.yaml D hieradata/hosts/mw1167.yaml D hieradata/hosts/mw1168.yaml D hieradata/hosts/mw1169.yaml D hieradata/hosts/mw1170.yaml D hieradata/hosts/mw1171.yaml D hieradata/hosts/mw1172.yaml D hieradata/hosts/mw1173.yaml D hieradata/hosts/mw1174.yaml
[MediaWiki-commits] [Gerrit] start rationalizing the hieradata directories by using regex... - change (operations/puppet)
Giuseppe Lavagetto has uploaded a new change for review. https://gerrit.wikimedia.org/r/172988 Change subject: start rationalizing the hieradata directories by using regex.yaml .. start rationalizing the hieradata directories by using regex.yaml Change-Id: I5be5f32b83659dc18ad88b423f3dba65f963a389 --- D hieradata/hosts/mw1017.yaml A hieradata/regex.yaml 2 files changed, 41 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/88/172988/1 diff --git a/hieradata/hosts/mw1017.yaml b/hieradata/hosts/mw1017.yaml deleted file mode 100644 index e30aca3..000 --- a/hieradata/hosts/mw1017.yaml +++ /dev/null @@ -1 +0,0 @@ -mainrole: appserver_hhvm diff --git a/hieradata/regex.yaml b/hieradata/regex.yaml new file mode 100644 index 000..f537019 --- /dev/null +++ b/hieradata/regex.yaml @@ -0,0 +1,41 @@ +# mw1017-1032, mw1053 are apaches (trusty) +hhvm_appservers: + __regex: !ruby/regexp /^mw10(1[7-9]|2[0-9]|3[0-2]|53)\.eqiad\.wmnet$/ + mainrole: appserver_hhvm + admin::groups: +- deployment + +#mw1033-mw1113 are are api apaches (precise) +appservers_1: + __regex: !ruby/regexp /^mw1(03[3-9]|0[4-9][0-9]|10[0-9]|11[0-3])\.eqiad\.wmnet$/ + mainrole: appserver + admin::groups: +- deployment + +# mw1114-1148 are api apaches (precise) +api_1: + __regex: !ruby/regexp /^mw11(1[4-9]|[23][0-9]|4[0-8])\.eqiad\.wmnet$/ + mainrole: api_appserver + admin::groups: +- deployment + +# mw1149-1152 are apaches (precise) +appservers_2: + __regex: !ruby/regexp /^mw11(49|5[0-2])\.eqiad\.wmnet$/ + mainrole: appserver + admin::groups: +- deployment + +# mw1161-1188 are apaches (precise) +appservers_3: + __regex: !ruby/regexp /^mw11(6[1-9]|7[0-9]|8[0-8])\.eqiad\.wmnet$/ + mainrole: appserver + admin::groups: +- deployment + +# mw1189-1208 are api apaches (precise) +api_2: + __regex: !ruby/regexp /^mw1(189|19[0-9]|20[0-8])\.eqiad\.wmnet$/ + mainrole: api_appserver + admin::groups: +- deployment -- To view, visit https://gerrit.wikimedia.org/r/172988 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5be5f32b83659dc18ad88b423f3dba65f963a389 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add missing colon to centralauth-log-gblrename-oldname message - change (mediawiki...CentralAuth)
jenkins-bot has submitted this change and it was merged. Change subject: Add missing colon to centralauth-log-gblrename-oldname message .. Add missing colon to centralauth-log-gblrename-oldname message Change-Id: Iee78e8706f461d352c48d6daa7b021eb2b27e86c --- M i18n/en.json 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Hoo man: Looks good to me, approved jenkins-bot: Verified diff --git a/i18n/en.json b/i18n/en.json index 01ed1d8..86018cb 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -526,5 +526,5 @@ apihelp-setglobalaccountstatus-param-statecheck: Optional MD5 of the expected current username:hidden:locked, to detect edit conflicts. Set locked to 1 for locked, 0 for unlocked., apihelp-setglobalaccountstatus-example-1: Lock the global account for [[User:Example]] with reason \Spam\, apihelp-setglobalaccountstatus-example-2: Unlock and suppress the global account for [[User:Example]] with reason \I can\, - centralauth-log-gblrename-oldname: Previous username + centralauth-log-gblrename-oldname: Previous username: } -- To view, visit https://gerrit.wikimedia.org/r/172927 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iee78e8706f461d352c48d6daa7b021eb2b27e86c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CentralAuth Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: Hoo man h...@online.de Gerrit-Reviewer: Siebrand siebr...@kitano.nl 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 singleton pattern from TemplateRegistry - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Remove singleton pattern from TemplateRegistry .. Remove singleton pattern from TemplateRegistry This also defers template registration up until they are actually used. Change-Id: Ieffe710451bb4645b996df2167a4105a349c0d06 --- M repo/Wikibase.php A repo/includes/GlobalFunctions.php M repo/includes/TemplateRegistry.php M repo/includes/WikibaseRepo.php M repo/includes/modules/TemplateModule.php 5 files changed, 54 insertions(+), 54 deletions(-) Approvals: Thiemo Mättig (WMDE): Looks good to me, approved jenkins-bot: Verified diff --git a/repo/Wikibase.php b/repo/Wikibase.php index 4096d67..ed531d3 100644 --- a/repo/Wikibase.php +++ b/repo/Wikibase.php @@ -220,43 +220,6 @@ $wgHooks['BaseTemplateToolbox'][] = 'Wikibase\RepoHooks::onBaseTemplateToolbox'; $wgHooks['SkinTemplateBuildNavUrlsNav_urlsAfterPermalink'][] = 'Wikibase\RepoHooks::onSkinTemplateBuildNavUrlsNav_urlsAfterPermalink'; - /** -* Called when setup is done. This is somewhat ugly, find a better time to register templates. -* @see https://www.mediawiki.org/wiki/Manual:Hooks/SetupAfterCache -* -* @return bool -*/ - $wgHooks['SetupAfterCache'][] = function() { - \Wikibase\TemplateRegistry::singleton()-addTemplates( include( __DIR__ . /resources/templates.php ) ); - return true; - }; - - /** -* Shorthand function to retrieve a template filled with the specified parameters. -* -* important! note that the Template class does not escape anything. -* be sure to escape your params before using this function! -* -* @since 0.2 -* -* @param $key string template key -* Varargs: normal template parameters -* -* @return string -*/ - function wfTemplate( $key /*...*/ ) { - $params = func_get_args(); - array_shift( $params ); - - if ( isset( $params[0] ) is_array( $params[0] ) ) { - $params = $params[0]; - } - - $template = new \Wikibase\Template( \Wikibase\TemplateRegistry::singleton(), $key, $params ); - - return $template-render(); - } - // Resource Loader Modules: $wgResourceModules = array_merge( $wgResourceModules, include( __DIR__ . /resources/Resources.php ) ); @@ -268,4 +231,6 @@ if ( defined( 'WB_EXPERIMENTAL_FEATURES' ) WB_EXPERIMENTAL_FEATURES ) { include_once( __DIR__ . '/config/Wikibase.experimental.php' ); } + + require __DIR__ . '/includes/GlobalFunctions.php'; } ); diff --git a/repo/includes/GlobalFunctions.php b/repo/includes/GlobalFunctions.php new file mode 100644 index 000..280026c --- /dev/null +++ b/repo/includes/GlobalFunctions.php @@ -0,0 +1,35 @@ +?php + +use Wikibase\Repo\WikibaseRepo; +use Wikibase\Template; + +/** + * @license GNU GPL v2+ + * @author H. Snater mediaw...@snater.com + */ + +/** + * Shorthand function to retrieve a template filled with the specified parameters. + * + * important! note that the Template class does not escape anything. + * be sure to escape your params before using this function! + * + * @since 0.2 + * + * @param $key string template key + * Varargs: normal template parameters + * + * @return string + */ +function wfTemplate( $key /*...*/ ) { + $params = func_get_args(); + array_shift( $params ); + + if ( isset( $params[0] ) is_array( $params[0] ) ) { + $params = $params[0]; + } + + $template = new Template( WikibaseRepo::getDefaultInstance()-getTemplateRegistry(), $key, $params ); + + return $template-render(); +} diff --git a/repo/includes/TemplateRegistry.php b/repo/includes/TemplateRegistry.php index 07285b2..f1afaa9 100644 --- a/repo/includes/TemplateRegistry.php +++ b/repo/includes/TemplateRegistry.php @@ -60,19 +60,4 @@ $this-templates[$key] = str_replace( \t, '', $snippet ); } - /** -* Singleton pattern integration. -* -* @return TemplateRegistry -*/ - public static function singleton() { - static $instance = false; - - if ( $instance === false ) { - $instance = new static(); - } - - return $instance; - } - -} \ No newline at end of file +} diff --git a/repo/includes/WikibaseRepo.php b/repo/includes/WikibaseRepo.php index 19d7cf7..4293bc8 100644 --- a/repo/includes/WikibaseRepo.php +++ b/repo/includes/WikibaseRepo.php @@ -70,6 +70,7 @@ use Wikibase\Store; use Wikibase\StringNormalizer; use Wikibase\SummaryFormatter; +use Wikibase\TemplateRegistry; use Wikibase\Utils; use Wikibase\Validators\EntityConstraintProvider; use
[MediaWiki-commits] [Gerrit] start rationalizing the hieradata directories by using regex... - change (operations/puppet)
Giuseppe Lavagetto has submitted this change and it was merged. Change subject: start rationalizing the hieradata directories by using regex.yaml .. start rationalizing the hieradata directories by using regex.yaml Change-Id: I5be5f32b83659dc18ad88b423f3dba65f963a389 --- D hieradata/hosts/mw1017.yaml A hieradata/regex.yaml 2 files changed, 41 insertions(+), 1 deletion(-) Approvals: Giuseppe Lavagetto: Verified; Looks good to me, approved diff --git a/hieradata/hosts/mw1017.yaml b/hieradata/hosts/mw1017.yaml deleted file mode 100644 index e30aca3..000 --- a/hieradata/hosts/mw1017.yaml +++ /dev/null @@ -1 +0,0 @@ -mainrole: appserver_hhvm diff --git a/hieradata/regex.yaml b/hieradata/regex.yaml new file mode 100644 index 000..f537019 --- /dev/null +++ b/hieradata/regex.yaml @@ -0,0 +1,41 @@ +# mw1017-1032, mw1053 are apaches (trusty) +hhvm_appservers: + __regex: !ruby/regexp /^mw10(1[7-9]|2[0-9]|3[0-2]|53)\.eqiad\.wmnet$/ + mainrole: appserver_hhvm + admin::groups: +- deployment + +#mw1033-mw1113 are are api apaches (precise) +appservers_1: + __regex: !ruby/regexp /^mw1(03[3-9]|0[4-9][0-9]|10[0-9]|11[0-3])\.eqiad\.wmnet$/ + mainrole: appserver + admin::groups: +- deployment + +# mw1114-1148 are api apaches (precise) +api_1: + __regex: !ruby/regexp /^mw11(1[4-9]|[23][0-9]|4[0-8])\.eqiad\.wmnet$/ + mainrole: api_appserver + admin::groups: +- deployment + +# mw1149-1152 are apaches (precise) +appservers_2: + __regex: !ruby/regexp /^mw11(49|5[0-2])\.eqiad\.wmnet$/ + mainrole: appserver + admin::groups: +- deployment + +# mw1161-1188 are apaches (precise) +appservers_3: + __regex: !ruby/regexp /^mw11(6[1-9]|7[0-9]|8[0-8])\.eqiad\.wmnet$/ + mainrole: appserver + admin::groups: +- deployment + +# mw1189-1208 are api apaches (precise) +api_2: + __regex: !ruby/regexp /^mw1(189|19[0-9]|20[0-8])\.eqiad\.wmnet$/ + mainrole: api_appserver + admin::groups: +- deployment -- To view, visit https://gerrit.wikimedia.org/r/172988 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5be5f32b83659dc18ad88b423f3dba65f963a389 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org Gerrit-Reviewer: Giuseppe Lavagetto glavage...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] swift: throttle object-auditor - change (operations/puppet)
Filippo Giunchedi has uploaded a new change for review. https://gerrit.wikimedia.org/r/172990 Change subject: swift: throttle object-auditor .. swift: throttle object-auditor we've observed high iops from the object auditor while scanning disks, thus throttle file/bandwidth scanning from the defaults (20 files/s, 10MB/s). Change-Id: Id68dbfe120e485d9b65994488ac936146cd0cf46 --- M modules/swift_new/templates/object-server.conf.erb M templates/swift/etc.swift.object-server.conf.erb 2 files changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/90/172990/1 diff --git a/modules/swift_new/templates/object-server.conf.erb b/modules/swift_new/templates/object-server.conf.erb index 232c029..676c530 100644 --- a/modules/swift_new/templates/object-server.conf.erb +++ b/modules/swift_new/templates/object-server.conf.erb @@ -33,3 +33,5 @@ concurrency = 1 [object-auditor] +files_per_second = 5 +bytes_per_second = 500 diff --git a/templates/swift/etc.swift.object-server.conf.erb b/templates/swift/etc.swift.object-server.conf.erb index 232c029..676c530 100644 --- a/templates/swift/etc.swift.object-server.conf.erb +++ b/templates/swift/etc.swift.object-server.conf.erb @@ -33,3 +33,5 @@ concurrency = 1 [object-auditor] +files_per_second = 5 +bytes_per_second = 500 -- To view, visit https://gerrit.wikimedia.org/r/172990 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id68dbfe120e485d9b65994488ac936146cd0cf46 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Filippo Giunchedi fgiunch...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] SpecialRecentchanges: Repair recentchangestext in content la... - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: SpecialRecentchanges: Repair recentchangestext in content language .. SpecialRecentchanges: Repair recentchangestext in content language * Use getHtmlCode() instead of getCode() to generate a BCP 47 conform HTML lang attribute. * Use div instead of p because the p gets rendered as p lang=en dir=ltr/p pText/p p/p and the div gets rendered as div lang=en dir=ltr pText/p /div * Set $lineStart = true Change-Id: I62ce26ba550fb25bc2e770186cea3435374bb4e6 --- M includes/specials/SpecialRecentchanges.php 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Nikerabbit: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/specials/SpecialRecentchanges.php b/includes/specials/SpecialRecentchanges.php index e6d8f1c..58b51b3 100644 --- a/includes/specials/SpecialRecentchanges.php +++ b/includes/specials/SpecialRecentchanges.php @@ -440,11 +440,11 @@ $message = $this-msg( 'recentchangestext' )-inContentLanguage(); if ( !$message-isDisabled() ) { $this-getOutput()-addWikiText( - Html::rawElement( 'p', - array( 'lang' = $wgContLang-getCode(), 'dir' = $wgContLang-getDir() ), + Html::rawElement( 'div', + array( 'lang' = $wgContLang-getHtmlCode(), 'dir' = $wgContLang-getDir() ), \n . $message-plain() . \n ), - /* $lineStart */ false, + /* $lineStart */ true, /* $interface */ false ); } -- To view, visit https://gerrit.wikimedia.org/r/172814 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I62ce26ba550fb25bc2e770186cea3435374bb4e6 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader gerritpatchuploa...@gmail.com Gerrit-Reviewer: Fomafix Gerrit-Reviewer: Gerrit Patch Uploader gerritpatchuploa...@gmail.com Gerrit-Reviewer: Nemo bis federicol...@tiscali.it Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Reenable regexes now that we've fixed the plugin - change (operations/mediawiki-config)
Manybubbles has uploaded a new change for review. https://gerrit.wikimedia.org/r/172991 Change subject: Reenable regexes now that we've fixed the plugin .. Reenable regexes now that we've fixed the plugin Before late last night San Francisco time it was possible to send regexes that could consume all the memory on an Elasticsearch node. Now we've finished rolling out a plugin update that makes that impossible. A quick note on order of operations: to make sure there isn't any time where regexes can still overwhelm the system sync CirrusSearch-common.php first. Bug 72894 Change-Id: Id01271785d3d2e0554296b6df4acfb56c139a810 --- M wmf-config/CirrusSearch-common.php M wmf-config/CirrusSearch-production.php 2 files changed, 1 insertion(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/91/172991/1 diff --git a/wmf-config/CirrusSearch-common.php b/wmf-config/CirrusSearch-common.php index 481d9b9..81f6641 100644 --- a/wmf-config/CirrusSearch-common.php +++ b/wmf-config/CirrusSearch-common.php @@ -57,7 +57,7 @@ $wgCirrusSearchWikimediaExtraPlugin = array( 'regex' = array( 'build', - // 'use', - disabled on suspicion of causing issues + 'use', ), ); diff --git a/wmf-config/CirrusSearch-production.php b/wmf-config/CirrusSearch-production.php index 4ed742b..0ae8923 100644 --- a/wmf-config/CirrusSearch-production.php +++ b/wmf-config/CirrusSearch-production.php @@ -10,7 +10,6 @@ ); $wgCirrusSearchConnectionAttempts = 3; -$wgCirrusSearchEnableRegex = false; $wgCirrusSearchBackup['backups'] = array( 'type' = 'swift', -- To view, visit https://gerrit.wikimedia.org/r/172991 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id01271785d3d2e0554296b6df4acfb56c139a810 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Manybubbles never...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Style links in Overlay header like buttons - change (mediawiki...MobileFrontend)
Florianschmidtwelzow has uploaded a new change for review. https://gerrit.wikimedia.org/r/172992 Change subject: Style links in Overlay header like buttons .. Style links in Overlay header like buttons Bug: 73243 Change-Id: I6bcb9755376591d80bb0b4446a2af055a9a46d89 --- M less/Overlay.less M templates/OverlayHeader.hogan 2 files changed, 13 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/92/172992/1 diff --git a/less/Overlay.less b/less/Overlay.less index f6c2556..547610a 100644 --- a/less/Overlay.less +++ b/less/Overlay.less @@ -181,6 +181,17 @@ opacity: .5; } } + + .headerButton { + display: table; + a { + vertical-align: middle; + display: table-cell; + height: @headerHeight; + white-space: nowrap; + text-decoration: none; + } + } } .continue { diff --git a/templates/OverlayHeader.hogan b/templates/OverlayHeader.hogan index 4efb619..bfd6f90 100644 --- a/templates/OverlayHeader.hogan +++ b/templates/OverlayHeader.hogan @@ -8,8 +8,8 @@ div class={{headerButtonsListClassName}} {{#headerButtons}} {{^href}}button{{/href}} - {{#href}}a href={{href}}{{/href}} - class={{className}}{{msg}}{{^href}}/button{{/href}}{{#href}}/a{{/href}} + {{#href}}div class=headerButtona href={{href}}{{/href}} + class={{className}}{{msg}}{{^href}}/button{{/href}}{{#href}}/a/div{{/href}} {{/headerButtons}} /div {{/headerButtons}} -- To view, visit https://gerrit.wikimedia.org/r/172992 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6bcb9755376591d80bb0b4446a2af055a9a46d89 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Florianschmidtwelzow florian.schmidt.wel...@t-online.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Enable VisualEditor by default on Tagalog Wikipedia - change (operations/mediawiki-config)
Jforrester has uploaded a new change for review. https://gerrit.wikimedia.org/r/172993 Change subject: Enable VisualEditor by default on Tagalog Wikipedia .. Enable VisualEditor by default on Tagalog Wikipedia Bug: 73365 Change-Id: Icfbdbf2feb4389e0f1c04cc47aa3fd290c3285b1 --- M visualeditor-default.dblist 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/93/172993/1 diff --git a/visualeditor-default.dblist b/visualeditor-default.dblist index 5067134..b21f9f6 100644 --- a/visualeditor-default.dblist +++ b/visualeditor-default.dblist @@ -139,6 +139,7 @@ suwiki svwiki swwiki +tlwiki tnwiki towiki tpiwiki -- To view, visit https://gerrit.wikimedia.org/r/172993 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icfbdbf2feb4389e0f1c04cc47aa3fd290c3285b1 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Jforrester jforres...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] removing all the mw-relate overrides - change (operations/puppet)
Giuseppe Lavagetto has submitted this change and it was merged. Change subject: removing all the mw-relate overrides .. removing all the mw-relate overrides Change-Id: Ia28546a5fe572d960934031a22c7865c8de8593b --- D hieradata/hosts/mw1018.yaml D hieradata/hosts/mw1019.yaml D hieradata/hosts/mw1020.yaml D hieradata/hosts/mw1021.yaml D hieradata/hosts/mw1022.yaml D hieradata/hosts/mw1023.yaml D hieradata/hosts/mw1024.yaml D hieradata/hosts/mw1025.yaml D hieradata/hosts/mw1026.yaml D hieradata/hosts/mw1027.yaml D hieradata/hosts/mw1028.yaml D hieradata/hosts/mw1029.yaml D hieradata/hosts/mw1030.yaml D hieradata/hosts/mw1031.yaml D hieradata/hosts/mw1032.yaml D hieradata/hosts/mw1033.yaml D hieradata/hosts/mw1034.yaml D hieradata/hosts/mw1035.yaml D hieradata/hosts/mw1036.yaml D hieradata/hosts/mw1037.yaml D hieradata/hosts/mw1038.yaml D hieradata/hosts/mw1039.yaml D hieradata/hosts/mw1040.yaml D hieradata/hosts/mw1041.yaml D hieradata/hosts/mw1042.yaml D hieradata/hosts/mw1043.yaml D hieradata/hosts/mw1044.yaml D hieradata/hosts/mw1045.yaml D hieradata/hosts/mw1046.yaml D hieradata/hosts/mw1047.yaml D hieradata/hosts/mw1048.yaml D hieradata/hosts/mw1049.yaml D hieradata/hosts/mw1050.yaml D hieradata/hosts/mw1051.yaml D hieradata/hosts/mw1052.yaml D hieradata/hosts/mw1053.yaml D hieradata/hosts/mw1054.yaml D hieradata/hosts/mw1055.yaml D hieradata/hosts/mw1056.yaml D hieradata/hosts/mw1057.yaml D hieradata/hosts/mw1058.yaml D hieradata/hosts/mw1059.yaml D hieradata/hosts/mw1060.yaml D hieradata/hosts/mw1061.yaml D hieradata/hosts/mw1062.yaml D hieradata/hosts/mw1063.yaml D hieradata/hosts/mw1064.yaml D hieradata/hosts/mw1065.yaml D hieradata/hosts/mw1066.yaml D hieradata/hosts/mw1067.yaml D hieradata/hosts/mw1068.yaml D hieradata/hosts/mw1069.yaml D hieradata/hosts/mw1070.yaml D hieradata/hosts/mw1071.yaml D hieradata/hosts/mw1072.yaml D hieradata/hosts/mw1073.yaml D hieradata/hosts/mw1074.yaml D hieradata/hosts/mw1075.yaml D hieradata/hosts/mw1076.yaml D hieradata/hosts/mw1077.yaml D hieradata/hosts/mw1078.yaml D hieradata/hosts/mw1079.yaml D hieradata/hosts/mw1080.yaml D hieradata/hosts/mw1081.yaml D hieradata/hosts/mw1082.yaml D hieradata/hosts/mw1083.yaml D hieradata/hosts/mw1084.yaml D hieradata/hosts/mw1085.yaml D hieradata/hosts/mw1086.yaml D hieradata/hosts/mw1087.yaml D hieradata/hosts/mw1088.yaml D hieradata/hosts/mw1089.yaml D hieradata/hosts/mw1090.yaml D hieradata/hosts/mw1091.yaml D hieradata/hosts/mw1092.yaml D hieradata/hosts/mw1093.yaml D hieradata/hosts/mw1094.yaml D hieradata/hosts/mw1095.yaml D hieradata/hosts/mw1096.yaml D hieradata/hosts/mw1097.yaml D hieradata/hosts/mw1098.yaml D hieradata/hosts/mw1099.yaml D hieradata/hosts/mw1100.yaml D hieradata/hosts/mw1101.yaml D hieradata/hosts/mw1102.yaml D hieradata/hosts/mw1103.yaml D hieradata/hosts/mw1104.yaml D hieradata/hosts/mw1105.yaml D hieradata/hosts/mw1106.yaml D hieradata/hosts/mw1107.yaml D hieradata/hosts/mw1108.yaml D hieradata/hosts/mw1109.yaml D hieradata/hosts/mw1110.yaml D hieradata/hosts/mw.yaml D hieradata/hosts/mw1112.yaml D hieradata/hosts/mw1113.yaml D hieradata/hosts/mw1114.yaml D hieradata/hosts/mw1115.yaml D hieradata/hosts/mw1116.yaml D hieradata/hosts/mw1117.yaml D hieradata/hosts/mw1118.yaml D hieradata/hosts/mw1119.yaml D hieradata/hosts/mw1120.yaml D hieradata/hosts/mw1121.yaml D hieradata/hosts/mw1122.yaml D hieradata/hosts/mw1123.yaml D hieradata/hosts/mw1124.yaml D hieradata/hosts/mw1125.yaml D hieradata/hosts/mw1126.yaml D hieradata/hosts/mw1127.yaml D hieradata/hosts/mw1128.yaml D hieradata/hosts/mw1129.yaml D hieradata/hosts/mw1130.yaml D hieradata/hosts/mw1131.yaml D hieradata/hosts/mw1132.yaml D hieradata/hosts/mw1133.yaml D hieradata/hosts/mw1134.yaml D hieradata/hosts/mw1135.yaml D hieradata/hosts/mw1136.yaml D hieradata/hosts/mw1137.yaml D hieradata/hosts/mw1138.yaml D hieradata/hosts/mw1139.yaml D hieradata/hosts/mw1140.yaml D hieradata/hosts/mw1141.yaml D hieradata/hosts/mw1142.yaml D hieradata/hosts/mw1143.yaml D hieradata/hosts/mw1144.yaml D hieradata/hosts/mw1145.yaml D hieradata/hosts/mw1146.yaml D hieradata/hosts/mw1147.yaml D hieradata/hosts/mw1148.yaml D hieradata/hosts/mw1149.yaml D hieradata/hosts/mw1150.yaml D hieradata/hosts/mw1151.yaml D hieradata/hosts/mw1152.yaml D hieradata/hosts/mw1153.yaml D hieradata/hosts/mw1154.yaml D hieradata/hosts/mw1155.yaml D hieradata/hosts/mw1156.yaml D hieradata/hosts/mw1157.yaml D hieradata/hosts/mw1158.yaml D hieradata/hosts/mw1159.yaml D hieradata/hosts/mw1160.yaml D hieradata/hosts/mw1161.yaml D hieradata/hosts/mw1162.yaml D hieradata/hosts/mw1164.yaml D hieradata/hosts/mw1165.yaml D hieradata/hosts/mw1166.yaml D hieradata/hosts/mw1167.yaml D hieradata/hosts/mw1168.yaml D hieradata/hosts/mw1169.yaml D hieradata/hosts/mw1170.yaml D hieradata/hosts/mw1171.yaml D hieradata/hosts/mw1172.yaml D hieradata/hosts/mw1173.yaml D hieradata/hosts/mw1174.yaml D hieradata/hosts/mw1175.yaml D
[MediaWiki-commits] [Gerrit] swift: throttle object-auditor - change (operations/puppet)
Filippo Giunchedi has submitted this change and it was merged. Change subject: swift: throttle object-auditor .. swift: throttle object-auditor we've observed high iops from the object auditor while scanning disks, thus throttle file/bandwidth scanning from the defaults (20 files/s, 10MB/s). Change-Id: Id68dbfe120e485d9b65994488ac936146cd0cf46 --- M modules/swift_new/templates/object-server.conf.erb M templates/swift/etc.swift.object-server.conf.erb 2 files changed, 4 insertions(+), 0 deletions(-) Approvals: Filippo Giunchedi: Verified; Looks good to me, approved Faidon Liambotis: Looks good to me, approved diff --git a/modules/swift_new/templates/object-server.conf.erb b/modules/swift_new/templates/object-server.conf.erb index 232c029..676c530 100644 --- a/modules/swift_new/templates/object-server.conf.erb +++ b/modules/swift_new/templates/object-server.conf.erb @@ -33,3 +33,5 @@ concurrency = 1 [object-auditor] +files_per_second = 5 +bytes_per_second = 500 diff --git a/templates/swift/etc.swift.object-server.conf.erb b/templates/swift/etc.swift.object-server.conf.erb index 232c029..676c530 100644 --- a/templates/swift/etc.swift.object-server.conf.erb +++ b/templates/swift/etc.swift.object-server.conf.erb @@ -33,3 +33,5 @@ concurrency = 1 [object-auditor] +files_per_second = 5 +bytes_per_second = 500 -- To view, visit https://gerrit.wikimedia.org/r/172990 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id68dbfe120e485d9b65994488ac936146cd0cf46 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Filippo Giunchedi fgiunch...@wikimedia.org Gerrit-Reviewer: Faidon Liambotis fai...@wikimedia.org Gerrit-Reviewer: Filippo Giunchedi fgiunch...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] phab update tag - change (operations/puppet)
Rush has uploaded a new change for review. https://gerrit.wikimedia.org/r/172994 Change subject: phab update tag .. phab update tag refs T1203 I tested this on the fabapi.eqiad.wmflabs instance in labs and all seems well even though the schema changes take awhile. Change-Id: Idbc167ec57c523e7529c281a742b63039a9506a4 --- M manifests/role/phabricator.pp 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/94/172994/1 diff --git a/manifests/role/phabricator.pp b/manifests/role/phabricator.pp index c57952c..f35239b 100644 --- a/manifests/role/phabricator.pp +++ b/manifests/role/phabricator.pp @@ -41,7 +41,7 @@ system::role { 'role::phabricator::main': description = 'Phabricator (Main)' } -$current_tag = 'wmoauth' +$current_tag = 'wmoauth-20141110' $domain = 'phabricator.wikimedia.org' class { '::phabricator': git_tag = $current_tag, @@ -123,7 +123,7 @@ #pass not sensitive but has to match phab and db $mysqlpass = 'labspass' -$current_tag = 'wmoauth' +$current_tag = 'wmoauth-20141110' class { '::phabricator': git_tag = $current_tag, lock_file= '/var/run/phab_repo_lock', -- To view, visit https://gerrit.wikimedia.org/r/172994 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idbc167ec57c523e7529c281a742b63039a9506a4 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Rush r...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki.ParsoidConfig.js: Add new language code mai - change (mediawiki...parsoid)
Jforrester has uploaded a new change for review. https://gerrit.wikimedia.org/r/172995 Change subject: mediawiki.ParsoidConfig.js: Add new language code mai .. mediawiki.ParsoidConfig.js: Add new language code mai Change-Id: Id5c7091d81cf35a861eddac53e8a850edfee990f --- M lib/mediawiki.ParsoidConfig.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid refs/changes/95/172995/1 diff --git a/lib/mediawiki.ParsoidConfig.js b/lib/mediawiki.ParsoidConfig.js index 01618e1..feb81bf 100644 --- a/lib/mediawiki.ParsoidConfig.js +++ b/lib/mediawiki.ParsoidConfig.js @@ -9,7 +9,7 @@ Cite = require('./ext.Cite.js').Cite, Util = require('./mediawiki.Util.js').Util; -var languages = en|de|fr|nl|it|pl|es|ru|ja|pt|zh|sv|vi|uk|ca|no|fi|cs|hu|ko|fa|id|tr|ro|ar|sk|eo|da|sr|lt|ms|eu|he|sl|bg|kk|vo|war|hr|hi|et|az|gl|simple|nn|la|th|el|new|roa-rup|oc|sh|ka|mk|tl|ht|pms|te|ta|be-x-old|ceb|br|be|lv|sq|jv|mg|cy|lb|mr|is|bs|yo|an|hy|fy|bpy|lmo|pnb|ml|sw|bn|io|af|gu|zh-yue|ne|nds|ku|ast|ur|scn|su|qu|diq|ba|tt|my|ga|cv|ia|nap|bat-smg|map-bms|wa|kn|als|am|bug|tg|gd|zh-min-nan|yi|vec|hif|sco|roa-tara|os|arz|nah|uz|sah|mn|sa|mzn|pam|hsb|mi|li|ky|si|co|gan|glk|ckb|bo|fo|bar|bcl|ilo|mrj|fiu-vro|nds-nl|tk|vls|se|gv|ps|rue|dv|nrm|pag|koi|pa|rm|km|kv|udm|csb|mhr|fur|mt|wuu|lij|ug|lad|pi|zea|sc|bh|zh-classical|nov|ksh|or|ang|kw|so|nv|xmf|stq|hak|ay|frp|frr|ext|szl|pcd|ie|gag|haw|xal|ln|rw|pdc|pfl|krc|crh|eml|ace|gn|to|ce|kl|arc|myv|dsb|vep|pap|bjn|as|tpi|lbe|wo|mdf|jbo|kab|av|sn|cbk-zam|ty|srn|kbd|lo|ab|lez|mwl|ltg|ig|na|kg|tet|za|kaa|nso|zu|rmy|cu|tn|chr|got|sm|bi|mo|bm|iu|chy|ik|pih|ss|sd|pnt|cdo|ee|ha|ti|bxr|om|ks|ts|ki|ve|sg|rn|dz|cr|lg|ak|tum|fj|st|tw|ch|ny|ff|xh|ng|ii|cho|mh|aa|kj|ho|mus|kr|hz|tyv|min; +var languages = en|de|fr|nl|it|pl|es|ru|ja|pt|zh|sv|vi|uk|ca|no|fi|cs|hu|ko|fa|id|tr|ro|ar|sk|eo|da|sr|lt|ms|eu|he|sl|bg|kk|vo|war|hr|hi|et|az|gl|simple|nn|la|th|el|new|roa-rup|oc|sh|ka|mk|tl|ht|pms|te|ta|be-x-old|ceb|br|be|lv|sq|jv|mg|cy|lb|mr|is|bs|yo|an|hy|fy|bpy|lmo|pnb|ml|sw|bn|io|af|gu|zh-yue|ne|nds|ku|ast|ur|scn|su|qu|diq|ba|tt|my|ga|cv|ia|nap|bat-smg|map-bms|wa|kn|als|am|bug|tg|gd|zh-min-nan|yi|vec|hif|sco|roa-tara|os|arz|nah|uz|sah|mn|sa|mzn|pam|hsb|mi|li|ky|si|co|gan|glk|ckb|bo|fo|bar|bcl|ilo|mrj|fiu-vro|nds-nl|tk|vls|se|gv|ps|rue|dv|nrm|pag|koi|pa|rm|km|kv|udm|csb|mhr|fur|mt|wuu|lij|ug|lad|pi|zea|sc|bh|zh-classical|nov|ksh|or|ang|kw|so|nv|xmf|stq|hak|ay|frp|frr|ext|szl|pcd|ie|gag|haw|xal|ln|rw|pdc|pfl|krc|crh|eml|ace|gn|to|ce|kl|arc|myv|dsb|vep|pap|bjn|as|tpi|lbe|wo|mdf|jbo|kab|av|sn|cbk-zam|ty|srn|kbd|lo|ab|lez|mwl|ltg|ig|na|kg|tet|za|kaa|nso|zu|rmy|cu|tn|chr|got|sm|bi|mo|bm|iu|chy|ik|pih|ss|sd|pnt|cdo|ee|ha|ti|bxr|om|ks|ts|ki|ve|sg|rn|dz|cr|lg|ak|tum|fj|st|tw|ch|ny|ff|xh|ng|ii|cho|mh|aa|kj|ho|mus|kr|hz|tyv|min|mai; var interwikiMap = new Map(); var reverseIWMap = new Map(); -- To view, visit https://gerrit.wikimedia.org/r/172995 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id5c7091d81cf35a861eddac53e8a850edfee990f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/parsoid Gerrit-Branch: master Gerrit-Owner: Jforrester jforres...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Follow-up I50cb3ed: Enable VisualEditor as a Beta Feature on... - change (operations/mediawiki-config)
Jforrester has uploaded a new change for review. https://gerrit.wikimedia.org/r/172996 Change subject: Follow-up I50cb3ed: Enable VisualEditor as a Beta Feature on maiwiki .. Follow-up I50cb3ed: Enable VisualEditor as a Beta Feature on maiwiki As is standard for Wikipedias. Depends on Id5c7091d in Parsoid being deployed. Change-Id: I0c0b1c7e85a728a7dc0009ed07a31f3f072a97f7 --- M visualeditor.dblist 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/96/172996/1 diff --git a/visualeditor.dblist b/visualeditor.dblist index 666d6ea..9b5ba9f 100644 --- a/visualeditor.dblist +++ b/visualeditor.dblist @@ -154,6 +154,7 @@ ltgwiki ltwiki lvwiki +maiwiki map_bmswiki mdfwiki mgwiki -- To view, visit https://gerrit.wikimedia.org/r/172996 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0c0b1c7e85a728a7dc0009ed07a31f3f072a97f7 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Jforrester jforres...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Optimize all use sections in Repo - change (mediawiki...Wikibase)
Thiemo Mättig (WMDE) has uploaded a new change for review. https://gerrit.wikimedia.org/r/172997 Change subject: Optimize all use sections in Repo .. Optimize all use sections in Repo Stuff that's not in a namespace needs the backslash and can not be added to the use section because PHPStorm thinks it can remove this. Yes, that's probably a bug in PHPStorm but since multiple team members use it it's much easier to just do it as I did here than to wait for a bugfix. Change-Id: I8fa5b47b9c18d621cb964e7200b187b5e2d09bab --- M repo/maintenance/dumpJson.php M repo/maintenance/importProperties.php M repo/tests/phpunit/includes/ChangeOp/ChangeOpClaimTest.php M repo/tests/phpunit/includes/Diff/ClaimDifferTest.php M repo/tests/phpunit/includes/Diff/DiffViewTest.php M repo/tests/phpunit/includes/ItemDisambiguationTest.php M repo/tests/phpunit/includes/ItemMoveTest.php M repo/tests/phpunit/includes/ItemSearchTextGeneratorTest.php M repo/tests/phpunit/includes/LinkedData/EntityDataTestProvider.php M repo/tests/phpunit/includes/ParserOutputJsConfigBuilderTest.php M repo/tests/phpunit/includes/UpdateRepo/UpdateRepoOnDeleteJobTest.php M repo/tests/phpunit/includes/UpdateRepo/UpdateRepoOnMoveJobTest.php M repo/tests/phpunit/includes/View/SiteLinksViewTest.php M repo/tests/phpunit/includes/actions/EditEntityActionTest.php M repo/tests/phpunit/includes/api/ApiErrorReporterTest.php M repo/tests/phpunit/includes/api/ApiModuleTestHelper.php M repo/tests/phpunit/includes/api/ApiXmlFormatTest.php M repo/tests/phpunit/includes/api/AvailableBadgesTest.php M repo/tests/phpunit/includes/api/BotEditTest.php M repo/tests/phpunit/includes/api/IntegrationApiTest.php M repo/tests/phpunit/includes/api/WikibaseApiTestCase.php M repo/tests/phpunit/includes/store/sql/TermSqlIndexTest.php 22 files changed, 23 insertions(+), 43 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/97/172997/1 diff --git a/repo/maintenance/dumpJson.php b/repo/maintenance/dumpJson.php index 3e00b25..7996a46 100644 --- a/repo/maintenance/dumpJson.php +++ b/repo/maintenance/dumpJson.php @@ -15,10 +15,10 @@ use Wikibase\Lib\Serializers\Serializer; use Wikibase\Lib\Serializers\SerializerFactory; use Wikibase\Lib\Store\EntityLookup; -use Wikibase\Repo\Store\SQL\EntityPerPageIdPager; use Wikibase\Repo\IO\EntityIdReader; use Wikibase\Repo\IO\LineReader; use Wikibase\Repo\Store\EntityIdPager; +use Wikibase\Repo\Store\SQL\EntityPerPageIdPager; use Wikibase\Repo\WikibaseRepo; $basePath = getenv( 'MW_INSTALL_PATH' ) !== false ? getenv( 'MW_INSTALL_PATH' ) : __DIR__ . '/../../../..'; diff --git a/repo/maintenance/importProperties.php b/repo/maintenance/importProperties.php index cfd9db9..9f185f3 100644 --- a/repo/maintenance/importProperties.php +++ b/repo/maintenance/importProperties.php @@ -1,8 +1,8 @@ ?php use Wikibase\DataModel\Entity\Property; -use Wikibase\Repo\WikibaseRepo; use Wikibase\Lib\Store\EntityStore; +use Wikibase\Repo\WikibaseRepo; /** * Maintenance script for importing properties in Wikidata. diff --git a/repo/tests/phpunit/includes/ChangeOp/ChangeOpClaimTest.php b/repo/tests/phpunit/includes/ChangeOp/ChangeOpClaimTest.php index 3c80b0c..f846cf2 100644 --- a/repo/tests/phpunit/includes/ChangeOp/ChangeOpClaimTest.php +++ b/repo/tests/phpunit/includes/ChangeOp/ChangeOpClaimTest.php @@ -4,11 +4,9 @@ use DataValues\NumberValue; use DataValues\StringValue; -use InvalidArgumentException; use Wikibase\ChangeOp\ChangeOpClaim; use Wikibase\DataModel\Claim\Claim; use Wikibase\DataModel\Claim\ClaimGuidParser; -use Wikibase\DataModel\Claim\Claims; use Wikibase\DataModel\Entity\BasicEntityIdParser; use Wikibase\DataModel\Entity\Entity; use Wikibase\DataModel\Entity\EntityId; diff --git a/repo/tests/phpunit/includes/Diff/ClaimDifferTest.php b/repo/tests/phpunit/includes/Diff/ClaimDifferTest.php index aa0760f..ffa9c43 100644 --- a/repo/tests/phpunit/includes/Diff/ClaimDifferTest.php +++ b/repo/tests/phpunit/includes/Diff/ClaimDifferTest.php @@ -3,11 +3,11 @@ namespace Wikibase\Test; use Diff\Comparer\ComparableComparer; +use Diff\Differ\OrderedListDiffer; use Diff\DiffOp\Diff\Diff; use Diff\DiffOp\DiffOpAdd; use Diff\DiffOp\DiffOpChange; use Diff\DiffOp\DiffOpRemove; -use Diff\Differ\OrderedListDiffer; use Wikibase\DataModel\Claim\Claim; use Wikibase\DataModel\ReferenceList; use Wikibase\DataModel\Snak\PropertyNoValueSnak; diff --git a/repo/tests/phpunit/includes/Diff/DiffViewTest.php b/repo/tests/phpunit/includes/Diff/DiffViewTest.php index 54ca345..0a86d48 100644 --- a/repo/tests/phpunit/includes/Diff/DiffViewTest.php +++ b/repo/tests/phpunit/includes/Diff/DiffViewTest.php @@ -6,7 +6,6 @@ use Diff\DiffOp\DiffOpAdd; use Diff\DiffOp\DiffOpChange; use Diff\DiffOp\DiffOpRemove; -use RequestContext; use Wikibase\DataModel\Entity\Item; use Wikibase\DataModel\Entity\ItemId; use
[MediaWiki-commits] [Gerrit] Optimize all use sections in Lib - change (mediawiki...Wikibase)
Thiemo Mättig (WMDE) has uploaded a new change for review. https://gerrit.wikimedia.org/r/172998 Change subject: Optimize all use sections in Lib .. Optimize all use sections in Lib Change-Id: I79df2962f6f2932986aae1f37ca8bfb9836be09f --- M lib/includes/changes/EntityChange.php M lib/includes/formatters/EntityIdLabelFormatter.php M lib/includes/formatters/WikibaseValueFormatterBuilders.php M lib/includes/store/EntityRetrievingTermLookup.php M lib/includes/store/TermIndex.php M lib/includes/store/TermLookup.php M lib/tests/phpunit/PropertyInfoDataTypeLookupTest.php M lib/tests/phpunit/formatters/EntityIdLabelFormatterTest.php M lib/tests/phpunit/formatters/PropertyValueSnakFormatterTest.php M lib/tests/phpunit/serializers/SnakSerializerTest.php M lib/tests/phpunit/store/EntityRetrievingTermLookupTest.php M lib/tests/phpunit/store/TermIndexTest.php 12 files changed, 9 insertions(+), 20 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/98/172998/1 diff --git a/lib/includes/changes/EntityChange.php b/lib/includes/changes/EntityChange.php index 68fec7f..b5e3926 100644 --- a/lib/includes/changes/EntityChange.php +++ b/lib/includes/changes/EntityChange.php @@ -8,9 +8,9 @@ use User; use Wikibase\Client\WikibaseClient; use Wikibase\DataModel\Claim\Claim; +use Wikibase\DataModel\Entity\BasicEntityIdParser; use Wikibase\DataModel\Entity\Entity; use Wikibase\DataModel\Entity\EntityId; -use Wikibase\DataModel\Entity\BasicEntityIdParser; use Wikibase\Repo\WikibaseRepo; /** diff --git a/lib/includes/formatters/EntityIdLabelFormatter.php b/lib/includes/formatters/EntityIdLabelFormatter.php index 1081797..30e0bcb 100644 --- a/lib/includes/formatters/EntityIdLabelFormatter.php +++ b/lib/includes/formatters/EntityIdLabelFormatter.php @@ -9,7 +9,6 @@ use Wikibase\DataModel\Entity\EntityId; use Wikibase\Lib\Store\LabelLookup; use Wikibase\Lib\Store\StorageException; -use Wikibase\Lib\Store\UnresolvedRedirectException; /** * @since 0.4 diff --git a/lib/includes/formatters/WikibaseValueFormatterBuilders.php b/lib/includes/formatters/WikibaseValueFormatterBuilders.php index 414d722..5596a21 100644 --- a/lib/includes/formatters/WikibaseValueFormatterBuilders.php +++ b/lib/includes/formatters/WikibaseValueFormatterBuilders.php @@ -13,11 +13,11 @@ use ValueFormatters\ValueFormatter; use Wikibase\LanguageFallbackChain; use Wikibase\LanguageFallbackChainFactory; +use Wikibase\Lib\Store\EntityLookup; use Wikibase\Lib\Store\EntityRetrievingTermLookup; +use Wikibase\Lib\Store\EntityTitleLookup; use Wikibase\Lib\Store\LanguageFallbackLabelLookup; use Wikibase\Lib\Store\LanguageLabelLookup; -use Wikibase\Lib\Store\EntityLookup; -use Wikibase\Lib\Store\EntityTitleLookup; /** * Defines the formatters for DataValues supported by Wikibase. diff --git a/lib/includes/store/EntityRetrievingTermLookup.php b/lib/includes/store/EntityRetrievingTermLookup.php index f62b68d..ba5cc60 100644 --- a/lib/includes/store/EntityRetrievingTermLookup.php +++ b/lib/includes/store/EntityRetrievingTermLookup.php @@ -3,11 +3,8 @@ namespace Wikibase\Lib\Store; use OutOfBoundsException; -use Wikibase\DataModel\Entity\EntityId; use Wikibaes\DataModel\Term\Fingerprint; -use Wikibase\Lib\Store\EntityLookup; -use Wikibase\Lib\Store\StorageException; -use Wikibase\Lib\Store\UnresolvedRedirectException; +use Wikibase\DataModel\Entity\EntityId; /** * @since 0.5 diff --git a/lib/includes/store/TermIndex.php b/lib/includes/store/TermIndex.php index 8b36af2..e975e90 100644 --- a/lib/includes/store/TermIndex.php +++ b/lib/includes/store/TermIndex.php @@ -2,9 +2,9 @@ namespace Wikibase; -use Wikibase\Lib\Store\LabelConflictFinder; use Wikibase\DataModel\Entity\Entity; use Wikibase\DataModel\Entity\EntityId; +use Wikibase\Lib\Store\LabelConflictFinder; /** * Interface to a cache for terms with both write and lookup methods. diff --git a/lib/includes/store/TermLookup.php b/lib/includes/store/TermLookup.php index 4c1b065..0a2ed8d 100644 --- a/lib/includes/store/TermLookup.php +++ b/lib/includes/store/TermLookup.php @@ -4,7 +4,6 @@ use OutOfBoundsException; use Wikibase\DataModel\Entity\EntityId; -use Wikibase\Lib\Store\StorageException; /** * @since 0.5 diff --git a/lib/tests/phpunit/PropertyInfoDataTypeLookupTest.php b/lib/tests/phpunit/PropertyInfoDataTypeLookupTest.php index d98285c..d0bbb8e 100644 --- a/lib/tests/phpunit/PropertyInfoDataTypeLookupTest.php +++ b/lib/tests/phpunit/PropertyInfoDataTypeLookupTest.php @@ -3,9 +3,9 @@ namespace Wikibase\Lib\Test; use Wikibase\DataModel\Entity\Property; +use Wikibase\DataModel\Entity\PropertyDataTypeLookup; use Wikibase\DataModel\Entity\PropertyId; use Wikibase\Lib\EntityRetrievingDataTypeLookup; -use Wikibase\DataModel\Entity\PropertyDataTypeLookup; use Wikibase\Lib\PropertyInfoDataTypeLookup; use Wikibase\PropertyInfoStore; use
[MediaWiki-commits] [Gerrit] Optimize all use sections in Client - change (mediawiki...Wikibase)
Thiemo Mättig (WMDE) has uploaded a new change for review. https://gerrit.wikimedia.org/r/172999 Change subject: Optimize all use sections in Client .. Optimize all use sections in Client Change-Id: I6ab1d09a3e55ac7d8b25362c187969015ad1f68b --- M client/includes/Changes/ChangeHandler.php M client/includes/DataAccess/PropertyIdResolver.php M client/includes/DataAccess/PropertyParserFunction/LanguageAwareRenderer.php M client/includes/DataAccess/PropertyParserFunction/PropertyClaimsRendererFactory.php M client/includes/DataAccess/PropertyParserFunction/Runner.php M client/includes/DataAccess/PropertyParserFunction/SnaksFinder.php M client/includes/DataAccess/PropertyParserFunction/VariantsAwareRenderer.php M client/includes/LangLinkHandler.php M client/includes/Usage/Sql/UsageTableUpdater.php M client/includes/WikibaseClient.php M client/includes/hooks/DataUpdateHookHandlers.php M client/includes/scribunto/Scribunto_LuaWikibaseLibrary.php M client/includes/scribunto/WikibaseLuaBindings.php M client/includes/store/ClientStore.php M client/includes/store/sql/DirectSqlStore.php M client/tests/phpunit/includes/Changes/AffectedPagesFinderTest.php M client/tests/phpunit/includes/Changes/ChangeHandlerTest.php M client/tests/phpunit/includes/DataAccess/PropertyIdResolverTest.php M client/tests/phpunit/includes/DataAccess/PropertyParserFunction/LanguageAwareRendererTest.php M client/tests/phpunit/includes/DataAccess/PropertyParserFunction/PropertyClaimsRendererFactoryTest.php M client/tests/phpunit/includes/DataAccess/PropertyParserFunction/RunnerTest.php M client/tests/phpunit/includes/DataAccess/PropertyParserFunction/SnaksFinderTest.php M client/tests/phpunit/includes/LangLinkHandlerTest.php M client/tests/phpunit/includes/UpdateRepo/UpdateRepoOnMoveTest.php M client/tests/phpunit/includes/Usage/UsageAccumulatorContractTester.php M client/tests/phpunit/includes/Usage/UsageLookupContractTester.php M client/tests/phpunit/includes/Usage/UsageTrackerContractTester.php M client/tests/phpunit/includes/UsageUpdaterTest.php M client/tests/phpunit/includes/hooks/BaseTemplateAfterPortalHandlerTest.php M client/tests/phpunit/includes/hooks/SidebarHookHandlersTest.php M client/tests/phpunit/includes/store/TitleFactoryTest.php 31 files changed, 43 insertions(+), 71 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/99/172999/1 diff --git a/client/includes/Changes/ChangeHandler.php b/client/includes/Changes/ChangeHandler.php index 5ff4576..4885c35 100644 --- a/client/includes/Changes/ChangeHandler.php +++ b/client/includes/Changes/ChangeHandler.php @@ -6,8 +6,6 @@ use MWException; use Title; use Wikibase\Change; -use Wikibase\Client\Changes\AffectedPagesFinder; -use Wikibase\Client\Changes\PageUpdater; use Wikibase\DataModel\Entity\Diff\EntityDiff; use Wikibase\DataModel\Entity\Diff\ItemDiff; use Wikibase\EntityChange; diff --git a/client/includes/DataAccess/PropertyIdResolver.php b/client/includes/DataAccess/PropertyIdResolver.php index 395377b..d4a77ed 100644 --- a/client/includes/DataAccess/PropertyIdResolver.php +++ b/client/includes/DataAccess/PropertyIdResolver.php @@ -3,8 +3,6 @@ namespace Wikibase\DataAccess; use InvalidArgumentException; -use Wikibase\DataModel\Entity\Entity; -use Wikibase\DataModel\Entity\EntityIdParsingException; use Wikibase\DataModel\Entity\PropertyId; use Wikibase\Lib\PropertyLabelNotResolvedException; use Wikibase\PropertyLabelResolver; diff --git a/client/includes/DataAccess/PropertyParserFunction/LanguageAwareRenderer.php b/client/includes/DataAccess/PropertyParserFunction/LanguageAwareRenderer.php index 84fa3c6..8af6deb 100644 --- a/client/includes/DataAccess/PropertyParserFunction/LanguageAwareRenderer.php +++ b/client/includes/DataAccess/PropertyParserFunction/LanguageAwareRenderer.php @@ -5,10 +5,8 @@ use InvalidArgumentException; use Language; use Status; -use Wikibase\Client\WikibaseClient; +use Wikibase\Client\Usage\UsageAccumulator; use Wikibase\DataAccess\PropertyIdResolver; -use Wikibase\DataModel\Claim\Claims; -use Wikibase\DataModel\Entity\Entity; use Wikibase\DataModel\Entity\EntityId; use Wikibase\DataModel\Entity\EntityIdValue; use Wikibase\DataModel\Entity\PropertyId; @@ -16,7 +14,6 @@ use Wikibase\DataModel\Snak\Snak; use Wikibase\Lib\PropertyLabelNotResolvedException; use Wikibase\Lib\SnakFormatter; -use Wikibase\Client\Usage\UsageAccumulator; /** * PropertyClaimsRenderer of the {{#property}} parser function. diff --git a/client/includes/DataAccess/PropertyParserFunction/PropertyClaimsRendererFactory.php b/client/includes/DataAccess/PropertyParserFunction/PropertyClaimsRendererFactory.php index ef2eccd..7afbdab 100644 --- a/client/includes/DataAccess/PropertyParserFunction/PropertyClaimsRendererFactory.php +++ b/client/includes/DataAccess/PropertyParserFunction/PropertyClaimsRendererFactory.php @@ -5,12 +5,12
[MediaWiki-commits] [Gerrit] hiera: re-add info lost in the cleaning earlier - change (operations/puppet)
Giuseppe Lavagetto has submitted this change and it was merged. Change subject: hiera: re-add info lost in the cleaning earlier .. hiera: re-add info lost in the cleaning earlier Change-Id: I82b348613350f0bf9b75958c8eb5bda9228da2c6 Signed-off-by: Giuseppe Lavagetto glavage...@wikimedia.org --- M hieradata/regex.yaml 1 file changed, 12 insertions(+), 0 deletions(-) Approvals: Giuseppe Lavagetto: Verified; Looks good to me, approved diff --git a/hieradata/regex.yaml b/hieradata/regex.yaml index 919d332..fde965a 100644 --- a/hieradata/regex.yaml +++ b/hieradata/regex.yaml @@ -26,6 +26,11 @@ admin::groups: - deployment +# mw1153-1160 are imagescalers (precise) +imagescalers: + __regex: !ruby/regex /^mw11(5[3-9]|60)\.eqiad\.wmnet$/ + mainrole: imagescaler + # mw1161-1188 are apaches (precise) appservers_3: __regex: !ruby/regexp /^mw11(6[1-9]|7[0-9]|8[0-8])\.eqiad\.wmnet$/ @@ -39,3 +44,10 @@ mainrole: api_appserver admin::groups: - deployment + +# mw1209-1220 are apaches (precise) +appservers_4: + __regex: !ruby/regexp /^mw12(09|1[0-9]|20)\.eqiad\.wmnet$/ + mainrole: appserver + admin::groups: +- deployment -- To view, visit https://gerrit.wikimedia.org/r/173000 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I82b348613350f0bf9b75958c8eb5bda9228da2c6 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org Gerrit-Reviewer: Giuseppe Lavagetto glavage...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] hiera: re-add info lost in the cleaning earlier - change (operations/puppet)
Giuseppe Lavagetto has uploaded a new change for review. https://gerrit.wikimedia.org/r/173000 Change subject: hiera: re-add info lost in the cleaning earlier .. hiera: re-add info lost in the cleaning earlier Change-Id: I82b348613350f0bf9b75958c8eb5bda9228da2c6 Signed-off-by: Giuseppe Lavagetto glavage...@wikimedia.org --- M hieradata/regex.yaml 1 file changed, 12 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/00/173000/1 diff --git a/hieradata/regex.yaml b/hieradata/regex.yaml index 919d332..fde965a 100644 --- a/hieradata/regex.yaml +++ b/hieradata/regex.yaml @@ -26,6 +26,11 @@ admin::groups: - deployment +# mw1153-1160 are imagescalers (precise) +imagescalers: + __regex: !ruby/regex /^mw11(5[3-9]|60)\.eqiad\.wmnet$/ + mainrole: imagescaler + # mw1161-1188 are apaches (precise) appservers_3: __regex: !ruby/regexp /^mw11(6[1-9]|7[0-9]|8[0-8])\.eqiad\.wmnet$/ @@ -39,3 +44,10 @@ mainrole: api_appserver admin::groups: - deployment + +# mw1209-1220 are apaches (precise) +appservers_4: + __regex: !ruby/regexp /^mw12(09|1[0-9]|20)\.eqiad\.wmnet$/ + mainrole: appserver + admin::groups: +- deployment -- To view, visit https://gerrit.wikimedia.org/r/173000 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I82b348613350f0bf9b75958c8eb5bda9228da2c6 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] phab update tag - change (operations/puppet)
Rush has submitted this change and it was merged. Change subject: phab update tag .. phab update tag refs T1203 I tested this on the fabapi.eqiad.wmflabs instance in labs and all seems well even though the schema changes take awhile. Change-Id: Idbc167ec57c523e7529c281a742b63039a9506a4 --- M manifests/role/phabricator.pp 1 file changed, 3 insertions(+), 2 deletions(-) Approvals: Rush: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/role/phabricator.pp b/manifests/role/phabricator.pp index c57952c..a953d56 100644 --- a/manifests/role/phabricator.pp +++ b/manifests/role/phabricator.pp @@ -41,7 +41,8 @@ system::role { 'role::phabricator::main': description = 'Phabricator (Main)' } -$current_tag = 'wmoauth' +#let's go jenkins +$current_tag = 'wmoauth-20141110' $domain = 'phabricator.wikimedia.org' class { '::phabricator': git_tag = $current_tag, @@ -123,7 +124,7 @@ #pass not sensitive but has to match phab and db $mysqlpass = 'labspass' -$current_tag = 'wmoauth' +$current_tag = 'wmoauth-20141110' class { '::phabricator': git_tag = $current_tag, lock_file= '/var/run/phab_repo_lock', -- To view, visit https://gerrit.wikimedia.org/r/172994 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idbc167ec57c523e7529c281a742b63039a9506a4 Gerrit-PatchSet: 5 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Rush r...@wikimedia.org Gerrit-Reviewer: Rush r...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Capitalise first letter of Wikidata descriptions. - change (apps...wikipedia)
Dbrant has submitted this change and it was merged. Change subject: Capitalise first letter of Wikidata descriptions. .. Capitalise first letter of Wikidata descriptions. This patch capitalises the first letter of Wikidata descriptions after they're retrieved from the API. It looks better that way. :-) Change-Id: I2056d71ca56fa2a76058f0fee2c1b81471005c68 --- M wikipedia/src/main/java/org/wikipedia/wikidata/WikidataDescriptionsTask.java 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Dbrant: Looks good to me, approved diff --git a/wikipedia/src/main/java/org/wikipedia/wikidata/WikidataDescriptionsTask.java b/wikipedia/src/main/java/org/wikipedia/wikidata/WikidataDescriptionsTask.java index 8b35d48..1c4b022 100644 --- a/wikipedia/src/main/java/org/wikipedia/wikidata/WikidataDescriptionsTask.java +++ b/wikipedia/src/main/java/org/wikipedia/wikidata/WikidataDescriptionsTask.java @@ -47,6 +47,8 @@ if (descriptions != null descriptions.has(language)) { JSONObject langEntry = descriptions.getJSONObject(language); String value = langEntry.optString(value); +//Capitalise the first letter of the description, for style +value = value.substring(0, 1).toUpperCase() + value.substring(1); map.put(key, value); } } -- To view, visit https://gerrit.wikimedia.org/r/172010 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2056d71ca56fa2a76058f0fee2c1b81471005c68 Gerrit-PatchSet: 2 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Deskana dga...@wikimedia.org Gerrit-Reviewer: BearND bsitzm...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org Gerrit-Reviewer: Dbrant dbr...@wikimedia.org Gerrit-Reviewer: Deskana dga...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Updated ZeroPortal to master - change (mediawiki/core)
Yurik has uploaded a new change for review. https://gerrit.wikimedia.org/r/173001 Change subject: Updated ZeroPortal to master .. Updated ZeroPortal to master Change-Id: Ib653999ee08399c99223cb1d9af20b57923f76bb --- M extensions/ZeroPortal 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/01/173001/1 diff --git a/extensions/ZeroPortal b/extensions/ZeroPortal index 4b889c7..4cac813 16 --- a/extensions/ZeroPortal +++ b/extensions/ZeroPortal -Subproject commit 4b889c77be5c1bd26c9da45a373111acc1ba55ee +Subproject commit 4cac813903f2666d73cad1bc6e8233b21644774e -- To view, visit https://gerrit.wikimedia.org/r/173001 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib653999ee08399c99223cb1d9af20b57923f76bb Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.25wmf8 Gerrit-Owner: Yurik yu...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Updated ZeroPortal to master - change (mediawiki/core)
Yurik has submitted this change and it was merged. Change subject: Updated ZeroPortal to master .. Updated ZeroPortal to master Change-Id: Ib653999ee08399c99223cb1d9af20b57923f76bb --- M extensions/ZeroPortal 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Yurik: Verified; Looks good to me, approved diff --git a/extensions/ZeroPortal b/extensions/ZeroPortal index 4b889c7..4cac813 16 --- a/extensions/ZeroPortal +++ b/extensions/ZeroPortal -Subproject commit 4b889c77be5c1bd26c9da45a373111acc1ba55ee +Subproject commit 4cac813903f2666d73cad1bc6e8233b21644774e -- To view, visit https://gerrit.wikimedia.org/r/173001 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib653999ee08399c99223cb1d9af20b57923f76bb Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.25wmf8 Gerrit-Owner: Yurik yu...@wikimedia.org Gerrit-Reviewer: Yurik yu...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Implemented EditableTemplatedWidget - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Implemented EditableTemplatedWidget .. Implemented EditableTemplatedWidget EdtableTemplatedWidget is supposed to be the common base constructor for all wikibase.*view widgets. -72666 Change-Id: Ib21c2d50d1acd0c32024ad226956cd0840fe3e13 --- M lib/resources/jquery.wikibase/jquery.wikibase.aliasesview.js M lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgroupview.js M lib/resources/jquery.wikibase/jquery.wikibase.sitelinklistview.js M lib/resources/jquery.wikibase/resources.php M lib/tests/qunit/jquery.wikibase/jquery.wikibase.aliasesview.tests.js M lib/tests/qunit/jquery.wikibase/jquery.wikibase.sitelinkgroupview.tests.js M lib/tests/qunit/jquery.wikibase/jquery.wikibase.sitelinklistview.tests.js M repo/resources/Resources.php A repo/resources/jquery.ui/jquery.ui.EditableTemplatedWidget.js A repo/tests/qunit/jquery.ui/jquery.ui.EditableTemplatedWidget.tests.js M repo/tests/qunit/resources.php 11 files changed, 851 insertions(+), 465 deletions(-) Approvals: Adrian Lang: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.aliasesview.js b/lib/resources/jquery.wikibase/jquery.wikibase.aliasesview.js index f94ded8..bbb07c7 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.aliasesview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.aliasesview.js @@ -5,12 +5,12 @@ ( function( $, mw, wb ) { 'use strict'; - var PARENT = $.ui.TemplatedWidget; + var PARENT = $.ui.EditableTemplatedWidget; /** - * Manages a aliases. + * Manages aliases. * @since 0.5 - * @extends jQuery.ui.TemplatedWidget + * @extends jQuery.ui.EditableTemplatedWidget * * @option {wikibase.datamodel.MultiTerm} value * @@ -21,7 +21,7 @@ */ $.widget( 'wikibase.aliasesview', PARENT, { /** -* @see jQuery.ui.TemplatedWidget.options +* @see jQuery.ui.EditableTemplatedWidget.options */ options: { template: 'wikibase-aliasesview', @@ -41,14 +41,7 @@ }, /** -* @type {boolean} -*/ - _isInEditMode: false, - - /** * @see jQuery.ui.TemplatedWidget._create -* -* @throws {Error} if required parameters are not specified properly. */ _create: function() { if( @@ -64,34 +57,19 @@ this.$label.text( mw.msg( 'wikibase-aliases-label' ) ); if( this.$list.children( 'li' ).length !== this.options.value.getTexts().length ) { - this._draw(); + this.draw(); } }, /** -* @see jQuery.ui.TemplatedWidget.destroy +* @see jQuery.ui.EditableTemplatedWidget.draw */ - destroy: function() { - if( this._isInEditMode ) { - var self = this; - - this.element.one( this.widgetEventPrefix + 'afterstopediting', function( event ) { - PARENT.prototype.destroy.call( self ); - } ); - - this.cancelEditing(); - } else { - PARENT.prototype.destroy.call( this ); - } - }, - - /** -* Main draw routine. -*/ - _draw: function() { + draw: function() { this.$list.off( '.' + this.widgetName ); - if( !this._isInEditMode ) { + if( this.isInEditMode() ) { + this._initTagadata(); + } else { var self = this, tagadata = this.$list.data( 'tagadata' ); @@ -99,22 +77,14 @@ tagadata.destroy(); } - this.element.removeClass( 'wb-edit' ); - this.$list.empty(); - if( this.options.value ) { - $.each( this.options.value.getTexts(), function() { - self.$list.append( mw.wbTemplate( 'wikibase-aliasesview-list-item', this ) ); - } ); - } - - return; + $.each( this.options.value.getTexts(), function() { + self.$list.append( mw.wbTemplate( 'wikibase-aliasesview-list-item', this ) ); + } ); } - this.element.addClass( 'wb-edit' ); - - this._initTagadata(); + return $.Deferred().resolve().promise(); }, /** @@ -172,114 +142,24 @@ }, /** -* Starts the widget's edit mode. -*/ - startEditing: function() { - if( this._isInEditMode ) { -
[MediaWiki-commits] [Gerrit] Implemented EventSingletonManager - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Implemented EventSingletonManager .. Implemented EventSingletonManager Implemented $.util.EventSingletonManager and applied it to $.sticknode plugin. The utility constructor will be used for solving 73300 as well. Change-Id: I46fed73ae4ab25284d392ce19b912ee8272b5495 --- M lib/resources/Resources.php M lib/resources/jquery/jquery.sticknode.js A lib/resources/jquery/jquery.util.EventSingletonManager.js A lib/tests/qunit/jquery/jquery.util.EventSingletonManager.tests.js M lib/tests/qunit/resources.php 5 files changed, 393 insertions(+), 58 deletions(-) Approvals: Adrian Lang: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/resources/Resources.php b/lib/resources/Resources.php index d3fb44f..534676b 100644 --- a/lib/resources/Resources.php +++ b/lib/resources/Resources.php @@ -132,6 +132,15 @@ 'jquery/jquery.sticknode.js', ), 'dependencies' = array( + 'jquery.util.EventSingletonManager', + ), + ), + + 'jquery.util.EventSingletonManager' = $moduleTemplate + array( + 'scripts' = array( + 'jquery/jquery.util.EventSingletonManager.js', + ), + 'dependencies' = array( 'jquery.throttle-debounce', ), ), diff --git a/lib/resources/jquery/jquery.sticknode.js b/lib/resources/jquery/jquery.sticknode.js index 92aa88a..4650ac4 100644 --- a/lib/resources/jquery/jquery.sticknode.js +++ b/lib/resources/jquery/jquery.sticknode.js @@ -6,7 +6,7 @@ 'use strict'; var $window = $( window ), - stickyInstances = [], + eventSingleton = new $.util.EventSingletonManager(), PLUGIN_NAME = 'sticknode'; /** @@ -34,65 +34,39 @@ return; } - register( new StickyNode( $( this ), options ) ); + var stickyNode = new StickyNode( $( this ), options ); + + eventSingleton.register( + stickyNode, + window, + 'scroll.' + PLUGIN_NAME + ' ' + 'touchmove.' + PLUGIN_NAME, + function( event, stickyNode ) { + if( stickyNode.update( $window.scrollTop() ) ) { + stickyNode.$node.triggerHandler( PLUGIN_NAME + 'update' ); + } + }, + { + throttle: 150 + } + ); + + eventSingleton.register( + stickyNode, + window, + 'resize.' + PLUGIN_NAME, + function( event, stickyNode ) { + if( stickyNode.update( $window.scrollTop(), true ) ) { + stickyNode.$node.triggerHandler( PLUGIN_NAME + 'update' ); + } + }, + { + throttle: 150 + } + ); } ); return this; }; - -/** - * @param {boolean} [force] - */ -function update( force ) { - force = force === true; - - for( var i = 0; i stickyInstances.length; i++ ) { - if( stickyInstances[i].update( $window.scrollTop(), force ) ) { - stickyInstances[i].$node.triggerHandler( PLUGIN_NAME + 'update' ); - } - } -} - -function updateAndForceTriggerEvent() { - update( true ); -} - -/** - * @param {Function} fn - * @return {Function} - */ -function throttle( fn ) { - return $.throttle ? $.throttle( 150, fn ) : fn; -} - -/** - * @param {StickyNode} sticky - */ -function register( sticky ) { - if( !stickyInstances.length ) { - $window - .on( 'scroll.' + PLUGIN_NAME + ' ' + 'touchmove.' + PLUGIN_NAME, ( function() { - return throttle( update ); - }() ) ) - .on( 'resize.' + PLUGIN_NAME, ( function() { - return throttle( updateAndForceTriggerEvent ); - }() ) ); - } - stickyInstances.push( sticky ); -} - -/** - * @param {StickyNode} sticky - */ -function deregister( sticky ) { - var index = $.inArray( sticky ); - if( index ) { - stickyInstances.splice( index, 1 ); - } - if( !stickyInstances.length ) { - $window.off( '.' + PLUGIN_NAME ); - } -} /** * @constructor @@ -133,10 +107,14 @@ _changesDocumentHeight: false, /** -* Destroys
[MediaWiki-commits] [Gerrit] Remove font-size for panel buttons - change (mediawiki...UniversalLanguageSelector)
Amire80 has uploaded a new change for review. https://gerrit.wikimedia.org/r/173002 Change subject: Remove font-size for panel buttons .. Remove font-size for panel buttons This fixes the Monobook tiny font issue described in Bug 65516, and as far as I can see in my testing, it doesn't affect Vector. Bug: 65516 Change-Id: I910e3ed7cb26fa20fcb371e5baae56edc76ffed2 --- M resources/css/ext.uls.buttons.css 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector refs/changes/02/173002/1 diff --git a/resources/css/ext.uls.buttons.css b/resources/css/ext.uls.buttons.css index b82ce39..cfe1ba4 100644 --- a/resources/css/ext.uls.buttons.css +++ b/resources/css/ext.uls.buttons.css @@ -1,7 +1,6 @@ button.button { display: inline-block; padding: 0.4065em 1.2195em 0.4065em; - font-size: 0.813em; font-weight: bold; line-height: 1; color: #252525; -- To view, visit https://gerrit.wikimedia.org/r/173002 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I910e3ed7cb26fa20fcb371e5baae56edc76ffed2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] More word query returned no results - change (mediawiki...BlueSpiceFoundation)
Smuggli has uploaded a new change for review. https://gerrit.wikimedia.org/r/173004 Change subject: More word query returned no results .. More word query returned no results The LIKE query found no results for more words, also if a page like that exists. To prevent this the entered string is spilt up after each whitespace and insert a LIKE operator. * Improved query a little Change-Id: I3bcb0d0f84b3d5411f43121025610569514b3a46 --- M includes/CommonAJAXInterface.php 1 file changed, 42 insertions(+), 40 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceFoundation refs/changes/04/173004/1 diff --git a/includes/CommonAJAXInterface.php b/includes/CommonAJAXInterface.php index b6faa62..b5f09d9 100644 --- a/includes/CommonAJAXInterface.php +++ b/includes/CommonAJAXInterface.php @@ -11,7 +11,7 @@ public static function getTitleStoreData( $sOptions = '{}' ) { global $wgContLang; $oResponse = BsCAResponse::newFromPermission( 'read' ); - if( $oResponse-isSuccess() === false ) { + if ( $oResponse-isSuccess() === false ) { return $oResponse; } @@ -39,23 +39,23 @@ //Step 1: Collect namespaces $aNamespaces = $wgContLang-getNamespaces(); - asort($aNamespaces); - foreach( $aNamespaces as $iNsId = $sNamespaceText ) { - if( empty($sNamespaceText) ) { + asort( $aNamespaces ); + foreach ( $aNamespaces as $iNsId = $sNamespaceText ) { + if ( empty( $sNamespaceText ) ) { continue; } - if( !in_array($iNsId, $aOptions['namespaces']) ) { + if ( !in_array( $iNsId, $aOptions['namespaces'] ) ) { continue; } - $sNormNSText = strtolower( $sNamespaceText); - $sNormNSText = str_replace( '_', ' ', $sNormNSText); + $sNormNSText = strtolower( $sNamespaceText ); + $sNormNSText = str_replace( '_', ' ', $sNormNSText ); - if( empty($sQuery) || strpos($sNormNSText, $sQuery) === 0) { + if ( empty( $sQuery ) || strpos( $sNormNSText, $sQuery ) === 0) { //Only namespaces a user has the read permission for - $oDummyTitle =Title::newFromText($sNamespaceText.':X'); + $oDummyTitle = Title::newFromText($sNamespaceText.':X'); if( $oDummyTitle-userCan('read') === false ) { continue; } @@ -67,7 +67,7 @@ } } - if( empty($sQuery) ) { + if ( empty( $sQuery ) ) { $oResponse-setPayload( $aPayload ); return $oResponse; } @@ -75,7 +75,7 @@ //Step 2: Find pages $oQueryTitle = Title::newFromText( $oParams-getQuery() ); - if( $oQueryTitle instanceof Title === false ) { + if ( $oQueryTitle instanceof Title === false ) { $oResponse-setPayload( $aPayload ); return $oResponse; } @@ -91,15 +91,25 @@ //The current approach has a major disadvantage: It does not find //anything when the query contains a hyphen! - $dbr = wfGetDB(DB_SLAVE); + $dbr = wfGetDB( DB_SLAVE ); + + // We want LIKE operator behind every term, + // so multi term queries also bring results + $aLike = array(); + $sOp = $dbr-anyString(); + $sParams = explode( ' ', strtolower( $oQueryTitle-getText() ) ); + foreach ( $sParams as $sParam ) { + $aLike[] = $sParam; + $aLike[] = $sOp; + } + $res = $dbr-select( array( 'page', 'searchindex' ), - array( 'page_namespace', 'page_title' ), + array( 'page_id' ), array( 'page_id = si_page', 'si_title '. $dbr-buildLike( - strtolower( $oQueryTitle-getText() ), - $dbr-anyString() + $aLike ), 'page_namespace' = $oQueryTitle-getNamespace() ), @@ -110,36 +120,28 @@ );
[MediaWiki-commits] [Gerrit] hiera: fix typo - change (operations/puppet)
Giuseppe Lavagetto has uploaded a new change for review. https://gerrit.wikimedia.org/r/173003 Change subject: hiera: fix typo .. hiera: fix typo Change-Id: I2649d9d57dc78ab0e11ba19a630c5e1b00dfe9ec Signed-off-by: Giuseppe Lavagetto glavage...@wikimedia.org --- M hieradata/regex.yaml 1 file changed, 2 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/03/173003/1 diff --git a/hieradata/regex.yaml b/hieradata/regex.yaml index fde965a..fd75def 100644 --- a/hieradata/regex.yaml +++ b/hieradata/regex.yaml @@ -26,9 +26,8 @@ admin::groups: - deployment -# mw1153-1160 are imagescalers (precise) imagescalers: - __regex: !ruby/regex /^mw11(5[3-9]|60)\.eqiad\.wmnet$/ + __regex: !ruby/regexp /^mw11(5[3-9]|60)\.eqiad\.wmnet$/ mainrole: imagescaler # mw1161-1188 are apaches (precise) @@ -45,7 +44,7 @@ admin::groups: - deployment -# mw1209-1220 are apaches (precise) +# mw1161-1188 are apaches (precise) appservers_4: __regex: !ruby/regexp /^mw12(09|1[0-9]|20)\.eqiad\.wmnet$/ mainrole: appserver -- To view, visit https://gerrit.wikimedia.org/r/173003 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2649d9d57dc78ab0e11ba19a630c5e1b00dfe9ec Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Improved styling of FormattingHelp - change (mediawiki...BlueSpiceExtensions)
Robert Vogel has submitted this change and it was merged. Change subject: Improved styling of FormattingHelp .. Improved styling of FormattingHelp * Readded differntfont for table content Change-Id: I47cebc9865f3931b7bb2c8e0a693195716abe4bf --- M FormattingHelp/FormattingHelp.class.php M FormattingHelp/resources/BS.FormattingHelp/Window.js M FormattingHelp/resources/bluespice.formattinghelp.css 3 files changed, 6 insertions(+), 16 deletions(-) Approvals: Robert Vogel: Verified; Looks good to me, approved diff --git a/FormattingHelp/FormattingHelp.class.php b/FormattingHelp/FormattingHelp.class.php index f03ca13..092fdf0 100644 --- a/FormattingHelp/FormattingHelp.class.php +++ b/FormattingHelp/FormattingHelp.class.php @@ -99,7 +99,7 @@ public static function getFormattingHelp() { if ( BsCore::checkAccessAdmission( 'edit' ) === false ) return true; - $sOutput = table border='1' + $sOutput = table id='bs-formattinghelp-table' class='wikitable' thead tr th/th diff --git a/FormattingHelp/resources/BS.FormattingHelp/Window.js b/FormattingHelp/resources/BS.FormattingHelp/Window.js index daf3efa..fd7b9b6 100644 --- a/FormattingHelp/resources/BS.FormattingHelp/Window.js +++ b/FormattingHelp/resources/BS.FormattingHelp/Window.js @@ -4,6 +4,8 @@ closeAction: 'hide', singleton: true, id: 'bs-formattinghelp-window', + height: 600, + width: 600, initComponent: function(){ this.setTitle( mw.message('bs-formattinghelp-formatting').plain() ); diff --git a/FormattingHelp/resources/bluespice.formattinghelp.css b/FormattingHelp/resources/bluespice.formattinghelp.css index 87bec39..b1bf56c 100644 --- a/FormattingHelp/resources/bluespice.formattinghelp.css +++ b/FormattingHelp/resources/bluespice.formattinghelp.css @@ -11,24 +11,12 @@ * @filesource */ -#bs-formattinghelp-content table { - font-family: 'Courier New', monospace; - border-collapse: collapse; -} -#bs-formattinghelp-content table tr:nth-child(odd) { - background-color: #FDFDFD; -} - -#bs-formattinghelp-content table tr td { - padding: 10px 5px; -} - #bs-editbutton-formattinghelp { /*@embed*/ background-image: url(images/button_formatinghelp.png); } -#bs-formattinghelp-content th, #bs-formattinghelp-content td{ - padding: 10px 5px; - text-align: left; +#bs-formattinghelp-table { + font-family: 'Courier New', monospace; + border-collapse: collapse; } \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/172702 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I47cebc9865f3931b7bb2c8e0a693195716abe4bf Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions Gerrit-Branch: master Gerrit-Owner: Smuggli mug...@hallowelt.biz Gerrit-Reviewer: Mglaser gla...@hallowelt.biz Gerrit-Reviewer: Pigpen reym...@hallowelt.biz Gerrit-Reviewer: Robert Vogel vo...@hallowelt.biz Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] hiera: fix typo - change (operations/puppet)
Giuseppe Lavagetto has submitted this change and it was merged. Change subject: hiera: fix typo .. hiera: fix typo Change-Id: I2649d9d57dc78ab0e11ba19a630c5e1b00dfe9ec Signed-off-by: Giuseppe Lavagetto glavage...@wikimedia.org --- M hieradata/regex.yaml 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Giuseppe Lavagetto: Verified; Looks good to me, approved diff --git a/hieradata/regex.yaml b/hieradata/regex.yaml index fde965a..cda10e3 100644 --- a/hieradata/regex.yaml +++ b/hieradata/regex.yaml @@ -26,9 +26,9 @@ admin::groups: - deployment -# mw1153-1160 are imagescalers (precise) +# Imagescalers imagescalers: - __regex: !ruby/regex /^mw11(5[3-9]|60)\.eqiad\.wmnet$/ + __regex: !ruby/regexp /^mw11(5[3-9]|60)\.eqiad\.wmnet$/ mainrole: imagescaler # mw1161-1188 are apaches (precise) -- To view, visit https://gerrit.wikimedia.org/r/173003 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2649d9d57dc78ab0e11ba19a630c5e1b00dfe9ec Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org Gerrit-Reviewer: Giuseppe Lavagetto glavage...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits