[MediaWiki-commits] [Gerrit] Handle the return value of getOriginalEmail efficiently - change (mediawiki...BounceHandler)
01tonythomas has uploaded a new change for review. https://gerrit.wikimedia.org/r/169654 Change subject: Handle the return value of getOriginalEmail efficiently .. Handle the return value of getOriginalEmail efficiently This patch: * Check for the return value of getOriginalEmail before committing into the DB * make getOriginalEmail() call reuseConnection() Bug: 69100 Change-Id: I7cd88e6041ff9e64aefb1ec3468f83d88569df64 --- M includes/ProcessBounceEmails.php 1 file changed, 6 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BounceHandler refs/changes/54/169654/1 diff --git a/includes/ProcessBounceEmails.php b/includes/ProcessBounceEmails.php index b2c82a8..fb38e7c 100644 --- a/includes/ProcessBounceEmails.php +++ b/includes/ProcessBounceEmails.php @@ -97,7 +97,8 @@ $currentTime - $bounceTime $wgVERPAcceptTime ) { $failedUser['wikiId'] = str_replace( '.', '-', $hashedVERPPart[1] ); $failedUser['rawUserId'] = base_convert( $hashedVERPPart[2], 36, 10 ); - $failedUser['rawEmail'] = self::getOriginalEmail( $failedUser ); + $failedEmail = self::getOriginalEmail( $failedUser ); + $failedUser['rawEmail'] = $failedEmail ? : null; $failedUser['bounceTime'] = $bounceTime; } else { wfDebugLog( 'BounceHandler', @@ -123,14 +124,16 @@ array( 'user_email' ), array( 'user_id' = $rawUserId, - ), + ), __METHOD__ - ); + ); + wfGetLB( $wikiId )-reuseConnection( $dbr ); if( $res !== false ) { $rawEmail = $res-user_email; return $rawEmail; } else { wfDebugLog( 'BounceHandler',Error fetching email_id of user_id $rawUserId from Database $wikiId. ); + return false; } } -- To view, visit https://gerrit.wikimedia.org/r/169654 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7cd88e6041ff9e64aefb1ec3468f83d88569df64 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/BounceHandler Gerrit-Branch: master Gerrit-Owner: 01tonythomas 01tonytho...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] logstash: hadoop: disable output temporarily - change (operations/puppet)
Gage has uploaded a new change for review. https://gerrit.wikimedia.org/r/169655 Change subject: logstash: hadoop: disable output temporarily .. logstash: hadoop: disable output temporarily to avoid filling disks Change-Id: I16738d70e4b535af3a6df9f637a0d133c29e5d80 --- M manifests/role/analytics/hadoop.pp 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/55/169655/1 diff --git a/manifests/role/analytics/hadoop.pp b/manifests/role/analytics/hadoop.pp index 1487d7f..20a6bc5 100644 --- a/manifests/role/analytics/hadoop.pp +++ b/manifests/role/analytics/hadoop.pp @@ -56,7 +56,7 @@ $mapreduce_job_reuse_jvm_num_tasks= 1 $fair_scheduler_template = 'hadoop/fair-scheduler.xml.erb' # setting this to false or undef interferes with defining it within a node -$gelf_logging_enabled = true +$gelf_logging_enabled = false # Configs specific to Production. -- To view, visit https://gerrit.wikimedia.org/r/169655 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I16738d70e4b535af3a6df9f637a0d133c29e5d80 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Gage jger...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] logstash: hadoop: disable output temporarily - change (operations/puppet)
Gage has submitted this change and it was merged. Change subject: logstash: hadoop: disable output temporarily .. logstash: hadoop: disable output temporarily to avoid filling disks Change-Id: I16738d70e4b535af3a6df9f637a0d133c29e5d80 --- M manifests/role/analytics/hadoop.pp 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Gage: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/role/analytics/hadoop.pp b/manifests/role/analytics/hadoop.pp index 1487d7f..20a6bc5 100644 --- a/manifests/role/analytics/hadoop.pp +++ b/manifests/role/analytics/hadoop.pp @@ -56,7 +56,7 @@ $mapreduce_job_reuse_jvm_num_tasks= 1 $fair_scheduler_template = 'hadoop/fair-scheduler.xml.erb' # setting this to false or undef interferes with defining it within a node -$gelf_logging_enabled = true +$gelf_logging_enabled = false # Configs specific to Production. -- To view, visit https://gerrit.wikimedia.org/r/169655 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I16738d70e4b535af3a6df9f637a0d133c29e5d80 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Gage jger...@wikimedia.org Gerrit-Reviewer: Gage jger...@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 QQQ - change (mediawiki...Teahouse)
Robert Vogel has submitted this change and it was merged. Change subject: Added QQQ .. Added QQQ Added QQQ entries in I18N to support translation by translatewiki Change-Id: Ib7c08d4194d98e22e46aac959aabf3494e3f860e --- M Teahouse.php M i18n/qqq.json 2 files changed, 28 insertions(+), 6 deletions(-) Approvals: Robert Vogel: Verified; Looks good to me, approved Siebrand: Looks good to me, but someone else must approve diff --git a/Teahouse.php b/Teahouse.php index bab9afc..c324c23 100644 --- a/Teahouse.php +++ b/Teahouse.php @@ -44,6 +44,28 @@ 'styles' = array( 'mediawiki.teahouse.css' ), + //This is just for development: The gadget's I18N is injected through the init-Method. + /* + 'messages' = array( + 'th-button-text', + 'th-button-title', + 'th-dialog-title', + 'th-dialog-description-top', + 'th-dialog-label-summary', + 'th-dialog-label-text', + 'th-dialog-label-similar', + 'th-dialog-btn-ok', + 'th-dialog-btn-cancel', + 'th-dialog-disclaimer', + 'th-dialog-anon-ip-hint', + 'th-dialog-msg-title-save', + 'th-dialog-msg-text-save', + 'th-dialog-msg-btn-yes', + 'th-dialog-msg-btn-no', + 'th-notifications-badge-title', + 'th-notifications-popup-title' + ), + */ 'localBasePath' = __DIR__.'/resources', 'remoteExtPath' = 'Teahouse/resources', ); diff --git a/i18n/qqq.json b/i18n/qqq.json index 36c825e..a5b1796 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -16,10 +16,10 @@ th-dialog-btn-cancel: Text of the button that resets the form and closes the dialog, th-dialog-disclaimer: Hint to the Terms of Use. Links to https://wikimediafoundation.org/wiki/Terms_of_Use;, th-dialog-anon-ip-hint: Hint that the IP adress of an anonymous user will be saved, - th-dialog-msg-title-save: , - th-dialog-msg-text-save: , - th-dialog-msg-btn-yes: , - th-dialog-msg-btn-no: , - th-notifications-badge-title: , - th-notifications-popup-title: + th-dialog-msg-title-save: Title of the message dialog that informs the user about the publishing of the question, + th-dialog-msg-text-save: The text of the message dialog that tells the user about the location of her/his question and asks her/him whether or not to navigate to the Teahouse board page. The parameter $1 is replaced by an anchor tag pointing to the question subpage, + th-dialog-msg-btn-yes: The message dialog's button that confirms the redirection to the Teahouse board page, + th-dialog-msg-btn-no: The message dialog's button that declines the redirection to the Teahouse board page, + th-notifications-badge-title: The tooltip for the notification badge that shows up in personal tools section when there are changes (reactions) to the questions on the user's clientside watchlist, + th-notifications-popup-title: The title of the popup widget that lists the notifications about after clicking on the badge } -- To view, visit https://gerrit.wikimedia.org/r/169322 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib7c08d4194d98e22e46aac959aabf3494e3f860e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Teahouse Gerrit-Branch: master Gerrit-Owner: Robert Vogel vo...@hallowelt.biz Gerrit-Reviewer: Robert Vogel vo...@hallowelt.biz Gerrit-Reviewer: Siebrand siebr...@kitano.nl ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Added missing I18N - change (mediawiki...BlueSpiceExtensions)
Robert Vogel has submitted this change and it was merged. Change subject: Added missing I18N .. Added missing I18N And fixed one I18N key to meet conventions Change-Id: I8fd7d35e656067775b1e82819c5bcb0333545341 --- M PermissionManager/PermissionManager.setup.php M PermissionManager/i18n/de.json M PermissionManager/i18n/en.json M PermissionManager/i18n/qqq.json M PermissionManager/resources/BS.PermissionManager/panel/Manager.js 5 files changed, 11 insertions(+), 7 deletions(-) Approvals: Robert Vogel: Verified; Looks good to me, approved Siebrand: Looks good to me, but someone else must approve diff --git a/PermissionManager/PermissionManager.setup.php b/PermissionManager/PermissionManager.setup.php index 570a3a8..25ba256 100644 --- a/PermissionManager/PermissionManager.setup.php +++ b/PermissionManager/PermissionManager.setup.php @@ -41,7 +41,7 @@ 'bs-permissionmanager-titletpled-new', 'bs-permissionmanager-titletpled-edit', 'bs-permissionmanager-titletpled-delete', - 'bs-PermissionManager-unsaved-changes' + 'bs-permissionmanager-unsaved-changes' ), 'localBasePath' = $IP, 'remoteBasePath' = $GLOBALS['wgScriptPath'] diff --git a/PermissionManager/i18n/de.json b/PermissionManager/i18n/de.json index 74a4499..09c60c8 100644 --- a/PermissionManager/i18n/de.json +++ b/PermissionManager/i18n/de.json @@ -39,5 +39,6 @@ bs-permissionmanager-titletpled-delete: Vorlage löschen, bs-permissionmanager-pref-lockmode: Lockmode aktivieren, bs-permissionmanager-pref-skipsysns: Systemnamensräume bei eingschaltetem Lockmode ignorieren, - bs-permissionmanager-pref-enablerealitycheck: Rechteprüfung aktivieren + bs-permissionmanager-pref-enablerealitycheck: Rechteprüfung aktivieren, + bs-permissionmanager-unsaved-changes: Es existieren ungespeicherte Änderungen. Willst du die Seite wirklich verlassen? Die ungespeicherten Änderungen gehen in diesem Fall verloren } diff --git a/PermissionManager/i18n/en.json b/PermissionManager/i18n/en.json index edae6c1..699cd3e 100644 --- a/PermissionManager/i18n/en.json +++ b/PermissionManager/i18n/en.json @@ -38,5 +38,6 @@ bs-permissionmanager-titletpled-delete: Delete template, bs-permissionmanager-pref-lockmode: Activate lockmode, bs-permissionmanager-pref-skipsysns: Skip system namespaces if lockmode is active, - bs-permissionmanager-pref-enablerealitycheck: Activate permission check + bs-permissionmanager-pref-enablerealitycheck: Activate permission check, + bs-permissionmanager-unsaved-changes: There are unsaved changes. Do you really want to leave the page now? The unsaved changes will be lost. } diff --git a/PermissionManager/i18n/qqq.json b/PermissionManager/i18n/qqq.json index 55e4f2a..54661e1 100644 --- a/PermissionManager/i18n/qqq.json +++ b/PermissionManager/i18n/qqq.json @@ -40,5 +40,6 @@ bs-permissionmanager-titletpled-delete: Window title for delete template, bs-permissionmanager-pref-lockmode: Option in [{{canonicalurl:Special:WikiAdmin|mode=Preferences}} Special:WikiAdmin?mode=Preferences], checkbox label for activate lockmode, bs-permissionmanager-pref-skipsysns: Option in [{{canonicalurl:Special:WikiAdmin|mode=Preferences}} Special:WikiAdmin?mode=Preferences], checkbox label for skip system namespaces if lockmode is active, - bs-permissionmanager-pref-enablerealitycheck: Option in [{{canonicalurl:Special:WikiAdmin|mode=Preferences}} Special:WikiAdmin?mode=Preferences], checkbox label for activate permission check + bs-permissionmanager-pref-enablerealitycheck: Option in [{{canonicalurl:Special:WikiAdmin|mode=Preferences}} Special:WikiAdmin?mode=Preferences], checkbox label for activate permission check, + bs-permissionmanager-unsaved-changes: Hint about data loss when a user leaves the page without saving her/his changes } diff --git a/PermissionManager/resources/BS.PermissionManager/panel/Manager.js b/PermissionManager/resources/BS.PermissionManager/panel/Manager.js index d9859f4..5069eb0 100644 --- a/PermissionManager/resources/BS.PermissionManager/panel/Manager.js +++ b/PermissionManager/resources/BS.PermissionManager/panel/Manager.js @@ -15,13 +15,14 @@ $(window).bind( 'beforeunload', function() { var dataManager = Ext.create('BS.PermissionManager.data.Manager'); if(dataManager.isDirty()) { + var msg = mw.message('bs-permissionmanager-unsaved-changes').plain(); if(/chrome/.test(navigator.userAgent.toLowerCase())) { //chrome compatibility - return mw.message('bs-PermissionManager-unsaved-changes').plain(); + return msg;
[MediaWiki-commits] [Gerrit] Switch to LOCK IN SHARE MODE in recordUpload2() - change (mediawiki/core)
Springle has submitted this change and it was merged. Change subject: Switch to LOCK IN SHARE MODE in recordUpload2() .. Switch to LOCK IN SHARE MODE in recordUpload2() * We just need the latest data; the advisory locking in lock() already manages mutual exclusion. Change-Id: I9af7a892b2dcafd30149332b0084f61d117c9cad --- M includes/filerepo/file/LocalFile.php 1 file changed, 4 insertions(+), 2 deletions(-) Approvals: Springle: Looks good to me, approved diff --git a/includes/filerepo/file/LocalFile.php b/includes/filerepo/file/LocalFile.php index 08c9afb..9f14669 100644 --- a/includes/filerepo/file/LocalFile.php +++ b/includes/filerepo/file/LocalFile.php @@ -1303,9 +1303,11 @@ ); if ( $dbw-affectedRows() == 0 ) { if ( $allowTimeKludge ) { - # Use FOR UPDATE to ignore any transaction snapshotting + # Use LOCK IN SHARE MODE to ignore any transaction snapshotting $ltimestamp = $dbw-selectField( 'image', 'img_timestamp', - array( 'img_name' = $this-getName() ), __METHOD__, array( 'FOR UPDATE' ) ); + array( 'img_name' = $this-getName() ), + __METHOD__, + array( 'LOCK IN SHARE MODE' ) ); $lUnixtime = $ltimestamp ? wfTimestamp( TS_UNIX, $ltimestamp ) : false; # Avoid a timestamp that is not newer than the last version # TODO: the image/oldimage tables should be like page/revision with an ID field -- To view, visit https://gerrit.wikimedia.org/r/167424 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9af7a892b2dcafd30149332b0084f61d117c9cad Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz asch...@wikimedia.org Gerrit-Reviewer: Chad ch...@wikimedia.org Gerrit-Reviewer: Springle sprin...@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] Fix infinite ApplicationField in proxy custom field object - change (phabricator...Sprint)
Christopher Johnson (WMDE) has uploaded a new change for review. https://gerrit.wikimedia.org/r/169656 Change subject: Fix infinite ApplicationField in proxy custom field object .. Fix infinite ApplicationField in proxy custom field object Change-Id: I15151b3417b8f4b6aa67eb3bede75274d046d304 --- M src/customfield/SprintEndDateField.php M src/customfield/SprintStartDateField.php M src/customfield/SprintTaskStoryPointsField.php M src/events/BurndownActionMenuEventListener.php 4 files changed, 24 insertions(+), 14 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/phabricator/extensions/Sprint refs/changes/56/169656/1 diff --git a/src/customfield/SprintEndDateField.php b/src/customfield/SprintEndDateField.php index 97a69dc..99b20a4 100644 --- a/src/customfield/SprintEndDateField.php +++ b/src/customfield/SprintEndDateField.php @@ -6,16 +6,20 @@ final class SprintEndDateField extends SprintProjectCustomField { + private $obj; + private $proxy; + public function __construct() { -$proxy = id(new PhabricatorStandardCustomFieldDate()) +$this-obj = clone $this; +$this-proxy = id(new PhabricatorStandardCustomFieldDate()) -setFieldKey($this-getFieldKey()) - -setApplicationField($this) + -setApplicationField($this-obj) -setFieldConfig(array( 'name' = $this-getFieldName(), 'description' = $this-getFieldDescription(), )); -$this-setProxy($proxy); +$this-setProxy($this-proxy); } // == General field identity stuff diff --git a/src/customfield/SprintStartDateField.php b/src/customfield/SprintStartDateField.php index fc17335..ce06d03 100644 --- a/src/customfield/SprintStartDateField.php +++ b/src/customfield/SprintStartDateField.php @@ -6,16 +6,20 @@ final class SprintStartDateField extends SprintProjectCustomField { + private $obj; + private $proxy; + public function __construct() { -$proxy = id(new PhabricatorStandardCustomFieldDate()) +$this-obj = clone $this; +$this-proxy = id(new PhabricatorStandardCustomFieldDate()) -setFieldKey($this-getFieldKey()) - -setApplicationField($this) + -setApplicationField($this-obj) -setFieldConfig(array( 'name' = $this-getFieldName(), 'description' = $this-getFieldDescription(), )); -$this-setProxy($proxy); +$this-setProxy($this-proxy); } // == General field identity stuff @@ -45,8 +49,7 @@ } // == Search - public function shouldAppearInApplicationSearch() - { + public function shouldAppearInApplicationSearch() { return true; } diff --git a/src/customfield/SprintTaskStoryPointsField.php b/src/customfield/SprintTaskStoryPointsField.php index 0c98a60..bc97181 100644 --- a/src/customfield/SprintTaskStoryPointsField.php +++ b/src/customfield/SprintTaskStoryPointsField.php @@ -7,17 +7,20 @@ final class SprintTaskStoryPointsField extends ManiphestCustomField implements PhabricatorStandardCustomFieldInterface { - // == General field identity stuff + private $obj; + private $proxy; + public function __construct() { -$proxy = id(new PhabricatorStandardCustomFieldText()) +$this-obj = clone $this; +$this-proxy = id(new PhabricatorStandardCustomFieldText()) -setFieldKey($this-getFieldKey()) - -setApplicationField($this) + -setApplicationField($this-obj) -setFieldConfig(array( 'name' = $this-getFieldName(), 'description' = $this-getFieldDescription(), )); -$this-setProxy($proxy); +$this-setProxy($this-proxy); } public function canSetProxy() { diff --git a/src/events/BurndownActionMenuEventListener.php b/src/events/BurndownActionMenuEventListener.php index 192c3fe..ab8fc19 100644 --- a/src/events/BurndownActionMenuEventListener.php +++ b/src/events/BurndownActionMenuEventListener.php @@ -2,7 +2,7 @@ /** * Copyright (C) 2014 Michael Peters * Licensed under GNU GPL v3. See LICENSE for full details - */ + */; final class BurndownActionMenuEventListener extends PhabricatorEventListener { @@ -22,7 +22,7 @@ $object = $event-getValue('object'); $actions = null; -if ($object instanceof \PhabricatorProject +if ($object instanceof PhabricatorProject stripos($object-getName(), '§') !== false) { $actions = $this-renderUserItems($event); } -- To view, visit https://gerrit.wikimedia.org/r/169656 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I15151b3417b8f4b6aa67eb3bede75274d046d304 Gerrit-PatchSet: 1 Gerrit-Project: phabricator/extensions/Sprint Gerrit-Branch: master Gerrit-Owner: Christopher Johnson (WMDE) christopher.john...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Tests for TestTextfilePageGenerator - change (pywikibot/core)
John Vandenberg has uploaded a new change for review. https://gerrit.wikimedia.org/r/169657 Change subject: Tests for TestTextfilePageGenerator .. Tests for TestTextfilePageGenerator Also adds TestCaseBase.assertPagelistTitles to check the loaded results from TextfilePageGenerator and other pagegenerators. Amend documentation for -file to mention titles may be separated by new lines. Change-Id: I20bb62247e6b0b8d7a13a425cde210e60eb7d730 --- M pywikibot/pagegenerators.py M tests/aspects.py A tests/data/pagelist-brackets.txt A tests/data/pagelist-lines.txt M tests/pagegenerators_tests.py 5 files changed, 84 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/57/169657/1 diff --git a/pywikibot/pagegenerators.py b/pywikibot/pagegenerators.py index b79dfda..b78f7cc 100644 --- a/pywikibot/pagegenerators.py +++ b/pywikibot/pagegenerators.py @@ -68,7 +68,8 @@ -uncatfiles Work on all files which are not categorised. -file Read a list of pages to treat from the named text file. - Page titles in the file must be enclosed with [[brackets]]. + Page titles in the file may be either enclosed with + [[brackets]], or be separated by new lines. Argument can also be given as -file:filename. -filelinksWork on all pages that use a certain image/media file. diff --git a/tests/aspects.py b/tests/aspects.py index 40edb6d..952cd01 100644 --- a/tests/aspects.py +++ b/tests/aspects.py @@ -33,6 +33,7 @@ import sys import os import inspect +import collections import pywikibot @@ -67,6 +68,32 @@ return self.assertRegexpMatches(*args, **kwargs) +def assertPagelistTitles(self, gen, titles): + +Test that pages in gen match expected titles. + +If the expected titles is a tuple, assert that the generator yields +pages with the same number and order of titles. + +@param gen: Page generator +@type gen: generator of Page +@param titles: Expected titles +@type titles: tuple or list + +if isinstance(titles, tuple): +working_set = collections.deque(titles) + +for page in gen: +title = page.title() +self.assertIn(title, titles) +if isinstance(titles, tuple): +self.assertIn(title, working_set) +self.assertEqual(title, working_set[0]) +working_set.popleft() + +if isinstance(titles, tuple): +self.assertEqual(working_set, collections.deque([])) + class TestLoggingMixin(TestCaseBase): diff --git a/tests/data/pagelist-brackets.txt b/tests/data/pagelist-brackets.txt new file mode 100644 index 000..ec660fe --- /dev/null +++ b/tests/data/pagelist-brackets.txt @@ -0,0 +1,5 @@ +[[file]] [[bracket]] +[[MediaWiki:Test]] with +[[under_score]] +and +text. diff --git a/tests/data/pagelist-lines.txt b/tests/data/pagelist-lines.txt new file mode 100644 index 000..b1a5143 --- /dev/null +++ b/tests/data/pagelist-lines.txt @@ -0,0 +1,4 @@ +file +bracket +MediaWiki:Test +under_score diff --git a/tests/pagegenerators_tests.py b/tests/pagegenerators_tests.py index 96e5dfa..da51529 100755 --- a/tests/pagegenerators_tests.py +++ b/tests/pagegenerators_tests.py @@ -8,6 +8,7 @@ __version__ = '$Id$' import sys +import os import pywikibot from pywikibot import pagegenerators @@ -17,6 +18,7 @@ WikidataTestCase, DefaultSiteTestCase, ) +from tests import _data_dir class TestPageGenerators(TestCase): @@ -28,7 +30,7 @@ cached = True -titles = [ +titles = ( # just a bunch of randomly selected titles uCities in Burkina Faso, uEastern Sayan, @@ -43,7 +45,7 @@ uTemplate:Template, uTemplate:Template/Doc, uTemplate:Template/Meta, -] +) def setUp(self): super(TestPageGenerators, self).setUp() @@ -59,7 +61,7 @@ def test_PagesFromTitlesGenerator(self): self.assertFunction(PagesFromTitlesGenerator) gen = pagegenerators.PagesFromTitlesGenerator(self.titles) -self.assertEqual(len(self.titles), len(tuple(gen))) +self.assertPagelistTitles(gen, self.titles) def test_NamespaceFilterPageGenerator(self): self.assertFunction(NamespaceFilterPageGenerator) @@ -80,14 +82,19 @@ self.assertFunction(RegexFilterPageGenerator) gen = pagegenerators.PagesFromTitlesGenerator(self.titles) gen = pagegenerators.RegexFilterPageGenerator(gen, '/doc') -self.assertEqual(len(tuple(gen)), 2) +self.assertPagelistTitles(gen, + ('Template:!/Doc', 'Template:Template/Doc')) gen = pagegenerators.PagesFromTitlesGenerator(self.titles) gen =
[MediaWiki-commits] [Gerrit] Fix infinite ApplicationField in proxy custom field object - change (phabricator...Sprint)
Christopher Johnson (WMDE) has submitted this change and it was merged. Change subject: Fix infinite ApplicationField in proxy custom field object .. Fix infinite ApplicationField in proxy custom field object Change-Id: I15151b3417b8f4b6aa67eb3bede75274d046d304 --- M src/customfield/SprintEndDateField.php M src/customfield/SprintStartDateField.php M src/customfield/SprintTaskStoryPointsField.php M src/events/BurndownActionMenuEventListener.php 4 files changed, 23 insertions(+), 13 deletions(-) Approvals: Christopher Johnson (WMDE): Verified; Looks good to me, approved diff --git a/src/customfield/SprintEndDateField.php b/src/customfield/SprintEndDateField.php index 97a69dc..99b20a4 100644 --- a/src/customfield/SprintEndDateField.php +++ b/src/customfield/SprintEndDateField.php @@ -6,16 +6,20 @@ final class SprintEndDateField extends SprintProjectCustomField { + private $obj; + private $proxy; + public function __construct() { -$proxy = id(new PhabricatorStandardCustomFieldDate()) +$this-obj = clone $this; +$this-proxy = id(new PhabricatorStandardCustomFieldDate()) -setFieldKey($this-getFieldKey()) - -setApplicationField($this) + -setApplicationField($this-obj) -setFieldConfig(array( 'name' = $this-getFieldName(), 'description' = $this-getFieldDescription(), )); -$this-setProxy($proxy); +$this-setProxy($this-proxy); } // == General field identity stuff diff --git a/src/customfield/SprintStartDateField.php b/src/customfield/SprintStartDateField.php index fc17335..ce06d03 100644 --- a/src/customfield/SprintStartDateField.php +++ b/src/customfield/SprintStartDateField.php @@ -6,16 +6,20 @@ final class SprintStartDateField extends SprintProjectCustomField { + private $obj; + private $proxy; + public function __construct() { -$proxy = id(new PhabricatorStandardCustomFieldDate()) +$this-obj = clone $this; +$this-proxy = id(new PhabricatorStandardCustomFieldDate()) -setFieldKey($this-getFieldKey()) - -setApplicationField($this) + -setApplicationField($this-obj) -setFieldConfig(array( 'name' = $this-getFieldName(), 'description' = $this-getFieldDescription(), )); -$this-setProxy($proxy); +$this-setProxy($this-proxy); } // == General field identity stuff @@ -45,8 +49,7 @@ } // == Search - public function shouldAppearInApplicationSearch() - { + public function shouldAppearInApplicationSearch() { return true; } diff --git a/src/customfield/SprintTaskStoryPointsField.php b/src/customfield/SprintTaskStoryPointsField.php index 0c98a60..bc97181 100644 --- a/src/customfield/SprintTaskStoryPointsField.php +++ b/src/customfield/SprintTaskStoryPointsField.php @@ -7,17 +7,20 @@ final class SprintTaskStoryPointsField extends ManiphestCustomField implements PhabricatorStandardCustomFieldInterface { - // == General field identity stuff + private $obj; + private $proxy; + public function __construct() { -$proxy = id(new PhabricatorStandardCustomFieldText()) +$this-obj = clone $this; +$this-proxy = id(new PhabricatorStandardCustomFieldText()) -setFieldKey($this-getFieldKey()) - -setApplicationField($this) + -setApplicationField($this-obj) -setFieldConfig(array( 'name' = $this-getFieldName(), 'description' = $this-getFieldDescription(), )); -$this-setProxy($proxy); +$this-setProxy($this-proxy); } public function canSetProxy() { diff --git a/src/events/BurndownActionMenuEventListener.php b/src/events/BurndownActionMenuEventListener.php index 192c3fe..e197fa5 100644 --- a/src/events/BurndownActionMenuEventListener.php +++ b/src/events/BurndownActionMenuEventListener.php @@ -22,7 +22,7 @@ $object = $event-getValue('object'); $actions = null; -if ($object instanceof \PhabricatorProject +if ($object instanceof PhabricatorProject stripos($object-getName(), '§') !== false) { $actions = $this-renderUserItems($event); } -- To view, visit https://gerrit.wikimedia.org/r/169656 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I15151b3417b8f4b6aa67eb3bede75274d046d304 Gerrit-PatchSet: 2 Gerrit-Project: phabricator/extensions/Sprint Gerrit-Branch: master Gerrit-Owner: Christopher Johnson (WMDE) christopher.john...@wikimedia.de Gerrit-Reviewer: Christopher Johnson (WMDE) christopher.john...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [Contributions List] and [Ms Cat Select] Register extensions - change (translatewiki)
Raimond Spekking has submitted this change and it was merged. Change subject: [Contributions List] and [Ms Cat Select] Register extensions .. [Contributions List] and [Ms Cat Select] Register extensions Add 2 more as commented out due to missing qqq Change-Id: I0f4ac5116e3e14dc3c93442a75f49af4f85192ac --- M groups/MediaWiki/mediawiki-extensions.txt 1 file changed, 9 insertions(+), 0 deletions(-) Approvals: Raimond Spekking: Verified; Looks good to me, approved diff --git a/groups/MediaWiki/mediawiki-extensions.txt b/groups/MediaWiki/mediawiki-extensions.txt index a7e362b..0ba704b 100644 --- a/groups/MediaWiki/mediawiki-extensions.txt +++ b/groups/MediaWiki/mediawiki-extensions.txt @@ -650,6 +650,8 @@ Contribution Tracking aliasfile = ContributionTracking/ContributionTracking.alias.php +Contributions List + Contributors aliasfile = Contributors/Contributors.alias.php @@ -680,6 +682,8 @@ Data Transfer aliasfile = DataTransfer/languages/DT_Aliases.php optional = dt_filetype_xml, dt_filetype_csv + +Debug Mode Delete Batch aliasfile = DeleteBatch/DeleteBatch.alias.php @@ -831,6 +835,9 @@ Extra Language Link #Fan Boxes / Missing message documentation, inconsistently prefixed - 2014-01-28 RS + +# Incomplete message documentation file - 2014-10-25 +# Farmer Featured Feeds descmsg = ffeed-desc @@ -1274,6 +1281,8 @@ Mpdf +#Ms Cat Select // Missing qqq + MSSQL Back Compat Multi Maps -- To view, visit https://gerrit.wikimedia.org/r/169658 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0f4ac5116e3e14dc3c93442a75f49af4f85192ac Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Raimond Spekking raimond.spekk...@gmail.com Gerrit-Reviewer: Raimond Spekking raimond.spekk...@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] [Contributions List] and [Ms Cat Select] Register extensions - change (translatewiki)
Raimond Spekking has uploaded a new change for review. https://gerrit.wikimedia.org/r/169658 Change subject: [Contributions List] and [Ms Cat Select] Register extensions .. [Contributions List] and [Ms Cat Select] Register extensions Add 2 more as commented out due to missing qqq Change-Id: I0f4ac5116e3e14dc3c93442a75f49af4f85192ac --- M groups/MediaWiki/mediawiki-extensions.txt 1 file changed, 9 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/58/169658/1 diff --git a/groups/MediaWiki/mediawiki-extensions.txt b/groups/MediaWiki/mediawiki-extensions.txt index a7e362b..0ba704b 100644 --- a/groups/MediaWiki/mediawiki-extensions.txt +++ b/groups/MediaWiki/mediawiki-extensions.txt @@ -650,6 +650,8 @@ Contribution Tracking aliasfile = ContributionTracking/ContributionTracking.alias.php +Contributions List + Contributors aliasfile = Contributors/Contributors.alias.php @@ -680,6 +682,8 @@ Data Transfer aliasfile = DataTransfer/languages/DT_Aliases.php optional = dt_filetype_xml, dt_filetype_csv + +Debug Mode Delete Batch aliasfile = DeleteBatch/DeleteBatch.alias.php @@ -831,6 +835,9 @@ Extra Language Link #Fan Boxes / Missing message documentation, inconsistently prefixed - 2014-01-28 RS + +# Incomplete message documentation file - 2014-10-25 +# Farmer Featured Feeds descmsg = ffeed-desc @@ -1274,6 +1281,8 @@ Mpdf +#Ms Cat Select // Missing qqq + MSSQL Back Compat Multi Maps -- To view, visit https://gerrit.wikimedia.org/r/169658 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0f4ac5116e3e14dc3c93442a75f49af4f85192ac Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Raimond Spekking raimond.spekk...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fixed display of section results - change (mediawiki...BlueSpiceExtensions)
Smuggli has uploaded a new change for review. https://gerrit.wikimedia.org/r/169659 Change subject: Fixed display of section results .. Fixed display of section results Also improved code a little bit Change-Id: I97058b1823213bc233a68e755ac872acb8eacc24 --- M ExtendedSearch/includes/SearchIndex/SearchOptions.class.php M ExtendedSearch/includes/SearchIndex/SearchResult.class.php M ExtendedSearch/resources/bluespice.extendedSearch.specialpage.css 3 files changed, 16 insertions(+), 18 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions refs/changes/59/169659/1 diff --git a/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php b/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php index eb9debe..2d7ba23 100644 --- a/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php +++ b/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php @@ -290,6 +290,7 @@ * Processes incoming search request */ public function readInSearchRequest() { + global $wgCanonicalNamespaceNames, $wgExtraNamespaces; $this-aOptions['searchStringRaw'] = $this-oSearchRequest-sInput; $this-aOptions['searchStringOrig'] = ExtendedSearchBase::preprocessSearchInput( $this-oSearchRequest-sInput ); @@ -298,9 +299,6 @@ $sCustomerId = $this-getCustomerId(); $aFq = array(); - $aFq[] = 'redirect:0'; - $aFq[] = 'special:0'; - $aFq[] = 'wiki:('.$sCustomerId.')'; $vNamespace = $this-checkSearchstringForNamespace( $this-aOptions['searchStringRaw'], @@ -311,13 +309,11 @@ $this-aOptions['searchStringWildcarded'] = SearchService::wildcardSearchstring( $this-aOptions['searchStringOrig'] ); $this-aOptions['searchStringForStatistics'] = $this-aOptions['searchStringWildcarded']; - $this-aOptions['searchStrComp'] = array(); $this-aOptions['bExtendedForm'] = $this-oSearchRequest-bExtendedForm; - $scope = BsConfig::get( 'MW::ExtendedSearch::DefScopeUser' ) == 'title' ? 'title' : 'text'; - - if ( $this-oSearchRequest-sScope == 'title' ) $scope = 'title'; - if ( $this-oSearchRequest-sScope == 'text' ) $scope = 'text'; + $scope = ( BsConfig::get( 'MW::ExtendedSearch::DefScopeUser' ) == 'title' ) + ? 'title' + : 'text'; $this-aOptions['scope'] = $scope; $aSearchTitle = array( @@ -326,7 +322,6 @@ 'titleReverse:(' . $this-aOptions['searchStringWildcarded'] . ')', 'redirects:(' . $this-aOptions['searchStringOrig'] . ')' ); - $aSearchText = array( 'textWord:(' . $this-aOptions['searchStringOrig'] .')^2', 'textReverse:(' . $this-aOptions['searchStringWildcarded'] . ')', @@ -334,20 +329,20 @@ ); $sSearchStringTitle = implode( ' OR ', $aSearchTitle ); - $sSearchStringText = implode( ' OR ', $aSearchText ); - $this-aOptions['searchStrComp']['searchStrInTitle'] = $sSearchStringTitle; - $this-aOptions['searchStrComp']['searchStrInFulltext'] = $sSearchStringText; - $this-aOptions['searchStringFinal'] = ( $this-aOptions['scope'] === 'title' ) - ? $this-aOptions['searchStrComp']['searchStrInTitle'] - : implode( ' OR ', $this-aOptions['searchStrComp'] ); + ? $sSearchStringTitle + : $sSearchStringTitle . ' OR ' . $sSearchStringText; // $this-aOptions['namespaces'] HAS TO BE an array with numeric indices of type string! $this-aOptions['namespaces'] = $this-oSearchRequest-aNamespaces; - global $wgCanonicalNamespaceNames, $wgExtraNamespaces; + // filter query + $aFq[] = 'redirect:0'; + $aFq[] = 'special:0'; + $aFq[] = 'wiki:('.$sCustomerId.')'; + $aNamespaces = array_slice( $wgCanonicalNamespaceNames, 2 ); $aNamespaces = $aNamespaces + $wgExtraNamespaces; diff --git a/ExtendedSearch/includes/SearchIndex/SearchResult.class.php b/ExtendedSearch/includes/SearchIndex/SearchResult.class.php index 699aec0..a55889d 100644 --- a/ExtendedSearch/includes/SearchIndex/SearchResult.class.php +++ b/ExtendedSearch/includes/SearchIndex/SearchResult.class.php @@ -372,6 +372,8 @@ 'default' = 'img src=' . $sImgPath . '/page.gif alt=page / ' ); + $oParser = new Parser(); + foreach ( $this-oResponse-response-docs as $oDocument ) {
[MediaWiki-commits] [Gerrit] Apex, MediaWiki themes: Move colour definitions into LESS va... - change (oojs/ui)
jenkins-bot has submitted this change and it was merged. Change subject: Apex, MediaWiki themes: Move colour definitions into LESS variables .. Apex, MediaWiki themes: Move colour definitions into LESS variables Change-Id: I3a35a5dd0bcd1875d6007fea81fa345bab285fb0 --- M src/themes/apex/common.less M src/themes/apex/elements.less M src/themes/apex/widgets.less M src/themes/mediawiki/common.less M src/themes/mediawiki/elements.less M src/themes/mediawiki/widgets.less 6 files changed, 82 insertions(+), 40 deletions(-) Approvals: Jforrester: Looks good to me, but someone else must approve Esanders: Looks good to me, approved jenkins-bot: Verified diff --git a/src/themes/apex/common.less b/src/themes/apex/common.less index 1bcb2c2..db2a971 100644 --- a/src/themes/apex/common.less +++ b/src/themes/apex/common.less @@ -3,6 +3,20 @@ // Theme variables +@primary: #087ecc; +@constructive: #76ab36; +@destructive: #d45353; + +@primary-gradient-start: #eaf4fa; +@primary-gradient-end: #b0d9ee; +@primary-border: #a6cee1; +@primary-border-selected: #9dc2d4; + +@constructive-gradient-start: #f0fbe1; +@constructive-gradient-end: #c3e59a; +@constructive-border: #b8d892; +@constructive-border-selected: #adcb89; + @oo-ui-default-image-path: 'themes/apex/images'; // Theme mixins diff --git a/src/themes/apex/elements.less b/src/themes/apex/elements.less index b037adc..d21438a 100644 --- a/src/themes/apex/elements.less +++ b/src/themes/apex/elements.less @@ -53,15 +53,15 @@ .oo-ui-flaggedElement { -primary .oo-ui-buttonElement-button .oo-ui-labelElement-label { - color: #087ecc; + color: @primary; } -constructive .oo-ui-buttonElement-button .oo-ui-labelElement-label { - color: #76ab36; + color: @constructive; } -destructive .oo-ui-buttonElement-button .oo-ui-labelElement-label { - color: #d45353; + color: @destructive; } } @@ -122,44 +122,44 @@ .oo-ui-flaggedElement { -primary { .oo-ui-buttonElement-button { - border: solid 1px #a6cee1; - .oo-ui-vertical-gradient(#eaf4fa, #b0d9ee); + border: solid 1px @primary-border; + .oo-ui-vertical-gradient(@primary-gradient-start, @primary-gradient-end); :hover, :focus { - border-color: #9dc2d4; + border-color: @primary-border-selected; } } .oo-ui-widget-enabled .oo-ui-buttonElement-button:active, .oo-ui-buttonElement-active .oo-ui-buttonElement-button, .oo-ui-buttonElement-pressed .oo-ui-buttonElement-button { - border: solid 1px #a6cee1; - .oo-ui-vertical-gradient(#b0d9ee, #eaf4fa); + border: solid 1px @primary-border; + .oo-ui-vertical-gradient(@primary-gradient-end, @primary-gradient-start); } } -constructive { .oo-ui-buttonElement-button { - border: solid 1px #b8d892; - .oo-ui-vertical-gradient(#f0fbe1, #c3e59a); + border: solid 1px @constructive-border; + .oo-ui-vertical-gradient(@constructive-gradient-start, @constructive-gradient-end); :hover, :focus { - border-color: #adcb89; + border-color: @constructive-border-selected; } } .oo-ui-widget-enabled .oo-ui-buttonElement-button:active, .oo-ui-buttonElement-active .oo-ui-buttonElement-button, .oo-ui-buttonElement-pressed .oo-ui-buttonElement-button { - border: solid 1px #b8d892; -
[MediaWiki-commits] [Gerrit] Fixed display of section results - change (mediawiki...BlueSpiceExtensions)
jenkins-bot has submitted this change and it was merged. Change subject: Fixed display of section results .. Fixed display of section results Also improved code a little bit Change-Id: I97058b1823213bc233a68e755ac872acb8eacc24 --- M ExtendedSearch/includes/SearchIndex/SearchOptions.class.php M ExtendedSearch/includes/SearchIndex/SearchResult.class.php M ExtendedSearch/resources/bluespice.extendedSearch.specialpage.css 3 files changed, 16 insertions(+), 18 deletions(-) Approvals: Robert Vogel: Checked; Looks good to me, but someone else must approve Smuggli: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php b/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php index eb9debe..2d7ba23 100644 --- a/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php +++ b/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php @@ -290,6 +290,7 @@ * Processes incoming search request */ public function readInSearchRequest() { + global $wgCanonicalNamespaceNames, $wgExtraNamespaces; $this-aOptions['searchStringRaw'] = $this-oSearchRequest-sInput; $this-aOptions['searchStringOrig'] = ExtendedSearchBase::preprocessSearchInput( $this-oSearchRequest-sInput ); @@ -298,9 +299,6 @@ $sCustomerId = $this-getCustomerId(); $aFq = array(); - $aFq[] = 'redirect:0'; - $aFq[] = 'special:0'; - $aFq[] = 'wiki:('.$sCustomerId.')'; $vNamespace = $this-checkSearchstringForNamespace( $this-aOptions['searchStringRaw'], @@ -311,13 +309,11 @@ $this-aOptions['searchStringWildcarded'] = SearchService::wildcardSearchstring( $this-aOptions['searchStringOrig'] ); $this-aOptions['searchStringForStatistics'] = $this-aOptions['searchStringWildcarded']; - $this-aOptions['searchStrComp'] = array(); $this-aOptions['bExtendedForm'] = $this-oSearchRequest-bExtendedForm; - $scope = BsConfig::get( 'MW::ExtendedSearch::DefScopeUser' ) == 'title' ? 'title' : 'text'; - - if ( $this-oSearchRequest-sScope == 'title' ) $scope = 'title'; - if ( $this-oSearchRequest-sScope == 'text' ) $scope = 'text'; + $scope = ( BsConfig::get( 'MW::ExtendedSearch::DefScopeUser' ) == 'title' ) + ? 'title' + : 'text'; $this-aOptions['scope'] = $scope; $aSearchTitle = array( @@ -326,7 +322,6 @@ 'titleReverse:(' . $this-aOptions['searchStringWildcarded'] . ')', 'redirects:(' . $this-aOptions['searchStringOrig'] . ')' ); - $aSearchText = array( 'textWord:(' . $this-aOptions['searchStringOrig'] .')^2', 'textReverse:(' . $this-aOptions['searchStringWildcarded'] . ')', @@ -334,20 +329,20 @@ ); $sSearchStringTitle = implode( ' OR ', $aSearchTitle ); - $sSearchStringText = implode( ' OR ', $aSearchText ); - $this-aOptions['searchStrComp']['searchStrInTitle'] = $sSearchStringTitle; - $this-aOptions['searchStrComp']['searchStrInFulltext'] = $sSearchStringText; - $this-aOptions['searchStringFinal'] = ( $this-aOptions['scope'] === 'title' ) - ? $this-aOptions['searchStrComp']['searchStrInTitle'] - : implode( ' OR ', $this-aOptions['searchStrComp'] ); + ? $sSearchStringTitle + : $sSearchStringTitle . ' OR ' . $sSearchStringText; // $this-aOptions['namespaces'] HAS TO BE an array with numeric indices of type string! $this-aOptions['namespaces'] = $this-oSearchRequest-aNamespaces; - global $wgCanonicalNamespaceNames, $wgExtraNamespaces; + // filter query + $aFq[] = 'redirect:0'; + $aFq[] = 'special:0'; + $aFq[] = 'wiki:('.$sCustomerId.')'; + $aNamespaces = array_slice( $wgCanonicalNamespaceNames, 2 ); $aNamespaces = $aNamespaces + $wgExtraNamespaces; diff --git a/ExtendedSearch/includes/SearchIndex/SearchResult.class.php b/ExtendedSearch/includes/SearchIndex/SearchResult.class.php index 699aec0..a55889d 100644 --- a/ExtendedSearch/includes/SearchIndex/SearchResult.class.php +++ b/ExtendedSearch/includes/SearchIndex/SearchResult.class.php @@ -372,6 +372,8 @@ 'default' = 'img src=' . $sImgPath . '/page.gif alt=page / ' ); + $oParser = new Parser(); + foreach ( $this-oResponse-response-docs as $oDocument ) {
[MediaWiki-commits] [Gerrit] Change pagegenerator tests to dry tests - change (pywikibot/core)
John Vandenberg has uploaded a new change for review. https://gerrit.wikimedia.org/r/169660 Change subject: Change pagegenerator tests to dry tests .. Change pagegenerator tests to dry tests Adjust NamespaceFilterPageGenerator such that the site parameter is only needed if namespaces contains strings that are not integers. Update many of the pagegenerators tests to work using a dry site. Change-Id: I25ee1f17f6c0478da43c8c2e1576b69f0140b737 --- M pywikibot/pagegenerators.py M tests/pagegenerators_tests.py 2 files changed, 31 insertions(+), 17 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/60/169660/1 diff --git a/pywikibot/pagegenerators.py b/pywikibot/pagegenerators.py index b79dfda..928652d 100644 --- a/pywikibot/pagegenerators.py +++ b/pywikibot/pagegenerators.py @@ -871,6 +871,7 @@ @param total: Maxmum number of pages to retrieve in total @type total: int @param namespaces: list of namespace numbers to fetch contribs from +@type namespaces: list of int @param site: Site for generator results. @type site: L{pywikibot.site.BaseSite} @@ -894,11 +895,12 @@ NOTE: API-based generators that have a namespaces parameter perform namespace filtering more efficiently than this generator. -@param site: Site for generator results. +@param namespaces: list of namespace numbers to limit results +@type namespaces: list of int +@param site: Site for generator results, only needed if +namespaces contains namespace names. @type site: L{pywikibot.site.BaseSite} -if site is None: -site = pywikibot.Site() if isinstance(namespaces, (int, basestring)): namespaces = [namespaces] # convert namespace names to namespace numbers @@ -909,6 +911,9 @@ # namespace might be given as str representation of int index = int(ns) except ValueError: +# FIXME: deprecate providing strings as namespaces +if site is None: +site = pywikibot.Site() index = site.getNamespaceIndex(ns) if index is None: raise ValueError(u'Unknown namespace: %s' % ns) diff --git a/tests/pagegenerators_tests.py b/tests/pagegenerators_tests.py index 96e5dfa..aba6751 100755 --- a/tests/pagegenerators_tests.py +++ b/tests/pagegenerators_tests.py @@ -26,7 +26,7 @@ family = 'wikipedia' code = 'en' -cached = True +dry = True titles = [ # just a bunch of randomly selected titles @@ -58,49 +58,49 @@ def test_PagesFromTitlesGenerator(self): self.assertFunction(PagesFromTitlesGenerator) -gen = pagegenerators.PagesFromTitlesGenerator(self.titles) +gen = pagegenerators.PagesFromTitlesGenerator(self.titles, self.site) self.assertEqual(len(self.titles), len(tuple(gen))) def test_NamespaceFilterPageGenerator(self): self.assertFunction(NamespaceFilterPageGenerator) -gen = pagegenerators.PagesFromTitlesGenerator(self.titles) +gen = pagegenerators.PagesFromTitlesGenerator(self.titles, self.site) gen = pagegenerators.NamespaceFilterPageGenerator(gen, 0) self.assertEqual(len(tuple(gen)), 3) -gen = pagegenerators.PagesFromTitlesGenerator(self.titles) +gen = pagegenerators.PagesFromTitlesGenerator(self.titles, self.site) gen = pagegenerators.NamespaceFilterPageGenerator(gen, 1) self.assertEqual(len(tuple(gen)), 4) -gen = pagegenerators.PagesFromTitlesGenerator(self.titles) +gen = pagegenerators.PagesFromTitlesGenerator(self.titles, self.site) gen = pagegenerators.NamespaceFilterPageGenerator(gen, 10) self.assertEqual(len(tuple(gen)), 6) -gen = pagegenerators.PagesFromTitlesGenerator(self.titles) +gen = pagegenerators.PagesFromTitlesGenerator(self.titles, self.site) gen = pagegenerators.NamespaceFilterPageGenerator(gen, (1, 10)) self.assertEqual(len(tuple(gen)), 10) def test_RegexFilterPageGenerator(self): self.assertFunction(RegexFilterPageGenerator) -gen = pagegenerators.PagesFromTitlesGenerator(self.titles) +gen = pagegenerators.PagesFromTitlesGenerator(self.titles, self.site) gen = pagegenerators.RegexFilterPageGenerator(gen, '/doc') self.assertEqual(len(tuple(gen)), 2) -gen = pagegenerators.PagesFromTitlesGenerator(self.titles) +gen = pagegenerators.PagesFromTitlesGenerator(self.titles, self.site) gen = pagegenerators.RegexFilterPageGenerator(gen, '/doc', quantifier='none') self.assertEqual(len(tuple(gen)), 11) -gen = pagegenerators.PagesFromTitlesGenerator(self.titles) +gen = pagegenerators.PagesFromTitlesGenerator(self.titles,
[MediaWiki-commits] [Gerrit] Provide a generic mechanism for mapping classes to attributes - change (VisualEditor/VisualEditor)
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/169661 Change subject: Provide a generic mechanism for mapping classes to attributes .. Provide a generic mechanism for mapping classes to attributes Currently this is only used by MW nodes (BlockImage and Table) but this may be useful to core or other extensions in the future. Change-Id: I2db656351942be14d320b4221d2f268c02875b7a --- M .docs/eg-iframe.html M build/modules.json M demos/ve/desktop.html M demos/ve/mobile.html A src/dm/ve.dm.ClassAttributeNode.js M tests/index.html 6 files changed, 110 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/61/169661/1 diff --git a/.docs/eg-iframe.html b/.docs/eg-iframe.html index a1caf86..0aa1c92 100644 --- a/.docs/eg-iframe.html +++ b/.docs/eg-iframe.html @@ -209,6 +209,7 @@ script src=../src/ce/ve.ce.Annotation.js/script script src=../src/ce/ve.ce.Node.js/script script src=../src/ce/ve.ce.BranchNode.js/script + script src=../src/ce/ve.ce.ClassAttributeNode.js/script script src=../src/ce/ve.ce.ContentBranchNode.js/script script src=../src/ce/ve.ce.LeafNode.js/script script src=../src/ce/ve.ce.FocusableNode.js/script diff --git a/build/modules.json b/build/modules.json index 902118e..e262fb9 100644 --- a/build/modules.json +++ b/build/modules.json @@ -233,6 +233,7 @@ src/ce/ve.ce.Annotation.js, src/ce/ve.ce.Node.js, src/ce/ve.ce.BranchNode.js, + src/ce/ve.ce.ClassAttributeNode.js, src/ce/ve.ce.ContentBranchNode.js, src/ce/ve.ce.LeafNode.js, src/ce/ve.ce.FocusableNode.js, diff --git a/demos/ve/desktop.html b/demos/ve/desktop.html index c2dbdbb..a36fa66 100644 --- a/demos/ve/desktop.html +++ b/demos/ve/desktop.html @@ -221,6 +221,7 @@ script src=../../src/ce/ve.ce.Annotation.js/script script src=../../src/ce/ve.ce.Node.js/script script src=../../src/ce/ve.ce.BranchNode.js/script + script src=../../src/ce/ve.ce.ClassAttributeNode.js/script script src=../../src/ce/ve.ce.ContentBranchNode.js/script script src=../../src/ce/ve.ce.LeafNode.js/script script src=../../src/ce/ve.ce.FocusableNode.js/script diff --git a/demos/ve/mobile.html b/demos/ve/mobile.html index e2ddd95..bee38a5 100644 --- a/demos/ve/mobile.html +++ b/demos/ve/mobile.html @@ -222,6 +222,7 @@ script src=../../src/ce/ve.ce.Annotation.js/script script src=../../src/ce/ve.ce.Node.js/script script src=../../src/ce/ve.ce.BranchNode.js/script + script src=../../src/ce/ve.ce.ClassAttributeNode.js/script script src=../../src/ce/ve.ce.ContentBranchNode.js/script script src=../../src/ce/ve.ce.LeafNode.js/script script src=../../src/ce/ve.ce.FocusableNode.js/script diff --git a/src/dm/ve.dm.ClassAttributeNode.js b/src/dm/ve.dm.ClassAttributeNode.js new file mode 100644 index 000..fe3b6d6 --- /dev/null +++ b/src/dm/ve.dm.ClassAttributeNode.js @@ -0,0 +1,105 @@ +/*! + * VisualEditor DataModel ClassAttribute class. + * + * @copyright 2011-2014 VisualEditor Team and others; see AUTHORS.txt + * @license The MIT License (MIT); see LICENSE.txt + */ + +/** + * DataModel class-attribute node. + * + * Used for nodes which use classes to store attributes. + * + * @class + * @abstract + * + * @constructor + */ +ve.dm.ClassAttributeNode = function VeDmClassAttributeNode() {}; + +/* Inheritance */ + +OO.initClass( ve.dm.ClassAttributeNode ); + +/* Static methods */ + +/** + * Mapping from class names to attributes + * + * e.g. { alignLeft: { align: 'left' } } sets the align attribute to 'left' + * if the element has the class 'alignLeft' + * + * @type {Object} + */ +ve.dm.ClassAttributeNode.static.classAttributes = {}; + +/** + * Set attributes from a class attribute + * + * Unrecognized classes are also preserved. + * + * @param {Object} attributes Attributes object to modify + * @param {string|null} classAttr Class attribute from an element + */ +ve.dm.ClassAttributeNode.static.setClassAttributes = function ( attributes, classAttr ) { + var className, i, l, + unrecognizedClasses = [], + classNames = classAttr ? classAttr.trim().split( /\s+/ ) : []; + + if ( !classNames.length ) { + return; + } + + for ( i = 0, l = classNames.length; i l; i++ ) { + className = classNames[i]; + if ( className in this.classAttributes ) { + attributes = ve.extendObject( attributes, this.classAttributes[className] ); +
[MediaWiki-commits] [Gerrit] new script: swift-add-machine - change (operations...swift-ring)
Filippo Giunchedi has uploaded a new change for review. https://gerrit.wikimedia.org/r/169662 Change subject: new script: swift-add-machine .. new script: swift-add-machine I had this script lying around, committing Change-Id: I578dbba0e82d903110e43486ad7460090085a10b --- A bin/swift-add-machine 1 file changed, 25 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/software/swift-ring refs/changes/62/169662/1 diff --git a/bin/swift-add-machine b/bin/swift-add-machine new file mode 100755 index 000..254ec92 --- /dev/null +++ b/bin/swift-add-machine @@ -0,0 +1,25 @@ +#!/bin/bash +# add a machine (ip address + zone) to an existing swift cluster +set -e +set -u + +zone=$1 +ip=$2 +region=1 +object_weight=${object_weight:=2000} +nonobject_weight=${nonobject_weight:=92} + +for dev in sda1 sdb1 sdc1 sdd1 sde1 sdf1 sdg1 sdh1 sdi1 sdk1 sdl1 ; do + swift-ring-builder object.builder add --region $region --zone $zone \ +--ip $ip --port 6000 --weight $object_weight --device $dev +done + +for dev in sdm3 sdn3; do + swift-ring-builder container.builder add --region $region --zone $zone \ +--ip $ip --port 6001 --weight $nonobject_weight --device $dev +done + +for dev in sdm3 sdn3; do + swift-ring-builder account.builder add --region $region --zone $zone \ +--ip $ip --port 6002 --weight $nonobject_weight --device $dev +done -- To view, visit https://gerrit.wikimedia.org/r/169662 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I578dbba0e82d903110e43486ad7460090085a10b Gerrit-PatchSet: 1 Gerrit-Project: operations/software/swift-ring Gerrit-Branch: master 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] new script: swift-add-machine - change (operations...swift-ring)
Filippo Giunchedi has submitted this change and it was merged. Change subject: new script: swift-add-machine .. new script: swift-add-machine I had this script lying around, committing Change-Id: I578dbba0e82d903110e43486ad7460090085a10b --- A bin/swift-add-machine 1 file changed, 25 insertions(+), 0 deletions(-) Approvals: Filippo Giunchedi: Verified; Looks good to me, approved diff --git a/bin/swift-add-machine b/bin/swift-add-machine new file mode 100755 index 000..254ec92 --- /dev/null +++ b/bin/swift-add-machine @@ -0,0 +1,25 @@ +#!/bin/bash +# add a machine (ip address + zone) to an existing swift cluster +set -e +set -u + +zone=$1 +ip=$2 +region=1 +object_weight=${object_weight:=2000} +nonobject_weight=${nonobject_weight:=92} + +for dev in sda1 sdb1 sdc1 sdd1 sde1 sdf1 sdg1 sdh1 sdi1 sdk1 sdl1 ; do + swift-ring-builder object.builder add --region $region --zone $zone \ +--ip $ip --port 6000 --weight $object_weight --device $dev +done + +for dev in sdm3 sdn3; do + swift-ring-builder container.builder add --region $region --zone $zone \ +--ip $ip --port 6001 --weight $nonobject_weight --device $dev +done + +for dev in sdm3 sdn3; do + swift-ring-builder account.builder add --region $region --zone $zone \ +--ip $ip --port 6002 --weight $nonobject_weight --device $dev +done -- To view, visit https://gerrit.wikimedia.org/r/169662 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I578dbba0e82d903110e43486ad7460090085a10b Gerrit-PatchSet: 1 Gerrit-Project: operations/software/swift-ring Gerrit-Branch: master Gerrit-Owner: Filippo Giunchedi fgiunch...@wikimedia.org Gerrit-Reviewer: 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] New Wikidata Build - 2014/10/29 - change (mediawiki...Wikidata)
Tobias Gritschacher has uploaded a new change for review. https://gerrit.wikimedia.org/r/169663 Change subject: New Wikidata Build - 2014/10/29 .. New Wikidata Build - 2014/10/29 Change-Id: Iac727c34d59a9d44f4697ef2e550651b9fbef62d --- M WikibaseClient.settings.php M WikibaseRepo.settings.php M composer.lock M extensions/Wikibase/client/i18n/ru.json M extensions/Wikibase/client/resources/wikibase.client.getMwApiForRepo.js M extensions/Wikibase/client/resources/wikibase.client.linkitem.init.js M extensions/Wikibase/lib/i18n/ru.json M extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplabelscroll.js M extensions/Wikibase/lib/resources/jquery.wikibase/toolbar/jquery.wikibase.edittoolbar.js M extensions/Wikibase/lib/resources/jquery.wikibase/toolbar/jquery.wikibase.singlebuttontoolbar.js M extensions/Wikibase/lib/resources/jquery.wikibase/toolbar/themes/default/jquery.wikibase.toolbarbutton.css M extensions/Wikibase/repo/Wikibase.hooks.php M extensions/Wikibase/repo/i18n/ce.json M extensions/Wikibase/repo/i18n/ru.json M extensions/Wikibase/repo/i18n/sr-ec.json M extensions/Wikibase/repo/includes/actions/ViewEntityAction.php M extensions/Wikibase/repo/resources/wikibase.ui.entitysearch.js M vendor/autoload.php M vendor/composer/autoload_real.php M vendor/composer/installed.json M vendor/wikibase/data-model/WikibaseDataModel.php M vendor/wikibase/data-model/src/ReferenceList.php 22 files changed, 157 insertions(+), 120 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikidata refs/changes/63/169663/1 diff --git a/WikibaseClient.settings.php b/WikibaseClient.settings.php index b561ba0..7dcc8a1 100644 --- a/WikibaseClient.settings.php +++ b/WikibaseClient.settings.php @@ -1,2 +1,2 @@ ?php -$wgWBClientSettings[sharedCacheKeyPrefix] = wikibase:WBL/1414492919; \ No newline at end of file +$wgWBClientSettings[sharedCacheKeyPrefix] = wikibase:WBL/1414575514; \ No newline at end of file diff --git a/WikibaseRepo.settings.php b/WikibaseRepo.settings.php index ed18688..89f4c63 100644 --- a/WikibaseRepo.settings.php +++ b/WikibaseRepo.settings.php @@ -1,2 +1,2 @@ ?php -$wgWBRepoSettings[sharedCacheKeyPrefix] = wikibase:WBL/1414492919; \ No newline at end of file +$wgWBRepoSettings[sharedCacheKeyPrefix] = wikibase:WBL/1414575514; \ No newline at end of file diff --git a/composer.lock b/composer.lock index a930553..815e914 100644 --- a/composer.lock +++ b/composer.lock @@ -891,16 +891,16 @@ }, { name: wikibase/data-model, -version: 2.1.0, +version: 2.1.1, source: { type: git, url: https://github.com/wmde/WikibaseDataModel.git;, -reference: b79f935ee553392d71e71e6274bf3e78e9e2d5ac +reference: ddb7d18bcd8ed835d3ebdfc20c7a22e0df4049e6 }, dist: { type: zip, -url: https://api.github.com/repos/wmde/WikibaseDataModel/zipball/b79f935ee553392d71e71e6274bf3e78e9e2d5ac;, -reference: b79f935ee553392d71e71e6274bf3e78e9e2d5ac, +url: https://api.github.com/repos/wmde/WikibaseDataModel/zipball/ddb7d18bcd8ed835d3ebdfc20c7a22e0df4049e6;, +reference: ddb7d18bcd8ed835d3ebdfc20c7a22e0df4049e6, shasum: }, require: { @@ -944,7 +944,7 @@ wikibase, wikidata ], -time: 2014-10-27 18:08:26 +time: 2014-10-28 13:04:15 }, { name: wikibase/data-model-javascript, @@ -1203,12 +1203,12 @@ source: { type: git, url: https://github.com/wikimedia/mediawiki-extensions-Wikibase.git;, -reference: e2b6bd9f9d53f67a37e26286419696ecbf59ef87 +reference: 0cbf92eb74ccde368ebcc53b9a5828ac2e336b7d }, dist: { type: zip, -url: https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/e2b6bd9f9d53f67a37e26286419696ecbf59ef87;, -reference: e2b6bd9f9d53f67a37e26286419696ecbf59ef87, +url: https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/0cbf92eb74ccde368ebcc53b9a5828ac2e336b7d;, +reference: 0cbf92eb74ccde368ebcc53b9a5828ac2e336b7d, shasum: }, require: { @@ -1274,7 +1274,7 @@ wikibaserepo, wikidata ], -time: 2014-10-28 10:36:53 +time: 2014-10-28 22:27:04 }, { name: wikibase/wikimedia-badges, diff --git a/extensions/Wikibase/client/i18n/ru.json b/extensions/Wikibase/client/i18n/ru.json index 97bc9f6..a318906 100644 --- a/extensions/Wikibase/client/i18n/ru.json +++
[MediaWiki-commits] [Gerrit] Disable two failing scenarios - change (mediawiki...VisualEditor)
Amire80 has uploaded a new change for review. https://gerrit.wikimedia.org/r/169664 Change subject: Disable two failing scenarios .. Disable two failing scenarios To allow other screenshots to be created. Change-Id: I3e892baa9cb2c8c1303fab232a2b1c64ebdd8f26 --- M modules/ve-mw/tests/browser/features/language_screenshot.feature 1 file changed, 0 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/64/169664/1 diff --git a/modules/ve-mw/tests/browser/features/language_screenshot.feature b/modules/ve-mw/tests/browser/features/language_screenshot.feature index 7aad934..b86bdb6 100644 --- a/modules/ve-mw/tests/browser/features/language_screenshot.feature +++ b/modules/ve-mw/tests/browser/features/language_screenshot.feature @@ -45,7 +45,6 @@ When I click on Page settings option Then I should see Page settings dialog box - @language_screenshot Scenario: VisualEditor_Toolbar_Lists_and_indentation Given I go to the Indent Outdent Screenshot page with source content Indent Outdent Screenshot And I make the text Indent Outdent be selected @@ -131,7 +130,6 @@ When I click on category in hamburger menu Then I should see category dialog box - @language_screenshot Scenario: VisualEditor_formula Given I go to the Formula Screenshot page with source content When I click on Formula option in Insert menu -- To view, visit https://gerrit.wikimedia.org/r/169664 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3e892baa9cb2c8c1303fab232a2b1c64ebdd8f26 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor 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] [BrowserTest] Disable two failing scenarios - change (mediawiki...VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: [BrowserTest] Disable two failing scenarios .. [BrowserTest] Disable two failing scenarios To allow other screenshots to be created. Change-Id: I3e892baa9cb2c8c1303fab232a2b1c64ebdd8f26 --- M modules/ve-mw/tests/browser/features/language_screenshot.feature 1 file changed, 0 insertions(+), 2 deletions(-) Approvals: Zfilipin: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ve-mw/tests/browser/features/language_screenshot.feature b/modules/ve-mw/tests/browser/features/language_screenshot.feature index 7aad934..b86bdb6 100644 --- a/modules/ve-mw/tests/browser/features/language_screenshot.feature +++ b/modules/ve-mw/tests/browser/features/language_screenshot.feature @@ -45,7 +45,6 @@ When I click on Page settings option Then I should see Page settings dialog box - @language_screenshot Scenario: VisualEditor_Toolbar_Lists_and_indentation Given I go to the Indent Outdent Screenshot page with source content Indent Outdent Screenshot And I make the text Indent Outdent be selected @@ -131,7 +130,6 @@ When I click on category in hamburger menu Then I should see category dialog box - @language_screenshot Scenario: VisualEditor_formula Given I go to the Formula Screenshot page with source content When I click on Formula option in Insert menu -- To view, visit https://gerrit.wikimedia.org/r/169664 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3e892baa9cb2c8c1303fab232a2b1c64ebdd8f26 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il 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] Syncronize VisualEditor: cbb113b..b4e98c1 - change (mediawiki/extensions)
Jenkins-mwext-sync has submitted this change and it was merged. Change subject: Syncronize VisualEditor: cbb113b..b4e98c1 .. Syncronize VisualEditor: cbb113b..b4e98c1 Change-Id: Iad370ca2588b54e9f54e94dbe86eef23d9fbc257 --- M VisualEditor 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Jenkins-mwext-sync: Verified; Looks good to me, approved diff --git a/VisualEditor b/VisualEditor index cbb113b..b4e98c1 16 --- a/VisualEditor +++ b/VisualEditor -Subproject commit cbb113bcccf71a2f4ed1cdff626e9a7a7f527238 +Subproject commit b4e98c14905bebbff9d676353d6eeba9d37b24a7 -- To view, visit https://gerrit.wikimedia.org/r/169665 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iad370ca2588b54e9f54e94dbe86eef23d9fbc257 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions Gerrit-Branch: master Gerrit-Owner: Jenkins-mwext-sync jenkins-...@wikimedia.org Gerrit-Reviewer: Jenkins-mwext-sync jenkins-...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: cbb113b..b4e98c1 - change (mediawiki/extensions)
Jenkins-mwext-sync has uploaded a new change for review. https://gerrit.wikimedia.org/r/169665 Change subject: Syncronize VisualEditor: cbb113b..b4e98c1 .. Syncronize VisualEditor: cbb113b..b4e98c1 Change-Id: Iad370ca2588b54e9f54e94dbe86eef23d9fbc257 --- M VisualEditor 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions refs/changes/65/169665/1 diff --git a/VisualEditor b/VisualEditor index cbb113b..b4e98c1 16 --- a/VisualEditor +++ b/VisualEditor -Subproject commit cbb113bcccf71a2f4ed1cdff626e9a7a7f527238 +Subproject commit b4e98c14905bebbff9d676353d6eeba9d37b24a7 -- To view, visit https://gerrit.wikimedia.org/r/169665 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iad370ca2588b54e9f54e94dbe86eef23d9fbc257 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions Gerrit-Branch: master Gerrit-Owner: Jenkins-mwext-sync jenkins-...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] webserver - replace firewall rules with ferm - change (operations/puppet)
Alexandros Kosiaris has submitted this change and it was merged. Change subject: webserver - replace firewall rules with ferm .. webserver - replace firewall rules with ferm use the ferm classes for firewalling, like we do in other places, do not use the older firewall class anymore, so eventually we can delete misc/firewall.pp enable us to merge Ie987ec2312c5e9d Change-Id: I72ad0e33f7f06d4c98bd28129d63d409bb2d0f2c --- M modules/webserver/manifests/static.pp 1 file changed, 6 insertions(+), 5 deletions(-) Approvals: Matanya: Looks good to me, but someone else must approve Alexandros Kosiaris: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/webserver/manifests/static.pp b/modules/webserver/manifests/static.pp index a66e2a9..c7cc139 100644 --- a/modules/webserver/manifests/static.pp +++ b/modules/webserver/manifests/static.pp @@ -2,7 +2,6 @@ # with default config, which serves /var/www class webserver::static { include webserver::sysctl_settings -include firewall #TODO: declare this class as incompatible with the other webserver classes. @@ -27,11 +26,13 @@ } # Firewall -firewall::open_port { http-${::hostname}: -port = 80, +ferm::service { http-${::hostname}: +proto = 'tcp', +port = 80, } -firewall::open_port { https-${::hostname}: -port = 443, +ferm::service { https-${::hostname}: +proto = 'tcp', +port = 443, } } -- To view, visit https://gerrit.wikimedia.org/r/169561 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I72ad0e33f7f06d4c98bd28129d63d409bb2d0f2c Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn dz...@wikimedia.org Gerrit-Reviewer: Alexandros Kosiaris akosia...@wikimedia.org Gerrit-Reviewer: BBlack bbl...@wikimedia.org Gerrit-Reviewer: Dzahn dz...@wikimedia.org Gerrit-Reviewer: Faidon Liambotis fai...@wikimedia.org Gerrit-Reviewer: Matanya mata...@foss.co.il 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] Added boost query for namespace evaluation - change (mediawiki...BlueSpiceExtensions)
Smuggli has uploaded a new change for review. https://gerrit.wikimedia.org/r/169666 Change subject: Added boost query for namespace evaluation .. Added boost query for namespace evaluation Switched from Lucene query parser to ExtendedDisMax query parser. The ExtendedDisMax has a lot of new search functionality like boost queries and supports the full Lucene query parser syntax, so that non of our functionality will break. From now on we can improve, for example, the evaluation of namespace, to provide individual scoring. * Improved logging in case of a bad request Change-Id: I9f7a8fd300d30372f3987af44e1904f238f3a978 --- M ExtendedSearch/includes/SearchIndex/SearchIndex.class.php M ExtendedSearch/includes/SearchIndex/SearchOptions.class.php M ExtendedSearch/includes/SolrPhpClient/Response.php M ExtendedSearch/includes/SolrPhpClient/Service.php 4 files changed, 61 insertions(+), 55 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions refs/changes/66/169666/1 diff --git a/ExtendedSearch/includes/SearchIndex/SearchIndex.class.php b/ExtendedSearch/includes/SearchIndex/SearchIndex.class.php index 771da7d..6d1aa71 100644 --- a/ExtendedSearch/includes/SearchIndex/SearchIndex.class.php +++ b/ExtendedSearch/includes/SearchIndex/SearchIndex.class.php @@ -115,8 +115,7 @@ $query['searchOptions'] ); } catch ( Exception $e ) { - // bs-extendedsearch-invalid-query - if ( $e-getMessage() == '0 Status: Communication Error' ) { + if ( stripos( $e-getMessage(), 'Communication Error' ) !== false ) { $sUrl = SpecialPage::getTitleFor( 'Search' )-getFullURL(); $sParams = 'search='.urlencode( $this-oSearchOptions-getOption( 'searchStringRaw' ) ); @@ -129,6 +128,7 @@ return $this-oContext-getOutput()-redirect( $sUrl, '404' ); } + wfDebugLog( 'ExtendedSearch', $e-getMessage() ); return $this-createErrorMessageView( 'bs-extendedsearch-invalid-query' ); } diff --git a/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php b/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php index 2d7ba23..ed76f1d 100644 --- a/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php +++ b/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php @@ -290,15 +290,21 @@ * Processes incoming search request */ public function readInSearchRequest() { - global $wgCanonicalNamespaceNames, $wgExtraNamespaces; + global $wgCanonicalNamespaceNames, $wgExtraNamespaces, $wgContentNamespaces; $this-aOptions['searchStringRaw'] = $this-oSearchRequest-sInput; $this-aOptions['searchStringOrig'] = ExtendedSearchBase::preprocessSearchInput( $this-oSearchRequest-sInput ); self::$searchStringRaw = $this-aOptions['searchStringRaw']; $sCustomerId = $this-getCustomerId(); - + $sLogOp = ' OR '; $aFq = array(); + $aBq = array(); + + $scope = ( BsConfig::get( 'MW::ExtendedSearch::DefScopeUser' ) == 'title' ) + ? 'title' + : 'text'; + $this-aOptions['scope'] = $scope; $vNamespace = $this-checkSearchstringForNamespace( $this-aOptions['searchStringRaw'], @@ -309,12 +315,6 @@ $this-aOptions['searchStringWildcarded'] = SearchService::wildcardSearchstring( $this-aOptions['searchStringOrig'] ); $this-aOptions['searchStringForStatistics'] = $this-aOptions['searchStringWildcarded']; - $this-aOptions['bExtendedForm'] = $this-oSearchRequest-bExtendedForm; - - $scope = ( BsConfig::get( 'MW::ExtendedSearch::DefScopeUser' ) == 'title' ) - ? 'title' - : 'text'; - $this-aOptions['scope'] = $scope; $aSearchTitle = array( 'title:(' . $this-aOptions['searchStringOrig'] . ')^2', @@ -328,20 +328,20 @@ 'sections:(' . $this-aOptions['searchStringOrig'] . ')' ); - $sSearchStringTitle = implode( ' OR ', $aSearchTitle ); - $sSearchStringText = implode( ' OR ', $aSearchText ); + $sSearchStringTitle = implode( $sLogOp, $aSearchTitle ); + $sSearchStringText = implode( $sLogOp, $aSearchText ); $this-aOptions['searchStringFinal'] = ( $this-aOptions['scope'] === 'title' ) ? $sSearchStringTitle - : $sSearchStringTitle . ' OR ' .
[MediaWiki-commits] [Gerrit] Add options menu metrics - change (analytics/multimedia)
Gilles has uploaded a new change for review. https://gerrit.wikimedia.org/r/169667 Change subject: Add options menu metrics .. Add options menu metrics Change-Id: I34bafbaf75920491d71fcced93d013afd1aee1d0 Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/971 --- M actions/template.sql 1 file changed, 8 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/multimedia refs/changes/67/169667/1 diff --git a/actions/template.sql b/actions/template.sql index 1a6f44a..083b8cf 100644 --- a/actions/template.sql +++ b/actions/template.sql @@ -54,7 +54,11 @@ SUM(CASE WHEN event_action = 'embed-select-menu-html-large' THEN event_samplingFactor ELSE 0 END) AS 'embed-select-menu-html-large', SUM(CASE WHEN event_action = 'use-this-file-close' THEN event_samplingFactor ELSE 0 END) AS 'use-this-file-close', SUM(CASE WHEN event_action = 'download-open' THEN event_samplingFactor ELSE 0 END) AS 'download-open', - SUM(CASE WHEN event_action = 'download-close' THEN event_samplingFactor ELSE 0 END) AS 'download-close' + SUM(CASE WHEN event_action = 'download-close' THEN event_samplingFactor ELSE 0 END) AS 'download-close', + SUM(CASE WHEN event_action = 'options-open' THEN event_samplingFactor ELSE 0 END) AS 'options-open', + SUM(CASE WHEN event_action = 'options-close' THEN event_samplingFactor ELSE 0 END) AS 'options-close', + SUM(CASE WHEN event_action = 'disable-about-link' THEN event_samplingFactor ELSE 0 END) AS 'disable-about-link', + SUM(CASE WHEN event_action = 'enable-about-link' THEN event_samplingFactor ELSE 0 END) AS 'enable-about-link' FROM ( SELECT timestamp, event_action, 1 AS event_samplingFactor FROM MediaViewer_7670440 @@ -75,6 +79,9 @@ SELECT timestamp, event_action, event_samplingFactor FROM MediaViewer_9989959 WHERE %wiki% timestamp TIMESTAMP(CURDATE()) AND timestamp = TIMESTAMP(DATE_SUB(CURDATE(), INTERVAL 30 DAY)) UNION ALL + SELECT timestamp, event_action, event_samplingFactor FROM MediaViewer_10277480 + WHERE %wiki% timestamp TIMESTAMP(CURDATE()) AND timestamp = TIMESTAMP(DATE_SUB(CURDATE(), INTERVAL 30 DAY)) + UNION ALL SELECT timestamp, (CASE WHEN event_value = 0 THEN 'pref-optout-loggedin' ELSE 'pref-optin-loggedin' END) AS event_action, 1 AS event_samplingFactor FROM PrefUpdate_5563398 WHERE event_property = 'multimediaviewer-enable' AND timestamp TIMESTAMP(CURDATE()) AND timestamp = TIMESTAMP(DATE_SUB(CURDATE(), INTERVAL 30 DAY)) ) AS MediaViewerUnioned -- To view, visit https://gerrit.wikimedia.org/r/169667 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I34bafbaf75920491d71fcced93d013afd1aee1d0 Gerrit-PatchSet: 1 Gerrit-Project: analytics/multimedia 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] Add options menu metrics - change (analytics/multimedia)
jenkins-bot has submitted this change and it was merged. Change subject: Add options menu metrics .. Add options menu metrics Change-Id: I34bafbaf75920491d71fcced93d013afd1aee1d0 Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/971 --- M actions/template.sql 1 file changed, 8 insertions(+), 1 deletion(-) Approvals: Gilles: Looks good to me, approved jenkins-bot: Verified diff --git a/actions/template.sql b/actions/template.sql index 1a6f44a..083b8cf 100644 --- a/actions/template.sql +++ b/actions/template.sql @@ -54,7 +54,11 @@ SUM(CASE WHEN event_action = 'embed-select-menu-html-large' THEN event_samplingFactor ELSE 0 END) AS 'embed-select-menu-html-large', SUM(CASE WHEN event_action = 'use-this-file-close' THEN event_samplingFactor ELSE 0 END) AS 'use-this-file-close', SUM(CASE WHEN event_action = 'download-open' THEN event_samplingFactor ELSE 0 END) AS 'download-open', - SUM(CASE WHEN event_action = 'download-close' THEN event_samplingFactor ELSE 0 END) AS 'download-close' + SUM(CASE WHEN event_action = 'download-close' THEN event_samplingFactor ELSE 0 END) AS 'download-close', + SUM(CASE WHEN event_action = 'options-open' THEN event_samplingFactor ELSE 0 END) AS 'options-open', + SUM(CASE WHEN event_action = 'options-close' THEN event_samplingFactor ELSE 0 END) AS 'options-close', + SUM(CASE WHEN event_action = 'disable-about-link' THEN event_samplingFactor ELSE 0 END) AS 'disable-about-link', + SUM(CASE WHEN event_action = 'enable-about-link' THEN event_samplingFactor ELSE 0 END) AS 'enable-about-link' FROM ( SELECT timestamp, event_action, 1 AS event_samplingFactor FROM MediaViewer_7670440 @@ -75,6 +79,9 @@ SELECT timestamp, event_action, event_samplingFactor FROM MediaViewer_9989959 WHERE %wiki% timestamp TIMESTAMP(CURDATE()) AND timestamp = TIMESTAMP(DATE_SUB(CURDATE(), INTERVAL 30 DAY)) UNION ALL + SELECT timestamp, event_action, event_samplingFactor FROM MediaViewer_10277480 + WHERE %wiki% timestamp TIMESTAMP(CURDATE()) AND timestamp = TIMESTAMP(DATE_SUB(CURDATE(), INTERVAL 30 DAY)) + UNION ALL SELECT timestamp, (CASE WHEN event_value = 0 THEN 'pref-optout-loggedin' ELSE 'pref-optin-loggedin' END) AS event_action, 1 AS event_samplingFactor FROM PrefUpdate_5563398 WHERE event_property = 'multimediaviewer-enable' AND timestamp TIMESTAMP(CURDATE()) AND timestamp = TIMESTAMP(DATE_SUB(CURDATE(), INTERVAL 30 DAY)) ) AS MediaViewerUnioned -- To view, visit https://gerrit.wikimedia.org/r/169667 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I34bafbaf75920491d71fcced93d013afd1aee1d0 Gerrit-PatchSet: 1 Gerrit-Project: analytics/multimedia Gerrit-Branch: master Gerrit-Owner: Gilles gdu...@wikimedia.org Gerrit-Reviewer: Gilles gdu...@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] Bugfix: Popup position and links - change (mediawiki...Teahouse)
Robert Vogel has uploaded a new change for review. https://gerrit.wikimedia.org/r/169669 Change subject: Bugfix: Popup position and links .. Bugfix: Popup position and links The notification popup position was wrong and one could not click the links in the popup. Change-Id: I577f1ddfab4e3093dda9b6bbe1e3ed07942cbe45 --- M resources/mediawiki.teahouse.css M resources/mediawiki.teahouse.dialog.js M resources/mediawiki.teahouse.notifications.js 3 files changed, 17 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Teahouse refs/changes/69/169669/1 diff --git a/resources/mediawiki.teahouse.css b/resources/mediawiki.teahouse.css index 15ac186..991f1ef 100644 --- a/resources/mediawiki.teahouse.css +++ b/resources/mediawiki.teahouse.css @@ -28,6 +28,10 @@ margin: 0; } +#p-teahouse-notif { + position: relative; +} + #p-personal .th-notif-popup-content .th-notif-popup-list li { float: none; font-size: 100%; diff --git a/resources/mediawiki.teahouse.dialog.js b/resources/mediawiki.teahouse.dialog.js index 6f4934a..bebe82f 100644 --- a/resources/mediawiki.teahouse.dialog.js +++ b/resources/mediawiki.teahouse.dialog.js @@ -78,6 +78,12 @@ //Register event handler for click on ... $(d).on( 'click', '#p-teahouse', mw.teahouse.dialog.openQuestionDialog ); //... menu link $(d).on( 'click', '.th-ask', mw.teahouse.dialog.openQuestionDialog ); //... custom element + + //This is an experimental feature: We preload the dependency when the + //user is about to click the link + $(d).on( 'mouseover', '#p-teahouse, .th-ask', function() { + mw.loader.load( 'oojs-ui' ); + }); } mw.teahouse.dialog = { diff --git a/resources/mediawiki.teahouse.notifications.js b/resources/mediawiki.teahouse.notifications.js index 75c30c3..5cfe976 100644 --- a/resources/mediawiki.teahouse.notifications.js +++ b/resources/mediawiki.teahouse.notifications.js @@ -147,7 +147,13 @@ _checkForNotifications(); - $(d).on( 'click', '#p-teahouse-notif', _toggleNotifPopup ); + $(d).on( 'click', '.th-notifications-badge', _toggleNotifPopup ); + + //This is an experimental feature: We preload the dependency when the + //user is about to click the link + $(d).on( 'mouseover', '.th-notifications-badge', function() { + mw.loader.load( 'oojs-ui' ); + }); } mw.teahouse.notifications = { -- To view, visit https://gerrit.wikimedia.org/r/169669 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I577f1ddfab4e3093dda9b6bbe1e3ed07942cbe45 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Teahouse Gerrit-Branch: master Gerrit-Owner: Robert Vogel vo...@hallowelt.biz ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fixed typo in I18N text - change (mediawiki...Teahouse)
Robert Vogel has uploaded a new change for review. https://gerrit.wikimedia.org/r/169670 Change subject: Fixed typo in I18N text .. Fixed typo in I18N text Just a typo in english I18N. Change-Id: Ic8c7df95536d38caa89dd265e900b0182052d110 --- M i18n/en.json M resources/mediawiki.teahouse.js 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Teahouse refs/changes/70/169670/1 diff --git a/i18n/en.json b/i18n/en.json index 3c796cd..caf7254 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -17,7 +17,7 @@ th-dialog-disclaimer: Published under Wikipedia's Terms of Use, th-dialog-anon-ip-hint: Your IP address will be published with the question, th-dialog-msg-title-save: Question published, - th-dialog-msg-text-save: Your question has been published on $1. Do you wand to see the complete list of questions?, + th-dialog-msg-text-save: Your question has been published on $1. Do you want to see the complete list of questions?, th-dialog-msg-btn-yes: Yes, th-dialog-msg-btn-no: No, th-notifications-badge-title: There are reactions to your questions, diff --git a/resources/mediawiki.teahouse.js b/resources/mediawiki.teahouse.js index d2ed025..f60954f 100644 --- a/resources/mediawiki.teahouse.js +++ b/resources/mediawiki.teahouse.js @@ -27,7 +27,7 @@ th-dialog-disclaimer: Published under Wikipedia's Terms of Use, th-dialog-anon-ip-hint: Your IP address will be published with the question, th-dialog-msg-title-save: Question published, - th-dialog-msg-text-save: Your question has been published on $1. Do you wand to see the complete list of questions?, + th-dialog-msg-text-save: Your question has been published on $1. Do you want to see the complete list of questions?, th-dialog-msg-btn-yes: Yes, th-dialog-msg-btn-no: No, th-notifications-badge-title: There are reactions to your questions, -- To view, visit https://gerrit.wikimedia.org/r/169670 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic8c7df95536d38caa89dd265e900b0182052d110 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Teahouse Gerrit-Branch: master Gerrit-Owner: Robert Vogel vo...@hallowelt.biz ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add options menu metrics - change (analytics...config)
Gilles has uploaded a new change for review. https://gerrit.wikimedia.org/r/169673 Change subject: Add options menu metrics .. Add options menu metrics Change-Id: Ib33798e26d66862af7f55ab426553ca13fc0e6d6 Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/971 --- M dashboards/mmv.json M dashboards/mmv_template.json M datasources/mmv_actions_template.json M generate.py A graphs/mmv_actions_options_template.json M graphs/mmv_actions_template.json 6 files changed, 121 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/multimedia/config refs/changes/73/169673/1 diff --git a/dashboards/mmv.json b/dashboards/mmv.json index a935418..8883d63 100644 --- a/dashboards/mmv.json +++ b/dashboards/mmv.json @@ -10,6 +10,7 @@ mmv_actions_download_global, mmv_actions_share_global, mmv_actions_embed_global, + mmv_actions_options_global, mmv_image_views_per_site ] }, diff --git a/dashboards/mmv_template.json b/dashboards/mmv_template.json index f9ef803..b9b73b9 100644 --- a/dashboards/mmv_template.json +++ b/dashboards/mmv_template.json @@ -9,7 +9,8 @@ mmv_actions_%wiki%, mmv_actions_download_%wiki%, mmv_actions_share_%wiki%, - mmv_actions_embed_%wiki% + mmv_actions_embed_%wiki%, + mmv_actions_options_%wiki% ] }, { diff --git a/datasources/mmv_actions_template.json b/datasources/mmv_actions_template.json index a07a9f6..189866c 100644 --- a/datasources/mmv_actions_template.json +++ b/datasources/mmv_actions_template.json @@ -281,6 +281,26 @@ id: download-close, label: download closed, type: Number +}, +{ +id: options-open, +label: options opened, +type: Number +}, +{ +id: options-close, +label: options closed, +type: Number +}, +{ +id: disable-about-link, +label: about page (disable), +type: Number +}, +{ +id: enable-about-link, +label: about page (enable), +type: Number } ] } \ No newline at end of file diff --git a/generate.py b/generate.py index 3a9cfad..b367eb7 100644 --- a/generate.py +++ b/generate.py @@ -60,6 +60,7 @@ './graphs/mmv_actions_download': None, './graphs/mmv_actions_share': None, './graphs/mmv_actions_embed': None, +'./graphs/mmv_actions_options': None, './graphs/mmv_opt_inout': None, './datasources/mmv_optout': None, './graphs/mmv_optout': None, diff --git a/graphs/mmv_actions_options_template.json b/graphs/mmv_actions_options_template.json new file mode 100644 index 000..c68f339 --- /dev/null +++ b/graphs/mmv_actions_options_template.json @@ -0,0 +1,74 @@ +{ +graph_version: 0.6.0, +id: mmv_actions_options_%wiki%, +desc: babout page (disable)/b how many times users clicked visited the about page from the disable viewbrbabout page (enable)/b how many times users visited the about page from the enable viewbr, +name: Options actions, +slug: mmv_actions_options_%wiki%, +root: { +nodeType: canvas, +width: auto, +height: 500, +children: [ + { + nodeType: zoom-brush + }, +{ +nodeType: axis, +options: { +orient: bottom, +dimension: x +} +}, +{ +nodeType: axis, +options: { +orient: left, +dimension: y, +label: total count +} +}, +{ +nodeType: grid, +options: {dimension: x} +}, +{ +nodeType: grid, +options: {dimension: y} +}, +{ +nodeType: legend, +options: { +label : Legend, +dateFormat : DD MMM +} +}, +{ +nodeType: line-group, +children: [ +{ +nodeType: line, +metric: { +source_id: mmv_actions_%wiki%, +source_col: disable-about-link, +type: Number +
[MediaWiki-commits] [Gerrit] Add options menu metrics - change (analytics...config)
Gilles has submitted this change and it was merged. Change subject: Add options menu metrics .. Add options menu metrics Change-Id: Ib33798e26d66862af7f55ab426553ca13fc0e6d6 Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/971 --- M dashboards/mmv.json M dashboards/mmv_template.json M datasources/mmv_actions_template.json M generate.py A graphs/mmv_actions_options_template.json M graphs/mmv_actions_template.json 6 files changed, 121 insertions(+), 2 deletions(-) Approvals: Gilles: Verified; Looks good to me, approved diff --git a/dashboards/mmv.json b/dashboards/mmv.json index a935418..8883d63 100644 --- a/dashboards/mmv.json +++ b/dashboards/mmv.json @@ -10,6 +10,7 @@ mmv_actions_download_global, mmv_actions_share_global, mmv_actions_embed_global, + mmv_actions_options_global, mmv_image_views_per_site ] }, diff --git a/dashboards/mmv_template.json b/dashboards/mmv_template.json index f9ef803..b9b73b9 100644 --- a/dashboards/mmv_template.json +++ b/dashboards/mmv_template.json @@ -9,7 +9,8 @@ mmv_actions_%wiki%, mmv_actions_download_%wiki%, mmv_actions_share_%wiki%, - mmv_actions_embed_%wiki% + mmv_actions_embed_%wiki%, + mmv_actions_options_%wiki% ] }, { diff --git a/datasources/mmv_actions_template.json b/datasources/mmv_actions_template.json index a07a9f6..189866c 100644 --- a/datasources/mmv_actions_template.json +++ b/datasources/mmv_actions_template.json @@ -281,6 +281,26 @@ id: download-close, label: download closed, type: Number +}, +{ +id: options-open, +label: options opened, +type: Number +}, +{ +id: options-close, +label: options closed, +type: Number +}, +{ +id: disable-about-link, +label: about page (disable), +type: Number +}, +{ +id: enable-about-link, +label: about page (enable), +type: Number } ] } \ No newline at end of file diff --git a/generate.py b/generate.py index 3a9cfad..b367eb7 100644 --- a/generate.py +++ b/generate.py @@ -60,6 +60,7 @@ './graphs/mmv_actions_download': None, './graphs/mmv_actions_share': None, './graphs/mmv_actions_embed': None, +'./graphs/mmv_actions_options': None, './graphs/mmv_opt_inout': None, './datasources/mmv_optout': None, './graphs/mmv_optout': None, diff --git a/graphs/mmv_actions_options_template.json b/graphs/mmv_actions_options_template.json new file mode 100644 index 000..c68f339 --- /dev/null +++ b/graphs/mmv_actions_options_template.json @@ -0,0 +1,74 @@ +{ +graph_version: 0.6.0, +id: mmv_actions_options_%wiki%, +desc: babout page (disable)/b how many times users clicked visited the about page from the disable viewbrbabout page (enable)/b how many times users visited the about page from the enable viewbr, +name: Options actions, +slug: mmv_actions_options_%wiki%, +root: { +nodeType: canvas, +width: auto, +height: 500, +children: [ + { + nodeType: zoom-brush + }, +{ +nodeType: axis, +options: { +orient: bottom, +dimension: x +} +}, +{ +nodeType: axis, +options: { +orient: left, +dimension: y, +label: total count +} +}, +{ +nodeType: grid, +options: {dimension: x} +}, +{ +nodeType: grid, +options: {dimension: y} +}, +{ +nodeType: legend, +options: { +label : Legend, +dateFormat : DD MMM +} +}, +{ +nodeType: line-group, +children: [ +{ +nodeType: line, +metric: { +source_id: mmv_actions_%wiki%, +source_col: disable-about-link, +type: Number +}, +options: { +
[MediaWiki-commits] [Gerrit] Refactor ClientHooks::onBeforePageDisplayAddJsConfig - change (mediawiki...Wikibase)
Thiemo Mättig (WMDE) has uploaded a new change for review. https://gerrit.wikimedia.org/r/169674 Change subject: Refactor ClientHooks::onBeforePageDisplayAddJsConfig .. Refactor ClientHooks::onBeforePageDisplayAddJsConfig Change-Id: I4bbf589878884f62fb783539fb82c137d262b8b0 --- M client/WikibaseClient.hooks.php 1 file changed, 43 insertions(+), 36 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/74/169674/1 diff --git a/client/WikibaseClient.hooks.php b/client/WikibaseClient.hooks.php index 3879270..af5755d 100644 --- a/client/WikibaseClient.hooks.php +++ b/client/WikibaseClient.hooks.php @@ -35,6 +35,7 @@ use Wikibase\Client\RecentChanges\RecentChangesFilterOptions; use Wikibase\Client\RepoItemLinkGenerator; use Wikibase\Client\WikibaseClient; +use Wikibase\DataModel\Entity\EntityId; use Wikibase\DataModel\SiteLink; /** @@ -333,50 +334,56 @@ * * @since 0.4 * -* @param QuickTemplate $sk -* @param array $toolbox +* @param BaseTemplate $baseTemplate +* @param array $toolbox * * @return bool */ - public static function onBaseTemplateToolbox( QuickTemplate $sk, $toolbox ) { + public static function onBaseTemplateToolbox( BaseTemplate $baseTemplate, array $toolbox ) { $wikibaseClient = WikibaseClient::getDefaultInstance(); - $title = $sk-getSkin()-getTitle(); - $prefixedId = $sk-getSkin()-getOutput()-getProperty( 'wikibase_item' ); - - // Try to load the item ID from Database, but only do so on non-article views, - // (where the article's OutputPage isn't available to us). - $doExpensiveLookup = - $title - Action::getActionName( $sk-getSkin()-getContext() ) !== 'view' - self::isWikibaseEnabled( $title-getNamespace() ); - + $skin = $baseTemplate-getSkin(); + $idString = $skin-getOutput()-getProperty( 'wikibase_item' ); $entityId = null; - if ( $prefixedId !== null ) { + + if ( $idString !== null ) { $entityIdParser = $wikibaseClient-getEntityIdParser(); - $entityId = $entityIdParser-parse( $prefixedId ); - } else if ( $doExpensiveLookup ) { - $entityId = $wikibaseClient-getStore()-getSiteLinkTable()-getEntityIdForSiteLink( - new SiteLink( - $wikibaseClient-getSite()-getGlobalId(), - $title-getFullText() - ) + $entityId = $entityIdParser-parse( $idString ); + } elseif ( Action::getActionName( $skin ) !== 'view' ) { + // Try to load the item ID from Database, but only do so on non-article views, + // (where the article's OutputPage isn't available to us). + $entityId = self::getEntityIdForTitle( $skin-getTitle() ); + } + + if ( $entityId !== null ) { + $repoLinker = $wikibaseClient-newRepoLinker(); + $toolbox['wikibase'] = array( + 'text' = $baseTemplate-getMsg( 'wikibase-dataitem' )-text(), + 'href' = $repoLinker-getEntityUrl( $entityId ), + 'id' = 't-wikibase' ); } - if ( !$entityId ) { - return true; + return true; + } + + /** +* @param Title|null $title +* +* @return EntityId|null +*/ + private static function getEntityIdForTitle( Title $title = null ) { + if ( $title === null || !self::isWikibaseEnabled( $title-getNamespace() ) ) { + return null; } - $repoLinker = $wikibaseClient-newRepoLinker(); - $itemLink = $repoLinker-getEntityUrl( $entityId ); - - $toolbox['wikibase'] = array( - 'text' = $sk-getMsg( 'wikibase-dataitem' )-text(), - 'href' = $itemLink, - 'id' = 't-wikibase' + $wikibaseClient = WikibaseClient::getDefaultInstance(); + $siteLinkLookup = $wikibaseClient-getStore()-getSiteLinkTable(); + return $siteLinkLookup-getEntityIdForSiteLink( + new SiteLink( + $wikibaseClient-getSite()-getGlobalId(), + $title-getFullText() + ) ); - - return true; } /** @@ -389,7 +396,7 @@
[MediaWiki-commits] [Gerrit] WIP Trying to fix file upload for VisualEditor language scre... - change (integration/config)
Zfilipin has uploaded a new change for review. https://gerrit.wikimedia.org/r/169675 Change subject: WIP Trying to fix file upload for VisualEditor language screenshots .. WIP Trying to fix file upload for VisualEditor language screenshots Change-Id: Ie6fd61f3ec1e11dab4142f7987756ede6a131772 --- M jjb/macro-browsertests.yaml 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/75/169675/1 diff --git a/jjb/macro-browsertests.yaml b/jjb/macro-browsertests.yaml index e813610..619998a 100644 --- a/jjb/macro-browsertests.yaml +++ b/jjb/macro-browsertests.yaml @@ -118,7 +118,7 @@ || (echo -e \nJob has failed (exit code: $?).; false) if [[ ! -z $LANGUAGE_SCREENSHOT_CODE ]]; then -$WORKSPACE/vendor/bin/bundle exec ruby1.9.1 upload.rb +$WORKSPACE/vendor/bin/bundle exec ruby2.0 upload.rb fi # Let a job run on different node, but no more than once per node. -- To view, visit https://gerrit.wikimedia.org/r/169675 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie6fd61f3ec1e11dab4142f7987756ede6a131772 Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Zfilipin zfili...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix open panel detection when scrolling - change (mediawiki...MultimediaViewer)
Pginer has uploaded a new change for review. https://gerrit.wikimedia.org/r/169676 Change subject: Fix open panel detection when scrolling .. Fix open panel detection when scrolling With touch devices, scrolling may get negative values (e.g., when scrolling beyond the page limits). That kind fo scroll was triggering the aplication of the panel-oppen class producing unintended UI changes. With this patchset the class is only applied when the panel is really opened. Change-Id: I183d8c725373ab29802650b53e26fd4820dbf499 --- M resources/mmv/ui/mmv.ui.metadataPanelScroller.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MultimediaViewer refs/changes/76/169676/1 diff --git a/resources/mmv/ui/mmv.ui.metadataPanelScroller.js b/resources/mmv/ui/mmv.ui.metadataPanelScroller.js index 0e7a861..0670c3b 100644 --- a/resources/mmv/ui/mmv.ui.metadataPanelScroller.js +++ b/resources/mmv/ui/mmv.ui.metadataPanelScroller.js @@ -191,7 +191,7 @@ * @fires mmv-metadata-close */ MPSP.scroll = function () { - var panelIsOpen = !!$.scrollTo().scrollTop(); + var panelIsOpen = !!($.scrollTo().scrollTop() 0); this.$container.toggleClass( 'panel-open', panelIsOpen ); -- To view, visit https://gerrit.wikimedia.org/r/169676 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I183d8c725373ab29802650b53e26fd4820dbf499 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MultimediaViewer Gerrit-Branch: master Gerrit-Owner: Pginer pgi...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add a hook for custom diff engines (WikEdDiff) - change (mediawiki/core)
Cacycle has uploaded a new change for review. https://gerrit.wikimedia.org/r/169677 Change subject: Add a hook for custom diff engines (WikEdDiff) .. Add a hook for custom diff engines (WikEdDiff) The new Extension:WikEdDiff is a custom inline difference engine. There is currently no hook to integrate custom difference engines. This patch adds a new hook called 'GetDiffEngineClass' in /includes/content/ContentHandler.php in function 'createDifferenceEngine()'. Passed variables: $context: IContextSource context to be used for diff $diffEngineClass: output parameter, class name of diff engine to be used for diff If the hook handler returns false, a valid diff engine class name is returned in the passed-by-reference variable $diffEngineClass. If the handler returns true, the default engine class is used as fallback. The specified diff engine class will typically be an extension of the class DifferenceEngine (includes/diff/DifferenceEngine.php) with modifications, e.g. of function generateTextDiffBody(). Also fixes a missing declaration in DifferenceEngine that is required for extending this class. Bug: 71916 Change-Id: I8b694060c31e3888067112ebaea6cd2d9636a6db --- M docs/hooks.txt M includes/content/ContentHandler.php M includes/diff/DifferenceEngine.php 3 files changed, 15 insertions(+), 15 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/77/169677/1 diff --git a/docs/hooks.txt b/docs/hooks.txt index 77d87f2..77dc594 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -992,14 +992,11 @@ $old: the ?old= param value from the url $new: the ?new= param value from the url -'GenerateTextDiffBody': Generate a custom diff body instead of using -the diff engine specified in $wgExternalDiffEngine -$otext: the old text version string -$ntext: the new text version string -$diffText: custom diff output: table-formatted html string +'GetDiffEngineClass': Called when getting the diff engine class name +$context: IContextSource context to be used for diff +$diffEngineClass: output parameter, class name of diff engine to be used for diff -Return true to allow the default engine to be used, or false -to indicate a valid diff html string in $diffText. +Return false for valid class name in $diffEngineClass or true for the default diff engine. 'DiffRevisionTools': Override or extend the revision tools available from the diff view, i.e. undo, etc. diff --git a/includes/content/ContentHandler.php b/includes/content/ContentHandler.php index ac41722..2184c9d 100644 --- a/includes/content/ContentHandler.php +++ b/includes/content/ContentHandler.php @@ -626,8 +626,14 @@ public function createDifferenceEngine( IContextSource $context, $old = 0, $new = 0, $rcid = 0, //FIXME: Deprecated, no longer used $refreshCache = false, $unhide = false ) { - $diffEngineClass = $this-getDiffEngineClass(); + // hook: get diff engine class name + $diffEngineClass = ''; + if ( wfRunHooks( 'GetDiffEngineClass', array( $context, $diffEngineClass ) ) ) { + + // use default diff engine + $diffEngineClass = $this-getDiffEngineClass(); + } return new $diffEngineClass( $context, $old, $new, $rcid, $refreshCache, $unhide ); } diff --git a/includes/diff/DifferenceEngine.php b/includes/diff/DifferenceEngine.php index c6a0fea..ba9878f 100644 --- a/includes/diff/DifferenceEngine.php +++ b/includes/diff/DifferenceEngine.php @@ -94,6 +94,10 @@ /** @var bool Show rev_deleted content if allowed */ protected $unhide = false; + + /** @var bool Refresh the diff cache */ + protected $mRefreshCache = false; + /**#@-*/ /** @@ -844,13 +848,6 @@ $otext = str_replace( \r\n, \n, $otext ); $ntext = str_replace( \r\n, \n, $ntext ); - - # Custom difference engine hook - $diffText = ''; - if ( !wfRunHooks( 'GenerateTextDiffBody', array( $otext, $ntext, $diffText ) ) ) { - wfProfileOut( __METHOD__ ); - return $diffText; - } if ( $wgExternalDiffEngine == 'wikidiff' function_exists( 'wikidiff_do_diff' ) ) { # For historical reasons, external diff engine expects -- To view, visit https://gerrit.wikimedia.org/r/169677 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8b694060c31e3888067112ebaea6cd2d9636a6db Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Cacycle cacycl...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org
[MediaWiki-commits] [Gerrit] Always show link to wikibase item in toolbox - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Always show link to wikibase item in toolbox .. Always show link to wikibase item in toolbox Bug: 61768 Change-Id: I8aa5d729b0e0d77cea6bea44140ef68ada6dab48 --- M client/WikibaseClient.hooks.php 1 file changed, 31 insertions(+), 9 deletions(-) Approvals: Thiemo Mättig (WMDE): Looks good to me, approved jenkins-bot: Verified diff --git a/client/WikibaseClient.hooks.php b/client/WikibaseClient.hooks.php index 4deaaf2..3879270 100644 --- a/client/WikibaseClient.hooks.php +++ b/client/WikibaseClient.hooks.php @@ -35,6 +35,7 @@ use Wikibase\Client\RecentChanges\RecentChangesFilterOptions; use Wikibase\Client\RepoItemLinkGenerator; use Wikibase\Client\WikibaseClient; +use Wikibase\DataModel\SiteLink; /** * File defining the hook handlers for the Wikibase Client extension. @@ -338,22 +339,43 @@ * @return bool */ public static function onBaseTemplateToolbox( QuickTemplate $sk, $toolbox ) { + $wikibaseClient = WikibaseClient::getDefaultInstance(); + $title = $sk-getSkin()-getTitle(); $prefixedId = $sk-getSkin()-getOutput()-getProperty( 'wikibase_item' ); + // Try to load the item ID from Database, but only do so on non-article views, + // (where the article's OutputPage isn't available to us). + $doExpensiveLookup = + $title + Action::getActionName( $sk-getSkin()-getContext() ) !== 'view' + self::isWikibaseEnabled( $title-getNamespace() ); + + $entityId = null; if ( $prefixedId !== null ) { - $entityIdParser = WikibaseClient::getDefaultInstance()-getEntityIdParser(); + $entityIdParser = $wikibaseClient-getEntityIdParser(); $entityId = $entityIdParser-parse( $prefixedId ); - - $repoLinker = WikibaseClient::getDefaultInstance()-newRepoLinker(); - $itemLink = $repoLinker-getEntityUrl( $entityId ); - - $toolbox['wikibase'] = array( - 'text' = $sk-getMsg( 'wikibase-dataitem' )-text(), - 'href' = $itemLink, - 'id' = 't-wikibase' + } else if ( $doExpensiveLookup ) { + $entityId = $wikibaseClient-getStore()-getSiteLinkTable()-getEntityIdForSiteLink( + new SiteLink( + $wikibaseClient-getSite()-getGlobalId(), + $title-getFullText() + ) ); } + if ( !$entityId ) { + return true; + } + + $repoLinker = $wikibaseClient-newRepoLinker(); + $itemLink = $repoLinker-getEntityUrl( $entityId ); + + $toolbox['wikibase'] = array( + 'text' = $sk-getMsg( 'wikibase-dataitem' )-text(), + 'href' = $itemLink, + 'id' = 't-wikibase' + ); + return true; } -- To view, visit https://gerrit.wikimedia.org/r/167233 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8aa5d729b0e0d77cea6bea44140ef68ada6dab48 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Hoo man h...@online.de Gerrit-Reviewer: Aude aude.w...@gmail.com Gerrit-Reviewer: Daniel Kinzler daniel.kinz...@wikimedia.de Gerrit-Reviewer: Hoo man h...@online.de Gerrit-Reviewer: JanZerebecki jan.wikime...@zerebecki.de Gerrit-Reviewer: Jeroen De Dauw jeroended...@gmail.com Gerrit-Reviewer: Thiemo Mättig (WMDE) thiemo.maet...@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] Fix open panel detection when scrolling - change (mediawiki...MultimediaViewer)
jenkins-bot has submitted this change and it was merged. Change subject: Fix open panel detection when scrolling .. Fix open panel detection when scrolling With touch devices, scrolling may get negative values (e.g., when scrolling beyond the page limits). That kind fo scroll was triggering the aplication of the panel-oppen class producing unintended UI changes. With this patchset the class is only applied when the panel is really opened. Change-Id: I183d8c725373ab29802650b53e26fd4820dbf499 --- M resources/mmv/ui/mmv.ui.metadataPanelScroller.js 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Gilles: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/mmv/ui/mmv.ui.metadataPanelScroller.js b/resources/mmv/ui/mmv.ui.metadataPanelScroller.js index 0e7a861..140029d 100644 --- a/resources/mmv/ui/mmv.ui.metadataPanelScroller.js +++ b/resources/mmv/ui/mmv.ui.metadataPanelScroller.js @@ -191,7 +191,7 @@ * @fires mmv-metadata-close */ MPSP.scroll = function () { - var panelIsOpen = !!$.scrollTo().scrollTop(); + var panelIsOpen = $.scrollTo().scrollTop() 0; this.$container.toggleClass( 'panel-open', panelIsOpen ); -- To view, visit https://gerrit.wikimedia.org/r/169676 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I183d8c725373ab29802650b53e26fd4820dbf499 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/MultimediaViewer Gerrit-Branch: master Gerrit-Owner: Pginer pgi...@wikimedia.org Gerrit-Reviewer: Gilles gdu...@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] Adjust 'wikidata-staff' group page i18n - change (mediawiki...WikimediaMessages)
Vogone has uploaded a new change for review. https://gerrit.wikimedia.org/r/169678 Change subject: Adjust 'wikidata-staff' group page i18n .. Adjust 'wikidata-staff' group page i18n Since section linking seems impossible, {{ns:project}}:Wikidata staff members appears to be the better solution. Change-Id: I5220fd3989504b654b0f81fc82aa5c982e6b109a --- M i18n/wikimedia/en.json 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikimediaMessages refs/changes/78/169678/1 diff --git a/i18n/wikimedia/en.json b/i18n/wikimedia/en.json index 16e1776..edf04d4 100644 --- a/i18n/wikimedia/en.json +++ b/i18n/wikimedia/en.json @@ -104,7 +104,7 @@ grouppage-uploader: {{ns:project}}:Uploaders, group-wikidata-staff: Wikidata staff, group-wikidata-staff-member: {{GENDER:$1|Wikidata staff}}, -grouppage-wikidata-staff: {{ns:project}}:Administrators, +grouppage-wikidata-staff: {{ns:project}}:Wikidata staff members, group-apihighlimits-requestor: API high limit requestors, group-apihighlimits-requestor-member: {{GENDER:$1|API high limit requestor}}, grouppage-apihighlimits-requestor: m:API high limit requestors, -- To view, visit https://gerrit.wikimedia.org/r/169678 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5220fd3989504b654b0f81fc82aa5c982e6b109a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikimediaMessages Gerrit-Branch: master Gerrit-Owner: Vogone leon.liese...@wikipedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix incorrect collapsed form state when topic sort changes. - change (mediawiki...Flow)
jenkins-bot has submitted this change and it was merged. Change subject: Fix incorrect collapsed form state when topic sort changes. .. Fix incorrect collapsed form state when topic sort changes. Currently, a manual hideForm step is needed to sync up the initial state after the template does the rendering. This is called by makeContentInteractive. This was previously called by FlowBoardComponent.prototype.reinitializeBoard (the equivalent of FlowBoardComponent.prototype.reinitializeContainer), so this adds it back. Bug: 72602 Change-Id: Ieb481e4b9290ce1b65cebd57d2c7910faaa8e2d8 --- M modules/engine/components/board/flow-board.js 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Matthias Mullie: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/engine/components/board/flow-board.js b/modules/engine/components/board/flow-board.js index 1781131..a23efc3 100644 --- a/modules/engine/components/board/flow-board.js +++ b/modules/engine/components/board/flow-board.js @@ -114,6 +114,8 @@ return false; } + this.emitWithReturn( 'makeContentInteractive', this ); + return $retObj; } FlowBoardComponent.prototype.reinitializeContainer = flowBoardComponentReinitializeContainer; -- To view, visit https://gerrit.wikimedia.org/r/169625 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ieb481e4b9290ce1b65cebd57d2c7910faaa8e2d8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Mattflaschen mflasc...@wikimedia.org Gerrit-Reviewer: Matthias Mullie mmul...@wikimedia.org Gerrit-Reviewer: SG shah...@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] Change above-the-fold layout - step 3 - change (mediawiki...MultimediaViewer)
jenkins-bot has submitted this change and it was merged. Change subject: Change above-the-fold layout - step 3 .. Change above-the-fold layout - step 3 * make top of below-the-fold be actually above the fold * put all above-the-fold content except title and more details button into that area * kep below-the-fold area in fullscreen mode when title/credit gets untruncated * increase title length to 180 (140 before reducing font size) - works nicely on my 1600x900 laptop * remove old styles which were intended to make the button smaller when the panel is close but were mostly broken anyway and only caused the button to twitch To avoid redoing all the size calculation logic, we cheat and use a negative margin to pull the below-the-fold content above the fold. Change-Id: I18d7bdb7dbbdfb8201c0d66257731febfac31263 Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/833 --- M resources/mmv/mmv.globals.less M resources/mmv/mmv.lightboxinterface.less M resources/mmv/ui/img/time.svg A resources/mmv/ui/img/uploader-ltr.svg A resources/mmv/ui/img/uploader-rtl.svg M resources/mmv/ui/mmv.ui.metadataPanel.js M resources/mmv/ui/mmv.ui.metadataPanel.less M resources/mmv/ui/mmv.ui.stripeButtons.less M tests/qunit/mmv/mmv.lightboxinterface.test.js 9 files changed, 211 insertions(+), 48 deletions(-) Approvals: Gilles: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/mmv/mmv.globals.less b/resources/mmv/mmv.globals.less index 9da7ffe..7eb1def 100644 --- a/resources/mmv/mmv.globals.less +++ b/resources/mmv/mmv.globals.less @@ -1,8 +1,12 @@ // Height of the area of the metadata bar which is visible without scrolling. -@metadatabar-above-fold-height: 82px; +@metadatabar-above-fold-height: 86px; -// Height of the same area in fullscreen mode (which can be slightly less since it has less controls). -@metadatabar-above-fold-fullscreen-height: 64px; +// adjust for @metadatabar-below-fold-pushup-height wide bottom padding - that area will be overlapped +// by the revealed part of the below-the-fold content +@metadatabar-above-fold-inner-height: @metadatabar-above-fold-height - @metadatabar-below-fold-pushup-height; + +// Height of the top part of the below-fold content which is actually above the fold, as a scrolling affordance +@metadatabar-below-fold-pushup-height: 30px; // Height of the progress bar @progress-bar-height: 14px; diff --git a/resources/mmv/mmv.lightboxinterface.less b/resources/mmv/mmv.lightboxinterface.less index 06741a4..15d38ff 100644 --- a/resources/mmv/mmv.lightboxinterface.less +++ b/resources/mmv/mmv.lightboxinterface.less @@ -56,25 +56,21 @@ height: auto; color: #33; background-color: #ff; - min-height: (@metadatabar-above-fold-height + 1); + min-height: (@metadatabar-above-fold-inner-height + 1); z-index: 1005; } // above-the-fold part of the metadata panel .mw-mmv-above-fold { width: 100%; - height: @metadatabar-above-fold-height; + height: @metadatabar-above-fold-inner-height; // min-height is used when the height is changed to auto to display long texts, to make sure the layout // is not messed up wheen the text is short and does not fill the available place. It is also used by // Javascript to get the default height. - min-height: @metadatabar-above-fold-height; + min-height: @metadatabar-above-fold-inner-height; position: relative; - border-bottom: 1px solid #eee; - - .jq-fullscreened { - height: @metadatabar-above-fold-fullscreen-height; - min-height: @metadatabar-above-fold-fullscreen-height; - } + // make sure there is no content in the part which is overlapped by the revealed part of the below-fold content + padding-bottom: @metadatabar-below-fold-pushup-height; .mw-mmv-untruncated { height: auto; diff --git a/resources/mmv/ui/img/time.svg b/resources/mmv/ui/img/time.svg index bf579af..78ad8ac 100644 --- a/resources/mmv/ui/img/time.svg +++ b/resources/mmv/ui/img/time.svg @@ -1 +1,33 @@ -?xml version=1.0 encoding=UTF-8?svg xmlns=http://www.w3.org/2000/svg; width=80 height=80 viewBox=0 0 80 80path fill=#929497 d=M62.621 17.368c-6.036-6.042-14.072-9.368-22.625-9.368-8.546 0-16.582 3.326-22.632 9.368-6.042 6.043-9.364 14.083-9.364 22.632s3.322 16.589 9.364 22.621c6.05 6.043 14.086 9.379 22.632 9.379 8.553 0 16.589-3.336 22.625-9.379 6.045-6.032 9.379-14.072 9.379-22.621s-3.334-16.589-9.379-22.632zm-12.144 37.75l-13.673-13.651v-23.401h5.145v21.243l12.161 12.168-3.633 3.641z//svg \ No newline at end of file +?xml version=1.0 encoding=UTF-8 standalone=no? +!-- Created with Inkscape (http://www.inkscape.org/) -- + +svg + xmlns:dc=http://purl.org/dc/elements/1.1/; + xmlns:cc=http://creativecommons.org/ns#; +
[MediaWiki-commits] [Gerrit] Fix bacula rspec tests - change (operations/puppet)
Alexandros Kosiaris has uploaded a new change for review. https://gerrit.wikimedia.org/r/169679 Change subject: Fix bacula rspec tests .. Fix bacula rspec tests One failing test, change was d7c02f3 Change-Id: Id79813f88ea999a81775225d704d1d7ff123a8fb --- M modules/bacula/spec/classes/bacula_director_spec.rb 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/79/169679/1 diff --git a/modules/bacula/spec/classes/bacula_director_spec.rb b/modules/bacula/spec/classes/bacula_director_spec.rb index 6c63475..589c188 100644 --- a/modules/bacula/spec/classes/bacula_director_spec.rb +++ b/modules/bacula/spec/classes/bacula_director_spec.rb @@ -66,7 +66,7 @@ .with_content(/Name = testhost.example.com/) \ .with_content(/Password = bconsolepass/) \ .with_content(/TLS Certificate = \/var\/lib\/puppet\/ssl\/certs\/testhost.example.com.pem/) \ -.with_content(/TLS Key = \/var\/lib\/puppet\/ssl\/private_keys\/testhost.example.com.pem/) \ +.with_content(/TLS Key = \/var\/lib\/puppet\/ssl\/private_keys\/bacula-testhost.example.com.pem/) \ .with_content(/DIRport = 9900/) \ .with_content(/Maximum Concurrent Jobs = 10/) end -- To view, visit https://gerrit.wikimedia.org/r/169679 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id79813f88ea999a81775225d704d1d7ff123a8fb Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Alexandros Kosiaris akosia...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Modularize backups.pp - change (operations/puppet)
Alexandros Kosiaris has uploaded a new change for review. https://gerrit.wikimedia.org/r/169680 Change subject: Modularize backups.pp .. Modularize backups.pp Move all the DRY defines in a WMF specific module Add (incomplete) RSpec tests Add README.md Delete backup::mysql which was unused Change-Id: I7e2d1f933d57dc27f5933d826fadec2f64f74e47 --- D manifests/backups.pp M manifests/site.pp A modules/backup/.rspec A modules/backup/README.md A modules/backup/Rakefile A modules/backup/manifests/mysqlset.pp A modules/backup/manifests/schedule.pp A modules/backup/manifests/set.pp A modules/backup/manifests/weeklyschedule.pp A modules/backup/spec/defines/schedule_spec.rb A modules/backup/spec/defines/set_spec.rb A modules/backup/spec/defines/weeklyschedule_spec.rb A modules/backup/spec/fixtures/manifests/site.pp A modules/backup/spec/spec_helper.rb 14 files changed, 254 insertions(+), 133 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/80/169680/1 diff --git a/manifests/backups.pp b/manifests/backups.pp deleted file mode 100644 index a316ba9..000 --- a/manifests/backups.pp +++ /dev/null @@ -1,132 +0,0 @@ -# backup::set is probably what you want -define backup::set($jobdefaults=$role::backup::host::jobdefaults) { -if $jobdefaults != undef { -@bacula::client::job { ${name}-${jobdefaults}: -fileset = $name, -jobdefaults = $jobdefaults, -} - -$motd_content = #!/bin/sh\necho \Backed up on this host: ${name}\ -@file { /etc/update-motd.d/06-backups-${name}: -ensure = 'present', -owner = 'root', -group = 'root', -mode= '0555', -content = $motd_content, -tag = 'backup-motd', -} -} -} - -define backup::mysqlset($method='bpipe', -$xtrabackup=true, -$per_db=false, -$innodb_only=false, -$local_dump_dir=undef, -$password_file=undef, -$mysql_binary=undef, -$mysqldump_binary=undef, -$jobdefaults=$role::backup::host::jobdefaults, -) { - -$allowed_methods = [ 'bpipe', 'predump' ] -if !($method in $allowed_methods) { -fail(${method} is not allowed) -} - -if !defined(Package['pigz']) { -package { 'pigz': -ensure = present, -} -} -if $method == 'predump' { -$extras = { -'ClientRunBeforeJob' = '/etc/bacula/scripts/predump', -} -$basefileset = regsubst(regsubst($local_dump_dir,'/',''),'/','-','G') -$fileset = mysql-${basefileset} - -file { '/etc/bacula/scripts/predump': -ensure = 'present', -owner = 'root', -group = 'root', -mode= '0500', -content = template('backups/mysql-predump.erb'), -} - -} elsif $method == 'bpipe' { -bacula::client::mysql-bpipe { mysql-bpipe-x${xtrabackup}-p${per_db}-i${innodb_only}: -per_database = $per_db, -xtrabackup= $xtrabackup, -mysqldump_innodb_only = $innodb_only, -local_dump_dir= $local_dump_dir, -password_file = $password_file, -mysql_binary = $mysql_binary, -mysqldump_binary = $mysqldump_binary, -} -$extras = undef -$fileset = mysql-${method}-x${xtrabackup}-p${per_db}-i${innodb_only} -} - -if $jobdefaults != undef { -@bacula::client::job { mysql-${method}-${name}-${jobdefaults}: -fileset = $fileset, -jobdefaults = $jobdefaults, -extras = $extras, -} -} -} - -# Utility definition used internally to deduplicate code -define backup::schedule($pool) { -bacula::director::schedule { Monthly-1st-${name}: -runs = [ -{ 'level' = 'Full', - 'at'= 1st ${name} at 02:05, -}, -{ 'level' = 'Differential', - 'at'= 3rd ${name} at 03:05, -}, -{ 'level' = 'Incremental', - 'at'= 'at 04:05', -}, -], -} - -bacula::director::jobdefaults { Monthly-1st-${name}-${pool}: -when = Monthly-1st-${name}, -pool = $pool, -} - -} -# Same for weekly backups -define backup::weeklyschedule($pool) { -bacula::director::schedule { Weekly-${name}: -runs = [ -{ 'level' = 'Full', - 'at'= ${name} at 02:05, -}, -], -} - -bacula::director::jobdefaults { Weekly-${name}-${pool}: -when = Weekly-${name}, -pool = $pool, -} -} - -class backup::mysql { -file {
[MediaWiki-commits] [Gerrit] Initialize statements on property pages - change (mediawiki...Wikibase)
Henning Snater has uploaded a new change for review. https://gerrit.wikimedia.org/r/169681 Change subject: Initialize statements on property pages .. Initialize statements on property pages Change-Id: I813403ad2274cd2c50b1106bf9884c999ff5 --- M lib/resources/jquery.wikibase/jquery.wikibase.entityview.js 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/81/169681/1 diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js b/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js index 2421a20..7827241 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js @@ -99,8 +99,11 @@ this._initFingerprints(); // TODO: Have an itemview and propertyview instead of ugly hack here. - if ( this.options.value.getType() === 'item' ) { + if ( this.options.value.getType() === 'item' || mw.config.get( 'wbExperimentalFeatures' ) ) { this._initClaims(); + } + + if ( this.options.value.getType() === 'item' ) { this._initSiteLinks(); } -- To view, visit https://gerrit.wikimedia.org/r/169681 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I813403ad2274cd2c50b1106bf9884c999ff5 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] Fix newpages default namespace - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: Fix newpages default namespace .. Fix newpages default namespace The ability to set namespaces for newitem.py, yet default to namespace 0 only was added for bug 67249, however this was inadvertantly removed in 60aceea. Bug: 72176 Change-Id: I729e84e83c6a4d5e4e69e877cbea9780176d1f27 --- M pywikibot/pagegenerators.py M tests/aspects.py M tests/pagegenerators_tests.py 3 files changed, 104 insertions(+), 1 deletion(-) Approvals: John Vandenberg: Looks good to me, but someone else must approve XZise: Looks good to me, approved jenkins-bot: Verified diff --git a/pywikibot/pagegenerators.py b/pywikibot/pagegenerators.py index b79dfda..128f6c4 100644 --- a/pywikibot/pagegenerators.py +++ b/pywikibot/pagegenerators.py @@ -516,10 +516,11 @@ # partial workaround for bug 67249 # to use -namespace/ns with -newpages, -ns must be given before -newpages # otherwise default namespace is 0 +namespaces = self.namespaces or 0 total = 60 if len(arg) = 10: total = int(arg[10:]) -gen = NewpagesPageGenerator(namespaces=self.namespaces, +gen = NewpagesPageGenerator(namespaces=namespaces, total=total, site=self.site) elif arg.startswith('-imagesused'): diff --git a/tests/aspects.py b/tests/aspects.py index 40edb6d..e1b2900 100644 --- a/tests/aspects.py +++ b/tests/aspects.py @@ -67,6 +67,62 @@ return self.assertRegexpMatches(*args, **kwargs) +def assertPageInNamespaces(self, page, namespaces): + +Assert that Pages is in namespaces. + +@param page: Page +@type page: Page +@param namespaces: expected namespaces +@type namespaces: int or set of int + +if isinstance(namespaces, int): +namespaces = set([namespaces]) + +self.assertIn(page.namespace(), namespaces, + %s not in namespace %r % (page, namespaces)) + +def assertPagesInNamespaces(self, gen, namespaces): + +Assert that generator returns Pages all in namespaces. + +@param gen: generator to iterate +@type gen: generator +@param namespaces: expected namespaces +@type namespaces: int or set of int + +if isinstance(namespaces, int): +namespaces = set([namespaces]) + +for page in gen: +self.assertPageInNamespaces(page, namespaces) + +def assertPagesInNamespacesAll(self, gen, namespaces, skip=False): + +Try to confirm that generator returns Pages for all namespaces. + +@param gen: generator to iterate +@type gen: generator +@param namespaces: expected namespaces +@type namespaces: int or set of int +@param count: maximum results to process +@type count: int +@param skip: skip test if not all namespaces found +@param skip: bool + +if isinstance(namespaces, int): +namespaces = set([namespaces]) +else: +assert(isinstance(namespaces, set)) + +page_namespaces = [page.namespace() for page in gen] + +if skip and set(page_namespaces) != namespaces: +raise unittest.SkipTest('Pages in namespaces %r not found.' +% list(namespaces - set(page_namespaces))) +else: +self.assertEqual(set(page_namespaces), namespaces) + class TestLoggingMixin(TestCaseBase): diff --git a/tests/pagegenerators_tests.py b/tests/pagegenerators_tests.py index 96e5dfa..da4c390 100755 --- a/tests/pagegenerators_tests.py +++ b/tests/pagegenerators_tests.py @@ -196,6 +196,52 @@ self.assertTrue(all(isinstance(item, pywikibot.ItemPage) for item in gen)) +class TestFactoryGenerator(DefaultSiteTestCase): + +Test pagegenerators.GeneratorFactory. + +def test_newpages_default(self): +gf = pagegenerators.GeneratorFactory(site=self.site) +gf.handleArg('-newpages') +gen = gf.getCombinedGenerator() +pages = set(gen) +self.assertEqual(len(pages), 60) + +def test_newpages_ns_default(self): +gf = pagegenerators.GeneratorFactory(site=self.site) +gf.handleArg('-newpages:10') +gen = gf.getCombinedGenerator() +self.assertPagesInNamespaces(gen, 0) + +def test_newpages_ns(self): +gf = pagegenerators.GeneratorFactory(site=self.site) +gf.handleArg('-ns:1') +gf.handleArg('-newpages:10') +gen = gf.getCombinedGenerator() +self.assertPagesInNamespaces(gen, 1) + +def test_recentchanges_ns_default(self): +gf = pagegenerators.GeneratorFactory(site=self.site) +
[MediaWiki-commits] [Gerrit] Add icon for PD licenses - change (mediawiki...MultimediaViewer)
Gergő Tisza has uploaded a new change for review. https://gerrit.wikimedia.org/r/169683 Change subject: Add icon for PD licenses .. Add icon for PD licenses Change-Id: I82c56a420d8d529a4a50cb66e64b191bbb36997f --- M resources/mmv/model/mmv.model.License.js M resources/mmv/ui/mmv.ui.metadataPanel.js M tests/qunit/mmv/model/mmv.model.License.test.js 3 files changed, 28 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MultimediaViewer refs/changes/83/169683/1 diff --git a/resources/mmv/model/mmv.model.License.js b/resources/mmv/model/mmv.model.License.js index abe651f..8e076e8 100644 --- a/resources/mmv/model/mmv.model.License.js +++ b/resources/mmv/model/mmv.model.License.js @@ -64,6 +64,14 @@ }; /** +* Check whether this is a public domain license. +* @returns {boolean} +*/ + LP.isPd = function () { + return this.internalName === 'pd'; + }; + + /** * Returns the short name of the license: * - if we have interface messages for this license (basically just CC and PD), use those * - otherwise use the short name from the license template (might or might not be translated diff --git a/resources/mmv/ui/mmv.ui.metadataPanel.js b/resources/mmv/ui/mmv.ui.metadataPanel.js index 69b5c4a..5281dcb 100644 --- a/resources/mmv/ui/mmv.ui.metadataPanel.js +++ b/resources/mmv/ui/mmv.ui.metadataPanel.js @@ -468,16 +468,17 @@ * @param {string} filePageUrl URL of the file description page */ MPP.setLicense = function ( license, filePageUrl ) { - var shortName, url, isCc; + var shortName, url, isCc, isPd; if ( license ) { shortName = license.getShortName(); url = license.deedUrl || filePageUrl; isCc = license.isCc(); + isPd = license.isPd(); } else { shortName = mw.message( 'multimediaviewer-license-default' ).text(); url = filePageUrl; - isCc = false; + isCc = isPd = false; } this.$license @@ -487,6 +488,7 @@ this.$licenseLi .toggleClass( 'cc-license', isCc ) + .toggleClass( 'pd-license', isCc ) .removeClass( 'empty' ); }; diff --git a/tests/qunit/mmv/model/mmv.model.License.test.js b/tests/qunit/mmv/model/mmv.model.License.test.js index 0aa59f2..8f3393e 100644 --- a/tests/qunit/mmv/model/mmv.model.License.test.js +++ b/tests/qunit/mmv/model/mmv.model.License.test.js @@ -116,4 +116,20 @@ license = new mw.mmv.model.License( 'MIT' ); assert.strictEqual( license.isCc(), false, 'Non-CC license with no internal name not recognized' ); } ); + + QUnit.test( 'isPd()', 3, function( assert ) { + var license; + + license = new mw.mmv.model.License( 'Public Domain', 'pd', + 'Public Domain for lack of originality' ); + assert.strictEqual( license.isPd(), true, 'PD license recognized' ); + + license = new mw.mmv.model.License( 'CC-BY-SA-2.0', 'cc-by-sa-2.0', + 'Creative Commons Attribution - ShareAlike 2.0', + 'http://creativecommons.org/licenses/by-sa/2.0/' ); + assert.strictEqual( license.isPd(), false, 'Non-PD license not recognized' ); + + license = new mw.mmv.model.License( 'MIT' ); + assert.strictEqual( license.isPd(), false, 'Non-PD license with no internal name not recognized' ); + } ); }( mediaWiki, jQuery ) ); -- To view, visit https://gerrit.wikimedia.org/r/169683 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I82c56a420d8d529a4a50cb66e64b191bbb36997f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MultimediaViewer Gerrit-Branch: master Gerrit-Owner: Gergő Tisza gti...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix file upload for VisualEditor language screenshots - change (integration/config)
jenkins-bot has submitted this change and it was merged. Change subject: Fix file upload for VisualEditor language screenshots .. Fix file upload for VisualEditor language screenshots We were installing gems built for Ruby 2.0, but then using the gems from Ruby 1.9. The change updates all browsertests-* jobs, but the changed code will run only in browsertests-VisualEditor-language-screenshot-linux-firefox job. Change-Id: Ie6fd61f3ec1e11dab4142f7987756ede6a131772 --- M jjb/macro-browsertests.yaml 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Amire80: Looks good to me, approved jenkins-bot: Verified diff --git a/jjb/macro-browsertests.yaml b/jjb/macro-browsertests.yaml index e813610..619998a 100644 --- a/jjb/macro-browsertests.yaml +++ b/jjb/macro-browsertests.yaml @@ -118,7 +118,7 @@ || (echo -e \nJob has failed (exit code: $?).; false) if [[ ! -z $LANGUAGE_SCREENSHOT_CODE ]]; then -$WORKSPACE/vendor/bin/bundle exec ruby1.9.1 upload.rb +$WORKSPACE/vendor/bin/bundle exec ruby2.0 upload.rb fi # Let a job run on different node, but no more than once per node. -- To view, visit https://gerrit.wikimedia.org/r/169675 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie6fd61f3ec1e11dab4142f7987756ede6a131772 Gerrit-PatchSet: 3 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Zfilipin zfili...@wikimedia.org Gerrit-Reviewer: Amire80 amir.ahar...@mail.huji.ac.il 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] Fix broken option in jquery.wikibase.linkitem.js - change (mediawiki...Wikibase)
Thiemo Mättig (WMDE) has uploaded a new change for review. https://gerrit.wikimedia.org/r/169684 Change subject: Fix broken option in jquery.wikibase.linkitem.js .. Fix broken option in jquery.wikibase.linkitem.js This mistake was introduced in Ibae5bfc. It makes the client widget unusable. Please backport this fix since it is on the live site as far as I can tell. Change-Id: Ia12eda93408a5d4a0f0efa2dcc45b3fbbdd51446 --- M client/resources/jquery.wikibase/jquery.wikibase.linkitem.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/84/169684/1 diff --git a/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js b/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js index 008d35b..bb9c37e 100644 --- a/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js +++ b/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js @@ -347,7 +347,7 @@ this.targetArticle = $( '#wbclient-linkItem-page' ).val(); this._pageConnector = new wb.PageConnector( - new wb.RepoApi( this._mwApiForRepo ), + new wb.RepoApi( this.options.mwApiForRepo ), this.options.globalSiteId, this.options.pageTitle, this.targetSite, -- To view, visit https://gerrit.wikimedia.org/r/169684 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia12eda93408a5d4a0f0efa2dcc45b3fbbdd51446 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Thiemo Mättig (WMDE) thiemo.maet...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove PMTPA from icinga::nsca::firewall - change (operations/puppet)
Alexandros Kosiaris has uploaded a new change for review. https://gerrit.wikimedia.org/r/169685 Change subject: Remove PMTPA from icinga::nsca::firewall .. Remove PMTPA from icinga::nsca::firewall Change-Id: I6ac271153de6a1ccbbc2e402e9a08498319a46c1 --- M modules/icinga/manifests/nsca/firewall.pp 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/85/169685/1 diff --git a/modules/icinga/manifests/nsca/firewall.pp b/modules/icinga/manifests/nsca/firewall.pp index 8b2e9b8..bf56762 100644 --- a/modules/icinga/manifests/nsca/firewall.pp +++ b/modules/icinga/manifests/nsca/firewall.pp @@ -4,6 +4,6 @@ class icinga::nsca::firewall { # NSCA on port 5667 ferm::rule { 'ncsa_allowed': -rule = 'saddr (127.0.0.1 $EQIAD_PRIVATE_ANALYTICS1_A_EQIAD $EQIAD_PRIVATE_ANALYTICS1_B_EQIAD $EQIAD_PRIVATE_ANALYTICS1_C_EQIAD $EQIAD_PRIVATE_ANALYTICS1_D_EQIAD $EQIAD_PRIVATE_LABS_HOSTS1_A_EQIAD $EQIAD_PRIVATE_LABS_HOSTS1_B_EQIAD $EQIAD_PRIVATE_LABS_HOSTS1_D_EQIAD $EQIAD_PRIVATE_LABS_SUPPORT1_C_EQIAD $EQIAD_PRIVATE_PRIVATE1_A_EQIAD $EQIAD_PRIVATE_PRIVATE1_B_EQIAD $EQIAD_PRIVATE_PRIVATE1_C_EQIAD $EQIAD_PRIVATE_PRIVATE1_D_EQIAD $EQIAD_PUBLIC_PUBLIC1_A_EQIAD $EQIAD_PUBLIC_PUBLIC1_B_EQIAD $EQIAD_PUBLIC_PUBLIC1_C_EQIAD $EQIAD_PUBLIC_PUBLIC1_D_EQIAD $ESAMS_PRIVATE_PRIVATE1_ESAMS $ESAMS_PUBLIC_PUBLIC_SERVICES $PMTPA_PRIVATE_PRIVATE $PMTPA_PRIVATE_VIRT_HOSTS $PMTPA_PUBLIC_PUBLIC_SERVICES $PMTPA_PUBLIC_PUBLIC_SERVICES_2 $PMTPA_PUBLIC_SANDBOX $PMTPA_PUBLIC_SQUID_LVS $ULSFO_PRIVATE_PRIVATE1_ULSFO $ULSFO_PUBLIC_PUBLIC1_ULSFO 208.80.155.0/27 10.64.40.0/24) proto tcp dport 5667 ACCEPT;' +rule = 'saddr (127.0.0.1 $EQIAD_PRIVATE_ANALYTICS1_A_EQIAD $EQIAD_PRIVATE_ANALYTICS1_B_EQIAD $EQIAD_PRIVATE_ANALYTICS1_C_EQIAD $EQIAD_PRIVATE_ANALYTICS1_D_EQIAD $EQIAD_PRIVATE_LABS_HOSTS1_A_EQIAD $EQIAD_PRIVATE_LABS_HOSTS1_B_EQIAD $EQIAD_PRIVATE_LABS_HOSTS1_D_EQIAD $EQIAD_PRIVATE_LABS_SUPPORT1_C_EQIAD $EQIAD_PRIVATE_PRIVATE1_A_EQIAD $EQIAD_PRIVATE_PRIVATE1_B_EQIAD $EQIAD_PRIVATE_PRIVATE1_C_EQIAD $EQIAD_PRIVATE_PRIVATE1_D_EQIAD $EQIAD_PUBLIC_PUBLIC1_A_EQIAD $EQIAD_PUBLIC_PUBLIC1_B_EQIAD $EQIAD_PUBLIC_PUBLIC1_C_EQIAD $EQIAD_PUBLIC_PUBLIC1_D_EQIAD $ESAMS_PRIVATE_PRIVATE1_ESAMS $ESAMS_PUBLIC_PUBLIC_SERVICES $ULSFO_PRIVATE_PRIVATE1_ULSFO $ULSFO_PUBLIC_PUBLIC1_ULSFO 208.80.155.0/27 10.64.40.0/24) proto tcp dport 5667 ACCEPT;' } } -- To view, visit https://gerrit.wikimedia.org/r/169685 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6ac271153de6a1ccbbc2e402e9a08498319a46c1 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Alexandros Kosiaris akosia...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove PMTPA from icinga::nsca::firewall - change (operations/puppet)
Alexandros Kosiaris has submitted this change and it was merged. Change subject: Remove PMTPA from icinga::nsca::firewall .. Remove PMTPA from icinga::nsca::firewall Change-Id: I6ac271153de6a1ccbbc2e402e9a08498319a46c1 --- M modules/icinga/manifests/nsca/firewall.pp 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Alexandros Kosiaris: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/icinga/manifests/nsca/firewall.pp b/modules/icinga/manifests/nsca/firewall.pp index 8b2e9b8..bf56762 100644 --- a/modules/icinga/manifests/nsca/firewall.pp +++ b/modules/icinga/manifests/nsca/firewall.pp @@ -4,6 +4,6 @@ class icinga::nsca::firewall { # NSCA on port 5667 ferm::rule { 'ncsa_allowed': -rule = 'saddr (127.0.0.1 $EQIAD_PRIVATE_ANALYTICS1_A_EQIAD $EQIAD_PRIVATE_ANALYTICS1_B_EQIAD $EQIAD_PRIVATE_ANALYTICS1_C_EQIAD $EQIAD_PRIVATE_ANALYTICS1_D_EQIAD $EQIAD_PRIVATE_LABS_HOSTS1_A_EQIAD $EQIAD_PRIVATE_LABS_HOSTS1_B_EQIAD $EQIAD_PRIVATE_LABS_HOSTS1_D_EQIAD $EQIAD_PRIVATE_LABS_SUPPORT1_C_EQIAD $EQIAD_PRIVATE_PRIVATE1_A_EQIAD $EQIAD_PRIVATE_PRIVATE1_B_EQIAD $EQIAD_PRIVATE_PRIVATE1_C_EQIAD $EQIAD_PRIVATE_PRIVATE1_D_EQIAD $EQIAD_PUBLIC_PUBLIC1_A_EQIAD $EQIAD_PUBLIC_PUBLIC1_B_EQIAD $EQIAD_PUBLIC_PUBLIC1_C_EQIAD $EQIAD_PUBLIC_PUBLIC1_D_EQIAD $ESAMS_PRIVATE_PRIVATE1_ESAMS $ESAMS_PUBLIC_PUBLIC_SERVICES $PMTPA_PRIVATE_PRIVATE $PMTPA_PRIVATE_VIRT_HOSTS $PMTPA_PUBLIC_PUBLIC_SERVICES $PMTPA_PUBLIC_PUBLIC_SERVICES_2 $PMTPA_PUBLIC_SANDBOX $PMTPA_PUBLIC_SQUID_LVS $ULSFO_PRIVATE_PRIVATE1_ULSFO $ULSFO_PUBLIC_PUBLIC1_ULSFO 208.80.155.0/27 10.64.40.0/24) proto tcp dport 5667 ACCEPT;' +rule = 'saddr (127.0.0.1 $EQIAD_PRIVATE_ANALYTICS1_A_EQIAD $EQIAD_PRIVATE_ANALYTICS1_B_EQIAD $EQIAD_PRIVATE_ANALYTICS1_C_EQIAD $EQIAD_PRIVATE_ANALYTICS1_D_EQIAD $EQIAD_PRIVATE_LABS_HOSTS1_A_EQIAD $EQIAD_PRIVATE_LABS_HOSTS1_B_EQIAD $EQIAD_PRIVATE_LABS_HOSTS1_D_EQIAD $EQIAD_PRIVATE_LABS_SUPPORT1_C_EQIAD $EQIAD_PRIVATE_PRIVATE1_A_EQIAD $EQIAD_PRIVATE_PRIVATE1_B_EQIAD $EQIAD_PRIVATE_PRIVATE1_C_EQIAD $EQIAD_PRIVATE_PRIVATE1_D_EQIAD $EQIAD_PUBLIC_PUBLIC1_A_EQIAD $EQIAD_PUBLIC_PUBLIC1_B_EQIAD $EQIAD_PUBLIC_PUBLIC1_C_EQIAD $EQIAD_PUBLIC_PUBLIC1_D_EQIAD $ESAMS_PRIVATE_PRIVATE1_ESAMS $ESAMS_PUBLIC_PUBLIC_SERVICES $ULSFO_PRIVATE_PRIVATE1_ULSFO $ULSFO_PUBLIC_PUBLIC1_ULSFO 208.80.155.0/27 10.64.40.0/24) proto tcp dport 5667 ACCEPT;' } } -- To view, visit https://gerrit.wikimedia.org/r/169685 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6ac271153de6a1ccbbc2e402e9a08498319a46c1 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Alexandros Kosiaris akosia...@wikimedia.org Gerrit-Reviewer: Alexandros Kosiaris akosia...@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] Fix broken option in jquery.wikibase.linkitem.js - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Fix broken option in jquery.wikibase.linkitem.js .. Fix broken option in jquery.wikibase.linkitem.js This mistake was introduced in Ibae5bfc. It makes the client widget unusable. Please backport this fix since it is on the live site as far as I can tell. Change-Id: Ia12eda93408a5d4a0f0efa2dcc45b3fbbdd51446 --- M client/resources/jquery.wikibase/jquery.wikibase.linkitem.js 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Adrian Lang: Looks good to me, approved jenkins-bot: Verified diff --git a/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js b/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js index 008d35b..bb9c37e 100644 --- a/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js +++ b/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js @@ -347,7 +347,7 @@ this.targetArticle = $( '#wbclient-linkItem-page' ).val(); this._pageConnector = new wb.PageConnector( - new wb.RepoApi( this._mwApiForRepo ), + new wb.RepoApi( this.options.mwApiForRepo ), this.options.globalSiteId, this.options.pageTitle, this.targetSite, -- To view, visit https://gerrit.wikimedia.org/r/169684 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia12eda93408a5d4a0f0efa2dcc45b3fbbdd51446 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Thiemo Mättig (WMDE) thiemo.maet...@wikimedia.de Gerrit-Reviewer: Adrian Lang adrian.l...@wikimedia.de Gerrit-Reviewer: Aude aude.w...@gmail.com Gerrit-Reviewer: Hoo man h...@online.de Gerrit-Reviewer: JanZerebecki jan.wikime...@zerebecki.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] Fix broken option in jquery.wikibase.linkitem.js - change (mediawiki...Wikibase)
Aude has uploaded a new change for review. https://gerrit.wikimedia.org/r/169687 Change subject: Fix broken option in jquery.wikibase.linkitem.js .. Fix broken option in jquery.wikibase.linkitem.js This mistake was introduced in Ibae5bfc. It makes the client widget unusable. Please backport this fix since it is on the live site as far as I can tell. Change-Id: Ia12eda93408a5d4a0f0efa2dcc45b3fbbdd51446 (cherry picked from commit b86b417aa6969d927056fc30409abd6cf748e8b5) --- M client/resources/jquery.wikibase/jquery.wikibase.linkitem.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/87/169687/1 diff --git a/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js b/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js index 008d35b..bb9c37e 100644 --- a/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js +++ b/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js @@ -347,7 +347,7 @@ this.targetArticle = $( '#wbclient-linkItem-page' ).val(); this._pageConnector = new wb.PageConnector( - new wb.RepoApi( this._mwApiForRepo ), + new wb.RepoApi( this.options.mwApiForRepo ), this.options.globalSiteId, this.options.pageTitle, this.targetSite, -- To view, visit https://gerrit.wikimedia.org/r/169687 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia12eda93408a5d4a0f0efa2dcc45b3fbbdd51446 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: wmf/1.25wmf6 Gerrit-Owner: Aude aude.w...@gmail.com Gerrit-Reviewer: Thiemo Mättig (WMDE) thiemo.maet...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix broken option in jquery.wikibase.linkitem.js - change (mediawiki...Wikibase)
Aude has uploaded a new change for review. https://gerrit.wikimedia.org/r/169686 Change subject: Fix broken option in jquery.wikibase.linkitem.js .. Fix broken option in jquery.wikibase.linkitem.js This mistake was introduced in Ibae5bfc. It makes the client widget unusable. Please backport this fix since it is on the live site as far as I can tell. Change-Id: Ia12eda93408a5d4a0f0efa2dcc45b3fbbdd51446 (cherry picked from commit b86b417aa6969d927056fc30409abd6cf748e8b5) --- M client/resources/jquery.wikibase/jquery.wikibase.linkitem.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/86/169686/1 diff --git a/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js b/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js index 39b5aeb..8dc128c 100644 --- a/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js +++ b/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js @@ -347,7 +347,7 @@ this.targetArticle = $( '#wbclient-linkItem-page' ).val(); this._pageConnector = new wb.PageConnector( - new wb.RepoApi( this._mwApiForRepo ), + new wb.RepoApi( this.options.mwApiForRepo ), this.options.globalSiteId, this.options.pageTitle, this.targetSite, -- To view, visit https://gerrit.wikimedia.org/r/169686 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia12eda93408a5d4a0f0efa2dcc45b3fbbdd51446 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: wmf/1.25wmf5 Gerrit-Owner: Aude aude.w...@gmail.com Gerrit-Reviewer: Thiemo Mättig (WMDE) thiemo.maet...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] $.wikibase.toolbarbutton: Fixed misspelled event name - change (mediawiki...Wikibase)
Henning Snater has uploaded a new change for review. https://gerrit.wikimedia.org/r/169688 Change subject: $.wikibase.toolbarbutton: Fixed misspelled event name .. $.wikibase.toolbarbutton: Fixed misspelled event name Change-Id: Ifaeab1d9f411b3d1aed612579c8ef425f74067ec --- M lib/resources/jquery.wikibase/toolbar/jquery.wikibase.toolbarbutton.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/88/169688/1 diff --git a/lib/resources/jquery.wikibase/toolbar/jquery.wikibase.toolbarbutton.js b/lib/resources/jquery.wikibase/toolbar/jquery.wikibase.toolbarbutton.js index c97c9a9..ae2ec89 100644 --- a/lib/resources/jquery.wikibase/toolbar/jquery.wikibase.toolbarbutton.js +++ b/lib/resources/jquery.wikibase/toolbar/jquery.wikibase.toolbarbutton.js @@ -56,7 +56,7 @@ } this.$link - .on( 'click.toolbarbutton keydow.toolbarbutton', function( event ) { + .on( 'click.toolbarbutton keydown.toolbarbutton', function( event ) { event.preventDefault(); if( self.options.disabled ) { -- To view, visit https://gerrit.wikimedia.org/r/169688 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifaeab1d9f411b3d1aed612579c8ef425f74067ec 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] PEP257 scripts/ - change (pywikibot/core)
John Vandenberg has uploaded a new change for review. https://gerrit.wikimedia.org/r/169689 Change subject: PEP257 scripts/ .. PEP257 scripts/ Change-Id: I07bb75e52ac9cbbf845e08a364526ed049e445a0 --- M scripts/add_text.py M scripts/archivebot.py M scripts/blockpageschecker.py M scripts/blockreview.py M scripts/capitalize_redirects.py M scripts/casechecker.py M scripts/cfd.py M scripts/interwiki.py M scripts/maintenance/__init__.py M scripts/maintenance/compat2core.py M scripts/maintenance/make_i18n_dict.py M scripts/maintenance/wikimedia_sites.py M scripts/makecat.py M tox.ini 14 files changed, 148 insertions(+), 136 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/89/169689/1 diff --git a/scripts/add_text.py b/scripts/add_text.py index d90e0cd..a9489dc 100644 --- a/scripts/add_text.py +++ b/scripts/add_text.py @@ -1,8 +1,10 @@ #!/usr/bin/python # -*- coding: utf-8 -*- - -This is a Bot written by Filnik to add a text at the end of the page but above -categories, interwiki and template for the stars of the interwiki (default). +r +This is a Bot to add a text at the end of the content of the page. + +By default it adds the text above categories, interwiki and template +for the stars of the interwiki. Alternatively it may also add a text at the top of the page. These command line parameters can be used to specify which pages to work on: diff --git a/scripts/archivebot.py b/scripts/archivebot.py index d57e2fc..ed5dcfd 100644 --- a/scripts/archivebot.py +++ b/scripts/archivebot.py @@ -111,10 +111,11 @@ class MalformedConfigError(pywikibot.Error): + There is an error in the configuration template. -class MissingConfigError(pywikibot.Error): +class MissingConfigError(pywikibot.Error): # noqa The config is missing in the header (either it's in one of the threads or transcluded from another page). @@ -122,10 +123,11 @@ class AlgorithmError(MalformedConfigError): + Invalid specification of archiving algorithm. -class ArchiveSecurityError(pywikibot.Error): +class ArchiveSecurityError(pywikibot.Error): # noqa Archive is not a subpage of page being archived and key not specified (or incorrect). @@ -133,7 +135,10 @@ def str2localized_duration(site, string): -Translate a duration written in the shorthand notation (ex. 24h, 7d) + +Localise a shorthand duration. + +Translates a duration written in the shorthand notation (ex. 24h, 7d) into an expression in the local language of the wiki (24 hours, 7 days). if string[-1] == 'd': @@ -148,7 +153,10 @@ def str2time(string): -Accepts a string defining a time period: + +Return a timedelta for a shorthand duration. + +Accepts a string defining a time period: 7d - 7 days 36h - 36 hours Returns the corresponding timedelta object. @@ -162,7 +170,10 @@ def str2size(string): -Accepts a string defining a size: + +Return a size for a shorthand size. + +Accepts a string defining a size: 1337 - 1337 bytes 150K - 150 kilobytes 2M - 2 megabytes @@ -209,8 +220,10 @@ class DiscussionThread(object): -An object representing a discussion thread on a page, that is something -of the form: + +An object representing a discussion thread on a page. + +It represents something that is of the form: == Title of thread == @@ -270,8 +283,10 @@ class DiscussionPage(pywikibot.Page): -A class that represents a single discussion page as well as an archive -page. Feed threads to it and run an update() afterwards. + +A class that represents a single page of discussion threads. + +Feed threads to it and run an update() afterwards. def __init__(self, source, archiver, params=None): @@ -362,6 +377,7 @@ class PageArchiver(object): A class that encapsulates all archiving methods. + __init__ expects a pywikibot.Page object. Execute by running the .run() method. @@ -431,6 +447,7 @@ def feed_archive(self, archive, thread, max_archive_size, params=None): Feed the thread to one of the archives. + If it doesn't exist yet, create it. If archive name is an empty string (or None), discard the thread (/dev/null). diff --git a/scripts/blockpageschecker.py b/scripts/blockpageschecker.py index 52fd2fb..23785c9 100755 --- a/scripts/blockpageschecker.py +++ b/scripts/blockpageschecker.py @@ -1,11 +1,11 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -This is a script originally written by Wikihermit and then rewritten by Filnik, -to delete the templates used to warn in the pages that a page is blocked, when -the page isn't blocked at all. Indeed, very often sysops block the pages for a -setted time but then the forget to delete the warning! This script is useful if -you want to delete those useless warning left in
[MediaWiki-commits] [Gerrit] Update Debian package to upstream r57689 - change (operations...apertium-apy)
Alexandros Kosiaris has submitted this change and it was merged. Change subject: Update Debian package to upstream r57689 .. Update Debian package to upstream r57689 Change-Id: I9d01af40cbf968a477198ab3752e94cadbb9b9df --- M debian/changelog 1 file changed, 6 insertions(+), 0 deletions(-) Approvals: Alexandros Kosiaris: Looks good to me, approved jenkins-bot: Verified diff --git a/debian/changelog b/debian/changelog index 17ac1be..22dbc96 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +apertium-apy (0.1+svn~57689-1) trusty; urgency=low + + * New upstream snapshot to fix missing db file issue. + + -- Kartik Mistry kar...@debian.org Sat, 25 Oct 2014 20:13:36 +0530 + apertium-apy (0.1+svn~57531-3) trusty; urgency=low [ Alexandros Kosiaris ] -- To view, visit https://gerrit.wikimedia.org/r/168760 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9d01af40cbf968a477198ab3752e94cadbb9b9df Gerrit-PatchSet: 2 Gerrit-Project: operations/debs/contenttranslation/apertium-apy Gerrit-Branch: master Gerrit-Owner: KartikMistry kartik.mis...@gmail.com Gerrit-Reviewer: Alexandros Kosiaris akosia...@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] $.wikibase.toolbarbutton: Fixed misspelled event name - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: $.wikibase.toolbarbutton: Fixed misspelled event name .. $.wikibase.toolbarbutton: Fixed misspelled event name Change-Id: Ifaeab1d9f411b3d1aed612579c8ef425f74067ec --- M lib/resources/jquery.wikibase/toolbar/jquery.wikibase.toolbarbutton.js 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Adrian Lang: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/lib/resources/jquery.wikibase/toolbar/jquery.wikibase.toolbarbutton.js b/lib/resources/jquery.wikibase/toolbar/jquery.wikibase.toolbarbutton.js index c97c9a9..ae2ec89 100644 --- a/lib/resources/jquery.wikibase/toolbar/jquery.wikibase.toolbarbutton.js +++ b/lib/resources/jquery.wikibase/toolbar/jquery.wikibase.toolbarbutton.js @@ -56,7 +56,7 @@ } this.$link - .on( 'click.toolbarbutton keydow.toolbarbutton', function( event ) { + .on( 'click.toolbarbutton keydown.toolbarbutton', function( event ) { event.preventDefault(); if( self.options.disabled ) { -- To view, visit https://gerrit.wikimedia.org/r/169688 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifaeab1d9f411b3d1aed612579c8ef425f74067ec 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] Restructured url endpoint calls, fixed unshorten - change (mediawiki...citoid)
Mvolz has uploaded a new change for review. https://gerrit.wikimedia.org/r/169690 Change subject: Restructured url endpoint calls, fixed unshorten .. Restructured url endpoint calls, fixed unshorten * Restructured if blocks for more clarity. Hopefully. * Should no longer fall over from 500 errors * Added some console.log messages * Unshortened urls now properly go to Zotero first to look for a translator before using the native scraper. Change-Id: Ia4b58d4b9eda3871c239c50bbacdce814bb3c134 --- M server.js M unshorten.js 2 files changed, 56 insertions(+), 54 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/citoid refs/changes/90/169690/1 diff --git a/server.js b/server.js index 881..64f608c 100644 --- a/server.js +++ b/server.js @@ -18,7 +18,7 @@ .alias( 'c', 'config' ); var argv = opts.argv; -/*internal modules*/ +/*internal modules*/ var zoteroRequest = require('./zotero.js').zoteroRequest; var scrape = require('./scrape.js').scrape; @@ -34,7 +34,7 @@ var allowCORS = CitoidConfig.allowCORS; //url base which allows further formatting by adding a single endpoint, i.e. 'web' -var zoteroURL = util.format('http://%s:%s/%s', zoteroInterface, zoteroPort.toString()); +var zoteroURL = util.format('http://%s:%s/%s', zoteroInterface, zoteroPort.toString()); /*testing variables*/ var testSessionID = abc123; @@ -54,6 +54,7 @@ citoid.use(bodyParser.urlencoded({extended: false})); /*Landing page*/ +/*jshint multistr: true */ citoid.get('/', function(req, res){ res.setHeader(Content-Type, text/html); res.send('!DOCTYPE html\ @@ -83,7 +84,7 @@ //temp backwards compatibility if (!format){ - format = 'mwDeprecated'; + format = 'mwDeprecated'; } res.type('application/json'); @@ -98,61 +99,60 @@ else {requestedURL = urlParse.format(parsedURL);} } catch (e){ - console.log(e); + console.log(e); } - - //make things work with new format for now.. - //format = 'mediawiki'; //Request from Zotero and set response zoteroRequest(zoteroURLWeb, requestedURL, testSessionID, format, function(error, response, body){ console.log(Request made for: + requestedURL); - if (response) { - if (!error) { - //501 indicates no translator availabe - //this is common- can indicate shortened url - //or a website not specified in the translators - if (~[500, 501].indexOf(response.statusCode)){ - //try again with unshortened url - //we don't do this initially because many sites - //will redirect this fcn to a log-in screen - unshorten(requestedURL, function(expandedURL) { - zoteroRequest(zoteroURLWeb, expandedURL, testSessionID, format, - function(error, response, body){ - if (response){ - //if still no translator, or translation fails, - //send to naive scraper - if (~[500, 501].indexOf(response.statusCode)){ - scrape(requestedURL, function(body){ - res.statusCode = 200; - res.json(body); - }); - } - else { - res.statusCode = 200; - res.json(body); - } - } - }); - }); - } - else { - res.statusCode = response.statusCode; - res.json(body); - } - } - else { -
[MediaWiki-commits] [Gerrit] Adapt to ValueView 0.8.0 - change (mediawiki...Wikibase)
Henning Snater has uploaded a new change for review. https://gerrit.wikimedia.org/r/169682 Change subject: Adapt to ValueView 0.8.0 .. Adapt to ValueView 0.8.0 Change-Id: I110ced6c697169df110af34e79a37af627c2965e --- M lib/resources/wikibase.ValueViewBuilder.js M lib/tests/qunit/wikibase.ValueViewBuilder.tests.js M repo/resources/wikibase.ui.entityViewInit.js 3 files changed, 36 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/82/169682/1 diff --git a/lib/resources/wikibase.ValueViewBuilder.js b/lib/resources/wikibase.ValueViewBuilder.js index 86b72af..f2ca36d 100644 --- a/lib/resources/wikibase.ValueViewBuilder.js +++ b/lib/resources/wikibase.ValueViewBuilder.js @@ -11,20 +11,31 @@ * @param {$.valueview.ExpertStore} expertStore * @param {valueFormatters.ValueFormatterStore} formatterStore * @param {valueParsers.ValueParserStore} parserStore +* @param {string} language * @param {Object} mediaWiki */ - var SELF = wb.ValueViewBuilder = function( expertStore, formatterStore, parserStore, mediaWiki ) { + var SELF = wb.ValueViewBuilder = function( + expertStore, formatterStore, parserStore, language, mediaWiki + ) { this._baseOptions = { expertStore: expertStore, formatterStore: formatterStore, - parserStore: parserStore + parserStore: parserStore, + language: language }; this._mw = mediaWiki; }; $.extend( SELF.prototype, { + /** +* @type {Object} +*/ _baseOptions: null, + + /** +* @type {Object} +*/ _mw: null, /** @@ -32,7 +43,7 @@ * @param {dataTypes.DataType} dataType * @param {dataValues.DataValue} dataValue * -* @return {$.valueview} +* @return {jQuery.valueview} */ initValueView: function( $valueViewDom, dataType, dataValue ) { var valueView, diff --git a/lib/tests/qunit/wikibase.ValueViewBuilder.tests.js b/lib/tests/qunit/wikibase.ValueViewBuilder.tests.js index d3f342c..876b546 100644 --- a/lib/tests/qunit/wikibase.ValueViewBuilder.tests.js +++ b/lib/tests/qunit/wikibase.ValueViewBuilder.tests.js @@ -30,6 +30,7 @@ expertStore, formatterStore, parserStore, + null, null ); @@ -42,6 +43,25 @@ } ) ); } ); + QUnit.test( 'initValueView passes language', function( assert ) { + var vvAndDom = getValueViewAndDom(), + $dom = vvAndDom.$dom; + + var valueViewBuilder = new wb.ValueViewBuilder( + null, + null, + null, + 'de', + null + ); + + valueViewBuilder.initValueView( $dom ); + + sinon.assert.calledWith( $dom.valueview, sinon.match( { + language: 'de' + } ) ); + } ); + QUnit.test( 'initValueView passes mw', function( assert ) { var vvAndDom = getValueViewAndDom(), valueView = vvAndDom.vv, @@ -52,6 +72,7 @@ null, null, null, + null, mw ); diff --git a/repo/resources/wikibase.ui.entityViewInit.js b/repo/resources/wikibase.ui.entityViewInit.js index 480ad80..7b6ba05 100644 --- a/repo/resources/wikibase.ui.entityViewInit.js +++ b/repo/resources/wikibase.ui.entityViewInit.js @@ -130,6 +130,7 @@ experts, getFormatterStore( repoApi, dataTypes ), getParserStore( repoApi ), + mw.config.get( 'wgUserLanguage' ), mw ), languages: getUserLanguages() -- To view, visit https://gerrit.wikimedia.org/r/169682 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I110ced6c697169df110af34e79a37af627c2965e 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
[MediaWiki-commits] [Gerrit] udp2log: replace iptables with ferm - change (operations/puppet)
Matanya has uploaded a new change for review. https://gerrit.wikimedia.org/r/169691 Change subject: udp2log: replace iptables with ferm .. udp2log: replace iptables with ferm Change-Id: I5859dbce6da06a5e27da90859ad33a400fbb3912 --- M manifests/misc/udp2log.pp 1 file changed, 12 insertions(+), 58 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/91/169691/1 diff --git a/manifests/misc/udp2log.pp b/manifests/misc/udp2log.pp index 25cce40..ec5ccee 100644 --- a/manifests/misc/udp2log.pp +++ b/manifests/misc/udp2log.pp @@ -23,7 +23,7 @@ if $monitor { # TODO: Should probably include icincga package here. include misc::udp2log::monitoring -include misc::udp2log::iptables +include misc::udp2log::firewall } system::role { 'udp2log::logger': @@ -310,7 +310,7 @@ # includes scripts and iptables rules # needed for udp2log monitoring. class misc::udp2log::monitoring { -include misc::udp2log::iptables +include misc::udp2log::firewall package { 'ganglia-logtailer': ensure = latest, @@ -371,66 +371,20 @@ include misc::monitoring::net::udp } +class misc::udp2log::firewall { +ferm::rule { 'udp2log_accept_all_private': +rule = 'saddr (10.0.0.0/8) proto tcp ACCEPT;', +} -class misc::udp2log::iptables_purges { -require iptables::tables -# The deny rule must always be purged, -# otherwise ACCEPTs can be placed below it -iptables_purge_service{ 'udp2log_drop_udp': -service = 'udp', +ferm::rule { 'udp2log_accept_all_US': +rule = 'saddr (208.80.152.0/22) proto tcp ACCEPT;', } -# When removing or modifying a rule, place the old rule here, -# otherwise it won't be purged, and will stay in the iptables forever -} -class misc::udp2log::iptables_accepts { -require misc::udp2log::iptables_purges -# Rememeber to place modified or removed rules into purges! -# common services for all hosts -iptables_add_service{ 'udp2log_accept_all_private': -service = 'all', -source = '10.0.0.0/8', -jump= 'ACCEPT', +ferm::rule { 'udp2log_accept_all_AMS': +rule = 'saddr (91.198.174.0/24) proto tcp ACCEPT;', } -iptables_add_service{ 'udp2log_accept_all_US': -service = 'all', -source = '208.80.152.0/22', -jump= 'ACCEPT', -} -iptables_add_service{ 'udp2log_accept_all_AMS': -service = 'all', -source = '91.198.174.0/24', -jump= 'ACCEPT', -} -iptables_add_service{ 'udp2log_accept_all_localhost': -service = 'all', -source = '127.0.0.1/32', -jump= 'ACCEPT', -} -} -class misc::udp2log::iptables_drops { -require misc::udp2log::iptables_accepts -# Rememeber to place modified or removed rules into purges! -iptables_add_service{ 'udp2log_drop_udp': -service = 'udp', -source = '0.0.0.0/0', -jump= 'DROP', +ferm::rule { 'udp2log_accept_all_localhost': +rule = 'saddr (127.0.0.1/32) proto tcp ACCEPT;', } -} -class misc::udp2log::iptables { -# only allow UDP packets from our IP space into these machines -# to prevent malicious information injections - -# We use the following requirement chain: -# iptables - iptables-drops - iptables-accepts - iptables-purges -# -# This ensures proper ordering of the rules -require misc::udp2log::iptables_drops -# This exec should always occur last in the requirement chain. -## creating iptables rules but not enabling them to test. -iptables_add_exec{ 'udp2log': -service = 'udp2log', -} -} -- To view, visit https://gerrit.wikimedia.org/r/169691 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5859dbce6da06a5e27da90859ad33a400fbb3912 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Matanya mata...@foss.co.il ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fixed fingerprintview QUnit tests - change (mediawiki...Wikibase)
Henning Snater has uploaded a new change for review. https://gerrit.wikimedia.org/r/169692 Change subject: Fixed fingerprintview QUnit tests .. Fixed fingerprintview QUnit tests Change-Id: I2692e27844d59034cbe2bbdf29a80d3a4dcce0f1 --- M lib/tests/qunit/jquery.wikibase/jquery.wikibase.entityview.tests.js M lib/tests/qunit/jquery.wikibase/jquery.wikibase.fingerprintview.tests.js 2 files changed, 89 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/92/169692/1 diff --git a/lib/tests/qunit/jquery.wikibase/jquery.wikibase.entityview.tests.js b/lib/tests/qunit/jquery.wikibase/jquery.wikibase.entityview.tests.js index 82f8ad4..00083f6 100644 --- a/lib/tests/qunit/jquery.wikibase/jquery.wikibase.entityview.tests.js +++ b/lib/tests/qunit/jquery.wikibase/jquery.wikibase.entityview.tests.js @@ -15,8 +15,14 @@ options = $.extend( { entityStore: 'i am an entity store', entityChangersFactory: { + getLabelsChanger: function() { + return 'i am a LabelsChanger'; + }, + getDescriptionsChanger: function() { + return 'i am a DescriptionsChanger'; + }, getAliasesChanger: function() { - return 'i am an alias changer'; + return 'i am an AliasesChanger'; } }, api: 'i am an api', diff --git a/lib/tests/qunit/jquery.wikibase/jquery.wikibase.fingerprintview.tests.js b/lib/tests/qunit/jquery.wikibase/jquery.wikibase.fingerprintview.tests.js index 8be0604..0db87e4 100644 --- a/lib/tests/qunit/jquery.wikibase/jquery.wikibase.fingerprintview.tests.js +++ b/lib/tests/qunit/jquery.wikibase/jquery.wikibase.fingerprintview.tests.js @@ -114,22 +114,93 @@ ); } ); - fingerprintview.startEditing(); + /** +* @param {Function} func +* @param {boolean} expectingEvent +* @return {jQuery.Promise} +*/ + function testEditModeChange( func, expectingEvent ) { + var deferred = $.Deferred(); - fingerprintview.startEditing(); // should not trigger event - fingerprintview.stopEditing( true ); - fingerprintview.stopEditing( true ); // should not trigger event - fingerprintview.stopEditing(); // should not trigger event - fingerprintview.startEditing(); + if( !expectingEvent ) { + func(); + return deferred.resolve().promise(); + } - fingerprintview.$label.find( 'input' ).val( '' ); + $fingerprintview + .one( 'fingerprintviewafterstartediting.fingerprintviewtest', function( event ) { + $fingerprintview.off( '.fingerprintviewtest' ); + deferred.resolve(); + } ) + .one( 'fingerprintviewafterstopediting.fingerprintviewtest', function( event, dropValue ) { + $fingerprintview.off( '.fingerprintviewtest' ); + deferred.resolve(); + } ); - fingerprintview.stopEditing(); - fingerprintview.startEditing(); + func(); - fingerprintview.$description.find( 'input' ).val( 'changed description' ); + return deferred.promise(); + } - fingerprintview.stopEditing(); + var $queue = $( {} ); + + /** +* @param {jQuery} $queue +* @param {Function} func +* @param {boolean} [expectingEvent] +*/ + function addToQueue( $queue, func, expectingEvent ) { + if( expectingEvent === undefined ) { + expectingEvent = true; + } + $queue.queue( 'tests', function( next ) { + QUnit.stop(); + testEditModeChange( func, expectingEvent ).always( function() { + QUnit.start(); + next(); + } ); + } ); + } + + addToQueue( $queue, function() { + fingerprintview.startEditing(); + } ); + + addToQueue( $queue, function() { + fingerprintview.startEditing(); + }, false ); + + addToQueue( $queue, function() { + fingerprintview.stopEditing( true ); + } ); + + addToQueue( $queue, function() { + fingerprintview.stopEditing( true ); + }, false ); + + addToQueue( $queue, function() { + fingerprintview.stopEditing(); + }, false ); + + addToQueue( $queue, function() { + fingerprintview.startEditing(); + } ); + +
[MediaWiki-commits] [Gerrit] Revert Stop using lsearchd pool 5 - change (operations/mediawiki-config)
Chad has uploaded a new change for review. https://gerrit.wikimedia.org/r/169693 Change subject: Revert Stop using lsearchd pool 5 .. Revert Stop using lsearchd pool 5 Breaks lsearchd on these wikis. This reverts commit 1df932f32747b5edabb083b46edf36f32e1d3d7c. Change-Id: I894c10a1aea358169542d3b44daaa158f0dd657a --- M wmf-config/lucene-production.php 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/93/169693/1 diff --git a/wmf-config/lucene-production.php b/wmf-config/lucene-production.php index 07fa4ca..b52fd09 100644 --- a/wmf-config/lucene-production.php +++ b/wmf-config/lucene-production.php @@ -19,6 +19,9 @@ } elseif ( in_array( $wgDBname, array( 'itwiki', 'ptwiki', 'plwiki', 'nlwiki', 'ruwiki', 'svwiki', 'zhwiki', 'eswiki' ) ) ) { # Pool 3 LVS $wgLuceneHost = '10.2.2.13'; # eqiad +} elseif ( in_array( $wgDBname, array( 'commonswiki', 'wikidatawiki', 'metawiki', 'enwiktionary' ) ) ) { + # Pool 5 LVS + $wgLuceneHost = '10.2.2.16'; # eqiad } else { # Pool 4 LVS $wgLuceneHost = '10.2.2.14'; # eqiad -- To view, visit https://gerrit.wikimedia.org/r/169693 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I894c10a1aea358169542d3b44daaa158f0dd657a Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Chad ch...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Revert Stop using lsearchd pool 5 - change (operations/mediawiki-config)
Chad has submitted this change and it was merged. Change subject: Revert Stop using lsearchd pool 5 .. Revert Stop using lsearchd pool 5 Breaks lsearchd on these wikis. This reverts commit 1df932f32747b5edabb083b46edf36f32e1d3d7c. Change-Id: I894c10a1aea358169542d3b44daaa158f0dd657a --- M wmf-config/lucene-production.php 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Chad: Verified; Looks good to me, approved diff --git a/wmf-config/lucene-production.php b/wmf-config/lucene-production.php index 07fa4ca..b52fd09 100644 --- a/wmf-config/lucene-production.php +++ b/wmf-config/lucene-production.php @@ -19,6 +19,9 @@ } elseif ( in_array( $wgDBname, array( 'itwiki', 'ptwiki', 'plwiki', 'nlwiki', 'ruwiki', 'svwiki', 'zhwiki', 'eswiki' ) ) ) { # Pool 3 LVS $wgLuceneHost = '10.2.2.13'; # eqiad +} elseif ( in_array( $wgDBname, array( 'commonswiki', 'wikidatawiki', 'metawiki', 'enwiktionary' ) ) ) { + # Pool 5 LVS + $wgLuceneHost = '10.2.2.16'; # eqiad } else { # Pool 4 LVS $wgLuceneHost = '10.2.2.14'; # eqiad -- To view, visit https://gerrit.wikimedia.org/r/169693 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I894c10a1aea358169542d3b44daaa158f0dd657a Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Chad ch...@wikimedia.org Gerrit-Reviewer: Chad ch...@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] New Wikidata Build - 2014/10/29 - change (mediawiki...Wikidata)
jenkins-bot has submitted this change and it was merged. Change subject: New Wikidata Build - 2014/10/29 .. New Wikidata Build - 2014/10/29 Change-Id: Iac727c34d59a9d44f4697ef2e550651b9fbef62d --- M WikibaseClient.settings.php M WikibaseRepo.settings.php M composer.lock M extensions/Wikibase/client/i18n/ru.json M extensions/Wikibase/client/resources/wikibase.client.getMwApiForRepo.js M extensions/Wikibase/client/resources/wikibase.client.linkitem.init.js M extensions/Wikibase/lib/i18n/ru.json M extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplabelscroll.js M extensions/Wikibase/lib/resources/jquery.wikibase/toolbar/jquery.wikibase.edittoolbar.js M extensions/Wikibase/lib/resources/jquery.wikibase/toolbar/jquery.wikibase.singlebuttontoolbar.js M extensions/Wikibase/lib/resources/jquery.wikibase/toolbar/themes/default/jquery.wikibase.toolbarbutton.css M extensions/Wikibase/repo/Wikibase.hooks.php M extensions/Wikibase/repo/i18n/ce.json M extensions/Wikibase/repo/i18n/ru.json M extensions/Wikibase/repo/i18n/sr-ec.json M extensions/Wikibase/repo/includes/actions/ViewEntityAction.php M extensions/Wikibase/repo/resources/wikibase.ui.entitysearch.js M vendor/autoload.php M vendor/composer/autoload_real.php M vendor/composer/installed.json M vendor/wikibase/data-model/WikibaseDataModel.php M vendor/wikibase/data-model/src/ReferenceList.php 22 files changed, 157 insertions(+), 120 deletions(-) Approvals: Tobias Gritschacher: Looks good to me, approved jenkins-bot: Verified diff --git a/WikibaseClient.settings.php b/WikibaseClient.settings.php index b561ba0..7dcc8a1 100644 --- a/WikibaseClient.settings.php +++ b/WikibaseClient.settings.php @@ -1,2 +1,2 @@ ?php -$wgWBClientSettings[sharedCacheKeyPrefix] = wikibase:WBL/1414492919; \ No newline at end of file +$wgWBClientSettings[sharedCacheKeyPrefix] = wikibase:WBL/1414575514; \ No newline at end of file diff --git a/WikibaseRepo.settings.php b/WikibaseRepo.settings.php index ed18688..89f4c63 100644 --- a/WikibaseRepo.settings.php +++ b/WikibaseRepo.settings.php @@ -1,2 +1,2 @@ ?php -$wgWBRepoSettings[sharedCacheKeyPrefix] = wikibase:WBL/1414492919; \ No newline at end of file +$wgWBRepoSettings[sharedCacheKeyPrefix] = wikibase:WBL/1414575514; \ No newline at end of file diff --git a/composer.lock b/composer.lock index a930553..815e914 100644 --- a/composer.lock +++ b/composer.lock @@ -891,16 +891,16 @@ }, { name: wikibase/data-model, -version: 2.1.0, +version: 2.1.1, source: { type: git, url: https://github.com/wmde/WikibaseDataModel.git;, -reference: b79f935ee553392d71e71e6274bf3e78e9e2d5ac +reference: ddb7d18bcd8ed835d3ebdfc20c7a22e0df4049e6 }, dist: { type: zip, -url: https://api.github.com/repos/wmde/WikibaseDataModel/zipball/b79f935ee553392d71e71e6274bf3e78e9e2d5ac;, -reference: b79f935ee553392d71e71e6274bf3e78e9e2d5ac, +url: https://api.github.com/repos/wmde/WikibaseDataModel/zipball/ddb7d18bcd8ed835d3ebdfc20c7a22e0df4049e6;, +reference: ddb7d18bcd8ed835d3ebdfc20c7a22e0df4049e6, shasum: }, require: { @@ -944,7 +944,7 @@ wikibase, wikidata ], -time: 2014-10-27 18:08:26 +time: 2014-10-28 13:04:15 }, { name: wikibase/data-model-javascript, @@ -1203,12 +1203,12 @@ source: { type: git, url: https://github.com/wikimedia/mediawiki-extensions-Wikibase.git;, -reference: e2b6bd9f9d53f67a37e26286419696ecbf59ef87 +reference: 0cbf92eb74ccde368ebcc53b9a5828ac2e336b7d }, dist: { type: zip, -url: https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/e2b6bd9f9d53f67a37e26286419696ecbf59ef87;, -reference: e2b6bd9f9d53f67a37e26286419696ecbf59ef87, +url: https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/0cbf92eb74ccde368ebcc53b9a5828ac2e336b7d;, +reference: 0cbf92eb74ccde368ebcc53b9a5828ac2e336b7d, shasum: }, require: { @@ -1274,7 +1274,7 @@ wikibaserepo, wikidata ], -time: 2014-10-28 10:36:53 +time: 2014-10-28 22:27:04 }, { name: wikibase/wikimedia-badges, diff --git a/extensions/Wikibase/client/i18n/ru.json b/extensions/Wikibase/client/i18n/ru.json index 97bc9f6..a318906 100644 --- a/extensions/Wikibase/client/i18n/ru.json +++ b/extensions/Wikibase/client/i18n/ru.json @@ -28,7 +28,7 @@
[MediaWiki-commits] [Gerrit] Add test for wikitext-html-wikitext roundtrip - change (mediawiki...Flow)
Matthias Mullie has uploaded a new change for review. https://gerrit.wikimedia.org/r/169695 Change subject: Add test for wikitext-html-wikitext roundtrip .. Add test for wikitext-html-wikitext roundtrip Change-Id: Iaaa450bab2c48e2c9a152c6d1e08ef0d25eb459b --- M includes/Parsoid/Utils.php M tests/phpunit/Parsoid/UtilsTest.php 2 files changed, 42 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/95/169695/1 diff --git a/includes/Parsoid/Utils.php b/includes/Parsoid/Utils.php index b36235b..08a550b 100644 --- a/includes/Parsoid/Utils.php +++ b/includes/Parsoid/Utils.php @@ -172,9 +172,9 @@ $wgVisualEditorParsoidURL, $wgVisualEditorParsoidPrefix, $wgVisualEditorParsoidTimeout; return array( - $wgFlowParsoidURL ? $wgFlowParsoidURL : $wgVisualEditorParsoidURL, - $wgFlowParsoidPrefix ? $wgFlowParsoidPrefix : $wgVisualEditorParsoidPrefix, - $wgFlowParsoidTimeout ? $wgFlowParsoidTimeout : $wgVisualEditorParsoidTimeout, + $wgFlowParsoidURL ?: $wgVisualEditorParsoidURL, + $wgFlowParsoidPrefix ?: $wgVisualEditorParsoidPrefix, + $wgFlowParsoidTimeout ?: $wgVisualEditorParsoidTimeout, ); } diff --git a/tests/phpunit/Parsoid/UtilsTest.php b/tests/phpunit/Parsoid/UtilsTest.php index 8a4e4a9..4b16e0a 100644 --- a/tests/phpunit/Parsoid/UtilsTest.php +++ b/tests/phpunit/Parsoid/UtilsTest.php @@ -70,4 +70,43 @@ $this-assertEquals( $expect, $result, $message ); } } + + static public function wikitextRoundtripProvider() { + return array( + array( + 'italic text', + // text expect + ''italic text'', + // title + Title::newMainPage(), + ), + array( + 'bold text', + // text expect + '''bold text''', + // title + Title::newMainPage(), + ), + ); + } + + /** +* Test full roundtrip (wikitext - html - wikitext) +* +* It doesn't make sense to test only a specific path, since Parsoid's HTML +* may change beyond our control it doesn't really matter to us what +* exactly the HTML looks like, as long as Parsoid is able to understand it. +* +* @dataProvider wikitextRoundtripProvider +*/ + public function testwikitextRoundtrip( $message, $expect, Title $title ) { + // Check for Parsoid + try { + $html = Utils::convert( 'wikitext', 'html', $expect, $title ); + $wikitext = Utils::convert( 'html', 'wikitext', $html, $title ); + $this-assertEquals( $expect, trim( $wikitext ), $message ); + } catch ( WikitextException $excep ) { + $this-markTestSkipped( 'Parsoid not enabled' ); + } + } } -- To view, visit https://gerrit.wikimedia.org/r/169695 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iaaa450bab2c48e2c9a152c6d1e08ef0d25eb459b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Matthias Mullie mmul...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Replace native range rectangle hacks with RangeFix library - change (VisualEditor/VisualEditor)
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/169696 Change subject: Replace native range rectangle hacks with RangeFix library .. Replace native range rectangle hacks with RangeFix library Change-Id: I7f6cb6cbdd2b4385fb8ca95c03795cbdd929a860 --- M .docs/eg-iframe.html M .jshintrc M build/modules.json M demos/ve/desktop.html M demos/ve/mobile.html A lib/rangefix/rangefix.js M src/ce/ve.ce.Surface.js M tests/index.html 8 files changed, 174 insertions(+), 81 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/96/169696/1 diff --git a/.docs/eg-iframe.html b/.docs/eg-iframe.html index a1caf86..484566b 100644 --- a/.docs/eg-iframe.html +++ b/.docs/eg-iframe.html @@ -95,6 +95,9 @@ !-- unicodejs -- script src=../lib/unicodejs/unicodejs.js/script + !-- rangefix -- + script src=../lib/rangefix/rangefix.js/script + !-- visualEditor.base.build -- script src=../src/ve.js/script script src=../src/ve.track.js/script diff --git a/.jshintrc b/.jshintrc index 88b70cd..d8ff63f 100644 --- a/.jshintrc +++ b/.jshintrc @@ -21,6 +21,7 @@ OO: false, QUnit: false, unicodeJS: false, + RangeFix: false, ve: false } } diff --git a/build/modules.json b/build/modules.json index 902118e..9f77435 100644 --- a/build/modules.json +++ b/build/modules.json @@ -62,6 +62,11 @@ lib/unicodejs/unicodejs.js ] }, + rangefix: { + scripts: [ + lib/rangefix/rangefix.js + ] + }, jquery.i18n: { scripts: [ lib/jquery.i18n/src/jquery.i18n.js, @@ -123,7 +128,8 @@ src/init/ve.init.Target.js ], dependencies: [ - unicodejs + unicodejs, + rangefix ] }, visualEditor.core: { diff --git a/demos/ve/desktop.html b/demos/ve/desktop.html index c2dbdbb..503b6aa 100644 --- a/demos/ve/desktop.html +++ b/demos/ve/desktop.html @@ -105,6 +105,9 @@ !-- unicodejs -- script src=../../lib/unicodejs/unicodejs.js/script + !-- rangefix -- + script src=../../lib/rangefix/rangefix.js/script + !-- visualEditor.base.build -- script src=../../src/ve.js/script script src=../../src/ve.debug.js/script diff --git a/demos/ve/mobile.html b/demos/ve/mobile.html index e2ddd95..b4c6f6f 100644 --- a/demos/ve/mobile.html +++ b/demos/ve/mobile.html @@ -106,6 +106,9 @@ !-- unicodejs -- script src=../../lib/unicodejs/unicodejs.js/script + !-- rangefix -- + script src=../../lib/rangefix/rangefix.js/script + !-- visualEditor.base.build -- script src=../../src/ve.js/script script src=../../src/ve.debug.js/script diff --git a/lib/rangefix/rangefix.js b/lib/rangefix/rangefix.js new file mode 100644 index 000..1b0c5fb --- /dev/null +++ b/lib/rangefix/rangefix.js @@ -0,0 +1,144 @@ +/*! + * RangeFix v0.1.0 + * https://github.com/edg2s/range-get-client-rects + * + * Copyright 2014 Ed Sanders. + * Released under the MIT license + */ +( function () { + + var isBroken, + rangeFix = {}; + + /** +* Check if the bug is present in the native function +* +* Constructs two lines of text and creates a range between them. +* Broken browsers will return three rectangles instead of two. +* +* @private +* @return {booean} The bug is present +*/ + function isGetClientRectsBroken() { + if ( isBroken === undefined ) { + var p1 = document.createElement( 'p' ), + p2 = document.createElement( 'p' ), + t1 = document.createTextNode( 'aa' ), + t2 = document.createTextNode( 'aa' ), + range = document.createRange(); + + p1.appendChild( t1 ); + p2.appendChild( t2 ); + + document.body.appendChild( p1 ); + document.body.appendChild( p2 ); + + range.setStart( t1, 1 ); + range.setEnd( t2, 1 ); + isBroken = range.getClientRects().length 2; + + document.body.removeChild( p1 ); + document.body.removeChild( p2 ); + } + return isBroken; + } + + /** +* Get client rectangles from a
[MediaWiki-commits] [Gerrit] Display a placeholder text when author and source are missing - change (mediawiki...MultimediaViewer)
Gergő Tisza has uploaded a new change for review. https://gerrit.wikimedia.org/r/169697 Change subject: Display a placeholder text when author and source are missing .. Display a placeholder text when author and source are missing Change-Id: I38478956c5a0b5f204e5caa43e54db651f297887 --- M MultimediaViewer.php M i18n/en.json M i18n/qqq.json M resources/mmv/ui/mmv.ui.metadataPanel.js M tests/qunit/mmv/ui/mmv.ui.metadataPanel.test.js 5 files changed, 35 insertions(+), 40 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MultimediaViewer refs/changes/97/169697/1 diff --git a/MultimediaViewer.php b/MultimediaViewer.php index 0d200ac..5822e44 100644 --- a/MultimediaViewer.php +++ b/MultimediaViewer.php @@ -554,6 +554,7 @@ 'multimediaviewer-commons-subtitle', 'multimediaviewer-credit', + 'multimediaviewer-credit-fallback', 'multimediaviewer-userpage-link', diff --git a/i18n/en.json b/i18n/en.json index 7343d81..3b97c13 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -15,6 +15,7 @@ multimediaviewer-datetime-uploaded: Uploaded: $1, multimediaviewer-userpage-link: {{GENDER:$2|Uploaded}} by $1, multimediaviewer-credit: $1 - $2, + multimediaviewer-credit-fallback: View author information, multimediaviewer-metadata-error: Error: Could not load image data. $1, multimediaviewer-thumbnail-error: Error: Could not load thumbnail data. $1, multimediaviewer-license-cc-by-1.0: CC BY 1.0, diff --git a/i18n/qqq.json b/i18n/qqq.json index 119fc1c..00645d9 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -20,7 +20,8 @@ multimediaviewer-datetime-created: Used in JavaScript code. Parameters:\n* $1 - time and date\nSee also:\n* {{msg-mw|Multimediaviewer-datetime-uploaded}}\n\nNote that the date comes from the description page and can have various forms (e.g. \2000-01-01\, \1st January 2000\, \1492\, \16th century\...)\n\nAlso, this might refer to the date when the picture was taken, or the date when the depcited work was made - the usage is not consistent. You should choose a translation that works in all cases.\n{{Identical|Created}}, multimediaviewer-datetime-uploaded: Used in JavaScript code. Parameters:\n* $1 - time and date (formatted)\nSee also:\n* {{msg-mw|Multimediaviewer-datetime-created}}\n{{Identical|Uploaded}}, multimediaviewer-userpage-link: Link to the user page for the uploader of the image.\n\nUsed in JavaScript code.\n\nParameters:\n* $1 - the username of the uploader\n* $2 - their gender, - multimediaviewer-credit: Credit line for images. Parameters:\n* $1 - HTML describing the author\n* $2 - HTML describing the source\n\nNeither parameters are usernames, so GENDER is useless. Both come directly from the API, the extended metadata imageinfo prop in particular.\n\nThey will usually be derived from the HTML output from wikitext on a file description page - however, no complicated HTML, only links, will be allowed., + multimediaviewer-credit: Credit line for images. Parameters:\n* $1 - HTML describing the author\n* $2 - HTML describing the source\n\nNeither parameters are usernames, so GENDER is useless. Both come directly from the API, the extended metadata imageinfo prop in particular.\n\nThey will usually be derived from the HTML output from wikitext on a file description page - however, no complicated HTML, only links, will be allowed.\n\nSee also {{msg-mw|multimediaviewer-credit-fallback}}, + multimediaviewer-credit-fallback: Text shown in place of the credit line ({{msg-mw|multimediaviewer-credit}}) when neither author nor source information is available., multimediaviewer-metadata-error: Text shown when the information on the metadata panel could not be loaded.\n\nParameters:\n* $1 - the error message (not localized)\nSee also:\n* {{msg-mw|Multimediaviewer-thumbnail-error}}, multimediaviewer-thumbnail-error: Text shown when the image could not be loaded. Parameters:\n* $1 - the error message (not localized)\nSee also:\n* {{msg-mw|Multimediaviewer-metadata-error}}, multimediaviewer-license-cc-by-1.0: Very short label for the Creative Commons Attribution license, version 1.0, used in a link to the file information page that has more licensing information.\n{{Identical|CC BY}}, diff --git a/resources/mmv/ui/mmv.ui.metadataPanel.js b/resources/mmv/ui/mmv.ui.metadataPanel.js index 69b5c4a..0ace677 100644 --- a/resources/mmv/ui/mmv.ui.metadataPanel.js +++ b/resources/mmv/ui/mmv.ui.metadataPanel.js @@ -406,60 +406,58 @@ }; /** -* Bignasty function for setting source and author. Both #setAuthor and -* #setSource use this with some shortcuts. +* Set source and author. * @param {string} source With unsafe HTML
[MediaWiki-commits] [Gerrit] Fix optout graph description - change (analytics...config)
Gergő Tisza has uploaded a new change for review. https://gerrit.wikimedia.org/r/169698 Change subject: Fix optout graph description .. Fix optout graph description Typo fix + warn about different semantics on Commons. Change-Id: I737aaee479f312b427dd6b7737c5eddbcbac5038 --- M graphs/mmv_optout_template.json 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/multimedia/config refs/changes/98/169698/1 diff --git a/graphs/mmv_optout_template.json b/graphs/mmv_optout_template.json index 2ca818e..78f5798 100644 --- a/graphs/mmv_optout_template.json +++ b/graphs/mmv_optout_template.json @@ -1,7 +1,7 @@ { graph_version: 0.6.0, id: mmv_optout_%wiki%, -desc: Tracking how many people have opted out of Media Vieweron %wiki%.brblogged-in/b users who have made a login or change in the last 30 daysbrbactive/b users who made 5+ edits in the last 30 days, +desc: Tracking how many people have opted out of Media Viewer on %wiki%.br(On Commons the graph shows the number of people who opted in.)brblogged-in/b users who have made a login or change in the last 30 daysbrbactive/b users who made 5+ edits in the last 30 days, name: Optout, slug: mmv_optout_%wiki%, root: { -- To view, visit https://gerrit.wikimedia.org/r/169698 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I737aaee479f312b427dd6b7737c5eddbcbac5038 Gerrit-PatchSet: 1 Gerrit-Project: analytics/multimedia/config Gerrit-Branch: master Gerrit-Owner: Gergő Tisza gti...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Change ActionBar search text every time a Did you mean que... - change (apps...wikipedia)
Dbrant has submitted this change and it was merged. Change subject: Change ActionBar search text every time a Did you mean query is run. .. Change ActionBar search text every time a Did you mean query is run. When the full text search API thinks you've made a typo, it returns a Did you mean result, which is a suggestion for a new search. When you tap on that result in the app, it runs a new full text search query with that term. This patch makes it so that when such a Did you mean query is run, the text in the search box is updated so that it matches the query that's run, so that it's clearer to the user how the results match the query that was initiated. Change-Id: Ib1195b9649e01c46425f1e86523559235c108902 --- M wikipedia/src/main/java/org/wikipedia/search/FullSearchFragment.java M wikipedia/src/main/java/org/wikipedia/search/SearchArticlesFragment.java 2 files changed, 12 insertions(+), 2 deletions(-) Approvals: Dbrant: Looks good to me, approved diff --git a/wikipedia/src/main/java/org/wikipedia/search/FullSearchFragment.java b/wikipedia/src/main/java/org/wikipedia/search/FullSearchFragment.java index bad1e87..ac3d088 100644 --- a/wikipedia/src/main/java/org/wikipedia/search/FullSearchFragment.java +++ b/wikipedia/src/main/java/org/wikipedia/search/FullSearchFragment.java @@ -89,8 +89,10 @@ searchSuggestion.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { -if (searchSuggestion.getTag() != null) { -startSearch((String) searchSuggestion.getTag(), true); +String suggestion = (String) searchSuggestion.getTag(); +if (suggestion != null) { +searchFragment.setSearchText(suggestion); +startSearch(suggestion, true); } } }); diff --git a/wikipedia/src/main/java/org/wikipedia/search/SearchArticlesFragment.java b/wikipedia/src/main/java/org/wikipedia/search/SearchArticlesFragment.java index 1fcf766..ce16dfa 100644 --- a/wikipedia/src/main/java/org/wikipedia/search/SearchArticlesFragment.java +++ b/wikipedia/src/main/java/org/wikipedia/search/SearchArticlesFragment.java @@ -188,6 +188,14 @@ } /** + * Changes the search text box to contain a different string. + * @param text The text you want to make the search box display. + */ +public void setSearchText(String text) { +searchView.setQuery(text, false); +} + +/** * Show a particular panel, which can be one of: * - PANEL_RECENT_SEARCHES * - PANEL_TITLE_SEARCH -- To view, visit https://gerrit.wikimedia.org/r/169319 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib1195b9649e01c46425f1e86523559235c108902 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: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] New deployment build - wmf/1.25wmf6 - change (mediawiki...Wikidata)
jenkins-bot has submitted this change and it was merged. Change subject: New deployment build - wmf/1.25wmf6 .. New deployment build - wmf/1.25wmf6 Change-Id: I1f1059557bce80330959d67cb4a2eccc04345233 --- M WikibaseClient.settings.php M WikibaseRepo.settings.php M composer.json M composer.lock M extensions/Wikibase/client/i18n/ace.json M extensions/Wikibase/client/i18n/af.json M extensions/Wikibase/client/i18n/be-tarask.json M extensions/Wikibase/client/i18n/bs.json M extensions/Wikibase/client/i18n/ce.json M extensions/Wikibase/client/i18n/de.json M extensions/Wikibase/client/i18n/dsb.json M extensions/Wikibase/client/i18n/eo.json M extensions/Wikibase/client/i18n/hsb.json M extensions/Wikibase/client/i18n/ia.json M extensions/Wikibase/client/i18n/ko.json M extensions/Wikibase/client/i18n/min.json M extensions/Wikibase/client/i18n/mr.json M extensions/Wikibase/client/i18n/nn.json M extensions/Wikibase/client/i18n/pms.json M extensions/Wikibase/client/i18n/pt-br.json M extensions/Wikibase/client/i18n/ru.json M extensions/Wikibase/client/i18n/vec.json M extensions/Wikibase/client/includes/ChangeHandler.php M extensions/Wikibase/client/includes/DataAccess/PropertyParserFunction/LanguageAwareRenderer.php M extensions/Wikibase/client/includes/DataAccess/PropertyParserFunction/RendererFactory.php M extensions/Wikibase/client/includes/DataAccess/PropertyParserFunction/Runner.php M extensions/Wikibase/client/includes/DataAccess/PropertyParserFunction/VariantsAwareRenderer.php M extensions/Wikibase/client/includes/LangLinkHandler.php A extensions/Wikibase/client/includes/Usage/HashUsageAccumulator.php A extensions/Wikibase/client/includes/Usage/ParserOutputUsageAccumulator.php M extensions/Wikibase/client/includes/Usage/Sql/SqlUsageTracker.php M extensions/Wikibase/client/includes/Usage/Sql/UsageTableUpdater.php A extensions/Wikibase/client/includes/Usage/UsageAccumulator.php M extensions/Wikibase/client/includes/WikibaseClient.php M extensions/Wikibase/client/includes/store/ClientStore.php M extensions/Wikibase/client/includes/store/sql/DirectSqlStore.php M extensions/Wikibase/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js M extensions/Wikibase/client/tests/phpunit/includes/DataAccess/PropertyParserFunction/LanguageAwareRendererTest.php M extensions/Wikibase/client/tests/phpunit/includes/DataAccess/PropertyParserFunction/RendererFactoryTest.php M extensions/Wikibase/client/tests/phpunit/includes/DataAccess/PropertyParserFunction/RunnerTest.php M extensions/Wikibase/client/tests/phpunit/includes/DataAccess/PropertyParserFunction/VariantsAwareRendererTest.php M extensions/Wikibase/client/tests/phpunit/includes/LangLinkHandlerTest.php A extensions/Wikibase/client/tests/phpunit/includes/Usage/HashUsageAccumulatorTest.php A extensions/Wikibase/client/tests/phpunit/includes/Usage/ParserOutputUsageAccumulatorTest.php A extensions/Wikibase/client/tests/phpunit/includes/Usage/UsageAccumulatorContractTester.php M extensions/Wikibase/client/tests/phpunit/includes/hooks/SidebarHookHandlersTest.php M extensions/Wikibase/lib/i18n/af.json M extensions/Wikibase/lib/i18n/ar.json M extensions/Wikibase/lib/i18n/be.json M extensions/Wikibase/lib/i18n/bg.json M extensions/Wikibase/lib/i18n/ca.json M extensions/Wikibase/lib/i18n/de.json M extensions/Wikibase/lib/i18n/dsb.json M extensions/Wikibase/lib/i18n/gu.json M extensions/Wikibase/lib/i18n/hr.json M extensions/Wikibase/lib/i18n/hsb.json M extensions/Wikibase/lib/i18n/hu.json M extensions/Wikibase/lib/i18n/id.json M extensions/Wikibase/lib/i18n/ksh.json A extensions/Wikibase/lib/i18n/min.json M extensions/Wikibase/lib/i18n/pt-br.json M extensions/Wikibase/lib/i18n/pt.json M extensions/Wikibase/lib/i18n/ru.json A extensions/Wikibase/lib/i18n/sh.json M extensions/Wikibase/lib/i18n/vec.json M extensions/Wikibase/lib/includes/formatters/WikibaseValueFormatterBuilders.php M extensions/Wikibase/lib/includes/store/EntityStore.php A extensions/Wikibase/lib/includes/store/LabelConflictFinder.php D extensions/Wikibase/lib/includes/store/TermCombinationMatchFinder.php M extensions/Wikibase/lib/includes/store/TermIndex.php M extensions/Wikibase/lib/includes/store/sql/TermSqlIndex.php M extensions/Wikibase/lib/includes/store/sql/WikiPageEntityRevisionLookup.php M extensions/Wikibase/lib/resources/Resources.php A extensions/Wikibase/lib/resources/entityChangers/AliasesChanger.js A extensions/Wikibase/lib/resources/entityChangers/ClaimsChanger.js A extensions/Wikibase/lib/resources/entityChangers/DescriptionsChanger.js A extensions/Wikibase/lib/resources/entityChangers/EntityChangersFactory.js A extensions/Wikibase/lib/resources/entityChangers/LabelsChanger.js A extensions/Wikibase/lib/resources/entityChangers/ReferencesChanger.js A extensions/Wikibase/lib/resources/entityChangers/SiteLinksChanger.js A extensions/Wikibase/lib/resources/entityChangers/namespace.js A
[MediaWiki-commits] [Gerrit] Fix broken option in jquery.wikibase.linkitem.js - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Fix broken option in jquery.wikibase.linkitem.js .. Fix broken option in jquery.wikibase.linkitem.js This mistake was introduced in Ibae5bfc. It makes the client widget unusable. Please backport this fix since it is on the live site as far as I can tell. Change-Id: Ia12eda93408a5d4a0f0efa2dcc45b3fbbdd51446 (cherry picked from commit b86b417aa6969d927056fc30409abd6cf748e8b5) --- M client/resources/jquery.wikibase/jquery.wikibase.linkitem.js 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Aude: Looks good to me, approved jenkins-bot: Verified diff --git a/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js b/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js index 008d35b..bb9c37e 100644 --- a/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js +++ b/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js @@ -347,7 +347,7 @@ this.targetArticle = $( '#wbclient-linkItem-page' ).val(); this._pageConnector = new wb.PageConnector( - new wb.RepoApi( this._mwApiForRepo ), + new wb.RepoApi( this.options.mwApiForRepo ), this.options.globalSiteId, this.options.pageTitle, this.targetSite, -- To view, visit https://gerrit.wikimedia.org/r/169687 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia12eda93408a5d4a0f0efa2dcc45b3fbbdd51446 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: wmf/1.25wmf6 Gerrit-Owner: Aude aude.w...@gmail.com Gerrit-Reviewer: Aude aude.w...@gmail.com Gerrit-Reviewer: Hoo man h...@online.de Gerrit-Reviewer: Thiemo Mättig (WMDE) thiemo.maet...@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] Fix broken option in jquery.wikibase.linkitem.js - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Fix broken option in jquery.wikibase.linkitem.js .. Fix broken option in jquery.wikibase.linkitem.js This mistake was introduced in Ibae5bfc. It makes the client widget unusable. Please backport this fix since it is on the live site as far as I can tell. Change-Id: Ia12eda93408a5d4a0f0efa2dcc45b3fbbdd51446 (cherry picked from commit b86b417aa6969d927056fc30409abd6cf748e8b5) --- M client/resources/jquery.wikibase/jquery.wikibase.linkitem.js 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Aude: Looks good to me, approved jenkins-bot: Verified diff --git a/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js b/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js index 39b5aeb..8dc128c 100644 --- a/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js +++ b/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js @@ -347,7 +347,7 @@ this.targetArticle = $( '#wbclient-linkItem-page' ).val(); this._pageConnector = new wb.PageConnector( - new wb.RepoApi( this._mwApiForRepo ), + new wb.RepoApi( this.options.mwApiForRepo ), this.options.globalSiteId, this.options.pageTitle, this.targetSite, -- To view, visit https://gerrit.wikimedia.org/r/169686 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia12eda93408a5d4a0f0efa2dcc45b3fbbdd51446 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: wmf/1.25wmf5 Gerrit-Owner: Aude aude.w...@gmail.com Gerrit-Reviewer: Aude aude.w...@gmail.com Gerrit-Reviewer: Hoo man h...@online.de Gerrit-Reviewer: Thiemo Mättig (WMDE) thiemo.maet...@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] Update Wikidata, fix add links widget js error - change (mediawiki...Wikidata)
Aude has uploaded a new change for review. https://gerrit.wikimedia.org/r/169699 Change subject: Update Wikidata, fix add links widget js error .. Update Wikidata, fix add links widget js error Change-Id: I9f9bea05dc0106d8cd0dabc75058210aff8e28ee --- M composer.lock M extensions/Wikibase/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js M vendor/composer/installed.json 3 files changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikidata refs/changes/99/169699/1 diff --git a/composer.lock b/composer.lock index ef1a53f..7c4677f 100644 --- a/composer.lock +++ b/composer.lock @@ -1205,7 +1205,7 @@ source: { type: git, url: https://git.wikimedia.org/git/mediawiki/extensions/Wikibase.git;, -reference: 0cbf92eb74ccde368ebcc53b9a5828ac2e336b7d +reference: a26ed1827d63aef79bd9c12b172b33437e2d194d }, require: { data-values/common: ~0.2.0, @@ -1273,7 +1273,7 @@ issues: https://bugzilla.wikimedia.org/;, irc: irc://irc.freenode.net/wikidata }, -time: 2014-10-28 22:27:04 +time: 2014-10-29 12:42:25 }, { name: wikibase/wikimedia-badges, diff --git a/extensions/Wikibase/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js b/extensions/Wikibase/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js index 008d35b..bb9c37e 100644 --- a/extensions/Wikibase/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js +++ b/extensions/Wikibase/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js @@ -347,7 +347,7 @@ this.targetArticle = $( '#wbclient-linkItem-page' ).val(); this._pageConnector = new wb.PageConnector( - new wb.RepoApi( this._mwApiForRepo ), + new wb.RepoApi( this.options.mwApiForRepo ), this.options.globalSiteId, this.options.pageTitle, this.targetSite, diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index b288ac2..276a290 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -1295,7 +1295,7 @@ source: { type: git, url: https://git.wikimedia.org/git/mediawiki/extensions/Wikibase.git;, -reference: 0cbf92eb74ccde368ebcc53b9a5828ac2e336b7d +reference: a26ed1827d63aef79bd9c12b172b33437e2d194d }, require: { data-values/common: ~0.2.0, @@ -1321,7 +1321,7 @@ conflict: { mediawiki/mediawiki: 1.23 }, -time: 2014-10-28 22:21:47, +time: 2014-10-29 12:01:16, type: mediawiki-extension, installation-source: source, autoload: { -- To view, visit https://gerrit.wikimedia.org/r/169699 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9f9bea05dc0106d8cd0dabc75058210aff8e28ee Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikidata Gerrit-Branch: wmf/1.25wmf6 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] Update Wikidata, fix add links widget js error - change (mediawiki...Wikidata)
Aude has uploaded a new change for review. https://gerrit.wikimedia.org/r/169700 Change subject: Update Wikidata, fix add links widget js error .. Update Wikidata, fix add links widget js error Change-Id: I4adb242d7d33eb0c41eeeac19e3eb298e0fddc3b --- M composer.lock M extensions/Wikibase/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js M vendor/composer/installed.json 3 files changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikidata refs/changes/00/169700/1 diff --git a/composer.lock b/composer.lock index 922be13..92be443 100644 --- a/composer.lock +++ b/composer.lock @@ -1205,7 +1205,7 @@ source: { type: git, url: https://git.wikimedia.org/git/mediawiki/extensions/Wikibase.git;, -reference: 85c64994ab955a2488e25261c5e658e71db4434c +reference: f0a82e930fb41345e2a683f5b456112fa61bd686 }, require: { data-values/common: ~0.2.0, @@ -1273,7 +1273,7 @@ issues: https://bugzilla.wikimedia.org/;, irc: irc://irc.freenode.net/wikidata }, -time: 2014-10-28 22:53:07 +time: 2014-10-29 12:42:12 }, { name: wikibase/wikimedia-badges, diff --git a/extensions/Wikibase/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js b/extensions/Wikibase/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js index 39b5aeb..8dc128c 100644 --- a/extensions/Wikibase/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js +++ b/extensions/Wikibase/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js @@ -347,7 +347,7 @@ this.targetArticle = $( '#wbclient-linkItem-page' ).val(); this._pageConnector = new wb.PageConnector( - new wb.RepoApi( this._mwApiForRepo ), + new wb.RepoApi( this.options.mwApiForRepo ), this.options.globalSiteId, this.options.pageTitle, this.targetSite, diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 3c365ab..85735ac 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -1295,7 +1295,7 @@ source: { type: git, url: https://git.wikimedia.org/git/mediawiki/extensions/Wikibase.git;, -reference: 85c64994ab955a2488e25261c5e658e71db4434c +reference: f0a82e930fb41345e2a683f5b456112fa61bd686 }, require: { data-values/common: ~0.2.0, @@ -1321,7 +1321,7 @@ conflict: { mediawiki/mediawiki: 1.23 }, -time: 2014-10-28 22:21:47, +time: 2014-10-29 12:01:16, type: mediawiki-extension, installation-source: source, autoload: { -- To view, visit https://gerrit.wikimedia.org/r/169700 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4adb242d7d33eb0c41eeeac19e3eb298e0fddc3b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikidata Gerrit-Branch: wmf/1.25wmf5 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] Doc fix - change (mediawiki...CirrusSearch)
Manybubbles has uploaded a new change for review. https://gerrit.wikimedia.org/r/169701 Change subject: Doc fix .. Doc fix Change-Id: Ifc7d232f85bcd553ed3a34eb5d86e0adb75ed71f --- M CirrusSearch.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch refs/changes/01/169701/1 diff --git a/CirrusSearch.php b/CirrusSearch.php index 9a37d36..6c21cb9 100644 --- a/CirrusSearch.php +++ b/CirrusSearch.php @@ -310,7 +310,7 @@ // Default number of days it takes the portion of an article's score that decays with time since // last update to half way decay to use if prefer-recent: prefixes query and doesn't specify a -// half life or $wgCirrusSearchPreferRecentDefaultDecayPortion is non 0. Default to 157 because +// half life or $wgCirrusSearchPreferRecentDefaultDecayPortion is non 0. Default to 160 because // that approximates the behavior that wikinews has been using for years. $wgCirrusSearchPreferRecentDefaultHalfLife = 160; -- To view, visit https://gerrit.wikimedia.org/r/169701 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifc7d232f85bcd553ed3a34eb5d86e0adb75ed71f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CirrusSearch 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] Update Wikidata, fix add links widget js error - change (mediawiki...Wikidata)
jenkins-bot has submitted this change and it was merged. Change subject: Update Wikidata, fix add links widget js error .. Update Wikidata, fix add links widget js error Change-Id: I9f9bea05dc0106d8cd0dabc75058210aff8e28ee --- M composer.lock M extensions/Wikibase/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js M vendor/composer/installed.json 3 files changed, 5 insertions(+), 5 deletions(-) Approvals: Aude: Looks good to me, approved jenkins-bot: Verified diff --git a/composer.lock b/composer.lock index ef1a53f..7c4677f 100644 --- a/composer.lock +++ b/composer.lock @@ -1205,7 +1205,7 @@ source: { type: git, url: https://git.wikimedia.org/git/mediawiki/extensions/Wikibase.git;, -reference: 0cbf92eb74ccde368ebcc53b9a5828ac2e336b7d +reference: a26ed1827d63aef79bd9c12b172b33437e2d194d }, require: { data-values/common: ~0.2.0, @@ -1273,7 +1273,7 @@ issues: https://bugzilla.wikimedia.org/;, irc: irc://irc.freenode.net/wikidata }, -time: 2014-10-28 22:27:04 +time: 2014-10-29 12:42:25 }, { name: wikibase/wikimedia-badges, diff --git a/extensions/Wikibase/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js b/extensions/Wikibase/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js index 008d35b..bb9c37e 100644 --- a/extensions/Wikibase/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js +++ b/extensions/Wikibase/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js @@ -347,7 +347,7 @@ this.targetArticle = $( '#wbclient-linkItem-page' ).val(); this._pageConnector = new wb.PageConnector( - new wb.RepoApi( this._mwApiForRepo ), + new wb.RepoApi( this.options.mwApiForRepo ), this.options.globalSiteId, this.options.pageTitle, this.targetSite, diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index b288ac2..276a290 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -1295,7 +1295,7 @@ source: { type: git, url: https://git.wikimedia.org/git/mediawiki/extensions/Wikibase.git;, -reference: 0cbf92eb74ccde368ebcc53b9a5828ac2e336b7d +reference: a26ed1827d63aef79bd9c12b172b33437e2d194d }, require: { data-values/common: ~0.2.0, @@ -1321,7 +1321,7 @@ conflict: { mediawiki/mediawiki: 1.23 }, -time: 2014-10-28 22:21:47, +time: 2014-10-29 12:01:16, type: mediawiki-extension, installation-source: source, autoload: { -- To view, visit https://gerrit.wikimedia.org/r/169699 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9f9bea05dc0106d8cd0dabc75058210aff8e28ee Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikidata Gerrit-Branch: wmf/1.25wmf6 Gerrit-Owner: Aude aude.w...@gmail.com Gerrit-Reviewer: Addshore addshorew...@gmail.com Gerrit-Reviewer: Aude aude.w...@gmail.com Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@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] Update Wikidata branch - change (mediawiki...release)
Aude has uploaded a new change for review. https://gerrit.wikimedia.org/r/169702 Change subject: Update Wikidata branch .. Update Wikidata branch Change-Id: I7514d1e1b4ce1176f4cb2d56b289d08c01da8a9d --- M make-wmf-branch/default.conf 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release refs/changes/02/169702/1 diff --git a/make-wmf-branch/default.conf b/make-wmf-branch/default.conf index 2aaddec..ff7b49a 100644 --- a/make-wmf-branch/default.conf +++ b/make-wmf-branch/default.conf @@ -176,7 +176,7 @@ 'DonationInterface' = 'deployment', // to use instead of the above - 'Wikidata' = 'wmf/1.25wmf5', + 'Wikidata' = 'wmf/1.25wmf6', // For wikitech use only! 'SemanticMediaWiki' = '1.8.x', -- To view, visit https://gerrit.wikimedia.org/r/169702 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7514d1e1b4ce1176f4cb2d56b289d08c01da8a9d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/tools/release 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] Require 2 ACKs from kafka brokers per default - change (operations/puppet)
Ottomata has submitted this change and it was merged. Change subject: Require 2 ACKs from kafka brokers per default .. Require 2 ACKs from kafka brokers per default We already required 2 ACKs from kafka brokers for bits, mobile, and text. Since that did not cause issues, we now require 2 ACKs per default, and thereby also require 2 ACKs for upload. Bug: 69667 Change-Id: I72acc4afd3f9699d101db18fa8e0e29ca49ed2ab --- M manifests/role/cache.pp 1 file changed, 4 insertions(+), 25 deletions(-) Approvals: Ottomata: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp index 4a65e55..55b406f 100644 --- a/manifests/role/cache.pp +++ b/manifests/role/cache.pp @@ -507,30 +507,6 @@ priority = 70, } -# The default of 1 ACK per batch causes issues (i.e.: -# missing messages) when a broker drops out of its leader -# role. Previous tests showed that requiring of 2 ACKs per -# batch solved the issue in 4 of 4 instances. So it seems -# 2 ACKs are sufficient, and we don't need to require ACKs -# of all ISR machines. -# -# While the expected increase in network traffic should -# not affect network performance, we're only slowly -# ramping up the number of machines that request more -# ACKs. -# -# For now, it's only bits, mobile, and text. -# That's roughly 55% of requests and covers the production -# use of the Analytics cluster. -# Upload cache cluster will follow, if this works well. -$topic_request_required_acks = $topic ? { -'webrequest_bits' = '2', -'webrequest_mobile' = '2', -'webrequest_text' = '2', -default = '1', -} - - class { '::varnishkafka': brokers = $kafka_brokers, topic= $topic, @@ -550,7 +526,10 @@ batch_num_messages = 6000, # large timeout to account for potential cross DC latencies topic_request_timeout_ms = 3, # request ack timeout -topic_request_required_acks = $topic_request_required_acks, +# By requiring 2 ACKs per message batch, we survive a +# single broker dropping out of its leader role, +# without seeing lost messages. +topic_request_required_acks = '2', # Write out stats to varnishkafka.stats.json # this often. This is set at 15 so that # stats will be fresh when polled from gmetad. -- To view, visit https://gerrit.wikimedia.org/r/167553 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I72acc4afd3f9699d101db18fa8e0e29ca49ed2ab Gerrit-PatchSet: 3 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: QChris christ...@quelltextlich.at Gerrit-Reviewer: Gage jger...@wikimedia.org Gerrit-Reviewer: Ottomata o...@wikimedia.org Gerrit-Reviewer: QChris christ...@quelltextlich.at Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Changing dhcpd entries for elastic1017-19 - change (operations/puppet)
Cmjohnson has uploaded a new change for review. https://gerrit.wikimedia.org/r/169704 Change subject: Changing dhcpd entries for elastic1017-19 .. Changing dhcpd entries for elastic1017-19 Change-Id: Iec766c5e2af524e3f7ed1aa61b4ea1d196a1f9e1 --- M modules/install-server/files/dhcpd/linux-host-entries.ttyS1-115200 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/04/169704/1 diff --git a/modules/install-server/files/dhcpd/linux-host-entries.ttyS1-115200 b/modules/install-server/files/dhcpd/linux-host-entries.ttyS1-115200 index 6e09397..8220c20 100644 --- a/modules/install-server/files/dhcpd/linux-host-entries.ttyS1-115200 +++ b/modules/install-server/files/dhcpd/linux-host-entries.ttyS1-115200 @@ -1432,17 +1432,17 @@ } host elastic1017 { - hardware ethernet 90:B1:1C:23:23:BF; + hardware ethernet B0:83:FE:C0:B0:D2; fixed-address elastic1017.eqiad.wmnet; } host elastic1018 { - hardware ethernet 90:B1:1C:1D:E7:E5; + hardware ethernet B0:83:FE:BE:E6:93; fixed-address elastic1018.eqiad.wmnet; } host elastic1019 { - hardware ethernet 90:B1:1C:23:36:1D; + hardware ethernet B0:83:FE:C0:9C:24; fixed-address elastic1019.eqiad.wmnet; } -- To view, visit https://gerrit.wikimedia.org/r/169704 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iec766c5e2af524e3f7ed1aa61b4ea1d196a1f9e1 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Cmjohnson cmjohn...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Only show comment when section exists - change (operations/puppet)
Chad has uploaded a new change for review. https://gerrit.wikimedia.org/r/169703 Change subject: Only show comment when section exists .. Only show comment when section exists Change-Id: I4edd85cbb6fb8f12e216bfa5213529043e067859 --- M modules/elasticsearch/templates/elasticsearch.yml.erb 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/03/169703/1 diff --git a/modules/elasticsearch/templates/elasticsearch.yml.erb b/modules/elasticsearch/templates/elasticsearch.yml.erb index 0d3e4a2..33b2047 100644 --- a/modules/elasticsearch/templates/elasticsearch.yml.erb +++ b/modules/elasticsearch/templates/elasticsearch.yml.erb @@ -553,10 +553,10 @@ - org.apache.lucene.util.automaton.RegExp - org.apache.lucene.util.automaton.CharacterRunAutomaton +% if @statsd_host -% ## # Statsd plugin configuration ## -% if @statsd_host -% metrics.statsd.host: %= @statsd_host % % end -% -- To view, visit https://gerrit.wikimedia.org/r/169703 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4edd85cbb6fb8f12e216bfa5213529043e067859 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Chad ch...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Doc fix - change (mediawiki...CirrusSearch)
jenkins-bot has submitted this change and it was merged. Change subject: Doc fix .. Doc fix Change-Id: Ifc7d232f85bcd553ed3a34eb5d86e0adb75ed71f --- M CirrusSearch.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Chad: Looks good to me, approved jenkins-bot: Verified diff --git a/CirrusSearch.php b/CirrusSearch.php index 9a37d36..6c21cb9 100644 --- a/CirrusSearch.php +++ b/CirrusSearch.php @@ -310,7 +310,7 @@ // Default number of days it takes the portion of an article's score that decays with time since // last update to half way decay to use if prefer-recent: prefixes query and doesn't specify a -// half life or $wgCirrusSearchPreferRecentDefaultDecayPortion is non 0. Default to 157 because +// half life or $wgCirrusSearchPreferRecentDefaultDecayPortion is non 0. Default to 160 because // that approximates the behavior that wikinews has been using for years. $wgCirrusSearchPreferRecentDefaultHalfLife = 160; -- To view, visit https://gerrit.wikimedia.org/r/169701 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifc7d232f85bcd553ed3a34eb5d86e0adb75ed71f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CirrusSearch Gerrit-Branch: master Gerrit-Owner: Manybubbles never...@wikimedia.org Gerrit-Reviewer: Chad ch...@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] Update Wikidata, fix add links widget js error - change (mediawiki...Wikidata)
jenkins-bot has submitted this change and it was merged. Change subject: Update Wikidata, fix add links widget js error .. Update Wikidata, fix add links widget js error Change-Id: I4adb242d7d33eb0c41eeeac19e3eb298e0fddc3b --- M composer.lock M extensions/Wikibase/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js M vendor/composer/installed.json 3 files changed, 5 insertions(+), 5 deletions(-) Approvals: Aude: Looks good to me, approved jenkins-bot: Verified diff --git a/composer.lock b/composer.lock index 922be13..92be443 100644 --- a/composer.lock +++ b/composer.lock @@ -1205,7 +1205,7 @@ source: { type: git, url: https://git.wikimedia.org/git/mediawiki/extensions/Wikibase.git;, -reference: 85c64994ab955a2488e25261c5e658e71db4434c +reference: f0a82e930fb41345e2a683f5b456112fa61bd686 }, require: { data-values/common: ~0.2.0, @@ -1273,7 +1273,7 @@ issues: https://bugzilla.wikimedia.org/;, irc: irc://irc.freenode.net/wikidata }, -time: 2014-10-28 22:53:07 +time: 2014-10-29 12:42:12 }, { name: wikibase/wikimedia-badges, diff --git a/extensions/Wikibase/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js b/extensions/Wikibase/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js index 39b5aeb..8dc128c 100644 --- a/extensions/Wikibase/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js +++ b/extensions/Wikibase/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js @@ -347,7 +347,7 @@ this.targetArticle = $( '#wbclient-linkItem-page' ).val(); this._pageConnector = new wb.PageConnector( - new wb.RepoApi( this._mwApiForRepo ), + new wb.RepoApi( this.options.mwApiForRepo ), this.options.globalSiteId, this.options.pageTitle, this.targetSite, diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 3c365ab..85735ac 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -1295,7 +1295,7 @@ source: { type: git, url: https://git.wikimedia.org/git/mediawiki/extensions/Wikibase.git;, -reference: 85c64994ab955a2488e25261c5e658e71db4434c +reference: f0a82e930fb41345e2a683f5b456112fa61bd686 }, require: { data-values/common: ~0.2.0, @@ -1321,7 +1321,7 @@ conflict: { mediawiki/mediawiki: 1.23 }, -time: 2014-10-28 22:21:47, +time: 2014-10-29 12:01:16, type: mediawiki-extension, installation-source: source, autoload: { -- To view, visit https://gerrit.wikimedia.org/r/169700 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4adb242d7d33eb0c41eeeac19e3eb298e0fddc3b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikidata Gerrit-Branch: wmf/1.25wmf5 Gerrit-Owner: Aude aude.w...@gmail.com Gerrit-Reviewer: Addshore addshorew...@gmail.com Gerrit-Reviewer: Aude aude.w...@gmail.com Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@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] Fix entityview tests - change (mediawiki...Wikibase)
Adrian Lang has uploaded a new change for review. https://gerrit.wikimedia.org/r/169705 Change subject: Fix entityview tests .. Fix entityview tests Change-Id: I3add5e729477078e446e3c7529787a0dcb5662ef --- M lib/tests/qunit/jquery.wikibase/jquery.wikibase.entityview.tests.js 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/05/169705/1 diff --git a/lib/tests/qunit/jquery.wikibase/jquery.wikibase.entityview.tests.js b/lib/tests/qunit/jquery.wikibase/jquery.wikibase.entityview.tests.js index 82f8ad4..41b0a59 100644 --- a/lib/tests/qunit/jquery.wikibase/jquery.wikibase.entityview.tests.js +++ b/lib/tests/qunit/jquery.wikibase/jquery.wikibase.entityview.tests.js @@ -17,6 +17,12 @@ entityChangersFactory: { getAliasesChanger: function() { return 'i am an alias changer'; + }, + getDescriptionsChanger: function() { + return 'i am a descriptions changer'; + }, + getLabelsChanger: function() { + return 'i am a labels changer'; } }, api: 'i am an api', -- To view, visit https://gerrit.wikimedia.org/r/169705 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3add5e729477078e446e3c7529787a0dcb5662ef 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] Add statementview tests - change (mediawiki...Wikibase)
Adrian Lang has uploaded a new change for review. https://gerrit.wikimedia.org/r/169706 Change subject: Add statementview tests .. Add statementview tests Change-Id: I00ec7eadc4bd185a6f083485a28fc9b1ea478332 --- M lib/tests/qunit/jquery.wikibase/jquery.wikibase.statementview.tests.js M lib/tests/qunit/jquery.wikibase/resources.php 2 files changed, 68 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/06/169706/1 diff --git a/lib/tests/qunit/jquery.wikibase/jquery.wikibase.statementview.tests.js b/lib/tests/qunit/jquery.wikibase/jquery.wikibase.statementview.tests.js index f60b20d..49ffdd7 100644 --- a/lib/tests/qunit/jquery.wikibase/jquery.wikibase.statementview.tests.js +++ b/lib/tests/qunit/jquery.wikibase/jquery.wikibase.statementview.tests.js @@ -3,7 +3,7 @@ * @author Adrian Lang adrian.l...@wikimedia.de */ -( function( $, wb, QUnit ) { +( function( $, wb, QUnit, sinon ) { 'use strict'; /** @@ -13,7 +13,14 @@ */ var createStatementview = function( options, $node ) { options = $.extend( { - entityStore: 'i am an entity store', + entityChangersFactory: { + getReferencesChanger: function() { + return 'i am a references changer'; + } + }, + entityStore: { + get: function () { return $.Deferred().resolve().promise(); } + }, valueViewBuilder: 'i am a valueview builder', api: 'i am an api' }, options || {} ); @@ -42,7 +49,7 @@ } } ) ); -QUnit.test( 'Create destroy', function( assert ) { +QUnit.test( 'Create destroy without value', function( assert ) { var $statementview = createStatementview(), statementview = $statementview.data( 'statementview' ); @@ -59,4 +66,60 @@ ); } ); -}( jQuery, wikibase, QUnit ) ); +QUnit.test( 'Create destroy with value', function( assert ) { + var $statementview = createStatementview( { + value: new wb.datamodel.Statement( + new wb.datamodel.Claim( new wb.datamodel.PropertyNoValueSnak( 'P1' ), null, 'guid' ), + new wb.datamodel.ReferenceList( [ new wb.datamodel.Reference() ] ) + ) + } ), + statementview = $statementview.data( 'statementview' ); + + assert.ok( + statementview !== 'undefined', + 'Created widget.' + ); + + statementview.destroy(); + + assert.ok( + $statementview.data( 'statementview' ) === undefined, + 'Destroyed widget.' + ); +} ); + +QUnit.test( 'isValid', function( assert ) { + var $statementview = createStatementview( { + value: new wb.datamodel.Statement( + new wb.datamodel.Claim( new wb.datamodel.PropertyNoValueSnak( 'P1' ), null, 'guid' ), + new wb.datamodel.ReferenceList( [ new wb.datamodel.Reference() ] ) + ) + } ), + statementview = $statementview.data( 'statementview' ); + + assert.ok( statementview.isValid(), 'isValid should return true' ); +} ); + +QUnit.test( 'remove', function( assert ) { + var referencesChanger = { + removeReference: sinon.spy( function() { return $.Deferred().resolve().promise(); } ) + }, + reference = new wb.datamodel.Reference(), + $statementview = createStatementview( { + value: new wb.datamodel.Statement( + new wb.datamodel.Claim( new wb.datamodel.PropertyNoValueSnak( 'P1' ), null, 'guid' ), + new wb.datamodel.ReferenceList( [ reference ] ) + ), + entityChangersFactory: { + getReferencesChanger: function() { + return referencesChanger; + } + } + } ), + statementview = $statementview.data( 'statementview' ); + + statementview.remove( $statementview.find( ':wikibase-referenceview' ).data( 'referenceview' ) ); + sinon.assert.calledWith( referencesChanger.removeReference, 'guid', reference ); +} ); + +}( jQuery, wikibase, QUnit, sinon ) ); diff --git a/lib/tests/qunit/jquery.wikibase/resources.php b/lib/tests/qunit/jquery.wikibase/resources.php index 2611044..3fb7dc6 100644 --- a/lib/tests/qunit/jquery.wikibase/resources.php +++ b/lib/tests/qunit/jquery.wikibase/resources.php @@ -164,6 +164,7 @@ 'jquery.valueview.ExpertStore',
[MediaWiki-commits] [Gerrit] Update Wikidata, fix js error in add links client widget - change (mediawiki/core)
Aude has uploaded a new change for review. https://gerrit.wikimedia.org/r/169707 Change subject: Update Wikidata, fix js error in add links client widget .. Update Wikidata, fix js error in add links client widget See I4adb242 for actual changes. Change-Id: I879c1536c1559cb3d3202df9e3da43064d20a34a --- M extensions/Wikidata 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/07/169707/1 diff --git a/extensions/Wikidata b/extensions/Wikidata index 74a5d88..3377e12 16 --- a/extensions/Wikidata +++ b/extensions/Wikidata -Subproject commit 74a5d883606fe4be39993ecadb26b0d617a3ce0e +Subproject commit 3377e12fd34fc758915174d586bd3b948aa78e68 -- To view, visit https://gerrit.wikimedia.org/r/169707 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I879c1536c1559cb3d3202df9e3da43064d20a34a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.25wmf5 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] Changing dhcpd entries for elastic1017-19 - change (operations/puppet)
Cmjohnson has submitted this change and it was merged. Change subject: Changing dhcpd entries for elastic1017-19 .. Changing dhcpd entries for elastic1017-19 Change-Id: Iec766c5e2af524e3f7ed1aa61b4ea1d196a1f9e1 --- M modules/install-server/files/dhcpd/linux-host-entries.ttyS1-115200 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Cmjohnson: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/install-server/files/dhcpd/linux-host-entries.ttyS1-115200 b/modules/install-server/files/dhcpd/linux-host-entries.ttyS1-115200 index 3189986..e49c734 100644 --- a/modules/install-server/files/dhcpd/linux-host-entries.ttyS1-115200 +++ b/modules/install-server/files/dhcpd/linux-host-entries.ttyS1-115200 @@ -1442,17 +1442,17 @@ } host elastic1017 { - hardware ethernet 90:B1:1C:23:23:BF; + hardware ethernet B0:83:FE:C0:B0:D2; fixed-address elastic1017.eqiad.wmnet; } host elastic1018 { - hardware ethernet 90:B1:1C:1D:E7:E5; + hardware ethernet B0:83:FE:BE:E6:93; fixed-address elastic1018.eqiad.wmnet; } host elastic1019 { - hardware ethernet 90:B1:1C:23:36:1D; + hardware ethernet B0:83:FE:C0:9C:24; fixed-address elastic1019.eqiad.wmnet; } -- To view, visit https://gerrit.wikimedia.org/r/169704 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iec766c5e2af524e3f7ed1aa61b4ea1d196a1f9e1 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Cmjohnson cmjohn...@wikimedia.org Gerrit-Reviewer: Cmjohnson cmjohn...@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] [IMPROV] PageTitleFilterPageGenerator: docstring more specific - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: [IMPROV] PageTitleFilterPageGenerator: docstring more specific .. [IMPROV] PageTitleFilterPageGenerator: docstring more specific The docstring explicitly says that the titles need to be regexable strings. Also simplified the test if there is an entry for family/code in ignore_list. Change-Id: I1ef136bcd6d9d1cd2d891024b85dfed414b83eef --- M pywikibot/pagegenerators.py 1 file changed, 4 insertions(+), 4 deletions(-) Approvals: Nullzero: Looks good to me, approved jenkins-bot: Verified diff --git a/pywikibot/pagegenerators.py b/pywikibot/pagegenerators.py index fab7ccd..28c4136 100644 --- a/pywikibot/pagegenerators.py +++ b/pywikibot/pagegenerators.py @@ -923,14 +923,14 @@ Yield only those pages are not listed in the ignore list. -@param ignore_list: family names are mapped to dictionaries -in which language codes are mapped to lists of page titles +@param ignore_list: family names are mapped to dictionaries in which +language codes are mapped to lists of page titles. Each title must +be a valid regex as they are compared using L{re.search}. @type ignore_list: dict def is_ignored(page): -if page.site.family.name in ignore_list and \ -page.site.code in ignore_list[page.site.family.name]: +if page.site.code in ignore_list.get(page.site.family.name, {}): for ig in ignore_list[page.site.family.name][page.site.code]: if re.search(ig, page.title()): return True -- To view, visit https://gerrit.wikimedia.org/r/169671 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1ef136bcd6d9d1cd2d891024b85dfed414b83eef Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: XZise commodorefabia...@gmx.de Gerrit-Reviewer: John Vandenberg jay...@gmail.com Gerrit-Reviewer: Ladsgroup ladsgr...@gmail.com Gerrit-Reviewer: Merlijn van Deen valhall...@arctus.nl Gerrit-Reviewer: Nullzero nullzero.f...@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] Raise account creation throttle at cawiki temporarily - change (operations/mediawiki-config)
Glaisher has uploaded a new change for review. https://gerrit.wikimedia.org/r/169708 Change subject: Raise account creation throttle at cawiki temporarily .. Raise account creation throttle at cawiki temporarily From--- '2014-10-30T17:00 +1:00' To---'2014-10-30T20:00 +1:00' IP---'85.192.77.149' Wiki--- 'cawiki' Value--- '20' Bug: 72611 Change-Id: Ic59e67ef5ed275745a758c297d9249c25551b7f8 --- M wmf-config/throttle.php 1 file changed, 8 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/08/169708/1 diff --git a/wmf-config/throttle.php b/wmf-config/throttle.php index 4b9c1ad..4574997 100644 --- a/wmf-config/throttle.php +++ b/wmf-config/throttle.php @@ -28,6 +28,14 @@ 'value' = 90, ); +$wmgThrottlingExceptions[] = array( // bug 72611 + 'from' = '2014-10-30T17:00 +1:00', + 'to' = '2014-10-30T20:00 +1:00', + 'IP' = array( '85.192.77.149' ), + 'dbname' = array( 'cawiki' ), + 'value' = 20, +); + ## Add throttling definitions above. ## Helper methods: -- To view, visit https://gerrit.wikimedia.org/r/169708 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic59e67ef5ed275745a758c297d9249c25551b7f8 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Glaisher glaisher.w...@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] Fix optout graph description - change (analytics...config)
Gilles has submitted this change and it was merged. Change subject: Fix optout graph description .. Fix optout graph description Typo fix + warn about different semantics on Commons. Change-Id: I737aaee479f312b427dd6b7737c5eddbcbac5038 --- M graphs/mmv_optout_template.json 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Gilles: Verified; Looks good to me, approved diff --git a/graphs/mmv_optout_template.json b/graphs/mmv_optout_template.json index 2ca818e..78f5798 100644 --- a/graphs/mmv_optout_template.json +++ b/graphs/mmv_optout_template.json @@ -1,7 +1,7 @@ { graph_version: 0.6.0, id: mmv_optout_%wiki%, -desc: Tracking how many people have opted out of Media Vieweron %wiki%.brblogged-in/b users who have made a login or change in the last 30 daysbrbactive/b users who made 5+ edits in the last 30 days, +desc: Tracking how many people have opted out of Media Viewer on %wiki%.br(On Commons the graph shows the number of people who opted in.)brblogged-in/b users who have made a login or change in the last 30 daysbrbactive/b users who made 5+ edits in the last 30 days, name: Optout, slug: mmv_optout_%wiki%, root: { -- To view, visit https://gerrit.wikimedia.org/r/169698 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I737aaee479f312b427dd6b7737c5eddbcbac5038 Gerrit-PatchSet: 1 Gerrit-Project: analytics/multimedia/config Gerrit-Branch: master Gerrit-Owner: Gergő Tisza gti...@wikimedia.org Gerrit-Reviewer: Gilles gdu...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Always use edit as aliases edit toolbar button label - change (mediawiki...Wikibase)
Henning Snater has uploaded a new change for review. https://gerrit.wikimedia.org/r/169709 Change subject: Always use edit as aliases edit toolbar button label .. Always use edit as aliases edit toolbar button label Consistent with JavaScript behaviour; Fixes error that button was not properly initialized in JS when there are not aliases. Change-Id: I933cefecc23bf9045d3ecbc98c04daee2af21e68 --- M repo/includes/View/FingerprintView.php 1 file changed, 1 insertion(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/09/169709/1 diff --git a/repo/includes/View/FingerprintView.php b/repo/includes/View/FingerprintView.php index 18c7f4a..2563090 100644 --- a/repo/includes/View/FingerprintView.php +++ b/repo/includes/View/FingerprintView.php @@ -138,8 +138,7 @@ */ private function getHtmlForAliases( AliasGroupList $aliasGroups, EntityId $entityId = null, $editable ) { $hasAliases = $aliasGroups-hasGroupForLanguage( $this-languageCode ); - $action = $hasAliases ? 'edit' : 'add'; - $editSection = $this-getHtmlForEditSection( 'SetAliases', $entityId, $editable, $action ); + $editSection = $this-getHtmlForEditSection( 'SetAliases', $entityId, $editable, 'edit' ); if ( $hasAliases ) { $aliasesHtml = ''; -- To view, visit https://gerrit.wikimedia.org/r/169709 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I933cefecc23bf9045d3ecbc98c04daee2af21e68 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] (bug 70148) Fix new topic creation with wikitext storage - change (mediawiki...Flow)
Matthias Mullie has uploaded a new change for review. https://gerrit.wikimedia.org/r/169711 Change subject: (bug 70148) Fix new topic creation with wikitext storage .. (bug 70148) Fix new topic creation with wikitext storage Bug: 70148 Change-Id: Ief9062b8f2bd77a1071c4f839e8b6865c03f102d --- M Flow.php M includes/Model/AbstractRevision.php 2 files changed, 14 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/11/169711/1 diff --git a/Flow.php b/Flow.php index f126d64..bef9af6 100644 --- a/Flow.php +++ b/Flow.php @@ -155,7 +155,7 @@ // running, as it'll be necessary to convert HTML to wikitext for the basic editor. // (n.b. to use VisualEditor, you'll definitely need Parsoid, so if you do support VE, // might as well set this to HTML right away) -$wgFlowContentFormat = 'html'; // possible values: html|wikitext XXX bug 70148 with wikitext +$wgFlowContentFormat = 'wikitext'; // possible values: html|wikitext // Flow Parsoid config // If null, VE's defaults (if available) will be used diff --git a/includes/Model/AbstractRevision.php b/includes/Model/AbstractRevision.php index 4620f8e..ccdda34 100644 --- a/includes/Model/AbstractRevision.php +++ b/includes/Model/AbstractRevision.php @@ -4,6 +4,7 @@ use Flow\Collection\AbstractCollection; use Flow\Exception\DataModelException; +use Flow\Exception\InvalidDataException; use Flow\Exception\PermissionException; use Flow\Parsoid\Utils; use Title; @@ -334,11 +335,22 @@ if ( $sourceFormat === $format ) { $this-convertedContent[$format] = $raw; } else { + try { + $title = $this-getCollection()-getTitle(); + } catch ( InvalidDataException $e ) { + // When creating a new topic, ReferenceRecorder will call + // this method (for the initial post), but workflow is only + // inserted after the post is, so the workflow (required to + // get the associated Title) does not yet exist. This hacks + // around it by just creating title object ourselves. + $title = Title::newFromText( $this-getCollection()-getWorkflowId()-getAlphadecimal(), NS_TOPIC ); + } + $this-convertedContent[$format] = Utils::convert( $sourceFormat, $format, $raw, - $this-getCollection()-getTitle() + $title ); } } -- To view, visit https://gerrit.wikimedia.org/r/169711 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ief9062b8f2bd77a1071c4f839e8b6865c03f102d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Matthias Mullie mmul...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Throw correct exception when failing to contact Parsoid - change (mediawiki...Flow)
Matthias Mullie has uploaded a new change for review. https://gerrit.wikimedia.org/r/169710 Change subject: Throw correct exception when failing to contact Parsoid .. Throw correct exception when failing to contact Parsoid This will allow us to fall back to regular parser. Change-Id: I57b7006560c3cbd50d4cdf7e0ffb8a5790539939 --- M autoload.php M includes/Exception/ExceptionHandling.php M includes/Parsoid/Utils.php 3 files changed, 13 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/10/169710/1 diff --git a/autoload.php b/autoload.php index 891d85d..7909ed4 100644 --- a/autoload.php +++ b/autoload.php @@ -127,6 +127,7 @@ $wgAutoloadClasses['Flow\\Exception\\InvalidDataException'] = __DIR__ . '/includes/Exception/ExceptionHandling.php'; $wgAutoloadClasses['Flow\\Exception\\InvalidInputException'] = __DIR__ . '/includes/Exception/ExceptionHandling.php'; $wgAutoloadClasses['Flow\\Exception\\NoIndexException'] = __DIR__ . '/includes/Exception/ExceptionHandling.php'; +$wgAutoloadClasses['Flow\\Exception\\NoParsoidException'] = __DIR__ . '/includes/Exception/ExceptionHandling.php'; $wgAutoloadClasses['Flow\\Exception\\PermissionException'] = __DIR__ . '/includes/Exception/ExceptionHandling.php'; $wgAutoloadClasses['Flow\\Exception\\WikitextException'] = __DIR__ . '/includes/Exception/ExceptionHandling.php'; $wgAutoloadClasses['Flow\\Exception\\WrongNumberArgumentsException'] = __DIR__ . '/includes/Exception/ExceptionHandling.php'; diff --git a/includes/Exception/ExceptionHandling.php b/includes/Exception/ExceptionHandling.php index 38faa98..63fcf14 100644 --- a/includes/Exception/ExceptionHandling.php +++ b/includes/Exception/ExceptionHandling.php @@ -263,6 +263,15 @@ } /** + * Category: Parsoid + */ +class NoParsoidException extends FlowException { + protected function getErrorCodeList() { + return array ( 'process-wikitext' ); + } +} + +/** * Category: wikitext/html conversion exception */ class WikitextException extends FlowException { diff --git a/includes/Parsoid/Utils.php b/includes/Parsoid/Utils.php index b36235b..37cc5ff 100644 --- a/includes/Parsoid/Utils.php +++ b/includes/Parsoid/Utils.php @@ -4,6 +4,7 @@ use DOMDocument; use DOMNode; +use Flow\Exception\NoParsoidException; use Language; use OutputPage; use Title; @@ -78,7 +79,7 @@ protected static function parsoid( $from, $to, $content, Title $title ) { list( $parsoidURL, $parsoidPrefix, $parsoidTimeout ) = self::parsoidConfig(); if ( !isset( $parsoidURL ) || !$parsoidURL ) { - throw new NoParsoidException( 'Flow Parsoid configuration is unavailable' ); + throw new NoParsoidException( 'Flow Parsoid configuration is unavailable', 'process-wikitext' ); } if ( $from == 'html' ) { @@ -102,7 +103,7 @@ $status = $request-execute(); if ( !$status-isOK() ) { wfDebugLog( 'Flow', __METHOD__ . ': Failed contacting parsoid: ' . $status-getMessage()-text() ); - throw new WikitextException( 'Failed contacting Parsoid', 'process-wikitext' ); + throw new NoParsoidException( 'Failed contacting Parsoid', 'process-wikitext' ); } $response = $request-getContent(); @@ -288,5 +289,3 @@ return Title::newFromText( $text ); } } - -class NoParsoidException extends \MWException {} -- To view, visit https://gerrit.wikimedia.org/r/169710 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I57b7006560c3cbd50d4cdf7e0ffb8a5790539939 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Matthias Mullie mmul...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add three more master node to elasticsearch - change (operations/puppet)
Ottomata has submitted this change and it was merged. Change subject: Add three more master node to elasticsearch .. Add three more master node to elasticsearch This is the first step in the master node dance we're going to do to replace the hard drives in elastic10(0[1-9]|1[0-6]). The steps are: 1. Move all data off of the nodes we're going to make master nodes. 2. Replace harddrives in these new master nodes. 3. Rebuild them as master nodes. Now we'll have 6 master nodes. 4. Remove all the data from the old master nodes. 5. Shut off elasticsearch in the old master nodes. 6. Replace their hard drives and reimagine them as non-master nodes. We're in danger of elasticsearch split brain during step 4 but we can limit the length of that step. Change-Id: I6312f78e376108fa733f885be3c11de36387dc91 --- M manifests/role/elasticsearch.pp 1 file changed, 5 insertions(+), 0 deletions(-) Approvals: Ottomata: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/role/elasticsearch.pp b/manifests/role/elasticsearch.pp index 9a57c61..212d30d 100644 --- a/manifests/role/elasticsearch.pp +++ b/manifests/role/elasticsearch.pp @@ -67,9 +67,14 @@ 'eqiad' = '224.2.2.5', } $master_eligible = $::hostname ? { +# Current masters as of 2014-10-28 'elastic1002' = true, 'elastic1007' = true, 'elastic1014' = true, +# New masters as of 2014-10-28 +'elastic1001' = true, +'elastic1008' = true, +'elastic1013' = true, default = false, } $minimum_master_nodes = 2 -- To view, visit https://gerrit.wikimedia.org/r/169550 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6312f78e376108fa733f885be3c11de36387dc91 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Manybubbles never...@wikimedia.org Gerrit-Reviewer: Chad ch...@wikimedia.org Gerrit-Reviewer: Manybubbles never...@wikimedia.org Gerrit-Reviewer: Ottomata 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] Fix entityview tests - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Fix entityview tests .. Fix entityview tests Change-Id: I3add5e729477078e446e3c7529787a0dcb5662ef --- M lib/tests/qunit/jquery.wikibase/jquery.wikibase.entityview.tests.js 1 file changed, 6 insertions(+), 0 deletions(-) Approvals: Henning Snater: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/tests/qunit/jquery.wikibase/jquery.wikibase.entityview.tests.js b/lib/tests/qunit/jquery.wikibase/jquery.wikibase.entityview.tests.js index 82f8ad4..41b0a59 100644 --- a/lib/tests/qunit/jquery.wikibase/jquery.wikibase.entityview.tests.js +++ b/lib/tests/qunit/jquery.wikibase/jquery.wikibase.entityview.tests.js @@ -17,6 +17,12 @@ entityChangersFactory: { getAliasesChanger: function() { return 'i am an alias changer'; + }, + getDescriptionsChanger: function() { + return 'i am a descriptions changer'; + }, + getLabelsChanger: function() { + return 'i am a labels changer'; } }, api: 'i am an api', -- To view, visit https://gerrit.wikimedia.org/r/169705 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3add5e729477078e446e3c7529787a0dcb5662ef Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Adrian Lang adrian.l...@wikimedia.de Gerrit-Reviewer: Henning Snater henning.sna...@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] osm export the expired tile list - change (operations/puppet)
Alexandros Kosiaris has submitted this change and it was merged. Change subject: osm export the expired tile list .. osm export the expired tile list use the rsync module and define a repo to export to labs vms the list of expired tiles. While at it, do some minor reorganization of the osm module Change-Id: I4b686216d167b572e7333521ab54d4e974d0facc --- M manifests/role/osm.pp R modules/osm/manifests/init.pp R modules/osm/spec/classes/osm_spec.rb 3 files changed, 24 insertions(+), 4 deletions(-) Approvals: Alexandros Kosiaris: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/role/osm.pp b/manifests/role/osm.pp index 7644932..0bf3388 100644 --- a/manifests/role/osm.pp +++ b/manifests/role/osm.pp @@ -27,7 +27,7 @@ class role::osm::master { include role::osm::common include postgresql::postgis -include osm::packages +include osm include passwords::osm class { 'postgresql::master': @@ -142,6 +142,26 @@ method = 'md5', database = 'wikimaps_atlas', } + +include rsync::server +rsync::server::module { 'osm_expired_tiles': +path= '/srv/osm_expire', +comment = 'OpenStreetMap expired tile list', +uid = 'postgres', +gid = 'postgres', +} + +ferm::service { 'rsync_from_labs': +desc = 'Allow labs machines to get the expired OSM tile list', +prio = '50', +proto = 'tcp', +port = 873, +srange = '($EQIAD_PRIVATE_LABS-INSTANCES1-A-EQIAD $EQIAD_PRIVATE_LABS-INSTANCES1-A-EQIAD $EQIAD_PRIVATE_LABS-INSTANCES1-A-EQIAD $EQIAD_PRIVATE_LABS-INSTANCES1-A-EQIAD)', +} +nrpe::monitor_service { 'check_rsync_server_running': +description = 'Check if rsync server is running', +command = /usr/lib/nagios/plugins/check_procs -w 1:1 -c 1:4 --ereg-argument-array 'rsync --daemon', +} } class role::osm::slave { diff --git a/modules/osm/manifests/packages.pp b/modules/osm/manifests/init.pp similarity index 71% rename from modules/osm/manifests/packages.pp rename to modules/osm/manifests/init.pp index 83a8527..8512ed1 100644 --- a/modules/osm/manifests/packages.pp +++ b/modules/osm/manifests/init.pp @@ -1,6 +1,6 @@ # -class osm::packages($ensure='present') { +class osm($ensure='present') { package { [ 'osm2pgsql', 'osmosis', diff --git a/modules/osm/spec/classes/osm_packages_spec.rb b/modules/osm/spec/classes/osm_spec.rb similarity index 85% rename from modules/osm/spec/classes/osm_packages_spec.rb rename to modules/osm/spec/classes/osm_spec.rb index e5f7280..a58f4c3 100644 --- a/modules/osm/spec/classes/osm_packages_spec.rb +++ b/modules/osm/spec/classes/osm_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe 'osm::packages', :type = :class do +describe 'osm', :type = :class do let(:params) { { :ensure = 'present', } @@ -12,7 +12,7 @@ end end -describe 'osm::packages', :type = :class do +describe 'osm', :type = :class do let(:params) { { :ensure = 'absent', } -- To view, visit https://gerrit.wikimedia.org/r/169242 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4b686216d167b572e7333521ab54d4e974d0facc Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Alexandros Kosiaris akosia...@wikimedia.org Gerrit-Reviewer: Alexandros Kosiaris akosia...@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] Backup user home dirs - change (operations/puppet)
Alexandros Kosiaris has submitted this change and it was merged. Change subject: Backup user home dirs .. Backup user home dirs Suggested hosts are: bast1001, iron, tin, terbium. Ganglia study showed a total of 1.3TB total usage and zero growth rate on these hosts. This is total disk space usage (including home directories) so actual home dir usage is lower Change-Id: I4adf7407ba3550b6ecaea939d978b1656ff7504b --- M manifests/site.pp 1 file changed, 8 insertions(+), 0 deletions(-) Approvals: Alexandros Kosiaris: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/site.pp b/manifests/site.pp index 6123c30..e0ade8d 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -359,6 +359,8 @@ mountpoint = '/srv/home_pmtpa', mount_site = 'pmtpa', } +include role::backup::host +backup-set {'home': } } node 'bast2001.wikimedia.org' { @@ -1336,6 +1338,8 @@ include role::ipmi include role::access_new_install +include role::backup::host +backup-set {'home': } } @@ -2630,6 +2634,8 @@ ensure = installed, } +include role::backup::host +backup-set {'home': } } node /^elastic10[0-3][0-9]\.eqiad\.wmnet/ { @@ -2707,6 +2713,8 @@ interface::add_ip6_mapped { 'main': interface = 'eth0', } +include role::backup::host +backup-set {'home': } } # titanium hosts archiva.wikimedia.org -- To view, visit https://gerrit.wikimedia.org/r/168981 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4adf7407ba3550b6ecaea939d978b1656ff7504b Gerrit-PatchSet: 3 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Alexandros Kosiaris akosia...@wikimedia.org Gerrit-Reviewer: Alexandros Kosiaris akosia...@wikimedia.org Gerrit-Reviewer: ArielGlenn ar...@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] Always use edit as aliases edit toolbar button label - change (mediawiki...Wikibase)
Aude has uploaded a new change for review. https://gerrit.wikimedia.org/r/169712 Change subject: Always use edit as aliases edit toolbar button label .. Always use edit as aliases edit toolbar button label Consistent with JavaScript behaviour; Fixes error that button was not properly initialized in JS when there are no aliases. Change-Id: I933cefecc23bf9045d3ecbc98c04daee2af21e68 --- M repo/includes/View/FingerprintView.php 1 file changed, 1 insertion(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/12/169712/1 diff --git a/repo/includes/View/FingerprintView.php b/repo/includes/View/FingerprintView.php index 18c7f4a..2563090 100644 --- a/repo/includes/View/FingerprintView.php +++ b/repo/includes/View/FingerprintView.php @@ -138,8 +138,7 @@ */ private function getHtmlForAliases( AliasGroupList $aliasGroups, EntityId $entityId = null, $editable ) { $hasAliases = $aliasGroups-hasGroupForLanguage( $this-languageCode ); - $action = $hasAliases ? 'edit' : 'add'; - $editSection = $this-getHtmlForEditSection( 'SetAliases', $entityId, $editable, $action ); + $editSection = $this-getHtmlForEditSection( 'SetAliases', $entityId, $editable, 'edit' ); if ( $hasAliases ) { $aliasesHtml = ''; -- To view, visit https://gerrit.wikimedia.org/r/169712 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I933cefecc23bf9045d3ecbc98c04daee2af21e68 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: wmf/1.25wmf6 Gerrit-Owner: Aude aude.w...@gmail.com Gerrit-Reviewer: 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] Always use edit as aliases edit toolbar button label - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Always use edit as aliases edit toolbar button label .. Always use edit as aliases edit toolbar button label Consistent with JavaScript behaviour; Fixes error that button was not properly initialized in JS when there are no aliases. Change-Id: I933cefecc23bf9045d3ecbc98c04daee2af21e68 --- M repo/includes/View/FingerprintView.php 1 file changed, 1 insertion(+), 2 deletions(-) Approvals: Adrian Lang: Looks good to me, approved jenkins-bot: Verified diff --git a/repo/includes/View/FingerprintView.php b/repo/includes/View/FingerprintView.php index 18c7f4a..2563090 100644 --- a/repo/includes/View/FingerprintView.php +++ b/repo/includes/View/FingerprintView.php @@ -138,8 +138,7 @@ */ private function getHtmlForAliases( AliasGroupList $aliasGroups, EntityId $entityId = null, $editable ) { $hasAliases = $aliasGroups-hasGroupForLanguage( $this-languageCode ); - $action = $hasAliases ? 'edit' : 'add'; - $editSection = $this-getHtmlForEditSection( 'SetAliases', $entityId, $editable, $action ); + $editSection = $this-getHtmlForEditSection( 'SetAliases', $entityId, $editable, 'edit' ); if ( $hasAliases ) { $aliasesHtml = ''; -- To view, visit https://gerrit.wikimedia.org/r/169709 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I933cefecc23bf9045d3ecbc98c04daee2af21e68 Gerrit-PatchSet: 2 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] Allow the user to delete individual history entries - change (apps...wikipedia)
Dbrant has submitted this change and it was merged. Change subject: Allow the user to delete individual history entries .. Allow the user to delete individual history entries Borrows a lot of code from saved pages Change-Id: I238fb388203d61edf0cd6904c401b687a062e0f5 --- A wikipedia/res/menu/menu_history_context.xml M wikipedia/res/values-qq/strings.xml M wikipedia/res/values/strings.xml M wikipedia/src/main/java/org/wikipedia/history/HistoryEntryPersistanceHelper.java M wikipedia/src/main/java/org/wikipedia/history/HistoryFragment.java 5 files changed, 83 insertions(+), 5 deletions(-) Approvals: Dbrant: Looks good to me, approved diff --git a/wikipedia/res/menu/menu_history_context.xml b/wikipedia/res/menu/menu_history_context.xml new file mode 100644 index 000..60c5ac9 --- /dev/null +++ b/wikipedia/res/menu/menu_history_context.xml @@ -0,0 +1,10 @@ +?xml version=1.0 encoding=utf-8? + +menu xmlns:android=http://schemas.android.com/apk/res/android; +xmlns:app=http://schemas.android.com/apk/res-auto; + +item android:id=@+id/menu_delete_selected_history +android:icon=@drawable/ic_delete +android:title=@string/delete_selected_history +app:showAsAction=always / +/menu \ No newline at end of file diff --git a/wikipedia/res/values-qq/strings.xml b/wikipedia/res/values-qq/strings.xml index 23a5e31..a9c8c71 100644 --- a/wikipedia/res/values-qq/strings.xml +++ b/wikipedia/res/values-qq/strings.xml @@ -152,6 +152,8 @@ string name=saved_pages_empty_messageBrief explanation of what saved pages are, and their benefits./string string name=history_empty_titleUsed in \Browsing history\ page if there is nothing to show./string string name=history_empty_messageBrief explanation that there are currently no History entries to look at. Just to fill an empty screen. This usually happens when a user just deleted history entries./string + string name=delete_selected_historyMenu item text for deleting the currently selected history entries +{{Identical|Delete}}/string string name=wp_stylizedA stylized string saying \Wikipedia\. Used before wp_tag_line if no image representation exists. Usually the first and last characters are within big tags, if this fits the Wikipedia logo in your language./string string name=wp_tag_lineThe Wikipedia slogan. The second line of https://commons.wikimedia.org/wiki/Wikimedia#mediaviewer/File:Wikipedia-logo-en.png. You may be able to find one under https://commons.wikimedia.org/wiki/Wikipedia/2.0./string string name=skipA button or text link to trigger skipping something, like closing the current screen without doing anything. diff --git a/wikipedia/res/values/strings.xml b/wikipedia/res/values/strings.xml index 9f5d8be..e2b2dd8 100644 --- a/wikipedia/res/values/strings.xml +++ b/wikipedia/res/values/strings.xml @@ -113,6 +113,7 @@ string name=saved_pages_empty_messageSaved pages are pretty awesome. Think of them as bookmarks that you can read even when you are offline./string string name=history_empty_titleNo recent pages here!/string string name=history_empty_messageYou probably deleted all of them. Next time you go to a page you can get back to it from here./string +string name=delete_selected_historyDelete/string string name=wp_stylized![CDATA[bigW/bigIKIPEDIbigA/big]]/string string name=wp_tag_lineThe Free Encyclopedia/string string name=skipSkip/string diff --git a/wikipedia/src/main/java/org/wikipedia/history/HistoryEntryPersistanceHelper.java b/wikipedia/src/main/java/org/wikipedia/history/HistoryEntryPersistanceHelper.java index 4cd0fc4..b07c55c 100644 --- a/wikipedia/src/main/java/org/wikipedia/history/HistoryEntryPersistanceHelper.java +++ b/wikipedia/src/main/java/org/wikipedia/history/HistoryEntryPersistanceHelper.java @@ -59,11 +59,15 @@ @Override protected String getPrimaryKeySelection() { -throw new UnsupportedOperationException(No Primary Keys make sense for History); +return site = ? AND title = ? AND timestamp = ?; } @Override protected String[] getPrimaryKeySelectionArgs(HistoryEntry obj) { -throw new UnsupportedOperationException(No Primary Keys make sense for History); +return new String[] { +obj.getTitle().getSite().getDomain(), +obj.getTitle().getPrefixedText(), +Long.toString(obj.getTimestamp().getTime()) +}; } } diff --git a/wikipedia/src/main/java/org/wikipedia/history/HistoryFragment.java b/wikipedia/src/main/java/org/wikipedia/history/HistoryFragment.java index 152b116..82f97c7 100644 --- a/wikipedia/src/main/java/org/wikipedia/history/HistoryFragment.java +++ b/wikipedia/src/main/java/org/wikipedia/history/HistoryFragment.java @@ -11,14 +11,19 @@ import android.support.v4.content.CursorLoader; import android.support.v4.content.Loader; import
[MediaWiki-commits] [Gerrit] Fix wrongly enabled save button for references - change (mediawiki...Wikibase)
Adrian Lang has uploaded a new change for review. https://gerrit.wikimedia.org/r/169713 Change subject: Fix wrongly enabled save button for references .. Fix wrongly enabled save button for references Change-Id: I41da310f070d8f4f0c38f51e15fe21e7a870a9c7 --- M lib/resources/jquery.wikibase/jquery.wikibase.statementview.js 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/13/169713/1 diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.statementview.js b/lib/resources/jquery.wikibase/jquery.wikibase.statementview.js index 6d0613c..7d627b2 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.statementview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.statementview.js @@ -100,7 +100,8 @@ newItemOptionsFn: function( value ) { var index = indexOf( value, self.value().getReferences() ); if( index === null ) { - index = self._referencesListview.items().length; + // The empty list view item for this is already appended to the list view + index = self._referencesListview.items().length - 1; } return { value: value || null, -- To view, visit https://gerrit.wikimedia.org/r/169713 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I41da310f070d8f4f0c38f51e15fe21e7a870a9c7 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] Points upload events to the right schema - change (mediawiki...UploadWizard)
jenkins-bot has submitted this change and it was merged. Change subject: Points upload events to the right schema .. Points upload events to the right schema Change-Id: Id76e3c5c8aae03f9ae511820117e0627c05f8393 Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/959 Bug: 72360 --- M UploadWizard.php M resources/uw.EventFlowLogger.js 2 files changed, 6 insertions(+), 4 deletions(-) Approvals: Gilles: Looks good to me, approved MarkTraceur: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/UploadWizard.php b/UploadWizard.php index 881e9b3..e1016de 100644 --- a/UploadWizard.php +++ b/UploadWizard.php @@ -139,7 +139,7 @@ $wgEventLoggingSchemas[ 'UploadWizardStep' ] = 8851805; $wgEventLoggingSchemas[ 'UploadWizardFlowEvent' ] = 8851807; $wgEventLoggingSchemas[ 'UploadWizardErrorFlowEvent' ] = 9924376; -$wgEventLoggingSchemas[ 'UploadWizardUploadFlowEvent' ] = 9609883; +$wgEventLoggingSchemas[ 'UploadWizardUploadFlowEvent' ] = 9651951; // Campaign hook handlers $wgHooks[ 'BeforePageDisplay' ][] = 'CampaignHooks::onBeforePageDisplay'; diff --git a/resources/uw.EventFlowLogger.js b/resources/uw.EventFlowLogger.js index c979775..1401ff1 100644 --- a/resources/uw.EventFlowLogger.js +++ b/resources/uw.EventFlowLogger.js @@ -117,8 +117,10 @@ * - upload-removed * - uploads-added * @param {object} data -* @param {integer} data.size file size in bytes (will be anonymized) -* @param {integer} data.duration upload duration in seconds +* @param {string} data.extension file extension +* @param {number} data.quantity number of files added +* @param {number} data.size file size in bytes (will be anonymized) +* @param {number} data.duration upload duration in seconds * @param {string} data.error upload error string */ EFLP.logUploadEvent = function ( name, data ) { @@ -129,7 +131,7 @@ data.size = parseFloat( Number( data.size ).toPrecision( 1 ), 10 ); } - this.log( 'UploadWizardFlowEvent', data ); + this.log( 'UploadWizardUploadFlowEvent', data ); }; uw.EventFlowLogger = EventFlowLogger; -- To view, visit https://gerrit.wikimedia.org/r/168563 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id76e3c5c8aae03f9ae511820117e0627c05f8393 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/UploadWizard Gerrit-Branch: master Gerrit-Owner: Gilles gdu...@wikimedia.org Gerrit-Reviewer: Gergő Tisza gti...@wikimedia.org Gerrit-Reviewer: Gilles gdu...@wikimedia.org Gerrit-Reviewer: MarkTraceur mtrac...@member.fsf.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits