[MediaWiki-commits] [Gerrit] pywikibot/compat[master]: [bugfix] update some namespaces aliases
Xqt has uploaded a new change for review. https://gerrit.wikimedia.org/r/313355 Change subject: [bugfix] update some namespaces aliases .. [bugfix] update some namespaces aliases bug: T146961 Change-Id: I1129be03d18b1a3d5293583e50f5c3772ff49c57 --- M families/wikipedia_family.py 1 file changed, 1,447 insertions(+), 38 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/compat refs/changes/55/313355/1 diff --git a/families/wikipedia_family.py b/families/wikipedia_family.py index 5e877a9..aaa9262 100644 --- a/families/wikipedia_family.py +++ b/families/wikipedia_family.py @@ -116,12 +116,13 @@ 'av': u'Wikipedia', 'ay': [u'Wikipidiya', u'Wikipedia'], 'az': [u'Vikipediya', u'Wikipedia'], +'azb': [u'ویکیپدیا', u'Wikipedia'], 'ba': [u'Википедия', u'Wikipedia'], 'bar': u'Wikipedia', 'bat-smg': [u'Vikipedėjė', u'Wikipedia'], 'bcl': u'Wikipedia', 'be': [u'Вікіпедыя', u'Wikipedia', u'ВП'], -'be-x-old': [u'Вікіпэдыя', u'Wikipedia', u'ВП'], +'be-tarask': [u'Вікіпэдыя', u'Wikipedia', u'ВП'], 'bg': [u'Уикипедия', u'Wikipedia'], 'bh': [u'विकिपीडिया', u'Wikipedia'], 'bi': u'Wikipedia', @@ -158,7 +159,7 @@ 'dv': [u'ވިކިޕީޑިއާ', u'Wikipedia'], 'dz': u'Wikipedia', 'ee': u'Wikipedia', -'el': [u'Βικιπαίδεια', u'Wikipedia'], +'el': [u'Βικιπαίδεια', u'ΒΠ'], 'eml': u'Wikipedia', 'en': [u'Wikipedia', u'WP'], 'eo': [u'Vikipedio', u'VP', u'Wikipedia'], @@ -184,6 +185,7 @@ 'gl': u'Wikipedia', 'glk': u'Wikipedia', 'gn': [u'Vikipetã', u'Wikipedia'], +'gom': [u'विकिपीडिया', u'Wikipedia'], 'got': u'Wikipedia', 'gu': [u'વિકિપીડિયા', u'Wikipedia'], 'gv': u'Wikipedia', @@ -209,7 +211,7 @@ 'it': [u'Wikipedia', u'WP'], 'iu': [u'ᐅᐃᑭᐱᑎᐊ', u'Wikipedia'], 'ja': u'Wikipedia', -'jbo': u'Wikipedia', +'jbo': [u'uikipedi\'as', u'Wikipedia'], 'jv': u'Wikipedia', 'ka': [u'ვიკიპედია', u'Wikipedia'], 'kaa': u'Wikipedia', @@ -241,9 +243,11 @@ 'lmo': u'Wikipedia', 'ln': u'Wikipedia', 'lo': [u'ວິກິພີເດຍ', u'Wikipedia'], +'lrc': [u'ڤیکیپئدیا', u'Wikipedia', u'پوروجە'], 'lt': [u'Vikipedija', u'Wikipedia'], 'ltg': [u'Vikipedeja', u'Wikipedia'], 'lv': [u'Vikipēdija', u'VP', u'WP', u'Wikipedia'], +'mai': [u'विकिपिडिया', u'WP', u'Wikipedia', u'वि'], 'map-bms': u'Wikipedia', 'mdf': [u'Википедиесь', u'Wikipedia'], 'mg': u'Wikipedia', @@ -258,7 +262,7 @@ 'ms': u'Wikipedia', 'mt': [u'Wikipedija', u'Wikipedia'], 'mwl': [u'Biquipédia', u'Wikipedia'], -'my': u'Wikipedia', +'my': [u'Wikipedia', u'WP'], 'myv': [u'Википедиясь', u'Wikipedia'], 'mzn': [u'ویکیپدیا', u'وپ', u'Wikipedia'], 'na': u'Wikipedia', @@ -291,7 +295,7 @@ 'pih': u'Wikipedia', 'pl': [u'Wikipedia', u'WP'], 'pms': u'Wikipedia', -'pnb': u'Wikipedia', +'pnb': [u'وکیپیڈیا', u'Wikipedia'], 'pnt': [u'Βικιπαίδεια', u'Wikipedia'], 'ps': [u'ويکيپېډيا', u'Wikipedia'], 'pt': [u'Wikipédia', u'WP', u'Wikipedia'], @@ -313,7 +317,7 @@ 'sd': u'Wikipedia', 'se': [u'Wikipedia', u'WP'], 'sg': u'Wikipedia', -'sh': u'Wikipedia', +'sh': [u'Wikipedia', u'VP', u'Vikipedija', u'WP', u'Wikipedija', u'ВП', u'Википедија'], 'si': [u'විකිපීඩියා', u'Wikipedia'], 'simple': [u'Wikipedia', u'WP'], 'sk': [u'Wikipédia', u'Wikipedia'], @@ -331,7 +335,7 @@ 'sv': [u'Wikipedia', u'WP'], 'sw': u'Wikipedia', 'szl': [u'Wikipedyjo', u'Wikipedia'], -'ta': [u'விக்கிப்பீடியா', u'Wikipedia', u'விக்கிபீடியா'], +'ta': [u'விக்கிப்பீடியா', u'WP', u'Wikipedia', u'விக்கிபீடியா'], 'te': [u'వికీపీడియా', u'Wikipedia'], 'tet': u'Wikipedia', 'tg': [u'Википедиа', u'Wikipedia'], @@ -352,7 +356,7 @@ 'udm': [u'Википедия', u'Wikipedia'], 'ug': u'Wikipedia', 'uk': [u'Вікіпедія', u'Wikipedia', u'ВП'], -'ur': [u'ویکیپیڈیا', u'Wikipedia'], +'ur': [u'ویکیپیڈیا', u'Wikipedia', u'وپ'], 'uz': [u'Vikipediya', u'VP', u'Wikipedia'], 've': u'Wikipedia', 'vec': [u'Wikipedia', u'WP'], @@ -363,7 +367,7 @@ 'wa': u'Wikipedia', 'war': u'Wikipedia',
[MediaWiki-commits] [Gerrit] pywikibot/core[master]: [IMPR] Localize digits only
Xqt has uploaded a new change for review. https://gerrit.wikimedia.org/r/313352 Change subject: [IMPR] Localize digits only .. [IMPR] Localize digits only - to_local_digits() method localizes digits inside a string. The digit is extracted in duration string. To increase performance (and may be not to localize wanted latin digits inside mediawiki messages) we only localize that part and replace the replacement specifier afterwards instead of running through the whole string. - add a comment regarding the plural replacement inside translate method Change-Id: If06a7d2a0f1cbe6ca3a64cabfb1108cc24b0226d --- M scripts/archivebot.py 1 file changed, 5 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/52/313352/1 diff --git a/scripts/archivebot.py b/scripts/archivebot.py index ecd8701..b093d1d 100755 --- a/scripts/archivebot.py +++ b/scripts/archivebot.py @@ -164,8 +164,11 @@ elif string[-1] == 'y': template = site.mediawiki_message('Years') if template: -exp = i18n.translate(site.code, template, {'$1': int(string[:-1])}) -return to_local_digits(exp.replace('$1', string[:-1]), site.code) +duration = string[:-1] +# replace plural variants +exp = i18n.translate(site.code, template, {'$1': int(duration)}) + +return exp.replace('$1', to_local_digits(duration, site.code)) else: return to_local_digits(string, site.code) -- To view, visit https://gerrit.wikimedia.org/r/313352 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If06a7d2a0f1cbe6ca3a64cabfb1108cc24b0226d 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] apps...wikipedia[master]: Fix background image in share-a-fact cards.
jenkins-bot has submitted this change and it was merged. Change subject: Fix background image in share-a-fact cards. .. Fix background image in share-a-fact cards. Bug: T146767 Change-Id: Icea9b0c02908a4614650d62f19438a32340d3b9a --- M app/src/main/java/org/wikipedia/page/leadimages/ArticleHeaderView.java M app/src/main/java/org/wikipedia/views/ViewUtil.java 2 files changed, 4 insertions(+), 2 deletions(-) Approvals: Mholloway: Looks good to me, approved jenkins-bot: Verified diff --git a/app/src/main/java/org/wikipedia/page/leadimages/ArticleHeaderView.java b/app/src/main/java/org/wikipedia/page/leadimages/ArticleHeaderView.java index 494c73f..029754b 100644 --- a/app/src/main/java/org/wikipedia/page/leadimages/ArticleHeaderView.java +++ b/app/src/main/java/org/wikipedia/page/leadimages/ArticleHeaderView.java @@ -127,8 +127,9 @@ image.setAnimationPaused(paused); } +@NonNull public Bitmap copyBitmap() { -return ViewUtil.getBitmapFromView(image); +return ViewUtil.getBitmapFromView(image.getImage()); } public void setImageFocus(PointF focusPoint) { diff --git a/app/src/main/java/org/wikipedia/views/ViewUtil.java b/app/src/main/java/org/wikipedia/views/ViewUtil.java index e9fa710..61144c3 100644 --- a/app/src/main/java/org/wikipedia/views/ViewUtil.java +++ b/app/src/main/java/org/wikipedia/views/ViewUtil.java @@ -88,7 +88,8 @@ .build()); } -public static Bitmap getBitmapFromView(View view) { +@NonNull +public static Bitmap getBitmapFromView(@NonNull View view) { Bitmap returnedBitmap = Bitmap.createBitmap(view.getWidth(), view.getHeight(), Bitmap.Config.ARGB_); Canvas canvas = new Canvas(returnedBitmap); view.draw(canvas); -- To view, visit https://gerrit.wikimedia.org/r/313206 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icea9b0c02908a4614650d62f19438a32340d3b9a Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: DbrantGerrit-Reviewer: BearND Gerrit-Reviewer: Brion VIBBER Gerrit-Reviewer: Mholloway Gerrit-Reviewer: Niedzielski Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: registration: Improve license-name validation
jenkins-bot has submitted this change and it was merged. Change subject: registration: Improve license-name validation .. registration: Improve license-name validation Our hardcoded enum list in the extension.json schema for license-name values was incomplete and did not cover the full SPDX license identifier specification, which includes things like "AND" for specifying multiple licenses. Composer already has solid code in a library to do this validation, so let's use it! This updates both the validateRegistrationFile.php and ExtensionJsonValidationTest.php to use the composer/spdx-licenses library (a new development dependency) to ensure the license-name field is a valid SPDX identifier. Also fix a silly typo in the validateRegistrationFile script which prevented it from running, and use ::class so it will be easier to detect typos like that in the future. Bug: T146862 Change-Id: Ibb8973ed7950ae81c90558f9630f73746b2aff2c --- M composer.json M docs/extension.schema.json M docs/extension.schema.v1.json M maintenance/validateRegistrationFile.php M tests/phpunit/structure/ExtensionJsonValidationTest.php 5 files changed, 50 insertions(+), 442 deletions(-) Approvals: Parent5446: Looks good to me, approved jenkins-bot: Verified diff --git a/composer.json b/composer.json index eedaa4e..9424a73b 100644 --- a/composer.json +++ b/composer.json @@ -44,6 +44,7 @@ "zordius/lightncandy": "0.23" }, "require-dev": { + "composer/spdx-licenses": "1.1.4", "jakub-onderka/php-parallel-lint": "0.9.2", "justinrainbow/json-schema": "~3.0", "mediawiki/mediawiki-codesniffer": "0.7.2", diff --git a/docs/extension.schema.json b/docs/extension.schema.json index 384bfb4..84a404a 100644 --- a/docs/extension.schema.json +++ b/docs/extension.schema.json @@ -51,224 +51,7 @@ }, "license-name": { "type": "string", - "description": "Short identifier for the license under which the extension is released.", - "enum": [ - "AFL-1.1", - "AFL-1.2", - "AFL-2.0", - "AFL-2.1", - "AFL-3.0", - "APL-1.0", - "Aladdin", - "ANTLR-PD", - "Apache-1.0", - "Apache-1.1", - "Apache-2.0", - "APSL-1.0", - "APSL-1.1", - "APSL-1.2", - "APSL-2.0", - "Artistic-1.0", - "Artistic-1.0-cl8", - "Artistic-1.0-Perl", - "Artistic-2.0", - "AAL", - "BitTorrent-1.0", - "BitTorrent-1.1", - "BSL-1.0", - "BSD-2-Clause", - "BSD-2-Clause-FreeBSD", - "BSD-2-Clause-NetBSD", - "BSD-3-Clause", - "BSD-3-Clause-Clear", - "BSD-4-Clause", - "BSD-4-Clause-UC", - "CECILL-1.0", - "CECILL-1.1", - "CECILL-2.0", - "CECILL-B", - "CECILL-C", - "ClArtistic", - "CNRI-Python", - "CNRI-Python-GPL-Compatible", - "CPOL-1.02", - "CDDL-1.0", - "CDDL-1.1", - "CPAL-1.0", - "CPL-1.0", - "CATOSL-1.1", - "Condor-1.1", - "CC-BY-1.0", - "CC-BY-2.0", - "CC-BY-2.5", - "CC-BY-3.0", - "CC-BY-ND-1.0", - "CC-BY-ND-2.0", - "CC-BY-ND-2.5", - "CC-BY-ND-3.0", - "CC-BY-NC-1.0", - "CC-BY-NC-2.0", - "CC-BY-NC-2.5", - "CC-BY-NC-3.0", - "CC-BY-NC-ND-1.0", - "CC-BY-NC-ND-2.0", -
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Clean up some ObjectCache factory callers
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/313351 Change subject: Clean up some ObjectCache factory callers .. Clean up some ObjectCache factory callers * Use services container in more places. * Remove dependency in the file hasher utils class. * Undeprecated getLocalServerInstance() since $fallback is not handled elsewhere. Change-Id: Id1fcd1c465d2d92653357523f4225f1c4d1ace2f --- M includes/cache/MessageCache.php M includes/db/loadbalancer/LBFactoryMW.php M includes/filebackend/FileBackendGroup.php M includes/media/TransformationalImageHandler.php M includes/objectcache/ObjectCache.php M includes/registration/ExtensionRegistry.php M includes/utils/FileContentsHasher.php M includes/utils/MWCryptHKDF.php M includes/utils/UIDGenerator.php 9 files changed, 30 insertions(+), 16 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/51/313351/1 diff --git a/includes/cache/MessageCache.php b/includes/cache/MessageCache.php index e871855..f393acd 100644 --- a/includes/cache/MessageCache.php +++ b/includes/cache/MessageCache.php @@ -20,6 +20,7 @@ * @file * @ingroup Cache */ +use MediaWiki\MediaWikiServices; /** * MediaWiki message cache structure version. @@ -154,9 +155,9 @@ $this->mExpiry = $expiry; if ( $wgUseLocalMessageCache ) { - $this->localCache = ObjectCache::getLocalServerInstance( CACHE_NONE ); + $this->localCache = MediaWikiServices::getInstance()->getLocalServerObjectCache(); } else { - $this->localCache = wfGetCache( CACHE_NONE ); + $this->localCache = new EmptyBagOStuff(); } $this->wanCache = ObjectCache::getMainWANInstance(); diff --git a/includes/db/loadbalancer/LBFactoryMW.php b/includes/db/loadbalancer/LBFactoryMW.php index 9821da1..3e7721c 100644 --- a/includes/db/loadbalancer/LBFactoryMW.php +++ b/includes/db/loadbalancer/LBFactoryMW.php @@ -22,6 +22,7 @@ */ use MediaWiki\Logger\LoggerFactory; +use MediaWiki\MediaWikiServices; /** * Legacy MediaWiki-specific class for generating database load balancers @@ -110,7 +111,7 @@ } // Use APC/memcached style caching, but avoids loops with CACHE_DB (T141804) - $sCache = ObjectCache::getLocalServerInstance(); + $sCache = MediaWikiServices::getInstance()->getLocalServerObjectCache(); if ( $sCache->getQoS( $sCache::ATTR_EMULATION ) > $sCache::QOS_EMULATION_SQL ) { $lbConf['srvCache'] = $sCache; } @@ -118,7 +119,7 @@ if ( $cCache->getQoS( $cCache::ATTR_EMULATION ) > $cCache::QOS_EMULATION_SQL ) { $lbConf['memCache'] = $cCache; } - $wCache = ObjectCache::getMainWANInstance(); + $wCache = MediaWikiServices::getInstance()->getMainWANObjectCache(); if ( $wCache->getQoS( $wCache::ATTR_EMULATION ) > $wCache::QOS_EMULATION_SQL ) { $lbConf['wanCache'] = $wCache; } diff --git a/includes/filebackend/FileBackendGroup.php b/includes/filebackend/FileBackendGroup.php index ede73aa..54cc35e 100644 --- a/includes/filebackend/FileBackendGroup.php +++ b/includes/filebackend/FileBackendGroup.php @@ -22,6 +22,7 @@ * @author Aaron Schulz */ use \MediaWiki\Logger\LoggerFactory; +use MediaWiki\MediaWikiServices; /** * Class to handle file backend registration @@ -167,7 +168,7 @@ $config['fileJournal'] = isset( $config['fileJournal'] ) ? FileJournal::factory( $config['fileJournal'], $name ) : FileJournal::factory( [ 'class' => 'NullFileJournal' ], $name ); - $config['wanCache'] = ObjectCache::getMainWANInstance(); + $config['wanCache'] = MediaWikiServices::getInstance()->getMainWANObjectCache(); $config['srvCache'] = ObjectCache::getLocalServerInstance( 'hash' ); $config['statusWrapper'] = [ 'Status', 'wrap' ]; $config['tmpDirectory'] = wfTempDir(); diff --git a/includes/media/TransformationalImageHandler.php b/includes/media/TransformationalImageHandler.php index 3ebda75..11c4d42 100644 --- a/includes/media/TransformationalImageHandler.php +++ b/includes/media/TransformationalImageHandler.php @@ -25,6 +25,7 @@ * @file * @ingroup Media */ +use MediaWiki\MediaWikiServices; /** * Handler for images that need to be transformed @@ -509,7 +510,7 @@ * @return string|bool Representing the IM version; false on error */ protected function getMagickVersion() { - $cache = ObjectCache::getLocalServerInstance( CACHE_NONE ); +
[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: Use getLocalServerObjectCache() service
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/313350 Change subject: Use getLocalServerObjectCache() service .. Use getLocalServerObjectCache() service Change-Id: I425c71a51dc8d6923e0b09067f7919a85af5 --- M includes/Hooks.php M profiles/PhraseSuggesterProfiles.php 2 files changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch refs/changes/50/313350/1 diff --git a/includes/Hooks.php b/includes/Hooks.php index 69bc527..c3244d6 100644 --- a/includes/Hooks.php +++ b/includes/Hooks.php @@ -208,7 +208,7 @@ $wgCirrusSearchMoreLikeThisMaxQueryTermsLimit, $wgCirrusSearchMoreLikeThisFields; - $cache = \ObjectCache::getLocalServerInstance(); + $cache = MediaWikiServices::getInstance()->getLocalServerObjectCache(); $lines = $cache->getWithSetCallback( $cache->makeKey( 'cirrussearch-morelikethis-settings' ), 600, diff --git a/profiles/PhraseSuggesterProfiles.php b/profiles/PhraseSuggesterProfiles.php index d2990a4..11d7430 100644 --- a/profiles/PhraseSuggesterProfiles.php +++ b/profiles/PhraseSuggesterProfiles.php @@ -1,6 +1,8 @@ getLocalServerObjectCache(); $lines = $cache->getWithSetCallback( $cache->makeKey( 'cirrussearch-didyoumean-settings' ), 600, -- To view, visit https://gerrit.wikimedia.org/r/313350 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I425c71a51dc8d6923e0b09067f7919a85af5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CirrusSearch 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] mediawiki...OATHAuth[master]: Fix some comments
jenkins-bot has submitted this change and it was merged. Change subject: Fix some comments .. Fix some comments * Spelling in OATHAuthHooks::onRegistration comment * Remove incorrect comment for OATHAuth::__construct * Spelling in TOTPAuthenticationRequest class phpdoc Change-Id: Iaf670a1b86e82b4684489371c8152b8055bff90e --- M OATHAuth.hooks.php M OATHUser.php M auth/TOTPAuthenticationRequest.php 3 files changed, 5 insertions(+), 5 deletions(-) Approvals: Gergő Tisza: Looks good to me, approved jenkins-bot: Verified diff --git a/OATHAuth.hooks.php b/OATHAuth.hooks.php index d500a6e..0f1be7c 100644 --- a/OATHAuth.hooks.php +++ b/OATHAuth.hooks.php @@ -38,8 +38,8 @@ $wgAuthManagerAutoConfig['secondaryauth'] += [ TOTPSecondaryAuthenticationProvider::class => [ 'class' => TOTPSecondaryAuthenticationProvider::class, - // after non-interactive prroviders but before the ones that run after a - // succesful authentication + // after non-interactive providers but before the ones + // that run after a successful authentication 'sort' => 50, ] ]; diff --git a/OATHUser.php b/OATHUser.php index 64efd33..66b7131 100644 --- a/OATHUser.php +++ b/OATHUser.php @@ -13,7 +13,6 @@ private $key; /** -* Constructor. Can't be called directly. Call one of the static NewFrom* methods * @param User $user * @param OATHAuthKey $key */ diff --git a/auth/TOTPAuthenticationRequest.php b/auth/TOTPAuthenticationRequest.php index 99220ce..c0d94b3 100644 --- a/auth/TOTPAuthenticationRequest.php +++ b/auth/TOTPAuthenticationRequest.php @@ -3,8 +3,9 @@ use MediaWiki\Auth\AuthenticationRequest; /** - * AuthManager value object for the TOTP second factor of an authentication: a pseudorandom token - * that is generated from the current time indepdendently by the server and the client. + * AuthManager value object for the TOTP second factor of an authentication: + * a pseudorandom token that is generated from the current time independently + * by the server and the client. */ class TOTPAuthenticationRequest extends AuthenticationRequest { public $OATHToken; -- To view, visit https://gerrit.wikimedia.org/r/313349 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iaf670a1b86e82b4684489371c8152b8055bff90e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/OATHAuth Gerrit-Branch: master Gerrit-Owner: BryanDavisGerrit-Reviewer: Anomie Gerrit-Reviewer: Gergő Tisza Gerrit-Reviewer: Legoktm Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...OATHAuth[master]: Add composer.lock to .gitignore
jenkins-bot has submitted this change and it was merged. Change subject: Add composer.lock to .gitignore .. Add composer.lock to .gitignore Change-Id: If5b8459cd967bf4b056573f4223f5bc886960251 --- M .gitignore 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Gergő Tisza: Looks good to me, approved jenkins-bot: Verified diff --git a/.gitignore b/.gitignore index 455433b..92e04bf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ *~ *.kate-swp .*.swp +composer.lock node_modules/ vendor/ -- To view, visit https://gerrit.wikimedia.org/r/313348 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If5b8459cd967bf4b056573f4223f5bc886960251 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/OATHAuth Gerrit-Branch: master Gerrit-Owner: BryanDavisGerrit-Reviewer: Anomie Gerrit-Reviewer: Gergő Tisza Gerrit-Reviewer: Legoktm Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...OATHAuth[master]: Add composer.lock to .gitignore
BryanDavis has uploaded a new change for review. https://gerrit.wikimedia.org/r/313348 Change subject: Add composer.lock to .gitignore .. Add composer.lock to .gitignore Change-Id: If5b8459cd967bf4b056573f4223f5bc886960251 --- M .gitignore 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OATHAuth refs/changes/48/313348/1 diff --git a/.gitignore b/.gitignore index 455433b..92e04bf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ *~ *.kate-swp .*.swp +composer.lock node_modules/ vendor/ -- To view, visit https://gerrit.wikimedia.org/r/313348 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If5b8459cd967bf4b056573f4223f5bc886960251 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/OATHAuth Gerrit-Branch: master Gerrit-Owner: BryanDavis___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...OATHAuth[master]: Fix some comments
BryanDavis has uploaded a new change for review. https://gerrit.wikimedia.org/r/313349 Change subject: Fix some comments .. Fix some comments * Spelling in OATHAuthHooks::onRegistration comment * Remove incorrect comment for OATHAuth::__construct * Spelling in TOTPAuthenticationRequest class phpdoc Change-Id: Iaf670a1b86e82b4684489371c8152b8055bff90e --- M OATHAuth.hooks.php M OATHUser.php M auth/TOTPAuthenticationRequest.php 3 files changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OATHAuth refs/changes/49/313349/1 diff --git a/OATHAuth.hooks.php b/OATHAuth.hooks.php index d500a6e..0f1be7c 100644 --- a/OATHAuth.hooks.php +++ b/OATHAuth.hooks.php @@ -38,8 +38,8 @@ $wgAuthManagerAutoConfig['secondaryauth'] += [ TOTPSecondaryAuthenticationProvider::class => [ 'class' => TOTPSecondaryAuthenticationProvider::class, - // after non-interactive prroviders but before the ones that run after a - // succesful authentication + // after non-interactive providers but before the ones + // that run after a successful authentication 'sort' => 50, ] ]; diff --git a/OATHUser.php b/OATHUser.php index 64efd33..66b7131 100644 --- a/OATHUser.php +++ b/OATHUser.php @@ -13,7 +13,6 @@ private $key; /** -* Constructor. Can't be called directly. Call one of the static NewFrom* methods * @param User $user * @param OATHAuthKey $key */ diff --git a/auth/TOTPAuthenticationRequest.php b/auth/TOTPAuthenticationRequest.php index 99220ce..c0d94b3 100644 --- a/auth/TOTPAuthenticationRequest.php +++ b/auth/TOTPAuthenticationRequest.php @@ -3,8 +3,9 @@ use MediaWiki\Auth\AuthenticationRequest; /** - * AuthManager value object for the TOTP second factor of an authentication: a pseudorandom token - * that is generated from the current time indepdendently by the server and the client. + * AuthManager value object for the TOTP second factor of an authentication: + * a pseudorandom token that is generated from the current time independently + * by the server and the client. */ class TOTPAuthenticationRequest extends AuthenticationRequest { public $OATHToken; -- To view, visit https://gerrit.wikimedia.org/r/313349 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iaf670a1b86e82b4684489371c8152b8055bff90e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/OATHAuth Gerrit-Branch: master Gerrit-Owner: BryanDavis___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Convert LanguageConverter to using getLocalServerObjectCache()
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/313347 Change subject: Convert LanguageConverter to using getLocalServerObjectCache() .. Convert LanguageConverter to using getLocalServerObjectCache() Change-Id: I7bfcc389ef0266299d887a3520ab9581ef9aa9be --- M languages/LanguageConverter.php 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/47/313347/1 diff --git a/languages/LanguageConverter.php b/languages/LanguageConverter.php index 13ba7e8..40c9fc0 100644 --- a/languages/LanguageConverter.php +++ b/languages/LanguageConverter.php @@ -18,6 +18,7 @@ * @file * @ingroup Language */ +use MediaWiki\MediaWikiServices; /** * Base class for language conversion. @@ -550,7 +551,7 @@ $variant = $this->getPreferredVariant(); } - $cache = ObjectCache::newAccelerator( CACHE_NONE ); + $cache = MediaWikiServices::getInstance()->getLocalServerObjectCache(); $key = wfMemcKey( 'languageconverter', 'namespace-text', $index, $variant ); $nsVariantText = $cache->get( $key ); if ( $nsVariantText !== false ) { -- To view, visit https://gerrit.wikimedia.org/r/313347 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7bfcc389ef0266299d887a3520ab9581ef9aa9be Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core 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] mediawiki/core[master]: Make LBFactory return type docs more specific to avoid IDEA ...
jenkins-bot has submitted this change and it was merged. Change subject: Make LBFactory return type docs more specific to avoid IDEA warnings .. Make LBFactory return type docs more specific to avoid IDEA warnings Change-Id: I5fa6ed87e35f3b8ee17e576faf5d00763229dd4b --- M includes/libs/rdbms/lbfactory/LBFactory.php 1 file changed, 30 insertions(+), 0 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/libs/rdbms/lbfactory/LBFactory.php b/includes/libs/rdbms/lbfactory/LBFactory.php index 0635d04..f5d57c4 100644 --- a/includes/libs/rdbms/lbfactory/LBFactory.php +++ b/includes/libs/rdbms/lbfactory/LBFactory.php @@ -136,6 +136,36 @@ } /** +* @see ILBFactory::newMainLB() +* @param bool $domain +* @return LoadBalancer +*/ + abstract public function newMainLB( $domain = false ); + + /** +* @see ILBFactory::getMainLB() +* @param bool $domain +* @return mixed +*/ + abstract public function getMainLB( $domain = false ); + + /** +* @see ILBFactory::newExternalLB() +* @param string $cluster +* @param bool $domain +* @return LoadBalancer +*/ + abstract public function newExternalLB( $cluster, $domain = false ); + + /** +* @see ILBFactory::getExternalLB() +* @param string $cluster +* @param bool $domain +* @return mixed +*/ + abstract public function getExternalLB( $cluster, $domain = false ); + + /** * Call a method of each tracked load balancer * * @param string $methodName -- To view, visit https://gerrit.wikimedia.org/r/313330 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5fa6ed87e35f3b8ee17e576faf5d00763229dd4b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron SchulzGerrit-Reviewer: Krinkle Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Replace DatabaseBase => Database in more places
jenkins-bot has submitted this change and it was merged. Change subject: Replace DatabaseBase => Database in more places .. Replace DatabaseBase => Database in more places Change-Id: If37a7909056bf2c31a8228cbc84f0fbbf5f1c517 --- M includes/GlobalFunctions.php M includes/WatchedItemQueryService.php M includes/api/ApiBase.php M includes/api/ApiPageSet.php M includes/api/ApiQuery.php M includes/api/ApiQueryAllImages.php M includes/api/ApiQueryBase.php M includes/cache/BacklinkCache.php M includes/dao/DBAccessBase.php M includes/filerepo/LocalRepo.php M includes/installer/DatabaseInstaller.php M includes/installer/DatabaseUpdater.php M includes/installer/MssqlInstaller.php M includes/installer/MysqlInstaller.php M includes/installer/OracleInstaller.php M includes/installer/PostgresInstaller.php M includes/libs/lockmanager/DBLockManager.php M includes/user/BotPassword.php M maintenance/Maintenance.php M maintenance/archives/upgradeLogging.php M maintenance/benchmarks/bench_delete_truncate.php M maintenance/convertUserOptions.php M maintenance/deleteOrphanedRevisions.php M maintenance/dumpIterator.php M maintenance/dumpTextPass.php M maintenance/fetchText.php M maintenance/namespaceDupes.php M maintenance/orphans.php M maintenance/populateContentModel.php M maintenance/populateRecentChangesSource.php M maintenance/rebuildImages.php M maintenance/rebuildtextindex.php M maintenance/refreshImageMetadata.php M maintenance/storage/recompressTracked.php M maintenance/updateCollation.php 35 files changed, 56 insertions(+), 56 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 5fe4b4e..311cf25 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -3066,7 +3066,7 @@ * @todo Replace calls to wfGetDB with calls to LoadBalancer::getConnection() * on an injected instance of LoadBalancer. * - * @return DatabaseBase + * @return Database */ function wfGetDB( $db, $groups = [], $wiki = false ) { return wfGetLB( $wiki )->getConnection( $db, $groups, $wiki ); diff --git a/includes/WatchedItemQueryService.php b/includes/WatchedItemQueryService.php index c040fb1..4802f72 100644 --- a/includes/WatchedItemQueryService.php +++ b/includes/WatchedItemQueryService.php @@ -55,7 +55,7 @@ } /** -* @return DatabaseBase +* @return Database * @throws MWException */ private function getConnection() { diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php index 809d567..4feaac0 100644 --- a/includes/api/ApiBase.php +++ b/includes/api/ApiBase.php @@ -600,7 +600,7 @@ /** * Gets a default replica DB connection object -* @return DatabaseBase +* @return Database */ protected function getDB() { if ( !isset( $this->mSlaveDB ) ) { diff --git a/includes/api/ApiPageSet.php b/includes/api/ApiPageSet.php index ed229cb..34c17c1 100644 --- a/includes/api/ApiPageSet.php +++ b/includes/api/ApiPageSet.php @@ -1330,7 +1330,7 @@ /** * Get the database connection (read-only) -* @return DatabaseBase +* @return Database */ protected function getDB() { return $this->mDbSource->getDB(); diff --git a/includes/api/ApiQuery.php b/includes/api/ApiQuery.php index 5e3c709..ebbc746 100644 --- a/includes/api/ApiQuery.php +++ b/includes/api/ApiQuery.php @@ -168,7 +168,7 @@ * @param string $name Name to assign to the database connection * @param int $db One of the DB_* constants * @param array $groups Query groups -* @return DatabaseBase +* @return Database */ public function getNamedDB( $name, $db, $groups ) { if ( !array_key_exists( $name, $this->mNamedDB ) ) { diff --git a/includes/api/ApiQueryAllImages.php b/includes/api/ApiQueryAllImages.php index 6aeee68..553995c 100644 --- a/includes/api/ApiQueryAllImages.php +++ b/includes/api/ApiQueryAllImages.php @@ -44,7 +44,7 @@ * which may not necessarily be the same as the local DB. * * TODO: allow querying non-local repos. -* @return DatabaseBase +* @return Database */ protected function getDB() { return $this->mRepo->getSlaveDB(); diff --git a/includes/api/ApiQueryBase.php b/includes/api/ApiQueryBase.php index b35eec2..36ad3a4 100644 --- a/includes/api/ApiQueryBase.php +++ b/includes/api/ApiQueryBase.php @@ -103,7 +103,7 @@ /** * Get the Query database connection (read-only) -* @return DatabaseBase +* @return Database */ protected function getDB() { if ( is_null( $this->mDb ) ) { @@ -119,7 +119,7 @@ * @param string $name Name to assign to the database connection
[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Tweak verbiage for empty reading list window.
jenkins-bot has submitted this change and it was merged. Change subject: Tweak verbiage for empty reading list window. .. Tweak verbiage for empty reading list window. - Update the verbiage to reflect the new location of the bookmark button. - Use a large bookmark icon instead of the "heart" icon to serve as a better visual cue of what to look for when saving reading lists. Change-Id: I267bd45bf3d9b25520f7983ac28d6ef45d0e5e8c --- D app/src/main/res/drawable/savedpages_empty.xml M app/src/main/res/layout/fragment_reading_lists.xml M app/src/main/res/values-qq/strings.xml M app/src/main/res/values/strings.xml 4 files changed, 5 insertions(+), 16 deletions(-) Approvals: Mholloway: Looks good to me, approved jenkins-bot: Verified diff --git a/app/src/main/res/drawable/savedpages_empty.xml b/app/src/main/res/drawable/savedpages_empty.xml deleted file mode 100644 index e77dfbc..000 --- a/app/src/main/res/drawable/savedpages_empty.xml +++ /dev/null @@ -1,11 +0,0 @@ -http://schemas.android.com/apk/res/android;> - - - - - diff --git a/app/src/main/res/layout/fragment_reading_lists.xml b/app/src/main/res/layout/fragment_reading_lists.xml index d31a208..7ba5b9b 100644 --- a/app/src/main/res/layout/fragment_reading_lists.xml +++ b/app/src/main/res/layout/fragment_reading_lists.xml @@ -15,10 +15,10 @@ android:visibility="gone"> Confirmation message shown when deleting a reading list. Title message shown when there are no reading lists. - Descriptive message that explains the benefits of reading lists. + Descriptive message that explains the benefits of reading lists, and the location of the button to add an article to a reading list. Short introductory statement about reading lists to be shown in the onboarding screen, emphasizing that reading lists are available for offline access. Label stating that the items below are examples of reading list titles. First example of a reading list title, in this case places to visit. diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 5678807..a039838 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -286,7 +286,7 @@ Cancel Are you sure you want to delete this reading list? No reading lists here. -Organize the articles you browse into reading lists! When browsing an article, tap the bookmark icon at the top of the article to add it to a reading list. +Organize the articles you browse into reading lists! When browsing an article, tap the bookmark icon in the bottom toolbar to add it to a reading list. Create reading lists from articles you want to read later, even when you\'re offline! For example Places to visit -- To view, visit https://gerrit.wikimedia.org/r/313200 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I267bd45bf3d9b25520f7983ac28d6ef45d0e5e8c Gerrit-PatchSet: 2 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: DbrantGerrit-Reviewer: BearND Gerrit-Reviewer: Brion VIBBER Gerrit-Reviewer: Mholloway Gerrit-Reviewer: Niedzielski Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...ExternalData[master]: Use DatabaseBase::factory() over Database::factory()
jenkins-bot has submitted this change and it was merged. Change subject: Use DatabaseBase::factory() over Database::factory() .. Use DatabaseBase::factory() over Database::factory() Change-Id: I59a3019feef680f869119da4c614e9bcb1309ae1 --- M ED_Utils.php 1 file changed, 18 insertions(+), 5 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/ED_Utils.php b/ED_Utils.php index 0117a66..be0f341 100644 --- a/ED_Utils.php +++ b/ED_Utils.php @@ -211,10 +211,23 @@ } // DatabaseBase::newFromType() was added in MW 1.17 - it was - // then replaced by DatabaseBase::factory() in MW 1.18 - $factoryFunction = array( 'DatabaseBase', 'factory' ); - //$newFromTypeFunction = array( 'DatabaseBase', 'newFromType' ); - if ( is_callable( $factoryFunction ) ) { + // then replaced by DatabaseBase::factory() in MW 1.18, and + // and renamed to Database::factory() in MW 1.28. + if ( method_exists( 'Database', 'factory' ) ) { + $db = Database::factory( $db_type, + array( + 'host' => $db_server, + 'user' => $db_username, + 'password' => $db_password, + // Both 'dbname' and 'dbName' have been + // used in different versions. + 'dbname' => $db_name, + 'dbName' => $db_name, + 'flags' => $db_flags, + 'tablePrefix' => $db_tableprefix, + ) + ); + } elseif ( method_exists( 'DatabaseBase', 'factory' ) ) { $db = DatabaseBase::factory( $db_type, array( 'host' => $db_server, @@ -228,7 +241,7 @@ 'tablePrefix' => $db_tableprefix, ) ); - } else { //if ( is_callable( $newFromTypeFunction ) ) { + } else { $db = DatabaseBase::newFromType( $db_type, array( 'host' => $db_server, -- To view, visit https://gerrit.wikimedia.org/r/313335 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I59a3019feef680f869119da4c614e9bcb1309ae1 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/ExternalData Gerrit-Branch: master Gerrit-Owner: Aaron SchulzGerrit-Reviewer: Krinkle Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: remove reference to undefined wmgMFUseCentralAuthToken
20after4 has uploaded a new change for review. https://gerrit.wikimedia.org/r/313346 Change subject: remove reference to undefined wmgMFUseCentralAuthToken .. remove reference to undefined wmgMFUseCentralAuthToken Icb2f18c532f8e237df2c4d7d625647c4ea7eb1e0 removed the global var but a reference was left behind in mobile-labs.php which is causing errors on beta-scap jobs. E.g: https://integration.wikimedia.org/ci/job/beta-scap-eqiad/122065/console Change-Id: Iddb5e4cbe14eda4cf744338ee14059b560b72701 --- M wmf-config/mobile-labs.php 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/46/313346/1 diff --git a/wmf-config/mobile-labs.php b/wmf-config/mobile-labs.php index ff80d8d..c27c752 100644 --- a/wmf-config/mobile-labs.php +++ b/wmf-config/mobile-labs.php @@ -17,7 +17,6 @@ $wgMobileFrontendLogo = $wgLogo; $wgMFForceSecureLogin = false; -$wgMFUseCentralAuthToken = $wmgMFUseCentralAuthToken; $wgMFSpecialCaseMainPage = $wmgMFSpecialCaseMainPage; $wgMFMobileFormatterHeadings = $wmgMFMobileFormatterHeadings; -- To view, visit https://gerrit.wikimedia.org/r/313346 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iddb5e4cbe14eda4cf744338ee14059b560b72701 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: 20after4___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Remove handling for bad data (language = '_' as we are clean...
jenkins-bot has submitted this change and it was merged. Change subject: Remove handling for bad data (language = '_' as we are cleaning that up .. Remove handling for bad data (language = '_' as we are cleaning that up Bug: T96410 Change-Id: I796d2e859da7d25dd8316dd795012cbd2397d066 --- M sites/all/modules/thank_you/thank_you.module 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Eileen: Looks good to me, approved jenkins-bot: Verified diff --git a/sites/all/modules/thank_you/thank_you.module b/sites/all/modules/thank_you/thank_you.module index 69b0ccc..714ffc5 100644 --- a/sites/all/modules/thank_you/thank_you.module +++ b/sites/all/modules/thank_you/thank_you.module @@ -324,7 +324,7 @@ } $locale = $contact['preferred_language']; -if ( !$locale or substr( $locale, 0, 1 ) === '_' ) { +if ( !$locale ) { watchdog( 'thank_you', "Donor language unknown. Defaulting to English...", NULL, WATCHDOG_INFO ); $locale = 'en'; } -- To view, visit https://gerrit.wikimedia.org/r/313345 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I796d2e859da7d25dd8316dd795012cbd2397d066 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: deployment Gerrit-Owner: EileenGerrit-Reviewer: Awight Gerrit-Reviewer: Cdentinger Gerrit-Reviewer: Eileen Gerrit-Reviewer: Ejegg Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Clean up legacy junk data from preferred_language field.
jenkins-bot has submitted this change and it was merged. Change subject: Clean up legacy junk data from preferred_language field. .. Clean up legacy junk data from preferred_language field. This nulls out '_' junk data string (19690 rows) and changes '_US' to 'en_US' (which is implied) (25387 rows). Bug: T96410 Change-Id: Ibcb286ff00fd0ec079eaab65d13960a13b48940e --- M sites/all/modules/wmf_civicrm/wmf_civicrm.install 1 file changed, 26 insertions(+), 0 deletions(-) Approvals: Eileen: Looks good to me, approved jenkins-bot: Verified diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.install b/sites/all/modules/wmf_civicrm/wmf_civicrm.install index bfb9e76..07b770f 100644 --- a/sites/all/modules/wmf_civicrm/wmf_civicrm.install +++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.install @@ -2282,3 +2282,29 @@ CRM_Core_DAO::executeQuery("UPDATE civicrm_option_value SET is_active = 0 WHERE option_group_id = 86 AND value IN('" . implode("', '", $nonUsefulEnglishes) . "')"); } + +/** + * Clean up legacy junk data from preferred_language field. + * + * This nulls out '_' junk data string (19690 rows) + * and changes '_US' to 'en_US' (which is implied) (25387 rows). + * plus some other oddities. + * + * Bug: T96410 + */ +function wmf_civicrm_update_7275() { + civicrm_initialize(); + // 19691 records. + CRM_Core_DAO::executeQuery("UPDATE civicrm_contact SET preferred_language = NULL WHERE preferred_language = '_' OR preferred_language = 'Gerrit-Reviewer: Awight Gerrit-Reviewer: Cdentinger Gerrit-Reviewer: Eileen Gerrit-Reviewer: Ejegg Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Clean up legacy junk data from preferred_language field.
Eileen has uploaded a new change for review. https://gerrit.wikimedia.org/r/313344 Change subject: Clean up legacy junk data from preferred_language field. .. Clean up legacy junk data from preferred_language field. This nulls out '_' junk data string (19690 rows) and changes '_US' to 'en_US' (which is implied) (25387 rows). Bug: T96410 Change-Id: Ibcb286ff00fd0ec079eaab65d13960a13b48940e --- M sites/all/modules/wmf_civicrm/wmf_civicrm.install 1 file changed, 26 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/44/313344/1 diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.install b/sites/all/modules/wmf_civicrm/wmf_civicrm.install index bfb9e76..07b770f 100644 --- a/sites/all/modules/wmf_civicrm/wmf_civicrm.install +++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.install @@ -2282,3 +2282,29 @@ CRM_Core_DAO::executeQuery("UPDATE civicrm_option_value SET is_active = 0 WHERE option_group_id = 86 AND value IN('" . implode("', '", $nonUsefulEnglishes) . "')"); } + +/** + * Clean up legacy junk data from preferred_language field. + * + * This nulls out '_' junk data string (19690 rows) + * and changes '_US' to 'en_US' (which is implied) (25387 rows). + * plus some other oddities. + * + * Bug: T96410 + */ +function wmf_civicrm_update_7275() { + civicrm_initialize(); + // 19691 records. + CRM_Core_DAO::executeQuery("UPDATE civicrm_contact SET preferred_language = NULL WHERE preferred_language = '_' OR preferred_language = '___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Remove handling for bad data (language = '_' as we are clean...
Eileen has uploaded a new change for review. https://gerrit.wikimedia.org/r/313345 Change subject: Remove handling for bad data (language = '_' as we are cleaning that up .. Remove handling for bad data (language = '_' as we are cleaning that up Bug: T96410 Change-Id: I796d2e859da7d25dd8316dd795012cbd2397d066 --- M sites/all/modules/thank_you/thank_you.module 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/45/313345/1 diff --git a/sites/all/modules/thank_you/thank_you.module b/sites/all/modules/thank_you/thank_you.module index 69b0ccc..714ffc5 100644 --- a/sites/all/modules/thank_you/thank_you.module +++ b/sites/all/modules/thank_you/thank_you.module @@ -324,7 +324,7 @@ } $locale = $contact['preferred_language']; -if ( !$locale or substr( $locale, 0, 1 ) === '_' ) { +if ( !$locale ) { watchdog( 'thank_you', "Donor language unknown. Defaulting to English...", NULL, WATCHDOG_INFO ); $locale = 'en'; } -- To view, visit https://gerrit.wikimedia.org/r/313345 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I796d2e859da7d25dd8316dd795012cbd2397d066 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: deployment Gerrit-Owner: Eileen___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...AbuseFilter[master]: Use newer form of getLocalServerInstance() fallback
jenkins-bot has submitted this change and it was merged. Change subject: Use newer form of getLocalServerInstance() fallback .. Use newer form of getLocalServerInstance() fallback Change-Id: Id4bb30fcec0a43bb22c2c043f4bb82acf035d439 --- M AbuseFilter.parser.new.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/AbuseFilter.parser.new.php b/AbuseFilter.parser.new.php index 6b920d3..82afcbe 100644 --- a/AbuseFilter.parser.new.php +++ b/AbuseFilter.parser.new.php @@ -775,7 +775,7 @@ public function intEval( $code ) { static $cache = null; if ( !$cache ) { - $cache = ObjectCache::getLocalServerInstance( array(), 'hash' ); + $cache = ObjectCache::getLocalServerInstance( 'hash' ); } $tree = $cache->getWithSetCallback( -- To view, visit https://gerrit.wikimedia.org/r/313343 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id4bb30fcec0a43bb22c2c043f4bb82acf035d439 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/AbuseFilter Gerrit-Branch: master Gerrit-Owner: Aaron SchulzGerrit-Reviewer: Jackmcbarn Gerrit-Reviewer: Legoktm Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add the main stash, WAN, and server caches to MediaWikiServices
jenkins-bot has submitted this change and it was merged. Change subject: Add the main stash, WAN, and server caches to MediaWikiServices .. Add the main stash, WAN, and server caches to MediaWikiServices Also removed unused getLocalServerInstance() b/c $fallback logic. Change-Id: Ifa5f798de10783741a7b079f22d283bb9cb7f4c0 --- M includes/MediaWikiServices.php M includes/ServiceWiring.php M includes/objectcache/ObjectCache.php M tests/phpunit/MediaWikiTestCase.php M tests/phpunit/includes/MediaWikiServicesTest.php 5 files changed, 96 insertions(+), 23 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/MediaWikiServices.php b/includes/MediaWikiServices.php index b16044e..199472a 100644 --- a/includes/MediaWikiServices.php +++ b/includes/MediaWikiServices.php @@ -591,6 +591,30 @@ /** * @since 1.28 +* @return \BagOStuff +*/ + public function getMainObjectStash() { + return $this->getService( 'MainObjectStash' ); + } + + /** +* @since 1.28 +* @return \WANObjectCache +*/ + public function getMainWANObjectCache() { + return $this->getService( 'MainWANObjectCache' ); + } + + /** +* @since 1.28 +* @return \BagOStuff +*/ + public function getLocalServerObjectCache() { + return $this->getService( 'LocalServerObjectCache' ); + } + + /** +* @since 1.28 * @return VirtualRESTServiceClient */ public function getVirtualRESTServiceClient() { diff --git a/includes/ServiceWiring.php b/includes/ServiceWiring.php index 6044911..0e4daa6 100644 --- a/includes/ServiceWiring.php +++ b/includes/ServiceWiring.php @@ -218,6 +218,59 @@ return $services->getService( '_MediaWikiTitleCodec' ); }, + 'MainObjectStash' => function( MediaWikiServices $services ) { + $mainConfig = $services->getMainConfig(); + + $id = $mainConfig->get( 'MainStash' ); + if ( !isset( $mainConfig->get( 'ObjectCaches' )[$id] ) ) { + throw new UnexpectedValueException( + "Cache type \"$id\" is not present in \$wgObjectCaches." ); + } + + return \ObjectCache::newFromParams( $mainConfig->get( 'ObjectCaches' )[$id] ); + }, + + 'MainWANObjectCache' => function( MediaWikiServices $services ) { + $mainConfig = $services->getMainConfig(); + + $id = $mainConfig->get( 'MainWANCache' ); + if ( !isset( $mainConfig->get( 'WANObjectCaches' )[$id] ) ) { + throw new UnexpectedValueException( + "WAN cache type \"$id\" is not present in \$wgWANObjectCaches." ); + } + + $params = $mainConfig->get( 'WANObjectCaches' )[$id]; + $objectCacheId = $params['cacheId']; + if ( !isset( $mainConfig->get( 'ObjectCaches' )[$objectCacheId] ) ) { + throw new UnexpectedValueException( + "Cache type \"$objectCacheId\" is not present in \$wgObjectCaches." ); + } + $params['store'] = $mainConfig->get( 'ObjectCaches' )[$objectCacheId]; + + return \ObjectCache::newWANCacheFromParams( $params ); + }, + + 'LocalServerObjectCache' => function( MediaWikiServices $services ) { + $mainConfig = $services->getMainConfig(); + + if ( function_exists( 'apc_fetch' ) ) { + $id = 'apc'; + } elseif ( function_exists( 'xcache_get' ) && wfIniGetBool( 'xcache.var_size' ) ) { + $id = 'xcache'; + } elseif ( function_exists( 'wincache_ucache_get' ) ) { + $id = 'wincache'; + } else { + $id = CACHE_NONE; + } + + if ( !isset( $mainConfig->get( 'ObjectCaches' )[$id] ) ) { + throw new UnexpectedValueException( + "Cache type \"$id\" is not present in \$wgObjectCaches." ); + } + + return \ObjectCache::newFromParams( $mainConfig->get( 'ObjectCaches' )[$id] ); + }, + 'VirtualRESTServiceClient' => function( MediaWikiServices $services ) { $config = $services->getMainConfig()->get( 'VirtualRestConfig' ); diff --git a/includes/objectcache/ObjectCache.php b/includes/objectcache/ObjectCache.php index d81f9e1..0f18479 100644 --- a/includes/objectcache/ObjectCache.php +++ b/includes/objectcache/ObjectCache.php @@ -274,27 +274,18 @@ * // From $wgObjectCaches via newFromParams() * ObjectCache::getLocalServerInstance( [ 'fallback' => $fallbackType ] );
[MediaWiki-commits] [Gerrit] mediawiki...AbuseFilter[master]: Use newer form of getLocalServerInstance() fallback
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/313343 Change subject: Use newer form of getLocalServerInstance() fallback .. Use newer form of getLocalServerInstance() fallback Change-Id: Id4bb30fcec0a43bb22c2c043f4bb82acf035d439 --- M AbuseFilter.parser.new.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AbuseFilter refs/changes/43/313343/1 diff --git a/AbuseFilter.parser.new.php b/AbuseFilter.parser.new.php index 6b920d3..82afcbe 100644 --- a/AbuseFilter.parser.new.php +++ b/AbuseFilter.parser.new.php @@ -775,7 +775,7 @@ public function intEval( $code ) { static $cache = null; if ( !$cache ) { - $cache = ObjectCache::getLocalServerInstance( array(), 'hash' ); + $cache = ObjectCache::getLocalServerInstance( 'hash' ); } $tree = $cache->getWithSetCallback( -- To view, visit https://gerrit.wikimedia.org/r/313343 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id4bb30fcec0a43bb22c2c043f4bb82acf035d439 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/AbuseFilter 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] mediawiki...CollaborationKit[master]: Add AllowedNamespaces configuration variables for hubs and l...
jenkins-bot has submitted this change and it was merged. Change subject: Add AllowedNamespaces configuration variables for hubs and lists .. Add AllowedNamespaces configuration variables for hubs and lists Users* may want to change the namespaces in which hubs/lists are allowed in order to fullfill unexpected use cases. We don't care; we'll just leave it an option. Separate variables are used for hubs and lists as uses may vary for each. Hubs now also specifically check if subpages are allowed for the namespace in case a user misconfigures their wiki. Allowed namespaces are set to user (2) and project (4) by default. Unless that's the other way around. I've forgotten already, but it's those two. * All mentions of 'users' here refers to sysadmins with localsettings access, not onwiki users. This is a follow-up on initial implementation for T141004. Change-Id: If70bff87c8324f425d32511d94beaac17017cf41 --- M extension.json M includes/content/CollaborationHubContentHandler.php M includes/content/CollaborationListContentHandler.php 3 files changed, 21 insertions(+), 2 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/extension.json b/extension.json index dbdfeb3..1747618 100644 --- a/extension.json +++ b/extension.json @@ -33,6 +33,18 @@ "CollaborationHubContent": "CollaborationHubContentHandler", "CollaborationListContent": "CollaborationListContentHandler" }, + "config": { + "CollaborationHubAllowedNamespaces": { + "_merge_strategy": "array_plus", + "2": true, + "4": true + }, + "CollaborationListAllowedNamespaces": { + "_merge_strategy": "array_plus", + "2": true, + "4": true + } + }, "SpecialPages": { "CreateCollaborationHub": "SpecialCreateCollaborationHub", "CreateHubFeature": "SpecialCreateHubFeature" diff --git a/includes/content/CollaborationHubContentHandler.php b/includes/content/CollaborationHubContentHandler.php index d6a8e0e..5786ad9 100644 --- a/includes/content/CollaborationHubContentHandler.php +++ b/includes/content/CollaborationHubContentHandler.php @@ -7,7 +7,12 @@ } public function canBeUsedOn( Title $title ) { - if ( $title->inNamespace( NS_PROJECT ) || $title->inNamespace( NS_USER ) ) { + global $wgCollaborationHubAllowedNamespaces; + + $namespace = $title->getNamespace(); + if ( in_array( $namespace, array_keys( array_filter( $wgCollaborationHubAllowedNamespaces ) ) ) + && MWNamespace::hasSubpages( $namespace ) ) { + return true; } return false; diff --git a/includes/content/CollaborationListContentHandler.php b/includes/content/CollaborationListContentHandler.php index b10da7c..db94e5e 100644 --- a/includes/content/CollaborationListContentHandler.php +++ b/includes/content/CollaborationListContentHandler.php @@ -20,7 +20,9 @@ } public function canBeUsedOn( Title $title ) { - if ( $title->inNamespace( NS_PROJECT ) || $title->inNamespace( NS_USER ) ) { + global $wgCollaborationListAllowedNamespaces; + + if ( in_array( $title->getNamespace(), array_keys( array_filter( $wgCollaborationListAllowedNamespaces ) ) ) ) { return true; } return false; -- To view, visit https://gerrit.wikimedia.org/r/313182 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If70bff87c8324f425d32511d94beaac17017cf41 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/CollaborationKit Gerrit-Branch: master Gerrit-Owner: IsarraGerrit-Reviewer: Harej Gerrit-Reviewer: Legoktm Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Disallow css attr() with url type
jenkins-bot has submitted this change and it was merged. Change subject: Disallow css attr() with url type .. Disallow css attr() with url type CSS3 seems like it will extend the attr() function which can interpret attribute as different types, including 'url', which "...is interpreted as a quoted string within the ‘url()’ notation." Currently no browsers support this syntax yet, so submitting this as a normal non-security patch. Bug: T68404 Change-Id: Icdae989764754c985a9292d62efae7cc47009df5 --- M includes/Sanitizer.php M tests/phpunit/includes/SanitizerTest.php 2 files changed, 3 insertions(+), 0 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Sanitizer.php b/includes/Sanitizer.php index 8f1fc99..7cd21d8 100644 --- a/includes/Sanitizer.php +++ b/includes/Sanitizer.php @@ -1015,6 +1015,7 @@ | url\s*\( | image\s*\( | image-set\s*\( + | attr\s*\([^)]+[\s,]+url !ix', $value ) ) { return '/* insecure input */'; } diff --git a/tests/phpunit/includes/SanitizerTest.php b/tests/phpunit/includes/SanitizerTest.php index 26529e8..c915b70 100644 --- a/tests/phpunit/includes/SanitizerTest.php +++ b/tests/phpunit/includes/SanitizerTest.php @@ -314,6 +314,8 @@ '/* insecure input */', 'background-image: -moz-image-set("asdf.png" 1x, "asdf.png" 2x);' ], + [ '/* insecure input */', 'foo: attr( title, url );' ], + [ '/* insecure input */', 'foo: attr( title url );' ], ]; } -- To view, visit https://gerrit.wikimedia.org/r/310257 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icdae989764754c985a9292d62efae7cc47009df5 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Brian WolffGerrit-Reviewer: CSteipp Gerrit-Reviewer: Dpatrick Gerrit-Reviewer: Jackmcbarn Gerrit-Reviewer: Legoktm Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[deployment]: Merge branch 'master' into deployment
Cdentinger has submitted this change and it was merged. Change subject: Merge branch 'master' into deployment .. Merge branch 'master' into deployment + fb4b4427cdc67a656408b8f947bbbefb7396fe25 Don't escape unicode while hoop-jumping Change-Id: Id987b555849cdb148ca6c3e2356d17e89270ca32 --- 0 files changed, 0 insertions(+), 0 deletions(-) Approvals: Cdentinger: Verified; Looks good to me, approved -- To view, visit https://gerrit.wikimedia.org/r/313342 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id987b555849cdb148ca6c3e2356d17e89270ca32 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/SmashPig Gerrit-Branch: deployment Gerrit-Owner: CdentingerGerrit-Reviewer: Cdentinger Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[deployment]: Merge branch 'master' into deployment
Cdentinger has uploaded a new change for review. https://gerrit.wikimedia.org/r/313342 Change subject: Merge branch 'master' into deployment .. Merge branch 'master' into deployment + fb4b4427cdc67a656408b8f947bbbefb7396fe25 Don't escape unicode while hoop-jumping Change-Id: Id987b555849cdb148ca6c3e2356d17e89270ca32 --- 0 files changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig refs/changes/42/313342/1 -- To view, visit https://gerrit.wikimedia.org/r/313342 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id987b555849cdb148ca6c3e2356d17e89270ca32 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/SmashPig Gerrit-Branch: deployment Gerrit-Owner: Cdentinger___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: Don't escape unicode while hoop-jumping
jenkins-bot has submitted this change and it was merged. Change subject: Don't escape unicode while hoop-jumping .. Don't escape unicode while hoop-jumping We're doing silly things to hydrate classes. Do silly things less dumbly. Change-Id: I57d120316a5fcd4460644f4e452e4b9f4f8a9f32 --- M Core/QueueConsumers/JobQueueConsumer.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Cdentinger: Looks good to me, approved jenkins-bot: Verified diff --git a/Core/QueueConsumers/JobQueueConsumer.php b/Core/QueueConsumers/JobQueueConsumer.php index bbc48e0..b7aa838 100644 --- a/Core/QueueConsumers/JobQueueConsumer.php +++ b/Core/QueueConsumers/JobQueueConsumer.php @@ -30,7 +30,7 @@ $className = $jobMessage['php-message-class']; Logger::info( "Hydrating a message with class $className" ); - $jsonMessage = json_encode( $jobMessage ); + $jsonMessage = json_encode( $jobMessage, JSON_UNESCAPED_UNICODE ); Logger::debug( "Job payload: $jsonMessage" ); $jobObj = KeyedOpaqueStorableObject::fromJsonProxy( $className, $jsonMessage ); -- To view, visit https://gerrit.wikimedia.org/r/313341 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I57d120316a5fcd4460644f4e452e4b9f4f8a9f32 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/SmashPig Gerrit-Branch: master Gerrit-Owner: EjeggGerrit-Reviewer: Cdentinger Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: Don't escape unicode while hoop-jumping
Ejegg has uploaded a new change for review. https://gerrit.wikimedia.org/r/313341 Change subject: Don't escape unicode while hoop-jumping .. Don't escape unicode while hoop-jumping We're doing silly things to hydrate classes. Do silly things less dumbly. Change-Id: I57d120316a5fcd4460644f4e452e4b9f4f8a9f32 --- M Core/QueueConsumers/JobQueueConsumer.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig refs/changes/41/313341/1 diff --git a/Core/QueueConsumers/JobQueueConsumer.php b/Core/QueueConsumers/JobQueueConsumer.php index bbc48e0..b7aa838 100644 --- a/Core/QueueConsumers/JobQueueConsumer.php +++ b/Core/QueueConsumers/JobQueueConsumer.php @@ -30,7 +30,7 @@ $className = $jobMessage['php-message-class']; Logger::info( "Hydrating a message with class $className" ); - $jsonMessage = json_encode( $jobMessage ); + $jsonMessage = json_encode( $jobMessage, JSON_UNESCAPED_UNICODE ); Logger::debug( "Job payload: $jsonMessage" ); $jobObj = KeyedOpaqueStorableObject::fromJsonProxy( $className, $jsonMessage ); -- To view, visit https://gerrit.wikimedia.org/r/313341 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I57d120316a5fcd4460644f4e452e4b9f4f8a9f32 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/SmashPig Gerrit-Branch: master Gerrit-Owner: Ejegg___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Remove handling for bad data (language = '_' as we are clean...
jenkins-bot has submitted this change and it was merged. Change subject: Remove handling for bad data (language = '_' as we are cleaning that up .. Remove handling for bad data (language = '_' as we are cleaning that up Bug: T96410 Change-Id: I796d2e859da7d25dd8316dd795012cbd2397d066 --- M sites/all/modules/thank_you/thank_you.module 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Ejegg: Looks good to me, approved jenkins-bot: Verified diff --git a/sites/all/modules/thank_you/thank_you.module b/sites/all/modules/thank_you/thank_you.module index 69b0ccc..714ffc5 100644 --- a/sites/all/modules/thank_you/thank_you.module +++ b/sites/all/modules/thank_you/thank_you.module @@ -324,7 +324,7 @@ } $locale = $contact['preferred_language']; -if ( !$locale or substr( $locale, 0, 1 ) === '_' ) { +if ( !$locale ) { watchdog( 'thank_you', "Donor language unknown. Defaulting to English...", NULL, WATCHDOG_INFO ); $locale = 'en'; } -- To view, visit https://gerrit.wikimedia.org/r/310724 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I796d2e859da7d25dd8316dd795012cbd2397d066 Gerrit-PatchSet: 6 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: EileenGerrit-Reviewer: Awight Gerrit-Reviewer: Cdentinger Gerrit-Reviewer: Ejegg Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Clean up legacy junk data from preferred_language field.
jenkins-bot has submitted this change and it was merged. Change subject: Clean up legacy junk data from preferred_language field. .. Clean up legacy junk data from preferred_language field. This nulls out '_' junk data string (19690 rows) and changes '_US' to 'en_US' (which is implied) (25387 rows). Bug: T96410 Change-Id: Ibcb286ff00fd0ec079eaab65d13960a13b48940e --- M sites/all/modules/wmf_civicrm/wmf_civicrm.install 1 file changed, 26 insertions(+), 0 deletions(-) Approvals: Ejegg: Looks good to me, approved jenkins-bot: Verified diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.install b/sites/all/modules/wmf_civicrm/wmf_civicrm.install index bfb9e76..07b770f 100644 --- a/sites/all/modules/wmf_civicrm/wmf_civicrm.install +++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.install @@ -2282,3 +2282,29 @@ CRM_Core_DAO::executeQuery("UPDATE civicrm_option_value SET is_active = 0 WHERE option_group_id = 86 AND value IN('" . implode("', '", $nonUsefulEnglishes) . "')"); } + +/** + * Clean up legacy junk data from preferred_language field. + * + * This nulls out '_' junk data string (19690 rows) + * and changes '_US' to 'en_US' (which is implied) (25387 rows). + * plus some other oddities. + * + * Bug: T96410 + */ +function wmf_civicrm_update_7275() { + civicrm_initialize(); + // 19691 records. + CRM_Core_DAO::executeQuery("UPDATE civicrm_contact SET preferred_language = NULL WHERE preferred_language = '_' OR preferred_language = 'Gerrit-Reviewer: Awight Gerrit-Reviewer: Cdentinger Gerrit-Reviewer: Eileen Gerrit-Reviewer: Ejegg Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: API: Add generator non-continuation data
jenkins-bot has submitted this change and it was merged. Change subject: API: Add generator non-continuation data .. API: Add generator non-continuation data Some generators (e.g. generator=recentchanges) in their default mode of operation are particularly prone to not generating the same result set on subsequent requests due to intervening activity on the wiki adding new entries to the start of the list. We can mitigate this effect by allowing such generators to provide "non-continuation" data to be used if the generator isn't being continued. ApiQueryRecentChanges and ApiQueryAllRevisions are updated to set this new property. Other generators can easily be updated in the same way as needed. There isn't anything we can do about generators prone to having entries added at random positions in the list rather than the beginning, unfortunately. Bug: T146176 Change-Id: I8308d6aa2c89fd2a85e74c7dd8a0a2a9ec927490 --- M includes/api/ApiContinuationManager.php M includes/api/ApiQuery.php M includes/api/ApiQueryAllRevisions.php M includes/api/ApiQueryRecentChanges.php 4 files changed, 56 insertions(+), 2 deletions(-) Approvals: Gergő Tisza: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/api/ApiContinuationManager.php b/includes/api/ApiContinuationManager.php index 6601fb7..19e2453 100644 --- a/includes/api/ApiContinuationManager.php +++ b/includes/api/ApiContinuationManager.php @@ -31,6 +31,7 @@ private $continuationData = []; private $generatorContinuationData = []; + private $generatorNonContinuationData = []; private $generatorParams = []; private $generatorDone = false; @@ -143,6 +144,26 @@ } /** +* Set the non-continuation parameter for the generator module +* +* In case the generator isn't going to be continued, this sets the fields +* to return. +* +* @since 1.28 +* @param ApiBase $module +* @param string $paramName +* @param string|array $paramValue +*/ + public function addGeneratorNonContinueParam( ApiBase $module, $paramName, $paramValue ) { + $name = $module->getModuleName(); + $paramName = $module->encodeParamName( $paramName ); + if ( is_array( $paramValue ) ) { + $paramValue = implode( '|', $paramValue ); + } + $this->generatorNonContinuationData[$name][$paramName] = $paramValue; + } + + /** * Set the continuation parameter for the generator module * @param ApiBase $module * @param string $paramName @@ -163,6 +184,15 @@ */ public function getRawContinuation() { return array_merge_recursive( $this->continuationData, $this->generatorContinuationData ); + } + + /** +* Fetch raw non-continuation data +* @since 1.28 +* @return array +*/ + public function getRawNonContinuation() { + return $this->generatorNonContinuationData; } /** @@ -192,8 +222,13 @@ foreach ( $continuationData as $module => $kvp ) { $data += $kvp; } - $data += $this->generatorParams; - $generatorKeys = implode( '|', array_keys( $this->generatorParams ) ); + $generatorParams = []; + foreach ( $this->generatorNonContinuationData as $kvp ) { + $generatorParams += $kvp; + } + $generatorParams += $this->generatorParams; + $data += $generatorParams; + $generatorKeys = implode( '|', array_keys( $generatorParams ) ); } elseif ( $this->generatorContinuationData ) { // All the generator-using modules are complete, but the // generator isn't. Continue the generator and restart the diff --git a/includes/api/ApiQuery.php b/includes/api/ApiQuery.php index 5e3c709..e8aa655 100644 --- a/includes/api/ApiQuery.php +++ b/includes/api/ApiQuery.php @@ -258,6 +258,11 @@ // Write the continuation data into the result $this->setContinuationManager( null ); if ( $this->mParams['rawcontinue'] ) { + $data = $continuationManager->getRawNonContinuation(); + if ( $data ) { + $this->getResult()->addValue( null, 'query-noncontinue', $data, + ApiResult::ADD_ON_TOP | ApiResult::NO_SIZE_CHECK ); + } $data = $continuationManager->getRawContinuation(); if ( $data ) {
[MediaWiki-commits] [Gerrit] mediawiki...OAuth[master]: Use mw-ui-progressive CSS class for buttons
jenkins-bot has submitted this change and it was merged. Change subject: Use mw-ui-progressive CSS class for buttons .. Use mw-ui-progressive CSS class for buttons mw-ui-constructive and mw-ui-primary are deprecated. Bug: T146923 Change-Id: I04ca93a4a664c70d51a7f52443a823f4c7bd8eb3 --- M frontend/specialpages/SpecialMWOAuth.php M frontend/specialpages/SpecialMWOAuthManageMyGrants.php 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: VolkerE: Looks good to me, approved jenkins-bot: Verified diff --git a/frontend/specialpages/SpecialMWOAuth.php b/frontend/specialpages/SpecialMWOAuth.php index 2fed2a9..0397987 100644 --- a/frontend/specialpages/SpecialMWOAuth.php +++ b/frontend/specialpages/SpecialMWOAuth.php @@ -397,7 +397,7 @@ $form->suppressDefaultSubmit(); $form->addButton( 'accept', wfMessage( 'mwoauth-form-button-approve' )->text(), null, - array( 'class' => 'mw-mwoauth-authorize-button mw-ui-button mw-ui-constructive', + array( 'class' => 'mw-mwoauth-authorize-button mw-ui-button mw-ui-progressive', 'id' => 'mw-mwoauth-accept' ) ); $form->addButton( 'cancel', wfMessage( 'mwoauth-form-button-cancel' )->text(), null, diff --git a/frontend/specialpages/SpecialMWOAuthManageMyGrants.php b/frontend/specialpages/SpecialMWOAuthManageMyGrants.php index d869f37..b089954 100644 --- a/frontend/specialpages/SpecialMWOAuthManageMyGrants.php +++ b/frontend/specialpages/SpecialMWOAuthManageMyGrants.php @@ -227,7 +227,7 @@ $form->addButton( 'update', $this->msg( 'mwoauthmanagemygrants-update' )->text(), null, - array( 'class' => 'mw-ui-button mw-ui-primary' ) + array( 'class' => 'mw-ui-button mw-ui-progressive' ) ); } $form->addPreText( -- To view, visit https://gerrit.wikimedia.org/r/313313 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I04ca93a4a664c70d51a7f52443a823f4c7bd8eb3 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/OAuth Gerrit-Branch: master Gerrit-Owner: JdlrobsonGerrit-Reviewer: VolkerE Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[deployment]: Merge branch 'master' into deployment
Ejegg has submitted this change and it was merged. Change subject: Merge branch 'master' into deployment .. Merge branch 'master' into deployment 7d8021c Logging for JobQueueConsumer Change-Id: Ic86f277114b38ebfa7c910f2126b23cc59e5d930 --- 0 files changed, 0 insertions(+), 0 deletions(-) Approvals: Ejegg: Verified; Looks good to me, approved -- To view, visit https://gerrit.wikimedia.org/r/313339 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic86f277114b38ebfa7c910f2126b23cc59e5d930 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/SmashPig Gerrit-Branch: deployment Gerrit-Owner: EjeggGerrit-Reviewer: Ejegg Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Make multi-write backend "template" config work as expected
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/313340 Change subject: Make multi-write backend "template" config work as expected .. Make multi-write backend "template" config work as expected * FileBackendGroup now applies the usual config for these sub-backends, the same config get() applies. * Also make sure FileBackendMultiWrite::concatenate() uses the status wrapper. Bug: T146904 Change-Id: I1e9b5027dbac11ea9484cd16851e5db998574429 --- M includes/filebackend/FileBackendGroup.php M includes/libs/filebackend/FileBackendMultiWrite.php 2 files changed, 21 insertions(+), 20 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/40/313340/1 diff --git a/includes/filebackend/FileBackendGroup.php b/includes/filebackend/FileBackendGroup.php index ede73aa..18941b6 100644 --- a/includes/filebackend/FileBackendGroup.php +++ b/includes/filebackend/FileBackendGroup.php @@ -149,30 +149,17 @@ * @throws InvalidArgumentException */ public function get( $name ) { - if ( !isset( $this->backends[$name] ) ) { - throw new InvalidArgumentException( "No backend defined with the name `$name`." ); - } // Lazy-load the actual backend instance if ( !isset( $this->backends[$name]['instance'] ) ) { - $class = $this->backends[$name]['class']; - $config = $this->backends[$name]['config']; - $config += [ - 'wikiId' => wfWikiID(), // e.g. "my_wiki-en_" - 'mimeCallback' => [ $this, 'guessMimeInternal' ], - 'obResetFunc' => 'wfResetOutputBuffers', - 'streamMimeFunc' => [ 'StreamFile', 'contentTypeFromPath' ] - ]; + $config = $this->config( $name ); + $config['lockManager'] = LockManagerGroup::singleton( $config['wikiId'] )->get( $config['lockManager'] ); $config['fileJournal'] = isset( $config['fileJournal'] ) ? FileJournal::factory( $config['fileJournal'], $name ) : FileJournal::factory( [ 'class' => 'NullFileJournal' ], $name ); - $config['wanCache'] = ObjectCache::getMainWANInstance(); - $config['srvCache'] = ObjectCache::getLocalServerInstance( 'hash' ); - $config['statusWrapper'] = [ 'Status', 'wrap' ]; - $config['tmpDirectory'] = wfTempDir(); - $config['logger'] = LoggerFactory::getInstance( 'FileOperation' ); - $config['profiler'] = Profiler::instance(); + + $class = $config['class']; if ( $class === 'FileBackendMultiWrite' ) { foreach ( $config['backends'] as $index => $beConfig ) { if ( isset( $beConfig['template'] ) ) { @@ -193,7 +180,7 @@ * Get the config array for a backend object with a given name * * @param string $name -* @return array +* @return array Parameters to FileBackend::__construct() * @throws InvalidArgumentException */ public function config( $name ) { @@ -202,7 +189,18 @@ } $class = $this->backends[$name]['class']; - return [ 'class' => $class ] + $this->backends[$name]['config']; + return [ 'class' => $class ] + $this->backends[$name]['config'] + [ + 'wikiId' => wfWikiID(), // e.g. "my_wiki-en_" + 'mimeCallback' => [ $this, 'guessMimeInternal' ], + 'obResetFunc' => 'wfResetOutputBuffers', + 'streamMimeFunc' => [ 'StreamFile', 'contentTypeFromPath' ], + 'tmpDirectory' => wfTempDir(), + 'statusWrapper' => [ 'Status', 'wrap' ], + 'wanCache' => ObjectCache::getMainWANInstance(), + 'srvCache' => ObjectCache::getLocalServerInstance( 'hash' ), + 'logger' => LoggerFactory::getInstance( 'FileOperation' ), + 'profiler' => Profiler::instance() + ]; } /** diff --git a/includes/libs/filebackend/FileBackendMultiWrite.php b/includes/libs/filebackend/FileBackendMultiWrite.php index 7c32d02..212e84f 100644 --- a/includes/libs/filebackend/FileBackendMultiWrite.php +++ b/includes/libs/filebackend/FileBackendMultiWrite.php @@ -575,11 +575,14 @@ } public function concatenate( array $params ) { + $status = $this->newStatus(); // We
[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Move Unsubscribe Queue Consumer off ActiveMQ
Ejegg has submitted this change and it was merged. Change subject: Move Unsubscribe Queue Consumer off ActiveMQ .. Move Unsubscribe Queue Consumer off ActiveMQ Move existing functionality over to the new queue. Bug: T145419 Change-Id: I17946ad6974c2e5dc1cd3a960d87a6af7f9383f8 --- A sites/all/modules/queue2civicrm/unsubscribe/UnsubscribeQueueConsumer.php M sites/all/modules/queue2civicrm/unsubscribe/wmf_unsubscribe_qc.info M sites/all/modules/queue2civicrm/unsubscribe/wmf_unsubscribe_qc.module 3 files changed, 140 insertions(+), 116 deletions(-) Approvals: Ejegg: Looks good to me, approved jenkins-bot: Verified diff --git a/sites/all/modules/queue2civicrm/unsubscribe/UnsubscribeQueueConsumer.php b/sites/all/modules/queue2civicrm/unsubscribe/UnsubscribeQueueConsumer.php new file mode 100644 index 000..6bd51fb --- /dev/null +++ b/sites/all/modules/queue2civicrm/unsubscribe/UnsubscribeQueueConsumer.php @@ -0,0 +1,126 @@ +getEmailsFromContribution( $contribId ); + + if ( count( $contacts ) === 0 ) { + watchdog( 'unsubscribe', + "$contribId: No contacts returned for contribution ID. Acking frame and returning.", + WATCHDOG_NOTICE ); + } else { + // Excellent -- we have a collection of emails to unsubscribe now! :) Check opt out status and add them to the array + foreach ( $contacts as $contact ) { + if ( $contact['is_opt_out'] == TRUE ) + { + watchdog( 'unsubscribe', "$contribId: Contact already opted out with this contribution ID.", + WATCHDOG_NOTICE ); + continue; + } + $email = strtolower( $contact['email'] ); + if ( !in_array( $email, $emails ) ) { + $emails[] = $email; + } + } + + // And opt them out + $count = $this->optOutEmails( $emails ); + watchdog( 'unsubscribe', "$contribId: Successfully updated $count rows." ); + } + } + + /** +* Obtains a list of arrays of (contact ID, is opt out, email address) for +* the contact specified by the given contribution. +* +* @param int $contributionId The Civi contribution ID +* +* @return array +*/ + function getEmailsFromContribution( $contributionId) { + $query = " + SELECT con.id, con.is_opt_out, e.email + FROM civicrm_contribution ct, civicrm_contact con + LEFT JOIN civicrm_email e + ON con.id = e.contact_id + WHERE ct.id = %1 AND ct.contact_id = con.id"; + + $dao = CRM_Core_DAO::executeQuery( $query, array( + 1 => array( $contributionId, 'Integer' ), + ) ); + + $out = array(); + while ( $dao->fetch() ) { + $out[] = array( + 'contact_id' => (int)$dao->id, + 'is_opt_out' => (bool)$dao->is_opt_out, + 'email' => $dao->email, + ); + } + return $out; + } + + /** +* Updates the Civi database with an opt out record for the specified email address +* +* @param array $emails Email addresses to unsubscribe +* +* @returns Number of affected rows +*/ + function optOutEmails( $emails) { + $escaped = array(); + foreach ($emails as $email) { + $escaped[] = "'" . addslashes( $email ) . "'"; + } + $email_condition = 'e.email IN (' . implode(', ', $escaped) . ')'; + + $query = <rowCount(); + } + +} + + + diff --git a/sites/all/modules/queue2civicrm/unsubscribe/wmf_unsubscribe_qc.info b/sites/all/modules/queue2civicrm/unsubscribe/wmf_unsubscribe_qc.info index f9daace..6d1de24 100644 --- a/sites/all/modules/queue2civicrm/unsubscribe/wmf_unsubscribe_qc.info +++ b/sites/all/modules/queue2civicrm/unsubscribe/wmf_unsubscribe_qc.info @@ -4,3 +4,4 @@ package = queue2civicrm configure = admin/config/queue2civicrm/unsubscribe_qc dependencies[] = queue2civicrm +files[] = UnsubscribeQueueConsumer.php diff --git a/sites/all/modules/queue2civicrm/unsubscribe/wmf_unsubscribe_qc.module
[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[deployment]: Merge branch 'master' into deployment
Ejegg has uploaded a new change for review. https://gerrit.wikimedia.org/r/313339 Change subject: Merge branch 'master' into deployment .. Merge branch 'master' into deployment 7d8021c Logging for JobQueueConsumer Change-Id: Ic86f277114b38ebfa7c910f2126b23cc59e5d930 --- 0 files changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig refs/changes/39/313339/1 -- To view, visit https://gerrit.wikimedia.org/r/313339 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic86f277114b38ebfa7c910f2126b23cc59e5d930 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/SmashPig 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] wikimedia...SmashPig[master]: Logging for JobQueueConsumer
jenkins-bot has submitted this change and it was merged. Change subject: Logging for JobQueueConsumer .. Logging for JobQueueConsumer Change-Id: I9409efa602b076fc892f2e2d33acc633207f0bfd --- M Core/QueueConsumers/JobQueueConsumer.php 1 file changed, 6 insertions(+), 0 deletions(-) Approvals: Awight: Looks good to me, approved jenkins-bot: Verified diff --git a/Core/QueueConsumers/JobQueueConsumer.php b/Core/QueueConsumers/JobQueueConsumer.php index c96ad4e..bbc48e0 100644 --- a/Core/QueueConsumers/JobQueueConsumer.php +++ b/Core/QueueConsumers/JobQueueConsumer.php @@ -2,6 +2,7 @@ use RuntimeException; use SmashPig\Core\DataStores\KeyedOpaqueStorableObject; +use SmashPig\Core\Logging\Logger; use SmashPig\Core\Runnable; class JobQueueConsumer extends BaseQueueConsumer { @@ -27,10 +28,15 @@ // things as properties. The message is mingled with stuff like // php-message-class. Could collide. $className = $jobMessage['php-message-class']; + Logger::info( "Hydrating a message with class $className" ); + $jsonMessage = json_encode( $jobMessage ); + + Logger::debug( "Job payload: $jsonMessage" ); $jobObj = KeyedOpaqueStorableObject::fromJsonProxy( $className, $jsonMessage ); if ( $jobObj instanceof Runnable ) { + Logger::info( 'Running job' ); if ( !$jobObj->execute() ) { throw new RuntimeException( 'Job tells us that it did not successfully execute. ' -- To view, visit https://gerrit.wikimedia.org/r/313337 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9409efa602b076fc892f2e2d33acc633207f0bfd Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/SmashPig Gerrit-Branch: master Gerrit-Owner: EjeggGerrit-Reviewer: Awight Gerrit-Reviewer: Cdentinger Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add Collation to MediaWikiServices
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/313338 Change subject: Add Collation to MediaWikiServices .. Add Collation to MediaWikiServices Also add a Collation::getName() function to return the name of the currently configured collation type to avoid usage of $wgCategoryCollation. Change-Id: I6fa8ad9a5ae76d44801bf70e8236b51814edda39 --- M includes/CategoryViewer.php M includes/MediaWikiServices.php M includes/MovePage.php M includes/ServiceWiring.php M includes/api/ApiQueryCategoryMembers.php M includes/collation/Collation.php M includes/collation/CollationCkb.php M includes/collation/CollationEt.php M includes/collation/IcuCollation.php M includes/collation/IdentityCollation.php M includes/collation/NumericUppercaseCollation.php M includes/collation/UppercaseCollation.php M includes/deferred/LinksUpdate.php M maintenance/updateCollation.php M tests/phpunit/includes/MediaWikiServicesTest.php 15 files changed, 82 insertions(+), 28 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/38/313338/1 diff --git a/includes/CategoryViewer.php b/includes/CategoryViewer.php index c858dd7..0b622e9 100644 --- a/includes/CategoryViewer.php +++ b/includes/CategoryViewer.php @@ -98,7 +98,7 @@ $this->limit = $context->getConfig()->get( 'CategoryPagingLimit' ); $this->cat = Category::newFromTitle( $title ); $this->query = $query; - $this->collation = Collation::singleton(); + $this->collation = MediaWikiServices::getInstance()->getCollation(); unset( $this->query['title'] ); } diff --git a/includes/MediaWikiServices.php b/includes/MediaWikiServices.php index b16044e..f12695e 100644 --- a/includes/MediaWikiServices.php +++ b/includes/MediaWikiServices.php @@ -1,6 +1,7 @@ getService( 'Collation' ); + } + + /** * @since 1.27 * @return StatsdDataFactory */ diff --git a/includes/MovePage.php b/includes/MovePage.php index 5f1dd3f..b532f82 100644 --- a/includes/MovePage.php +++ b/includes/MovePage.php @@ -228,8 +228,6 @@ * @return Status */ public function move( User $user, $reason, $createRedirect ) { - global $wgCategoryCollation; - Hooks::run( 'TitleMove', [ $this->oldTitle, $this->newTitle, $user ] ); // If it is a file, move it first. @@ -276,14 +274,15 @@ } else { $type = 'page'; } + $collation = MediaWikiServices::getInstance()->getCollation(); foreach ( $prefixes as $prefixRow ) { $prefix = $prefixRow->cl_sortkey_prefix; $catTo = $prefixRow->cl_to; $dbw->update( 'categorylinks', [ - 'cl_sortkey' => Collation::singleton()->getSortKey( + 'cl_sortkey' => $collation->getSortKey( $this->newTitle->getCategorySortkey( $prefix ) ), - 'cl_collation' => $wgCategoryCollation, + 'cl_collation' => $collation->getName(), 'cl_type' => $type, 'cl_timestamp=cl_timestamp' ], [ diff --git a/includes/ServiceWiring.php b/includes/ServiceWiring.php index 6044911..7414295 100644 --- a/includes/ServiceWiring.php +++ b/includes/ServiceWiring.php @@ -103,6 +103,12 @@ ); }, + 'Collation' => function( MediaWikiServices $services ) { + return Collation::factory( + $services->getMainConfig()->get( 'CategoryCollation' ) + ); + }, + 'StatsdDataFactory' => function( MediaWikiServices $services ) { return new BufferingStatsdDataFactory( rtrim( $services->getMainConfig()->get( 'StatsdMetricPrefix' ), '.' ) diff --git a/includes/api/ApiQueryCategoryMembers.php b/includes/api/ApiQueryCategoryMembers.php index 4865ad5..257e5b8 100644 --- a/includes/api/ApiQueryCategoryMembers.php +++ b/includes/api/ApiQueryCategoryMembers.php @@ -24,6 +24,8 @@ * @file */ +use MediaWiki\MediaWikiServices; + /** * A query module to enumerate pages that belong to a category. * @@ -150,7 +152,8 @@ $this->addWhereRange( 'cl_from', $dir, null, null ); } else { if ( $params['startsortkeyprefix'] !== null ) { - $startsortkey = Collation::singleton()->getSortKey( $params['startsortkeyprefix'] ); + $collation =
[MediaWiki-commits] [Gerrit] mediawiki...Kartographer[master]: Added geoline service support
jenkins-bot has submitted this change and it was merged. Change subject: Added geoline service support .. Added geoline service support Change-Id: I4c3e9617b1eb49b947b7f1556599b34ca05132a0 --- M modules/box/Map.js M schemas/geojson.json A tests/phpunit/data/bad-schemas/52-externaldata-17.json A tests/phpunit/data/bad-schemas/53-externaldata-18.json A tests/phpunit/data/bad-schemas/54-externaldata-19.json A tests/phpunit/data/bad-schemas/55-externaldata-20.json A tests/phpunit/data/bad-schemas/56-externaldata-21.json A tests/phpunit/data/bad-schemas/57-externaldata-22.json M tests/phpunit/data/good-schemas/08-externaldata.json 9 files changed, 88 insertions(+), 10 deletions(-) Approvals: MaxSem: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/box/Map.js b/modules/box/Map.js index 3dd67c6..e07a314 100644 --- a/modules/box/Map.js +++ b/modules/box/Map.js @@ -242,6 +242,7 @@ uri.query = {}; switch ( data.service ) { case 'geoshape': + case 'geoline': if ( data.query ) { if ( typeof data.query === 'string' ) { uri.query.query = data.query; @@ -266,35 +267,36 @@ switch ( uri.protocol ) { case 'geoshape': + case 'geoline': // geoshape:///?ids=Q16,Q30 // geoshape:///?query=SELECT... // Get geo shapes data from OSM database by supplying Wikidata IDs or query - // https://maps.wikimedia.org/shape?ids=Q16,Q30 + // https://maps.wikimedia.org/geoshape?ids=Q16,Q30 if ( !uri.query || ( !uri.query.ids && !uri.query.query ) ) { - throw new Error( 'geoshape: missing ids or query parameter in externalData' ); + throw new Error( uri.protocol + ': missing ids or query parameter in externalData' ); } if ( !uri.isRelativeHost && uri.host !== 'maps.wikimedia.org' ) { - throw new Error( 'geoshape: hostname must be missing or "maps.wikimedia.org"' ); + throw new Error( uri.protocol + ': hostname must be missing or "maps.wikimedia.org"' ); } - uri.protocol = 'https'; uri.host = 'maps.wikimedia.org'; uri.port = undefined; - uri.path = '/geoshape'; + uri.path = '/' + uri.protocol; + uri.protocol = 'https'; uri.query.origin = location.protocol + '//' + location.host; // HACK: workaround for T144777 uri.query.getgeojson = 1; - return $.getJSON( uri.toString() ).then( function ( geoshape ) { + return $.getJSON( uri.toString() ).then( function ( geodata ) { var baseProps = data.properties; delete data.href; // HACK: workaround for T144777 - we should be using topojson instead - $.extend( data, geoshape ); + $.extend( data, geodata ); // data.type = 'FeatureCollection'; // data.features = []; - // $.each( geoshape.objects, function ( key ) { - // data.features.push( topojson.feature( geoshape, geoshape.objects[ key ] ) ); + // $.each( geodata.objects, function ( key ) { + // data.features.push( topojson.feature( geodata, geodata.objects[ key ] ) ); // } ); // Each feature returned from geoshape service may contain "properties" diff --git a/schemas/geojson.json b/schemas/geojson.json index 98091e3..90f1f33 100644 --- a/schemas/geojson.json +++ b/schemas/geojson.json @@ -169,7 +169,7 @@ { "required": [ "service" ], "properties": { - "service": { "enum": [ "geoshape" ] }, +
[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: Logging for JobQueueConsumer
Ejegg has uploaded a new change for review. https://gerrit.wikimedia.org/r/313337 Change subject: Logging for JobQueueConsumer .. Logging for JobQueueConsumer Change-Id: I9409efa602b076fc892f2e2d33acc633207f0bfd --- M Core/QueueConsumers/JobQueueConsumer.php 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig refs/changes/37/313337/1 diff --git a/Core/QueueConsumers/JobQueueConsumer.php b/Core/QueueConsumers/JobQueueConsumer.php index c96ad4e..bbc48e0 100644 --- a/Core/QueueConsumers/JobQueueConsumer.php +++ b/Core/QueueConsumers/JobQueueConsumer.php @@ -2,6 +2,7 @@ use RuntimeException; use SmashPig\Core\DataStores\KeyedOpaqueStorableObject; +use SmashPig\Core\Logging\Logger; use SmashPig\Core\Runnable; class JobQueueConsumer extends BaseQueueConsumer { @@ -27,10 +28,15 @@ // things as properties. The message is mingled with stuff like // php-message-class. Could collide. $className = $jobMessage['php-message-class']; + Logger::info( "Hydrating a message with class $className" ); + $jsonMessage = json_encode( $jobMessage ); + + Logger::debug( "Job payload: $jsonMessage" ); $jobObj = KeyedOpaqueStorableObject::fromJsonProxy( $className, $jsonMessage ); if ( $jobObj instanceof Runnable ) { + Logger::info( 'Running job' ); if ( !$jobObj->execute() ) { throw new RuntimeException( 'Job tells us that it did not successfully execute. ' -- To view, visit https://gerrit.wikimedia.org/r/313337 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9409efa602b076fc892f2e2d33acc633207f0bfd Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/SmashPig Gerrit-Branch: master Gerrit-Owner: Ejegg___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Move DatabaseBase to /compat as an interface for type-hints
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/313336 Change subject: Move DatabaseBase to /compat as an interface for type-hints .. Move DatabaseBase to /compat as an interface for type-hints Change-Id: Ib6bbbd751358cbc2f2d2767c80721d3d8f142c0d --- M autoload.php R includes/compat/DatabaseBase.php M includes/libs/rdbms/database/DatabaseMysqlBase.php M includes/libs/rdbms/database/DatabasePostgres.php M includes/libs/rdbms/database/DatabaseSqlite.php 5 files changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/36/313336/1 diff --git a/autoload.php b/autoload.php index dfb0bf6..09deb6e 100644 --- a/autoload.php +++ b/autoload.php @@ -317,7 +317,7 @@ 'DBUnexpectedError' => __DIR__ . '/includes/libs/rdbms/exception/DBUnexpectedError.php', 'DataUpdate' => __DIR__ . '/includes/deferred/DataUpdate.php', 'Database' => __DIR__ . '/includes/libs/rdbms/database/Database.php', - 'DatabaseBase' => __DIR__ . '/includes/libs/rdbms/database/DatabaseBase.php', + 'DatabaseBase' => __DIR__ . '/includes/compat/DatabaseBase.php', 'DatabaseDomain' => __DIR__ . '/includes/libs/rdbms/database/DatabaseDomain.php', 'DatabaseInstaller' => __DIR__ . '/includes/installer/DatabaseInstaller.php', 'DatabaseLag' => __DIR__ . '/maintenance/lag.php', diff --git a/includes/libs/rdbms/database/DatabaseBase.php b/includes/compat/DatabaseBase.php similarity index 95% rename from includes/libs/rdbms/database/DatabaseBase.php rename to includes/compat/DatabaseBase.php index 71e5f93..d5c871f 100644 --- a/includes/libs/rdbms/database/DatabaseBase.php +++ b/includes/compat/DatabaseBase.php @@ -28,6 +28,6 @@ * Database abstraction object * @ingroup Database */ -abstract class DatabaseBase extends Database { +interface DatabaseBase extends IDatabase { // Backwards-compatibility alias for type-hints } diff --git a/includes/libs/rdbms/database/DatabaseMysqlBase.php b/includes/libs/rdbms/database/DatabaseMysqlBase.php index c31b9f9..d654429 100644 --- a/includes/libs/rdbms/database/DatabaseMysqlBase.php +++ b/includes/libs/rdbms/database/DatabaseMysqlBase.php @@ -29,7 +29,7 @@ * @since 1.22 * @see Database */ -abstract class DatabaseMysqlBase extends DatabaseBase { +abstract class DatabaseMysqlBase extends Database { /** @var MysqlMasterPos */ protected $lastKnownReplicaPos; /** @var string Method to detect replica DB lag */ diff --git a/includes/libs/rdbms/database/DatabasePostgres.php b/includes/libs/rdbms/database/DatabasePostgres.php index a69a5fa..f58628e 100644 --- a/includes/libs/rdbms/database/DatabasePostgres.php +++ b/includes/libs/rdbms/database/DatabasePostgres.php @@ -24,7 +24,7 @@ /** * @ingroup Database */ -class DatabasePostgres extends DatabaseBase { +class DatabasePostgres extends Database { /** @var int|bool */ protected $port; diff --git a/includes/libs/rdbms/database/DatabaseSqlite.php b/includes/libs/rdbms/database/DatabaseSqlite.php index 156e525..3ccf3f0 100644 --- a/includes/libs/rdbms/database/DatabaseSqlite.php +++ b/includes/libs/rdbms/database/DatabaseSqlite.php @@ -25,7 +25,7 @@ /** * @ingroup Database */ -class DatabaseSqlite extends DatabaseBase { +class DatabaseSqlite extends Database { /** @var bool Whether full text is enabled */ private static $fulltextEnabled = null; -- To view, visit https://gerrit.wikimedia.org/r/313336 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib6bbbd751358cbc2f2d2767c80721d3d8f142c0d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core 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] mediawiki...ExternalData[master]: Use DatabaseBase::factory() over Database::factory()
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/313335 Change subject: Use DatabaseBase::factory() over Database::factory() .. Use DatabaseBase::factory() over Database::factory() Change-Id: I59a3019feef680f869119da4c614e9bcb1309ae1 --- M ED_Utils.php 1 file changed, 16 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ExternalData refs/changes/35/313335/1 diff --git a/ED_Utils.php b/ED_Utils.php index 0117a66..5f1b455 100644 --- a/ED_Utils.php +++ b/ED_Utils.php @@ -212,9 +212,21 @@ // DatabaseBase::newFromType() was added in MW 1.17 - it was // then replaced by DatabaseBase::factory() in MW 1.18 - $factoryFunction = array( 'DatabaseBase', 'factory' ); - //$newFromTypeFunction = array( 'DatabaseBase', 'newFromType' ); - if ( is_callable( $factoryFunction ) ) { + if ( method_exists( 'Database', 'factory' ) ) { + $db = Database::factory( $db_type, + array( + 'host' => $db_server, + 'user' => $db_username, + 'password' => $db_password, + // Both 'dbname' and 'dbName' have been + // used in different versions. + 'dbname' => $db_name, + 'dbName' => $db_name, + 'flags' => $db_flags, + 'tablePrefix' => $db_tableprefix, + ) + ); + } elseif ( method_exists( 'DatabaseBase', 'factory' ) ) { $db = DatabaseBase::factory( $db_type, array( 'host' => $db_server, @@ -228,7 +240,7 @@ 'tablePrefix' => $db_tableprefix, ) ); - } else { //if ( is_callable( $newFromTypeFunction ) ) { + } else { $db = DatabaseBase::newFromType( $db_type, array( 'host' => $db_server, -- To view, visit https://gerrit.wikimedia.org/r/313335 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I59a3019feef680f869119da4c614e9bcb1309ae1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ExternalData 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] mediawiki...ContributionTracking[master]: Use DatabaseBase::factory() over Database::factory()
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/313334 Change subject: Use DatabaseBase::factory() over Database::factory() .. Use DatabaseBase::factory() over Database::factory() Change-Id: Id334f9214bd84f7f485df3c9a9b47a2c89dbfcdd --- M ContributionTracking.processor.php 1 file changed, 7 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContributionTracking refs/changes/34/313334/1 diff --git a/ContributionTracking.processor.php b/ContributionTracking.processor.php index 7a12b92..893b3a6 100644 --- a/ContributionTracking.processor.php +++ b/ContributionTracking.processor.php @@ -32,12 +32,17 @@ ) { $db = wfGetDB( DB_MASTER ); } else { - $db = DatabaseBase::factory( 'mysql', array( + $params = [ 'host' => $wgContributionTrackingDBserver, 'user' => $wgContributionTrackingDBuser, 'password' => $wgContributionTrackingDBpassword, 'dbname' => $wgContributionTrackingDBname - ) ); + ]; + if ( method_exists( 'Database', 'factory' ) ) { + $db = Database::factory( 'mysql', $params ); + } else { + $db = DatabaseBase::factory( 'mysql', $params ); + } } } -- To view, visit https://gerrit.wikimedia.org/r/313334 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id334f9214bd84f7f485df3c9a9b47a2c89dbfcdd Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContributionTracking 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] mediawiki...Cargo[master]: Use DatabaseBase::factory() over Database::factory()
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/31 Change subject: Use DatabaseBase::factory() over Database::factory() .. Use DatabaseBase::factory() over Database::factory() Change-Id: Id34ae083d871bd3bfb70e1c220aca175ac399129 --- M CargoUtils.php 1 file changed, 15 insertions(+), 11 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Cargo refs/changes/33/31/1 diff --git a/CargoUtils.php b/CargoUtils.php index 78e4979..da98f1a 100644 --- a/CargoUtils.php +++ b/CargoUtils.php @@ -17,7 +17,7 @@ * @global string $wgCargoDBuser * @global string $wgCargoDBpassword * @global string $wgCargoDBtype -* @return DatabaseBase +* @return Database */ public static function getDB() { global $wgDBuser, $wgDBpassword, $wgDBprefix; @@ -35,16 +35,20 @@ $dbFlags = DBO_DEFAULT; $dbTablePrefix = $wgDBprefix . 'cargo__'; - $db = DatabaseBase::factory( $dbType, - array( - 'host' => $dbServer, - 'user' => $dbUsername, - 'password' => $dbPassword, - 'dbname' => $dbName, - 'flags' => $dbFlags, - 'tablePrefix' => $dbTablePrefix, - ) - ); + $params = [ + 'host' => $dbServer, + 'user' => $dbUsername, + 'password' => $dbPassword, + 'dbname' => $dbName, + 'flags' => $dbFlags, + 'tablePrefix' => $dbTablePrefix, + ]; + if ( method_exists( 'Database', 'factory' ) ) { + $db = Database::factory( $dbType, $params ); + } else { + $db = DatabaseBase::factory( $dbType, $params ); + } + return $db; } -- To view, visit https://gerrit.wikimedia.org/r/31 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id34ae083d871bd3bfb70e1c220aca175ac399129 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Cargo 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] mediawiki...Kartographer[master]: Added geoline service support
Yurik has uploaded a new change for review. https://gerrit.wikimedia.org/r/313332 Change subject: Added geoline service support .. Added geoline service support Change-Id: I4c3e9617b1eb49b947b7f1556599b34ca05132a0 --- M modules/box/Map.js M schemas/geojson.json A tests/phpunit/data/bad-schemas/52-externaldata-17.json A tests/phpunit/data/bad-schemas/53-externaldata-18.json A tests/phpunit/data/bad-schemas/54-externaldata-19.json A tests/phpunit/data/bad-schemas/55-externaldata-20.json A tests/phpunit/data/bad-schemas/56-externaldata-21.json A tests/phpunit/data/bad-schemas/57-externaldata-22.json M tests/phpunit/data/good-schemas/08-externaldata.json 9 files changed, 88 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Kartographer refs/changes/32/313332/1 diff --git a/modules/box/Map.js b/modules/box/Map.js index 3dd67c6..e07a314 100644 --- a/modules/box/Map.js +++ b/modules/box/Map.js @@ -242,6 +242,7 @@ uri.query = {}; switch ( data.service ) { case 'geoshape': + case 'geoline': if ( data.query ) { if ( typeof data.query === 'string' ) { uri.query.query = data.query; @@ -266,35 +267,36 @@ switch ( uri.protocol ) { case 'geoshape': + case 'geoline': // geoshape:///?ids=Q16,Q30 // geoshape:///?query=SELECT... // Get geo shapes data from OSM database by supplying Wikidata IDs or query - // https://maps.wikimedia.org/shape?ids=Q16,Q30 + // https://maps.wikimedia.org/geoshape?ids=Q16,Q30 if ( !uri.query || ( !uri.query.ids && !uri.query.query ) ) { - throw new Error( 'geoshape: missing ids or query parameter in externalData' ); + throw new Error( uri.protocol + ': missing ids or query parameter in externalData' ); } if ( !uri.isRelativeHost && uri.host !== 'maps.wikimedia.org' ) { - throw new Error( 'geoshape: hostname must be missing or "maps.wikimedia.org"' ); + throw new Error( uri.protocol + ': hostname must be missing or "maps.wikimedia.org"' ); } - uri.protocol = 'https'; uri.host = 'maps.wikimedia.org'; uri.port = undefined; - uri.path = '/geoshape'; + uri.path = '/' + uri.protocol; + uri.protocol = 'https'; uri.query.origin = location.protocol + '//' + location.host; // HACK: workaround for T144777 uri.query.getgeojson = 1; - return $.getJSON( uri.toString() ).then( function ( geoshape ) { + return $.getJSON( uri.toString() ).then( function ( geodata ) { var baseProps = data.properties; delete data.href; // HACK: workaround for T144777 - we should be using topojson instead - $.extend( data, geoshape ); + $.extend( data, geodata ); // data.type = 'FeatureCollection'; // data.features = []; - // $.each( geoshape.objects, function ( key ) { - // data.features.push( topojson.feature( geoshape, geoshape.objects[ key ] ) ); + // $.each( geodata.objects, function ( key ) { + // data.features.push( topojson.feature( geodata, geodata.objects[ key ] ) ); // } ); // Each feature returned from geoshape service may contain "properties" diff --git a/schemas/geojson.json b/schemas/geojson.json index 98091e3..90f1f33 100644 --- a/schemas/geojson.json +++ b/schemas/geojson.json @@ -169,7 +169,7 @@ { "required": [ "service" ], "properties": { -
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Make LBFactory return type docs more specific to avoid IDEA ...
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/313330 Change subject: Make LBFactory return type docs more specific to avoid IDEA warnings .. Make LBFactory return type docs more specific to avoid IDEA warnings Change-Id: I5fa6ed87e35f3b8ee17e576faf5d00763229dd4b --- M includes/libs/rdbms/lbfactory/LBFactory.php 1 file changed, 30 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/30/313330/1 diff --git a/includes/libs/rdbms/lbfactory/LBFactory.php b/includes/libs/rdbms/lbfactory/LBFactory.php index 0635d04..f5d57c4 100644 --- a/includes/libs/rdbms/lbfactory/LBFactory.php +++ b/includes/libs/rdbms/lbfactory/LBFactory.php @@ -136,6 +136,36 @@ } /** +* @see ILBFactory::newMainLB() +* @param bool $domain +* @return LoadBalancer +*/ + abstract public function newMainLB( $domain = false ); + + /** +* @see ILBFactory::getMainLB() +* @param bool $domain +* @return mixed +*/ + abstract public function getMainLB( $domain = false ); + + /** +* @see ILBFactory::newExternalLB() +* @param string $cluster +* @param bool $domain +* @return LoadBalancer +*/ + abstract public function newExternalLB( $cluster, $domain = false ); + + /** +* @see ILBFactory::getExternalLB() +* @param string $cluster +* @param bool $domain +* @return mixed +*/ + abstract public function getExternalLB( $cluster, $domain = false ); + + /** * Call a method of each tracked load balancer * * @param string $methodName -- To view, visit https://gerrit.wikimedia.org/r/313330 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5fa6ed87e35f3b8ee17e576faf5d00763229dd4b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core 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] mediawiki/core[master]: Replace DatabaseBase => Database in more places
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/313331 Change subject: Replace DatabaseBase => Database in more places .. Replace DatabaseBase => Database in more places Change-Id: If37a7909056bf2c31a8228cbc84f0fbbf5f1c517 --- M includes/GlobalFunctions.php M includes/WatchedItemQueryService.php M includes/api/ApiBase.php M includes/api/ApiPageSet.php M includes/api/ApiQuery.php M includes/api/ApiQueryAllImages.php M includes/api/ApiQueryBase.php M includes/cache/BacklinkCache.php M includes/dao/DBAccessBase.php M includes/filerepo/LocalRepo.php M includes/installer/DatabaseInstaller.php M includes/installer/DatabaseUpdater.php M includes/installer/MssqlInstaller.php M includes/installer/MysqlInstaller.php M includes/installer/OracleInstaller.php M includes/installer/PostgresInstaller.php M includes/libs/lockmanager/DBLockManager.php M includes/user/BotPassword.php M maintenance/Maintenance.php M maintenance/archives/upgradeLogging.php M maintenance/benchmarks/bench_delete_truncate.php M maintenance/convertUserOptions.php M maintenance/deleteOrphanedRevisions.php M maintenance/dumpIterator.php M maintenance/dumpTextPass.php M maintenance/fetchText.php M maintenance/namespaceDupes.php M maintenance/orphans.php M maintenance/populateContentModel.php M maintenance/populateRecentChangesSource.php M maintenance/rebuildImages.php M maintenance/rebuildtextindex.php M maintenance/refreshImageMetadata.php M maintenance/storage/recompressTracked.php M maintenance/updateCollation.php 35 files changed, 56 insertions(+), 56 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/31/313331/1 diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 5fe4b4e..311cf25 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -3066,7 +3066,7 @@ * @todo Replace calls to wfGetDB with calls to LoadBalancer::getConnection() * on an injected instance of LoadBalancer. * - * @return DatabaseBase + * @return Database */ function wfGetDB( $db, $groups = [], $wiki = false ) { return wfGetLB( $wiki )->getConnection( $db, $groups, $wiki ); diff --git a/includes/WatchedItemQueryService.php b/includes/WatchedItemQueryService.php index c040fb1..4802f72 100644 --- a/includes/WatchedItemQueryService.php +++ b/includes/WatchedItemQueryService.php @@ -55,7 +55,7 @@ } /** -* @return DatabaseBase +* @return Database * @throws MWException */ private function getConnection() { diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php index 809d567..4feaac0 100644 --- a/includes/api/ApiBase.php +++ b/includes/api/ApiBase.php @@ -600,7 +600,7 @@ /** * Gets a default replica DB connection object -* @return DatabaseBase +* @return Database */ protected function getDB() { if ( !isset( $this->mSlaveDB ) ) { diff --git a/includes/api/ApiPageSet.php b/includes/api/ApiPageSet.php index ed229cb..34c17c1 100644 --- a/includes/api/ApiPageSet.php +++ b/includes/api/ApiPageSet.php @@ -1330,7 +1330,7 @@ /** * Get the database connection (read-only) -* @return DatabaseBase +* @return Database */ protected function getDB() { return $this->mDbSource->getDB(); diff --git a/includes/api/ApiQuery.php b/includes/api/ApiQuery.php index 5e3c709..ebbc746 100644 --- a/includes/api/ApiQuery.php +++ b/includes/api/ApiQuery.php @@ -168,7 +168,7 @@ * @param string $name Name to assign to the database connection * @param int $db One of the DB_* constants * @param array $groups Query groups -* @return DatabaseBase +* @return Database */ public function getNamedDB( $name, $db, $groups ) { if ( !array_key_exists( $name, $this->mNamedDB ) ) { diff --git a/includes/api/ApiQueryAllImages.php b/includes/api/ApiQueryAllImages.php index 6aeee68..553995c 100644 --- a/includes/api/ApiQueryAllImages.php +++ b/includes/api/ApiQueryAllImages.php @@ -44,7 +44,7 @@ * which may not necessarily be the same as the local DB. * * TODO: allow querying non-local repos. -* @return DatabaseBase +* @return Database */ protected function getDB() { return $this->mRepo->getSlaveDB(); diff --git a/includes/api/ApiQueryBase.php b/includes/api/ApiQueryBase.php index b35eec2..36ad3a4 100644 --- a/includes/api/ApiQueryBase.php +++ b/includes/api/ApiQueryBase.php @@ -103,7 +103,7 @@ /** * Get the Query database connection (read-only) -* @return DatabaseBase +* @return Database */ protected function getDB() { if ( is_null( $this->mDb ) ) { @@ -119,7 +119,7 @@ * @param string $name
[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: WIP add check for stable data before running GC charges.
Eileen has uploaded a new change for review. https://gerrit.wikimedia.org/r/313329 Change subject: WIP add check for stable data before running GC charges. .. WIP add check for stable data before running GC charges. I'm pushing this up for review because I want to get some input into how to throw an exception to get failmail. Locally I haven't got this to fully run yet drush recurring-globalcollect The value in settings, Failures before subscription is cancelled must be a postive integer. You specifed [0]. Change-Id: Icbddc60d4b45849b3b1960f47ba0d3df960a643a --- M sites/all/modules/recurring_globalcollect/recurring_globalcollect.drush.inc M sites/all/modules/recurring_globalcollect/recurring_globalcollect.module 2 files changed, 64 insertions(+), 17 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/29/313329/1 diff --git a/sites/all/modules/recurring_globalcollect/recurring_globalcollect.drush.inc b/sites/all/modules/recurring_globalcollect/recurring_globalcollect.drush.inc index fcb9dd1..63b02ca 100644 --- a/sites/all/modules/recurring_globalcollect/recurring_globalcollect.drush.inc +++ b/sites/all/modules/recurring_globalcollect/recurring_globalcollect.drush.inc @@ -14,7 +14,7 @@ $items['recurring-globalcollect'] = array( 'description' => 'Process recurring payments through GlobalCollect. ', -'examples' => array( +'examples' => array( 'drush recurring-globalcollect' => '# Process recurring payments', 'drush rg --batch=10'=> '# Process up to 10 contributions.', 'drush rg --date=2011-12-31' => '# Specify a date to process. By default, today will be processed.', @@ -61,12 +61,12 @@ // Set the date $options['date'] = drush_recurring_globalcollect_parse_date($date); - + // Set the url if ( !is_null($url)) { $options['url'] = $url; } - + // Set the number of contributions to batch if ( !is_null( $batch ) ) { $options['batch'] = $batch; @@ -91,7 +91,7 @@ /** * drush_recurring_globalcollect_validate - * + * * This function is called magically from within Drush * * Numeric values for batch will be converted to an integer: @@ -119,8 +119,12 @@ $batch = drush_get_option('batch'); $date = drush_get_option('date'); - + $batch_max = (integer) variable_get('recurring_globalcollect_batch_max', 100); + if (!recurring_globalcollect_check_for_invalid_next_sched_dates()) { +drush_set_error('SCHED_DATE_CHECK', dt('Please check for invalid scheduled dates')); +return false; + } /** * Validate batch: @@ -137,18 +141,18 @@ drush_set_error('BATCHING', dt($message)); return false; } - + // $batch is numeric, convert it to an integer for further testing. $batch = (integer) $batch; - + if ($batch < 1) { - + $message = 'Batching is disabled: $batch = "' . $batch . '"'; $link = l('Edit recurring GlobalCollect settings', 'admin/config/recurring_globalcollect'); watchdog('recurring_globalcollect', $message, array(), WATCHDOG_WARNING, $link); - return false; + return false; } - + if ($batch < 0) { $message = 'You specified a negative number. You must specify either' @@ -157,7 +161,7 @@ drush_set_error('BATCHING', dt($message)); return false; } - + if ($batch > $batch_max) { $message = 'You are attempting to batch ' . $batch .' payments, which' . ' is more than the maximum allowed: ' . $batch_max .'. Either batch' @@ -173,7 +177,7 @@ * - failures_before_cancellation */ $failures_before_cancellation = (integer) variable_get('recurring_globalcollect_failures_before_cancellation', 0); - + if ( $failures_before_cancellation < 1 ) { $message = 'The value in settings, "Failures before subscription is' . ' cancelled" must be a postive integer. You specifed [' @@ -196,7 +200,7 @@ * @return Returns the date with the format: 'Y-m-d' */ function drush_recurring_globalcollect_parse_date($date) { - + if (!empty($date)) { $oldTimezone = date_default_timezone_get(); date_default_timezone_set( "UTC" ); @@ -204,20 +208,20 @@ $now_stamp = time(); $now = date('Y-m-d', $now_stamp); $date_stamp = strtotime($date); - + // Set date from stamp so we have the proper format expected by the module. $date = date('Y-m-d', $date_stamp); date_default_timezone_set( $oldTimezone ); - + if ($date_stamp > $now_stamp) { $message = 'The date you entered [' . $date . '] is being parsed as [' . $date . ']. The current date is: [' . $now . ']. You are not allowed to specify dates in the future.'; drush_set_error('FUTURE_DATE', dt($message)); return false; } } - + return
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: resourceloader: Disable ChronologyProtector to speed up wfGe...
jenkins-bot has submitted this change and it was merged. Change subject: resourceloader: Disable ChronologyProtector to speed up wfGetLB() .. resourceloader: Disable ChronologyProtector to speed up wfGetLB() For load.php requests, Xenon in Wikimedia production measures that half the time for wfGetLB() is spent in ChronologyProtector::initPositions, and its query to Memcached. Change-Id: I24f90897e56fd679c6bd1acf764722ed58e51c67 --- M load.php 1 file changed, 7 insertions(+), 0 deletions(-) Approvals: Aaron Schulz: Looks good to me, approved jenkins-bot: Verified diff --git a/load.php b/load.php index c832237..974771f 100644 --- a/load.php +++ b/load.php @@ -23,6 +23,7 @@ */ use MediaWiki\Logger\LoggerFactory; +use MediaWiki\MediaWikiServices; // This endpoint is supposed to be independent of request cookies and other // details of the session. Enforce this constraint with respect to session use. @@ -35,6 +36,12 @@ return; } +// Don't initialise ChronologyProtector from object cache, and +// don't wait for unrelated MediaWiki writes when querying ResourceLoader. +MediaWikiServices::getInstance()->getDBLoadBalancerFactory()->setRequestInfo( [ + 'ChronologyProtection' => 'false', +] ); + // Set up ResourceLoader $resourceLoader = new ResourceLoader( ConfigFactory::getDefaultInstance()->makeConfig( 'main' ), -- To view, visit https://gerrit.wikimedia.org/r/313310 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I24f90897e56fd679c6bd1acf764722ed58e51c67 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: KrinkleGerrit-Reviewer: Aaron Schulz Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Math[master]: Set the stream and buffer reset methods for the default backend
jenkins-bot has submitted this change and it was merged. Change subject: Set the stream and buffer reset methods for the default backend .. Set the stream and buffer reset methods for the default backend Change-Id: Ia28c92a66a217cea24ff70f5be1a51a53fa5d6f8 --- M MathTexvc.php 1 file changed, 3 insertions(+), 1 deletion(-) Approvals: Alex Monk: Looks good to me, approved jenkins-bot: Verified diff --git a/MathTexvc.php b/MathTexvc.php index 8a1bc29..6c61d86 100644 --- a/MathTexvc.php +++ b/MathTexvc.php @@ -327,7 +327,9 @@ 'wikiId' => wfWikiId(), 'lockManager'=> new NullLockManager( [] ), 'containerPaths' => [ 'math-render' => $wgMathDirectory ], - 'fileMode' => 0777 + 'fileMode' => 0777, + 'obResetFunc'=> 'wfResetOutputBuffers', + 'streamMimeFunc' => [ 'StreamFile', 'contentTypeFromPath' ] ] ); } return $backend; -- To view, visit https://gerrit.wikimedia.org/r/313325 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia28c92a66a217cea24ff70f5be1a51a53fa5d6f8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Math Gerrit-Branch: master Gerrit-Owner: Aaron SchulzGerrit-Reviewer: Alex Monk Gerrit-Reviewer: Physikerwelt Gerrit-Reviewer: TheDJ Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Flow[master]: BoardMover: don't try to save a null edit
jenkins-bot has submitted this change and it was merged. Change subject: BoardMover: don't try to save a null edit .. BoardMover: don't try to save a null edit BoardMover assists in the move of Flow pages by updating objects' association from the old to the new page. It also tries to reparse the current header so magic words like basepagename are updated for the new page location. This part sometimes generates null edits that are not seen as null edits by the storage layer. This leads to exceptions that abort the move but do not bubble up to the OptinController. It results in inconsistent state. Bug: T138310 Change-Id: Iff7f699b7604da608154231c4d46b17c1dc08541 --- M includes/BoardMover.php 1 file changed, 5 insertions(+), 3 deletions(-) Approvals: Mattflaschen: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/BoardMover.php b/includes/BoardMover.php index 988a8c2..41344bd 100644 --- a/includes/BoardMover.php +++ b/includes/BoardMover.php @@ -109,9 +109,11 @@ 'edit-header', $newPage ); - $this->storage->put( $nextHeader, array( - 'workflow' => $discussionWorkflow, - ) ); + if ( $header !== $nextHeader ) { + $this->storage->put( $nextHeader, array( + 'workflow' => $discussionWorkflow, + ) ); + } } } -- To view, visit https://gerrit.wikimedia.org/r/313052 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iff7f699b7604da608154231c4d46b17c1dc08541 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: SbissonGerrit-Reviewer: Mattflaschen Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Score[master]: Set the stream and buffer reset methods for the default backend
jenkins-bot has submitted this change and it was merged. Change subject: Set the stream and buffer reset methods for the default backend .. Set the stream and buffer reset methods for the default backend Change-Id: I422553e6ef4f49c6de70b53ea407c2116bfa7cf6 --- M Score.body.php 1 file changed, 3 insertions(+), 1 deletion(-) Approvals: Alex Monk: Looks good to me, approved jenkins-bot: Verified diff --git a/Score.body.php b/Score.body.php index 8b70c7d..fd1e27c 100644 --- a/Score.body.php +++ b/Score.body.php @@ -185,7 +185,9 @@ 'wikiId' => wfWikiId(), 'lockManager'=> new NullLockManager( array() ), 'containerPaths' => array( 'score-render' => $dir ), - 'fileMode' => 0777 + 'fileMode' => 0777, + 'obResetFunc' => 'wfResetOutputBuffers', + 'streamMimeFunc' => [ 'StreamFile', 'contentTypeFromPath' ] ) ); } return self::$backend; -- To view, visit https://gerrit.wikimedia.org/r/313327 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I422553e6ef4f49c6de70b53ea407c2116bfa7cf6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Score Gerrit-Branch: master Gerrit-Owner: Aaron SchulzGerrit-Reviewer: Alex Monk Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...ConfirmEdit[master]: Set the stream and buffer reset methods for the default backend
jenkins-bot has submitted this change and it was merged. Change subject: Set the stream and buffer reset methods for the default backend .. Set the stream and buffer reset methods for the default backend Bug: T146904 Change-Id: I93ad529d2238f52815e4abd32aa9355feda826f3 --- M FancyCaptcha/FancyCaptcha.class.php 1 file changed, 4 insertions(+), 2 deletions(-) Approvals: Alex Monk: Looks good to me, approved jenkins-bot: Verified diff --git a/FancyCaptcha/FancyCaptcha.class.php b/FancyCaptcha/FancyCaptcha.class.php index ec5d503..094aaf6 100644 --- a/FancyCaptcha/FancyCaptcha.class.php +++ b/FancyCaptcha/FancyCaptcha.class.php @@ -21,10 +21,12 @@ if ( !$backend ) { $backend = new FSFileBackend( [ 'name' => 'captcha-backend', - 'wikiId' => wfWikiId(), + 'wikiId' => wfWikiID(), 'lockManager'=> new NullLockManager( [] ), 'containerPaths' => [ 'captcha-render' => $wgCaptchaDirectory ], - 'fileMode' => 777 + 'fileMode' => 777, + 'obResetFunc'=> 'wfResetOutputBuffers', + 'streamMimeFunc' => [ 'StreamFile', 'contentTypeFromPath' ] ] ); } return $backend; -- To view, visit https://gerrit.wikimedia.org/r/313323 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I93ad529d2238f52815e4abd32aa9355feda826f3 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/ConfirmEdit Gerrit-Branch: master Gerrit-Owner: Aaron SchulzGerrit-Reviewer: Alex Monk Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...timeline[master]: Set the stream and buffer reset methods for the default backend
jenkins-bot has submitted this change and it was merged. Change subject: Set the stream and buffer reset methods for the default backend .. Set the stream and buffer reset methods for the default backend Change-Id: Ia0b2360ada06bff96691ee08ac923e08883462ff --- M Timeline.body.php 1 file changed, 4 insertions(+), 1 deletion(-) Approvals: Alex Monk: Looks good to me, approved jenkins-bot: Verified diff --git a/Timeline.body.php b/Timeline.body.php index 87e7ec6..29a7e33 100644 --- a/Timeline.body.php +++ b/Timeline.body.php @@ -41,7 +41,10 @@ 'wikiId' => wfWikiID(), 'lockManager' => new NullLockManager( [] ), 'containerPaths' => [ 'timeline-render' => "{$wgUploadDirectory}/timeline" ], - 'fileMode' => 0777 ] + 'fileMode' => 0777, + 'obResetFunc' => 'wfResetOutputBuffers', + 'streamMimeFunc' => [ 'StreamFile', 'contentTypeFromPath' ] + ] ); } -- To view, visit https://gerrit.wikimedia.org/r/313328 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia0b2360ada06bff96691ee08ac923e08883462ff Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/timeline Gerrit-Branch: master Gerrit-Owner: Aaron SchulzGerrit-Reviewer: Alex Monk Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...timeline[master]: Set the stream and buffer reset methods for the default backend
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/313328 Change subject: Set the stream and buffer reset methods for the default backend .. Set the stream and buffer reset methods for the default backend Change-Id: Ia0b2360ada06bff96691ee08ac923e08883462ff --- M Timeline.body.php 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/timeline refs/changes/28/313328/1 diff --git a/Timeline.body.php b/Timeline.body.php index 87e7ec6..29a7e33 100644 --- a/Timeline.body.php +++ b/Timeline.body.php @@ -41,7 +41,10 @@ 'wikiId' => wfWikiID(), 'lockManager' => new NullLockManager( [] ), 'containerPaths' => [ 'timeline-render' => "{$wgUploadDirectory}/timeline" ], - 'fileMode' => 0777 ] + 'fileMode' => 0777, + 'obResetFunc' => 'wfResetOutputBuffers', + 'streamMimeFunc' => [ 'StreamFile', 'contentTypeFromPath' ] + ] ); } -- To view, visit https://gerrit.wikimedia.org/r/313328 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia0b2360ada06bff96691ee08ac923e08883462ff Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/timeline 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] mediawiki...Score[master]: Set the stream and buffer reset methods for the default backend
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/313327 Change subject: Set the stream and buffer reset methods for the default backend .. Set the stream and buffer reset methods for the default backend Change-Id: I422553e6ef4f49c6de70b53ea407c2116bfa7cf6 --- M Score.body.php 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Score refs/changes/27/313327/1 diff --git a/Score.body.php b/Score.body.php index 8b70c7d..fd1e27c 100644 --- a/Score.body.php +++ b/Score.body.php @@ -185,7 +185,9 @@ 'wikiId' => wfWikiId(), 'lockManager'=> new NullLockManager( array() ), 'containerPaths' => array( 'score-render' => $dir ), - 'fileMode' => 0777 + 'fileMode' => 0777, + 'obResetFunc' => 'wfResetOutputBuffers', + 'streamMimeFunc' => [ 'StreamFile', 'contentTypeFromPath' ] ) ); } return self::$backend; -- To view, visit https://gerrit.wikimedia.org/r/313327 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I422553e6ef4f49c6de70b53ea407c2116bfa7cf6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Score 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] mediawiki...TranslateSvg[master]: Set the stream and buffer reset methods for the default backend
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/313326 Change subject: Set the stream and buffer reset methods for the default backend .. Set the stream and buffer reset methods for the default backend Change-Id: I87e41f2a2bbecb90b18efdb29be9f5ff86168c5b --- M SVGFormatWriter.php 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TranslateSvg refs/changes/26/313326/1 diff --git a/SVGFormatWriter.php b/SVGFormatWriter.php index 3956efa..a3ec720 100644 --- a/SVGFormatWriter.php +++ b/SVGFormatWriter.php @@ -299,7 +299,9 @@ 'name' => 'translatesvg-backend', 'lockManager'=> 'nullLockManager', 'containerPaths' => array( 'translatesvg-render' => $wgTranslateSvgDirectory ), - 'fileMode' => 0777 + 'fileMode' => 0777, + 'obResetFunc' => 'wfResetOutputBuffers', + 'streamMimeFunc' => [ 'StreamFile', 'contentTypeFromPath' ] ) ); } return $backend; -- To view, visit https://gerrit.wikimedia.org/r/313326 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I87e41f2a2bbecb90b18efdb29be9f5ff86168c5b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TranslateSvg 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] mediawiki...Math[master]: Set the stream and buffer reset methods for the default backend
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/313325 Change subject: Set the stream and buffer reset methods for the default backend .. Set the stream and buffer reset methods for the default backend Change-Id: Ia28c92a66a217cea24ff70f5be1a51a53fa5d6f8 --- M MathTexvc.php 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Math refs/changes/25/313325/1 diff --git a/MathTexvc.php b/MathTexvc.php index 8a1bc29..6c61d86 100644 --- a/MathTexvc.php +++ b/MathTexvc.php @@ -327,7 +327,9 @@ 'wikiId' => wfWikiId(), 'lockManager'=> new NullLockManager( [] ), 'containerPaths' => [ 'math-render' => $wgMathDirectory ], - 'fileMode' => 0777 + 'fileMode' => 0777, + 'obResetFunc'=> 'wfResetOutputBuffers', + 'streamMimeFunc' => [ 'StreamFile', 'contentTypeFromPath' ] ] ); } return $backend; -- To view, visit https://gerrit.wikimedia.org/r/313325 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia28c92a66a217cea24ff70f5be1a51a53fa5d6f8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Math 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] mediawiki...mobileapps[master]: Flatten image descriptions in media endpoints
Jdlrobson has uploaded a new change for review. https://gerrit.wikimedia.org/r/313324 Change subject: Flatten image descriptions in media endpoints .. Flatten image descriptions in media endpoints Bug: T117941 Change-Id: I43fab6f345b4b5cf1e9b3bce4c9962628d43e2b4 --- M routes/media.js M test/features/media/pagecontent.js 2 files changed, 28 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/mobileapps refs/changes/24/313324/1 diff --git a/routes/media.js b/routes/media.js index c9d9760..3b507ad 100644 --- a/routes/media.js +++ b/routes/media.js @@ -1,6 +1,8 @@ 'use strict'; var BBPromise = require('bluebird'); +var domino = require( 'domino' ); + var mUtil = require('../lib/mobile-util'); var parsoid = require('../lib/parsoid-access'); var preq = require('preq'); @@ -19,6 +21,25 @@ var app; /** + * Updates media descriptions to contain plain text + * + * @param {Object} json + * @return {Object} json with some adjustments + */ +function flattenDescriptions( json ) { + var doc = domino.createDocument(); + json.items.forEach( function ( item ) { +var node; +if ( item.ext && item.ext.ImageDescription ) { + node = doc.createElement( 'div' ); + node.innerHTML = item.ext.ImageDescription; + item.ext.ImageDescription = node.textContent.trim(); +} + } ); + return json; +} + +/** * GET {domain}/v1/page/media/{title} * Gets the media items associated with the given page. */ @@ -30,7 +51,7 @@ res.status(200); mUtil.setETag(req, res, response.page.revision); mUtil.setContentType(res, mUtil.CONTENT_TYPES.unpublished); -res.json(response.media).end(); +res.json(flattenDescriptions(response.media)).end(); }); }); diff --git a/test/features/media/pagecontent.js b/test/features/media/pagecontent.js index c7ac987..be1de69 100644 --- a/test/features/media/pagecontent.js +++ b/test/features/media/pagecontent.js @@ -59,4 +59,10 @@ assert.deepEqual(res.status, 404); }); }); +it('strips html from descriptions', function() { +return preq.get({ uri: server.config.uri + 'en.wikipedia.org/v1/page/media/Neo_(The_Matrix)' }) +.then(function(res) { +assert.equal(res.body.items[0].ext.ImageDescription, 'Promotional image of Neo (The Matrix) (played by Keanu Reeves).'); +}); +}); }); -- To view, visit https://gerrit.wikimedia.org/r/313324 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I43fab6f345b4b5cf1e9b3bce4c9962628d43e2b4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/mobileapps 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] mediawiki...ConfirmEdit[master]: Set the stream and buffer reset methods for the default backend
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/313323 Change subject: Set the stream and buffer reset methods for the default backend .. Set the stream and buffer reset methods for the default backend Change-Id: I93ad529d2238f52815e4abd32aa9355feda826f3 --- M FancyCaptcha/FancyCaptcha.class.php 1 file changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ConfirmEdit refs/changes/23/313323/1 diff --git a/FancyCaptcha/FancyCaptcha.class.php b/FancyCaptcha/FancyCaptcha.class.php index ec5d503..094aaf6 100644 --- a/FancyCaptcha/FancyCaptcha.class.php +++ b/FancyCaptcha/FancyCaptcha.class.php @@ -21,10 +21,12 @@ if ( !$backend ) { $backend = new FSFileBackend( [ 'name' => 'captcha-backend', - 'wikiId' => wfWikiId(), + 'wikiId' => wfWikiID(), 'lockManager'=> new NullLockManager( [] ), 'containerPaths' => [ 'captcha-render' => $wgCaptchaDirectory ], - 'fileMode' => 777 + 'fileMode' => 777, + 'obResetFunc'=> 'wfResetOutputBuffers', + 'streamMimeFunc' => [ 'StreamFile', 'contentTypeFromPath' ] ] ); } return $backend; -- To view, visit https://gerrit.wikimedia.org/r/313323 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I93ad529d2238f52815e4abd32aa9355feda826f3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ConfirmEdit 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] mediawiki...BibManager[master]: Replaced Article::fetchContent() call in BibManager
jenkins-bot has submitted this change and it was merged. Change subject: Replaced Article::fetchContent() call in BibManager .. Replaced Article::fetchContent() call in BibManager Replaced the deprecated function Article::fetchContent() in BibManager with Wikipage()::getContent() Bug: T146193 Change-Id: I7105520f1d9c4dd011225a118a7ec3d0bbcefbab --- M includes/BibManagerHooks.php 1 file changed, 3 insertions(+), 2 deletions(-) Approvals: Reedy: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/BibManagerHooks.php b/includes/BibManagerHooks.php index 3c636f5..43cdd16 100644 --- a/includes/BibManagerHooks.php +++ b/includes/BibManagerHooks.php @@ -199,8 +199,9 @@ public static function onBiblistTag ( $input, $args, $parser, $frame ) { $parser->disableCache(); - $article = new Article( $parser->getTitle() ); - $content = $article->fetchContent(); + $page = new WikiPage( $parser->getTitle() ); + $pageContent = $page->getContent(); + $content = ContentHandler::getContentText( $pageContent ); $parser->getOutput()->addModuleStyles( 'ext.bibManager.styles' ); $out = array(); -- To view, visit https://gerrit.wikimedia.org/r/312716 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7105520f1d9c4dd011225a118a7ec3d0bbcefbab Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/extensions/BibManager Gerrit-Branch: master Gerrit-Owner: SoniGerrit-Reviewer: Legoktm Gerrit-Reviewer: Reedy Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: rdbms: Lazy-init DatabaseDomain::getId()
jenkins-bot has submitted this change and it was merged. Change subject: rdbms: Lazy-init DatabaseDomain::getId() .. rdbms: Lazy-init DatabaseDomain::getId() Follows-up 847b91b. Noticed that in Xenon profiles, about 25% of Database::__construct time is spent in array_map, via DatabaseDomain::convertToString. * Database::__construct * DatabaseDomain::__construct/convertToString/array_map * DatabaseDomain::newUnspecified * DatabaseDomain::__construct/convertToString/array_map * DatabaseMysqlBase::open * mysqli::* Change-Id: Ib5ae7d1d03b27df504a7e5f552e36a0ca6fcf97e --- M includes/libs/rdbms/database/DatabaseDomain.php 1 file changed, 5 insertions(+), 2 deletions(-) Approvals: Aaron Schulz: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/libs/rdbms/database/DatabaseDomain.php b/includes/libs/rdbms/database/DatabaseDomain.php index 01b6b21..a3ae6f1 100644 --- a/includes/libs/rdbms/database/DatabaseDomain.php +++ b/includes/libs/rdbms/database/DatabaseDomain.php @@ -51,7 +51,6 @@ throw new InvalidArgumentException( "Prefix must be a string." ); } $this->prefix = $prefix; - $this->equivalentString = $this->convertToString(); } /** @@ -105,7 +104,7 @@ ); } - return ( $this->equivalentString === $other ); + return ( $this->getId() === $other ); } /** @@ -133,6 +132,10 @@ * @return string */ public function getId() { + if ( $this->equivalentString === null ) { + $this->equivalentString = $this->convertToString(); + } + return $this->equivalentString; } -- To view, visit https://gerrit.wikimedia.org/r/313315 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib5ae7d1d03b27df504a7e5f552e36a0ca6fcf97e Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: KrinkleGerrit-Reviewer: Aaron Schulz Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Prepatory work for versioning
Jdlrobson has uploaded a new change for review. https://gerrit.wikimedia.org/r/313322 Change subject: Prepatory work for versioning .. Prepatory work for versioning Introduce buildLeadResponse and buildAllResponse This will allow us to use these methods in 2 different endpoints and allow the introduction of breaking changes. See follow up patches for more on the narrative Change-Id: I6f1ec61a13ba43b43b647eb5e6e9f8fadd2c1d58 --- M routes/mobile-sections.js 1 file changed, 28 insertions(+), 21 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/mobileapps refs/changes/22/313322/1 diff --git a/routes/mobile-sections.js b/routes/mobile-sections.js index 6a21b5c..f21007a 100644 --- a/routes/mobile-sections.js +++ b/routes/mobile-sections.js @@ -148,11 +148,7 @@ }); } -/** - * GET {domain}/v1/page/mobile-sections/{title} - * Gets the mobile app version of a given wiki page. - */ -router.get('/mobile-sections/:title/:revision?', function (req, res) { +function buildAllResponse(req, res) { return BBPromise.props({ page: parsoid.pageContentPromise(app, req), meta: pageMetadataPromise(req) @@ -168,6 +164,32 @@ mUtil.setContentType(res, mUtil.CONTENT_TYPES.mobileSections); res.json(response).end(); }); +} + +function buildLeadResponse(req, res) { +return BBPromise.props({ +page: parsoid.pageContentPromise(app, req), +meta: pageMetadataPromise(req), +extract: mwapi.requestExtract(app, req) +}).then(function (response) { +if (response.meta.mainpage) { +return mainPageFixPromise(req, response); +} +return response; +}).then(function (response) { +response = buildLead(response); +res.status(200); +mUtil.setETag(req, res, response.revision); +mUtil.setContentType(res, mUtil.CONTENT_TYPES.mobileSections); +res.json(response).end(); +}); +} +/** + * GET {domain}/v1/page/mobile-sections/{title} + * Gets the mobile app version of a given wiki page. + */ +router.get('/mobile-sections/:title/:revision?', function (req, res) { +return buildAllResponse.apply(this, arguments); }); /** @@ -175,22 +197,7 @@ * Gets the lead section for the mobile app version of a given wiki page. */ router.get('/mobile-sections-lead/:title/:revision?', function (req, res) { -return BBPromise.props({ -page: parsoid.pageContentPromise(app, req), -meta: pageMetadataPromise(req), -extract: mwapi.requestExtract(app, req) -}).then(function (response) { -if (response.meta.mainpage) { -return mainPageFixPromise(req, response); -} -return response; -}).then(function (response) { -response = buildLead(response); -res.status(200); -mUtil.setETag(req, res, response.revision); -mUtil.setContentType(res, mUtil.CONTENT_TYPES.mobileSections); -res.json(response).end(); -}); +return buildLeadResponse.apply(this, arguments); }); /** -- To view, visit https://gerrit.wikimedia.org/r/313322 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6f1ec61a13ba43b43b647eb5e6e9f8fadd2c1d58 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/mobileapps 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] mediawiki/core[master]: Parser: Allow `` and `` in table of contents
jenkins-bot has submitted this change and it was merged. Change subject: Parser: Allow `` and `` in table of contents .. Parser: Allow `` and `` in table of contents Bug: T35715 Change-Id: Iec6a05e3e6bb622f477e6ebeb57e9f65da5f22bd --- M includes/parser/Parser.php M tests/parser/parserTests.txt 2 files changed, 19 insertions(+), 2 deletions(-) Approvals: Subramanya Sastry: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index 7c18798..c4149b0 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -4138,12 +4138,13 @@ # * (r105284) # * (bug 72884) # * and (bug 35167) + # * and (T35715) # We strip any parameter from accepted tags (second regex), except dir="rtl|ltr" from , # to allow setting directionality in toc items. $tocline = preg_replace( [ - '#<(?!/?(span|sup|sub|bdi|i|b)(?: [^>]*)?>).*?>#', - '#<(/?(?:span(?: dir="(?:rtl|ltr)")?|sup|sub|bdi|i|b))(?: .*?)?>#' + '#<(?!/?(span|sup|sub|bdi|i|b|s|strike)(?: [^>]*)?>).*?>#', + '#<(/?(?:span(?: dir="(?:rtl|ltr)")?|sup|sub|bdi|i|b|s|strike))(?: .*?)?>#' ], [ '', '<$1>' ], $safeHeadline diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index 2c8b163..80a78f0 100644 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@ -21631,6 +21631,22 @@ !! end +!! test +T35715: s/strike element in ToC +!! wikitext +__TOC__ +== test test test == +!! html +Contents + +1 test test test + + + +test test test[edit] + +!! end + # Note that the html output does not have the , but the # html+tidy output *does*. This is because the empty is # removed by the sanitizer, but only when tidy is *not* enabled (!). -- To view, visit https://gerrit.wikimedia.org/r/312093 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iec6a05e3e6bb622f477e6ebeb57e9f65da5f22bd Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Bartosz DziewońskiGerrit-Reviewer: C. Scott Ananian Gerrit-Reviewer: Jackmcbarn Gerrit-Reviewer: Legoktm Gerrit-Reviewer: Subramanya Sastry Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Remove old variable transfers
Reedy has uploaded a new change for review. https://gerrit.wikimedia.org/r/313321 Change subject: Remove old variable transfers .. Remove old variable transfers Bug: T146945 Change-Id: Id8c53f8f43389e47eb9bbdd47e61eba7e44a37b1 --- M wmf-config/mobile-labs.php 1 file changed, 0 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/21/313321/1 diff --git a/wmf-config/mobile-labs.php b/wmf-config/mobile-labs.php index ff80d8d..131bf50 100644 --- a/wmf-config/mobile-labs.php +++ b/wmf-config/mobile-labs.php @@ -17,8 +17,6 @@ $wgMobileFrontendLogo = $wgLogo; $wgMFForceSecureLogin = false; -$wgMFUseCentralAuthToken = $wmgMFUseCentralAuthToken; -$wgMFSpecialCaseMainPage = $wmgMFSpecialCaseMainPage; $wgMFMobileFormatterHeadings = $wmgMFMobileFormatterHeadings; -- To view, visit https://gerrit.wikimedia.org/r/313321 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id8c53f8f43389e47eb9bbdd47e61eba7e44a37b1 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Reedy___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceFoundation[master]: One more doEdit() -> doEditContent()
jenkins-bot has submitted this change and it was merged. Change subject: One more doEdit() -> doEditContent() .. One more doEdit() -> doEditContent() Bug: T145736 Change-Id: I010c145da584b2fb7affbf8db7338edbb1a3d754 --- M maintenance/RenameCategories.php 1 file changed, 13 insertions(+), 10 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/maintenance/RenameCategories.php b/maintenance/RenameCategories.php index 0d01364..24832fe 100644 --- a/maintenance/RenameCategories.php +++ b/maintenance/RenameCategories.php @@ -359,23 +359,26 @@ if (!$testing) { $newtitle = Title::newFromText($newtitletext, NS_CATEGORY); $newarticle = new Article($newtitle); - $savestat = $newarticle->doEdit( + $savestat = $newarticle->doEditContent( ContentHandler::makeContent( $oldarticlecontent, $newtitle ), $summary, - ( $minor ? EDIT_MINOR : 0 ) | - ( $bot ? EDIT_FORCE_BOT : 0 ) | - ( $autoSummary ? EDIT_AUTOSUMMARY : 0 ) | - ( $noRC ? EDIT_SUPPRESS_RC : 0 ) + ( $minor ? EDIT_MINOR : 0 ) | + ( $bot ? EDIT_FORCE_BOT : 0 ) | + ( $autoSummary ? EDIT_AUTOSUMMARY : 0 ) | + ( $noRC ? EDIT_SUPPRESS_RC : 0 ) ); if ($savestat->isGood()) echo "moved successfully\n"; else echo "failed moving\n"; /* echo "Creating redirect from $oldtitletext to $newtitletext : "; - $redirstat = $oldarticle->doEdit( "#REDIRECT [[:$newtitle]]", $summary, - ( $minor ? EDIT_MINOR : 0 ) | - ( $bot ? EDIT_FORCE_BOT : 0 ) | - ( $autoSummary ? EDIT_AUTOSUMMARY : 0 ) | - ( $noRC ? EDIT_SUPPRESS_RC : 0 ) ); + $redirstat = $oldarticle->doEditContent( + ContentHandler::makeContent( "#REDIRECT [[:$newtitle]]", $oldTitle ), + $summary, + ( $minor ? EDIT_MINOR : 0 ) | + ( $bot ? EDIT_FORCE_BOT : 0 ) | + ( $autoSummary ? EDIT_AUTOSUMMARY : 0 ) | + ( $noRC ? EDIT_SUPPRESS_RC : 0 ) + ); if ($redirstat->isGood()) echo "successful\n"; else echo "failed\n"; */ -- To view, visit https://gerrit.wikimedia.org/r/313248 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I010c145da584b2fb7affbf8db7338edbb1a3d754 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation Gerrit-Branch: master Gerrit-Owner: ReedyGerrit-Reviewer: Dvogel hallowelt Gerrit-Reviewer: Krinkle Gerrit-Reviewer: Ljonka Gerrit-Reviewer: Mglaser Gerrit-Reviewer: Pwirth Gerrit-Reviewer: Reedy Gerrit-Reviewer: Robert Vogel Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[deployment]: Merge branch 'master' into HEAD
jenkins-bot has submitted this change and it was merged. Change subject: Merge branch 'master' into HEAD .. Merge branch 'master' into HEAD Conflicts: PaymentProviders/Adyen/Tests/phpunit/CaptureJobTest.php PaymentProviders/Adyen/Tests/phpunit/RecordCaptureJobTest.php PaymentProviders/PayPal/Tests/phpunit/CaptureIncomingMessageTest.php Tests/PendingQueueConsumerTest.php Tests/QueueConsumerTest.php Change-Id: If0c014c53a763dac8b89b8d806dafa37361cb607 --- D PaymentProviders/Adyen/Tests/phpunit/CaptureJobTest.php D PaymentProviders/Adyen/Tests/phpunit/RecordCaptureJobTest.php D PaymentProviders/PayPal/Tests/phpunit/CaptureIncomingMessageTest.php D Tests/PendingQueueConsumerTest.php D Tests/QueueConsumerTest.php 5 files changed, 0 insertions(+), 822 deletions(-) Approvals: XenoRyet: Looks good to me, approved jenkins-bot: Verified diff --git a/PaymentProviders/Adyen/Tests/phpunit/CaptureJobTest.php b/PaymentProviders/Adyen/Tests/phpunit/CaptureJobTest.php deleted file mode 100644 index 5fadd77..000 --- a/PaymentProviders/Adyen/Tests/phpunit/CaptureJobTest.php +++ /dev/null @@ -1,238 +0,0 @@ -<<< HEAD (4b930a Merge branch 'master' into deployment) -=== -config = AdyenTestConfiguration::createWithSuccessfulApi(); - Context::initWithLogger( $this->config ); - $this->pendingDatabase = PendingDatabase::get(); - $this->pendingMessage = json_decode( - file_get_contents( __DIR__ . '/../Data/pending.json' ) , true - ); - $this->pendingDatabase->storeMessage( $this->pendingMessage ); - $this->antifraudQueue = QueueFactory::getQueue( 'payments-antifraud' ); - } - - public function tearDown() { - $this->pendingDatabase->deleteMessage( $this->pendingMessage ); - parent::tearDown(); - } - - /** -* For a legit donation, ProcessCaptureJob should leave donor data -* in the pending database, add an antifraud message, and return true. -*/ - public function testSuccessfulCapture() { - $api = $this->config->object( 'payment-provider/adyen/api', true ); - - $auth = KeyedOpaqueStorableObject::fromJsonProxy( - 'SmashPig\PaymentProviders\Adyen\ExpatriatedMessages\Authorisation', - file_get_contents( __DIR__ . '/../Data/auth.json' ) - ); - - $job = ProcessCaptureRequestJob::factory( $auth ); - $this->assertTrue( $job->execute() ); - - $donorData = $this->pendingDatabase->fetchMessageByGatewayOrderId( - 'adyen', $auth->merchantReference - ); - - $this->assertNotNull( - $donorData, - 'RequestCaptureJob did not leave donor data on pending queue' - ); - $this->assertTrue( - $donorData['captured'], - 'RequestCaptureJob did not mark donor data as captured' - ); - - $this->assertEquals( - array( - 'currency' => 'USD', - 'amount' => 10, - 'pspReference' => '762895314225', - ), - $api->captured[0], - 'RequestCaptureJob did not make the right capture call' - ); - - $antifraudMessage = $this->antifraudQueue->pop(); - $this->assertNotNull( - $antifraudMessage, - 'RequestCaptureJob did not send antifraud message' - ); - $this->assertEquals( - 'process', - $antifraudMessage['validation_action'], - 'Successful capture should get "process" validation action' - ); - } - - /** -* When AVS and CVV scores push the donation over the review threshold, -* we should not capture the payment, but leave the donor details. -*/ - public function testReviewThreshold() { - $api = $this->config->object( 'payment-provider/adyen/api', true ); - - $auth = KeyedOpaqueStorableObject::fromJsonProxy( - 'SmashPig\PaymentProviders\Adyen\ExpatriatedMessages\Authorisation', - file_get_contents( __DIR__ . '/../Data/auth.json' ) - ); - - $auth->avsResult = '1'; // Bad zip code pushes us over review - - $job = ProcessCaptureRequestJob::factory( $auth ); - $this->assertTrue( $job->execute() ); - - $donorData = $this->pendingDatabase->fetchMessageByGatewayOrderId( -
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Fix use of bogus $params var in FileBackend::__construct()
jenkins-bot has submitted this change and it was merged. Change subject: Fix use of bogus $params var in FileBackend::__construct() .. Fix use of bogus $params var in FileBackend::__construct() Follows-up 81a0e79, 24aa72de, dc522cf0. Also set missing section name parameter in scopedProfileSection(). Bug: T146904 Change-Id: I897c21b766bfea4e4cb83c63f0e40e945bd73747 --- M includes/libs/filebackend/FileBackend.php 1 file changed, 6 insertions(+), 6 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/libs/filebackend/FileBackend.php b/includes/libs/filebackend/FileBackend.php index 0ef9f63..f33f522 100644 --- a/includes/libs/filebackend/FileBackend.php +++ b/includes/libs/filebackend/FileBackend.php @@ -185,15 +185,15 @@ $this->concurrency = isset( $config['concurrency'] ) ? (int)$config['concurrency'] : 50; - $this->obResetFunc = isset( $params['obResetFunc'] ) - ? $params['obResetFunc'] + $this->obResetFunc = isset( $config['obResetFunc'] ) + ? $config['obResetFunc'] : [ $this, 'resetOutputBuffer' ]; - $this->streamMimeFunc = isset( $params['streamMimeFunc'] ) - ? $params['streamMimeFunc'] + $this->streamMimeFunc = isset( $config['streamMimeFunc'] ) + ? $config['streamMimeFunc'] : null; $this->statusWrapper = isset( $config['statusWrapper'] ) ? $config['statusWrapper'] : null; - $this->profiler = isset( $params['profiler'] ) ? $params['profiler'] : null; + $this->profiler = isset( $config['profiler'] ) ? $config['profiler'] : null; $this->logger = isset( $config['logger'] ) ? $config['logger'] : new \Psr\Log\NullLogger(); $this->statusWrapper = isset( $config['statusWrapper'] ) ? $config['statusWrapper'] : null; $this->tmpDirectory = isset( $config['tmpDirectory'] ) ? $config['tmpDirectory'] : null; @@ -1620,7 +1620,7 @@ protected function scopedProfileSection( $section ) { if ( $this->profiler ) { call_user_func( [ $this->profiler, 'profileIn' ], $section ); - return new ScopedCallback( [ $this->profiler, 'profileOut' ] ); + return new ScopedCallback( [ $this->profiler, 'profileOut' ], [ $section ] ); } return null; -- To view, visit https://gerrit.wikimedia.org/r/313287 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I897c21b766bfea4e4cb83c63f0e40e945bd73747 Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron SchulzGerrit-Reviewer: Krinkle Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Load File pages with api.php
Mholloway has uploaded a new change for review. https://gerrit.wikimedia.org/r/313320 Change subject: Load File pages with api.php .. Load File pages with api.php MediaWiki HTML for an image File page includes the image itself, but the Parsoid HTML only includes metadata. Subbu is aware of this and will look into whether Parsoid is behaving as intended. In the meantime, let's load File pages with api.php. Bug: T135242 Change-Id: If96925b3980945088a048013cc707eaeb570c09e --- M app/src/main/java/org/wikipedia/page/JsonPageLoadStrategy.java M app/src/main/java/org/wikipedia/page/linkpreview/LinkPreviewDialog.java M app/src/main/java/org/wikipedia/savedpages/SavedPageSyncService.java M app/src/main/java/org/wikipedia/server/PageServiceFactory.java M app/src/main/java/org/wikipedia/widgets/WidgetProviderFeaturedPage.java M app/src/main/java/org/wikipedia/wiktionary/WiktionaryDialog.java 6 files changed, 17 insertions(+), 14 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/20/313320/1 diff --git a/app/src/main/java/org/wikipedia/page/JsonPageLoadStrategy.java b/app/src/main/java/org/wikipedia/page/JsonPageLoadStrategy.java index bd55f79..35704ef 100644 --- a/app/src/main/java/org/wikipedia/page/JsonPageLoadStrategy.java +++ b/app/src/main/java/org/wikipedia/page/JsonPageLoadStrategy.java @@ -268,11 +268,9 @@ @VisibleForTesting protected void loadLeadSection(final int startSequenceNum) { app.getSessionFunnel().leadSectionFetchStart(); -PageServiceFactory.create(model.getTitle().getSite()).pageLead( -model.getTitle().getPrefixedText(), -calculateLeadImageWidth(), -!app.isImageDownloadEnabled(), -new PageLead.Callback() { +PageServiceFactory.create(model.getTitle().getSite(), model.getTitle().namespace()) +.pageLead(model.getTitle().getPrefixedText(), calculateLeadImageWidth(), +!app.isImageDownloadEnabled(), new PageLead.Callback() { @Override public void success(PageLead pageLead) { app.getSessionFunnel().leadSectionFetchEnd(); @@ -790,9 +788,8 @@ private void loadRemainingSections(final int startSequenceNum) { app.getSessionFunnel().restSectionsFetchStart(); -PageServiceFactory.create(model.getTitle().getSite()).pageRemaining( -model.getTitle().getPrefixedText(), -!app.isImageDownloadEnabled(), +PageServiceFactory.create(model.getTitle().getSite(), model.getTitle().namespace()) +.pageRemaining(model.getTitle().getPrefixedText(), !app.isImageDownloadEnabled(), new PageRemaining.Callback() { @Override public void success(PageRemaining pageRemaining) { diff --git a/app/src/main/java/org/wikipedia/page/linkpreview/LinkPreviewDialog.java b/app/src/main/java/org/wikipedia/page/linkpreview/LinkPreviewDialog.java index 4b562e9..c3136e9 100755 --- a/app/src/main/java/org/wikipedia/page/linkpreview/LinkPreviewDialog.java +++ b/app/src/main/java/org/wikipedia/page/linkpreview/LinkPreviewDialog.java @@ -229,7 +229,7 @@ } private void loadContent() { -PageServiceFactory.create(pageTitle.getSite()).pageSummary( +PageServiceFactory.create(pageTitle.getSite(), pageTitle.namespace()).pageSummary( pageTitle.getPrefixedText(), linkPreviewOnLoadCallback); } diff --git a/app/src/main/java/org/wikipedia/savedpages/SavedPageSyncService.java b/app/src/main/java/org/wikipedia/savedpages/SavedPageSyncService.java index cda7f46..2a25aa8 100644 --- a/app/src/main/java/org/wikipedia/savedpages/SavedPageSyncService.java +++ b/app/src/main/java/org/wikipedia/savedpages/SavedPageSyncService.java @@ -174,6 +174,6 @@ @NonNull private PageService getApiService(@NonNull PageTitle title) { -return PageServiceFactory.create(title.getSite()); +return PageServiceFactory.create(title.getSite(), title.namespace()); } } diff --git a/app/src/main/java/org/wikipedia/server/PageServiceFactory.java b/app/src/main/java/org/wikipedia/server/PageServiceFactory.java index d820d8d..4ff8dc2 100644 --- a/app/src/main/java/org/wikipedia/server/PageServiceFactory.java +++ b/app/src/main/java/org/wikipedia/server/PageServiceFactory.java @@ -1,6 +1,9 @@ package org.wikipedia.server; +import android.support.annotation.NonNull; + import org.wikipedia.Site; +import org.wikipedia.page.Namespace; import org.wikipedia.server.mwapi.MwPageService; import org.wikipedia.server.restbase.RbPageService; import org.wikipedia.settings.RbSwitch; @@ -11,8 +14,10 @@ * infrastructure. */ public final class PageServiceFactory { -public static PageService create(Site site) { -if
[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Update definition test
jenkins-bot has submitted this change and it was merged. Change subject: Update definition test .. Update definition test The italic tag it looks for no longer exists. It's not clear why we need to check for these tags so to try to prevent this test from failing again it seems better to rely simply on the text of the definition which is hopefully less likely to change Bug: T146930 Change-Id: Ie7e21f3268d5e094ff155b668f78fe6908b864c7 --- M test/features/definition/definition.js 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Mholloway: Looks good to me, approved jenkins-bot: Verified diff --git a/test/features/definition/definition.js b/test/features/definition/definition.js index f51359b..662abab 100644 --- a/test/features/definition/definition.js +++ b/test/features/definition/definition.js @@ -36,7 +36,7 @@ } } assert.deepEqual(en[0].partOfSpeech, 'Noun'); -assert.ok(en[0].definitions[0].definition.indexOf('An animal of the family hoist') === 0, -- To view, visit https://gerrit.wikimedia.org/r/313316 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie7e21f3268d5e094ff155b668f78fe6908b864c7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/mobileapps Gerrit-Branch: master Gerrit-Owner: JdlrobsonGerrit-Reviewer: BearND Gerrit-Reviewer: Dbrant Gerrit-Reviewer: Fjalapeno Gerrit-Reviewer: GWicke Gerrit-Reviewer: Jhernandez Gerrit-Reviewer: Mholloway Gerrit-Reviewer: Mhurd Gerrit-Reviewer: Mobrovac Gerrit-Reviewer: Niedzielski Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[deployment]: Merge branch 'master' into HEAD
XenoRyet has uploaded a new change for review. https://gerrit.wikimedia.org/r/313319 Change subject: Merge branch 'master' into HEAD .. Merge branch 'master' into HEAD Conflicts: PaymentProviders/Adyen/Tests/phpunit/CaptureJobTest.php PaymentProviders/Adyen/Tests/phpunit/RecordCaptureJobTest.php PaymentProviders/PayPal/Tests/phpunit/CaptureIncomingMessageTest.php Tests/PendingQueueConsumerTest.php Tests/QueueConsumerTest.php Change-Id: If0c014c53a763dac8b89b8d806dafa37361cb607 --- D PaymentProviders/Adyen/Tests/phpunit/CaptureJobTest.php D PaymentProviders/Adyen/Tests/phpunit/RecordCaptureJobTest.php D PaymentProviders/PayPal/Tests/phpunit/CaptureIncomingMessageTest.php D Tests/PendingQueueConsumerTest.php D Tests/QueueConsumerTest.php 5 files changed, 0 insertions(+), 822 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig refs/changes/19/313319/1 diff --git a/PaymentProviders/Adyen/Tests/phpunit/CaptureJobTest.php b/PaymentProviders/Adyen/Tests/phpunit/CaptureJobTest.php deleted file mode 100644 index 5fadd77..000 --- a/PaymentProviders/Adyen/Tests/phpunit/CaptureJobTest.php +++ /dev/null @@ -1,238 +0,0 @@ -<<< HEAD (4b930a Merge branch 'master' into deployment) -=== -config = AdyenTestConfiguration::createWithSuccessfulApi(); - Context::initWithLogger( $this->config ); - $this->pendingDatabase = PendingDatabase::get(); - $this->pendingMessage = json_decode( - file_get_contents( __DIR__ . '/../Data/pending.json' ) , true - ); - $this->pendingDatabase->storeMessage( $this->pendingMessage ); - $this->antifraudQueue = QueueFactory::getQueue( 'payments-antifraud' ); - } - - public function tearDown() { - $this->pendingDatabase->deleteMessage( $this->pendingMessage ); - parent::tearDown(); - } - - /** -* For a legit donation, ProcessCaptureJob should leave donor data -* in the pending database, add an antifraud message, and return true. -*/ - public function testSuccessfulCapture() { - $api = $this->config->object( 'payment-provider/adyen/api', true ); - - $auth = KeyedOpaqueStorableObject::fromJsonProxy( - 'SmashPig\PaymentProviders\Adyen\ExpatriatedMessages\Authorisation', - file_get_contents( __DIR__ . '/../Data/auth.json' ) - ); - - $job = ProcessCaptureRequestJob::factory( $auth ); - $this->assertTrue( $job->execute() ); - - $donorData = $this->pendingDatabase->fetchMessageByGatewayOrderId( - 'adyen', $auth->merchantReference - ); - - $this->assertNotNull( - $donorData, - 'RequestCaptureJob did not leave donor data on pending queue' - ); - $this->assertTrue( - $donorData['captured'], - 'RequestCaptureJob did not mark donor data as captured' - ); - - $this->assertEquals( - array( - 'currency' => 'USD', - 'amount' => 10, - 'pspReference' => '762895314225', - ), - $api->captured[0], - 'RequestCaptureJob did not make the right capture call' - ); - - $antifraudMessage = $this->antifraudQueue->pop(); - $this->assertNotNull( - $antifraudMessage, - 'RequestCaptureJob did not send antifraud message' - ); - $this->assertEquals( - 'process', - $antifraudMessage['validation_action'], - 'Successful capture should get "process" validation action' - ); - } - - /** -* When AVS and CVV scores push the donation over the review threshold, -* we should not capture the payment, but leave the donor details. -*/ - public function testReviewThreshold() { - $api = $this->config->object( 'payment-provider/adyen/api', true ); - - $auth = KeyedOpaqueStorableObject::fromJsonProxy( - 'SmashPig\PaymentProviders\Adyen\ExpatriatedMessages\Authorisation', - file_get_contents( __DIR__ . '/../Data/auth.json' ) - ); - - $auth->avsResult = '1'; // Bad zip code pushes us over review - - $job = ProcessCaptureRequestJob::factory( $auth ); - $this->assertTrue( $job->execute() ); - - $donorData =
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: resourceloader: Avoid needless GPC normalisation
jenkins-bot has submitted this change and it was merged. Change subject: resourceloader: Avoid needless GPC normalisation .. resourceloader: Avoid needless GPC normalisation Utility methods like getFuzzyBool already use getRawVal instead of getVal (see 83df6d8). But there was still direct use of getVal which meant we still pay for WebRequest normalisation in load.php. ResourceLoaderContext::__construct's use of WebRequest::getVal accounts for 0.12% of execution time according to a Xenon daily log (2016-09-27.all.reversed.svgz). The total use of WebRequest::getVal is 0.26% of execution time. So almost half of that comes from RL. Change-Id: Id37619ceadb5c990abf83f7910104cbc95523d28 --- M includes/resourceloader/ResourceLoaderContext.php 1 file changed, 18 insertions(+), 11 deletions(-) Approvals: Aaron Schulz: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/resourceloader/ResourceLoaderContext.php b/includes/resourceloader/ResourceLoaderContext.php index 4a2f759..b17200f 100644 --- a/includes/resourceloader/ResourceLoaderContext.php +++ b/includes/resourceloader/ResourceLoaderContext.php @@ -26,7 +26,7 @@ /** * Object passed around to modules which contains information about the state - * of a specific loader request + * of a specific loader request. */ class ResourceLoaderContext { protected $resourceLoader; @@ -62,26 +62,33 @@ $this->request = $request; $this->logger = $resourceLoader->getLogger(); + // Future developers: Avoid use of getVal() in this class, which performs + // expensive UTF normalisation by default. Use getRawVal() instead. + // Values here are either one of a finite number of internal IDs, + // or previously-stored user input (e.g. titles, user names) that were passed + // to this endpoint by ResourceLoader itself from the canonical value. + // Values do not come directly from user input and need not match. + // List of modules - $modules = $request->getVal( 'modules' ); + $modules = $request->getRawVal( 'modules' ); $this->modules = $modules ? self::expandModuleNames( $modules ) : []; // Various parameters - $this->user = $request->getVal( 'user' ); + $this->user = $request->getRawVal( 'user' ); $this->debug = $request->getFuzzyBool( 'debug', $resourceLoader->getConfig()->get( 'ResourceLoaderDebug' ) ); - $this->only = $request->getVal( 'only', null ); - $this->version = $request->getVal( 'version', null ); + $this->only = $request->getRawVal( 'only', null ); + $this->version = $request->getRawVal( 'version', null ); $this->raw = $request->getFuzzyBool( 'raw' ); // Image requests - $this->image = $request->getVal( 'image' ); - $this->variant = $request->getVal( 'variant' ); - $this->format = $request->getVal( 'format' ); + $this->image = $request->getRawVal( 'image' ); + $this->variant = $request->getRawVal( 'variant' ); + $this->format = $request->getRawVal( 'format' ); - $this->skin = $request->getVal( 'skin' ); + $this->skin = $request->getRawVal( 'skin' ); $skinnames = Skin::getSkinNames(); // If no skin is specified, or we don't recognize the skin, use the default skin if ( !$this->skin || !isset( $skinnames[$this->skin] ) ) { @@ -171,7 +178,7 @@ if ( $this->language === null ) { // Must be a valid language code after this point (T64849) // Only support uselang values that follow built-in conventions (T102058) - $lang = $this->getRequest()->getVal( 'lang', '' ); + $lang = $this->getRequest()->getRawVal( 'lang', '' ); // Stricter version of RequestContext::sanitizeLangCode() if ( !Language::isValidBuiltInCode( $lang ) ) { wfDebug( "Invalid user language code\n" ); @@ -187,7 +194,7 @@ */ public function getDirection() { if ( $this->direction === null ) { - $this->direction = $this->getRequest()->getVal( 'dir' ); + $this->direction = $this->getRequest()->getRawVal( 'dir' ); if ( !$this->direction ) { // Determine directionality based on user language (bug 6100) $this->direction = Language::factory( $this->getLanguage() )->getDir(); -- To view, visit
[MediaWiki-commits] [Gerrit] mediawiki...SocialProfile[master]: Replace Article::doEdit()
jenkins-bot has submitted this change and it was merged. Change subject: Replace Article::doEdit() .. Replace Article::doEdit() Bug: T145736 Change-Id: I624250803946b9f2e818bf5e8edc2f2dc8f56323 --- M UserProfile/SpecialEditProfile.php M UserProfile/SpecialToggleUserPageType.php M UserProfile/SpecialUpdateProfile.php M UserStats/GenerateTopUsersReport.php 4 files changed, 18 insertions(+), 7 deletions(-) Approvals: Jack Phoenix: Looks good to me, approved jenkins-bot: Verified diff --git a/UserProfile/SpecialEditProfile.php b/UserProfile/SpecialEditProfile.php index f366841..35d79ce 100644 --- a/UserProfile/SpecialEditProfile.php +++ b/UserProfile/SpecialEditProfile.php @@ -118,9 +118,13 @@ // create the user page if it doesn't exist yet $title = Title::makeTitle( NS_USER, $target->getName() ); - $article = new Article( $title ); - if ( !$article->exists() ) { - $article->doEdit( '', 'create user page', EDIT_SUPPRESS_RC ); + $page = new WikiPage( $title ); + if ( !$page->exists() ) { + $page->doEditContent( + ContentHandler::makeContent( '', $title ), + 'create user page', + EDIT_SUPPRESS_RC + ); } } diff --git a/UserProfile/SpecialToggleUserPageType.php b/UserProfile/SpecialToggleUserPageType.php index ff3e2ed..30917fd 100644 --- a/UserProfile/SpecialToggleUserPageType.php +++ b/UserProfile/SpecialToggleUserPageType.php @@ -83,7 +83,10 @@ $user_wiki_title = Title::makeTitle( NS_USER_WIKI, $user->getName() ); $user_wiki = new Article( $user_wiki_title ); if ( !$user_wiki->exists() ) { - $user_wiki->doEdit( $user_page_content, 'import user wiki' ); + $user_wiki->doEditContent( + ContentHandler::makeContent( $user_page_content, $user_wiki_title ), + 'import user wiki' + ); } } $title = Title::makeTitle( NS_USER, $user->getName() ); diff --git a/UserProfile/SpecialUpdateProfile.php b/UserProfile/SpecialUpdateProfile.php index 62854ad..20ef761 100644 --- a/UserProfile/SpecialUpdateProfile.php +++ b/UserProfile/SpecialUpdateProfile.php @@ -208,7 +208,11 @@ $title = Title::makeTitle( NS_USER, $user->getName() ); $article = new Article( $title ); if ( !$article->exists() ) { - $article->doEdit( '', 'create user page', EDIT_SUPPRESS_RC ); + $article->doEditContent( + ContentHandler::makeContent( '', $title ), + 'create user page', + EDIT_SUPPRESS_RC + ); } } diff --git a/UserStats/GenerateTopUsersReport.php b/UserStats/GenerateTopUsersReport.php index caddf77..d4ed6e4 100644 --- a/UserStats/GenerateTopUsersReport.php +++ b/UserStats/GenerateTopUsersReport.php @@ -253,8 +253,8 @@ // I think not, but... if ( !$article->exists() ) { // For grep: user-stats-report-weekly-edit-summary, user-stats-report-monthly-edit-summary - $article->doEdit( - $pageContent, + $article->doEditContent( + ContentHandler::makeContent( $pageContent, $title ), $this->msg( "user-stats-report-{$period}-edit-summary" )->inContentLanguage()->escaped() ); $date = date( 'Y-m-d H:i:s' ); -- To view, visit https://gerrit.wikimedia.org/r/312099 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I624250803946b9f2e818bf5e8edc2f2dc8f56323 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/SocialProfile Gerrit-Branch: master Gerrit-Owner: ReedyGerrit-Reviewer: Jack Phoenix Gerrit-Reviewer: Krinkle Gerrit-Reviewer: Lewis Cawte Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: [WIP] Perform interwiki searches with a multi-search
EBernhardson has uploaded a new change for review. https://gerrit.wikimedia.org/r/313318 Change subject: [WIP] Perform interwiki searches with a multi-search .. [WIP] Perform interwiki searches with a multi-search Refactors how we perform searches to always use the multi-search interface. There is likely (unmeasured) very little overhead in using the multi-search interface over standard search, and only having to maintain a single code path is a big win. Additionally our future plans for increased multi-wiki search rollout will see multi-search being the most common use case anyways. This multi-search is then used, for our first use case, to consolidate the interwiki search used on itwiki down to a single network request. Rather than sequentially issuing 8 search requests they will now be issued in parallel. TODO: * General cleanup. Parts of this are pretty hackish, could use code review ideas on how to better handle things. * Need's explicit tests. Perhaps can store a few elasticsearch responses in fixtures and run tests that way without needing a live elasticsearch instance. * CirrusSearchRequestSet logging is probably completely wrong now, it hasn't been touched yet. We probably need similar tests that use real response fixtures and assert what the log we generate should look like. * Browser tests? I've only manually tested this by setting $wgCirrusSearchInterwikiSources and seeing the results show up on Special:Search. Will be done in followups: * We still do the cirrus side of building search request for every single interwiki search, even though they are exactly the same with the index changed. Seemed worthwhile to push this change into a future patch rather than over-complicating this one. Bug: T146179 Change-Id: I204bddb16f0716a08e5ecf41555ac3b75853e635 --- M includes/CirrusSearch.php M includes/InterwikiSearcher.php M includes/Searcher.php 3 files changed, 160 insertions(+), 94 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch refs/changes/18/313318/1 diff --git a/includes/CirrusSearch.php b/includes/CirrusSearch.php index ce43cd0..24e28c8 100644 --- a/includes/CirrusSearch.php +++ b/includes/CirrusSearch.php @@ -330,8 +330,6 @@ * @return null|Status|ResultSet */ private function searchTextReal( $term, SearchConfig $config = null ) { - global $wgCirrusSearchInterwikiSources; - // Convert the unicode character 'ideographic whitespace' into standard // whitespace. Cirrussearch treats them both as normal whitespace, but // the preceding isn't appropriately trimmed. @@ -420,28 +418,26 @@ // Add interwiki results, if we have a sane result // Note that we have no way of sending warning back to the user. In this case all warnings // are logged when they are added to the status object so we just ignore them here - if ( $wgCirrusSearchInterwikiSources && - ( $dumpQuery || $dumpResult || method_exists( $result, 'addInterwikiResults' ) ) ) { + if ( ( $dumpQuery || $dumpResult || method_exists( $result, 'addInterwikiResults' ) ) ) { - // If we are dumping we need to convert into an array that can be appended to - if ( $dumpQuery || $dumpResult ) { - $result = [$result]; - } - - // @todo @fixme: This should absolutely be a multisearch. I knew this when I - // wrote the code but Searcher needs some refactoring first. - foreach ( $wgCirrusSearchInterwikiSources as $interwiki => $index ) { - $iwSearch = new InterwikiSearcher( $this->connection, $this->namespaces, null, $index, $interwiki ); - $iwSearch->setReturnQuery( $dumpQuery ); - $iwSearch->setDumpResult( $dumpResult ); - $iwSearch->setReturnExplain( $returnExplain ); - $interwikiResult = $iwSearch->getInterwikiResults( $term ); + $iwSearch = new InterwikiSearcher( $this->connection, $this->namespaces ); + $iwSearch->setReturnQuery( $dumpQuery ); + $iwSearch->setDumpResult( $dumpResult ); + $iwSearch->setReturnExplain( $returnExplain ); + $interwikiResults = $iwSearch->getInterwikiResults( $term ); + if ( $interwikiResults !== null ) { + // If we are dumping we need to convert into an array that can be appended to if ( $dumpQuery || $dumpResult ) { - $result[] =
[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[deployment]: Get all queues with QueueFactory::getQueue
XenoRyet has uploaded a new change for review. https://gerrit.wikimedia.org/r/313317 Change subject: Get all queues with QueueFactory::getQueue .. Get all queues with QueueFactory::getQueue Make the 'queue' key default work everywhere Change-Id: I1c619da04c08cf2470b9f04231fbeed50b1489ce --- M Core/Actions/IncomingMessage.php M Core/DataStores/MultiQueueWriter.php A Core/DataStores/QueueFactory.php M Core/QueueConsumers/BaseQueueConsumer.php M Maintenance/RequeueDelayedMessages.php M PaymentProviders/Adyen/Actions/CaptureResponseAction.php M PaymentProviders/Adyen/Actions/PaymentCaptureAction.php M PaymentProviders/Adyen/ExpatriatedMessages/ReportAvailable.php M PaymentProviders/Adyen/Jobs/ProcessCaptureRequestJob.php M PaymentProviders/Adyen/Jobs/RecordCaptureJob.php M PaymentProviders/Amazon/Actions/AddMessageToQueue.php M PaymentProviders/PayPal/Job.php M PaymentProviders/PayPal/Listener.php M SmashPig.yaml 14 files changed, 64 insertions(+), 44 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig refs/changes/17/313317/1 diff --git a/Core/Actions/IncomingMessage.php b/Core/Actions/IncomingMessage.php index 61adc23..bb2b790 100644 --- a/Core/Actions/IncomingMessage.php +++ b/Core/Actions/IncomingMessage.php @@ -1,6 +1,6 @@ getDestinationQueue(); if ( $destinationQueue ) { - $queue = Context::get()->getConfiguration()->object( "data-store/{$destinationQueue}" ); + $queue = QueueFactory::getQueue( $destinationQueue ); $queueMsg = $msg->normalizeForQueue(); $queue->push( $queueMsg ); diff --git a/Core/DataStores/MultiQueueWriter.php b/Core/DataStores/MultiQueueWriter.php index af90ef0..1cae76d 100644 --- a/Core/DataStores/MultiQueueWriter.php +++ b/Core/DataStores/MultiQueueWriter.php @@ -1,7 +1,6 @@ queues[] = $config->object( $path ); + $this->queues[] = QueueFactory::getQueue( $configKey ); } } diff --git a/Core/DataStores/QueueFactory.php b/Core/DataStores/QueueFactory.php new file mode 100644 index 000..b1d9899 --- /dev/null +++ b/Core/DataStores/QueueFactory.php @@ -0,0 +1,41 @@ +getConfiguration(); + $key = "data-store/$queueName"; + + // Examine the config node for a queue name + $node = $config->val( $key, true ); + if ( + empty( $node['constructor-parameters'] ) || + empty( $node['constructor-parameters'][0]['queue'] ) + ) { + $nameParam = array( + 'data-store' => array( + $queueName => array( + 'constructor-parameters' => array( + array( + 'queue' => $queueName + ) + ) + ) + ) + ); + $config->override( $nameParam ); + } + + return $config->object( $key ); + } +} diff --git a/Core/QueueConsumers/BaseQueueConsumer.php b/Core/QueueConsumers/BaseQueueConsumer.php index f13a588..352896d 100644 --- a/Core/QueueConsumers/BaseQueueConsumer.php +++ b/Core/QueueConsumers/BaseQueueConsumer.php @@ -7,6 +7,7 @@ use SmashPig\Core\Context; use SmashPig\Core\DataStores\DamagedDatabase; +use SmashPig\Core\DataStores\QueueFactory; use SmashPig\Core\Logging\Logger; /** @@ -70,7 +71,7 @@ $this->timeLimit = intval( $timeLimit ); $this->messageLimit = intval( $messageLimit ); - $this->backend = self::getQueue( $queueName ); + $this->backend = QueueFactory::getQueue( $queueName ); if ( !$this->backend instanceof AtomicReadBuffer ) { throw new InvalidArgumentException( @@ -151,19 +152,4 @@ ); } - public static function getQueue( $queueName ) { - $config = Context::get()->getConfiguration(); - $key = "data-store/$queueName"; - - // Get a reference to the config node so we can mess with it - $node =& $config->val( $key, true ); - if ( - empty( $node['constructor-parameters'] ) || - empty( $node['constructor-parameters'][0]['queue'] ) - ) { - $node['constructor-parameters'][0]['queue'] = $queueName; - } - - return $config->object( $key, true ); - } } diff --git a/Maintenance/RequeueDelayedMessages.php
[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Update definition test
Jdlrobson has uploaded a new change for review. https://gerrit.wikimedia.org/r/313316 Change subject: Update definition test .. Update definition test The italic tag it looks for no longer exists. It's not clear why we need to check for these tags so to try to prevent this test from failing again it seems better to rely simply on the text of the definition which is hopefully less likely to change Bug: T146930 Change-Id: Ie7e21f3268d5e094ff155b668f78fe6908b864c7 --- M test/features/definition/definition.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/mobileapps refs/changes/16/313316/1 diff --git a/test/features/definition/definition.js b/test/features/definition/definition.js index f51359b..662abab 100644 --- a/test/features/definition/definition.js +++ b/test/features/definition/definition.js @@ -36,7 +36,7 @@ } } assert.deepEqual(en[0].partOfSpeech, 'Noun'); -assert.ok(en[0].definitions[0].definition.indexOf('An animal of the family hoist') === 0, -- To view, visit https://gerrit.wikimedia.org/r/313316 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie7e21f3268d5e094ff155b668f78fe6908b864c7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/mobileapps 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] mediawiki/core[master]: rdbms: Lazy-init DatabaseDomain::getId()
Krinkle has uploaded a new change for review. https://gerrit.wikimedia.org/r/313315 Change subject: rdbms: Lazy-init DatabaseDomain::getId() .. rdbms: Lazy-init DatabaseDomain::getId() Follows-up 847b91b. Noticed that in Xenon profiles, about 25% of Database::__construct time is spent in array_map, via DatabaseDomain::convertToString. * Database::__construct * DatabaseDomain::__construct/convertToString/array_map * DatabaseDomain::newUnspecified * DatabaseDomain::__construct/convertToString/array_map * DatabaseMysqlBase::open * mysqli::* Change-Id: Ib5ae7d1d03b27df504a7e5f552e36a0ca6fcf97e --- M includes/libs/rdbms/database/DatabaseDomain.php 1 file changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/15/313315/1 diff --git a/includes/libs/rdbms/database/DatabaseDomain.php b/includes/libs/rdbms/database/DatabaseDomain.php index 01b6b21..d030dad 100644 --- a/includes/libs/rdbms/database/DatabaseDomain.php +++ b/includes/libs/rdbms/database/DatabaseDomain.php @@ -51,7 +51,6 @@ throw new InvalidArgumentException( "Prefix must be a string." ); } $this->prefix = $prefix; - $this->equivalentString = $this->convertToString(); } /** @@ -105,7 +104,7 @@ ); } - return ( $this->equivalentString === $other ); + return ( $this->getId() === $other ); } /** @@ -133,6 +132,9 @@ * @return string */ public function getId() { + if ( !$this->equivalentString ) { + $this->equivalentString = $this->convertToString(); + } return $this->equivalentString; } -- To view, visit https://gerrit.wikimedia.org/r/313315 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib5ae7d1d03b27df504a7e5f552e36a0ca6fcf97e 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] mediawiki...Petition[master]: Use mw-ui-progressive rather than deprecated mw-ui-primary
Jdlrobson has uploaded a new change for review. https://gerrit.wikimedia.org/r/313314 Change subject: Use mw-ui-progressive rather than deprecated mw-ui-primary .. Use mw-ui-progressive rather than deprecated mw-ui-primary Bug: T146923 Change-Id: I987b73ceb4cec541613795d950b92a268efeb9a3 --- M SpecialPetitionData.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Petition refs/changes/14/313314/1 diff --git a/SpecialPetitionData.php b/SpecialPetitionData.php index be1aae8..c62d57c 100644 --- a/SpecialPetitionData.php +++ b/SpecialPetitionData.php @@ -14,7 +14,7 @@ $downloadTitle = $this->getPageTitle( 'csv' ); $downloadText = $this->msg( 'petition-data-download' )->parse(); - $downloadLink = Linker::link( $downloadTitle, $downloadText, array( 'class' => 'mw-ui-button mw-ui-primary') ); + $downloadLink = Linker::link( $downloadTitle, $downloadText, array( 'class' => 'mw-ui-button mw-ui-progressive') ); $this->getOutput()->addHTML( $downloadLink ); if ( $par == 'csv' ) { -- To view, visit https://gerrit.wikimedia.org/r/313314 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I987b73ceb4cec541613795d950b92a268efeb9a3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Petition 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] wikimedia...SmashPig[master]: Get all queues with QueueFactory::getQueue
jenkins-bot has submitted this change and it was merged. Change subject: Get all queues with QueueFactory::getQueue .. Get all queues with QueueFactory::getQueue Make the 'queue' key default work everywhere Change-Id: I1c619da04c08cf2470b9f04231fbeed50b1489ce --- M Core/Actions/IncomingMessage.php M Core/DataStores/MultiQueueWriter.php A Core/DataStores/QueueFactory.php M Core/QueueConsumers/BaseQueueConsumer.php M Maintenance/RequeueDelayedMessages.php M PaymentProviders/Adyen/Actions/CaptureResponseAction.php M PaymentProviders/Adyen/Actions/PaymentCaptureAction.php M PaymentProviders/Adyen/ExpatriatedMessages/ReportAvailable.php M PaymentProviders/Adyen/Jobs/ProcessCaptureRequestJob.php M PaymentProviders/Adyen/Jobs/RecordCaptureJob.php M PaymentProviders/Adyen/Tests/phpunit/CaptureJobTest.php M PaymentProviders/Adyen/Tests/phpunit/RecordCaptureJobTest.php M PaymentProviders/Amazon/Actions/AddMessageToQueue.php M PaymentProviders/PayPal/Job.php M PaymentProviders/PayPal/Listener.php M PaymentProviders/PayPal/Tests/phpunit/CaptureIncomingMessageTest.php M SmashPig.yaml M Tests/QueueConsumerTest.php 18 files changed, 76 insertions(+), 59 deletions(-) Approvals: Awight: Looks good to me, approved jenkins-bot: Verified diff --git a/Core/Actions/IncomingMessage.php b/Core/Actions/IncomingMessage.php index 61adc23..bb2b790 100644 --- a/Core/Actions/IncomingMessage.php +++ b/Core/Actions/IncomingMessage.php @@ -1,6 +1,6 @@ getDestinationQueue(); if ( $destinationQueue ) { - $queue = Context::get()->getConfiguration()->object( "data-store/{$destinationQueue}" ); + $queue = QueueFactory::getQueue( $destinationQueue ); $queueMsg = $msg->normalizeForQueue(); $queue->push( $queueMsg ); diff --git a/Core/DataStores/MultiQueueWriter.php b/Core/DataStores/MultiQueueWriter.php index af90ef0..1cae76d 100644 --- a/Core/DataStores/MultiQueueWriter.php +++ b/Core/DataStores/MultiQueueWriter.php @@ -1,7 +1,6 @@ queues[] = $config->object( $path ); + $this->queues[] = QueueFactory::getQueue( $configKey ); } } diff --git a/Core/DataStores/QueueFactory.php b/Core/DataStores/QueueFactory.php new file mode 100644 index 000..b1d9899 --- /dev/null +++ b/Core/DataStores/QueueFactory.php @@ -0,0 +1,41 @@ +getConfiguration(); + $key = "data-store/$queueName"; + + // Examine the config node for a queue name + $node = $config->val( $key, true ); + if ( + empty( $node['constructor-parameters'] ) || + empty( $node['constructor-parameters'][0]['queue'] ) + ) { + $nameParam = array( + 'data-store' => array( + $queueName => array( + 'constructor-parameters' => array( + array( + 'queue' => $queueName + ) + ) + ) + ) + ); + $config->override( $nameParam ); + } + + return $config->object( $key ); + } +} diff --git a/Core/QueueConsumers/BaseQueueConsumer.php b/Core/QueueConsumers/BaseQueueConsumer.php index f13a588..352896d 100644 --- a/Core/QueueConsumers/BaseQueueConsumer.php +++ b/Core/QueueConsumers/BaseQueueConsumer.php @@ -7,6 +7,7 @@ use SmashPig\Core\Context; use SmashPig\Core\DataStores\DamagedDatabase; +use SmashPig\Core\DataStores\QueueFactory; use SmashPig\Core\Logging\Logger; /** @@ -70,7 +71,7 @@ $this->timeLimit = intval( $timeLimit ); $this->messageLimit = intval( $messageLimit ); - $this->backend = self::getQueue( $queueName ); + $this->backend = QueueFactory::getQueue( $queueName ); if ( !$this->backend instanceof AtomicReadBuffer ) { throw new InvalidArgumentException( @@ -151,19 +152,4 @@ ); } - public static function getQueue( $queueName ) { - $config = Context::get()->getConfiguration(); - $key = "data-store/$queueName"; - - // Get a reference to the config node so we can mess with it - $node =& $config->val( $key, true ); - if ( - empty( $node['constructor-parameters'] ) || - empty( $node['constructor-parameters'][0]['queue'] ) - ) { - $node['constructor-parameters'][0]['queue'] =
[MediaWiki-commits] [Gerrit] mediawiki...CentralAuth[master]: Use mw-ui-progressive for button classes
jenkins-bot has submitted this change and it was merged. Change subject: Use mw-ui-progressive for button classes .. Use mw-ui-progressive for button classes mw-ui-constructive and mw-ui-primary usage are deprecated Bug: T146923 Change-Id: I32d3fe060df705ff9e6488a128809b9e02171227 --- M includes/specials/SpecialGlobalRenameQueue.php 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/specials/SpecialGlobalRenameQueue.php b/includes/specials/SpecialGlobalRenameQueue.php index 54f367f..acf97cb 100644 --- a/includes/specials/SpecialGlobalRenameQueue.php +++ b/includes/specials/SpecialGlobalRenameQueue.php @@ -100,7 +100,7 @@ array( 'href' => $this->getPageTitle( self::PAGE_OPEN_QUEUE )->getFullURL(), 'class' => 'mw-ui-button' . ( - ( $page === self::PAGE_OPEN_QUEUE ) ? ' mw-ui-primary' : '' + ( $page === self::PAGE_OPEN_QUEUE ) ? ' mw-ui-progressive' : '' ), ), $this->msg( 'globalrenamequeue-nav-openqueue' )->text() @@ -109,7 +109,7 @@ array( 'href' => $this->getPageTitle( self::PAGE_CLOSED_QUEUE )->getFullURL(), 'class' => 'mw-ui-button' . - ( ($page === self::PAGE_CLOSED_QUEUE) ? ' mw-ui-primary' : '' ), + ( ($page === self::PAGE_CLOSED_QUEUE) ? ' mw-ui-progressive' : '' ), ), $this->msg( 'globalrenamequeue-nav-closedqueue' )->text() ); @@ -355,7 +355,7 @@ $this->msg( 'globalrenamequeue-request-approve-text' )->text(), 'mw-renamequeue-approve', array( - 'class' => 'mw-ui-constructive mw-ui-flush-right', + 'class' => 'mw-ui-progressive mw-ui-flush-right', ) ); $form->addButton( 'deny', -- To view, visit https://gerrit.wikimedia.org/r/313312 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I32d3fe060df705ff9e6488a128809b9e02171227 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CentralAuth Gerrit-Branch: master Gerrit-Owner: JdlrobsonGerrit-Reviewer: Krinkle Gerrit-Reviewer: Legoktm Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...OAuth[master]: Use mw-ui-progressive for buttons
Jdlrobson has uploaded a new change for review. https://gerrit.wikimedia.org/r/313313 Change subject: Use mw-ui-progressive for buttons .. Use mw-ui-progressive for buttons constructive and primary are deprecated Bug: T146923 Change-Id: I04ca93a4a664c70d51a7f52443a823f4c7bd8eb3 --- M frontend/specialpages/SpecialMWOAuth.php M frontend/specialpages/SpecialMWOAuthManageMyGrants.php 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OAuth refs/changes/13/313313/1 diff --git a/frontend/specialpages/SpecialMWOAuth.php b/frontend/specialpages/SpecialMWOAuth.php index 2fed2a9..0397987 100644 --- a/frontend/specialpages/SpecialMWOAuth.php +++ b/frontend/specialpages/SpecialMWOAuth.php @@ -397,7 +397,7 @@ $form->suppressDefaultSubmit(); $form->addButton( 'accept', wfMessage( 'mwoauth-form-button-approve' )->text(), null, - array( 'class' => 'mw-mwoauth-authorize-button mw-ui-button mw-ui-constructive', + array( 'class' => 'mw-mwoauth-authorize-button mw-ui-button mw-ui-progressive', 'id' => 'mw-mwoauth-accept' ) ); $form->addButton( 'cancel', wfMessage( 'mwoauth-form-button-cancel' )->text(), null, diff --git a/frontend/specialpages/SpecialMWOAuthManageMyGrants.php b/frontend/specialpages/SpecialMWOAuthManageMyGrants.php index d869f37..b089954 100644 --- a/frontend/specialpages/SpecialMWOAuthManageMyGrants.php +++ b/frontend/specialpages/SpecialMWOAuthManageMyGrants.php @@ -227,7 +227,7 @@ $form->addButton( 'update', $this->msg( 'mwoauthmanagemygrants-update' )->text(), null, - array( 'class' => 'mw-ui-button mw-ui-primary' ) + array( 'class' => 'mw-ui-button mw-ui-progressive' ) ); } $form->addPreText( -- To view, visit https://gerrit.wikimedia.org/r/313313 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I04ca93a4a664c70d51a7f52443a823f4c7bd8eb3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/OAuth 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] mediawiki...SocialProfile[master]: Add missing apihelp-smpuserprivacy-description and assoc mes...
jenkins-bot has submitted this change and it was merged. Change subject: Add missing apihelp-smpuserprivacy-description and assoc messages .. Add missing apihelp-smpuserprivacy-description and assoc messages Bug: T146319 Change-Id: I1219ba9b793edcf571afba8451270c8260692bad --- M i18n/en.json M i18n/qqq.json 2 files changed, 12 insertions(+), 2 deletions(-) Approvals: Jack Phoenix: Looks good to me, approved jenkins-bot: Verified diff --git a/i18n/en.json b/i18n/en.json index bd0675b..5ea0f98 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -3,5 +3,10 @@ "authors": [] }, "socialprofile-desc": "A set of social tools for MediaWiki", - "socialprofile-uploads-disabled": "The avatar upload feature is disabled" + "socialprofile-uploads-disabled": "The avatar upload feature is disabled", + "apihelp-smpuserprivacy-description": "API module for setting the visibility (\"privacy\") of a profile field", + "apihelp-smpuserprivacy-param-method": "Action (either \"get\" or \"set\")", + "apihelp-smpuserprivacy-param-field_key": "Target field key, such as up_movies for the \"Movies\" field", + "apihelp-smpuserprivacy-param-privacy": "New privacy value (one of the following: public, hidden, friends, foaf)", + "apihelp-smpuserprivacy-param-tuid": "Target user (ID)" } diff --git a/i18n/qqq.json b/i18n/qqq.json index e4e0eef..cd344b3 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -1,5 +1,10 @@ { "@metadata": [], "socialprofile-desc": "{{desc|name=Social Profile|url=https://www.mediawiki.org/wiki/Extension:SocialProfile}};, - "socialprofile-uploads-disabled": "Notification that the avatar upload feature is disabled shown to users on the avatar upload form." + "socialprofile-uploads-disabled": "Notification that the avatar upload feature is disabled shown to users on the avatar upload form.", + "apihelp-smpuserprivacy-description": "{{doc-apihelp-description|smpuserprivacy}}", + "apihelp-smpuserprivacy-param-method": "{{doc-apihelp-param|smpuserprivacy|method}}", + "apihelp-smpuserprivacy-param-field_key": "{{doc-apihelp-param|smpuserprivacy|field_key}}", + "apihelp-smpuserprivacy-param-privacy": "{{doc-apihelp-param|smpuserprivacy|privacy}}", + "apihelp-smpuserprivacy-param-tuid": "{{doc-apihelp-param|smpuserprivacy|tuid}}" } -- To view, visit https://gerrit.wikimedia.org/r/313285 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1219ba9b793edcf571afba8451270c8260692bad Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/extensions/SocialProfile Gerrit-Branch: master Gerrit-Owner: ReedyGerrit-Reviewer: Jack Phoenix Gerrit-Reviewer: Lewis Cawte Gerrit-Reviewer: Siebrand Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...CentralAuth[master]: Use mw-ui-progressive for button classes
Jdlrobson has uploaded a new change for review. https://gerrit.wikimedia.org/r/313312 Change subject: Use mw-ui-progressive for button classes .. Use mw-ui-progressive for button classes mw-ui-constructive and mw-ui-primary usage are deprecated Bug: T146923 Change-Id: I32d3fe060df705ff9e6488a128809b9e02171227 --- M includes/specials/SpecialGlobalRenameQueue.php 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth refs/changes/12/313312/1 diff --git a/includes/specials/SpecialGlobalRenameQueue.php b/includes/specials/SpecialGlobalRenameQueue.php index 54f367f..acf97cb 100644 --- a/includes/specials/SpecialGlobalRenameQueue.php +++ b/includes/specials/SpecialGlobalRenameQueue.php @@ -100,7 +100,7 @@ array( 'href' => $this->getPageTitle( self::PAGE_OPEN_QUEUE )->getFullURL(), 'class' => 'mw-ui-button' . ( - ( $page === self::PAGE_OPEN_QUEUE ) ? ' mw-ui-primary' : '' + ( $page === self::PAGE_OPEN_QUEUE ) ? ' mw-ui-progressive' : '' ), ), $this->msg( 'globalrenamequeue-nav-openqueue' )->text() @@ -109,7 +109,7 @@ array( 'href' => $this->getPageTitle( self::PAGE_CLOSED_QUEUE )->getFullURL(), 'class' => 'mw-ui-button' . - ( ($page === self::PAGE_CLOSED_QUEUE) ? ' mw-ui-primary' : '' ), + ( ($page === self::PAGE_CLOSED_QUEUE) ? ' mw-ui-progressive' : '' ), ), $this->msg( 'globalrenamequeue-nav-closedqueue' )->text() ); @@ -355,7 +355,7 @@ $this->msg( 'globalrenamequeue-request-approve-text' )->text(), 'mw-renamequeue-approve', array( - 'class' => 'mw-ui-constructive mw-ui-flush-right', + 'class' => 'mw-ui-progressive mw-ui-flush-right', ) ); $form->addButton( 'deny', -- To view, visit https://gerrit.wikimedia.org/r/313312 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I32d3fe060df705ff9e6488a128809b9e02171227 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CentralAuth 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] pywikibot/core[master]: unusedfile.py: use pagegenerators to specify pages
Mpaa has uploaded a new change for review. https://gerrit.wikimedia.org/r/313311 Change subject: unusedfile.py: use pagegenerators to specify pages .. unusedfile.py: use pagegenerators to specify pages Add support for pagegenerators, as it allows to use filters fron cmd line. Replace newly inserted -total arg with -unusedfiles, which is the built-in parameter for unused files in pagegenerators. Change-Id: If8f1fbbdad345de9880e0a652d28e224ff45fafa --- M scripts/unusedfiles.py 1 file changed, 12 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/11/313311/1 diff --git a/scripts/unusedfiles.py b/scripts/unusedfiles.py index 3bb027a..bfccaf0 100755 --- a/scripts/unusedfiles.py +++ b/scripts/unusedfiles.py @@ -7,9 +7,9 @@ -always Don't be asked every time. -nouserwarning Do not warn uploader about orphaned file. --total Specify number of pages to work on with "-total:n" where +-unusedfilesSpecify number of pages to work on with "-unusedfiles:n" where n is the maximum number of articles to work on. -If not used, all pages are used. +If not used, default is used. """ # # (C) Leonardo Gregianin, 2007 @@ -112,19 +112,21 @@ @type args: list of unicode """ options = {} -total = None local_args = pywikibot.handle_args(args) -for arg in local_args: -arg, sep, value = arg.partition(':') -if arg == '-total': -total = value -else: -options[arg[1:]] = True +# Add default for -unusedfiles. +local_args += ['-unusedfiles' for arg in local_args if 'unusedfiles' not in arg] site = pywikibot.Site() -gen = pagegenerators.UnusedFilesGenerator(total=total, site=site) +genFactory = pagegenerators.GeneratorFactory(site=site) + +for arg in local_args: +if genFactory.handleArg(arg): +continue +options[arg[1:]] = True + +gen = genFactory.getCombinedGenerator() gen = pagegenerators.PreloadingGenerator(gen) bot = UnusedFilesBot(site, generator=gen, **options) -- To view, visit https://gerrit.wikimedia.org/r/313311 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If8f1fbbdad345de9880e0a652d28e224ff45fafa Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Mpaa___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: [throttling] IP cap lift for eswiki on 2016-09-30
jenkins-bot has submitted this change and it was merged. Change subject: [throttling] IP cap lift for eswiki on 2016-09-30 .. [throttling] IP cap lift for eswiki on 2016-09-30 Bug: T146788 Change-Id: I04aff9a9be08f1aebebcb4bcdcb362aaba249ccd --- M wmf-config/throttle.php 1 file changed, 8 insertions(+), 0 deletions(-) Approvals: BryanDavis: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/throttle.php b/wmf-config/throttle.php index b01b23e..4c73f5a 100644 --- a/wmf-config/throttle.php +++ b/wmf-config/throttle.php @@ -91,6 +91,14 @@ 'value' => 60 //50 expected ]; +$wmgThrottlingExceptions[] = [ // T146788 + 'from' => '2016-09-29T00:00 -0:00', + 'to' => '2016-10-01T00:00 -0:00', + 'IP' => '200.1.161.250', + 'dbname' => [ 'eswiki', 'commonswiki' ], + 'value' => 45 //35 expected +]; + ## Add throttling definitions above. /** -- To view, visit https://gerrit.wikimedia.org/r/313207 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I04aff9a9be08f1aebebcb4bcdcb362aaba249ccd Gerrit-PatchSet: 2 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: UrbanecmGerrit-Reviewer: BryanDavis Gerrit-Reviewer: Florianschmidtwelzow Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: resourceloader: Disable ChronologyProtector to speed up wfGe...
Krinkle has uploaded a new change for review. https://gerrit.wikimedia.org/r/313310 Change subject: resourceloader: Disable ChronologyProtector to speed up wfGetLB() .. resourceloader: Disable ChronologyProtector to speed up wfGetLB() For load.php requests, Xenon in Wikimedia production measures that half the time for wfGetLB() is spent in ChronologyProtector::initPositions, and its query to Memcached. Change-Id: I24f90897e56fd679c6bd1acf764722ed58e51c67 --- M load.php 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/10/313310/1 diff --git a/load.php b/load.php index c832237..a03b7bb 100644 --- a/load.php +++ b/load.php @@ -35,6 +35,12 @@ return; } +// Don't initialise ChronologyProtector from object cache, and +// don't wait for unrelated MediaWiki writes when querying ResourceLoader. +MediaWikiServices::getInstance()->getDBLoadBalancerFactory()->setRequestInfo( [ + 'ChronologyProtection' => 'false', +] ); + // Set up ResourceLoader $resourceLoader = new ResourceLoader( ConfigFactory::getDefaultInstance()->makeConfig( 'main' ), -- To view, visit https://gerrit.wikimedia.org/r/313310 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I24f90897e56fd679c6bd1acf764722ed58e51c67 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] pywikibot/core[master]: unusedfiles.py: do not tag image if already tagged
Mpaa has uploaded a new change for review. https://gerrit.wikimedia.org/r/313309 Change subject: unusedfiles.py: do not tag image if already tagged .. unusedfiles.py: do not tag image if already tagged Prevent the bot from tagging the image again if already tagged. Bug: T145853 Change-Id: I6929593522719336d6f21515ecebba4c577a568f --- M scripts/unusedfiles.py 1 file changed, 5 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/09/313309/1 diff --git a/scripts/unusedfiles.py b/scripts/unusedfiles.py index 3bb027a..a8aec75 100755 --- a/scripts/unusedfiles.py +++ b/scripts/unusedfiles.py @@ -53,6 +53,10 @@ self.template_image = i18n.translate(self.site, template_to_the_image) +self.template_image_page = pywikibot.Page(self.site, + self.template_image[2:-2], + ns=10) + self.template_user = i18n.translate(self.site, template_to_the_user) self.summary = i18n.twtranslate(self.site, 'unusedfiles-comment') @@ -71,7 +75,7 @@ # rather than a local page with the same name as shared media. if (image.fileUrl() and not image.fileIsShared() and u'http://' not in image.text): -if self.template_image in image.text: +if self.template_image_page in image.templates(): pywikibot.output(u"%s done already" % image.title(asLink=True)) return -- To view, visit https://gerrit.wikimedia.org/r/313309 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6929593522719336d6f21515ecebba4c577a568f Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Mpaa___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] integration/config[master]: Rename toxgen and doxygen to run-tox and run-doxygen in buil...
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/313308 Change subject: Rename toxgen and doxygen to run-tox and run-doxygen in builder: .. Rename toxgen and doxygen to run-tox and run-doxygen in builder: Got these warnnings WARNING:jenkins_jobs.registry:You have a macro ('tox') defined for 'builder' component type that is masking an inbuilt definition WARNING:jenkins_jobs.registry:You have a macro ('doxygen') defined for 'builder' component type that is masking an inbuilt definition Change-Id: I44fc512d34c478be1477bd9ff7e3cbb02e051d6b --- M jjb/macro.yaml 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/08/313308/1 diff --git a/jjb/macro.yaml b/jjb/macro.yaml index 6978880..633df57 100644 --- a/jjb/macro.yaml +++ b/jjb/macro.yaml @@ -108,7 +108,7 @@ # MUST run 'global-setup' before this - builder: -name: doxygen +name: run-doxygen builders: - shell: | . /srv/deployment/integration/slave-scripts/bin/global-set-env.sh @@ -542,7 +542,7 @@ | xargs -n1 -t php -l - builder: -name: tox +name: run-tox builders: - shell: | rm -fR log -- To view, visit https://gerrit.wikimedia.org/r/313308 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I44fc512d34c478be1477bd9ff7e3cbb02e051d6b 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] integration/config[master]: Replace derecated logrotate with build-discarder
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/313306 Change subject: Replace derecated logrotate with build-discarder .. Replace derecated logrotate with build-discarder Per warnning WARNING:root:logrotate is deprecated on jenkins>=1.637, use the property build-discarder on newer jenkins instead you get when running jenkins job builder http://docs.openstack.org/infra/jenkins-job-builder/properties.html#properties.build-discarder Change-Id: Ib85b3611ccec73629bca125bc80c46e5b6ff73c2 --- M jjb/beta.yaml M jjb/castor.yaml M jjb/defaults.yaml M jjb/job-templates-browsertests.yaml M jjb/job-templates-selenium.yaml M jjb/labs.yaml M jjb/mediawiki-extensions.yaml M jjb/mediawiki.yaml M jjb/misc.yaml M jjb/mobile.yaml M jjb/php.yaml M jjb/publish.yaml M jjb/search.yaml 13 files changed, 110 insertions(+), 74 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/06/313306/1 diff --git a/jjb/beta.yaml b/jjb/beta.yaml index 38ac626..5a07235 100644 --- a/jjb/beta.yaml +++ b/jjb/beta.yaml @@ -59,8 +59,9 @@ triggers: - timed: '@hourly' -logrotate: -daysToKeep: 15 +properties: + - build-discarder: + days-to-keep: 15 # Job to deploy the Wikimedia MediaWiki configuration files # @@ -84,8 +85,9 @@ builders: - shell: /usr/local/bin/wmf-beta-mwconfig-update -logrotate: -daysToKeep: 15 +properties: + - build-discarder: + days-to-keep: 15 publishers: - beta-irc @@ -111,8 +113,9 @@ # Do not run concurrently with the downstream job block-downstream: true -logrotate: -daysToKeep: 7 +properties: + - build-discarder: + days-to-keep: 7 triggers: # Every ten minutes: @@ -149,8 +152,9 @@ - shell: | /srv/deployment/scap/scap/bin/scap sync "$JOB_NAME (build $BUILD_DISPLAY_NAME)" -logrotate: -daysToKeep: 7 +properties: + - build-discarder: + days-to-keep: 7 wrappers: - ansicolor diff --git a/jjb/castor.yaml b/jjb/castor.yaml index 9821d46..9f0b026 100644 --- a/jjb/castor.yaml +++ b/jjb/castor.yaml @@ -93,8 +93,9 @@ name: castor-save node: castor concurrent: true -logrotate: -daysToKeep: 5 +properties: + - build-discarder: + days-to-keep: 5 parameters: - string: name: TRIGGERED_SSH_CONNECTION diff --git a/jjb/defaults.yaml b/jjb/defaults.yaml index 2e1f966..0048f44 100644 --- a/jjb/defaults.yaml +++ b/jjb/defaults.yaml @@ -5,8 +5,9 @@ project-type: freestyle -logrotate: -daysToKeep: 30 +properties: + - build-discarder: + days-to-keep: 30 wrappers: - timeout: @@ -24,8 +25,9 @@ project-type: freestyle -logrotate: -daysToKeep: 30 +properties: + - build-discarder: + days-to-keep: 30 scm: - git-remoteonly-zuul @@ -47,8 +49,9 @@ project-type: freestyle -logrotate: -daysToKeep: 30 +properties: + - build-discarder: + days-to-keep: 30 scm: - git: @@ -78,8 +81,9 @@ project-type: freestyle -logrotate: -daysToKeep: 30 +properties: + - build-discarder: + days-to-keep: 30 scm: - git: @@ -109,8 +113,9 @@ project-type: freestyle -logrotate: -daysToKeep: 30 +properties: + - build-discarder: + days-to-keep: 30 scm: - git: diff --git a/jjb/job-templates-browsertests.yaml b/jjb/job-templates-browsertests.yaml index 62280e0..a8c2b9c 100644 --- a/jjb/job-templates-browsertests.yaml +++ b/jjb/job-templates-browsertests.yaml @@ -9,8 +9,9 @@ cucumber_tags: '' version: '' -logrotate: -daysToKeep: 31 # ~ 2 * 2 weeks sprints +properties: + - build-discarder: + days-to-keep: 31 # ~ 2 * 2 weeks sprints scm: - git: diff --git a/jjb/job-templates-selenium.yaml b/jjb/job-templates-selenium.yaml index ef39237..d0f504e 100644 --- a/jjb/job-templates-selenium.yaml +++ b/jjb/job-templates-selenium.yaml @@ -27,8 +27,9 @@ node: contintLabsSlave && UbuntuTrusty repository_host: 'gerrit.wikimedia.org/r' -logrotate: -daysToKeep: 31 # ~ 2 * 2 weeks sprints +properties: + - build-discarder: + days-to-keep: 31 # ~ 2 * 2 weeks sprints scm: - git: diff --git a/jjb/labs.yaml b/jjb/labs.yaml index 5984f37..8d059eb 100644 --- a/jjb/labs.yaml +++ b/jjb/labs.yaml @@ -9,8 +9,9 @@ name: 'labs-tools-wikibugs2-autopull' node: contintLabsSlave concurrent: false -logrotate: -daysToKeep: 15 +properties: + - build-discarder: + days-to-keep: 15 builders: - shell: curl --fail --silent --show-error --max-time 10 https://tools.wmflabs.org/wikibugs/pull.php diff
[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Add names for theme colours, and use dropdown for theme colo...
Isarra has uploaded a new change for review. https://gerrit.wikimedia.org/r/313307 Change subject: Add names for theme colours, and use dropdown for theme colours on specialcreatecollaborationhub fallback (currently only interface, but we'll be adding a fancier js colour selection thing later) .. Add names for theme colours, and use dropdown for theme colours on specialcreatecollaborationhub fallback (currently only interface, but we'll be adding a fancier js colour selection thing later) Instead of a protected variable $themeColours, CollaborationHubContent now has a static function getThemeColours(). Change-Id: I65086dc57e2941a0531222520cbff25d2ac765c1 --- M i18n/en.json M i18n/qqq.json M includes/SpecialCreateCollaborationHub.php M includes/content/CollaborationHubContent.php 4 files changed, 90 insertions(+), 35 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CollaborationKit refs/changes/07/313307/1 diff --git a/i18n/en.json b/i18n/en.json index a601db3..ae14ca9 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -69,5 +69,28 @@ "collaborationkit-hub-subpage-remove": "Remove feature", "collaborationkit-hub-edit-apierror": "API edit error: $1", "collaborationkit-hub-edit-tojsonerror": "Error converting to JSON", - "collaborationkit-hub-toc-label": "Project contents" + "collaborationkit-hub-toc-label": "Project contents", + "collaborationkit-red1": "Dark red", + "collaborationkit-red2": "Red", + "collaborationkit-grey1": "Dark grey", + "collaborationkit-grey2": "Light grey", + "collaborationkit-blue1": "Sky blue", + "collaborationkit-blue2": "Blue", + "collaborationkit-blue3": "Blue grey", + "collaborationkit-blue4": "Navy blue", + "collaborationkit-blue5": "Dark blue", + "collaborationkit-blue6": "Aquamarine", + "collaborationkit-purple1": "Violet", + "collaborationkit-purple2": "Purple", + "collaborationkit-purple3": "Mauve", + "collaborationkit-purple4": "Light mauve", + "collaborationkit-purple5": "Pink", + "collaborationkit-yellow1": "Orange", + "collaborationkit-yellow2": "Yellow", + "collaborationkit-yellow3": "Gold", + "collaborationkit-yellow4": "Pastel yellow", + "collaborationkit-green1": "Bright green", + "collaborationkit-green2": "Forest green", + "collaborationkit-green3": "Khaki", + "collaborationkit-black": "Black" } diff --git a/i18n/qqq.json b/i18n/qqq.json index 8fbd18f..937c96b 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -69,5 +69,28 @@ "collaborationkit-hub-subpage-remove": "Remove link label for subpages on Collaboration Hub mainpages", "collaborationkit-hub-edit-apierror": "Error message for API edit error", "collaborationkit-hub-edit-tojsonerror": "Error message when something went wrong converting to JSON", - "collaborationkit-hub-toc-label": "Label for the toc on a Collaboration Hub mainpage" + "collaborationkit-hub-toc-label": "Label for the toc on a Collaboration Hub mainpage", + "collaborationkit-red1": "Color label", + "collaborationkit-red2": "Color label", + "collaborationkit-grey1": "Color label", + "collaborationkit-grey2": "Color label", + "collaborationkit-blue1": "Color label", + "collaborationkit-blue2": "Color label", + "collaborationkit-blue3": "Color label", + "collaborationkit-blue4": "Color label", + "collaborationkit-blue5": "Color label", + "collaborationkit-blue6": "Color label", + "collaborationkit-purple1": "Color label", + "collaborationkit-purple2": "Color label", + "collaborationkit-purple3": "Color label", + "collaborationkit-purple4": "Color label", + "collaborationkit-purple5": "Color label", + "collaborationkit-yellow1": "Color label", + "collaborationkit-yellow2": "Color label", + "collaborationkit-yellow3": "Color label", + "collaborationkit-yellow4": "Color label", + "collaborationkit-green1": "Color label", + "collaborationkit-green2": "Color label", + "collaborationkit-green3": "Color label", + "collaborationkit-black": "Color label" } diff --git a/includes/SpecialCreateCollaborationHub.php b/includes/SpecialCreateCollaborationHub.php index 8c50214..db7307c 100644 --- a/includes/SpecialCreateCollaborationHub.php +++ b/includes/SpecialCreateCollaborationHub.php @@ -44,12 +44,18 @@ 'cssclass' => 'mw-ck-iconinput', 'label-message' => 'collaborationkit-createhub-image', ], - // Colours for the hub styles - 'colour' => [ - 'type' => 'text', - 'cssclass' => 'mw-ck-colourinput', -
[MediaWiki-commits] [Gerrit] operations/puppet[production]: Bring back Zend PHP on deployment server
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/313305 Change subject: Bring back Zend PHP on deployment server .. Bring back Zend PHP on deployment server We need Zend php5 for mwscript among others :( Bug: T146286 Change-Id: Iec701d70b9773a05395b068e00949ae99400cce7 --- M modules/role/manifests/deployment/mediawiki.pp 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/05/313305/1 diff --git a/modules/role/manifests/deployment/mediawiki.pp b/modules/role/manifests/deployment/mediawiki.pp index 3719161..109fd3b 100644 --- a/modules/role/manifests/deployment/mediawiki.pp +++ b/modules/role/manifests/deployment/mediawiki.pp @@ -7,6 +7,7 @@ # All needed classes for deploying mediawiki include ::mediawiki +include ::mediawiki::packages::php5 include ::mediawiki::nutcracker include scap::master include scap::ferm -- To view, visit https://gerrit.wikimedia.org/r/313305 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iec701d70b9773a05395b068e00949ae99400cce7 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Hashar___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...SocialProfile[master]: Add missing apihelp-smpuserprivacy-description
Reedy has uploaded a new change for review. https://gerrit.wikimedia.org/r/313285 Change subject: Add missing apihelp-smpuserprivacy-description .. Add missing apihelp-smpuserprivacy-description Bug: T146319 Change-Id: I1219ba9b793edcf571afba8451270c8260692bad --- M i18n/en.json M i18n/qqq.json 2 files changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SocialProfile refs/changes/85/313285/1 diff --git a/i18n/en.json b/i18n/en.json index bd0675b..cbed584 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -3,5 +3,6 @@ "authors": [] }, "socialprofile-desc": "A set of social tools for MediaWiki", - "socialprofile-uploads-disabled": "The avatar upload feature is disabled" + "socialprofile-uploads-disabled": "The avatar upload feature is disabled", + "apihelp-smpuserprivacy-description": "API module for setting the visibility ("privacy") of a profile field" } diff --git a/i18n/qqq.json b/i18n/qqq.json index e4e0eef..9becf86 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -1,5 +1,6 @@ { "@metadata": [], "socialprofile-desc": "{{desc|name=Social Profile|url=https://www.mediawiki.org/wiki/Extension:SocialProfile}};, - "socialprofile-uploads-disabled": "Notification that the avatar upload feature is disabled shown to users on the avatar upload form." + "socialprofile-uploads-disabled": "Notification that the avatar upload feature is disabled shown to users on the avatar upload form.", + "apihelp-smpuserprivacy-description": "{{doc-apihelp-description|smpuserprivacy}}" } -- To view, visit https://gerrit.wikimedia.org/r/313285 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1219ba9b793edcf571afba8451270c8260692bad Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SocialProfile Gerrit-Branch: master Gerrit-Owner: Reedy___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Fix use of bogus $params var in FileBackend::__construct()
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/313287 Change subject: Fix use of bogus $params var in FileBackend::__construct() .. Fix use of bogus $params var in FileBackend::__construct() Change-Id: I897c21b766bfea4e4cb83c63f0e40e945bd73747 --- M includes/libs/filebackend/FileBackend.php 1 file changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/87/313287/1 diff --git a/includes/libs/filebackend/FileBackend.php b/includes/libs/filebackend/FileBackend.php index 0ef9f63..1953d76 100644 --- a/includes/libs/filebackend/FileBackend.php +++ b/includes/libs/filebackend/FileBackend.php @@ -185,15 +185,15 @@ $this->concurrency = isset( $config['concurrency'] ) ? (int)$config['concurrency'] : 50; - $this->obResetFunc = isset( $params['obResetFunc'] ) - ? $params['obResetFunc'] + $this->obResetFunc = isset( $config['obResetFunc'] ) + ? $config['obResetFunc'] : [ $this, 'resetOutputBuffer' ]; - $this->streamMimeFunc = isset( $params['streamMimeFunc'] ) - ? $params['streamMimeFunc'] + $this->streamMimeFunc = isset( $config['streamMimeFunc'] ) + ? $config['streamMimeFunc'] : null; $this->statusWrapper = isset( $config['statusWrapper'] ) ? $config['statusWrapper'] : null; - $this->profiler = isset( $params['profiler'] ) ? $params['profiler'] : null; + $this->profiler = isset( $config['profiler'] ) ? $config['profiler'] : null; $this->logger = isset( $config['logger'] ) ? $config['logger'] : new \Psr\Log\NullLogger(); $this->statusWrapper = isset( $config['statusWrapper'] ) ? $config['statusWrapper'] : null; $this->tmpDirectory = isset( $config['tmpDirectory'] ) ? $config['tmpDirectory'] : null; -- To view, visit https://gerrit.wikimedia.org/r/313287 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I897c21b766bfea4e4cb83c63f0e40e945bd73747 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core 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] mediawiki...Popups[master]: Regression: correctly log the click action total interaction...
Bmansurov has uploaded a new change for review. https://gerrit.wikimedia.org/r/313258 Change subject: Regression: correctly log the click action total interaction time .. Regression: correctly log the click action total interaction time The regression was introduced in Ifd6f75c2a53d8d7b5ef9fd3f232f85b55eea24c8. Also do not attempt closing a popup when it may not be open. Change-Id: I02febc83036130bcea0a769114c9126cb481bafe Tag: T146934 --- M resources/ext.popups.renderer/desktopRenderer.js M resources/ext.popups.targets/desktopTarget.js 2 files changed, 4 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Popups refs/changes/58/313258/1 diff --git a/resources/ext.popups.renderer/desktopRenderer.js b/resources/ext.popups.renderer/desktopRenderer.js index b896a3f..c7e599a 100644 --- a/resources/ext.popups.renderer/desktopRenderer.js +++ b/resources/ext.popups.renderer/desktopRenderer.js @@ -147,8 +147,10 @@ linkInteractionToken: linkInteractionToken }; - $link.on( 'mouseleave blur', mw.popups.render.leaveInactive ) - .off( 'click', logClickAction ).on( 'click', logClickAction ); + $link + .on( 'mouseleave blur', mw.popups.render.leaveInactive ) + .off( 'click', mw.popups.render.clickHandler ) + .on( 'click', mw.popups.render.clickHandler ); if ( mw.popups.render.cache[ $link.attr( 'href' ) ] ) { openTimer = mw.popups.render.wait( mw.popups.render.POPUP_DELAY ) diff --git a/resources/ext.popups.targets/desktopTarget.js b/resources/ext.popups.targets/desktopTarget.js index 1db83ad..ceb4592 100644 --- a/resources/ext.popups.targets/desktopTarget.js +++ b/resources/ext.popups.targets/desktopTarget.js @@ -138,11 +138,6 @@ mw.popups.$content = $content; $elements = mw.popups.selectPopupElements(); - // On clicking a link the open popup (if any) should be hidden. (T143051) - $elements.on( 'click', function () { - mw.popups.render.closePopup(); - } ); - $elements.on( 'mouseenter focus', function ( event ) { var $link = $( this ); -- To view, visit https://gerrit.wikimedia.org/r/313258 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I02febc83036130bcea0a769114c9126cb481bafe Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Popups Gerrit-Branch: master Gerrit-Owner: Bmansurov___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceExtensions[master]: BlueSpice should not call deprecated Article::prepareTextFor...
Reedy has uploaded a new change for review. https://gerrit.wikimedia.org/r/313257 Change subject: BlueSpice should not call deprecated Article::prepareTextForEdit() .. BlueSpice should not call deprecated Article::prepareTextForEdit() Bug: T146167 Change-Id: I65577e05cb4a588a0ef78cbf4fb992ae0c88b969 --- M PageAccess/PageAccess.class.php 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions refs/changes/57/313257/1 diff --git a/PageAccess/PageAccess.class.php b/PageAccess/PageAccess.class.php index 00a902c..a7b3b76 100644 --- a/PageAccess/PageAccess.class.php +++ b/PageAccess/PageAccess.class.php @@ -53,7 +53,8 @@ public function onArticleSave( &$article, &$user, &$text, &$summary, $minor, $watchthis, $sectionanchor, &$flags, &$status ) { # Prevent user from locking himself out of his own page - $oEditInfo = $article->prepareTextForEdit( $text, null, $user ); + $content = ContentHandler::makeContent( $text, $article->getTitle() ); + $oEditInfo = $article->prepareContentForEdit( $content, null, $user ); $sAccessGroups = $oEditInfo->output->getProperty( 'bs-page-access' ); if ( !$this->checkAccessGroups( $user, $sAccessGroups ) ) { $err[0] = 'bs-pageaccess-error-not-member-of-given-groups'; -- To view, visit https://gerrit.wikimedia.org/r/313257 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I65577e05cb4a588a0ef78cbf4fb992ae0c88b969 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions Gerrit-Branch: master Gerrit-Owner: Reedy___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...AkismetKlik[master]: Replace Article::prepareTextForEdit()
Reedy has uploaded a new change for review. https://gerrit.wikimedia.org/r/313256 Change subject: Replace Article::prepareTextForEdit() .. Replace Article::prepareTextForEdit() Bug: T146166 Change-Id: I225fa30f04b387110bb0ef2cd85ec9937c0b51bb --- M AkismetKlik.php 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AkismetKlik refs/changes/56/313256/1 diff --git a/AkismetKlik.php b/AkismetKlik.php index 54f37a4..5adc92e 100644 --- a/AkismetKlik.php +++ b/AkismetKlik.php @@ -95,7 +95,8 @@ $text = str_replace( '.', '.', $text ); # Run parser to strip SGML comments and such out of the markup - $editInfo = $editPage->getArticle()->prepareTextForEdit( $text ); + $content = ContentHandler::makeContent( $text, $title ); + $editInfo = $editPage->getArticle()->prepareContentForEdit( $content ); $out = $editInfo->output; $pgtitle = $title; $links = implode( "\n", array_keys( $out->getExternalLinks() ) ); -- To view, visit https://gerrit.wikimedia.org/r/313256 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I225fa30f04b387110bb0ef2cd85ec9937c0b51bb Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/AkismetKlik Gerrit-Branch: master Gerrit-Owner: Reedy___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...AbuseFilter[master]: Replace Article::prepareTextForEdit()
Reedy has uploaded a new change for review. https://gerrit.wikimedia.org/r/313255 Change subject: Replace Article::prepareTextForEdit() .. Replace Article::prepareTextForEdit() Bug: T146166 Change-Id: Id4ff371ab73ee0c4138912036887d0842fbbb8b4 --- M AbuseFilterVariableHolder.php 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AbuseFilter refs/changes/55/313255/1 diff --git a/AbuseFilterVariableHolder.php b/AbuseFilterVariableHolder.php index 657b7c3..9a93336 100644 --- a/AbuseFilterVariableHolder.php +++ b/AbuseFilterVariableHolder.php @@ -238,7 +238,7 @@ } /** -* It's like Article::prepareTextForEdit, but not for editing (old wikitext usually) +* It's like Article::prepareContentForEdit, but not for editing (old wikitext usually) * * * @param string $wikitext @@ -475,9 +475,9 @@ if ( $article->getContentModel() === CONTENT_MODEL_WIKITEXT ) { $textVar = $parameters['wikitext-var']; - // XXX: Use prepareContentForEdit. But we need a Content object for that. $new_text = $vars->getVar( $textVar )->toString(); - $editInfo = $article->prepareTextForEdit( $new_text ); + $content = ContentHandler::makeContent( $new_text, $article->getTitle() ); + $editInfo = $article->prepareContentForEdit( $content ); if ( isset( $parameters['pst'] ) && $parameters['pst'] ) { $result = $editInfo->pstContent->serialize( $editInfo->format ); } else { -- To view, visit https://gerrit.wikimedia.org/r/313255 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id4ff371ab73ee0c4138912036887d0842fbbb8b4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/AbuseFilter Gerrit-Branch: master Gerrit-Owner: Reedy___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikidata...gui[master]: Set title to of date time to 'Raw ISO timestamp'
jenkins-bot has submitted this change and it was merged. Change subject: Set title to of date time to 'Raw ISO timestamp' .. Set title to of date time to 'Raw ISO timestamp' Bug: T144306 Change-Id: Ie6526bd0eb7d486f74d537dbd7499c2505942c63 --- M i18n/en.json M i18n/qqq.json M wikibase/queryService/ui/resultBrowser/helper/FormatterHelper.js 3 files changed, 24 insertions(+), 0 deletions(-) Approvals: Smalyshev: Looks good to me, approved jenkins-bot: Verified diff --git a/i18n/en.json b/i18n/en.json index e4ecd76..c9d68ba 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -29,6 +29,7 @@ "wdqs-app-result-embed": "Embed result", "wdqs-app-result-endpoint": "SPARQL endpoint", "wdqs-app-result-endpoint-title": "Link to the SPARQL endpoint returning the result", +"wdqs-app-result-formatter-title-datetime": "Raw ISO timestamp", "wdqs-app-shorturl-page-title": "Short URL to this page", "wdqs-app-editor-placeholder": "(Input a SPARQL query or choose a query example)", "wdqs-app-editor-addprefixes": "Add Standard Prefixes", diff --git a/i18n/qqq.json b/i18n/qqq.json index 1706709..4f40858 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -30,6 +30,7 @@ "wdqs-app-result-shorturl-title": "Title of link message in the footer link dropdown", "wdqs-app-result-embed": "Link message in the footer link dropdown", "wdqs-app-result-endpoint": "Link message in the footer link dropdown", + "wdqs-app-result-formatter-title-datetime": "Tooltip shown on dates in the table result view", "wdqs-app-result-endpoint-title": "Title of link message in the footer link dropdown", "wdqs-app-shorturl-page-title": "Title of link message on the left side of the editor", "wdqs-app-editor-placeholder": "Placeholder message in editor box", diff --git a/wikibase/queryService/ui/resultBrowser/helper/FormatterHelper.js b/wikibase/queryService/ui/resultBrowser/helper/FormatterHelper.js index ff7fdfb..db340c1 100644 --- a/wikibase/queryService/ui/resultBrowser/helper/FormatterHelper.js +++ b/wikibase/queryService/ui/resultBrowser/helper/FormatterHelper.js @@ -105,6 +105,9 @@ } break; case DATATYPE_DATETIME: + if ( !title ) { + title = this._i18n( 'wdqs-app-result-formatter-title-datetime', 'Raw ISO timestamp' ); + } var $dateLabel = $( '' ).text( this._formatDate( value ) ); $dateLabel.attr( 'title', title + ': ' + value ); $html.append( $dateLabel ); @@ -435,5 +438,24 @@ } }; + /** +* Get an i18n string +* +* @protected +* @param {string} key for the i18n message +* @param {string} message default text +* +* @return {string} +*/ + SELF.prototype._i18n = function( key, message ) { + var i18nMessage = null; + + if ( !$.i18n || ( i18nMessage = $.i18n( key ) ) === key ) { + return message; + } + + return i18nMessage; + }; + return SELF; }( jQuery, mediaWiki, moment ) ); -- To view, visit https://gerrit.wikimedia.org/r/312983 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie6526bd0eb7d486f74d537dbd7499c2505942c63 Gerrit-PatchSet: 2 Gerrit-Project: wikidata/query/gui Gerrit-Branch: master Gerrit-Owner: Jonas Kress (WMDE)Gerrit-Reviewer: Jonas Kress (WMDE) Gerrit-Reviewer: Smalyshev Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: Temporary workaround: don't check payments_initial
jenkins-bot has submitted this change and it was merged. Change subject: Temporary workaround: don't check payments_initial .. Temporary workaround: don't check payments_initial Trying to get the paypal listener deployed, and this part won't work without ops help. commenting out payments_initial check till we can get that. Change-Id: I2a9af2bfa8ae0b940c7616b96409cc1c8a5a24e9 --- M Core/QueueConsumers/PendingQueueConsumer.php M Tests/PendingQueueConsumerTest.php 2 files changed, 7 insertions(+), 6 deletions(-) Approvals: Awight: Looks good to me, approved jenkins-bot: Verified diff --git a/Core/QueueConsumers/PendingQueueConsumer.php b/Core/QueueConsumers/PendingQueueConsumer.php index 733d9b7..b0b8ce9 100644 --- a/Core/QueueConsumers/PendingQueueConsumer.php +++ b/Core/QueueConsumers/PendingQueueConsumer.php @@ -25,13 +25,14 @@ public function processMessage( $message ) { $logIdentifier = "message with gateway {$message['gateway']}" . " and order ID {$message['order_id']}"; + /* FIXME: Broken due to bad credentials. if ( $this->paymentsInitialDatabase->isTransactionFinalized( $message ) ) { // Throw the message out if it's already completed or failed, and // exists in the fredge database. Logger::info( "Skipping finalized $logIdentifier" ); - } else { + } else {*/ Logger::info( "Storing $logIdentifier in database" ); $this->pendingDatabase->storeMessage( $message ); - } + //} } } diff --git a/Tests/PendingQueueConsumerTest.php b/Tests/PendingQueueConsumerTest.php index 5c7aecc..61de1e8 100644 --- a/Tests/PendingQueueConsumerTest.php +++ b/Tests/PendingQueueConsumerTest.php @@ -95,7 +95,7 @@ * We refuse to consume a message and drop it if the corresponding * payments_initial row is complete. */ - public function testPendingMessageInitialComplete() { + /*public function testPendingMessageInitialComplete() { $initRow = PaymentsInitialDatabaseTest::generateTestMessage(); $initRow['payments_final_status'] = 'complete'; @@ -111,13 +111,13 @@ $this->assertNull( $fetched, 'Message consumed and not stored in the pending database.' ); - } + }*/ /** * We refuse to consume a message and drop it if the corresponding * payments_initial row is failed. */ - public function testPendingMessageInitialFailed() { + /*public function testPendingMessageInitialFailed() { $initRow = PaymentsInitialDatabaseTest::generateTestMessage(); $initRow['payments_final_status'] = 'failed'; @@ -133,7 +133,7 @@ $this->assertNull( $fetched, 'Message consumed and not stored in the pending database.' ); - } + }*/ public static function generateRandomPendingMessage() { $message = array( -- To view, visit https://gerrit.wikimedia.org/r/313241 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2a9af2bfa8ae0b940c7616b96409cc1c8a5a24e9 Gerrit-PatchSet: 2 Gerrit-Project: wikimedia/fundraising/SmashPig Gerrit-Branch: master Gerrit-Owner: EjeggGerrit-Reviewer: Awight Gerrit-Reviewer: Cdentinger Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits