[MediaWiki-commits] [Gerrit] [testfix] Fix wikibase error message - change (pywikibot/core)
Xqt has uploaded a new change for review. https://gerrit.wikimedia.org/r/276104 Change subject: [testfix] Fix wikibase error message .. [testfix] Fix wikibase error message Punctuation for API message has been changed with rEWBA96eb0ead8f358b4c09b081ce2d284399ae6a12c5 Bug:T129276 Change-Id: Iaf4cbf98461550bd963f3672d7351f2315c0fac1 --- M tests/edit_failure_tests.py 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/04/276104/1 diff --git a/tests/edit_failure_tests.py b/tests/edit_failure_tests.py index 1ddaf6e..0ca3ef5 100644 --- a/tests/edit_failure_tests.py +++ b/tests/edit_failure_tests.py @@ -151,7 +151,7 @@ item = pywikibot.ItemPage(repo, 'Q68') claim = self._make_WbMonolingualText_claim(repo, text=123456, language='en') self.assertAPIError('invalid-snak', -'Invalid snak (Can only construct a ' +'Invalid snak. (Can only construct a ' 'MonolingualTextValue with a string value.)', item.addClaim, claim) -- To view, visit https://gerrit.wikimedia.org/r/276104 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iaf4cbf98461550bd963f3672d7351f2315c0fac1 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Xqt ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] New version for HHVM 3.12 - change (mediawiki...wikidiff2)
Giuseppe Lavagetto has submitted this change and it was merged. Change subject: New version for HHVM 3.12 .. New version for HHVM 3.12 * Amend both debian/rules and the cpp extension Change-Id: I36f43f18a63bf9eaad5ef15b2a4cbc41c1178874 --- M debian/changelog M debian/rules M hhvm_wikidiff2.cpp 3 files changed, 11 insertions(+), 5 deletions(-) Approvals: Giuseppe Lavagetto: Looks good to me, approved jenkins-bot: Verified diff --git a/debian/changelog b/debian/changelog index 6807779..045b14f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +php-wikidiff2 (1.3.5) unstable; urgency=medium + + * New version for HHVM 3.12; debian/rules changes + + -- Giuseppe Lavagetto wed, 02 Mar 2016 17:51:48 +0100 + php-wikidiff2 (1.3.4) trusty-wikimedia; urgency=medium * Version bump for HHVM 3.6 diff --git a/debian/rules b/debian/rules index 8265ced..1db1897 100755 --- a/debian/rules +++ b/debian/rules @@ -36,7 +36,8 @@ override_dh_gencontrol: echo "php:Depends=phpapi-$(shell php-config5 --phpapi)" >> debian/php-wikidiff2.substvars - echo "hhvm:ApiVersion=hhvm-api-$(shell /usr/bin/hhvm --version | sed -ne 's/^Extension API:\ //p')" >> debian/hhvm-wikidiff2.substvars + hhvmapi=$(shell /usr/bin/hhvm --version | sed -ne 's/^HipHop VM \(.*\)\..*/\1/p') && \ + [ -n "$${hhvmapi}" ] && echo "hhvm:ApiVersion=hhvm-api-$${hhvmapi}" >> debian/hhvm-wikidiff2.substvars dh_gencontrol override_dh_auto_clean: diff --git a/hhvm_wikidiff2.cpp b/hhvm_wikidiff2.cpp index 4b533e3..69bd9c8 100644 --- a/hhvm_wikidiff2.cpp +++ b/hhvm_wikidiff2.cpp @@ -1,6 +1,8 @@ /* $Id$ */ -#include "hphp/runtime/base/base-includes.h" +#include "hphp/util/lock.h" +#include "hphp/runtime/ext/extension.h" +#include "hphp/util/compatibility.h" #include "hphp/util/alloc.h" #include "Wikidiff2.h" #include "TableDiff.h" @@ -71,6 +73,3 @@ HHVM_GET_MODULE(wikidiff2) } // namespace HPHP - - - -- To view, visit https://gerrit.wikimedia.org/r/274438 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I36f43f18a63bf9eaad5ef15b2a4cbc41c1178874 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/php/wikidiff2 Gerrit-Branch: master Gerrit-Owner: Giuseppe Lavagetto Gerrit-Reviewer: Giuseppe Lavagetto Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] New version for HHVM 3.12 - change (mediawiki...tidy)
Giuseppe Lavagetto has submitted this change and it was merged. Change subject: New version for HHVM 3.12 .. New version for HHVM 3.12 * Updated debian/rules * Updated includes since base-includes.h is gone * Updated code to use req::malloc Bug: T119637 Change-Id: I64b94ec01486bfe58be7f93f22023b4dfafdae48 --- M debian/changelog M debian/control M debian/rules M ext_tidy.cpp 4 files changed, 21 insertions(+), 6 deletions(-) Approvals: Giuseppe Lavagetto: Verified; Looks good to me, approved diff --git a/debian/changelog b/debian/changelog index e9ae7e3..c439a78 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +hhvm-tidy (0.1.3) trusty-wikimedia; urgency=medium + + * Updating debian/rules for HHVM 3.12 + * Change includes given base-includes.h has been removed + * Renamed smart_malloc to req::malloc and so on following upstream transition + * Update debian/control with new build deps + * Changed versioning to debian native + + -- Giuseppe Lavagetto Tue, 01 Mar 2016 18:30:21 +0100 + hhvm-tidy (0.1-2) trusty-wikimedia; urgency=medium * Rewrite as bare-bones HNI extension providing only tidy_repair_string(). diff --git a/debian/control b/debian/control index a35907a..a22306d 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,9 @@ Section: web Priority: optional Maintainer: Ori Livneh -Build-Depends: debhelper (>= 9), hhvm-dev, cmake, libtidy-dev +Build-Depends: debhelper (>= 9), hhvm-dev, cmake, libtidy-dev, libtbb-dev, + libboost1.54-dev, libgoogle-glog-dev, libdouble-conversion-dev, + libjemalloc-dev Standards-Version: 3.9.5 Package: hhvm-tidy diff --git a/debian/rules b/debian/rules index c73bea0..184c688 100755 --- a/debian/rules +++ b/debian/rules @@ -14,7 +14,8 @@ override_dh_gencontrol: # HHVM does *not* ensure abi compatibility. - echo "hhvm:ApiVersion=hhvm-api-$(shell /usr/bin/hhvm --version | sed -ne 's/^Extension API:\ //p')" >> debian/hhvm-tidy.substvars + hhvmapi=$(shell /usr/bin/hhvm --version | sed -ne 's/^HipHop VM \(.*\)\..*/\1/p') && \ + [ -n "$${hhvmapi}" ] && echo "hhvm:ApiVersion=hhvm-api-$${hhvmapi}" >> debian/hhvm-tidy.substvars dh_gencontrol override_dh_strip: diff --git a/ext_tidy.cpp b/ext_tidy.cpp index 714f7c7..b5dcf73 100644 --- a/ext_tidy.cpp +++ b/ext_tidy.cpp @@ -14,7 +14,9 @@ | lice...@php.net so we can mail you a copy immediately. | +--+ */ -#include "hphp/runtime/base/base-includes.h" +#include "hphp/util/lock.h" +#include "hphp/runtime/ext/extension.h" +#include "hphp/util/compatibility.h" #include #include @@ -81,9 +83,9 @@ virtual void moduleInit() { HHVM_FE(tidy_repair_string); loadSystemlib(); -tidySetMallocCall(smart_malloc); -tidySetReallocCall(smart_realloc); -tidySetFreeCall(smart_free); +tidySetMallocCall(req::malloc); +tidySetReallocCall(req::realloc); +tidySetFreeCall(req::free); } } s_tidy_extension; -- To view, visit https://gerrit.wikimedia.org/r/274169 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I64b94ec01486bfe58be7f93f22023b4dfafdae48 Gerrit-PatchSet: 5 Gerrit-Project: mediawiki/php/tidy Gerrit-Branch: hni Gerrit-Owner: Giuseppe Lavagetto Gerrit-Reviewer: Giuseppe Lavagetto Gerrit-Reviewer: Ori.livneh ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Upgrade debian/rules for HHVM 3.12 - change (mediawiki...luasandbox)
Giuseppe Lavagetto has submitted this change and it was merged. Change subject: Upgrade debian/rules for HHVM 3.12 .. Upgrade debian/rules for HHVM 3.12 Bug: T119637 Change-Id: Ie6ce1e58ce404715e02d2b64a5e0b60db17d91d3 --- M debian/changelog M debian/rules 2 files changed, 8 insertions(+), 1 deletion(-) Approvals: Giuseppe Lavagetto: Looks good to me, approved jenkins-bot: Verified diff --git a/debian/changelog b/debian/changelog index 8fdade4..34d335f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +php-luasandbox (2.0.12) trusty-wikimedia; urgency=medium + + * Adapting debian/rules to the newer HHVM package + + -- Giuseppe Lavagetto Tue, 01 Mar 2016 13:30:04 +0100 + php-luasandbox (2.0.11) trusty-wikimedia; urgency=medium * Dynamically allocate luasandbox_timer instances diff --git a/debian/rules b/debian/rules index b99b488..c19f212 100755 --- a/debian/rules +++ b/debian/rules @@ -67,7 +67,8 @@ hhvm_gencontrol: # HHVM does *not* ensure binary compatibility - echo "hhvm:ApiVersion=hhvm-api-$(shell /usr/bin/hhvm --version | sed -ne 's/^Extension API:\ //p')" >> debian/hhvm-luasandbox.substvars + hhvmapi=$(shell /usr/bin/hhvm --version | sed -ne 's/^HipHop VM \(.*\)\..*/\1/p') && \ + [ -n "$${hhvmapi}" ] && echo "hhvm:ApiVersion=hhvm-api-$${hhvmapi}" >> debian/hhvm-luasandbox.substvars override_dh_auto_clean: rm -rf debian/build* -- To view, visit https://gerrit.wikimedia.org/r/274098 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie6ce1e58ce404715e02d2b64a5e0b60db17d91d3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/php/luasandbox Gerrit-Branch: master Gerrit-Owner: Giuseppe Lavagetto Gerrit-Reviewer: Anomie Gerrit-Reviewer: Giuseppe Lavagetto Gerrit-Reviewer: Jackmcbarn Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add i18n for API - change (mediawiki...LiveTranslate)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/276103 Change subject: Add i18n for API .. Add i18n for API Change-Id: I072c3eaa1bd42e9b361516ffb6955467e33be241 --- M i18n/en.json M i18n/qqq.json 2 files changed, 10 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/LiveTranslate refs/changes/03/276103/1 diff --git a/i18n/en.json b/i18n/en.json index fa2beda..44594c4 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -36,5 +36,9 @@ "livetranslate-special-current-tms": "Existing translation memories", "livetranslate-special-tms-update": "Update translation memories", "livetranslate-special-update": "Update translation memories", - "livetranslate-importtms-param-miscmatch": "Mismatch between amount of locations and types" + "livetranslate-importtms-param-miscmatch": "Mismatch between amount of locations and types", + "apihelp-query+livetranslate-description": "This module returns all special words defined in the wikis Live Translate Dictionary for a given language", + "apihelp-query+translationmemories-description": "This module returns all matching translation memories", + "apihelp-importtms-description": "Imports one or more translation memories.", + "apihelp-livetranslate-description": "Returns the available translations of the provided words in the source language in the destiniation language." } diff --git a/i18n/qqq.json b/i18n/qqq.json index 3f319f6..b880c54 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -43,5 +43,9 @@ "livetranslate-special-current-tms": "Used as HTML heading in [[Special:LiveTranslate]].\n\nFollowed by the \"translation memories\" table.", "livetranslate-special-tms-update": "Unused at this time.\n\nPreviously, used as HTML heading.\n\nPreviously, followed by {{msg-mw|livetranslate-special-update}}.", "livetranslate-special-update": "Used as label for the Submit button.\n\nPreviously, preceded by the heading {{msg-mw|Livetranslate-special-tms-update}}.", - "livetranslate-importtms-param-miscmatch": "Error message for when one of the API modules gets called with a different amount of translation memory types compared to the amount of translation memory names" + "livetranslate-importtms-param-miscmatch": "Error message for when one of the API modules gets called with a different amount of translation memory types compared to the amount of translation memory names", + "apihelp-query+livetranslate-description": "{{doc-apihelp-description|query+livetranslate}}", + "apihelp-query+translationmemories-description": "{{doc-apihelp-description|query+translationmemories}}", + "apihelp-importtms-description": "{{doc-apihelp-description|importtms}}", + "apihelp-livetranslate-description": "{{doc-apihelp-description|livetranslate}}" } -- To view, visit https://gerrit.wikimedia.org/r/276103 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I072c3eaa1bd42e9b361516ffb6955467e33be241 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/LiveTranslate Gerrit-Branch: master Gerrit-Owner: Siebrand ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Re-update changelog.md before deploying v0.0.27 - change (analytics...source)
Joal has submitted this change and it was merged. Change subject: Re-update changelog.md before deploying v0.0.27 .. Re-update changelog.md before deploying v0.0.27 Update for CDH dependencies had been forgotten. Change-Id: I97b1cc9190b4bae9991236a163b530c251ba1dc8 --- M changelog.md 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Joal: Verified; Looks good to me, approved diff --git a/changelog.md b/changelog.md index ce84bf4..75d822e 100644 --- a/changelog.md +++ b/changelog.md @@ -1,4 +1,5 @@ ## v0.0.27 +* Upgrade CDH dependencies to 5.5.2 * Implement the Wikimedia User Agent policy in setting agent type. * Remove WikimediaBot tagging. * Add ApiAction avro schema. -- To view, visit https://gerrit.wikimedia.org/r/276102 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I97b1cc9190b4bae9991236a163b530c251ba1dc8 Gerrit-PatchSet: 1 Gerrit-Project: analytics/refinery/source Gerrit-Branch: master Gerrit-Owner: Joal Gerrit-Reviewer: Joal ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Re-update changelog.md before deploying v0.0.27 - change (analytics...source)
Joal has uploaded a new change for review. https://gerrit.wikimedia.org/r/276102 Change subject: Re-update changelog.md before deploying v0.0.27 .. Re-update changelog.md before deploying v0.0.27 Update for CDH dependencies had been forgotten. Change-Id: I97b1cc9190b4bae9991236a163b530c251ba1dc8 --- M changelog.md 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/refinery/source refs/changes/02/276102/1 diff --git a/changelog.md b/changelog.md index ce84bf4..75d822e 100644 --- a/changelog.md +++ b/changelog.md @@ -1,4 +1,5 @@ ## v0.0.27 +* Upgrade CDH dependencies to 5.5.2 * Implement the Wikimedia User Agent policy in setting agent type. * Remove WikimediaBot tagging. * Add ApiAction avro schema. -- To view, visit https://gerrit.wikimedia.org/r/276102 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I97b1cc9190b4bae9991236a163b530c251ba1dc8 Gerrit-PatchSet: 1 Gerrit-Project: analytics/refinery/source Gerrit-Branch: master Gerrit-Owner: Joal ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Change Hadoop and hive dependencies to latest CDH - change (analytics...source)
Joal has submitted this change and it was merged. Change subject: Change Hadoop and hive dependencies to latest CDH .. Change Hadoop and hive dependencies to latest CDH Change-Id: I86563c2ddde6850ca5b2e280f745be3f74699468 --- M pom.xml 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Joal: Looks good to me, approved jenkins-bot: Verified diff --git a/pom.xml b/pom.xml index 0fb4d32..da2c3cb 100644 --- a/pom.xml +++ b/pom.xml @@ -299,10 +299,10 @@ UTF-8 false 1.7 - 2.6.0-cdh5.4.0 - 1.1.0-cdh5.4.0 + 2.6.0-cdh5.5.2 + 1.1.0-cdh5.5.2 2.10.4 - 1.3.0-cdh5.4.0 + 1.5.0-cdh5.5.2 0.1.0-wmf6 -- To view, visit https://gerrit.wikimedia.org/r/273889 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I86563c2ddde6850ca5b2e280f745be3f74699468 Gerrit-PatchSet: 1 Gerrit-Project: analytics/refinery/source Gerrit-Branch: master Gerrit-Owner: Joal Gerrit-Reviewer: Joal Gerrit-Reviewer: Ottomata Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Allow continuing a translation that was published - change (mediawiki...ContentTranslation)
Santhosh has uploaded a new change for review. https://gerrit.wikimedia.org/r/276101 Change subject: Allow continuing a translation that was published .. Allow continuing a translation that was published Translator need to decide on overwrite or not. Warnings will be shown about this before continuing translation and before publishing. Bug: T102966 Change-Id: I7aa6a23d7caf521fa236b60b2be0b12f5ac6136d --- M extension.json M i18n/en.json M i18n/qqq.json M modules/dashboard/ext.cx.translationlist.js A modules/dashboard/images/continue.png A modules/dashboard/images/continue.svg M modules/dashboard/styles/ext.cx.translationlist.less 7 files changed, 53 insertions(+), 33 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/01/276101/1 diff --git a/extension.json b/extension.json index 72d8d65..1de3f29 100644 --- a/extension.json +++ b/extension.json @@ -888,6 +888,7 @@ "messages": [ "cx-dashboard-header", "cx-discard-translation", + "cx-continue-translation", "cx-translation-status-draft", "cx-translation-status-deleted", "cx-translation-status-published", diff --git a/i18n/en.json b/i18n/en.json index 065af70..94b9625 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -213,5 +213,6 @@ "cx-tools-linter-hide-details": "Hide details", "cx-translator-month-stats-label": "This month", "cx-translator-total-translations-label": "Total", - "cx-page-old-revision-loaded": "This translation is based on an older version of the content. The source page may have [$1 changed significantly]. You can continue this translation or start it again to use the updated content." + "cx-page-old-revision-loaded": "This translation is based on an older version of the content. The source page may have [$1 changed significantly]. You can continue this translation or start it again to use the updated content.", + "cx-continue-translation": "Continue translation" } diff --git a/i18n/qqq.json b/i18n/qqq.json index 7f0a3ee..28d5bef 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -219,5 +219,6 @@ "cx-tools-linter-hide-details": "Label for abusefilter error hide/collapse link in linter card", "cx-translator-month-stats-label": "Label displayed in the translation statistics of current user.", "cx-translator-total-translations-label": "Label displayed in the translation statistics of current user.\n{{Identical|Total}}", - "cx-page-old-revision-loaded": "Warning message shown when the older revision of source page loaded" + "cx-page-old-revision-loaded": "Warning message shown when the older revision of source page loaded", + "cx-continue-translation": "Menu item label shown for published translations to continue translations" } diff --git a/modules/dashboard/ext.cx.translationlist.js b/modules/dashboard/ext.cx.translationlist.js index 9977372..a151828 100644 --- a/modules/dashboard/ext.cx.translationlist.js +++ b/modules/dashboard/ext.cx.translationlist.js @@ -198,29 +198,23 @@ * * @param {Object} translation */ - CXTranslationList.prototype.startTranslation = function ( translation ) { + CXTranslationList.prototype.continueTranslation = function ( translation ) { if ( translation.status === 'deleted' ) { return false; } - if ( translation.status === 'draft' ) { - // Set CX token as cookie. - mw.cx.siteMapper.setCXToken( - translation.sourceLanguage, - translation.targetLanguage, - translation.sourceTitle - ); - location.href = new mw.Uri( mw.cx.siteMapper.getCXUrl( - translation.sourceTitle, - translation.targetTitle, - translation.sourceLanguage, - translation.targetLanguage - ) ).toString(); - } - - if ( translation.status === 'published' ) { - location.href = translation.targetURL; - } + // Set CX token as cookie. + mw.cx.siteMapper.setCXToken( + translation.sourceLanguage, + translation.targetLanguage, + translation.sourceTitle + ); + location.href = new mw.Uri( mw.cx.siteMapper.getCXUrl( + translation.sourceTitle, + translation.targetTitle, +
[MediaWiki-commits] [Gerrit] Allow X-Wikimedia-Debug header to contain multiple fields - change (operations/puppet)
Ori.livneh has submitted this change and it was merged. Change subject: Allow X-Wikimedia-Debug header to contain multiple fields .. Allow X-Wikimedia-Debug header to contain multiple fields In addition to backend selection, I'd like to be able to enable request profiling via the XWD header. Since there may be other behaviors that we want to be able to control with the header, allow the header to consist of semicolon-separated fields, each of which may either be an attribute name or an attribute name=value pair. The 'backend' attribute may be used to specify the backend. For back-compat, if the header is not well-formed, treat the whole header value as the backend value. Change-Id: If6e20ca7f2bcf1d108f7d46539803358de9c2a24 --- M modules/debug_proxy/templates/debug_proxy.nginx.erb 1 file changed, 15 insertions(+), 3 deletions(-) Approvals: Ori.livneh: Verified; Looks good to me, approved diff --git a/modules/debug_proxy/templates/debug_proxy.nginx.erb b/modules/debug_proxy/templates/debug_proxy.nginx.erb index 90a9a29..db8ee38 100644 --- a/modules/debug_proxy/templates/debug_proxy.nginx.erb +++ b/modules/debug_proxy/templates/debug_proxy.nginx.erb @@ -2,8 +2,20 @@ # application servers that are reserved for debugging, based on # the value of the X-Wikimedia-Debug header. +# The X-Wikimedia-Debug header is made up of semicolon-separated +# fields. Each field may consist of either an attribute name or +# an attribute=value pairs. The block below extracts the value of +# the 'backend' attribute. For backward-compatibility, if the +# header does not contain a well-formed 'backend' attribute, then +# the entire header is used as the backend value. + map $http_x_wikimedia_debug $debug_backend { - <%= @backend_regexp.sub(/^~*/, '~').to_pson %> $http_x_wikimedia_debug; + "~backend=(?[^;]+)" $h; + default $http_x_wikimedia_debug; +} + +map $debug_backend $debug_host { + <%= @backend_regexp.sub(/^~*/, '~').to_pson %> $debug_backend; <%= @backend_aliases.sort.map { |k, v| "#{k.to_pson} #{v.to_pson};" }.join("\n ") %> default 'invalid'; } @@ -16,12 +28,12 @@ resolver <%= @resolver %>; location / { -if ($debug_backend = invalid) { +if ($debug_host = invalid) { return 400; } proxy_buffering off; -proxy_pass $scheme://$debug_backend; +proxy_pass $scheme://$debug_host; proxy_pass_request_headers on; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $host; -- To view, visit https://gerrit.wikimedia.org/r/276100 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If6e20ca7f2bcf1d108f7d46539803358de9c2a24 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ori.livneh Gerrit-Reviewer: Ori.livneh Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Allow X-Wikimedia-Debug header to contain multiple fields - change (operations/puppet)
Ori.livneh has uploaded a new change for review. https://gerrit.wikimedia.org/r/276100 Change subject: Allow X-Wikimedia-Debug header to contain multiple fields .. Allow X-Wikimedia-Debug header to contain multiple fields In addition to backend selection, I'd like to be able to enable request profiling via the XWD header. Since there may be other behaviors that we want to be able to control with the header, allow the header to consist of semicolon-separated fields, each of which may either be an attribute name or an attribute name=value pair. The 'backend' attribute may be used to specify the backend. For back-compat, if the header is not well-formed, treat the whole header value as the backend value. Change-Id: If6e20ca7f2bcf1d108f7d46539803358de9c2a24 --- M modules/debug_proxy/templates/debug_proxy.nginx.erb 1 file changed, 15 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/00/276100/1 diff --git a/modules/debug_proxy/templates/debug_proxy.nginx.erb b/modules/debug_proxy/templates/debug_proxy.nginx.erb index 90a9a29..db8ee38 100644 --- a/modules/debug_proxy/templates/debug_proxy.nginx.erb +++ b/modules/debug_proxy/templates/debug_proxy.nginx.erb @@ -2,8 +2,20 @@ # application servers that are reserved for debugging, based on # the value of the X-Wikimedia-Debug header. +# The X-Wikimedia-Debug header is made up of semicolon-separated +# fields. Each field may consist of either an attribute name or +# an attribute=value pairs. The block below extracts the value of +# the 'backend' attribute. For backward-compatibility, if the +# header does not contain a well-formed 'backend' attribute, then +# the entire header is used as the backend value. + map $http_x_wikimedia_debug $debug_backend { - <%= @backend_regexp.sub(/^~*/, '~').to_pson %> $http_x_wikimedia_debug; + "~backend=(?[^;]+)" $h; + default $http_x_wikimedia_debug; +} + +map $debug_backend $debug_host { + <%= @backend_regexp.sub(/^~*/, '~').to_pson %> $debug_backend; <%= @backend_aliases.sort.map { |k, v| "#{k.to_pson} #{v.to_pson};" }.join("\n ") %> default 'invalid'; } @@ -16,12 +28,12 @@ resolver <%= @resolver %>; location / { -if ($debug_backend = invalid) { +if ($debug_host = invalid) { return 400; } proxy_buffering off; -proxy_pass $scheme://$debug_backend; +proxy_pass $scheme://$debug_host; proxy_pass_request_headers on; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $host; -- To view, visit https://gerrit.wikimedia.org/r/276100 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If6e20ca7f2bcf1d108f7d46539803358de9c2a24 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ori.livneh ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Revert "Revert "set default userinterface_lang in config"" - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: Revert "Revert "set default userinterface_lang in config"" .. Revert "Revert "set default userinterface_lang in config"" This reverts commit a0a416b5a159a411a504caac2f8c504f5fa2790b, after the problem causing the revert was fixed with 07f3f168263b. Change-Id: Ie89ebdd2c4d518d735d5794e0b070558783df066 --- M pywikibot/config2.py M pywikibot/i18n.py 2 files changed, 6 insertions(+), 6 deletions(-) Approvals: John Vandenberg: Looks good to me, but someone else must approve Xqt: Looks good to me, approved jenkins-bot: Verified diff --git a/pywikibot/config2.py b/pywikibot/config2.py index 1b866d1..0491846 100644 --- a/pywikibot/config2.py +++ b/pywikibot/config2.py @@ -50,6 +50,7 @@ import sys import types +from locale import getdefaultlocale from warnings import warn from pywikibot.logging import error, output, warning @@ -1085,6 +1086,8 @@ 'forward slashs as a path delimiter or to escape the normal ' 'path delimiter.') +if userinterface_lang is None: +userinterface_lang = getdefaultlocale()[0].split('_')[0] # Fix up default site if family == 'wikipedia' and mylang == 'language': diff --git a/pywikibot/i18n.py b/pywikibot/i18n.py index fa60f4b..5739837 100644 --- a/pywikibot/i18n.py +++ b/pywikibot/i18n.py @@ -27,7 +27,6 @@ # import json -import locale import os import pkgutil import re @@ -715,9 +714,8 @@ """ Ask the user a question, return the user's answer. -The prompt message is retrieved via L{twtranslate} and either uses the -config variable 'userinterface_lang' or the default locale as the language -code. +The prompt message is retrieved via L{twtranslate} and uses the +config variable 'userinterface_lang'. @param twtitle: The TranslateWiki string title, in - format @param parameters: The values which will be applied to the translated text @@ -733,8 +731,7 @@ else: prompt = fallback_prompt else: -code = config.userinterface_lang or \ -locale.getdefaultlocale()[0].split('_')[0] +code = config.userinterface_lang prompt = twtranslate(code, twtitle, parameters) return pywikibot.input(prompt, password) -- To view, visit https://gerrit.wikimedia.org/r/203896 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie89ebdd2c4d518d735d5794e0b070558783df066 Gerrit-PatchSet: 5 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Ladsgroup Gerrit-Reviewer: John Vandenberg Gerrit-Reviewer: Ladsgroup Gerrit-Reviewer: Merlijn van Deen Gerrit-Reviewer: Xqt Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Corresponding changes for Echo 99+ refactoring - change (mediawiki...Flow)
Mattflaschen has uploaded a new change for review. https://gerrit.wikimedia.org/r/276099 Change subject: Corresponding changes for Echo 99+ refactoring .. Corresponding changes for Echo 99+ refactoring Also fixed this for newtopic bundle which says it has a cap of 250, but did not actually AFAICT. Change-Id: Ibfa56b1af9e8c56b4c5f900e0d487bc09688b2a2 Depends-On: Iabeaae747f99980c0610d552f6b38f89d940b890 --- M i18n/en.json M i18n/qqq.json M includes/Notifications/FlowPresentationModel.php M includes/Notifications/Formatter.php M includes/Notifications/NewTopicPresentationModel.php M includes/Notifications/PostReplyPresentationModel.php 6 files changed, 37 insertions(+), 31 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/99/276099/1 diff --git a/i18n/en.json b/i18n/en.json index 7727cf8..ca9f636 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -266,20 +266,20 @@ "flow-last-modified": "Last modified about $1", "flow-workflow": "workflow", "flow-notification-reply": "[$5 $2]$1 {{GENDER:$1|responded}} on '''$4'''.", - "flow-notification-reply-bundle": "[$4 $2]$1 and $5 {{PLURAL:$6|other|others}} {{GENDER:$1|responded}} on '''$3'''.", + "flow-notification-reply-bundle": "[$4 $2]$1 and {{PLURAL:$5|one other|$5 others|100=99+ others}} {{GENDER:$1|responded}} on '''$3'''.", "flow-notification-edit": "[$6 $2]$1 has {{GENDER:$1|edited}} your [$5 post] on [[$3|$4]].", - "flow-notification-edit-bundle": "$1 and $5 {{PLURAL:$6|other|others}} {{GENDER:$1|edited}} a [$4 post] in \"$2\" on \"$3\".", + "flow-notification-edit-bundle": "$1 and {{PLURAL:$5|one other|$5 others|100=99+ others}} {{GENDER:$1|edited}} a [$4 post] in \"$2\" on \"$3\".", "notification-header-flow-new-topic-v2": "New topic created on '''$3''': \"'''$4'''\".", - "notification-bundle-header-flow-new-topic": "$1 new {{PLURAL:$2|topic|topics}} on '''$3'''.", + "notification-bundle-header-flow-new-topic": "$1 new {{PLURAL:$1|topic|topics}} on '''$3'''.", "notification-body-flow-new-topic-v2": "$1", "notification-header-flow-new-topic-user-talk": "A new topic was created on '''your talk page''': \"'''$4'''\".", - "notification-bundle-header-flow-new-topic-user-talk": "$1 new {{PLURAL:$2|topic|topics}} on '''your talk page'''.", + "notification-bundle-header-flow-new-topic-user-talk": "$1 new {{PLURAL:$1|topic|topics}} on '''your talk page'''.", "notification-body-flow-new-topic-user-talk": "$1", "notification-header-flow-post-reply": "$1 {{GENDER:$2|replied}} in \"'''$4'''\".", - "notification-bundle-header-flow-post-reply-v2": "$1 new {{PLURAL:$2|reply|replies}} in \"'''$3'''\".", + "notification-bundle-header-flow-post-reply-v2": "$1 new {{PLURAL:$1|reply|replies}} in \"'''$3'''\".", "notification-body-flow-post-reply-v2": "$1", "notification-header-flow-post-reply-user-talk": "$1 {{GENDER:$2|posted}} a reply on '''your talk page''' in \"'''$4'''\".", - "notification-bundle-header-flow-post-reply-user-talk": "$1 new {{PLURAL:$2|reply|replies}} on '''your talk page''' in \"'''$3'''\".", + "notification-bundle-header-flow-post-reply-user-talk": "$1 new {{PLURAL:$1|reply|replies}} on '''your talk page''' in \"'''$3'''\".", "notification-body-flow-post-reply-user-talk": "$1", "notification-header-flow-post-edited-v2": "{{GENDER:$2|Your}} post in \"'''$1'''\" was edited.", "notification-bundle-header-flow-post-edited-v2": "{{GENDER:$2|Your}} post in \"'''$1'''\" was edited multiple times.", @@ -299,7 +299,7 @@ "notification-body-flow-summary-edited-user-talk": "$1", "notification-email-subject-flow-summary-edited": "$1 {{GENDER:$1|updated}} the summary on $2.", "notification-email-batch-body-flow-summary-edited": "$1 {{GENDER:$1|updated}} the summary on $2.", - "notification-email-batch-bundle-body-flow-summary-edited": "$1 and $3 {{PLURAL:$4|other|others}} {{GENDER:$1|updated}} the summary on $2", + "notification-email-batch-bundle-body-flow-summary-edited": "$1 and {{PLURAL:$3|one other|$3 others|100=99+ others}} {{GENDER:$1|updated}} the summary on $2", "notification-header-flow-mention-post": "$1 {{GENDER:$2|mentioned}} {{GENDER:$4|you}} in \"'''$5'''\".", "notification-header-flow-mention-header": "$1 {{GENDER:$2|mentioned}} {{GENDER:$4|you}} in the description of '''$3'''.", "notification-header-flow-mention-post-summary": "$1 {{GENDER:$2|mentioned}} {{GENDER:$4|you}} in \"'''$5'''\".", @@ -314,9 +314,9 @@ "notification-links-flow-description-edited-view-page": "{{GENDER:$1|View}} page", "notification-email-subject-flow-description-edited": "$1 {{GENDER:$1|edited}} the description on $2.", "notification-email-batch-body-flow-description
[MediaWiki-commits] [Gerrit] echo-notification-count is removed; echo-badge-count opt. si... - change (translatewiki)
Mattflaschen has uploaded a new change for review. https://gerrit.wikimedia.org/r/276097 Change subject: echo-notification-count is removed; echo-badge-count opt. similarly .. echo-notification-count is removed; echo-badge-count opt. similarly Change-Id: I2a4b6938aed49e4101deb6b9351c43656a863490 Depends-On: Iabeaae747f99980c0610d552f6b38f89d940b890 --- M groups/MediaWiki/mediawiki-extensions.txt 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/97/276097/1 diff --git a/groups/MediaWiki/mediawiki-extensions.txt b/groups/MediaWiki/mediawiki-extensions.txt index e0d225d..3c12cec 100644 --- a/groups/MediaWiki/mediawiki-extensions.txt +++ b/groups/MediaWiki/mediawiki-extensions.txt @@ -888,7 +888,7 @@ Echo aliasfile = Echo/Echo.alias.php -optional = echo-notification-count +optional = echo-badge-count optional = echo-email-batch-separator, echo-email-batch-bullet, echo-quotation-marks optional = notification-body-edit-user-talk-with-section, notification-body-reverted optional = echo-foreign-wiki-lang -- To view, visit https://gerrit.wikimedia.org/r/276097 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2a4b6938aed49e4101deb6b9351c43656a863490 Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Mattflaschen ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove reference to echo-notification-count (unused) - change (mediawiki...MobileFrontend)
Mattflaschen has uploaded a new change for review. https://gerrit.wikimedia.org/r/276098 Change subject: Remove reference to echo-notification-count (unused) .. Remove reference to echo-notification-count (unused) Change-Id: Ibf784b279d56773a227ff261b75f2b26125bbb63 --- M includes/MobileFrontend.hooks.php 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/98/276098/1 diff --git a/includes/MobileFrontend.hooks.php b/includes/MobileFrontend.hooks.php index 17c6e55..292160b 100644 --- a/includes/MobileFrontend.hooks.php +++ b/includes/MobileFrontend.hooks.php @@ -1120,7 +1120,6 @@ 'echo-none', 'notifications', 'echo-overlay-link', - 'echo-notification-count', ), 'targets' => array( 'mobile', 'desktop' ), ), -- To view, visit https://gerrit.wikimedia.org/r/276098 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibf784b279d56773a227ff261b75f2b26125bbb63 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Mattflaschen ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] WIP: Make plural support for large values (100 or more) expl... - change (mediawiki...Echo)
Mattflaschen has uploaded a new change for review. https://gerrit.wikimedia.org/r/276096 Change subject: WIP: Make plural support for large values (100 or more) explicit in l10n .. WIP: Make plural support for large values (100 or more) explicit in l10n This involves: * Making this value no longer admin-configurable. * Changing getNotificationCountForOutput to return only a single value Since there is no + in the formatted value anymore, we can actually use the same value for both. This is a B/C break, but hopefully worth it to simplify the method call. For now, the excess parameter is just marked unused. It could be removed at some point if the translations are updated. This must be merged at the same time as: * Flow - Ibfa56b1af9e8c56b4c5f900e0d487bc09688b2a2 * MobileFrontend - Ibf784b279d56773a227ff261b75f2b26125bbb63 (well, MF can be merged first) * translatewiki - Iabeaae747f99980c0610d552f6b38f89d940b890 Also, remove reference to no-longer-existent notification-page-linked-bundle Change-Id: Iabeaae747f99980c0610d552f6b38f89d940b890 --- M Echo.php M Hooks.php M Resources.php M i18n/en.json M i18n/qqq.json M includes/EmailBatch.php M includes/NotifUser.php M includes/controller/NotificationController.php M includes/formatters/BasicFormatter.php M includes/formatters/EditUserTalkPresentationModel.php M includes/formatters/EventPresentationModel.php M includes/formatters/PageLinkFormatter.php M includes/formatters/PageLinkedPresentationModel.php M includes/gateway/UserNotificationGateway.php M modules/ooui/mw.echo.ui.NotificationBadgeWidget.js M tests/phpunit/NotifUserTest.php 16 files changed, 91 insertions(+), 114 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo refs/changes/96/276096/1 diff --git a/Echo.php b/Echo.php index dd24a9b..4f9434e 100644 --- a/Echo.php +++ b/Echo.php @@ -150,10 +150,6 @@ // main one. Must be a key defined in $wgExternalServers $wgEchoSharedTrackingCluster = false; -// The max notification count showed in badge -// The max number showed in bundled message, eg, and 99+ others -$wgEchoMaxNotificationCount = 99; - // The max number of notifications allowed for a user to do a live update, // this is also the number of max notifications allowed for a user to have // @FIXME - the name is not intuitive, probably change it when the deleteJob patch @@ -400,8 +396,6 @@ 'formatter-class' => 'EchoPageLinkFormatter', 'title-message' => 'notification-page-linked', 'title-params' => array( 'agent', 'title', 'link-from-page' ), - 'bundle-message' => 'notification-page-linked-bundle', - 'bundle-params' => array( 'agent', 'title', 'link-from-page', 'link-from-page-other-display', 'link-from-page-other-count' ), 'email-subject-message' => 'notification-page-linked-email-subject', 'email-subject-params' => array(), 'email-body-batch-message' => 'notification-page-linked-email-batch-body', diff --git a/Hooks.php b/Hooks.php index b326795..0f40780 100644 --- a/Hooks.php +++ b/Hooks.php @@ -740,8 +740,12 @@ // Add a "My notifications" item to personal URLs $notifUser = MWEchoNotifUser::newFromUser( $user ); - $msgCount = $notifUser->getMessageCount(); - $alertCount = $notifUser->getAlertCount(); + $msgCount = EchoNotificationController::getCappedNotificationCount( + $notifUser->getMessageCount() + ); + $alertCount = EchoNotificationController::getCappedNotificationCount( + $notifUser->getAlertCount() + ); $msgNotificationTimestamp = $notifUser->getLastUnreadMessageTime(); $alertNotificationTimestamp = $notifUser->getLastUnreadAlertTime(); @@ -754,8 +758,8 @@ 'message' => $seenMsgTime ) ); - $msgText = EchoNotificationController::formatNotificationCount( $msgCount ); - $alertText = EchoNotificationController::formatNotificationCount( $alertCount ); + $msgText = $sk->msg( 'echo-badge-count' )->numParams( $msgCount )->text(); + $alertText = $sk->msg( 'echo-badge-count' )->numParams( $alertCount )->text(); $url = SpecialPage::getTitleFor( 'Notifications' )->getLocalURL(); @@ -1168,8 +1172,7 @@ } public static function onResourceLoaderGetConfigVars( &$vars ) { - global $wgEchoMaxNotificationCount; - $vars['wgEchoMaxNotificationCount'] = $wgEchoMaxNotificationCount; + $vars['wgEchoMaxNotificationCount'] = MWEchoNotifUser::MAX_NOTIFICATION_COUNT; return true; } diff --git a/Resources.php b/Resources.php index 10889ca..f6a5b92 100644 ---
[MediaWiki-commits] [Gerrit] Add a script to rebase changes from prior phpcs standards - change (mediawiki...code-utils)
Tim Starling has uploaded a new change for review. https://gerrit.wikimedia.org/r/276095 Change subject: Add a script to rebase changes from prior phpcs standards .. Add a script to rebase changes from prior phpcs standards Change-Id: I73fef6fa3da84ed26c76ca8f545e0a1283bd3086 --- A rebase-long-array 1 file changed, 56 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/code-utils refs/changes/95/276095/1 diff --git a/rebase-long-array b/rebase-long-array new file mode 100755 index 000..10657a8 --- /dev/null +++ b/rebase-long-array @@ -0,0 +1,56 @@ +#!/bin/bash + +set -e + +# Configuration + +SOURCE_DIR="$MW_INSTALL_PATH" +WORK_BRANCH="$1" +MASTER_BRANCH=master +SCHROOT_PREFIX= +SCHROOT_OVERLAY= + +# End configuration + +function fix_source() { + $SCHROOT_PREFIX vendor/bin/phpcbf $FILES \ + || true # phpcbf returns 1 when it fixes things + if [ -n "$SCHROOT_OVERLAY" ]; then + for f in $FILES; do + mv -v "$SCHROOT_OVERLAY/$f" "$SOURCE_DIR/$f" + done + fi +} + +cd "$SOURCE_DIR" +git checkout "$WORK_BRANCH" + +FILES=$(git diff-tree -r --name-only HEAD^ HEAD) +UNFIXED_WORK=$(git rev-parse "$WORK_BRANCH") + +echo "Trying to fix $UNFIXED_WORK" + +# Generate fixed base commit + +git checkout "$WORK_BRANCH"^ +fix_source +git commit -a -m "Temporary commit: fixed base" +FIXED_BASE=$(git rev-parse HEAD) + +# Generate fixed work commit +git checkout "$UNFIXED_WORK" +fix_source +git commit -a -m "Temporary commit: fixed work" +FIXED_WORK=$(git rev-parse HEAD) + +# Reset the work branch to master +git checkout "$WORK_BRANCH" +git reset --hard "$MASTER_BRANCH" + +# Synthesize a commit on top of it, with conflict markers +git diff "$FIXED_BASE" "$FIXED_WORK" | git apply --index -3 || true + +# Write the old commit message to MERGE_MSG so that it will be used as the default commit message +git log -1 "$UNFIXED_WORK" --format=%B > .git/MERGE_MSG + +echo "Done. Type \"git commit\" when ready." -- To view, visit https://gerrit.wikimedia.org/r/276095 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I73fef6fa3da84ed26c76ca8f545e0a1283bd3086 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/tools/code-utils Gerrit-Branch: master Gerrit-Owner: Tim Starling ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Bump portals to master - change (operations/mediawiki-config)
JGirault has uploaded a new change for review. https://gerrit.wikimedia.org/r/276094 Change subject: Bump portals to master .. Bump portals to master Release to Production: Prominent Search Box with type-ahead (metadata/images in search results) Bug: T125472 Change-Id: Ibb2bd0a4f73682be12741e2b70d9fc800cec0706 --- M portals 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/94/276094/1 diff --git a/portals b/portals index 2e57bfb..af01e3b 16 --- a/portals +++ b/portals -Subproject commit 2e57bfbd83acce979a25bf213dfd9b44310e3ec2 +Subproject commit af01e3bf5850317b60ee6e1ec55125a767acc373 -- To view, visit https://gerrit.wikimedia.org/r/276094 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibb2bd0a4f73682be12741e2b70d9fc800cec0706 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: JGirault ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Revert "tools: Add paws as a separate host" - change (operations/puppet)
Yuvipanda has submitted this change and it was merged. Change subject: Revert "tools: Add paws as a separate host" .. Revert "tools: Add paws as a separate host" Somehow this kills icinga. I hate computers. This reverts commit 617f626de400a53620d1b39d4a0d00f418512b77. This reverts commit f6174ca0b365a7fb1c56473d8353ed99a5ddf22c. Change-Id: Ibd13bf618277c05466f1fcca43033d9bde1c381d --- M modules/nagios_common/files/contactgroups.cfg M modules/toollabs/manifests/monitoring/icinga.pp 2 files changed, 0 insertions(+), 16 deletions(-) Approvals: Yuvipanda: Verified; Looks good to me, approved diff --git a/modules/nagios_common/files/contactgroups.cfg b/modules/nagios_common/files/contactgroups.cfg index 184664d..ed5f40a 100644 --- a/modules/nagios_common/files/contactgroups.cfg +++ b/modules/nagios_common/files/contactgroups.cfg @@ -59,11 +59,6 @@ members halfak,yuvipanda } -define contactgroup { -contactgroup_name team-paws -members yuvipanda -} - # T111243 define contactgroup { contactgroup_name wdqs-admins diff --git a/modules/toollabs/manifests/monitoring/icinga.pp b/modules/toollabs/manifests/monitoring/icinga.pp index c74b4d2..0f54b4a 100644 --- a/modules/toollabs/manifests/monitoring/icinga.pp +++ b/modules/toollabs/manifests/monitoring/icinga.pp @@ -25,15 +25,4 @@ critical => false, host => 'tools.wmflabs.org', } - -@monitoring::host { 'paws.wmflabs.org': -host_fqdn => 'paws.wmflabs.org', -} - -monitoring::service { 'paws_main_page': -description => 'PAWS Main page', -check_command => 'check_http_url!paws.wmflabs.org!/paws/hub/login', -host => 'paws.wmflabs.org', -contact_group => 'team-paws', -} } -- To view, visit https://gerrit.wikimedia.org/r/276093 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibd13bf618277c05466f1fcca43033d9bde1c381d Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Yuvipanda Gerrit-Reviewer: Yuvipanda ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Revert "tools: Add paws as a separate host" - change (operations/puppet)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/276093 Change subject: Revert "tools: Add paws as a separate host" .. Revert "tools: Add paws as a separate host" Somehow this kills icinga. I hate computers. This reverts commit 617f626de400a53620d1b39d4a0d00f418512b77. This reverts commit f6174ca0b365a7fb1c56473d8353ed99a5ddf22c. Change-Id: Ibd13bf618277c05466f1fcca43033d9bde1c381d --- M modules/nagios_common/files/contactgroups.cfg M modules/toollabs/manifests/monitoring/icinga.pp 2 files changed, 0 insertions(+), 16 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/93/276093/1 diff --git a/modules/nagios_common/files/contactgroups.cfg b/modules/nagios_common/files/contactgroups.cfg index 184664d..ed5f40a 100644 --- a/modules/nagios_common/files/contactgroups.cfg +++ b/modules/nagios_common/files/contactgroups.cfg @@ -59,11 +59,6 @@ members halfak,yuvipanda } -define contactgroup { -contactgroup_name team-paws -members yuvipanda -} - # T111243 define contactgroup { contactgroup_name wdqs-admins diff --git a/modules/toollabs/manifests/monitoring/icinga.pp b/modules/toollabs/manifests/monitoring/icinga.pp index c74b4d2..0f54b4a 100644 --- a/modules/toollabs/manifests/monitoring/icinga.pp +++ b/modules/toollabs/manifests/monitoring/icinga.pp @@ -25,15 +25,4 @@ critical => false, host => 'tools.wmflabs.org', } - -@monitoring::host { 'paws.wmflabs.org': -host_fqdn => 'paws.wmflabs.org', -} - -monitoring::service { 'paws_main_page': -description => 'PAWS Main page', -check_command => 'check_http_url!paws.wmflabs.org!/paws/hub/login', -host => 'paws.wmflabs.org', -contact_group => 'team-paws', -} } -- To view, visit https://gerrit.wikimedia.org/r/276093 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibd13bf618277c05466f1fcca43033d9bde1c381d Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Yuvipanda ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Revert "tools: Add specific paging monitoring for PAWS too" - change (operations/puppet)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/276092 Change subject: Revert "tools: Add specific paging monitoring for PAWS too" .. Revert "tools: Add specific paging monitoring for PAWS too" Somehow puppet doesn't see the host that was added? This reverts commit f6174ca0b365a7fb1c56473d8353ed99a5ddf22c. Change-Id: Ifcb6585d15fb36572fe957fb5d26fdb61dc7d11a --- M modules/nagios_common/files/contactgroups.cfg M modules/toollabs/manifests/monitoring/icinga.pp 2 files changed, 0 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/92/276092/1 diff --git a/modules/nagios_common/files/contactgroups.cfg b/modules/nagios_common/files/contactgroups.cfg index 184664d..ed5f40a 100644 --- a/modules/nagios_common/files/contactgroups.cfg +++ b/modules/nagios_common/files/contactgroups.cfg @@ -59,11 +59,6 @@ members halfak,yuvipanda } -define contactgroup { -contactgroup_name team-paws -members yuvipanda -} - # T111243 define contactgroup { contactgroup_name wdqs-admins diff --git a/modules/toollabs/manifests/monitoring/icinga.pp b/modules/toollabs/manifests/monitoring/icinga.pp index 4353450..0f54b4a 100644 --- a/modules/toollabs/manifests/monitoring/icinga.pp +++ b/modules/toollabs/manifests/monitoring/icinga.pp @@ -25,11 +25,4 @@ critical => false, host => 'tools.wmflabs.org', } - -monitoring::service { 'paws_main_page': -description => 'PAWS Main page', -check_command => 'check_http_url!paws.wmflabs.org!/paws/hub/login', -host => 'paws.wmflabs.org', -contact_group => 'team-paws', -} } -- To view, visit https://gerrit.wikimedia.org/r/276092 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifcb6585d15fb36572fe957fb5d26fdb61dc7d11a Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Yuvipanda ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Merge remote-tracking branch 'origin/search-box' - change (wikimedia/portals)
jenkins-bot has submitted this change and it was merged. Change subject: Merge remote-tracking branch 'origin/search-box' .. Merge remote-tracking branch 'origin/search-box' Change-Id: I02c36d0a45ce173742db3da7a0fbb23b7514349f --- 0 files changed, 0 insertions(+), 0 deletions(-) Approvals: JGirault: Looks good to me, approved jenkins-bot: Verified -- To view, visit https://gerrit.wikimedia.org/r/276091 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I02c36d0a45ce173742db3da7a0fbb23b7514349f Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/portals Gerrit-Branch: master Gerrit-Owner: JGirault Gerrit-Reviewer: JGirault Gerrit-Reviewer: Jdrewniak Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Merge remote-tracking branch 'origin/search-box' - change (wikimedia/portals)
JGirault has uploaded a new change for review. https://gerrit.wikimedia.org/r/276091 Change subject: Merge remote-tracking branch 'origin/search-box' .. Merge remote-tracking branch 'origin/search-box' Change-Id: I02c36d0a45ce173742db3da7a0fbb23b7514349f --- 0 files changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/portals refs/changes/91/276091/1 -- To view, visit https://gerrit.wikimedia.org/r/276091 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I02c36d0a45ce173742db3da7a0fbb23b7514349f Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/portals Gerrit-Branch: master Gerrit-Owner: JGirault ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] tools: Add paws as a separate host - change (operations/puppet)
Yuvipanda has submitted this change and it was merged. Change subject: tools: Add paws as a separate host .. tools: Add paws as a separate host Bug: T129209 Change-Id: I97618a1f9369e57e232c243b66d6dc896717ce62 --- M modules/toollabs/manifests/monitoring/icinga.pp 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Yuvipanda: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/toollabs/manifests/monitoring/icinga.pp b/modules/toollabs/manifests/monitoring/icinga.pp index 4353450..c74b4d2 100644 --- a/modules/toollabs/manifests/monitoring/icinga.pp +++ b/modules/toollabs/manifests/monitoring/icinga.pp @@ -26,6 +26,10 @@ host => 'tools.wmflabs.org', } +@monitoring::host { 'paws.wmflabs.org': +host_fqdn => 'paws.wmflabs.org', +} + monitoring::service { 'paws_main_page': description => 'PAWS Main page', check_command => 'check_http_url!paws.wmflabs.org!/paws/hub/login', -- To view, visit https://gerrit.wikimedia.org/r/276090 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I97618a1f9369e57e232c243b66d6dc896717ce62 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Yuvipanda Gerrit-Reviewer: Yuvipanda Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] tools: Add paws as a separate host - change (operations/puppet)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/276090 Change subject: tools: Add paws as a separate host .. tools: Add paws as a separate host Bug: T129209 Change-Id: I97618a1f9369e57e232c243b66d6dc896717ce62 --- M modules/toollabs/manifests/monitoring/icinga.pp 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/90/276090/1 diff --git a/modules/toollabs/manifests/monitoring/icinga.pp b/modules/toollabs/manifests/monitoring/icinga.pp index 4353450..c74b4d2 100644 --- a/modules/toollabs/manifests/monitoring/icinga.pp +++ b/modules/toollabs/manifests/monitoring/icinga.pp @@ -26,6 +26,10 @@ host => 'tools.wmflabs.org', } +@monitoring::host { 'paws.wmflabs.org': +host_fqdn => 'paws.wmflabs.org', +} + monitoring::service { 'paws_main_page': description => 'PAWS Main page', check_command => 'check_http_url!paws.wmflabs.org!/paws/hub/login', -- To view, visit https://gerrit.wikimedia.org/r/276090 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I97618a1f9369e57e232c243b66d6dc896717ce62 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Yuvipanda ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] tools: Add specific paging monitoring for PAWS too - change (operations/puppet)
Yuvipanda has submitted this change and it was merged. Change subject: tools: Add specific paging monitoring for PAWS too .. tools: Add specific paging monitoring for PAWS too Bug: T129209 Change-Id: I271c754a18a73653ba0bcd5af64ceff3df7a2f5f --- M modules/nagios_common/files/contactgroups.cfg M modules/toollabs/manifests/monitoring/icinga.pp 2 files changed, 12 insertions(+), 0 deletions(-) Approvals: Yuvipanda: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/nagios_common/files/contactgroups.cfg b/modules/nagios_common/files/contactgroups.cfg index ed5f40a..184664d 100644 --- a/modules/nagios_common/files/contactgroups.cfg +++ b/modules/nagios_common/files/contactgroups.cfg @@ -59,6 +59,11 @@ members halfak,yuvipanda } +define contactgroup { +contactgroup_name team-paws +members yuvipanda +} + # T111243 define contactgroup { contactgroup_name wdqs-admins diff --git a/modules/toollabs/manifests/monitoring/icinga.pp b/modules/toollabs/manifests/monitoring/icinga.pp index 0f54b4a..4353450 100644 --- a/modules/toollabs/manifests/monitoring/icinga.pp +++ b/modules/toollabs/manifests/monitoring/icinga.pp @@ -25,4 +25,11 @@ critical => false, host => 'tools.wmflabs.org', } + +monitoring::service { 'paws_main_page': +description => 'PAWS Main page', +check_command => 'check_http_url!paws.wmflabs.org!/paws/hub/login', +host => 'paws.wmflabs.org', +contact_group => 'team-paws', +} } -- To view, visit https://gerrit.wikimedia.org/r/276089 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I271c754a18a73653ba0bcd5af64ceff3df7a2f5f Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Yuvipanda Gerrit-Reviewer: Yuvipanda Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] tools: Add specific paging monitoring for PAWS too - change (operations/puppet)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/276089 Change subject: tools: Add specific paging monitoring for PAWS too .. tools: Add specific paging monitoring for PAWS too Bug: T129209 Change-Id: I271c754a18a73653ba0bcd5af64ceff3df7a2f5f --- M modules/nagios_common/files/contactgroups.cfg M modules/toollabs/manifests/monitoring/icinga.pp 2 files changed, 12 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/89/276089/1 diff --git a/modules/nagios_common/files/contactgroups.cfg b/modules/nagios_common/files/contactgroups.cfg index ed5f40a..184664d 100644 --- a/modules/nagios_common/files/contactgroups.cfg +++ b/modules/nagios_common/files/contactgroups.cfg @@ -59,6 +59,11 @@ members halfak,yuvipanda } +define contactgroup { +contactgroup_name team-paws +members yuvipanda +} + # T111243 define contactgroup { contactgroup_name wdqs-admins diff --git a/modules/toollabs/manifests/monitoring/icinga.pp b/modules/toollabs/manifests/monitoring/icinga.pp index 0f54b4a..4353450 100644 --- a/modules/toollabs/manifests/monitoring/icinga.pp +++ b/modules/toollabs/manifests/monitoring/icinga.pp @@ -25,4 +25,11 @@ critical => false, host => 'tools.wmflabs.org', } + +monitoring::service { 'paws_main_page': +description => 'PAWS Main page', +check_command => 'check_http_url!paws.wmflabs.org!/paws/hub/login', +host => 'paws.wmflabs.org', +contact_group => 'team-paws', +} } -- To view, visit https://gerrit.wikimedia.org/r/276089 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I271c754a18a73653ba0bcd5af64ceff3df7a2f5f Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Yuvipanda ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] thank-you-edit: Only call User::getEditCount() once - change (mediawiki...Echo)
jenkins-bot has submitted this change and it was merged. Change subject: thank-you-edit: Only call User::getEditCount() once .. thank-you-edit: Only call User::getEditCount() once And rename $editCount to $thresholdCount for clarity. Change-Id: I115b2dfabf472c855c186d05fa4e31aa7c9c3d6c --- M Hooks.php 1 file changed, 9 insertions(+), 8 deletions(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/Hooks.php b/Hooks.php index 59ada97..4c19644 100644 --- a/Hooks.php +++ b/Hooks.php @@ -459,13 +459,14 @@ $thresholds = [ 1, 10, 100, 1000, 1, 10, 100 ]; if ( $user->isLoggedIn() && $status->value['revision'] ) { // This edit hasn't been added to the edit count yet - $editCount = $user->getEditCount() + 1; - if ( in_array( $editCount, $thresholds ) ) { + $thresholdCount = $user->getEditCount() + 1; + if ( in_array( $thresholdCount, $thresholds ) ) { $id = $user->getId(); - DeferredUpdates::addCallableUpdate( function () use ( $id, $title, $editCount ) { + DeferredUpdates::addCallableUpdate( function () use ( $id, $title, $thresholdCount ) { // Fresh User object $user = User::newFromId( $id ); - if ( $user->getEditCount() !== $editCount ) { + $userEditCount = $user->getEditCount(); + if ( $userEditCount !== $thresholdCount ) { // Race condition with multiple simultaneous requests, skip LoggerFactory::getInstance( 'Echo' )->debug( 'thank-you-edit race condition detected: {user} (id: {id}) should ' . @@ -473,8 +474,8 @@ array( 'user' => $user->getName(), 'id' => $user->getId(), - 'expectedCount' => $editCount, - 'actualCount' => $user->getEditCount(), + 'expectedCount' => $thresholdCount, + 'actualCount' => $userEditCount, ) ); return; @@ -484,7 +485,7 @@ array( 'user' => $user->getName(), 'id' => $user->getId(), - 'count' => $editCount, + 'count' => $thresholdCount, ) ); EchoEvent::create( array( @@ -494,7 +495,7 @@ // Edit threshold notifications are sent to the agent 'extra' => array( 'notifyAgent' => true, - 'editCount' => $editCount, + 'thresholdCount' => $thresholdCount, ) ) ); -- To view, visit https://gerrit.wikimedia.org/r/276080 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I115b2dfabf472c855c186d05fa4e31aa7c9c3d6c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: Legoktm Gerrit-Reviewer: Catrope Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Various WikiLove performance clean up - change (mediawiki...WikiLove)
jenkins-bot has submitted this change and it was merged. Change subject: Various WikiLove performance clean up .. Various WikiLove performance clean up * Don't export wikilove-recipient and wikilove-anon on all pages. - Set "wikilove-recipient" only on user-talk pages. (Matching when the module is loaded.) - Set "wikilove-anon" only for anon recipient user-talk pages. * Use mw.html.element() instead of $() and then wrap/html. Using DOM nodes with $() is preferable, but they're not used in this case. Instead of wasting DOM power to build the nodes and then wrap and serialise it again, use simple string manipulation with mw.html.element() instead. * Don't @embed both the PNG and SVG. @embed is meant to help save data and requests. Embedding both means browsers download both and we end up fetching more data than without @embed. Also remove the -webkit-prefixed SVG rule, since we removed those kinds of rules from MW core too. * Remove IE 6 hack. The code only applies to Grade A JS clients, which no longer includes IE6. * Remove odd duplication of Vector "div.vectorTabs span" code. This already exists in Vector exactly as-is, except nowadays without embedding an unused PNG. * Remove odd duplication of "#ca-unwatch.icon". The default is already 'margin: 0;'. Bug: T64000 Change-Id: I696619aacf6dc06a14dfdc7eb6e463a56ebd2655 --- M WikiLove.hooks.php M resources/ext.wikiLove.core.js M resources/ext.wikiLove.icon.css 3 files changed, 27 insertions(+), 56 deletions(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/WikiLove.hooks.php b/WikiLove.hooks.php index f261ec8..82a7a4e 100644 --- a/WikiLove.hooks.php +++ b/WikiLove.hooks.php @@ -7,7 +7,7 @@ */ class WikiLoveHooks { - private static $recipient = ''; + private static $recipient = null; /** * LoadExtensionSchemaUpdates hook @@ -69,12 +69,12 @@ * @param array $vars */ public static function onMakeGlobalVariablesScript( &$vars ) { - $vars['wikilove-recipient'] = self::$recipient; - - $vars['wikilove-anon'] = 0; - if ( self::$recipient !== '' ) { + if ( self::$recipient !== null ) { + $vars['wikilove-recipient'] = self::$recipient; $receiver = User::newFromName( self::$recipient ); - if ( $receiver === false || $receiver->isAnon() ) $vars['wikilove-anon'] = 1; + if ( $receiver === false || $receiver->isAnon() ) { + $vars['wikilove-anon'] = 1; + } } } diff --git a/resources/ext.wikiLove.core.js b/resources/ext.wikiLove.core.js index de5c1b1..f61e76a 100644 --- a/resources/ext.wikiLove.core.js +++ b/resources/ext.wikiLove.core.js @@ -57,23 +57,17 @@ $button.append( '' + mw.html.escape( type.name ) + '' ); $button.data( 'typeId', typeId ); - $typeList.append( $( '' ).append( $button ) ); + $typeList.append( $( '' ).append( $button ) ); } - var commonsLink = $( '' ) - .attr( 'href', mw.msg( 'wikilove-commons-url' ) ) - .attr( 'target', '_blank' ) - .text( mw.msg( 'wikilove-commons-link' ) ) - .wrap( '' ) // or .html() will only return the link text - .parent() - .html(); - var termsLink = $( ' ') - .attr( 'href', mw.msg( 'wikilove-terms-url' ) ) - .attr( 'target', '_blank' ) - .text( mw.msg( 'wikilove-terms-link' ) ) - .wrap( '' ) - .parent() - .html(); + var commonsLink = mw.html.element( 'a', { + href: mw.msg( 'wikilove-commons-url' ), + target: '_blank' + }, mw.msg( 'wikilove-commons-link' ) ); + var termsLink = mw.html.element( 'a', { + href: mw.msg( 'wikilove-terms-url' ), + target: '_blank' + }, mw.msg( 'wikilove-terms-link' ) ); $dialog = $( '\ \ @@ -88,7 +82,7 @@ \ \ \ - \ + \ \ \ \ @@ -121,7 +115,7 @@ \
[MediaWiki-commits] [Gerrit] Clean up hook usage - change (mediawiki...WikiLove)
jenkins-bot has submitted this change and it was merged. Change subject: Clean up hook usage .. Clean up hook usage * Prefix hook handlers with on + hookname. * Remove redundant or unused bool returns. Change-Id: I963afbb61c8873870ca930666e06b49f36002012 --- M WikiLove.hooks.php M extension.json 2 files changed, 20 insertions(+), 40 deletions(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/WikiLove.hooks.php b/WikiLove.hooks.php index 67343bb..f261ec8 100644 --- a/WikiLove.hooks.php +++ b/WikiLove.hooks.php @@ -13,10 +13,8 @@ * LoadExtensionSchemaUpdates hook * * @param DatabaseUpdater $updater -* -* @return bool true */ - public static function loadExtensionSchemaUpdates( $updater = null ) { + public static function onLoadExtensionSchemaUpdates( $updater = null ) { if ( $updater === null ) { global $wgExtNewTables; $wgExtNewTables[] = array( 'wikilove_log', dirname( __FILE__ ) . '/patches/WikiLoveLog.sql' ); @@ -24,17 +22,15 @@ $updater->addExtensionUpdate( array( 'addTable', 'wikilove_log', dirname( __FILE__ ) . '/patches/WikiLoveLog.sql', true ) ); } - return true; } /** * Add the preference in the user preferences with the GetPreferences hook. +* * @param User $user * @param array $preferences -* -* @return bool true */ - public static function getPreferences( $user, &$preferences ) { + public static function onGetPreferences( $user, &$preferences ) { global $wgWikiLoveGlobal; if ( !$wgWikiLoveGlobal ) { $preferences['wikilove-enabled'] = array( @@ -43,7 +39,6 @@ 'label-message' => 'wikilove-enable-preference', ); } - return true; } /** @@ -51,10 +46,8 @@ * * @param OutputPage $out * @param Skin $skin -* -* @return bool true */ - public static function beforePageDisplay( $out, $skin ) { + public static function onBeforePageDisplay( $out, $skin ) { global $wgWikiLoveGlobal; if ( !$wgWikiLoveGlobal && !$out->getUser()->getOption( 'wikilove-enabled' ) ) { @@ -68,17 +61,14 @@ $out->addModuleStyles( 'ext.wikiLove.icon' ); self::$recipient = $title->getBaseText(); } - return true; } /** -* Exports wikilove-recipient and wikilove-anon variables to JS +* Export page/user specific WikiLove variables to JS * * @param array $vars -* -* @return bool true */ - public static function makeGlobalVariablesScript( &$vars ) { + public static function onMakeGlobalVariablesScript( &$vars ) { $vars['wikilove-recipient'] = self::$recipient; $vars['wikilove-anon'] = 0; @@ -86,39 +76,37 @@ $receiver = User::newFromName( self::$recipient ); if ( $receiver === false || $receiver->isAnon() ) $vars['wikilove-anon'] = 1; } - return true; } /** -* Adds a tab or an icon the new way (MediaWiki 1.18+) +* Add a tab or an icon the new way (MediaWiki 1.18+) +* * @param SkinTemplate $skin * @param array $links Navigation links -* @return boolean */ - public static function skinTemplateNavigation( &$skin, &$links ) { + public static function onSkinTemplateNavigation( &$skin, &$links ) { if ( self::showIcon( $skin ) ) { self::skinConfigViewsLinks( $skin, $links['views']); } else { self::skinConfigViewsLinks( $skin, $links['actions']); } - return true; } /** * Configure views links. +* * Helper function for SkinTemplateTabs and SkinTemplateNavigation hooks * to configure views links. * * @param Skin $skin * @param array $views -* @return boolean */ private static function skinConfigViewsLinks( $skin, &$views ) { global $wgWikiLoveGlobal; // If WikiLove is turned off for this user, don't display tab. if ( !$wgWikiLoveGlobal && !$skin->getUser()->getOption( 'wikilove-enabled' ) ) { - return true; + return; } // getUserTalkPage() returns a string on error @@ -132,14 +120,12
[MediaWiki-commits] [Gerrit] Don't quote assert expressions in DairikiDiff - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Don't quote assert expressions in DairikiDiff .. Don't quote assert expressions in DairikiDiff Per HHVM issue 5128, it is not possible to use '$this' in string-literal assert() expressions. We can either wait for this to be fixed (unlikely to happen soon, since it involves deep interpreter internals), comment out or remove the asserts, or simply unquote them, so that they are actual expressions rather than strings. The downside to this is that assertions will always be evaluated (but so what, they are extremely cheap), and that when an assertion fail the error message will simply read 'assert(): Assertion failed in /path/to/file on line XXX' as opposed to including the expression in the output. Fair trade, IMO. See: https://github.com/facebook/hhvm/issues/5128 Bug: T124163 Change-Id: Ib458b1b0c28f8d38e9df427196ae79814f6dc0c2 --- M includes/diff/DairikiDiff.php 1 file changed, 16 insertions(+), 16 deletions(-) Approvals: MaxSem: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/diff/DairikiDiff.php b/includes/diff/DairikiDiff.php index bc57c93..6272e7e 100644 --- a/includes/diff/DairikiDiff.php +++ b/includes/diff/DairikiDiff.php @@ -249,8 +249,8 @@ $edits = []; $xi = $yi = 0; while ( $xi < $n_from || $yi < $n_to ) { - assert( '$yi < $n_to || $this->xchanged[$xi]' ); - assert( '$xi < $n_from || $this->ychanged[$yi]' ); + assert( $yi < $n_to || $this->xchanged[$xi] ); + assert( $xi < $n_from || $this->ychanged[$yi] ); // Skip matching "snake". $copy = []; @@ -448,7 +448,7 @@ while ( list( , $y ) = each( $matches ) ) { if ( empty( $this->in_seq[$y] ) ) { $k = $this->lcsPos( $y ); - assert( '$k > 0' ); + assert( $k > 0 ); $ymids[$k] = $ymids[$k - 1]; break; } @@ -456,7 +456,7 @@ while ( list( , $y ) = each( $matches ) ) { if ( $y > $this->seq[$k - 1] ) { - assert( '$y < $this->seq[$k]' ); + assert( $y < $this->seq[$k] ); // Optimization: this is a common case: // next match is just replacing previous match. $this->in_seq[$this->seq[$k]] = false; @@ -464,7 +464,7 @@ $this->in_seq[$y] = 1; } elseif ( empty( $this->in_seq[$y] ) ) { $k = $this->lcsPos( $y ); - assert( '$k > 0' ); + assert( $k > 0 ); $ymids[$k] = $ymids[$k - 1]; } } @@ -507,7 +507,7 @@ } } - assert( '$ypos != $this->seq[$end]' ); + assert( $ypos != $this->seq[$end] ); $this->in_seq[$this->seq[$end]] = false; $this->seq[$end] = $ypos; @@ -595,7 +595,7 @@ $i = 0; $j = 0; - assert( 'count($lines) == count($changed)' ); + assert( count( $lines ) == count( $changed ) ); $len = count( $lines ); $other_len = count( $other_changed ); @@ -616,7 +616,7 @@ } while ( $i < $len && !$changed[$i] ) { - assert( '$j < $other_len && ! $other_changed[$j]' ); + assert( $j < $other_len && ! $other_changed[$j] ); $i++; $j++; while ( $j < $other_len && $other_changed[$j] ) { @@ -653,11 +653,11 @@ while ( $start > 0 && $changed[$start - 1] ) { $start--; } - assert( '$j > 0' ); + assert( $j > 0 ); while ( $other_changed[--$j] ) { continue;
[MediaWiki-commits] [Gerrit] (WIP) switch wikitech-static to new jessie VM - change (operations/dns)
Dzahn has uploaded a new change for review. https://gerrit.wikimedia.org/r/276088 Change subject: (WIP) switch wikitech-static to new jessie VM .. (WIP) switch wikitech-static to new jessie VM After T126385 is done we can switch wikitech-static over to the new jessie VM and then remove the old machine. This is still in progress. Bug:T126385 Change-Id: I3e42ef8cc6189c37876982484daaa6de5c81caf6 --- M templates/wikimedia.org 1 file changed, 2 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/dns refs/changes/88/276088/1 diff --git a/templates/wikimedia.org b/templates/wikimedia.org index b21b5ac..353f55e 100644 --- a/templates/wikimedia.org +++ b/templates/wikimedia.org @@ -696,10 +696,8 @@ mirrors 1H IN CNAMEcarbon yarn 600 IN DYNA geoip!misc-addrs wikitech 1H IN CNAMEsilver -wikitech-static 1H IN A166.78.57.240 -1H IN 2001:4800:7810:512:4bbc:637f:ff04:d370 -wikitech-static-jessie 1H IN A162.209.126.221 -1H IN 2001:4802:7800:1:be76:4eff:fe21:3782 +wikitech-static 1H IN A162.209.126.221 + 1H IN 2001:4802:7800:1:be76:4eff:fe21:3782 labtestwikitech 1H IN CNAMElabtestweb2001 labtesthorizon 1H IN DYNA geoip!misc-addrs -- To view, visit https://gerrit.wikimedia.org/r/276088 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3e42ef8cc6189c37876982484daaa6de5c81caf6 Gerrit-PatchSet: 1 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: Dzahn ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Whitespace fix-up for Ib458b1b - change (mediawiki/core)
Ori.livneh has submitted this change and it was merged. Change subject: Whitespace fix-up for Ib458b1b .. Whitespace fix-up for Ib458b1b Change-Id: I3e7c9d32d0b232055934fda8cb2bd92a49e822e7 --- M includes/diff/DairikiDiff.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Ori.livneh: Verified; Looks good to me, approved diff --git a/includes/diff/DairikiDiff.php b/includes/diff/DairikiDiff.php index 467600b..6272e7e 100644 --- a/includes/diff/DairikiDiff.php +++ b/includes/diff/DairikiDiff.php @@ -595,7 +595,7 @@ $i = 0; $j = 0; - assert( count($lines) == count($changed) ); + assert( count( $lines ) == count( $changed ) ); $len = count( $lines ); $other_len = count( $other_changed ); -- To view, visit https://gerrit.wikimedia.org/r/276086 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3e7c9d32d0b232055934fda8cb2bd92a49e822e7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.27.0-wmf.15 Gerrit-Owner: Ori.livneh Gerrit-Reviewer: Ori.livneh ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Whitespace fix-up for Ib458b1b - change (mediawiki/core)
Ori.livneh has submitted this change and it was merged. Change subject: Whitespace fix-up for Ib458b1b .. Whitespace fix-up for Ib458b1b Change-Id: I3e7c9d32d0b232055934fda8cb2bd92a49e822e7 --- M includes/diff/DairikiDiff.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Ori.livneh: Verified; Looks good to me, approved diff --git a/includes/diff/DairikiDiff.php b/includes/diff/DairikiDiff.php index 467600b..6272e7e 100644 --- a/includes/diff/DairikiDiff.php +++ b/includes/diff/DairikiDiff.php @@ -595,7 +595,7 @@ $i = 0; $j = 0; - assert( count($lines) == count($changed) ); + assert( count( $lines ) == count( $changed ) ); $len = count( $lines ); $other_len = count( $other_changed ); -- To view, visit https://gerrit.wikimedia.org/r/276087 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3e7c9d32d0b232055934fda8cb2bd92a49e822e7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.27.0-wmf.16 Gerrit-Owner: Ori.livneh Gerrit-Reviewer: Ori.livneh ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Whitespace fix-up for Ib458b1b - change (mediawiki/core)
Ori.livneh has uploaded a new change for review. https://gerrit.wikimedia.org/r/276087 Change subject: Whitespace fix-up for Ib458b1b .. Whitespace fix-up for Ib458b1b Change-Id: I3e7c9d32d0b232055934fda8cb2bd92a49e822e7 --- M includes/diff/DairikiDiff.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/87/276087/1 diff --git a/includes/diff/DairikiDiff.php b/includes/diff/DairikiDiff.php index 467600b..6272e7e 100644 --- a/includes/diff/DairikiDiff.php +++ b/includes/diff/DairikiDiff.php @@ -595,7 +595,7 @@ $i = 0; $j = 0; - assert( count($lines) == count($changed) ); + assert( count( $lines ) == count( $changed ) ); $len = count( $lines ); $other_len = count( $other_changed ); -- To view, visit https://gerrit.wikimedia.org/r/276087 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3e7c9d32d0b232055934fda8cb2bd92a49e822e7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.27.0-wmf.16 Gerrit-Owner: Ori.livneh ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Whitespace fix-up for Ib458b1b - change (mediawiki/core)
Ori.livneh has uploaded a new change for review. https://gerrit.wikimedia.org/r/276086 Change subject: Whitespace fix-up for Ib458b1b .. Whitespace fix-up for Ib458b1b Change-Id: I3e7c9d32d0b232055934fda8cb2bd92a49e822e7 --- M includes/diff/DairikiDiff.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/86/276086/1 diff --git a/includes/diff/DairikiDiff.php b/includes/diff/DairikiDiff.php index 467600b..6272e7e 100644 --- a/includes/diff/DairikiDiff.php +++ b/includes/diff/DairikiDiff.php @@ -595,7 +595,7 @@ $i = 0; $j = 0; - assert( count($lines) == count($changed) ); + assert( count( $lines ) == count( $changed ) ); $len = count( $lines ); $other_len = count( $other_changed ); -- To view, visit https://gerrit.wikimedia.org/r/276086 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3e7c9d32d0b232055934fda8cb2bd92a49e822e7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.27.0-wmf.15 Gerrit-Owner: Ori.livneh ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] netboot: bast2001->raid1-lvm, no more wildcard - change (operations/puppet)
Dzahn has submitted this change and it was merged. Change subject: netboot: bast2001->raid1-lvm, no more wildcard .. netboot: bast2001->raid1-lvm, no more wildcard Let bast2001 use the raid1-lvm recipe like bast4001. Instead of the wildcard for bast* specifically set bast1001, bast3001 doesn't exist yet. (hooft). Bug:T128899 Change-Id: I0ae5c25156ec767970b69c3520944aa4eb172913 --- M modules/install_server/files/autoinstall/netboot.cfg 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/modules/install_server/files/autoinstall/netboot.cfg b/modules/install_server/files/autoinstall/netboot.cfg index 0509d56..fed3ab6 100755 --- a/modules/install_server/files/autoinstall/netboot.cfg +++ b/modules/install_server/files/autoinstall/netboot.cfg @@ -54,9 +54,9 @@ analytics102[8-9]|analytics103[0-9]|analytics104[0-9]|analytics105[0-9]) echo partman/analytics-flex.cfg ;; \ aqs100[123]) echo partman/raid1-30G.cfg ;; \ antimony|arsenic|heze|magnesium|neodymium|oxygen|palladium|promethium|strontium|terbium) echo partman/lvm.cfg ;; \ -argon|bast4001|copper|neon|ruthenium|subra|suhail|titanium|ytterbium) echo partman/raid1-lvm.cfg ;; \ + argon|bast2001|bast4001|copper|neon|ruthenium|subra|suhail|titanium|ytterbium) echo partman/raid1-lvm.cfg ;; \ californium|dbproxy10[0-1][0-9]|holmium|install2001|iridium) echo partman/raid1.cfg ;; \ -bast*) echo partman/lvm.cfg ;; \ +bast1001) echo partman/lvm.cfg ;; \ boron|chromium|hydrogen) echo partman/lvm.cfg ;; \ helium|potassium|tmh1002) echo partman/raid1-1partition.cfg ;; \ lawrencium|netmon1001|stat1002|tungsten) echo partman/db.cfg ;; \ -- To view, visit https://gerrit.wikimedia.org/r/276085 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0ae5c25156ec767970b69c3520944aa4eb172913 Gerrit-PatchSet: 3 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn Gerrit-Reviewer: Dzahn Gerrit-Reviewer: Papaul Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] netboot: bast2001->raid1-lvm, no more wildcard - change (operations/puppet)
Dzahn has uploaded a new change for review. https://gerrit.wikimedia.org/r/276085 Change subject: netboot: bast2001->raid1-lvm, no more wildcard .. netboot: bast2001->raid1-lvm, no more wildcard Let bast2001 use the raid1-lvm recipe like bast4001. Instead of the wildcard for bast* specifically set bast1001, bast3001 doesn't exist yet. (hooft). Change-Id: I0ae5c25156ec767970b69c3520944aa4eb172913 --- M modules/install_server/files/autoinstall/netboot.cfg 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/85/276085/1 diff --git a/modules/install_server/files/autoinstall/netboot.cfg b/modules/install_server/files/autoinstall/netboot.cfg index 1090d3e..083739f 100755 --- a/modules/install_server/files/autoinstall/netboot.cfg +++ b/modules/install_server/files/autoinstall/netboot.cfg @@ -54,9 +54,9 @@ analytics102[8-9]|analytics103[0-9]|analytics104[0-9]|analytics105[0-9]) echo partman/analytics-flex.cfg ;; \ aqs100[123]) echo partman/raid1-30G.cfg ;; \ antimony|arsenic|heze|magnesium|neodymium|oxygen|palladium|promethium|strontium|terbium) echo partman/lvm.cfg ;; \ -argon|bast4001|copper|neon|ruthenium|subra|suhail|titanium|ytterbium) echo partman/raid1-lvm.cfg ;; \ + argon|bast2001|bast4001|copper|neon|ruthenium|subra|suhail|titanium|ytterbium) echo partman/raid1-lvm.cfg ;; \ californium|dbproxy10[0-1][0-9]|holmium|install2001|iridium) echo partman/raid1.cfg ;; \ -bast*) echo partman/lvm.cfg ;; \ +bast1001) echo partman/lvm.cfg ;; \ boron|chromium|hydrogen) echo partman/lvm.cfg ;; \ helium|potassium|tmh1002) echo partman/raid1-1partition.cfg ;; \ lawrencium|netmon1001|stat1002|tungsten) echo partman/db.cfg ;; \ -- To view, visit https://gerrit.wikimedia.org/r/276085 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0ae5c25156ec767970b69c3520944aa4eb172913 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Don't quote assert expressions in DairikiDiff - change (mediawiki/core)
Ori.livneh has submitted this change and it was merged. Change subject: Don't quote assert expressions in DairikiDiff .. Don't quote assert expressions in DairikiDiff Per HHVM issue 5128, it is not possible to use '$this' in string-literal assert() expressions. We can either wait for this to be fixed (unlikely to happen soon, since it involves deep interpreter internals), comment out or remove the asserts, or simply unquote them, so that they are actual expressions rather than strings. The downside to this is that assertions will always be evaluated (but so what, they are extremely cheap), and that when an assertion fail the error message will simply read 'assert(): Assertion failed in /path/to/file on line XXX' as opposed to including the expression in the output. Fair trade, IMO. See: https://github.com/facebook/hhvm/issues/5128 Bug: T124163 Change-Id: Ib458b1b0c28f8d38e9df427196ae79814f6dc0c2 --- M includes/diff/DairikiDiff.php 1 file changed, 16 insertions(+), 16 deletions(-) Approvals: Ori.livneh: Verified; Looks good to me, approved diff --git a/includes/diff/DairikiDiff.php b/includes/diff/DairikiDiff.php index bc57c93..467600b 100644 --- a/includes/diff/DairikiDiff.php +++ b/includes/diff/DairikiDiff.php @@ -249,8 +249,8 @@ $edits = []; $xi = $yi = 0; while ( $xi < $n_from || $yi < $n_to ) { - assert( '$yi < $n_to || $this->xchanged[$xi]' ); - assert( '$xi < $n_from || $this->ychanged[$yi]' ); + assert( $yi < $n_to || $this->xchanged[$xi] ); + assert( $xi < $n_from || $this->ychanged[$yi] ); // Skip matching "snake". $copy = []; @@ -448,7 +448,7 @@ while ( list( , $y ) = each( $matches ) ) { if ( empty( $this->in_seq[$y] ) ) { $k = $this->lcsPos( $y ); - assert( '$k > 0' ); + assert( $k > 0 ); $ymids[$k] = $ymids[$k - 1]; break; } @@ -456,7 +456,7 @@ while ( list( , $y ) = each( $matches ) ) { if ( $y > $this->seq[$k - 1] ) { - assert( '$y < $this->seq[$k]' ); + assert( $y < $this->seq[$k] ); // Optimization: this is a common case: // next match is just replacing previous match. $this->in_seq[$this->seq[$k]] = false; @@ -464,7 +464,7 @@ $this->in_seq[$y] = 1; } elseif ( empty( $this->in_seq[$y] ) ) { $k = $this->lcsPos( $y ); - assert( '$k > 0' ); + assert( $k > 0 ); $ymids[$k] = $ymids[$k - 1]; } } @@ -507,7 +507,7 @@ } } - assert( '$ypos != $this->seq[$end]' ); + assert( $ypos != $this->seq[$end] ); $this->in_seq[$this->seq[$end]] = false; $this->seq[$end] = $ypos; @@ -595,7 +595,7 @@ $i = 0; $j = 0; - assert( 'count($lines) == count($changed)' ); + assert( count($lines) == count($changed) ); $len = count( $lines ); $other_len = count( $other_changed ); @@ -616,7 +616,7 @@ } while ( $i < $len && !$changed[$i] ) { - assert( '$j < $other_len && ! $other_changed[$j]' ); + assert( $j < $other_len && ! $other_changed[$j] ); $i++; $j++; while ( $j < $other_len && $other_changed[$j] ) { @@ -653,11 +653,11 @@ while ( $start > 0 && $changed[$start - 1] ) { $start--; } - assert( '$j > 0' ); + assert( $j > 0 ); while ( $other_changed[--$j] ) { continue;
[MediaWiki-commits] [Gerrit] Don't quote assert expressions in DairikiDiff - change (mediawiki/core)
Ori.livneh has submitted this change and it was merged. Change subject: Don't quote assert expressions in DairikiDiff .. Don't quote assert expressions in DairikiDiff Per HHVM issue 5128, it is not possible to use '$this' in string-literal assert() expressions. We can either wait for this to be fixed (unlikely to happen soon, since it involves deep interpreter internals), comment out or remove the asserts, or simply unquote them, so that they are actual expressions rather than strings. The downside to this is that assertions will always be evaluated (but so what, they are extremely cheap), and that when an assertion fail the error message will simply read 'assert(): Assertion failed in /path/to/file on line XXX' as opposed to including the expression in the output. Fair trade, IMO. See: https://github.com/facebook/hhvm/issues/5128 Bug: T124163 Change-Id: Ib458b1b0c28f8d38e9df427196ae79814f6dc0c2 --- M includes/diff/DairikiDiff.php 1 file changed, 16 insertions(+), 16 deletions(-) Approvals: Ori.livneh: Verified; Looks good to me, approved diff --git a/includes/diff/DairikiDiff.php b/includes/diff/DairikiDiff.php index bc57c93..467600b 100644 --- a/includes/diff/DairikiDiff.php +++ b/includes/diff/DairikiDiff.php @@ -249,8 +249,8 @@ $edits = []; $xi = $yi = 0; while ( $xi < $n_from || $yi < $n_to ) { - assert( '$yi < $n_to || $this->xchanged[$xi]' ); - assert( '$xi < $n_from || $this->ychanged[$yi]' ); + assert( $yi < $n_to || $this->xchanged[$xi] ); + assert( $xi < $n_from || $this->ychanged[$yi] ); // Skip matching "snake". $copy = []; @@ -448,7 +448,7 @@ while ( list( , $y ) = each( $matches ) ) { if ( empty( $this->in_seq[$y] ) ) { $k = $this->lcsPos( $y ); - assert( '$k > 0' ); + assert( $k > 0 ); $ymids[$k] = $ymids[$k - 1]; break; } @@ -456,7 +456,7 @@ while ( list( , $y ) = each( $matches ) ) { if ( $y > $this->seq[$k - 1] ) { - assert( '$y < $this->seq[$k]' ); + assert( $y < $this->seq[$k] ); // Optimization: this is a common case: // next match is just replacing previous match. $this->in_seq[$this->seq[$k]] = false; @@ -464,7 +464,7 @@ $this->in_seq[$y] = 1; } elseif ( empty( $this->in_seq[$y] ) ) { $k = $this->lcsPos( $y ); - assert( '$k > 0' ); + assert( $k > 0 ); $ymids[$k] = $ymids[$k - 1]; } } @@ -507,7 +507,7 @@ } } - assert( '$ypos != $this->seq[$end]' ); + assert( $ypos != $this->seq[$end] ); $this->in_seq[$this->seq[$end]] = false; $this->seq[$end] = $ypos; @@ -595,7 +595,7 @@ $i = 0; $j = 0; - assert( 'count($lines) == count($changed)' ); + assert( count($lines) == count($changed) ); $len = count( $lines ); $other_len = count( $other_changed ); @@ -616,7 +616,7 @@ } while ( $i < $len && !$changed[$i] ) { - assert( '$j < $other_len && ! $other_changed[$j]' ); + assert( $j < $other_len && ! $other_changed[$j] ); $i++; $j++; while ( $j < $other_len && $other_changed[$j] ) { @@ -653,11 +653,11 @@ while ( $start > 0 && $changed[$start - 1] ) { $start--; } - assert( '$j > 0' ); + assert( $j > 0 ); while ( $other_changed[--$j] ) { continue;
[MediaWiki-commits] [Gerrit] Don't quote assert expressions in DairikiDiff - change (mediawiki/core)
Ori.livneh has uploaded a new change for review. https://gerrit.wikimedia.org/r/276084 Change subject: Don't quote assert expressions in DairikiDiff .. Don't quote assert expressions in DairikiDiff Per HHVM issue 5128, it is not possible to use '$this' in string-literal assert() expressions. We can either wait for this to be fixed (unlikely to happen soon, since it involves deep interpreter internals), comment out or remove the asserts, or simply unquote them, so that they are actual expressions rather than strings. The downside to this is that assertions will always be evaluated (but so what, they are extremely cheap), and that when an assertion fail the error message will simply read 'assert(): Assertion failed in /path/to/file on line XXX' as opposed to including the expression in the output. Fair trade, IMO. See: https://github.com/facebook/hhvm/issues/5128 Bug: T124163 Change-Id: Ib458b1b0c28f8d38e9df427196ae79814f6dc0c2 --- M includes/diff/DairikiDiff.php 1 file changed, 16 insertions(+), 16 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/84/276084/1 diff --git a/includes/diff/DairikiDiff.php b/includes/diff/DairikiDiff.php index bc57c93..467600b 100644 --- a/includes/diff/DairikiDiff.php +++ b/includes/diff/DairikiDiff.php @@ -249,8 +249,8 @@ $edits = []; $xi = $yi = 0; while ( $xi < $n_from || $yi < $n_to ) { - assert( '$yi < $n_to || $this->xchanged[$xi]' ); - assert( '$xi < $n_from || $this->ychanged[$yi]' ); + assert( $yi < $n_to || $this->xchanged[$xi] ); + assert( $xi < $n_from || $this->ychanged[$yi] ); // Skip matching "snake". $copy = []; @@ -448,7 +448,7 @@ while ( list( , $y ) = each( $matches ) ) { if ( empty( $this->in_seq[$y] ) ) { $k = $this->lcsPos( $y ); - assert( '$k > 0' ); + assert( $k > 0 ); $ymids[$k] = $ymids[$k - 1]; break; } @@ -456,7 +456,7 @@ while ( list( , $y ) = each( $matches ) ) { if ( $y > $this->seq[$k - 1] ) { - assert( '$y < $this->seq[$k]' ); + assert( $y < $this->seq[$k] ); // Optimization: this is a common case: // next match is just replacing previous match. $this->in_seq[$this->seq[$k]] = false; @@ -464,7 +464,7 @@ $this->in_seq[$y] = 1; } elseif ( empty( $this->in_seq[$y] ) ) { $k = $this->lcsPos( $y ); - assert( '$k > 0' ); + assert( $k > 0 ); $ymids[$k] = $ymids[$k - 1]; } } @@ -507,7 +507,7 @@ } } - assert( '$ypos != $this->seq[$end]' ); + assert( $ypos != $this->seq[$end] ); $this->in_seq[$this->seq[$end]] = false; $this->seq[$end] = $ypos; @@ -595,7 +595,7 @@ $i = 0; $j = 0; - assert( 'count($lines) == count($changed)' ); + assert( count($lines) == count($changed) ); $len = count( $lines ); $other_len = count( $other_changed ); @@ -616,7 +616,7 @@ } while ( $i < $len && !$changed[$i] ) { - assert( '$j < $other_len && ! $other_changed[$j]' ); + assert( $j < $other_len && ! $other_changed[$j] ); $i++; $j++; while ( $j < $other_len && $other_changed[$j] ) { @@ -653,11 +653,11 @@ while ( $start > 0 && $changed[$start - 1] ) { $start--; } - assert( '$j > 0' ); + assert( $j > 0 ); while ( $other_changed[--$j] ) {
[MediaWiki-commits] [Gerrit] Don't quote assert expressions in DairikiDiff - change (mediawiki/core)
Ori.livneh has uploaded a new change for review. https://gerrit.wikimedia.org/r/276083 Change subject: Don't quote assert expressions in DairikiDiff .. Don't quote assert expressions in DairikiDiff Per HHVM issue 5128, it is not possible to use '$this' in string-literal assert() expressions. We can either wait for this to be fixed (unlikely to happen soon, since it involves deep interpreter internals), comment out or remove the asserts, or simply unquote them, so that they are actual expressions rather than strings. The downside to this is that assertions will always be evaluated (but so what, they are extremely cheap), and that when an assertion fail the error message will simply read 'assert(): Assertion failed in /path/to/file on line XXX' as opposed to including the expression in the output. Fair trade, IMO. See: https://github.com/facebook/hhvm/issues/5128 Bug: T124163 Change-Id: Ib458b1b0c28f8d38e9df427196ae79814f6dc0c2 --- M includes/diff/DairikiDiff.php 1 file changed, 16 insertions(+), 16 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/83/276083/1 diff --git a/includes/diff/DairikiDiff.php b/includes/diff/DairikiDiff.php index bc57c93..467600b 100644 --- a/includes/diff/DairikiDiff.php +++ b/includes/diff/DairikiDiff.php @@ -249,8 +249,8 @@ $edits = []; $xi = $yi = 0; while ( $xi < $n_from || $yi < $n_to ) { - assert( '$yi < $n_to || $this->xchanged[$xi]' ); - assert( '$xi < $n_from || $this->ychanged[$yi]' ); + assert( $yi < $n_to || $this->xchanged[$xi] ); + assert( $xi < $n_from || $this->ychanged[$yi] ); // Skip matching "snake". $copy = []; @@ -448,7 +448,7 @@ while ( list( , $y ) = each( $matches ) ) { if ( empty( $this->in_seq[$y] ) ) { $k = $this->lcsPos( $y ); - assert( '$k > 0' ); + assert( $k > 0 ); $ymids[$k] = $ymids[$k - 1]; break; } @@ -456,7 +456,7 @@ while ( list( , $y ) = each( $matches ) ) { if ( $y > $this->seq[$k - 1] ) { - assert( '$y < $this->seq[$k]' ); + assert( $y < $this->seq[$k] ); // Optimization: this is a common case: // next match is just replacing previous match. $this->in_seq[$this->seq[$k]] = false; @@ -464,7 +464,7 @@ $this->in_seq[$y] = 1; } elseif ( empty( $this->in_seq[$y] ) ) { $k = $this->lcsPos( $y ); - assert( '$k > 0' ); + assert( $k > 0 ); $ymids[$k] = $ymids[$k - 1]; } } @@ -507,7 +507,7 @@ } } - assert( '$ypos != $this->seq[$end]' ); + assert( $ypos != $this->seq[$end] ); $this->in_seq[$this->seq[$end]] = false; $this->seq[$end] = $ypos; @@ -595,7 +595,7 @@ $i = 0; $j = 0; - assert( 'count($lines) == count($changed)' ); + assert( count($lines) == count($changed) ); $len = count( $lines ); $other_len = count( $other_changed ); @@ -616,7 +616,7 @@ } while ( $i < $len && !$changed[$i] ) { - assert( '$j < $other_len && ! $other_changed[$j]' ); + assert( $j < $other_len && ! $other_changed[$j] ); $i++; $j++; while ( $j < $other_len && $other_changed[$j] ) { @@ -653,11 +653,11 @@ while ( $start > 0 && $changed[$start - 1] ) { $start--; } - assert( '$j > 0' ); + assert( $j > 0 ); while ( $other_changed[--$j] ) {
[MediaWiki-commits] [Gerrit] Don't quote assert expressions in DairikiDiff - change (mediawiki/core)
Ori.livneh has uploaded a new change for review. https://gerrit.wikimedia.org/r/276082 Change subject: Don't quote assert expressions in DairikiDiff .. Don't quote assert expressions in DairikiDiff Per HHVM issue 5128, it is not possible to use '$this' in string-literal assert() expressions. We can either wait for this to be fixed (unlikely to happen soon, since it involves deep interpreter internals), comment out or remove the asserts, or simply unquote them, so that they are actual expressions rather than strings. The downside to this is that assertions will always be evaluated (but so what, they are extremely cheap), and that when an assertion fail the error message will simply read 'assert(): Assertion failed in /path/to/file on line XXX' as opposed to including the expression in the output. Fair trade, IMO. See: https://github.com/facebook/hhvm/issues/5128 Bug: T124163 Change-Id: Ib458b1b0c28f8d38e9df427196ae79814f6dc0c2 --- M includes/diff/DairikiDiff.php 1 file changed, 16 insertions(+), 16 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/82/276082/1 diff --git a/includes/diff/DairikiDiff.php b/includes/diff/DairikiDiff.php index bc57c93..467600b 100644 --- a/includes/diff/DairikiDiff.php +++ b/includes/diff/DairikiDiff.php @@ -249,8 +249,8 @@ $edits = []; $xi = $yi = 0; while ( $xi < $n_from || $yi < $n_to ) { - assert( '$yi < $n_to || $this->xchanged[$xi]' ); - assert( '$xi < $n_from || $this->ychanged[$yi]' ); + assert( $yi < $n_to || $this->xchanged[$xi] ); + assert( $xi < $n_from || $this->ychanged[$yi] ); // Skip matching "snake". $copy = []; @@ -448,7 +448,7 @@ while ( list( , $y ) = each( $matches ) ) { if ( empty( $this->in_seq[$y] ) ) { $k = $this->lcsPos( $y ); - assert( '$k > 0' ); + assert( $k > 0 ); $ymids[$k] = $ymids[$k - 1]; break; } @@ -456,7 +456,7 @@ while ( list( , $y ) = each( $matches ) ) { if ( $y > $this->seq[$k - 1] ) { - assert( '$y < $this->seq[$k]' ); + assert( $y < $this->seq[$k] ); // Optimization: this is a common case: // next match is just replacing previous match. $this->in_seq[$this->seq[$k]] = false; @@ -464,7 +464,7 @@ $this->in_seq[$y] = 1; } elseif ( empty( $this->in_seq[$y] ) ) { $k = $this->lcsPos( $y ); - assert( '$k > 0' ); + assert( $k > 0 ); $ymids[$k] = $ymids[$k - 1]; } } @@ -507,7 +507,7 @@ } } - assert( '$ypos != $this->seq[$end]' ); + assert( $ypos != $this->seq[$end] ); $this->in_seq[$this->seq[$end]] = false; $this->seq[$end] = $ypos; @@ -595,7 +595,7 @@ $i = 0; $j = 0; - assert( 'count($lines) == count($changed)' ); + assert( count($lines) == count($changed) ); $len = count( $lines ); $other_len = count( $other_changed ); @@ -616,7 +616,7 @@ } while ( $i < $len && !$changed[$i] ) { - assert( '$j < $other_len && ! $other_changed[$j]' ); + assert( $j < $other_len && ! $other_changed[$j] ); $i++; $j++; while ( $j < $other_len && $other_changed[$j] ) { @@ -653,11 +653,11 @@ while ( $start > 0 && $changed[$start - 1] ) { $start--; } - assert( '$j > 0' ); + assert( $j > 0 ); while ( $other_changed[--$j] ) {
[MediaWiki-commits] [Gerrit] Allow to hook up to display values while displaying them in ... - change (wikidata...gui)
Smalyshev has uploaded a new change for review. https://gerrit.wikimedia.org/r/276081 Change subject: Allow to hook up to display values while displaying them in table. .. Allow to hook up to display values while displaying them in table. Bug: T129262 Change-Id: I3ca1ea57320ce66c5bbe9b004ecf440d761f343e --- M wikibase/queryService/ui/App.js M wikibase/queryService/ui/resultBrowser/AbstractResultBrowser.js M wikibase/queryService/ui/resultBrowser/CoordinateResultBrowser.js M wikibase/queryService/ui/resultBrowser/ImageResultBrowser.js M wikibase/queryService/ui/resultBrowser/TableResultBrowser.js 5 files changed, 58 insertions(+), 39 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/gui refs/changes/81/276081/1 diff --git a/wikibase/queryService/ui/App.js b/wikibase/queryService/ui/App.js index 893aef7..a38b94f 100644 --- a/wikibase/queryService/ui/App.js +++ b/wikibase/queryService/ui/App.js @@ -368,12 +368,17 @@ } var tableBrowser = new wikibase.queryService.ui.resultBrowser.TableResultBrowser(); + var imageBrowser = new wikibase.queryService.ui.resultBrowser.ImageResultBrowser(); + var coordinateBrowser = new wikibase.queryService.ui.resultBrowser.CoordinateResultBrowser(); + tableBrowser.setResult( api.getResultRawData() ); + tableBrowser.addVisitor( imageBrowser.checkImage.bind( imageBrowser ) ); + tableBrowser.addVisitor( coordinateBrowser.checkCoordinate.bind( coordinateBrowser ) ); tableBrowser.draw( $queryResult ); $queryResult.show(); - this._handleQueryResultBrowsers(); + this._handleQueryResultBrowsers( imageBrowser, coordinateBrowser ); return false; }; @@ -381,9 +386,8 @@ /** * @private */ - SELF.prototype._handleQueryResultBrowsers = function() { + SELF.prototype._handleQueryResultBrowsers = function( imageBrowser, coordinateBrowser ) { //image - var imageBrowser = new wikibase.queryService.ui.resultBrowser.ImageResultBrowser(); imageBrowser.setResult( this._sparqlApi.getResultRawData() ); if( imageBrowser.isDrawable() ){ @@ -399,7 +403,6 @@ //maps - var coordinateBrowser = new wikibase.queryService.ui.resultBrowser.CoordinateResultBrowser(); coordinateBrowser.setResult( this._sparqlApi.getResultRawData() ); if( coordinateBrowser.isDrawable() ){ diff --git a/wikibase/queryService/ui/resultBrowser/AbstractResultBrowser.js b/wikibase/queryService/ui/resultBrowser/AbstractResultBrowser.js index 8123a85..0f5f9e8 100644 --- a/wikibase/queryService/ui/resultBrowser/AbstractResultBrowser.js +++ b/wikibase/queryService/ui/resultBrowser/AbstractResultBrowser.js @@ -26,6 +26,20 @@ SELF.prototype._result = null; /** +* @property {function} +* List of visitor callbacks +*/ + SELF.prototype._visitors = []; + + /** +* @property {boolean} +* @protected +* Is the browser drawable? +* Not drawable by default. +*/ + SELF.prototype._drawable = false; + + /** * Sets the result to be browsed * @param {Object} result set **/ @@ -34,11 +48,29 @@ }; /** +* Add visitor function. +* @param {function} callback +*/ + SELF.prototype.addVisitor = function( callback ) { + this._visitors.push( callback ); + } + + /** +* Call all visitors for the piece of data +* @param data +*/ + SELF.prototype.visit = function( data ) { + this._visitors.forEach( function ( v ) { + v( data ); + } ); + } + + /** * Checks whether the result browser can draw the given result * @return {boolean} **/ SELF.prototype.isDrawable = function() { - jQuery.error( 'Method isDrawable() needs to be implemented!' ); + return this._drawable; }; /** diff --git a/wikibase/queryService/ui/resultBrowser/CoordinateResultBrowser.js b/wikibase/queryService/ui/resultBrowser/CoordinateResultBrowser.js index f94266f..f2d95f1 100644 --- a/wikibase/queryService/ui/resultBrowser/CoordinateResultBrowser.js +++ b/wikibase/queryService/ui/resultBrowser/CoordinateResultBrowser.js @@ -61,23 +61,14 @@ }; /** -* Checks whether the browser can draw the given result +* Check if this value contains an coordinate value. * @return {boolean} */ - SELF.prototype.isDrawable = function() { - - var result = this._result.results.bindings[0] || {}, - isDrawable
[MediaWiki-commits] [Gerrit] thank-you-edit: Only call User::getEditCount() once - change (mediawiki...Echo)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/276080 Change subject: thank-you-edit: Only call User::getEditCount() once .. thank-you-edit: Only call User::getEditCount() once And rename $editCount to $thresholdCount for clarity. Change-Id: I115b2dfabf472c855c186d05fa4e31aa7c9c3d6c --- M Hooks.php 1 file changed, 9 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo refs/changes/80/276080/1 diff --git a/Hooks.php b/Hooks.php index 59ada97..4c19644 100644 --- a/Hooks.php +++ b/Hooks.php @@ -459,13 +459,14 @@ $thresholds = [ 1, 10, 100, 1000, 1, 10, 100 ]; if ( $user->isLoggedIn() && $status->value['revision'] ) { // This edit hasn't been added to the edit count yet - $editCount = $user->getEditCount() + 1; - if ( in_array( $editCount, $thresholds ) ) { + $thresholdCount = $user->getEditCount() + 1; + if ( in_array( $thresholdCount, $thresholds ) ) { $id = $user->getId(); - DeferredUpdates::addCallableUpdate( function () use ( $id, $title, $editCount ) { + DeferredUpdates::addCallableUpdate( function () use ( $id, $title, $thresholdCount ) { // Fresh User object $user = User::newFromId( $id ); - if ( $user->getEditCount() !== $editCount ) { + $userEditCount = $user->getEditCount(); + if ( $userEditCount !== $thresholdCount ) { // Race condition with multiple simultaneous requests, skip LoggerFactory::getInstance( 'Echo' )->debug( 'thank-you-edit race condition detected: {user} (id: {id}) should ' . @@ -473,8 +474,8 @@ array( 'user' => $user->getName(), 'id' => $user->getId(), - 'expectedCount' => $editCount, - 'actualCount' => $user->getEditCount(), + 'expectedCount' => $thresholdCount, + 'actualCount' => $userEditCount, ) ); return; @@ -484,7 +485,7 @@ array( 'user' => $user->getName(), 'id' => $user->getId(), - 'count' => $editCount, + 'count' => $thresholdCount, ) ); EchoEvent::create( array( @@ -494,7 +495,7 @@ // Edit threshold notifications are sent to the agent 'extra' => array( 'notifyAgent' => true, - 'editCount' => $editCount, + 'thresholdCount' => $thresholdCount, ) ) ); -- To view, visit https://gerrit.wikimedia.org/r/276080 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I115b2dfabf472c855c186d05fa4e31aa7c9c3d6c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: Legoktm ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Merge remote-tracking branch 'origin/master' into HEAD - change (wikimedia/portals)
jenkins-bot has submitted this change and it was merged. Change subject: Merge remote-tracking branch 'origin/master' into HEAD .. Merge remote-tracking branch 'origin/master' into HEAD - Fixes conflicts in gulpfile.js - Fixes tests/casper.js (search section) Change-Id: I546914f3c011ab426c3a0fad48fd300acc36a4ca --- M gulpfile.js M prod/wikipedia.org/index.html M tests/casper.js 3 files changed, 14 insertions(+), 35 deletions(-) Approvals: JGirault: Looks good to me, approved jenkins-bot: Verified diff --git a/gulpfile.js b/gulpfile.js index 5fccd35..22f28bd 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -60,25 +60,26 @@ } } -function getBaseDir() { +var getBaseDir, getProdDir, getConfig; +getBaseDir = function () { requirePortalParam(); getBaseDir = function () { return 'dev/' + portalParam + '/'; }; return getBaseDir(); -} +}; -function getProdDir() { +getProdDir = function () { requirePortalParam(); getProdDir = function () { return 'prod/' + portalParam + '/'; }; return getProdDir(); -} +}; -function getConfig() { +getConfig = function () { var config = {}, baseDir, prodDir; @@ -142,7 +143,7 @@ return config; }; return getConfig(); -} +}; /* List of tasks === */ @@ -170,11 +171,7 @@ requirePortalParam(); -<<< HEAD (08339a Replace the custom dropdown with a native element.) - return gulp.src( [ baseDir + 'assets/postcss/*.css', '!' + baseDir + 'assets/postcss/_*.css' ] ) -=== - return gulp.src( getBaseDir() + 'assets/cssnext/style.css' ) ->>> BRANCH (6aa1b9 Merge "Disabling broken language search.") + return gulp.src( [ getBaseDir() + 'assets/postcss/*.css', '!' + getBaseDir() + 'assets/postcss/_*.css' ] ) .pipe( plugins.postcss( [ postCSSImport(), postCSSNext(), @@ -190,20 +187,13 @@ * Inlines assets of index.html in dev folder, * moves index.html into prod folder */ -<<< HEAD (08339a Replace the custom dropdown with a native element.) gulp.task( 'inline-assets', [ 'compile-handlebars', 'postcss' ], function () { - return gulp.src( config.inline.src ) - .pipe( plugins.inline( config.inline.options ) ) - .pipe( gulp.dest( prodDir ) ); -=== -gulp.task( 'inline-assets', [ 'compile-handlebars', 'cssnext' ], function () { requirePortalParam(); return gulp.src( getConfig().inline.src ) .pipe( plugins.inline( getConfig().inline.options ) ) .pipe( gulp.dest( getProdDir() ) ); ->>> BRANCH (6aa1b9 Merge "Disabling broken language search.") } ); /** @@ -263,20 +253,13 @@ * - postCSS files * into dev folder. */ -<<< HEAD (08339a Replace the custom dropdown with a native element.) -gulp.task( 'watch', [ 'build', 'compile-handlebars', 'sprite', 'postcss' ], function () { - gulp.watch( config.watch.hb, [ 'compile-handlebars' ] ); - gulp.watch( config.watch.sprites, [ 'sprite' ] ); - gulp.watch( config.watch.postcss, [ 'postcss' ] ); -=== -gulp.task( 'watch', [ 'compile-handlebars', 'sprite', 'cssnext' ], function () { +gulp.task( 'watch', [ 'compile-handlebars', 'sprite', 'postcss' ], function () { requirePortalParam(); gulp.watch( getConfig().watch.hb, [ 'compile-handlebars' ] ); gulp.watch( getConfig().watch.sprites, [ 'sprite' ] ); - gulp.watch( getConfig().watch.cssnext, [ 'cssnext' ] ); ->>> BRANCH (6aa1b9 Merge "Disabling broken language search.") + gulp.watch( getConfig().watch.postcss, [ 'postcss' ] ); } ); /** @@ -349,10 +332,6 @@ .pipe( plugins[ 'if' ]( '*.png', gulp.dest( getBaseDir() + 'assets/img/' ), gulp.dest( getBaseDir() + 'assets/css/' ) ) ); } ); -<<< HEAD (08339a Replace the custom dropdown with a native element.) -gulp.task( 'default', [ 'build', 'lint', 'compile-handlebars', 'sprite', 'postcss', 'inline-assets', 'clean-prod-js', 'concat-minify-js', 'minify-html', 'optimize-images' ] ); -=== -gulp.task( 'default', [ 'lint', 'compile-handlebars', 'sprite', 'cssnext', 'inline-assets', 'clean-prod-js', 'concat-minify-js', 'minify-html', 'optimize-images' ] ); ->>> BRANCH (6aa1b9 Merge "Disabling broken language search.") +gulp.task( 'default', [ 'lint', 'compile-handlebars', 'sprite', 'postcss', 'inline-assets', 'clean-prod-js', 'concat-minify-js', 'minify-html', 'optimize-images' ] ); gulp.task( 'test', [ 'lint' ] ); diff --git a/prod/wikipedia.org/index.html b/prod/wikipedia.org/index.html index 458d611..85b7504 100644 --- a/prod/wikipedia.org/index.html +++ b/prod/wikipedia.org/index.html @@ -650,4 +650,4 @@ } - + \ No
[MediaWiki-commits] [Gerrit] Merge remote-tracking branch 'origin/master' into HEAD - change (wikimedia/portals)
JGirault has uploaded a new change for review. https://gerrit.wikimedia.org/r/276079 Change subject: Merge remote-tracking branch 'origin/master' into HEAD .. Merge remote-tracking branch 'origin/master' into HEAD - Fixes conflicts in gulpfile.js - Fixes tests/casper.js (search section) Change-Id: I546914f3c011ab426c3a0fad48fd300acc36a4ca --- M gulpfile.js M prod/wikipedia.org/index.html M tests/casper.js 3 files changed, 14 insertions(+), 35 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/portals refs/changes/79/276079/1 diff --git a/gulpfile.js b/gulpfile.js index 5fccd35..22f28bd 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -60,25 +60,26 @@ } } -function getBaseDir() { +var getBaseDir, getProdDir, getConfig; +getBaseDir = function () { requirePortalParam(); getBaseDir = function () { return 'dev/' + portalParam + '/'; }; return getBaseDir(); -} +}; -function getProdDir() { +getProdDir = function () { requirePortalParam(); getProdDir = function () { return 'prod/' + portalParam + '/'; }; return getProdDir(); -} +}; -function getConfig() { +getConfig = function () { var config = {}, baseDir, prodDir; @@ -142,7 +143,7 @@ return config; }; return getConfig(); -} +}; /* List of tasks === */ @@ -170,11 +171,7 @@ requirePortalParam(); -<<< HEAD (08339a Replace the custom dropdown with a native element.) - return gulp.src( [ baseDir + 'assets/postcss/*.css', '!' + baseDir + 'assets/postcss/_*.css' ] ) -=== - return gulp.src( getBaseDir() + 'assets/cssnext/style.css' ) ->>> BRANCH (6aa1b9 Merge "Disabling broken language search.") + return gulp.src( [ getBaseDir() + 'assets/postcss/*.css', '!' + getBaseDir() + 'assets/postcss/_*.css' ] ) .pipe( plugins.postcss( [ postCSSImport(), postCSSNext(), @@ -190,20 +187,13 @@ * Inlines assets of index.html in dev folder, * moves index.html into prod folder */ -<<< HEAD (08339a Replace the custom dropdown with a native element.) gulp.task( 'inline-assets', [ 'compile-handlebars', 'postcss' ], function () { - return gulp.src( config.inline.src ) - .pipe( plugins.inline( config.inline.options ) ) - .pipe( gulp.dest( prodDir ) ); -=== -gulp.task( 'inline-assets', [ 'compile-handlebars', 'cssnext' ], function () { requirePortalParam(); return gulp.src( getConfig().inline.src ) .pipe( plugins.inline( getConfig().inline.options ) ) .pipe( gulp.dest( getProdDir() ) ); ->>> BRANCH (6aa1b9 Merge "Disabling broken language search.") } ); /** @@ -263,20 +253,13 @@ * - postCSS files * into dev folder. */ -<<< HEAD (08339a Replace the custom dropdown with a native element.) -gulp.task( 'watch', [ 'build', 'compile-handlebars', 'sprite', 'postcss' ], function () { - gulp.watch( config.watch.hb, [ 'compile-handlebars' ] ); - gulp.watch( config.watch.sprites, [ 'sprite' ] ); - gulp.watch( config.watch.postcss, [ 'postcss' ] ); -=== -gulp.task( 'watch', [ 'compile-handlebars', 'sprite', 'cssnext' ], function () { +gulp.task( 'watch', [ 'compile-handlebars', 'sprite', 'postcss' ], function () { requirePortalParam(); gulp.watch( getConfig().watch.hb, [ 'compile-handlebars' ] ); gulp.watch( getConfig().watch.sprites, [ 'sprite' ] ); - gulp.watch( getConfig().watch.cssnext, [ 'cssnext' ] ); ->>> BRANCH (6aa1b9 Merge "Disabling broken language search.") + gulp.watch( getConfig().watch.postcss, [ 'postcss' ] ); } ); /** @@ -349,10 +332,6 @@ .pipe( plugins[ 'if' ]( '*.png', gulp.dest( getBaseDir() + 'assets/img/' ), gulp.dest( getBaseDir() + 'assets/css/' ) ) ); } ); -<<< HEAD (08339a Replace the custom dropdown with a native element.) -gulp.task( 'default', [ 'build', 'lint', 'compile-handlebars', 'sprite', 'postcss', 'inline-assets', 'clean-prod-js', 'concat-minify-js', 'minify-html', 'optimize-images' ] ); -=== -gulp.task( 'default', [ 'lint', 'compile-handlebars', 'sprite', 'cssnext', 'inline-assets', 'clean-prod-js', 'concat-minify-js', 'minify-html', 'optimize-images' ] ); ->>> BRANCH (6aa1b9 Merge "Disabling broken language search.") +gulp.task( 'default', [ 'lint', 'compile-handlebars', 'sprite', 'postcss', 'inline-assets', 'clean-prod-js', 'concat-minify-js', 'minify-html', 'optimize-images' ] ); gulp.task( 'test', [ 'lint' ] ); diff --git a/prod/wikipedia.org/index.html b/prod/wikipedia.org/index.html index 458d611..85b7504 100644 --- a/prod/wikipedia.org/index.html +++ b/prod/wikipedia.org/index.h
[MediaWiki-commits] [Gerrit] Test commit for CI only: rb split, appservers codfw - change (operations/puppet)
BBlack has uploaded a new change for review. https://gerrit.wikimedia.org/r/276078 Change subject: Test commit for CI only: rb split, appservers codfw .. Test commit for CI only: rb split, appservers codfw Change-Id: Ic780133913d8527af80673242afe9966238dc40f --- M hieradata/common/cache/text.yaml 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/78/276078/1 diff --git a/hieradata/common/cache/text.yaml b/hieradata/common/cache/text.yaml index 5c61bd9..a484a89 100644 --- a/hieradata/common/cache/text.yaml +++ b/hieradata/common/cache/text.yaml @@ -43,7 +43,7 @@ - 'cp4018.ulsfo.wmnet' apps: appservers: -route: 'eqiad' +route: 'codfw' backends: eqiad: 'appservers.svc.eqiad.wmnet' codfw: 'appservers.svc.codfw.wmnet' @@ -63,7 +63,7 @@ eqiad: 'rendering.svc.eqiad.wmnet' codfw: 'rendering.svc.codfw.wmnet' restbase: -route: 'eqiad' +route: 'split' backends: eqiad: 'restbase.svc.eqiad.wmnet' codfw: 'restbase.svc.codfw.wmnet' -- To view, visit https://gerrit.wikimedia.org/r/276078 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic780133913d8527af80673242afe9966238dc40f Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BBlack ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Test commit for CI only: codfw->direct - change (operations/puppet)
BBlack has uploaded a new change for review. https://gerrit.wikimedia.org/r/276077 Change subject: Test commit for CI only: codfw->direct .. Test commit for CI only: codfw->direct Change-Id: Ic4074f1d1bb0edef6c47ce1ebc4ebbc01d7b4f2d --- M hieradata/role/common/cache/text.yaml 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/77/276077/1 diff --git a/hieradata/role/common/cache/text.yaml b/hieradata/role/common/cache/text.yaml index 0616360..f6fd2fa 100644 --- a/hieradata/role/common/cache/text.yaml +++ b/hieradata/role/common/cache/text.yaml @@ -22,6 +22,6 @@ # cache::route_table: eqiad: 'direct' - codfw: 'eqiad' + codfw: 'direct' ulsfo: 'codfw' esams: 'eqiad' -- To view, visit https://gerrit.wikimedia.org/r/276077 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic4074f1d1bb0edef6c47ce1ebc4ebbc01d7b4f2d Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BBlack ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [ExpandTemplates] Archive extension - change (integration/config)
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/276076 Change subject: [ExpandTemplates] Archive extension .. [ExpandTemplates] Archive extension See I0c28652c8fc6a79b0edb05317316e22e4033bf8d Change-Id: I49aef6f80be67109f34d3f80bc286037c067f5ba --- M zuul/layout.yaml 1 file changed, 1 insertion(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/76/276076/1 diff --git a/zuul/layout.yaml b/zuul/layout.yaml index a8c2792..cc1c863 100644 --- a/zuul/layout.yaml +++ b/zuul/layout.yaml @@ -3045,9 +3045,7 @@ - name: mediawiki/extensions/ExpandTemplates template: - - name: jshint - - name: jsonlint - - name: extension-unittests-generic + - name: archived - name: mediawiki/extensions/ExtensionDistributor template: -- To view, visit https://gerrit.wikimedia.org/r/276076 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I49aef6f80be67109f34d3f80bc286037c067f5ba Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Paladox ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use AntiSpoofAddConflicts hook - change (mediawiki...CentralAuth)
FunPika has uploaded a new change for review. https://gerrit.wikimedia.org/r/276075 Change subject: Use AntiSpoofAddConflicts hook .. Use AntiSpoofAddConflicts hook This uses a hook (added in Gerrit change 276061) to add global conflicts to the output of SpoofUser:getConflicts, instead of running a copy of AntiSpoof's AbortNewAccount hook code. This will allow other functions of AntiSpoof such as the API module to detect global conflicts. Bug: T126174 Change-Id: Idc0fe4b5de4c88b5a393d3cf20f821040514a422 Depends-On: I5372be6aa1160f390ae5c50c841f41b8a597915e --- M AntiSpoof/CentralAuthAntiSpoofHooks.php M includes/CentralAuthHooks.php 2 files changed, 5 insertions(+), 51 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth refs/changes/75/276075/1 diff --git a/AntiSpoof/CentralAuthAntiSpoofHooks.php b/AntiSpoof/CentralAuthAntiSpoofHooks.php index d4fa369..29876f3 100644 --- a/AntiSpoof/CentralAuthAntiSpoofHooks.php +++ b/AntiSpoof/CentralAuthAntiSpoofHooks.php @@ -2,56 +2,10 @@ class CentralAuthAntiSpoofHooks { - /** -* Can be used to cancel user account creation -* -* @param $user User -* @param $message string -* @return bool true to continue, false to abort user creation -*/ - public static function asAbortNewAccountHook( $user, &$message ) { - global $wgAntiSpoofAccounts, $wgUser, $wgRequest; - - if ( !$wgAntiSpoofAccounts ) { - $mode = 'LOGGING '; - $active = false; - } elseif ( $wgRequest->getCheck( 'wpIgnoreAntiSpoof' ) && - $wgUser->isAllowed( 'override-antispoof' ) ) { - $mode = 'OVERRIDE '; - $active = false; - } else { - $mode = ''; - $active = true; - } - - $name = $user->getName(); + public static function asAntiSpoofAddConflicts( &$spoofs, $name ) { $spoof = new CentralAuthSpoofUser( $name ); - if ( $spoof->isLegal() ) { - $normalized = $spoof->getNormalized(); - $conflicts = $spoof->getConflicts(); - if ( empty( $conflicts ) ) { - wfDebugLog( 'antispoof', "{$mode}PASS new account '$name' [$normalized]" ); - } else { - wfDebugLog( 'antispoof', "{$mode}CONFLICT new account '$name' [$normalized] spoofs " . implode( ',', $conflicts ) ); - if ( $active ) { - $numConflicts = count( $conflicts ); - $message = wfMessage( 'antispoof-conflict-top', $name )->numParams( $numConflicts )->escaped(); - $message .= ''; - foreach ( $conflicts as $simUser ) { - $message .= '' . wfMessage( 'antispoof-conflict-item', $simUser )->escaped() . ''; - } - $message .= '' . wfMessage( 'antispoof-conflict-bottom' )->escaped(); - return false; - } - } - } else { - $error = $spoof->getError(); - wfDebugLog( 'antispoof', "{$mode}ILLEGAL new account '$name' $error" ); - if ( $active ) { - $message = wfMessage( 'antispoof-name-illegal', $name, $error )->escaped(); - return false; - } - } + $spoof->spoofedUsers( &$spoofs ); + return true; } diff --git a/includes/CentralAuthHooks.php b/includes/CentralAuthHooks.php index 6e8d9d0..4fc7259 100644 --- a/includes/CentralAuthHooks.php +++ b/includes/CentralAuthHooks.php @@ -42,8 +42,8 @@ $wgAutoloadClasses['CentralAuthAntiSpoofHooks'] = "$caBase/AntiSpoof/CentralAuthAntiSpoofHooks.php"; - $wgHooks['AbortNewAccount'][] = - 'CentralAuthAntiSpoofHooks::asAbortNewAccountHook'; + $wgHooks['AntiSpoofAddConflicts'][] = + 'CentralAuthAntiSpoofHooks::asAntiSpoofAddConflicts'; $wgHooks['AddNewAccount'][] = 'CentralAuthAntiSpoofHooks::asAddNewAccountHook'; $wgHooks['RenameUserComplete'][] = -- To view, visit https://gerrit.wikimedia.org/r/276075 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-C
[MediaWiki-commits] [Gerrit] [EtherEditor] Add npm test - change (integration/config)
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/276074 Change subject: [EtherEditor] Add npm test .. [EtherEditor] Add npm test Also move jshint and jsonlint to check: for non-whitelisted users. Requires I84cb60f4055b6c8737fb19f7b406ad231fc074bd Change-Id: I9c3772389b31021b6b6997d42c657e6042ba0f3e --- M zuul/layout.yaml 1 file changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/74/276074/1 diff --git a/zuul/layout.yaml b/zuul/layout.yaml index a8c2792..cfe61c4 100644 --- a/zuul/layout.yaml +++ b/zuul/layout.yaml @@ -3014,9 +3014,11 @@ - name: mediawiki/extensions/EtherEditor template: - - name: jshint - - name: jsonlint - name: extension-unittests-non-voting + - name: npm +check: + - jsonlint + - jshint - name: mediawiki/extensions/EventLogging template: -- To view, visit https://gerrit.wikimedia.org/r/276074 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9c3772389b31021b6b6997d42c657e6042ba0f3e Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Paladox ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add missing EtherEditorApiTestCase.php test file to the loader - change (mediawiki...EtherEditor)
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/276073 Change subject: Add missing EtherEditorApiTestCase.php test file to the loader .. Add missing EtherEditorApiTestCase.php test file to the loader See https://integration.wikimedia.org/ci/job/mwext-testextension-php55-non-voting/134/console 00:28:35 PHP Fatal error: Class 'EtherEditorApiTestCase' not found in /mnt/jenkins-workspace/workspace/mwext-testextension-php55-non-voting/src/extensions/EtherEditor/tests/phpunit/api/GetEtherPadTextTest.php on line 17 Change-Id: Ib9ef9239ff9525a560d17699fc344884df38baec --- M EtherEditorHooks.php 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/EtherEditor refs/changes/73/276073/1 diff --git a/EtherEditorHooks.php b/EtherEditorHooks.php index 60a9720..61eea57 100644 --- a/EtherEditorHooks.php +++ b/EtherEditorHooks.php @@ -218,6 +218,7 @@ public static function registerUnitTests( &$files ) { $testDir = dirname( __FILE__ ) . '/tests/phpunit/'; $files[] = $testDir . 'EtherEditorTest.php'; + $files[] = $testDir . 'api/EtherEditorApiTestCase.php'; $files[] = $testDir . 'api/GetEtherPadTextTest.php'; $files[] = $testDir . 'api/EtherPadAuthTest.php'; $files[] = $testDir . 'api/ForkEtherPadTest.php'; -- To view, visit https://gerrit.wikimedia.org/r/276073 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib9ef9239ff9525a560d17699fc344884df38baec Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/EtherEditor Gerrit-Branch: master Gerrit-Owner: Paladox ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Compress all our SVGs using svgo - change (mediawiki...MobileFrontend)
Jdlrobson has uploaded a new change for review. https://gerrit.wikimedia.org/r/276072 Change subject: Compress all our SVGs using svgo .. Compress all our SVGs using svgo Change-Id: I59162edb411c4aa365aa7e382329b8e5ab1fcb2d --- M resources/mobile.editor.common/images/editSourceNormal.svg M resources/mobile.editor.common/images/editVeNormal.svg M resources/mobile.editor.overlay.withtoolbar.images/reference-ltr.svg M resources/mobile.editor.overlay.withtoolbar.images/reference-rtl.svg M resources/mobile.languages.structured/magnifying-glass.svg M resources/mobile.mainMenu/images/hamburger.svg M resources/mobile.overlay.images/close.svg M resources/mobile.pagesummary.styles/noimage.svg M resources/mobile.references.images/cite.svg M resources/mobile.swipe.images/move-ltr.svg M resources/mobile.swipe.images/move-rtl.svg M resources/mobile.toc.images/contents-ltr.svg M resources/skins.minerva.content.styles/images/external-link-ltr-icon.svg M resources/skins.minerva.content.styles/images/external-link-rtl-icon.svg M resources/skins.minerva.icons.images.scripts/talk.svg M resources/skins.minerva.icons.images.scripts/userAnonymous.svg M resources/skins.minerva.icons.images.scripts/userNormal.svg M resources/skins.minerva.icons.images.scripts/watch.svg M resources/skins.minerva.icons.images.scripts/watched.svg M resources/skins.minerva.icons.images/bell.svg M resources/skins.minerva.icons.images/edit.svg M resources/skins.minerva.icons.images/editLocked.svg M resources/skins.minerva.icons.images/hamburger.svg M resources/skins.minerva.userpage.styles/talk.svg M resources/skins.minerva.userpage.styles/userpage.svg 25 files changed, 99 insertions(+), 93 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/72/276072/1 diff --git a/resources/mobile.editor.common/images/editSourceNormal.svg b/resources/mobile.editor.common/images/editSourceNormal.svg index ceab1a9..eb218f7 100644 --- a/resources/mobile.editor.common/images/editSourceNormal.svg +++ b/resources/mobile.editor.common/images/editSourceNormal.svg @@ -1 +1,6 @@ -http://www.w3.org/2000/svg"; viewBox="0 0 32 32" enable-background="new 0 0 40 40"> \ No newline at end of file + +http://www.w3.org/2000/svg"; viewBox="0 0 32 32"> + + + + diff --git a/resources/mobile.editor.common/images/editVeNormal.svg b/resources/mobile.editor.common/images/editVeNormal.svg index 8a93fc1..aafe984 100644 --- a/resources/mobile.editor.common/images/editVeNormal.svg +++ b/resources/mobile.editor.common/images/editVeNormal.svg @@ -1 +1,4 @@ -http://www.w3.org/2000/svg"; viewBox="0 0 32 32" enable-background="new 0 0 40 40"> \ No newline at end of file + +http://www.w3.org/2000/svg"; viewBox="0 0 32 32"> + + diff --git a/resources/mobile.editor.overlay.withtoolbar.images/reference-ltr.svg b/resources/mobile.editor.overlay.withtoolbar.images/reference-ltr.svg index 11e1c75..7b03835 100644 --- a/resources/mobile.editor.overlay.withtoolbar.images/reference-ltr.svg +++ b/resources/mobile.editor.overlay.withtoolbar.images/reference-ltr.svg @@ -1,6 +1,6 @@ http://www.w3.org/2000/svg"; width="24" height="24" viewBox="0 0 24 24"> - + diff --git a/resources/mobile.editor.overlay.withtoolbar.images/reference-rtl.svg b/resources/mobile.editor.overlay.withtoolbar.images/reference-rtl.svg index b31bbac..6a154d6 100644 --- a/resources/mobile.editor.overlay.withtoolbar.images/reference-rtl.svg +++ b/resources/mobile.editor.overlay.withtoolbar.images/reference-rtl.svg @@ -1,6 +1,6 @@ http://www.w3.org/2000/svg"; width="24" height="24" viewBox="0 0 24 24"> - + diff --git a/resources/mobile.languages.structured/magnifying-glass.svg b/resources/mobile.languages.structured/magnifying-glass.svg index 373a4bb..6c13512 100644 --- a/resources/mobile.languages.structured/magnifying-glass.svg +++ b/resources/mobile.languages.structured/magnifying-glass.svg @@ -1,10 +1,4 @@ - - -http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd";> -http://www.w3.org/2000/svg"; xmlns:xlink="http://www.w3.org/1999/xlink"; x="0px" y="0px" -viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve"> - - + +http://www.w3.org/2000/svg"; viewBox="0 0 24 24"> + + diff --git a/resources/mobile.mainMenu/images/hamburger.svg b/resources/mobile.mainMenu/images/hamburger.svg index 57b96b6..60e068a 100644 --- a/resources/mobile.mainMenu/images/hamburger.svg +++ b/resources/mobile.mainMenu/images/hamburger.svg @@ -1 +1,4 @@ -http://www.w3.org/2000/svg"; width="48" height="48" viewBox="0 0 48 48"> \ No newline at end of file + +http://www.w3.org/2000/svg"; width="48" height="48" viewBox="0 0 48 48"> + + diff --git a/resources/mobile.overlay.images/close.svg b/resources/mobile.overlay.images/close.svg index 45ab37d..9df07a6 100644 --- a/resources/mobile.overlay.images/close.svg +++ b
[MediaWiki-commits] [Gerrit] Set cross-DC swift writes to be sync for originals for switc... - change (operations/mediawiki-config)
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/276071 Change subject: Set cross-DC swift writes to be sync for originals for switchover testing .. Set cross-DC swift writes to be sync for originals for switchover testing Change-Id: Ic922aa7953d7b39030135facd77eb644cbdfe561 --- M wmf-config/filebackend-production.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/71/276071/1 diff --git a/wmf-config/filebackend-production.php b/wmf-config/filebackend-production.php index 5fdc59e..172394d 100644 --- a/wmf-config/filebackend-production.php +++ b/wmf-config/filebackend-production.php @@ -96,7 +96,7 @@ array( 'template' => 'local-swift-eqiad', 'isMultiMaster' => true ), array( 'template' => 'local-swift-codfw' ) ), - 'replication' => 'async', + 'replication' => 'sync', // sync for codfw originals switch-over test 'syncChecks' => ( 1 | 4 ), // (size & sha1) ); $wgFileBackends[] = array( @@ -109,7 +109,7 @@ array( 'template' => 'shared-swift-eqiad', 'isMultiMaster' => true ), array( 'template' => 'shared-swift-codfw' ), ), - 'replication' => 'async', + 'replication' => 'sync', // sync for codfw originals switch-over test 'syncChecks' => ( 1 | 4 ), // (size & sha1) ); $wgFileBackends[] = array( -- To view, visit https://gerrit.wikimedia.org/r/276071 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic922aa7953d7b39030135facd77eb644cbdfe561 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Aaron Schulz ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix bug so we use invalid amount error - change (mediawiki...DonationInterface)
jenkins-bot has submitted this change and it was merged. Change subject: Fix bug so we use invalid amount error .. Fix bug so we use invalid amount error Its message key doesn't have -calc on the end of it. Bug: T129277 Change-Id: I2a0c3d593375fadf082b6ea57ad0763e68161747 --- M gateway_common/DataValidator.php M tests/Adapter/Amazon/AmazonTest.php M tests/Adapter/PayPal/PayPalTest.php 3 files changed, 9 insertions(+), 10 deletions(-) Approvals: Cdentinger: Looks good to me, approved jenkins-bot: Verified diff --git a/gateway_common/DataValidator.php b/gateway_common/DataValidator.php index eae19b1..f371287 100644 --- a/gateway_common/DataValidator.php +++ b/gateway_common/DataValidator.php @@ -145,18 +145,17 @@ //getErrorToken is actually for something entirely different: //Figuring out where on the form the error should land. $token = self::getErrorToken( $field ); - $suffix = $token; //defaultness - switch ($token){ - case 'amount': - $suffix = 'invalid-amount'; + switch ( $token ) { + case 'amount': + $error_key_calc = 'donate_interface-error-msg-invalid-amount'; + break; + default: + $error_key_calc = 'donate_interface-error-msg-' . $token . '-calc'; break; } - $error_key_calc = 'donate_interface-error-msg-' . $suffix . '-calc'; - - if ( $type === 'calculated'){ + if ( $type === 'calculated' ){ // try for the special "calculated" error message. - // Note: currently only used for country if ( MessageUtils::messageExists( $error_key_calc, $language ) ) { return WmfFramework::formatMessage( $error_key_calc ); } diff --git a/tests/Adapter/Amazon/AmazonTest.php b/tests/Adapter/Amazon/AmazonTest.php index e8ee6d8..2e08b90 100644 --- a/tests/Adapter/Amazon/AmazonTest.php +++ b/tests/Adapter/Amazon/AmazonTest.php @@ -115,7 +115,7 @@ $init['amount'] = '-100.00'; $init['ffname'] = 'amazon'; $session = array( 'Donor' => $init ); - $errorMessage = wfMessage('donate_interface-error-msg-field-correction', wfMessage('donate_interface-error-msg-amount')->text())->text(); + $errorMessage = wfMessage( 'donate_interface-error-msg-invalid-amount' )->text(); $assertNodes = array( 'mw-content-text' => array( 'innerhtmlmatches' => "/.*$errorMessage.*/" diff --git a/tests/Adapter/PayPal/PayPalTest.php b/tests/Adapter/PayPal/PayPalTest.php index e6db707..c0d526e 100644 --- a/tests/Adapter/PayPal/PayPalTest.php +++ b/tests/Adapter/PayPal/PayPalTest.php @@ -188,7 +188,7 @@ $init = $this->getDonorTestData(); $init['amount'] = '-100.00'; $session = array( 'Donor' => $init ); - $errorMessage = wfMessage('donate_interface-error-msg-field-correction', wfMessage('donate_interface-error-msg-amount')->text())->text(); + $errorMessage = wfMessage( 'donate_interface-error-msg-invalid-amount' )->text(); $assertNodes = array( 'mw-content-text' => array( 'innerhtmlmatches' => "/.*$errorMessage.*/" -- To view, visit https://gerrit.wikimedia.org/r/276014 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2a0c3d593375fadf082b6ea57ad0763e68161747 Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/extensions/DonationInterface Gerrit-Branch: master Gerrit-Owner: Ejegg Gerrit-Reviewer: AndyRussG Gerrit-Reviewer: Awight Gerrit-Reviewer: Cdentinger Gerrit-Reviewer: Ssmith Gerrit-Reviewer: XenoRyet Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Replace the custom dropdown with a native element. - change (wikimedia/portals)
jenkins-bot has submitted this change and it was merged. Change subject: Replace the custom dropdown with a native element. .. Replace the custom dropdown with a native element. - First implementation for old browsers, and non-JS: - Styling this native element as well as we can, but it may look a little odd with old browsers. - Solves mobile user experience issues because the device's native selector will be triggered and is a lot easier to use. - Solves non-JS traffic because it's a native now. - Second implementation requiring JS: - When JS is enabled, we make the native select transparent. - We add and place a label on top of it containing just the language code, so the language picker takes less space in the search input. Bug: T125571 Change-Id: I1c64fa7b3f86eeb4780fa439c37f0f5848848a0b --- M dev/wikipedia.org/assets/css/style.css A dev/wikipedia.org/assets/js/search-language-picker.js M dev/wikipedia.org/assets/js/wikipedia-org-event-logging.js M dev/wikipedia.org/assets/js/wm-portal.js M dev/wikipedia.org/assets/postcss/_ie.css M dev/wikipedia.org/assets/postcss/_pab1.css A dev/wikipedia.org/assets/postcss/_search-language-picker.css M dev/wikipedia.org/assets/postcss/style.css M dev/wikipedia.org/assets/rev-manifest.json M dev/wikipedia.org/index.handlebars M dev/wikipedia.org/templates/search.handlebars A prod/wikipedia.org/assets/js/gt-ie9-c84bf66d33.js R prod/wikipedia.org/assets/js/index-b335ba9eb0.js M prod/wikipedia.org/index.html 14 files changed, 465 insertions(+), 196 deletions(-) Approvals: Jdrewniak: Looks good to me, approved jenkins-bot: Verified -- To view, visit https://gerrit.wikimedia.org/r/274681 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1c64fa7b3f86eeb4780fa439c37f0f5848848a0b Gerrit-PatchSet: 3 Gerrit-Project: wikimedia/portals Gerrit-Branch: search-box Gerrit-Owner: Jdrewniak Gerrit-Reviewer: JGirault Gerrit-Reviewer: Jdrewniak Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove deprecated override of Skin::commonPrintStylesheet() - change (mediawiki...ThemeDesigner)
jenkins-bot has submitted this change and it was merged. Change subject: Remove deprecated override of Skin::commonPrintStylesheet() .. Remove deprecated override of Skin::commonPrintStylesheet() Removed from core in 1.27. Change-Id: I471eaa628f357488a4c3da569ddfd70119270f92 --- M SpecialThemeDesigner.php 1 file changed, 16 insertions(+), 20 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/SpecialThemeDesigner.php b/SpecialThemeDesigner.php index 61c823e..621ef9f 100644 --- a/SpecialThemeDesigner.php +++ b/SpecialThemeDesigner.php @@ -11,32 +11,28 @@ } class ThemeDesignerDummySkin extends Skin { - + function __construct() { parent::__construct(); $this->setMembers(); } - - function commonPrintStylesheet() { - return false; - } - + function setupUserCss( OutputPage $out ) { - + foreach ( $out->getExtStyle() as $url ) { $out->addStyle( $url ); } - + } - + } class SpecialThemeDesigner extends SpecialPage { - + public function __construct() { parent::__construct( 'ThemeDesigner' ); } - + /** * Show the special page * @@ -44,15 +40,15 @@ */ public function execute( $par ) { global $wgOut, $wgExtensionAssetsPath; - + $this->mSkin = new ThemeDesignerDummySkin; - + $this->setHeaders(); - + if ( function_exists("OutputPage::includeJQuery") ) { $wgOut->includeJQuery(); } - + $wgOut->addExtensionStyle("$wgExtensionAssetsPath/ThemeDesigner/frame/style/main.css"); // Yes, the following is ugly... though I still haven't decided if I want to become completely ResourceLoader dependant // While 1.16 is still stable. @@ -63,20 +59,20 @@ $varScript = 'var '.implode(", ", $varScript).';'; $wgOut->addInlineScript($varScript); $wgOut->addScriptFile("$wgExtensionAssetsPath/ThemeDesigner/frame/designer.js"); - + echo $wgOut->headElement( $this->mSkin ); $wgOut->sendCacheControl(); $wgOut->disable(); - + // We've collected our html building into a separate file for readability require(dirname(__FILE__).'/frame/layout.php'); - + echo $this->mSkin->bottomScripts( $wgOut ); echo Html::closeElement('body'); echo Html::closeElement('html'); - + } - + protected function getGroupName() { return 'wiki'; } -- To view, visit https://gerrit.wikimedia.org/r/276054 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I471eaa628f357488a4c3da569ddfd70119270f92 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ThemeDesigner Gerrit-Branch: master Gerrit-Owner: Siebrand Gerrit-Reviewer: Daniel Friesen Gerrit-Reviewer: Krinkle Gerrit-Reviewer: Waldir Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Replace deprecated Skin::getUsableSkins() - change (mediawiki...ThemeDesigner)
jenkins-bot has submitted this change and it was merged. Change subject: Replace deprecated Skin::getUsableSkins() .. Replace deprecated Skin::getUsableSkins() Deprecated since 1.23 Change-Id: Ifa71c596609c2cf85bebe3614635b5efcff665bd --- M frame/layout.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/frame/layout.php b/frame/layout.php index eee9b59..d608082 100644 --- a/frame/layout.php +++ b/frame/layout.php @@ -10,7 +10,7 @@ msg('themedesigner-interface-skinlabel')->escaped() ?> &$skinname ) { $skinMessage = $this->msg( "skinname-{$skinkey}" ); if ( !$skinMessage->isDisabled() ) { -- To view, visit https://gerrit.wikimedia.org/r/276059 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifa71c596609c2cf85bebe3614635b5efcff665bd Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ThemeDesigner Gerrit-Branch: master Gerrit-Owner: Siebrand Gerrit-Reviewer: Daniel Friesen Gerrit-Reviewer: Krinkle Gerrit-Reviewer: Siebrand Gerrit-Reviewer: Waldir Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Replace the custom dropdown with a native element. - change (wikimedia/portals)
jenkins-bot has submitted this change and it was merged. Change subject: Replace the custom dropdown with a native element. .. Replace the custom dropdown with a native element. - Styling this native element as well as we can, but it may look a little odd with old browsers. - Solves mobile user experience issues because the device's native selector will be triggered and is a lot easier to use. - Solves non-JS traffic because it's a native now Though the user experience is a little worse than when JS is enabled. (We need JS to make the custom arrow clickable) Bug: T125571 Change-Id: Ie0f43b46007d7c3a73a566dae16fce2a31e9b8f2 --- M dev/wikipedia.org/assets/css/style.css M dev/wikipedia.org/assets/js/pab2.js M dev/wikipedia.org/assets/js/wm-portal.js M dev/wikipedia.org/assets/postcss/_pab1.css M dev/wikipedia.org/assets/postcss/_wm-portal.css M dev/wikipedia.org/assets/rev-manifest.json M dev/wikipedia.org/index.handlebars D dev/wikipedia.org/templates/search-pab1.handlebars D dev/wikipedia.org/templates/search-pab1.option.handlebars M dev/wikipedia.org/templates/search.handlebars D prod/wikipedia.org/assets/js/index-7ded0ace2c.js A prod/wikipedia.org/assets/js/index-8366dee471.js M prod/wikipedia.org/index.html 13 files changed, 352 insertions(+), 890 deletions(-) Approvals: JGirault: Looks good to me, approved jenkins-bot: Verified Objections: Jdrewniak: There's a problem with this change, please improve -- To view, visit https://gerrit.wikimedia.org/r/274332 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie0f43b46007d7c3a73a566dae16fce2a31e9b8f2 Gerrit-PatchSet: 2 Gerrit-Project: wikimedia/portals Gerrit-Branch: search-box Gerrit-Owner: JGirault Gerrit-Reviewer: JGirault Gerrit-Reviewer: Jdrewniak Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add npm entry point - change (mediawiki...EtherEditor)
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/276070 Change subject: Add npm entry point .. Add npm entry point Change-Id: I84cb60f4055b6c8737fb19f7b406ad231fc074bd --- A .jshintignore A .jshintrc A Gruntfile.js A package.json 4 files changed, 68 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/EtherEditor refs/changes/70/276070/1 diff --git a/.jshintignore b/.jshintignore new file mode 100644 index 000..e82e1e5 --- /dev/null +++ b/.jshintignore @@ -0,0 +1,2 @@ +modules/jquery.etherpad.js +node_modules diff --git a/.jshintrc b/.jshintrc new file mode 100644 index 000..04c3a97 --- /dev/null +++ b/.jshintrc @@ -0,0 +1,23 @@ +{ + // Enforcing + "bitwise": true, + "eqeqeq": true, + "freeze": true, + "latedef": "nofunc", + "noarg": true, + "nonew": true, + "undef": true, + "unused": true, + "strict": false, + + // Relaxing + "es5": false, + + // Environment + "browser": true, + "jquery": true, + + "globals": { + "mediaWiki": false + } +} diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 000..58166e8 --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,31 @@ +/*jshint node:true */ +module.exports = function ( grunt ) { + grunt.loadNpmTasks( 'grunt-contrib-jshint' ); + grunt.loadNpmTasks( 'grunt-jsonlint' ); + grunt.loadNpmTasks( 'grunt-banana-checker' ); + + grunt.initConfig( { + jshint: { + options: { + jshintrc: true + }, + all: [ + '**/*.js', + '!node_modules/**', + '!modules/jquery.etherpad.js' + ] + }, + banana: { + all: 'i18n/' + }, + jsonlint: { + all: [ + '**/*.json', + '!node_modules/**' + ] + } + } ); + + grunt.registerTask( 'test', [ 'jshint', 'jsonlint', 'banana' ] ); + grunt.registerTask( 'default', 'test' ); +}; diff --git a/package.json b/package.json new file mode 100644 index 000..ec97d7b --- /dev/null +++ b/package.json @@ -0,0 +1,12 @@ +{ + "scripts": { +"test": "grunt test" + }, + "devDependencies": { +"grunt": "0.4.5", +"grunt-cli": "0.1.13", +"grunt-banana-checker": "0.4.0", +"grunt-contrib-jshint": "1.0.0", +"grunt-jsonlint": "1.0.7" + } +} -- To view, visit https://gerrit.wikimedia.org/r/276070 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I84cb60f4055b6c8737fb19f7b406ad231fc074bd Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/EtherEditor Gerrit-Branch: master Gerrit-Owner: Paladox ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Revert "Defer onPersonalUrls() DB writes to post-send" - change (mediawiki...Echo)
jenkins-bot has submitted this change and it was merged. Change subject: Revert "Defer onPersonalUrls() DB writes to post-send" .. Revert "Defer onPersonalUrls() DB writes to post-send" Causes fatals in production for some reason. This reverts commit 93387806c2674bb678d970a7748f9c225150830b. Bug: T129299 Change-Id: Ie90aa493e2940fae9d6f380b95f87a4cc7e04622 (cherry picked from commit e372f3ce6f3b7be3bf6b926feb1c93b55ef6c72e) --- M Hooks.php M includes/mapper/TargetPageMapper.php M includes/model/TargetPage.php 3 files changed, 13 insertions(+), 51 deletions(-) Approvals: Catrope: Looks good to me, approved MaxSem: Looks good to me, approved jenkins-bot: Verified diff --git a/Hooks.php b/Hooks.php index 7d51ae3..b326795 100644 --- a/Hooks.php +++ b/Hooks.php @@ -724,40 +724,24 @@ return true; } - // Attempt to mark a notification as read when visiting a page - // @todo should this really be here? - $subtractAlerts = 0; - $subtractMessages = 0; + // Attempt to mark a notification as read when visiting a page, + // ideally this should be deferred to end of request and update + // the notification count accordingly + // @Fixme - Find a better place to put this code if ( $title->getArticleID() ) { $mapper = new EchoTargetPageMapper(); $targetPages = $mapper->fetchByUserPageId( $user, $title->getArticleID() ); if ( $targetPages ) { - $eventIds = array(); - $attribManager = EchoAttributeManager::newFromGlobalVars(); - /* @var EchoTargetPage $targetPage */ - foreach ( $targetPages as $id => $targetPage ) { - $section = $attribManager->getNotificationSection( - $targetPage->getEventType() - ); - if ( $section === EchoAttributeManager::MESSAGE ) { - $subtractMessages += 1; - } else { - // ALERT - $subtractAlerts += 1; - } - $eventIds[] = $id; - } - DeferredUpdates::addCallableUpdate( function () use ( $user, $eventIds ) { - $notifUser = MWEchoNotifUser::newFromUser( $user ); - $notifUser->markRead( $eventIds ); - } ); + $eventIds = array_keys( $targetPages ); + $notifUser = MWEchoNotifUser::newFromUser( $user ); + $notifUser->markRead( $eventIds ); } } // Add a "My notifications" item to personal URLs $notifUser = MWEchoNotifUser::newFromUser( $user ); - $msgCount = $notifUser->getMessageCount() - $subtractMessages; - $alertCount = $notifUser->getAlertCount() - $subtractAlerts; + $msgCount = $notifUser->getMessageCount(); + $alertCount = $notifUser->getAlertCount(); $msgNotificationTimestamp = $notifUser->getLastUnreadMessageTime(); $alertNotificationTimestamp = $notifUser->getLastUnreadAlertTime(); diff --git a/includes/mapper/TargetPageMapper.php b/includes/mapper/TargetPageMapper.php index 7cdfde9..f34803a 100644 --- a/includes/mapper/TargetPageMapper.php +++ b/includes/mapper/TargetPageMapper.php @@ -28,15 +28,13 @@ $dbr = $this->dbFactory->getEchoDb( DB_SLAVE ); $res = $dbr->select( - array( 'echo_target_page', 'echo_event' ), - array_merge( self::$fields, array( 'event_type' ) ), + array( 'echo_target_page' ), + self::$fields, array( 'etp_user' => $user->getId(), 'etp_page' => $pageId ), - __METHOD__, - array(), - array( 'echo_event' => array( 'JOIN', 'etp_event=event_id' ) ) + __METHOD__ ); if ( $res ) { $targetPages = array(); diff --git a/includes/model/TargetPage.php b/includes/model/TargetPage.php index c678947..dbdc414 100644 --- a/includes/model/TargetPage.php +++ b/inc
[MediaWiki-commits] [Gerrit] Add pixabay.com to wgCopyUploadsDomains - change (operations/mediawiki-config)
Rillke has uploaded a new change for review. https://gerrit.wikimedia.org/r/276069 Change subject: Add pixabay.com to wgCopyUploadsDomains .. Add pixabay.com to wgCopyUploadsDomains Change-Id: I678c07d9b124f9b5132bd9057ee3787ab02fe616 --- M wmf-config/InitialiseSettings.php 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/69/276069/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 3cf7b78..29e6cf7 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -11963,6 +11963,7 @@ 'webapi.aucklandmuseum.com',// Auckland Museum - T122995 '*.e-pics.ethz.ch', // ETH Library - T123109 '*.museumvictoria.com.au', // Victoria State (AU) Museum, requested in T125387 + 'pixabay.com', // Pixbay: Free high quality images ), ), -- To view, visit https://gerrit.wikimedia.org/r/276069 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I678c07d9b124f9b5132bd9057ee3787ab02fe616 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Rillke ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Revert "Compress PNGs with zopflipng" - change (mediawiki...EtherEditor)
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/276068 Change subject: Revert "Compress PNGs with zopflipng" .. Revert "Compress PNGs with zopflipng" This reverts commit d268c1f729b10cd15e3fa8732020ccaae1dc422f. Change-Id: Idab8699432672551048bb60cabd5c63ec72e4a06 --- M modules/images/sessionlist.png M modules/images/userlist.png 2 files changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/EtherEditor refs/changes/68/276068/1 diff --git a/modules/images/sessionlist.png b/modules/images/sessionlist.png index 534a846..832a390 100644 --- a/modules/images/sessionlist.png +++ b/modules/images/sessionlist.png Binary files differ diff --git a/modules/images/userlist.png b/modules/images/userlist.png index 65c8f37..36a87cf 100644 --- a/modules/images/userlist.png +++ b/modules/images/userlist.png Binary files differ -- To view, visit https://gerrit.wikimedia.org/r/276068 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idab8699432672551048bb60cabd5c63ec72e4a06 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/EtherEditor Gerrit-Branch: master Gerrit-Owner: Paladox ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [EmailCapture] Add npm test - change (integration/config)
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/276067 Change subject: [EmailCapture] Add npm test .. [EmailCapture] Add npm test Also move jsonlint to check: for non-whitelisted users and remove jshint since there are no js files. Requires I80b0f620a0c2bbc8846b064c440de5b2db10f06f Change-Id: I41ca76d01b1fe97444380b2d0ef4eab46bd3a2a7 --- M zuul/layout.yaml 1 file changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/67/276067/1 diff --git a/zuul/layout.yaml b/zuul/layout.yaml index a8c2792..d0cb528 100644 --- a/zuul/layout.yaml +++ b/zuul/layout.yaml @@ -3008,9 +3008,10 @@ - name: mediawiki/extensions/EmailCapture template: - - name: jshint - - name: jsonlint - name: extension-unittests-generic + - name: npm +check: + - jsonlint - name: mediawiki/extensions/EtherEditor template: -- To view, visit https://gerrit.wikimedia.org/r/276067 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I41ca76d01b1fe97444380b2d0ef4eab46bd3a2a7 Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Paladox ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Added some jobqueue comments - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: Added some jobqueue comments .. Added some jobqueue comments Change-Id: I02c8f88f6b2c3d0cc4f4fea26bb5c53c43b118c3 --- M wmf-config/jobqueue-codfw.php M wmf-config/jobqueue-eqiad.php 2 files changed, 5 insertions(+), 1 deletion(-) Approvals: Gilles: Looks good to me, but someone else must approve MaxSem: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/jobqueue-codfw.php b/wmf-config/jobqueue-codfw.php index 136b041..d79ef9e 100644 --- a/wmf-config/jobqueue-codfw.php +++ b/wmf-config/jobqueue-codfw.php @@ -9,6 +9,7 @@ // the MediaWiki config to direct traffic there. $wgJobTypeConf['default'] = array( 'class' => 'JobQueueFederated', + // Do NOT remove entries from here if they are still present in 'partitionsBySection' 'configByPartition' => array( 'rdb1' => array( 'class' => 'JobQueueRedis', @@ -34,6 +35,7 @@ ), ), 'sectionsByWiki' => array(), // default + // Weights for partitions in use: use this to depool redis masters 'partitionsBySection' => array( 'default' => array( 'rdb1' => 50, 'rdb2' => 50 ), ) diff --git a/wmf-config/jobqueue-eqiad.php b/wmf-config/jobqueue-eqiad.php index 4229719..ee91b11 100644 --- a/wmf-config/jobqueue-eqiad.php +++ b/wmf-config/jobqueue-eqiad.php @@ -22,6 +22,7 @@ // the MediaWiki config to direct traffic there. $wgJobTypeConf['default'] = array( 'class' => 'JobQueueFederated', + // Do NOT remove entries from here if they are still present in 'partitionsBySection' 'configByPartition' => array( # rdb 1 @@ -84,7 +85,8 @@ ) + $wmgRedisQueueBaseConfig, ), 'sectionsByWiki' => array(), // default - 'partitionsBySection' => array( // weights for partitions in use + // Weights for partitions in use: use this to depool redis masters + 'partitionsBySection' => array( 'default' => array( 'rdb1-6379' => 50, 'rdb1-6380' => 50, -- To view, visit https://gerrit.wikimedia.org/r/275378 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I02c8f88f6b2c3d0cc4f4fea26bb5c53c43b118c3 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Aaron Schulz Gerrit-Reviewer: Elukey Gerrit-Reviewer: Florianschmidtwelzow Gerrit-Reviewer: Gilles Gerrit-Reviewer: MaxSem Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add debug logging for when the thank-you-edit code detects a... - change (mediawiki...Echo)
jenkins-bot has submitted this change and it was merged. Change subject: Add debug logging for when the thank-you-edit code detects a race condition .. Add debug logging for when the thank-you-edit code detects a race condition We seem to be discarding *all* thank-you-edit notifications as race conditions now. Bug: T128249 Change-Id: I1f284bd13e89fe2205c4c87a6c0f4a7dfe1c8bd1 (cherry picked from commit e85c3832bbf5f482f240c35e0f526211a37f9e6a) --- M Hooks.php 1 file changed, 10 insertions(+), 0 deletions(-) Approvals: MaxSem: Looks good to me, approved jenkins-bot: Verified diff --git a/Hooks.php b/Hooks.php index 7d51ae3..fab2450 100644 --- a/Hooks.php +++ b/Hooks.php @@ -467,6 +467,16 @@ $user = User::newFromId( $id ); if ( $user->getEditCount() !== $editCount ) { // Race condition with multiple simultaneous requests, skip + LoggerFactory::getInstance( 'Echo' )->debug( + 'thank-you-edit race condition detected: {user} (id: {id}) should ' . + 'have had {expectedCount} edits but has {actualCount}', + array( + 'user' => $user->getName(), + 'id' => $user->getId(), + 'expectedCount' => $editCount, + 'actualCount' => $user->getEditCount(), + ) + ); return; } LoggerFactory::getInstance( 'Echo' )->debug( -- To view, visit https://gerrit.wikimedia.org/r/275910 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1f284bd13e89fe2205c4c87a6c0f4a7dfe1c8bd1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: wmf/1.27.0-wmf.16 Gerrit-Owner: Catrope Gerrit-Reviewer: Catrope Gerrit-Reviewer: MaxSem 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 one currency selector edge case - change (mediawiki...DonationInterface)
jenkins-bot has submitted this change and it was merged. Change subject: Fix one currency selector edge case .. Fix one currency selector edge case When no currency is given and only one is supported, show the static text because we're hiding the dropdown. Change-Id: I9738bf8309d0353ee58532a3aadda99ad309dfe6 --- M gateway_forms/Mustache.php 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Cdentinger: Looks good to me, approved jenkins-bot: Verified diff --git a/gateway_forms/Mustache.php b/gateway_forms/Mustache.php index 1ea1f91..3bd08f4 100644 --- a/gateway_forms/Mustache.php +++ b/gateway_forms/Mustache.php @@ -152,6 +152,9 @@ $supportedCurrencies = $this->gateway->getCurrencies(); if ( count( $supportedCurrencies ) === 1 ) { $data['show_currency_selector'] = false; + // The select input will be hidden, but posting the form will use its only value + // Display the same currency code + $data['currency_code'] = $supportedCurrencies[0]; } else { $data['show_currency_selector'] = true; foreach( $this->gateway->getCurrencies() as $currency ) { -- To view, visit https://gerrit.wikimedia.org/r/275023 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9738bf8309d0353ee58532a3aadda99ad309dfe6 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/DonationInterface Gerrit-Branch: master Gerrit-Owner: Ejegg Gerrit-Reviewer: AndyRussG Gerrit-Reviewer: Awight Gerrit-Reviewer: Cdentinger Gerrit-Reviewer: Ssmith Gerrit-Reviewer: XenoRyet Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add debug logging for when the thank-you-edit code detects a... - change (mediawiki...Echo)
jenkins-bot has submitted this change and it was merged. Change subject: Add debug logging for when the thank-you-edit code detects a race condition .. Add debug logging for when the thank-you-edit code detects a race condition We seem to be discarding *all* thank-you-edit notifications as race conditions now. Bug: T128249 Change-Id: I1f284bd13e89fe2205c4c87a6c0f4a7dfe1c8bd1 (cherry picked from commit e85c3832bbf5f482f240c35e0f526211a37f9e6a) --- M Hooks.php 1 file changed, 10 insertions(+), 0 deletions(-) Approvals: MaxSem: Looks good to me, approved jenkins-bot: Verified diff --git a/Hooks.php b/Hooks.php index b326795..59ada97 100644 --- a/Hooks.php +++ b/Hooks.php @@ -467,6 +467,16 @@ $user = User::newFromId( $id ); if ( $user->getEditCount() !== $editCount ) { // Race condition with multiple simultaneous requests, skip + LoggerFactory::getInstance( 'Echo' )->debug( + 'thank-you-edit race condition detected: {user} (id: {id}) should ' . + 'have had {expectedCount} edits but has {actualCount}', + array( + 'user' => $user->getName(), + 'id' => $user->getId(), + 'expectedCount' => $editCount, + 'actualCount' => $user->getEditCount(), + ) + ); return; } LoggerFactory::getInstance( 'Echo' )->debug( -- To view, visit https://gerrit.wikimedia.org/r/275909 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1f284bd13e89fe2205c4c87a6c0f4a7dfe1c8bd1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: wmf/1.27.0-wmf.15 Gerrit-Owner: Catrope Gerrit-Reviewer: MaxSem 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 parser cache issues - change (mediawiki...MobileFrontend)
jenkins-bot has submitted this change and it was merged. Change subject: Fix parser cache issues .. Fix parser cache issues Mobile does not have a separate ParserOutput cache Thus transformations such as removing the table of contents and section collapsing have to occur later in the skin itself Bug: T128702 Bug: T124356 Change-Id: I2b2aa15bee73454b1abc238c3413d30cdaa49f2c (cherry picked from commit ab4c5c1bcc45d9c106e1df4f039a3c5fbfc480b6) --- M extension.json M includes/MobileFrontend.hooks.php 2 files changed, 22 insertions(+), 2 deletions(-) Approvals: MaxSem: Looks good to me, approved jenkins-bot: Verified diff --git a/extension.json b/extension.json index 7d611ae..c773cbf 100644 --- a/extension.json +++ b/extension.json @@ -1825,6 +1825,9 @@ "MediaWikiPerformAction": [ "MobileFrontendHooks::onMediaWikiPerformAction" ], + "OutputPageBeforeHTML": [ + "MobileFrontendHooks::onOutputPageBeforeHTML" + ], "SkinTemplateOutputPageBeforeExec": [ "MobileFrontendHooks::onSkinTemplateOutputPageBeforeExec" ], diff --git a/includes/MobileFrontend.hooks.php b/includes/MobileFrontend.hooks.php index b102f08..17c6e55 100644 --- a/includes/MobileFrontend.hooks.php +++ b/includes/MobileFrontend.hooks.php @@ -183,6 +183,25 @@ } /** +* OutputPageBeforeHTML hook handler +* @see https://www.mediawiki.org/wiki/Manual:Hooks/OutputPageBeforeHTML +* +* Applies MobileFormatter to mobile viewed content +* +* @param OutputPage $out +* @param string $text the HTML to be wrapped inside the #mw-content-text element +* @return bool +*/ + public static function onOutputPageBeforeHTML( &$out, &$text ) { + $context = MobileContext::singleton(); + // Perform a few extra changes if we are in mobile mode + if ( $context->shouldDisplayMobileView() ) { + $text = ExtMobileFrontend::DOMParse( $out, $text ); + } + return true; + } + + /** * BeforePageRedirect hook handler * @see https://www.mediawiki.org/wiki/Manual:Hooks/BeforePageRedirect * @@ -1246,8 +1265,6 @@ } } } - // Enable wrapped sections - $po->setText( ExtMobileFrontend::DOMParse( $outputPage, $po->getRawText(), $isBeta ) ); } return true; } -- To view, visit https://gerrit.wikimedia.org/r/276057 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2b2aa15bee73454b1abc238c3413d30cdaa49f2c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: wmf/1.27.0-wmf.16 Gerrit-Owner: Jdlrobson Gerrit-Reviewer: MaxSem Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add npm entry point - change (mediawiki...EmailCapture)
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/276066 Change subject: Add npm entry point .. Add npm entry point Change-Id: I80b0f620a0c2bbc8846b064c440de5b2db10f06f --- A Gruntfile.js A package.json 2 files changed, 31 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/EmailCapture refs/changes/66/276066/1 diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 000..7756e75 --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,20 @@ +/*jshint node:true */ +module.exports = function ( grunt ) { + grunt.loadNpmTasks( 'grunt-jsonlint' ); + grunt.loadNpmTasks( 'grunt-banana-checker' ); + + 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..41cecca --- /dev/null +++ b/package.json @@ -0,0 +1,11 @@ +{ + "scripts": { +"test": "grunt test" + }, + "devDependencies": { +"grunt": "0.4.5", +"grunt-cli": "0.1.13", +"grunt-banana-checker": "0.4.0", +"grunt-jsonlint": "1.0.7" + } +} -- To view, visit https://gerrit.wikimedia.org/r/276066 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I80b0f620a0c2bbc8846b064c440de5b2db10f06f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/EmailCapture Gerrit-Branch: master Gerrit-Owner: Paladox ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [EducationProgram] Add composer-test and move jshint to check: - change (integration/config)
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/276065 Change subject: [EducationProgram] Add composer-test and move jshint to check: .. [EducationProgram] Add composer-test and move jshint to check: Requires I9dd4f0e92bb944958476ac3e70879738abf45fbf Change-Id: Ida6174a605b0900a3e644b2419147d203112a217 --- M zuul/layout.yaml 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/65/276065/1 diff --git a/zuul/layout.yaml b/zuul/layout.yaml index a8c2792..eb991ef 100644 --- a/zuul/layout.yaml +++ b/zuul/layout.yaml @@ -2991,11 +2991,12 @@ - name: mediawiki/extensions/EducationProgram template: - - name: jshint + - name: composer-test - name: extension-unittests-generic - name: npm check: - jsonlint + - jshint - name: mediawiki/extensions/Elastica template: -- To view, visit https://gerrit.wikimedia.org/r/276065 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ida6174a605b0900a3e644b2419147d203112a217 Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Paladox ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] MediaWikiSite::newFromGlobalId() was removed - change (mediawiki/core)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/276064 Change subject: MediaWikiSite::newFromGlobalId() was removed .. MediaWikiSite::newFromGlobalId() was removed Deprecated since 1.21. No remaining uses in core or Gerrit extensions. Also checked repo operations/mediawiki-config; no results. Change-Id: I75108fe8d044e21b491b0bd498fc9ea953e33387 --- M RELEASE-NOTES-1.27 M includes/site/MediaWikiSite.php 2 files changed, 1 insertion(+), 14 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/64/276064/1 diff --git a/RELEASE-NOTES-1.27 b/RELEASE-NOTES-1.27 index 16dbd0a..7badb9c 100644 --- a/RELEASE-NOTES-1.27 +++ b/RELEASE-NOTES-1.27 @@ -235,6 +235,7 @@ * Language::getLanguageNames() was removed (deprecated since 1.20). * Language::getTranslatedLanguageNames() was removed (deprecated since 1.20). * Language::specialPage() was removed (deprecated since 1.24). +* MediaWikiSite::newFromGlobalId() was removed (deprecated since 1.21). * MediaWikiTestCase::assertException() was removed (deprecated since 1.22). * OutputPage::getHeadItems() was removed (deprecated since 1.24). * OutputPage::getScript() was removed (deprecated since 1.24). diff --git a/includes/site/MediaWikiSite.php b/includes/site/MediaWikiSite.php index 0f7e5d7..6734d5f 100644 --- a/includes/site/MediaWikiSite.php +++ b/includes/site/MediaWikiSite.php @@ -40,20 +40,6 @@ const PATH_PAGE = 'page_path'; /** -* @since 1.21 -* @deprecated since 1.21 Just use the constructor or the factory Site::newForType -* -* @param int $globalId -* -* @return MediaWikiSite -*/ - public static function newFromGlobalId( $globalId ) { - $site = new static(); - $site->setGlobalId( $globalId ); - return $site; - } - - /** * Constructor. * * @since 1.21 -- To view, visit https://gerrit.wikimedia.org/r/276064 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I75108fe8d044e21b491b0bd498fc9ea953e33387 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Siebrand ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix parser cache issues - change (mediawiki...MobileFrontend)
jenkins-bot has submitted this change and it was merged. Change subject: Fix parser cache issues .. Fix parser cache issues Mobile does not have a separate ParserOutput cache Thus transformations such as removing the table of contents and section collapsing have to occur later in the skin itself Bug: T128702 Bug: T124356 Change-Id: I2b2aa15bee73454b1abc238c3413d30cdaa49f2c --- M extension.json M includes/MobileFrontend.hooks.php 2 files changed, 23 insertions(+), 2 deletions(-) Approvals: MaxSem: Looks good to me, approved jenkins-bot: Verified diff --git a/extension.json b/extension.json index 7d66b9d..00ddc99 100644 --- a/extension.json +++ b/extension.json @@ -1815,6 +1815,9 @@ "MediaWikiPerformAction": [ "MobileFrontendHooks::onMediaWikiPerformAction" ], + "OutputPageBeforeHTML": [ + "MobileFrontendHooks::onOutputPageBeforeHTML" + ], "SkinTemplateOutputPageBeforeExec": [ "MobileFrontendHooks::onSkinTemplateOutputPageBeforeExec" ], diff --git a/includes/MobileFrontend.hooks.php b/includes/MobileFrontend.hooks.php index 7e72b4c..63e0dbd 100644 --- a/includes/MobileFrontend.hooks.php +++ b/includes/MobileFrontend.hooks.php @@ -183,6 +183,25 @@ } /** +* OutputPageBeforeHTML hook handler +* @see https://www.mediawiki.org/wiki/Manual:Hooks/OutputPageBeforeHTML +* +* Applies MobileFormatter to mobile viewed content +* +* @param OutputPage $out +* @param string $text the HTML to be wrapped inside the #mw-content-text element +* @return bool +*/ + public static function onOutputPageBeforeHTML( &$out, &$text ) { + $context = MobileContext::singleton(); + // Perform a few extra changes if we are in mobile mode + if ( $context->shouldDisplayMobileView() ) { + $text = ExtMobileFrontend::DOMParse( $out, $text ); + } + return true; + } + + /** * BeforePageRedirect hook handler * @see https://www.mediawiki.org/wiki/Manual:Hooks/BeforePageRedirect * @@ -1237,8 +1256,7 @@ } } } - // Enable wrapped sections - $po->setText( ExtMobileFrontend::DOMParse( $outputPage, $po->getText(), $isBeta ) ); + } return true; } -- To view, visit https://gerrit.wikimedia.org/r/276009 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2b2aa15bee73454b1abc238c3413d30cdaa49f2c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: wmf/1.27.0-wmf.15 Gerrit-Owner: Jdlrobson Gerrit-Reviewer: Jdlrobson Gerrit-Reviewer: MaxSem Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Enable async swift writes for remaining backends - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: Enable async swift writes for remaining backends .. Enable async swift writes for remaining backends Change-Id: Iddadc326539f5c0bc50857e45fc4527e84ca --- M wmf-config/filebackend-production.php 1 file changed, 6 insertions(+), 8 deletions(-) Approvals: Gilles: Looks good to me, but someone else must approve MaxSem: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/filebackend-production.php b/wmf-config/filebackend-production.php index 2a3349d..5fdc59e 100644 --- a/wmf-config/filebackend-production.php +++ b/wmf-config/filebackend-production.php @@ -92,12 +92,10 @@ 'wikiId' => "{$site}-{$lang}", 'lockManager' => 'redisLockManager', # DO NOT change the master backend unless it is fully trusted or autoRsync is off - 'backends'=> ( $wgDBname === 'commonswiki' ) - ? array( array( 'template' => 'local-swift-eqiad', 'isMultiMaster' => true ) ) - : array( - array( 'template' => 'local-swift-eqiad', 'isMultiMaster' => true ), - array( 'template' => 'local-swift-codfw' ) - ), + 'backends'=> array( + array( 'template' => 'local-swift-eqiad', 'isMultiMaster' => true ), + array( 'template' => 'local-swift-codfw' ) + ), 'replication' => 'async', 'syncChecks' => ( 1 | 4 ), // (size & sha1) ); @@ -109,7 +107,7 @@ # DO NOT change the master backend unless it is fully trusted or autoRsync is off 'backends'=> array( array( 'template' => 'shared-swift-eqiad', 'isMultiMaster' => true ), - #array( 'template' => 'shared-swift-codfw' ), + array( 'template' => 'shared-swift-codfw' ), ), 'replication' => 'async', 'syncChecks' => ( 1 | 4 ), // (size & sha1) @@ -119,8 +117,8 @@ 'name'=> 'global-multiwrite', 'wikiId' => "global-data", 'lockManager' => 'redisLockManager', + # DO NOT change the master backend unless it is fully trusted or autoRsync is off 'backends'=> array( - # DO NOT change the master backend unless it is fully trusted or autoRsync is off array( 'template' => 'global-swift-eqiad', 'isMultiMaster' => true ), array( 'template' => 'global-swift-codfw' ), ), -- To view, visit https://gerrit.wikimedia.org/r/272922 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iddadc326539f5c0bc50857e45fc4527e84ca Gerrit-PatchSet: 2 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Aaron Schulz Gerrit-Reviewer: Filippo Giunchedi Gerrit-Reviewer: Florianschmidtwelzow Gerrit-Reviewer: Gilles Gerrit-Reviewer: MaxSem Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Skin::getUsableSkins() was removed - change (mediawiki/core)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/276063 Change subject: Skin::getUsableSkins() was removed .. Skin::getUsableSkins() was removed Deprecated since 1.23. The remaining use in extension ThemeDesigner was replaced. Change-Id: I36b6c1e1d95036d40a01395f86a01906e8c50a76 --- M RELEASE-NOTES-1.27 M includes/skins/Skin.php 2 files changed, 1 insertion(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/63/276063/1 diff --git a/RELEASE-NOTES-1.27 b/RELEASE-NOTES-1.27 index 363a6f3..16dbd0a 100644 --- a/RELEASE-NOTES-1.27 +++ b/RELEASE-NOTES-1.27 @@ -242,6 +242,7 @@ * OutputPage::setAllowedModules() was removed (deprecated since 1.24). * Skin::commonPrintStylesheet() was removed (deprecated since 1.22). * Skin::getCommonStylePath() was removed (deprecated since 1.24). +* Skin::getUsableSkins() was removed (deprecated since 1.23). * Skin::newFromKey() was removed (deprecated since 1.24). * UserrightsPage::makeGroupNameListForLog() was removed (deprecated since 1.21). diff --git a/includes/skins/Skin.php b/includes/skins/Skin.php index 5d7a959..6a4aa77 100644 --- a/includes/skins/Skin.php +++ b/includes/skins/Skin.php @@ -82,15 +82,6 @@ } /** -* @deprecated since 1.23, use getAllowedSkins -* @return string[] -*/ - public static function getUsableSkins() { - wfDeprecated( __METHOD__, '1.23' ); - return self::getAllowedSkins(); - } - - /** * Normalize a skin preference value to a form that can be loaded. * * If a skin can't be found, it will fall back to the configured default ($wgDefaultSkin), or the -- To view, visit https://gerrit.wikimedia.org/r/276063 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I36b6c1e1d95036d40a01395f86a01906e8c50a76 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Siebrand ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Revert "Defer onPersonalUrls() DB writes to post-send" - change (mediawiki...Echo)
Catrope has uploaded a new change for review. https://gerrit.wikimedia.org/r/276062 Change subject: Revert "Defer onPersonalUrls() DB writes to post-send" .. Revert "Defer onPersonalUrls() DB writes to post-send" Causes fatals in production for some reason. This reverts commit 93387806c2674bb678d970a7748f9c225150830b. Bug: T129299 Change-Id: Ie90aa493e2940fae9d6f380b95f87a4cc7e04622 (cherry picked from commit e372f3ce6f3b7be3bf6b926feb1c93b55ef6c72e) --- M Hooks.php M includes/mapper/TargetPageMapper.php M includes/model/TargetPage.php 3 files changed, 13 insertions(+), 51 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo refs/changes/62/276062/1 diff --git a/Hooks.php b/Hooks.php index 7d51ae3..b326795 100644 --- a/Hooks.php +++ b/Hooks.php @@ -724,40 +724,24 @@ return true; } - // Attempt to mark a notification as read when visiting a page - // @todo should this really be here? - $subtractAlerts = 0; - $subtractMessages = 0; + // Attempt to mark a notification as read when visiting a page, + // ideally this should be deferred to end of request and update + // the notification count accordingly + // @Fixme - Find a better place to put this code if ( $title->getArticleID() ) { $mapper = new EchoTargetPageMapper(); $targetPages = $mapper->fetchByUserPageId( $user, $title->getArticleID() ); if ( $targetPages ) { - $eventIds = array(); - $attribManager = EchoAttributeManager::newFromGlobalVars(); - /* @var EchoTargetPage $targetPage */ - foreach ( $targetPages as $id => $targetPage ) { - $section = $attribManager->getNotificationSection( - $targetPage->getEventType() - ); - if ( $section === EchoAttributeManager::MESSAGE ) { - $subtractMessages += 1; - } else { - // ALERT - $subtractAlerts += 1; - } - $eventIds[] = $id; - } - DeferredUpdates::addCallableUpdate( function () use ( $user, $eventIds ) { - $notifUser = MWEchoNotifUser::newFromUser( $user ); - $notifUser->markRead( $eventIds ); - } ); + $eventIds = array_keys( $targetPages ); + $notifUser = MWEchoNotifUser::newFromUser( $user ); + $notifUser->markRead( $eventIds ); } } // Add a "My notifications" item to personal URLs $notifUser = MWEchoNotifUser::newFromUser( $user ); - $msgCount = $notifUser->getMessageCount() - $subtractMessages; - $alertCount = $notifUser->getAlertCount() - $subtractAlerts; + $msgCount = $notifUser->getMessageCount(); + $alertCount = $notifUser->getAlertCount(); $msgNotificationTimestamp = $notifUser->getLastUnreadMessageTime(); $alertNotificationTimestamp = $notifUser->getLastUnreadAlertTime(); diff --git a/includes/mapper/TargetPageMapper.php b/includes/mapper/TargetPageMapper.php index 7cdfde9..f34803a 100644 --- a/includes/mapper/TargetPageMapper.php +++ b/includes/mapper/TargetPageMapper.php @@ -28,15 +28,13 @@ $dbr = $this->dbFactory->getEchoDb( DB_SLAVE ); $res = $dbr->select( - array( 'echo_target_page', 'echo_event' ), - array_merge( self::$fields, array( 'event_type' ) ), + array( 'echo_target_page' ), + self::$fields, array( 'etp_user' => $user->getId(), 'etp_page' => $pageId ), - __METHOD__, - array(), - array( 'echo_event' => array( 'JOIN', 'etp_event=event_id' ) ) + __METHOD__ ); if ( $res ) { $targetPages = array(); diff --git a/includes/model/TargetPage.php b/includes/model/TargetPage.php index c678947..dbdc414 100644 --- a/includes/model/TargetPage
[MediaWiki-commits] [Gerrit] Stop pushing ES updates to nobelium - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: Stop pushing ES updates to nobelium .. Stop pushing ES updates to nobelium We've completed our testing to measure the ability of elasticsearch to keep up with indexing volume on spinning disks. The results are not amazing, but it gave us the info we needed. Turn off writes to open up nobelium's IO for use measuring querying indices which don't fit in memory rather than write performance. Change-Id: I38308fc68e58486b98ccc82361eadb57943552c0 --- M tests/cirrusTest.php M wmf-config/InitialiseSettings.php 2 files changed, 3 insertions(+), 11 deletions(-) Approvals: MaxSem: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/cirrusTest.php b/tests/cirrusTest.php index 4253976..ae40f7c 100644 --- a/tests/cirrusTest.php +++ b/tests/cirrusTest.php @@ -13,8 +13,8 @@ $this->assertEquals( 'unittest', $config['wgCirrusSearchDefaultCluster'] ); $this->assertCount( 3, $config['wgCirrusSearchClusters'] ); - // testwiki writes to eqiad, codfw and the lab replica - $this->assertCount( 3, $config['wgCirrusSearchWriteClusters'] ); + // testwiki writes to eqiad and codfw + $this->assertCount( 2, $config['wgCirrusSearchWriteClusters'] ); foreach ( $config['wgCirrusSearchWriteClusters'] as $writeCluster ) { $this->assertArrayHasKey( @@ -40,7 +40,7 @@ $this->assertArrayHasKey( $cluster, $config['wgCirrusSearchClientSideConnectTimeout'] ); } - $this->assertCount( 3, $config['wgCirrusSearchWriteClusters'] ); + $this->assertCount( 2, $config['wgCirrusSearchWriteClusters'] ); foreach ( $config['wgCirrusSearchWriteClusters'] as $cluster ) { $this->assertArrayHasKey( $cluster, diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 6ec2b40..95c7073 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -15892,14 +15892,6 @@ 'wmgCirrusSearchWriteClusters' => array( 'default' => array( 'eqiad', 'codfw' ), - 'enwiki' => array( 'eqiad', 'codfw', 'labsearch' ), - 'dewiki' => array( 'eqiad', 'codfw', 'labsearch' ), - 'wikidatawiki' => array( 'eqiad', 'codfw', 'labsearch' ), - 'commonswiki' => array( 'eqiad', 'codfw', 'labsearch' ), - 'nlwiki' => array( 'eqiad', 'codfw', 'labsearch' ), - 'frwiki' => array( 'eqiad', 'codfw', 'labsearch' ), - 'eswiki' => array( 'eqiad', 'codfw', 'labsearch' ), - 'testwiki' => array( 'eqiad', 'codfw', 'labsearch' ) ), 'wmgCirrusPerUserPoolCounter' => array( -- To view, visit https://gerrit.wikimedia.org/r/275858 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I38308fc68e58486b98ccc82361eadb57943552c0 Gerrit-PatchSet: 2 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: EBernhardson Gerrit-Reviewer: Florianschmidtwelzow Gerrit-Reviewer: MaxSem Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Skin::newFromKey() was removed - change (mediawiki/core)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/276060 Change subject: Skin::newFromKey() was removed .. Skin::newFromKey() was removed Deprecated since 1.24. No uses in core or Gerrit extensions remaining. Change-Id: If5d18ec56a066ea3ab28503b1bf5a84a8588ba5a --- M RELEASE-NOTES-1.27 M includes/skins/Skin.php 2 files changed, 1 insertion(+), 17 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/60/276060/1 diff --git a/RELEASE-NOTES-1.27 b/RELEASE-NOTES-1.27 index c79eb10..363a6f3 100644 --- a/RELEASE-NOTES-1.27 +++ b/RELEASE-NOTES-1.27 @@ -242,6 +242,7 @@ * OutputPage::setAllowedModules() was removed (deprecated since 1.24). * Skin::commonPrintStylesheet() was removed (deprecated since 1.22). * Skin::getCommonStylePath() was removed (deprecated since 1.24). +* Skin::newFromKey() was removed (deprecated since 1.24). * UserrightsPage::makeGroupNameListForLog() was removed (deprecated since 1.21). === Languages updated in 1.27 === diff --git a/includes/skins/Skin.php b/includes/skins/Skin.php index 3adcc7e..5d7a959 100644 --- a/includes/skins/Skin.php +++ b/includes/skins/Skin.php @@ -141,23 +141,6 @@ } /** -* Factory method for loading a skin of a given type -* @param string $key 'monobook', 'vector', etc. -* @return Skin -* @deprecated since 1.24; Use SkinFactory instead -*/ - static function &newFromKey( $key ) { - wfDeprecated( __METHOD__, '1.24' ); - - $key = Skin::normalizeKey( $key ); - $factory = SkinFactory::getDefaultInstance(); - - // normalizeKey() guarantees that a skin with this key will exist. - $skin = $factory->makeSkin( $key ); - return $skin; - } - - /** * @return string Skin name */ public function getSkinName() { -- To view, visit https://gerrit.wikimedia.org/r/276060 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If5d18ec56a066ea3ab28503b1bf5a84a8588ba5a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Siebrand ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add AntiSpoofAddConflicts hook - change (mediawiki...AntiSpoof)
FunPika has uploaded a new change for review. https://gerrit.wikimedia.org/r/276061 Change subject: Add AntiSpoofAddConflicts hook .. Add AntiSpoofAddConflicts hook This is intended to reduce code duplication in CentralAuth's AntiSpoof by allowing it to add conflicts to the array returned by SpoofUser:getConflicts rather than run a copy of AntiSpoofHooks::asAbortNewAccountHook. Once the hook is implemented in CentralAuth, it should allow global conflicts to be detected anywhere in AntiSpoof, including the API module. Bug: T126174 Change-Id: I5372be6aa1160f390ae5c50c841f41b8a597915e --- M SpoofUser.php A hooks.txt 2 files changed, 29 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AntiSpoof refs/changes/61/276061/1 diff --git a/SpoofUser.php b/SpoofUser.php index e39430d..ce833bc 100644 --- a/SpoofUser.php +++ b/SpoofUser.php @@ -57,11 +57,26 @@ } /** -* Does the username pass Unicode legality and script-mixing checks? +* Find conflicting usernames locally and from extensions. * * @return array empty if no conflict, or array containing conflicting usernames */ public function getConflicts() { + $spoofs = array(); + $this->spoofedUsers( $spoofs ); + + Hooks::run( 'AntiSpoofAddConflicts', array( &$spoofs, $this->mName ) ); + array_unique( $spoofs ); // Ensure that extensions don't add duplicate spoofs. + + return $spoofs; + } + + /** +* Populate the array from getConflicts() with conflicting usernames. +* +* @param array $spoofs +*/ + public function spoofedUsers( &$spoofs ) { $dbr = $this->getDBSlave(); // Join against the user table to ensure that we skip stray @@ -78,11 +93,9 @@ 'LIMIT' => 5 ) ); - $spoofs = array(); foreach ( $spoofedUsers as $row ) { array_push( $spoofs, $row->su_name ); } - return $spoofs; } /** diff --git a/hooks.txt b/hooks.txt new file mode 100644 index 000..9df6eb7 --- /dev/null +++ b/hooks.txt @@ -0,0 +1,13 @@ +This document describes how event hooks work in the AntiSpoof extension. + +For a more comprehensive guide to hooks, navigate to your root MediaWiki +directory and read docs/hooks.txt. + +== Events and parameters == +This is a list of known events and parameters; please add to it if you're going +to add events to the AntiSpoof extension. + +'AntiSpoofAddConflicts': Allows adding to the array of conflicts returned by +SpoofUser::getConflicts. +&$spoofs: Array of spoofed usernames +$name: Username to check -- To view, visit https://gerrit.wikimedia.org/r/276061 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5372be6aa1160f390ae5c50c841f41b8a597915e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/AntiSpoof Gerrit-Branch: master Gerrit-Owner: FunPika ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Revert "Defer onPersonalUrls() DB writes to post-send" - change (mediawiki...Echo)
jenkins-bot has submitted this change and it was merged. Change subject: Revert "Defer onPersonalUrls() DB writes to post-send" .. Revert "Defer onPersonalUrls() DB writes to post-send" Causes fatals in production for some reason. This reverts commit 93387806c2674bb678d970a7748f9c225150830b. Bug: T129299 Change-Id: Ie90aa493e2940fae9d6f380b95f87a4cc7e04622 --- M Hooks.php M includes/mapper/TargetPageMapper.php M includes/model/TargetPage.php 3 files changed, 13 insertions(+), 51 deletions(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/Hooks.php b/Hooks.php index 7d51ae3..b326795 100644 --- a/Hooks.php +++ b/Hooks.php @@ -724,40 +724,24 @@ return true; } - // Attempt to mark a notification as read when visiting a page - // @todo should this really be here? - $subtractAlerts = 0; - $subtractMessages = 0; + // Attempt to mark a notification as read when visiting a page, + // ideally this should be deferred to end of request and update + // the notification count accordingly + // @Fixme - Find a better place to put this code if ( $title->getArticleID() ) { $mapper = new EchoTargetPageMapper(); $targetPages = $mapper->fetchByUserPageId( $user, $title->getArticleID() ); if ( $targetPages ) { - $eventIds = array(); - $attribManager = EchoAttributeManager::newFromGlobalVars(); - /* @var EchoTargetPage $targetPage */ - foreach ( $targetPages as $id => $targetPage ) { - $section = $attribManager->getNotificationSection( - $targetPage->getEventType() - ); - if ( $section === EchoAttributeManager::MESSAGE ) { - $subtractMessages += 1; - } else { - // ALERT - $subtractAlerts += 1; - } - $eventIds[] = $id; - } - DeferredUpdates::addCallableUpdate( function () use ( $user, $eventIds ) { - $notifUser = MWEchoNotifUser::newFromUser( $user ); - $notifUser->markRead( $eventIds ); - } ); + $eventIds = array_keys( $targetPages ); + $notifUser = MWEchoNotifUser::newFromUser( $user ); + $notifUser->markRead( $eventIds ); } } // Add a "My notifications" item to personal URLs $notifUser = MWEchoNotifUser::newFromUser( $user ); - $msgCount = $notifUser->getMessageCount() - $subtractMessages; - $alertCount = $notifUser->getAlertCount() - $subtractAlerts; + $msgCount = $notifUser->getMessageCount(); + $alertCount = $notifUser->getAlertCount(); $msgNotificationTimestamp = $notifUser->getLastUnreadMessageTime(); $alertNotificationTimestamp = $notifUser->getLastUnreadAlertTime(); diff --git a/includes/mapper/TargetPageMapper.php b/includes/mapper/TargetPageMapper.php index 7cdfde9..f34803a 100644 --- a/includes/mapper/TargetPageMapper.php +++ b/includes/mapper/TargetPageMapper.php @@ -28,15 +28,13 @@ $dbr = $this->dbFactory->getEchoDb( DB_SLAVE ); $res = $dbr->select( - array( 'echo_target_page', 'echo_event' ), - array_merge( self::$fields, array( 'event_type' ) ), + array( 'echo_target_page' ), + self::$fields, array( 'etp_user' => $user->getId(), 'etp_page' => $pageId ), - __METHOD__, - array(), - array( 'echo_event' => array( 'JOIN', 'etp_event=event_id' ) ) + __METHOD__ ); if ( $res ) { $targetPages = array(); diff --git a/includes/model/TargetPage.php b/includes/model/TargetPage.php index d62437a..1d237d7 100644 --- a/includes/model/TargetPage.php +++ b/includes/model/TargetPage.php @@ -33,11 +33,6 @@ protected $eventId; /** -* @var st
[MediaWiki-commits] [Gerrit] Replace deprecated Skin::getUsableSkins() - change (mediawiki...ThemeDesigner)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/276059 Change subject: Replace deprecated Skin::getUsableSkins() .. Replace deprecated Skin::getUsableSkins() Deprecated since 1.23 Change-Id: Ifa71c596609c2cf85bebe3614635b5efcff665bd --- M frame/layout.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ThemeDesigner refs/changes/59/276059/1 diff --git a/frame/layout.php b/frame/layout.php index eee9b59..d608082 100644 --- a/frame/layout.php +++ b/frame/layout.php @@ -10,7 +10,7 @@ msg('themedesigner-interface-skinlabel')->escaped() ?> &$skinname ) { $skinMessage = $this->msg( "skinname-{$skinkey}" ); if ( !$skinMessage->isDisabled() ) { -- To view, visit https://gerrit.wikimedia.org/r/276059 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifa71c596609c2cf85bebe3614635b5efcff665bd Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ThemeDesigner Gerrit-Branch: master Gerrit-Owner: Siebrand ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Modify wgImportSources for plwikisource - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: Modify wgImportSources for plwikisource .. Modify wgImportSources for plwikisource This patch adds several other language versions as import sources for the Polish Wikisource as requested by the community. Bug: T129015 Change-Id: Ib3ec1787f52129d31e36d76745bad5fc7d231bc2 --- M wmf-config/InitialiseSettings.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: MaxSem: Looks good to me, approved Luke081515: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 4f54353..db0c03d 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -10365,7 +10365,7 @@ 'ptwikisource' => array( 'w', 'b' ), 'plwiki' => array( 's', 'b', 'q', 'n', 'wikt' ), // T10546, T22996, T23506 'plwikibooks' => array( 'w', 's' ), # bugĀ 8546 - 'plwikisource' => array( 'w', 'b', 'q', 'n', 'wikt', 'oldwikisource' ), + 'plwikisource' => array( 'w', 'b', 'q', 'n', 'wikt', 'mul', 'de', 'en', 'es', 'fr', 'it', 'pt', 'sv' ), // T129015 'plwiktionary' => array( 'w' ), // T12374 'pntwiki' => array( 'en', 'el', 'elwikiversity', 'incubator' ), 'ptwikibooks' => array( 'w', 'wikt', 's', 'q', 'n', 'v', 'en', 'es', 'fr', 'it', 'de', 'ru', 'w:en' ), // T22552 -- To view, visit https://gerrit.wikimedia.org/r/275275 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib3ec1787f52129d31e36d76745bad5fc7d231bc2 Gerrit-PatchSet: 2 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Odder Gerrit-Reviewer: Florianschmidtwelzow Gerrit-Reviewer: Luke081515 Gerrit-Reviewer: MaxSem Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Skin::getCommonStylePath() was removed - change (mediawiki/core)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/276058 Change subject: Skin::getCommonStylePath() was removed .. Skin::getCommonStylePath() was removed Deprecated since 1.24. No uses in core or Gerrit extensions remaining. Change-Id: I15629292f00b6d2493f7a329670d85c76da50db9 --- M RELEASE-NOTES-1.27 M includes/skins/Skin.php 2 files changed, 1 insertion(+), 15 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/58/276058/1 diff --git a/RELEASE-NOTES-1.27 b/RELEASE-NOTES-1.27 index c816ce1..c79eb10 100644 --- a/RELEASE-NOTES-1.27 +++ b/RELEASE-NOTES-1.27 @@ -241,6 +241,7 @@ * OutputPage::out() was removed (deprecated since 1.22). * OutputPage::setAllowedModules() was removed (deprecated since 1.24). * Skin::commonPrintStylesheet() was removed (deprecated since 1.22). +* Skin::getCommonStylePath() was removed (deprecated since 1.24). * UserrightsPage::makeGroupNameListForLog() was removed (deprecated since 1.21). === Languages updated in 1.27 === diff --git a/includes/skins/Skin.php b/includes/skins/Skin.php index 232c0c9..3adcc7e 100644 --- a/includes/skins/Skin.php +++ b/includes/skins/Skin.php @@ -1023,21 +1023,6 @@ } /** -* This function previously returned a fully resolved style path URL to images or styles stored in -* the legacy skins/common/ directory. -* -* That directory has been removed in 1.24 and the function always returns an empty string. -* -* @deprecated since 1.24 -* @param string $name The name or path of a skin resource file -* @return string Empty string -*/ - function getCommonStylePath( $name ) { - wfDeprecated( __METHOD__, '1.24' ); - return ''; - } - - /** * Return a fully resolved style path url to images or styles stored in the current skins's folder. * This method returns a url resolved using the configured skin style path * and includes the style version inside of the url. -- To view, visit https://gerrit.wikimedia.org/r/276058 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I15629292f00b6d2493f7a329670d85c76da50db9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Siebrand ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix parser cache issues - change (mediawiki...MobileFrontend)
Jdlrobson has uploaded a new change for review. https://gerrit.wikimedia.org/r/276057 Change subject: Fix parser cache issues .. Fix parser cache issues Mobile does not have a separate ParserOutput cache Thus transformations such as removing the table of contents and section collapsing have to occur later in the skin itself Bug: T128702 Bug: T124356 Change-Id: I2b2aa15bee73454b1abc238c3413d30cdaa49f2c (cherry picked from commit ab4c5c1bcc45d9c106e1df4f039a3c5fbfc480b6) --- M extension.json M includes/MobileFrontend.hooks.php 2 files changed, 22 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/57/276057/1 diff --git a/extension.json b/extension.json index 7d611ae..c773cbf 100644 --- a/extension.json +++ b/extension.json @@ -1825,6 +1825,9 @@ "MediaWikiPerformAction": [ "MobileFrontendHooks::onMediaWikiPerformAction" ], + "OutputPageBeforeHTML": [ + "MobileFrontendHooks::onOutputPageBeforeHTML" + ], "SkinTemplateOutputPageBeforeExec": [ "MobileFrontendHooks::onSkinTemplateOutputPageBeforeExec" ], diff --git a/includes/MobileFrontend.hooks.php b/includes/MobileFrontend.hooks.php index b102f08..17c6e55 100644 --- a/includes/MobileFrontend.hooks.php +++ b/includes/MobileFrontend.hooks.php @@ -183,6 +183,25 @@ } /** +* OutputPageBeforeHTML hook handler +* @see https://www.mediawiki.org/wiki/Manual:Hooks/OutputPageBeforeHTML +* +* Applies MobileFormatter to mobile viewed content +* +* @param OutputPage $out +* @param string $text the HTML to be wrapped inside the #mw-content-text element +* @return bool +*/ + public static function onOutputPageBeforeHTML( &$out, &$text ) { + $context = MobileContext::singleton(); + // Perform a few extra changes if we are in mobile mode + if ( $context->shouldDisplayMobileView() ) { + $text = ExtMobileFrontend::DOMParse( $out, $text ); + } + return true; + } + + /** * BeforePageRedirect hook handler * @see https://www.mediawiki.org/wiki/Manual:Hooks/BeforePageRedirect * @@ -1246,8 +1265,6 @@ } } } - // Enable wrapped sections - $po->setText( ExtMobileFrontend::DOMParse( $outputPage, $po->getRawText(), $isBeta ) ); } return true; } -- To view, visit https://gerrit.wikimedia.org/r/276057 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2b2aa15bee73454b1abc238c3413d30cdaa49f2c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: wmf/1.27.0-wmf.16 Gerrit-Owner: Jdlrobson ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Skin::commonPrintStylesheet() was removed - change (mediawiki/core)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/276055 Change subject: Skin::commonPrintStylesheet() was removed .. Skin::commonPrintStylesheet() was removed Deprecated since 1.22. Removed from only use in Gerrit extension ThemeDesigner. Change-Id: Ib6d72eff90f4ffef69274db364157b416455f17d --- M RELEASE-NOTES-1.27 M includes/skins/Skin.php 2 files changed, 1 insertion(+), 16 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/55/276055/1 diff --git a/RELEASE-NOTES-1.27 b/RELEASE-NOTES-1.27 index 9da54d2..c816ce1 100644 --- a/RELEASE-NOTES-1.27 +++ b/RELEASE-NOTES-1.27 @@ -240,6 +240,7 @@ * OutputPage::getScript() was removed (deprecated since 1.24). * OutputPage::out() was removed (deprecated since 1.22). * OutputPage::setAllowedModules() was removed (deprecated since 1.24). +* Skin::commonPrintStylesheet() was removed (deprecated since 1.22). * UserrightsPage::makeGroupNameListForLog() was removed (deprecated since 1.21). === Languages updated in 1.27 === diff --git a/includes/skins/Skin.php b/includes/skins/Skin.php index b80788b..232c0c9 100644 --- a/includes/skins/Skin.php +++ b/includes/skins/Skin.php @@ -1358,22 +1358,6 @@ } /** -* This function previously controlled whether the 'mediawiki.legacy.wikiprintable' module -* should be loaded by OutputPage. That module no longer exists and the return value of this -* method is ignored. -* -* If your skin doesn't provide its own print styles, the 'mediawiki.legacy.commonPrint' module -* can be used instead (SkinTemplate-based skins do it automatically). -* -* @deprecated since 1.22 -* @return bool -*/ - public function commonPrintStylesheet() { - wfDeprecated( __METHOD__, '1.22' ); - return false; - } - - /** * Gets new talk page messages for the current user and returns an * appropriate alert message (or an empty string if there are no messages) * @return string -- To view, visit https://gerrit.wikimedia.org/r/276055 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib6d72eff90f4ffef69274db364157b416455f17d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Siebrand ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] OutputPage: Set wgPageContentLanguage to pageViewLang instea... - change (mediawiki/core)
Krinkle has uploaded a new change for review. https://gerrit.wikimedia.org/r/276056 Change subject: OutputPage: Set wgPageContentLanguage to pageViewLang instead of pageLang .. OutputPage: Set wgPageContentLanguage to pageViewLang instead of pageLang Follows-up 80a090ea7. I'm assuming the difference is that pageLanguage will be the canonical variant for the page (as authored in wikitext, presumably the wiki's default), whereas pageViewLanguage will be the variant of the pageLanguage based on the current user-interface language (if and only if the user interface is related). Viewing zh by default has: * userLanguage: zh * pageLanguage: zh * pageViewLanuage: zh Viewing zh-cn by default has: * userLanguage: zh * pageLanguage: zh * pageViewLanuage: zh-cn Viewing zh-cn with uselang=en has: * userLanguage: en * pageLanguage: zh * pageViewLanuage: zh-cn Viewing zh-cn with uselang=zn-tw has: * userLanguage: zn-tw * pageLanguage: zh * pageViewLanuage: zh-cn The main use case behind wgPageContentLanguage in 80a090ea7 was tablesorter which should match the language and variant of the rendered wikipage content. The parser output and div#mw-content-text element use pageViewLanguage, so let's set wgPageContentLanguage to that as well. Change-Id: Ibf399dfe5ca60fb55e7acd75a5c0238d8b903807 --- M includes/OutputPage.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/56/276056/1 diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 11c23f0..e36d83f 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -3218,7 +3218,7 @@ $articleId = $wikiPage->getId(); } - $lang = $title->getPageLanguage(); + $lang = $title->getPageViewLanguage(); // Pre-process information $separatorTransTable = $lang->separatorTransformTable(); -- To view, visit https://gerrit.wikimedia.org/r/276056 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibf399dfe5ca60fb55e7acd75a5c0238d8b903807 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Krinkle ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove deprecated override of Skin::commonPrintStylesheet() - change (mediawiki...ThemeDesigner)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/276054 Change subject: Remove deprecated override of Skin::commonPrintStylesheet() .. Remove deprecated override of Skin::commonPrintStylesheet() Removed from core in 1.27. Change-Id: I471eaa628f357488a4c3da569ddfd70119270f92 --- M SpecialThemeDesigner.php 1 file changed, 16 insertions(+), 20 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ThemeDesigner refs/changes/54/276054/1 diff --git a/SpecialThemeDesigner.php b/SpecialThemeDesigner.php index 61c823e..621ef9f 100644 --- a/SpecialThemeDesigner.php +++ b/SpecialThemeDesigner.php @@ -11,32 +11,28 @@ } class ThemeDesignerDummySkin extends Skin { - + function __construct() { parent::__construct(); $this->setMembers(); } - - function commonPrintStylesheet() { - return false; - } - + function setupUserCss( OutputPage $out ) { - + foreach ( $out->getExtStyle() as $url ) { $out->addStyle( $url ); } - + } - + } class SpecialThemeDesigner extends SpecialPage { - + public function __construct() { parent::__construct( 'ThemeDesigner' ); } - + /** * Show the special page * @@ -44,15 +40,15 @@ */ public function execute( $par ) { global $wgOut, $wgExtensionAssetsPath; - + $this->mSkin = new ThemeDesignerDummySkin; - + $this->setHeaders(); - + if ( function_exists("OutputPage::includeJQuery") ) { $wgOut->includeJQuery(); } - + $wgOut->addExtensionStyle("$wgExtensionAssetsPath/ThemeDesigner/frame/style/main.css"); // Yes, the following is ugly... though I still haven't decided if I want to become completely ResourceLoader dependant // While 1.16 is still stable. @@ -63,20 +59,20 @@ $varScript = 'var '.implode(", ", $varScript).';'; $wgOut->addInlineScript($varScript); $wgOut->addScriptFile("$wgExtensionAssetsPath/ThemeDesigner/frame/designer.js"); - + echo $wgOut->headElement( $this->mSkin ); $wgOut->sendCacheControl(); $wgOut->disable(); - + // We've collected our html building into a separate file for readability require(dirname(__FILE__).'/frame/layout.php'); - + echo $this->mSkin->bottomScripts( $wgOut ); echo Html::closeElement('body'); echo Html::closeElement('html'); - + } - + protected function getGroupName() { return 'wiki'; } -- To view, visit https://gerrit.wikimedia.org/r/276054 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I471eaa628f357488a4c3da569ddfd70119270f92 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ThemeDesigner Gerrit-Branch: master Gerrit-Owner: Siebrand ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Revert "Defer onPersonalUrls() DB writes to post-send" - change (mediawiki...Echo)
Catrope has uploaded a new change for review. https://gerrit.wikimedia.org/r/276053 Change subject: Revert "Defer onPersonalUrls() DB writes to post-send" .. Revert "Defer onPersonalUrls() DB writes to post-send" This reverts commit 93387806c2674bb678d970a7748f9c225150830b. Change-Id: Ie90aa493e2940fae9d6f380b95f87a4cc7e04622 --- M Hooks.php M includes/mapper/TargetPageMapper.php M includes/model/TargetPage.php 3 files changed, 13 insertions(+), 51 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo refs/changes/53/276053/1 diff --git a/Hooks.php b/Hooks.php index 7d51ae3..b326795 100644 --- a/Hooks.php +++ b/Hooks.php @@ -724,40 +724,24 @@ return true; } - // Attempt to mark a notification as read when visiting a page - // @todo should this really be here? - $subtractAlerts = 0; - $subtractMessages = 0; + // Attempt to mark a notification as read when visiting a page, + // ideally this should be deferred to end of request and update + // the notification count accordingly + // @Fixme - Find a better place to put this code if ( $title->getArticleID() ) { $mapper = new EchoTargetPageMapper(); $targetPages = $mapper->fetchByUserPageId( $user, $title->getArticleID() ); if ( $targetPages ) { - $eventIds = array(); - $attribManager = EchoAttributeManager::newFromGlobalVars(); - /* @var EchoTargetPage $targetPage */ - foreach ( $targetPages as $id => $targetPage ) { - $section = $attribManager->getNotificationSection( - $targetPage->getEventType() - ); - if ( $section === EchoAttributeManager::MESSAGE ) { - $subtractMessages += 1; - } else { - // ALERT - $subtractAlerts += 1; - } - $eventIds[] = $id; - } - DeferredUpdates::addCallableUpdate( function () use ( $user, $eventIds ) { - $notifUser = MWEchoNotifUser::newFromUser( $user ); - $notifUser->markRead( $eventIds ); - } ); + $eventIds = array_keys( $targetPages ); + $notifUser = MWEchoNotifUser::newFromUser( $user ); + $notifUser->markRead( $eventIds ); } } // Add a "My notifications" item to personal URLs $notifUser = MWEchoNotifUser::newFromUser( $user ); - $msgCount = $notifUser->getMessageCount() - $subtractMessages; - $alertCount = $notifUser->getAlertCount() - $subtractAlerts; + $msgCount = $notifUser->getMessageCount(); + $alertCount = $notifUser->getAlertCount(); $msgNotificationTimestamp = $notifUser->getLastUnreadMessageTime(); $alertNotificationTimestamp = $notifUser->getLastUnreadAlertTime(); diff --git a/includes/mapper/TargetPageMapper.php b/includes/mapper/TargetPageMapper.php index 7cdfde9..f34803a 100644 --- a/includes/mapper/TargetPageMapper.php +++ b/includes/mapper/TargetPageMapper.php @@ -28,15 +28,13 @@ $dbr = $this->dbFactory->getEchoDb( DB_SLAVE ); $res = $dbr->select( - array( 'echo_target_page', 'echo_event' ), - array_merge( self::$fields, array( 'event_type' ) ), + array( 'echo_target_page' ), + self::$fields, array( 'etp_user' => $user->getId(), 'etp_page' => $pageId ), - __METHOD__, - array(), - array( 'echo_event' => array( 'JOIN', 'etp_event=event_id' ) ) + __METHOD__ ); if ( $res ) { $targetPages = array(); diff --git a/includes/model/TargetPage.php b/includes/model/TargetPage.php index d62437a..1d237d7 100644 --- a/includes/model/TargetPage.php +++ b/includes/model/TargetPage.php @@ -33,11 +33,6 @@ protected $eventId; /** -* @var string -
[MediaWiki-commits] [Gerrit] WIP: Add Grade C browser support - change (mediawiki...MobileFrontend)
Jdlrobson has uploaded a new change for review. https://gerrit.wikimedia.org/r/276052 Change subject: WIP: Add Grade C browser support .. WIP: Add Grade C browser support Placeholders are instantly shown to grade-c browsers to avoid jumpy content but are hidden to real no-javascript browsers A script tag is added to the bottom of the page. For some reason window.NORLQ method is not working. More investigation needed. Depends-On: I981e3f74dd577dc67eea6c3d49a67591d02b5f04 Change-Id: I5ca4b4eb63bdf02743b8ba95c59279735c240e46 --- M extension.json M includes/MobileFormatter.php M includes/MobileFrontend.hooks.php M includes/MobileFrontend.skin.hooks.php M resources/skins.minerva.base.styles/images.less 5 files changed, 43 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/52/276052/1 diff --git a/extension.json b/extension.json index 9301256..09eaef7 100644 --- a/extension.json +++ b/extension.json @@ -1822,6 +1822,9 @@ "OutputPageBeforeHTML": [ "MobileFrontendHooks::onOutputPageBeforeHTML" ], + "SkinAfterBottomScripts": [ + "MobileFrontendHooks::onSkinAfterBottomScripts" + ], "SkinTemplateOutputPageBeforeExec": [ "MobileFrontendHooks::onSkinTemplateOutputPageBeforeExec" ], diff --git a/includes/MobileFormatter.php b/includes/MobileFormatter.php index 1d42530..5aec81f 100644 --- a/includes/MobileFormatter.php +++ b/includes/MobileFormatter.php @@ -100,6 +100,30 @@ } /** +* Adds support for grade C images +*/ + public static function gradeCImageSupport() { + $js = <get( 'MFLazyLoadImages' ); + + $removeImages = $mfLazyLoadImages['base'] || + ( $context->isBetaGroupMember() && $mfLazyLoadImages['beta'] ); + if ( $removeImages ) { + $text .= MobileFormatter::gradeCImageSupport(); + } + return true; + } + /** * OutputPageBeforeHTML hook handler * @see https://www.mediawiki.org/wiki/Manual:Hooks/OutputPageBeforeHTML diff --git a/includes/MobileFrontend.skin.hooks.php b/includes/MobileFrontend.skin.hooks.php index 7df881e..126d02a 100644 --- a/includes/MobileFrontend.skin.hooks.php +++ b/includes/MobileFrontend.skin.hooks.php @@ -1,7 +1,6 @@ https://gerrit.wikimedia.org/r/276052 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5ca4b4eb63bdf02743b8ba95c59279735c240e46 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Jdlrobson ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] UserrightsPage::makeGroupNameListForLog() was removed - change (mediawiki/core)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/276051 Change subject: UserrightsPage::makeGroupNameListForLog() was removed .. UserrightsPage::makeGroupNameListForLog() was removed Deprecated since 1.21. Remaining use in core replaced. No uses in Gerrit extensions. Change-Id: If45eafca7ea332475eb864f04665d0a0bf1603d1 --- M RELEASE-NOTES-1.27 M includes/specials/SpecialUserrights.php 2 files changed, 1 insertion(+), 17 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/51/276051/1 diff --git a/RELEASE-NOTES-1.27 b/RELEASE-NOTES-1.27 index 9dfde84..9da54d2 100644 --- a/RELEASE-NOTES-1.27 +++ b/RELEASE-NOTES-1.27 @@ -240,6 +240,7 @@ * OutputPage::getScript() was removed (deprecated since 1.24). * OutputPage::out() was removed (deprecated since 1.22). * OutputPage::setAllowedModules() was removed (deprecated since 1.24). +* UserrightsPage::makeGroupNameListForLog() was removed (deprecated since 1.21). === Languages updated in 1.27 === diff --git a/includes/specials/SpecialUserrights.php b/includes/specials/SpecialUserrights.php index 29261f3..7901d37 100644 --- a/includes/specials/SpecialUserrights.php +++ b/includes/specials/SpecialUserrights.php @@ -426,23 +426,6 @@ } /** -* Make a list of group names to be stored as parameter for log entries -* -* @deprecated since 1.21; use LogFormatter instead. -* @param array $ids -* @return string -*/ - function makeGroupNameListForLog( $ids ) { - wfDeprecated( __METHOD__, '1.21' ); - - if ( empty( $ids ) ) { - return ''; - } else { - return $this->makeGroupNameList( $ids ); - } - } - - /** * Output a form to allow searching for a user */ function switchForm() { -- To view, visit https://gerrit.wikimedia.org/r/276051 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If45eafca7ea332475eb864f04665d0a0bf1603d1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Siebrand ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update DonationInterface submodule - change (mediawiki/core)
Ejegg has uploaded a new change for review. https://gerrit.wikimedia.org/r/276050 Change subject: Update DonationInterface submodule .. Update DonationInterface submodule Change-Id: I10c4b0dddfdb37dd04c389ba496f2be83bdfd560 --- M extensions/DonationInterface 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/50/276050/1 diff --git a/extensions/DonationInterface b/extensions/DonationInterface index 1a21bb1..da6e943 16 --- a/extensions/DonationInterface +++ b/extensions/DonationInterface -Subproject commit 1a21bb18a09dd871989f903b826472cbf24dbef3 +Subproject commit da6e94353a25120022e90b98bed7fcacb67fafea -- To view, visit https://gerrit.wikimedia.org/r/276050 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I10c4b0dddfdb37dd04c389ba496f2be83bdfd560 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: fundraising/REL1_25 Gerrit-Owner: Ejegg ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update DonationInterface submodule - change (mediawiki/core)
Ejegg has submitted this change and it was merged. Change subject: Update DonationInterface submodule .. Update DonationInterface submodule Change-Id: I10c4b0dddfdb37dd04c389ba496f2be83bdfd560 --- M extensions/DonationInterface 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Ejegg: Verified; Looks good to me, approved diff --git a/extensions/DonationInterface b/extensions/DonationInterface index 1a21bb1..da6e943 16 --- a/extensions/DonationInterface +++ b/extensions/DonationInterface -Subproject commit 1a21bb18a09dd871989f903b826472cbf24dbef3 +Subproject commit da6e94353a25120022e90b98bed7fcacb67fafea -- To view, visit https://gerrit.wikimedia.org/r/276050 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I10c4b0dddfdb37dd04c389ba496f2be83bdfd560 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: fundraising/REL1_25 Gerrit-Owner: Ejegg Gerrit-Reviewer: Ejegg ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Merge master into deployment - change (mediawiki...DonationInterface)
Ejegg has uploaded a new change for review. https://gerrit.wikimedia.org/r/276049 Change subject: Merge master into deployment .. Merge master into deployment 2305fe8 Add more Chile payment methods 0c3b323 Distingush debit cards with text under logo e3c5661 Ensure $results is defined before use 2f924ca Partial fix for busted check that a translation exists Change-Id: Ifeafb49296391e65841193d0ecaea530894a47a5 --- 0 files changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface refs/changes/49/276049/1 -- To view, visit https://gerrit.wikimedia.org/r/276049 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifeafb49296391e65841193d0ecaea530894a47a5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DonationInterface Gerrit-Branch: deployment Gerrit-Owner: Ejegg ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Merge master into deployment - change (mediawiki...DonationInterface)
Ejegg has submitted this change and it was merged. Change subject: Merge master into deployment .. Merge master into deployment 2305fe8 Add more Chile payment methods 0c3b323 Distingush debit cards with text under logo e3c5661 Ensure $results is defined before use 2f924ca Partial fix for busted check that a translation exists Change-Id: Ifeafb49296391e65841193d0ecaea530894a47a5 --- 0 files changed, 0 insertions(+), 0 deletions(-) Approvals: Ejegg: Verified; Looks good to me, approved -- To view, visit https://gerrit.wikimedia.org/r/276049 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifeafb49296391e65841193d0ecaea530894a47a5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DonationInterface Gerrit-Branch: deployment Gerrit-Owner: Ejegg Gerrit-Reviewer: Ejegg ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] MediaWikiTestCase::assertException() was removed - change (mediawiki/core)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/276048 Change subject: MediaWikiTestCase::assertException() was removed .. MediaWikiTestCase::assertException() was removed Deprecated since 1.22. No uses in core or Gerrit extensions remaining. Change-Id: Icae4077078c73d766d3c1c9e9e569922151296d9 --- M RELEASE-NOTES-1.27 M tests/phpunit/MediaWikiTestCase.php 2 files changed, 1 insertion(+), 27 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/48/276048/1 diff --git a/RELEASE-NOTES-1.27 b/RELEASE-NOTES-1.27 index 163c026..9dfde84 100644 --- a/RELEASE-NOTES-1.27 +++ b/RELEASE-NOTES-1.27 @@ -235,6 +235,7 @@ * Language::getLanguageNames() was removed (deprecated since 1.20). * Language::getTranslatedLanguageNames() was removed (deprecated since 1.20). * Language::specialPage() was removed (deprecated since 1.24). +* MediaWikiTestCase::assertException() was removed (deprecated since 1.22). * OutputPage::getHeadItems() was removed (deprecated since 1.24). * OutputPage::getScript() was removed (deprecated since 1.24). * OutputPage::out() was removed (deprecated since 1.22). diff --git a/tests/phpunit/MediaWikiTestCase.php b/tests/phpunit/MediaWikiTestCase.php index d5192ac..a574121 100644 --- a/tests/phpunit/MediaWikiTestCase.php +++ b/tests/phpunit/MediaWikiTestCase.php @@ -1150,33 +1150,6 @@ } /** -* Asserts that an exception of the specified type occurs when running -* the provided code. -* -* @since 1.21 -* @deprecated since 1.22 Use setExpectedException -* -* @param callable $code -* @param string $expected -* @param string $message -*/ - protected function assertException( $code, $expected = 'Exception', $message = '' ) { - $pokemons = null; - - try { - call_user_func( $code ); - } catch ( Exception $pokemons ) { - // Gotta Catch 'Em All! - } - - if ( $message === '' ) { - $message = 'An exception of type "' . $expected . '" should have been thrown'; - } - - $this->assertInstanceOf( $expected, $pokemons, $message ); - } - - /** * Asserts that the given string is a valid HTML snippet. * Wraps the given string in the required top level tags and * then calls assertValidHtmlDocument(). -- To view, visit https://gerrit.wikimedia.org/r/276048 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icae4077078c73d766d3c1c9e9e569922151296d9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Siebrand ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix exporting unbound results - change (wikidata...gui)
Smalyshev has uploaded a new change for review. https://gerrit.wikimedia.org/r/276047 Change subject: Fix exporting unbound results .. Fix exporting unbound results Bug: T128971 Change-Id: I834609efa998465e237e957e7e157a2c2fc42a67 --- M wikibase/queryService/api/Sparql.js 1 file changed, 39 insertions(+), 19 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/gui refs/changes/47/276047/1 diff --git a/wikibase/queryService/api/Sparql.js b/wikibase/queryService/api/Sparql.js index 8e496b6..9bd1c81 100644 --- a/wikibase/queryService/api/Sparql.js +++ b/wikibase/queryService/api/Sparql.js @@ -213,6 +213,8 @@ for ( var j = 0; j < data.head.vars.length; j++ ) { if ( data.head.vars[j] in data.results.bindings[i] ) { rowBindings[data.head.vars[j]] = data.results.bindings[i][data.head.vars[j]]; + } else { + rowBindings[data.head.vars[j]] = undefined; } } context = rowHandler( rowBindings, context ); @@ -253,16 +255,22 @@ var out = data.head.vars.map( this._encodeCsv ).join( ',' ) + '\n'; out = this._processData( data, function ( row, out ) { var rowOut = ''; + var first = true; + var rowCSV; for ( var rowVar in row ) { - var rowCSV = self._encodeCsv( row[rowVar].value ); - if ( rowOut.length > 0 ) { + if ( row[rowVar] == undefined ) { + rowCSV == ''; + } else { + rowCSV = self._encodeCsv( row[rowVar].value ); + } + if ( !first ) { rowOut += ','; + } else { + first = false; } rowOut += rowCSV; } - if ( rowOut.length > 0 ) { - rowOut += '\n'; - } + rowOut += '\n'; return out + rowOut; }, out ); return out; @@ -278,7 +286,7 @@ out = this._processData( data, function ( row, out ) { var extractRow = {}; for ( var rowVar in row ) { - extractRow[rowVar] = row[rowVar].value; + extractRow[rowVar] = (row[rowVar] || {}).value; } out.push( extractRow ); return out; @@ -287,7 +295,7 @@ }; /** -* Get the result of the submitted query as JSON +* Get the result of the submitted query as raw JSON * * @return {string} */ @@ -328,7 +336,7 @@ }; /** -* Get the result of the submitted query as TSV +* Get the result of the submitted query as SPARQL TSV * * @return {string} */ @@ -339,23 +347,29 @@ } ).join( '\t' ) + '\n'; out = this._processData( data, function ( row, out ) { var rowOut = ''; + var first = true; + var rowTSV; for ( var rowVar in row ) { - var rowTSV = self._renderValueTSV( row[rowVar] ); - if ( rowOut.length > 0 ) { + if ( row[rowVar] == undefined ) { + rowTSV = ''; + } else { + rowTSV = self._renderValueTSV( row[rowVar] ); + } + if ( !first ) { rowOut += '\t'; + } else { + first = false; } rowOut += rowTSV; } - if ( rowOut.length > 0 ) { - rowOut += '\n'; - } + rowOut += '\n'; return out + rowOut; }, out ); return out; }; /** -* Get the result of the submitted query as TSV +* Get the result of the submitted query as simplified TSV * * @return {string} */ @@ -364,16 +378,22 @@
[MediaWiki-commits] [Gerrit] Partial fix for busted check that a translation exists - change (mediawiki...DonationInterface)
jenkins-bot has submitted this change and it was merged. Change subject: Partial fix for busted check that a translation exists .. Partial fix for busted check that a translation exists Existing logic omitted an argument to wfMessage, meaning we only ever returned true for messages that existed in some language and had parameters to substitute. This version fixes that heinous error, but we still return false when the translated message is equal to the English message. Bug: T129277 Change-Id: I8a3e5080b015a7f87e7898045c3b9e41b4375334 --- M gateway_common/MessageUtils.php 1 file changed, 4 insertions(+), 4 deletions(-) Approvals: XenoRyet: Looks good to me, approved jenkins-bot: Verified diff --git a/gateway_common/MessageUtils.php b/gateway_common/MessageUtils.php index 8f445d9..533ba0e 100644 --- a/gateway_common/MessageUtils.php +++ b/gateway_common/MessageUtils.php @@ -45,7 +45,7 @@ /** * messageExists returns true if a translatable message has been defined * for the string and language that have been passed in, false if none is -* present. +* present or if the translation is the same as the English. * @param string $msg_key The message string to look up. * @param string $language A valid mediawiki language code. * @return boolean - true if message exists, otherwise false. @@ -59,11 +59,11 @@ } # get the english version of the message - $msg_en = WmfFramework::formatMessage( $msg_key, 'en' ); + $msg_en = WmfFramework::formatMessage( $msg_key, array(), 'en' ); # attempt to get the message in the specified language - $msg_lang = WmfFramework::formatMessage( $msg_key, $language ); + $msg_lang = WmfFramework::formatMessage( $msg_key, array(), $language ); - # if the messages are the same, the message fellback to English, return false + # if the messages are the same, the message fell back to English, return false return strcmp( $msg_en, $msg_lang ) != 0; } return false; -- To view, visit https://gerrit.wikimedia.org/r/276016 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8a3e5080b015a7f87e7898045c3b9e41b4375334 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DonationInterface Gerrit-Branch: master Gerrit-Owner: Ejegg Gerrit-Reviewer: AndyRussG Gerrit-Reviewer: Awight Gerrit-Reviewer: Cdentinger Gerrit-Reviewer: Ssmith Gerrit-Reviewer: XenoRyet 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 some deprecated functions from ApiBase - change (mediawiki/core)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/276045 Change subject: Remove some deprecated functions from ApiBase .. Remove some deprecated functions from ApiBase * ApiBase::addTokenProperties() was removed (deprecated since 1.24). * ApiBase::getFinalResultProperties() was removed (deprecated since 1.24). * ApiBase::getRequireAtLeastOneParameterErrorMessages() was removed (deprecated since 1.24). * ApiBase::getRequireMaxOneParameterErrorMessages() was removed (deprecated since 1.24). * ApiBase::getRequireOnlyOneParameterErrorMessages() was removed (deprecated since 1.24). * ApiBase::getTitleOrPageIdErrorMessage() was removed (deprecated since 1.24). No uses in core or Gerrit extensions remaining. Change-Id: Idea70300874258fbcb9deef6504eb55f2ebe8d6c --- M RELEASE-NOTES-1.27 M includes/api/ApiBase.php 2 files changed, 6 insertions(+), 58 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/45/276045/1 diff --git a/RELEASE-NOTES-1.27 b/RELEASE-NOTES-1.27 index 302e20a..157451b 100644 --- a/RELEASE-NOTES-1.27 +++ b/RELEASE-NOTES-1.27 @@ -213,6 +213,12 @@ ** ApiFormatDbg ** ApiFormatTxt ** ApiFormatYaml +* ApiBase::addTokenProperties() was removed (deprecated since 1.24). +* ApiBase::getFinalResultProperties() was removed (deprecated since 1.24). +* ApiBase::getRequireAtLeastOneParameterErrorMessages() was removed (deprecated since 1.24). +* ApiBase::getRequireMaxOneParameterErrorMessages() was removed (deprecated since 1.24). +* ApiBase::getRequireOnlyOneParameterErrorMessages() was removed (deprecated since 1.24). +* ApiBase::getTitleOrPageIdErrorMessage() was removed (deprecated since 1.24). * ApiQueryBase::titleToKey(), ApiQueryBase::keyToTitle() and ApiQueryBase::keyPartToTitle() all removed (deprecated since 1.24). * ApiQueryBase::checkRowCount() was removed (deprecated since 1.24). diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php index 85dee2b..a14575a 100644 --- a/includes/api/ApiBase.php +++ b/includes/api/ApiBase.php @@ -2549,64 +2549,6 @@ } /** -* @see self::getResultProperties() -* @deprecated since 1.24 -* @return array|bool -*/ - public function getFinalResultProperties() { - wfDeprecated( __METHOD__, '1.24' ); - return []; - } - - /** -* @see self::getResultProperties() -* @deprecated since 1.24 -*/ - protected static function addTokenProperties( &$props, $tokenFunctions ) { - wfDeprecated( __METHOD__, '1.24' ); - } - - /** -* @see self::getPossibleErrors() -* @deprecated since 1.24 -* @return array -*/ - public function getRequireOnlyOneParameterErrorMessages( $params ) { - wfDeprecated( __METHOD__, '1.24' ); - return []; - } - - /** -* @see self::getPossibleErrors() -* @deprecated since 1.24 -* @return array -*/ - public function getRequireMaxOneParameterErrorMessages( $params ) { - wfDeprecated( __METHOD__, '1.24' ); - return []; - } - - /** -* @see self::getPossibleErrors() -* @deprecated since 1.24 -* @return array -*/ - public function getRequireAtLeastOneParameterErrorMessages( $params ) { - wfDeprecated( __METHOD__, '1.24' ); - return []; - } - - /** -* @see self::getPossibleErrors() -* @deprecated since 1.24 -* @return array -*/ - public function getTitleOrPageIdErrorMessage() { - wfDeprecated( __METHOD__, '1.24' ); - return []; - } - - /** * This formerly attempted to return a list of all possible errors returned * by the module. However, this was impossible to maintain in many cases * since errors could come from other areas of MediaWiki and in some cases -- To view, visit https://gerrit.wikimedia.org/r/276045 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idea70300874258fbcb9deef6504eb55f2ebe8d6c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Siebrand ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Deprecated ApiBase::getResultProperties() was removed - change (mediawiki/core)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/276046 Change subject: Deprecated ApiBase::getResultProperties() was removed .. Deprecated ApiBase::getResultProperties() was removed Deprecated since 1.24. Remaining use (extension Favorites) was removed. Change-Id: Id48717c95f3544be39ec1e7d76cdc6ea372346ab --- M RELEASE-NOTES-1.27 M includes/api/ApiBase.php 2 files changed, 1 insertion(+), 15 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/46/276046/1 diff --git a/RELEASE-NOTES-1.27 b/RELEASE-NOTES-1.27 index 157451b..163c026 100644 --- a/RELEASE-NOTES-1.27 +++ b/RELEASE-NOTES-1.27 @@ -218,6 +218,7 @@ * ApiBase::getRequireAtLeastOneParameterErrorMessages() was removed (deprecated since 1.24). * ApiBase::getRequireMaxOneParameterErrorMessages() was removed (deprecated since 1.24). * ApiBase::getRequireOnlyOneParameterErrorMessages() was removed (deprecated since 1.24). +* ApiBase::getResultProperties() was removed (deprecated since 1.24). * ApiBase::getTitleOrPageIdErrorMessage() was removed (deprecated since 1.24). * ApiQueryBase::titleToKey(), ApiQueryBase::keyToTitle() and ApiQueryBase::keyPartToTitle() all removed (deprecated since 1.24). diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php index a14575a..cfe6f63 100644 --- a/includes/api/ApiBase.php +++ b/includes/api/ApiBase.php @@ -2534,21 +2534,6 @@ const PROP_NULLABLE = 1; /** -* Formerly used to fetch a list of possible properites in the result, -* somehow organized with respect to the prop parameter that causes them to -* be returned. The specific semantics of the return value was never -* specified. Since this was never possible to be accurately updated, it -* has been removed. -* -* @deprecated since 1.24 -* @return array|bool -*/ - protected function getResultProperties() { - wfDeprecated( __METHOD__, '1.24' ); - return false; - } - - /** * This formerly attempted to return a list of all possible errors returned * by the module. However, this was impossible to maintain in many cases * since errors could come from other areas of MediaWiki and in some cases -- To view, visit https://gerrit.wikimedia.org/r/276046 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id48717c95f3544be39ec1e7d76cdc6ea372346ab Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Siebrand ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits