[MediaWiki-commits] [Gerrit] MediaWiki.php: Redirect non-standard title urls to canonical - change (mediawiki/core)
Krinkle has uploaded a new change for review. https://gerrit.wikimedia.org/r/219446 Change subject: MediaWiki.php: Redirect non-standard title urls to canonical .. MediaWiki.php: Redirect non-standard title urls to canonical Urls that use the page's title and no extra query parameters now redirect to the standard url format. Previously we only did this for variations of the title value, not for variations of the overlal url structure. These already redirected: http://example.org/wiki/Foo%20Bar http://example.org/wiki/Foo_Bar http://example.org/w/index.php?title=Foo%20Bar http://example.org/wiki/Foo_Bar http://example.org/?title=Foo%20Bar http://example.org/wiki/Foo_Bar We now redirect these as well: http://example.org/w/index.php?title=Foo_Bar http://example.org/wiki/Foo_Bar http://example.org/?title=Foo_Bar http://example.org/wiki/Foo_Bar The only change is that the titlekey comparison is now no longer a factor in deciding whether to redirect. Instead the existing comparison for the entire url is used to cover this. However kept the titlekey check for the redirect-loop as otherwise this check would throw on all canonical page views where no redirect can be made. Added a comment explaining how a redirect loop was possible as the code looked redudant. Bug: T67402 Change-Id: I88ed3525141c765910e66188427b9aab36b958a9 --- M includes/MediaWiki.php 1 file changed, 31 insertions(+), 21 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/46/219446/1 diff --git a/includes/MediaWiki.php b/includes/MediaWiki.php index 5e3836f..2ab6b7a 100644 --- a/includes/MediaWiki.php +++ b/includes/MediaWiki.php @@ -276,6 +276,8 @@ * - Normalise empty title: * /wiki/ - /wiki/Main * /w/index.php?title= - /wiki/Main +* - Normalise non-standard title urls: +* /w/index.php?title=Foo_Bar - /wiki/Foo_Bar * - Don't redirect anything with query parameters other than 'title' or 'action=view'. * * @return bool True if a redirect was set. @@ -286,8 +288,6 @@ if ( $request-getVal( 'action', 'view' ) != 'view' || $request-wasPosted() - || ( $request-getVal( 'title' ) !== null -$title-getPrefixedDBkey() == $request-getVal( 'title' ) ) || count( $request-getValueNames( array( 'action', 'title' ) ) ) || !Hooks::run( 'TestCanonicalRedirect', array( $request, $title, $output ) ) ) { @@ -302,28 +302,38 @@ } // Redirect to canonical url, make it a 301 to allow caching $targetUrl = wfExpandUrl( $title-getFullURL(), PROTO_CURRENT ); - if ( $targetUrl == $request-getFullRequestURL() ) { - $message = Redirect loop detected!\n\n . - This means the wiki got confused about what page was . - requested; this sometimes happens when moving a wiki . - to a new server or changing the server configuration.\n\n; - if ( $this-config-get( 'UsePathInfo' ) ) { - $message .= The wiki is trying to interpret the page . - title from the URL path portion (PATH_INFO), which . - sometimes fails depending on the web server. Try . - setting \\$wgUsePathInfo = false;\ in your . - LocalSettings.php, or check that \$wgArticlePath . - is correct.; - } else { - $message .= Your web server was detected as possibly not . - supporting URL path components (PATH_INFO) correctly; . - check your LocalSettings.php for a customized . - \$wgArticlePath setting and/or toggle \$wgUsePathInfo . - to true.; + // If there is no title, or the title is in a non-standard encoding, + // we demand a redirect. If cgi somehow changed the 'title' query to be non-standard + // while the url is stadnard, the server is misconfigured. + if ( $targetUrl == $request-getFullRequestURL() ) { + if ( $request-getVal( 'title' ) === null + || $title-getPrefixedDBkey() != $request-getVal( 'title' ) + ) { + $message = Redirect loop detected!\n\n . + This means the wiki got
[MediaWiki-commits] [Gerrit] Fix variable name and use isset() to shut up a stupid notice - change (mediawiki/core)
Lewis Cawte has uploaded a new change for review. https://gerrit.wikimedia.org/r/219445 Change subject: Fix variable name and use isset() to shut up a stupid notice .. Fix variable name and use isset() to shut up a stupid notice We've had to reapply this small core hack on ShoutWiki basically after each core upgrade since MW 1.23 (at least). ShoutWiki SVN r2565, r2819 Change-Id: I815efe0a3c66b145a2c429549cf139ed3c67d175 (cherry picked from commit 01504ab3417fb05806892ac50748bd623868d1ee) --- M includes/specials/SpecialVersion.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/45/219445/1 diff --git a/includes/specials/SpecialVersion.php b/includes/specials/SpecialVersion.php index c1a9593..9a1c5e5 100644 --- a/includes/specials/SpecialVersion.php +++ b/includes/specials/SpecialVersion.php @@ -265,8 +265,8 @@ $version = $wgVersion . ' ' . wfMessage( 'version-svn-revision', - isset( $info['directory-rev'] ) ? $info['directory-rev'] : '', - $info['checkout-rev'] + isset( $svnInfo['directory-rev'] ) ? $svnInfo['directory-rev'] : '', + isset( $svnInfo['checkout-rev'] ) ? $svnInfo['checkout-rev'] : '' )-text(); } -- To view, visit https://gerrit.wikimedia.org/r/219445 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I815efe0a3c66b145a2c429549cf139ed3c67d175 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: REL1_25 Gerrit-Owner: Lewis Cawte le...@lewiscawte.me Gerrit-Reviewer: Jack Phoenix j...@countervandalism.net ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] build: Updating development dependencies - change (mediawiki...WikiEditor)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/219452 Change subject: build: Updating development dependencies .. build: Updating development dependencies * jakub-onderka/php-parallel-lint: 0.8.0 → 0.9 * mediawiki/mediawiki-codesniffer: 0.2.0 → 0.3.0 Change-Id: I4e6bc08d77da698fe8b5654a205a583ae60f9f35 --- M composer.json 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikiEditor refs/changes/52/219452/1 diff --git a/composer.json b/composer.json index 21efa7e..18feb33 100644 --- a/composer.json +++ b/composer.json @@ -1,8 +1,8 @@ { - license: GPL-2.0+, + license: GPL-2.0+, require-dev: { - jakub-onderka/php-parallel-lint: 0.8.0, - mediawiki/mediawiki-codesniffer: 0.2.0 + jakub-onderka/php-parallel-lint: 0.9, + mediawiki/mediawiki-codesniffer: 0.3.0 }, scripts: { test: [ -- To view, visit https://gerrit.wikimedia.org/r/219452 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4e6bc08d77da698fe8b5654a205a583ae60f9f35 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikiEditor 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] build: Updating development dependencies - change (mediawiki...OOJsUIAjaxLogin)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/219456 Change subject: build: Updating development dependencies .. build: Updating development dependencies * jakub-onderka/php-parallel-lint: 0.8.* → 0.9 * mediawiki/mediawiki-codesniffer: 0.2.0 → 0.3.0 Change-Id: I8b09f3c7dc5712561c6c53e76802b2240628874e --- M composer.json 1 file changed, 10 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OOJsUIAjaxLogin refs/changes/56/219456/1 diff --git a/composer.json b/composer.json index 3b2c043..263ca10 100644 --- a/composer.json +++ b/composer.json @@ -1,12 +1,12 @@ { -require-dev: { -jakub-onderka/php-parallel-lint: 0.8.*, -mediawiki/mediawiki-codesniffer: 0.2.0 -}, -scripts: { -test: [ -parallel-lint . --exclude vendor, -phpcs --standard=vendor/mediawiki/mediawiki-codesniffer/MediaWiki --extensions=php,php5,inc --ignore=vendor -p . -] -} + require-dev: { + jakub-onderka/php-parallel-lint: 0.9, + mediawiki/mediawiki-codesniffer: 0.3.0 + }, + scripts: { + test: [ + parallel-lint . --exclude vendor, + phpcs --standard=vendor/mediawiki/mediawiki-codesniffer/MediaWiki --extensions=php,php5,inc --ignore=vendor -p . + ] + } } -- To view, visit https://gerrit.wikimedia.org/r/219456 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8b09f3c7dc5712561c6c53e76802b2240628874e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/OOJsUIAjaxLogin 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] build: Updating development dependencies - change (mediawiki...ContentTranslation)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/219457 Change subject: build: Updating development dependencies .. build: Updating development dependencies * jakub-onderka/php-parallel-lint: 0.8.* → 0.9 * mediawiki/mediawiki-codesniffer: 0.2.0 → 0.3.0 Change-Id: Ic4ba5f0319f3a33c90cdf972aeef9ab0c6246d76 --- M composer.json 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/57/219457/1 diff --git a/composer.json b/composer.json index 5d3d30a..2f22485 100644 --- a/composer.json +++ b/composer.json @@ -20,8 +20,8 @@ composer/installers: =1.0.1 }, require-dev: { - jakub-onderka/php-parallel-lint: 0.8.*, - mediawiki/mediawiki-codesniffer: 0.2.0 + jakub-onderka/php-parallel-lint: 0.9, + mediawiki/mediawiki-codesniffer: 0.3.0 }, scripts: { test: [ -- To view, visit https://gerrit.wikimedia.org/r/219457 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic4ba5f0319f3a33c90cdf972aeef9ab0c6246d76 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation 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] build: Updating development dependencies - change (mediawiki...TemplateData)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/219455 Change subject: build: Updating development dependencies .. build: Updating development dependencies * jakub-onderka/php-parallel-lint: 0.8.0 → 0.9 * mediawiki/mediawiki-codesniffer: 0.2.0 → 0.3.0 Change-Id: Ie92768bc59eec44cb0ee8c0d97e758bd434f37a4 --- M composer.json 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TemplateData refs/changes/55/219455/1 diff --git a/composer.json b/composer.json index a95bae6..263ca10 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { require-dev: { - jakub-onderka/php-parallel-lint: 0.8.0, - mediawiki/mediawiki-codesniffer: 0.2.0 + jakub-onderka/php-parallel-lint: 0.9, + mediawiki/mediawiki-codesniffer: 0.3.0 }, scripts: { test: [ -- To view, visit https://gerrit.wikimedia.org/r/219455 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie92768bc59eec44cb0ee8c0d97e758bd434f37a4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TemplateData 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] build: Updating development dependencies - change (mediawiki...SandboxLink)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/219454 Change subject: build: Updating development dependencies .. build: Updating development dependencies * jakub-onderka/php-parallel-lint: 0.8.0 → 0.9 * mediawiki/mediawiki-codesniffer: 0.2.0 → 0.3.0 Change-Id: I70fcd22983a1ce3b50a75baf5d0803f090bd5c92 --- M composer.json 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SandboxLink refs/changes/54/219454/1 diff --git a/composer.json b/composer.json index a95bae6..263ca10 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { require-dev: { - jakub-onderka/php-parallel-lint: 0.8.0, - mediawiki/mediawiki-codesniffer: 0.2.0 + jakub-onderka/php-parallel-lint: 0.9, + mediawiki/mediawiki-codesniffer: 0.3.0 }, scripts: { test: [ -- To view, visit https://gerrit.wikimedia.org/r/219454 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I70fcd22983a1ce3b50a75baf5d0803f090bd5c92 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SandboxLink 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] build: Updating development dependencies - change (mediawiki...Parsoid)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/219453 Change subject: build: Updating development dependencies .. build: Updating development dependencies * jakub-onderka/php-parallel-lint: 0.8.0 → 0.9 * mediawiki/mediawiki-codesniffer: 0.2.0 → 0.3.0 Change-Id: I5d6d54c3997c0bc54fd8dd0697eeb0b1e63391d0 --- M composer.json 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Parsoid refs/changes/53/219453/1 diff --git a/composer.json b/composer.json index a95bae6..263ca10 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { require-dev: { - jakub-onderka/php-parallel-lint: 0.8.0, - mediawiki/mediawiki-codesniffer: 0.2.0 + jakub-onderka/php-parallel-lint: 0.9, + mediawiki/mediawiki-codesniffer: 0.3.0 }, scripts: { test: [ -- To view, visit https://gerrit.wikimedia.org/r/219453 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5d6d54c3997c0bc54fd8dd0697eeb0b1e63391d0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Parsoid 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] Browser tests for mark as resolved and reopen - change (mediawiki...Flow)
Sbisson has uploaded a new change for review. https://gerrit.wikimedia.org/r/219466 Change subject: Browser tests for mark as resolved and reopen .. Browser tests for mark as resolved and reopen * Also removed tests for lock/unlock Bug: T102842 Change-Id: Ibb376845714ea7e19e4b55fc6b45df4d66172dbe --- D tests/browser/features/lock_unlock_topics.feature A tests/browser/features/mark_topic_as_resolved.feature A tests/browser/features/reopen_topic.feature D tests/browser/features/step_definitions/lock_unlock_topics_steps.rb A tests/browser/features/step_definitions/resolve_reopen_steps.rb M tests/browser/features/support/pages/flow_page.rb 6 files changed, 155 insertions(+), 139 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/66/219466/1 diff --git a/tests/browser/features/lock_unlock_topics.feature b/tests/browser/features/lock_unlock_topics.feature deleted file mode 100644 index 83ab1a4..000 --- a/tests/browser/features/lock_unlock_topics.feature +++ /dev/null @@ -1,48 +0,0 @@ -@chrome @clean @ee-prototype.wmflabs.org @en.wikipedia.beta.wmflabs.org @firefox @login @test2.wikipedia.org -Feature: Lock and unlock topics - - Background: - Given I am logged in - - @wip - Scenario: Locked topics have no reply links -Given I am on Flow page -And I have created a Flow topic -And the top post has been locked -When I expand the top post -Then the original message for the top post should have no reply link -And the original message for the top post should have no edit link - - @internet_explorer_10 - Scenario: Locking a topic and then changing your mind -Given I am on Flow page -And I have created a Flow topic -When I hover on the Topic Actions link -And I click the Lock topic button -And I cancel the lock/unlock topic form -Then the top post should be an open discussion -And I should not see the lock/unlock form - - @internet_explorer_10 - Scenario: Locking a topic -Given I am on Flow page -And I have created a Flow topic -When I hover on the Topic Actions link -And I click the Lock topic button -And I type This is a bikeshed as the reason -And I submit the lock/unlock topic form -Then the top post should be a locked discussion -And the reason of the first topic should be This is a bikeshed -And the content of the top post should be visible - - # Close-then-unlock doesn't work in IE, it caches the API response (bug 69160). - Scenario: Opening a topic -Given I am on Flow page -And I have created a Flow topic -And the top post has been locked -And I hover on the Topic Actions link -And I click the Unlock topic button -When I type Fun discussion as the reason -And I submit the lock/unlock topic form -Then the top post should be an open discussion -And the content of the top post should be visible diff --git a/tests/browser/features/mark_topic_as_resolved.feature b/tests/browser/features/mark_topic_as_resolved.feature new file mode 100644 index 000..a040b12 --- /dev/null +++ b/tests/browser/features/mark_topic_as_resolved.feature @@ -0,0 +1,29 @@ +@chrome @internet_explorer_10 @firefox @login @clean @en.wikipedia.beta.wmflabs.org +Feature: Mark topic as resolved + + Background: +Given I am logged in +And I am on Flow page +And I have created a Flow topic + + Scenario: Resolving a topic without a summary +When I mark the first topic as resolved +And I skip the summary +Then the first topic is resolved + + Scenario: Resolving a topic and adding a summary +When I mark the first topic as resolved +And I summarize as the answer is 42 +Then the first topic is resolved with summary the answer is 42 + + Scenario: Resolving a topic and keeping the summary +Given I summarize the first topic as this answer should be kept +When I mark the first topic as resolved +And I keep the summary +Then the first topic is resolved with summary this answer should be kept + + Scenario: Resolving a topic and updating the summary +Given I summarize the first topic as this answer should be changed +When I mark the first topic as resolved +And I summarize as this is the new answer +Then the first topic is resolved with summary this is the new answer diff --git a/tests/browser/features/reopen_topic.feature b/tests/browser/features/reopen_topic.feature new file mode 100644 index 000..c23febb --- /dev/null +++ b/tests/browser/features/reopen_topic.feature @@ -0,0 +1,14 @@ +@chrome @internet_explorer_10 @firefox @login @clean @en.wikipedia.beta.wmflabs.org +Feature: Reopen a resolved topic + + Background: +Given I am logged in +And I am on Flow page +And I have created a Flow topic + + Scenario: Reopening a resolved
[MediaWiki-commits] [Gerrit] Fix phpcs warnnings - change (mediawiki...ContentTranslation)
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/219475 Change subject: Fix phpcs warnnings .. Fix phpcs warnnings Change-Id: Ifcde58dea9c63e05d8072e9a2635b915ee1f9062 --- M api/ApiContentTranslationConfiguration.php M api/ApiContentTranslationPublish.php M api/ApiQueryContentTranslation.php M includes/Stats.php M includes/Translation.php M includes/Translator.php M modules/stats/ext.cx.stats.js M specials/SpecialContentTranslation.php 8 files changed, 8 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/75/219475/1 diff --git a/api/ApiContentTranslationConfiguration.php b/api/ApiContentTranslationConfiguration.php index 1402978..af82a52 100644 --- a/api/ApiContentTranslationConfiguration.php +++ b/api/ApiContentTranslationConfiguration.php @@ -18,7 +18,7 @@ $params = $this-extractRequestParams(); $source = $params['from']; $target = $params['to']; - if ( !Language::isValidBuiltInCode( $source ) || !Language::isValidBuiltInCode( $target ) ) { + if ( !Language::isValidBuiltInCode( $source ) || !Language::isValidBuiltInCode( $target ) ) { $this-dieUsage( 'Invalid language', 'invalidlanguage' ); } // Read common configuraiton diff --git a/api/ApiContentTranslationPublish.php b/api/ApiContentTranslationPublish.php index 740ddc6..113353c 100755 --- a/api/ApiContentTranslationPublish.php +++ b/api/ApiContentTranslationPublish.php @@ -283,7 +283,7 @@ $cxtranslation = new ContentTranslation\Translation( $translation ); $cxtranslation-save(); $translationId = $cxtranslation-getTranslationId(); - $translator-addTranslation( $translationId ); + $translator-addTranslation( $translationId ); if ( $params['status'] === 'draft' ) { // Save the draft ContentTranslation\Draft::save( $translationId, $params['html'] ); diff --git a/api/ApiQueryContentTranslation.php b/api/ApiQueryContentTranslation.php index 55bb5d0..2b56614 100644 --- a/api/ApiQueryContentTranslation.php +++ b/api/ApiQueryContentTranslation.php @@ -56,7 +56,7 @@ $translation-translation ); } else { - $this-dieUsage( 'Draft does not exist', $params['translationid'] ); + $this-dieUsage( 'Draft does not exist', $params['translationid'] ); } } else { $translator = new ContentTranslation\Translator( $user ); diff --git a/includes/Stats.php b/includes/Stats.php index 3b92812..21c5e82 100644 --- a/includes/Stats.php +++ b/includes/Stats.php @@ -34,7 +34,7 @@ 'ct_params', 'rev_user', ), - array ( + array( 'ct_tag' = 'contenttranslation', 'rev_id = ct_rev_id', 'rev_page = page_id', diff --git a/includes/Translation.php b/includes/Translation.php index ff2486e..0eedb85 100644 --- a/includes/Translation.php +++ b/includes/Translation.php @@ -338,7 +338,7 @@ $conditions['translation_target_language'] = $to; } - $options = array ( 'LIMIT' = $limit ); + $options = array( 'LIMIT' = $limit ); if ( $offset ) { $options['OFFSET'] = $offset; diff --git a/includes/Translator.php b/includes/Translator.php index 4dcdd88..1372625 100644 --- a/includes/Translator.php +++ b/includes/Translator.php @@ -31,7 +31,7 @@ $dbw = Database::getConnection( DB_MASTER ); $dbw-delete( 'cx_translators', - array( 'translator_translation_id' = $translationId ), + array( 'translator_translation_id' = $translationId ), __METHOD__ ); } diff --git a/modules/stats/ext.cx.stats.js b/modules/stats/ext.cx.stats.js index 12d93ed..ea25254 100644 --- a/modules/stats/ext.cx.stats.js +++ b/modules/stats/ext.cx.stats.js @@ -34,7 +34,7 @@ this.$highlights = $( 'div' ).addClass( 'cx-stats-highlights' ); this.$graph = $( 'canvas' ).attr( { id: 'cxtrend', - width: this.$container.width() - 100, // Leave a 100px margin at right + width: this.$container.width() - 200, // Leave a 200px margin buffer to avoid overflow height: 400
[MediaWiki-commits] [Gerrit] Add dir='ltr' for apps and versions - change (mediawiki...OAuth)
jenkins-bot has submitted this change and it was merged. Change subject: Add dir='ltr' for apps and versions .. Add dir='ltr' for apps and versions Change-Id: I675a00d0f2c671e26691306912104645c66f5efa --- M frontend/specialpages/SpecialMWOAuthManageMyGrants.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: CSteipp: Looks good to me, approved jenkins-bot: Verified diff --git a/frontend/specialpages/SpecialMWOAuthManageMyGrants.php b/frontend/specialpages/SpecialMWOAuthManageMyGrants.php index e138547..abc519b 100644 --- a/frontend/specialpages/SpecialMWOAuthManageMyGrants.php +++ b/frontend/specialpages/SpecialMWOAuthManageMyGrants.php @@ -294,7 +294,7 @@ } ) ); $r = 'li class=mw-mwoauthmanagemygrants-list-item'; - $r .= strong{$encName}/strong (strong$reviewLinks/strong); + $r .= strong dir='ltr'{$encName}/strong (strong$reviewLinks/strong); $data = array( 'mwoauthmanagemygrants-user' = $cmr-get( 'userId', 'MediaWiki\Extensions\OAuth\MWOAuthUtils::getCentralUserNameFromId' ), -- To view, visit https://gerrit.wikimedia.org/r/219376 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I675a00d0f2c671e26691306912104645c66f5efa Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/OAuth Gerrit-Branch: master Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il Gerrit-Reviewer: Aaron Schulz asch...@wikimedia.org Gerrit-Reviewer: CSteipp cste...@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 ignore DoNotArchiveUntil timestamps - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: Don't ignore DoNotArchiveUntil timestamps .. Don't ignore DoNotArchiveUntil timestamps Don't ignore timestamps written in HTML comments, e.g. as used by DoNotArchiveUntil. See: - https://commons.wikimedia.org/wiki/Template:DNAU - https://en.wikipedia.org/wiki/Template:Do_not_archive_until Analyze comments separately from rest of each line to avoid to skip dates in comments, as the date matched by timestripper is the rightmost one. Bug: T102423 Change-Id: I079d9f6b636ac0a145dd04a3190a65c61b9d1b31 --- M pywikibot/textlib.py M tests/timestripper_tests.py 2 files changed, 72 insertions(+), 3 deletions(-) Approvals: John Vandenberg: Looks good to me, approved jenkins-bot: Verified diff --git a/pywikibot/textlib.py b/pywikibot/textlib.py index 2fae512..de627c2 100644 --- a/pywikibot/textlib.py +++ b/pywikibot/textlib.py @@ -1609,6 +1609,10 @@ ] self.linkP = compileLinkR() +self.comment_pattern = re.compile(r'!--(.*?)--') + +self.tzinfo = tzoneFixedOffset(self.site.siteinfo['timeoffset'], + self.site.siteinfo['timezone']) def findmarker(self, text, base=u'@@', delta='@'): Find a string which is not part of text. @@ -1661,6 +1665,17 @@ # match date fields dateDict = dict() +# Analyze comments separately from rest of each line to avoid to skip +# dates in comments, as the date matched by timestripper is the +# rightmost one. +most_recent = [] +for comment in self.comment_pattern.finditer(line): +# Recursion levels can be maximum two. If a comment is found, it will +# not for sure be found in the next level. +# Nested cmments are excluded by design. +timestamp = self.timestripper(comment.group(1)) +most_recent.append(timestamp) + # Remove parts that are not supposed to contain the timestamp, in order # to reduce false positives. line = removeDisabledParts(line) @@ -1696,12 +1711,17 @@ % (v, k)) # find timezone -dateDict['tzinfo'] = tzoneFixedOffset(self.site.siteinfo['timeoffset'], - self.site.siteinfo['timezone']) +dateDict['tzinfo'] = self.tzinfo timestamp = datetime.datetime(**dateDict) - else: timestamp = None +most_recent.append(timestamp) + +try: +timestamp = max(ts for ts in most_recent if ts is not None) +except ValueError: +timestamp = None + return timestamp diff --git a/tests/timestripper_tests.py b/tests/timestripper_tests.py index 80d70e0..a3f7e77 100644 --- a/tests/timestripper_tests.py +++ b/tests/timestripper_tests.py @@ -231,6 +231,55 @@ self.assertEqual(self.ts.timestripper(txtNoMatch), None) +class TestTimeStripperDoNotArchiveUntil(TestCase): + +Test cases for Do Not Archive Until templates. + +See https://commons.wikimedia.org/wiki/Template:DNAU and +https://en.wikipedia.org/wiki/Template:Do_not_archive_until. + + +family = 'wikisource' +code = 'en' + +cached = True + +username = '[[User:DoNotArchiveUntil]]' +date = '06:57 06 June 2015 (UTC)' +user_and_date = username + ' ' + date +tzone = tzoneFixedOffset(0, 'UTC') + +def test_timestripper_match(self): +Test that dates in comments are correctly recognised. +ts = TimeStripper(self.get_site()) + +txt_match = '!-- [[User:Do___ArchiveUntil]] ' + self.date + ' --' +res = datetime.datetime(2015, 6, 6, 6, 57, tzinfo=self.tzone) +self.assertEqual(ts.timestripper(txt_match), res) + +txt_match = '!-- -- !-- ' + self.user_and_date + ' !-- --' +res = datetime.datetime(2015, 6, 6, 6, 57, tzinfo=self.tzone) +self.assertEqual(ts.timestripper(txt_match), res) + +txt_match = '!-- ' + self.user_and_date + ' --' +res = datetime.datetime(2015, 6, 6, 6, 57, tzinfo=self.tzone) +self.assertEqual(ts.timestripper(txt_match), res) + +def test_timestripper_match_only(self): +Test that latest date is used instead of other dates. +ts = TimeStripper(self.get_site()) + +later_date = '10:57 06 June 2015 (UTC)' +txt_match = '!-- -- ' + self.user_and_date + ' !-- --' + later_date +res = datetime.datetime(2015, 6, 6, 10, 57, tzinfo=self.tzone) +self.assertEqual(ts.timestripper(txt_match), res) + +earlier_date = '02:57 06 June 2015 (UTC)' +txt_match = '!-- ' + self.user_and_date + ' -- ' + earlier_date +res = datetime.datetime(2015, 6, 6, 6, 57, tzinfo=self.tzone) +self.assertEqual(ts.timestripper(txt_match), res) + + if __name__ ==
[MediaWiki-commits] [Gerrit] build: Updating development dependencies - change (mediawiki...WikidataPageBanner)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/219461 Change subject: build: Updating development dependencies .. build: Updating development dependencies * jakub-onderka/php-parallel-lint: 0.8.* → 0.9 * mediawiki/mediawiki-codesniffer: 0.2.0 → 0.3.0 Change-Id: I27ef5a13674d6aa453b2088abb5757ee4c103a6d --- M composer.json 1 file changed, 6 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikidataPageBanner refs/changes/61/219461/1 diff --git a/composer.json b/composer.json index 1066d14..7dd4cd9 100644 --- a/composer.json +++ b/composer.json @@ -1,12 +1,15 @@ { name: mediawiki/wikidata-page-banner, description: MediaWiki WikidataPageBanner extension, - keywords: [mediawiki,WikidataPageBanner], + keywords: [ + mediawiki, + WikidataPageBanner + ], type: mediawiki-extension, license: GPL-2.0, require-dev: { - jakub-onderka/php-parallel-lint: 0.8.*, - mediawiki/mediawiki-codesniffer: 0.2.0 + jakub-onderka/php-parallel-lint: 0.9, + mediawiki/mediawiki-codesniffer: 0.3.0 }, scripts: { test: [ -- To view, visit https://gerrit.wikimedia.org/r/219461 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I27ef5a13674d6aa453b2088abb5757ee4c103a6d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikidataPageBanner 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] Revert analytics_kafka: switch to ganglia_new - change (operations/puppet)
Dzahn has uploaded a new change for review. https://gerrit.wikimedia.org/r/219464 Change subject: Revert analytics_kafka: switch to ganglia_new .. Revert analytics_kafka: switch to ganglia_new This reverts commit 1a73479560ee19a4ef27ef8fe3bbf3120e54c5a2. Change-Id: I653660d05ccbcd2740c9b8a9a2a1dbb709395e93 --- M hieradata/common.yaml M hieradata/regex.yaml M manifests/site.pp 3 files changed, 12 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/64/219464/1 diff --git a/hieradata/common.yaml b/hieradata/common.yaml index 540b921..dba40ce 100644 --- a/hieradata/common.yaml +++ b/hieradata/common.yaml @@ -206,7 +206,10 @@ name: Analytics Kafka cluster id: 45 sites: - eqiad: [] + eqiad: +- analytics1012.eqiad.wmnet +- analytics1018.eqiad.wmnet +- analytics1022.eqiad.wmnet sca: name: Service Cluster A id: 46 diff --git a/hieradata/regex.yaml b/hieradata/regex.yaml index 1d61c3c..552675a 100644 --- a/hieradata/regex.yaml +++ b/hieradata/regex.yaml @@ -1,7 +1,3 @@ -analytics_kafka: - __regex: !ruby/regexp /^analytics10(12|18|21|22)\.eqiad\.wmnet$/ - ganglia_class: new - api_appserver: __regex: !ruby/regexp /^mw(111[4-9]|11[2-3][0-9]|114[0-8]|1189|119[0-9]|120[0-8]|122[1-9]|123[0-5])\.eqiad\.wmnet$/ ganglia_class: new diff --git a/manifests/site.pp b/manifests/site.pp index f06ca25..7c93ade 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -127,6 +127,14 @@ # analytics1012, analytics1018, analytics1021 and analytics1022 are Kafka Brokers. node /analytics10(12|18|21|22)\.eqiad\.wmnet/ { +# one ganglia aggregator per ganglia 'cluster' per row. +if ($::hostname == 'analytics1012' or # Row A +$::hostname == 'analytics1018' or # Row D +$::hostname == 'analytics1022')# Row C +{ +$ganglia_aggregator = true +} + # Kafka brokers are routed via IPv6 so that # other DCs can address without public IPv4 # addresses. -- To view, visit https://gerrit.wikimedia.org/r/219464 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I653660d05ccbcd2740c9b8a9a2a1dbb709395e93 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn dz...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] build: Updating development dependencies - change (oojs/ui)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/219469 Change subject: build: Updating development dependencies .. build: Updating development dependencies * jakub-onderka/php-parallel-lint: 0.8.* → 0.9 * mediawiki/mediawiki-codesniffer: 0.2.0 → 0.3.0 Change-Id: I640eaedfbaf92acb9926a7138b9847cf6b3133f2 --- M composer.json 1 file changed, 5 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/69/219469/1 diff --git a/composer.json b/composer.json index 840d9eb..47a601a 100644 --- a/composer.json +++ b/composer.json @@ -7,12 +7,14 @@ php: =5.3.3 }, require-dev: { - jakub-onderka/php-parallel-lint: 0.8.*, - mediawiki/mediawiki-codesniffer: 0.2.0, + jakub-onderka/php-parallel-lint: 0.9, + mediawiki/mediawiki-codesniffer: 0.3.0, phpunit/phpunit: ~4.5 }, autoload: { - classmap: [php/] + classmap: [ + php/ + ] }, scripts: { test: [ @@ -22,4 +24,3 @@ ] } } - -- To view, visit https://gerrit.wikimedia.org/r/219469 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I640eaedfbaf92acb9926a7138b9847cf6b3133f2 Gerrit-PatchSet: 1 Gerrit-Project: oojs/ui 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] Redesign, switch from bootstrap to material design - change (labs...crosswatch)
Sitic has submitted this change and it was merged. Change subject: Redesign, switch from bootstrap to material design .. Redesign, switch from bootstrap to material design Started as an experiment, looks much better. Refactored frontend code. Has preformance issues on IE (barely usable). Bug: T100341 Change-Id: I3fa2dba3aac6da73e2f6e8fc03169d4f1e71feeb --- M backend/server/__init__.py M frontend/bower.json M frontend/gulp/build.js A frontend/src/app/filters.js M frontend/src/app/index.css M frontend/src/app/index.js M frontend/src/app/main/main.controller.js M frontend/src/app/main/main.html A frontend/src/app/runBlock.js A frontend/src/app/services.js A frontend/src/app/welcome/welcome.html M frontend/src/assets/images/flags/readme.txt A frontend/src/components/footer/footer.html M frontend/src/components/navbar/navbar.controller.js M frontend/src/components/navbar/navbar.html A frontend/src/components/settings/settings.controller.js A frontend/src/components/settings/settings.html M frontend/src/components/watchlist/entry.directive.js M frontend/src/components/watchlist/watchlist.controller.js M frontend/src/components/watchlist/watchlist.html M frontend/src/i18n/locale-de.json M frontend/src/i18n/locale-en.json M frontend/src/i18n/locale-pt.json M frontend/src/index.html 24 files changed, 687 insertions(+), 731 deletions(-) Approvals: Sitic: Verified; Looks good to me, approved diff --git a/backend/server/__init__.py b/backend/server/__init__.py index c3fe141..00edefc 100644 --- a/backend/server/__init__.py +++ b/backend/server/__init__.py @@ -85,7 +85,7 @@ index_path = os.path.join(pwd_path, 'public/' + toolname + '/index.html') static_handlers = [ (r/(), StaticFileHandler, {path: index_path}), -(r/ + toolname + r/(), StaticFileHandler, {path: index_path}), +(r/ + toolname + r/\w*(), StaticFileHandler, {path: index_path}), (r/ + toolname, RedirectHandler, {url: / + toolname + /}), (r/(.*), StaticFileHandler, {path: static_path}) ] diff --git a/frontend/bower.json b/frontend/bower.json index fd3f0b0..dd3f642 100644 --- a/frontend/bower.json +++ b/frontend/bower.json @@ -7,16 +7,15 @@ angular-route: ~1.4.0, angular-sanitize: ~1.4.0, angular-sockjs: 0.0.x, -angular-strap: ~2.2.4, angular-translate: ~2.7.0, angular-translate-loader-static-files: ~2.7.0, angular-translate-storage: ~0.0.3, -fontawesome: ~4.3.0, sockjs-client: ~1.0.0, angular-moment: 0.x.x, angular-local-storage: 0.2.x, -bootstrap: ~3.3.4, -angular-motion: ~0.4.2 +angular-motion: ~0.4.2, +angular-material: ~0.10.0, +material-design-icons: ~2.0.0 }, devDependencies: { angular-mocks: ~1.4.0 @@ -27,6 +26,9 @@ overrides: { moment: { main: min/moment-with-locales.min.js +}, +material-design-icons: { + main: ./iconfont/* } } } diff --git a/frontend/gulp/build.js b/frontend/gulp/build.js index 1e43438..3013bbe 100644 --- a/frontend/gulp/build.js +++ b/frontend/gulp/build.js @@ -84,7 +84,7 @@ gulp.task('fonts', function () { return gulp.src($.mainBowerFiles()) -.pipe($.filter('**/*.{eot,svg,ttf,woff}')) +.pipe($.filter('**/*.{eot,svg,ttf,woff,woff2}')) .pipe($.flatten()) .pipe(gulp.dest(paths.dist + '/fonts/')); }); diff --git a/frontend/src/app/filters.js b/frontend/src/app/filters.js new file mode 100644 index 000..b057e63 --- /dev/null +++ b/frontend/src/app/filters.js @@ -0,0 +1,66 @@ +'use strict'; +angular + .module('crosswatch') + .filter('urlEncode', urlEncodeFilter) + .filter('list', listFilter) + .filter('projects', projectsFilter) + .filter('editflags', editflagsFilter) +; + +/** + * Filter for encoding strings for use in URL query strings + */ +function urlEncodeFilter () { + return window.encodeURIComponent; +} + +/** + * Formats lists: + * [a, b, c] - (a, b, c) + * [] - (–) + */ +function listFilter () { + return function (list) { +list = list || []; +var result = list.join(', '); +if (result.length === 0) { + result = –; +} +result = ( + result + ); + +return result; + } +} + +/** + * Filters watchlist based on selected / blacklisted wikis + */ +function projectsFilter () { + return function (items, projects) { +return items.filter(filter, projects) + }; + + function filter (item) { +return (this.indexOf(item.project) -1); + } +} + +/** + * Filters watchlist based on editflags (minor, bot, registered) + */ +function editflagsFilter () { + return function (items, flags) { +return items.filter(filter, flags) + }; + + function filter (item) { +if (item.type === 'log') { + return true; +} +var minor = this.minor || !item.minor; +var bot = this.bot || !item.bot; +var anon = this.anon || !(item.anon === ); +var registered = this.registered || !(item.userid !== 0);
[MediaWiki-commits] [Gerrit] JS performance optimization - change (labs...crosswatch)
Sitic has submitted this change and it was merged. Change subject: JS performance optimization .. JS performance optimization * give watchlist events a unique id to track them by (reusable DOM nodes) * sort watchlist events when adding instead of a filter * combined watchlist filters * filtering is now done in JS not not the HTML * using ngInfiniteScroll to display only a limited list of entries first * debouncing when necessary * various small fixes Bug: T102569 Change-Id: Ib822ae65aecaf0c1f8fb15a33d338d6f56dad0f2 --- M backend/celery/tasks.py M frontend/bower.json M frontend/src/app/filters.js M frontend/src/app/index.css M frontend/src/app/index.js M frontend/src/app/main/main.controller.js M frontend/src/app/services.js M frontend/src/components/settings/settings.controller.js M frontend/src/components/watchlist/edit.directive.html M frontend/src/components/watchlist/entry.directive.html M frontend/src/components/watchlist/entry.directive.js M frontend/src/components/watchlist/logevent.directive.html M frontend/src/components/watchlist/watchlist.controller.js M frontend/src/components/watchlist/watchlist.html M frontend/src/i18n/locale-en.json 15 files changed, 213 insertions(+), 79 deletions(-) Approvals: Sitic: Verified; Looks good to me, approved diff --git a/backend/celery/tasks.py b/backend/celery/tasks.py index 408ee0a..86e5a7a 100644 --- a/backend/celery/tasks.py +++ b/backend/celery/tasks.py @@ -4,6 +4,7 @@ # Copyright (C) 2015 Jan Lebert from __future__ import absolute_import +from uuid import uuid4 from contextlib import closing import MySQLdb @@ -143,6 +144,9 @@ item['minor'] = m if 'new' in item: item['new'] = n + +# random id +item['id'] = uuid4().hex[:8] items.append(item) message = { 'msgtype': 'watchlist', diff --git a/frontend/bower.json b/frontend/bower.json index dd3f642..a0e0f36 100644 --- a/frontend/bower.json +++ b/frontend/bower.json @@ -15,7 +15,8 @@ angular-local-storage: 0.2.x, angular-motion: ~0.4.2, angular-material: ~0.10.0, -material-design-icons: ~2.0.0 +material-design-icons: ~2.0.0, +ngInfiniteScroll: ~1.2.1 }, devDependencies: { angular-mocks: ~1.4.0 diff --git a/frontend/src/app/filters.js b/frontend/src/app/filters.js index b057e63..9209e64 100644 --- a/frontend/src/app/filters.js +++ b/frontend/src/app/filters.js @@ -3,6 +3,7 @@ .module('crosswatch') .filter('urlEncode', urlEncodeFilter) .filter('list', listFilter) + .filter('watchlist', watchlistFilter) .filter('projects', projectsFilter) .filter('editflags', editflagsFilter) ; @@ -33,6 +34,45 @@ } /** + * combined filter for watchlist + */ +function watchlistFilter () { + return function (items, config) { +return items.filter(filter, config); + }; + + function filter (item) { +var bool = projectsFilter(item, this.projectsSelected); + +if (bool) { + bool = editsflagsFilter(item, this.editflags); +} +return bool; + } + + /** + * Filters watchlist based on selected / blacklisted wikis + */ + function projectsFilter (item, projects) { +return (projects.indexOf(item.project) -1); + } + + /** + * Filters watchlist based on editflags (minor, bot, registered) + */ + function editsflagsFilter (item, flags) { +if (item.type === 'log') { + return true; +} +var minor = flags.minor || !item.minor; +var bot = flags.bot || !item.bot; +var anon = flags.anon || !(item.anon === ); +var registered = flags.registered || !(item.userid !== 0); +return (minor bot anon registered); + } +} + +/** * Filters watchlist based on selected / blacklisted wikis */ function projectsFilter () { diff --git a/frontend/src/app/index.css b/frontend/src/app/index.css index e39a44b..9a44614 100644 --- a/frontend/src/app/index.css +++ b/frontend/src/app/index.css @@ -210,7 +210,8 @@ } /* https://github.com/angular/material/issues/2769 */ -_:-ms-fullscreen, :root /* IE11 */ md-select-label *:first-child{ +_:-ms-fullscreen, :root /* IE11+ */ md-select-label :first-child{ flex-basis: auto; - overflow: visible; + max-width: 100%; + overflow: hidden; } diff --git a/frontend/src/app/index.js b/frontend/src/app/index.js index bc1a3e1..7fd5700 100644 --- a/frontend/src/app/index.js +++ b/frontend/src/app/index.js @@ -6,10 +6,11 @@ 'ngRoute', 'ngMaterial', 'LocalStorageModule', -'angular-translate-storage', 'pascalprecht.translate', +'angular-translate-storage', 'bd.sockjs', -'angularMoment' +'angularMoment', +'infinite-scroll' ]) .config(routeConfig) .config(locationConfig) diff --git a/frontend/src/app/main/main.controller.js b/frontend/src/app/main/main.controller.js index 09f4719..15e465d 100644 --- a/frontend/src/app/main/main.controller.js +++
[MediaWiki-commits] [Gerrit] JS performance optimization - change (labs...crosswatch)
Sitic has uploaded a new change for review. https://gerrit.wikimedia.org/r/219477 Change subject: JS performance optimization .. JS performance optimization * give watchlist events a unique id to track them by (reusable DOM nodes) * sort watchlist events when adding instead of a filter * combined watchlist filters * filtering is now done in JS not not the HTML * using ngInfiniteScroll to display only a limited list of entries first * debouncing when necessary * various small fixes Bug: T102569 Change-Id: Ib822ae65aecaf0c1f8fb15a33d338d6f56dad0f2 --- M backend/celery/tasks.py M frontend/bower.json M frontend/src/app/filters.js M frontend/src/app/index.css M frontend/src/app/index.js M frontend/src/app/main/main.controller.js M frontend/src/app/services.js M frontend/src/components/settings/settings.controller.js M frontend/src/components/watchlist/edit.directive.html M frontend/src/components/watchlist/entry.directive.html M frontend/src/components/watchlist/entry.directive.js M frontend/src/components/watchlist/logevent.directive.html M frontend/src/components/watchlist/watchlist.controller.js M frontend/src/components/watchlist/watchlist.html M frontend/src/i18n/locale-en.json 15 files changed, 213 insertions(+), 79 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/labs/tools/crosswatch refs/changes/77/219477/1 diff --git a/backend/celery/tasks.py b/backend/celery/tasks.py index 408ee0a..86e5a7a 100644 --- a/backend/celery/tasks.py +++ b/backend/celery/tasks.py @@ -4,6 +4,7 @@ # Copyright (C) 2015 Jan Lebert from __future__ import absolute_import +from uuid import uuid4 from contextlib import closing import MySQLdb @@ -143,6 +144,9 @@ item['minor'] = m if 'new' in item: item['new'] = n + +# random id +item['id'] = uuid4().hex[:8] items.append(item) message = { 'msgtype': 'watchlist', diff --git a/frontend/bower.json b/frontend/bower.json index dd3f642..a0e0f36 100644 --- a/frontend/bower.json +++ b/frontend/bower.json @@ -15,7 +15,8 @@ angular-local-storage: 0.2.x, angular-motion: ~0.4.2, angular-material: ~0.10.0, -material-design-icons: ~2.0.0 +material-design-icons: ~2.0.0, +ngInfiniteScroll: ~1.2.1 }, devDependencies: { angular-mocks: ~1.4.0 diff --git a/frontend/src/app/filters.js b/frontend/src/app/filters.js index b057e63..9209e64 100644 --- a/frontend/src/app/filters.js +++ b/frontend/src/app/filters.js @@ -3,6 +3,7 @@ .module('crosswatch') .filter('urlEncode', urlEncodeFilter) .filter('list', listFilter) + .filter('watchlist', watchlistFilter) .filter('projects', projectsFilter) .filter('editflags', editflagsFilter) ; @@ -33,6 +34,45 @@ } /** + * combined filter for watchlist + */ +function watchlistFilter () { + return function (items, config) { +return items.filter(filter, config); + }; + + function filter (item) { +var bool = projectsFilter(item, this.projectsSelected); + +if (bool) { + bool = editsflagsFilter(item, this.editflags); +} +return bool; + } + + /** + * Filters watchlist based on selected / blacklisted wikis + */ + function projectsFilter (item, projects) { +return (projects.indexOf(item.project) -1); + } + + /** + * Filters watchlist based on editflags (minor, bot, registered) + */ + function editsflagsFilter (item, flags) { +if (item.type === 'log') { + return true; +} +var minor = flags.minor || !item.minor; +var bot = flags.bot || !item.bot; +var anon = flags.anon || !(item.anon === ); +var registered = flags.registered || !(item.userid !== 0); +return (minor bot anon registered); + } +} + +/** * Filters watchlist based on selected / blacklisted wikis */ function projectsFilter () { diff --git a/frontend/src/app/index.css b/frontend/src/app/index.css index e39a44b..9a44614 100644 --- a/frontend/src/app/index.css +++ b/frontend/src/app/index.css @@ -210,7 +210,8 @@ } /* https://github.com/angular/material/issues/2769 */ -_:-ms-fullscreen, :root /* IE11 */ md-select-label *:first-child{ +_:-ms-fullscreen, :root /* IE11+ */ md-select-label :first-child{ flex-basis: auto; - overflow: visible; + max-width: 100%; + overflow: hidden; } diff --git a/frontend/src/app/index.js b/frontend/src/app/index.js index bc1a3e1..7fd5700 100644 --- a/frontend/src/app/index.js +++ b/frontend/src/app/index.js @@ -6,10 +6,11 @@ 'ngRoute', 'ngMaterial', 'LocalStorageModule', -'angular-translate-storage', 'pascalprecht.translate', +'angular-translate-storage', 'bd.sockjs', -'angularMoment' +'angularMoment', +'infinite-scroll' ]) .config(routeConfig) .config(locationConfig) diff --git a/frontend/src/app/main/main.controller.js b/frontend/src/app/main/main.controller.js index 09f4719..15e465d
[MediaWiki-commits] [Gerrit] build: Updating development dependencies - change (at-ease)
jenkins-bot has submitted this change and it was merged. Change subject: build: Updating development dependencies .. build: Updating development dependencies * jakub-onderka/php-parallel-lint: 0.8.* → 0.9 * mediawiki/mediawiki-codesniffer: 0.1.0 → 0.3.0 Change-Id: I2acf58e71c9f9020a110052fa3778b9c885b5f8e --- M composer.json 1 file changed, 5 insertions(+), 3 deletions(-) Approvals: Jforrester: Looks good to me, approved jenkins-bot: Verified diff --git a/composer.json b/composer.json index f5fcaf4..404a559 100644 --- a/composer.json +++ b/composer.json @@ -14,15 +14,17 @@ } ], autoload: { - files: [src/Functions.php] + files: [ + src/Functions.php + ] }, require: { php: =5.3.3 }, require-dev: { - jakub-onderka/php-parallel-lint: 0.8.*, + jakub-onderka/php-parallel-lint: 0.9, squizlabs/php_codesniffer: 2.3.0, - mediawiki/mediawiki-codesniffer: 0.1.0, + mediawiki/mediawiki-codesniffer: 0.3.0, phpunit/phpunit: ~4.5 }, scripts: { -- To view, visit https://gerrit.wikimedia.org/r/219467 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2acf58e71c9f9020a110052fa3778b9c885b5f8e Gerrit-PatchSet: 1 Gerrit-Project: at-ease Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: Jforrester jforres...@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] QA: Fix failing smoke test for watchlist feature - change (mediawiki...MobileFrontend)
jenkins-bot has submitted this change and it was merged. Change subject: QA: Fix failing smoke test for watchlist feature .. QA: Fix failing smoke test for watchlist feature Broken by I6d6191c33b4c09dc8b991fe7c15f4c15bec7de1e Change-Id: I86565a49aa663ba100790e339b048e8337da5cb2 --- M tests/browser/features/support/pages/watchlist_page.rb 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Dduvall: Looks good to me, approved BarryTheBrowserTestBot: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/tests/browser/features/support/pages/watchlist_page.rb b/tests/browser/features/support/pages/watchlist_page.rb index 4163bf4..2b3f418 100644 --- a/tests/browser/features/support/pages/watchlist_page.rb +++ b/tests/browser/features/support/pages/watchlist_page.rb @@ -1,7 +1,7 @@ class WatchlistPage ArticlePage a(:feed_link, text: 'Modified') a(:list_link, text: 'List') - ul(:page_list_diffs, class: 'page-list side-list') - ul(:page_list_a_to_z, class: 'watchlist page-list thumbs') + ul(:page_list_diffs, css: '.diff-summary-list') + ul(:page_list_a_to_z, css: '.page-summary-list') a(:pages_tab_link, text: 'Pages') end -- To view, visit https://gerrit.wikimedia.org/r/219501 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I86565a49aa663ba100790e339b048e8337da5cb2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Jdlrobson jrob...@wikimedia.org Gerrit-Reviewer: BarryTheBrowserTestBot jdlrobson+ba...@gmail.com Gerrit-Reviewer: Cmcmahon cmcma...@wikimedia.org Gerrit-Reviewer: Dduvall dduv...@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] build: Updating development dependencies - change (cdb)
jenkins-bot has submitted this change and it was merged. Change subject: build: Updating development dependencies .. build: Updating development dependencies * jakub-onderka/php-parallel-lint: 0.8.* → 0.9 * mediawiki/mediawiki-codesniffer: 0.2.0 → 0.3.0 Change-Id: I0cb7e0a5c92b4a71f6dbdf3d6dd796bef2065cd5 --- M composer.json M test/CdbTest.php 2 files changed, 48 insertions(+), 46 deletions(-) Approvals: Paladox: Looks good to me, but someone else must approve Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/composer.json b/composer.json index 366ac9f..5e4cba9 100644 --- a/composer.json +++ b/composer.json @@ -1,34 +1,36 @@ { -name: wikimedia/cdb, -description: Constant Database (CDB) wrapper library for PHP. Provides pure-PHP fallback when dba_* functions are absent., -license: GPL-2.0, -homepage: https://www.mediawiki.org/wiki/CDB;, -authors: [ -{ -name: Tim Starling, -email: tstarl...@wikimedia.org -}, -{ -name: Chad Horohoe, -email: c...@wikimedia.org -} -], -autoload: { -classmap: [src/] -}, -require: { -php: =5.3.2 -}, -require-dev: { -jakub-onderka/php-parallel-lint: 0.8.*, -phpunit/phpunit: 4.6.*, -mediawiki/mediawiki-codesniffer: 0.2.0 -}, -scripts: { -test: [ -parallel-lint . --exclude vendor, -phpunit $PHPUNIT_ARGS, -phpcs -p -] -} + name: wikimedia/cdb, + description: Constant Database (CDB) wrapper library for PHP. Provides pure-PHP fallback when dba_* functions are absent., + license: GPL-2.0, + homepage: https://www.mediawiki.org/wiki/CDB;, + authors: [ + { + name: Tim Starling, + email: tstarl...@wikimedia.org + }, + { + name: Chad Horohoe, + email: c...@wikimedia.org + } + ], + autoload: { + classmap: [ + src/ + ] + }, + require: { + php: =5.3.2 + }, + require-dev: { + jakub-onderka/php-parallel-lint: 0.9, + phpunit/phpunit: 4.6.*, + mediawiki/mediawiki-codesniffer: 0.3.0 + }, + scripts: { + test: [ + parallel-lint . --exclude vendor, + phpunit $PHPUNIT_ARGS, + phpcs -p + ] + } } diff --git a/test/CdbTest.php b/test/CdbTest.php index 9da748a..ea89aa1 100644 --- a/test/CdbTest.php +++ b/test/CdbTest.php @@ -29,8 +29,8 @@ protected function tearDown() { parent::tearDown(); - unlink($this-phpCdbFile); - unlink($this-dbaCdbFile); + unlink( $this-phpCdbFile ); + unlink( $this-dbaCdbFile ); } /** @@ -63,7 +63,7 @@ } } - unset($data['']); + unset( $data[''] ); $w1-close(); $w2-close(); @@ -99,23 +99,23 @@ $r1 = new Reader\PHP( $this-phpCdbFile ); $r2 = new Reader\DBA( $this-dbaCdbFile ); - $keys = array_keys($data); - $firstKey = array_shift($keys); + $keys = array_keys( $data ); + $firstKey = array_shift( $keys ); - $this-assertTrue($r1-exists($firstKey), 'PHP entry exists'); - $this-assertTrue($r2-exists($firstKey), 'DBA entry exists'); - $this-assertFalse($r1-exists(-1), 'PHP entry doesn\'t exists'); - $this-assertFalse($r2-exists(-1), 'DBA entry doesn\'t exists'); + $this-assertTrue( $r1-exists( $firstKey ), 'PHP entry exists' ); + $this-assertTrue( $r2-exists( $firstKey ), 'DBA entry exists' ); + $this-assertFalse( $r1-exists( -1 ), 'PHP entry doesn\'t exists' ); + $this-assertFalse( $r2-exists( -1 ), 'DBA entry doesn\'t exists' ); $firstKey1 = $r1-firstkey(); $firstKey2 = $r2-firstkey(); - $this-assertEquals($firstKey1, $firstKey, 'PHP Match first key'); - $this-assertEquals($firstKey2, $firstKey, 'DBA Match first key'); + $this-assertEquals( $firstKey1, $firstKey, 'PHP Match first key' ); + $this-assertEquals( $firstKey2, $firstKey, 'DBA Match first key' ); - unset($data[$firstKey]); - for ($j = 0, $max = count($data); $j $max; $j++) { - $this-assertEquals($r2-nextkey(), $r1-nextkey(), 'nextkey match'); + unset( $data[$firstKey] ); + for ( $j = 0, $max =
[MediaWiki-commits] [Gerrit] Create mwext-MobileFrontend-publish - change (integration/config)
Krinkle has uploaded a new change for review. https://gerrit.wikimedia.org/r/219449 Change subject: Create mwext-MobileFrontend-publish .. Create mwext-MobileFrontend-publish Bug: T74794 Change-Id: Ia758fdebffd739474d0e9492393e2f3611b138e7 --- M jjb/mediawiki-extensions.yaml M zuul/layout.yaml 2 files changed, 24 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/49/219449/1 diff --git a/jjb/mediawiki-extensions.yaml b/jjb/mediawiki-extensions.yaml index 75c9ad2..4f4b5eb 100644 --- a/jjb/mediawiki-extensions.yaml +++ b/jjb/mediawiki-extensions.yaml @@ -334,6 +334,22 @@ publishers: - global-teardown +- job: +name: 'mwext-MobileFrontend-publish' +node: contintLabsSlave UbuntuTrusty +defaults: use-remoteonly-zuul +concurrent: false +triggers: + - zuul +builders: + - npm-install + - npm-run-doc + - doc-publish: +docsrc: 'docs' +docdest: 'MobileFrontend/$ZUUL_BRANCH' +publishers: + - global-teardown + - job-template: name: 'mwext-VisualEditor-sync-gerrit' # bug 49846 node: gallium # needs 'jenkins' user which has the 'jenkins-bot' SSH credentials @@ -639,9 +655,9 @@ - '{name}-{ext-name}-npm': ext-name: VisualEditor - - 'mwext-GuidedTour-jsduck-publish': - - - 'mwext-MultimediaViewer-jsduck-publish': + - 'mwext-MobileFrontend-publish' + - 'mwext-GuidedTour-jsduck-publish' + - 'mwext-MultimediaViewer-jsduck-publish' - 'mwext-TemplateData-jsduck-publish': ext-name: TemplateData diff --git a/zuul/layout.yaml b/zuul/layout.yaml index 6399036..5ab0f2e 100644 --- a/zuul/layout.yaml +++ b/zuul/layout.yaml @@ -1675,17 +1675,17 @@ - name: 'mwext-CirrusSearch-whitespaces' branch: ^master$ + - name: 'mwext-MobileFrontend-publish' +branch: ^master$ - name: 'mwext-GuidedTour-jsduck-publish' branch: ^master$ - - name: 'mwext-MultimediaViewer-jsduck-publish' branch: ^master$ - - name: 'mwext-TemplateData-jsduck-publish' branch: ^master$ - - name: 'mwext-VisualEditor-publish' branch: ^master$ + - name: 'mwext-VisualEditor-sync-gerrit' branch: ^master$ @@ -4052,6 +4052,8 @@ - mediawiki-gate #- mwext-MobileFrontend-testextension-hhvm - mwext-MobileFrontend-testextension-zend +postmerge: + - mwext-MobileFrontend-publish experimental: - mwext-MobileFrontend-testextension-hhvm -- To view, visit https://gerrit.wikimedia.org/r/219449 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia758fdebffd739474d0e9492393e2f3611b138e7 Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Krinkle krinklem...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] build: Updating development dependencies - change (mediawiki...VisualEditor)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/219458 Change subject: build: Updating development dependencies .. build: Updating development dependencies * jakub-onderka/php-parallel-lint: 0.8.0 → 0.9 * mediawiki/mediawiki-codesniffer: 0.2.0 → 0.3.0 Change-Id: Ic4a5fd50cd1403da11c6b0be75eaa290524d8b0a --- M composer.json 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/58/219458/1 diff --git a/composer.json b/composer.json index a95bae6..263ca10 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { require-dev: { - jakub-onderka/php-parallel-lint: 0.8.0, - mediawiki/mediawiki-codesniffer: 0.2.0 + jakub-onderka/php-parallel-lint: 0.9, + mediawiki/mediawiki-codesniffer: 0.3.0 }, scripts: { test: [ -- To view, visit https://gerrit.wikimedia.org/r/219458 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic4a5fd50cd1403da11c6b0be75eaa290524d8b0a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor 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] build: Updating development dependencies - change (mediawiki...Gather)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/219459 Change subject: build: Updating development dependencies .. build: Updating development dependencies * jakub-onderka/php-parallel-lint: 0.8.* → 0.9 * mediawiki/mediawiki-codesniffer: 0.2.0 → 0.3.0 Change-Id: I846ac9e8d7705b6d04a169c27eb8af09b1bb7ce8 --- M composer.json 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gather refs/changes/59/219459/1 diff --git a/composer.json b/composer.json index c944dba..263ca10 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { require-dev: { - jakub-onderka/php-parallel-lint: 0.8.*, - mediawiki/mediawiki-codesniffer: 0.2.0 + jakub-onderka/php-parallel-lint: 0.9, + mediawiki/mediawiki-codesniffer: 0.3.0 }, scripts: { test: [ -- To view, visit https://gerrit.wikimedia.org/r/219459 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I846ac9e8d7705b6d04a169c27eb8af09b1bb7ce8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Gather 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] WIP Migration for Restrictions options - change (wikimedia...crm)
Awight has uploaded a new change for review. https://gerrit.wikimedia.org/r/219480 Change subject: WIP Migration for Restrictions options .. WIP Migration for Restrictions options Change-Id: Ibd0c656be82ce90eb21b8b9e83d4efc3ba550da4 --- M sites/all/modules/wmf_civicrm/wmf_civicrm.install 1 file changed, 93 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/80/219480/1 diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.install b/sites/all/modules/wmf_civicrm/wmf_civicrm.install index 29687f9..e804743 100644 --- a/sites/all/modules/wmf_civicrm/wmf_civicrm.install +++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.install @@ -33,6 +33,9 @@ wmf_civicrm_update_7026(); wmf_civicrm_update_7027(); wmf_civicrm_update_7028(); +wmf_civicrm_update_7029(); + +wmf_civicrm_update_7032(); } /** @@ -1197,3 +1200,93 @@ ); wmf_civicrm_create_location_types($location_types, TRUE); } + +/** + * Link Restrictions options to the custom field. + */ +function wmf_civicrm_update_7032() { +$restriction_values = array( + 'Unrestricted - General', + 'Restricted - Foundation', + 'Restricted - Program', + 'Restricted - Fiscal Sponsorship', +); + +$api = wmf_civicrm_bootstrap_civi(); + +// Get the custom group. +$success = $api-CustomGroup-get( array( +'name' = 'Gift_Data', +) ); +if ( !$success || !count( $api-values ) ) { + throw new Exception( $api-errorMsg() ); +} +$custom_group_id = $api-values[0]-id; + +// Get the field. +$success = $api-CustomField-get( array( +'custom_group_id' = $custom_group_id, +'name' = 'Fund', +) ); +if ( !$success || !count( $api-values ) ) { + throw new Exception( $api-errorMsg() ); +} +$custom_field_id = $api-values[0]-id; + +// Make the options. +$success = $api-OptionGroup-get( array( + 'name' = 'fund_20080709173248', +) ); +if ( !$success || !count( $api-values ) ) { + $success = $api-OptionGroup-create( array( + 'is_active' = 1, + 'is_reserved' = 1, + 'name' = 'fund_20080709173248', + 'title' = 'Fund', + ) ); + if ( !$success || !count( $api-values ) ) { + throw new Exception( $api-errorMsg() ); + } +} +$option_group_id = $api-values[0]-id; + +foreach ( $restriction_values as $value ) { + $success = $api-OptionValue-get( array( + 'group_id' = $option_group_id, + 'value' = $value, + ) ); + if ( !$success || !count( $api-values ) ) { + $success = $api-OptionValue-create( array( + 'option_group_id' = $option_group_id, + 'label' = ts( $value ), + 'value' = $value, + 'weight' = 'next', + ) ); + if ( !$success ) { + throw new Exception( $api-errorMsg() ); + } + } +} + +// XXX: breaks here? +var_export( Customgroup {$custom_group_id}, option group {$option_group_id}); +// Link the options to this field. +// FIXME: Maybe we could have done all this with the native api option_value helper params. +$success = $api-CustomField-create( array( +'column_name' = 'fund', +'custom_group_id' = $custom_group_id, +'data_type' = 'String', +'default_value' = 'Unrestricted - General', +'html_type' = 'Select', + 'id' = $custom_field_id, +'is_active' = 1, +'is_required' = 1, +'is_searchable' = 1, +'label' = ts('Restrictions'), +'name' = 'Fund', +'option_group_id' = $option_group_id, +) ); +if ( !$success || !count( $api-values ) ) { + throw new Exception( $api-errorMsg() ); +} +} -- To view, visit https://gerrit.wikimedia.org/r/219480 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibd0c656be82ce90eb21b8b9e83d4efc3ba550da4 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: Awight awi...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] build: Updating development dependencies - change (mediawiki...MassMessage)
jenkins-bot has submitted this change and it was merged. Change subject: build: Updating development dependencies .. build: Updating development dependencies * jakub-onderka/php-parallel-lint: 0.8.* → 0.9 * mediawiki/mediawiki-codesniffer: 0.2.0 → 0.3.0 Change-Id: I9f33aa6b1ebf2f864799d19d2a53524f8b1a219a --- M composer.json M includes/MassMessage.php M includes/MassMessageTargets.php 3 files changed, 4 insertions(+), 4 deletions(-) Approvals: Paladox: Looks good to me, but someone else must approve Jforrester: Looks good to me, approved jenkins-bot: Verified diff --git a/composer.json b/composer.json index 6d4b8ca..a03d4b1 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { require-dev: { - jakub-onderka/php-parallel-lint: 0.8.*, - mediawiki/mediawiki-codesniffer: 0.2.0 + jakub-onderka/php-parallel-lint: 0.9, + mediawiki/mediawiki-codesniffer: 0.3.0 }, scripts: { test: [ diff --git a/includes/MassMessage.php b/includes/MassMessage.php index c87de84..20b4250 100644 --- a/includes/MassMessage.php +++ b/includes/MassMessage.php @@ -182,7 +182,7 @@ if ( $param ) { $msg-params( $param ); } - return array ( + return array( 'strong class=error' . $msg-inContentLanguage()-plain() . '/strong', diff --git a/includes/MassMessageTargets.php b/includes/MassMessageTargets.php index 2c5036e..0634678 100644 --- a/includes/MassMessageTargets.php +++ b/includes/MassMessageTargets.php @@ -121,7 +121,7 @@ * @param Title $spamlist * @return array */ - protected static function getMassMessageListContentTargets ( Title $spamlist ) { + protected static function getMassMessageListContentTargets( Title $spamlist ) { global $wgCanonicalServer; $targets = Revision::newFromTitle( $spamlist )-getContent()-getValidTargets(); -- To view, visit https://gerrit.wikimedia.org/r/219450 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9f33aa6b1ebf2f864799d19d2a53524f8b1a219a Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/MassMessage Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: Jforrester jforres...@wikimedia.org Gerrit-Reviewer: Paladox thomasmulhall...@yahoo.com Gerrit-Reviewer: Wctaiwan wctai...@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] OOUIHTMLForm: Set 'destructive' flag for form reset button - change (mediawiki/core)
Bartosz Dziewoński has uploaded a new change for review. https://gerrit.wikimedia.org/r/219483 Change subject: OOUIHTMLForm: Set 'destructive' flag for form reset button .. OOUIHTMLForm: Set 'destructive' flag for form reset button Change-Id: I5eaf2424e53df0648a9b1754688a782ae7b7aa59 --- M includes/htmlform/OOUIHTMLForm.php 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/83/219483/1 diff --git a/includes/htmlform/OOUIHTMLForm.php b/includes/htmlform/OOUIHTMLForm.php index 4d5294c..a02c492 100644 --- a/includes/htmlform/OOUIHTMLForm.php +++ b/includes/htmlform/OOUIHTMLForm.php @@ -80,6 +80,7 @@ if ( $this-mShowReset ) { $buttons .= new OOUI\ButtonInputWidget( array( + 'flags' = array( 'destructive' ), 'type' = 'reset', 'label' = $this-msg( 'htmlform-reset' )-text(), ) ); -- To view, visit https://gerrit.wikimedia.org/r/219483 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5eaf2424e53df0648a9b1754688a782ae7b7aa59 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Bartosz Dziewoński matma@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] build: Updating development dependencies - change (mediawiki...WikidataPageBanner)
jenkins-bot has submitted this change and it was merged. Change subject: build: Updating development dependencies .. build: Updating development dependencies * jakub-onderka/php-parallel-lint: 0.8.* → 0.9 * mediawiki/mediawiki-codesniffer: 0.2.0 → 0.3.0 Change-Id: I27ef5a13674d6aa453b2088abb5757ee4c103a6d --- M composer.json 1 file changed, 6 insertions(+), 3 deletions(-) Approvals: Jforrester: Looks good to me, approved jenkins-bot: Verified diff --git a/composer.json b/composer.json index 1066d14..7dd4cd9 100644 --- a/composer.json +++ b/composer.json @@ -1,12 +1,15 @@ { name: mediawiki/wikidata-page-banner, description: MediaWiki WikidataPageBanner extension, - keywords: [mediawiki,WikidataPageBanner], + keywords: [ + mediawiki, + WikidataPageBanner + ], type: mediawiki-extension, license: GPL-2.0, require-dev: { - jakub-onderka/php-parallel-lint: 0.8.*, - mediawiki/mediawiki-codesniffer: 0.2.0 + jakub-onderka/php-parallel-lint: 0.9, + mediawiki/mediawiki-codesniffer: 0.3.0 }, scripts: { test: [ -- To view, visit https://gerrit.wikimedia.org/r/219461 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I27ef5a13674d6aa453b2088abb5757ee4c103a6d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikidataPageBanner Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: Jforrester jforres...@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] build: Updating development dependencies - change (mediawiki...WikiGrok)
jenkins-bot has submitted this change and it was merged. Change subject: build: Updating development dependencies .. build: Updating development dependencies * jakub-onderka/php-parallel-lint: 0.8.* → 0.9 * mediawiki/mediawiki-codesniffer: 0.1.0 → 0.3.0 Change-Id: I8f7ea0444b00775d90b8878a6dfbe1a8ea24b6d1 --- M composer.json 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Jforrester: Looks good to me, approved jenkins-bot: Verified diff --git a/composer.json b/composer.json index d3201eb..263ca10 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { require-dev: { - jakub-onderka/php-parallel-lint: 0.8.*, - mediawiki/mediawiki-codesniffer: 0.1.0 + jakub-onderka/php-parallel-lint: 0.9, + mediawiki/mediawiki-codesniffer: 0.3.0 }, scripts: { test: [ -- To view, visit https://gerrit.wikimedia.org/r/219462 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8f7ea0444b00775d90b8878a6dfbe1a8ea24b6d1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikiGrok Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: Jforrester jforres...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update role::geshi for I07446ec98 - change (mediawiki/vagrant)
Ori.livneh has uploaded a new change for review. https://gerrit.wikimedia.org/r/219497 Change subject: Update role::geshi for I07446ec98 .. Update role::geshi for I07446ec98 * Depend on python-pygments package. * Configure $wgPygmentizePath Change-Id: I3cfbc57a1e9845c5b74e37f50c978330bee84664 --- M puppet/modules/role/manifests/geshi.pp 1 file changed, 7 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant refs/changes/97/219497/1 diff --git a/puppet/modules/role/manifests/geshi.pp b/puppet/modules/role/manifests/geshi.pp index 2d2a365..692ffc6 100644 --- a/puppet/modules/role/manifests/geshi.pp +++ b/puppet/modules/role/manifests/geshi.pp @@ -1,5 +1,11 @@ # == Class: role::geshi # Configures SyntaxHighlight_GeSHi, an extension for syntax-highlighting class role::geshi { -mediawiki::extension { 'SyntaxHighlight_GeSHi': } +require_package('python-pygments') + +mediawiki::extension { 'SyntaxHighlight_GeSHi': +settings = { +wgPygmentizePath = '/usr/local/bin/pygmentize', +}, +} } -- To view, visit https://gerrit.wikimedia.org/r/219497 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3cfbc57a1e9845c5b74e37f50c978330bee84664 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: Ori.livneh o...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make varnish template compatible with labs - change (operations/puppet)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/219502 Change subject: Make varnish template compatible with labs .. Make varnish template compatible with labs There is only one backend for deployment-prep currently so when it encounters this equation it tries to take log10(0) and breaks. Bug: T102570 Change-Id: Ic7f4eb3fceb23112bf75a7c648d57f1aa3f28c42 --- M modules/varnish/templates/vcl/wikimedia.vcl.erb 1 file changed, 5 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/02/219502/1 diff --git a/modules/varnish/templates/vcl/wikimedia.vcl.erb b/modules/varnish/templates/vcl/wikimedia.vcl.erb index f305691..a4c8a1c 100644 --- a/modules/varnish/templates/vcl/wikimedia.vcl.erb +++ b/modules/varnish/templates/vcl/wikimedia.vcl.erb @@ -33,7 +33,11 @@ # weight*num_backends. # Blame _joe_ for the math! :) def chash_def_retries(p, n) - return ((Math.log10(100 - p) - 2) / (Math.log10(n - 1) - Math.log10(n))).ceil + x = n - 1 + if (x = 0) + return n + end + return ((Math.log10(100 - p) - 2) / (Math.log10(x) - Math.log10(n))).ceil end -% -- To view, visit https://gerrit.wikimedia.org/r/219502 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic7f4eb3fceb23112bf75a7c648d57f1aa3f28c42 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Thcipriani tcipri...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove double str_replace( ' ', '_', $ ) when using LinkBatch - change (mediawiki/core)
Umherirrender has uploaded a new change for review. https://gerrit.wikimedia.org/r/219444 Change subject: Remove double str_replace( ' ', '_', $ ) when using LinkBatch .. Remove double str_replace( ' ', '_', $ ) when using LinkBatch LinkBatch::add already handle the underscore/space part, that means it is not need to do it on the caller side when adding user names to LinkBatch Change-Id: I09e80712903a539164141cc0a88d321203114677 --- M includes/cache/UserCache.php M includes/specials/SpecialBlockList.php 2 files changed, 6 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/44/219444/1 diff --git a/includes/cache/UserCache.php b/includes/cache/UserCache.php index 8a42489..2a3aac2 100644 --- a/includes/cache/UserCache.php +++ b/includes/cache/UserCache.php @@ -123,11 +123,11 @@ $lb = new LinkBatch(); foreach ( $usersToCheck as $userId = $name ) { if ( $this-queryNeeded( $userId, 'userpage', $options ) ) { - $lb-add( NS_USER, str_replace( ' ', '_', $row-user_name ) ); + $lb-add( NS_USER, $row-user_name ); $this-typesCached[$userId]['userpage'] = 1; } if ( $this-queryNeeded( $userId, 'usertalk', $options ) ) { - $lb-add( NS_USER_TALK, str_replace( ' ', '_', $row-user_name ) ); + $lb-add( NS_USER_TALK, $row-user_name ); $this-typesCached[$userId]['usertalk'] = 1; } } diff --git a/includes/specials/SpecialBlockList.php b/includes/specials/SpecialBlockList.php index 4dd313b..8a9aefd 100644 --- a/includes/specials/SpecialBlockList.php +++ b/includes/specials/SpecialBlockList.php @@ -431,16 +431,12 @@ $lb-setCaller( __METHOD__ ); foreach ( $result as $row ) { - # Usernames and titles are in fact related by a simple substitution of space - underscore - # The last few lines of Title::secureAndSplit() tell the story. - $name = str_replace( ' ', '_', $row-ipb_address ); - $lb-add( NS_USER, $name ); - $lb-add( NS_USER_TALK, $name ); + $lb-add( NS_USER, $row-ipb_address ); + $lb-add( NS_USER_TALK, $row-ipb_address ); if ( isset( $row-by_user_name ) ) { - $username = str_replace( ' ', '_', $row-by_user_name ); - $lb-add( NS_USER, $username ); - $lb-add( NS_USER_TALK, $username ); + $lb-add( NS_USER, $row-by_user_name ); + $lb-add( NS_USER_TALK, $row-by_user_name ); } } -- To view, visit https://gerrit.wikimedia.org/r/219444 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I09e80712903a539164141cc0a88d321203114677 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Umherirrender umherirrender_de...@web.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] build: Implement 'npm run doc' entry point - change (mediawiki...MobileFrontend)
jenkins-bot has submitted this change and it was merged. Change subject: build: Implement 'npm run doc' entry point .. build: Implement 'npm run doc' entry point Also add grunt-cli to devDependencies. Previously 'npm test' was broken unless the user installed grunt-cli globally beforehand. Now 'npm test' just works after 'npm install' on a fresh git clone. The local node_modules/.bin path is automatically prepended to PATH for package scripts. https://docs.npmjs.com/misc/scripts#path The -s parameter is optional, but it omits some verbose output from the npm wrapper that may be unexpected for users of make jsduck. Minor hygiene: Simplify grunt-test by including docs instead of duplicating. Change-Id: I071543c62032a0f7dcb8b4ef8b30dee1b3e216ec --- M Gruntfile.js M Makefile M package.json 3 files changed, 5 insertions(+), 3 deletions(-) Approvals: Jdlrobson: Looks good to me, approved jenkins-bot: Verified diff --git a/Gruntfile.js b/Gruntfile.js index 9a1ed8b..4264e18 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -139,7 +139,7 @@ // grunt test will be run by npm test which will be run by Jenkins // Do not execute qunit here, or other tasks that require full mediawiki // running. - grunt.registerTask( 'test', [ 'lint', 'mkdir', 'jsduck' ] ); + grunt.registerTask( 'test', [ 'lint', 'docs' ] ); grunt.registerTask( 'default', [ 'test' ] ); }; diff --git a/Makefile b/Makefile index 6516091..4ccda99 100644 --- a/Makefile +++ b/Makefile @@ -25,7 +25,7 @@ @dev-scripts/remotes/gerrit.py --project 'mediawiki/extensions/MobileFrontend' --gtscore -1 --ignore 'WIP' jsduck: nodecheck gems ## Build the JavaScript documentation - @grunt docs + @npm run -s doc phpdoc: nodecheck ## Build the PHP documentation mkdir -p docs diff --git a/package.json b/package.json index 42b407e..24b8e28 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,8 @@ description: Node.js dependencies used in MobileFrontend, version: 0.0.1, scripts: { - test: grunt test + test: grunt test, + doc: grunt docs }, repository: { type: git, @@ -19,6 +20,7 @@ svgo: =0.4.4 }, devDependencies: { + grunt-cli: 0.1.13, grunt-mkdir: ^0.1.2, grunt-svg2png: 0.2.5, grunt-contrib-jshint: 0.10.0, -- To view, visit https://gerrit.wikimedia.org/r/219426 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I071543c62032a0f7dcb8b4ef8b30dee1b3e216ec Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Krinkle krinklem...@gmail.com Gerrit-Reviewer: Jdlrobson jrob...@wikimedia.org Gerrit-Reviewer: Krinkle krinklem...@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] build: Use jsduck native - change (mediawiki...MobileFrontend)
jenkins-bot has submitted this change and it was merged. Change subject: build: Use jsduck native .. build: Use jsduck native * Simplify mkdir to just docs/. Creating the subdirectory will just make jsduck remove and re-create it. This matches the way the Makefile manages phpdoc (also only creates docs/). * Other applications and services that support JSDuck will be able to discover the jsduck configuration in its standard location and use it. * By running jsduck natively a few bugs from grunt-jsduck are implicitly fixed: - Warnings are no longer output twice. - JSDuck's feathers finally shine. The output colors are now preserved. - More descriptive exit code. The entry points npm run doc, make docs and make jsduck continue to work fine. However grunt docs will no longer exist. I would've kept grunt-docs (just for convenience during the transition) if it weren't for the fact that grunt-jsduck doesn't support reading from 'jsduck.json'. Minor hygiene: Only match /docs at the top level in gitignore. Change-Id: I4e7c8cd22991c7979b09590a34996480e566cba7 --- M .gitignore M Gruntfile.js A jsduck.json M package.json 4 files changed, 35 insertions(+), 42 deletions(-) Approvals: Jdlrobson: Looks good to me, approved jenkins-bot: Verified diff --git a/.gitignore b/.gitignore index e900ac6..b19d449 100644 --- a/.gitignore +++ b/.gitignore @@ -7,7 +7,7 @@ /vendor/ node_modules/ tmp/ -docs/ +/docs dev-scripts/remotes vendor/ composer.phar diff --git a/Gruntfile.js b/Gruntfile.js index 4264e18..e711ef3 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -13,7 +13,6 @@ grunt.loadNpmTasks( 'grunt-contrib-watch' ); grunt.loadNpmTasks( 'grunt-notify' ); grunt.loadNpmTasks( 'grunt-svg2png' ); - grunt.loadNpmTasks( 'grunt-jsduck' ); grunt.initConfig( { URL: process.env.MEDIAWIKI_URL || 'http://127.0.0.1:8080/w/index.php/', @@ -25,9 +24,9 @@ jsTests: 'tests/qunit/**/*.js' }, mkdir: { - jsdocs: { + docs: { options: { - create: [ 'docs/js' ] + create: [ 'docs' ] } } }, @@ -97,49 +96,15 @@ reload: true } } - }, - jsduck: { - main: { - src: [ - '%= files.js %' - ], - dest: 'docs/js', - options: { - 'builtin-classes': true, - 'external': [ - 'Hogan.Template', - 'HandleBars.Template', - 'jQuery.Deferred', - 'jQuery.Promise', - 'jQuery.Event', - 'jQuery.Object', - 'jqXHR', - 'File', - 'mw.user', - 'mw.Api', - 'CodeMirror', - 'OO.ui.ToolGroup', - 'OO.ui.LookupElement', - 'OO.EventEmitter' - ], - 'ignore-global': true, - 'tags': './.docs/jsduckCustomTags.rb', - // https://github.com/senchalabs/jsduck/issues/525 - 'processes': 0, - 'warnings-exit-nonzero': true, - 'warnings': [ '-nodoc(class,public)', '-dup_member', '-link_ambiguous' ] - } - } } } ); grunt.registerTask( 'lint', [ 'jshint', 'jscs' ] ); - grunt.registerTask( 'docs', [ 'mkdir:jsdocs', 'jsduck:main' ] ); // grunt test will be run by npm test which will be run by Jenkins // Do not execute qunit here, or other tasks that require full mediawiki // running. - grunt.registerTask( 'test', [ 'lint', 'docs' ] ); + grunt.registerTask( 'test', [ 'lint' ] ); grunt.registerTask( 'default', [ 'test' ] ); }; diff --git a/jsduck.json b/jsduck.json new
[MediaWiki-commits] [Gerrit] build: Updating development dependencies - change (mediawiki...MassMessage)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/219450 Change subject: build: Updating development dependencies .. build: Updating development dependencies * jakub-onderka/php-parallel-lint: 0.8.* → 0.9 * mediawiki/mediawiki-codesniffer: 0.2.0 → 0.3.0 Change-Id: I9f33aa6b1ebf2f864799d19d2a53524f8b1a219a --- M composer.json 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MassMessage refs/changes/50/219450/1 diff --git a/composer.json b/composer.json index 6d4b8ca..a03d4b1 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { require-dev: { - jakub-onderka/php-parallel-lint: 0.8.*, - mediawiki/mediawiki-codesniffer: 0.2.0 + jakub-onderka/php-parallel-lint: 0.9, + mediawiki/mediawiki-codesniffer: 0.3.0 }, scripts: { test: [ -- To view, visit https://gerrit.wikimedia.org/r/219450 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9f33aa6b1ebf2f864799d19d2a53524f8b1a219a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MassMessage 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] analytics_kafka: switch to ganglia_new - change (operations/puppet)
Dzahn has submitted this change and it was merged. Change subject: analytics_kafka: switch to ganglia_new .. analytics_kafka: switch to ganglia_new Change-Id: I6a24d2dc014ae3a8f12dc50b696c1982e83adb43 --- M hieradata/common.yaml M hieradata/regex.yaml M manifests/site.pp 3 files changed, 5 insertions(+), 12 deletions(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/hieradata/common.yaml b/hieradata/common.yaml index dba40ce..540b921 100644 --- a/hieradata/common.yaml +++ b/hieradata/common.yaml @@ -206,10 +206,7 @@ name: Analytics Kafka cluster id: 45 sites: - eqiad: -- analytics1012.eqiad.wmnet -- analytics1018.eqiad.wmnet -- analytics1022.eqiad.wmnet + eqiad: [] sca: name: Service Cluster A id: 46 diff --git a/hieradata/regex.yaml b/hieradata/regex.yaml index 552675a..1d61c3c 100644 --- a/hieradata/regex.yaml +++ b/hieradata/regex.yaml @@ -1,3 +1,7 @@ +analytics_kafka: + __regex: !ruby/regexp /^analytics10(12|18|21|22)\.eqiad\.wmnet$/ + ganglia_class: new + api_appserver: __regex: !ruby/regexp /^mw(111[4-9]|11[2-3][0-9]|114[0-8]|1189|119[0-9]|120[0-8]|122[1-9]|123[0-5])\.eqiad\.wmnet$/ ganglia_class: new diff --git a/manifests/site.pp b/manifests/site.pp index 7c93ade..f06ca25 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -127,14 +127,6 @@ # analytics1012, analytics1018, analytics1021 and analytics1022 are Kafka Brokers. node /analytics10(12|18|21|22)\.eqiad\.wmnet/ { -# one ganglia aggregator per ganglia 'cluster' per row. -if ($::hostname == 'analytics1012' or # Row A -$::hostname == 'analytics1018' or # Row D -$::hostname == 'analytics1022')# Row C -{ -$ganglia_aggregator = true -} - # Kafka brokers are routed via IPv6 so that # other DCs can address without public IPv4 # addresses. -- To view, visit https://gerrit.wikimedia.org/r/219075 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6a24d2dc014ae3a8f12dc50b696c1982e83adb43 Gerrit-PatchSet: 3 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn dz...@wikimedia.org Gerrit-Reviewer: Dzahn dz...@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 version number and headers in release notes - change (mediawiki/core)
Lewis Cawte has uploaded a new change for review. https://gerrit.wikimedia.org/r/219460 Change subject: Fix version number and headers in release notes .. Fix version number and headers in release notes Change-Id: I38d9bd1cb54463613e761989cadbaa5a09f6f3bc --- M RELEASE-NOTES-1.25 1 file changed, 5 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/60/219460/1 diff --git a/RELEASE-NOTES-1.25 b/RELEASE-NOTES-1.25 index 6746224..95efd02 100644 --- a/RELEASE-NOTES-1.25 +++ b/RELEASE-NOTES-1.25 @@ -5,7 +5,7 @@ THIS IS NOT YET A RELEASE! -== Changes since 1.25.2 == +=== Changes since 1.25.1 === * (T100767) Setting a configuration setting for skin or extension to false in LocalSettings.php was not working. @@ -15,6 +15,10 @@ a manifest_version property for 1.26 compatability will no longer trigger warnings. +== MediaWiki 1.25.1 == + +This is a maintenance release of the MediaWiki 1.25 branch. + === Changes since 1.25 === * (T100351) Fix syntax errors in extension.json of ConfirmEdit extension -- To view, visit https://gerrit.wikimedia.org/r/219460 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I38d9bd1cb54463613e761989cadbaa5a09f6f3bc Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: REL1_25 Gerrit-Owner: Lewis Cawte le...@lewiscawte.me ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] build: Updating development dependencies - change (mediawiki...WikiGrok)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/219462 Change subject: build: Updating development dependencies .. build: Updating development dependencies * jakub-onderka/php-parallel-lint: 0.8.* → 0.9 * mediawiki/mediawiki-codesniffer: 0.1.0 → 0.3.0 Change-Id: I8f7ea0444b00775d90b8878a6dfbe1a8ea24b6d1 --- M composer.json 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikiGrok refs/changes/62/219462/1 diff --git a/composer.json b/composer.json index d3201eb..263ca10 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { require-dev: { - jakub-onderka/php-parallel-lint: 0.8.*, - mediawiki/mediawiki-codesniffer: 0.1.0 + jakub-onderka/php-parallel-lint: 0.9, + mediawiki/mediawiki-codesniffer: 0.3.0 }, scripts: { test: [ -- To view, visit https://gerrit.wikimedia.org/r/219462 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8f7ea0444b00775d90b8878a6dfbe1a8ea24b6d1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikiGrok 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] save user lang selection - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/219474 Change subject: save user lang selection .. save user lang selection Change-Id: I8f3eef90811ca600941efcc6db256d471fd87a49 --- M Wikipedia.xcodeproj/project.pbxproj M Wikipedia/UI-V5/Global.h M Wikipedia/View Controllers/Languages/LanguagesViewController.m M Wikipedia/View Controllers/Languages/MWKLanguageLinkController.h M Wikipedia/View Controllers/Languages/MWKLanguageLinkController.m A Wikipedia/View Controllers/Languages/MWKLanguageLinkController_Private.h A WikipediaUnitTests/MWKLanguageLinkControllerTests.m A WikipediaUnitTests/Supporting Files/WikipediaUnitTests-Prefix.pch 8 files changed, 241 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/74/219474/1 diff --git a/Wikipedia.xcodeproj/project.pbxproj b/Wikipedia.xcodeproj/project.pbxproj index a9f9e1e..27dae01 100644 --- a/Wikipedia.xcodeproj/project.pbxproj +++ b/Wikipedia.xcodeproj/project.pbxproj @@ -245,6 +245,7 @@ BC69C3141AB0C1FF0090B039 /* WMFImageInfoController.m in Sources */ = {isa = PBXBuildFile; fileRef = BC69C3131AB0C1FF0090B039 /* WMFImageInfoController.m */; }; BC6BF4001B19213600362968 /* XCTestCase+WMFLocaleTesting.m in Sources */ = {isa = PBXBuildFile; fileRef = BC6BF3FE1B19209900362968 /* XCTestCase+WMFLocaleTesting.m */; }; BC7DFCD61AA4E5FE35C3 /* WMFImageURLParsing.m in Sources */ = {isa = PBXBuildFile; fileRef = BC7DFCD51AA4E5FE35C3 /* WMFImageURLParsing.m */; }; + BC7E4A521B34B53E00EECD8B /* MWKLanguageLinkControllerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = BC7E4A511B34B53E00EECD8B /* MWKLanguageLinkControllerTests.m */; }; BC86B9361A92966B00B4C039 /* AFHTTPRequestOperationManager+UniqueRequests.m in Sources */ = {isa = PBXBuildFile; fileRef = BC86B9351A92966B00B4C039 /* AFHTTPRequestOperationManager+UniqueRequests.m */; }; BC86B93D1A929CC500B4C039 /* UICollectionViewFlowLayout+NSCopying.m in Sources */ = {isa = PBXBuildFile; fileRef = BC86B93C1A929CC500B4C039 /* UICollectionViewFlowLayout+NSCopying.m */; }; BC86B9401A929D7900B4C039 /* UICollectionViewFlowLayout+WMFItemSizeThatFits.m in Sources */ = {isa = PBXBuildFile; fileRef = BC86B93F1A929D7900B4C039 /* UICollectionViewFlowLayout+WMFItemSizeThatFits.m */; }; @@ -764,6 +765,7 @@ BC092BA01B19135700093C59 /* WMFApiJsonResponseSerializer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WMFApiJsonResponseSerializer.h; path = Serializers/WMFApiJsonResponseSerializer.h; sourceTree = group; }; BC092BA11B19135700093C59 /* WMFApiJsonResponseSerializer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = WMFApiJsonResponseSerializer.m; path = Serializers/WMFApiJsonResponseSerializer.m; sourceTree = group; }; BC092BA61B19189100093C59 /* MWKSiteInfoFetcherTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MWKSiteInfoFetcherTests.m; sourceTree = group; }; + BC14F89F1B34B72500860018 /* WikipediaUnitTests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WikipediaUnitTests-Prefix.pch; sourceTree = group; }; BC2375981AB78D8A00B0BAA8 /* NSParagraphStyle+WMFNaturalAlignmentStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSParagraphStyle+WMFNaturalAlignmentStyle.h; sourceTree = group; }; BC2375991AB78D8A00B0BAA8 /* NSParagraphStyle+WMFNaturalAlignmentStyle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSParagraphStyle+WMFNaturalAlignmentStyle.m; sourceTree = group; }; BC23759D1AB8928600B0BAA8 /* WMFDateFormatterTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WMFDateFormatterTests.m; sourceTree = group; }; @@ -796,6 +798,8 @@ BC7DFCCB1AA4BA8A35C3 /* WMFCodingStyle.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WMFCodingStyle.h; sourceTree = group; }; BC7DFCD41AA4E5FE35C3 /* WMFImageURLParsing.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WMFImageURLParsing.h; sourceTree = group; }; BC7DFCD51AA4E5FE35C3 /* WMFImageURLParsing.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WMFImageURLParsing.m; sourceTree = group; }; + BC7E4A501B34B4B900EECD8B /* MWKLanguageLinkController_Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path =
[MediaWiki-commits] [Gerrit] Add Noto Naskh Arabic - change (mediawiki...UniversalLanguageSelector)
Mjbmr has uploaded a new change for review. https://gerrit.wikimedia.org/r/219485 Change subject: Add Noto Naskh Arabic .. Add Noto Naskh Arabic Change-Id: I8a118900d0f7343a9ca36662f2fdf531f54d29fb --- A data/fontrepo/fonts/NotoNaskhArabic/NotoNaskhArabic-Bold.eot A data/fontrepo/fonts/NotoNaskhArabic/NotoNaskhArabic-Bold.ttf A data/fontrepo/fonts/NotoNaskhArabic/NotoNaskhArabic-Bold.woff A data/fontrepo/fonts/NotoNaskhArabic/NotoNaskhArabic-Bold.woff2 A data/fontrepo/fonts/NotoNaskhArabic/NotoNaskhArabic-Regular.eot A data/fontrepo/fonts/NotoNaskhArabic/NotoNaskhArabic-Regular.ttf A data/fontrepo/fonts/NotoNaskhArabic/NotoNaskhArabic-Regular.woff A data/fontrepo/fonts/NotoNaskhArabic/NotoNaskhArabic-Regular.woff2 A data/fontrepo/fonts/NotoNaskhArabic/font.ini 9 files changed, 15 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector refs/changes/85/219485/1 diff --git a/data/fontrepo/fonts/NotoNaskhArabic/NotoNaskhArabic-Bold.eot b/data/fontrepo/fonts/NotoNaskhArabic/NotoNaskhArabic-Bold.eot new file mode 100644 index 000..f5cd9d9 --- /dev/null +++ b/data/fontrepo/fonts/NotoNaskhArabic/NotoNaskhArabic-Bold.eot Binary files differ diff --git a/data/fontrepo/fonts/NotoNaskhArabic/NotoNaskhArabic-Bold.ttf b/data/fontrepo/fonts/NotoNaskhArabic/NotoNaskhArabic-Bold.ttf new file mode 100644 index 000..7c1d6a9 --- /dev/null +++ b/data/fontrepo/fonts/NotoNaskhArabic/NotoNaskhArabic-Bold.ttf Binary files differ diff --git a/data/fontrepo/fonts/NotoNaskhArabic/NotoNaskhArabic-Bold.woff b/data/fontrepo/fonts/NotoNaskhArabic/NotoNaskhArabic-Bold.woff new file mode 100644 index 000..95c474a --- /dev/null +++ b/data/fontrepo/fonts/NotoNaskhArabic/NotoNaskhArabic-Bold.woff Binary files differ diff --git a/data/fontrepo/fonts/NotoNaskhArabic/NotoNaskhArabic-Bold.woff2 b/data/fontrepo/fonts/NotoNaskhArabic/NotoNaskhArabic-Bold.woff2 new file mode 100644 index 000..d55a5e6 --- /dev/null +++ b/data/fontrepo/fonts/NotoNaskhArabic/NotoNaskhArabic-Bold.woff2 Binary files differ diff --git a/data/fontrepo/fonts/NotoNaskhArabic/NotoNaskhArabic-Regular.eot b/data/fontrepo/fonts/NotoNaskhArabic/NotoNaskhArabic-Regular.eot new file mode 100644 index 000..bee490e --- /dev/null +++ b/data/fontrepo/fonts/NotoNaskhArabic/NotoNaskhArabic-Regular.eot Binary files differ diff --git a/data/fontrepo/fonts/NotoNaskhArabic/NotoNaskhArabic-Regular.ttf b/data/fontrepo/fonts/NotoNaskhArabic/NotoNaskhArabic-Regular.ttf new file mode 100644 index 000..6855dd5 --- /dev/null +++ b/data/fontrepo/fonts/NotoNaskhArabic/NotoNaskhArabic-Regular.ttf Binary files differ diff --git a/data/fontrepo/fonts/NotoNaskhArabic/NotoNaskhArabic-Regular.woff b/data/fontrepo/fonts/NotoNaskhArabic/NotoNaskhArabic-Regular.woff new file mode 100644 index 000..1819804 --- /dev/null +++ b/data/fontrepo/fonts/NotoNaskhArabic/NotoNaskhArabic-Regular.woff Binary files differ diff --git a/data/fontrepo/fonts/NotoNaskhArabic/NotoNaskhArabic-Regular.woff2 b/data/fontrepo/fonts/NotoNaskhArabic/NotoNaskhArabic-Regular.woff2 new file mode 100644 index 000..8f7b914 --- /dev/null +++ b/data/fontrepo/fonts/NotoNaskhArabic/NotoNaskhArabic-Regular.woff2 Binary files differ diff --git a/data/fontrepo/fonts/NotoNaskhArabic/font.ini b/data/fontrepo/fonts/NotoNaskhArabic/font.ini new file mode 100644 index 000..67d786e --- /dev/null +++ b/data/fontrepo/fonts/NotoNaskhArabic/font.ini @@ -0,0 +1,15 @@ +[Noto Naskh Arabic] +languages=bcc,bgn,fa,khw,lki,lrc,luz,ps,ur +version=3 +license=apache-2.0 +url=https://github.com/googlei18n/noto-fonts +ttf=NotoNaskhArabic-Regular.ttf +eot=NotoNaskhArabic-Regular.eot +woff=NotoNaskhArabic-Regular.woff +bold=Noto Naskh Arabic Bold + +[Noto Naskh Arabic Bold] +ttf=NotoNaskhArabic-Bold.ttf +eot=NotoNaskhArabic-Bold.eot +woff=NotoNaskhArabic-Bold.woff +fontweight=bold -- To view, visit https://gerrit.wikimedia.org/r/219485 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8a118900d0f7343a9ca36662f2fdf531f54d29fb Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner: Mjbmr mjb...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Better error message via api when content model does not all... - change (mediawiki/core)
EBernhardson has uploaded a new change for review. https://gerrit.wikimedia.org/r/219487 Change subject: Better error message via api when content model does not allow editing .. Better error message via api when content model does not allow editing Change-Id: I699b4f5fd2eac8dfc4c54922474f939262bc803d --- M includes/api/ApiEditPage.php 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/87/219487/1 diff --git a/includes/api/ApiEditPage.php b/includes/api/ApiEditPage.php index e70b8f0..b623849 100644 --- a/includes/api/ApiEditPage.php +++ b/includes/api/ApiEditPage.php @@ -96,9 +96,11 @@ $contentHandler = ContentHandler::getForModelID( $params['contentmodel'] ); } + $name = $titleObj-getPrefixedDBkey(); + $model = $contentHandler-getModelID(); if ( $contentHandler-supportsDirectApiEditing() === false ) { $this-dieUsage( - 'Direct editing via API is not supported for this content type.', + Direct editing via API is not supported for content model $model used by $name, 'no-direct-editing' ); } @@ -110,8 +112,6 @@ $contentFormat = $params['contentformat']; if ( !$contentHandler-isSupportedFormat( $contentFormat ) ) { - $name = $titleObj-getPrefixedDBkey(); - $model = $contentHandler-getModelID(); $this-dieUsage( The requested format $contentFormat is not supported for content model . $model used by $name, 'badformat' ); -- To view, visit https://gerrit.wikimedia.org/r/219487 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I699b4f5fd2eac8dfc4c54922474f939262bc803d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: EBernhardson ebernhard...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update Civi to pick up fix - change (wikimedia...crm)
Awight has uploaded a new change for review. https://gerrit.wikimedia.org/r/219498 Change subject: Update Civi to pick up fix .. Update Civi to pick up fix Without this patch, Civi cannot update a custom field with a new option group if that field is already null. This broke a test. Change-Id: Ib7203d83045bd3951c02a073a9ffa8710b16b9d5 --- M civicrm 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/98/219498/1 diff --git a/civicrm b/civicrm index 579f96b..dbeff64 16 --- a/civicrm +++ b/civicrm -Subproject commit 579f96bb05ff1fb5e73d014b22cecf9061d3306a +Subproject commit dbeff641f99bfa73fd820e20ccd61ebb822a5d25 -- To view, visit https://gerrit.wikimedia.org/r/219498 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib7203d83045bd3951c02a073a9ffa8710b16b9d5 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: Awight awi...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update HISTORY.md and README.md for 0.3.0 release - change (mediawiki...codesniffer)
jenkins-bot has submitted this change and it was merged. Change subject: Update HISTORY.md and README.md for 0.3.0 release .. Update HISTORY.md and README.md for 0.3.0 release Change-Id: I5f73ce95a96d9cd68fe641702132a07047e3bd54 --- M HISTORY.md M README.md 2 files changed, 9 insertions(+), 1 deletion(-) Approvals: Polybuildr: Looks good to me, approved jenkins-bot: Verified diff --git a/HISTORY.md b/HISTORY.md index ad51231..26ae989 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,5 +1,13 @@ # MediaWiki-Codesniffer release history # +## 0.3.0 / 2015-06-19 ## +* Update README.md code formatting (Vivek Ghaisas) +* Don't require wf prefix on functions that are namespaced (Kunal Mehta) +* Simplify PHPUnit boostrap, require usage of composer for running tests (Kunal Mehta) +* SpaceyParenthesis: Check for space before opening parenthesis (Vivek Ghaisas) +* SpaceyParenthesesSniff: Search for extra/unnecessary space (Vivek Ghaisas) +* CharacterBeforePHPOpeningTagSniff: Support T_HASHBANG for HHVM =3.5,3.7 (Kunal Mehta) + ## 0.2.0 / 2015-06-02 ## * Fixed sniff that checks globals have a wg prefix (Divya) * New sniff to detect unused global variables (Divya) diff --git a/README.md b/README.md index c6bb4e9..bfb18b0 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ { require-dev: { - mediawiki/mediawiki-codesniffer: 0.2.0 + mediawiki/mediawiki-codesniffer: 0.3.0 }, scripts: { test: [ -- To view, visit https://gerrit.wikimedia.org/r/219390 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5f73ce95a96d9cd68fe641702132a07047e3bd54 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/tools/codesniffer Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: Addshore addshorew...@gmail.com Gerrit-Reviewer: Hashar has...@free.fr Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: Polybuildr v.a.ghai...@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] build: Updating development dependencies - change (oojs/ui)
jenkins-bot has submitted this change and it was merged. Change subject: build: Updating development dependencies .. build: Updating development dependencies * jakub-onderka/php-parallel-lint: 0.8.* → 0.9 * mediawiki/mediawiki-codesniffer: 0.2.0 → 0.3.0 Change-Id: I640eaedfbaf92acb9926a7138b9847cf6b3133f2 --- M composer.json 1 file changed, 5 insertions(+), 4 deletions(-) Approvals: Bartosz Dziewoński: Looks good to me, approved jenkins-bot: Verified diff --git a/composer.json b/composer.json index 840d9eb..47a601a 100644 --- a/composer.json +++ b/composer.json @@ -7,12 +7,14 @@ php: =5.3.3 }, require-dev: { - jakub-onderka/php-parallel-lint: 0.8.*, - mediawiki/mediawiki-codesniffer: 0.2.0, + jakub-onderka/php-parallel-lint: 0.9, + mediawiki/mediawiki-codesniffer: 0.3.0, phpunit/phpunit: ~4.5 }, autoload: { - classmap: [php/] + classmap: [ + php/ + ] }, scripts: { test: [ @@ -22,4 +24,3 @@ ] } } - -- To view, visit https://gerrit.wikimedia.org/r/219469 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I640eaedfbaf92acb9926a7138b9847cf6b3133f2 Gerrit-PatchSet: 1 Gerrit-Project: oojs/ui Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: Bartosz Dziewoński 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] build: Updating development dependencies - change (mediawiki...OOJsUIAjaxLogin)
jenkins-bot has submitted this change and it was merged. Change subject: build: Updating development dependencies .. build: Updating development dependencies * jshint: 2.6.3 → 2.8.0 * jscs: 1.11.3 → 1.13.1 Change-Id: I50d0028e8077aae06fff990051a9c64bcbf3779e --- M package.json 1 file changed, 9 insertions(+), 9 deletions(-) Approvals: Jforrester: Looks good to me, approved jenkins-bot: Verified diff --git a/package.json b/package.json index 3ce0996..9eb112d 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,11 @@ { - scripts: { - test: jshint ./resources/ jscs ./resources/, - doc: jsduck - }, - devDependencies: { - jshint: 2.6.3, - jscs: 1.11.3, - jscs-jsdoc: git+https://github.com/jdlrobson/jscs-jsdoc.git#checkParamExistence; - } + scripts: { +test: jshint ./resources/ jscs ./resources/, +doc: jsduck + }, + devDependencies: { +jshint: 2.8.0, +jscs: 1.13.1, +jscs-jsdoc: git+https://github.com/jdlrobson/jscs-jsdoc.git#checkParamExistence; + } } -- To view, visit https://gerrit.wikimedia.org/r/216360 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I50d0028e8077aae06fff990051a9c64bcbf3779e Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/OOJsUIAjaxLogin Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: Jforrester jforres...@wikimedia.org Gerrit-Reviewer: Legoktm legoktm.wikipe...@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] Drop Amount (USD) column - change (wikimedia...crm)
Awight has uploaded a new change for review. https://gerrit.wikimedia.org/r/219493 Change subject: Drop Amount (USD) column .. Drop Amount (USD) column Wasn't useful. Bug: T88836 Change-Id: I7d7c3e0ca427f5fcf1f5bb6b559d53d19111e697 --- M sites/all/modules/offline2civicrm/WmfImportFile.php 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/93/219493/1 diff --git a/sites/all/modules/offline2civicrm/WmfImportFile.php b/sites/all/modules/offline2civicrm/WmfImportFile.php index a55e2e9..ed81a64 100644 --- a/sites/all/modules/offline2civicrm/WmfImportFile.php +++ b/sites/all/modules/offline2civicrm/WmfImportFile.php @@ -6,7 +6,6 @@ return array( 'Additional Address 1', 'Additional Address 2', -'Amount (USD)', 'Assistant Contact', 'Assistant Name', 'Check Number', -- To view, visit https://gerrit.wikimedia.org/r/219493 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7d7c3e0ca427f5fcf1f5bb6b559d53d19111e697 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: Awight awi...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Passthrough more payment types - change (wikimedia...crm)
Awight has uploaded a new change for review. https://gerrit.wikimedia.org/r/219492 Change subject: Passthrough more payment types .. Passthrough more payment types Bug: T88836 Change-Id: I0b4641311f508ade455d58bf9884b943bc0b4cc3 --- M sites/all/modules/offline2civicrm/ChecksFile.php M sites/all/modules/wmf_civicrm/wmf_civicrm.module 2 files changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/92/219492/1 diff --git a/sites/all/modules/offline2civicrm/ChecksFile.php b/sites/all/modules/offline2civicrm/ChecksFile.php index 53c8b9a..afb7c7c 100644 --- a/sites/all/modules/offline2civicrm/ChecksFile.php +++ b/sites/all/modules/offline2civicrm/ChecksFile.php @@ -171,7 +171,7 @@ break; default: -throw new WmfException( 'INVALID_MESSAGE', Contribution Type '$contype' is unknown whilst importing checks! ); +$msg['contribution_type'] = $msg['raw_contribution_type']; } } diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.module b/sites/all/modules/wmf_civicrm/wmf_civicrm.module index d1e1b79..32771fe 100644 --- a/sites/all/modules/wmf_civicrm/wmf_civicrm.module +++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.module @@ -642,6 +642,9 @@ break; } break; + case 'stock': + $payment_instrument = 'Stock'; + break; case 'cash': $payment_instrument = 'Cash'; //'cash_boleto' - Only one right now. I assume there might be more later? -- To view, visit https://gerrit.wikimedia.org/r/219492 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0b4641311f508ade455d58bf9884b943bc0b4cc3 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: Awight awi...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add page_restrictions to readlock in lockSearchindex - change (mediawiki/core)
Lewis Cawte has uploaded a new change for review. https://gerrit.wikimedia.org/r/219491 Change subject: Add page_restrictions to readlock in lockSearchindex .. Add page_restrictions to readlock in lockSearchindex Bug: T86156 Change-Id: Ie003dd279e2b157a628e415e39f231d5cb1ab468 (cherry picked from commit f50de5d93d8128784735954ed9eccf6f84a1b347) --- M maintenance/Maintenance.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/91/219491/1 diff --git a/maintenance/Maintenance.php b/maintenance/Maintenance.php index 923c5b4..5dafdfc 100644 --- a/maintenance/Maintenance.php +++ b/maintenance/Maintenance.php @@ -1097,7 +1097,7 @@ */ private function lockSearchindex( $db ) { $write = array( 'searchindex' ); - $read = array( 'page', 'revision', 'text', 'interwiki', 'l10n_cache', 'user' ); + $read = array( 'page', 'revision', 'text', 'interwiki', 'l10n_cache', 'user', 'page_restrictions' ); $db-lockTables( $read, $write, __CLASS__ . '::' . __METHOD__ ); } -- To view, visit https://gerrit.wikimedia.org/r/219491 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie003dd279e2b157a628e415e39f231d5cb1ab468 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: REL1_25 Gerrit-Owner: Lewis Cawte le...@lewiscawte.me Gerrit-Reviewer: Physikerwelt w...@physikerwelt.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Only delete option groups that exist - change (wikimedia...civicrm)
Awight has uploaded a new change for review. https://gerrit.wikimedia.org/r/219495 Change subject: Only delete option groups that exist .. Only delete option groups that exist Change-Id: Ia533066526bfcab8e2e8bc1870e1c2307b8f146c --- M CRM/Core/BAO/CustomField.php 1 file changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/civicrm refs/changes/95/219495/1 diff --git a/CRM/Core/BAO/CustomField.php b/CRM/Core/BAO/CustomField.php index f414984..bbd84f7 100644 --- a/CRM/Core/BAO/CustomField.php +++ b/CRM/Core/BAO/CustomField.php @@ -2050,8 +2050,10 @@ return; } -// check if option group is related to any other field -self::checkOptionGroup($currentOptionGroupId); +if ($currentOptionGroupId) { + // check if option group is related to any other field + self::checkOptionGroup($currentOptionGroupId); +} } /** -- To view, visit https://gerrit.wikimedia.org/r/219495 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia533066526bfcab8e2e8bc1870e1c2307b8f146c Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm/civicrm Gerrit-Branch: master Gerrit-Owner: Awight awi...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [WIP] Trying to fix form validation and button enablement - change (mediawiki...Flow)
Sbisson has uploaded a new change for review. https://gerrit.wikimedia.org/r/219448 Change subject: [WIP] Trying to fix form validation and button enablement .. [WIP] Trying to fix form validation and button enablement Change-Id: I3e952280c72216abffc09891f3b1d181d2974464 --- M modules/editor/editors/ext.flow.editors.none.js M modules/editor/editors/visualeditor/ext.flow.editors.visualeditor.js M modules/engine/misc/mw-ui.enhance.js 3 files changed, 40 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/48/219448/1 diff --git a/modules/editor/editors/ext.flow.editors.none.js b/modules/editor/editors/ext.flow.editors.none.js index 4ccc7bc..6522951 100644 --- a/modules/editor/editors/ext.flow.editors.none.js +++ b/modules/editor/editors/ext.flow.editors.none.js @@ -27,6 +27,8 @@ placeholder: this.$node.attr( 'placeholder' ) } ); + this.initialContent = this.getRawContent(); + // Hide textarea attach widget instead this.$node .hide() @@ -94,6 +96,10 @@ return this.widget.getValue(); }; + mw.flow.editors.none.prototype.isDirty = function () { + return this.getRawContent() !== this.initialContent; + }; + /** * Checks whether the field is empty * @@ -144,6 +150,9 @@ // insert help information + editor switcher, and make it interactive board.emitWithReturn( 'makeContentInteractive', $controls.appendTo( this.$node.closest( '.flow-editor' ) ) ); + + // trigger validation of the containing form + this.$node.keyup(); }; mw.flow.editors.none.prototype.focus = function () { diff --git a/modules/editor/editors/visualeditor/ext.flow.editors.visualeditor.js b/modules/editor/editors/visualeditor/ext.flow.editors.visualeditor.js index e839608..b964745 100644 --- a/modules/editor/editors/visualeditor/ext.flow.editors.visualeditor.js +++ b/modules/editor/editors/visualeditor/ext.flow.editors.visualeditor.js @@ -85,6 +85,8 @@ $veNode = surface.$element.find( '.ve-ce-documentNode' ); $veNode.addClass( 'mw-ui-input' ); + this.initialContent = this.getRawContent(); + // HACK: simulate a keyup event on the original node, so the validation code will // pick up changes in the new node $veNode.keyup( $.proxy( function () { @@ -107,6 +109,10 @@ this.$node.show(); }; + mw.flow.editors.visualeditor.prototype.isDirty = function () { + return this.getRawContent() !== this.initialContent; + }; + /** * Gets HTML of Flow field * diff --git a/modules/engine/misc/mw-ui.enhance.js b/modules/engine/misc/mw-ui.enhance.js index e0d5f7f..5e09909 100644 --- a/modules/engine/misc/mw-ui.enhance.js +++ b/modules/engine/misc/mw-ui.enhance.js @@ -92,24 +92,39 @@ * @param {jQuery} $form jQuery object corresponding to a form element. */ function enableFormWithRequiredFields( $form ) { - var - $fields = $form.find( 'input, textarea' ).filter( '[required]' ), - ready = true; + var $fields = $form.find( 'input, textarea' ), + allValid = true, + validated = 0; $fields.each( function () { - var $this = $( this ); + var $this = $( this ), + required = !!$this.attr( 'required' ), + isEmpty, + isDirty, + valid, + editor; + if ( mw.flow.editor.exists( $this ) ) { - if ( mw.flow.editor.getEditor( $this ).isEmpty() ) { - ready = false; - } - } else if ( this.value === '' ) { - ready = false; + editor = mw.flow.editor.getEditor( $this ); + isEmpty = editor.isEmpty(); + isDirty = editor.isDirty(); + } else if ( $this.is( ':visible' ) ) { + isEmpty = !this.value; + isDirty = this.value !== this.initialValue; + } else { + return; } + + valid = required ? !isEmpty isDirty : isDirty; + allValid = allValid valid; + validated++; } ); + +
[MediaWiki-commits] [Gerrit] Update mediawiki codesniffer to 0.3.0 - change (mediawiki/core)
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/219470 Change subject: Update mediawiki codesniffer to 0.3.0 .. Update mediawiki codesniffer to 0.3.0 Change-Id: I77da850809f926d624bfffbaa8fd81a981f10798 --- M composer.json M includes/cache/UserCache.php M includes/specials/SpecialBlockList.php 3 files changed, 7 insertions(+), 11 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/70/219470/1 diff --git a/composer.json b/composer.json index 257c195..fe59a68 100644 --- a/composer.json +++ b/composer.json @@ -34,7 +34,7 @@ jakub-onderka/php-parallel-lint: ~0.8, justinrainbow/json-schema: ~1.3, phpunit/phpunit: 3.7.37, - mediawiki/mediawiki-codesniffer: 0.2.0 + mediawiki/mediawiki-codesniffer: 0.3.0 }, suggest: { ext-fileinfo: *, diff --git a/includes/cache/UserCache.php b/includes/cache/UserCache.php index 8a42489..2a3aac2 100644 --- a/includes/cache/UserCache.php +++ b/includes/cache/UserCache.php @@ -123,11 +123,11 @@ $lb = new LinkBatch(); foreach ( $usersToCheck as $userId = $name ) { if ( $this-queryNeeded( $userId, 'userpage', $options ) ) { - $lb-add( NS_USER, str_replace( ' ', '_', $row-user_name ) ); + $lb-add( NS_USER, $row-user_name ); $this-typesCached[$userId]['userpage'] = 1; } if ( $this-queryNeeded( $userId, 'usertalk', $options ) ) { - $lb-add( NS_USER_TALK, str_replace( ' ', '_', $row-user_name ) ); + $lb-add( NS_USER_TALK, $row-user_name ); $this-typesCached[$userId]['usertalk'] = 1; } } diff --git a/includes/specials/SpecialBlockList.php b/includes/specials/SpecialBlockList.php index 4dd313b..8a9aefd 100644 --- a/includes/specials/SpecialBlockList.php +++ b/includes/specials/SpecialBlockList.php @@ -431,16 +431,12 @@ $lb-setCaller( __METHOD__ ); foreach ( $result as $row ) { - # Usernames and titles are in fact related by a simple substitution of space - underscore - # The last few lines of Title::secureAndSplit() tell the story. - $name = str_replace( ' ', '_', $row-ipb_address ); - $lb-add( NS_USER, $name ); - $lb-add( NS_USER_TALK, $name ); + $lb-add( NS_USER, $row-ipb_address ); + $lb-add( NS_USER_TALK, $row-ipb_address ); if ( isset( $row-by_user_name ) ) { - $username = str_replace( ' ', '_', $row-by_user_name ); - $lb-add( NS_USER, $username ); - $lb-add( NS_USER_TALK, $username ); + $lb-add( NS_USER, $row-by_user_name ); + $lb-add( NS_USER_TALK, $row-by_user_name ); } } -- To view, visit https://gerrit.wikimedia.org/r/219470 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I77da850809f926d624bfffbaa8fd81a981f10798 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Paladox thomasmulhall...@yahoo.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Mobile redirects for non-canonical article URLs - change (operations/puppet)
BBlack has uploaded a new change for review. https://gerrit.wikimedia.org/r/219471 Change subject: Mobile redirects for non-canonical article URLs .. Mobile redirects for non-canonical article URLs We don't yet know why Google is starting to return /?title= links, but apparently it's hurting mobile redirects, so this is a quick fix for that: https://en.wikipedia.org/wiki/Wikipedia:Village_pump_(technical)#Wikipedia_on_a_mobile_browser_is_not_showing_the_mobile_version_of_the_page Change-Id: I32fda7703b510b3f5531e948e8343106c220571e --- M templates/varnish/text-frontend.inc.vcl.erb 1 file changed, 5 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/71/219471/1 diff --git a/templates/varnish/text-frontend.inc.vcl.erb b/templates/varnish/text-frontend.inc.vcl.erb index ad73aa9..164aede 100644 --- a/templates/varnish/text-frontend.inc.vcl.erb +++ b/templates/varnish/text-frontend.inc.vcl.erb @@ -45,7 +45,11 @@ (req.http.User-Agent ~ (?i)(mobi|240x240|240x320|320x320|alcatel|android|audiovox|bada|benq|blackberry|cdm-|compal-|docomo|ericsson|hiptop|htc[-_]|huawei|ipod|kddi-|kindle|meego|midp|mitsu|mmp\/|mot-|motor|ngm_|nintendo|opera.m|palm|panasonic|philips|phone|playstation|portalmmm|sagem-|samsung|sanyo|sec-|semc-browser|sendo|sharp|silk|softbank|symbian|teleca|up.browser|vodafone|webos) || req.http.User-Agent ~ ^(?i)(lge?|sie|nec|sgh|pg)- || req.http.Accept ~ vnd.wap.wml) req.http.Cookie !~ (stopMobileRedirect=true|mf_useformat=desktop) -req.url ~ ^/(wiki|(gan|ike|iu|kk|ku|shi|sr|tg|uz|zh)(-[a-z]+)?)[/\?]) { +( + req.url ~ ^/(wiki|(gan|ike|iu|kk|ku|shi|sr|tg|uz|zh)(-[a-z]+)?)[/\?] + || req.url ~ ^/w/index\.php + || req.url ~ ^/\?title= + ) { // Separate regexps for clarity, but multiple regsubs instead of // if host ~/regsub matches for efficiency. Be careful to not -- To view, visit https://gerrit.wikimedia.org/r/219471 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I32fda7703b510b3f5531e948e8343106c220571e Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BBlack bbl...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Hygiene: Add API support for obtaining content sans lead sec... - change (mediawiki...MobileFrontend)
Jdlrobson has uploaded a new change for review. https://gerrit.wikimedia.org/r/219490 Change subject: Hygiene: Add API support for obtaining content sans lead section .. Hygiene: Add API support for obtaining content sans lead section Needed to enable us to only serve the lead section Change-Id: I85f3321194073089d8833ef9baf04452190ff608 --- M includes/api/ApiMobileView.php M resources/mobile.startup/PageApi.js 2 files changed, 11 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/90/219490/1 diff --git a/includes/api/ApiMobileView.php b/includes/api/ApiMobileView.php index ffce1c0..011cfc5 100644 --- a/includes/api/ApiMobileView.php +++ b/includes/api/ApiMobileView.php @@ -356,7 +356,10 @@ $sectionCount = count( $data['sections'] ); if ( $str === 'all' ) { return range( 0, $sectionCount ); + } elseif ( $str === 'allbutlead' ) { + return array_slice( range( 0, $sectionCount ), 1, null, true ); } + $sections = array_map( 'trim', explode( '|', $str ) ); $ret = array(); foreach ( $sections as $sec ) { diff --git a/resources/mobile.startup/PageApi.js b/resources/mobile.startup/PageApi.js index f9f39f7..2f46fdb 100644 --- a/resources/mobile.startup/PageApi.js +++ b/resources/mobile.startup/PageApi.js @@ -100,10 +100,12 @@ * @method * @param {String} title the title of the page to be retrieved * @param {String} endpoint an alternative api url to retrieve the page from -* @param {Boolean} leadOnly When set only the lead section content is returned +* @param {String} sections keyword for sections api. Defaults to 'all' +* @param {Number} [cacheTime] to apply caching, defaults to no caching +* @param {String} [revisionid] the page's revisionid * @return {jQuery.Deferred} with parameter page data that can be passed to a Page view */ - getPage: function ( title, endpoint, leadOnly ) { + getPage: function ( title, endpoint, sections, cacheTime, revisionid ) { var page, timestamp, options = endpoint ? { url: endpoint, @@ -118,13 +120,16 @@ this.get( { action: 'mobileview', page: title, + revisionid: revisionid || '', // Invalid API parameter, used for caching purposes + smaxage: cacheTime || 0, + maxage: cacheTime || 0, variant: mw.config.get( 'wgPreferredVariant' ), redirect: 'yes', prop: 'id|sections|text|lastmodified|lastmodifiedby|languagecount|hasvariants|protection|displaytitle|revision', noheadings: 'yes', noimages: mw.config.get( 'wgImagesDisabled', false ) ? 1 : undefined, sectionprop: 'level|line|anchor', - sections: leadOnly ? 0 : 'all' + sections: sections ? sections : 'all' }, options ).done( function ( resp ) { var sections, lastModified, resolveObj, mv; -- To view, visit https://gerrit.wikimedia.org/r/219490 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I85f3321194073089d8833ef9baf04452190ff608 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Jdlrobson jrob...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Hygiene: Allow rendering of sections - change (mediawiki...MobileFrontend)
Jdlrobson has uploaded a new change for review. https://gerrit.wikimedia.org/r/219489 Change subject: Hygiene: Allow rendering of sections .. Hygiene: Allow rendering of sections In the long term perfect future we would be able to use this on server side when combined with Parsoid. Change-Id: I76f58051aaed04053da5c637fb491068be936984 --- M includes/Resources.php M resources/mobile.startup/Section.hogan M resources/mobile.startup/Section.js A resources/mobile.startup/heading.hogan M tests/qunit/mobile.startup/test_PageApi.js 5 files changed, 23 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/89/219489/1 diff --git a/includes/Resources.php b/includes/Resources.php index 1466e6a..e0fb723 100644 --- a/includes/Resources.php +++ b/includes/Resources.php @@ -494,6 +494,8 @@ 'button.hogan' = 'resources/mobile.startup/button.hogan', ), 'messages' = array( + // Sections.js + 'edit', // icons.js 'mobile-frontend-loading-message', 'mobile-frontend-console-recruit', diff --git a/resources/mobile.startup/Section.hogan b/resources/mobile.startup/Section.hogan index 0ad5fdb..b3d3eaa 100644 --- a/resources/mobile.startup/Section.hogan +++ b/resources/mobile.startup/Section.hogan @@ -1,2 +1,2 @@ -{{#line}}h{{level}} id={{anchor}}{{{line}}}/h{{level}}{{/line}} -{{{text}}} +{{#line}}h{{level}} id={{anchor}}span{{{line}}}/span{{#editIcon}}{{icon}}{{/editIcon}}/h{{level}}{{/line}} +div{{{text}}}/div diff --git a/resources/mobile.startup/Section.js b/resources/mobile.startup/Section.js index 95c1515..90458a5 100644 --- a/resources/mobile.startup/Section.js +++ b/resources/mobile.startup/Section.js @@ -2,6 +2,7 @@ var View = M.require( 'View' ), Section, + Icon = M.require( 'Icon' ), icons = M.require( 'icons' ); /** @@ -11,13 +12,18 @@ */ Section = View.extend( { template: mw.template.get( 'mobile.startup', 'Section.hogan' ), + templatePartials: { + icon: Icon.prototype.template + }, /** * @cfg {Object} defaults Default options hash. * @cfg {String} defaults.text Section text. +* @cfg {Object} defaults.editIcon options for an edit button. * @cfg {String} defaults.spinner HTML of the spinner icon. */ defaults: { line: undefined, + editIcon: undefined, text: '', spinner: icons.spinner().toHtmlString() }, @@ -29,6 +35,13 @@ this.text = options.text; this.hasReferences = options.hasReferences || false; this.id = options.id || null; + options.editIcon = new Icon( { + href: '#/editor/' + options.id, + name: 'edit-enabled', + title: mw.msg( 'edit' ), + label: mw.msg( 'edit' ), + additionalClassNames: 'edit-page' + } ).options; this.anchor = options.anchor; this.children = []; $.each( options.children || [], function () { diff --git a/resources/mobile.startup/heading.hogan b/resources/mobile.startup/heading.hogan new file mode 100644 index 000..0933979 --- /dev/null +++ b/resources/mobile.startup/heading.hogan @@ -0,0 +1 @@ +{{#line}}h{{level}} id={{anchor}}span{{{line}}}/span{{#editIcon}}{{icon}}{{/editIcon}}/h{{level}}{{/line}} \ No newline at end of file diff --git a/tests/qunit/mobile.startup/test_PageApi.js b/tests/qunit/mobile.startup/test_PageApi.js index 195c5a4..554a10e 100644 --- a/tests/qunit/mobile.startup/test_PageApi.js +++ b/tests/qunit/mobile.startup/test_PageApi.js @@ -83,7 +83,7 @@ line: '1', anchor: '1', id: 1, - text: 'pText of 1\n/ph2 id=1.1i1.1/i/h2\npText of 1.1\n/p\n', + text: 'pText of 1\n/ph2 id=1.1spani1.1/i/span/h2\ndivpText of 1.1\n/p/div\n', children: [ { level: '2', @@ -100,7 +100,7 @@ line: '2',
[MediaWiki-commits] [Gerrit] cassandra: add restbase1009 to cassandra::seeds - change (operations/puppet)
Filippo Giunchedi has uploaded a new change for review. https://gerrit.wikimedia.org/r/219496 Change subject: cassandra: add restbase1009 to cassandra::seeds .. cassandra: add restbase1009 to cassandra::seeds Bug: T102015 Change-Id: I367175c48a0764ba1b1830204a44786ac5f9e2db --- M hieradata/role/common/cassandra.yaml 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/96/219496/1 diff --git a/hieradata/role/common/cassandra.yaml b/hieradata/role/common/cassandra.yaml index c55f5c9..8c699f9 100644 --- a/hieradata/role/common/cassandra.yaml +++ b/hieradata/role/common/cassandra.yaml @@ -12,6 +12,7 @@ - restbase1005.eqiad.wmnet - restbase1006.eqiad.wmnet - restbase1008.eqiad.wmnet +- restbase1009.eqiad.wmnet cassandra::max_heap_size: 8g # 1/4 heap size, no more than 100m/thread cassandra::heap_newsize: 2048m -- To view, visit https://gerrit.wikimedia.org/r/219496 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I367175c48a0764ba1b1830204a44786ac5f9e2db Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Filippo Giunchedi fgiunch...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add a wfWaitForSlaves call in the count update loop - change (mediawiki...Gather)
Gergő Tisza has uploaded a new change for review. https://gerrit.wikimedia.org/r/219499 Change subject: Add a wfWaitForSlaves call in the count update loop .. Add a wfWaitForSlaves call in the count update loop Change-Id: Ia294ab963bb0be6bb7cce383391095ea081f5f9c --- M maintenance/updateCounts.php 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gather refs/changes/99/219499/1 diff --git a/maintenance/updateCounts.php b/maintenance/updateCounts.php index 7a882c5..3c40c90 100644 --- a/maintenance/updateCounts.php +++ b/maintenance/updateCounts.php @@ -68,6 +68,8 @@ $dbw-commit( __METHOD__ ); $maxGlId = max( $ids ); + + wfWaitForSlaves(); } while ( $res-numRows() ); } } -- To view, visit https://gerrit.wikimedia.org/r/219499 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia294ab963bb0be6bb7cce383391095ea081f5f9c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Gather Gerrit-Branch: master Gerrit-Owner: Gergő Tisza gti...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [FIX] InteractiveReplace: Correctly map 'y' - change (pywikibot/core)
XZise has uploaded a new change for review. https://gerrit.wikimedia.org/r/219500 Change subject: [FIX] InteractiveReplace: Correctly map 'y' .. [FIX] InteractiveReplace: Correctly map 'y' It needs to cache which option now uses 'y' as a shortcut so that it can invert this later and other parts don't even see that 'y' was actually the shortcut. But this was done incorrectly and it always used the last allowed replace option instead of the first it was applied to. Change-Id: I56b32a0f69147fb46772b8a1dffdaef5b19931de --- M pywikibot/bot.py 1 file changed, 28 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/00/219500/1 diff --git a/pywikibot/bot.py b/pywikibot/bot.py index b58351d..af5023f 100644 --- a/pywikibot/bot.py +++ b/pywikibot/bot.py @@ -761,6 +761,26 @@ self.allow_replace_label = False self.allow_replace_all = False +@staticmethod +def add_choice(choices, option, shortcut, yes_used): + +Add the option and shortcut (or 'y') to choices. + +@param choices: The choices the option is added to. +@type choices: list +@param option: The option text +@type option: str +@param shortcut: The shortcut +@type shortcut: str +@param yes_used: Whether the 'y' shortcut has been used already. If +False it'll use the shortcut and return it. +@type yes_used: bool or str +@return: the shortcut used for 'y' (True if it's used for nothing) +@rtype: bool or str + +choices.append((option, shortcut if yes_used else 'y')) +return yes_used if yes_used else shortcut + def build_choices(self): Return the choices and what the shortcut 'y' actually means. @@ -778,17 +798,17 @@ choices += [('Unlink', 'u')] yes_used = not self._yes if self.allow_replace: -choices += [('Change link target', 't' if yes_used else 'y')] -yes_used = 't' +yes_used = self._add_choice(choices, 'Change link target', +'t', yes_used) if self.allow_replace_section: -choices += [('Change link target and section', 's' if yes_used else 'y')] -yes_used = 's' +yes_used = self._add_choice( +choices, 'Change link target and section', 's', yes_used) if self.allow_replace_label: -choices += [('Change link target and label', 'l' if yes_used else 'y')] -yes_used = 'l' +yes_used = self._add_choice( +choices, 'Change link target and label', 'l', yes_used) if self.allow_replace_all: -choices += [('Change complete link', 'c' if yes_used else 'y')] -yes_used = 'c' +yes_used = self._add_choice( +choices, 'Change complete link', 'c', yes_used) # 'y' was disabled in the constructor so return False as it was actually # not used if yes_used is True: -- To view, visit https://gerrit.wikimedia.org/r/219500 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I56b32a0f69147fb46772b8a1dffdaef5b19931de Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: XZise commodorefabia...@gmx.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] QA: Fix failing smoke test for watchlist feature - change (mediawiki...MobileFrontend)
Jdlrobson has uploaded a new change for review. https://gerrit.wikimedia.org/r/219501 Change subject: QA: Fix failing smoke test for watchlist feature .. QA: Fix failing smoke test for watchlist feature Broken by I6d6191c33b4c09dc8b991fe7c15f4c15bec7de1e Change-Id: I86565a49aa663ba100790e339b048e8337da5cb2 --- M tests/browser/features/support/pages/watchlist_page.rb 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/01/219501/1 diff --git a/tests/browser/features/support/pages/watchlist_page.rb b/tests/browser/features/support/pages/watchlist_page.rb index 4163bf4..2b3f418 100644 --- a/tests/browser/features/support/pages/watchlist_page.rb +++ b/tests/browser/features/support/pages/watchlist_page.rb @@ -1,7 +1,7 @@ class WatchlistPage ArticlePage a(:feed_link, text: 'Modified') a(:list_link, text: 'List') - ul(:page_list_diffs, class: 'page-list side-list') - ul(:page_list_a_to_z, class: 'watchlist page-list thumbs') + ul(:page_list_diffs, css: '.diff-summary-list') + ul(:page_list_a_to_z, css: '.page-summary-list') a(:pages_tab_link, text: 'Pages') end -- To view, visit https://gerrit.wikimedia.org/r/219501 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I86565a49aa663ba100790e339b048e8337da5cb2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Jdlrobson jrob...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] CharacterBeforePHPOpeningTagSniff: Support T_HASHBANG for HH... - change (mediawiki...codesniffer)
jenkins-bot has submitted this change and it was merged. Change subject: CharacterBeforePHPOpeningTagSniff: Support T_HASHBANG for HHVM =3.5,3.7 .. CharacterBeforePHPOpeningTagSniff: Support T_HASHBANG for HHVM =3.5,3.7 token_get_all() in HHVM =3.5,3.7 will interpret a hashbang as T_HASHBANG rather than T_INLINE_HTML like PHP5. This has been fixed upstream in https://github.com/facebook/hhvm/pull/5023, but we need to support 3.6.0. Bug: T103119 Change-Id: Iac4745580bae313505af370d6361c800f5587f5a --- M MediaWiki/Sniffs/ExtraCharacters/CharacterBeforePHPOpeningTagSniff.php 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Polybuildr: Looks good to me, approved jenkins-bot: Verified diff --git a/MediaWiki/Sniffs/ExtraCharacters/CharacterBeforePHPOpeningTagSniff.php b/MediaWiki/Sniffs/ExtraCharacters/CharacterBeforePHPOpeningTagSniff.php index a27df2b..e8a419d 100644 --- a/MediaWiki/Sniffs/ExtraCharacters/CharacterBeforePHPOpeningTagSniff.php +++ b/MediaWiki/Sniffs/ExtraCharacters/CharacterBeforePHPOpeningTagSniff.php @@ -31,7 +31,8 @@ // so the first token is on the first line // check if it is valid shebang - if ( $tokens[0]['type'] == 'T_INLINE_HTML' + // T_HASHBANG is a token used in HHVM =3.5, 3.7 (T103119) + if ( in_array( $tokens[0]['type'], array( 'T_INLINE_HTML', 'T_HASHBANG' ) ) substr( $tokens[0]['content'], 0, 2 ) == '#!' ) { $validShebang = true; } -- To view, visit https://gerrit.wikimedia.org/r/219394 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iac4745580bae313505af370d6361c800f5587f5a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/tools/codesniffer Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: Addshore addshorew...@gmail.com Gerrit-Reviewer: Hashar has...@free.fr Gerrit-Reviewer: Polybuildr v.a.ghai...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix jmxtrans process check command for newer version of jmxt... - change (operations/puppet)
Ottomata has submitted this change and it was merged. Change subject: Fix jmxtrans process check command for newer version of jmxtrans .. Fix jmxtrans process check command for newer version of jmxtrans Change-Id: Id74c5437908698905dafd84d4ecc59d6101286e7 --- M manifests/role/analytics/kafka.pp 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Ottomata: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/role/analytics/kafka.pp b/manifests/role/analytics/kafka.pp index b77e7d8..66c7e42 100644 --- a/manifests/role/analytics/kafka.pp +++ b/manifests/role/analytics/kafka.pp @@ -200,7 +200,7 @@ # Generate icinga alert if this jmxtrans instance is not running. nrpe::monitor_service { 'jmxtrans': description = 'jmxtrans', -nrpe_command = '/usr/lib/nagios/plugins/check_procs -c 1:1 -C java -a -jar jmxtrans-all.jar', +nrpe_command = '/usr/lib/nagios/plugins/check_procs -c 1:1 -C java --ereg-argument-array -jar.+jmxtrans-all.jar', require = Class['::kafka::server::jmxtrans'], } -- To view, visit https://gerrit.wikimedia.org/r/219447 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id74c5437908698905dafd84d4ecc59d6101286e7 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ottomata o...@wikimedia.org Gerrit-Reviewer: Ottomata o...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] build: Updating development dependencies - change (mediawiki...SandboxLink)
jenkins-bot has submitted this change and it was merged. Change subject: build: Updating development dependencies .. build: Updating development dependencies * jakub-onderka/php-parallel-lint: 0.8.0 → 0.9 * mediawiki/mediawiki-codesniffer: 0.2.0 → 0.3.0 Change-Id: I70fcd22983a1ce3b50a75baf5d0803f090bd5c92 --- M composer.json 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Jforrester: Looks good to me, approved jenkins-bot: Verified diff --git a/composer.json b/composer.json index a95bae6..263ca10 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { require-dev: { - jakub-onderka/php-parallel-lint: 0.8.0, - mediawiki/mediawiki-codesniffer: 0.2.0 + jakub-onderka/php-parallel-lint: 0.9, + mediawiki/mediawiki-codesniffer: 0.3.0 }, scripts: { test: [ -- To view, visit https://gerrit.wikimedia.org/r/219454 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I70fcd22983a1ce3b50a75baf5d0803f090bd5c92 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SandboxLink Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: Jforrester jforres...@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] build: Updating development dependencies - change (mediawiki...MobileFrontend)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/219463 Change subject: build: Updating development dependencies .. build: Updating development dependencies * jakub-onderka/php-parallel-lint: 0.8.* → 0.9 * mediawiki/mediawiki-codesniffer: 0.1.0 → 0.3.0 Change-Id: I80af554da4c76689d108b29485e1e1edd7658293 --- M composer.json 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/63/219463/1 diff --git a/composer.json b/composer.json index 6f6d621..321fabf 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { require-dev: { - jakub-onderka/php-parallel-lint: 0.8.*, - mediawiki/mediawiki-codesniffer: 0.1.0 + jakub-onderka/php-parallel-lint: 0.9, + mediawiki/mediawiki-codesniffer: 0.3.0 }, scripts: { test: [ -- To view, visit https://gerrit.wikimedia.org/r/219463 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I80af554da4c76689d108b29485e1e1edd7658293 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend 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] Output error message instead of failing for more than just html - change (mediawiki...Flow)
Matthias Mullie has uploaded a new change for review. https://gerrit.wikimedia.org/r/219476 Change subject: Output error message instead of failing for more than just html .. Output error message instead of failing for more than just html Just like for html output, other formats (like plaintext for title) should show a failed to load content content instead of failing completely. Meanwhile also moved the other (valid) exception up top: for practical reasons so I can have an overarching try/catch for content failures, but also because bad data request should fail before even checking those permissions. Bug: T98547 Change-Id: I2609626e18c80d379cb839ccaed2a4b10924bfd6 --- M includes/Templating.php 1 file changed, 18 insertions(+), 17 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/76/219476/1 diff --git a/includes/Templating.php b/includes/Templating.php index 8f56593..3d9cd77 100644 --- a/includes/Templating.php +++ b/includes/Templating.php @@ -122,6 +122,10 @@ * @throws InvalidInputException */ public function getContent( AbstractRevision $revision, $format = 'fixed-html' ) { + if ( !in_array( $format, array( 'fixed-html', 'html', 'plaintext', 'wikitext' ) ) ) { + throw new InvalidInputException( 'Invalid format: ' . $format ); + } + $allowed = $this-permissions-isAllowed( $revision, 'view' ); // Posts require view access to the topic title as well if ( $allowed $revision instanceof PostRevision !$revision-isTopicTitle() ) { @@ -136,26 +140,23 @@ return ''; } - // fixed html format - if ( $format === 'fixed-html' ) { - // Parsoid doesn't render redlinks doesn't strip bad images - try { + try { + if ( $format === 'fixed-html' ) { + // Parsoid doesn't render redlinks doesn't strip bad images $content = $this-contentFixer-getContent( $revision ); - } catch ( \Exception $e ) { - wfDebugLog( 'Flow', __METHOD__ . ': Failed fix content for rev_id = ' . $revision-getRevisionId()-getAlphadecimal() ); - \MWExceptionHandler::logException( $e ); - - $content = wfMessage( 'flow-stub-post-content' )-parse(); + } else { + // plaintext = wikitext + $format = $format === 'plaintext' ? 'wikitext' : $format; + $content = $revision-getContent( $format ); } - // all other formats - } elseif ( in_array( $format, array( 'html', 'plaintext', 'wikitext' ) ) ) { - if ( $format === 'plaintext' ) { - $format = 'wikitext'; - } + } catch ( \Exception $e ) { + wfDebugLog( 'Flow', __METHOD__ . ': Failed to get content for rev_id = ' . $revision-getRevisionId()-getAlphadecimal() ); + \MWExceptionHandler::logException( $e ); - $content = $revision-getContent( $format ); - } else { - throw new InvalidInputException( 'Invalid format: ' . $format ); + $content = wfMessage( 'flow-stub-post-content' )-parse(); + if ( !in_array( $format, array( 'html', 'fixed-html' ) ) ) { + $content = strip_tags( $content ); + } } return $content; -- To view, visit https://gerrit.wikimedia.org/r/219476 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2609626e18c80d379cb839ccaed2a4b10924bfd6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Matthias Mullie mmul...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Have Flow occupy a namespace that CirrusSearch doesn't edit - change (mediawiki/vagrant)
Mattflaschen has uploaded a new change for review. https://gerrit.wikimedia.org/r/219494 Change subject: Have Flow occupy a namespace that CirrusSearch doesn't edit .. Have Flow occupy a namespace that CirrusSearch doesn't edit Change-Id: I53567cea083576e7b7023c2bc77285eb743a0337 --- M puppet/modules/role/templates/flow/conf.php.erb 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant refs/changes/94/219494/1 diff --git a/puppet/modules/role/templates/flow/conf.php.erb b/puppet/modules/role/templates/flow/conf.php.erb index e46609a..cecf277 100644 --- a/puppet/modules/role/templates/flow/conf.php.erb +++ b/puppet/modules/role/templates/flow/conf.php.erb @@ -8,7 +8,7 @@ 'Talk:Flow QA', // used by Flow extension's browser tests 'Talk:Sandbox', ); -$wgFlowOccupyNamespaces = array( NS_USER_TALK ); +$wgFlowOccupyNamespaces = array( NS_HELP_TALK ); $wgFlowParsoidURL = 'http://localhost:%= scope['mediawiki::parsoid::port'] %'; $wgFlowParsoidPrefix = 'localhost'; $wgFlowParsoidTimeout = 100; -- To view, visit https://gerrit.wikimedia.org/r/219494 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I53567cea083576e7b7023c2bc77285eb743a0337 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/vagrant 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] build: Updating development dependencies - change (mediawiki...WikiEditor)
jenkins-bot has submitted this change and it was merged. Change subject: build: Updating development dependencies .. build: Updating development dependencies * jakub-onderka/php-parallel-lint: 0.8.0 → 0.9 * mediawiki/mediawiki-codesniffer: 0.2.0 → 0.3.0 Change-Id: I4e6bc08d77da698fe8b5654a205a583ae60f9f35 --- M composer.json 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Jforrester: Looks good to me, approved jenkins-bot: Verified diff --git a/composer.json b/composer.json index 21efa7e..18feb33 100644 --- a/composer.json +++ b/composer.json @@ -1,8 +1,8 @@ { - license: GPL-2.0+, + license: GPL-2.0+, require-dev: { - jakub-onderka/php-parallel-lint: 0.8.0, - mediawiki/mediawiki-codesniffer: 0.2.0 + jakub-onderka/php-parallel-lint: 0.9, + mediawiki/mediawiki-codesniffer: 0.3.0 }, scripts: { test: [ -- To view, visit https://gerrit.wikimedia.org/r/219452 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4e6bc08d77da698fe8b5654a205a583ae60f9f35 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikiEditor Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: Jforrester jforres...@wikimedia.org Gerrit-Reviewer: TheDJ hartman.w...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] build: Updating development dependencies - change (mediawiki...TemplateData)
jenkins-bot has submitted this change and it was merged. Change subject: build: Updating development dependencies .. build: Updating development dependencies * jakub-onderka/php-parallel-lint: 0.8.0 → 0.9 * mediawiki/mediawiki-codesniffer: 0.2.0 → 0.3.0 Change-Id: Ie92768bc59eec44cb0ee8c0d97e758bd434f37a4 --- M composer.json 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Jforrester: Looks good to me, approved jenkins-bot: Verified diff --git a/composer.json b/composer.json index a95bae6..263ca10 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { require-dev: { - jakub-onderka/php-parallel-lint: 0.8.0, - mediawiki/mediawiki-codesniffer: 0.2.0 + jakub-onderka/php-parallel-lint: 0.9, + mediawiki/mediawiki-codesniffer: 0.3.0 }, scripts: { test: [ -- To view, visit https://gerrit.wikimedia.org/r/219455 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie92768bc59eec44cb0ee8c0d97e758bd434f37a4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TemplateData Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: Jforrester jforres...@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] build: Updating development dependencies - change (cdb)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/219468 Change subject: build: Updating development dependencies .. build: Updating development dependencies * jakub-onderka/php-parallel-lint: 0.8.* → 0.9 * mediawiki/mediawiki-codesniffer: 0.2.0 → 0.3.0 Change-Id: I0cb7e0a5c92b4a71f6dbdf3d6dd796bef2065cd5 --- M composer.json 1 file changed, 34 insertions(+), 32 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/cdb refs/changes/68/219468/1 diff --git a/composer.json b/composer.json index 366ac9f..5e4cba9 100644 --- a/composer.json +++ b/composer.json @@ -1,34 +1,36 @@ { -name: wikimedia/cdb, -description: Constant Database (CDB) wrapper library for PHP. Provides pure-PHP fallback when dba_* functions are absent., -license: GPL-2.0, -homepage: https://www.mediawiki.org/wiki/CDB;, -authors: [ -{ -name: Tim Starling, -email: tstarl...@wikimedia.org -}, -{ -name: Chad Horohoe, -email: c...@wikimedia.org -} -], -autoload: { -classmap: [src/] -}, -require: { -php: =5.3.2 -}, -require-dev: { -jakub-onderka/php-parallel-lint: 0.8.*, -phpunit/phpunit: 4.6.*, -mediawiki/mediawiki-codesniffer: 0.2.0 -}, -scripts: { -test: [ -parallel-lint . --exclude vendor, -phpunit $PHPUNIT_ARGS, -phpcs -p -] -} + name: wikimedia/cdb, + description: Constant Database (CDB) wrapper library for PHP. Provides pure-PHP fallback when dba_* functions are absent., + license: GPL-2.0, + homepage: https://www.mediawiki.org/wiki/CDB;, + authors: [ + { + name: Tim Starling, + email: tstarl...@wikimedia.org + }, + { + name: Chad Horohoe, + email: c...@wikimedia.org + } + ], + autoload: { + classmap: [ + src/ + ] + }, + require: { + php: =5.3.2 + }, + require-dev: { + jakub-onderka/php-parallel-lint: 0.9, + phpunit/phpunit: 4.6.*, + mediawiki/mediawiki-codesniffer: 0.3.0 + }, + scripts: { + test: [ + parallel-lint . --exclude vendor, + phpunit $PHPUNIT_ARGS, + phpcs -p + ] + } } -- To view, visit https://gerrit.wikimedia.org/r/219468 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0cb7e0a5c92b4a71f6dbdf3d6dd796bef2065cd5 Gerrit-PatchSet: 1 Gerrit-Project: cdb 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] build: Updating development dependencies - change (at-ease)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/219467 Change subject: build: Updating development dependencies .. build: Updating development dependencies * jakub-onderka/php-parallel-lint: 0.8.* → 0.9 * mediawiki/mediawiki-codesniffer: 0.1.0 → 0.3.0 Change-Id: I2acf58e71c9f9020a110052fa3778b9c885b5f8e --- M composer.json 1 file changed, 5 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/at-ease refs/changes/67/219467/1 diff --git a/composer.json b/composer.json index f5fcaf4..404a559 100644 --- a/composer.json +++ b/composer.json @@ -14,15 +14,17 @@ } ], autoload: { - files: [src/Functions.php] + files: [ + src/Functions.php + ] }, require: { php: =5.3.3 }, require-dev: { - jakub-onderka/php-parallel-lint: 0.8.*, + jakub-onderka/php-parallel-lint: 0.9, squizlabs/php_codesniffer: 2.3.0, - mediawiki/mediawiki-codesniffer: 0.1.0, + mediawiki/mediawiki-codesniffer: 0.3.0, phpunit/phpunit: ~4.5 }, scripts: { -- To view, visit https://gerrit.wikimedia.org/r/219467 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2acf58e71c9f9020a110052fa3778b9c885b5f8e Gerrit-PatchSet: 1 Gerrit-Project: at-ease 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] build: Remove $.._ARGS variables which don't work on Windows - change (oojs/ui)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/219472 Change subject: build: Remove $.._ARGS variables which don't work on Windows .. build: Remove $.._ARGS variables which don't work on Windows These aren't used yet by jenkins, but break on Windows. Change-Id: I23ccff596771ae477d118b1eaf410de9f2aab985 --- M composer.json 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/72/219472/1 diff --git a/composer.json b/composer.json index 47a601a..a9883fc 100644 --- a/composer.json +++ b/composer.json @@ -19,8 +19,8 @@ scripts: { test: [ parallel-lint . --exclude vendor, - phpcs $PHPCS_ARGS --standard=vendor/mediawiki/mediawiki-codesniffer/MediaWiki --ignore=vendor --extensions=php,php5,inc -p ., - phpunit $PHPUNIT_ARGS + phpcs --standard=vendor/mediawiki/mediawiki-codesniffer/MediaWiki --ignore=vendor --extensions=php,php5,inc -p ., + phpunit ] } } -- To view, visit https://gerrit.wikimedia.org/r/219472 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I23ccff596771ae477d118b1eaf410de9f2aab985 Gerrit-PatchSet: 1 Gerrit-Project: oojs/ui 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] Mobile redirects for non-canonical article URLs - change (operations/puppet)
BBlack has submitted this change and it was merged. Change subject: Mobile redirects for non-canonical article URLs .. Mobile redirects for non-canonical article URLs We don't yet know why Google is starting to return /?title= links, but apparently it's hurting mobile redirects, so this is a quick fix for that. Bug: T103158 Change-Id: I32fda7703b510b3f5531e948e8343106c220571e --- M templates/varnish/text-frontend.inc.vcl.erb 1 file changed, 5 insertions(+), 1 deletion(-) Approvals: MaxSem: Looks good to me, but someone else must approve BBlack: Looks good to me, approved jenkins-bot: Verified diff --git a/templates/varnish/text-frontend.inc.vcl.erb b/templates/varnish/text-frontend.inc.vcl.erb index ad73aa9..164aede 100644 --- a/templates/varnish/text-frontend.inc.vcl.erb +++ b/templates/varnish/text-frontend.inc.vcl.erb @@ -45,7 +45,11 @@ (req.http.User-Agent ~ (?i)(mobi|240x240|240x320|320x320|alcatel|android|audiovox|bada|benq|blackberry|cdm-|compal-|docomo|ericsson|hiptop|htc[-_]|huawei|ipod|kddi-|kindle|meego|midp|mitsu|mmp\/|mot-|motor|ngm_|nintendo|opera.m|palm|panasonic|philips|phone|playstation|portalmmm|sagem-|samsung|sanyo|sec-|semc-browser|sendo|sharp|silk|softbank|symbian|teleca|up.browser|vodafone|webos) || req.http.User-Agent ~ ^(?i)(lge?|sie|nec|sgh|pg)- || req.http.Accept ~ vnd.wap.wml) req.http.Cookie !~ (stopMobileRedirect=true|mf_useformat=desktop) -req.url ~ ^/(wiki|(gan|ike|iu|kk|ku|shi|sr|tg|uz|zh)(-[a-z]+)?)[/\?]) { +( + req.url ~ ^/(wiki|(gan|ike|iu|kk|ku|shi|sr|tg|uz|zh)(-[a-z]+)?)[/\?] + || req.url ~ ^/w/index\.php + || req.url ~ ^/\?title= + ) { // Separate regexps for clarity, but multiple regsubs instead of // if host ~/regsub matches for efficiency. Be careful to not -- To view, visit https://gerrit.wikimedia.org/r/219471 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I32fda7703b510b3f5531e948e8343106c220571e Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BBlack bbl...@wikimedia.org Gerrit-Reviewer: BBlack bbl...@wikimedia.org Gerrit-Reviewer: MaxSem maxsem.w...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Bugfix for d22e8bc6 - change (operations/puppet)
BBlack has submitted this change and it was merged. Change subject: Bugfix for d22e8bc6 .. Bugfix for d22e8bc6 Change-Id: Ic40a692897c2dc436efd0085500e40f690262376 --- M templates/varnish/text-frontend.inc.vcl.erb 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: BBlack: Verified; Looks good to me, approved diff --git a/templates/varnish/text-frontend.inc.vcl.erb b/templates/varnish/text-frontend.inc.vcl.erb index 164aede..c70239d 100644 --- a/templates/varnish/text-frontend.inc.vcl.erb +++ b/templates/varnish/text-frontend.inc.vcl.erb @@ -49,7 +49,7 @@ req.url ~ ^/(wiki|(gan|ike|iu|kk|ku|shi|sr|tg|uz|zh)(-[a-z]+)?)[/\?] || req.url ~ ^/w/index\.php || req.url ~ ^/\?title= - ) { + )) { // Separate regexps for clarity, but multiple regsubs instead of // if host ~/regsub matches for efficiency. Be careful to not -- To view, visit https://gerrit.wikimedia.org/r/219478 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic40a692897c2dc436efd0085500e40f690262376 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BBlack bbl...@wikimedia.org Gerrit-Reviewer: BBlack bbl...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Bugfix for d22e8bc6 - change (operations/puppet)
BBlack has uploaded a new change for review. https://gerrit.wikimedia.org/r/219478 Change subject: Bugfix for d22e8bc6 .. Bugfix for d22e8bc6 Change-Id: Ic40a692897c2dc436efd0085500e40f690262376 --- M templates/varnish/text-frontend.inc.vcl.erb 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/78/219478/1 diff --git a/templates/varnish/text-frontend.inc.vcl.erb b/templates/varnish/text-frontend.inc.vcl.erb index 164aede..c70239d 100644 --- a/templates/varnish/text-frontend.inc.vcl.erb +++ b/templates/varnish/text-frontend.inc.vcl.erb @@ -49,7 +49,7 @@ req.url ~ ^/(wiki|(gan|ike|iu|kk|ku|shi|sr|tg|uz|zh)(-[a-z]+)?)[/\?] || req.url ~ ^/w/index\.php || req.url ~ ^/\?title= - ) { + )) { // Separate regexps for clarity, but multiple regsubs instead of // if host ~/regsub matches for efficiency. Be careful to not -- To view, visit https://gerrit.wikimedia.org/r/219478 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic40a692897c2dc436efd0085500e40f690262376 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BBlack bbl...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Hygiene: Simplify main menu button selectors - change (mediawiki...MobileFrontend)
Bmansurov has uploaded a new change for review. https://gerrit.wikimedia.org/r/219479 Change subject: Hygiene: Simplify main menu button selectors .. Hygiene: Simplify main menu button selectors Change-Id: I1790eb7438182356ad62b840efe2d3fef169fa49 --- M includes/skins/SkinMinerva.php M includes/skins/header.mustache M resources/mobile.head/init.js M resources/mobile.mainMenu/MainMenu.js M resources/mobile.startup/Skin.js 5 files changed, 8 insertions(+), 14 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/79/219479/1 diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php index e04e52c..b036d54 100644 --- a/includes/skins/SkinMinerva.php +++ b/includes/skins/SkinMinerva.php @@ -731,7 +731,7 @@ Html::element( 'a', array( 'title' = $this-msg( 'mobile-frontend-main-menu-button-tooltip' ), 'href' = $url, - 'class' = MobileUI::iconClass( 'mainmenu' ), + 'class' = MobileUI::iconClass( 'mainmenu', 'element', 'main-menu-button' ), 'id'= 'mw-mf-main-menu-button', ), $this-msg( 'mobile-frontend-main-menu-button-tooltip' ) ) ); diff --git a/includes/skins/header.mustache b/includes/skins/header.mustache index 5aff8e2..0ea85a9 100644 --- a/includes/skins/header.mustache +++ b/includes/skins/header.mustache @@ -1,8 +1,8 @@ div - a class={{mobileMenuClass}} href={{mobileMenuLink}}{{mobileMenuTitle}}/a + a class={{mobileMenuClass}} main-menu-button href={{mobileMenuLink}}{{mobileMenuTitle}}/a /div div class=header-title - a href={{mobileMenuLink}}{{{siteName}}}/a + a href={{mobileMenuLink}} class=main-menu-button{{{siteName}}}/a /div div {{{secondaryButton}}} diff --git a/resources/mobile.head/init.js b/resources/mobile.head/init.js index 2d87ed9..b0c1338 100644 --- a/resources/mobile.head/init.js +++ b/resources/mobile.head/init.js @@ -80,9 +80,8 @@ M.on( 'history-link-loaded', initHistoryLink ); M.on( 'header-loaded', function () { // Render MainMenu when needed - // In alpha there is no #mw-mf-main-menu-button, the user can click on the header - // search icon or the site name in the header to open the main menu - $( '#mw-mf-main-menu-button, .alpha .header a.header-icon, .alpha .header .header-title a' ) + // FIXME: remove #mw-mf-main-menu-button when cache clears + $( '#mw-mf-main-menu-button, .main-menu-button' ) .on( 'click', function ( ev ) { mainMenu.openNavigationDrawer(); ev.preventDefault(); diff --git a/resources/mobile.mainMenu/MainMenu.js b/resources/mobile.mainMenu/MainMenu.js index 20bbc61..3d57148 100644 --- a/resources/mobile.mainMenu/MainMenu.js +++ b/resources/mobile.mainMenu/MainMenu.js @@ -86,9 +86,8 @@ // FIXME: Remove when cache clears https://phabricator.wikimedia.org/T102868 this.$el.addClass( 'view-border-box' ); // Listen to the main menu button clicks - // In alpha there is no #mw-mf-main-menu-button, the user can click on the header - // search icon or the site name in the header to open the main menu - $( '#mw-mf-main-menu-button, .alpha .header a.header-icon, .alpha .header .header-title a' ) + // FIXME: remove #mw-mf-main-menu-button when cache clears + $( '#mw-mf-main-menu-button, .main-menu-button' ) .off( 'click' ) .on( 'click', function ( ev ) { if ( self.isOpen() ) { diff --git a/resources/mobile.startup/Skin.js b/resources/mobile.startup/Skin.js index 11711fe..06922e8 100644 --- a/resources/mobile.startup/Skin.js +++ b/resources/mobile.startup/Skin.js @@ -42,11 +42,7 @@ // Make sure the menu is open and we are not clicking on the menu button if ( this.mainMenu.isOpen() - // stable and beta - ev.target.id !== 'mw-mf-main-menu-button' - // alpha header icon and header title links, which open the menu - $target.get( 0 ) !== $( '.alpha .header a.header-icon' ).get( 0 ) - $target.get( 0 ) !== $( '.alpha .header .header-title a' ).get( 0 ) + !$target.hasClass( 'main-menu-button' ) ) {
[MediaWiki-commits] [Gerrit] WIP: Setup a node pool from etcd for lvs cluster - change (operations/puppet)
Rush has uploaded a new change for review. https://gerrit.wikimedia.org/r/219481 Change subject: WIP: Setup a node pool from etcd for lvs cluster .. WIP: Setup a node pool from etcd for lvs cluster With a conftool cluster and service definition included in the lvs::configuration cluster hash we setup a confd toml and template to allow external definition of nodes in the pool. The config line change is commented out as this will rollout slowly. Example of confd files created for 'text': /etc/confd/ ├── conf.d │ └── _etc_pybal_pools_text.toml └── templates └── _etc_pybal_pools_text.tmpl Example toml file: [template] src = _etc_pybal_pools_text.tmpl dest = /etc/pybal/pools/text mode = 0444 keys = [ /conftool/v1/pools/eqiad/cache_text/varnish-fe/, ] check_cmd = /usr/local/bin/pybal-eval-check {{.src}} Change-Id: I6c0179738bc3dab0170a5ccba20f53cd42a06b79 --- M modules/confd/manifests/file.pp M modules/lvs/manifests/balancer.pp M modules/pybal/manifests/confd.pp M modules/pybal/manifests/configuration.pp A modules/pybal/manifests/pool.pp M modules/pybal/templates/pybal.conf.erb 6 files changed, 40 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/81/219481/1 diff --git a/modules/confd/manifests/file.pp b/modules/confd/manifests/file.pp index 4a4331d..74cfbde 100644 --- a/modules/confd/manifests/file.pp +++ b/modules/confd/manifests/file.pp @@ -20,12 +20,14 @@ file { /etc/confd/conf.d/${safe_name}.toml: ensure = $ensure, content = template('confd/service_template.toml.erb'), +require = Package['confd'] } file { /etc/confd/templates/${safe_name}.tmpl: ensure = $ensure, mode= '0400', content = $content, +before = File[/etc/confd/conf.d/${safe_name}.toml], notify = Service['confd'], } } diff --git a/modules/lvs/manifests/balancer.pp b/modules/lvs/manifests/balancer.pp index 62b39d5..b9a9652 100644 --- a/modules/lvs/manifests/balancer.pp +++ b/modules/lvs/manifests/balancer.pp @@ -27,6 +27,12 @@ site = $site } +# XXX: Where to pull these node names from? +class { 'confd': +running = true, +node= 'http://localhost:2379', +} + file { '/etc/modprobe.d/lvs.conf': ensure = present, owner = 'root', diff --git a/modules/pybal/manifests/confd.pp b/modules/pybal/manifests/confd.pp index e229eec..811f73b 100644 --- a/modules/pybal/manifests/confd.pp +++ b/modules/pybal/manifests/confd.pp @@ -1,5 +1,10 @@ class pybal::confd { +file { '/etc/pybal/pools': +ensure = directory, +require = Package[pybal], +} + file { '/usr/local/bin/pybal-eval-check': ensure = file, mode = '0555', diff --git a/modules/pybal/manifests/configuration.pp b/modules/pybal/manifests/configuration.pp index b3b9cb3..8ca2202 100644 --- a/modules/pybal/manifests/configuration.pp +++ b/modules/pybal/manifests/configuration.pp @@ -9,4 +9,8 @@ require = Package['pybal'], content = template(${module_name}/pybal.conf.erb); } + +# for every service cluster we need a matching pool +$service_keys = keys($lvs_services) +pybal::pool {$service_keys: lvs_services = $lvs_services} } diff --git a/modules/pybal/manifests/pool.pp b/modules/pybal/manifests/pool.pp new file mode 100644 index 000..50b47ed --- /dev/null +++ b/modules/pybal/manifests/pool.pp @@ -0,0 +1,21 @@ +define pybal::pool($lvs_services={}) { +$service_config = $lvs_services[$name] + +# this check should only exist for as long as +# we have clusters not using etcd. +if has_key($service_config, 'conftool') { + +$cluster = $service_config['conftool']['cluster'] +$service = $service_config['conftool']['service'] + +$watch_keys = [/conftool/v1/pools/$::site/$cluster/$service/] +$tmpl = template('pybal/host-pool.tmpl.erb') + +confd::file{ /etc/pybal/pools/$name: +watch_keys = $watch_keys, +content= $tmpl, +check = '/usr/local/bin/pybal-eval-check', +require= File['/etc/pybal/pools'], +} + } +} diff --git a/modules/pybal/templates/pybal.conf.erb b/modules/pybal/templates/pybal.conf.erb index d0ee898..3e5215c 100644 --- a/modules/pybal/templates/pybal.conf.erb +++ b/modules/pybal/templates/pybal.conf.erb @@ -29,6 +29,8 @@ port = %= service.fetch('port', 80) % scheduler = %= service.fetch('scheduler', wrr) % config = http://config-master.%= @site %.wmnet/pybal/%= @site %/%= servicename % +# This is to be enabled per host for etcd introduction +# config = file:///etc/pybal/pools/%= servicename % bgp = %= service.fetch('bgp', no) % depool-threshold = %= service.fetch('depool-threshold', .5) % monitors = %= service['monitors'].keys.sort.inspect % -- To view, visit
[MediaWiki-commits] [Gerrit] WIP: lvs 'text' and 'text-https' for etcd - change (operations/puppet)
Rush has uploaded a new change for review. https://gerrit.wikimedia.org/r/219482 Change subject: WIP: lvs 'text' and 'text-https' for etcd .. WIP: lvs 'text' and 'text-https' for etcd This maps an LB cluster to a key cluster and service name. Change-Id: I803bb8363e30814a6196e968c3b653eff425c987 --- M modules/lvs/manifests/configuration.pp 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/82/219482/1 diff --git a/modules/lvs/manifests/configuration.pp b/modules/lvs/manifests/configuration.pp index 05e845c..af73bfd 100644 --- a/modules/lvs/manifests/configuration.pp +++ b/modules/lvs/manifests/configuration.pp @@ -365,6 +365,7 @@ 'ip' = $service_ips['text'][$::site], 'bgp' = 'yes', 'depool-threshold' = '.5', +'conftool' = {'cluster' = 'cache_text', 'service' = 'varnish-fe'}, 'monitors' = { 'IdleConnection' = $idleconnection_monitor_options }, }, 'text-https' = { @@ -376,6 +377,7 @@ 'scheduler' = 'sh', 'bgp' = 'no', 'depool-threshold' = '.5', +'conftool' = {'cluster' = 'cache_text', 'service' = 'nginx'}, 'monitors' = { 'ProxyFetch' = { 'url' = [ 'https://en.wikipedia.org/wiki/Main_Page' ] }, 'IdleConnection' = $idleconnection_monitor_options, -- To view, visit https://gerrit.wikimedia.org/r/219482 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I803bb8363e30814a6196e968c3b653eff425c987 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Rush r...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Introduce new tested template regex - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: Introduce new tested template regex .. Introduce new tested template regex Provide another template regex that supports collecting nested templates, with tests, and use it for replaceExcept. New basic tests for the template regex used by extract_templates_and_params_regex, with minor fixes to the regex. Deprecate textlib.TEMP_REGEX and page.ip_regexp Change-Id: Iab46aaafac3c1367a68c900bcb33217cf67f1126 --- M pywikibot/textlib.py M pywikibot/tools/__init__.py M pywikibot/tools/chars.py M pywikibot/tools/ip.py M tests/ipregex_tests.py M tests/textlib_tests.py 6 files changed, 381 insertions(+), 114 deletions(-) Approvals: John Vandenberg: Looks good to me, but someone else must approve XZise: Looks good to me, approved jenkins-bot: Verified diff --git a/pywikibot/textlib.py b/pywikibot/textlib.py index 2fae512..6297846 100644 --- a/pywikibot/textlib.py +++ b/pywikibot/textlib.py @@ -28,18 +28,64 @@ else: from HTMLParser import HTMLParser +try: +import mwparserfromhell +except ImportError as e: +mwparserfromhell = e + import pywikibot from pywikibot import config2 as config from pywikibot.exceptions import InvalidTitle from pywikibot.family import Family -from pywikibot.tools import OrderedDict +from pywikibot.tools import OrderedDict, DeprecatedRegex # cache for replaceExcept to avoid recompile or regexes each call _regex_cache = {} -TEMP_REGEX = re.compile( - r'{{(?:msg:)?(?Pname[^{\|]+?)(?:\|(?Pparams[^{]+?(?:{[^{]+?}[^{]*?)?))?}}') +# This regex is only for use by extract_templates_and_params_regex. +# It does not support template variables consisting of nested templates, +# system variables like {{CURRENTYEAR}}, or template variables like {{{1}}}. +_ETP_REGEX = re.compile( +r'{{(?:msg:)?(?Pname[^{\|]+?)' +r'(?:\|(?Pparams[^{]+?(?:{[^{]+?}[^{]*?)?)?)?}}') + +# This template is a more inclusive template matching algorithm +# that allows system variables, but does not match nested templates. +# It exists for backwards compatibility to the old 'TEMP_REGEX' +# which was the _ETP_REGEX. +TEMP_REGEX = DeprecatedRegex(r +{{\s*(?:msg:)?\s* + (?Pname[^{\|]+?)\s* + (?:\|(?Pparams[^{]* +(?:(?:{}|{{[A-Z]+(?:\:[^}])?}}|{{{[^}]+}}}) [^{]*)* + )? + )? +}} +, re.VERBOSE, 'textlib.TEMP_REGEX', 'textlib.NESTED_TEMPLATE_REGEX') + +# The regex below collects nested templates, providing simpler +# identification of templates used at the top-level of wikitext. +# It doesnt match {{{1|...}}}, however it also does not match templates +# with a numerical name. e.g. {{1|..}}. It will correctly match {{{x}} as +# being {{x}} with leading '{' left in the wikitext. +# Prefix msg: is not included in the 'name' group, but all others are +# included for backwards compatibility with TEMP_REGEX. +# Only parser functions using # are excluded. +NESTED_TEMPLATE_REGEX = re.compile(r +{{\s*(?:msg:)?\s* + (?Pname[^{\|#0-9][^{\|#0-9]*?)\s* + (?:\|(?Pparams[^{]* + (({{{[^}]+}}} + |{{[^}|]+\|?[^}]*}} + |{} + ) [^{]* + )* + )? + )? +}} +, re.VERBOSE) + NON_LATIN_DIGITS = { 'ckb': u'٠١٢٣٤٥٦٧٨٩', @@ -95,6 +141,7 @@ 'source': re.compile(r'(?is)source .*?/source'), # inline references 'ref': re.compile(r'(?ism)ref[ ].*?/ref'), +'template': NESTED_TEMPLATE_REGEX, # lines that start with a space are shown in a monospace font and # have whitespace preserved. 'startspace': re.compile(r'(?m)^ (.*?)$'), @@ -151,9 +198,6 @@ result.append(_regex_cache[(exc, site)]) else: result.append(_regex_cache[exc]) -elif exc == 'template': -# template is not supported by this method. -pass else: # nowiki, noinclude, includeonly, timeline, math ond other # extensions @@ -208,50 +252,6 @@ dontTouchRegexes = _get_regexes(exceptions, site) -except_templates = 'template' in exceptions - -# mark templates -# don't care about mw variables and parser functions -if except_templates: -marker1 = findmarker(text) -marker2 = findmarker(text, u'##', u'#') -Rvalue = re.compile('{{{.+?}}}') -Rmarker1 = re.compile(r'%(mark)s(\d+)%(mark)s' % {'mark': marker1}) -Rmarker2 = re.compile(r'%(mark)s(\d+)%(mark)s' % {'mark': marker2}) -# hide the flat template marker -dontTouchRegexes.append(Rmarker1) -origin = text -values = {} -count = 0 -for m in Rvalue.finditer(text): -count += 1 -# If we have digits between brackets, restoring from dict may fail. -# So we need to change the index. We have to search in the origin. -while
[MediaWiki-commits] [Gerrit] Add requests versions to build matrix - change (pywikibot/core)
John Vandenberg has uploaded a new change for review. https://gerrit.wikimedia.org/r/219488 Change subject: Add requests versions to build matrix .. Add requests versions to build matrix Change-Id: I3e923b49b1e4b97f9786f5ba9bba4ca203e6b105 --- M .travis.yml M pywikibot/bot.py M scripts/version.py 3 files changed, 18 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/88/219488/1 diff --git a/.travis.yml b/.travis.yml index 0004dbf..1cc768a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,7 +28,11 @@ - mkdir ~/.python-eggs - chmod 700 ~/.python-eggs - - pip install requests + - if [[ $REQUESTS_VERSION != ]]; then + pip install requests==$REQUESTS_VERSION ; +else + pip install requests ; +fi - if [[ $GITHUB_USER != wikimedia ]]; then export PYWIKIBOT2_TEST_WRITE_FAIL=1 ; @@ -52,6 +56,7 @@ - echo console_encoding = 'utf8' ~/.pywikibot/user-config.py - python -c import setuptools; print(setuptools.__version__) + - python pwb.py scripts/version.py script: - if [[ $USE_NOSE == 1 ]]; then @@ -74,21 +79,21 @@ - secure: kofInMlisiTBt9o/Ustc/vySlkKfxGzGCX2LwA1D2waym8sDTS0o5gMJ5LsrT/BUKwZbe1vLozPHqZrrkQvsdTml+DpZuotzdILs0m0f3BUoexEC6OON5IDljuxFyETrD1Ug44ih5Mc4lVFOdTcBzg501ZmswGwQrBvg/OyEFfE= matrix: -- LANGUAGE=en FAMILY=wikipedia PYWIKIBOT2_TEST_PROD_ONLY=1 +- LANGUAGE=en FAMILY=wikipedia PYWIKIBOT2_TEST_PROD_ONLY=1 REQUESTS_VERSION=2.4.0 - LANGUAGE=fr FAMILY=wiktionary PYSETUP_TEST_EXTRAS=1 PYWIKIBOT2_TEST_PROD_ONLY=1 PYWIKIBOT2_TEST_NO_RC=1 matrix: include: - python: '2.7' - env: LANGUAGE=he FAMILY=wikivoyage SITE_ONLY=1 + env: LANGUAGE=he FAMILY=wikivoyage SITE_ONLY=1 REQUESTS_VERSION=2.0.0 - python: '3.3' - env: LANGUAGE=zh FAMILY=wikisource SITE_ONLY=1 + env: LANGUAGE=zh FAMILY=wikisource SITE_ONLY=1 REQUESTS_VERSION=2.2.1 - python: '3.4' - env: LANGUAGE=test FAMILY=wikidata SITE_ONLY=1 + env: LANGUAGE=test FAMILY=wikidata SITE_ONLY=1 REQUESTS_VERSION=2.3.0 - python: 'nightly' env: LANGUAGE=ar FAMILY=wiktionary PYWIKIBOT2_TEST_NO_RC=1 - python: '2.6' - env: LANGUAGE=wikidata FAMILY=wikidata SITE_ONLY=1 + env: LANGUAGE=wikidata FAMILY=wikidata SITE_ONLY=1 REQUESTS_VERSION=1.2.3 notifications: email: diff --git a/pywikibot/bot.py b/pywikibot/bot.py index b58351d..00d972e 100644 --- a/pywikibot/bot.py +++ b/pywikibot/bot.py @@ -356,7 +356,7 @@ all_modules = sys.modules.keys() # These are the main dependencies of pywikibot. -check_package_list = ['requests', 'mwparserfromhell'] +check_package_list = ['urllib3', 'requests', 'mwparserfromhell'] # report all imported packages if config.verbose_output: diff --git a/scripts/version.py b/scripts/version.py index 7a90fd8..37c9769 100755 --- a/scripts/version.py +++ b/scripts/version.py @@ -41,7 +41,12 @@ pywikibot.output('Pywikibot: %s' % getversion()) pywikibot.output('Release version: %s' % pywikibot.__release__) pywikibot.output('requests version: %s' % requests.__version__) - +if hasattr(requests, 'packages') and hasattr(requests.packages, 'urllib3'): +pywikibot.output( +' packages.urllib3 version: %s' +% requests.packages.urllib3.__version__) +else: +pywikibot.output(' urllib3 version: %s', urllib3.__version__) has_wikimedia_cert = False if (not hasattr(requests, 'certs') or not hasattr(requests.certs, 'where') or -- To view, visit https://gerrit.wikimedia.org/r/219488 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3e923b49b1e4b97f9786f5ba9bba4ca203e6b105 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: John Vandenberg jay...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Enable browse prototype on English Wikipedia - change (operations/mediawiki-config)
Jdlrobson has uploaded a new change for review. https://gerrit.wikimedia.org/r/219451 Change subject: Enable browse prototype on English Wikipedia .. Enable browse prototype on English Wikipedia Bug: T101155 Change-Id: I897e38184c4e4b0b2ad521aadeb3ca60f8f81424 --- M wmf-config/InitialiseSettings.php M wmf-config/mobile.php 2 files changed, 526 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/51/219451/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index b703bba..64bfb4b 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -13271,6 +13271,529 @@ 'kowiki' = false, // T94388 ), +// Enable browse prototype T101155 +'wmgMFIsBrowseEnabled' = array( + 'enwiki' = true, +), +'wmgMFBrowseTags' = array( + 'enwiki' = array( + 'San Francisco landmarks' = array( + 'Alcatraz Island', + 'Golden Gate Bridge', + 'Presidio of San Francisco', + 'Lombard Street (San Francisco)', + 'Golden Gate Park', + 'City Lights Bookstore', + 'Coit Tower', + 'San Francisco cable car system', + 'Palace of Fine Arts', + 'Alamo Square, San Francisco', + 'Fort Point, San Francisco', + 'Grace Cathedral, San Francisco', + 'San Francisco Ferry Building', + 'ATT Park', + 'Yerba Buena Gardens', + 'Castro Theatre', + 'Transamerica Pyramid', + 'San Francisco Museum of Modern Art', + 'Candlestick Park', + 'San Francisco Zoo', + 'Fairmont San Francisco', + 'Fort Mason', + 'Ghirardelli Square', + 'Crissy Field', + 'San Francisco Botanical Garden', + 'Barbary Coast Trail', + 'Duboce Park', + 'Flatiron Building (San Francisco)', + 'Lands End (San Francisco)', + 'San Francisco Mint', + 'Crissy Field', + 'San Francisco Naval Shipyard', + 'Dolores Park', + 'Jack Kerouac Alley', + 'San Francisco Cable Car Museum', + 'Balboa Park, San Francisco', + 'Panhandle (San Francisco)', + 'San Francisco City Hall', + 'Victoria Theatre, San Francisco', + 'Union Square, San Francisco', + 'San Francisco Armory', + 'Mitchell Brothers O\'Farrell Theatre', + 'Seal Rocks (San Francisco, California)', + 'San Francisco–Oakland Bay Bridge', + 'Asian Art Museum of San Francisco', + 'San Francisco Public Library', + 'Levi\'s Plaza', + 'Louise M. Davies Symphony Hall', + 'Moscone Center', + 'San Francisco Federal Building', + ), + 'western Europe' = array( + 'Germany', + 'France', + 'United Kingdom', + 'Italy', + 'Spain', + 'Netherlands', + 'Belgium', + 'Greece', + 'Portugal', + 'Sweden', + 'Austria', + 'Switzerland', + 'Denmark', + 'Finland', + 'Norway', + 'Ireland', + 'Luxembourg', + 'Iceland', + 'Vatican City', + 'Monaco', + 'Principality of Sealand', + 'Western Europe', + 'Northwestern Europe', + ), + 'American politicians of the 20th century' = array( + 'Barack Obama', + 'George W. Bush', + 'Franklin D. Roosevelt', + 'Ronald Reagan', + 'George Washington', + 'Bill Clinton', + 'Theodore Roosevelt', + 'John F. Kennedy', + 'Woodrow Wilson', + 'Richard Nixon', +
[MediaWiki-commits] [Gerrit] build: Updating development dependencies - change (mediawiki...OOJsUIAjaxLogin)
jenkins-bot has submitted this change and it was merged. Change subject: build: Updating development dependencies .. build: Updating development dependencies * jakub-onderka/php-parallel-lint: 0.8.* → 0.9 * mediawiki/mediawiki-codesniffer: 0.2.0 → 0.3.0 Change-Id: I8b09f3c7dc5712561c6c53e76802b2240628874e --- M composer.json 1 file changed, 10 insertions(+), 10 deletions(-) Approvals: Jforrester: Looks good to me, approved jenkins-bot: Verified diff --git a/composer.json b/composer.json index 3b2c043..263ca10 100644 --- a/composer.json +++ b/composer.json @@ -1,12 +1,12 @@ { -require-dev: { -jakub-onderka/php-parallel-lint: 0.8.*, -mediawiki/mediawiki-codesniffer: 0.2.0 -}, -scripts: { -test: [ -parallel-lint . --exclude vendor, -phpcs --standard=vendor/mediawiki/mediawiki-codesniffer/MediaWiki --extensions=php,php5,inc --ignore=vendor -p . -] -} + require-dev: { + jakub-onderka/php-parallel-lint: 0.9, + mediawiki/mediawiki-codesniffer: 0.3.0 + }, + scripts: { + test: [ + parallel-lint . --exclude vendor, + phpcs --standard=vendor/mediawiki/mediawiki-codesniffer/MediaWiki --extensions=php,php5,inc --ignore=vendor -p . + ] + } } -- To view, visit https://gerrit.wikimedia.org/r/219456 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8b09f3c7dc5712561c6c53e76802b2240628874e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/OOJsUIAjaxLogin Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: Jforrester jforres...@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 double str_replace( ' ', '_', $ ) when using LinkBatch - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Remove double str_replace( ' ', '_', $ ) when using LinkBatch .. Remove double str_replace( ' ', '_', $ ) when using LinkBatch LinkBatch::add already handle the underscore/space part, that means it is not need to do it on the caller side when adding user names to LinkBatch Change-Id: I09e80712903a539164141cc0a88d321203114677 --- M includes/cache/UserCache.php M includes/specials/SpecialBlockList.php 2 files changed, 6 insertions(+), 10 deletions(-) Approvals: Aaron Schulz: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/cache/UserCache.php b/includes/cache/UserCache.php index 8a42489..2a3aac2 100644 --- a/includes/cache/UserCache.php +++ b/includes/cache/UserCache.php @@ -123,11 +123,11 @@ $lb = new LinkBatch(); foreach ( $usersToCheck as $userId = $name ) { if ( $this-queryNeeded( $userId, 'userpage', $options ) ) { - $lb-add( NS_USER, str_replace( ' ', '_', $row-user_name ) ); + $lb-add( NS_USER, $row-user_name ); $this-typesCached[$userId]['userpage'] = 1; } if ( $this-queryNeeded( $userId, 'usertalk', $options ) ) { - $lb-add( NS_USER_TALK, str_replace( ' ', '_', $row-user_name ) ); + $lb-add( NS_USER_TALK, $row-user_name ); $this-typesCached[$userId]['usertalk'] = 1; } } diff --git a/includes/specials/SpecialBlockList.php b/includes/specials/SpecialBlockList.php index 4dd313b..8a9aefd 100644 --- a/includes/specials/SpecialBlockList.php +++ b/includes/specials/SpecialBlockList.php @@ -431,16 +431,12 @@ $lb-setCaller( __METHOD__ ); foreach ( $result as $row ) { - # Usernames and titles are in fact related by a simple substitution of space - underscore - # The last few lines of Title::secureAndSplit() tell the story. - $name = str_replace( ' ', '_', $row-ipb_address ); - $lb-add( NS_USER, $name ); - $lb-add( NS_USER_TALK, $name ); + $lb-add( NS_USER, $row-ipb_address ); + $lb-add( NS_USER_TALK, $row-ipb_address ); if ( isset( $row-by_user_name ) ) { - $username = str_replace( ' ', '_', $row-by_user_name ); - $lb-add( NS_USER, $username ); - $lb-add( NS_USER_TALK, $username ); + $lb-add( NS_USER, $row-by_user_name ); + $lb-add( NS_USER_TALK, $row-by_user_name ); } } -- To view, visit https://gerrit.wikimedia.org/r/219444 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I09e80712903a539164141cc0a88d321203114677 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Umherirrender umherirrender_de...@web.de Gerrit-Reviewer: Aaron Schulz asch...@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] Revert analytics_kafka: switch to ganglia_new - change (operations/puppet)
Dzahn has submitted this change and it was merged. Change subject: Revert analytics_kafka: switch to ganglia_new .. Revert analytics_kafka: switch to ganglia_new This reverts commit 1a73479560ee19a4ef27ef8fe3bbf3120e54c5a2. Change-Id: I653660d05ccbcd2740c9b8a9a2a1dbb709395e93 --- M hieradata/common.yaml M hieradata/regex.yaml M manifests/site.pp 3 files changed, 12 insertions(+), 5 deletions(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/hieradata/common.yaml b/hieradata/common.yaml index 540b921..dba40ce 100644 --- a/hieradata/common.yaml +++ b/hieradata/common.yaml @@ -206,7 +206,10 @@ name: Analytics Kafka cluster id: 45 sites: - eqiad: [] + eqiad: +- analytics1012.eqiad.wmnet +- analytics1018.eqiad.wmnet +- analytics1022.eqiad.wmnet sca: name: Service Cluster A id: 46 diff --git a/hieradata/regex.yaml b/hieradata/regex.yaml index 1d61c3c..552675a 100644 --- a/hieradata/regex.yaml +++ b/hieradata/regex.yaml @@ -1,7 +1,3 @@ -analytics_kafka: - __regex: !ruby/regexp /^analytics10(12|18|21|22)\.eqiad\.wmnet$/ - ganglia_class: new - api_appserver: __regex: !ruby/regexp /^mw(111[4-9]|11[2-3][0-9]|114[0-8]|1189|119[0-9]|120[0-8]|122[1-9]|123[0-5])\.eqiad\.wmnet$/ ganglia_class: new diff --git a/manifests/site.pp b/manifests/site.pp index f06ca25..7c93ade 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -127,6 +127,14 @@ # analytics1012, analytics1018, analytics1021 and analytics1022 are Kafka Brokers. node /analytics10(12|18|21|22)\.eqiad\.wmnet/ { +# one ganglia aggregator per ganglia 'cluster' per row. +if ($::hostname == 'analytics1012' or # Row A +$::hostname == 'analytics1018' or # Row D +$::hostname == 'analytics1022')# Row C +{ +$ganglia_aggregator = true +} + # Kafka brokers are routed via IPv6 so that # other DCs can address without public IPv4 # addresses. -- To view, visit https://gerrit.wikimedia.org/r/219464 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I653660d05ccbcd2740c9b8a9a2a1dbb709395e93 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn dz...@wikimedia.org Gerrit-Reviewer: Dzahn dz...@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] Use graphite_threshold instead of ganglia for Kafka alerts - change (operations/puppet)
Ottomata has uploaded a new change for review. https://gerrit.wikimedia.org/r/219465 Change subject: Use graphite_threshold instead of ganglia for Kafka alerts .. Use graphite_threshold instead of ganglia for Kafka alerts Change-Id: I7fbf2826f73b04b2a8d642b9bd253829754db5d2 --- M manifests/role/analytics/kafka.pp 1 file changed, 8 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/65/219465/1 diff --git a/manifests/role/analytics/kafka.pp b/manifests/role/analytics/kafka.pp index b77e7d8..f5b4feb 100644 --- a/manifests/role/analytics/kafka.pp +++ b/manifests/role/analytics/kafka.pp @@ -211,6 +211,8 @@ $nagios_servicegroup = 'analytics_eqiad' monitoring::ganglia { 'kafka-broker-MessagesIn': +# This alert is handled globally across all brokers via graphite_anomaly +ensure = 'absent' description = 'Kafka Broker Messages In', metric = 'kafka.server.BrokerTopicMetrics.AllTopicsMessagesInPerSec.FifteenMinuteRate', warning = ':1500.0', @@ -241,27 +243,29 @@ # Alert if any Kafka has under replicated partitions. # If it does, this means a broker replica is falling behind # and will be removed from the ISR. -monitoring::ganglia { 'kafka-broker-UnderReplicatedPartitions': +monitoring::graphite_threshold { 'kafka-broker-UnderReplicatedPartitions': description = 'Kafka Broker Under Replicated Partitions', -metric = 'kafka.server.ReplicaManager.UnderReplicatedPartitions.Value', +metric = kafka.${::hostname}_${::site}_wmnet_${::kafka::server::jmx_port}.kafka.server.ReplicaManager.UnderReplicatedPartitions.Value # Any under replicated partitions are bad. # Over 10 means (probably) that at least an entire topic # is under replicated. warning = '1', critical= '10', +percentage = 10, require = Class['::kafka::server::jmxtrans'], group = $nagios_servicegroup, } # Alert if any Kafka Broker replica lag is too high -monitoring::ganglia { 'kafka-broker-Replica-MaxLag': +monitoring::graphite_threshold { 'kafka-broker-Replica-MaxLag': description = 'Kafka Broker Replica Lag', -metric = 'kafka.server.ReplicaFetcherManager.Replica-MaxLag.Value', +metric = kafka.${::hostname}_${::site}_wmnet_${::kafka::server::jmx_port}.kafka.server.ReplicaFetcherManager.Replica-MaxLag.Value, # As of 2014-02 replag could catch up at more than 1000 msgs / sec, # (probably more like 2 or 3 K / second). At that rate, 1M messages # behind should catch back up in at least 30 minutes. warning = '100', critical= '500', +percentage = 10, require = Class['::kafka::server::jmxtrans'], group = $nagios_servicegroup, } -- To view, visit https://gerrit.wikimedia.org/r/219465 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7fbf2826f73b04b2a8d642b9bd253829754db5d2 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] QA: Skip test whilst exception occuring - change (mediawiki...MobileFrontend)
jenkins-bot has submitted this change and it was merged. Change subject: QA: Skip test whilst exception occuring .. QA: Skip test whilst exception occuring Bug: T103107 Change-Id: Icbf83c513b70cb6c2ccd14d673b9b74c845ef1c7 --- M tests/browser/features/create_account_failure_messages.feature 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Robmoen: Looks good to me, approved Jdlrobson: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/tests/browser/features/create_account_failure_messages.feature b/tests/browser/features/create_account_failure_messages.feature index f727368..145a214 100644 --- a/tests/browser/features/create_account_failure_messages.feature +++ b/tests/browser/features/create_account_failure_messages.feature @@ -4,6 +4,7 @@ Given I am using the mobile site And I am on the sign-up page + @skip @T103107 Scenario: Create account password mismatch message When I sign up with two different passwords Then I should see an error indicating they do not match -- To view, visit https://gerrit.wikimedia.org/r/219385 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icbf83c513b70cb6c2ccd14d673b9b74c845ef1c7 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Jdlrobson jrob...@wikimedia.org Gerrit-Reviewer: Alex Monk kren...@gmail.com Gerrit-Reviewer: Bmansurov bmansu...@wikimedia.org Gerrit-Reviewer: Cmcmahon cmcma...@wikimedia.org Gerrit-Reviewer: Jdlrobson jrob...@wikimedia.org Gerrit-Reviewer: Robmoen rm...@wikimedia.org Gerrit-Reviewer: Siebrand siebr...@kitano.nl Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Output error message instead of failing for more than just html - change (mediawiki...Flow)
jenkins-bot has submitted this change and it was merged. Change subject: Output error message instead of failing for more than just html .. Output error message instead of failing for more than just html Just like for html output, other formats (like plaintext for title) should show a failed to load content content instead of failing completely. Meanwhile also moved the other (valid) exception up top: for practical reasons so I can have an overarching try/catch for content failures, but also because bad data request should fail before even checking those permissions. Bug: T98547 Change-Id: I2609626e18c80d379cb839ccaed2a4b10924bfd6 --- M includes/Templating.php 1 file changed, 18 insertions(+), 17 deletions(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Templating.php b/includes/Templating.php index 8f56593..3d9cd77 100644 --- a/includes/Templating.php +++ b/includes/Templating.php @@ -122,6 +122,10 @@ * @throws InvalidInputException */ public function getContent( AbstractRevision $revision, $format = 'fixed-html' ) { + if ( !in_array( $format, array( 'fixed-html', 'html', 'plaintext', 'wikitext' ) ) ) { + throw new InvalidInputException( 'Invalid format: ' . $format ); + } + $allowed = $this-permissions-isAllowed( $revision, 'view' ); // Posts require view access to the topic title as well if ( $allowed $revision instanceof PostRevision !$revision-isTopicTitle() ) { @@ -136,26 +140,23 @@ return ''; } - // fixed html format - if ( $format === 'fixed-html' ) { - // Parsoid doesn't render redlinks doesn't strip bad images - try { + try { + if ( $format === 'fixed-html' ) { + // Parsoid doesn't render redlinks doesn't strip bad images $content = $this-contentFixer-getContent( $revision ); - } catch ( \Exception $e ) { - wfDebugLog( 'Flow', __METHOD__ . ': Failed fix content for rev_id = ' . $revision-getRevisionId()-getAlphadecimal() ); - \MWExceptionHandler::logException( $e ); - - $content = wfMessage( 'flow-stub-post-content' )-parse(); + } else { + // plaintext = wikitext + $format = $format === 'plaintext' ? 'wikitext' : $format; + $content = $revision-getContent( $format ); } - // all other formats - } elseif ( in_array( $format, array( 'html', 'plaintext', 'wikitext' ) ) ) { - if ( $format === 'plaintext' ) { - $format = 'wikitext'; - } + } catch ( \Exception $e ) { + wfDebugLog( 'Flow', __METHOD__ . ': Failed to get content for rev_id = ' . $revision-getRevisionId()-getAlphadecimal() ); + \MWExceptionHandler::logException( $e ); - $content = $revision-getContent( $format ); - } else { - throw new InvalidInputException( 'Invalid format: ' . $format ); + $content = wfMessage( 'flow-stub-post-content' )-parse(); + if ( !in_array( $format, array( 'html', 'fixed-html' ) ) ) { + $content = strip_tags( $content ); + } } return $content; -- To view, visit https://gerrit.wikimedia.org/r/219476 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2609626e18c80d379cb839ccaed2a4b10924bfd6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Matthias Mullie mmul...@wikimedia.org Gerrit-Reviewer: Catrope roan.katt...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [FIX] Use only a single timeout - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: [FIX] Use only a single timeout .. [FIX] Use only a single timeout On older installations of requests it's not possible to use two timeout values. It is now using only one timeout value (of 30 seconds) for both by default and it emits a warning when a tuple was used and the requests version is to old. Bug: T103069 Change-Id: I14c9a3992b0283f6402fae851182e4db0b84a251 --- M pywikibot/comms/http.py M pywikibot/config2.py 2 files changed, 10 insertions(+), 2 deletions(-) Approvals: John Vandenberg: Looks good to me, approved jenkins-bot: Verified diff --git a/pywikibot/comms/http.py b/pywikibot/comms/http.py index 1ddb029..50343a1 100644 --- a/pywikibot/comms/http.py +++ b/pywikibot/comms/http.py @@ -25,6 +25,7 @@ import atexit import sys +from distutils.version import StrictVersion from string import Formatter from warnings import warn @@ -57,6 +58,13 @@ _logger = comm.http +if (isinstance(pywikibot.config2.socket_timeout, tuple) and +StrictVersion(requests.__version__) StrictVersion('2.4.0')): +pywikibot.warning('The configured timeout is a tuple but requests does not ' + 'support a tuple as a timeout. It uses the lower of the ' + 'two.') +pywikibot.config2.socket_timeout = min(pywikibot.config2.socket_timeout) + session = requests.Session() cookie_jar = cookielib.LWPCookieJar( diff --git a/pywikibot/config2.py b/pywikibot/config2.py index 5ac6ec6..7912952 100644 --- a/pywikibot/config2.py +++ b/pywikibot/config2.py @@ -696,8 +696,8 @@ # Default socket timeout in seconds. # DO NOT set to None to disable timeouts. Otherwise this may freeze your script. # You may assign either a tuple of two int or float values for connection and -# read timeout, or a single value for both. -socket_timeout = (30, 120) +# read timeout, or a single value for both in a tuple (since requests 2.4.0). +socket_timeout = 30 # # COSMETIC CHANGES SETTINGS ## -- To view, visit https://gerrit.wikimedia.org/r/219441 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I14c9a3992b0283f6402fae851182e4db0b84a251 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: XZise commodorefabia...@gmx.de Gerrit-Reviewer: John Vandenberg jay...@gmail.com Gerrit-Reviewer: Ladsgroup ladsgr...@gmail.com Gerrit-Reviewer: Merlijn van Deen valhall...@arctus.nl Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] save user lang selection - change (apps...wikipedia)
jenkins-bot has submitted this change and it was merged. Change subject: save user lang selection .. save user lang selection User language selections are now persisted and presented in the first group of preferred languages. Also fixed unit testing target, because I added some more! Bug: T101780 Change-Id: I8f3eef90811ca600941efcc6db256d471fd87a49 --- M Wikipedia.xcodeproj/project.pbxproj M Wikipedia/Global.h M Wikipedia/View Controllers/Languages/LanguagesViewController.m M Wikipedia/View Controllers/Languages/MWKLanguageLinkController.h M Wikipedia/View Controllers/Languages/MWKLanguageLinkController.m A Wikipedia/View Controllers/Languages/MWKLanguageLinkController_Private.h A WikipediaUnitTests/MWKLanguageLinkControllerTests.m A WikipediaUnitTests/Supporting Files/WikipediaUnitTests-Prefix.pch 8 files changed, 241 insertions(+), 7 deletions(-) Approvals: Fjalapeno: Looks good to me, approved jenkins-bot: Verified diff --git a/Wikipedia.xcodeproj/project.pbxproj b/Wikipedia.xcodeproj/project.pbxproj index d0ececa..31ab1c9 100644 --- a/Wikipedia.xcodeproj/project.pbxproj +++ b/Wikipedia.xcodeproj/project.pbxproj @@ -245,6 +245,7 @@ BC69C3141AB0C1FF0090B039 /* WMFImageInfoController.m in Sources */ = {isa = PBXBuildFile; fileRef = BC69C3131AB0C1FF0090B039 /* WMFImageInfoController.m */; }; BC6BF4001B19213600362968 /* XCTestCase+WMFLocaleTesting.m in Sources */ = {isa = PBXBuildFile; fileRef = BC6BF3FE1B19209900362968 /* XCTestCase+WMFLocaleTesting.m */; }; BC7DFCD61AA4E5FE35C3 /* WMFImageURLParsing.m in Sources */ = {isa = PBXBuildFile; fileRef = BC7DFCD51AA4E5FE35C3 /* WMFImageURLParsing.m */; }; + BC7E4A521B34B53E00EECD8B /* MWKLanguageLinkControllerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = BC7E4A511B34B53E00EECD8B /* MWKLanguageLinkControllerTests.m */; }; BC86B9361A92966B00B4C039 /* AFHTTPRequestOperationManager+UniqueRequests.m in Sources */ = {isa = PBXBuildFile; fileRef = BC86B9351A92966B00B4C039 /* AFHTTPRequestOperationManager+UniqueRequests.m */; }; BC86B93D1A929CC500B4C039 /* UICollectionViewFlowLayout+NSCopying.m in Sources */ = {isa = PBXBuildFile; fileRef = BC86B93C1A929CC500B4C039 /* UICollectionViewFlowLayout+NSCopying.m */; }; BC86B9401A929D7900B4C039 /* UICollectionViewFlowLayout+WMFItemSizeThatFits.m in Sources */ = {isa = PBXBuildFile; fileRef = BC86B93F1A929D7900B4C039 /* UICollectionViewFlowLayout+WMFItemSizeThatFits.m */; }; @@ -764,6 +765,7 @@ BC092BA01B19135700093C59 /* WMFApiJsonResponseSerializer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WMFApiJsonResponseSerializer.h; path = Serializers/WMFApiJsonResponseSerializer.h; sourceTree = group; }; BC092BA11B19135700093C59 /* WMFApiJsonResponseSerializer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = WMFApiJsonResponseSerializer.m; path = Serializers/WMFApiJsonResponseSerializer.m; sourceTree = group; }; BC092BA61B19189100093C59 /* MWKSiteInfoFetcherTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MWKSiteInfoFetcherTests.m; sourceTree = group; }; + BC14F89F1B34B72500860018 /* WikipediaUnitTests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WikipediaUnitTests-Prefix.pch; sourceTree = group; }; BC2375981AB78D8A00B0BAA8 /* NSParagraphStyle+WMFNaturalAlignmentStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSParagraphStyle+WMFNaturalAlignmentStyle.h; sourceTree = group; }; BC2375991AB78D8A00B0BAA8 /* NSParagraphStyle+WMFNaturalAlignmentStyle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSParagraphStyle+WMFNaturalAlignmentStyle.m; sourceTree = group; }; BC23759D1AB8928600B0BAA8 /* WMFDateFormatterTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WMFDateFormatterTests.m; sourceTree = group; }; @@ -796,6 +798,8 @@ BC7DFCCB1AA4BA8A35C3 /* WMFCodingStyle.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WMFCodingStyle.h; sourceTree = group; }; BC7DFCD41AA4E5FE35C3 /* WMFImageURLParsing.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WMFImageURLParsing.h; sourceTree = group; }; BC7DFCD51AA4E5FE35C3 /* WMFImageURLParsing.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WMFImageURLParsing.m; sourceTree = group; }; + BC7E4A501B34B4B900EECD8B /*
[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: b5a15be..4c7bc4a - change (mediawiki/extensions)
Jenkins-mwext-sync has uploaded a new change for review. https://gerrit.wikimedia.org/r/219484 Change subject: Syncronize VisualEditor: b5a15be..4c7bc4a .. Syncronize VisualEditor: b5a15be..4c7bc4a Change-Id: I4f5154472de3acc72beadea53f13337cf0fa8c0c --- M VisualEditor 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions refs/changes/84/219484/1 diff --git a/VisualEditor b/VisualEditor index b5a15be..4c7bc4a 16 --- a/VisualEditor +++ b/VisualEditor -Subproject commit b5a15be16aa55648f73fdb8496829fc8ce475502 +Subproject commit 4c7bc4a8111ae9f1f43802c37c2ee0027ec6c4b6 -- To view, visit https://gerrit.wikimedia.org/r/219484 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4f5154472de3acc72beadea53f13337cf0fa8c0c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions Gerrit-Branch: master Gerrit-Owner: Jenkins-mwext-sync jenkins-...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] build: Updating development dependencies - change (mediawiki...MobileFrontend)
jenkins-bot has submitted this change and it was merged. Change subject: build: Updating development dependencies .. build: Updating development dependencies * jakub-onderka/php-parallel-lint: 0.8.* → 0.9 * mediawiki/mediawiki-codesniffer: 0.2.0 → 0.3.0 Change-Id: I80af554da4c76689d108b29485e1e1edd7658293 --- M MobileFrontend.php M composer.json M includes/api/ApiMobileView.php M includes/specials/SpecialMobileContributions.php 4 files changed, 5 insertions(+), 5 deletions(-) Approvals: Paladox: Looks good to me, but someone else must approve Jforrester: Looks good to me, approved jenkins-bot: Verified diff --git a/MobileFrontend.php b/MobileFrontend.php index bb19a01..00e1623 100644 --- a/MobileFrontend.php +++ b/MobileFrontend.php @@ -42,7 +42,7 @@ $wgExtensionMessagesFiles['MobileFrontendAlias'] = __DIR__ . /MobileFrontend.alias.php; // autoload extension classes -$autoloadClasses = array ( +$autoloadClasses = array( 'ExtMobileFrontend' = 'MobileFrontend.body', 'MobileFrontendHooks' = 'MobileFrontend.hooks', diff --git a/composer.json b/composer.json index d73d133..321fabf 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { require-dev: { - jakub-onderka/php-parallel-lint: 0.8.*, - mediawiki/mediawiki-codesniffer: 0.2.0 + jakub-onderka/php-parallel-lint: 0.9, + mediawiki/mediawiki-codesniffer: 0.3.0 }, scripts: { test: [ diff --git a/includes/api/ApiMobileView.php b/includes/api/ApiMobileView.php index ffce1c0..e499d48 100644 --- a/includes/api/ApiMobileView.php +++ b/includes/api/ApiMobileView.php @@ -305,7 +305,7 @@ * @return string */ private function stringSplitter( $text ) { - if ( $this-offset 0 ) { + if ( $this-offset 0 ) { return $text; // NOOP - string splitting mode is off } elseif ( $this-maxlen 0 ) { return ''; // Limit exceeded diff --git a/includes/specials/SpecialMobileContributions.php b/includes/specials/SpecialMobileContributions.php index e408565..ea12f67 100644 --- a/includes/specials/SpecialMobileContributions.php +++ b/includes/specials/SpecialMobileContributions.php @@ -95,7 +95,7 @@ $this-prevLengths = Revision::getParentLengths( wfGetDB( DB_SLAVE ), $prevRevs ); if ( $numRows 0 ) { $count = 0; - foreach ( $revs as $rev ) { + foreach ( $revs as $rev ) { if ( $count++ self::LIMIT ) { $this-showContributionsRow( $rev ); } -- To view, visit https://gerrit.wikimedia.org/r/219463 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I80af554da4c76689d108b29485e1e1edd7658293 Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: Florianschmidtwelzow florian.schmidt.wel...@t-online.de Gerrit-Reviewer: Jdlrobson jrob...@wikimedia.org Gerrit-Reviewer: Jforrester jforres...@wikimedia.org Gerrit-Reviewer: Paladox thomasmulhall...@yahoo.com Gerrit-Reviewer: Umherirrender umherirrender_de...@web.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] Syncronize VisualEditor: b5a15be..4c7bc4a - change (mediawiki/extensions)
Jenkins-mwext-sync has submitted this change and it was merged. Change subject: Syncronize VisualEditor: b5a15be..4c7bc4a .. Syncronize VisualEditor: b5a15be..4c7bc4a Change-Id: I4f5154472de3acc72beadea53f13337cf0fa8c0c --- M VisualEditor 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Jenkins-mwext-sync: Verified; Looks good to me, approved diff --git a/VisualEditor b/VisualEditor index b5a15be..4c7bc4a 16 --- a/VisualEditor +++ b/VisualEditor -Subproject commit b5a15be16aa55648f73fdb8496829fc8ce475502 +Subproject commit 4c7bc4a8111ae9f1f43802c37c2ee0027ec6c4b6 -- To view, visit https://gerrit.wikimedia.org/r/219484 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4f5154472de3acc72beadea53f13337cf0fa8c0c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions Gerrit-Branch: master Gerrit-Owner: Jenkins-mwext-sync jenkins-...@wikimedia.org Gerrit-Reviewer: Jenkins-mwext-sync jenkins-...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] build: Updating development dependencies - change (mediawiki...VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: build: Updating development dependencies .. build: Updating development dependencies * jakub-onderka/php-parallel-lint: 0.8.0 → 0.9 * mediawiki/mediawiki-codesniffer: 0.2.0 → 0.3.0 Change-Id: Ic4a5fd50cd1403da11c6b0be75eaa290524d8b0a --- M VisualEditor.php M VisualEditorDataModule.php M composer.json 3 files changed, 4 insertions(+), 4 deletions(-) Approvals: Jforrester: Looks good to me, approved jenkins-bot: Verified diff --git a/VisualEditor.php b/VisualEditor.php index 77295d7..44844d5 100755 --- a/VisualEditor.php +++ b/VisualEditor.php @@ -1644,7 +1644,7 @@ $wgVisualEditorBrowserBlacklist = array( // IE = 8 has various incompatibilities in layout and feature support // IE10 and 11 have problems but mostly work OK-ish so they're greylisted; IE9 to come - 'msie' = array ( array( '=', 9 ) ), + 'msie' = array( array( '=', 9 ) ), // Android 2.x and below support CE but don't trigger keyboard input 'android' = array( array( '', 3 ) ), // Firefox issues in versions 12 and below (bug 50780) diff --git a/VisualEditorDataModule.php b/VisualEditorDataModule.php index b95deb4..c0cda04 100644 --- a/VisualEditorDataModule.php +++ b/VisualEditorDataModule.php @@ -19,7 +19,7 @@ /* Methods */ - public function __construct () { + public function __construct() { $this-gitInfo = new GitInfo( __DIR__ ); } diff --git a/composer.json b/composer.json index a95bae6..263ca10 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { require-dev: { - jakub-onderka/php-parallel-lint: 0.8.0, - mediawiki/mediawiki-codesniffer: 0.2.0 + jakub-onderka/php-parallel-lint: 0.9, + mediawiki/mediawiki-codesniffer: 0.3.0 }, scripts: { test: [ -- To view, visit https://gerrit.wikimedia.org/r/219458 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic4a5fd50cd1403da11c6b0be75eaa290524d8b0a Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: Bartosz Dziewoński matma@gmail.com Gerrit-Reviewer: Jforrester jforres...@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 filtering - change (labs...crosswatch)
Sitic has submitted this change and it was merged. Change subject: Fix filtering .. Fix filtering Change-Id: Ie26b2248c484ec2523d463758b9360ebcc802e3d --- M frontend/src/app/services.js M frontend/src/components/settings/settings.controller.js 2 files changed, 3 insertions(+), 3 deletions(-) Approvals: Sitic: Verified; Looks good to me, approved diff --git a/frontend/src/app/services.js b/frontend/src/app/services.js index e33a1ae..d99a4e2 100644 --- a/frontend/src/app/services.js +++ b/frontend/src/app/services.js @@ -126,15 +126,15 @@ return; } -$log.info('showing first 100 watchlist entries'); +$log.info('showing first watchlist entries (maximum 100)'); vm.watchlist.filtered = $filter('watchlist')(vm.watchlist.original, vm.config); if (typeof searchtext !== 'undefined') { vm.watchlist.filtered = $filter('filter')(vm.watchlist.filtered, searchtext); } + var temp = vm.watchlist.filtered.slice(0, 100); vm.watchlist.active.length = 0; Array.prototype.push.apply(vm.watchlist.active, temp); -$log.info(vm.watchlist.active.length); }; vm.filterWatchlistDebounced = debounce(vm.filterWatchlist, 250); diff --git a/frontend/src/components/settings/settings.controller.js b/frontend/src/components/settings/settings.controller.js index 2f00add..6014d66 100644 --- a/frontend/src/components/settings/settings.controller.js +++ b/frontend/src/components/settings/settings.controller.js @@ -7,7 +7,7 @@ vm.oldconfig = vm.config; vm.saveConfig = function () { dataService.saveConfig(); - dataService.filterWatchlist('watchlist', dataService.config); + dataService.filterWatchlist(); }; vm.reload = function () { -- To view, visit https://gerrit.wikimedia.org/r/219486 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie26b2248c484ec2523d463758b9360ebcc802e3d Gerrit-PatchSet: 1 Gerrit-Project: labs/tools/crosswatch Gerrit-Branch: master Gerrit-Owner: Sitic jan.leb...@online.de Gerrit-Reviewer: Sitic jan.leb...@online.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix filtering - change (labs...crosswatch)
Sitic has uploaded a new change for review. https://gerrit.wikimedia.org/r/219486 Change subject: Fix filtering .. Fix filtering Change-Id: Ie26b2248c484ec2523d463758b9360ebcc802e3d --- M frontend/src/app/services.js M frontend/src/components/settings/settings.controller.js 2 files changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/labs/tools/crosswatch refs/changes/86/219486/1 diff --git a/frontend/src/app/services.js b/frontend/src/app/services.js index e33a1ae..d99a4e2 100644 --- a/frontend/src/app/services.js +++ b/frontend/src/app/services.js @@ -126,15 +126,15 @@ return; } -$log.info('showing first 100 watchlist entries'); +$log.info('showing first watchlist entries (maximum 100)'); vm.watchlist.filtered = $filter('watchlist')(vm.watchlist.original, vm.config); if (typeof searchtext !== 'undefined') { vm.watchlist.filtered = $filter('filter')(vm.watchlist.filtered, searchtext); } + var temp = vm.watchlist.filtered.slice(0, 100); vm.watchlist.active.length = 0; Array.prototype.push.apply(vm.watchlist.active, temp); -$log.info(vm.watchlist.active.length); }; vm.filterWatchlistDebounced = debounce(vm.filterWatchlist, 250); diff --git a/frontend/src/components/settings/settings.controller.js b/frontend/src/components/settings/settings.controller.js index 2f00add..6014d66 100644 --- a/frontend/src/components/settings/settings.controller.js +++ b/frontend/src/components/settings/settings.controller.js @@ -7,7 +7,7 @@ vm.oldconfig = vm.config; vm.saveConfig = function () { dataService.saveConfig(); - dataService.filterWatchlist('watchlist', dataService.config); + dataService.filterWatchlist(); }; vm.reload = function () { -- To view, visit https://gerrit.wikimedia.org/r/219486 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie26b2248c484ec2523d463758b9360ebcc802e3d Gerrit-PatchSet: 1 Gerrit-Project: labs/tools/crosswatch Gerrit-Branch: master Gerrit-Owner: Sitic jan.leb...@online.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] build: Configure banana-checker and jsonlint - change (mediawiki...MapSources)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/219521 Change subject: build: Configure banana-checker and jsonlint .. build: Configure banana-checker and jsonlint Change-Id: I570f9186af24737a668eb0635a4a546cbcc490d1 --- M .gitignore A Gruntfile.js A package.json 3 files changed, 33 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MapSources refs/changes/21/219521/1 diff --git a/.gitignore b/.gitignore index 98b092a..4bf4869 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ *~ *.kate-swp .*.swp +node_modules/ diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 000..9c56558 --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,20 @@ +/*jshint node:true */ +module.exports = function ( grunt ) { + grunt.loadNpmTasks( 'grunt-banana-checker' ); + grunt.loadNpmTasks( 'grunt-jsonlint' ); + + grunt.initConfig( { + banana: { + all: 'i18n/' + }, + jsonlint: { + all: [ + '**/*.json', + '!node_modules/**' + ] + } + } ); + + grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] ); + grunt.registerTask( 'default', 'test' ); +}; diff --git a/package.json b/package.json new file mode 100644 index 000..76e8a82 --- /dev/null +++ b/package.json @@ -0,0 +1,12 @@ +{ + private: true, + scripts: { +test: grunt test + }, + devDependencies: { +grunt: 0.4.5, +grunt-cli: 0.1.13, +grunt-banana-checker: 0.2.2, +grunt-jsonlint: 1.0.4 + } +} -- To view, visit https://gerrit.wikimedia.org/r/219521 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I570f9186af24737a668eb0635a4a546cbcc490d1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MapSources 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] build: Configure banana-checker and jsonlint - change (mediawiki...RestBaseUpdateJobs)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/219546 Change subject: build: Configure banana-checker and jsonlint .. build: Configure banana-checker and jsonlint Change-Id: I7b43ba6647f4594cf9e7995f59c4db0f47c8f67b --- A .gitignore A Gruntfile.js A package.json 3 files changed, 33 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/RestBaseUpdateJobs refs/changes/46/219546/1 diff --git a/.gitignore b/.gitignore new file mode 100644 index 000..c2658d7 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +node_modules/ diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 000..9c56558 --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,20 @@ +/*jshint node:true */ +module.exports = function ( grunt ) { + grunt.loadNpmTasks( 'grunt-banana-checker' ); + grunt.loadNpmTasks( 'grunt-jsonlint' ); + + grunt.initConfig( { + banana: { + all: 'i18n/' + }, + jsonlint: { + all: [ + '**/*.json', + '!node_modules/**' + ] + } + } ); + + grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] ); + grunt.registerTask( 'default', 'test' ); +}; diff --git a/package.json b/package.json new file mode 100644 index 000..76e8a82 --- /dev/null +++ b/package.json @@ -0,0 +1,12 @@ +{ + private: true, + scripts: { +test: grunt test + }, + devDependencies: { +grunt: 0.4.5, +grunt-cli: 0.1.13, +grunt-banana-checker: 0.2.2, +grunt-jsonlint: 1.0.4 + } +} -- To view, visit https://gerrit.wikimedia.org/r/219546 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7b43ba6647f4594cf9e7995f59c4db0f47c8f67b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/RestBaseUpdateJobs 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] build: Configure banana-checker and jsonlint - change (mediawiki...Renameuser)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/219545 Change subject: build: Configure banana-checker and jsonlint .. build: Configure banana-checker and jsonlint Change-Id: Ida5ff0d9afb884e7ce17a30dd48eb131b104feba --- M .gitignore A Gruntfile.js A package.json 3 files changed, 32 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Renameuser refs/changes/45/219545/1 diff --git a/.gitignore b/.gitignore index 98b092a..4bf4869 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ *~ *.kate-swp .*.swp +node_modules/ diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 000..5a87e7b --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,19 @@ +/*jshint node:true */ +module.exports = function ( grunt ) { + grunt.loadNpmTasks( 'grunt-banana-checker' ); + grunt.loadNpmTasks( 'grunt-jsonlint' ); + + var conf = grunt.file.readJSON( 'extension.json' ); + grunt.initConfig( { + banana: conf.MessagesDirs, + jsonlint: { + all: [ + '**/*.json', + '!node_modules/**' + ] + } + } ); + + grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] ); + grunt.registerTask( 'default', 'test' ); +}; diff --git a/package.json b/package.json new file mode 100644 index 000..76e8a82 --- /dev/null +++ b/package.json @@ -0,0 +1,12 @@ +{ + private: true, + scripts: { +test: grunt test + }, + devDependencies: { +grunt: 0.4.5, +grunt-cli: 0.1.13, +grunt-banana-checker: 0.2.2, +grunt-jsonlint: 1.0.4 + } +} -- To view, visit https://gerrit.wikimedia.org/r/219545 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ida5ff0d9afb884e7ce17a30dd48eb131b104feba Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Renameuser 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] build: Configure banana-checker and jsonlint - change (mediawiki...RandomRootPage)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/219542 Change subject: build: Configure banana-checker and jsonlint .. build: Configure banana-checker and jsonlint Change-Id: Idea1a3ebad600d10bde19238cba5b3ee17d6f198 --- M .gitignore A Gruntfile.js A package.json 3 files changed, 32 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/RandomRootPage refs/changes/42/219542/1 diff --git a/.gitignore b/.gitignore index 98b092a..4bf4869 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ *~ *.kate-swp .*.swp +node_modules/ diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 000..5a87e7b --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,19 @@ +/*jshint node:true */ +module.exports = function ( grunt ) { + grunt.loadNpmTasks( 'grunt-banana-checker' ); + grunt.loadNpmTasks( 'grunt-jsonlint' ); + + var conf = grunt.file.readJSON( 'extension.json' ); + grunt.initConfig( { + banana: conf.MessagesDirs, + jsonlint: { + all: [ + '**/*.json', + '!node_modules/**' + ] + } + } ); + + grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] ); + grunt.registerTask( 'default', 'test' ); +}; diff --git a/package.json b/package.json new file mode 100644 index 000..76e8a82 --- /dev/null +++ b/package.json @@ -0,0 +1,12 @@ +{ + private: true, + scripts: { +test: grunt test + }, + devDependencies: { +grunt: 0.4.5, +grunt-cli: 0.1.13, +grunt-banana-checker: 0.2.2, +grunt-jsonlint: 1.0.4 + } +} -- To view, visit https://gerrit.wikimedia.org/r/219542 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idea1a3ebad600d10bde19238cba5b3ee17d6f198 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/RandomRootPage 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] build: Configure banana-checker and jsonlint - change (mediawiki...RelatedArticles)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/219543 Change subject: build: Configure banana-checker and jsonlint .. build: Configure banana-checker and jsonlint Change-Id: I7d0f6571baf2eef4948db8faea4a97bae0246641 --- M .gitignore A Gruntfile.js A package.json 3 files changed, 33 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/RelatedArticles refs/changes/43/219543/1 diff --git a/.gitignore b/.gitignore index 98b092a..4bf4869 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ *~ *.kate-swp .*.swp +node_modules/ diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 000..9c56558 --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,20 @@ +/*jshint node:true */ +module.exports = function ( grunt ) { + grunt.loadNpmTasks( 'grunt-banana-checker' ); + grunt.loadNpmTasks( 'grunt-jsonlint' ); + + grunt.initConfig( { + banana: { + all: 'i18n/' + }, + jsonlint: { + all: [ + '**/*.json', + '!node_modules/**' + ] + } + } ); + + grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] ); + grunt.registerTask( 'default', 'test' ); +}; diff --git a/package.json b/package.json new file mode 100644 index 000..76e8a82 --- /dev/null +++ b/package.json @@ -0,0 +1,12 @@ +{ + private: true, + scripts: { +test: grunt test + }, + devDependencies: { +grunt: 0.4.5, +grunt-cli: 0.1.13, +grunt-banana-checker: 0.2.2, +grunt-jsonlint: 1.0.4 + } +} -- To view, visit https://gerrit.wikimedia.org/r/219543 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7d0f6571baf2eef4948db8faea4a97bae0246641 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/RelatedArticles 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] build: Configure banana-checker and jsonlint - change (mediawiki...RSS)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/219541 Change subject: build: Configure banana-checker and jsonlint .. build: Configure banana-checker and jsonlint Change-Id: Ic62cf36d28c556cb74c89b6deeef49c1fd7324ff --- M .gitignore A Gruntfile.js A package.json 3 files changed, 33 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/RSS refs/changes/41/219541/1 diff --git a/.gitignore b/.gitignore index 98b092a..4bf4869 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ *~ *.kate-swp .*.swp +node_modules/ diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 000..9c56558 --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,20 @@ +/*jshint node:true */ +module.exports = function ( grunt ) { + grunt.loadNpmTasks( 'grunt-banana-checker' ); + grunt.loadNpmTasks( 'grunt-jsonlint' ); + + grunt.initConfig( { + banana: { + all: 'i18n/' + }, + jsonlint: { + all: [ + '**/*.json', + '!node_modules/**' + ] + } + } ); + + grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] ); + grunt.registerTask( 'default', 'test' ); +}; diff --git a/package.json b/package.json new file mode 100644 index 000..76e8a82 --- /dev/null +++ b/package.json @@ -0,0 +1,12 @@ +{ + private: true, + scripts: { +test: grunt test + }, + devDependencies: { +grunt: 0.4.5, +grunt-cli: 0.1.13, +grunt-banana-checker: 0.2.2, +grunt-jsonlint: 1.0.4 + } +} -- To view, visit https://gerrit.wikimedia.org/r/219541 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic62cf36d28c556cb74c89b6deeef49c1fd7324ff Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/RSS 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] build: Configure banana-checker and jsonlint - change (mediawiki...RelatedSites)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/219544 Change subject: build: Configure banana-checker and jsonlint .. build: Configure banana-checker and jsonlint Change-Id: I0fbf50e54dd2fc6644d7f58049620c164f2fa07a --- M .gitignore A Gruntfile.js A package.json 3 files changed, 33 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/RelatedSites refs/changes/44/219544/1 diff --git a/.gitignore b/.gitignore index 98b092a..4bf4869 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ *~ *.kate-swp .*.swp +node_modules/ diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 000..9c56558 --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,20 @@ +/*jshint node:true */ +module.exports = function ( grunt ) { + grunt.loadNpmTasks( 'grunt-banana-checker' ); + grunt.loadNpmTasks( 'grunt-jsonlint' ); + + grunt.initConfig( { + banana: { + all: 'i18n/' + }, + jsonlint: { + all: [ + '**/*.json', + '!node_modules/**' + ] + } + } ); + + grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] ); + grunt.registerTask( 'default', 'test' ); +}; diff --git a/package.json b/package.json new file mode 100644 index 000..76e8a82 --- /dev/null +++ b/package.json @@ -0,0 +1,12 @@ +{ + private: true, + scripts: { +test: grunt test + }, + devDependencies: { +grunt: 0.4.5, +grunt-cli: 0.1.13, +grunt-banana-checker: 0.2.2, +grunt-jsonlint: 1.0.4 + } +} -- To view, visit https://gerrit.wikimedia.org/r/219544 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0fbf50e54dd2fc6644d7f58049620c164f2fa07a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/RelatedSites 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] Introduce mediawiki.RegExp module - change (mediawiki/core)
Krinkle has uploaded a new change for review. https://gerrit.wikimedia.org/r/219562 Change subject: Introduce mediawiki.RegExp module .. Introduce mediawiki.RegExp module Simple module based on the $.escapeRE method of the old jquery.mwExtension module. Copied the same regex and tests as starting point. Change-Id: I9e108a3f8c24d87bb239b63a14807a691c25aa3e --- M resources/Resources.php A resources/src/mediawiki/mediawiki.RegExp.js M tests/qunit/QUnitTestResources.php A tests/qunit/suites/resources/mediawiki/mediawiki.RegExp.test.js 4 files changed, 65 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/62/219562/1 diff --git a/resources/Resources.php b/resources/Resources.php index c280770..0f2fc94 100644 --- a/resources/Resources.php +++ b/resources/Resources.php @@ -1020,6 +1020,10 @@ 'scripts' = 'resources/src/mediawiki/mediawiki.notify.js', 'targets' = array( 'desktop', 'mobile' ), ), + 'mediawiki.RegExp' = array( + 'scripts' = 'resources/src/mediawiki/mediawiki.RegExp.js', + 'targets' = array( 'desktop', 'mobile' ), + ), 'mediawiki.pager.tablePager' = array( 'styles' = 'resources/src/mediawiki/mediawiki.pager.tablePager.less', 'position' = 'top', diff --git a/resources/src/mediawiki/mediawiki.RegExp.js b/resources/src/mediawiki/mediawiki.RegExp.js new file mode 100644 index 000..ffbbcaf --- /dev/null +++ b/resources/src/mediawiki/mediawiki.RegExp.js @@ -0,0 +1,18 @@ +( function ( mw ) { + /** +* @class mw.RegExp +*/ + mw.RegExp = { + /** +* Escape string for safe inclusion in regular expression +* +* @since 1.26 +* @static +* @param {string} str String to escape +* @return {string} Escaped string +*/ + escape: function ( str ) { + return str.replace( /([\\{}()|.?*+\-\^$\[\]])/g, '\\$1' ); + } + }; +}( mediaWiki ) ); diff --git a/tests/qunit/QUnitTestResources.php b/tests/qunit/QUnitTestResources.php index 9093797..c6f3a23 100644 --- a/tests/qunit/QUnitTestResources.php +++ b/tests/qunit/QUnitTestResources.php @@ -66,6 +66,7 @@ 'tests/qunit/suites/resources/mediawiki/mediawiki.jqueryMsg.test.js', 'tests/qunit/suites/resources/mediawiki/mediawiki.jscompat.test.js', 'tests/qunit/suites/resources/mediawiki/mediawiki.messagePoster.factory.test.js', + 'tests/qunit/suites/resources/mediawiki/mediawiki.RegExp.test.js', 'tests/qunit/suites/resources/mediawiki/mediawiki.template.test.js', 'tests/qunit/suites/resources/mediawiki/mediawiki.test.js', 'tests/qunit/suites/resources/mediawiki/mediawiki.Title.test.js', @@ -108,6 +109,7 @@ 'mediawiki.api.watch', 'mediawiki.jqueryMsg', 'mediawiki.messagePoster', + 'mediawiki.RegExp', 'mediawiki.Title', 'mediawiki.toc', 'mediawiki.Uri', diff --git a/tests/qunit/suites/resources/mediawiki/mediawiki.RegExp.test.js b/tests/qunit/suites/resources/mediawiki/mediawiki.RegExp.test.js new file mode 100644 index 000..13bd8d9 --- /dev/null +++ b/tests/qunit/suites/resources/mediawiki/mediawiki.RegExp.test.js @@ -0,0 +1,41 @@ +( function ( mw ) { + QUnit.module( 'mediawiki.RegExp' ); + + QUnit.test( 'escape', 5, function ( assert ) { + + var special = '!-- ([{+mW+}]) $^|?'; + + assert.equal( + mw.RegExp.escape( special ), + '!\\-\\- \\(\\[\\{\\+mW\\+\\}\\]\\) \\$\\^\\|\\?', + 'Escape special characters' + ); + + assert.propEqual( + ( 'x' + special + 'y' + special ).match( + new RegExp( '(' + mw.RegExp.escape( special ) + ')', 'g' ) + ), + [ special, special ], + 'Verify output is a valid regex that can match the input' + ); + + assert.equal( + mw.RegExp.escape( 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' ), + 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', + 'Leave uppercase characters alone' + ); + + assert.equal( + mw.RegExp.escape( 'abcdefghijklmnopqrstuvwxyz' ), + 'abcdefghijklmnopqrstuvwxyz', + 'Leave lowercase characters alone' + ); + + assert.equal( +