[MediaWiki-commits] [Gerrit] Make JSHint voting for GettingStarted - change (integration/zuul-config)
Mattflaschen has uploaded a new change for review. https://gerrit.wikimedia.org/r/82802 Change subject: Make JSHint voting for GettingStarted .. Make JSHint voting for GettingStarted Change-Id: Iee26ecc9ba8ad2e2e2eacf83c1cef705efa25ea9 --- M layout.yaml 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/zuul-config refs/changes/02/82802/1 diff --git a/layout.yaml b/layout.yaml index f23a71d..6a60c13 100644 --- a/layout.yaml +++ b/layout.yaml @@ -381,6 +381,8 @@ voting: true - name: mwext-EventLogging-jslint voting: true + - name: mwext-GettingStarted-jslint +voting: true - name: mwext-GuidedTour-jslint voting: true - name: mwext-GlobalBlocking-jslint -- To view, visit https://gerrit.wikimedia.org/r/82802 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iee26ecc9ba8ad2e2e2eacf83c1cef705efa25ea9 Gerrit-PatchSet: 1 Gerrit-Project: integration/zuul-config Gerrit-Branch: master Gerrit-Owner: Mattflaschen mflasc...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [CentralLogging] [HSTS] Register extensions - change (translatewiki)
Raimond Spekking has uploaded a new change for review. https://gerrit.wikimedia.org/r/82803 Change subject: [CentralLogging] [HSTS] Register extensions .. [CentralLogging] [HSTS] Register extensions Change-Id: I8e9ad443ad8891a3bf04fc9b8b8295c9d2bc849f --- M groups/MediaWiki/mediawiki-defines.txt 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/03/82803/1 diff --git a/groups/MediaWiki/mediawiki-defines.txt b/groups/MediaWiki/mediawiki-defines.txt index 0f985d1..8ddf616 100644 --- a/groups/MediaWiki/mediawiki-defines.txt +++ b/groups/MediaWiki/mediawiki-defines.txt @@ -157,6 +157,8 @@ optional = centralauth-merge-method-questionmark ignored = centralauth-editset-item-ro, centralauth-admin-notblocked +Central Logging + Central Notice aliasfile = CentralNotice/CentralNotice.alias.php optional = centralnotice-language-listing, centralnotice-log-label, centralnotice-user-links @@ -670,6 +672,8 @@ Hovergallery file = Hovergallery/HoverGallery.i18n.php +HSTS + HTML Tags HTMLets -- To view, visit https://gerrit.wikimedia.org/r/82803 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8e9ad443ad8891a3bf04fc9b8b8295c9d2bc849f 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] Call $wgContLang-findVariantLink() in {{PAGESINCATEGORY: }} - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Call $wgContLang-findVariantLink() in {{PAGESINCATEGORY: }} .. Call $wgContLang-findVariantLink() in {{PAGESINCATEGORY: }} Corrects inconsistent return value for number of pages in a category when language variants are in use. Change-Id: I27668ba348c45bc34b264f8771e91e58a9920552 --- M includes/parser/CoreParserFunctions.php 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Nikerabbit: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/parser/CoreParserFunctions.php b/includes/parser/CoreParserFunctions.php index 36bfb48..dbafeba 100644 --- a/includes/parser/CoreParserFunctions.php +++ b/includes/parser/CoreParserFunctions.php @@ -577,6 +577,7 @@ * @return string */ static function pagesincategory( $parser, $name = '', $arg1 = null, $arg2 = null ) { + global $wgContLang; static $magicWords = null; if ( is_null( $magicWords ) ) { $magicWords = new MagicWordArray( array( @@ -606,6 +607,7 @@ if( !$title ) { # invalid title return self::formatRaw( 0, $raw ); } + $wgContLang-findVariantLink( $name, $title, true ); // Normalize name for cache $name = $title-getDBkey(); -- To view, visit https://gerrit.wikimedia.org/r/59793 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I27668ba348c45bc34b264f8771e91e58a9920552 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Liangent liang...@gmail.com Gerrit-Reviewer: Daniel Friesen dan...@nadir-seen-fire.com Gerrit-Reviewer: GWicke gwi...@wikimedia.org Gerrit-Reviewer: Liangent liang...@gmail.com Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com Gerrit-Reviewer: Siebrand siebr...@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] View history link location is not reliable on Sauce browsers... - change (qa/browsertests)
Zfilipin has submitted this change and it was merged. Change subject: View history link location is not reliable on Sauce browsers Bug 53728 .. View history link location is not reliable on Sauce browsers Bug 53728 Change-Id: I3fe272385ab177d46f8595d5999144caf6da86e2 --- M features/page.feature M features/page_edit.feature 2 files changed, 2 insertions(+), 13 deletions(-) Approvals: Zfilipin: Looks good to me, approved jenkins-bot: Verified diff --git a/features/page.feature b/features/page.feature index 7cfe799..aa91b62 100644 --- a/features/page.feature +++ b/features/page.feature @@ -29,7 +29,6 @@ And page text should be there And Discussion link should be there And Edit link should be there - And View History link should be there And unwatch element should be there And watch element should not be there diff --git a/features/page_edit.feature b/features/page_edit.feature index 2b30354..0bd9da2 100644 --- a/features/page_edit.feature +++ b/features/page_edit.feature @@ -15,18 +15,8 @@ Scenario: Read link When I click the Read Link -Then View History link should be there - And Edit link should be there +Then Edit link should be there And Preview button should not be there And Show Changes button should not be there And Save button should not be there - And Edit controls should not be there - - Scenario: View History link -When I click the View History Link -Then Read link should be there - And Edit link should be there - And Preview button should not be there - And Show Changes button should not be there - And Save button should not be there - And Edit controls should not be there + And Edit controls should not be there \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/82632 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3fe272385ab177d46f8595d5999144caf6da86e2 Gerrit-PatchSet: 1 Gerrit-Project: qa/browsertests Gerrit-Branch: master Gerrit-Owner: Cmcmahon cmcma...@wikimedia.org 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] ULS tests now reside in the ULS extension repo, delete them ... - change (qa/browsertests)
Zfilipin has submitted this change and it was merged. Change subject: ULS tests now reside in the ULS extension repo, delete them from here .. ULS tests now reside in the ULS extension repo, delete them from here Change-Id: I705c9c610e9c4e92087597aa2e93c774f5a0d878 --- D features/step_definitions/uls_accept_language_steps.rb D features/step_definitions/uls_cog_sidebar_user_steps.rb D features/step_definitions/uls_ime_steps.rb D features/step_definitions/uls_steps.rb D features/uls.feature D features/uls_accept_language.feature D features/uls_cog_sidebar_anon_user.feature D features/uls_cog_sidebar_logged_user.feature D features/uls_ime.feature 9 files changed, 0 insertions(+), 462 deletions(-) Approvals: Zfilipin: Looks good to me, approved jenkins-bot: Verified diff --git a/features/step_definitions/uls_accept_language_steps.rb b/features/step_definitions/uls_accept_language_steps.rb deleted file mode 100644 index 43275b4..000 --- a/features/step_definitions/uls_accept_language_steps.rb +++ /dev/null @@ -1,11 +0,0 @@ -Given(/^that my browser's accept language is (.+)$/) do |language| - @browser = browser(environment, test_name(@scenario), @saucelabs_username, @saucelabs_key, language) -end - -When(/^I visit a random page$/) do - visit(RandomPage) -end - -Then(/^link to the main page has text (.+)$/) do |text| - on(RandomPage).main_page_element.text.should == text -end diff --git a/features/step_definitions/uls_cog_sidebar_user_steps.rb b/features/step_definitions/uls_cog_sidebar_user_steps.rb deleted file mode 100644 index 0a423f5..000 --- a/features/step_definitions/uls_cog_sidebar_user_steps.rb +++ /dev/null @@ -1,152 +0,0 @@ -Given(/^I am on a page with interlanguage links$/) do - visit InterlanguagePage -end - -Given(/^I am on a page without interlanguage links$/) do - visit NoInterlanguagePage # .add_links_element.when_visible.should be_visible - # cannot do this because of https://bugzilla.wikimedia.org/show_bug.cgi?id=49139 -end - -Given(/^I am on a talk page with interlanguage links$/) do - visit(InterlanguagePage).talk_element.click -end - -Given(/^I am on a talk page without interlanguage links$/) do - visit(NoInterlanguagePage).talk_element.click -end - -Given(/^I navigate to the anonymous Language Settings panel$/) do - step 'I am on a page with interlanguage links' - step 'I click the cog icon by Languages in the sidebar' - step 'I see the anonymous Language Settings panel' -end - -Given(/^I navigate to the Language Settings panel$/) do - step 'I am on a page with interlanguage links' - step 'I click the cog icon by Languages in the sidebar' - step 'I see the Language Settings panel' -end - -When(/^I click Apply Settings$/) do - on(InterlanguagePage).apply_settings_element.click -end - -When(/^I click Cancel$/) do - on(InterlanguagePage).cancel_element.click -end - -Then(/^I click Enable input$/) do - on(InterlanguagePage).enable_input_element.when_visible.click -end - -When(/^I click Fonts$/) do - on(InterlanguagePage).fonts_settings -end - -When(/^I click Input$/) do - on(InterlanguagePage).input_settings_element.click -end - -When(/^I click the button with the ellipsis$/) do - on(InterlanguagePage).ellipsis_button_element.click -end - -When(/^I click the cog icon by Languages in the sidebar$/) do - on(NoInterlanguagePage).cog_element.when_present.click -end - -When(/^I click X$/) do - on(InterlanguagePage).x_element.click -end - -When(/^I navigate to the talk page$/) do - on(InterlanguagePage).talk_element.click -end - -Then(/^a font selectbox appears$/) do - on(InterlanguagePage).content_font_selectbox_element.should be_visible -end - -Then(/^I can disable input methods$/) do - on(InterlanguagePage).disable_input_methods_element.when_visible.should be_visible -end - -Then(/^I can enable input methods$/) do - on(InterlanguagePage).enable_input_element.when_visible.should be_visible -end - -Then(/^I can navigate back to Input Settings$/) do - on(InterlanguagePage) do |page| -page.back_to_input -page.x_element.should be_visible - end -end - -Then(/^I can navigate back to Language Settings$/) do - on(InterlanguagePage) do |page| -page.back_to_display -page.x_element.should be_visible - end -end - -When(/^I choose a different language for writing$/) do - on(InterlanguagePage).non_default_language_element.when_visible.click -end - -Then(/^I do not see the Language Settings panel$/) do - on(InterlanguagePage) do |page| -page.language_button_element.should_not be_visible -page.fonts_button_element.should_not be_visible -page.default_language_button_element.should_not be_visible -page.other_language_button_element.should_not be_visible - end -end - -Then(/^I see Common Languages$/) do - on(InterlanguagePage).language_list.should match Regexp.escape('Common languages') -end - -Then(/^I see Language Search$/) do -
[MediaWiki-commits] [Gerrit] Add test for getOffsetFrom(Element|Text)Node - change (mediawiki...VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: Add test for getOffsetFrom(Element|Text)Node .. Add test for getOffsetFrom(Element|Text)Node Assert the result at every offset in the DOM. Change-Id: I5a8ca28a7ee22c49d23077ad6993499ec726bbb3 --- M modules/ve/test/ce/ve.ce.test.js 1 file changed, 78 insertions(+), 0 deletions(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ve/test/ce/ve.ce.test.js b/modules/ve/test/ce/ve.ce.test.js index 8b4adf4..cb41d72 100644 --- a/modules/ve/test/ce/ve.ce.test.js +++ b/modules/ve/test/ce/ve.ce.test.js @@ -29,3 +29,81 @@ 'SPAN#BA#/A/BSPAN/SPANI#/I#/SPAN' ); } ); + +QUnit.test( 'getOffsetFrom(Element|Text)Node', function ( assert ) { + var i, dom, target, surface, documentModel, documentView, + expected = 0, + testCases = [ + { + 'msg': 'Annotated alien', + 'html': 'pFoobciteBar/cite/bBaz/p', + // CE html summary; + // pFoobspan [protectedNode]citeBar/citeimg [shield]/span/bBaz/p + 'expected': [ + 0, + 1, 1, + 2, + 3, + // TODO: offset 7 should return 4 + 4, 4, 6, + // TODO: offset 16 should return 6 + 6, 6, 6, 6, 6, 6, 6, 6, null, 6, 6, 6, 6, + 7, + 8, + 9, 9, + 10 + ] + } + ]; + + for( i = 0; i testCases.length; i++ ) { + expected += testCases[i].expected.length; + } + + // HACK: one case skips + QUnit.expect( expected - 1 ); + + function testOffsets( parent, testCase, expectedIndex ) { + var i; + switch ( parent.nodeType ) { + case Node.ELEMENT_NODE: + for ( i = 0; i = parent.childNodes.length; i++ ) { + expectedIndex++; + // TODO: expected should never be null + if ( testCase.expected[expectedIndex] !== null ) { + assert.equal( + ve.ce.getOffsetFromElementNode( parent, i ), + testCase.expected[expectedIndex], + testCase.msg + ': offset ' + i + ' in ' + parent.nodeName.toLowerCase() + '' + ); + } + if ( parent.childNodes[i] ) { + expectedIndex = testOffsets( parent.childNodes[i], testCase, expectedIndex ); + } + } + break; + case Node.TEXT_NODE: + for ( i = 0; i = parent.data.length; i++ ) { + expectedIndex++; + assert.equal( + ve.ce.getOffsetFromTextNode( parent, i ), + testCase.expected[expectedIndex], + testCase.msg + ': offset ' + i + ' in ' + parent.data + '' + ); + } + break; + } + return expectedIndex; + } + + for( i = 0; i testCases.length; i++ ) { + dom = ve.createDocumentFromHtml( testCases[i].html ); + target = new ve.init.sa.Target( $( '#qunit-fixture' ), dom ); + surface = target.surface; + documentModel = surface.getModel().getDocument(); + documentView = surface.getView().getDocument(); + + testOffsets( documentView.documentNode.$[0], testCases[i], -1 ); + } +} ); + -- To view, visit https://gerrit.wikimedia.org/r/82770 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5a8ca28a7ee22c49d23077ad6993499ec726bbb3 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner:
[MediaWiki-commits] [Gerrit] Fix getOffsetFrom(Element|Text)Node for annotated aliens - change (mediawiki...VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: Fix getOffsetFrom(Element|Text)Node for annotated aliens .. Fix getOffsetFrom(Element|Text)Node for annotated aliens * Replace addOuterLength with a recursionDirection as we only want to add length when the first recursion was to the left, and add nothing if we recursed to the right. * Use isContentEditable which is the proper calculated boolean. contentEditable is often just (string)'inherit' :/ Mercifully this works in in IE. * Only check for the IE ce bug if we aren't recursing at all. Bug: 53766 Change-Id: I247d1b68484cb510335b5f6789269ec254376cfe --- M modules/ve/ce/ve.ce.js M modules/ve/test/ce/ve.ce.test.js 2 files changed, 24 insertions(+), 23 deletions(-) Approvals: Esanders: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ve/ce/ve.ce.js b/modules/ve/ce/ve.ce.js index 8ab47d4..98cb01d 100644 --- a/modules/ve/ce/ve.ce.js +++ b/modules/ve/ce/ve.ce.js @@ -191,13 +191,12 @@ * @method * @param {HTMLElement} domNode DOM node * @param {number} domOffset DOM offset within the DOM Element - * @param {boolean} [addOuterLength] Use outer length, which includes wrappers if any exist + * @param {number} [firstRecursionDirection] Which direction the first recursive call went in (+/-1) * @returns {number} Linear model offset */ -ve.ce.getOffsetFromElementNode = function ( domNode, domOffset, addOuterLength ) { - var $domNode = $( domNode ), - nodeModel, - node; +ve.ce.getOffsetFromElementNode = function ( domNode, domOffset, firstRecursionDirection ) { + var direction, nodeModel, node, + $domNode = $( domNode ); if ( $domNode.hasClass( 've-ce-branchNode-slug' ) ) { if ( $domNode.prev().length ) { @@ -211,8 +210,8 @@ } // IE sometimes puts the cursor in a text node inside ce=false. BAD! - if ( domNode.contentEditable === 'false' ) { - nodeModel = $domNode.data( 'view' ).getModel(); + if ( !firstRecursionDirection !domNode.isContentEditable ) { + nodeModel = $domNode.closest( '.ve-ce-branchNode, .ve-ce-leafNode' ).data( 'view' ).getModel(); return nodeModel.getOffset() + nodeModel.getOuterLength(); } @@ -220,22 +219,30 @@ node = $domNode.data( 'view' ); if ( node node instanceof ve.ce.Node ) { nodeModel = $domNode.data( 'view' ).getModel(); - if ( addOuterLength === true ) { + if ( firstRecursionDirection === -1 ) { return nodeModel.getOffset() + nodeModel.getOuterLength(); + } else if ( firstRecursionDirection === 1 ) { + return nodeModel.getOffset(); } else { return nodeModel.getOffset() + ( nodeModel.isWrapped() ? 1 : 0 ); } } else { node = $domNode.contents().last()[0]; + if ( !firstRecursionDirection ) { + direction = 1; + } } } else { node = $domNode.contents()[ domOffset - 1 ]; + if ( !firstRecursionDirection ) { + direction = -1; + } } if ( node.nodeType === Node.TEXT_NODE ) { return ve.ce.getOffsetFromTextNode( node, node.length ); } else { - return ve.ce.getOffsetFromElementNode( node, 0, true ); + return ve.ce.getOffsetFromElementNode( node, 0, direction ); } }; diff --git a/modules/ve/test/ce/ve.ce.test.js b/modules/ve/test/ce/ve.ce.test.js index cb41d72..fc07fd7 100644 --- a/modules/ve/test/ce/ve.ce.test.js +++ b/modules/ve/test/ce/ve.ce.test.js @@ -44,10 +44,8 @@ 1, 1, 2, 3, - // TODO: offset 7 should return 4 - 4, 4, 6, - // TODO: offset 16 should return 6 - 6, 6, 6, 6, 6, 6, 6, 6, null, 6, 6, 6, 6, + 4, 4, 4, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8, 9, 9, @@ -60,8 +58,7 @@ expected += testCases[i].expected.length; } - // HACK: one case skips - QUnit.expect( expected - 1 ); + QUnit.expect( expected ); function testOffsets( parent, testCase, expectedIndex ) { var i;
[MediaWiki-commits] [Gerrit] Allow Custom Banner Categories - change (mediawiki...CentralNotice)
Mwalker has uploaded a new change for review. https://gerrit.wikimedia.org/r/82804 Change subject: Allow Custom Banner Categories .. Allow Custom Banner Categories This allows banners to hide/show based on a completely user custom category definition. Also; modifications were made to Special:HideBanners to allow for eventual cross site custom hiding in much the same way that fundraising currently does it. Change-Id: I26e53fef0ad083c031809a6981741580fab92eda --- M CentralNotice.i18n.php M CentralNoticeBannerLogPager.php M includes/Banner.php M modules/ext.centralNotice.bannerController/bannerController.js M special/SpecialBannerLoader.php M special/SpecialCentralNoticeBanners.php M special/SpecialHideBanners.php 7 files changed, 92 insertions(+), 85 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralNotice refs/changes/04/82804/1 diff --git a/CentralNotice.i18n.php b/CentralNotice.i18n.php index fe0d7f9..ffa776b 100644 --- a/CentralNotice.i18n.php +++ b/CentralNotice.i18n.php @@ -208,10 +208,8 @@ 'centralnotice-user-role-anonymous' = 'Anonymous', 'centralnotice-user-role-logged-in' = 'Logged-in', 'centralnotice-banner-messages' = 'Translatable banner messages', - 'centralnotice-banner-class' = 'Class', - 'centralnotice-banner-class-desc' = 'Banners of a specific class share tracking variables and group settings (e.g. hide cookies and impression counts.)', - 'centralnotice-banner-class-generic' = 'Generic', - 'centralnotice-banner-class-fundraising' = 'Fundraising', + 'centralnotice-banner-class' = 'Category', + 'centralnotice-banner-class-desc' = 'Banners of a specific category share tracking variables and group settings (e.g. hide cookies and impression counts.) Category names can be magic words like {{{campaign}}} or {{{banner}}} which will be automatically expanded at display time. Custom values must be alphanumeric.', 'centralnotice-templates-included' = 'Included templates', 'centralnotice-archive-banner' = 'Archive', @@ -635,24 +633,14 @@ 'centralnotice-user-role-anonymous' = 'Label for the anonymous user role. {{Identical|Anonymous}}', 'centralnotice-user-role-logged-in' = 'Label for the logged-in user role', - 'centralnotice-banner-class' = 'Used as label for the select box. + 'centralnotice-banner-class' = 'Used as label for a select box that allows a user to choose or create a label for the banner. -Followed by the following options: -* {{msg-mw|Centralnotice-banner-class-generic}} -* {{msg-mw|Centralnotice-banner-class-fundraising}} - -The help message for the select box is {{msg-mw|Centralnotice-banner-class-desc}}. -{{Identical|Class}}', +The help message for the select box is {{msg-mw|Centralnotice-banner-class-desc}}.', 'centralnotice-banner-class-desc' = 'Used as help message for the {{msg-mw|Centralnotice-banner-class}} select box which has the following options: -* {{msg-mw|Centralnotice-banner-class-generic}} -* {{msg-mw|Centralnotice-banner-class-fundraising}} A hide cookie is a cookie that is created when a user asks to hide a banner. Impression is an instance of showing the banner to a reader. For example, the banner was shown to the site readers a hundred times, then the impression count is 100.', - 'centralnotice-banner-class-generic' = 'Used as an option in the {{msg-mw|Centralnotice-banner-class}} select box.', - 'centralnotice-banner-class-fundraising' = 'Used as an option in the {{msg-mw|Centralnotice-banner-class}} select box. -{{Identical|Fundraising}}', 'centralnotice-templates-included' = 'Used as label for the list of included templates.', 'centralnotice-archive-banner' = 'Translate as a verb.{{Identical|Archive}}', 'centralnotice-archive-banner-title' = 'Used as title for the dialog box. diff --git a/CentralNoticeBannerLogPager.php b/CentralNoticeBannerLogPager.php index c8e4a51..e6e93d5 100644 --- a/CentralNoticeBannerLogPager.php +++ b/CentralNoticeBannerLogPager.php @@ -151,8 +151,8 @@ )-text() . br/; $details .= $this-msg( 'centralnotice-log-label', - $this-msg( 'centralnotice-fundraising' )-text(), - ($row-tmplog_end_fundraising ? 'on' : 'off') + $this-msg( 'centralnotice-category' )-text(), + ($row-tmplog_end_category ? 'on' : 'off') )-text() . br/; $details .= $this-msg( 'centralnotice-log-label', @@ -177,7 +177,7 @@ function showChanges( $row ) { $details = $this-testBooleanChange( 'anon', $row ); $details .= $this-testBooleanChange( 'account', $row ); - $details .= $this-testBooleanChange( 'fundraising', $row ); +
[MediaWiki-commits] [Gerrit] Replace Gmetric implementation - change (operations/puppet)
Ori.livneh has uploaded a new change for review. https://gerrit.wikimedia.org/r/82805 Change subject: Replace Gmetric implementation .. Replace Gmetric implementation I didn't like gmetric.js's quality and I thought it might gain something by way of concision if it were re-written. I did so (and tested) and it works. Change-Id: I0c3198d122511aa856906e9bd7b8233a4dbda332 --- M modules/statsd/files/backends/ganglia.js D modules/statsd/files/backends/gmetric.js M modules/statsd/manifests/init.pp 3 files changed, 65 insertions(+), 540 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/05/82805/1 diff --git a/modules/statsd/files/backends/ganglia.js b/modules/statsd/files/backends/ganglia.js index d2d58f1..7f6e36b 100644 --- a/modules/statsd/files/backends/ganglia.js +++ b/modules/statsd/files/backends/ganglia.js @@ -23,6 +23,64 @@ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +function Xdr( bufSize ) { +this.b = new Buffer( bufSize ); +this.b.fill( 0 ); +this.ptr = 0; +} + +Xdr.prototype.pack = function ( type, value ) { +switch ( type ) { +case 'int': +this.b.writeInt32BE( value, this.ptr ); +this.ptr += 4; +break; +case 'string': +this.pack( 'int', value.length ); +this.b.write( value, this.ptr ); +this.ptr += ( ( Buffer.byteLength( value ) + 3 ) ~0x03 ); +break; +case 'boolean': +this.pack( 'int', value ? 1 : 0 ); +break; +} +}; + +Xdr.prototype.getBytes = function () { +return this.b.slice( 0, this.ptr ); +}; + +Xdr.meta = function ( metric ) { +var xdr = new Xdr( 1024 ); + +xdr.pack( 'int', 128 ); +xdr.pack( 'string', metric.hostname ); +xdr.pack( 'string', metric.name ); +xdr.pack( 'boolean', metric.spoof ); +xdr.pack( 'string', metric.type ); +xdr.pack( 'string', metric.name ); +xdr.pack( 'string', metric.units ); +xdr.pack( 'int', metric.slope ); +xdr.pack( 'int', metric.tmax ); +xdr.pack( 'int', metric.dmax ); +xdr.pack( 'int', 1 ); +xdr.pack( 'string', 'GROUP' ); +xdr.pack( 'string', metric.group ); +return xdr.getBytes(); +}; + +Xdr.data = function ( metric ) { +var xdr = new Xdr( 512 ); + +xdr.pack( 'int', 133 ); +xdr.pack( 'string', metric.hostname ); +xdr.pack( 'string', metric.name ); +xdr.pack( 'boolean', metric.spoof ); +xdr.pack( 'string', '%s' ); +xdr.pack( 'string', metric.value.toString() ); +return xdr.getBytes(); +}; + function logSocketError( err, bytes ) { if ( err ) console.log( err ); } @@ -72,13 +130,11 @@ } } - var os = require( 'os' ); var util = require( 'util' ); var dgram = require( 'dgram' ); -var Gmetric = require( './gmetric' ); -var gmetric = new Gmetric(); +var slopes = [ 'zero', 'positive', 'negative', 'both', 'unspecified' ]; var blankGroup = { count : 0, @@ -137,7 +193,7 @@ name : args.join('_'), } ); if ( typeof opts.slope === 'string' ) { -opts.slope = Gmetric.slope[opts.slope.toLowerCase()]; +opts.slope = slopes.indexOf( opts.slope ); } ganglia.items.push( opts ); }, @@ -173,15 +229,16 @@ ganglia.dispatch(); }, dispatch : function () { -var packed, metric; +var metric, meta, data; ganglia.flushed = Math.floor( new Date() / 1000 ); while ( ( metric = ganglia.items.shift() ) !== undefined ) { -packed = gmetric.pack(metric); -socket.send( packed.meta, 0, packed.meta.length, +meta = Xdr.meta( metric ); +socket.send( meta, 0, meta.length, backendConfig.gangliaPort, backendConfig.gangliaHost, logSocketError ); -socket.send( packed.data, 0, packed.data.length, +data = Xdr.data( metric ); +socket.send( data, 0, data.length, backendConfig.gangliaPort, backendConfig.gangliaHost, logSocketError ); ganglia.sent++; diff --git a/modules/statsd/files/backends/gmetric.js b/modules/statsd/files/backends/gmetric.js deleted file mode 100644 index c9a4bd4..000 --- a/modules/statsd/files/backends/gmetric.js +++ /dev/null @@ -1,527 +0,0 @@ -/** - * Gmetric.js - * Gmetric packet submission for node.js - * https://github.com/jbuchbinder/node-gmetric - * - * Copyright (C) 2013 Jeff Buchbinder, and other contributors. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the Software), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is -
[MediaWiki-commits] [Gerrit] Check return code of git pull to avoid false positives - change (translatewiki)
Nikerabbit has uploaded a new change for review. https://gerrit.wikimedia.org/r/82807 Change subject: Check return code of git pull to avoid false positives .. Check return code of git pull to avoid false positives Change-Id: I20729fd5ff1093e8729cdd108e9010ae133c9b1f --- M bin/wikiupdate-repo 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/07/82807/1 diff --git a/bin/wikiupdate-repo b/bin/wikiupdate-repo index e729186..20fca72 100755 --- a/bin/wikiupdate-repo +++ b/bin/wikiupdate-repo @@ -2,8 +2,9 @@ cd $1 OUTPUT=$(git pull --quiet --rebase 21 -) +CODE=$? -if [ $OUTPUT != ]; then +if [ $CODE -ne 0 ]; then printf \033[31m%s failed to update\033[0m\n $1; echo $OUTPUT; fi -- To view, visit https://gerrit.wikimedia.org/r/82807 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I20729fd5ff1093e8729cdd108e9010ae133c9b1f Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Enable voting for mwext-MassMessage-jslint - change (integration/zuul-config)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/82806 Change subject: Enable voting for mwext-MassMessage-jslint .. Enable voting for mwext-MassMessage-jslint Change-Id: I92ed93e97a440dc089e85486dd14c1ec84ef126c --- M layout.yaml 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/zuul-config refs/changes/06/82806/1 diff --git a/layout.yaml b/layout.yaml index f23a71d..2dc02e6 100644 --- a/layout.yaml +++ b/layout.yaml @@ -389,6 +389,8 @@ voting: true - name: mwext-Math-jslint voting: true + - name: mwext-MassMessage-jslint +voting: true - name: mwext-MobileFrontend-jslint voting: true - name: mwext-NewestPages-jslint -- To view, visit https://gerrit.wikimedia.org/r/82806 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I92ed93e97a440dc089e85486dd14c1ec84ef126c Gerrit-PatchSet: 1 Gerrit-Project: integration/zuul-config Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Enable voting for mwext-MassMessage-jslint - change (integration/zuul-config)
jenkins-bot has submitted this change and it was merged. Change subject: Enable voting for mwext-MassMessage-jslint .. Enable voting for mwext-MassMessage-jslint Change-Id: I92ed93e97a440dc089e85486dd14c1ec84ef126c --- M layout.yaml 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/layout.yaml b/layout.yaml index f23a71d..2dc02e6 100644 --- a/layout.yaml +++ b/layout.yaml @@ -389,6 +389,8 @@ voting: true - name: mwext-Math-jslint voting: true + - name: mwext-MassMessage-jslint +voting: true - name: mwext-MobileFrontend-jslint voting: true - name: mwext-NewestPages-jslint -- To view, visit https://gerrit.wikimedia.org/r/82806 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I92ed93e97a440dc089e85486dd14c1ec84ef126c Gerrit-PatchSet: 1 Gerrit-Project: integration/zuul-config Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com 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] TwnMainPage has unit tests now - change (integration/zuul-config)
Nikerabbit has uploaded a new change for review. https://gerrit.wikimedia.org/r/82809 Change subject: TwnMainPage has unit tests now .. TwnMainPage has unit tests now Change-Id: I285d5ec22eb33a324223a16323995360e70be124 --- M layout.yaml 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/zuul-config refs/changes/09/82809/1 diff --git a/layout.yaml b/layout.yaml index f23a71d..395829c 100644 --- a/layout.yaml +++ b/layout.yaml @@ -2154,10 +2154,12 @@ - mwext-TwnMainPage-jslint - mwext-TwnMainPage-phpcs-HEAD - mwext-TwnMainPage-lint +- mwext-TwnMainPage-testextensions-master gate-and-submit: - mwext-TwnMainPage-jslint - mwext-TwnMainPage-phpcs-HEAD - mwext-TwnMainPage-lint +- mwext-TwnMainPage-testextensions-master - name: mediawiki/extensions/UnicodeConverter template: -- To view, visit https://gerrit.wikimedia.org/r/82809 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I285d5ec22eb33a324223a16323995360e70be124 Gerrit-PatchSet: 1 Gerrit-Project: integration/zuul-config Gerrit-Branch: master Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add i18n file - change (mediawiki...Sarcasm)
Raimond Spekking has uploaded a new change for review. https://gerrit.wikimedia.org/r/82808 Change subject: Add i18n file .. Add i18n file Change-Id: Ic955f8cfa9ef61366f29969b7a4e5d00a79e024b --- A Sarcasm.i18n.php M sarcasm.php 2 files changed, 27 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Sarcasm refs/changes/08/82808/1 diff --git a/Sarcasm.i18n.php b/Sarcasm.i18n.php new file mode 100644 index 000..68f3546 --- /dev/null +++ b/Sarcasm.i18n.php @@ -0,0 +1,23 @@ +?php +/** + * Internationalisation file for extension Sarcasm. + * + * @file + * @ingroup Extensions + */ + +$messages = array(); + +/** English + * @author Inquisitor Ehrenstein + */ +$messages['en'] = array( + 'sarcasm-desc' = 'Adds codelt;sarcasm/code tag in order to more clearly show sarcasm in text', +); + +/** Message documentation (Message documentation) + * @author Raimond Spekking + */ +$messages['qqq'] = array( + 'sarcasm-desc' = '{{desc|name=Sarcasm|url=https://www.mediawiki.org/wiki/Extension:Sarcasm}}', +); diff --git a/sarcasm.php b/sarcasm.php index e02f087..0ef8740 100644 --- a/sarcasm.php +++ b/sarcasm.php @@ -28,9 +28,12 @@ 'version'= '1.0', 'author' = '[http://sturmkrieg.de/User:Inquisitor_Ehrenstein Inquisitor Ehrenstein]', 'url'= 'https://www.mediawiki.org/wiki/Extension:Sarcasm', -'description'= 'This extension adds sarcasm tags to the wiki in order to more clearly show sarcasm in text.', +'descriptionmsg' = 'sarcasm-desc', ); +// i18n +$wgExtensionMessagesFiles['Sarcasm'] = __DIR__ . '/Sarcasm.i18n.php'; + $wgHooks['ParserFirstCallInit'][] = 'wfSarcasmParserInit'; /** -- To view, visit https://gerrit.wikimedia.org/r/82808 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic955f8cfa9ef61366f29969b7a4e5d00a79e024b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Sarcasm 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] Cucumber: simplify css selectors for labels and descriptions - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Cucumber: simplify css selectors for labels and descriptions .. Cucumber: simplify css selectors for labels and descriptions Change-Id: Id546906ad77f4fa0056117a317d143b7a5c3d801 --- M selenium_cuc/features/support/modules/entity_module.rb 1 file changed, 12 insertions(+), 12 deletions(-) Approvals: Tobias Gritschacher: Looks good to me, approved Zfilipin: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/selenium_cuc/features/support/modules/entity_module.rb b/selenium_cuc/features/support/modules/entity_module.rb index 768b3ad..2315f94 100644 --- a/selenium_cuc/features/support/modules/entity_module.rb +++ b/selenium_cuc/features/support/modules/entity_module.rb @@ -27,22 +27,22 @@ h1(:uiPropertyEdittool, :class = wb-ui-propertyedittool) span(:entityLabelSpan, :xpath = //h1[contains(@class, 'wb-firstHeading')]/span/span) text_field(:labelInputField, :xpath = //h1[contains(@class, 'wb-firstHeading')]/span/span/input) - link(:editLabelLink,:css = h1.wb-firstHeading .wikibase-toolbar a.wikibase-toolbarbutton:not(.wikibase-toolbarbutton-disabled):nth-child(1)) - link(:editLabelLinkDisabled,:css = h1.wb-firstHeading .wikibase-toolbar a.wikibase-toolbarbutton-disabled:nth-child(1)) - link(:saveLabelLink,:css = h1.wb-firstHeading .wikibase-toolbar a.wikibase-toolbarbutton:not(.wikibase-toolbarbutton-disabled):nth-child(1)) - link(:saveLabelLinkDisabled,:css = h1.wb-firstHeading .wikibase-toolbar a.wikibase-toolbarbutton-disabled:nth-child(1)) - link(:cancelLabelLink, :css = h1.wb-firstHeading .wikibase-toolbar a.wikibase-toolbarbutton:not(.wikibase-toolbarbutton-disabled):nth-child(2)) - link(:cancelLabelLinkDisabled, :css = h1.wb-firstHeading .wikibase-toolbar a.wikibase-toolbarbutton-disabled:nth-child(2)) + link(:editLabelLink, :css = h1.wb-firstHeading a.wikibase-toolbareditgroup-editbutton:not(.wikibase-toolbarbutton-disabled)) + link(:editLabelLinkDisabled, :css = h1.wb-firstHeading a.wikibase-toolbareditgroup-editbutton.wikibase-toolbarbutton-disabled) + link(:saveLabelLink, :css = h1.wb-firstHeading a.wikibase-toolbareditgroup-savebutton:not(.wikibase-toolbarbutton-disabled)) + link(:saveLabelLinkDisabled, :css = h1.wb-firstHeading a.wikibase-toolbareditgroup-savebutton.wikibase-toolbarbutton-disabled) + link(:cancelLabelLink, :css = h1.wb-firstHeading a.wikibase-toolbareditgroup-cancelbutton:not(.wikibase-toolbarbutton-disabled)) + link(:cancelLabelLinkDisabled, :css = h1.wb-firstHeading a.wikibase-toolbareditgroup-cancelbutton.wikibase-toolbarbutton-disabled) # description UI span(:entityDescriptionSpan, :xpath = //div[contains(@class, 'wb-ui-descriptionedittool')]/span[contains(@class, 'wb-property-container-value')]/span) text_field(:descriptionInputField, :xpath = //div[contains(@class, 'wb-ui-descriptionedittool')]/span[contains(@class, 'wb-property-container-value')]/span/input) - link(:editDescriptionLink, :css = div.wb-ui-descriptionedittool .wikibase-toolbar a.wikibase-toolbarbutton:not(.wikibase-toolbarbutton-disabled):nth-child(1)) - link(:editDescriptionLinkDisabled, :css = div.wb-ui-descriptionedittool .wikibase-toolbar a.wikibase-toolbarbutton-disabled:nth-child(1)) - link(:saveDescriptionLink, :css = div.wb-ui-descriptionedittool .wikibase-toolbar a.wikibase-toolbarbutton:not(.wikibase-toolbarbutton-disabled):nth-child(1)) - link(:saveDescriptionLinkDisabled, :css = div.wb-ui-descriptionedittool .wikibase-toolbar a.wikibase-toolbarbutton-disabled:nth-child(1)) - link(:cancelDescriptionLink, :css = div.wb-ui-descriptionedittool .wikibase-toolbar a.wikibase-toolbarbutton:not(.wikibase-toolbarbutton-disabled):nth-child(2)) - link(:cancelDescriptionLinkDisabled, :css = div.wb-ui-descriptionedittool .wikibase-toolbar a.wikibase-toolbarbutton-disabled:nth-child(2)) + link(:editDescriptionLink, :css = div.wb-ui-descriptionedittool a.wikibase-toolbareditgroup-editbutton:not(.wikibase-toolbarbutton-disabled)) + link(:editDescriptionLinkDisabled, :css = div.wb-ui-descriptionedittool a.wikibase-toolbareditgroup-editbutton.wikibase-toolbarbutton-disabled) + link(:saveDescriptionLink, :css = div.wb-ui-descriptionedittool a.wikibase-toolbareditgroup-savebutton:not(.wikibase-toolbarbutton-disabled)) + link(:saveDescriptionLinkDisabled, :css = div.wb-ui-descriptionedittool a.wikibase-toolbareditgroup-savebutton.wikibase-toolbarbutton-disabled) + link(:cancelDescriptionLink, :css = div.wb-ui-descriptionedittool a.wikibase-toolbareditgroup-cancelbutton:not(.wikibase-toolbarbutton-disabled)) + link(:cancelDescriptionLinkDisabled, :css = div.wb-ui-descriptionedittool a.wikibase-toolbareditgroup-cancelbutton.wikibase-toolbarbutton-disabled) span(:apiCallWaitingMessage, :class =
[MediaWiki-commits] [Gerrit] TwnMainPage has unit tests now - change (integration/zuul-config)
jenkins-bot has submitted this change and it was merged. Change subject: TwnMainPage has unit tests now .. TwnMainPage has unit tests now Change-Id: I285d5ec22eb33a324223a16323995360e70be124 --- M layout.yaml 1 file changed, 8 insertions(+), 2 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/layout.yaml b/layout.yaml index 2dc02e6..b9b4b70 100644 --- a/layout.yaml +++ b/layout.yaml @@ -2152,14 +2152,20 @@ extname: TrustedXFF - name: mediawiki/extensions/TwnMainPage -check-only: +check: - mwext-TwnMainPage-jslint - mwext-TwnMainPage-phpcs-HEAD - mwext-TwnMainPage-lint +test: + - mwext-TwnMainPage-jslint + - mwext-TwnMainPage-phpcs-HEAD + - mwext-TwnMainPage-lint: +- mwext-TwnMainPage-testextensions-master gate-and-submit: - mwext-TwnMainPage-jslint - mwext-TwnMainPage-phpcs-HEAD - - mwext-TwnMainPage-lint + - mwext-TwnMainPage-lint: +- mwext-TwnMainPage-testextensions-master - name: mediawiki/extensions/UnicodeConverter template: -- To view, visit https://gerrit.wikimedia.org/r/82809 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I285d5ec22eb33a324223a16323995360e70be124 Gerrit-PatchSet: 5 Gerrit-Project: integration/zuul-config Gerrit-Branch: master Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com 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] No need for raw resources now - change (mediawiki...MobileFrontend)
MaxSem has uploaded a new change for review. https://gerrit.wikimedia.org/r/82810 Change subject: No need for raw resources now .. No need for raw resources now Change-Id: I5c2bc2885fc453c316c12b2ddb649ca43e6f4feb --- M includes/Resources.php 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/10/82810/1 diff --git a/includes/Resources.php b/includes/Resources.php index cb7c472..ee0dced 100644 --- a/includes/Resources.php +++ b/includes/Resources.php @@ -31,7 +31,6 @@ * A boilerplate containing common properties for all RL modules served to mobile site */ $wgMFMobileResourceBoilerplate = array( - 'raw' = true, 'localBasePath' = $localBasePath, 'remoteExtPath' = $remoteExtPath, 'targets' = array( 'mobile', 'desktop' ), -- To view, visit https://gerrit.wikimedia.org/r/82810 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5c2bc2885fc453c316c12b2ddb649ca43e6f4feb Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: MaxSem maxsem.w...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add full-stops to error messages - change (mediawiki...FeaturedFeeds)
Shirayuki has uploaded a new change for review. https://gerrit.wikimedia.org/r/82811 Change subject: Add full-stops to error messages .. Add full-stops to error messages Change-Id: I341492bb11865bf8f627a8d4ddf22c0c847eb0fd --- M FeaturedFeeds.i18n.php 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/FeaturedFeeds refs/changes/11/82811/1 diff --git a/FeaturedFeeds.i18n.php b/FeaturedFeeds.i18n.php index 8e66dcd..e033454 100644 --- a/FeaturedFeeds.i18n.php +++ b/FeaturedFeeds.i18n.php @@ -13,11 +13,11 @@ */ $messages['en'] = array( 'ffeed-desc' = Adds syndication feeds of wiki's featured content, - 'ffeed-no-feed' = 'Feed not specified', - 'ffeed-feed-not-found' = 'Feed $1 not found', - 'ffeed-entry-not-found' = 'Feed entry for $1 not found', + 'ffeed-no-feed' = 'Feed not specified.', + 'ffeed-feed-not-found' = 'Feed $1 not found.', + 'ffeed-entry-not-found' = 'Feed entry for $1 not found.', 'ffeed-sidebar-section' = 'Featured content feeds', - 'ffeed-invalid-timestamp' = 'Invalid feed timestamp', + 'ffeed-invalid-timestamp' = 'Invalid feed timestamp.', 'ffeed-enable-sidebar-links' = '-', # do not localise # Featured Article -- To view, visit https://gerrit.wikimedia.org/r/82811 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I341492bb11865bf8f627a8d4ddf22c0c847eb0fd Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/FeaturedFeeds Gerrit-Branch: master Gerrit-Owner: Shirayuki shirayuk...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make JSHint voting for GettingStarted - change (integration/zuul-config)
jenkins-bot has submitted this change and it was merged. Change subject: Make JSHint voting for GettingStarted .. Make JSHint voting for GettingStarted Change-Id: Iee26ecc9ba8ad2e2e2eacf83c1cef705efa25ea9 --- M layout.yaml 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/layout.yaml b/layout.yaml index b9b4b70..d62e33a 100644 --- a/layout.yaml +++ b/layout.yaml @@ -381,6 +381,8 @@ voting: true - name: mwext-EventLogging-jslint voting: true + - name: mwext-GettingStarted-jslint +voting: true - name: mwext-GuidedTour-jslint voting: true - name: mwext-GlobalBlocking-jslint -- To view, visit https://gerrit.wikimedia.org/r/82802 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iee26ecc9ba8ad2e2e2eacf83c1cef705efa25ea9 Gerrit-PatchSet: 2 Gerrit-Project: integration/zuul-config Gerrit-Branch: master Gerrit-Owner: Mattflaschen mflasc...@wikimedia.org Gerrit-Reviewer: Hashar has...@free.fr Gerrit-Reviewer: Spage sp...@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] Store compressed JSON since size is limited - change (mediawiki...TemplateData)
jenkins-bot has submitted this change and it was merged. Change subject: Store compressed JSON since size is limited .. Store compressed JSON since size is limited We only have 65535 bytes, let's use them wisely. Prior to Ib2db241a in core (1.22wmf12) even binary page properties were sometimes shown as plaintext (e.g. on Special:PagesWithProp). Thus this introduces a soft dependency on that change. No backwards-incompatible changes were made in public methods. Added two new ones: * Add TemplateDataBlob#getJSONForDatabase which returns compressed JSON, use it where applicable. * Add TemplateDataBlob::newFromDatabase which accept compressed and uncompressed JSON, use it where applicable. Use a long pseudorandom string in the test. Bug: 51740 Change-Id: Ie66b0dd6b6dab6f8648e78595c41e52d9c704d57 --- M TemplateData.hooks.php M TemplateDataBlob.php M api/ApiTemplateData.php M tests/TemplateDataBlobTest.php 4 files changed, 52 insertions(+), 6 deletions(-) Approvals: Catrope: Looks good to me, approved Jforrester: Looks good to me, approved jenkins-bot: Verified diff --git a/TemplateData.hooks.php b/TemplateData.hooks.php index c21b5e5..ccfc87b 100644 --- a/TemplateData.hooks.php +++ b/TemplateData.hooks.php @@ -85,7 +85,7 @@ return 'div class=error' . $status-getHtml() . '/div'; } - $parser-getOutput()-setProperty( 'templatedata', $ti-getJSON() ); + $parser-getOutput()-setProperty( 'templatedata', $ti-getJSONForDatabase() ); $parser-getOutput()-addModules( 'ext.templateData' ); diff --git a/TemplateDataBlob.php b/TemplateDataBlob.php index cec94ef..9270c32 100644 --- a/TemplateDataBlob.php +++ b/TemplateDataBlob.php @@ -26,11 +26,16 @@ private $status; /** -* @param string $json +* Parse and validate passed JSON and create a TemplateDataBlob object. +* Accepts and handles user-provided data. +* +* @param string $json +* @throws MWException * @return TemplateInfo */ public static function newFromJSON( $json ) { $tdb = new self( json_decode( $json ) ); + $status = $tdb-parse(); if ( !$status-isOK() ) { @@ -39,6 +44,20 @@ } $tdb-status = $status; return $tdb; + } + + /** +* Parse and validate passed JSON (possibly gzip-compressed) and create a TemplateDataBlob object. +* +* @param string $json +* @return TemplateInfo +*/ + public static function newFromDatabase( $json ) { + // Handle GZIP compression. \037\213 is the header for GZIP files. + if ( substr( $json, 0, 2 ) === \037\213 ) { + $json = gzdecode( $json ); + } + return self::newFromJSON( $json ); } /** @@ -308,7 +327,7 @@ } } - $length = strlen( $this-getJSON() ); + $length = strlen( $this-getJSONForDatabase() ); if ( $length self::MAX_LENGTH ) { return Status::newFatal( 'templatedata-invalid-length', $length, self::MAX_LENGTH ); } @@ -346,6 +365,13 @@ return json_encode( $this-data ); } + /** +* @return string JSON, gzip-compressed +*/ + public function getJSONForDatabase() { + return gzencode( $this-getJSON() ); + } + public function getHtml( Language $lang ) { global $wgContLang; $langCode = $wgContLang-getCode(); diff --git a/api/ApiTemplateData.php b/api/ApiTemplateData.php index bf6b138..dc3b5a1 100644 --- a/api/ApiTemplateData.php +++ b/api/ApiTemplateData.php @@ -80,7 +80,7 @@ foreach ( $res as $row ) { $rawData = $row-pp_value; - $tdb = TemplateDataBlob::newFromJSON( $rawData ); + $tdb = TemplateDataBlob::newFromDatabase( $rawData ); $status = $tdb-getStatus(); if ( !$status-isOK() ) { $this-dieUsage( diff --git a/tests/TemplateDataBlobTest.php b/tests/TemplateDataBlobTest.php index 10a2498..712d84a 100644 --- a/tests/TemplateDataBlobTest.php +++ b/tests/TemplateDataBlobTest.php @@ -10,6 +10,25 @@ ) ); } + /** +* Helper method to generate a string that gzip can't compress. +* +* Output is consistent when given the same seed. +*/ + private static function generatePseudorandomString( $length, $seed ) { + mt_srand( $seed ); + + $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; +
[MediaWiki-commits] [Gerrit] Make ExternalChangeLine more robust. - change (mediawiki...Wikibase)
Daniel Kinzler has uploaded a new change for review. https://gerrit.wikimedia.org/r/82812 Change subject: Make ExternalChangeLine more robust. .. Make ExternalChangeLine more robust. This removes some assumptions from ExternalChangeLine. This also adds a test case for ExternalChangeLine, but does not fully implement it. Change-Id: I63b62e60ffee2f2c3af8c445f3723f6d68018442 --- M client/includes/recentchanges/ExternalChangesLine.php A client/tests/phpunit/includes/recentchanges/ExternalChangesLineTest.php 2 files changed, 103 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/12/82812/1 diff --git a/client/includes/recentchanges/ExternalChangesLine.php b/client/includes/recentchanges/ExternalChangesLine.php index 7c1cf18..988d5f5 100644 --- a/client/includes/recentchanges/ExternalChangesLine.php +++ b/client/includes/recentchanges/ExternalChangesLine.php @@ -147,12 +147,16 @@ if ( is_array( $comment ) ) { if ( $entityData['type'] === 'wikibase-item~add' ) { // @todo: provide a link to the entity + // @todo: move this to SiteLinkCommentCreator $message = wfMessage( 'wikibase-comment-linked' )-text(); } else if ( array_key_exists( 'sitelink', $comment ) ) { // @fixme site link change message $message = wfMessage( 'wikibase-comment-update' )-text(); - } else { + } elseif ( array_key_exists( 'message', $comment ) ) { $message = wfMessage( $comment['message'] )-text(); + } else { + wfLogWarning( __METHOD__ . ': comment array is missing message field!' ); + $message = wfMessage( 'wikibase-comment-update' )-text(); } } else { $msg = wfMessage( $comment ); diff --git a/client/tests/phpunit/includes/recentchanges/ExternalChangesLineTest.php b/client/tests/phpunit/includes/recentchanges/ExternalChangesLineTest.php new file mode 100644 index 000..e764032 --- /dev/null +++ b/client/tests/phpunit/includes/recentchanges/ExternalChangesLineTest.php @@ -0,0 +1,98 @@ +?php + +namespace Wikibase\Client\Test; +use Wikibase\ExternalChangesLine; + +/** + * @covers Wikibase\ExternalChangesLine + * + * @since 0.1 + * + * @ingroup WikibaseClient + * @ingroup Test + * + * @group Wikibase + * @group WikibaseClient + * @group WikibaseChange + * + * @license GPL 2+ + * @author Daniel Kinzler + */ +class ExternalChangesLineTest extends \PHPUnit_Framework_TestCase { + + /** +*/ + public function testChangesLine( /* $cl, $rc */ ) { + $this-markTestIncomplete( 'Test me!' ); + } + + /** +* @dataProvider parseCommentProvider +*/ + public function testParseComment( $entityData, $expected, $warnings = 'fail' ) { + if ( $warnings === 'suppress' ) { + wfSuppressWarnings(); + } + + $actual = ExternalChangesLine::parseComment( $entityData ); + $this-assertEquals( $expected, $actual ); + + if ( $warnings === 'suppress' ) { + wfRestoreWarnings(); + } + } + + public static function parseCommentProvider() { + return array( + 'plain string' = array( + array( + 'type' = 'wikibase-item~change', + 'comment' = 'wikibase-comment-update', + ), + wfMessage( 'wikibase-comment-update' )-text() + ), + 'wikibase-item~add' = array( + array( + 'type' = 'wikibase-item~add', + 'comment' = array( 'message' = 'wikibase-comment-update' ), + // comment will be ignored, but must be an array + ), + wfMessage( 'wikibase-comment-linked' )-text() + ), + 'message array' = array( + array( + 'type' = 'wikibase-item~restore', + 'comment' = array( 'message' = 'wikibase-comment-restore' ), + ), + wfMessage( 'wikibase-comment-restore' )-text() + ), + 'broken message array' = array( +
[MediaWiki-commits] [Gerrit] Match EntityId changes in DataModel - change (mediawiki...WikibaseQueryEngine)
jenkins-bot has submitted this change and it was merged. Change subject: Match EntityId changes in DataModel .. Match EntityId changes in DataModel Mostly applied regexes to construct ItemId and PropertyId rather then EntityId. Also fixed some code that got broken due to the moving out of the DV code from EntityId into EntityIdValue. Change-Id: Ia7ad9da1210e4c8a19bdb2e644e629258645ef2c --- M src/PropertyDataValueTypeLookup.php M src/QueryEngine.php M src/SQLStore/ClaimStore/ClaimInserter.php M src/SQLStore/ClaimStore/ClaimRowBuilder.php M src/SQLStore/DVHandler/EntityIdHandler.php M src/SQLStore/Engine/DescriptionMatchFinder.php M src/SQLStore/Engine/Engine.php M src/SQLStore/EntityIdTransformer.php M src/SQLStore/EntityInserter.php M src/SQLStore/EntityRemover.php M src/SQLStore/InternalEntityIdFinder.php M src/SQLStore/InternalEntityIdInterpreter.php M src/SQLStore/SnakStore/SnakRowBuilder.php M tests/integration/SQLStore/Engine/DescriptionMatchFinderIntegrationTest.php M tests/integration/SQLStore/WritingIntegrationTest.php M tests/phpunit/SQLStore/ClaimStore/ClaimInserterTest.php M tests/phpunit/SQLStore/ClaimStore/ClaimRowBuilderTest.php M tests/phpunit/SQLStore/DVHandler/EntityIdHandlerTest.php M tests/phpunit/SQLStore/Engine/DescriptionMatchFinderTest.php M tests/phpunit/SQLStore/Engine/EngineTest.php M tests/phpunit/SQLStore/EntityIdTransformerTest.php 21 files changed, 112 insertions(+), 76 deletions(-) Approvals: Addshore: Looks good to me, approved jenkins-bot: Verified diff --git a/src/PropertyDataValueTypeLookup.php b/src/PropertyDataValueTypeLookup.php index 420bbd8..97cf6a7 100644 --- a/src/PropertyDataValueTypeLookup.php +++ b/src/PropertyDataValueTypeLookup.php @@ -2,7 +2,7 @@ namespace Wikibase\QueryEngine; -use DataValues\DataValue; +use Wikibase\DataModel\Entity\PropertyId; /** * Interface for objects that can find the type of the DataValue that @@ -19,12 +19,12 @@ interface PropertyDataValueTypeLookup { /** -* @param DataValue $propertyId +* @param PropertyId $propertyId * * @return string The type of the data values has values of * * TODO: provide exception type and document */ - public function getDataValueTypeForProperty( DataValue $propertyId ); + public function getDataValueTypeForProperty( PropertyId $propertyId ); } diff --git a/src/QueryEngine.php b/src/QueryEngine.php index ad33281..397b7d2 100644 --- a/src/QueryEngine.php +++ b/src/QueryEngine.php @@ -4,7 +4,7 @@ use Ask\Language\Description\Description; use Ask\Language\Option\QueryOptions; -use Wikibase\EntityId; +use Wikibase\DataModel\Entity\EntityId; /** * Interface for objects that can act as a query engine. diff --git a/src/SQLStore/ClaimStore/ClaimInserter.php b/src/SQLStore/ClaimStore/ClaimInserter.php index ac4bde3..f817092 100644 --- a/src/SQLStore/ClaimStore/ClaimInserter.php +++ b/src/SQLStore/ClaimStore/ClaimInserter.php @@ -3,7 +3,7 @@ namespace Wikibase\QueryEngine\SQLStore\ClaimStore; use Wikibase\Claim; -use Wikibase\EntityId; +use Wikibase\DataModel\Entity\EntityId; use Wikibase\QueryEngine\SQLStore\SnakStore\SnakInserter; use Wikibase\Snak; use Wikibase\SnakRole; diff --git a/src/SQLStore/ClaimStore/ClaimRowBuilder.php b/src/SQLStore/ClaimStore/ClaimRowBuilder.php index b7d3cde..9fc7b3e 100644 --- a/src/SQLStore/ClaimStore/ClaimRowBuilder.php +++ b/src/SQLStore/ClaimStore/ClaimRowBuilder.php @@ -3,7 +3,7 @@ namespace Wikibase\QueryEngine\SQLStore\ClaimStore; use Wikibase\Claim; -use Wikibase\EntityId; +use Wikibase\DataModel\Entity\EntityId; use Wikibase\QueryEngine\SQLStore\InternalEntityIdFinder; use Wikibase\Statement; diff --git a/src/SQLStore/DVHandler/EntityIdHandler.php b/src/SQLStore/DVHandler/EntityIdHandler.php index 4838c83..24fa397 100644 --- a/src/SQLStore/DVHandler/EntityIdHandler.php +++ b/src/SQLStore/DVHandler/EntityIdHandler.php @@ -6,7 +6,8 @@ use InvalidArgumentException; use Wikibase\Database\FieldDefinition; use Wikibase\Database\TableDefinition; -use Wikibase\EntityId; +use Wikibase\DataModel\Entity\EntityId; +use Wikibase\DataModel\Entity\EntityIdValue; use Wikibase\QueryEngine\SQLStore\DataValueHandler; /** @@ -33,7 +34,7 @@ * @return DataValue */ public function newDataValueFromValueField( $valueFieldValue ) { - return EntityId::newFromArray( json_decode( $valueFieldValue, true ) ); + return EntityIdValue::newFromArray( json_decode( $valueFieldValue, true ) ); } /** @@ -47,8 +48,8 @@ * @throws InvalidArgumentException */ public function getWhereConditions( DataValue $value ) { - if ( !( $value instanceof EntityId ) ) { - throw new InvalidArgumentException( 'Value is not a EntityId' ); + if ( !( $value instanceof
[MediaWiki-commits] [Gerrit] Add foundations for schema updating functionality - change (mediawiki...WikibaseDatabase)
jenkins-bot has submitted this change and it was merged. Change subject: Add foundations for schema updating functionality .. Add foundations for schema updating functionality Change-Id: I236fb777514ddd09adcab551426bc7985ea15ae8 --- M src/DBConnectionProvider.php M src/LazyDBConnectionProvider.php A src/MediaWiki/MediaWikiTableNameFormatter.php A src/MySQL/MySqlTableDefinitionReader.php A src/SQLite/SQLiteTableDefinitionReader.php A src/TableDefinitionReader.php A src/TableNameFormatter.php A src/TableSchemaUpdater.php A tests/phpunit/MediaWiki/MediaWikiTableNameFormatterTest.php 9 files changed, 254 insertions(+), 0 deletions(-) Approvals: Addshore: Looks good to me, approved jenkins-bot: Verified diff --git a/src/DBConnectionProvider.php b/src/DBConnectionProvider.php index 9bac3ab..a65f955 100644 --- a/src/DBConnectionProvider.php +++ b/src/DBConnectionProvider.php @@ -7,6 +7,8 @@ /** * Interface for database connection providers. * + * TODO: specify connection handling requirements + * * @since 0.1 * * @file diff --git a/src/LazyDBConnectionProvider.php b/src/LazyDBConnectionProvider.php index 541a649..0f88755 100644 --- a/src/LazyDBConnectionProvider.php +++ b/src/LazyDBConnectionProvider.php @@ -8,6 +8,8 @@ * Lazy database connection provider. * The connection is fetched when needed using the id provided in the constructor. * + * TODO: implement connection handling requirements + * * @since 0.1 * * @file diff --git a/src/MediaWiki/MediaWikiTableNameFormatter.php b/src/MediaWiki/MediaWikiTableNameFormatter.php new file mode 100644 index 000..3f25c13 --- /dev/null +++ b/src/MediaWiki/MediaWikiTableNameFormatter.php @@ -0,0 +1,37 @@ +?php + +namespace Wikibase\Database\MediaWiki; + +use Exception; +use Wikibase\Database\DBConnectionProvider; +use Wikibase\Database\TableNameFormatter; + +/** + * @since 0.1 + * @licence GNU GPL v2+ + * @author Jeroen De Dauw jeroended...@gmail.com + */ +class MediaWikiTableNameFormatter implements TableNameFormatter { + + protected $connectionProvider; + + public function __construct( DBConnectionProvider $connectionProvider ) { + $this-connectionProvider = $connectionProvider; + } + + public function formatTableName( $tableName ) { + $db = $this-connectionProvider-getConnection(); + + try { + $tableName = $db-tableName( $tableName ); + } + catch ( Exception $ex ) { + $this-connectionProvider-releaseConnection(); + throw $ex; + } + + $this-connectionProvider-releaseConnection(); + return $tableName; + } + +} diff --git a/src/MySQL/MySqlTableDefinitionReader.php b/src/MySQL/MySqlTableDefinitionReader.php new file mode 100644 index 000..7c5bc74 --- /dev/null +++ b/src/MySQL/MySqlTableDefinitionReader.php @@ -0,0 +1,34 @@ +?php + +namespace Wikibase\Database\MySQL; + +use Wikibase\Database\FieldDefinition; +use Wikibase\Database\QueryInterface; +use Wikibase\Database\TableDefinition; +use Wikibase\Database\TableDefinitionReader; + +/** + * @since 0.1 + * @licence GNU GPL v2+ + * @author Jeroen De Dauw jeroended...@gmail.com + */ +class MySqlTableDefinitionReader implements TableDefinitionReader { + + protected $queryInterface; + + public function __construct( QueryInterface $queryInterface ) { + $this-queryInterface = $queryInterface; + } + + /** +* @see TableDefinitionReader::readDefinition +* +* @param string $tableName +* +* @return TableDefinition +*/ + public function readDefinition( $tableName ) { + // TODO + } + +} diff --git a/src/SQLite/SQLiteTableDefinitionReader.php b/src/SQLite/SQLiteTableDefinitionReader.php new file mode 100644 index 000..5d252d7 --- /dev/null +++ b/src/SQLite/SQLiteTableDefinitionReader.php @@ -0,0 +1,34 @@ +?php + +namespace Wikibase\Database\SQLite; + +use Wikibase\Database\FieldDefinition; +use Wikibase\Database\QueryInterface; +use Wikibase\Database\TableDefinition; +use Wikibase\Database\TableDefinitionReader; + +/** + * @since 0.1 + * @licence GNU GPL v2+ + * @author Jeroen De Dauw jeroended...@gmail.com + */ +class SQLiteTableDefinitionReader implements TableDefinitionReader { + + protected $queryInterface; + + public function __construct( QueryInterface $queryInterface ) { + $this-queryInterface = $queryInterface; + } + + /** +* @see TableDefinitionReader::readDefinition +* +* @param string $tableName +* +* @return TableDefinition +*/ + public function readDefinition( $tableName ) { + // TODO + } + +} diff --git a/src/TableDefinitionReader.php b/src/TableDefinitionReader.php new file
[MediaWiki-commits] [Gerrit] Give grep a chance to find the usages - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Give grep a chance to find the usages .. Give grep a chance to find the usages Change-Id: I7fc00b055b21ab209a1b1d23f23172862a0b --- M includes/ProtectionForm.php M includes/logging/LogEventsList.php M includes/specials/SpecialRandompage.php M includes/specials/SpecialRedirect.php 4 files changed, 9 insertions(+), 3 deletions(-) Approvals: Matmarex: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/ProtectionForm.php b/includes/ProtectionForm.php index 061ed2c..f10317a 100644 --- a/includes/ProtectionForm.php +++ b/includes/ProtectionForm.php @@ -605,6 +605,7 @@ if ( $permission == '' ) { return wfMessage( 'protect-default' )-text(); } else { + // Messages: protect-level-autoconfirmed, protect-level-sysop $msg = wfMessage( protect-level-{$permission} ); if ( $msg-exists() ) { return $msg-text(); diff --git a/includes/logging/LogEventsList.php b/includes/logging/LogEventsList.php index 2150019..c27b57a 100644 --- a/includes/logging/LogEventsList.php +++ b/includes/logging/LogEventsList.php @@ -172,6 +172,7 @@ $query ); + // Message: log-show-hide-patrol $links[$type] = $this-msg( log-show-hide-{$type} )-rawParams( $link )-escaped(); $hiddens .= Html::hidden( hide_{$type}_log, $val ) . \n; } diff --git a/includes/specials/SpecialRandompage.php b/includes/specials/SpecialRandompage.php index e4f31f4..c94d2b3 100644 --- a/includes/specials/SpecialRandompage.php +++ b/includes/specials/SpecialRandompage.php @@ -64,6 +64,7 @@ if ( is_null( $title ) ) { $this-setHeaders(); + // Message: randompage-nopages, randomredirect-nopages $this-getOutput()-addWikiMsg( strtolower( $this-getName() ) . '-nopages', $this-getNsList(), count( $this-namespaces ) ); diff --git a/includes/specials/SpecialRedirect.php b/includes/specials/SpecialRedirect.php index 2681207..f05dacb 100644 --- a/includes/specials/SpecialRedirect.php +++ b/includes/specials/SpecialRedirect.php @@ -166,6 +166,7 @@ } if ( !is_null( $this-mValue ) ) { $this-getOutput()-setStatusCode( 404 ); + // Message: redirect-not-exists $msg = $this-getMessagePrefix() . '-not-exists'; return Status::newFatal( $msg ); } @@ -176,6 +177,7 @@ $mp = $this-getMessagePrefix(); $ns = array( // subpage = message + // Messages: redirect-user, redirect-revision, redirect-file 'user' = $mp . '-user', 'revision' = $mp . '-revision', 'file' = $mp . '-file', @@ -183,7 +185,7 @@ $a = array(); $a['type'] = array( 'type' = 'select', - 'label-message' = $mp . '-lookup', + 'label-message' = $mp . '-lookup', // Message: redirect-lookup 'options' = array(), 'default' = current( array_keys( $ns ) ), ); @@ -193,7 +195,7 @@ } $a['value'] = array( 'type' = 'text', - 'label-message' = $mp . '-value' + 'label-message' = $mp . '-value' // Message: redirect-value ); // set the defaults according to the parsed subpage path if ( !empty( $this-mType ) ) { @@ -220,7 +222,8 @@ protected function alterForm( HTMLForm $form ) { /* display summary at top of page */ $this-outputHeader(); - /* tweak label on submit button */ + // tweak label on submit button + // Message: redirect-submit $form-setSubmitTextMsg( $this-getMessagePrefix() . '-submit' ); /* submit form every time */ $form-setMethod( 'get' ); -- To view, visit https://gerrit.wikimedia.org/r/82602 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7fc00b055b21ab209a1b1d23f23172862a0b Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Shirayuki shirayuk...@gmail.com Gerrit-Reviewer: Matmarex matma@gmail.com Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com Gerrit-Reviewer: Siebrand siebr...@wikimedia.org Gerrit-Reviewer:
[MediaWiki-commits] [Gerrit] Give grep a chance to find the usages - change (mediawiki...UploadWizard)
Shirayuki has uploaded a new change for review. https://gerrit.wikimedia.org/r/82813 Change subject: Give grep a chance to find the usages .. Give grep a chance to find the usages Change-Id: I7cfcd86c3c65d5b2af8c4193c7978b9887a8226e --- M includes/UploadWizardTutorial.php 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UploadWizard refs/changes/13/82813/1 diff --git a/includes/UploadWizardTutorial.php b/includes/UploadWizardTutorial.php index 1ec227f..f84748a 100644 --- a/includes/UploadWizardTutorial.php +++ b/includes/UploadWizardTutorial.php @@ -66,6 +66,9 @@ } if ( $error !== null ) { + // Messages: + // mwe-upwiz-tutorial-error-localized-file-missing, mwe-upwiz-tutorial-error-file-missing, + // mwe-upwiz-tutorial-error-cannot-transform $errorMsg = wfMessage( 'mwe-upwiz-tutorial-error-' . $error ); if ( $error === 'localized-file-missing' ) { $errorMsg-params( Language::fetchLanguageName( $langCode, $wgLang-getCode() ) ); -- To view, visit https://gerrit.wikimedia.org/r/82813 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7cfcd86c3c65d5b2af8c4193c7978b9887a8226e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UploadWizard Gerrit-Branch: master Gerrit-Owner: Shirayuki shirayuk...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Correct directory for patch extensions - change (mediawiki...release)
jenkins-bot has submitted this change and it was merged. Change subject: Correct directory for patch extensions .. Correct directory for patch extensions The directory set for exporting the previous version's extension to generate the patch tarball was re-exporting the extension to the current version's directory. Change-Id: I50f359c55afece3e24fcd8121cbfdbb252aa90eb --- M make-release/make-release 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/make-release/make-release b/make-release/make-release index 244de39..f65ecbc 100755 --- a/make-release/make-release +++ b/make-release/make-release @@ -360,7 +360,7 @@ export(prevBranch, prevDir, gitRoot) for ext in getVersionExtensions(prevVersion, extensions): -exportExtension(branch, ext, package, gitRoot) +exportExtension(branch, ext, prevDir, gitRoot) makePatch(dir + '/' + package + '.patch.gz', prevDir, package, 'normal') outFiles.append(package + '.patch.gz') -- To view, visit https://gerrit.wikimedia.org/r/82749 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I50f359c55afece3e24fcd8121cbfdbb252aa90eb Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/tools/release Gerrit-Branch: master Gerrit-Owner: CSteipp cste...@wikimedia.org Gerrit-Reviewer: Hashar has...@free.fr Gerrit-Reviewer: MarkAHershberger mhershber...@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] Get rid of old EntityId Usage - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Get rid of old EntityId Usage .. Get rid of old EntityId Usage Change-Id: Ic58a4d88531adb18830158d12a40373af72b26bb --- M repo/tests/phpunit/includes/api/SetClaimTest.php 1 file changed, 4 insertions(+), 19 deletions(-) Approvals: Daniel Kinzler: Looks good to me, approved jenkins-bot: Verified diff --git a/repo/tests/phpunit/includes/api/SetClaimTest.php b/repo/tests/phpunit/includes/api/SetClaimTest.php index ed0e642..1d09874 100644 --- a/repo/tests/phpunit/includes/api/SetClaimTest.php +++ b/repo/tests/phpunit/includes/api/SetClaimTest.php @@ -2,6 +2,7 @@ namespace Wikibase\Test\Api; use Wikibase\Claim; +use Wikibase\DataModel\Entity\PropertyId; use Wikibase\EntityId; use Wikibase\Property; use Wikibase\PropertyContent; @@ -9,22 +10,6 @@ /** * Unit tests for the Wikibase\Repo\Api\ApSetClaim class. * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * http://www.gnu.org/copyleft/gpl.html - * - * @file * @since 0.4 * * @ingroup WikibaseRepoTest @@ -50,9 +35,9 @@ protected function snakProvider() { static $hasProperties = false; - $prop42 = new EntityId( Property::ENTITY_TYPE, 42 ); - $prop9001 = new EntityId( Property::ENTITY_TYPE, 9001 ); - $prop7201010 = new EntityId( Property::ENTITY_TYPE, 7201010 ); + $prop42 = new PropertyId( 'P42' ); + $prop9001 = new PropertyId( 'P9001' ); + $prop7201010 = new PropertyId( 'P7201010' ); if ( !$hasProperties ) { $prop = PropertyContent::newEmpty(); -- To view, visit https://gerrit.wikimedia.org/r/81652 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic58a4d88531adb18830158d12a40373af72b26bb Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Addshore addshorew...@gmail.com Gerrit-Reviewer: Aude aude.w...@gmail.com Gerrit-Reviewer: Daniel Kinzler daniel.kinz...@wikimedia.de Gerrit-Reviewer: Daniel Werner daniel.wer...@wikimedia.de Gerrit-Reviewer: Jeroen De Dauw jeroended...@gmail.com Gerrit-Reviewer: Michał Łazowik mlazo...@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] Make ExternalChangeLine more robust. - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Make ExternalChangeLine more robust. .. Make ExternalChangeLine more robust. This removes some assumptions from ExternalChangeLine. This also adds a test case for ExternalChangeLine, but does not fully implement it. Change-Id: I63b62e60ffee2f2c3af8c445f3723f6d68018442 --- M client/includes/recentchanges/ExternalChangesLine.php A client/tests/phpunit/includes/recentchanges/ExternalChangesLineTest.php 2 files changed, 103 insertions(+), 1 deletion(-) Approvals: Tobias Gritschacher: Looks good to me, approved jenkins-bot: Verified diff --git a/client/includes/recentchanges/ExternalChangesLine.php b/client/includes/recentchanges/ExternalChangesLine.php index 7c1cf18..988d5f5 100644 --- a/client/includes/recentchanges/ExternalChangesLine.php +++ b/client/includes/recentchanges/ExternalChangesLine.php @@ -147,12 +147,16 @@ if ( is_array( $comment ) ) { if ( $entityData['type'] === 'wikibase-item~add' ) { // @todo: provide a link to the entity + // @todo: move this to SiteLinkCommentCreator $message = wfMessage( 'wikibase-comment-linked' )-text(); } else if ( array_key_exists( 'sitelink', $comment ) ) { // @fixme site link change message $message = wfMessage( 'wikibase-comment-update' )-text(); - } else { + } elseif ( array_key_exists( 'message', $comment ) ) { $message = wfMessage( $comment['message'] )-text(); + } else { + wfLogWarning( __METHOD__ . ': comment array is missing message field!' ); + $message = wfMessage( 'wikibase-comment-update' )-text(); } } else { $msg = wfMessage( $comment ); diff --git a/client/tests/phpunit/includes/recentchanges/ExternalChangesLineTest.php b/client/tests/phpunit/includes/recentchanges/ExternalChangesLineTest.php new file mode 100644 index 000..e764032 --- /dev/null +++ b/client/tests/phpunit/includes/recentchanges/ExternalChangesLineTest.php @@ -0,0 +1,98 @@ +?php + +namespace Wikibase\Client\Test; +use Wikibase\ExternalChangesLine; + +/** + * @covers Wikibase\ExternalChangesLine + * + * @since 0.1 + * + * @ingroup WikibaseClient + * @ingroup Test + * + * @group Wikibase + * @group WikibaseClient + * @group WikibaseChange + * + * @license GPL 2+ + * @author Daniel Kinzler + */ +class ExternalChangesLineTest extends \PHPUnit_Framework_TestCase { + + /** +*/ + public function testChangesLine( /* $cl, $rc */ ) { + $this-markTestIncomplete( 'Test me!' ); + } + + /** +* @dataProvider parseCommentProvider +*/ + public function testParseComment( $entityData, $expected, $warnings = 'fail' ) { + if ( $warnings === 'suppress' ) { + wfSuppressWarnings(); + } + + $actual = ExternalChangesLine::parseComment( $entityData ); + $this-assertEquals( $expected, $actual ); + + if ( $warnings === 'suppress' ) { + wfRestoreWarnings(); + } + } + + public static function parseCommentProvider() { + return array( + 'plain string' = array( + array( + 'type' = 'wikibase-item~change', + 'comment' = 'wikibase-comment-update', + ), + wfMessage( 'wikibase-comment-update' )-text() + ), + 'wikibase-item~add' = array( + array( + 'type' = 'wikibase-item~add', + 'comment' = array( 'message' = 'wikibase-comment-update' ), + // comment will be ignored, but must be an array + ), + wfMessage( 'wikibase-comment-linked' )-text() + ), + 'message array' = array( + array( + 'type' = 'wikibase-item~restore', + 'comment' = array( 'message' = 'wikibase-comment-restore' ), + ), + wfMessage( 'wikibase-comment-restore' )-text() + ), + 'broken message array' = array( + array( +
[MediaWiki-commits] [Gerrit] Allow registration of Actions using a callback that returns ... - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Allow registration of Actions using a callback that returns an Action instance .. Allow registration of Actions using a callback that returns an Action instance Basically implementing what Brion suggested on wikitech This allows for injecting dependencies while still only loading the actual class when needed. Simple example: $wgActions['epundo'] = function( Page $page, IContextSource $context = null ) use ( $differ ) { $undoAction = new \EducationProgram\UndoAction( $page, $context ); $undoAction-setDiffer( $differ ); return $undoAction; }; Change-Id: I6c0f4022f1df1ebaf9cd1a5fe4bd362d0ecc0d62 --- M RELEASE-NOTES-1.22 M includes/Action.php 2 files changed, 19 insertions(+), 8 deletions(-) Approvals: Daniel Kinzler: Looks good to me, approved jenkins-bot: Verified diff --git a/RELEASE-NOTES-1.22 b/RELEASE-NOTES-1.22 index e743b48..44b0fae 100644 --- a/RELEASE-NOTES-1.22 +++ b/RELEASE-NOTES-1.22 @@ -151,6 +151,9 @@ ** editmyoptions controls whether a user may change their preferences. * Add new hook AbortTalkPageEmailNotification, this will be used to determine whether to send the regular talk page email notification +* Action classes registered in $wgActions are now also supported in the form of + a callback (which returns an instance of Action) instead of providing the name + of a subclass of Action. * (bug 46513) Vector: Add the collapsibleTabs script from the Vector extension. * Added $wgRecentChangesFlags for defining new flags for RecentChanges and watchlists. diff --git a/includes/Action.php b/includes/Action.php index e996104..23b648f 100644 --- a/includes/Action.php +++ b/includes/Action.php @@ -59,7 +59,7 @@ * the action is disabled, or null if it's not recognised * @param $action String * @param $overrides Array -* @return bool|null|string +* @return bool|null|string|callable */ final private static function getClass( $action, array $overrides ) { global $wgActions; @@ -89,12 +89,18 @@ * if it is not recognised */ final public static function factory( $action, Page $page, IContextSource $context = null ) { - $class = self::getClass( $action, $page-getActionOverrides() ); - if ( $class ) { - $obj = new $class( $page, $context ); + $classOrCallable = self::getClass( $action, $page-getActionOverrides() ); + + if ( is_string( $classOrCallable ) ) { + $obj = new $classOrCallable( $page, $context ); return $obj; } - return $class; + + if ( is_callable( $classOrCallable ) ) { + return call_user_func_array( $classOrCallable, array( $page, $context ) ); + } + + return $classOrCallable; } /** @@ -241,12 +247,14 @@ } /** -* Protected constructor: use Action::factory( $action, $page ) to actually build -* these things in the real world +* Constructor. +* +* Only public since 1.21 +* * @param $page Page * @param $context IContextSource */ - protected function __construct( Page $page, IContextSource $context = null ) { + public function __construct( Page $page, IContextSource $context = null ) { $this-page = $page; $this-context = $context; } -- To view, visit https://gerrit.wikimedia.org/r/49785 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6c0f4022f1df1ebaf9cd1a5fe4bd362d0ecc0d62 Gerrit-PatchSet: 7 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org Gerrit-Reviewer: Daniel Friesen dan...@nadir-seen-fire.com Gerrit-Reviewer: Daniel Kinzler daniel.kinz...@wikimedia.de Gerrit-Reviewer: IAlex coderev...@emsenhuber.ch Gerrit-Reviewer: Krinkle krinklem...@gmail.com Gerrit-Reviewer: MaxSem maxsem.w...@gmail.com Gerrit-Reviewer: Parent5446 tylerro...@gmail.com Gerrit-Reviewer: Platonides platoni...@gmail.com Gerrit-Reviewer: PleaseStand pleasest...@live.com Gerrit-Reviewer: Reedy re...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] jquery.suggestions: Do not duplicate keypress logic - change (mediawiki/core)
Matmarex has uploaded a new change for review. https://gerrit.wikimedia.org/r/82814 Change subject: jquery.suggestions: Do not duplicate keypress logic .. jquery.suggestions: Do not duplicate keypress logic This is handled in keyup/keypress handlers, no need to repeat it twice. Change-Id: I3ddcd21136b44eedcec53b1ecc91bad38f697402 --- M resources/jquery/jquery.suggestions.js 1 file changed, 0 insertions(+), 16 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/14/82814/1 diff --git a/resources/jquery/jquery.suggestions.js b/resources/jquery/jquery.suggestions.js index bf38769..3c14a8e 100644 --- a/resources/jquery/jquery.suggestions.js +++ b/resources/jquery/jquery.suggestions.js @@ -577,22 +577,6 @@ // Store key pressed to handle later context.data.keypressed = e.which; context.data.keypressedCount = 0; - - switch ( context.data.keypressed ) { - // This preventDefault logic is duplicated from - // $.suggestions.keypress(), which sucks - case 40: // Arrow down - e.preventDefault(); - e.stopImmediatePropagation(); - break; - case 38: // Arrow up - case 27: // Escape - case 13: // Enter - if ( context.data.$container.is( ':visible' ) ) { - e.preventDefault(); - e.stopImmediatePropagation(); - } - } } ) .keypress( function ( e ) { context.data.keypressedCount++; -- To view, visit https://gerrit.wikimedia.org/r/82814 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3ddcd21136b44eedcec53b1ecc91bad38f697402 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Matmarex matma@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Replace Gmetric implementation - change (operations/puppet)
Faidon Liambotis has submitted this change and it was merged. Change subject: Replace Gmetric implementation .. Replace Gmetric implementation I didn't like gmetric.js's quality and I thought it might gain something by way of concision if it were re-written. I did so (and tested) and it works. Change-Id: I0c3198d122511aa856906e9bd7b8233a4dbda332 --- M modules/statsd/files/backends/ganglia.js D modules/statsd/files/backends/gmetric.js M modules/statsd/manifests/init.pp 3 files changed, 65 insertions(+), 540 deletions(-) Approvals: Faidon Liambotis: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/statsd/files/backends/ganglia.js b/modules/statsd/files/backends/ganglia.js index d2d58f1..7f6e36b 100644 --- a/modules/statsd/files/backends/ganglia.js +++ b/modules/statsd/files/backends/ganglia.js @@ -23,6 +23,64 @@ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +function Xdr( bufSize ) { +this.b = new Buffer( bufSize ); +this.b.fill( 0 ); +this.ptr = 0; +} + +Xdr.prototype.pack = function ( type, value ) { +switch ( type ) { +case 'int': +this.b.writeInt32BE( value, this.ptr ); +this.ptr += 4; +break; +case 'string': +this.pack( 'int', value.length ); +this.b.write( value, this.ptr ); +this.ptr += ( ( Buffer.byteLength( value ) + 3 ) ~0x03 ); +break; +case 'boolean': +this.pack( 'int', value ? 1 : 0 ); +break; +} +}; + +Xdr.prototype.getBytes = function () { +return this.b.slice( 0, this.ptr ); +}; + +Xdr.meta = function ( metric ) { +var xdr = new Xdr( 1024 ); + +xdr.pack( 'int', 128 ); +xdr.pack( 'string', metric.hostname ); +xdr.pack( 'string', metric.name ); +xdr.pack( 'boolean', metric.spoof ); +xdr.pack( 'string', metric.type ); +xdr.pack( 'string', metric.name ); +xdr.pack( 'string', metric.units ); +xdr.pack( 'int', metric.slope ); +xdr.pack( 'int', metric.tmax ); +xdr.pack( 'int', metric.dmax ); +xdr.pack( 'int', 1 ); +xdr.pack( 'string', 'GROUP' ); +xdr.pack( 'string', metric.group ); +return xdr.getBytes(); +}; + +Xdr.data = function ( metric ) { +var xdr = new Xdr( 512 ); + +xdr.pack( 'int', 133 ); +xdr.pack( 'string', metric.hostname ); +xdr.pack( 'string', metric.name ); +xdr.pack( 'boolean', metric.spoof ); +xdr.pack( 'string', '%s' ); +xdr.pack( 'string', metric.value.toString() ); +return xdr.getBytes(); +}; + function logSocketError( err, bytes ) { if ( err ) console.log( err ); } @@ -72,13 +130,11 @@ } } - var os = require( 'os' ); var util = require( 'util' ); var dgram = require( 'dgram' ); -var Gmetric = require( './gmetric' ); -var gmetric = new Gmetric(); +var slopes = [ 'zero', 'positive', 'negative', 'both', 'unspecified' ]; var blankGroup = { count : 0, @@ -137,7 +193,7 @@ name : args.join('_'), } ); if ( typeof opts.slope === 'string' ) { -opts.slope = Gmetric.slope[opts.slope.toLowerCase()]; +opts.slope = slopes.indexOf( opts.slope ); } ganglia.items.push( opts ); }, @@ -173,15 +229,16 @@ ganglia.dispatch(); }, dispatch : function () { -var packed, metric; +var metric, meta, data; ganglia.flushed = Math.floor( new Date() / 1000 ); while ( ( metric = ganglia.items.shift() ) !== undefined ) { -packed = gmetric.pack(metric); -socket.send( packed.meta, 0, packed.meta.length, +meta = Xdr.meta( metric ); +socket.send( meta, 0, meta.length, backendConfig.gangliaPort, backendConfig.gangliaHost, logSocketError ); -socket.send( packed.data, 0, packed.data.length, +data = Xdr.data( metric ); +socket.send( data, 0, data.length, backendConfig.gangliaPort, backendConfig.gangliaHost, logSocketError ); ganglia.sent++; diff --git a/modules/statsd/files/backends/gmetric.js b/modules/statsd/files/backends/gmetric.js deleted file mode 100644 index c9a4bd4..000 --- a/modules/statsd/files/backends/gmetric.js +++ /dev/null @@ -1,527 +0,0 @@ -/** - * Gmetric.js - * Gmetric packet submission for node.js - * https://github.com/jbuchbinder/node-gmetric - * - * Copyright (C) 2013 Jeff Buchbinder, and other contributors. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the Software), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject
[MediaWiki-commits] [Gerrit] Improvements to EntityPerPageBuilderTest. - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Improvements to EntityPerPageBuilderTest. .. Improvements to EntityPerPageBuilderTest. Change-Id: Ie97b7bbf0fa212041629473d01f1bfb97b140d7c --- M repo/tests/phpunit/includes/store/sql/EntityPerPageBuilderTest.php 1 file changed, 5 insertions(+), 21 deletions(-) Approvals: Daniel Kinzler: Looks good to me, approved jenkins-bot: Verified diff --git a/repo/tests/phpunit/includes/store/sql/EntityPerPageBuilderTest.php b/repo/tests/phpunit/includes/store/sql/EntityPerPageBuilderTest.php index 9b7b7b7..3f911af 100644 --- a/repo/tests/phpunit/includes/store/sql/EntityPerPageBuilderTest.php +++ b/repo/tests/phpunit/includes/store/sql/EntityPerPageBuilderTest.php @@ -1,29 +1,14 @@ ?php namespace Wikibase\Test; + use Wikibase\SettingsArray; use Wikibase\StoreFactory; use Wikibase\EntityPerPageBuilder; use Wikibase\Repo\WikibaseRepo; -use Wikibase\Lib\EntityIdParser; /** - * Tests for the Wikibase\EntityPerPageBuilder class. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * http://www.gnu.org/copyleft/gpl.html + * @covers Wikibase\EntityPerPageBuilder * * @file * @since 0.4 @@ -47,6 +32,9 @@ protected $entityPerPageRows; + /** +* @var WikibaseRepo +*/ protected $wikibaseRepo; public function setUp() { @@ -87,10 +75,6 @@ protected function getTestSettings() { $settings = new SettingsArray( array( - 'entityPrefixes' = array( - 'q' = \Wikibase\Item::ENTITY_TYPE, - 'p' = \Wikibase\Property::ENTITY_TYPE - ), 'entityNamespaces' = array( 'wikibase-item' = 0, 'wikibase-property' = 102 -- To view, visit https://gerrit.wikimedia.org/r/81557 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie97b7bbf0fa212041629473d01f1bfb97b140d7c Gerrit-PatchSet: 8 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com Gerrit-Reviewer: Addshore addshorew...@gmail.com Gerrit-Reviewer: Daniel Kinzler daniel.kinz...@wikimedia.de 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] (bug 52501) don't break diff when dataValue could not be for... - change (mediawiki...Wikibase)
Tobias Gritschacher has uploaded a new change for review. https://gerrit.wikimedia.org/r/82816 Change subject: (bug 52501) don't break diff when dataValue could not be formatted .. (bug 52501) don't break diff when dataValue could not be formatted Change-Id: Idc0922b270b9df8a30ab9373a691aa4df7f193ac --- M lib/includes/ClaimDifferenceVisualizer.php 1 file changed, 10 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/16/82816/1 diff --git a/lib/includes/ClaimDifferenceVisualizer.php b/lib/includes/ClaimDifferenceVisualizer.php index cd35dc5..8f6987d 100644 --- a/lib/includes/ClaimDifferenceVisualizer.php +++ b/lib/includes/ClaimDifferenceVisualizer.php @@ -9,6 +9,8 @@ use Diff\Diff; use RuntimeException; use Wikibase\Lib\EntityIdFormatter; +use DataValues\GlobeCoordinateValue; +use Wikibase\DataModel\Entity\EntityIdValue; /** * Class for generating HTML for Claim Diffs. @@ -277,16 +279,21 @@ if ( $snakType === 'value' ) { $dataValue = $snak-getDataValue(); + $diffValueString = ; // FIXME! should use some value formatter - if ( $dataValue instanceof EntityId ) { - $diffValueString = $this-getEntityLabel( $dataValue ); + if ( $dataValue instanceof EntityIdValue ) { + $diffValueString = $this-getEntityLabel( $dataValue-getEntityId() ); } else if ( $dataValue instanceof TimeValue ) { // TODO: this will just display the plain ISO8601-string, // we should instead use a decent formatter $diffValueString = $dataValue-getTime(); - } else { + } else if ( $dataValue instanceof GlobeCoordinateValue ) { + $diffValueString = $dataValue-getLatitude() . ', ' . $dataValue-getLongitude(); + } else if ( is_string( $dataValue-getValue() ) ) { $diffValueString = $dataValue-getValue(); + } else { + //type not supported; } return $diffValueString; -- To view, visit https://gerrit.wikimedia.org/r/82816 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idc0922b270b9df8a30ab9373a691aa4df7f193ac Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: mw1.22-wmf16 Gerrit-Owner: Tobias Gritschacher tobias.gritschac...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] (bug 52501) don't break diff when dataValue could not be for... - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: (bug 52501) don't break diff when dataValue could not be formatted .. (bug 52501) don't break diff when dataValue could not be formatted Change-Id: Idc0922b270b9df8a30ab9373a691aa4df7f193ac --- M lib/includes/ClaimDifferenceVisualizer.php 1 file changed, 10 insertions(+), 3 deletions(-) Approvals: Denny Vrandecic: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/includes/ClaimDifferenceVisualizer.php b/lib/includes/ClaimDifferenceVisualizer.php index cd35dc5..8f6987d 100644 --- a/lib/includes/ClaimDifferenceVisualizer.php +++ b/lib/includes/ClaimDifferenceVisualizer.php @@ -9,6 +9,8 @@ use Diff\Diff; use RuntimeException; use Wikibase\Lib\EntityIdFormatter; +use DataValues\GlobeCoordinateValue; +use Wikibase\DataModel\Entity\EntityIdValue; /** * Class for generating HTML for Claim Diffs. @@ -277,16 +279,21 @@ if ( $snakType === 'value' ) { $dataValue = $snak-getDataValue(); + $diffValueString = ; // FIXME! should use some value formatter - if ( $dataValue instanceof EntityId ) { - $diffValueString = $this-getEntityLabel( $dataValue ); + if ( $dataValue instanceof EntityIdValue ) { + $diffValueString = $this-getEntityLabel( $dataValue-getEntityId() ); } else if ( $dataValue instanceof TimeValue ) { // TODO: this will just display the plain ISO8601-string, // we should instead use a decent formatter $diffValueString = $dataValue-getTime(); - } else { + } else if ( $dataValue instanceof GlobeCoordinateValue ) { + $diffValueString = $dataValue-getLatitude() . ', ' . $dataValue-getLongitude(); + } else if ( is_string( $dataValue-getValue() ) ) { $diffValueString = $dataValue-getValue(); + } else { + //type not supported; } return $diffValueString; -- To view, visit https://gerrit.wikimedia.org/r/82816 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idc0922b270b9df8a30ab9373a691aa4df7f193ac Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: mw1.22-wmf16 Gerrit-Owner: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: Denny Vrandecic denny.vrande...@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] Move b/c code for ReferenceObject to a better location - change (mediawiki...WikibaseDataModel)
jenkins-bot has submitted this change and it was merged. Change subject: Move b/c code for ReferenceObject to a better location .. Move b/c code for ReferenceObject to a better location Change-Id: I2c41f79eea155ec1ad9626cc25a169c3ba27cf7d --- M Aliases.php M DataModel/Reference.php M WikibaseDataModel.php 3 files changed, 6 insertions(+), 5 deletions(-) Approvals: Addshore: Looks good to me, approved jenkins-bot: Verified diff --git a/Aliases.php b/Aliases.php index c2d79ab..4edd4bd 100644 --- a/Aliases.php +++ b/Aliases.php @@ -18,4 +18,9 @@ */ class ItemObject extends Item {} + /** +* @deprecated since 0.4, use the base class instead. +*/ + class ReferenceObject extends Reference {} + } \ No newline at end of file diff --git a/DataModel/Reference.php b/DataModel/Reference.php index f951853..b8f6e8f 100644 --- a/DataModel/Reference.php +++ b/DataModel/Reference.php @@ -86,8 +86,3 @@ } } - -/** - * @deprecated since 0.4 - */ -class ReferenceObject extends Reference {} \ No newline at end of file diff --git a/WikibaseDataModel.php b/WikibaseDataModel.php index 3230ef3..feaec9a 100644 --- a/WikibaseDataModel.php +++ b/WikibaseDataModel.php @@ -81,6 +81,7 @@ // Aliasing of classes that got renamed. // For more details, see Aliases.php. class_alias( 'Wikibase\Item', 'Wikibase\ItemObject' ); +class_alias( 'Wikibase\ReferenceObject', 'Wikibase\Reference' ); class_alias( 'Wikibase\DataModel\Entity\EntityId', 'Wikibase\EntityId' ); if ( defined( 'MEDIAWIKI' ) ) { -- To view, visit https://gerrit.wikimedia.org/r/81949 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2c41f79eea155ec1ad9626cc25a169c3ba27cf7d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikibaseDataModel Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com Gerrit-Reviewer: Addshore addshorew...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Move b/c code for ClaimObject and StatementObject to a bette... - change (mediawiki...WikibaseDataModel)
jenkins-bot has submitted this change and it was merged. Change subject: Move b/c code for ClaimObject and StatementObject to a better location .. Move b/c code for ClaimObject and StatementObject to a better location Change-Id: Ibbf4c1068a57ac96dca397a3305070126e07091d --- M Aliases.php M DataModel/Claim/Claim.php M DataModel/Claim/Statement.php M WikibaseDataModel.php 4 files changed, 12 insertions(+), 10 deletions(-) Approvals: Addshore: Looks good to me, approved jenkins-bot: Verified diff --git a/Aliases.php b/Aliases.php index 4edd4bd..2601b7c 100644 --- a/Aliases.php +++ b/Aliases.php @@ -23,4 +23,14 @@ */ class ReferenceObject extends Reference {} + /** +* @deprecated since 0.4, use the base class instead. +*/ + class StatementObject extends Statement {} + + /** +* @deprecated since 0.4, use the base class instead. +*/ + class ClaimObject extends Claim {} + } \ No newline at end of file diff --git a/DataModel/Claim/Claim.php b/DataModel/Claim/Claim.php index b61c2f6..d6e3daa 100644 --- a/DataModel/Claim/Claim.php +++ b/DataModel/Claim/Claim.php @@ -264,8 +264,3 @@ return $snaks; } } - -/** - * @deprecated since 0.4. Use Claim instead. - */ -class ClaimObject extends Claim {} diff --git a/DataModel/Claim/Statement.php b/DataModel/Claim/Statement.php index dee19b5..9103c97 100644 --- a/DataModel/Claim/Statement.php +++ b/DataModel/Claim/Statement.php @@ -192,8 +192,3 @@ return $snaks; } } - -/** - * @deprecated - */ -class StatementObject extends Statement {} \ No newline at end of file diff --git a/WikibaseDataModel.php b/WikibaseDataModel.php index feaec9a..6987b76 100644 --- a/WikibaseDataModel.php +++ b/WikibaseDataModel.php @@ -82,6 +82,8 @@ // For more details, see Aliases.php. class_alias( 'Wikibase\Item', 'Wikibase\ItemObject' ); class_alias( 'Wikibase\ReferenceObject', 'Wikibase\Reference' ); +class_alias( 'Wikibase\ClaimObject', 'Wikibase\Claim' ); +class_alias( 'Wikibase\StatementObject', 'Wikibase\Statement' ); class_alias( 'Wikibase\DataModel\Entity\EntityId', 'Wikibase\EntityId' ); if ( defined( 'MEDIAWIKI' ) ) { -- To view, visit https://gerrit.wikimedia.org/r/81951 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibbf4c1068a57ac96dca397a3305070126e07091d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikibaseDataModel Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com Gerrit-Reviewer: Addshore addshorew...@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] swift: ms-be5 is H710 - change (operations/puppet)
Faidon Liambotis has submitted this change and it was merged. Change subject: swift: ms-be5 is H710 .. swift: ms-be5 is H710 Apparently it was changed some time ago but site.pp was never altered, so we missed the sda/b - sdm/n swap. Change-Id: I9afd97019d88d4d30b4cf4b311bfbd2c802f98e2 --- M manifests/site.pp 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Faidon Liambotis: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/site.pp b/manifests/site.pp index 318aff6..6c15b42 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -1868,7 +1868,7 @@ include role::swift::pmtpa-prod::proxy } -node /^ms-be(3|[5-8]|10)\.pmtpa\.wmnet$/ { +node /^ms-be(3|[6-8]|10)\.pmtpa\.wmnet$/ { # the ms-be hosts that are 720xds with ssds have two more disks # but with the h310s they show up as m and n, those get the OS $all_drives = [ '/dev/sda', '/dev/sdb', '/dev/sdc', '/dev/sdd', @@ -1885,7 +1885,7 @@ swift::mount_filesystem{ '/dev/sdn3': } } -node /^ms-be(1|2|4|9|11|12)\.pmtpa\.wmnet$/ { +node /^ms-be(1|2|4|5|9|11|12)\.pmtpa\.wmnet$/ { # the ms-be hosts with ssds have two more disks # this is the 720xds with h710 layout $all_drives = [ '/dev/sdc', '/dev/sdd', '/dev/sde', -- To view, visit https://gerrit.wikimedia.org/r/82817 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9afd97019d88d4d30b4cf4b311bfbd2c802f98e2 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Faidon Liambotis fai...@wikimedia.org Gerrit-Reviewer: Faidon Liambotis fai...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] swift: ms-be5 is H710 - change (operations/puppet)
Faidon Liambotis has uploaded a new change for review. https://gerrit.wikimedia.org/r/82817 Change subject: swift: ms-be5 is H710 .. swift: ms-be5 is H710 Apparently it was changed some time ago but site.pp was never altered, so we missed the sda/b - sdm/n swap. Change-Id: I9afd97019d88d4d30b4cf4b311bfbd2c802f98e2 --- M manifests/site.pp 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/17/82817/1 diff --git a/manifests/site.pp b/manifests/site.pp index 318aff6..6c15b42 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -1868,7 +1868,7 @@ include role::swift::pmtpa-prod::proxy } -node /^ms-be(3|[5-8]|10)\.pmtpa\.wmnet$/ { +node /^ms-be(3|[6-8]|10)\.pmtpa\.wmnet$/ { # the ms-be hosts that are 720xds with ssds have two more disks # but with the h310s they show up as m and n, those get the OS $all_drives = [ '/dev/sda', '/dev/sdb', '/dev/sdc', '/dev/sdd', @@ -1885,7 +1885,7 @@ swift::mount_filesystem{ '/dev/sdn3': } } -node /^ms-be(1|2|4|9|11|12)\.pmtpa\.wmnet$/ { +node /^ms-be(1|2|4|5|9|11|12)\.pmtpa\.wmnet$/ { # the ms-be hosts with ssds have two more disks # this is the 720xds with h710 layout $all_drives = [ '/dev/sdc', '/dev/sdd', '/dev/sde', -- To view, visit https://gerrit.wikimedia.org/r/82817 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9afd97019d88d4d30b4cf4b311bfbd2c802f98e2 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Faidon Liambotis fai...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] make-release: fix lines too longs - change (mediawiki...release)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/82819 Change subject: make-release: fix lines too longs .. make-release: fix lines too longs Fix pep8 errors: E501 line too long (X 79 characters) Change-Id: Ia5bccfdfd6298456155562e2508339fb68b57c5b --- M make-release/make-release.py D tox.ini 2 files changed, 108 insertions(+), 43 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release refs/changes/19/82819/1 diff --git a/make-release/make-release.py b/make-release/make-release.py index 244de39..d0d281d 100755 --- a/make-release/make-release.py +++ b/make-release/make-release.py @@ -34,11 +34,29 @@ extensions = [] smwExtensions = [ -SemanticMediaWiki, SemanticResultFormats, SemanticForms, -SemanticCompoundQueries, SemanticInternalObjects, SemanticDrilldown, -SemanticMaps, SemanticWatchlist, SemanticTasks, SemanticFormsInputs, -SemanticImageInput, Validator, AdminLinks, ApprovedRevs, Arrays, DataTransfer, -ExternalData, HeaderTabs, Maps, PageSchemas, ReplaceText, Widgets] +'SemanticMediaWiki', +'SemanticResultFormats', +'SemanticForms', +'SemanticCompoundQueries', +'SemanticInternalObjects', +'SemanticDrilldown', +'SemanticMaps', +'SemanticWatchlist', +'SemanticTasks', +'SemanticFormsInputs', +'SemanticImageInput', +'Validator', +'AdminLinks', +'ApprovedRevs', +'Arrays', +'DataTransfer', +'ExternalData', +'HeaderTabs', +'Maps', +'PageSchemas', +'ReplaceText', +'Widgets', +] # No version specified, assuming a snapshot release if options.nextversion is None: @@ -74,8 +92,10 @@ return if decomposed['prevVersion'] is None: -if not ask(No previous release found. Do you want to make a release with no patch?): -print 'Please specify the correct previous release on the command line' +if not ask(No previous release found. Do you want to make a release + with no patch?): +print('Please specify the correct previous release' + 'on the command line') sys.exit(1) else: noPrevious = True @@ -88,8 +108,10 @@ dir=decomposed['major'], gitRoot=options.gitroot) else: -if not ask(Was %s the previous release? % (decomposed['prevVersion'])): -print 'Please specify the correct previous release on the command line' +if not ask(Was %s the previous release? % ( + decomposed['prevVersion'])): +print('Please specify the correct previous release' + 'on the command line') sys.exit(1) makeRelease( @@ -156,13 +178,15 @@ m = re.compile('(\d+)\.(\d+)\.(\d+)$').match(version) if m is not None: ret['major'] = m.group(1) + . + m.group(2) -ret['branch'] = 'tags/' + m.group(1) + '.' + m.group(2) + '.' + m.group(3) +ret['branch'] = ('tags/' + m.group(1) + '.' + m.group(2) + + '.' + m.group(3)) if int(m.group(3)) == 0: ret['prevVersion'] = None else: newMinor = str(int(m.group(3)) - 1) ret['prevVersion'] = ret['major'] + '.' + newMinor -ret['prevBranch'] = 'tags/' + m.group(1) + '.' + m.group(2) + '.' + newMinor +ret['prevBranch'] = ('tags/' + m.group(1) + '.' + m.group(2) + + '.' + newMinor) return ret m = re.compile('(\d+)\.(\d+)\.(\d+)([A-Za-z]+)(\d+)$').match(version) @@ -170,13 +194,16 @@ return None ret['major'] = m.group(1) + . + m.group(2) -ret['branch'] = ('tags/' + m.group(1) + '.' + m.group(2) + '.' + m.group(3) + m.group(4) + m.group(5)) +ret['branch'] = ('tags/' + m.group(1) + '.' + m.group(2) + '.' + + m.group(3) + m.group(4) + m.group(5)) if int(m.group(5)) == 0: ret['prevVersion'] = None else: newMinor = str(int(m.group(5)) - 1) -ret['prevVersion'] = ret['major'] + . + m.group(3) + m.group(4) + newMinor -ret['prevBranch'] = ('tags/' + m.group(1) + '.' + m.group(2) + '.' + m.group(3) + m.group(4) + newMinor) +ret['prevVersion'] = (ret['major'] + . + m.group(3) + + m.group(4) + newMinor) +ret['prevBranch'] = ('tags/' + m.group(1) + '.' + m.group(2) + + '.' + m.group(3) + m.group(4) + newMinor) return ret @@ -199,7 +226,8 @@ def getGit(repo, dir, label): if (os.path.exists(dir)): print Updating + label + in + dir + ... -proc = subprocess.Popen(['sh', '-c', 'cd ' + dir + '; git fetch -q --all']) +proc =
[MediaWiki-commits] [Gerrit] make-release: rename script to make-release.py - change (mediawiki...release)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/82818 Change subject: make-release: rename script to make-release.py .. make-release: rename script to make-release.py It is a python script, so give hint about it by renaming the file. That also let us get rid of the 'filename' tweak in tox.ini for pep8/flake8. Change-Id: Ie157aa33826e61598b74bae67cdf2358e340dae6 --- R make-release/make-release.py M tox.ini 2 files changed, 0 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release refs/changes/18/82818/1 diff --git a/make-release/make-release b/make-release/make-release.py similarity index 100% rename from make-release/make-release rename to make-release/make-release.py diff --git a/tox.ini b/tox.ini index 977fe02..90c48bd 100644 --- a/tox.ini +++ b/tox.ini @@ -1,9 +1,7 @@ [flake8] -filename=*.py,make-release ; E501 line too long (X 79 characters) ignore=E501 [pep8] -filename=*.py,make-release ; E501 line too long (X 79 characters) ignore=E501 -- To view, visit https://gerrit.wikimedia.org/r/82818 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie157aa33826e61598b74bae67cdf2358e340dae6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/tools/release Gerrit-Branch: master Gerrit-Owner: Hashar has...@free.fr ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] (bug 53678) add compatiblity for change dispatcher with badges - change (mediawiki...Wikibase)
Tobias Gritschacher has submitted this change and it was merged. Change subject: (bug 53678) add compatiblity for change dispatcher with badges .. (bug 53678) add compatiblity for change dispatcher with badges also added missing message key 'wikibase-comment-add' Change-Id: I8ad2e4d3f21b9dcf1b6a6b18bc8a6d97a3ab4da1 --- M client/WikibaseClient.i18n.php M client/includes/ChangeHandler.php 2 files changed, 34 insertions(+), 10 deletions(-) Approvals: Tobias Gritschacher: Verified; Looks good to me, approved diff --git a/client/WikibaseClient.i18n.php b/client/WikibaseClient.i18n.php index 6d70d3e..11888c5 100644 --- a/client/WikibaseClient.i18n.php +++ b/client/WikibaseClient.i18n.php @@ -26,6 +26,7 @@ 'tooltip-t-wikibase' = 'Link to connected data repository item', 'wikibase-after-page-move' = 'You may also [$1 update] the associated Wikidata item to maintain language links on moved page.', 'wikibase-after-page-move-queued' = 'The [$1 Wikidata item] associated with this page will be automatically updated soon.', + 'wikibase-comment-add' = 'A Wikidata item has been created.', 'wikibase-comment-remove' = 'Associated Wikidata item deleted. Language links removed.', 'wikibase-comment-linked' = 'A Wikidata item has been linked to this page.', 'wikibase-comment-unlink' = 'This page has been unlinked from Wikidata item. Language links removed.', @@ -100,6 +101,7 @@ Parameters: * $1 - the link for the associated Wikibase item.', + 'wikibase-comment-add' = 'Autocomment message in the client for when an item is created (and then is linked to the client page).', 'wikibase-comment-remove' = 'Autocomment message for client (e.g. Wikipedia) recent changes when a Wikidata item connected to a page gets deleted. This results in all the language links being removed from the page on the client.', 'wikibase-comment-linked' = 'Autocomment message in the client for when a Wikidata item is linked to a page in the client.', 'wikibase-comment-unlink' = 'Autocomment message for client (e.g. Wikipedia) recent changes when a site link to a page gets removed. This results in the associated item being disconnected from the client page and all the language links being removed.', diff --git a/client/includes/ChangeHandler.php b/client/includes/ChangeHandler.php index b2bbd30..f67a4ed 100644 --- a/client/includes/ChangeHandler.php +++ b/client/includes/ChangeHandler.php @@ -572,6 +572,11 @@ $siteLinkDiffOp = $siteLinkDiff !== null isset( $siteLinkDiff[ $siteGlobalId ] ) ? $siteLinkDiff[ $siteGlobalId ] : null; + // backwards compatibility + if ( ( $siteLinkDiffOp instanceof \Diff\Diff ) array_key_exists( 'name', $siteLinkDiffOp ) ) { + $siteLinkDiffOp = $siteLinkDiffOp['name']; + } + if ( $siteLinkDiffOp === null ) { // do nothing } elseif ( $siteLinkDiffOp instanceof \Diff\DiffOpAdd ) { @@ -780,7 +785,7 @@ $siteLinkDiff = ( $change instanceof ItemChange ) ? $change-getSiteLinkDiff() : null; if ( $siteLinkDiff !== null !$siteLinkDiff-isEmpty() ) { - $comment = self::getSiteLinkComment( $change-getAction(), $siteLinkDiff, $title ) ; + $comment = $this-getSiteLinkComment( $change-getAction(), $siteLinkDiff, $title ) ; } else { $comment = $change-getComment(); } @@ -805,25 +810,32 @@ * @return array|null */ protected function getSiteLinkComment( $action, \Diff\Diff $siteLinkDiff, \Title $title ) { - $params = null; - - if ( $siteLinkDiff-isEmpty() ) { - return null; - } - wfProfileIn( __METHOD__ ); //TODO: Implement comments specific to the affected page. // Different pages may be affected in different ways by the same change. // Also, merged changes may affect the same page in multiple ways. - $params = array(); + $params = array( + 'message' = 'wikibase-comment-update' + ); + $siteGlobalId = $this-site-getGlobalId(); // change involved site link to client wiki if ( array_key_exists( $siteGlobalId, $siteLinkDiff ) ) { - - $diffOp = $siteLinkDiff[$siteGlobalId]; + // check for new site link diff structure, with badges + if ( $siteLinkDiff instanceof \Diff\Diff ) { +
[MediaWiki-commits] [Gerrit] make-release: rename script to make-release.py - change (mediawiki...release)
jenkins-bot has submitted this change and it was merged. Change subject: make-release: rename script to make-release.py .. make-release: rename script to make-release.py It is a python script, so give hint about it by renaming the file. That also let us get rid of the 'filename' tweak in tox.ini for pep8/flake8. Change-Id: Ie157aa33826e61598b74bae67cdf2358e340dae6 --- R make-release/make-release.py M tox.ini 2 files changed, 0 insertions(+), 2 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/make-release/make-release b/make-release/make-release.py similarity index 100% rename from make-release/make-release rename to make-release/make-release.py diff --git a/tox.ini b/tox.ini index 977fe02..90c48bd 100644 --- a/tox.ini +++ b/tox.ini @@ -1,9 +1,7 @@ [flake8] -filename=*.py,make-release ; E501 line too long (X 79 characters) ignore=E501 [pep8] -filename=*.py,make-release ; E501 line too long (X 79 characters) ignore=E501 -- To view, visit https://gerrit.wikimedia.org/r/82818 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie157aa33826e61598b74bae67cdf2358e340dae6 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/tools/release Gerrit-Branch: master Gerrit-Owner: Hashar has...@free.fr Gerrit-Reviewer: Hashar has...@free.fr Gerrit-Reviewer: MarkAHershberger mhershber...@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] Support coordinate and entityidvalue when generating claim a... - change (mediawiki...Wikibase)
Tobias Gritschacher has uploaded a new change for review. https://gerrit.wikimedia.org/r/82820 Change subject: Support coordinate and entityidvalue when generating claim autosummary .. Support coordinate and entityidvalue when generating claim autosummary - this is a fix for deployment only - coordinates were just left blank in the summaries till now - also the entityid were not shown anymore due to the changes in the EntityId class - on master this should be fixed using formatters Change-Id: Ie6e26e47e6da7356bda151159ccad8237fd0596f --- M repo/includes/ClaimSummaryBuilder.php 1 file changed, 14 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/20/82820/1 diff --git a/repo/includes/ClaimSummaryBuilder.php b/repo/includes/ClaimSummaryBuilder.php index e338fd0..e06e426 100644 --- a/repo/includes/ClaimSummaryBuilder.php +++ b/repo/includes/ClaimSummaryBuilder.php @@ -2,9 +2,12 @@ namespace Wikibase; +use Wikibase\DataModel\Entity\EntityIdValue; + use DataValues\TimeValue; use InvalidArgumentException; use Wikibase\Lib\EntityIdFormatter; +use DataValues\GlobeCoordinateValue; /** * EditSummary-Builder for claim operations @@ -130,9 +133,19 @@ if ( $snak instanceof PropertyValueSnak ) { $value = $snak-getDataValue(); + // TODO: we should use value formatters here! - if ( $value instanceof TimeValue ) { + if ( $value instanceof EntityIdValue ) { + $value = $value-getEntityId(); + } elseif ( $value instanceof TimeValue ) { $value = $value-getTime(); + } elseif ( $value instanceof GlobeCoordinateValue ) { + $value = $value-getLatitude() . ', ' . $value-getLongitude(); + } elseif ( is_string( $value-getValue() ) ) { + $value = $value-getValue(); + } else { + //type not supported; + $value = ; } } else { $value = $snak-getType(); // todo handle no values in general way (needed elsewhere) -- To view, visit https://gerrit.wikimedia.org/r/82820 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie6e26e47e6da7356bda151159ccad8237fd0596f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: mw1.22-wmf16 Gerrit-Owner: Tobias Gritschacher tobias.gritschac...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] make-release: fix lines too longs - change (mediawiki...release)
jenkins-bot has submitted this change and it was merged. Change subject: make-release: fix lines too longs .. make-release: fix lines too longs Fix pep8 errors: E501 line too long (X 79 characters) Change-Id: Ia5bccfdfd6298456155562e2508339fb68b57c5b --- M make-release/make-release.py D tox.ini 2 files changed, 108 insertions(+), 43 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/make-release/make-release.py b/make-release/make-release.py index f65ecbc..6b0d7e0 100755 --- a/make-release/make-release.py +++ b/make-release/make-release.py @@ -34,11 +34,29 @@ extensions = [] smwExtensions = [ -SemanticMediaWiki, SemanticResultFormats, SemanticForms, -SemanticCompoundQueries, SemanticInternalObjects, SemanticDrilldown, -SemanticMaps, SemanticWatchlist, SemanticTasks, SemanticFormsInputs, -SemanticImageInput, Validator, AdminLinks, ApprovedRevs, Arrays, DataTransfer, -ExternalData, HeaderTabs, Maps, PageSchemas, ReplaceText, Widgets] +'SemanticMediaWiki', +'SemanticResultFormats', +'SemanticForms', +'SemanticCompoundQueries', +'SemanticInternalObjects', +'SemanticDrilldown', +'SemanticMaps', +'SemanticWatchlist', +'SemanticTasks', +'SemanticFormsInputs', +'SemanticImageInput', +'Validator', +'AdminLinks', +'ApprovedRevs', +'Arrays', +'DataTransfer', +'ExternalData', +'HeaderTabs', +'Maps', +'PageSchemas', +'ReplaceText', +'Widgets', +] # No version specified, assuming a snapshot release if options.nextversion is None: @@ -74,8 +92,10 @@ return if decomposed['prevVersion'] is None: -if not ask(No previous release found. Do you want to make a release with no patch?): -print 'Please specify the correct previous release on the command line' +if not ask(No previous release found. Do you want to make a release + with no patch?): +print('Please specify the correct previous release' + 'on the command line') sys.exit(1) else: noPrevious = True @@ -88,8 +108,10 @@ dir=decomposed['major'], gitRoot=options.gitroot) else: -if not ask(Was %s the previous release? % (decomposed['prevVersion'])): -print 'Please specify the correct previous release on the command line' +if not ask(Was %s the previous release? % ( + decomposed['prevVersion'])): +print('Please specify the correct previous release' + 'on the command line') sys.exit(1) makeRelease( @@ -156,13 +178,15 @@ m = re.compile('(\d+)\.(\d+)\.(\d+)$').match(version) if m is not None: ret['major'] = m.group(1) + . + m.group(2) -ret['branch'] = 'tags/' + m.group(1) + '.' + m.group(2) + '.' + m.group(3) +ret['branch'] = ('tags/' + m.group(1) + '.' + m.group(2) + + '.' + m.group(3)) if int(m.group(3)) == 0: ret['prevVersion'] = None else: newMinor = str(int(m.group(3)) - 1) ret['prevVersion'] = ret['major'] + '.' + newMinor -ret['prevBranch'] = 'tags/' + m.group(1) + '.' + m.group(2) + '.' + newMinor +ret['prevBranch'] = ('tags/' + m.group(1) + '.' + m.group(2) + + '.' + newMinor) return ret m = re.compile('(\d+)\.(\d+)\.(\d+)([A-Za-z]+)(\d+)$').match(version) @@ -170,13 +194,16 @@ return None ret['major'] = m.group(1) + . + m.group(2) -ret['branch'] = ('tags/' + m.group(1) + '.' + m.group(2) + '.' + m.group(3) + m.group(4) + m.group(5)) +ret['branch'] = ('tags/' + m.group(1) + '.' + m.group(2) + '.' + + m.group(3) + m.group(4) + m.group(5)) if int(m.group(5)) == 0: ret['prevVersion'] = None else: newMinor = str(int(m.group(5)) - 1) -ret['prevVersion'] = ret['major'] + . + m.group(3) + m.group(4) + newMinor -ret['prevBranch'] = ('tags/' + m.group(1) + '.' + m.group(2) + '.' + m.group(3) + m.group(4) + newMinor) +ret['prevVersion'] = (ret['major'] + . + m.group(3) + + m.group(4) + newMinor) +ret['prevBranch'] = ('tags/' + m.group(1) + '.' + m.group(2) + + '.' + m.group(3) + m.group(4) + newMinor) return ret @@ -199,7 +226,8 @@ def getGit(repo, dir, label): if (os.path.exists(dir)): print Updating + label + in + dir + ... -proc = subprocess.Popen(['sh', '-c', 'cd ' + dir + '; git fetch -q --all']) +proc = subprocess.Popen( +['sh', '-c', 'cd ' + dir + ';
[MediaWiki-commits] [Gerrit] EMPTY - change (mediawiki...Wikibase)
Liangent has uploaded a new change for review. https://gerrit.wikimedia.org/r/82821 Change subject: EMPTY .. EMPTY Change-Id: Ibb9a3c70609066dd2cca11fdf7be3fa553b37464 --- 0 files changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/21/82821/1 -- To view, visit https://gerrit.wikimedia.org/r/82821 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibb9a3c70609066dd2cca11fdf7be3fa553b37464 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Liangent liang...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] (Bug 52396) use getSubject()-getDBkey() instead - change (mediawiki...SemanticMediaWiki)
jenkins-bot has submitted this change and it was merged. Change subject: (Bug 52396) use getSubject()-getDBkey() instead .. (Bug 52396) use getSubject()-getDBkey() instead Change-Id: Ifb6e7c0b9fe68efdf0155efa92b36be4c8031394 --- M includes/BasePropertyAnnotator.php M tests/phpunit/includes/BasePropertyAnnotatorTest.php 2 files changed, 44 insertions(+), 20 deletions(-) Approvals: Mwjames: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/BasePropertyAnnotator.php b/includes/BasePropertyAnnotator.php index dc9289f..4734ca9 100644 --- a/includes/BasePropertyAnnotator.php +++ b/includes/BasePropertyAnnotator.php @@ -105,7 +105,7 @@ * @return BasePropertyAnnotator */ public function addDefaultSort( $defaultSort ) { - $sortkey = $defaultSort ? $defaultSort : str_replace( '_', ' ', $this-semanticData-getSubject()-getTitle()-getDBkey() ); + $sortkey = $defaultSort ? $defaultSort : str_replace( '_', ' ', $this-semanticData-getSubject()-getDBkey() ); $this-semanticData-addPropertyObjectValue( new DIProperty( DIProperty::TYPE_SORTKEY ), new SMWDIBlob( $sortkey ) diff --git a/tests/phpunit/includes/BasePropertyAnnotatorTest.php b/tests/phpunit/includes/BasePropertyAnnotatorTest.php index 67c69e9..0ecc1b0 100644 --- a/tests/phpunit/includes/BasePropertyAnnotatorTest.php +++ b/tests/phpunit/includes/BasePropertyAnnotatorTest.php @@ -51,7 +51,7 @@ * * @return BasePropertyAnnotator */ - private function getInstance( SemanticData $semanticData = null, $settings = array() ) { + private function newInstance( SemanticData $semanticData = null, $settings = array() ) { if ( $semanticData === null ) { $semanticData = $this-newMockObject()-getMockSemanticData(); @@ -66,7 +66,7 @@ * @since 1.9 */ public function testConstructor() { - $this-assertInstanceOf( $this-getClass(), $this-getInstance() ); + $this-assertInstanceOf( $this-getClass(), $this-newInstance() ); } /** @@ -86,10 +86,14 @@ $this-newSubject( $this-newTitle( $setup['namespace'] ) ) ); - $instance = $this-getInstance( $semanticData, $setup['settings'] ); + $instance = $this-newInstance( $semanticData, $setup['settings'] ); $instance-addCategories( $setup['categories'] ); - $this-assertSemanticData( $semanticData, $expected ); + $this-assertSemanticData( + $semanticData, + $expected, + 'asserts that addCategories() adds expected triples' + ); } @@ -115,16 +119,19 @@ ) )-getMockObsever(); // Create instance and attach mock Observer - $instance = $this-getInstance( $semanticData, $setup['settings'] ); + $instance = $this-newInstance( $semanticData, $setup['settings'] ); $instance-attach( $mockObserver ); $instance-addCategories( $setup['categories'] ); - $this-assertSemanticData( $semanticData, $expected ); + $this-assertSemanticData( + $semanticData, + $expected, + 'asserts that addCategories() adds expected triples' + ); - // Just verify that the Publisher was able to reach the Observer $this-assertTrue( $this-observerStatus, - 'Failed asserting that the invoked Observer received a notification from the Publisher (Subject)' + 'asserts that the invoked Observer received a notification from the Publisher (Subject)' ); } @@ -149,13 +156,18 @@ $parserData = $this-getParserData( $title, $parserOutput ); // Create instance and attach mock Observer - $instance = $this-getInstance( $parserData-getData(), $setup['settings'] ); + $instance = $this-newInstance( $parserData-getData(), $setup['settings'] ); $instance-attach( $parserData ); $instance-addCategories( $setup['categories'] ); // Re-read data from the $parserOutput object $newParserData = $this-getParserData( $title, $parserOutput ); - $this-assertSemanticData( $newParserData-getData(), $expected ); + + $this-assertSemanticData( + $newParserData-getData(), + $expected, + 'asserts that addCategories() adds expected triples' + ); } @@ -180,17 +192,21 @@
[MediaWiki-commits] [Gerrit] Adding scala as a build dependency - change (operations...kafka)
Akosiaris has uploaded a new change for review. https://gerrit.wikimedia.org/r/82822 Change subject: Adding scala as a build dependency .. Adding scala as a build dependency It was missing for some reason. Adding .gitreview file and some whitespace cleanup in the process Change-Id: I870ddd54015b159b374510827c9cd2b22be15520 --- A .gitreview M debian/changelog M debian/control 3 files changed, 7 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/debs/kafka refs/changes/22/82822/1 diff --git a/.gitreview b/.gitreview new file mode 100644 index 000..eb2653b --- /dev/null +++ b/.gitreview @@ -0,0 +1,5 @@ +[gerrit] +host=gerrit.wikimedia.org +port=29418 +project=operations/debs/kafka +defaultbranch=debian diff --git a/debian/changelog b/debian/changelog index 08271b4..2eaea99 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,7 +2,7 @@ * Bumping version to reflect latest commit in 0.8 branch. - -- Alexandros Kosiaris akosia...@wikimedia.org Wed, 28 Aug 2013 16:50:14 + + -- Alexandros Kosiaris akosia...@wikimedia.org Wed, 28 Aug 2013 16:50:14 + kafka (0.8~20130610-1) unstable; urgency=low diff --git a/debian/control b/debian/control index 30c189c..381bb17 100644 --- a/debian/control +++ b/debian/control @@ -3,6 +3,7 @@ Priority: optional Maintainer: Alexandros Kosiaris akosia...@wikimedia.org Build-Depends: debhelper (= 9), default-jdk, javahelper (= 0.40), + scala, junit4, velocity, libasm3-java, -- To view, visit https://gerrit.wikimedia.org/r/82822 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I870ddd54015b159b374510827c9cd2b22be15520 Gerrit-PatchSet: 1 Gerrit-Project: operations/debs/kafka Gerrit-Branch: debian Gerrit-Owner: Akosiaris akosia...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix Aliasing direction - change (mediawiki...WikibaseDataModel)
Addshore has uploaded a new change for review. https://gerrit.wikimedia.org/r/82823 Change subject: Fix Aliasing direction .. Fix Aliasing direction Change-Id: I9b10293d39871d1746eb1221f75e7c1e06ba816b --- M WikibaseDataModel.php 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikibaseDataModel refs/changes/23/82823/1 diff --git a/WikibaseDataModel.php b/WikibaseDataModel.php index 6987b76..d64e621 100644 --- a/WikibaseDataModel.php +++ b/WikibaseDataModel.php @@ -81,9 +81,9 @@ // Aliasing of classes that got renamed. // For more details, see Aliases.php. class_alias( 'Wikibase\Item', 'Wikibase\ItemObject' ); -class_alias( 'Wikibase\ReferenceObject', 'Wikibase\Reference' ); -class_alias( 'Wikibase\ClaimObject', 'Wikibase\Claim' ); -class_alias( 'Wikibase\StatementObject', 'Wikibase\Statement' ); +class_alias( 'Wikibase\Reference', 'Wikibase\ReferenceObject' ); +class_alias( 'Wikibase\Claim', 'Wikibase\ClaimObject' ); +class_alias( 'Wikibase\Statement', 'Wikibase\StatementObject' ); class_alias( 'Wikibase\DataModel\Entity\EntityId', 'Wikibase\EntityId' ); if ( defined( 'MEDIAWIKI' ) ) { -- To view, visit https://gerrit.wikimedia.org/r/82823 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9b10293d39871d1746eb1221f75e7c1e06ba816b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikibaseDataModel Gerrit-Branch: master Gerrit-Owner: Addshore addshorew...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix Aliasing direction - change (mediawiki...WikibaseDataModel)
jenkins-bot has submitted this change and it was merged. Change subject: Fix Aliasing direction .. Fix Aliasing direction Change-Id: I9b10293d39871d1746eb1221f75e7c1e06ba816b --- M WikibaseDataModel.php 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Daniel Kinzler: Looks good to me, approved jenkins-bot: Verified diff --git a/WikibaseDataModel.php b/WikibaseDataModel.php index 6987b76..d64e621 100644 --- a/WikibaseDataModel.php +++ b/WikibaseDataModel.php @@ -81,9 +81,9 @@ // Aliasing of classes that got renamed. // For more details, see Aliases.php. class_alias( 'Wikibase\Item', 'Wikibase\ItemObject' ); -class_alias( 'Wikibase\ReferenceObject', 'Wikibase\Reference' ); -class_alias( 'Wikibase\ClaimObject', 'Wikibase\Claim' ); -class_alias( 'Wikibase\StatementObject', 'Wikibase\Statement' ); +class_alias( 'Wikibase\Reference', 'Wikibase\ReferenceObject' ); +class_alias( 'Wikibase\Claim', 'Wikibase\ClaimObject' ); +class_alias( 'Wikibase\Statement', 'Wikibase\StatementObject' ); class_alias( 'Wikibase\DataModel\Entity\EntityId', 'Wikibase\EntityId' ); if ( defined( 'MEDIAWIKI' ) ) { -- To view, visit https://gerrit.wikimedia.org/r/82823 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9b10293d39871d1746eb1221f75e7c1e06ba816b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikibaseDataModel Gerrit-Branch: master Gerrit-Owner: Addshore addshorew...@gmail.com Gerrit-Reviewer: Daniel Kinzler daniel.kinz...@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] Support coordinate and entityidvalue when generating claim a... - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Support coordinate and entityidvalue when generating claim autosummary .. Support coordinate and entityidvalue when generating claim autosummary - this is a fix for deployment only - coordinates were just left blank in the summaries till now - also the entityid were not shown anymore due to the changes in the EntityId class - on master this should be fixed using formatters Change-Id: Ie6e26e47e6da7356bda151159ccad8237fd0596f --- M repo/includes/ClaimSummaryBuilder.php 1 file changed, 13 insertions(+), 1 deletion(-) Approvals: Daniel Kinzler: Looks good to me, approved jenkins-bot: Verified diff --git a/repo/includes/ClaimSummaryBuilder.php b/repo/includes/ClaimSummaryBuilder.php index e338fd0..f17cbc8 100644 --- a/repo/includes/ClaimSummaryBuilder.php +++ b/repo/includes/ClaimSummaryBuilder.php @@ -2,9 +2,11 @@ namespace Wikibase; +use Wikibase\DataModel\Entity\EntityIdValue; use DataValues\TimeValue; use InvalidArgumentException; use Wikibase\Lib\EntityIdFormatter; +use DataValues\GlobeCoordinateValue; /** * EditSummary-Builder for claim operations @@ -130,9 +132,19 @@ if ( $snak instanceof PropertyValueSnak ) { $value = $snak-getDataValue(); + // TODO: we should use value formatters here! - if ( $value instanceof TimeValue ) { + if ( $value instanceof EntityIdValue ) { + $value = $value-getEntityId(); + } elseif ( $value instanceof TimeValue ) { $value = $value-getTime(); + } elseif ( $value instanceof GlobeCoordinateValue ) { + $value = $value-getLatitude() . ', ' . $value-getLongitude(); + } elseif ( is_string( $value-getValue() ) ) { + $value = $value-getValue(); + } else { + //type not supported; + $value = ; } } else { $value = $snak-getType(); // todo handle no values in general way (needed elsewhere) -- To view, visit https://gerrit.wikimedia.org/r/82820 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie6e26e47e6da7356bda151159ccad8237fd0596f Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: mw1.22-wmf16 Gerrit-Owner: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: Daniel Kinzler daniel.kinz...@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] Label and description serialization now accepts LanguageFall... - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Label and description serialization now accepts LanguageFallbackChain as the language option .. Label and description serialization now accepts LanguageFallbackChain as the language option Labels and descriptions in all serialized formats will get a new field 'source-language', to indicate the language where this label was fetched. If the target format doesn't have keys, one new extra field 'for-language' is added, to hold the language which is used as keys normally. Change-Id: Iec62d6817e3007e1982db65b5031ec09ecda3374 --- M lib/WikibaseLib.classes.php M lib/includes/serializers/DescriptionSerializer.php M lib/includes/serializers/EntitySerializer.php M lib/includes/serializers/LabelSerializer.php A lib/includes/serializers/MultilingualSerializer.php M lib/tests/phpunit/serializers/DescriptionSerializerTest.php M lib/tests/phpunit/serializers/LabelSerializerTest.php A lib/tests/phpunit/serializers/MultilingualSerializerTest.php 8 files changed, 787 insertions(+), 33 deletions(-) Approvals: Daniel Kinzler: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/WikibaseLib.classes.php b/lib/WikibaseLib.classes.php index 7fa82fc..f63ede2 100644 --- a/lib/WikibaseLib.classes.php +++ b/lib/WikibaseLib.classes.php @@ -118,6 +118,7 @@ 'Wikibase\Lib\Serializers\ReferenceSerializer' = 'includes/serializers/ReferenceSerializer.php', 'Wikibase\Lib\Serializers\SerializationOptions' = 'includes/serializers/SerializationOptions.php', 'Wikibase\Lib\Serializers\MultiLangSerializationOptions' = 'includes/serializers/SerializationOptions.php', + 'Wikibase\Lib\Serializers\MultilingualSerializer' = 'includes/serializers/MultilingualSerializer.php', 'Wikibase\Lib\Serializers\EntitySerializationOptions' = 'includes/serializers/SerializationOptions.php', 'Wikibase\Lib\Serializers\Serializer' = 'includes/serializers/Serializer.php', 'Wikibase\Lib\Serializers\SerializerFactory' = 'includes/serializers/SerializerFactory.php', diff --git a/lib/includes/serializers/DescriptionSerializer.php b/lib/includes/serializers/DescriptionSerializer.php index 9cb8dd4..6ed669a 100644 --- a/lib/includes/serializers/DescriptionSerializer.php +++ b/lib/includes/serializers/DescriptionSerializer.php @@ -42,21 +42,33 @@ protected $options; /** +* @var MultilingualSerializer +*/ + protected $multilingualSerializer; + + /** * Constructor. * * @since 0.4 * * @param MultiLangSerializationOptions $options */ - public function __construct( MultiLangSerializationOptions $options = null ) { + public function __construct( MultiLangSerializationOptions $options = null, + MultilingualSerializer $multilingualSerializer = null + ) { if ( $options === null ) { $this-options = new MultiLangSerializationOptions(); + } + if ( $multilingualSerializer === null ) { + $this-multilingualSerializer = new MultilingualSerializer( $options ); + } else { + $this-multilingualSerializer = $multilingualSerializer; } parent::__construct( $options ); } /** -* Returns a serialized array of descriptions. +* Returns a serialized array of descriptions for all data given. * * @since 0.4 * @@ -70,17 +82,7 @@ throw new InvalidArgumentException( 'DescriptionSerializer can only serialize an array of descriptions' ); } - $value = array(); - $idx = 0; - - foreach ( $descriptions as $languageCode = $description ) { - $key = $this-options-shouldUseKeys() ? $languageCode : $idx++; - $valueKey = ( $description === '' ) ? 'removed' : 'value'; - $value[$key] = array( - 'language' = $languageCode, - $valueKey = $description - ); - } + $value = $this-multilingualSerializer-serializeMultilingualValues( $descriptions ); if ( !$this-options-shouldUseKeys() ) { $this-setIndexedTagName( $value, 'description' ); @@ -88,4 +90,21 @@ return $value; } + + /** +* Returns a serialized array of descriptions from raw description data array. +* +* Unlike getSerialized(), $descriptions is filtered first for requested languages then gets serialized with getSerialized(). +* +* @since 0.4 +* +*
[MediaWiki-commits] [Gerrit] Switch queries to ANDing terms together. - change (mediawiki...CirrusSearch)
Manybubbles has uploaded a new change for review. https://gerrit.wikimedia.org/r/82825 Change subject: Switch queries to ANDing terms together. .. Switch queries to ANDing terms together. This is more standard for search engines but can lead to times where the user gets too few results because they were too specific. It is also the default behavior of lsearchd. Change-Id: Ia6603302afd00317366301663f4e5d24d1f4de4f --- M CirrusSearchSearcher.php 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch refs/changes/25/82825/1 diff --git a/CirrusSearchSearcher.php b/CirrusSearchSearcher.php index 0aefbe2..6bdc080 100644 --- a/CirrusSearchSearcher.php +++ b/CirrusSearchSearcher.php @@ -191,6 +191,7 @@ $queryStringQuery-setFields( $fields ); $queryStringQuery-setAutoGeneratePhraseQueries( true ); $queryStringQuery-setPhraseSlop( 3 ); + $queryStringQuery-setDefaultOperator( 'AND' ); // TODO phrase match boosts? $query-setQuery( self::boostQuery( $queryStringQuery ) ); $query-setParam( 'suggest', array( -- To view, visit https://gerrit.wikimedia.org/r/82825 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia6603302afd00317366301663f4e5d24d1f4de4f 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] pagegenerators.RedirectFilterPageGenerator - change (pywikibot/core)
Beta16 has uploaded a new change for review. https://gerrit.wikimedia.org/r/82826 Change subject: pagegenerators.RedirectFilterPageGenerator .. pagegenerators.RedirectFilterPageGenerator Added the possibility to filter pages that are redirects or not redirects. Change-Id: I4e5d428062a8789485c55b07286b65ac977b9ee3 --- M pywikibot/pagegenerators.py 1 file changed, 5 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/26/82826/1 diff --git a/pywikibot/pagegenerators.py b/pywikibot/pagegenerators.py index d04b2f9..7617323 100644 --- a/pywikibot/pagegenerators.py +++ b/pywikibot/pagegenerators.py @@ -750,10 +750,12 @@ yield page -def RedirectFilterPageGenerator(generator): -Yields pages from another generator that are not redirects. +def RedirectFilterPageGenerator(generator, no_redirects=True): +Yields pages from another generator that are redirects or not. for page in generator: -if not page.isRedirectPage(): +if not page.isRedirectPage() and no_redirects: +yield page +elif page.isRedirectPage() and not no_redirects: yield page -- To view, visit https://gerrit.wikimedia.org/r/82826 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4e5d428062a8789485c55b07286b65ac977b9ee3 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Beta16 l.rabine...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Tests for switching to ANDing query terms together - change (mediawiki...CirrusSearch)
Manybubbles has uploaded a new change for review. https://gerrit.wikimedia.org/r/82827 Change subject: Tests for switching to ANDing query terms together .. Tests for switching to ANDing query terms together Added some more tests and changed the expected results for the tests that use empty prefixes - we now expect no results which should be ok. Change-Id: I7e38d0fcaf94268b1a78766b0682563e96125b67 --- M tests/browser/features/full_text.feature 1 file changed, 13 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch refs/changes/27/82827/1 diff --git a/tests/browser/features/full_text.feature b/tests/browser/features/full_text.feature index 2645613..20a015c 100644 --- a/tests/browser/features/full_text.feature +++ b/tests/browser/features/full_text.feature @@ -43,8 +43,9 @@ | 3.1 Conquest of Persian empire | none is | not in || # You can't search for the [edit] tokens that users can click to edit sections | Succession of Umar edit| none is | not in || -| intitle: catapult | Catapult is | in || -| incategory: catapult | Catapult is | in || +# Empty intitle and incategory are treated as a query term. Since terms are anded together you won't find anything. +| intitle: catapult | none is | not in || +| incategory: catapult | nono is | not in || @setup_main Scenario Outline: Searching for empty-string like values @@ -102,3 +103,13 @@ Scenario: Searching for multiword category finds it When I search for incategory:CategoryWith ASpace Then IHaveATwoWordCategory is the first search result + + @setup_main + Scenario: Searching for a page using its title and another word not in the page's text doesn't find the page +When I search for DontExistWord Two Words +Then there are no search results + + @setup_main + Scenario: Searching for a page using its title and another word in the page's text does find it +When I search for catapult Two Words +Then Two Words is the first search result -- To view, visit https://gerrit.wikimedia.org/r/82827 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7e38d0fcaf94268b1a78766b0682563e96125b67 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] Add missing dependency 'wikibase.dataTypes' 'dataTypes' - change (mediawiki...Wikibase)
Daniel Werner has uploaded a new change for review. https://gerrit.wikimedia.org/r/82829 Change subject: Add missing dependency 'wikibase.dataTypes' 'dataTypes' .. Add missing dependency 'wikibase.dataTypes' 'dataTypes' Change-Id: Iaebb9e0f80a72f6c2b02f7e9ca05a83298258b33 --- M lib/resources/Resources.php 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/29/82829/1 diff --git a/lib/resources/Resources.php b/lib/resources/Resources.php index 22f3f8e..a2394ee 100644 --- a/lib/resources/Resources.php +++ b/lib/resources/Resources.php @@ -73,6 +73,7 @@ ), 'dependencies' = array( 'wikibase', + 'dataTypes', 'mw.config.values.wbDataTypes', ), ), -- To view, visit https://gerrit.wikimedia.org/r/82829 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iaebb9e0f80a72f6c2b02f7e9ca05a83298258b33 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Daniel Werner daniel.wer...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Allow mw.wikibase.label( ) to find labels written in variants - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Allow mw.wikibase.label( ) to find labels written in variants .. Allow mw.wikibase.label( ) to find labels written in variants Some hacky way is used here... Change-Id: Ib73d9090f2db481c5c3592f0eab17fa33d6cd1bc --- M client/includes/WikibaseLibrary.php 1 file changed, 16 insertions(+), 0 deletions(-) Approvals: Daniel Kinzler: Looks good to me, approved jenkins-bot: Verified diff --git a/client/includes/WikibaseLibrary.php b/client/includes/WikibaseLibrary.php index 0869edb..dbda842 100644 --- a/client/includes/WikibaseLibrary.php +++ b/client/includes/WikibaseLibrary.php @@ -28,6 +28,8 @@ use Wikibase\Client\WikibaseClient; use Wikibase\Lib\Serializers\EntitySerializationOptions; use Wikibase\Lib\Serializers\SerializerFactory; +use Wikibase\LanguageFallbackChainFactory; +use Wikibase\Utils; class Scribunto_LuaWikibaseLibrary extends Scribunto_LuaLibraryBase { @@ -76,6 +78,20 @@ $serializerFactory = new SerializerFactory(); $opt = new EntitySerializationOptions( WikibaseClient::getDefaultInstance()-getEntityIdFormatter() ); + + // This is $wgContLang, not parser target language or anything else. + // See Scribunto_LuaLanguageLibrary::getContLangCode(). + global $wgContLang; + + // See mw.wikibase.lua. This is the only way to inject values into mw.wikibase.label( ), + // so any customized Lua modules can access labels of another entity written in another variant, + // unless we give them the ability to getEntity() any entity by specifying its ID, not just self. + $chain = WikibaseClient::getDefaultInstance()-getLanguageFallbackChainFactory()-newFromLanguage( + $wgContLang, LanguageFallbackChainFactory::FALLBACK_SELF | LanguageFallbackChainFactory::FALLBACK_VARIANTS + ); + // MultiLangSerializationOptions accepts mixed types of keys happily. + $opt-setLanguages( Utils::getLanguageCodes() + array( $wgContLang-getCode() = $chain ) ); + $serializer = $serializerFactory-newSerializerForObject( $entityObject, $opt ); try { -- To view, visit https://gerrit.wikimedia.org/r/72751 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib73d9090f2db481c5c3592f0eab17fa33d6cd1bc Gerrit-PatchSet: 10 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Liangent liang...@gmail.com Gerrit-Reviewer: Aude aude.w...@gmail.com Gerrit-Reviewer: Daniel Kinzler daniel.kinz...@wikimedia.de Gerrit-Reviewer: Denny Vrandecic denny.vrande...@wikimedia.de Gerrit-Reviewer: Jens Ohlig jens.oh...@wikimedia.de Gerrit-Reviewer: Liangent liang...@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] Remove non-breaking spaces in the other languages box - change (mediawiki...Translate)
Seb35 has uploaded a new change for review. https://gerrit.wikimedia.org/r/82830 Change subject: Remove non-breaking spaces in the other languages box .. Remove non-breaking spaces in the other languages box Only non-breaking spaces makes the only places where the browser can break the line is the languages containing a (breaking) space, which are not the right places. Bug: 49900 Change-Id: I3470bdf10e787c70d8303e2ba3c6097b93c73357 --- M PageTranslation.i18n.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/30/82830/1 diff --git a/PageTranslation.i18n.php b/PageTranslation.i18n.php index 9fee159..8cf3028 100644 --- a/PageTranslation.i18n.php +++ b/PageTranslation.i18n.php @@ -91,7 +91,7 @@ 'tpt-translation-intro' = 'This page is a span class=plainlinks[$1 translated version]/span of a page [[$2]] and the translation is $3% complete.', 'tpt-languages-legend' = 'Other languages:', - 'tpt-languages-separator' = '#160;•#160;', + 'tpt-languages-separator' = '#160;• ', 'tpt-languages-zero' = 'Start translation for this language', 'tpt-tab-translate' = 'Translate', -- To view, visit https://gerrit.wikimedia.org/r/82830 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3470bdf10e787c70d8303e2ba3c6097b93c73357 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Seb35 seb35wikipe...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update Wikidata related extension branches to use - change (mediawiki...release)
Reedy has uploaded a new change for review. https://gerrit.wikimedia.org/r/82831 Change subject: Update Wikidata related extension branches to use .. Update Wikidata related extension branches to use Change-Id: If7bcbbe819a6af4dfb78370009ca53ffc996880f --- M make-wmf-branch/default.conf 1 file changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release refs/changes/31/82831/1 diff --git a/make-wmf-branch/default.conf b/make-wmf-branch/default.conf index 094487b..c9d67e4 100644 --- a/make-wmf-branch/default.conf +++ b/make-wmf-branch/default.conf @@ -162,12 +162,12 @@ # a string (use that exact commit hash) $specialExtensions = array( 'CentralNotice' = 'wmf_deploy', - 'DataValues' = 'mw1.22-wmf14', - 'DataTypes' = 'mw1.22-wmf11', - 'Diff' = 'mw1.22-wmf14', + 'DataValues' = 'mw1.22-wmf16', + 'DataTypes' = 'mw1.22-wmf16', + 'Diff' = 'mw1.22-wmf16', 'MobileFrontend' = 'production', - 'Wikibase' = 'mw1.22-wmf14', - 'WikibaseDataModel' = 'mw1.22-wmf14', + 'Wikibase' = 'mw1.22-wmf16', + 'WikibaseDataModel' = 'mw1.22-wmf16', // For wikitech use only! 'SemanticMediaWiki' = '1.8.x', -- To view, visit https://gerrit.wikimedia.org/r/82831 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If7bcbbe819a6af4dfb78370009ca53ffc996880f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/tools/release Gerrit-Branch: master Gerrit-Owner: Reedy re...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update Wikidata related extension branches to use - change (mediawiki...release)
jenkins-bot has submitted this change and it was merged. Change subject: Update Wikidata related extension branches to use .. Update Wikidata related extension branches to use Change-Id: If7bcbbe819a6af4dfb78370009ca53ffc996880f --- M make-wmf-branch/default.conf 1 file changed, 5 insertions(+), 5 deletions(-) Approvals: Reedy: Looks good to me, approved jenkins-bot: Verified diff --git a/make-wmf-branch/default.conf b/make-wmf-branch/default.conf index 094487b..c9d67e4 100644 --- a/make-wmf-branch/default.conf +++ b/make-wmf-branch/default.conf @@ -162,12 +162,12 @@ # a string (use that exact commit hash) $specialExtensions = array( 'CentralNotice' = 'wmf_deploy', - 'DataValues' = 'mw1.22-wmf14', - 'DataTypes' = 'mw1.22-wmf11', - 'Diff' = 'mw1.22-wmf14', + 'DataValues' = 'mw1.22-wmf16', + 'DataTypes' = 'mw1.22-wmf16', + 'Diff' = 'mw1.22-wmf16', 'MobileFrontend' = 'production', - 'Wikibase' = 'mw1.22-wmf14', - 'WikibaseDataModel' = 'mw1.22-wmf14', + 'Wikibase' = 'mw1.22-wmf16', + 'WikibaseDataModel' = 'mw1.22-wmf16', // For wikitech use only! 'SemanticMediaWiki' = '1.8.x', -- To view, visit https://gerrit.wikimedia.org/r/82831 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If7bcbbe819a6af4dfb78370009ca53ffc996880f Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/tools/release Gerrit-Branch: master Gerrit-Owner: Reedy re...@wikimedia.org Gerrit-Reviewer: Aude aude.w...@gmail.com Gerrit-Reviewer: Reedy re...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Avoid abstract function errors in php 5.3.3 - change (mediawiki...Flow)
EBernhardson (WMF) has submitted this change and it was merged. Change subject: Avoid abstract function errors in php 5.3.3 .. Avoid abstract function errors in php 5.3.3 Same fix as change I183f96e960 , in a different class. Bug: 53523 Change-Id: I97ee720c2e987a1686c5c2801b434e1cfd72c13a --- M includes/Block/Block.php 1 file changed, 6 insertions(+), 3 deletions(-) Approvals: EBernhardson (WMF): Verified; Looks good to me, approved diff --git a/includes/Block/Block.php b/includes/Block/Block.php index 168ee92..128209e 100644 --- a/includes/Block/Block.php +++ b/includes/Block/Block.php @@ -56,9 +56,12 @@ } abstract protected function validate(); - abstract public function render( Templating $templating, array $options ); - abstract public function renderAPI( Templating $templating, array $options ); - abstract public function commit(); + // These methods exist in the Block interface and as such cannot be abstract + // until php 5.3.9, but MediaWiki requires PHP version 5.3.2 or later (and + // some of our test machines are on 5.3.3). + // abstract public function render( Templating $templating, array $options ); + // abstract public function renderAPI( Templating $templating, array $options ); + // abstract public function commit(); public function init( $action, $user ) { $this-action = $action; -- To view, visit https://gerrit.wikimedia.org/r/82800 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I97ee720c2e987a1686c5c2801b434e1cfd72c13a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Spage sp...@wikimedia.org Gerrit-Reviewer: EBernhardson (WMF) ebernhard...@wikimedia.org Gerrit-Reviewer: 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] Move php symlink to point at 1.22wmf15 - change (operations/mediawiki-config)
Reedy has uploaded a new change for review. https://gerrit.wikimedia.org/r/82835 Change subject: Move php symlink to point at 1.22wmf15 .. Move php symlink to point at 1.22wmf15 Change-Id: Id85cf9168882fddced870a4befff5303c20b1fbd --- M php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/35/82835/1 diff --git a/php b/php index 7cdda92..17d06a3 12 --- a/php +++ b/php @@ -1 +1 @@ -php-1.22wmf14 \ No newline at end of file +php-1.22wmf15 \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/82835 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id85cf9168882fddced870a4befff5303c20b1fbd Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Reedy re...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add missing dependency 'wikibase.dataTypes' 'dataTypes' - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Add missing dependency 'wikibase.dataTypes' 'dataTypes' .. Add missing dependency 'wikibase.dataTypes' 'dataTypes' Change-Id: Iaebb9e0f80a72f6c2b02f7e9ca05a83298258b33 --- M lib/resources/Resources.php 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Tobias Gritschacher: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/resources/Resources.php b/lib/resources/Resources.php index 22f3f8e..a2394ee 100644 --- a/lib/resources/Resources.php +++ b/lib/resources/Resources.php @@ -73,6 +73,7 @@ ), 'dependencies' = array( 'wikibase', + 'dataTypes', 'mw.config.values.wbDataTypes', ), ), -- To view, visit https://gerrit.wikimedia.org/r/82829 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iaebb9e0f80a72f6c2b02f7e9ca05a83298258b33 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Daniel Werner daniel.wer...@wikimedia.de 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] Remove unnecessary call to EntityContentFactory::singleton()... - change (mediawiki...Wikibase)
Daniel Werner has uploaded a new change for review. https://gerrit.wikimedia.org/r/82838 Change subject: Remove unnecessary call to EntityContentFactory::singleton() in EntityView .. Remove unnecessary call to EntityContentFactory::singleton() in EntityView Change-Id: Ia4109fa7a279d549949afdb9a8c5e50cfa4baad5 --- M repo/includes/EntityView.php 1 file changed, 1 insertion(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/38/82838/1 diff --git a/repo/includes/EntityView.php b/repo/includes/EntityView.php index ce736d0..fcc9953 100644 --- a/repo/includes/EntityView.php +++ b/repo/includes/EntityView.php @@ -270,8 +270,6 @@ $refFinder = new ReferencedEntitiesFinder(); $usedEntityIds = $refFinder-findSnakLinks( $allSnaks ); - $contentFactory = EntityContentFactory::singleton(); - foreach ( $usedEntityIds as $entityId ) { $pout-addLink( $this-entityTitleLookup-getTitleForId( $entityId ) ); } @@ -290,7 +288,7 @@ } //@todo: record sitelinks as iwlinks - //@todo: record CommnsMedia values as imagelinks + //@todo: record CommonsMedia values as imagelinks // make css available for JavaScript-less browsers $pout-addModuleStyles( array( -- To view, visit https://gerrit.wikimedia.org/r/82838 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia4109fa7a279d549949afdb9a8c5e50cfa4baad5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Daniel Werner daniel.wer...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix path for value parser resources - change (mediawiki...DataValues)
Tobias Gritschacher has uploaded a new change for review. https://gerrit.wikimedia.org/r/82840 Change subject: Fix path for value parser resources .. Fix path for value parser resources Change-Id: I1bc30d78ff314217dce99515235616eeb6367466 --- M DataValuesCommon/js/ValueParsers.resources.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DataValues refs/changes/40/82840/1 diff --git a/DataValuesCommon/js/ValueParsers.resources.php b/DataValuesCommon/js/ValueParsers.resources.php index d841711..2b71b7c 100644 --- a/DataValuesCommon/js/ValueParsers.resources.php +++ b/DataValuesCommon/js/ValueParsers.resources.php @@ -17,7 +17,7 @@ return call_user_func( function() { $moduleTemplate = array( - 'localBasePath' = __DIR__ . '/js/src/ValueParsers', + 'localBasePath' = __DIR__ . '/src/ValueParsers', 'remoteExtPath' = 'DataValues/DataValuesCommon/js/src/ValueParsers', ); -- To view, visit https://gerrit.wikimedia.org/r/82840 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1bc30d78ff314217dce99515235616eeb6367466 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DataValues Gerrit-Branch: mw1.22-wmf16 Gerrit-Owner: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: Daniel Werner daniel.wer...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add symlinks - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: Add symlinks .. Add symlinks Change-Id: I335b7f65b177eadab3783d5829789f2b455a3076 --- A docroot/bits/static-1.22wmf16/extensions A docroot/bits/static-1.22wmf16/resources A docroot/bits/static-1.22wmf16/skins A w/static-1.22wmf16/extensions A w/static-1.22wmf16/resources A w/static-1.22wmf16/skins 6 files changed, 6 insertions(+), 0 deletions(-) Approvals: Reedy: Looks good to me, approved jenkins-bot: Verified diff --git a/docroot/bits/static-1.22wmf16/extensions b/docroot/bits/static-1.22wmf16/extensions new file mode 12 index 000..6e744f3 --- /dev/null +++ b/docroot/bits/static-1.22wmf16/extensions @@ -0,0 +1 @@ +/usr/local/apache/common-local/php-1.22wmf16/extensions \ No newline at end of file diff --git a/docroot/bits/static-1.22wmf16/resources b/docroot/bits/static-1.22wmf16/resources new file mode 12 index 000..e9736d6 --- /dev/null +++ b/docroot/bits/static-1.22wmf16/resources @@ -0,0 +1 @@ +/usr/local/apache/common-local/php-1.22wmf16/resources \ No newline at end of file diff --git a/docroot/bits/static-1.22wmf16/skins b/docroot/bits/static-1.22wmf16/skins new file mode 12 index 000..e45fcaa --- /dev/null +++ b/docroot/bits/static-1.22wmf16/skins @@ -0,0 +1 @@ +/usr/local/apache/common-local/php-1.22wmf16/skins/ \ No newline at end of file diff --git a/w/static-1.22wmf16/extensions b/w/static-1.22wmf16/extensions new file mode 12 index 000..6e744f3 --- /dev/null +++ b/w/static-1.22wmf16/extensions @@ -0,0 +1 @@ +/usr/local/apache/common-local/php-1.22wmf16/extensions \ No newline at end of file diff --git a/w/static-1.22wmf16/resources b/w/static-1.22wmf16/resources new file mode 12 index 000..e9736d6 --- /dev/null +++ b/w/static-1.22wmf16/resources @@ -0,0 +1 @@ +/usr/local/apache/common-local/php-1.22wmf16/resources \ No newline at end of file diff --git a/w/static-1.22wmf16/skins b/w/static-1.22wmf16/skins new file mode 12 index 000..1efc5e8 --- /dev/null +++ b/w/static-1.22wmf16/skins @@ -0,0 +1 @@ +/usr/local/apache/common-local/php-1.22wmf16/skins \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/82832 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I335b7f65b177eadab3783d5829789f2b455a3076 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Reedy re...@wikimedia.org Gerrit-Reviewer: Reedy re...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix Undo Selenium test that broke due to badges support - change (mediawiki...Wikibase)
Tobias Gritschacher has uploaded a new change for review. https://gerrit.wikimedia.org/r/82850 Change subject: Fix Undo Selenium test that broke due to badges support .. Fix Undo Selenium test that broke due to badges support Change-Id: I36e604327a46459bf764f5f443b366051a651cec --- M repo/tests/selenium/special/undo_spec.rb 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/50/82850/1 diff --git a/repo/tests/selenium/special/undo_spec.rb b/repo/tests/selenium/special/undo_spec.rb index e36ff5c..4309638 100644 --- a/repo/tests/selenium/special/undo_spec.rb +++ b/repo/tests/selenium/special/undo_spec.rb @@ -156,8 +156,8 @@ page.undo1_element.when_present.click page.undoDel_element.when_present.text.should == sitelinks[1][1] page.undoIns?.should be_false -page.undoDelTitle_element.when_present.text.should == links / dewiki -page.undoInsTitle_element.when_present.text.should == links / dewiki +page.undoDelTitle_element.when_present.text.should == links / dewiki / name +page.undoInsTitle_element.when_present.text.should == links / dewiki / name page.undoSave end end @@ -174,8 +174,8 @@ page.undo6_element.when_present.click page.undoDel_element.when_present.text.should == sitelink_changed page.undoIns_element.when_present.text.should == sitelinks[0][1] -page.undoDelTitle_element.when_present.text.should == links / enwiki -page.undoInsTitle_element.when_present.text.should == links / enwiki +page.undoDelTitle_element.when_present.text.should == links / enwiki / name +page.undoInsTitle_element.when_present.text.should == links / enwiki / name page.undoSave end end -- To view, visit https://gerrit.wikimedia.org/r/82850 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I36e604327a46459bf764f5f443b366051a651cec Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Tobias Gritschacher tobias.gritschac...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update DataValues and Wikibase to head of their branches - change (mediawiki/core)
Reedy has submitted this change and it was merged. Change subject: Update DataValues and Wikibase to head of their branches .. Update DataValues and Wikibase to head of their branches Change-Id: Ib0286b5d8754b26522a76fcca0ca899c480b67e9 --- M extensions/DataValues M extensions/Wikibase 2 files changed, 0 insertions(+), 0 deletions(-) Approvals: Reedy: Verified; Looks good to me, approved diff --git a/extensions/DataValues b/extensions/DataValues index ed6340e..a0aceef 16 --- a/extensions/DataValues +++ b/extensions/DataValues -Subproject commit ed6340ee70d97cf8a0d099e2e6cd40b898fa59c5 +Subproject commit a0aceef71837a549787d59aa93e15de04598db13 diff --git a/extensions/Wikibase b/extensions/Wikibase index d694909..b6c3816 16 --- a/extensions/Wikibase +++ b/extensions/Wikibase -Subproject commit d6949094b3f35d6732ba9dfca175f2f2bd31b3e0 +Subproject commit b6c381660707cc432c65cbb8ee2043dd52070855 -- To view, visit https://gerrit.wikimedia.org/r/82851 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib0286b5d8754b26522a76fcca0ca899c480b67e9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.22wmf16 Gerrit-Owner: Reedy re...@wikimedia.org Gerrit-Reviewer: Reedy re...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix Undo Selenium test that broke due to badges support - change (mediawiki...Wikibase)
Tobias Gritschacher has submitted this change and it was merged. Change subject: Fix Undo Selenium test that broke due to badges support .. Fix Undo Selenium test that broke due to badges support Change-Id: I36e604327a46459bf764f5f443b366051a651cec --- M repo/tests/selenium/special/undo_spec.rb 1 file changed, 4 insertions(+), 4 deletions(-) Approvals: Tobias Gritschacher: Verified; Looks good to me, approved diff --git a/repo/tests/selenium/special/undo_spec.rb b/repo/tests/selenium/special/undo_spec.rb index e36ff5c..4309638 100644 --- a/repo/tests/selenium/special/undo_spec.rb +++ b/repo/tests/selenium/special/undo_spec.rb @@ -156,8 +156,8 @@ page.undo1_element.when_present.click page.undoDel_element.when_present.text.should == sitelinks[1][1] page.undoIns?.should be_false -page.undoDelTitle_element.when_present.text.should == links / dewiki -page.undoInsTitle_element.when_present.text.should == links / dewiki +page.undoDelTitle_element.when_present.text.should == links / dewiki / name +page.undoInsTitle_element.when_present.text.should == links / dewiki / name page.undoSave end end @@ -174,8 +174,8 @@ page.undo6_element.when_present.click page.undoDel_element.when_present.text.should == sitelink_changed page.undoIns_element.when_present.text.should == sitelinks[0][1] -page.undoDelTitle_element.when_present.text.should == links / enwiki -page.undoInsTitle_element.when_present.text.should == links / enwiki +page.undoDelTitle_element.when_present.text.should == links / enwiki / name +page.undoInsTitle_element.when_present.text.should == links / enwiki / name page.undoSave end end -- To view, visit https://gerrit.wikimedia.org/r/82853 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I36e604327a46459bf764f5f443b366051a651cec Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: mw1.22-wmf16 Gerrit-Owner: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix selenium test for Special:EntitiesWithoutLabel - change (mediawiki...Wikibase)
Tobias Gritschacher has submitted this change and it was merged. Change subject: Fix selenium test for Special:EntitiesWithoutLabel .. Fix selenium test for Special:EntitiesWithoutLabel - this broke after a baseclass SpecialEntitiesWithoutPage got introduced where the ids of the form elements changed Change-Id: I358715a6ceb0de4d3bf3d328a64c6482ab288568 --- M selenium/lib/pages/entities_without_label_page.rb 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Tobias Gritschacher: Verified; Looks good to me, approved diff --git a/selenium/lib/pages/entities_without_label_page.rb b/selenium/lib/pages/entities_without_label_page.rb index c9a7f36..a4976c0 100644 --- a/selenium/lib/pages/entities_without_label_page.rb +++ b/selenium/lib/pages/entities_without_label_page.rb @@ -11,7 +11,7 @@ page_url WIKI_REPO_URL + Special:EntitiesWithoutLabel text_field(:languageField, :name = language) - button(:entitiesWithoutLabelSubmit, :css = form#wb-entitieswithoutlabel-form fieldset p input[type='submit']) + button(:entitiesWithoutLabelSubmit, :css = form#wb-entitieswithoutpage-form fieldset p input[type='submit']) link(:listItemLink, :css = ol.special li:nth-of-type(1) a:nth-of-type(1)) -- To view, visit https://gerrit.wikimedia.org/r/82852 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I358715a6ceb0de4d3bf3d328a64c6482ab288568 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: mw1.22-wmf16 Gerrit-Owner: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix selenium test for Special:EntitiesWithoutLabel - change (mediawiki...Wikibase)
Tobias Gritschacher has uploaded a new change for review. https://gerrit.wikimedia.org/r/82852 Change subject: Fix selenium test for Special:EntitiesWithoutLabel .. Fix selenium test for Special:EntitiesWithoutLabel - this broke after a baseclass SpecialEntitiesWithoutPage got introduced where the ids of the form elements changed Change-Id: I358715a6ceb0de4d3bf3d328a64c6482ab288568 --- M selenium/lib/pages/entities_without_label_page.rb 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/52/82852/1 diff --git a/selenium/lib/pages/entities_without_label_page.rb b/selenium/lib/pages/entities_without_label_page.rb index c9a7f36..a4976c0 100644 --- a/selenium/lib/pages/entities_without_label_page.rb +++ b/selenium/lib/pages/entities_without_label_page.rb @@ -11,7 +11,7 @@ page_url WIKI_REPO_URL + Special:EntitiesWithoutLabel text_field(:languageField, :name = language) - button(:entitiesWithoutLabelSubmit, :css = form#wb-entitieswithoutlabel-form fieldset p input[type='submit']) + button(:entitiesWithoutLabelSubmit, :css = form#wb-entitieswithoutpage-form fieldset p input[type='submit']) link(:listItemLink, :css = ol.special li:nth-of-type(1) a:nth-of-type(1)) -- To view, visit https://gerrit.wikimedia.org/r/82852 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I358715a6ceb0de4d3bf3d328a64c6482ab288568 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: mw1.22-wmf16 Gerrit-Owner: Tobias Gritschacher tobias.gritschac...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Move run_directory into the actual base class. - change (operations/puppet)
Andrew Bogott has uploaded a new change for review. https://gerrit.wikimedia.org/r/82845 Change subject: Move run_directory into the actual base class. .. Move run_directory into the actual base class. This makes the load-order explicit and should ensure that it's defined before we use it. Change-Id: Id5eb567a433b083708571436b661e4b69f25d2f9 --- M manifests/mysql.pp M modules/base/manifests/init.pp 2 files changed, 11 insertions(+), 13 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/45/82845/1 diff --git a/manifests/mysql.pp b/manifests/mysql.pp index 282268d..e92f8bc 100644 --- a/manifests/mysql.pp +++ b/manifests/mysql.pp @@ -631,22 +631,20 @@ class { generic::mysql::packages::client: version = $version } include generic::apparmor::service - # NOTE: $::run_directory is defined in base.pp - # if $socket was not manually specified, # assume that the socket file should live in # $::run_directory/mysqld/mysqld.sock, otherwise # just use the path that was given. $socket_path = $socket ? { - false = $::run_directory/mysqld/mysqld.sock, + false = $base::run_directory/mysqld/mysqld.sock, default = $socket, } # if $pid_file was not manually specified, # assume that the pid file should live in - # $::run_directory/mysqld/mysqld.sock, otherwise + # $base::run_directory/mysqld/mysqld.sock, otherwise # just use the path that was given. $pid_path = $pid_file ? { - false = $::run_directory/mysqld/mysqld.pid, + false = $base::run_directory/mysqld/mysqld.pid, default = $pid_file, } diff --git a/modules/base/manifests/init.pp b/modules/base/manifests/init.pp index 6d2ed23..88ab257 100644 --- a/modules/base/manifests/init.pp +++ b/modules/base/manifests/init.pp @@ -1,11 +1,3 @@ -# /var/run has moved to /run in newer Ubuntu versions. -# See: http://lwn.net/Articles/436012/ -if $::lsbdistid == 'Ubuntu' and versioncmp($::lsbdistrelease, '11.10') = 0 { -$run_directory = '/run' -} else { -$run_directory = '/var/run' -} - class base::access::dc-techs { # add account and sudoers rules for data center techs @@ -382,6 +374,14 @@ apt::noupgrade } +# /var/run has moved to /run in newer Ubuntu versions. +# See: http://lwn.net/Articles/436012/ +if $::lsbdistid == 'Ubuntu' and versioncmp($::lsbdistrelease, '11.10') = 0 { +$run_directory = '/run' +} else { +$run_directory = '/var/run' +} + include base::tcptweaks class { base::puppet: -- To view, visit https://gerrit.wikimedia.org/r/82845 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id5eb567a433b083708571436b661e4b69f25d2f9 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Andrew Bogott abog...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove more DataValues crap - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: Remove more DataValues crap .. Remove more DataValues crap Change-Id: I6596c8eb7d274d8e92accf15c34e073028cf6946 --- M wmf-config/extension-list 1 file changed, 0 insertions(+), 3 deletions(-) Approvals: Reedy: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/extension-list b/wmf-config/extension-list index 3a82ba9..5f9a200 100644 --- a/wmf-config/extension-list +++ b/wmf-config/extension-list @@ -35,9 +35,6 @@ $IP/extensions/CreditsSource/CreditsSource.php $IP/extensions/CustomData/CustomData.php $IP/extensions/DataValues/DataValues/DataValues.i18n.php -$IP/extensions/DataValues/ValueFormatters/ValueFormatters.i18n.php -$IP/extensions/DataValues/ValueParsers/ValueParsers.i18n.php -$IP/extensions/DataValues/ValueValidators/ValueValidators.i18n.php $IP/extensions/DataTypes/DataTypes.i18n.php $IP/extensions/Diff/Diff.php $IP/extensions/DisableAccount/DisableAccount.php -- To view, visit https://gerrit.wikimedia.org/r/82843 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6596c8eb7d274d8e92accf15c34e073028cf6946 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Reedy re...@wikimedia.org Gerrit-Reviewer: Reedy re...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Moving $ganglia_aggregator declaration above analytics class... - change (operations/puppet)
Ottomata has submitted this change and it was merged. Change subject: Moving $ganglia_aggregator declaration above analytics class includes. .. Moving $ganglia_aggregator declaration above analytics class includes. CRAZY PUPPET! Change-Id: I334d51e4ba224ba0b7880490167eb1ea19ef9179 --- M manifests/site.pp 1 file changed, 8 insertions(+), 8 deletions(-) Approvals: Ottomata: Verified; Looks good to me, approved diff --git a/manifests/site.pp b/manifests/site.pp index 6c15b42..8f7ba40 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -133,12 +133,12 @@ # Unassigned Cisco nodes. # NOTE: analytics1002-analytics1004 still need reinstalled as of 2013-08-26 node /analytics100[2-8]\.eqiad\.wmnet/ { -include role::analytics - # ganglia aggregator for the Analytics cluster. -if ($hostname == 'analytics1003') { +if ($::hostname == 'analytics1003') { $ganglia_aggregator = true } + +include role::analytics } # analytics1009 is the Hadoop standby NameNode @@ -157,16 +157,16 @@ # analytics1011-analytics1020 are Hadoop worker nodes node /analytics10(1[1-9]|20).eqiad.wmnet/ { +# ganglia aggregator for the Analytics cluster. +if ($::hostname == 'analytics1011') { +$ganglia_aggregator = true +} + include role::analytics::common include role::analytics::hadoop::worker # include analytics user accounts include role::analytics::users - -# ganglia aggregator for the Analytics cluster. -if ($hostname == 'analytics1011') { -$ganglia_aggregator = true -} } # analytics1021 and analytics1022 are Kafka Brokers. -- To view, visit https://gerrit.wikimedia.org/r/82846 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I334d51e4ba224ba0b7880490167eb1ea19ef9179 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ottomata o...@wikimedia.org Gerrit-Reviewer: Ottomata o...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Correctly handle adjacent text and p-node children of block ... - change (mediawiki...Parsoid)
jenkins-bot has submitted this change and it was merged. Change subject: Correctly handle adjacent text and p-node children of block nodes .. Correctly handle adjacent text and p-node children of block nodes * This patch cleans up some FIXME and unhandled cases around serializing text-node siblings of p-nodes when they happen to be children of block-nodes. These special cases come about because of p-wrapping special cases for blocknodes in the parser. * This patch also fixes bug 51087 -- new html2wt tests added for this which pass. * 2 more wt2wt tests now pass (alongwith associated selser tests). * 1 selser test now fails. The lost newline is semantically insignificant and is not something to be concerned about in this example. It is heavily edited HTML that originally had lot of tag nesting correction. Change-Id: I5ede7a9bbd1e976b8cde3f63b4f688e9f148a059 --- M js/lib/mediawiki.WikitextSerializer.js M js/tests/parserTests-blacklist.js M js/tests/parserTests.txt 3 files changed, 71 insertions(+), 44 deletions(-) Approvals: GWicke: Looks good to me, approved jenkins-bot: Verified diff --git a/js/lib/mediawiki.WikitextSerializer.js b/js/lib/mediawiki.WikitextSerializer.js index 2812612..83bdd04 100644 --- a/js/lib/mediawiki.WikitextSerializer.js +++ b/js/lib/mediawiki.WikitextSerializer.js @@ -2155,6 +2155,20 @@ }; } +/* currentNode is being processed and line has information + * about the wikitext line emitted so far. This function checks + * if the DOM has a block node emitted on this line till currentNode */ +function currWikitextLineHasBlockNode(line, currentNode) { + var n = line.firstNode; + while (n n !== currentNode) { + if (DU.isBlockNode(n)) { + return true; + } + n = n.nextSibling; + } + return false; +} + WSP.tagHandlers = { dl: buildListHandler({DT:1, DD:1}), ul: buildListHandler({LI:1}), @@ -2400,7 +2414,8 @@ state.serializeChildren(node, cb, null); }, sepnls: { - before: function(node, otherNode) { + before: function(node, otherNode, state) { + var otherNodeName = otherNode.nodeName, tdOrBody = JSUtils.arrayToHash(['TD', 'BODY']); if (node.parentNode === otherNode @@ -2411,36 +2426,34 @@ } else { return {min: 0, max: 0}; } - } else if (otherNode === node.previousSibling - // p-p transition - otherNodeName === 'P' || - // SSS FIXME: Accidentally discovered that this check is buggy - // Will investigate in a different patch - // - // Treat text/p similar to p/p transition - // XXX: also check if parent node and first sibling - // serializes(|d) to single line. - // Only a single line is - // needed in that case. Example: - // divfoo/div a - // b - ((DU.isText(otherNode) - otherNode === DU.previousNonSepSibling(node) - // FIXME HACK: Avoid forcing two newlines if the - // first line is a text node that ends up on the - // same line as a block - !( ( DU.isBlockNode(node.parentNode) node.parentNode.nodeName !== 'BODY') || - otherNode.nodeValue.match(/\n(?!$)/) - { + } else if ( + otherNode === node.previousSibling + // p-p transition + otherNodeName === 'P' || + // Treat text/p similar to p/p transition + ( + DU.isText(otherNode) + otherNode === DU.previousNonSepSibling(node) +
[MediaWiki-commits] [Gerrit] update username location for running in Jenkins etc. - change (mediawiki...CirrusSearch)
jenkins-bot has submitted this change and it was merged. Change subject: update username location for running in Jenkins etc. .. update username location for running in Jenkins etc. Change-Id: Ie0432cdef571a74ca73191af7683162c207d6ec5 --- M tests/browser/features/support/env.rb 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Manybubbles: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/browser/features/support/env.rb b/tests/browser/features/support/env.rb index d91ed29..4b4feb1 100644 --- a/tests/browser/features/support/env.rb +++ b/tests/browser/features/support/env.rb @@ -98,7 +98,7 @@ config = YAML.load_file('config/config.yml') secret = YAML.load_file(#{secret_yml_location}) -mediawiki_username = secret['mediawiki_username'] +mediawiki_username = secret['mediawiki_username'] || config['mediawiki_username'] mediawiki_password = secret['mediawiki_password'] if ENV['ENVIRONMENT'] == 'cloudbees' -- To view, visit https://gerrit.wikimedia.org/r/82848 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie0432cdef571a74ca73191af7683162c207d6ec5 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/CirrusSearch Gerrit-Branch: master Gerrit-Owner: Cmcmahon cmcma...@wikimedia.org Gerrit-Reviewer: Cmcmahon cmcma...@wikimedia.org Gerrit-Reviewer: Manybubbles never...@wikimedia.org 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] Add Option to Enable Keyword Links - change (mediawiki...SyntaxHighlight_GeSHi)
Reedy has uploaded a new change for review. https://gerrit.wikimedia.org/r/82854 Change subject: Add Option to Enable Keyword Links .. Add Option to Enable Keyword Links Patch by Bryan Petty Bug: 53787 Change-Id: I8c818859df8240cfcfef94d06d5d12a848cc76dc --- M SyntaxHighlight_GeSHi.class.php M SyntaxHighlight_GeSHi.php 2 files changed, 8 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SyntaxHighlight_GeSHi refs/changes/54/82854/1 diff --git a/SyntaxHighlight_GeSHi.class.php b/SyntaxHighlight_GeSHi.class.php index 4538a5f..7318574 100644 --- a/SyntaxHighlight_GeSHi.class.php +++ b/SyntaxHighlight_GeSHi.class.php @@ -327,6 +327,9 @@ * @return GeSHi */ public static function prepare( $text, $lang ) { + + global $wgSyntaxHighlightKeywordLinks; + self::initialise(); $geshi = new GeSHi( $text, $lang ); if( $geshi-error() == GESHI_ERROR_NO_SUCH_LANG ) { @@ -335,7 +338,7 @@ $geshi-set_encoding( 'UTF-8' ); $geshi-enable_classes(); $geshi-set_overall_class( source-$lang ); - $geshi-enable_keyword_links( false ); + $geshi-enable_keyword_links( $wgSyntaxHighlightKeywordLinks ); // If the source code is over 100 kB, disable higlighting of symbols. // If over 200 kB, disable highlighting of strings too. diff --git a/SyntaxHighlight_GeSHi.php b/SyntaxHighlight_GeSHi.php index 0b6cb0c..5372342 100644 --- a/SyntaxHighlight_GeSHi.php +++ b/SyntaxHighlight_GeSHi.php @@ -48,7 +48,10 @@ 'url'= 'https://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi', ); -$wgSyntaxHighlightDefaultLang = null; //Change this in LocalSettings.php +// Change these in LocalSettings.php +$wgSyntaxHighlightDefaultLang = null; +$wgSyntaxHighlightKeywordLinks = false; + $dir = dirname(__FILE__) . '/'; $wgExtensionMessagesFiles['SyntaxHighlight_GeSHi'] = $dir . 'SyntaxHighlight_GeSHi.i18n.php'; $wgAutoloadClasses['SyntaxHighlight_GeSHi'] = $dir . 'SyntaxHighlight_GeSHi.class.php'; -- To view, visit https://gerrit.wikimedia.org/r/82854 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8c818859df8240cfcfef94d06d5d12a848cc76dc Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SyntaxHighlight_GeSHi Gerrit-Branch: master Gerrit-Owner: Reedy re...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove more DataValues crap - change (operations/mediawiki-config)
Reedy has uploaded a new change for review. https://gerrit.wikimedia.org/r/82843 Change subject: Remove more DataValues crap .. Remove more DataValues crap Change-Id: I6596c8eb7d274d8e92accf15c34e073028cf6946 --- M wmf-config/extension-list 1 file changed, 0 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/43/82843/1 diff --git a/wmf-config/extension-list b/wmf-config/extension-list index 3a82ba9..5f9a200 100644 --- a/wmf-config/extension-list +++ b/wmf-config/extension-list @@ -35,9 +35,6 @@ $IP/extensions/CreditsSource/CreditsSource.php $IP/extensions/CustomData/CustomData.php $IP/extensions/DataValues/DataValues/DataValues.i18n.php -$IP/extensions/DataValues/ValueFormatters/ValueFormatters.i18n.php -$IP/extensions/DataValues/ValueParsers/ValueParsers.i18n.php -$IP/extensions/DataValues/ValueValidators/ValueValidators.i18n.php $IP/extensions/DataTypes/DataTypes.i18n.php $IP/extensions/Diff/Diff.php $IP/extensions/DisableAccount/DisableAccount.php -- To view, visit https://gerrit.wikimedia.org/r/82843 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6596c8eb7d274d8e92accf15c34e073028cf6946 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Reedy re...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Moving $ganglia_aggregator declaration above analytics class... - change (operations/puppet)
Ottomata has uploaded a new change for review. https://gerrit.wikimedia.org/r/82846 Change subject: Moving $ganglia_aggregator declaration above analytics class includes. .. Moving $ganglia_aggregator declaration above analytics class includes. CRAZY PUPPET! Change-Id: I334d51e4ba224ba0b7880490167eb1ea19ef9179 --- M manifests/site.pp 1 file changed, 8 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/46/82846/1 diff --git a/manifests/site.pp b/manifests/site.pp index 6c15b42..8f7ba40 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -133,12 +133,12 @@ # Unassigned Cisco nodes. # NOTE: analytics1002-analytics1004 still need reinstalled as of 2013-08-26 node /analytics100[2-8]\.eqiad\.wmnet/ { -include role::analytics - # ganglia aggregator for the Analytics cluster. -if ($hostname == 'analytics1003') { +if ($::hostname == 'analytics1003') { $ganglia_aggregator = true } + +include role::analytics } # analytics1009 is the Hadoop standby NameNode @@ -157,16 +157,16 @@ # analytics1011-analytics1020 are Hadoop worker nodes node /analytics10(1[1-9]|20).eqiad.wmnet/ { +# ganglia aggregator for the Analytics cluster. +if ($::hostname == 'analytics1011') { +$ganglia_aggregator = true +} + include role::analytics::common include role::analytics::hadoop::worker # include analytics user accounts include role::analytics::users - -# ganglia aggregator for the Analytics cluster. -if ($hostname == 'analytics1011') { -$ganglia_aggregator = true -} } # analytics1021 and analytics1022 are Kafka Brokers. -- To view, visit https://gerrit.wikimedia.org/r/82846 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I334d51e4ba224ba0b7880490167eb1ea19ef9179 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ottomata o...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix path for value parser resources - change (mediawiki...DataValues)
jenkins-bot has submitted this change and it was merged. Change subject: Fix path for value parser resources .. Fix path for value parser resources Change-Id: I1bc30d78ff314217dce99515235616eeb6367466 --- M DataValuesCommon/js/ValueParsers.resources.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Tobias Gritschacher: Looks good to me, approved jenkins-bot: Verified diff --git a/DataValuesCommon/js/ValueParsers.resources.php b/DataValuesCommon/js/ValueParsers.resources.php index d841711..2b71b7c 100644 --- a/DataValuesCommon/js/ValueParsers.resources.php +++ b/DataValuesCommon/js/ValueParsers.resources.php @@ -17,7 +17,7 @@ return call_user_func( function() { $moduleTemplate = array( - 'localBasePath' = __DIR__ . '/js/src/ValueParsers', + 'localBasePath' = __DIR__ . '/src/ValueParsers', 'remoteExtPath' = 'DataValues/DataValuesCommon/js/src/ValueParsers', ); -- To view, visit https://gerrit.wikimedia.org/r/82836 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1bc30d78ff314217dce99515235616eeb6367466 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DataValues Gerrit-Branch: master Gerrit-Owner: Daniel Werner daniel.wer...@wikimedia.de 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 Undo Selenium test that broke due to badges support - change (mediawiki...Wikibase)
Tobias Gritschacher has uploaded a new change for review. https://gerrit.wikimedia.org/r/82853 Change subject: Fix Undo Selenium test that broke due to badges support .. Fix Undo Selenium test that broke due to badges support Change-Id: I36e604327a46459bf764f5f443b366051a651cec --- M repo/tests/selenium/special/undo_spec.rb 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/53/82853/1 diff --git a/repo/tests/selenium/special/undo_spec.rb b/repo/tests/selenium/special/undo_spec.rb index e36ff5c..4309638 100644 --- a/repo/tests/selenium/special/undo_spec.rb +++ b/repo/tests/selenium/special/undo_spec.rb @@ -156,8 +156,8 @@ page.undo1_element.when_present.click page.undoDel_element.when_present.text.should == sitelinks[1][1] page.undoIns?.should be_false -page.undoDelTitle_element.when_present.text.should == links / dewiki -page.undoInsTitle_element.when_present.text.should == links / dewiki +page.undoDelTitle_element.when_present.text.should == links / dewiki / name +page.undoInsTitle_element.when_present.text.should == links / dewiki / name page.undoSave end end @@ -174,8 +174,8 @@ page.undo6_element.when_present.click page.undoDel_element.when_present.text.should == sitelink_changed page.undoIns_element.when_present.text.should == sitelinks[0][1] -page.undoDelTitle_element.when_present.text.should == links / enwiki -page.undoInsTitle_element.when_present.text.should == links / enwiki +page.undoDelTitle_element.when_present.text.should == links / enwiki / name +page.undoInsTitle_element.when_present.text.should == links / enwiki / name page.undoSave end end -- To view, visit https://gerrit.wikimedia.org/r/82853 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I36e604327a46459bf764f5f443b366051a651cec Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: mw1.22-wmf16 Gerrit-Owner: Tobias Gritschacher tobias.gritschac...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Bug 53559: Fix problems with rt_testing results storing and ... - change (mediawiki...Parsoid)
jenkins-bot has submitted this change and it was merged. Change subject: Bug 53559: Fix problems with rt_testing results storing and entity escaping .. Bug 53559: Fix problems with rt_testing results storing and entity escaping There are two problems that contribute to the errors seen in Chrome for some rt_testing page results: - First, as reported on the bug, the client escapes all entities. We're using UTF-8 throughout, so this is not necessary and takes up much more space than needed. - Second, TEXT fields in MySQL are capped at 64kb, which makes them too small for some of the results. The result is clipped, producing the bad-formed XML Chrome complains about. To fix it, this patch adds code to only encode the strictly-necessary entities and a SQL script to alter the results column to a MEDIUMTEXT field, which should provide storage enough. Bonus: Get the page's prefix correctly from the environment and remove the total time timer from perfstats. Change-Id: I23d02ee5c33fdf404a19ed00932d394f03040755 --- M js/tests/roundtrip-test.js A js/tests/server/sql/001_alter_results_to_mediumtext.sql M js/tests/server/sql/create_everything.mysql 3 files changed, 18 insertions(+), 8 deletions(-) Approvals: Subramanya Sastry: Looks good to me, approved jenkins-bot: Verified diff --git a/js/tests/roundtrip-test.js b/js/tests/roundtrip-test.js index 6fffc8f..115b73d 100755 --- a/js/tests/roundtrip-test.js +++ b/js/tests/roundtrip-test.js @@ -57,39 +57,47 @@ return output; }; +var encodeXmlEntities = function( str ) { + return str.replace( //g, 'amp;' ) + .replace( //g, 'lt;' ) + .replace( //g, 'gt;' ) + .replace( //g, 'quot;' ) + .replace( /'/g, 'apos;' ); +}; + var xmlCallback = function ( env, err, results ) { var i, result; - var prefix = ( env env.wiki env.wiki.iwp ) || ''; + var prefix = ( env env.conf env.conf.wiki env.conf.wiki.iwp ) || ''; var title = ( env env.page env.page.name ) || ''; - var output = 'testsuite name=Roundtrip article ' + Util.encodeXml( prefix + ':' + title ) + ''; + var output = 'testsuite name=Roundtrip article ' + encodeXmlEntities( prefix + ':' + title ) + ''; if ( err ) { output += 'testcase name=entire articleerror type=parserFailedToFinish'; - output += Util.encodeXml( err.stack || err.toString() ); + output += encodeXmlEntities( err.stack || err.toString() ); output += '/error/testcase'; } else { for ( i = 0; i results.length; i++ ) { result = results[i]; - output += 'testcase name=' + Util.encodeXml( prefix + ':' + title ) + ' character ' + result.offset[0].start + ''; + output += 'testcase name=' + encodeXmlEntities( prefix + ':' + title ) + ' character ' + result.offset[0].start + ''; if ( result.type === 'fail' ) { output += 'failure type=significantHtmlDiff\n'; output += 'diff class=wt\n'; - output += Util.encodeXml( result.wtDiff ); + output += encodeXmlEntities( result.wtDiff ); output += '\n/diff\n'; output += 'diff class=html\n'; - output += Util.encodeXml( result.htmlDiff ); + output += encodeXmlEntities( result.htmlDiff ); output += '\n/diff\n'; output += '/failure\n'; } else { output += 'skipped type=insignificantWikitextDiff\n'; - output += Util.encodeXml( result.wtDiff ); + output += encodeXmlEntities( result.wtDiff ); output += '\n/skipped\n'; } @@ -407,6 +415,7 @@ // Finish the total time now if ( env.profile env.profile.time ) { env.profile.time.total += new Date() - env.profile.time.total_timer; + delete( env.profile.time.total_timer ); } diff = jsDiff.diffLines( out, env.page.src ); offsetPairs = Util.convertDiffToOffsetPairs( diff ); diff --git a/js/tests/server/sql/001_alter_results_to_mediumtext.sql b/js/tests/server/sql/001_alter_results_to_mediumtext.sql new file mode 100644 index 000..74fc026 --- /dev/null +++ b/js/tests/server/sql/001_alter_results_to_mediumtext.sql @@ -0,0 +1 @@ +ALTER TABLE results CHANGE result result MEDIUMTEXT CHARACTER SET utf8 COLLATE utf8_bin NOT NULL; diff --git
[MediaWiki-commits] [Gerrit] Add symlinks - change (operations/mediawiki-config)
Reedy has uploaded a new change for review. https://gerrit.wikimedia.org/r/82832 Change subject: Add symlinks .. Add symlinks Change-Id: I335b7f65b177eadab3783d5829789f2b455a3076 --- A docroot/bits/static-1.22wmf16/extensions A docroot/bits/static-1.22wmf16/resources A docroot/bits/static-1.22wmf16/skins A w/static-1.22wmf16/extensions A w/static-1.22wmf16/resources A w/static-1.22wmf16/skins 6 files changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/32/82832/1 diff --git a/docroot/bits/static-1.22wmf16/extensions b/docroot/bits/static-1.22wmf16/extensions new file mode 12 index 000..6e744f3 --- /dev/null +++ b/docroot/bits/static-1.22wmf16/extensions @@ -0,0 +1 @@ +/usr/local/apache/common-local/php-1.22wmf16/extensions \ No newline at end of file diff --git a/docroot/bits/static-1.22wmf16/resources b/docroot/bits/static-1.22wmf16/resources new file mode 12 index 000..e9736d6 --- /dev/null +++ b/docroot/bits/static-1.22wmf16/resources @@ -0,0 +1 @@ +/usr/local/apache/common-local/php-1.22wmf16/resources \ No newline at end of file diff --git a/docroot/bits/static-1.22wmf16/skins b/docroot/bits/static-1.22wmf16/skins new file mode 12 index 000..e45fcaa --- /dev/null +++ b/docroot/bits/static-1.22wmf16/skins @@ -0,0 +1 @@ +/usr/local/apache/common-local/php-1.22wmf16/skins/ \ No newline at end of file diff --git a/w/static-1.22wmf16/extensions b/w/static-1.22wmf16/extensions new file mode 12 index 000..6e744f3 --- /dev/null +++ b/w/static-1.22wmf16/extensions @@ -0,0 +1 @@ +/usr/local/apache/common-local/php-1.22wmf16/extensions \ No newline at end of file diff --git a/w/static-1.22wmf16/resources b/w/static-1.22wmf16/resources new file mode 12 index 000..e9736d6 --- /dev/null +++ b/w/static-1.22wmf16/resources @@ -0,0 +1 @@ +/usr/local/apache/common-local/php-1.22wmf16/resources \ No newline at end of file diff --git a/w/static-1.22wmf16/skins b/w/static-1.22wmf16/skins new file mode 12 index 000..1efc5e8 --- /dev/null +++ b/w/static-1.22wmf16/skins @@ -0,0 +1 @@ +/usr/local/apache/common-local/php-1.22wmf16/skins \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/82832 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I335b7f65b177eadab3783d5829789f2b455a3076 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Reedy re...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] reclaiming manganese -remove site.pp/add decom.pp - change (operations/puppet)
Cmjohnson has submitted this change and it was merged. Change subject: reclaiming manganese -remove site.pp/add decom.pp .. reclaiming manganese -remove site.pp/add decom.pp Change-Id: Id2b9fff0ec524cd0506d39310a72008d54a12b9f --- M manifests/decommissioning.pp M manifests/site.pp 2 files changed, 1 insertion(+), 25 deletions(-) Approvals: Cmjohnson: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/decommissioning.pp b/manifests/decommissioning.pp index 05dd03b..6926b16 100644 --- a/manifests/decommissioning.pp +++ b/manifests/decommissioning.pp @@ -10,7 +10,6 @@ 'bellin', 'blondel', 'br1-knams', -'caesium', #remove after 9/5/2013 'celsus', 'cerium', 'colby', @@ -105,6 +104,7 @@ 'lardner', 'lily', 'lomaria', +'manganese', #remove 9/7/13 or later 'mc2', 'mc3', 'mc4', @@ -130,7 +130,6 @@ 'ms3', 'ms4', 'msfe1002', -'netmon1001', #will come back, just removing from monitoring for now -robh 2013-09-03 'niobium', 'ocg1', 'ocg2', diff --git a/manifests/site.pp b/manifests/site.pp index b236694..6b1f996 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -1631,29 +1631,6 @@ include standard } -node manganese.wikimedia.org { -install_certificate{ gerrit.wikimedia.org: ca = RapidSSL_CA.pem } - -$sudo_privs = [ 'ALL = NOPASSWD: /usr/local/sbin/add-ldap-user', -'ALL = NOPASSWD: /usr/local/sbin/delete-ldap-user', -'ALL = NOPASSWD: /usr/local/sbin/modify-ldap-user', -'ALL = NOPASSWD: /usr/local/bin/svn-group', -'ALL = NOPASSWD: /usr/local/sbin/add-labs-user', -'ALL = NOPASSWD: /var/lib/gerrit2/review_site/bin/gerrit.sh' ] -sudo_user { [ robla, reedy ]: privileges = $sudo_privs } - -# full root for gerrit admin (RT-3698) -sudo_user { demon: privileges = ['ALL = NOPASSWD: ALL'] } - -$ldapincludes = ['openldap', 'nss', 'utils'] -$ssh_tcp_forwarding = no -$ssh_x11_forwarding = no -include role::gerrit::production::old, -backup::client - -class { ldap::role::client::labs: ldapincludes = $ldapincludes } -} - node magnesium.wikimedia.org { $cluster = misc -- To view, visit https://gerrit.wikimedia.org/r/82849 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id2b9fff0ec524cd0506d39310a72008d54a12b9f 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] Remove unnecessary call to EntityContentFactory::singleton()... - change (mediawiki...Wikibase)
Jeroen De Dauw has submitted this change and it was merged. Change subject: Remove unnecessary call to EntityContentFactory::singleton() in EntityView .. Remove unnecessary call to EntityContentFactory::singleton() in EntityView Change-Id: Ia4109fa7a279d549949afdb9a8c5e50cfa4baad5 --- M repo/includes/EntityView.php 1 file changed, 1 insertion(+), 3 deletions(-) Approvals: Jeroen De Dauw: Looks good to me, approved jenkins-bot: Verified diff --git a/repo/includes/EntityView.php b/repo/includes/EntityView.php index ce736d0..fcc9953 100644 --- a/repo/includes/EntityView.php +++ b/repo/includes/EntityView.php @@ -270,8 +270,6 @@ $refFinder = new ReferencedEntitiesFinder(); $usedEntityIds = $refFinder-findSnakLinks( $allSnaks ); - $contentFactory = EntityContentFactory::singleton(); - foreach ( $usedEntityIds as $entityId ) { $pout-addLink( $this-entityTitleLookup-getTitleForId( $entityId ) ); } @@ -290,7 +288,7 @@ } //@todo: record sitelinks as iwlinks - //@todo: record CommnsMedia values as imagelinks + //@todo: record CommonsMedia values as imagelinks // make css available for JavaScript-less browsers $pout-addModuleStyles( array( -- To view, visit https://gerrit.wikimedia.org/r/82838 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia4109fa7a279d549949afdb9a8c5e50cfa4baad5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Daniel Werner daniel.wer...@wikimedia.de Gerrit-Reviewer: Daniel Kinzler daniel.kinz...@wikimedia.de Gerrit-Reviewer: Jeroen De Dauw jeroended...@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] Give grep a chance to find the usages - change (mediawiki...FlaggedRevs)
Siebrand has submitted this change and it was merged. Change subject: Give grep a chance to find the usages .. Give grep a chance to find the usages Change-Id: I244e1b491a43571699afbac28097b71da0ea08a3 --- M frontend/FlaggablePageView.php 1 file changed, 57 insertions(+), 58 deletions(-) Approvals: Siebrand: Verified; Looks good to me, approved diff --git a/frontend/FlaggablePageView.php b/frontend/FlaggablePageView.php index 99d5d4c..c7b379c 100644 --- a/frontend/FlaggablePageView.php +++ b/frontend/FlaggablePageView.php @@ -187,9 +187,9 @@ */ protected function isPageViewOrDiff( WebRequest $request ) { global $mediaWiki; - $action = isset( $mediaWiki ) - ? $mediaWiki-getAction( $request ) - : $request-getVal( 'action', 'view' ); // cli + $action = isset( $mediaWiki ) ? + $mediaWiki-getAction( $request ) : + $request-getVal( 'action', 'view' ); // cli return self::isViewAction( $action ); } @@ -210,9 +210,9 @@ */ protected function isDefaultPageView( WebRequest $request ) { global $mediaWiki; - $action = isset( $mediaWiki ) - ? $mediaWiki-getAction( $request ) - : $request-getVal( 'action', 'view' ); // cli + $action = isset( $mediaWiki ) ? + $mediaWiki-getAction( $request ) : + $request-getVal( 'action', 'view' ); // cli return ( self::isViewAction( $action ) $request-getVal( 'oldid' ) === null $request-getVal( 'stable' ) === null @@ -492,22 +492,22 @@ if ( !$reqUser-getId() ) { $msgHTML = ''; // Anons just see simple icons } elseif ( $synced ) { - $msg = $quality - ? 'revreview-quick-quality-same' - : 'revreview-quick-basic-same'; + $msg = $quality ? + 'revreview-quick-quality-same' : + 'revreview-quick-basic-same'; $msgHTML = $this-msg( $msg, $srev-getRevId(), $revsSince )-parse(); } else { - $msg = $quality - ? 'revreview-quick-see-quality' - : 'revreview-quick-see-basic'; + $msg = $quality ? + 'revreview-quick-see-quality' : + 'revreview-quick-see-basic'; $msgHTML = $this-msg( $msg, $srev-getRevId(), $revsSince )-parse(); } $icon = ''; # For protection based configs, show lock only if it's not redundant. if ( $this-showRatingIcon() ) { - $icon = $synced - ? FlaggedRevsXML::stableStatusIcon( $quality ) - : FlaggedRevsXML::draftStatusIcon(); + $icon = $synced ? + FlaggedRevsXML::stableStatusIcon( $quality ) : + FlaggedRevsXML::draftStatusIcon(); } $msgHTML = $prot . $icon . $msgHTML; $tag .= FlaggedRevsXML::prettyRatingBox( $srev, $msgHTML, @@ -515,22 +515,20 @@ // Standard UI } else { if ( $synced ) { - if ( $quality ) { - $msg = 'revreview-quality-same'; - } else { - $msg = 'revreview-basic-same'; - } - $msgHTML = $this-msg( $msg, $srev-getRevId(), $time, $revsSince )-parse(); + $msg = $quality ? + 'revreview-quality-same' : + 'revreview-basic-same'; } else { - $msg = $quality -
[MediaWiki-commits] [Gerrit] Add totalUploads totalContributions to the API - change (mediawiki...UploadWizard)
jenkins-bot has submitted this change and it was merged. Change subject: Add totalUploads totalContributions to the API .. Add totalUploads totalContributions to the API Change-Id: I03e7ff7d9b41ac8858ecda740e83f67ec521ea22 --- M includes/ApiQueryAllCampaigns.php 1 file changed, 12 insertions(+), 0 deletions(-) Approvals: BryanDavis: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/ApiQueryAllCampaigns.php b/includes/ApiQueryAllCampaigns.php index 7982f77..75f9688 100644 --- a/includes/ApiQueryAllCampaigns.php +++ b/includes/ApiQueryAllCampaigns.php @@ -82,6 +82,18 @@ 'trackingCategory', $campaign-getTrackingCategory()-getDBKey() ); + $result-addValue( + array( 'query', $this-getModuleName(), $row-campaign_id ), + 'totalUploads', + $campaign-getUploadedMediaCount() + ); + if ( UploadWizardConfig::getSetting( 'campaignExpensiveStatsEnabled' ) === true ) { + $result-addValue( + array( 'query', $this-getModuleName(), $row-campaign_id ), + 'totalContributors', + $campaign-getTotalContributorsCount() + ); + } } $result-setIndexedTagName_internal( array( 'query', $this-getModuleName() ), 'campaign' ); } -- To view, visit https://gerrit.wikimedia.org/r/82780 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I03e7ff7d9b41ac8858ecda740e83f67ec521ea22 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UploadWizard Gerrit-Branch: master Gerrit-Owner: Yuvipanda yuvipa...@gmail.com Gerrit-Reviewer: BryanDavis bda...@wikimedia.org Gerrit-Reviewer: Matmarex matma@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] update username location for running in Jenkins etc. - change (mediawiki...CirrusSearch)
Cmcmahon has uploaded a new change for review. https://gerrit.wikimedia.org/r/82848 Change subject: update username location for running in Jenkins etc. .. update username location for running in Jenkins etc. Change-Id: Ie0432cdef571a74ca73191af7683162c207d6ec5 --- M tests/browser/features/support/env.rb 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch refs/changes/48/82848/1 diff --git a/tests/browser/features/support/env.rb b/tests/browser/features/support/env.rb index d91ed29..45b5ebc 100644 --- a/tests/browser/features/support/env.rb +++ b/tests/browser/features/support/env.rb @@ -98,7 +98,7 @@ config = YAML.load_file('config/config.yml') secret = YAML.load_file(#{secret_yml_location}) -mediawiki_username = secret['mediawiki_username'] +mediawiki_username = config['mediawiki_username'] mediawiki_password = secret['mediawiki_password'] if ENV['ENVIRONMENT'] == 'cloudbees' -- To view, visit https://gerrit.wikimedia.org/r/82848 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie0432cdef571a74ca73191af7683162c207d6ec5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CirrusSearch Gerrit-Branch: master Gerrit-Owner: Cmcmahon cmcma...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Move run_directory into mysql.pp, the only place it is used. - change (operations/puppet)
coren has submitted this change and it was merged. Change subject: Move run_directory into mysql.pp, the only place it is used. .. Move run_directory into mysql.pp, the only place it is used. This fixes a dumb load-order problem. Change-Id: Id5eb567a433b083708571436b661e4b69f25d2f9 --- M manifests/mysql.pp M modules/base/manifests/init.pp 2 files changed, 11 insertions(+), 13 deletions(-) Approvals: coren: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/mysql.pp b/manifests/mysql.pp index 282268d..4abf026 100644 --- a/manifests/mysql.pp +++ b/manifests/mysql.pp @@ -631,22 +631,28 @@ class { generic::mysql::packages::client: version = $version } include generic::apparmor::service - # NOTE: $::run_directory is defined in base.pp +# /var/run has moved to /run in newer Ubuntu versions. +# See: http://lwn.net/Articles/436012/ +if $::lsbdistid == 'Ubuntu' and versioncmp($::lsbdistrelease, '11.10') = 0 { +$run_directory = '/run' +} else { +$run_directory = '/var/run' +} # if $socket was not manually specified, # assume that the socket file should live in - # $::run_directory/mysqld/mysqld.sock, otherwise + # $run_directory/mysqld/mysqld.sock, otherwise # just use the path that was given. $socket_path = $socket ? { - false = $::run_directory/mysqld/mysqld.sock, + false = $run_directory/mysqld/mysqld.sock, default = $socket, } # if $pid_file was not manually specified, # assume that the pid file should live in - # $::run_directory/mysqld/mysqld.sock, otherwise + # $run_directory/mysqld/mysqld.sock, otherwise # just use the path that was given. $pid_path = $pid_file ? { - false = $::run_directory/mysqld/mysqld.pid, + false = $run_directory/mysqld/mysqld.pid, default = $pid_file, } diff --git a/modules/base/manifests/init.pp b/modules/base/manifests/init.pp index 6d2ed23..c362d20 100644 --- a/modules/base/manifests/init.pp +++ b/modules/base/manifests/init.pp @@ -1,11 +1,3 @@ -# /var/run has moved to /run in newer Ubuntu versions. -# See: http://lwn.net/Articles/436012/ -if $::lsbdistid == 'Ubuntu' and versioncmp($::lsbdistrelease, '11.10') = 0 { -$run_directory = '/run' -} else { -$run_directory = '/var/run' -} - class base::access::dc-techs { # add account and sudoers rules for data center techs -- To view, visit https://gerrit.wikimedia.org/r/82845 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id5eb567a433b083708571436b661e4b69f25d2f9 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Andrew Bogott abog...@wikimedia.org Gerrit-Reviewer: coren mpellet...@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] Add full-stops to error messages - change (mediawiki...FeaturedFeeds)
jenkins-bot has submitted this change and it was merged. Change subject: Add full-stops to error messages .. Add full-stops to error messages Change-Id: I341492bb11865bf8f627a8d4ddf22c0c847eb0fd --- M FeaturedFeeds.i18n.php 1 file changed, 4 insertions(+), 4 deletions(-) Approvals: Siebrand: Looks good to me, approved jenkins-bot: Verified diff --git a/FeaturedFeeds.i18n.php b/FeaturedFeeds.i18n.php index 8e66dcd..e033454 100644 --- a/FeaturedFeeds.i18n.php +++ b/FeaturedFeeds.i18n.php @@ -13,11 +13,11 @@ */ $messages['en'] = array( 'ffeed-desc' = Adds syndication feeds of wiki's featured content, - 'ffeed-no-feed' = 'Feed not specified', - 'ffeed-feed-not-found' = 'Feed $1 not found', - 'ffeed-entry-not-found' = 'Feed entry for $1 not found', + 'ffeed-no-feed' = 'Feed not specified.', + 'ffeed-feed-not-found' = 'Feed $1 not found.', + 'ffeed-entry-not-found' = 'Feed entry for $1 not found.', 'ffeed-sidebar-section' = 'Featured content feeds', - 'ffeed-invalid-timestamp' = 'Invalid feed timestamp', + 'ffeed-invalid-timestamp' = 'Invalid feed timestamp.', 'ffeed-enable-sidebar-links' = '-', # do not localise # Featured Article -- To view, visit https://gerrit.wikimedia.org/r/82811 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I341492bb11865bf8f627a8d4ddf22c0c847eb0fd Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/FeaturedFeeds Gerrit-Branch: master Gerrit-Owner: Shirayuki shirayuk...@gmail.com Gerrit-Reviewer: Siebrand siebr...@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] Add role to toollabs for generic web proxy - change (operations/puppet)
coren has submitted this change and it was merged. Change subject: Add role to toollabs for generic web proxy .. Add role to toollabs for generic web proxy This will eventually replace webproxy, and can also proxy request dynamically back to jobs running on the grid Change-Id: I597676fa7e14aed3fe7f9d27b85c2a9e3893b00e --- M manifests/role/labs.pp 1 file changed, 5 insertions(+), 0 deletions(-) Approvals: coren: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/role/labs.pp b/manifests/role/labs.pp index 0165c8d..fe19bb2 100644 --- a/manifests/role/labs.pp +++ b/manifests/role/labs.pp @@ -49,6 +49,11 @@ class { 'toollabs::webproxy': } } + class proxy inherits role::labs::tools::config { + system_role { role::labs::tools::proxy: description = Tool labs generic web proxy } + class { '::labsproxy': } + } + class mailrelay inherits role::labs::tools::config { system_role { role::labs::tools::mailrelay: description = Tool Labs mail relay } class { 'toollabs::mailrelay': -- To view, visit https://gerrit.wikimedia.org/r/82047 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I597676fa7e14aed3fe7f9d27b85c2a9e3893b00e Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Yuvipanda yuvipa...@gmail.com Gerrit-Reviewer: coren mpellet...@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] Don't encode quotes or apostrophes. - change (mediawiki...Parsoid)
Marcoil has uploaded a new change for review. https://gerrit.wikimedia.org/r/82866 Change subject: Don't encode quotes or apostrophes. .. Don't encode quotes or apostrophes. Change-Id: I197ffd0168e5ffc62bc3b609359071502b1926b2 --- M js/tests/roundtrip-test.js 1 file changed, 1 insertion(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Parsoid refs/changes/66/82866/1 diff --git a/js/tests/roundtrip-test.js b/js/tests/roundtrip-test.js index 115b73d..9105bc7 100755 --- a/js/tests/roundtrip-test.js +++ b/js/tests/roundtrip-test.js @@ -60,9 +60,7 @@ var encodeXmlEntities = function( str ) { return str.replace( //g, 'amp;' ) .replace( //g, 'lt;' ) - .replace( //g, 'gt;' ) - .replace( //g, 'quot;' ) - .replace( /'/g, 'apos;' ); + .replace( //g, 'gt;' ); }; var xmlCallback = function ( env, err, results ) { -- To view, visit https://gerrit.wikimedia.org/r/82866 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I197ffd0168e5ffc62bc3b609359071502b1926b2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Parsoid Gerrit-Branch: master Gerrit-Owner: Marcoil marc...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update README file - change (mediawiki...Serialization)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/82862 Change subject: Update README file .. Update README file Change-Id: I3ab9281f4c089c310f3d9cf256d37dba1e6c211f --- M README.md 1 file changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Serialization refs/changes/62/82862/1 diff --git a/README.md b/README.md index 9a10d53..021ab17 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,12 @@ # Serialization -[![Latest Stable Version](https://poser.pugx.org/serialization/serialization/version.png)](https://packagist.org/packages/serialization/serialization) -[![Latest Stable Version](https://poser.pugx.org/serialization/serialization/d/total.png)](https://packagist.org/packages/serialization/serialization) [![Build Status](https://secure.travis-ci.org/wikimedia/mediawiki-extensions-Serialization.png?branch=master)](http://travis-ci.org/wikimedia/mediawiki-extensions-Serialization) [![Coverage Status](https://coveralls.io/repos/wikimedia/mediawiki-extensions-Serialization/badge.png?branch=master)](https://coveralls.io/r/wikimedia/mediawiki-extensions-Serialization?branch=master) +On Packagist: +[![Latest Stable Version](https://poser.pugx.org/serialization/serialization/version.png)](https://packagist.org/packages/serialization/serialization) +[![Download count](https://poser.pugx.org/serialization/serialization/d/total.png)](https://packagist.org/packages/serialization/serialization) + Small library defining a Serializer and a Deserializer interface. Also contains various Exceptions and a few basic (de)serialization utilities. -- To view, visit https://gerrit.wikimedia.org/r/82862 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3ab9281f4c089c310f3d9cf256d37dba1e6c211f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Serialization Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Clean up use of -text() with HTML - change (mediawiki...CentralAuth)
Anomie has uploaded a new change for review. https://gerrit.wikimedia.org/r/82864 Change subject: Clean up use of -text() with HTML .. Clean up use of -text() with HTML While these aren't much of a concern in practice, unless -text() is specifically needed it's better to use -escaped() for sanity's sake. Change-Id: I6eeaa7aa6a968514ab40fa485141b666505f6b07 --- M CentralAuthHooks.php 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth refs/changes/64/82864/1 diff --git a/CentralAuthHooks.php b/CentralAuthHooks.php index 6dcaa61..f9c1758 100644 --- a/CentralAuthHooks.php +++ b/CentralAuthHooks.php @@ -306,7 +306,7 @@ } else { if ( $wgCentralAuthLoginWiki ) { // Set $inject_html to some text to bypass the LoginForm redirection - $inject_html .= wfMessage( 'centralauth-login-no-others' )-text(); + $inject_html .= wfMessage( 'centralauth-login-no-others' )-escaped(); // Redirect to the central wiki and back to complete login $dummy = ''; self::doCentralLoginRedirect( $user, $centralUser, $dummy ); @@ -329,10 +329,10 @@ // No other domains if ( !$wgCentralAuthAutoLoginWikis ) { - $inject_html = wfMessage( 'centralauth-login-no-others' )-text(); + $inject_html = wfMessage( 'centralauth-login-no-others' )-escaped(); } else { $inject_html = 'div class=centralauth-login-boxp' . - wfMessage( 'centralauth-login-progress', $user-getName() )-text() . /p\np; + wfMessage( 'centralauth-login-progress', $user-getName() )-escaped() . /p\np; foreach ( $wgCentralAuthAutoLoginWikis as $alt = $wikiID ) { $wiki = WikiMap::getWiki( $wikiID ); -- To view, visit https://gerrit.wikimedia.org/r/82864 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6eeaa7aa6a968514ab40fa485141b666505f6b07 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CentralAuth Gerrit-Branch: master Gerrit-Owner: Anomie bjor...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add tracking category to UploadCampaign API call - change (mediawiki...UploadWizard)
jenkins-bot has submitted this change and it was merged. Change subject: Add tracking category to UploadCampaign API call .. Add tracking category to UploadCampaign API call Change-Id: Id449c87fb6f2c814573b10bcb2cde014df1188f4 --- M includes/ApiQueryAllCampaigns.php 1 file changed, 5 insertions(+), 0 deletions(-) Approvals: BryanDavis: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/ApiQueryAllCampaigns.php b/includes/ApiQueryAllCampaigns.php index e63418f..7982f77 100644 --- a/includes/ApiQueryAllCampaigns.php +++ b/includes/ApiQueryAllCampaigns.php @@ -77,6 +77,11 @@ 'name', $campaign-getName() ); + $result-addValue( + array( 'query', $this-getModuleName(), $row-campaign_id ), + 'trackingCategory', + $campaign-getTrackingCategory()-getDBKey() + ); } $result-setIndexedTagName_internal( array( 'query', $this-getModuleName() ), 'campaign' ); } -- To view, visit https://gerrit.wikimedia.org/r/82779 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id449c87fb6f2c814573b10bcb2cde014df1188f4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UploadWizard Gerrit-Branch: master Gerrit-Owner: Yuvipanda yuvipa...@gmail.com Gerrit-Reviewer: BryanDavis bda...@wikimedia.org Gerrit-Reviewer: Matmarex matma@gmail.com Gerrit-Reviewer: Spage sp...@wikimedia.org Gerrit-Reviewer: Yuvipanda yuvipa...@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] Match renaming changes in Serialization component. - change (mediawiki...Ask)
Daniel Werner has submitted this change and it was merged. Change subject: Match renaming changes in Serialization component. .. Match renaming changes in Serialization component. This needs Serialization 2.x (https://gerrit.wikimedia.org/r/82860) Change-Id: I752f8efc5bf320c869de785a226656c01ba1a87b --- M Tests/Phpunit/DeserializerFactoryTest.php M Tests/Phpunit/Deserializers/DescriptionDeserializerTest.php M Tests/Phpunit/Deserializers/DispatchingDeserializerTest.php M Tests/Phpunit/Deserializers/QueryDeserializerTest.php M Tests/Phpunit/Deserializers/QueryOptionsDeserializerTest.php M Tests/Phpunit/Deserializers/SelectionRequestDeserializerTest.php M Tests/Phpunit/Deserializers/SortExpressionDeserializerTest.php M Tests/Phpunit/SerializerFactoryTest.php M Tests/Phpunit/Serializers/DescriptionSerializerTest.php M Tests/Phpunit/Serializers/DispatchingSerializerTest.php M Tests/Phpunit/Serializers/QueryOptionsSerializerTest.php M Tests/Phpunit/Serializers/QuerySerializerTest.php M Tests/Phpunit/Serializers/SelectionRequestSerializerTest.php M Tests/Phpunit/Serializers/SortExpressionSerializerTest.php M composer.json M src/Ask/Deserializers/DescriptionDeserializer.php M src/Ask/Deserializers/SelectionRequestDeserializer.php M src/Ask/Deserializers/SortExpressionDeserializer.php M src/Ask/Serializers/DescriptionSerializer.php M src/Ask/Serializers/QueryOptionsSerializer.php M src/Ask/Serializers/QuerySerializer.php M src/Ask/Serializers/SelectionRequestSerializer.php M src/Ask/Serializers/SortExpressionSerializer.php 23 files changed, 67 insertions(+), 62 deletions(-) Approvals: Daniel Werner: Looks good to me, approved jenkins-bot: Verified diff --git a/Tests/Phpunit/DeserializerFactoryTest.php b/Tests/Phpunit/DeserializerFactoryTest.php index 06c15ec..ee43f7a 100644 --- a/Tests/Phpunit/DeserializerFactoryTest.php +++ b/Tests/Phpunit/DeserializerFactoryTest.php @@ -44,7 +44,7 @@ } protected function assertDeserializerThatCanDeserializeObject( Deserializer $deserializer, $object ) { - $this-assertTrue( $deserializer-canDeserialize( $object ) ); + $this-assertTrue( $deserializer-isDeserializerFor( $object ) ); } public function testCanGetDescriptionDeserializer() { diff --git a/Tests/Phpunit/Deserializers/DescriptionDeserializerTest.php b/Tests/Phpunit/Deserializers/DescriptionDeserializerTest.php index 4b3..026a52c 100644 --- a/Tests/Phpunit/Deserializers/DescriptionDeserializerTest.php +++ b/Tests/Phpunit/Deserializers/DescriptionDeserializerTest.php @@ -39,7 +39,7 @@ public function testCannotDeserializeWithInvalidObjectType( $notADescription ) { $serializer = $this-newDescriptionDeserializer(); - $this-assertFalse( $serializer-canDeserialize( $notADescription ) ); + $this-assertFalse( $serializer-isDeserializerFor( $notADescription ) ); $this-setExpectedException( 'Deserializers\Exceptions\UnsupportedTypeException' ); $serializer-deserialize( $notADescription ); @@ -87,7 +87,7 @@ public function testCannotDeserilaizeWithoutObjectType( $notADescription ) { $serializer = $this-newDescriptionDeserializer(); - $this-assertFalse( $serializer-canDeserialize( $notADescription ) ); + $this-assertFalse( $serializer-isDeserializerFor( $notADescription ) ); $this-setExpectedException( 'Deserializers\Exceptions\MissingTypeException' ); $serializer-deserialize( $notADescription ); diff --git a/Tests/Phpunit/Deserializers/DispatchingDeserializerTest.php b/Tests/Phpunit/Deserializers/DispatchingDeserializerTest.php index f3cf549..732d125 100644 --- a/Tests/Phpunit/Deserializers/DispatchingDeserializerTest.php +++ b/Tests/Phpunit/Deserializers/DispatchingDeserializerTest.php @@ -32,24 +32,24 @@ $subDeserializer = $this-getMock( 'Deserializers\Deserializer' ); $subDeserializer-expects( $this-exactly( 4 ) ) - -method( 'canDeserialize' ) + -method( 'isDeserializerFor' ) -will( $this-returnCallback( function( $value ) { return $value 9000; } ) ); $serializer = new DispatchingDeserializer( array( $subDeserializer ) ); - $this-assertFalse( $serializer-canDeserialize( 0 ) ); - $this-assertFalse( $serializer-canDeserialize( 42 ) ); - $this-assertTrue( $serializer-canDeserialize( 9001 ) ); - $this-assertTrue( $serializer-canDeserialize( 31337 ) ); + $this-assertFalse( $serializer-isDeserializerFor( 0 ) ); + $this-assertFalse( $serializer-isDeserializerFor( 42 ) ); + $this-assertTrue( $serializer-isDeserializerFor( 9001 ) );
[MediaWiki-commits] [Gerrit] Match renaming changes in Serialization component - change (mediawiki...Ask)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/82861 Change subject: Match renaming changes in Serialization component .. Match renaming changes in Serialization component This needs Serialization 2.x (https://gerrit.wikimedia.org/r/82860) Change-Id: I752f8efc5bf320c869de785a226656c01ba1a87b --- M Tests/Phpunit/DeserializerFactoryTest.php M Tests/Phpunit/Deserializers/DescriptionDeserializerTest.php M Tests/Phpunit/Deserializers/DispatchingDeserializerTest.php M Tests/Phpunit/Deserializers/QueryDeserializerTest.php M Tests/Phpunit/Deserializers/QueryOptionsDeserializerTest.php M Tests/Phpunit/Deserializers/SelectionRequestDeserializerTest.php M Tests/Phpunit/Deserializers/SortExpressionDeserializerTest.php M Tests/Phpunit/SerializerFactoryTest.php M Tests/Phpunit/Serializers/DescriptionSerializerTest.php M Tests/Phpunit/Serializers/DispatchingSerializerTest.php M Tests/Phpunit/Serializers/QueryOptionsSerializerTest.php M Tests/Phpunit/Serializers/QuerySerializerTest.php M Tests/Phpunit/Serializers/SelectionRequestSerializerTest.php M Tests/Phpunit/Serializers/SortExpressionSerializerTest.php M composer.json M src/Ask/Deserializers/DescriptionDeserializer.php M src/Ask/Deserializers/SelectionRequestDeserializer.php M src/Ask/Deserializers/SortExpressionDeserializer.php M src/Ask/Serializers/DescriptionSerializer.php M src/Ask/Serializers/QueryOptionsSerializer.php M src/Ask/Serializers/QuerySerializer.php M src/Ask/Serializers/SelectionRequestSerializer.php M src/Ask/Serializers/SortExpressionSerializer.php 23 files changed, 67 insertions(+), 62 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Ask refs/changes/61/82861/1 diff --git a/Tests/Phpunit/DeserializerFactoryTest.php b/Tests/Phpunit/DeserializerFactoryTest.php index 06c15ec..ee43f7a 100644 --- a/Tests/Phpunit/DeserializerFactoryTest.php +++ b/Tests/Phpunit/DeserializerFactoryTest.php @@ -44,7 +44,7 @@ } protected function assertDeserializerThatCanDeserializeObject( Deserializer $deserializer, $object ) { - $this-assertTrue( $deserializer-canDeserialize( $object ) ); + $this-assertTrue( $deserializer-isDeserializerFor( $object ) ); } public function testCanGetDescriptionDeserializer() { diff --git a/Tests/Phpunit/Deserializers/DescriptionDeserializerTest.php b/Tests/Phpunit/Deserializers/DescriptionDeserializerTest.php index 4b3..026a52c 100644 --- a/Tests/Phpunit/Deserializers/DescriptionDeserializerTest.php +++ b/Tests/Phpunit/Deserializers/DescriptionDeserializerTest.php @@ -39,7 +39,7 @@ public function testCannotDeserializeWithInvalidObjectType( $notADescription ) { $serializer = $this-newDescriptionDeserializer(); - $this-assertFalse( $serializer-canDeserialize( $notADescription ) ); + $this-assertFalse( $serializer-isDeserializerFor( $notADescription ) ); $this-setExpectedException( 'Deserializers\Exceptions\UnsupportedTypeException' ); $serializer-deserialize( $notADescription ); @@ -87,7 +87,7 @@ public function testCannotDeserilaizeWithoutObjectType( $notADescription ) { $serializer = $this-newDescriptionDeserializer(); - $this-assertFalse( $serializer-canDeserialize( $notADescription ) ); + $this-assertFalse( $serializer-isDeserializerFor( $notADescription ) ); $this-setExpectedException( 'Deserializers\Exceptions\MissingTypeException' ); $serializer-deserialize( $notADescription ); diff --git a/Tests/Phpunit/Deserializers/DispatchingDeserializerTest.php b/Tests/Phpunit/Deserializers/DispatchingDeserializerTest.php index f3cf549..732d125 100644 --- a/Tests/Phpunit/Deserializers/DispatchingDeserializerTest.php +++ b/Tests/Phpunit/Deserializers/DispatchingDeserializerTest.php @@ -32,24 +32,24 @@ $subDeserializer = $this-getMock( 'Deserializers\Deserializer' ); $subDeserializer-expects( $this-exactly( 4 ) ) - -method( 'canDeserialize' ) + -method( 'isDeserializerFor' ) -will( $this-returnCallback( function( $value ) { return $value 9000; } ) ); $serializer = new DispatchingDeserializer( array( $subDeserializer ) ); - $this-assertFalse( $serializer-canDeserialize( 0 ) ); - $this-assertFalse( $serializer-canDeserialize( 42 ) ); - $this-assertTrue( $serializer-canDeserialize( 9001 ) ); - $this-assertTrue( $serializer-canDeserialize( 31337 ) ); + $this-assertFalse( $serializer-isDeserializerFor( 0 ) ); + $this-assertFalse( $serializer-isDeserializerFor( 42 ) ); +
[MediaWiki-commits] [Gerrit] contint: dupe define Iptables_add_exec[gallium] - change (operations/puppet)
ArielGlenn has submitted this change and it was merged. Change subject: contint: dupe define Iptables_add_exec[gallium] .. contint: dupe define Iptables_add_exec[gallium] Only need it once. Change-Id: I0ae18dd52cfd222a2b80119f20fa7f0eeba77875 --- M modules/contint/manifests/firewall.pp 1 file changed, 1 insertion(+), 2 deletions(-) Approvals: ArielGlenn: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/contint/manifests/firewall.pp b/modules/contint/manifests/firewall.pp index 8a39f43..5aabec4 100644 --- a/modules/contint/manifests/firewall.pp +++ b/modules/contint/manifests/firewall.pp @@ -34,8 +34,7 @@ require 'contint::firewall::iptables-drops' -iptables_add_exec{ $::hostname: service = 'http-alt' } -iptables_add_exec{ $::hostname: service = 'zuul_webservice' } +iptables_add_exec{ $::hostname: service = 'contint' } } require contint::firewall::iptables -- To view, visit https://gerrit.wikimedia.org/r/82857 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0ae18dd52cfd222a2b80119f20fa7f0eeba77875 Gerrit-PatchSet: 3 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Hashar has...@free.fr 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] Make CentralAuthUser::deleteGlobalCookies and clearCookie st... - change (mediawiki...CentralAuth)
Anomie has uploaded a new change for review. https://gerrit.wikimedia.org/r/82863 Change subject: Make CentralAuthUser::deleteGlobalCookies and clearCookie static .. Make CentralAuthUser::deleteGlobalCookies and clearCookie static There's no need for these to be non-static, they don't use any non-static data or any other non-static methods. Change-Id: I8282cf706b993c62a7ab38c9ca43cd75601c2043 --- M CentralAuthHooks.php M CentralAuthUser.php M specials/SpecialAutoLogin.php 3 files changed, 9 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth refs/changes/63/82863/1 diff --git a/CentralAuthHooks.php b/CentralAuthHooks.php index 8df00e9..6dcaa61 100644 --- a/CentralAuthHooks.php +++ b/CentralAuthHooks.php @@ -296,7 +296,7 @@ $centralUser = CentralAuthUser::getInstance( $user ); if ( !$centralUser-exists() || !$centralUser-isAttached() ) { - $centralUser-deleteGlobalCookies(); + CentralAuthUser::deleteGlobalCookies(); return true; } @@ -611,7 +611,7 @@ $centralUser = CentralAuthUser::getInstance( $user ); if ( $centralUser-exists() ) { - $centralUser-deleteGlobalCookies(); + CentralAuthUser::deleteGlobalCookies(); $centralUser-resetAuthToken(); } diff --git a/CentralAuthUser.php b/CentralAuthUser.php index 81090d9..ac4d7b0 100644 --- a/CentralAuthUser.php +++ b/CentralAuthUser.php @@ -2015,7 +2015,7 @@ * @param $name * @return void */ - protected function clearCookie( $name ) { + protected static function clearCookie( $name ) { self::setCookie( $name, '', - 86400 ); } @@ -2059,7 +2059,7 @@ if ( $remember ) { self::setCookie( 'Token', $this-getAuthToken(), -1, $secure ); } else { - $this-clearCookie( 'Token' ); + self::clearCookie( 'Token' ); } $id = self::setSession( $session, $refreshId, $secure ); @@ -2076,10 +2076,10 @@ * Delete global cookies which auto-authenticate the user on other wikis. * Called on logout. */ - function deleteGlobalCookies() { - $this-clearCookie( 'User' ); - $this-clearCookie( 'Token' ); - $this-clearCookie( 'Session' ); + static function deleteGlobalCookies() { + self::clearCookie( 'User' ); + self::clearCookie( 'Token' ); + self::clearCookie( 'Session' ); // Logged-out cookie -to fix caching. self::setCookie( 'LoggedOut', time() ); diff --git a/specials/SpecialAutoLogin.php b/specials/SpecialAutoLogin.php index 87b08a2..1de4311 100644 --- a/specials/SpecialAutoLogin.php +++ b/specials/SpecialAutoLogin.php @@ -62,7 +62,7 @@ // Auth OK. if ( $logout ) { - $centralUser-deleteGlobalCookies(); + CentralAuthUser::deleteGlobalCookies(); } else { $centralUser-setGlobalCookies( $remember ); } -- To view, visit https://gerrit.wikimedia.org/r/82863 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8282cf706b993c62a7ab38c9ca43cd75601c2043 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CentralAuth Gerrit-Branch: master Gerrit-Owner: Anomie bjor...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update method names to avoid confusion and bump to 2.0 - change (mediawiki...Serialization)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/82860 Change subject: Update method names to avoid confusion and bump to 2.0 .. Update method names to avoid confusion and bump to 2.0 Change-Id: Iaaf28c8eb6e63efbb8248c498bdbcdc22ab6af50 --- M README.md M Serialization.php M composer.json M phpunit.xml.dist M src/Deserializers/Deserializer.php M src/Deserializers/DispatchingDeserializer.php M src/Deserializers/TypedObjectDeserializer.php M src/Serializers/DispatchingSerializer.php M src/Serializers/Serializer.php M test/Deserializers/Tests/Phpunit/DispatchingDeserializerTest.php M test/Serializers/Tests/Phpunit/DispatchingSerializerTest.php 11 files changed, 48 insertions(+), 40 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Serialization refs/changes/60/82860/1 diff --git a/README.md b/README.md index e1d9a20..9a10d53 100644 --- a/README.md +++ b/README.md @@ -79,6 +79,11 @@ ## Release notes +### 2.0 (2013-09-05) + +* Renamed Serializer::canSerialize to Serializer::isDeserializerFor +* Renamed Deserializer::canDeserialize to Deserializer::isDeserializerFor + ### 1.0 (2013-07-13) * Initial release. diff --git a/Serialization.php b/Serialization.php index 3fa825b..883bfe1 100644 --- a/Serialization.php +++ b/Serialization.php @@ -11,7 +11,7 @@ return; } -define( 'Serialization_VERSION', '1.0' ); +define( 'Serialization_VERSION', '2.0' ); // @codeCoverageIgnoreStart spl_autoload_register( function ( $className ) { diff --git a/composer.json b/composer.json index 199eaaa..fd8ba6a 100644 --- a/composer.json +++ b/composer.json @@ -2,8 +2,15 @@ name: serialization/serialization, type: library, description: library defining a Serializer and a Deserializer interface and basic utilities, - keywords: [serialization, deserialization, unserialization, serializer, deserializer, wikidata], - homepage: https://www.mediawiki.org/wiki/Extension:Serialization;, + keywords: [ + serialization, + deserialization, + unserialization, + serializer, + deserializer, + wikidata + ], + homepage: https://github.com/wikimedia/mediawiki-extensions-Serialization;, license: GPL-2.0+, authors: [ { diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 28201f6..af0336e 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -26,3 +26,4 @@ /whitelist /filter /phpunit + diff --git a/src/Deserializers/Deserializer.php b/src/Deserializers/Deserializer.php index 73d2dd4..c8cd04c 100644 --- a/src/Deserializers/Deserializer.php +++ b/src/Deserializers/Deserializer.php @@ -26,12 +26,7 @@ public function deserialize( $serialization ); /** -* Returns if the deserializer can deserialzie the provided object. -* -* Note: deserializers are expected to do checks to verify the provided -* object is of a type they can deserialize. No full deserialization is -* attempted. Thus when providing invalid data structures, it is possible -* this method returns true even though deserialization will fail. +* Returns if the deserializer can deserialize the provided object. * * @since 1.0 * @@ -39,6 +34,6 @@ * * @return boolean */ - public function canDeserialize( $serialization ); + public function isDeserializerFor( $serialization ); } diff --git a/src/Deserializers/DispatchingDeserializer.php b/src/Deserializers/DispatchingDeserializer.php index 3fd0d7e..77b1485 100644 --- a/src/Deserializers/DispatchingDeserializer.php +++ b/src/Deserializers/DispatchingDeserializer.php @@ -39,7 +39,7 @@ public function deserialize( $serialization ) { foreach ( $this-deserializers as $deserializer ) { - if ( $deserializer-canDeserialize( $serialization ) ) { + if ( $deserializer-isDeserializerFor( $serialization ) ) { return $deserializer-deserialize( $serialization ); } } @@ -49,9 +49,9 @@ ); } - public function canDeserialize( $serialization ) { + public function isDeserializerFor( $serialization ) { foreach ( $this-deserializers as $deserializer ) { - if ( $deserializer-canDeserialize( $serialization ) ) { + if ( $deserializer-isDeserializerFor( $serialization ) ) { return true; } } diff --git a/src/Deserializers/TypedObjectDeserializer.php b/src/Deserializers/TypedObjectDeserializer.php index b93f4d5..3068ce8 100644 --- a/src/Deserializers/TypedObjectDeserializer.php +++
[MediaWiki-commits] [Gerrit] Fix spaces after references - change (mediawiki...MobileFrontend)
jenkins-bot has submitted this change and it was merged. Change subject: Fix spaces after references .. Fix spaces after references Bug: 53086 Change-Id: I92ff7d38c5360953a487866f7d90564d58c519f3 --- M includes/formatters/HtmlFormatter.php M tests/HtmlFormatterTest.php 2 files changed, 11 insertions(+), 3 deletions(-) Approvals: Jdlrobson: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/formatters/HtmlFormatter.php b/includes/formatters/HtmlFormatter.php index c9485ea..32adf43 100644 --- a/includes/formatters/HtmlFormatter.php +++ b/includes/formatters/HtmlFormatter.php @@ -50,12 +50,15 @@ public function getDoc() { if ( !$this-doc ) { $html = mb_convert_encoding( $this-html, 'HTML-ENTITIES', UTF-8 ); + + // https://bugzilla.wikimedia.org/show_bug.cgi?id=53086 + $html = str_replace( ' ', '#32;', $html ); + libxml_use_internal_errors( true ); $this-doc = new DOMDocument(); + $this-doc-strictErrorChecking = false; $this-doc-loadHTML( $html ); libxml_use_internal_errors( false ); - $this-doc-preserveWhiteSpace = false; - $this-doc-strictErrorChecking = false; $this-doc-encoding = 'UTF-8'; } return $this-doc; diff --git a/tests/HtmlFormatterTest.php b/tests/HtmlFormatterTest.php index a9a141b..5ece668 100644 --- a/tests/HtmlFormatterTest.php +++ b/tests/HtmlFormatterTest.php @@ -106,7 +106,12 @@ 'span class=mw-mf-image-replacement[' . wfMessage( 'mobile-frontend-missing-image' ) . ']/spanlook at the cute kitty!'. 'span class=mw-mf-image-replacement[picture of angry dog]/span', $removeImages, - ) + ), + // https://bugzilla.wikimedia.org/show_bug.cgi?id=53086 + array( + 'Foosup id=cite_ref-1 class=referencea href=#cite_note-1[1]/a/sup a href=/wiki/Bar title=Bar class=mw-redirectBar/a', + 'Foosup id=cite_ref-1 class=referencea href=#cite_note-1[1]/a/sup a href=/wiki/Bar title=Bar class=mw-redirectBar/a', + ), ); } } -- To view, visit https://gerrit.wikimedia.org/r/81507 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I92ff7d38c5360953a487866f7d90564d58c519f3 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: MaxSem maxsem.w...@gmail.com Gerrit-Reviewer: JGonera jgon...@wikimedia.org Gerrit-Reviewer: Jdlrobson jrob...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits