[MediaWiki-commits] [Gerrit] logmsgbot: only allow connections from tin, fenari & localhost - change (operations/puppet)
Tim Starling has submitted this change and it was merged. Change subject: logmsgbot: only allow connections from tin, fenari & localhost .. logmsgbot: only allow connections from tin, fenari & localhost It'd be nicer to be a bit more permissive here and allow our full internal IP ranges. Using single-address IPv6 CIDR ranges to specify single IPv4 IPs is a bit ugly. But this is OK for now, I think. Tested. Change-Id: Ib33d3cc666f9c1ca0848ae067f3047d8b7939d3e --- M manifests/site.pp 1 file changed, 6 insertions(+), 2 deletions(-) Approvals: Tim Starling: Verified; Looks good to me, approved diff --git a/manifests/site.pp b/manifests/site.pp index a77ab08..44bcf8c 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -1990,9 +1990,13 @@ passwords::logmsgbot tcpircbot::instance { 'logmsgbot': - channel => '#wikimedia-operations', + channel => '#wikimedia-operations', password => $passwords::logmsgbot::logmsgbot_password, - cidr => '::/0' + cidr => [ + ':::10.64.0.196/128', # tin + ':::208.80.152.165/128', # fenari + ':::127.0.0.1/128', # loopback + ], } } -- To view, visit https://gerrit.wikimedia.org/r/61931 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib33d3cc666f9c1ca0848ae067f3047d8b7939d3e Gerrit-PatchSet: 3 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ori.livneh Gerrit-Reviewer: Tim Starling Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Allow multiple CIDR ranges to be specified - change (operations/puppet)
Tim Starling has submitted this change and it was merged. Change subject: Allow multiple CIDR ranges to be specified .. Allow multiple CIDR ranges to be specified This patch allows multiple CIDR ranges to be specified as a Puppet array. This is required for permitting both tin and fenari to connect to logsmsgbot, since a single CIDR range cannot span exactly those two machines' IPs. Change-Id: I35c043361b60ea99efb5f06117bd6f107280dde5 --- M modules/tcpircbot/README M modules/tcpircbot/files/tcpircbot.py M modules/tcpircbot/manifests/instance.pp M modules/tcpircbot/templates/tcpircbot.json.erb 4 files changed, 10 insertions(+), 6 deletions(-) Approvals: Tim Starling: Verified; Looks good to me, approved diff --git a/modules/tcpircbot/README b/modules/tcpircbot/README index dacb567..2e99923 100644 --- a/modules/tcpircbot/README +++ b/modules/tcpircbot/README @@ -8,7 +8,8 @@ By default, it will connect to Freenode using SSL and listen for incoming connections on port 9200. If the configuration specifies a CIDR range, only clients within that range are allowed to connect. The default behavior is to -allow clients from private and loopback IPs only. +allow clients from private and loopback IPs only. Multiple CIDR ranges may be +specified as an array of values. The defaults are sane and fit the most common use-case. There are three values which you must specify: a nickname for your bot, a nickserv password for that diff --git a/modules/tcpircbot/files/tcpircbot.py b/modules/tcpircbot/files/tcpircbot.py index b66c722..88d22a6 100755 --- a/modules/tcpircbot/files/tcpircbot.py +++ b/modules/tcpircbot/files/tcpircbot.py @@ -83,7 +83,7 @@ def log_event(self, connection, event): if connection.real_nickname in [event._source, event._target]: logging.info('%(_eventtype)s [%(_source)s -> %(_target)s]' -% vars(event)) + % vars(event)) def on_welcome(self, connection, event): connection.join(self.channel) @@ -109,6 +109,7 @@ sockets = [server] + def close_sockets(): for sock in sockets: try: @@ -122,11 +123,12 @@ def is_ip_allowed(ip): """Check if we should accept a connection from remote IP `ip`. If the config specifies a CIDR, test against that; otherwise allow only -private and loopback IPs. +private and loopback IPs. Multiple comma-separated CIDRs may be specified. """ ip = netaddr.IPAddress(ip) if 'cidr' in config['tcp']: -return ip in netaddr.IPNetwork(config['tcp']['cidr']) +cidrs = config['tcp']['cidr'].split(',') +return any(ip in netaddr.IPNetwork(cidr) for cidr in cidrs) try: ip = ip.ipv4() except netaddr.core.AddrConversionError: diff --git a/modules/tcpircbot/manifests/instance.pp b/modules/tcpircbot/manifests/instance.pp index aede997..22f06c4 100644 --- a/modules/tcpircbot/manifests/instance.pp +++ b/modules/tcpircbot/manifests/instance.pp @@ -27,7 +27,8 @@ # IPv6 CIDR range. Optional. If defined, inbound connections from addresses # outside this range will be rejected. If not defined (the default), the # service will only accept connections from private and loopback IPs. -# Example: "fc00::/7". +# Multiple ranges may be specified as an array of values. +# Example: ['fc00::/7', '::1/128'] # # [*ssl*] # Whether to use SSL to connect to IRC server (default: true). diff --git a/modules/tcpircbot/templates/tcpircbot.json.erb b/modules/tcpircbot/templates/tcpircbot.json.erb index fb7070e..d4803b6 100755 --- a/modules/tcpircbot/templates/tcpircbot.json.erb +++ b/modules/tcpircbot/templates/tcpircbot.json.erb @@ -7,7 +7,7 @@ }, "tcp": { "max_clients": <%= @max_clients %>, -<% if @cidr %>"cidr": "<%= @cidr %>",<% end %> +<% if @cidr %>"cidr": "<%= @cidr.is_a?(Array) ? @cidr.join(',') : @cidr %>",<% end %> "port": <%= @listen_port %> } } -- To view, visit https://gerrit.wikimedia.org/r/61920 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I35c043361b60ea99efb5f06117bd6f107280dde5 Gerrit-PatchSet: 3 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ori.livneh Gerrit-Reviewer: Hashar Gerrit-Reviewer: Ori.livneh Gerrit-Reviewer: Tim Starling Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Forgot to Log Device Changes... - change (mediawiki...CentralNotice)
Mwalker has uploaded a new change for review. https://gerrit.wikimedia.org/r/62137 Change subject: Forgot to Log Device Changes... .. Forgot to Log Device Changes... This patch makes sure we log CN device attachments to banners Change-Id: I4218b224c4c25ea7a252ef3c75b04ab52d0dee28 --- M CentralNotice.i18n.php M CentralNotice.sql M CentralNoticeBannerLogPager.php M includes/Banner.php M includes/CNDeviceTarget.php M patches/CNDatabasePatcher.php A patches/patch-template-device-logging.sql 7 files changed, 38 insertions(+), 31 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralNotice refs/changes/37/62137/1 diff --git a/CentralNotice.i18n.php b/CentralNotice.i18n.php index efe2adf..8445751 100644 --- a/CentralNotice.i18n.php +++ b/CentralNotice.i18n.php @@ -230,6 +230,7 @@ 'centralnotice-noiframe' => 'This element cannot be displayed without iframes.', 'centralnotice-messages-pending-approval' => 'Languages with messages currently pending approval', + 'centralnotice-devices' => 'Display on devices', ); /** Message documentation (Message documentation) @@ -623,6 +624,7 @@ 'centralnotice-user-role-logged-in' => 'Label for the logged-in user role', 'centralnotice-noiframe' => 'Inform the user that banner previewing has failed because their browser does not support iframes.', 'centralnotice-messages-pending-approval' => 'Label for a list of languages in which banner messages are pending approval', + 'centralnotice-devices' => 'Log line label for showing a list of devices (e.g. iphone, desktop) that the banner will display on', ); /** Afrikaans (Afrikaans) diff --git a/CentralNotice.sql b/CentralNotice.sql index c5f70b5..236d4a0 100644 --- a/CentralNotice.sql +++ b/CentralNotice.sql @@ -164,7 +164,9 @@ `tmplog_begin_preview_sandbox` tinyint(1) DEFAULT NULL, `tmplog_end_preview_sandbox` tinyint(1) DEFAULT NULL, `tmplog_begin_controller_mixin` varbinary(4096) DEFAULT NULL, - `tmplog_end_controller_mixin` varbinary(4096) DEFAULT NULL + `tmplog_end_controller_mixin` varbinary(4096) DEFAULT NULL, + `tmplog_begin_devices` varbinary(512) DEFAULT NULL, + `tmplog_end_devices` varbinary(512) DEFAULT NULL ) /*$wgDBTableOptions*/; CREATE INDEX /*i*/tmplog_timestamp ON /*_*/cn_template_log (tmplog_timestamp); CREATE INDEX /*i*/tmplog_user_id ON /*_*/cn_template_log (tmplog_user_id, tmplog_timestamp); diff --git a/CentralNoticeBannerLogPager.php b/CentralNoticeBannerLogPager.php index 7a5106a..c8e4a51 100644 --- a/CentralNoticeBannerLogPager.php +++ b/CentralNoticeBannerLogPager.php @@ -1,13 +1,11 @@ special = $special; parent::__construct($special); - - $this->viewPage = SpecialPage::getTitleFor( 'NoticeTemplate', 'view' ); } /** @@ -48,10 +46,8 @@ // Create the banner link $bannerLink = Linker::linkKnown( - $this->viewPage, - htmlspecialchars( $row->tmplog_template_name ), - array(), - array( 'template' => $row->tmplog_template_name ) + SpecialPage::getTitleFor( 'CentralNoticeBanners', "edit/{$row->tmplog_template_name}" ), + htmlspecialchars( $row->tmplog_template_name ) ); // Begin log entry primary row @@ -170,6 +166,11 @@ $row->tmplog_end_landingpages )->text() . ""; } + $details .= $this->msg( + 'centralnotice-log-label', + $this->msg( 'centralnotice-devices' )->text(), + $row->tmplog_end_devices + )->text() . ""; return $details; } @@ -181,6 +182,7 @@ $details .= $this->testTextChange( 'landingpages', $row ); $details .= $this->testTextChange( 'controller_mixin', $row ); $details .= $this->testTextChange( 'prioritylangs', $row ); + $details .= $this->testTextChange( 'devices', $row ); if ( $row->tmplog_content_change ) { // Show changes to banner content $details .= $this->msg ( diff --git a/includes/Banner.php b/includes/Banner.php index eca65e4..8954ae3 100644 --- a/includes/Banner.php +++ b/includes/Banner.php @@ -291,8 +291,6 @@ static function getBannerSettings( $bannerName, $detailed = true ) { global $wgNoticeUseTranslateExtension; - $banner = array(); - $dbr = CNDatabase::getDb(); $row = $dbr->selectRow( @@ -332,6 +330,7 @@ } $banner['prioritylangs'] = explode( ',', $langs );
[MediaWiki-commits] [Gerrit] Fix use of PATH_INFO in missing.php - change (operations/mediawiki-config)
Tim Starling has submitted this change and it was merged. Change subject: Fix use of PATH_INFO in missing.php .. Fix use of PATH_INFO in missing.php There's no /wiki in it, since /wiki is an alias to index.php, not /. Bug 47908 Change-Id: If168aaf12bfb77c93c00a10e112a28845782d729 --- M wmf-config/missing.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Tim Starling: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/missing.php b/wmf-config/missing.php index 9cd8e40..01f1517 100644 --- a/wmf-config/missing.php +++ b/wmf-config/missing.php @@ -50,7 +50,7 @@ if ( count( $tmp ) == 3 ) { list( $language, $project, $tld ) = $tmp; if( isset( $_SERVER['PATH_INFO'] ) - && preg_match( '!^/wiki/(.*)$!', $_SERVER['PATH_INFO'], $m ) ) + && preg_match( '!^/(.*)$!', $_SERVER['PATH_INFO'], $m ) ) { $page = $m[1]; } elseif( isset( $_GET['title'] ) ) { -- To view, visit https://gerrit.wikimedia.org/r/62136 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If168aaf12bfb77c93c00a10e112a28845782d729 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Tim Starling Gerrit-Reviewer: Tim Starling Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix use of PATH_INFO in missing.php - change (operations/mediawiki-config)
Tim Starling has uploaded a new change for review. https://gerrit.wikimedia.org/r/62136 Change subject: Fix use of PATH_INFO in missing.php .. Fix use of PATH_INFO in missing.php There's no /wiki in it, since /wiki is an alias to index.php, not /. Bug 47908 Change-Id: If168aaf12bfb77c93c00a10e112a28845782d729 --- M wmf-config/missing.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/36/62136/1 diff --git a/wmf-config/missing.php b/wmf-config/missing.php index 9cd8e40..01f1517 100644 --- a/wmf-config/missing.php +++ b/wmf-config/missing.php @@ -50,7 +50,7 @@ if ( count( $tmp ) == 3 ) { list( $language, $project, $tld ) = $tmp; if( isset( $_SERVER['PATH_INFO'] ) - && preg_match( '!^/wiki/(.*)$!', $_SERVER['PATH_INFO'], $m ) ) + && preg_match( '!^/(.*)$!', $_SERVER['PATH_INFO'], $m ) ) { $page = $m[1]; } elseif( isset( $_GET['title'] ) ) { -- To view, visit https://gerrit.wikimedia.org/r/62136 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If168aaf12bfb77c93c00a10e112a28845782d729 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Tim Starling ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fixing some UI bugs - change (mediawiki...CentralNotice)
Mwalker has uploaded a new change for review. https://gerrit.wikimedia.org/r/62135 Change subject: Fixing some UI bugs .. Fixing some UI bugs Links Everywhere! Change-Id: I7e014020bddd1c06d4e25bf7d96b88134cacaf28 --- M includes/BannerRenderer.php M special/SpecialBannerAllocation.php M special/SpecialGlobalAllocation.php M special/SpecialNoticeTemplate.php 4 files changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralNotice refs/changes/35/62135/1 diff --git a/includes/BannerRenderer.php b/includes/BannerRenderer.php index ab10ae9..6b300f8 100644 --- a/includes/BannerRenderer.php +++ b/includes/BannerRenderer.php @@ -46,7 +46,7 @@ function linkTo() { return Linker::link( - SpecialPage::getTitleFor( 'CentralNoticeBanners', "Edit/{$this->banner->getName()}" ), + SpecialPage::getTitleFor( 'CentralNoticeBanners', "edit/{$this->banner->getName()}" ), htmlspecialchars( $this->banner->getName() ), array( 'class' => 'cn-banner-title' ) ); diff --git a/special/SpecialBannerAllocation.php b/special/SpecialBannerAllocation.php index 671d4ad..184d10f 100644 --- a/special/SpecialBannerAllocation.php +++ b/special/SpecialBannerAllocation.php @@ -278,7 +278,7 @@ * @return string HTML for the table */ public function getTable( $type, $banners ) { - $viewBanner = $this->getTitleFor( 'NoticeTemplate', 'view' ); + $viewBanner = $this->getTitleFor( 'CentralNoticeBanners', "edit/$banner" ); $viewCampaign = $this->getTitleFor( 'CentralNotice' ); $htmlOut = Html::openElement( 'table', diff --git a/special/SpecialGlobalAllocation.php b/special/SpecialGlobalAllocation.php index 053812f..731522d 100644 --- a/special/SpecialGlobalAllocation.php +++ b/special/SpecialGlobalAllocation.php @@ -534,7 +534,7 @@ function getBannerAllocationsVariantRow( $banner, $variesAnon, $variesBucket, $isAnon, $bucket ) { $htmlOut = ''; - $viewBanner = $this->getTitleFor( 'NoticeTemplate', 'view' ); + $viewBanner = $this->getTitleFor( 'CentralNoticeBanners', "edit/$banner" ); $viewCampaign = $this->getTitleFor( 'CentralNotice' ); // Row begin diff --git a/special/SpecialNoticeTemplate.php b/special/SpecialNoticeTemplate.php index 05f8f36..b9b6595 100644 --- a/special/SpecialNoticeTemplate.php +++ b/special/SpecialNoticeTemplate.php @@ -21,7 +21,7 @@ $banner = $this->getRequest()->getText( 'template' ); $this->getOutput()->redirect( - Title::makeTitle( NS_SPECIAL, "CentralNoticeBanners/view/$banner" )-> + Title::makeTitle( NS_SPECIAL, "CentralNoticeBanners/edit/$banner" )-> getCanonicalURL(), 301 ); -- To view, visit https://gerrit.wikimedia.org/r/62135 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7e014020bddd1c06d4e25bf7d96b88134cacaf28 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CentralNotice Gerrit-Branch: master Gerrit-Owner: Mwalker ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Accept newline when not in SOL posn - needed for wt escaping - change (mediawiki...Parsoid)
Subramanya Sastry has uploaded a new change for review. https://gerrit.wikimedia.org/r/62134 Change subject: Accept newline when not in SOL posn - needed for wt escaping .. Accept newline when not in SOL posn - needed for wt escaping * This bug was exposed by the changes to wikitext escaping tokenizing in commit e03a2ec0 -- that removed the "_" prefix trick for parsing strings in non-sol position and directly set SOL state in the tokenizer. * In non-sol position "\na" was not getting accepted by the tokenizer. It was failing. * This in turn crashed the serializer that used the tokenizer for wikitext escaping. * This bug led to a crasher during RT testing. http://parsoid.wmflabs.org:8001/result/2c45ade9723ea06f538ff5b2255dcb5d1fbbd601/ru/%D0%90%D0%BD%D0%B0%D1%82%D0%BE%D0%BB%D0%B8%D0%B9_%D0%90%D0%BB%D0%B5%D0%BA%D1%81%D0%B0%D0%BD%D0%B4%D1%80%D0%BE%D0%B2%D0%B8%D1%87_%D0%A2%D0%B8%D0%BC%D0%BE%D1%89%D1%83%D0%BA * This patch fixes the crasher. No change in any parser tests. Change-Id: I72b52fa7bc0b5765b5a3873f8775d21e5f56aa4d --- M js/lib/pegTokenizer.pegjs.txt 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Parsoid refs/changes/34/62134/1 diff --git a/js/lib/pegTokenizer.pegjs.txt b/js/lib/pegTokenizer.pegjs.txt index d6f8ddc..6e3bdb6 100644 --- a/js/lib/pegTokenizer.pegjs.txt +++ b/js/lib/pegTokenizer.pegjs.txt @@ -550,6 +550,7 @@ // transform and DOM postprocessor / inlineline / sol !inline_breaks +/ newlineToken /* * A block nested in other constructs. Avoid eating end delimiters for other -- To view, visit https://gerrit.wikimedia.org/r/62134 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I72b52fa7bc0b5765b5a3873f8775d21e5f56aa4d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Parsoid Gerrit-Branch: master Gerrit-Owner: Subramanya Sastry ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] CentralNotice UI Message Handling ++Graceful - change (mediawiki...CentralNotice)
Mwalker has uploaded a new change for review. https://gerrit.wikimedia.org/r/62133 Change subject: CentralNotice UI Message Handling ++Graceful .. CentralNotice UI Message Handling ++Graceful When messages are empty it no longer does in the text box. We also now know about messages that are pending approval. Change-Id: I079fe3f1289ddc865d25af8e29300ca0e0858f29 --- M CentralNotice.i18n.php M includes/Banner.php M includes/BannerMessage.php M includes/BannerMessageGroup.php M special/SpecialCentralNoticeBanners.php 5 files changed, 79 insertions(+), 22 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralNotice refs/changes/33/62133/1 diff --git a/CentralNotice.i18n.php b/CentralNotice.i18n.php index 8b719b2..efe2adf 100644 --- a/CentralNotice.i18n.php +++ b/CentralNotice.i18n.php @@ -228,8 +228,8 @@ 'centralnotice-delete-banner-confirm' => 'Deletion removes all settings and messages. This action cannot be reversed. Consider archiving instead.', 'centralnotice-delete-banner-cancel' => 'Cancel', - 'centralnotice-banner-bad-js' => 'A banner on this page has invalid JavaScript code and is preventing CentralNotice from initializing correctly. Please fix the banner.', 'centralnotice-noiframe' => 'This element cannot be displayed without iframes.', + 'centralnotice-messages-pending-approval' => 'Languages with messages currently pending approval', ); /** Message documentation (Message documentation) @@ -621,8 +621,8 @@ 'centralnotice-user-role-anonymous' => 'Label for the anonymous user role. {{Identical|Anonymous}}', 'centralnotice-user-role-logged-in' => 'Label for the logged-in user role', - 'centralnotice-banner-bad-js' => 'Text to display when CentralNotice fails to initialize due to broken JavaScript code present in a banner.', 'centralnotice-noiframe' => 'Inform the user that banner previewing has failed because their browser does not support iframes.', + 'centralnotice-messages-pending-approval' => 'Label for a list of languages in which banner messages are pending approval', ); /** Afrikaans (Afrikaans) diff --git a/includes/Banner.php b/includes/Banner.php index b0b7c8a..b0bba61 100644 --- a/includes/Banner.php +++ b/includes/Banner.php @@ -695,22 +695,25 @@ } /** -* @return a list of languages with existing field translations +* Returns a list of messages that are either published or in the CNBanner translation +* +* @param bool $inTranslation If true and using group translation this will return +* all the messages that are in the translation system +* +* @return array A list of languages with existing field translations */ - function getAvailableLanguages() { + function getAvailableLanguages( $inTranslation = false ) { global $wgLanguageCode; $availableLangs = array(); - $fields = $this->extractMessageFields(); - - //HACK - $prefix = $this->getMessageField( '' )->getDbKey(); + // Bit of an ugly hack to get just the banner prefix + $prefix = $this->getMessageField( '' )->getDbKey( null, $inTranslation ? NS_CN_BANNER : NS_MEDIAWIKI ); $db = CNDatabase::getDb(); $result = $db->select( 'page', 'page_title', array( - 'page_namespace' => NS_MEDIAWIKI, + 'page_namespace' => $inTranslation ? NS_CN_BANNER : NS_MEDIAWIKI, 'page_title' . $db->buildLike( $prefix, $db->anyString() ), ), __METHOD__ diff --git a/includes/BannerMessage.php b/includes/BannerMessage.php index ff6e9f8..9e16186 100644 --- a/includes/BannerMessage.php +++ b/includes/BannerMessage.php @@ -44,11 +44,19 @@ } /** -* Hack to help with cloning. +* Obtain the raw contents of the message; stripping out the stupid if it's blank +* +* @returns null|string Will be null if the message does not exist, otherwise will be +* the contents of the message. */ function getContents( $lang ) { if ( $this->existsInLang( $lang ) ) { - return wfMessage( $this->getDbKey() )->inLanguage( $lang )->text(); + $dbKey = $this->getDbKey(); + $msg = wfMessage( $dbKey )->inLanguage( $lang )->text(); + if ( $msg === "<{$dbKey}>" ) { + $msg = ''; + } + return $msg; } else { return null; } diff --git a/includes/BannerMessageGroup.php b/includes/Bann
[MediaWiki-commits] [Gerrit] ParserTests: don't accumulate comments when skipping tests w... - change (mediawiki...Parsoid)
jenkins-bot has submitted this change and it was merged. Change subject: ParserTests: don't accumulate comments when skipping tests with --filter. .. ParserTests: don't accumulate comments when skipping tests with --filter. Change-Id: I99ccfbaaa2bc03087f5597e7d8892257bc55b71b --- M js/tests/parserTests.js 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Subramanya Sastry: Looks good to me, approved jenkins-bot: Verified diff --git a/js/tests/parserTests.js b/js/tests/parserTests.js index ef2381d..f879a99 100755 --- a/js/tests/parserTests.js +++ b/js/tests/parserTests.js @@ -1499,6 +1499,7 @@ -1 === item.title.search( this.test_filter ) ) ) { // Skip test whose title does not match --filter // or which is disabled or php-only + this.comments = []; process.nextTick( nextCallback ); break; } -- To view, visit https://gerrit.wikimedia.org/r/62132 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I99ccfbaaa2bc03087f5597e7d8892257bc55b71b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Parsoid Gerrit-Branch: master Gerrit-Owner: Cscott 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] ParserTests: don't accumulate comments when skipping tests w... - change (mediawiki...Parsoid)
Cscott has uploaded a new change for review. https://gerrit.wikimedia.org/r/62132 Change subject: ParserTests: don't accumulate comments when skipping tests with --filter. .. ParserTests: don't accumulate comments when skipping tests with --filter. Change-Id: I99ccfbaaa2bc03087f5597e7d8892257bc55b71b --- M js/tests/parserTests.js 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Parsoid refs/changes/32/62132/1 diff --git a/js/tests/parserTests.js b/js/tests/parserTests.js index ef2381d..f879a99 100755 --- a/js/tests/parserTests.js +++ b/js/tests/parserTests.js @@ -1499,6 +1499,7 @@ -1 === item.title.search( this.test_filter ) ) ) { // Skip test whose title does not match --filter // or which is disabled or php-only + this.comments = []; process.nextTick( nextCallback ); break; } -- To view, visit https://gerrit.wikimedia.org/r/62132 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I99ccfbaaa2bc03087f5597e7d8892257bc55b71b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Parsoid Gerrit-Branch: master Gerrit-Owner: Cscott ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] reenable rfaulkner round 3 - change (operations/puppet)
Jeremyb has uploaded a new change for review. https://gerrit.wikimedia.org/r/62131 Change subject: reenable rfaulkner round 3 .. reenable rfaulkner round 3 RT: 5040 Change-Id: Ib227d40a9f2895ebb01e60be928c20cf69e01d19 --- M manifests/admins.pp M manifests/site.pp 2 files changed, 2 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/31/62131/1 diff --git a/manifests/admins.pp b/manifests/admins.pp index aa98a61..5c7a026 100644 --- a/manifests/admins.pp +++ b/manifests/admins.pp @@ -1470,9 +1470,8 @@ class rfaulk inherits baseaccount { $username = "rfaulk" - $realname = "Ryan Faulk" + $realname = "Ryan Faulkner" $uid = 555 - $enabled = false unixaccount { $realname: username => $username, uid => $uid, gid => $gid } diff --git a/manifests/site.pp b/manifests/site.pp index a77ab08..6406900 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -2604,7 +2604,7 @@ accounts::olivneh, # RT 3451 accounts::otto, accounts::reedy, - accounts::rfaulk, + accounts::rfaulk, # RT 5040 accounts::spetrea, # RT 3584 accounts::swalling, # RT 3653 accounts::yurik # RT 4835 -- To view, visit https://gerrit.wikimedia.org/r/62131 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib227d40a9f2895ebb01e60be928c20cf69e01d19 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Jeremyb ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Don't ignore data-parsoid in DOMDiff, attempt 2 - change (mediawiki...Parsoid)
jenkins-bot has submitted this change and it was merged. Change subject: Don't ignore data-parsoid in DOMDiff, attempt 2 .. Don't ignore data-parsoid in DOMDiff, attempt 2 This is a fixed version of Subbu's 2c45ade9723ea06f538ff5b2255dcb5d1fbbd601, which I reverted due to https://bugzilla.wikimedia.org/show_bug.cgi?id=48018. * In VE, sometimes wrappers get moved around without their content which can cause p-wrapper of deleted content to be used on identical undeleted content. Since the identical undeleted content is marked as unchanged, selser tries to emit use dsr from its wrapper to emit original src, but the wrapper is not the right one and leads selser to emit more/less text depending on how VE manipulated the wrappers. Discovered via: /mnt/bugs/2013-05-01T09:43:14.960Z-Reverse_innovation * Unrelated fixes: Updated debugging output in DOMDiff. * Tested via: node parse --html2wt --selser --domdiff domdiff.diff.html --oldtextfile wt < editedHtml which emitted duplicate text before this patch and emits correct text after this patch. * parserTests results: - Inexplicably, this patch causes selser to reuse more original source fragments on parserTests. - Leads to one selser test passing (which passes in wt2wt mode), and 3 selser tests failing (all of which fail in wt2wt mode as well). - Updated blacklist. Change-Id: Ib0c781568d83b59c36acf47254e8dd9a6a30034f --- M js/lib/mediawiki.DOMDiff.js M js/tests/parserTests-blacklist.js 2 files changed, 21 insertions(+), 11 deletions(-) Approvals: Subramanya Sastry: Looks good to me, approved jenkins-bot: Verified diff --git a/js/lib/mediawiki.DOMDiff.js b/js/lib/mediawiki.DOMDiff.js index 9945454..6901216 100644 --- a/js/lib/mediawiki.DOMDiff.js +++ b/js/lib/mediawiki.DOMDiff.js @@ -26,10 +26,13 @@ // SSS FIXME: Is this required? // // First do a quick check on the top-level nodes themselves - if (!this.treeEquals(this.env.page.dom, workNode, false)) { - this.markNode(workNode, 'modified'); - return { isEmpty: false, dom: workNode }; - } + // FIXME gwicke: Disabled for now as the VE seems to drop data-parsoid on + // the body and the serializer does not respect a 'modified' flag on the + // body. This also assumes that we always diff on the body element. + //if (!this.treeEquals(this.env.page.dom, workNode, false)) { + // this.markNode(workNode, 'modified'); + // return { isEmpty: false, dom: workNode }; + //} // The root nodes are equal, call recursive differ var foundChange = this.doDOMDiff(this.env.page.dom, workNode); @@ -46,7 +49,11 @@ // subtree actually changes. So, ignoring this attribute in effect, // ignores the parser tests change. 'data-parsoid-changed': 1, - 'data-parsoid': 1, + // SSS: Don't ignore data-parsoid because in VE, sometimes wrappers get + // moved around without their content which occasionally leads to incorrect + // DSR being used by selser. Hard to describe a reduced test case here. + // Discovered via: /mnt/bugs/2013-05-01T09:43:14.960Z-Reverse_innovation + // 'data-parsoid': 1, 'data-parsoid-diff': 1, 'about': 1 }; @@ -151,10 +158,11 @@ DDP.doDOMDiff = function ( baseParentNode, newParentNode ) { var dd = this; - function debugOut(nodeA, nodeB) { + function debugOut(nodeA, nodeB, laPrefix) { + laPrefix = laPrefix || ""; if (dd.debugging) { - dd.debug("--> A: " + (DU.isElt(nodeA) ? nodeA.outerHTML : JSON.stringify(nodeA.nodeValue))); - dd.debug("--> B: " + (DU.isElt(nodeB) ? nodeB.outerHTML : JSON.stringify(nodeB.nodeValue))); + dd.debug("--> A" + laPrefix + ":" + (DU.isElt(nodeA) ? nodeA.outerHTML : JSON.stringify(nodeA.nodeValue))); + dd.debug("--> B" + laPrefix + ":" + (DU.isElt(nodeB) ? nodeB.outerHTML : JSON.stringify(nodeB.nodeValue))); } } @@ -181,7 +189,7 @@ this.debug("--lookahead in new dom--"); lookaheadNode = newNode.nextSibling; while (lookaheadNode) { - debugOut(baseNode, lookaheadNode); + debugOut(baseNode, lookaheadNode, "new"); if (DU.isContentNode(lookaheadNode) && this.treeEquals(baseNode, lookaheadNode, true)) { @@ -205,7 +213,7 @@ this.debug("--lookahead in old dom--"); lookaheadNode = baseNode.nextSibling; while (lookah
[MediaWiki-commits] [Gerrit] Prepare DatabaseMysql for mysqli - change (mediawiki/core)
Jakub Vrána has uploaded a new change for review. https://gerrit.wikimedia.org/r/62130 Change subject: Prepare DatabaseMysql for mysqli .. Prepare DatabaseMysql for mysqli PHP extensions mysql and mysqli have lots in common. In order to support mysqli, this diff separates common MySQL behavior to abstract class DatabaseMysqlBase and implements the mysql-extension specific in DatabaseMysql. Outside behavior remains the same. I've tried to minimize future code duplication by introducing mysql*() methods even if the parent method just unwraps the result. Bug: 45288 Change-Id: I905d4a4550377bc849a860f0962dad710d9dc71f --- M includes/db/DatabaseMysql.php 1 file changed, 206 insertions(+), 122 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/30/62130/1 diff --git a/includes/db/DatabaseMysql.php b/includes/db/DatabaseMysql.php index 4105ee1..7a6f476 100644 --- a/includes/db/DatabaseMysql.php +++ b/includes/db/DatabaseMysql.php @@ -22,33 +22,13 @@ */ /** - * Database abstraction object for mySQL - * Inherit all methods and properties of Database::Database() + * Database abstraction object for MySQL. + * Defines methods independent on used MySQL extension. * * @ingroup Database * @see Database */ -class DatabaseMysql extends DatabaseBase { - - /** -* @return string -*/ - function getType() { - return 'mysql'; - } - - /** -* @param $sql string -* @return resource -*/ - protected function doQuery( $sql ) { - if ( $this->bufferResults() ) { - $ret = mysql_query( $sql, $this->mConn ); - } else { - $ret = mysql_unbuffered_query( $sql, $this->mConn ); - } - return $ret; - } +abstract class DatabaseMysqlBase extends DatabaseBase { /** * @param $server string @@ -62,16 +42,6 @@ global $wgAllDBsAreLocalhost, $wgDBmysql5, $wgSQLMode; wfProfileIn( __METHOD__ ); - # Load mysql.so if we don't have it - wfDl( 'mysql' ); - - # Fail now - # Otherwise we get a suppressed fatal error, which is very hard to track down - if ( !function_exists( 'mysql_connect' ) ) { - wfProfileOut( __METHOD__ ); - throw new DBConnectionError( $this, "MySQL functions missing, have you compiled PHP with the --with-mysql option?\n" ); - } - # Debugging hack -- fake cluster if ( $wgAllDBsAreLocalhost ) { $realServer = 'localhost'; @@ -84,40 +54,19 @@ $this->mPassword = $password; $this->mDBname = $dbName; - $connFlags = 0; - if ( $this->mFlags & DBO_SSL ) { - $connFlags |= MYSQL_CLIENT_SSL; - } - if ( $this->mFlags & DBO_COMPRESS ) { - $connFlags |= MYSQL_CLIENT_COMPRESS; - } - wfProfileIn( "dbconnect-$server" ); # The kernel's default SYN retransmission period is far too slow for us, # so we use a short timeout plus a manual retry. Retrying means that a small # but finite rate of SYN packet loss won't cause user-visible errors. $this->mConn = false; - if ( ini_get( 'mysql.connect_timeout' ) <= 3 ) { - $numAttempts = 2; - } else { - $numAttempts = 1; - } $this->installErrorHandler(); - for ( $i = 0; $i < $numAttempts && !$this->mConn; $i++ ) { - if ( $i > 1 ) { - usleep( 1000 ); - } - if ( $this->mFlags & DBO_PERSISTENT ) { - $this->mConn = mysql_pconnect( $realServer, $user, $password, $connFlags ); - } else { - # Create a new connection... - $this->mConn = mysql_connect( $realServer, $user, $password, true, $connFlags ); - } - #if ( $this->mConn === false ) { - #$iplus = $i + 1; - #wfLogDBError("Connect loop error $iplus of $max ($server): " . mysql_errno() . " - " . mysql_error()."\n"); - #} + try { + $this->mysqlOpen( $realServer ); + } catch (Exception $ex) { + wfProfileOut( "dbconnect-$server" ); + wfProfileOut( __METHOD__ ); + throw $ex; } $error = $this->restoreErrorHandler();
[MediaWiki-commits] [Gerrit] Update metric group to neutral for gettingstarted notification - change (mediawiki...GettingStarted)
Kaldari has submitted this change and it was merged. Change subject: Update metric group to neutral for gettingstarted notification .. Update metric group to neutral for gettingstarted notification Change-Id: I155e15e15fdcd106d50b5c8e8e10438a35454c68 --- M GettingStarted.hooks.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Kaldari: Verified; Looks good to me, approved jenkins-bot: Checked diff --git a/GettingStarted.hooks.php b/GettingStarted.hooks.php index 9ccc367..2837ec0 100644 --- a/GettingStarted.hooks.php +++ b/GettingStarted.hooks.php @@ -116,7 +116,7 @@ $defaults = array( 'category' => 'system', - 'group' => 'positive', + 'group' => 'neutral', 'title-params' => array( 'agent' ), 'email-subject-params' => array( 'agent' ), 'email-body-params' => array( 'agent', 'titlelink', 'email-footer' ), -- To view, visit https://gerrit.wikimedia.org/r/61716 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I155e15e15fdcd106d50b5c8e8e10438a35454c68 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/GettingStarted Gerrit-Branch: master Gerrit-Owner: Bsitu Gerrit-Reviewer: Kaldari Gerrit-Reviewer: Mattflaschen Gerrit-Reviewer: Ori.livneh Gerrit-Reviewer: Spage Gerrit-Reviewer: Swalling Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Thanks notif should fall under positive group - change (mediawiki...Thanks)
Kaldari has submitted this change and it was merged. Change subject: Thanks notif should fall under positive group .. Thanks notif should fall under positive group Change-Id: I19bfe1483ba7edc5928c3c39968e7d84161ab441 --- M Thanks.hooks.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Kaldari: Verified; Looks good to me, approved jenkins-bot: Checked diff --git a/Thanks.hooks.php b/Thanks.hooks.php index 68c52cc..2050ba2 100644 --- a/Thanks.hooks.php +++ b/Thanks.hooks.php @@ -120,7 +120,7 @@ $notifications['edit-thank'] = array( 'category' => 'edit-thank', - 'group' => 'interactive', + 'group' => 'positive', 'formatter-class' => 'EchoThanksFormatter', 'title-message' => 'notification-thanks', 'title-params' => array( 'agent', 'difflink', 'title' ), -- To view, visit https://gerrit.wikimedia.org/r/61711 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I19bfe1483ba7edc5928c3c39968e7d84161ab441 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Thanks Gerrit-Branch: master Gerrit-Owner: Bsitu Gerrit-Reviewer: Kaldari Gerrit-Reviewer: Lwelling Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Temporary fix for bug 47954 - keep section link in edit summary - change (mediawiki...Echo)
jenkins-bot has submitted this change and it was merged. Change subject: Temporary fix for bug 47954 - keep section link in edit summary .. Temporary fix for bug 47954 - keep section link in edit summary Since talk page edits don't necessary belong to a seciton (or may involve several sections), we'll need to be more clever in the DiscussionParser to extract it for the long term solution. This temporary solution will expose any section link in the edit summary payload so that people can jump straight to the section if they want to (same as existing behavior in the archive version). Bug: 47954 Change-Id: I2745ba194ba1f9b5b7c446588da6586e87d35b31 --- M formatters/NotificationFormatter.php 1 file changed, 2 insertions(+), 18 deletions(-) Approvals: Lwelling: Looks good to me, approved jenkins-bot: Verified diff --git a/formatters/NotificationFormatter.php b/formatters/NotificationFormatter.php index e255850..8dc8c3e 100644 --- a/formatters/NotificationFormatter.php +++ b/formatters/NotificationFormatter.php @@ -137,24 +137,8 @@ $summary = $revision->getComment( Revision::FOR_THIS_USER, $user ); if ( $this->outputFormat === 'html' || $this->outputFormat === 'flyout' ) { - if ( $this->outputFormat === 'html' ) { - // Parse the edit summary - $summary = Linker::formatComment( $summary, $revision->getTitle() ); - } else { - // Strip wikitext from the edit summary and manually convert autocomments - $summary = FeedItem::stripComment( $summary ); - $summary = trim( htmlspecialchars( $summary ) ); - // Convert section titles to proper HTML - preg_match( "!(.*)/\*\s*(.*?)\s*\*/(.*)!", $summary, $matches ); - if ( $matches ) { - $section = $matches[2]; - if ( $matches[3] ) { - // Add a colon after the section name - $section .= wfMessage( 'colon-separator' )->inContentLanguage()->escaped(); - } - $summary = $matches[1] . "" . $section . "" . $matches[3]; - } - } + // Parse the edit summary + $summary = Linker::formatComment( $summary, $revision->getTitle() ); if ( $summary ) { $summary = wfMessage( 'echo-quotation-marks', $summary )->inContentLanguage()->plain(); $summary = Xml::tags( 'span', array( 'class' => 'comment' ), $summary ); -- To view, visit https://gerrit.wikimedia.org/r/62122 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2745ba194ba1f9b5b7c446588da6586e87d35b31 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: Kaldari Gerrit-Reviewer: Bsitu Gerrit-Reviewer: Lwelling Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] unrevert c301571be - contact and contribution search results - change (wikimedia...crm)
Mwalker has submitted this change and it was merged. Change subject: unrevert c301571be - contact and contribution search results .. unrevert c301571be - contact and contribution search results Turns out it is useful. Change-Id: Ib09d60b78366a62880aad81c7087fa6a9a4f7e99 --- A sites/all/modules/wmf_reports/CRM/Contact/Form/ContactAndContributionsSelector.php M sites/all/modules/wmf_reports/wmf_reports.module 2 files changed, 319 insertions(+), 0 deletions(-) Approvals: Mwalker: Verified; Looks good to me, approved diff --git a/sites/all/modules/wmf_reports/CRM/Contact/Form/ContactAndContributionsSelector.php b/sites/all/modules/wmf_reports/CRM/Contact/Form/ContactAndContributionsSelector.php new file mode 100644 index 000..6f98ea8 --- /dev/null +++ b/sites/all/modules/wmf_reports/CRM/Contact/Form/ContactAndContributionsSelector.php @@ -0,0 +1,306 @@ +_queryParams =& $queryParams; + +$this->_limit = $limit; +$this->_context = $context; +$this->_compContext = $compContext; + +$this->_contributionClause = $contributionClause; + +// type of selector +$this->_action = $action; + +$returnProperties = CRM_Contribute_BAO_Query::defaultReturnProperties( +CRM_Contact_BAO_Query::MODE_CONTRIBUTE, +false +); +self::$all_location_types = CRM_Core_PseudoConstant::locationType(); +foreach (self::$all_location_types as $location_type) +{ +foreach (self::$location_properties as $property) +{ +$returnProperties['location'][$location_type][$property] = 1; +} +} +$returnProperties = array_merge_recursive( +$returnProperties, +self::$contribution_properties, +self::$contact_properties +); +$this->_query = new CRM_Contact_BAO_Query( +$this->_queryParams, +$returnProperties, +null, //array('notes' => 1), +false, +false, +CRM_Contact_BAO_Query::MODE_CONTRIBUTE +); +$this->_query->_distinctComponentClause = " civicrm_contribution.id"; +$this->_query->_groupByComponentClause = " GROUP BY civicrm_contribution.id "; +} + +function &getRows($action, $offset, $rowCount, $sort, $output = null) { +$result = $this->_query->searchQuery( $offset, $rowCount, $sort, + false, false, + false, false, + false, + $this->_contributionClause ); +// process the result of the query +$rows = array( ); + +//CRM-4418 check for view/edit/delete +$permissions = array( CRM_Core_Permission::VIEW ); +if ( CRM_Core_Permission::check( 'edit contributions' ) ) { +$permissions[] = CRM_Core_Permission::EDIT; +} +if ( CRM_Core_Permission::check( 'delete in CiviContribute' ) ) { +$permissions[] = CRM_Core_Permission::DELETE; +} +$mask = CRM_Core_Action::mask( $permissions ); + +$qfKey = $this->_key; +$componentId = $componentContext = null; +if ( $this->_context != 'contribute' ) { +$qfKey= CRM_Utils_Request::retrieve( 'key', 'String', CRM_Core_DAO::$_nullObject ); +$componentId = CRM_Utils_Request::retrieve( 'id', 'Positive', CRM_Core_DAO::$_nullObject ); +$componentAction = CRM_Utils_Request::retrieve( 'action', 'String', CRM_Core_DAO::$_nullObject ); +$componentContext = CRM_Utils_Request::retrieve( 'compContext', 'String', CRM_Core_DAO::$_nullObject ); + +if ( ! $componentContext && + $this->_compContext ) { +$componentContext = $this->_compContext; +$qfKey = CRM_Utils_Request::retrieve( 'qfKey', 'String', CRM_Core_DAO::$_nullObject, null, false, 'REQUEST' ); +} +} + +// get all contribution status +$contributionStatuses = CRM_Core_OptionGroup::values( 'contribution_status', + false, false, false, null, 'name', false ); + +//get all campaigns. +$allCampaigns = CRM_Campaign_BAO_Campaign::getCampaigns( null, null, false, false, false, true ); + + +$current_contact = FALSE; +while ($result->fetch()) +{ +#dpm($result); +$contact_row = array(); +$contribution_row = array(); +if ($result->contact_id != $current_contact) +{ +$current_contact = $result->contact_id; +foreach (self::$contact_properties as $property) +{ +if (
[MediaWiki-commits] [Gerrit] More core prequel for Amazon - change (wikimedia...PaymentsListeners)
Mwalker has submitted this change and it was merged. Change subject: More core prequel for Amazon .. More core prequel for Amazon Change-Id: I4f1e8ad97b9c1775b4cff76a1147f626e6e625aa --- M SmashPig/Core/Http/Request.php M SmashPig/Core/Listeners/ListenerBase.php M SmashPig/Core/Listeners/RestListener.php M SmashPig/Core/Messages/ListenerMessage.php 4 files changed, 29 insertions(+), 11 deletions(-) Approvals: Mwalker: Verified; Looks good to me, approved diff --git a/SmashPig/Core/Http/Request.php b/SmashPig/Core/Http/Request.php index bae378e..c54657b 100644 --- a/SmashPig/Core/Http/Request.php +++ b/SmashPig/Core/Http/Request.php @@ -5,7 +5,21 @@ } +/** + * Get post data without interpretation + * + * @return string + */ public function getRawPostData() { return file_get_contents( 'php://input' ); } + +/** + * Return all GET/POST/COOKIE data as an associative array + * + * @return array + */ +public function getValues() { +return $_REQUEST; +} } diff --git a/SmashPig/Core/Listeners/ListenerBase.php b/SmashPig/Core/Listeners/ListenerBase.php index ab681c7..bab03b3 100644 --- a/SmashPig/Core/Listeners/ListenerBase.php +++ b/SmashPig/Core/Listeners/ListenerBase.php @@ -133,7 +133,7 @@ return false; } } catch ( \Exception $ex ) { - + Logger::error( 'Failed message security check: ' . $ex->getMessage() ); } // We caught exceptions: therefore the message was not correctly processed. diff --git a/SmashPig/Core/Listeners/RestListener.php b/SmashPig/Core/Listeners/RestListener.php index 1520c52..a13e5bf 100644 --- a/SmashPig/Core/Listeners/RestListener.php +++ b/SmashPig/Core/Listeners/RestListener.php @@ -16,9 +16,12 @@ if ( is_array( $msgs ) ) { foreach ( $msgs as $msg ) { -$this->pendingStore->add_message( $msg ); +//FIXME: this looks like an elaborate try-catch. If there's +//a fatal exception, the remaining messages are toast anyway, +//so we should... do something different here. +$this->pendingStore->addObject( $msg ); if ( $this->processMessage( $msg ) ) { -$this->pendingStore->remove_message( $msg ); +$this->pendingStore->removeObjects( $msg ); } } } @@ -44,17 +47,17 @@ } /** - * Parse the raw data from the web request and turn it into an array of message objects. This - * function should not return an exception unless the configuration data is malformed. If an - * individual message element in the envelope is malformed this function should log it and - * continue as normal. + * Parse the web request and turn it into an array of message objects. * - * @param string $data Raw web-request data + * This function should not throw an exception strictly caused by message + * contents. If an individual message in the envelope is malformed, this + * function should log it and continue as normal. + * + * @param Request $request Raw web-request * * @throws ListenerConfigException - * @throws ListenerDataException * - * @return mixed Array of @see Message + * @return array of @see Message */ abstract protected function parseEnvelope( Request $request ); diff --git a/SmashPig/Core/Messages/ListenerMessage.php b/SmashPig/Core/Messages/ListenerMessage.php index 2dd381b..d6674ea 100644 --- a/SmashPig/Core/Messages/ListenerMessage.php +++ b/SmashPig/Core/Messages/ListenerMessage.php @@ -1,5 +1,6 @@ execute( $this ) ) { Logger::info( "Action {$actionClassName} did not execute properly, will re-queue." ); -- To view, visit https://gerrit.wikimedia.org/r/61923 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4f1e8ad97b9c1775b4cff76a1147f626e6e625aa Gerrit-PatchSet: 2 Gerrit-Project: wikimedia/fundraising/PaymentsListeners Gerrit-Branch: master Gerrit-Owner: Adamw Gerrit-Reviewer: Mwalker Gerrit-Reviewer: Siebrand ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] when response is REFUSED, operations=null - change (wikimedia...PaymentsListeners)
Mwalker has submitted this change and it was merged. Change subject: when response is REFUSED, operations=null .. when response is REFUSED, operations=null Change-Id: I90054bd914ab53b5376b84874a24f031bec3aa22 --- M SmashPig/PaymentProviders/Adyen/ExpatriatedMessages/Authorisation.php 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Mwalker: Verified; Looks good to me, approved diff --git a/SmashPig/PaymentProviders/Adyen/ExpatriatedMessages/Authorisation.php b/SmashPig/PaymentProviders/Adyen/ExpatriatedMessages/Authorisation.php index 4af9606..edeac2b 100644 --- a/SmashPig/PaymentProviders/Adyen/ExpatriatedMessages/Authorisation.php +++ b/SmashPig/PaymentProviders/Adyen/ExpatriatedMessages/Authorisation.php @@ -28,10 +28,10 @@ $this->paymentMethod = $msgObj->paymentMethod; - if ( is_array( $msgObj->operations->string ) ) { - $this->operations = $msgObj->operations->string; + if ( $msgObj->operations ) { + $this->operations = (array)$msgObj->operations->string; } else { - $this->operations = array( $msgObj->operations->string ); + $this->operations = array(); } $this->reason = $msgObj->reason; -- To view, visit https://gerrit.wikimedia.org/r/61497 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I90054bd914ab53b5376b84874a24f031bec3aa22 Gerrit-PatchSet: 2 Gerrit-Project: wikimedia/fundraising/PaymentsListeners Gerrit-Branch: master Gerrit-Owner: Adamw Gerrit-Reviewer: Mwalker Gerrit-Reviewer: Siebrand ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] array_walk is sad about array cast. It breaks pass-by-refer... - change (wikimedia...PaymentsListeners)
Mwalker has submitted this change and it was merged. Change subject: array_walk is sad about array cast. It breaks pass-by-reference. .. array_walk is sad about array cast. It breaks pass-by-reference. Change-Id: Iac68ec47c398a6c2b82115fa45b2204c74a408f5 --- M SmashPig/Core/MailHandler.php 1 file changed, 12 insertions(+), 5 deletions(-) Approvals: Mwalker: Verified; Looks good to me, approved diff --git a/SmashPig/Core/MailHandler.php b/SmashPig/Core/MailHandler.php index 97829c6..634f53e 100644 --- a/SmashPig/Core/MailHandler.php +++ b/SmashPig/Core/MailHandler.php @@ -6,6 +6,7 @@ * Abstraction on top of whatever email client we're actually using. For the moment that's * PHPMailer on top of sendmail. The PHPMailer library must be in the include path. Use the * configuration node 'include-paths' to do this. + * FIXME: should be more explicit, phpmailer-include-path or something */ class MailHandler { @@ -67,11 +68,16 @@ $mailer = static::mailbaseFactory(); try { - array_walk( (array)$to, function ( $value, $key ) use ( $mailer ) { $mailer->AddAddress( $value ); } ); - array_walk( (array)$cc, function ( $value, $key ) use ( $mailer ) { $mailer->AddCC( $value ); } ); - array_walk( (array)$bcc, function ( $value, $key ) use ( $mailer ) { $mailer->AddBCC( $value ); } ); + $to = (array)$to; + $cc = (array)$cc; + $bcc = (array)$bcc; + $archives = (array)$config->val( 'email/archive-addresses' ); + + array_walk( $to, function ( $value, $key ) use ( $mailer ) { $mailer->AddAddress( $value ); } ); + array_walk( $cc, function ( $value, $key ) use ( $mailer ) { $mailer->AddCC( $value ); } ); + array_walk( $bcc, function ( $value, $key ) use ( $mailer ) { $mailer->AddBCC( $value ); } ); array_walk( - (array)$config->val( 'email/archive-addresses' ), + $archives, function ( $value, $key ) use ( $mailer ) { $mailer->AddBCC( $value ); } ); @@ -118,7 +124,8 @@ $mailer->Send(); } catch (\phpmailerException $ex) { - Logger::warning( "Could not send email to {$to}. PHP Mailer had exception.", null, $ex ); + $toStr = implode( ", ", $to ); + Logger::warning( "Could not send email to {$toStr}. PHP Mailer had exception.", null, $ex ); return false; } -- To view, visit https://gerrit.wikimedia.org/r/61493 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iac68ec47c398a6c2b82115fa45b2204c74a408f5 Gerrit-PatchSet: 4 Gerrit-Project: wikimedia/fundraising/PaymentsListeners Gerrit-Branch: master Gerrit-Owner: Adamw Gerrit-Reviewer: Mwalker ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] WIP: Story 483: Show intermediate copyvio/scope message - change (mediawiki...MobileFrontend)
JGonera has uploaded a new change for review. https://gerrit.wikimedia.org/r/62129 Change subject: WIP: Story 483: Show intermediate copyvio/scope message .. WIP: Story 483: Show intermediate copyvio/scope message work in progress * Add NagOverlay for showing copyvio/intermediate messages * Rename CopyrightOverlay to LearnMoreOverlay and reuse it Change-Id: I3ae653ac2777e19843182b420d33cd8f3420fa29 --- M MobileFrontend.i18n.php M MobileFrontend.php M javascripts/modules/mf-photo.js M less/common/mf-navigation.less M less/mf-mixins.less M less/modules/mf-photo.less M stylesheets/common/mf-navigation.css A stylesheets/modules/images/confirm.png M stylesheets/modules/mf-photo.css A templates/overlays/learnMore.html D templates/overlays/photoCopyrightDialog.html A templates/photoNag.html 12 files changed, 327 insertions(+), 69 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/29/62129/1 diff --git a/MobileFrontend.i18n.php b/MobileFrontend.i18n.php index 6ef12bf..921f256 100644 --- a/MobileFrontend.i18n.php +++ b/MobileFrontend.i18n.php @@ -209,6 +209,12 @@ 'mobile-frontend-photo-ownership-bullet-one' => 'We can only accept photos that you took yourself. Please do not upload images you found somewhere else on the Internet.', 'mobile-frontend-photo-ownership-bullet-two' => 'Copyrighted and inappropriate images will be removed.', 'mobile-frontend-photo-ownership-bullet-three' => 'Your uploads are released under a license that allows anyone to reuse them for free.', + 'mobile-frontend-photo-nag-1-bullet-1-heading' => 'I\'m not violating copyright', + 'mobile-frontend-photo-nag-1-bullet-1-text' => "It is '''not''' a photo I found on the Internet. It is my own work.", + 'mobile-frontend-photo-nag-1-bullet-2-heading' => 'This is not a personal photo', + 'mobile-frontend-photo-nag-1-bullet-2-text' => 'And it can help illustrate an important topic.', + 'mobile-frontend-photo-nag-2-bullet-1-heading' => 'Positively not violating copyright, and this photo is educational.', + 'mobile-frontend-photo-nag-3-bullet-1-heading' => 'I understand what to upload. Don’t show this message again.', 'mobile-frontend-image-uploading-wait' => 'Uploading image, please wait.', 'mobile-frontend-image-uploading-long' => 'Image still uploading! Thanks for your patience.', 'mobile-frontend-image-uploading-cancel' => 'Cancel if this is taking too long.', @@ -563,6 +569,12 @@ 'mobile-frontend-photo-ownership-bullet-one' => 'Explain to users that photos must belong to them', 'mobile-frontend-photo-ownership-bullet-two' => 'Explain to users their photos risk deletion.', 'mobile-frontend-photo-ownership-bullet-three' => 'Explain the consequences of reuse to a photo donation', + 'mobile-frontend-photo-nag-1-bullet-1-heading' => 'Explain to users that the photo they upload can\'t violate copyrights.', + 'mobile-frontend-photo-nag-1-bullet-1-text' => "Explain to users that the photo they upload must be their own work.", + 'mobile-frontend-photo-nag-1-bullet-2-heading' => 'Explain to users that the photo they upload can\'t be a self-portrait or a portrait of relatives or friends.', + 'mobile-frontend-photo-nag-1-bullet-2-text' => 'Explain to users that the photo they upload should help illustrate an important topic.', + 'mobile-frontend-photo-nag-2-bullet-1-heading' => 'Explain to users that the photo can\'t violate copyrights and must be educational (user\'s second upload).', + 'mobile-frontend-photo-nag-3-bullet-1-heading' => 'A confirmation that the user understands what they are allowed to upload (user\'s third upload).', 'mobile-frontend-image-uploading-wait' => 'Text that displays whilst an image is being uploaded', 'mobile-frontend-image-uploading-long' => 'Text that displays whilst an image is taking long to upload', 'mobile-frontend-image-uploading-cancel' => 'Text saying that user can cancel the image upload. Word "cancel" should be a link.', diff --git a/MobileFrontend.php b/MobileFrontend.php index 78e2b6e..6bf9870 100644 --- a/MobileFrontend.php +++ b/MobileFrontend.php @@ -256,6 +256,12 @@ 'messages' => array( // mf-photo.js 'mobile-frontend-photo-license' => array( 'parse' ), + 'mobile-frontend-photo-nag-1-bullet-1-heading', + 'mobile-frontend-photo-nag-1-bullet-1-text' => array( 'parse' ), + 'mobile-frontend-photo-nag-1-bullet-2-heading', + 'mobile-frontend-photo-nag-1-bullet-2-text', + 'mobile-frontend-photo-nag-2-bullet-1-heading', + 'mobile-frontend-photo-nag-3-bullet-1-heading', ), 'localBasePath' => $localBasePath, 'localTemplateBasePath' => $localBasePath . '
[MediaWiki-commits] [Gerrit] Disable autocomplete for Simple, Fancy, Math, and Questy. - change (mediawiki...ConfirmEdit)
Mattflaschen has uploaded a new change for review. https://gerrit.wikimedia.org/r/62128 Change subject: Disable autocomplete for Simple, Fancy, Math, and Questy. .. Disable autocomplete for Simple, Fancy, Math, and Questy. Bug: 48030 Change-Id: Id0eed4797ab5649fc5bb965b5d94fba21f120d9f --- M Captcha.php M FancyCaptcha.class.php M MathCaptcha.class.php M QuestyCaptcha.class.php 4 files changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ConfirmEdit refs/changes/28/62128/1 diff --git a/Captcha.php b/Captcha.php index 2d6afbf..9967dd4 100644 --- a/Captcha.php +++ b/Captcha.php @@ -42,6 +42,7 @@ Xml::element( 'input', array( 'name' => 'wpCaptchaWord', 'id' => 'wpCaptchaWord', + 'autocomplete' => 'off', 'tabindex' => 1 ) ) . // tab in before the edit textarea "\n" . Xml::element( 'input', array( diff --git a/FancyCaptcha.class.php b/FancyCaptcha.class.php index 128dacf..936f9d0 100644 --- a/FancyCaptcha.class.php +++ b/FancyCaptcha.class.php @@ -131,6 +131,7 @@ 'id' => 'wpCaptchaWord', 'type' => 'text', 'size' => '12', // max_length in captcha.py plus fudge factor + 'autocomplete' => 'off', 'autocorrect' => 'off', 'autocapitalize' => 'off', 'required' => 'required', diff --git a/MathCaptcha.class.php b/MathCaptcha.class.php index 13a79a9..fdb6d1f 100644 --- a/MathCaptcha.class.php +++ b/MathCaptcha.class.php @@ -22,7 +22,7 @@ $index = $this->storeCaptcha( array( 'answer' => $answer ) ); $form = '' . $this->fetchMath( $sum ) . ''; - $form .= '' . Html::input( 'wpCaptchaWord', false, false, array( 'tabindex' => '1', 'required' ) ) . ''; + $form .= '' . Html::input( 'wpCaptchaWord', false, false, array( 'tabindex' => '1', 'autocomplete' => 'off', 'required' ) ) . ''; $form .= Html::hidden( 'wpCaptchaId', $index ); return $form; } diff --git a/QuestyCaptcha.class.php b/QuestyCaptcha.class.php index 93954f1..3acfa46 100644 --- a/QuestyCaptcha.class.php +++ b/QuestyCaptcha.class.php @@ -44,6 +44,7 @@ 'name' => 'wpCaptchaWord', 'id' => 'wpCaptchaWord', 'required', + 'autocomplete' => 'off', 'tabindex' => 1 ) ) . // tab in before the edit textarea "\n" . Xml::element( 'input', array( -- To view, visit https://gerrit.wikimedia.org/r/62128 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id0eed4797ab5649fc5bb965b5d94fba21f120d9f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ConfirmEdit Gerrit-Branch: master Gerrit-Owner: Mattflaschen ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Support api.php?action=query&meta=userinfo&uiprop=hasmsg - change (mediawiki...Echo)
Alex Monk has uploaded a new change for review. https://gerrit.wikimedia.org/r/62127 Change subject: Support api.php?action=query&meta=userinfo&uiprop=hasmsg .. Support api.php?action=query&meta=userinfo&uiprop=hasmsg Depends on core change Icad7252b Bug: 47962 Change-Id: Ie653b3ace907833f5f9fa32b278583c022af4cc5 --- M Echo.php M Hooks.php 2 files changed, 12 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo refs/changes/27/62127/1 diff --git a/Echo.php b/Echo.php index d2c0578..83345e0 100644 --- a/Echo.php +++ b/Echo.php @@ -96,6 +96,7 @@ $wgHooks['UserRights'][] = 'EchoHooks::onUserRights'; $wgHooks['UserLoadOptions'][] = 'EchoHooks::onUserLoadOptions'; $wgHooks['UserSaveOptions'][] = 'EchoHooks::onUserSaveOptions'; +$wgHooks['UserHasNewMessages'][] = 'EchoHooks::onUserHasNewMessages'; // Extension initialization $wgExtensionFunctions[] = 'EchoHooks::initEchoExtension'; diff --git a/Hooks.php b/Hooks.php index a0f1bd9..5458811 100644 --- a/Hooks.php +++ b/Hooks.php @@ -776,4 +776,15 @@ } return true; } + + /** +* Handler for UserHasNewMessages hook. +* @see http://www.mediawiki.org/wiki/Manual:Hooks/UserHasNewMessages +* @param $user User User object +* @param &$hasMessage bool Whether the user has messages or not. +*/ + public static function onUserHasNewMessages( $user, &$hasMessage ) { + $hasMessage = EchoNotificationController::getFormattedNotificationCount( $user ); + return true; + } } -- To view, visit https://gerrit.wikimedia.org/r/62127 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie653b3ace907833f5f9fa32b278583c022af4cc5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: Alex Monk ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add hook so extensions can say whether or not the user has n... - change (mediawiki/core)
Alex Monk has uploaded a new change for review. https://gerrit.wikimedia.org/r/62126 Change subject: Add hook so extensions can say whether or not the user has new messages .. Add hook so extensions can say whether or not the user has new messages Bug: 47962 Change-Id: Icad7252b230c0b413619da06f04a65c26eedebfd --- M docs/hooks.txt M includes/api/ApiQueryUserInfo.php 2 files changed, 11 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/26/62126/1 diff --git a/docs/hooks.txt b/docs/hooks.txt index 0b835c2..196595b 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -2550,6 +2550,11 @@ $user: User to get rights for &$rights: Current rights +'UserHasNewMessages': Called in ApiQueryUserInfo::getCurrentUserInfo if the +'hasmsg' parameter has been set. +$user: User object. +&$hasMessages: Whether the user has new messages or not. + 'UserIsBlockedFrom': Check if a user is blocked from a specific page (for specific block exemptions). $user: User in question diff --git a/includes/api/ApiQueryUserInfo.php b/includes/api/ApiQueryUserInfo.php index 8e65b40..3ac4a87 100644 --- a/includes/api/ApiQueryUserInfo.php +++ b/includes/api/ApiQueryUserInfo.php @@ -71,8 +71,12 @@ } } - if ( isset( $this->prop['hasmsg'] ) && $user->getNewtalk() ) { - $vals['messages'] = ''; + if ( isset( $this->prop['hasmsg'] ) ) { + $hasMessages = $user->getNewtalk(); + wfRunHooks( 'UserHasNewMessages', array( $user, &$hasMessages ) ); + if ( $hasMessages ) { + $vals['messages'] = ''; + } } if ( isset( $this->prop['groups'] ) ) { -- To view, visit https://gerrit.wikimedia.org/r/62126 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icad7252b230c0b413619da06f04a65c26eedebfd Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Alex Monk ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add favicon.php - change (integration/docroot)
Krinkle has submitted this change and it was merged. Change subject: Add favicon.php .. Add favicon.php Change-Id: I17890b37771505673df4ffab3f281b93908463bc --- A org/wikimedia/doc/favicon.php A org/wikimedia/integration/favicon.php A shared/favicon.php 3 files changed, 39 insertions(+), 0 deletions(-) Approvals: Krinkle: Verified; Looks good to me, approved diff --git a/org/wikimedia/doc/favicon.php b/org/wikimedia/doc/favicon.php new file mode 12 index 000..dcd58f6 --- /dev/null +++ b/org/wikimedia/doc/favicon.php @@ -0,0 +1 @@ +../../../shared/favicon.php \ No newline at end of file diff --git a/org/wikimedia/integration/favicon.php b/org/wikimedia/integration/favicon.php new file mode 12 index 000..dcd58f6 --- /dev/null +++ b/org/wikimedia/integration/favicon.php @@ -0,0 +1 @@ +../../../shared/favicon.php \ No newline at end of file diff --git a/shared/favicon.php b/shared/favicon.php new file mode 100644 index 000..62809ef --- /dev/null +++ b/shared/favicon.php @@ -0,0 +1,37 @@ +\n\n" . htmlspecialchars( $text ) . "\n\n"; + exit; +} + +function streamFavicon( $url ) { + $content = file_get_contents( $url ); + if ( !$content ) { + faviconErrorText( "Failed to fetch url: $url" ); + } + $resp = parseRespHeaders( $http_response_header ); + if ( !isset( $resp['content-length'] ) || !isset( $resp['content-length'] ) ) { + faviconErrorText( "Missing content headers on url: $url" ); + } + header( 'Content-Length: ' . $resp['content-length'] ); + header( 'Content-Type: ' . $resp['content-type'] ); + header( 'Cache-Control: public' ); + header( 'Expires: ' . gmdate( 'r', time() + 86400 ) ); + echo $content; + exit; +} + +streamFavicon( 'http://bits.wikimedia.org/favicon/wmf.ico' ); -- To view, visit https://gerrit.wikimedia.org/r/62124 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I17890b37771505673df4ffab3f281b93908463bc Gerrit-PatchSet: 1 Gerrit-Project: integration/docroot Gerrit-Branch: master Gerrit-Owner: Krinkle Gerrit-Reviewer: Hashar Gerrit-Reviewer: Krinkle ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] contint: Add rewrite rules for favicon.ico to favicon.php - change (operations/puppet)
Krinkle has uploaded a new change for review. https://gerrit.wikimedia.org/r/62125 Change subject: contint: Add rewrite rules for favicon.ico to favicon.php .. contint: Add rewrite rules for favicon.ico to favicon.php See I17890b3777150567 in integration/docroot.git Change-Id: Id483de4f8963840e0dd8ab3091de2d3e19202901 --- M modules/contint/files/apache/doc.wikimedia.org M modules/contint/files/apache/integration.wikimedia.org 2 files changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/25/62125/1 diff --git a/modules/contint/files/apache/doc.wikimedia.org b/modules/contint/files/apache/doc.wikimedia.org index 4ce7c06..f6f7000 100644 --- a/modules/contint/files/apache/doc.wikimedia.org +++ b/modules/contint/files/apache/doc.wikimedia.org @@ -45,6 +45,9 @@ DocumentRoot /srv/org/wikimedia/doc + # Favicon proxy + RewriteRule ^/favicon\.ico$ /favicon.php [L] + LogLevel warn ErrorLog /var/log/apache2/doc_error.log CustomLog /var/log/apache2/doc_access.log vhost_combined diff --git a/modules/contint/files/apache/integration.wikimedia.org b/modules/contint/files/apache/integration.wikimedia.org index 6fd883f..ff716a4 100644 --- a/modules/contint/files/apache/integration.wikimedia.org +++ b/modules/contint/files/apache/integration.wikimedia.org @@ -22,6 +22,9 @@ DocumentRoot /srv/org/wikimedia/integration + # Favicon proxy + RewriteRule ^/favicon\.ico$ /favicon.php [L] + SSLEngine on SSLCertificateFile /etc/ssl/certs/star.wikimedia.org.pem SSLCertificateKeyFile /etc/ssl/private/star.wikimedia.org.key -- To view, visit https://gerrit.wikimedia.org/r/62125 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id483de4f8963840e0dd8ab3091de2d3e19202901 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Krinkle ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Cache result of Language::isValidCode() to avoid regex proce... - change (mediawiki/core)
Asher has submitted this change and it was merged. Change subject: Cache result of Language::isValidCode() to avoid regex processing .. Cache result of Language::isValidCode() to avoid regex processing The function can be called over 2000 times in generating a page. This way is significantly faster even for random invalid codes. For real use it should avoid the regex most of the time with no change in behavior. Change-Id: I9fcbae1770be0d3f405d3d12254c11943b0d5f46 --- M languages/Language.php 1 file changed, 11 insertions(+), 5 deletions(-) Approvals: Asher: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/languages/Language.php b/languages/Language.php index b9201d7..84e7f37 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -326,13 +326,19 @@ * @return bool */ public static function isValidCode( $code ) { - return - // People think language codes are html safe, so enforce it. - // Ideally we should only allow a-zA-Z0-9- - // but, .+ and other chars are often used for {{int:}} hacks - // see bugs 37564, 37587, 36938 + static $cache = array(); + if( isset( $cache[$code] ) ) { + return $cache[$code]; + } + // People think language codes are html safe, so enforce it. + // Ideally we should only allow a-zA-Z0-9- + // but, .+ and other chars are often used for {{int:}} hacks + // see bugs 37564, 37587, 36938 + $return = strcspn( $code, ":/\\\000&<>'\"" ) === strlen( $code ) && !preg_match( Title::getTitleInvalidRegex(), $code ); + $cache[ $code ] = $return; + return $return; } /** -- To view, visit https://gerrit.wikimedia.org/r/62123 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9fcbae1770be0d3f405d3d12254c11943b0d5f46 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Lwelling Gerrit-Reviewer: Asher Gerrit-Reviewer: jenkins-bot Gerrit-Reviewer: preilly ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add favicon.php - change (integration/docroot)
Krinkle has uploaded a new change for review. https://gerrit.wikimedia.org/r/62124 Change subject: Add favicon.php .. Add favicon.php Change-Id: I17890b37771505673df4ffab3f281b93908463bc --- A org/wikimedia/doc/favicon.php A org/wikimedia/integration/favicon.php A shared/favicon.php 3 files changed, 39 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/docroot refs/changes/24/62124/1 diff --git a/org/wikimedia/doc/favicon.php b/org/wikimedia/doc/favicon.php new file mode 12 index 000..dcd58f6 --- /dev/null +++ b/org/wikimedia/doc/favicon.php @@ -0,0 +1 @@ +../../../shared/favicon.php \ No newline at end of file diff --git a/org/wikimedia/integration/favicon.php b/org/wikimedia/integration/favicon.php new file mode 12 index 000..dcd58f6 --- /dev/null +++ b/org/wikimedia/integration/favicon.php @@ -0,0 +1 @@ +../../../shared/favicon.php \ No newline at end of file diff --git a/shared/favicon.php b/shared/favicon.php new file mode 100644 index 000..62809ef --- /dev/null +++ b/shared/favicon.php @@ -0,0 +1,37 @@ +\n\n" . htmlspecialchars( $text ) . "\n\n"; + exit; +} + +function streamFavicon( $url ) { + $content = file_get_contents( $url ); + if ( !$content ) { + faviconErrorText( "Failed to fetch url: $url" ); + } + $resp = parseRespHeaders( $http_response_header ); + if ( !isset( $resp['content-length'] ) || !isset( $resp['content-length'] ) ) { + faviconErrorText( "Missing content headers on url: $url" ); + } + header( 'Content-Length: ' . $resp['content-length'] ); + header( 'Content-Type: ' . $resp['content-type'] ); + header( 'Cache-Control: public' ); + header( 'Expires: ' . gmdate( 'r', time() + 86400 ) ); + echo $content; + exit; +} + +streamFavicon( 'http://bits.wikimedia.org/favicon/wmf.ico' ); -- To view, visit https://gerrit.wikimedia.org/r/62124 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I17890b37771505673df4ffab3f281b93908463bc Gerrit-PatchSet: 1 Gerrit-Project: integration/docroot 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] Cache result of Language::isValidCode() to avoid regex proce... - change (mediawiki/core)
Lwelling has uploaded a new change for review. https://gerrit.wikimedia.org/r/62123 Change subject: Cache result of Language::isValidCode() to avoid regex processing .. Cache result of Language::isValidCode() to avoid regex processing The function can be called over 2000 times in generating a page. This way is significantly faster even for random invalid codes. For real use it should avoid the regex most of the time with no change in behavior. Change-Id: I9fcbae1770be0d3f405d3d12254c11943b0d5f46 --- M languages/Language.php 1 file changed, 7 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/23/62123/1 diff --git a/languages/Language.php b/languages/Language.php index b9201d7..4aa7e32 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -326,13 +326,19 @@ * @return bool */ public static function isValidCode( $code ) { - return + static $cache = array(); + if(isset($cache[ $code ] ) ) { + return $cache[ $code ]; + } + $return = // People think language codes are html safe, so enforce it. // Ideally we should only allow a-zA-Z0-9- // but, .+ and other chars are often used for {{int:}} hacks // see bugs 37564, 37587, 36938 strcspn( $code, ":/\\\000&<>'\"" ) === strlen( $code ) && !preg_match( Title::getTitleInvalidRegex(), $code ); + $cache[ $code ] = $return; + return $return; } /** -- To view, visit https://gerrit.wikimedia.org/r/62123 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9fcbae1770be0d3f405d3d12254c11943b0d5f46 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Lwelling ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Temporary fix for bug 47954 - keep section link in edit summary - change (mediawiki...Echo)
Kaldari has uploaded a new change for review. https://gerrit.wikimedia.org/r/62122 Change subject: Temporary fix for bug 47954 - keep section link in edit summary .. Temporary fix for bug 47954 - keep section link in edit summary Since talk page edits don't necessary belong to a seciton (or may involve several sections), we'll need to be more clever in the DiscussionParser to extract it for the long term solution. This temporary solution will expose any section link in the edit summary payload so that people can jump straight to the section if they want to (same as existing behavior in the archive version). Bug: 47954 Change-Id: I2745ba194ba1f9b5b7c446588da6586e87d35b31 --- M formatters/NotificationFormatter.php 1 file changed, 2 insertions(+), 18 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo refs/changes/22/62122/1 diff --git a/formatters/NotificationFormatter.php b/formatters/NotificationFormatter.php index e255850..8dc8c3e 100644 --- a/formatters/NotificationFormatter.php +++ b/formatters/NotificationFormatter.php @@ -137,24 +137,8 @@ $summary = $revision->getComment( Revision::FOR_THIS_USER, $user ); if ( $this->outputFormat === 'html' || $this->outputFormat === 'flyout' ) { - if ( $this->outputFormat === 'html' ) { - // Parse the edit summary - $summary = Linker::formatComment( $summary, $revision->getTitle() ); - } else { - // Strip wikitext from the edit summary and manually convert autocomments - $summary = FeedItem::stripComment( $summary ); - $summary = trim( htmlspecialchars( $summary ) ); - // Convert section titles to proper HTML - preg_match( "!(.*)/\*\s*(.*?)\s*\*/(.*)!", $summary, $matches ); - if ( $matches ) { - $section = $matches[2]; - if ( $matches[3] ) { - // Add a colon after the section name - $section .= wfMessage( 'colon-separator' )->inContentLanguage()->escaped(); - } - $summary = $matches[1] . "" . $section . "" . $matches[3]; - } - } + // Parse the edit summary + $summary = Linker::formatComment( $summary, $revision->getTitle() ); if ( $summary ) { $summary = wfMessage( 'echo-quotation-marks', $summary )->inContentLanguage()->plain(); $summary = Xml::tags( 'span', array( 'class' => 'comment' ), $summary ); -- To view, visit https://gerrit.wikimedia.org/r/62122 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2745ba194ba1f9b5b7c446588da6586e87d35b31 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: Kaldari ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix the Parsoid image tests - change (mediawiki/core)
MarkTraceur has uploaded a new change for review. https://gerrit.wikimedia.org/r/62121 Change subject: Fix the Parsoid image tests .. Fix the Parsoid image tests Needed to fix these up in order to get them running right on the newer versions of the Parsoid test-runner. Also, there are some new fails that I didn't play with, mostly because they aren't related to changes in the test runner from what I could see. I'm willing to accept that they are and re-fix them, but I'd really like to move on to the image tests' fixes now. Change-Id: I657e4869fb0c2ae66d6732d28c6fc6645ad8e534 --- M tests/parser/parserTests.txt 1 file changed, 88 insertions(+), 64 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/21/62121/1 diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index f38d826..c934cbc 100644 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@ -729,7 +729,7 @@ !! test Italics and bold: other quote tests: (3,2,3,3) (parsoid) !! options -parsoid +parsoid=wt2html,wt2wt !! input '''this is about ''foo'''s family''' !! result @@ -2371,13 +2371,30 @@ !! test Definition Lists: Mixed Lists: Test 11 (parsoid) !! options -parsoid +parsoid=wt2html,wt2wt !! input *#*#;*;;foo :bar *#*#;boo :baz !! result -foo bar -boo baz + + + + + + + + + + + + + + + +foo +bar +boo +baz !! end @@ -2402,11 +2419,27 @@ !! test Definition Lists: Weird Ones: Test 1 (parsoid) !! options -parsoid +parsoid=wt2html,wt2wt !! input *#;*::;; foo : bar (who uses this?) !! result - foo bar (who uses this?) + + + + + + + + + + + + + + + + foo + bar (who uses this?) !! end ### @@ -6557,24 +6590,24 @@ Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span) (PHP parser generates misnested html) !! options -parsoid +parsoid=wt2html,wt2wt !!input {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}} !!result -abcde +abcde !!end !!test Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div) (PHP parser generates misnested html) !! options -parsoid +parsoid=wt2html,wt2wt !!input {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}} !!result -a -bcd -e +a +bcd +e !!end !!test @@ -6597,10 +6630,10 @@ |bar |} !!result - -foo -bar - + + + +foobar !!end !!test @@ -13604,10 +13637,7 @@ {{echo|#a}} {{echo|:a}} !!result -*a -#a -:a - +*a #a :a !!end The following section of tests are primarily to test @@ -13643,11 +13673,9 @@ =foo''a''= !! result -=foo= - =foo= -=foo= -=fooa= - +=foo= + =foo= =foo= +=fooa= !!end !! test @@ -13662,12 +13690,12 @@ ==foo== ===foo=== !! result -=foo= -=foo= -=foo= -=foo= -=foo= -=foo= +=foo= +=foo= +=foo= +=foo= +=foo= +=foo= !!end !! test @@ -13694,7 +13722,7 @@ !! input =='''bold'''foo== !! result -=boldfoo= +=boldfoo= !!end !! test @@ -13718,8 +13746,7 @@ =foo foo= =foo= -= - += !!end !! test @@ -13765,9 +13792,7 @@ =h1= =h1= !! result -=h1= - =h1= - +=h1= =h1= !!end --- Lists --- @@ -13880,12 +13905,12 @@ *[[Foo]]: bar !! result -foo*bar - -foo*bar - -Foo: bar - + +foo*bar + +foo*bar + +Foo: bar !!end !! test @@ -13925,8 +13950,7 @@ !! input *foo !! result -*foo - +*foo !!end !! test @@ -14025,9 +14049,9 @@ |} !! result -foo|bar - - + + +foo|bar !! end !! test @@ -14041,10 +14065,10 @@ |} !! result -foo||bar -itfoo||bar - - + + +foo||bar +itfoo||bar !! end !! test @@ -14087,9 +14111,8 @@ |} !! result -foo!!bar - - + +foo!!bar !! end !! test @@ -14102,9 +14125,8 @@ |} !! result -foo||bar - - + +foo||bar !! end !! test @@ -14119,10 +14141,11 @@ |-bar |} !! result - + + -bar --bar - + +-bar !! end !! test @@ -14137,10 +14160,11 @@ |+bar |} !! result - + + +bar -+bar - + ++bar !! end !! test -- To view, visit https://gerrit.wikimedia.org/r/62121 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I657e4869fb0c2ae66d6732d28c6fc6645ad8e534 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: MarkTraceur ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] multiversion: hostname to dbname basic tests - change (operations/mediawiki-config)
Aaron Schulz has submitted this change and it was merged. Change subject: multiversion: hostname to dbname basic tests .. multiversion: hostname to dbname basic tests Change-Id: If9dcfaa0c6a1b5b929f8cc3de85fec0fe4d6e799 --- A tests/multiversion/MWMultiVersionTest.php 1 file changed, 28 insertions(+), 0 deletions(-) Approvals: Aaron Schulz: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/multiversion/MWMultiVersionTest.php b/tests/multiversion/MWMultiVersionTest.php new file mode 100644 index 000..40c1851 --- /dev/null +++ b/tests/multiversion/MWMultiVersionTest.php @@ -0,0 +1,28 @@ +assertEquals( $expectedDB, $version->getDatabase() ); + + MWMultiversion::destroySingleton(); + } + + function provideServerNameAndDocRoot() { + $root = '/usr/local/apache/common/docroot'; + + return array( + // (expected DB, server name, [doc root[, message]] + array( 'enwiki', 'en.wikipedia.org', "$root/en" ), + array( 'enwiki', 'en.wikipedia.beta.wmflabs.org', "$root/en" ), + array( 'wikidatawiki', 'wikidata.beta.wmflabs.org', "$root/wikidata" ), + ); + } + +} -- To view, visit https://gerrit.wikimedia.org/r/61426 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If9dcfaa0c6a1b5b929f8cc3de85fec0fe4d6e799 Gerrit-PatchSet: 2 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Hashar Gerrit-Reviewer: Aaron Schulz 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] add document root for iegcom wiki, copied from skel-1.5 (RT-... - change (operations/mediawiki-config)
Dzahn has submitted this change and it was merged. Change subject: add document root for iegcom wiki, copied from skel-1.5 (RT-5042) .. add document root for iegcom wiki, copied from skel-1.5 (RT-5042) Change-Id: I03e35b4041e90da511864a3acc9cf83e7b5a --- A docroot/iegcom/404.html A docroot/iegcom/503.html A docroot/iegcom/images A docroot/iegcom/robots.txt A docroot/iegcom/w 5 files changed, 5 insertions(+), 0 deletions(-) Approvals: Dzahn: Verified; Looks good to me, approved diff --git a/docroot/iegcom/404.html b/docroot/iegcom/404.html new file mode 12 index 000..d853aae --- /dev/null +++ b/docroot/iegcom/404.html @@ -0,0 +1 @@ +/apache/common/404.html \ No newline at end of file diff --git a/docroot/iegcom/503.html b/docroot/iegcom/503.html new file mode 12 index 000..7557fba --- /dev/null +++ b/docroot/iegcom/503.html @@ -0,0 +1 @@ +/apache/common/503.html \ No newline at end of file diff --git a/docroot/iegcom/images b/docroot/iegcom/images new file mode 12 index 000..646fba8 --- /dev/null +++ b/docroot/iegcom/images @@ -0,0 +1 @@ +/apache/common/images \ No newline at end of file diff --git a/docroot/iegcom/robots.txt b/docroot/iegcom/robots.txt new file mode 12 index 000..d281d8f --- /dev/null +++ b/docroot/iegcom/robots.txt @@ -0,0 +1 @@ +/apache/common/robots.txt \ No newline at end of file diff --git a/docroot/iegcom/w b/docroot/iegcom/w new file mode 12 index 000..e91fae3 --- /dev/null +++ b/docroot/iegcom/w @@ -0,0 +1 @@ +/apache/common/live-1.5 \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/62120 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I03e35b4041e90da511864a3acc9cf83e7b5a Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Dzahn Gerrit-Reviewer: Dzahn ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] add document root for iegcom wiki, copied from skel-1.5 (RT-... - change (operations/mediawiki-config)
Dzahn has uploaded a new change for review. https://gerrit.wikimedia.org/r/62120 Change subject: add document root for iegcom wiki, copied from skel-1.5 (RT-5042) .. add document root for iegcom wiki, copied from skel-1.5 (RT-5042) Change-Id: I03e35b4041e90da511864a3acc9cf83e7b5a --- A docroot/iegcom/404.html A docroot/iegcom/503.html A docroot/iegcom/images A docroot/iegcom/robots.txt A docroot/iegcom/w 5 files changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/20/62120/1 diff --git a/docroot/iegcom/404.html b/docroot/iegcom/404.html new file mode 12 index 000..d853aae --- /dev/null +++ b/docroot/iegcom/404.html @@ -0,0 +1 @@ +/apache/common/404.html \ No newline at end of file diff --git a/docroot/iegcom/503.html b/docroot/iegcom/503.html new file mode 12 index 000..7557fba --- /dev/null +++ b/docroot/iegcom/503.html @@ -0,0 +1 @@ +/apache/common/503.html \ No newline at end of file diff --git a/docroot/iegcom/images b/docroot/iegcom/images new file mode 12 index 000..646fba8 --- /dev/null +++ b/docroot/iegcom/images @@ -0,0 +1 @@ +/apache/common/images \ No newline at end of file diff --git a/docroot/iegcom/robots.txt b/docroot/iegcom/robots.txt new file mode 12 index 000..d281d8f --- /dev/null +++ b/docroot/iegcom/robots.txt @@ -0,0 +1 @@ +/apache/common/robots.txt \ No newline at end of file diff --git a/docroot/iegcom/w b/docroot/iegcom/w new file mode 12 index 000..e91fae3 --- /dev/null +++ b/docroot/iegcom/w @@ -0,0 +1 @@ +/apache/common/live-1.5 \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/62120 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I03e35b4041e90da511864a3acc9cf83e7b5a Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Dzahn ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Monobook: Remove unused file FF2Fixes.css - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Monobook: Remove unused file FF2Fixes.css .. Monobook: Remove unused file FF2Fixes.css As of Id8214c6a5 and Ia54dd738b (per bug 35906) we started blacklisting Firefox 2 from the additional resource loader. Though we haven't supported Firefox 2 for several years, Monobook has had this patch for years and we never removed it (cheap to maintain). Since wikibits.js is no longer being loaded in Firefox 2, this fix is now obsolete. It is never loaded, not even in Firefox 2. It is causing problems because the legacy code incorrectly detects Firefox 20 as Firefox 2, so instead of being a useless file that is never loaded, it is actually causing problems by being loaded in Firefox 20. Bug: 47202 Change-Id: I2fdd0da8c17553a3465ef27c46a4632e135c4405 --- M RELEASE-NOTES-1.21 M skins/common/wikibits.js D skins/monobook/FF2Fixes.css 3 files changed, 1 insertion(+), 6 deletions(-) Approvals: Ori.livneh: Looks good to me, approved jenkins-bot: Verified diff --git a/RELEASE-NOTES-1.21 b/RELEASE-NOTES-1.21 index f71f1ef..717906a 100644 --- a/RELEASE-NOTES-1.21 +++ b/RELEASE-NOTES-1.21 @@ -212,6 +212,7 @@ * (bug 41889) Fix $.tablesorter rowspan exploding for complex cases. * (bug 47489) Installer now automatically selects the next-best database type if the PHP mysql extension is not loaded, preventing fatal errors in some cases. +* (bug 47202) wikibits: FF2Fixes.css should not be loaded in Firefox 20. === API changes in 1.21 === * prop=revisions can now report the contentmodel and contentformat. diff --git a/skins/common/wikibits.js b/skins/common/wikibits.js index c2c00db..709cc33 100644 --- a/skins/common/wikibits.js +++ b/skins/common/wikibits.js @@ -122,8 +122,6 @@ importStylesheetURI( skinpath + '/Opera7Fixes.css' ); } else if ( opera95_bugs ) { importStylesheetURI( skinpath + '/Opera9Fixes.css' ); - } else if ( ff2_bugs ) { - importStylesheetURI( skinpath + '/FF2Fixes.css' ); } } diff --git a/skins/monobook/FF2Fixes.css b/skins/monobook/FF2Fixes.css deleted file mode 100644 index c8b65f5..000 --- a/skins/monobook/FF2Fixes.css +++ /dev/null @@ -1,4 +0,0 @@ -.rtl .external, a.feedlink { - padding: 0 !important; - background: none !important; -} -- To view, visit https://gerrit.wikimedia.org/r/60254 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2fdd0da8c17553a3465ef27c46a4632e135c4405 Gerrit-PatchSet: 5 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Krinkle Gerrit-Reviewer: Catrope Gerrit-Reviewer: Daniel Friesen Gerrit-Reviewer: Krinkle Gerrit-Reviewer: Nikerabbit Gerrit-Reviewer: Ori.livneh Gerrit-Reviewer: PleaseStand Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] multiversion: ability to destroy singleton - change (operations/mediawiki-config)
Aaron Schulz has submitted this change and it was merged. Change subject: multiversion: ability to destroy singleton .. multiversion: ability to destroy singleton To make the class testable, need the ability to destroy the singleton instance or we only have one test case. The method will throw an exception whenever it is used under non CLI interface. Change-Id: Id6f4e33f88d036823d2c3a2ea3a085b25a7fd082 --- M multiversion/MWMultiVersion.php 1 file changed, 12 insertions(+), 0 deletions(-) Approvals: Aaron Schulz: Looks good to me, approved jenkins-bot: Verified diff --git a/multiversion/MWMultiVersion.php b/multiversion/MWMultiVersion.php index 13db7cb..3852c46 100644 --- a/multiversion/MWMultiVersion.php +++ b/multiversion/MWMultiVersion.php @@ -107,6 +107,18 @@ } /** +* Destroy the singleton instance to let a subsequent call create a new +* one. This should NEVER be used on non CLI interface, that will throw an +* internal error. +*/ + public static function destroySingleton() { + if( PHP_SAPI !== 'cli' ) { + self::error('Can not destroy singleton instance when used ' . + 'with non-CLI interface' ); + } + self::$instance = null; + } + /** * Derives site and lang from the parameters and sets $site and $lang on the instance * @param $serverName the ServerName for this wiki -- $_SERVER['SERVER_NAME'] * @param $docRoot the DocumentRoot for this wiki -- $_SERVER['DOCUMENT_ROOT'] -- To view, visit https://gerrit.wikimedia.org/r/61425 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id6f4e33f88d036823d2c3a2ea3a085b25a7fd082 Gerrit-PatchSet: 2 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Hashar Gerrit-Reviewer: Aaron Schulz Gerrit-Reviewer: Hashar 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] add VirtualHost for new iegcom wiki, copied from other priva... - change (operations/apache-config)
Dzahn has uploaded a new change for review. https://gerrit.wikimedia.org/r/62119 Change subject: add VirtualHost for new iegcom wiki, copied from other private wiki RT-5042 .. add VirtualHost for new iegcom wiki, copied from other private wiki RT-5042 Change-Id: I41dcdf40e8bfaccc368059398d650debadb33fe3 --- M remnant.conf 1 file changed, 37 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/apache-config refs/changes/19/62119/1 diff --git a/remnant.conf b/remnant.conf index 9643243..44bd7c5 100644 --- a/remnant.conf +++ b/remnant.conf @@ -1711,4 +1711,41 @@ +# iegcom private wiki - RT-5042 + +DocumentRoot "/usr/local/apache/common/docroot/iegcom" +ServerName iegcom.wikimedia.org + +AllowEncodedSlashes On + +RewriteEngine On +RewriteCond %{HTTP:X-Forwarded-Proto} !https +RewriteRule ^/(.*)$ https://iegcom.wikimedia.org/$1 [R=301,L] + +# Primary wiki redirector: +Alias /wiki /usr/local/apache/common/docroot/iegcom/w/index.php +RewriteRule ^/$ /w/index.php + +# UseMod compatibility URLs +RewriteCond %{QUERY_STRING} ([^&;]+) +RewriteRule ^/wiki\.cgi$ /w/index.php?title=%1 [R=301,L] +RewriteRule ^/wiki\.cgi$ /w/index.php [R=301,L] + +RewriteRule ^/math/(.*) http://upload.wikimedia.org/math/$1 [R=301] + +# Configurable favicon +RewriteRule ^/favicon\.ico$ /w/favicon.php [L] + + + +php_admin_flag engine on + + + + +php_admin_flag engine off + + + + ## donatewiki has been moved to main.conf so it can catch donate.wikipedia.org -- To view, visit https://gerrit.wikimedia.org/r/62119 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I41dcdf40e8bfaccc368059398d650debadb33fe3 Gerrit-PatchSet: 1 Gerrit-Project: operations/apache-config Gerrit-Branch: master Gerrit-Owner: Dzahn ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Move overlay module to top queue - change (mediawiki...Echo)
Alex Monk has uploaded a new change for review. https://gerrit.wikimedia.org/r/62118 Change subject: Move overlay module to top queue .. Move overlay module to top queue So we don't show an unstyled notification badge while the page is loading Bug: 48001 Change-Id: Icebfe86b9901287ac7c263b7253c69f998d71605 --- M Echo.php 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo refs/changes/18/62118/1 diff --git a/Echo.php b/Echo.php index d2c0578..47bafe7 100644 --- a/Echo.php +++ b/Echo.php @@ -144,6 +144,7 @@ 'echo-mark-all-as-read', 'echo-more-info', ), + 'position' => 'top', ), 'ext.echo.special' => $echoResourceTemplate + array( 'scripts' => array( -- To view, visit https://gerrit.wikimedia.org/r/62118 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icebfe86b9901287ac7c263b7253c69f998d71605 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: Alex Monk ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Reduce size of FancyCaptcha input field - change (mediawiki...ConfirmEdit)
jenkins-bot has submitted this change and it was merged. Change subject: Reduce size of FancyCaptcha input field .. Reduce size of FancyCaptcha input field Helps in some circumstances. Bug: 47763 Change-Id: I29672b63d12cd380d7b00cad3449807da76e4188 --- M FancyCaptcha.class.php 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Mattflaschen: Looks good to me, approved jenkins-bot: Verified diff --git a/FancyCaptcha.class.php b/FancyCaptcha.class.php index b04ceb9..68cbb21 100644 --- a/FancyCaptcha.class.php +++ b/FancyCaptcha.class.php @@ -139,6 +139,7 @@ 'name' => 'wpCaptchaWord', 'id' => 'wpCaptchaWord', 'type' => 'text', + 'size' => '12', // max_length in captcha.py plus fudge factor 'autocorrect' => 'off', 'autocapitalize' => 'off', 'required' => 'required', -- To view, visit https://gerrit.wikimedia.org/r/61161 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I29672b63d12cd380d7b00cad3449807da76e4188 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ConfirmEdit Gerrit-Branch: master Gerrit-Owner: Spage Gerrit-Reviewer: Brion VIBBER Gerrit-Reviewer: Lalei Gerrit-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] Add extra db slave wait to digest email cron - change (mediawiki...Echo)
jenkins-bot has submitted this change and it was merged. Change subject: Add extra db slave wait to digest email cron .. Add extra db slave wait to digest email cron Change-Id: Iaa5fc89750b2a4bbe5d52bb9e75c2ac90fc3304b --- M maintenance/processEchoEmailBatch.php 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Aaron Schulz: Looks good to me, approved jenkins-bot: Verified diff --git a/maintenance/processEchoEmailBatch.php b/maintenance/processEchoEmailBatch.php index 8927c62..222af2d 100644 --- a/maintenance/processEchoEmailBatch.php +++ b/maintenance/processEchoEmailBatch.php @@ -50,6 +50,8 @@ $count++; } wfWaitForSlaves( false, false, $wgEchoCluster ); + // This is required since we are updating user properties in main wikidb + wfWaitForSlaves(); // double check to make sure that the id is updated if ( !$updated ) { -- To view, visit https://gerrit.wikimedia.org/r/62085 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iaa5fc89750b2a4bbe5d52bb9e75c2ac90fc3304b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: Bsitu Gerrit-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] reassigning db1042 so s4 after db1020 hw failure - change (operations/puppet)
Asher has submitted this change and it was merged. Change subject: reassigning db1042 so s4 after db1020 hw failure .. reassigning db1042 so s4 after db1020 hw failure Change-Id: I4d88d5de886b1c811bff94983f85b61f0d8f1156 --- M manifests/role/coredb.pp M manifests/site.pp 2 files changed, 5 insertions(+), 5 deletions(-) Approvals: Asher: Verified; Looks good to me, approved diff --git a/manifests/role/coredb.pp b/manifests/role/coredb.pp index d26b5c3..91a0ddb 100644 --- a/manifests/role/coredb.pp +++ b/manifests/role/coredb.pp @@ -10,7 +10,7 @@ $topology = { 's1' => { 'hosts' => { 'pmtpa' => [ 'db32', 'db59', 'db60', 'db63', 'db67', 'db69', 'db71' ], - 'eqiad' => [ 'db1017', 'db1042', 'db1043', 'db1049', 'db1050', 'db1051', 'db1052', 'db1056' ] }, + 'eqiad' => [ 'db1017', 'db1043', 'db1049', 'db1050', 'db1051', 'db1052', 'db1056' ] }, 'primary_site' => $::mw_primary, 'masters' => { 'pmtpa' => "db63", 'eqiad' => "db1056" }, 'snapshot' => [ "db32", "db1050" ], @@ -34,7 +34,7 @@ }, 's4' => { 'hosts' => { 'pmtpa' => [ 'db31', 'db51', 'db65', 'db72' ], - 'eqiad' => [ 'db1004', 'db1011', 'db1020', 'db1038', 'db1059' ] }, + 'eqiad' => [ 'db1004', 'db1011', 'db1020', 'db1038', 'db1042', 'db1059' ] }, 'primary_site' => $::mw_primary, 'masters' => { 'pmtpa' => "db31", 'eqiad' => "db1038" }, 'snapshot' => [ "db65", "db1020" ], diff --git a/manifests/site.pp b/manifests/site.pp index f0d7489..a77ab08 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -542,7 +542,7 @@ } # eqiad dbs -node /^db10(17|42|43|49|50|51|52|56)\.eqiad\.wmnet/ { +node /^db10(17|43|49|50|51|52|56)\.eqiad\.wmnet/ { if $hostname =~ /^db10(17|56)/ { $ganglia_aggregator = true include mha::manager @@ -573,8 +573,8 @@ } } -node /^db10(04|11|20|38|59)\.eqiad\.wmnet/ { - if $hostname =~ /^db10(04|11|20|59)/ { +node /^db10(04|11|20|38|42|59)\.eqiad\.wmnet/ { + if $hostname =~ /^db10(04|11|20|42|59)/ { class { role::coredb::s4 : mariadb => true } } else { include role::coredb::s4 -- To view, visit https://gerrit.wikimedia.org/r/62117 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4d88d5de886b1c811bff94983f85b61f0d8f1156 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Asher Gerrit-Reviewer: Asher ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] reassigning db1042 so s4 after db1020 hw failure - change (operations/puppet)
Asher has uploaded a new change for review. https://gerrit.wikimedia.org/r/62117 Change subject: reassigning db1042 so s4 after db1020 hw failure .. reassigning db1042 so s4 after db1020 hw failure Change-Id: I4d88d5de886b1c811bff94983f85b61f0d8f1156 --- M manifests/role/coredb.pp M manifests/site.pp 2 files changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/17/62117/1 diff --git a/manifests/role/coredb.pp b/manifests/role/coredb.pp index d26b5c3..91a0ddb 100644 --- a/manifests/role/coredb.pp +++ b/manifests/role/coredb.pp @@ -10,7 +10,7 @@ $topology = { 's1' => { 'hosts' => { 'pmtpa' => [ 'db32', 'db59', 'db60', 'db63', 'db67', 'db69', 'db71' ], - 'eqiad' => [ 'db1017', 'db1042', 'db1043', 'db1049', 'db1050', 'db1051', 'db1052', 'db1056' ] }, + 'eqiad' => [ 'db1017', 'db1043', 'db1049', 'db1050', 'db1051', 'db1052', 'db1056' ] }, 'primary_site' => $::mw_primary, 'masters' => { 'pmtpa' => "db63", 'eqiad' => "db1056" }, 'snapshot' => [ "db32", "db1050" ], @@ -34,7 +34,7 @@ }, 's4' => { 'hosts' => { 'pmtpa' => [ 'db31', 'db51', 'db65', 'db72' ], - 'eqiad' => [ 'db1004', 'db1011', 'db1020', 'db1038', 'db1059' ] }, + 'eqiad' => [ 'db1004', 'db1011', 'db1020', 'db1038', 'db1042', 'db1059' ] }, 'primary_site' => $::mw_primary, 'masters' => { 'pmtpa' => "db31", 'eqiad' => "db1038" }, 'snapshot' => [ "db65", "db1020" ], diff --git a/manifests/site.pp b/manifests/site.pp index f0d7489..a77ab08 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -542,7 +542,7 @@ } # eqiad dbs -node /^db10(17|42|43|49|50|51|52|56)\.eqiad\.wmnet/ { +node /^db10(17|43|49|50|51|52|56)\.eqiad\.wmnet/ { if $hostname =~ /^db10(17|56)/ { $ganglia_aggregator = true include mha::manager @@ -573,8 +573,8 @@ } } -node /^db10(04|11|20|38|59)\.eqiad\.wmnet/ { - if $hostname =~ /^db10(04|11|20|59)/ { +node /^db10(04|11|20|38|42|59)\.eqiad\.wmnet/ { + if $hostname =~ /^db10(04|11|20|42|59)/ { class { role::coredb::s4 : mariadb => true } } else { include role::coredb::s4 -- To view, visit https://gerrit.wikimedia.org/r/62117 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4d88d5de886b1c811bff94983f85b61f0d8f1156 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Asher ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] unrevert c301571be - contact and contribution search results - change (wikimedia...crm)
Adamw has uploaded a new change for review. https://gerrit.wikimedia.org/r/62116 Change subject: unrevert c301571be - contact and contribution search results .. unrevert c301571be - contact and contribution search results Turns out it is useful. Change-Id: Ib09d60b78366a62880aad81c7087fa6a9a4f7e99 --- A sites/all/modules/wmf_reports/CRM/Contact/Form/ContactAndContributionsSelector.php M sites/all/modules/wmf_reports/wmf_reports.module 2 files changed, 319 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/16/62116/1 diff --git a/sites/all/modules/wmf_reports/CRM/Contact/Form/ContactAndContributionsSelector.php b/sites/all/modules/wmf_reports/CRM/Contact/Form/ContactAndContributionsSelector.php new file mode 100644 index 000..6f98ea8 --- /dev/null +++ b/sites/all/modules/wmf_reports/CRM/Contact/Form/ContactAndContributionsSelector.php @@ -0,0 +1,306 @@ +_queryParams =& $queryParams; + +$this->_limit = $limit; +$this->_context = $context; +$this->_compContext = $compContext; + +$this->_contributionClause = $contributionClause; + +// type of selector +$this->_action = $action; + +$returnProperties = CRM_Contribute_BAO_Query::defaultReturnProperties( +CRM_Contact_BAO_Query::MODE_CONTRIBUTE, +false +); +self::$all_location_types = CRM_Core_PseudoConstant::locationType(); +foreach (self::$all_location_types as $location_type) +{ +foreach (self::$location_properties as $property) +{ +$returnProperties['location'][$location_type][$property] = 1; +} +} +$returnProperties = array_merge_recursive( +$returnProperties, +self::$contribution_properties, +self::$contact_properties +); +$this->_query = new CRM_Contact_BAO_Query( +$this->_queryParams, +$returnProperties, +null, //array('notes' => 1), +false, +false, +CRM_Contact_BAO_Query::MODE_CONTRIBUTE +); +$this->_query->_distinctComponentClause = " civicrm_contribution.id"; +$this->_query->_groupByComponentClause = " GROUP BY civicrm_contribution.id "; +} + +function &getRows($action, $offset, $rowCount, $sort, $output = null) { +$result = $this->_query->searchQuery( $offset, $rowCount, $sort, + false, false, + false, false, + false, + $this->_contributionClause ); +// process the result of the query +$rows = array( ); + +//CRM-4418 check for view/edit/delete +$permissions = array( CRM_Core_Permission::VIEW ); +if ( CRM_Core_Permission::check( 'edit contributions' ) ) { +$permissions[] = CRM_Core_Permission::EDIT; +} +if ( CRM_Core_Permission::check( 'delete in CiviContribute' ) ) { +$permissions[] = CRM_Core_Permission::DELETE; +} +$mask = CRM_Core_Action::mask( $permissions ); + +$qfKey = $this->_key; +$componentId = $componentContext = null; +if ( $this->_context != 'contribute' ) { +$qfKey= CRM_Utils_Request::retrieve( 'key', 'String', CRM_Core_DAO::$_nullObject ); +$componentId = CRM_Utils_Request::retrieve( 'id', 'Positive', CRM_Core_DAO::$_nullObject ); +$componentAction = CRM_Utils_Request::retrieve( 'action', 'String', CRM_Core_DAO::$_nullObject ); +$componentContext = CRM_Utils_Request::retrieve( 'compContext', 'String', CRM_Core_DAO::$_nullObject ); + +if ( ! $componentContext && + $this->_compContext ) { +$componentContext = $this->_compContext; +$qfKey = CRM_Utils_Request::retrieve( 'qfKey', 'String', CRM_Core_DAO::$_nullObject, null, false, 'REQUEST' ); +} +} + +// get all contribution status +$contributionStatuses = CRM_Core_OptionGroup::values( 'contribution_status', + false, false, false, null, 'name', false ); + +//get all campaigns. +$allCampaigns = CRM_Campaign_BAO_Campaign::getCampaigns( null, null, false, false, false, true ); + + +$current_contact = FALSE; +while ($result->fetch()) +{ +#dpm($result); +$contact_row = array(); +$contribution_row = array(); +if ($result->contact_id != $current_contact) +{ +$current_contact = $result->contact_id; +foreach (self::$contact_pro
[MediaWiki-commits] [Gerrit] Fixing Autoloader and Paths Shtuff - change (wikimedia...PaymentsListeners)
Adamw has submitted this change and it was merged. Change subject: Fixing Autoloader and Paths Shtuff .. Fixing Autoloader and Paths Shtuff The SP AutoLoader now has more intelligence about how/where to load things. It should be much more useful out of box now. Working from: https://gerrit.wikimedia.org/r/#/c/61480/1 Change-Id: I4e763a4392553fbfba4c22171a95135a04411d89 --- A SmashPig/.gitignore M SmashPig/Core/AutoLoader.php M SmashPig/Core/Http/RequestHandler.php M SmashPig/Maintenance/MaintenanceBase.php M SmashPig/PublicHttp/smashpig_http_handler.php 5 files changed, 240 insertions(+), 193 deletions(-) Approvals: Adamw: Verified; Looks good to me, approved diff --git a/SmashPig/.gitignore b/SmashPig/.gitignore new file mode 100644 index 000..295b47b --- /dev/null +++ b/SmashPig/.gitignore @@ -0,0 +1,2 @@ +config.php +.idea diff --git a/SmashPig/Core/AutoLoader.php b/SmashPig/Core/AutoLoader.php index b1e8912..2c4f842 100644 --- a/SmashPig/Core/AutoLoader.php +++ b/SmashPig/Core/AutoLoader.php @@ -6,52 +6,54 @@ */ class AutoLoader { -/** - * @var AutoLoader Installed instance. - */ -protected static $instance = null; + /** +* @var AutoLoader Installed instance. +*/ + protected static $instance = null; -/** - * Installs the SmashPig AutoLoader into the class loader chain. - * - * @param $defaultPath The path to the SmashPig library. - * FIXME: this is sensitive to the final "/", requiring it. - * - * @return bool True if install was successful. False if the AutoLoader was already installed. - */ -public static function installSmashPigAutoLoader( $defaultPath ) { -if ( static::$instance ) { -return false; -} else { -static::$instance = new AutoLoader( $defaultPath ); -return true; -} -} + /** +* Installs the SmashPig AutoLoader into the class loader chain. +* +* @param string $defaultPath The path to the SmashPig library. +* +* @return bool True if install was successful. False if the AutoLoader was already installed. +*/ + public static function installSmashPigAutoLoader( $defaultPath = null ) { + if ( static::$instance ) { + return false; + } else { + if ( $defaultPath === null ) { + $defaultPath = AutoLoader::getInstallPath(); + } + static::$instance = new AutoLoader( $defaultPath ); + return true; + } + } -/** - * Returns the installed SmashPig autoloader object. - * - * @return AutoLoader instance - * @throws SmashPigException If there has been no autoloader installed. - */ -public static function getInstance() { -if ( static::$instance ) { -return static::$instance; -} else { -throw new SmashPigException( 'AutoLoader has not been installed. See AutoLoader::install_smashpig_autoloader().' ); -} -} + /** +* Returns the installed SmashPig autoloader object. +* +* @return AutoLoader instance +* @throws SmashPigException If there has been no autoloader installed. +*/ + public static function getInstance() { + if ( static::$instance ) { + return static::$instance; + } else { + throw new SmashPigException( 'AutoLoader has not been installed. See AutoLoader::install_smashpig_autoloader().' ); + } + } -/** @var array Tree of namespaces; keys are namespace names or @ which - * indicates the namespace may be found at the location specified in value - */ -protected $namespaceDirs = array(); + /** @var array Tree of namespaces; keys are namespace names or @ which +* indicates the namespace may be found at the location specified in value +*/ + protected $namespaceDirs = array(); -protected function __construct( $defaultPath ) { -$this->addNamespacePath( 'SmashPig', $defaultPath ); + protected function __construct( $defaultPath ) { + $this->addNamespacePath( 'SmashPig', $defaultPath ); -spl_autoload_register( array( $this, 'autoload' ) ); -} + spl_autoload_register( array( $this, 'autoload' ) ); + } public function addConfiguredNamespaces() { $config = Configuration::getDefaultConfig(); @@ -60,8 +62,8 @@ foreach ( $config->val( 'namespaces' ) as $namespace ) { \SmashPig\Core\Logging\Logger::debug( 'Loading additional namespace node.', $namespace ); AutoLoader::getInstance()->addNamespacePath( -
[MediaWiki-commits] [Gerrit] Get rid of state.activeTemplateId from the serializer. - change (mediawiki...Parsoid)
jenkins-bot has submitted this change and it was merged. Change subject: Get rid of state.activeTemplateId from the serializer. .. Get rid of state.activeTemplateId from the serializer. * Skip over encapsulated content whenever they are encountered since original/edited tranclusion/extension source is emitted directly on hitting the first node. * This cleans up the WTS code some more. * No change in parser tests (as it should be). Change-Id: Idadac148438b70019b8c9a9f345f5e1aa3c75083 --- M js/lib/mediawiki.WikitextSerializer.js 1 file changed, 31 insertions(+), 38 deletions(-) Approvals: GWicke: Looks good to me, approved jenkins-bot: Verified diff --git a/js/lib/mediawiki.WikitextSerializer.js b/js/lib/mediawiki.WikitextSerializer.js index 8ff92bf..14ffaf6 100644 --- a/js/lib/mediawiki.WikitextSerializer.js +++ b/js/lib/mediawiki.WikitextSerializer.js @@ -2113,6 +2113,20 @@ return buf.join(''); }; +WSP.skipOverEncapsulatedContent = function(node) { + var about = node.getAttribute('about'); + if (!about) { + return node; + } + + node = node.nextSibling; + while (node && DU.isElt(node) && about === node.getAttribute('about')) { + node = node.nextSibling; + } + + return node; +}; + /** * Get a DOM-based handler for an element node */ @@ -2130,26 +2144,6 @@ handler, nodeTypeOf = node.getAttribute( 'typeof' ) || ''; -// if (state.activeTemplateId) { -// if(node.getAttribute('about') === state.activeTemplateId) { -// // Skip template content -// return function(){}; -// } else { -// state.activeTemplateId = null; -// } -// } else { -// if (nodeTypeOf && nodeTypeOf.match(/\bmw:Object(\/[^\s]+|\b)/)) { -// state.activeTemplateId = node.getAttribute('about' || null); -// -// - - // XXX: Handle siblings directly in a template content handler returning - // the next node? - if (state.activeTemplateId && node.getAttribute('about') === state.activeTemplateId) { - // Ignore subsequent template content - return {handle: function() {}}; - } - // XXX: Convert into separate handlers? if ( dp.src !== undefined ) { //console.log(node.parentNode.outerHTML); @@ -2157,8 +2151,6 @@ // Source-based template/extension round-tripping for now return { handle: function () { - state.activeTemplateId = node.getAttribute('about') || null; - // In RT-testing mode, there will not be any edits to tpls. // So, use original source to eliminate spurious diffs showing // up in RT testing results. @@ -2175,6 +2167,7 @@ } } self.emitWikitext(src, state, cb, node); + return self.skipOverEncapsulatedContent(node); }, sepnls: { // XXX: This is questionable, as the template can expand @@ -2853,7 +2846,7 @@ */ WSP._serializeNode = function( node, state, cb) { cb = cb || state.chunkCB; - var prev, next; + var prev, next, nextNode; // serialize this node switch( node.nodeType ) { @@ -2886,15 +2879,12 @@ node, domHandler); } - var handled = false, - about = node.getAttribute('about') || null; + var handled = false; - // We have 2 global checks here for selser-mode - // 1. WTS is not in a subtree with a modification flag that applies to every - //node of a subtree (rather than an indication that some node in the - //subtree is modified). - // 2. WTS not processing template content that has already been emitted. - if (state.selserMode && !state.inModifiedContent && (!about || about !== state.activeTemplateId)) { + // WTS should not be in a subtree with a modification flag that applies + // to every node of a subtree (rather than an indication that some node + // in the subtree is modified). + if (state.selserMode && !state.inModifiedContent) { // To serialize from source, we need
[MediaWiki-commits] [Gerrit] Bump domino dependency to 1.0.11. - change (mediawiki...Parsoid)
jenkins-bot has submitted this change and it was merged. Change subject: Bump domino dependency to 1.0.11. .. Bump domino dependency to 1.0.11. Fixes stack overflow exception when parsing DOM for https://de.wikipedia.org/wiki/Liste_der_Denkm%C3%A4ler_im_K%C3%B6lner_Stadtteil_Altstadt-Nord which has a 313,981 byte data-mw attribute. Bug: 47952 Change-Id: I3b601c09ee510b2d381b4f518c652a349c5fb2e3 --- M js/package.json 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: GWicke: Looks good to me, approved jenkins-bot: Verified diff --git a/js/package.json b/js/package.json index 1973f37..c455831 100644 --- a/js/package.json +++ b/js/package.json @@ -11,7 +11,7 @@ "path": "0.x.x", "optimist": "0.x.x", "assert": "0.x.x", - "domino": "~1.0.9", + "domino": "~1.0.11", "pegjs": "0.7.x", "lru-cache": "1.x.x", "async": "0.x.x", -- To view, visit https://gerrit.wikimedia.org/r/61945 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3b601c09ee510b2d381b4f518c652a349c5fb2e3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Parsoid Gerrit-Branch: master Gerrit-Owner: Cscott Gerrit-Reviewer: GWicke Gerrit-Reviewer: MarkTraceur Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add getMagicWordMatcher function to WikiConfig. - change (mediawiki...Parsoid)
jenkins-bot has submitted this change and it was merged. Change subject: Add getMagicWordMatcher function to WikiConfig. .. Add getMagicWordMatcher function to WikiConfig. This returns a regular expression which will match a given non-parameterized magic word. Change-Id: I89d3aac74315caeda01cb97999b9f7521fbb6ff4 --- M js/lib/mediawiki.WikiConfig.js 1 file changed, 32 insertions(+), 2 deletions(-) Approvals: GWicke: Looks good to me, approved jenkins-bot: Verified diff --git a/js/lib/mediawiki.WikiConfig.js b/js/lib/mediawiki.WikiConfig.js index b0fdba8..97ff9ab 100644 --- a/js/lib/mediawiki.WikiConfig.js +++ b/js/lib/mediawiki.WikiConfig.js @@ -6,6 +6,12 @@ Util = require( './mediawiki.Util.js' ).Util, request = require( 'request' ); +// escape 'special' characters in a regexp, returning a regexp which matches +// the string exactly +var re_escape = function(s) { + return s.replace(/[\^\\$*+?.()|{}\[\]]/g, '\\$&'); +}; + /** * @class * @@ -105,6 +111,11 @@ conf.magicWords[alias] = mw.name; conf.mwAliases[mw.name].push( alias ); } + conf.mwRegexps[mw.name] = + new RegExp( '^(' + + conf.mwAliases[mw.name].map(re_escape).join('|') + + ')$', + mw['case-sensitive'] === '' ? '' : 'i' ); } if ( mws.length > 0 ) { @@ -274,6 +285,11 @@ mwAliases: null, /** +* @property {Object/null} mwRegexp RegExp matching aliases, indexed by canonical magic word name. +*/ + mwRegexps: null, + + /** * @property {Object/null} specialPages Special page names on this wiki, indexed by aliases. */ specialPages: null, @@ -318,6 +334,7 @@ this.namespaceIds = {}; this.magicWords = {}; this.mwAliases = {}; + this.mwRegexps = {}; this.specialPages = {}; this.extensionTags = {}; this.interpolatedList = []; @@ -336,8 +353,21 @@ * @param {string} alias * @returns {string} */ - getMagicWord: function ( alias ) { + getMagicWordIdFromAlias: function ( alias ) { return this.magicWords[alias] || null; + }, + + /** +* @method +* +* Get a regexp matching a localized magic word, given its id. +* +* @param {string} id +* @return {RegExp} +*/ + getMagicWordMatcher: function ( id ) { + // if 'id' is not found, return a regexp which will never match. + return this.mwRegexps[id] || /[]/; }, /** @@ -369,7 +399,7 @@ if ( alias === null ) { return null; } - canonical = this.getMagicWord( alias ); + canonical = this.getMagicWordIdFromAlias( alias ); if ( canonical !== null ) { return { k: canonical, v: value, a: alias }; } -- To view, visit https://gerrit.wikimedia.org/r/62090 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I89d3aac74315caeda01cb97999b9f7521fbb6ff4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Parsoid Gerrit-Branch: master Gerrit-Owner: Cscott Gerrit-Reviewer: GWicke Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fixing Adyen Spacing to Tabs - change (wikimedia...PaymentsListeners)
Mwalker has uploaded a new change for review. https://gerrit.wikimedia.org/r/62115 Change subject: Fixing Adyen Spacing to Tabs .. Fixing Adyen Spacing to Tabs Whoo Change-Id: I1a238704b7216de76bcfb9bb0bc1b20d2864fbf7 --- M SmashPig/PaymentProviders/Adyen/Actions/PaymentCaptureAction.php M SmashPig/PaymentProviders/Adyen/AdyenListener.php M SmashPig/PaymentProviders/Adyen/AdyenPaymentsAPI.php 3 files changed, 113 insertions(+), 109 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/PaymentsListeners refs/changes/15/62115/1 diff --git a/SmashPig/PaymentProviders/Adyen/Actions/PaymentCaptureAction.php b/SmashPig/PaymentProviders/Adyen/Actions/PaymentCaptureAction.php index a090cb9..f9a642a 100644 --- a/SmashPig/PaymentProviders/Adyen/Actions/PaymentCaptureAction.php +++ b/SmashPig/PaymentProviders/Adyen/Actions/PaymentCaptureAction.php @@ -61,5 +61,4 @@ return true; } - } diff --git a/SmashPig/PaymentProviders/Adyen/AdyenListener.php b/SmashPig/PaymentProviders/Adyen/AdyenListener.php index 78b2c27..575788c 100644 --- a/SmashPig/PaymentProviders/Adyen/AdyenListener.php +++ b/SmashPig/PaymentProviders/Adyen/AdyenListener.php @@ -8,65 +8,65 @@ class AdyenListener extends SoapListener { -protected $wsdlpath = "https://ca-live.adyen.com/ca/services/Notification?wsdl";; + protected $wsdlpath = "https://ca-live.adyen.com/ca/services/Notification?wsdl";; -protected $classmap = array( -'NotificationRequest' => 'SmashPig\PaymentProviders\Adyen\WSDL\NotificationRequest', -'NotificationRequestItem' => 'SmashPig\PaymentProviders\Adyen\WSDL\NotificationRequestItem', -'anyType2anyTypeMap' => 'SmashPig\PaymentProviders\Adyen\WSDL\anyType2anyTypeMap', -'entry'=> 'SmashPig\PaymentProviders\Adyen\WSDL\entry', -'sendNotification' => 'SmashPig\PaymentProviders\Adyen\WSDL\sendNotification', -'sendNotificationResponse' => 'SmashPig\PaymentProviders\Adyen\WSDL\sendNotificationResponse', -'Amount' => 'SmashPig\PaymentProviders\Adyen\WSDL\Amount', -'ServiceException' => 'SmashPig\PaymentProviders\Adyen\WSDL\ServiceException', -'Error'=> 'SmashPig\PaymentProviders\Adyen\WSDL\Error', -'Type' => 'SmashPig\PaymentProviders\Adyen\WSDL\Type', -); + protected $classmap = array( + 'NotificationRequest' => 'SmashPig\PaymentProviders\Adyen\WSDL\NotificationRequest', + 'NotificationRequestItem' => 'SmashPig\PaymentProviders\Adyen\WSDL\NotificationRequestItem', + 'anyType2anyTypeMap' => 'SmashPig\PaymentProviders\Adyen\WSDL\anyType2anyTypeMap', + 'entry'=> 'SmashPig\PaymentProviders\Adyen\WSDL\entry', + 'sendNotification' => 'SmashPig\PaymentProviders\Adyen\WSDL\sendNotification', + 'sendNotificationResponse' => 'SmashPig\PaymentProviders\Adyen\WSDL\sendNotificationResponse', + 'Amount' => 'SmashPig\PaymentProviders\Adyen\WSDL\Amount', + 'ServiceException' => 'SmashPig\PaymentProviders\Adyen\WSDL\ServiceException', + 'Error'=> 'SmashPig\PaymentProviders\Adyen\WSDL\Error', + 'Type' => 'SmashPig\PaymentProviders\Adyen\WSDL\Type', + ); -public function __construct() { -require_once( 'WSDL/Notification.php' ); -parent::__construct(); -} + public function __construct() { + require_once( 'WSDL/Notification.php' ); + parent::__construct(); + } -/** - * Run any gateway/Message specific security. - * - * @param ListenerMessage $msg Message object to operate on - * - * @throws ListenerSecurityException on security violation - */ -protected function doMessageSecurity( ListenerMessage $msg ) { -// I have no specific message security at this time + /** +* Run any gateway/Message specific security. +* +* @param ListenerMessage $msg Message object to operate on +* +* @throws ListenerSecurityException on security violation +*/ + protected function doMessageSecurity( ListenerMessage $msg ) { + // I have no specific message security at this time return true; -} + } -/** - * Positive acknowledgement of successful Message processing all the way through the chain. + /** +* Positive acknowledgement of successful Message processing all the way through the chain. * * In the case of Adyen -- error handling happened far up the stack so if we've made it * here we're golden and we should just let t
[MediaWiki-commits] [Gerrit] zuul: pass puppet-lint (whitespaces) - change (operations/puppet)
Dzahn has submitted this change and it was merged. Change subject: zuul: pass puppet-lint (whitespaces) .. zuul: pass puppet-lint (whitespaces) Convert the Zuul manifest to use spaces instead of tabs. Also fix up arrows alignements. No functionals changes. Change-Id: I71f105800ccb944e440e3da45daef18608df9788 --- M modules/zuul/manifests/init.pp 1 file changed, 110 insertions(+), 110 deletions(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/modules/zuul/manifests/init.pp b/modules/zuul/manifests/init.pp index c2bad0c..de4cf54 100644 --- a/modules/zuul/manifests/init.pp +++ b/modules/zuul/manifests/init.pp @@ -23,132 +23,132 @@ $push_change_refs, ) { - # Dependencies as mentionned in zuul:tools/pip-requires - $packages = [ - 'python-yaml', - 'python-webob', - 'python-daemon', - 'python-lockfile', - 'python-paramiko', - 'python-jenkins', - 'python-paste', + # Dependencies as mentionned in zuul:tools/pip-requires + $packages = [ +'python-yaml', +'python-webob', +'python-daemon', +'python-lockfile', +'python-paramiko', +'python-jenkins', +'python-paste', - # GitPython at least 0.3.2RC1 which is neither in Lucid nor in Precise - # We had to backport it and its dependencies from Quantal: - 'python-git', - 'python-gitdb', - 'python-async', - 'python-smmap', +# GitPython at least 0.3.2RC1 which is neither in Lucid nor in Precise +# We had to backport it and its dependencies from Quantal: +'python-git', +'python-gitdb', +'python-async', +'python-smmap', - 'python-extras', # backported in Precise (bug 47122) - 'python-statsd', +'python-extras', # backported in Precise (bug 47122) +'python-statsd', - 'python-setuptools', - ] +'python-setuptools', + ] - package { $packages: - ensure => present, - } + package { $packages: +ensure => present, + } - # We have packaged the python voluptuous module under - # operations/debs/python-voluptuous. Zuul does not work - # AT ALL with version 0.7 so make sure we have 0.6.x - package { 'python-voluptuous': - ensure => '0.6.1-1~wmf1', - } + # We have packaged the python voluptuous module under + # operations/debs/python-voluptuous. Zuul does not work + # AT ALL with version 0.7 so make sure we have 0.6.x + package { 'python-voluptuous': +ensure => '0.6.1-1~wmf1', + } - # Used to be in /var/lib/git/zuul but /var/lib/git can be used - # to replicate git bare repositories. - $zuul_source_dir = '/usr/local/src/zuul' + # Used to be in /var/lib/git/zuul but /var/lib/git can be used + # to replicate git bare repositories. + $zuul_source_dir = '/usr/local/src/zuul' - git::clone { 'integration/zuul': - ensure => present, - directory => $zuul_source_dir, - origin => $git_source_repo, - branch => $git_branch, - } + git::clone { 'integration/zuul': +ensure=> present, +directory => $zuul_source_dir, +origin=> $git_source_repo, +branch=> $git_branch, + } - # We do not ship `statsd` python module so ignore it - # it is gracefully ignored by Zuul. - exec { 'remove_statsd_dependency': - command => '/bin/sed -i "s/^statsd/#statsd/" tools/pip-requires', - cwd => $zuul_source_dir, - refreshonly => true, - subscribe => Git::Clone['integration/zuul'], - } + # We do not ship `statsd` python module so ignore it + # it is gracefully ignored by Zuul. + exec { 'remove_statsd_dependency': +command => '/bin/sed -i "s/^statsd/#statsd/" tools/pip-requires', +cwd => $zuul_source_dir, +refreshonly => true, +subscribe => Git::Clone['integration/zuul'], + } - exec { 'install_zuul': - # Make sure to install without downloading from pypi - command => 'python setup.py easy_install --allow-hosts=None .', - cwd => $zuul_source_dir, - path => '/bin:/usr/bin', - refreshonly => true, - subscribe => Git::Clone['integration/zuul'], - require => [ - Exec['remove_statsd_dependency'], - Package['python-setuptools'], - ], - } + exec { 'install_zuul': +# Make sure to install without downloading from pypi +command => 'python setup.py easy_install --allow-hosts=None .', +
[MediaWiki-commits] [Gerrit] (Bug 46920) Add Puppet class for configuring qa/browsertests - change (mediawiki/vagrant)
Ori.livneh has submitted this change and it was merged. Change subject: (Bug 46920) Add Puppet class for configuring qa/browsertests .. (Bug 46920) Add Puppet class for configuring qa/browsertests This change adds a Puppet class that will clone the 'qa/browsertests' repository and configure browser testing using cucumber and Selenium. Currently experimental, and thus not enabled by default. To enable, you'll need to uncomment the line "class { 'browsertests': }" in puppet/manifests/site.pp and run "vagrant provision". If everything worked, connect to your instance by running 'vagrant ssh -- -X' (the extra arguments are required to enable X11 forwarding). Then run: $ cd /srv/browsertests $ bundle exec cucumber features/login.feature FIXME: * MediaWiki is served on port 80 inside the VM and 8080 outside it, by dint of the port forwarding setup. Because the common way to access the wiki is from the host, $wgServer is set to "http://127.0.0.1:8080";. MediaWiki uses this value to construct URLs to static assets, which the tests are consequently unable to pull. Should be simple to fix, but I haven't decided on the best way to do it yet. * The 'mediawiki::user' resource type sucks. It should accept an 'ensure' parameter and actually check if the user exists using some sane method. I have not identified a good existing maintenance script that is usable for this purpose. * The module docs need to be improved. Change-Id: I18825437e1f0ad005b1e4f6db850968603573b01 --- M puppet/manifests/site.pp A puppet/modules/browsertests/manifests/init.pp A puppet/modules/browsertests/templates/mediawiki-url.sh.erb A puppet/modules/browsertests/templates/secret.yml.erb A puppet/modules/mediawiki/manifests/user.pp 5 files changed, 89 insertions(+), 0 deletions(-) Approvals: Ori.livneh: Verified; Looks good to me, approved diff --git a/puppet/manifests/site.pp b/puppet/manifests/site.pp index ef67080..fbe5418 100644 --- a/puppet/manifests/site.pp +++ b/puppet/manifests/site.pp @@ -34,3 +34,9 @@ class { 'git': } class { 'memcached': } class { 'mediawiki': } + +# Optional classes +# Uncomment a line and run 'vagrant provision' to enable a class. + +# Selenium browser tests for MediaWiki +# class { 'browsertests': } diff --git a/puppet/modules/browsertests/manifests/init.pp b/puppet/modules/browsertests/manifests/init.pp new file mode 100644 index 000..31af460 --- /dev/null +++ b/puppet/modules/browsertests/manifests/init.pp @@ -0,0 +1,61 @@ +# == Class: browsertests +# +# Configures the Wikimedia Foundation's Selenium-driven browser tests. +# To run the tests, you'll need to enable X11 forwarding for the SSH +# session you use to connect to your Vagrant instance. You can do so by +# running 'vagrant ssh -- -X'. +# +# === Parameters +# +# [*selenium_password*] +# Password for the 'Selenium_user' MediaWiki account. +# +# [*mediawiki_url*] +# URL to /wiki/ on the wiki to be tested. +# +# [*install_location*] +# The browsertests repository will be cloned to this local path. +# +class browsertests( + $selenium_password = 'vagrant', + $mediawiki_url = 'http://127.0.0.1/wiki/', + $install_location = '/srv/browsertests', +) { + + git::clone { 'qa/browsertests': + directory => '/srv/browsertests' + } + + mediawiki::user { 'Selenium_user': + password => $selenium_password, + force=> true, + } + + # Sets MEDIAWIKI_URL environment variable for all users. + file { '/etc/profile.d/mediawiki-url.sh': + content => template('browsertests/mediawiki-url.sh.erb'), + mode => '0755', + } + + # Store the password for the 'Selenium_user' MediaWiki account. + file { "${install_location}/config/secret.yml": + content => template('browsertests/secret.yml.erb'), + require => Git::Clone['qa/browsertests'], + } + + package { [ 'firefox', 'ruby1.9.1-full', 'ruby-bundler' ]: + ensure => present, + } + + exec { 'set default ruby': + command => 'update-alternatives --set ruby /usr/bin/ruby1.9.1', + unless => 'update-alternatives --query ruby | grep "Value: /usr/bin/ruby1.9.1"', + require => Package['ruby1.9.1-full'], + } + + exec { 'bundle install': + cwd => '/srv/browsertests', + unless => 'bundle check', + require => [ Exec['set default ruby'], Git::Clone['qa/browsertests'] ], + } +} diff --git a/puppet/modules/browsertests/templates/mediawiki-url.sh.erb b/puppet/modules/browsertests/templates/mediawiki-url.sh.erb new file mode 100755 index 000..3c75dad --- /dev/null +++ b/puppet/modules/browsertests/templates/mediawiki-url.sh.erb @@ -0,0 +1,2 @@ +#!/bin/sh +export MEDIAWIKI_URL="<%= @mediawiki_url %>" diff -
[MediaWiki-commits] [Gerrit] Change default RAM size to 768 Mb - change (mediawiki/vagrant)
Ori.livneh has submitted this change and it was merged. Change subject: Change default RAM size to 768 Mb .. Change default RAM size to 768 Mb Oh, Ruby... Change-Id: Ib7abc65355982f905596fb1d1c40ddbc7f14d4aa --- M Vagrantfile 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Ori.livneh: Verified; Looks good to me, approved diff --git a/Vagrantfile b/Vagrantfile index 4cac6ee..80642d6 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -52,7 +52,7 @@ config.vm.provider :virtualbox do |vb| # See http://www.virtualbox.org/manual/ch08.html for additional options. -vb.customize ['modifyvm', :id, '--memory', '512'] +vb.customize ['modifyvm', :id, '--memory', '768'] vb.customize ['modifyvm', :id, '--ostype', 'Ubuntu_64'] # To boot the VM in graphical mode, uncomment the following line: -- To view, visit https://gerrit.wikimedia.org/r/62114 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib7abc65355982f905596fb1d1c40ddbc7f14d4aa Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: Ori.livneh Gerrit-Reviewer: Ori.livneh ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add custom init script for multiple aggregators for labs - change (operations/puppet)
Ryan Lane has submitted this change and it was merged. Change subject: Add custom init script for multiple aggregators for labs .. Add custom init script for multiple aggregators for labs Change-Id: I17722def2a54dbcd64c88aeb26dd30b4cbe78291 --- M manifests/ganglia.pp 1 file changed, 9 insertions(+), 2 deletions(-) Approvals: Ryan Lane: Verified; Looks good to me, approved diff --git a/manifests/ganglia.pp b/manifests/ganglia.pp index 198428b..8bbce6c 100644 --- a/manifests/ganglia.pp +++ b/manifests/ganglia.pp @@ -393,10 +393,16 @@ class aggregator { # This overrides the default ganglia-monitor script # with one that starts up multiple instances of gmond - file { "/etc/init.d/ganglia-monitor": + file { "/etc/init.d/ganglia-monitor-aggrs": source => "puppet:///files/ganglia/ganglia-monitor", mode => 0555, - ensure => present + ensure => present, + require => Package["ganglia-monitor"]; + } + service { "ganglia-monitor-aggrs": + require => File["/etc/init.d/ganglia-monitor-aggrs"], + enable => true, + ensure => running; } } } @@ -417,6 +423,7 @@ $ganglia_webdir = "/usr/share/ganglia-webfrontend" $ganglia_confdir = "/var/lib/ganglia/conf" + include ganglia::aggregator } else { $ganglia_servername = "ganglia.wikimedia.org" $ganglia_serveralias = "nickel.wikimedia.org ganglia3.wikimedia.org ganglia3-tip.wikimedia.org" -- To view, visit https://gerrit.wikimedia.org/r/62113 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I17722def2a54dbcd64c88aeb26dd30b4cbe78291 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ryan Lane Gerrit-Reviewer: Ryan Lane ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Change default RAM size to 768 Mb - change (mediawiki/vagrant)
Ori.livneh has uploaded a new change for review. https://gerrit.wikimedia.org/r/62114 Change subject: Change default RAM size to 768 Mb .. Change default RAM size to 768 Mb Oh, Ruby... Change-Id: Ib7abc65355982f905596fb1d1c40ddbc7f14d4aa --- M Vagrantfile 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant refs/changes/14/62114/1 diff --git a/Vagrantfile b/Vagrantfile index 4cac6ee..80642d6 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -52,7 +52,7 @@ config.vm.provider :virtualbox do |vb| # See http://www.virtualbox.org/manual/ch08.html for additional options. -vb.customize ['modifyvm', :id, '--memory', '512'] +vb.customize ['modifyvm', :id, '--memory', '768'] vb.customize ['modifyvm', :id, '--ostype', 'Ubuntu_64'] # To boot the VM in graphical mode, uncomment the following line: -- To view, visit https://gerrit.wikimedia.org/r/62114 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib7abc65355982f905596fb1d1c40ddbc7f14d4aa Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: Ori.livneh ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Defining BINDIR before you use it is helpful - change (operations/puppet)
Dzahn has submitted this change and it was merged. Change subject: Defining BINDIR before you use it is helpful .. Defining BINDIR before you use it is helpful Change-Id: I59c62f4bd9e3ee2f9ff5552aa063523ce060400d --- M files/scap/sync-dblist 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/files/scap/sync-dblist b/files/scap/sync-dblist index 78b8667..066cd17 100755 --- a/files/scap/sync-dblist +++ b/files/scap/sync-dblist @@ -1,5 +1,7 @@ #!/bin/bash +BINDIR=/usr/local/bin + echo "Synchronizing /home/wikipedia/common/*.dblist to /usr/local/apache/common-local/*.dblist..." echo "mediawiki-installation:" -- To view, visit https://gerrit.wikimedia.org/r/62010 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I59c62f4bd9e3ee2f9ff5552aa063523ce060400d Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Reedy Gerrit-Reviewer: Dzahn Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add custom init script for multiple aggregators for labs - change (operations/puppet)
Ryan Lane has uploaded a new change for review. https://gerrit.wikimedia.org/r/62113 Change subject: Add custom init script for multiple aggregators for labs .. Add custom init script for multiple aggregators for labs Change-Id: I17722def2a54dbcd64c88aeb26dd30b4cbe78291 --- M manifests/ganglia.pp 1 file changed, 9 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/13/62113/1 diff --git a/manifests/ganglia.pp b/manifests/ganglia.pp index 198428b..8bbce6c 100644 --- a/manifests/ganglia.pp +++ b/manifests/ganglia.pp @@ -393,10 +393,16 @@ class aggregator { # This overrides the default ganglia-monitor script # with one that starts up multiple instances of gmond - file { "/etc/init.d/ganglia-monitor": + file { "/etc/init.d/ganglia-monitor-aggrs": source => "puppet:///files/ganglia/ganglia-monitor", mode => 0555, - ensure => present + ensure => present, + require => Package["ganglia-monitor"]; + } + service { "ganglia-monitor-aggrs": + require => File["/etc/init.d/ganglia-monitor-aggrs"], + enable => true, + ensure => running; } } } @@ -417,6 +423,7 @@ $ganglia_webdir = "/usr/share/ganglia-webfrontend" $ganglia_confdir = "/var/lib/ganglia/conf" + include ganglia::aggregator } else { $ganglia_servername = "ganglia.wikimedia.org" $ganglia_serveralias = "nickel.wikimedia.org ganglia3.wikimedia.org ganglia3-tip.wikimedia.org" -- To view, visit https://gerrit.wikimedia.org/r/62113 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I17722def2a54dbcd64c88aeb26dd30b4cbe78291 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ryan Lane ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fixed classification of Tor nodes to only block exit nodes. - change (mediawiki...TorBlock)
jenkins-bot has submitted this change and it was merged. Change subject: Fixed classification of Tor nodes to only block exit nodes. .. Fixed classification of Tor nodes to only block exit nodes. Switched Onionoo to use the detailed summary and to query specifically for exit nodes so that only exit nodes are blocked. Also, since the flags are now set in the URL itself, the Onionoo response will be reduced to only relevant relays. Bug: 47626 Change-Id: Ib15a9ab41ed2d3c2b6e39067e1bd9076a8b6888f --- M TorExitNodes.php 1 file changed, 26 insertions(+), 4 deletions(-) Approvals: CSteipp: Looks good to me, approved jenkins-bot: Verified diff --git a/TorExitNodes.php b/TorExitNodes.php index 4cf1e88..cb811bf 100644 --- a/TorExitNodes.php +++ b/TorExitNodes.php @@ -45,7 +45,7 @@ } $nodes = self::getExitNodes(); - return in_array( $ip, $nodes ); + return in_array( IP::sanitizeIP( $ip ), $nodes ); } /** @@ -170,7 +170,7 @@ wfProfileIn( __METHOD__ ); global $wgTorOnionooServer, $wgTorOnionooCA, $wgTorBlockProxy; - $url = wfExpandUrl( "$wgTorOnionooServer/summary", PROTO_HTTPS ); + $url = wfExpandUrl( "$wgTorOnionooServer/details?type=relay&running=true&flag=Exit", PROTO_HTTPS ); $options = array( 'caInfo' => is_readable( $wgTorOnionooCA ) ? $wgTorOnionooCA : null ); @@ -182,8 +182,30 @@ $nodes = array(); foreach ( $data['relays'] as $relay ) { - foreach ( $relay['a'] as $ip ) { - $nodes[$ip] = true; + $addresses = $relay['or_addresses']; + if ( isset( $relay['exit_addresses'] ) ) { + $addresses += $relay['exit_addresses']; + } + + foreach ( $addresses as $ip ) { + // Trim the port if it has one. + $portPosition = strrpos( $ip, ':' ); + if ( $portPosition !== false ) { + $ip = substr( $ip, 0, $portPosition ); + } + + // Trim surrounding brackets for IPv6 addresses. + $hasBrackets = $ip[0] == '['; + if ( $hasBrackets ) { + $ip = substr( $ip, 1, -1 ); + } + + if ( !IP::isValid( $ip ) ) { + wfDebug( 'Invalid IP address in Onionoo response.' ); + continue; + } + + $nodes[IP::sanitizeIP( $ip )] = true; } } $nodes = array_keys( $nodes ); -- To view, visit https://gerrit.wikimedia.org/r/62025 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib15a9ab41ed2d3c2b6e39067e1bd9076a8b6888f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TorBlock Gerrit-Branch: master Gerrit-Owner: Parent5446 Gerrit-Reviewer: CSteipp Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] (bug 48011) notlimit parameter does not accept "max" as a value - change (mediawiki...Echo)
jenkins-bot has submitted this change and it was merged. Change subject: (bug 48011) notlimit parameter does not accept "max" as a value .. (bug 48011) notlimit parameter does not accept "max" as a value Change-Id: I6bb7272b5a3df5fe9ccd3cf78a24769ca38a3f20 --- M api/ApiEchoNotifications.php 1 file changed, 3 insertions(+), 2 deletions(-) Approvals: Alex Monk: Looks good to me, approved Umherirrender: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/api/ApiEchoNotifications.php b/api/ApiEchoNotifications.php index 45a2c91..10f932b 100644 --- a/api/ApiEchoNotifications.php +++ b/api/ApiEchoNotifications.php @@ -175,10 +175,11 @@ ), ), 'limit' => array( - ApiBase::PARAM_TYPE => 'integer', + ApiBase::PARAM_TYPE => 'limit', ApiBase::PARAM_DFLT => 20, - ApiBase::PARAM_MAX => 50, ApiBase::PARAM_MIN => 1, + ApiBase::PARAM_MAX => ApiBase::LIMIT_SML1, + ApiBase::PARAM_MAX2 => ApiBase::LIMIT_SML2, ), 'index' => false, 'offset' => array( -- To view, visit https://gerrit.wikimedia.org/r/62003 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6bb7272b5a3df5fe9ccd3cf78a24769ca38a3f20 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: Bsitu Gerrit-Reviewer: Alex Monk Gerrit-Reviewer: Kaldari Gerrit-Reviewer: Lwelling Gerrit-Reviewer: Umherirrender Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] update link - change (mediawiki...Validator)
Jeroen De Dauw has submitted this change and it was merged. Change subject: update link .. update link Change-Id: Ic2c5f49db9ed71729cc04c71d64776f113d7636f --- M ParamProcessor.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jeroen De Dauw: Verified; Looks good to me, approved diff --git a/ParamProcessor.php b/ParamProcessor.php index 7186568..c8a9f29 100644 --- a/ParamProcessor.php +++ b/ParamProcessor.php @@ -73,7 +73,7 @@ 'name' => 'Validator (ParamProcessor)', 'version' => ParamProcessor_VERSION, 'author' => array( '[https://www.mediawiki.org/wiki/User:Jeroen_De_Dauw Jeroen De Dauw]' ), - 'url' => 'https://www.mediawiki.org/wiki/Extension:Validator', + 'url' => 'https://www.mediawiki.org/wiki/Extension:ParamProcessor', 'descriptionmsg' => 'validator-desc', ); -- To view, visit https://gerrit.wikimedia.org/r/62112 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic2c5f49db9ed71729cc04c71d64776f113d7636f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Validator Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw Gerrit-Reviewer: Jeroen De Dauw ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] update link - change (mediawiki...Validator)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/62112 Change subject: update link .. update link Change-Id: Ic2c5f49db9ed71729cc04c71d64776f113d7636f --- M ParamProcessor.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Validator refs/changes/12/62112/1 diff --git a/ParamProcessor.php b/ParamProcessor.php index 7186568..c8a9f29 100644 --- a/ParamProcessor.php +++ b/ParamProcessor.php @@ -73,7 +73,7 @@ 'name' => 'Validator (ParamProcessor)', 'version' => ParamProcessor_VERSION, 'author' => array( '[https://www.mediawiki.org/wiki/User:Jeroen_De_Dauw Jeroen De Dauw]' ), - 'url' => 'https://www.mediawiki.org/wiki/Extension:Validator', + 'url' => 'https://www.mediawiki.org/wiki/Extension:ParamProcessor', 'descriptionmsg' => 'validator-desc', ); -- To view, visit https://gerrit.wikimedia.org/r/62112 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic2c5f49db9ed71729cc04c71d64776f113d7636f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Validator Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Ganglia: Only define a 443 vhost if a cert is set - change (operations/puppet)
Ryan Lane has submitted this change and it was merged. Change subject: Ganglia: Only define a 443 vhost if a cert is set .. Ganglia: Only define a 443 vhost if a cert is set Change-Id: I989044ead91d3f2645bb6784fda4db1dad87e125 --- M templates/apache/sites/ganglia.wikimedia.org.erb 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Ryan Lane: Verified; Looks good to me, approved diff --git a/templates/apache/sites/ganglia.wikimedia.org.erb b/templates/apache/sites/ganglia.wikimedia.org.erb index 84dcc64..4bebcab 100644 --- a/templates/apache/sites/ganglia.wikimedia.org.erb +++ b/templates/apache/sites/ganglia.wikimedia.org.erb @@ -18,6 +18,7 @@ ErrorLog /var/log/apache2/error.log LogLevel warn +<% if @ganglia_ssl_cert %> ServerName <%= ganglia_servername %> ServerAlias <%= ganglia_serveralias %> @@ -42,3 +43,4 @@ ErrorLog /var/log/apache2/error.log LogLevel warn +<% end %> -- To view, visit https://gerrit.wikimedia.org/r/62111 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I989044ead91d3f2645bb6784fda4db1dad87e125 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ryan Lane Gerrit-Reviewer: Ryan Lane ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Ganglia: Only define a 443 vhost if a cert is set - change (operations/puppet)
Ryan Lane has uploaded a new change for review. https://gerrit.wikimedia.org/r/62111 Change subject: Ganglia: Only define a 443 vhost if a cert is set .. Ganglia: Only define a 443 vhost if a cert is set Change-Id: I989044ead91d3f2645bb6784fda4db1dad87e125 --- M templates/apache/sites/ganglia.wikimedia.org.erb 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/11/62111/1 diff --git a/templates/apache/sites/ganglia.wikimedia.org.erb b/templates/apache/sites/ganglia.wikimedia.org.erb index 84dcc64..4bebcab 100644 --- a/templates/apache/sites/ganglia.wikimedia.org.erb +++ b/templates/apache/sites/ganglia.wikimedia.org.erb @@ -18,6 +18,7 @@ ErrorLog /var/log/apache2/error.log LogLevel warn +<% if @ganglia_ssl_cert %> ServerName <%= ganglia_servername %> ServerAlias <%= ganglia_serveralias %> @@ -42,3 +43,4 @@ ErrorLog /var/log/apache2/error.log LogLevel warn +<% end %> -- To view, visit https://gerrit.wikimedia.org/r/62111 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I989044ead91d3f2645bb6784fda4db1dad87e125 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ryan Lane ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] (bug 47999) Mention notif has wrong anchor for header with link - change (mediawiki...Echo)
Bsitu has uploaded a new change for review. https://gerrit.wikimedia.org/r/62110 Change subject: (bug 47999) Mention notif has wrong anchor for header with link .. (bug 47999) Mention notif has wrong anchor for header with link Change-Id: Id295c1b4129b68e7a16db94bc32d0d1b65177012 --- M Echo.php M formatters/CommentFormatter.php 2 files changed, 9 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo refs/changes/10/62110/1 diff --git a/Echo.php b/Echo.php index d2c0578..ba52f19 100644 --- a/Echo.php +++ b/Echo.php @@ -420,10 +420,10 @@ 'group' => 'interactive', 'formatter-class' => 'EchoCommentFormatter', 'title-message' => 'notification-mention', - 'title-params' => array( 'agent', 'subject', 'title' ), + 'title-params' => array( 'agent', 'subject-anchor', 'title' ), 'payload' => array( 'summary' ), 'flyout-message' => 'notification-mention-flyout', - 'flyout-params' => array( 'agent', 'subject', 'title' ), + 'flyout-params' => array( 'agent', 'subject-anchor', 'title' ), 'email-subject-message' => 'notification-mention-email-subject', 'email-subject-params' => array( 'agent' ), 'email-body-message' => 'notification-mention-email-body', diff --git a/formatters/CommentFormatter.php b/formatters/CommentFormatter.php index a7e60ee..74734dc 100644 --- a/formatters/CommentFormatter.php +++ b/formatters/CommentFormatter.php @@ -48,9 +48,13 @@ */ protected function processParam( $event, $param, $message, $user ) { $extra = $event->getExtra(); - if ( $param === 'subject' ) { - if ( isset( $extra['section-title'] ) && $extra['section-title'] ) { - $message->params( $extra['section-title'] ); + if ( $param === 'subject-anchor' ) { + global $wgParser; + if ( !empty( $extra['section-title'] ) ) { + $message->params( + // Strip out #, keeping # in the message makes it look more clear + substr( $wgParser->guessLegacySectionNameFromWikiText( $extra['section-title'] ), 1 ) + ); } else { $message->params( '' ); } -- To view, visit https://gerrit.wikimedia.org/r/62110 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id295c1b4129b68e7a16db94bc32d0d1b65177012 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: Bsitu ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove duplicate definition issue with labs ganglia - change (operations/puppet)
Ryan Lane has submitted this change and it was merged. Change subject: Remove duplicate definition issue with labs ganglia .. Remove duplicate definition issue with labs ganglia Change-Id: I56fa957ca5789f355f20edf39f8cdf2747c4d57a --- M manifests/ganglia.pp 1 file changed, 0 insertions(+), 2 deletions(-) Approvals: Ryan Lane: Verified; Looks good to me, approved diff --git a/manifests/ganglia.pp b/manifests/ganglia.pp index d1a6702..198428b 100644 --- a/manifests/ganglia.pp +++ b/manifests/ganglia.pp @@ -417,8 +417,6 @@ $ganglia_webdir = "/usr/share/ganglia-webfrontend" $ganglia_confdir = "/var/lib/ganglia/conf" - require ganglia::aggregator - } else { $ganglia_servername = "ganglia.wikimedia.org" $ganglia_serveralias = "nickel.wikimedia.org ganglia3.wikimedia.org ganglia3-tip.wikimedia.org" -- To view, visit https://gerrit.wikimedia.org/r/62109 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I56fa957ca5789f355f20edf39f8cdf2747c4d57a Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ryan Lane Gerrit-Reviewer: Ryan Lane ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove duplicate definition issue with labs ganglia - change (operations/puppet)
Ryan Lane has uploaded a new change for review. https://gerrit.wikimedia.org/r/62109 Change subject: Remove duplicate definition issue with labs ganglia .. Remove duplicate definition issue with labs ganglia Change-Id: I56fa957ca5789f355f20edf39f8cdf2747c4d57a --- M manifests/ganglia.pp 1 file changed, 0 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/09/62109/1 diff --git a/manifests/ganglia.pp b/manifests/ganglia.pp index d1a6702..198428b 100644 --- a/manifests/ganglia.pp +++ b/manifests/ganglia.pp @@ -417,8 +417,6 @@ $ganglia_webdir = "/usr/share/ganglia-webfrontend" $ganglia_confdir = "/var/lib/ganglia/conf" - require ganglia::aggregator - } else { $ganglia_servername = "ganglia.wikimedia.org" $ganglia_serveralias = "nickel.wikimedia.org ganglia3.wikimedia.org ganglia3-tip.wikimedia.org" -- To view, visit https://gerrit.wikimedia.org/r/62109 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I56fa957ca5789f355f20edf39f8cdf2747c4d57a Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ryan Lane ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] add favicons for doc.wm and integration.wm - change (operations/puppet)
Dzahn has uploaded a new change for review. https://gerrit.wikimedia.org/r/62108 Change subject: add favicons for doc.wm and integration.wm .. add favicons for doc.wm and integration.wm < mutante> hashar: i know this is really minor and random, but favicons are popular in wmf these days File does not exist: /srv/org/wikimedia/doc/favicon.ico < mutante> just noticed in error.log it's the most common 404 < hashar> we are using another favicon which is specified in the CSS < hashar> we specify https://bits.wikimedia.org/favicon/wmf.ico in the HTML :-] < TimStarling> even if you specify a shortcut icon in the HTML, /favicon.ico is still needed < TimStarling> because it will be used for non-HTML requests, like when you open an image < TimStarling> or if you view the source of a JS file Change-Id: I6c03cdc331eb39566a2cb5e481298d68564a2362 --- A modules/contint/files/apache/wmf.ico M modules/contint/manifests/website.pp 2 files changed, 20 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/08/62108/1 diff --git a/modules/contint/files/apache/wmf.ico b/modules/contint/files/apache/wmf.ico new file mode 100644 index 000..bde61ef --- /dev/null +++ b/modules/contint/files/apache/wmf.ico Binary files differ diff --git a/modules/contint/manifests/website.pp b/modules/contint/manifests/website.pp index 58cec15..f90d4e9 100644 --- a/modules/contint/manifests/website.pp +++ b/modules/contint/manifests/website.pp @@ -24,6 +24,16 @@ owner => 'jenkins', group => 'jenkins', } + + # have a favicon, even if we also specify it in HTML + file { '/srv/org/wikmedia/integration/favicon.ico': +ensure => present, +mode => '0444' +owner => 'www-data', +group => 'www-data', +source => 'puppet:///modules/contint/apache/wmf.ico', + } + # MediaWiki code coverage file { '/srv/org/wikimedia/integration/coverage': ensure => directory, @@ -62,6 +72,16 @@ owner => 'jenkins', group => 'jenkins', } + + # have a favicon, even if we also specify it in HTML + file { '/srv/org/wikmedia/doc/favicon.ico': +ensure => present, +mode => '0444' +owner => 'www-data', +group => 'www-data', +source => 'puppet:///modules/contint/apache/wmf.ico', + } + file { '/etc/apache2/sites-available/doc.wikimedia.org': mode => '0444', owner => 'root', -- To view, visit https://gerrit.wikimedia.org/r/62108 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6c03cdc331eb39566a2cb5e481298d68564a2362 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] RTL fix for VE's link widget - change (mediawiki...VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: RTL fix for VE's link widget .. RTL fix for VE's link widget The purpose is to flip the direction of the input inside the link widget for RTL wikis, but flip it again to LTR if the user inserts an external URL. This is my first VE fix, I tried to follow conventions and avoid touching the parent objects that are unrelated to URLs. Bug: 47717 Change-Id: Ic13b9c3b155ce2979298cac9518c7419b9d45bac --- M modules/ve/ui/styles/ve.ui.Widget.css M modules/ve/ui/widgets/ve.ui.InputWidget.js M modules/ve/ui/widgets/ve.ui.LinkTargetInputWidget.js 3 files changed, 54 insertions(+), 1 deletion(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ve/ui/styles/ve.ui.Widget.css b/modules/ve/ui/styles/ve.ui.Widget.css index f066780..7eeef79 100644 --- a/modules/ve/ui/styles/ve.ui.Widget.css +++ b/modules/ve/ui/styles/ve.ui.Widget.css @@ -481,3 +481,14 @@ .ve-ui-mwCategorySortkeyForm .ve-ui-inputLabelWidget { padding: 0 0.125em 0.5em 0.125em; } + +/* RTL Definitions */ + +/* @noflip */ +.ve-ui-rtl { + direction: rtl; +} +/* @noflip */ +.ve-ui-ltr { + direction: ltr; +} \ No newline at end of file diff --git a/modules/ve/ui/widgets/ve.ui.InputWidget.js b/modules/ve/ui/widgets/ve.ui.InputWidget.js index e6ca910..725b05b 100644 --- a/modules/ve/ui/widgets/ve.ui.InputWidget.js +++ b/modules/ve/ui/widgets/ve.ui.InputWidget.js @@ -89,6 +89,21 @@ ve.ui.InputWidget.prototype.getValue = function () { return this.value; }; +/** + * Sets the direction of the current input, either RTL or LTR + * + * @method + * @param {boolean} isRTL + */ +ve.ui.InputWidget.prototype.setRTL = function( isRTL ) { + if ( isRTL ) { + this.$input.removeClass( 've-ui-ltr' ); + this.$input.addClass( 've-ui-rtl' ); + } else { + this.$input.removeClass( 've-ui-rtl' ); + this.$input.addClass( 've-ui-ltr' ); + } +}; /** * Set the value of the input. diff --git a/modules/ve/ui/widgets/ve.ui.LinkTargetInputWidget.js b/modules/ve/ui/widgets/ve.ui.LinkTargetInputWidget.js index 2545ba6..b1f0ea0 100644 --- a/modules/ve/ui/widgets/ve.ui.LinkTargetInputWidget.js +++ b/modules/ve/ui/widgets/ve.ui.LinkTargetInputWidget.js @@ -23,6 +23,11 @@ // Initialization this.$.addClass( 've-ui-linkTargetInputWidget' ); + + // Default RTL/LTR check + if ( $( 'body' ).hasClass( 'rtl' ) ) { + this.$input.addClass( 've-ui-rtl' ); + } }; /* Inheritance */ @@ -31,6 +36,29 @@ /* Methods */ +/** + * Handle value-changing events + * + * Overrides onEdit to perform RTL test based on the typed URL + * + * @method + */ +ve.ui.LinkTargetInputWidget.prototype.onEdit = function () { + if ( !this.disabled ) { + + // Allow the stack to clear so the value will be updated + setTimeout( ve.bind( function () { + // RTL/LTR check + if ( $( 'body' ).hasClass( 'rtl' ) ) { + var isExt = ve.init.platform.getExternalLinkUrlProtocolsRegExp().test( this.$input.val() ); + // If URL is external, flip to LTR. Otherwise, set back to RTL + this.setRTL( !isExt ); + } + this.setValue( this.$input.val() ); + }, this ) ); + } + +}; /** * Set the value of the input. * @@ -70,7 +98,6 @@ this.annotation = annotation; // Call parent method - ve.ui.TextInputWidget.prototype.setValue.call( this, this.getTargetFromAnnotation( annotation ) ); -- To view, visit https://gerrit.wikimedia.org/r/61960 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic13b9c3b155ce2979298cac9518c7419b9d45bac Gerrit-PatchSet: 10 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Mooeypoo Gerrit-Reviewer: Amire80 Gerrit-Reviewer: Catrope Gerrit-Reviewer: Christian Gerrit-Reviewer: Inez Gerrit-Reviewer: Jforrester Gerrit-Reviewer: Matmarex Gerrit-Reviewer: Mooeypoo Gerrit-Reviewer: Robmoen Gerrit-Reviewer: Trevor Parscal Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Removed job queue migration config. - change (operations/mediawiki-config)
Aaron Schulz has submitted this change and it was merged. Change subject: Removed job queue migration config. .. Removed job queue migration config. Change-Id: I94247e36973309d59d863334fde15e877e709ad5 --- M wmf-config/jobqueue-eqiad.php 1 file changed, 0 insertions(+), 13 deletions(-) Approvals: Aaron Schulz: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/jobqueue-eqiad.php b/wmf-config/jobqueue-eqiad.php index d4052d5..6615fe9 100644 --- a/wmf-config/jobqueue-eqiad.php +++ b/wmf-config/jobqueue-eqiad.php @@ -21,16 +21,3 @@ ) ); -$wgJobQueueMigrationConfig = array( - 'db'=> array( - 'class' => 'JobQueueDB' - ), - 'redis' => array( - 'class' => 'JobQueueRedis', - 'redisServer' => '10.64.32.76', - 'redisConfig' => array( - 'connectTimeout' => 1, - 'password' => $wmgRedisPassword, - ) - ) -); -- To view, visit https://gerrit.wikimedia.org/r/62000 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I94247e36973309d59d863334fde15e877e709ad5 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Aaron Schulz Gerrit-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] [Database] Added an upsert() function to perform/emulate ON ... - change (mediawiki/core)
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/62106 Change subject: [Database] Added an upsert() function to perform/emulate ON DUPLICATE KEY UPDATE. .. [Database] Added an upsert() function to perform/emulate ON DUPLICATE KEY UPDATE. Change-Id: Id7fc6652268a439af0457309a678677351867f37 --- M includes/db/Database.php M includes/db/DatabaseMysql.php 2 files changed, 117 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/06/62106/1 diff --git a/includes/db/Database.php b/includes/db/Database.php index b315fac..f1fdab4 100644 --- a/includes/db/Database.php +++ b/includes/db/Database.php @@ -2538,6 +2538,92 @@ } /** +* INSERT ON DUPLICATE KEY UPDATE wrapper, upserts an array into a table. +* +* This updates any conflicting rows (according to the unique indexes) using +* the provided SET clause and inserts any remaining (non-conflicted) rows. +* +* $rows may be either: +* - A single associative array. The array keys are the field names, and +* the values are the values to insert. The values are treated as data +* and will be quoted appropriately. If NULL is inserted, this will be +* converted to a database NULL. +* - An array with numeric keys, holding a list of associative arrays. +* This causes a multi-row INSERT on DBMSs that support it. The keys in +* each subarray must be identical to each other, and in the same order. +* +* It may be more efficient to leave off unique indexes which are unlikely +* to collide. However if you do this, you run the risk of encountering +* errors which wouldn't have occurred in MySQL. +* +* Usually throws a DBQueryError on failure. If errors are explicitly ignored, +* returns success. +* +* @param string $table Table name. This will be passed through DatabaseBase::tableName(). +* @param array $rows A single row or list of rows to insert +* @param array $uniqueIndexes List of single field names or field name tuples +* @param array $set An array of values to SET. For each array element, +*the key gives the field name, and the value gives the data +*to set that field to. The data will be quoted by +*DatabaseBase::addQuotes(). +* @param string $fname Calling function name (use __METHOD__) for logs/profiling +* @param array $options of options +* +* @return bool +* @since 1.22 +*/ + public function upsert( + $table, array $rows, array $uniqueIndexes, array $set, $fname = 'DatabaseBase::upsert' + ) { + if ( !count( $rows ) ) { + return true; // nothing to do + } + $rows = is_array( reset( $rows ) ) ? $rows : array( $rows ); + + if ( count( $uniqueIndexes ) ) { + $clauses = array(); // list WHERE clauses that each identify a single row + foreach ( $rows as $row ) { + foreach ( $uniqueIndexes as $index ) { + $index = is_array( $index ) ? $index : array( $index ); // columns + $rowKey = array(); // unique key to this row + foreach ( $index as $column ) { + $rowKey[$column] = $row[$column]; + } + $clauses[] = $this->makeList( $rowKey, LIST_AND ); + } + } + $where = array( $this->makeList( $clauses, LIST_OR ) ); + } else { + $where = false; + } + + $useTrx = !$this->mTrxLevel; + if ( $useTrx ) { + $this->begin(); + } + try { + # Update any existing conflicting row(s) + if ( $where !== false ) { + $ok = $this->update( $table, $set, $where, $fname ); + } else { + $ok = true; + } + # Now insert any non-conflicting row(s) + $ok = $this->insert( $table, $rows, $fname, array( 'IGNORE' ) ) && $ok; + } catch ( Exception $e ) { + if ( $useTrx ) { + $this->rollback(); + } + throw $e; + } + if ( $useTrx ) { +
[MediaWiki-commits] [Gerrit] adding db74 to pmtpa s5 until - change (operations/puppet)
Pyoungmeister has submitted this change and it was merged. Change subject: adding db74 to pmtpa s5 until .. adding db74 to pmtpa s5 until Change-Id: I38a56f93e4bcceecafddea8436c3f874ac530342 --- M manifests/role/coredb.pp M manifests/site.pp 2 files changed, 5 insertions(+), 5 deletions(-) Approvals: Pyoungmeister: Verified; Looks good to me, approved diff --git a/manifests/role/coredb.pp b/manifests/role/coredb.pp index 4fe4341..d26b5c3 100644 --- a/manifests/role/coredb.pp +++ b/manifests/role/coredb.pp @@ -41,7 +41,7 @@ 'no_master' => [] }, 's5' => { - 'hosts' => { 'pmtpa' => [ 'db44', 'db45', 'db55', 'db73' ], + 'hosts' => { 'pmtpa' => [ 'db44', 'db45', 'db55', 'db73', 'db74' ], 'eqiad' => [ 'db1005', 'db1021', 'db1026', 'db1039', 'db1058' ] }, 'primary_site' => $::mw_primary, 'masters' => { 'pmtpa' => "db73", 'eqiad' => "db1058" }, diff --git a/manifests/site.pp b/manifests/site.pp index 1ddedb5..f0d7489 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -445,10 +445,10 @@ } } -node /^db(44|45|55|73)\.pmtpa\.wmnet/ { +node /^db(44|45|55|73|74)\.pmtpa\.wmnet/ { if $hostname == "db44" { class { role::coredb::s5 : mariadb => true } - } elsif $hostname =~ /^db(55|73)/{ + } elsif $hostname =~ /^db(55|73|74)/{ class { role::coredb::s5 : mariadb => true, innodb_file_per_table => true } } else { include role::coredb::s5 @@ -537,13 +537,13 @@ ## not in use for various reasons -node /^db(42|6[12]|7[4-7])\.pmtpa\.wmnet/{ +node /^db(42|6[12]|7[5-7])\.pmtpa\.wmnet/{ include standard } # eqiad dbs node /^db10(17|42|43|49|50|51|52|56)\.eqiad\.wmnet/ { - if $hostname =~ /^db10(01|17|56)/ { + if $hostname =~ /^db10(17|56)/ { $ganglia_aggregator = true include mha::manager } -- To view, visit https://gerrit.wikimedia.org/r/62104 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I38a56f93e4bcceecafddea8436c3f874ac530342 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Pyoungmeister Gerrit-Reviewer: Pyoungmeister ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Message tweaks to new login and create acct forms - change (mediawiki/core)
Ori.livneh has submitted this change and it was merged. Change subject: Message tweaks to new login and create acct forms .. Message tweaks to new login and create acct forms * "Keep me logged in" (bug 47694) * "[Create my account]" submit button (bug 47700) * "Why you are creating another account" placeholder (bug 31888) Bug: 47694 Bug: 47700 Bug: 31888 Change-Id: I7cfa4bb36368277a934144c1724ec437c426eacf --- M includes/templates/UsercreateVForm.php M languages/messages/MessagesEn.php M languages/messages/MessagesQqq.php M maintenance/language/messages.inc 4 files changed, 15 insertions(+), 5 deletions(-) Approvals: Ori.livneh: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/includes/templates/UsercreateVForm.php b/includes/templates/UsercreateVForm.php index f379e3a..b8ce27e 100644 --- a/includes/templates/UsercreateVForm.php +++ b/includes/templates/UsercreateVForm.php @@ -185,9 +185,13 @@ if ( $this->data['usereason'] ) { ?> msg( 'createacct-reason' ); ?> - + data['reason'], 'text', array( + 'class' => 'mw-input loginText', + 'id' => 'wpReason', + 'tabindex' => '8', + 'size' => '20', + 'placeholder' => $this->getMsg( 'createacct-reason-ph' )->text() + ) ); ?> + value="msg( 'createacct-submit' ); ?>" /> haveData( 'uselang' ) ) { ?> diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 3a5d112..c03d4d5 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -1092,7 +1092,7 @@ 'createacct-yourpasswordagain'=> 'Confirm password', 'createacct-yourpasswordagain-ph' => 'Enter password again', 'remembermypassword' => 'Remember my login on this browser (for a maximum of $1 {{PLURAL:$1|day|days}})', -'userlogin-remembermypassword' => 'Remember me', +'userlogin-remembermypassword' => 'Keep me logged in', 'userlogin-signwithsecure' => 'Sign in with secure server', 'securelogin-stick-https' => 'Stay connected to HTTPS after login', 'yourdomainname' => 'Your domain:', @@ -1125,10 +1125,12 @@ 'createacct-realname' => 'Real name (optional)', 'createaccountreason' => 'Reason:', 'createacct-reason' => 'Reason', +'createacct-reason-ph'=> 'Why you are creating another account', 'createacct-captcha' => 'Security check', 'createacct-captcha-help-url' => '{{ns:Project}}:Request an account', 'createacct-imgcaptcha-help' => 'Can\'t see the image? [[{{MediaWiki:createacct-captcha-help-url}}|Request an account]]', 'createacct-imgcaptcha-ph'=> 'Enter the text you see above', +'createacct-submit' => 'Create your account', 'createacct-benefit-heading' => '{{SITENAME}} is made by people like you.', 'createacct-benefit-icon1'=> 'icon-edits', 'createacct-benefit-head1'=> '{{NUMBEROFEDITS}}', diff --git a/languages/messages/MessagesQqq.php b/languages/messages/MessagesQqq.php index fd25897..4854338 100644 --- a/languages/messages/MessagesQqq.php +++ b/languages/messages/MessagesQqq.php @@ -1165,12 +1165,14 @@ See example: [{{canonicalurl:Special:UserLogin|type=signup&useNew=1}} Special:UserLogin?type=signup&useNew=1] {{Identical|Reason}}', +'createacct-reason-ph' => 'Placeholder in vertical-layout create account form for reason field.', 'createacct-captcha' => 'Label in vertical-layout create account form for CAPTCHA input field when repositioned by JavaScript.', 'createacct-captcha-help-url' => 'The URL of a page providing CAPTCHA assistance for the wiki. Used as a link in {{msg-mw|Createacct-imgcaptcha-help}}.', 'createacct-imgcaptcha-help' => 'Help text in vertical-layout create account form for image CAPTCHA input field when repositioned by JavaScript.', 'createacct-imgcaptcha-ph' => 'Placehodler text in vertical-layout create account form for image CAPTCHA input field when repositioned by JavaScript.', +'createacct-submit' => 'Submit button on vertical-layout create account form.', 'createacct-benefit-heading' => 'In vertical-layout create account form, the heading for the section describing the benefits of creating an account. See example: [{{canonicalurl:Special:UserLogin|type=signup&useNew=1}} Special:UserLogin?type=signup&useNew=1]', diff --git a/maintenance/language/messages.inc b/maintenance/language/messages.inc index 60f2e7a..72ad621 100644 --- a/maintenance/language/messages.inc +++ b/ma
[MediaWiki-commits] [Gerrit] Adding X-Subdomain, X-Carrier, and X-CS to HTTP 301 Vary: he... - change (mediawiki...MobileFrontend)
Dr0ptp4kt has uploaded a new change for review. https://gerrit.wikimedia.org/r/62105 Change subject: Adding X-Subdomain, X-Carrier, and X-CS to HTTP 301 Vary: header. .. Adding X-Subdomain, X-Carrier, and X-CS to HTTP 301 Vary: header. Currently, the Vary header does not include these items, and thus the wrong redirect subdomain ([LANG_CODE].m.wikipedia.org, instead of [LANG_CODE].zero.wikipedia.org) may be occasionally be sent in HTTP 301 redirects for users accessing [LANG_CODE].zero.wikipedia.org. Change-Id: I903d4db7d6e4da09c7ccd7f08d43ac5a59590ee7 --- M includes/MobileFrontend.hooks.php 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/05/62105/1 diff --git a/includes/MobileFrontend.hooks.php b/includes/MobileFrontend.hooks.php index ba386bf..9d32be0 100644 --- a/includes/MobileFrontend.hooks.php +++ b/includes/MobileFrontend.hooks.php @@ -193,6 +193,9 @@ // Bug 43123: force mobile URLs only for local redirects if ( MobileContext::isLocalUrl( $redirect ) ) { + $out->addVaryHeader( 'X-Subdomain'); + $out->addVaryHeader( 'X-Carrier' ); + $out->addVaryHeader( 'X-CS' ); $redirect = $context->getMobileUrl( $redirect ); } -- To view, visit https://gerrit.wikimedia.org/r/62105 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I903d4db7d6e4da09c7ccd7f08d43ac5a59590ee7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Dr0ptp4kt ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add s6 and s7 to user-metrics api. - change (operations/puppet)
Ottomata has submitted this change and it was merged. Change subject: Add s6 and s7 to user-metrics api. .. Add s6 and s7 to user-metrics api. Change-Id: I2c31bcf5456fc60173cae9a8384e0862ea928666 --- M manifests/misc/statistics.pp 1 file changed, 12 insertions(+), 0 deletions(-) Approvals: Ottomata: Verified; Looks good to me, approved diff --git a/manifests/misc/statistics.pp b/manifests/misc/statistics.pp index d270bc8..2a41b26 100644 --- a/manifests/misc/statistics.pp +++ b/manifests/misc/statistics.pp @@ -356,6 +356,18 @@ 'host' => 's5-analytics-slave.eqiad.wmnet', 'port' => 3306, }, +'s6' => { +'user' => $passwords::mysql::research::user, +'passwd' => $passwords::mysql::research::pass, +'host' => 's6-analytics-slave.eqiad.wmnet', +'port' => 3306, +}, +'s7' => { +'user' => $passwords::mysql::research::user, +'passwd' => $passwords::mysql::research::pass, +'host' => 's7-analytics-slave.eqiad.wmnet', +'port' => 3306, +}, } package { ["python-flask", "python-flask-login"]: -- To view, visit https://gerrit.wikimedia.org/r/62099 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2c31bcf5456fc60173cae9a8384e0862ea928666 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Diederik Gerrit-Reviewer: Ottomata ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] adding db74 to pmtpa s5 until - change (operations/puppet)
Pyoungmeister has uploaded a new change for review. https://gerrit.wikimedia.org/r/62104 Change subject: adding db74 to pmtpa s5 until .. adding db74 to pmtpa s5 until Change-Id: I38a56f93e4bcceecafddea8436c3f874ac530342 --- M manifests/role/coredb.pp M manifests/site.pp 2 files changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/04/62104/1 diff --git a/manifests/role/coredb.pp b/manifests/role/coredb.pp index d9bd150..c32dd67 100644 --- a/manifests/role/coredb.pp +++ b/manifests/role/coredb.pp @@ -41,7 +41,7 @@ 'no_master' => [] }, 's5' => { - 'hosts' => { 'pmtpa' => [ 'db44', 'db45', 'db55', 'db73' ], + 'hosts' => { 'pmtpa' => [ 'db44', 'db45', 'db55', 'db73', 'db74' ], 'eqiad' => [ 'db1005', 'db1021', 'db1026', 'db1039', 'db1058' ] }, 'primary_site' => $::mw_primary, 'masters' => { 'pmtpa' => "db73", 'eqiad' => "db1058" }, diff --git a/manifests/site.pp b/manifests/site.pp index d02ffc9..2691c03 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -446,10 +446,10 @@ } } -node /^db(44|45|55|73)\.pmtpa\.wmnet/ { +node /^db(44|45|55|73|74)\.pmtpa\.wmnet/ { if $hostname == "db44" { class { role::coredb::s5 : mariadb => true } - } elsif $hostname =~ /^db(55|73)/{ + } elsif $hostname =~ /^db(55|73|74)/{ class { role::coredb::s5 : mariadb => true, innodb_file_per_table => true } } else { include role::coredb::s5 @@ -538,13 +538,13 @@ ## not in use for various reasons -node /^db(42|6[12]|7[4-7])\.pmtpa\.wmnet/{ +node /^db(42|6[12]|7[5-7])\.pmtpa\.wmnet/{ include standard } # eqiad dbs node /^db10(17|42|43|49|50|51|52|56)\.eqiad\.wmnet/ { - if $hostname =~ /^db10(01|17|56)/ { + if $hostname =~ /^db10(17|56)/ { $ganglia_aggregator = true include mha::manager } -- To view, visit https://gerrit.wikimedia.org/r/62104 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I38a56f93e4bcceecafddea8436c3f874ac530342 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Pyoungmeister ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Allow XFF spoofing from the trusted IPs - change (operations/puppet)
Yurik has uploaded a new change for review. https://gerrit.wikimedia.org/r/62103 Change subject: Allow XFF spoofing from the trusted IPs .. Allow XFF spoofing from the trusted IPs In order to do automated testing of the varnish+zero configurations, allow test frameworks to spoof source IP so that varnish would treat request as if comming from a Zero carrier. Change-Id: I25e2b0bf01bac1f2739f90efa3725e18e4494a01 --- M templates/varnish/mobile-frontend.inc.vcl.erb 1 file changed, 5 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/03/62103/1 diff --git a/templates/varnish/mobile-frontend.inc.vcl.erb b/templates/varnish/mobile-frontend.inc.vcl.erb index 6c16ffb..069cbf8 100644 --- a/templates/varnish/mobile-frontend.inc.vcl.erb +++ b/templates/varnish/mobile-frontend.inc.vcl.erb @@ -513,9 +513,11 @@ } sub vcl_recv { - /* if the request comes from Opera Mini's accelerating proxies, grab -* XFF Header and replace client ip value */ - if (client.ip ~ opera_mini) { + /* if the request comes from Opera Mini's accelerating proxies, or it came +* from the allowed_xff ip range and the XFF header is set, +* replace client ip value with the XFF Header +*/ + if (req.http.X-Forwarded-For && (client.ip ~ opera_mini || client.ip ~ allow_xff)) { C{ struct sockaddr_storage *client_ip_ss = VRT_r_client_ip(sp); struct sockaddr_in *client_ip_si = (struct sockaddr_in *) client_ip_ss; -- To view, visit https://gerrit.wikimedia.org/r/62103 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I25e2b0bf01bac1f2739f90efa3725e18e4494a01 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Yurik ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] contint: Split up apache logs by vhost - change (operations/puppet)
Dzahn has submitted this change and it was merged. Change subject: contint: Split up apache logs by vhost .. contint: Split up apache logs by vhost We had logs in access.log and some of them in other_vhosts_access.log. That is a bit confusing when tailing the log files. This patch creates three new access log files with they error files counterparts: doc_access.log : doc.(mediawiki|wikimedia).org integration_access.log : integration.(mediawiki|wikimedia).org qunit_access.log : for qunit.localhost (that is the QUnit tests being run in a headless browser). Still have to fix the Jenkins and Zuul proxies to log to different files but that will be in another patch :) Change-Id: I53c01978e509cf27b5b12d73e10088736d071757 --- M modules/contint/files/apache/doc.wikimedia.org M modules/contint/files/apache/integration.mediawiki.org M modules/contint/files/apache/integration.wikimedia.org M modules/contint/files/apache/qunit.localhost 4 files changed, 30 insertions(+), 10 deletions(-) Approvals: Dzahn: Verified; Looks good to me, approved diff --git a/modules/contint/files/apache/doc.wikimedia.org b/modules/contint/files/apache/doc.wikimedia.org index a9cacba..4ce7c06 100644 --- a/modules/contint/files/apache/doc.wikimedia.org +++ b/modules/contint/files/apache/doc.wikimedia.org @@ -7,11 +7,19 @@ ServerName doc.mediawiki.org + LogLevel warn + ErrorLog /var/log/apache2/doc_error.log + CustomLog /var/log/apache2/doc_access.log vhost_combined + Redirect permanent / https://doc.wikimedia.org/ ServerName doc.mediawiki.org + + LogLevel warn + ErrorLog /var/log/apache2/doc_error.log + CustomLog /var/log/apache2/doc_access.log vhost_combined SSLEngine on SSLCertificateFile /etc/ssl/certs/star.mediawiki.org.pem @@ -24,6 +32,10 @@ ServerName doc.wikimedia.org + LogLevel warn + ErrorLog /var/log/apache2/doc_error.log + CustomLog /var/log/apache2/doc_access.log vhost_combined + Redirect permanent / https://doc.wikimedia.org/ @@ -33,9 +45,9 @@ DocumentRoot /srv/org/wikimedia/doc - ErrorLog /var/log/apache2/error.log LogLevel warn - CustomLog /var/log/apache2/access.log combined + ErrorLog /var/log/apache2/doc_error.log + CustomLog /var/log/apache2/doc_access.log vhost_combined SSLEngine on SSLCertificateFile /etc/ssl/certs/star.wikimedia.org.pem diff --git a/modules/contint/files/apache/integration.mediawiki.org b/modules/contint/files/apache/integration.mediawiki.org index 28bf24a..9f99a0e 100644 --- a/modules/contint/files/apache/integration.mediawiki.org +++ b/modules/contint/files/apache/integration.mediawiki.org @@ -8,6 +8,10 @@ ServerName integration.mediawiki.org + LogLevel warn + ErrorLog /var/log/apache2/integration_error.log + CustomLog /var/log/apache2/integration_access.log vhost_combined + Redirect permanent / https://integration.wikimedia.org/ @@ -18,5 +22,9 @@ SSLCertificateKeyFile /etc/ssl/private/star.mediawiki.org.key SSLCACertificateFile /etc/ssl/certs/RapidSSL_CA.pem + LogLevel warn + ErrorLog /var/log/apache2/integration_error.log + CustomLog /var/log/apache2/integration_access.log vhost_combined + Redirect permanent / https://integration.wikimedia.org/ diff --git a/modules/contint/files/apache/integration.wikimedia.org b/modules/contint/files/apache/integration.wikimedia.org index 94e5e49..6fd883f 100644 --- a/modules/contint/files/apache/integration.wikimedia.org +++ b/modules/contint/files/apache/integration.wikimedia.org @@ -8,6 +8,10 @@ ServerName integration.wikimedia.org + LogLevel warn + ErrorLog /var/log/apache2/integration_error.log + CustomLog /var/log/apache2/integration_access.log vhost_combined + # Force Jenkins request through HTTPS Redirect permanent / https://integration.wikimedia.org/ @@ -23,13 +27,9 @@ SSLCertificateKeyFile /etc/ssl/private/star.wikimedia.org.key SSLCACertificateFile /etc/ssl/certs/RapidSSL_CA.pem - ErrorLog /var/log/apache2/error.log - - # Possible values include: debug, info, notice, warn, error, crit, - # alert, emerg. LogLevel warn - - CustomLog /var/log/apache2/access.log combined + ErrorLog /var/log/apache2/integration_error.log + CustomLog /var/log/apache2/integration_access.log vhost_combined Order Deny,Allow diff --git a/modules/contint/files/apache/qunit.localhost b/modules/contint/files/apache/qunit.localhost index 9181fe9..344201e 100644 --- a/modules/contint/files/apache/qunit.localhost +++ b/modules/contint/files/apache/qunit.localhost @@ -27,7 +27,7 @@ Allow from ::1/128 - ErrorLog /var/log/apache2/error.log
[MediaWiki-commits] [Gerrit] pulling db1020 for upgrade - change (operations/mediawiki-config)
Asher has submitted this change and it was merged. Change subject: pulling db1020 for upgrade .. pulling db1020 for upgrade Change-Id: I1f3e6d11892571cb1ecd2cd1aab3c2b5c003c77e --- M wmf-config/db-eqiad.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Asher: Verified; Looks good to me, approved diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php index b3f53e3..bdfb4c4 100644 --- a/wmf-config/db-eqiad.php +++ b/wmf-config/db-eqiad.php @@ -110,7 +110,7 @@ 'db1038' => 0, 'db1004' => 400, 'db1011' => 400, - 'db1020' => 100, # snapshot + #'db1020' => 100, # snapshot ), 's5' => array( 'db1058' => 0, -- To view, visit https://gerrit.wikimedia.org/r/62102 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1f3e6d11892571cb1ecd2cd1aab3c2b5c003c77e Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Asher Gerrit-Reviewer: Asher ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] pulling db1020 for upgrade - change (operations/mediawiki-config)
Asher has uploaded a new change for review. https://gerrit.wikimedia.org/r/62102 Change subject: pulling db1020 for upgrade .. pulling db1020 for upgrade Change-Id: I1f3e6d11892571cb1ecd2cd1aab3c2b5c003c77e --- M wmf-config/db-eqiad.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/02/62102/1 diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php index b3f53e3..bdfb4c4 100644 --- a/wmf-config/db-eqiad.php +++ b/wmf-config/db-eqiad.php @@ -110,7 +110,7 @@ 'db1038' => 0, 'db1004' => 400, 'db1011' => 400, - 'db1020' => 100, # snapshot + #'db1020' => 100, # snapshot ), 's5' => array( 'db1058' => 0, -- To view, visit https://gerrit.wikimedia.org/r/62102 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1f3e6d11892571cb1ecd2cd1aab3c2b5c003c77e Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Asher ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fixing Autoloader and Paths Shtuff - change (wikimedia...PaymentsListeners)
Mwalker has uploaded a new change for review. https://gerrit.wikimedia.org/r/62101 Change subject: Fixing Autoloader and Paths Shtuff .. Fixing Autoloader and Paths Shtuff The SP AutoLoader now has more intelligence about how/where to load things. It should be much more useful out of box now. Working from: https://gerrit.wikimedia.org/r/#/c/61480/1 Change-Id: I4e763a4392553fbfba4c22171a95135a04411d89 --- A SmashPig/.gitignore M SmashPig/Core/AutoLoader.php M SmashPig/Core/Http/RequestHandler.php M SmashPig/Maintenance/MaintenanceBase.php M SmashPig/PublicHttp/smashpig_http_handler.php 5 files changed, 58 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/PaymentsListeners refs/changes/01/62101/1 diff --git a/SmashPig/.gitignore b/SmashPig/.gitignore new file mode 100644 index 000..295b47b --- /dev/null +++ b/SmashPig/.gitignore @@ -0,0 +1,2 @@ +config.php +.idea diff --git a/SmashPig/Core/AutoLoader.php b/SmashPig/Core/AutoLoader.php index b1e8912..7accc76 100644 --- a/SmashPig/Core/AutoLoader.php +++ b/SmashPig/Core/AutoLoader.php @@ -14,15 +14,18 @@ /** * Installs the SmashPig AutoLoader into the class loader chain. * - * @param $defaultPath The path to the SmashPig library. + * @param string $defaultPath The path to the SmashPig library. * FIXME: this is sensitive to the final "/", requiring it. * * @return bool True if install was successful. False if the AutoLoader was already installed. */ -public static function installSmashPigAutoLoader( $defaultPath ) { +public static function installSmashPigAutoLoader( $defaultPath = null ) { if ( static::$instance ) { return false; } else { + if ( $defaultPath === null ) { + $defaultPath = AutoLoader::getInstallPath(); + } static::$instance = new AutoLoader( $defaultPath ); return true; } @@ -103,7 +106,7 @@ throw new SmashPigException( "Namespace $namespace already has a loader entry." ); } -$ref[ '@' ] = $path; +$ref[ '@' ] = realpath( $path ); } /** @@ -118,6 +121,8 @@ * - '_' in class names are treated as additional subtree delimiters * * @param string $fqcn The fully qualified class name +* +* @return bool True if the class was loaded successfully */ public function autoload( $fqcn ) { $fqcn = trim( $fqcn, '\\' ); @@ -150,6 +155,7 @@ // Replace the redirect if ( $nspath !== null ) { + $diskpath .= DIRECTORY_SEPARATOR; $classPath = str_replace( $nspath, $diskpath, $classPath ); } else { // We don't have an entry in our tree for this namespace. No point in @@ -158,11 +164,7 @@ } // Attempt to load -$classPath = str_replace( '\\', DIRECTORY_SEPARATOR, $classPath ); -if ( substr( $classPath, -1 ) !== DIRECTORY_SEPARATOR ) { -$classPath .= DIRECTORY_SEPARATOR; -} -$file = $classPath . $className . '.php'; + $file = $this->makePath( $classPath, "{$className}.php" ); // Load if exists and check success if ( file_exists( $file ) ) { @@ -180,4 +182,38 @@ return false; } } + + /** +* Make a filesystem path given a collection of parts which may be paths in and +* of themselves. E.g. makePath( '/foo/bar/', 'bash', 'config.php' ) will turn +* into '/foo/bar/bash/config.php'. The direction of the slashes is irrelevant, +* both will be turned into the system default. +* +* @param string $parts Arbitrary number of path elements +* +* @return string Path; will never have a following DIRECTORY_SEPARATOR +*/ + public static function makePath( $parts /* ... */ ) { + $params = func_get_args(); + + // Convert forward and backward slashes into system default + // At the same time, ensure that no part ends with DIR_SEP + array_walk( $params, function( &$part ) { + $part = str_replace( array( '\\', '/' ), DIRECTORY_SEPARATOR, (string)$part ); + if ( substr( $part, -1 ) === DIRECTORY_SEPARATOR ) { + $part = substr( $part, 0, -1 ); + } + } ); + + return implode( DIRECTORY_SEPARATOR, $params ); + } + + /** +* Obtains the SmashPig core install path. +* +* @return string SmashPig core install path +*/ + public static function getInstallPath() { + return
[MediaWiki-commits] [Gerrit] mediawiki.htmlform: Set minimum size for field width - change (mediawiki/core)
Ryan Lane has uploaded a new change for review. https://gerrit.wikimedia.org/r/62100 Change subject: mediawiki.htmlform: Set minimum size for field width .. mediawiki.htmlform: Set minimum size for field width Follow up to commit 02e0f09. When width: auto is set it's necessary to set a min-width for the generated chosen container and for the input of the default text added into the container. Change-Id: Ibe373bc6a89ddc33ea175f791d9c7d5415173676 --- M resources/Resources.php A resources/mediawiki/mediawiki.htmlform.css M resources/mediawiki/mediawiki.htmlform.js 3 files changed, 12 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/00/62100/1 diff --git a/resources/Resources.php b/resources/Resources.php index 0d8b330..3f2cba7 100644 --- a/resources/Resources.php +++ b/resources/Resources.php @@ -639,6 +639,7 @@ 'targets' => array( 'desktop', 'mobile' ), ), 'mediawiki.htmlform' => array( + 'styles' => 'resources/mediawiki/mediawiki.htmlform.css', 'scripts' => 'resources/mediawiki/mediawiki.htmlform.js', 'messages' => array( 'htmlform-chosen-placeholder' ), ), diff --git a/resources/mediawiki/mediawiki.htmlform.css b/resources/mediawiki/mediawiki.htmlform.css new file mode 100644 index 000..5a23af8 --- /dev/null +++ b/resources/mediawiki/mediawiki.htmlform.css @@ -0,0 +1,7 @@ +.mw-htmlform-chzn { + min-width: 120px; +} +/* Default text for chosen fields */ +.mw-htmlform-chzn .default { + min-width: 120px; +} diff --git a/resources/mediawiki/mediawiki.htmlform.js b/resources/mediawiki/mediawiki.htmlform.js index 87529b4..10a0955 100644 --- a/resources/mediawiki/mediawiki.htmlform.js +++ b/resources/mediawiki/mediawiki.htmlform.js @@ -115,12 +115,15 @@ $toConvert = $( 'table .mw-chosen' ); if ( $toConvert.length ) { $converted = convertCheckboxesToMulti( $toConvert, 'table' ); - $converted.find( '.htmlform-chzn-select' ).chosen( { width: 'auto' } ); } $toConvert = $( 'div .mw-chosen' ); if ( $toConvert.length ) { $converted = convertCheckboxesToMulti( $toConvert, 'div' ); + } + if ( $converted.length ) { $converted.find( '.htmlform-chzn-select' ).chosen( { width: 'auto' } ); + // Set a custom class for the generated container + $converted.find( '.chzn-container' ).addClass( 'mw-htmlform-chzn' ); } } ); } -- To view, visit https://gerrit.wikimedia.org/r/62100 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibe373bc6a89ddc33ea175f791d9c7d5415173676 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Ryan Lane ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add s6 and s7 to user-metrics api. - change (operations/puppet)
Diederik has uploaded a new change for review. https://gerrit.wikimedia.org/r/62099 Change subject: Add s6 and s7 to user-metrics api. .. Add s6 and s7 to user-metrics api. Change-Id: I2c31bcf5456fc60173cae9a8384e0862ea928666 --- M manifests/misc/statistics.pp 1 file changed, 12 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/99/62099/1 diff --git a/manifests/misc/statistics.pp b/manifests/misc/statistics.pp index d270bc8..2a41b26 100644 --- a/manifests/misc/statistics.pp +++ b/manifests/misc/statistics.pp @@ -356,6 +356,18 @@ 'host' => 's5-analytics-slave.eqiad.wmnet', 'port' => 3306, }, +'s6' => { +'user' => $passwords::mysql::research::user, +'passwd' => $passwords::mysql::research::pass, +'host' => 's6-analytics-slave.eqiad.wmnet', +'port' => 3306, +}, +'s7' => { +'user' => $passwords::mysql::research::user, +'passwd' => $passwords::mysql::research::pass, +'host' => 's7-analytics-slave.eqiad.wmnet', +'port' => 3306, +}, } package { ["python-flask", "python-flask-login"]: -- To view, visit https://gerrit.wikimedia.org/r/62099 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2c31bcf5456fc60173cae9a8384e0862ea928666 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Diederik ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] added exception handling to the csv uploads - change (analytics/user-metrics)
Milimetric has uploaded a new change for review. https://gerrit.wikimedia.org/r/62098 Change subject: added exception handling to the csv uploads .. added exception handling to the csv uploads Change-Id: I1b5d7d76d9df58520b51c03184bd7a37159946a6 --- M user_metrics/api/views.py 1 file changed, 51 insertions(+), 41 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/user-metrics refs/changes/98/62098/1 diff --git a/user_metrics/api/views.py b/user_metrics/api/views.py index 1585afc..d1f5093 100644 --- a/user_metrics/api/views.py +++ b/user_metrics/api/views.py @@ -168,27 +168,32 @@ ) elif request.method == 'POST': -cohort_file = request.files['csv_cohort'] -cohort_name = request.form['cohort_name'] -cohort_project = request.form['cohort_project'] - -if not query_mod.is_valid_cohort_query(cohort_name): -flash('That Cohort name is already taken.') +try: +cohort_file = request.files['csv_cohort'] +cohort_name = request.form['cohort_name'] +cohort_project = request.form['cohort_project'] + +if not query_mod.is_valid_cohort_query(cohort_name): +flash('That Cohort name is already taken.') +return redirect('/uploads/cohort') + +unparsed = csv.reader(cohort_file.stream) +unvalidated = parse_records(unparsed, cohort_project) +(valid, invalid) = validate_records(unvalidated) + +return render_template('csv_upload_review.html', +valid=valid, +invalid=invalid, +valid_json=json.dumps(valid), +invalid_json=json.dumps(invalid), +cohort_name=cohort_name, +cohort_project=cohort_project, +wiki_projects=sorted(conf.PROJECT_DB_MAP.keys()) +) +except Exception, e: +logging.debug(str(e)) +flash('The file you uploaded was not in a valid format, or could not be validated.') return redirect('/uploads/cohort') - -unparsed = csv.reader(cohort_file.stream) -unvalidated = parse_records(unparsed, cohort_project) -(valid, invalid) = validate_records(unvalidated) - -return render_template('csv_upload_review.html', -valid=valid, -invalid=invalid, -valid_json=json.dumps(valid), -invalid_json=json.dumps(invalid), -cohort_name=cohort_name, -cohort_project=cohort_project, -wiki_projects=sorted(conf.PROJECT_DB_MAP.keys()) -) def validate_cohort_name_allowed(): cohort = request.args.get('cohort_name') @@ -268,27 +273,32 @@ def upload_csv_cohort_finish(): -cohort_name = request.form.get('cohort_name') -project = request.form.get('cohort_project') -users_json = request.form.get('users') -users = json.loads(users_json) -# re-validate -available = query_mod.is_valid_cohort_query(cohort_name) -if not available: -raise Exception('cohort name `%s` is no longer available' % (cohort_name)) -(valid, invalid) = validate_records(users) -if invalid: -raise Exception('Cohort changed since last validation') -# save the cohort -if not project: -if all([user['project'] == users[0]['project'] for user in users]): -project = users[0]['project'] -logging.debug('adding cohort: %s, with project: %s', cohort_name, project) -owner_id = current_user.id -query_mod.create_cohort(cohort_name, project, owner=owner_id) -query_mod.add_cohort_users(cohort_name, valid) -return url_for('cohort', cohort=cohort_name) -#return url_for('all_cohorts') +try: +cohort_name = request.form.get('cohort_name') +project = request.form.get('cohort_project') +users_json = request.form.get('users') +users = json.loads(users_json) +# re-validate +available = query_mod.is_valid_cohort_query(cohort_name) +if not available: +raise Exception('cohort name `%s` is no longer available' % (cohort_name)) +(valid, invalid) = validate_records(users) +if invalid: +raise Exception('Cohort changed since last validation') +# save the cohort +if not project: +if all([user['project'] == users[0]['project'] for user in users]): +project = users[0]['project'] +logging.debug('adding cohort: %s, with project: %s', cohort_name, project) +owner_id = current_user.id +query_mod.create_cohort(cohort_name, project, owner=owner_id) +query_mod.add_cohort_users(cohort_name, valid) +return url_for('cohort', cohort=cohort_name) +#return url_for('all_cohorts') +except Exception, e: +
[MediaWiki-commits] [Gerrit] Banner preview is done in an iframe - change (mediawiki...CentralNotice)
Adamw has uploaded a new change for review. https://gerrit.wikimedia.org/r/62097 Change subject: Banner preview is done in an iframe .. Banner preview is done in an iframe Change-Id: I1baa8023d5439cee226a3d751c8402af15150c71 --- M CentralNotice.i18n.php M CentralNotice.php M includes/HtmlFormElements/HTMLCentralNoticeBanner.php M modules/ext.centralNotice.adminUi/centralnotice.js M modules/ext.centralNotice.bannerController/bannerController.js M special/SpecialCentralNoticeBanners.php 6 files changed, 62 insertions(+), 16 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralNotice refs/changes/97/62097/1 diff --git a/CentralNotice.i18n.php b/CentralNotice.i18n.php index cbc7985..8b719b2 100644 --- a/CentralNotice.i18n.php +++ b/CentralNotice.i18n.php @@ -229,6 +229,7 @@ 'centralnotice-delete-banner-cancel' => 'Cancel', 'centralnotice-banner-bad-js' => 'A banner on this page has invalid JavaScript code and is preventing CentralNotice from initializing correctly. Please fix the banner.', + 'centralnotice-noiframe' => 'This element cannot be displayed without iframes.', ); /** Message documentation (Message documentation) @@ -621,6 +622,7 @@ {{Identical|Anonymous}}', 'centralnotice-user-role-logged-in' => 'Label for the logged-in user role', 'centralnotice-banner-bad-js' => 'Text to display when CentralNotice fails to initialize due to broken JavaScript code present in a banner.', + 'centralnotice-noiframe' => 'Inform the user that banner previewing has failed because their browser does not support iframes.', ); /** Afrikaans (Afrikaans) diff --git a/CentralNotice.php b/CentralNotice.php index 5183efc..5b20cca 100644 --- a/CentralNotice.php +++ b/CentralNotice.php @@ -121,6 +121,13 @@ 'centralnotice-delete-banner-cancel', ) ); +$wgResourceModules[ 'ext.centralNotice.adminUi.previewSkin' ] = array( + 'localBasePath' => $dir . '/modules/ext.centralNotice.adminUi.previewSkin', + 'remoteExtPath' => 'CentralNotice/modules/ext.centralNotice.adminUi.previewSkin', + 'styles' => array( + 'previewSkin.css', + ), +); $wgResourceModules[ 'ext.centralNotice.bannerStats' ] = array( 'localBasePath' => $dir . '/modules', 'remoteExtPath' => 'CentralNotice/modules', @@ -339,6 +346,7 @@ // Register files $wgAutoloadClasses[ 'CentralNotice' ] = $specialDir . 'SpecialCentralNotice.php'; $wgAutoloadClasses[ 'SpecialBannerLoader' ] = $specialDir . 'SpecialBannerLoader.php'; + $wgAutoloadClasses[ 'SpecialBannerPreview' ] = $specialDir . 'SpecialBannerPreview.php'; $wgAutoloadClasses[ 'SpecialBannerRandom' ] = $specialDir . 'SpecialBannerRandom.php'; $wgAutoloadClasses[ 'SpecialRecordImpression' ] = $specialDir . 'SpecialRecordImpression.php'; $wgAutoloadClasses[ 'SpecialHideBanners' ] = $specialDir . 'SpecialHideBanners.php'; @@ -388,6 +396,7 @@ // Register special pages $wgSpecialPages[ 'BannerLoader' ] = 'SpecialBannerLoader'; + $wgSpecialPages[ 'BannerPreview' ] = 'SpecialBannerPreview'; $wgSpecialPages[ 'BannerRandom' ] = 'SpecialBannerRandom'; $wgSpecialPages[ 'RecordImpression' ] = 'SpecialRecordImpression'; $wgSpecialPages[ 'HideBanners' ] = 'SpecialHideBanners'; diff --git a/includes/HtmlFormElements/HTMLCentralNoticeBanner.php b/includes/HtmlFormElements/HTMLCentralNoticeBanner.php index a3b978e..6f79ddf 100644 --- a/includes/HtmlFormElements/HTMLCentralNoticeBanner.php +++ b/includes/HtmlFormElements/HTMLCentralNoticeBanner.php @@ -38,15 +38,30 @@ public function getInputHTML( $value ) { global $wgOut; - $context = new DerivativeContext( $wgOut->getContext() ); + $bannerName = $this->mParams['banner']; if ( array_key_exists( 'language', $this->mParams ) ) { - $context->setLanguage( $this->mParams['language'] ); + $language = $this->mParams['language']; + } else { + $language = $wgOut->getContext()->getLanguage()->getCode(); } - $bannerName = $this->mParams['banner']; - $banner = new Banner( $bannerName ); - $renderer = new BannerRenderer( $context, $banner ); - $preview = $renderer->toHtml(); + $previewUrl = SpecialPage::getTitleFor( 'BannerPreview' )->getLocalURL( + '', + array( + 'banner' => $bannerName, + 'uselang' => $language, + ) + ); + $preview = Xml::tags( + 'iframe', + array( + 'src' => $previewUrl,
[MediaWiki-commits] [Gerrit] Fixing Autoloader and Paths Shtuff - change (wikimedia...PaymentsListeners)
Mwalker has uploaded a new change for review. https://gerrit.wikimedia.org/r/62096 Change subject: Fixing Autoloader and Paths Shtuff .. Fixing Autoloader and Paths Shtuff The SP AutoLoader now has more intelligence about how/where to load things. It should be much more useful out of box now. Working from: https://gerrit.wikimedia.org/r/#/c/61480/1 Change-Id: Id9c946006778e7ffae7f7bace5376482b2341523 --- M SmashPig/Core/AutoLoader.php M SmashPig/Core/Http/RequestHandler.php M SmashPig/Maintenance/MaintenanceBase.php M SmashPig/PublicHttp/smashpig_http_handler.php A SmashPig/config.php 5 files changed, 108 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/PaymentsListeners refs/changes/96/62096/1 diff --git a/SmashPig/Core/AutoLoader.php b/SmashPig/Core/AutoLoader.php index b1e8912..7accc76 100644 --- a/SmashPig/Core/AutoLoader.php +++ b/SmashPig/Core/AutoLoader.php @@ -14,15 +14,18 @@ /** * Installs the SmashPig AutoLoader into the class loader chain. * - * @param $defaultPath The path to the SmashPig library. + * @param string $defaultPath The path to the SmashPig library. * FIXME: this is sensitive to the final "/", requiring it. * * @return bool True if install was successful. False if the AutoLoader was already installed. */ -public static function installSmashPigAutoLoader( $defaultPath ) { +public static function installSmashPigAutoLoader( $defaultPath = null ) { if ( static::$instance ) { return false; } else { + if ( $defaultPath === null ) { + $defaultPath = AutoLoader::getInstallPath(); + } static::$instance = new AutoLoader( $defaultPath ); return true; } @@ -103,7 +106,7 @@ throw new SmashPigException( "Namespace $namespace already has a loader entry." ); } -$ref[ '@' ] = $path; +$ref[ '@' ] = realpath( $path ); } /** @@ -118,6 +121,8 @@ * - '_' in class names are treated as additional subtree delimiters * * @param string $fqcn The fully qualified class name +* +* @return bool True if the class was loaded successfully */ public function autoload( $fqcn ) { $fqcn = trim( $fqcn, '\\' ); @@ -150,6 +155,7 @@ // Replace the redirect if ( $nspath !== null ) { + $diskpath .= DIRECTORY_SEPARATOR; $classPath = str_replace( $nspath, $diskpath, $classPath ); } else { // We don't have an entry in our tree for this namespace. No point in @@ -158,11 +164,7 @@ } // Attempt to load -$classPath = str_replace( '\\', DIRECTORY_SEPARATOR, $classPath ); -if ( substr( $classPath, -1 ) !== DIRECTORY_SEPARATOR ) { -$classPath .= DIRECTORY_SEPARATOR; -} -$file = $classPath . $className . '.php'; + $file = $this->makePath( $classPath, "{$className}.php" ); // Load if exists and check success if ( file_exists( $file ) ) { @@ -180,4 +182,38 @@ return false; } } + + /** +* Make a filesystem path given a collection of parts which may be paths in and +* of themselves. E.g. makePath( '/foo/bar/', 'bash', 'config.php' ) will turn +* into '/foo/bar/bash/config.php'. The direction of the slashes is irrelevant, +* both will be turned into the system default. +* +* @param string $parts Arbitrary number of path elements +* +* @return string Path; will never have a following DIRECTORY_SEPARATOR +*/ + public static function makePath( $parts /* ... */ ) { + $params = func_get_args(); + + // Convert forward and backward slashes into system default + // At the same time, ensure that no part ends with DIR_SEP + array_walk( $params, function( &$part ) { + $part = str_replace( array( '\\', '/' ), DIRECTORY_SEPARATOR, (string)$part ); + if ( substr( $part, -1 ) === DIRECTORY_SEPARATOR ) { + $part = substr( $part, 0, -1 ); + } + } ); + + return implode( DIRECTORY_SEPARATOR, $params ); + } + + /** +* Obtains the SmashPig core install path. +* +* @return string SmashPig core install path +*/ + public static function getInstallPath() { + return realpath( AutoLoader::makePath( __DIR__, '..' ) ); + } } diff --git a/SmashPig/Core/Http/RequestHandler.php b/SmashPig/Core/Http/RequestHandler.php index d3a610d..e
[MediaWiki-commits] [Gerrit] building db1059 - to be the new s4 master which switching to... - change (operations/puppet)
Asher has submitted this change and it was merged. Change subject: building db1059 - to be the new s4 master which switching to mariadb, upgrading db1020 .. building db1059 - to be the new s4 master which switching to mariadb, upgrading db1020 Change-Id: I6cb618f837dc85b7e7e97f7b2f89d4c89ead210b --- M manifests/role/coredb.pp M manifests/site.pp 2 files changed, 3 insertions(+), 3 deletions(-) Approvals: Asher: Verified; Looks good to me, approved diff --git a/manifests/role/coredb.pp b/manifests/role/coredb.pp index d9bd150..4fe4341 100644 --- a/manifests/role/coredb.pp +++ b/manifests/role/coredb.pp @@ -34,7 +34,7 @@ }, 's4' => { 'hosts' => { 'pmtpa' => [ 'db31', 'db51', 'db65', 'db72' ], - 'eqiad' => [ 'db1004', 'db1011', 'db1020', 'db1038' ] }, + 'eqiad' => [ 'db1004', 'db1011', 'db1020', 'db1038', 'db1059' ] }, 'primary_site' => $::mw_primary, 'masters' => { 'pmtpa' => "db31", 'eqiad' => "db1038" }, 'snapshot' => [ "db65", "db1020" ], diff --git a/manifests/site.pp b/manifests/site.pp index c1e1177..1ddedb5 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -573,8 +573,8 @@ } } -node /^db10(04|11|20|38)\.eqiad\.wmnet/ { - if $hostname =~ /^db10(04|11)/ { +node /^db10(04|11|20|38|59)\.eqiad\.wmnet/ { + if $hostname =~ /^db10(04|11|20|59)/ { class { role::coredb::s4 : mariadb => true } } else { include role::coredb::s4 -- To view, visit https://gerrit.wikimedia.org/r/62093 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6cb618f837dc85b7e7e97f7b2f89d4c89ead210b Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Asher Gerrit-Reviewer: Asher ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] WMF: workaround Jenkins API slowness - change (integration/zuul)
Hashar has submitted this change and it was merged. Change subject: WMF: workaround Jenkins API slowness .. WMF: workaround Jenkins API slowness The calls to the jobs /api/json are really slow because they parse the whole build history. This work around will make Zuul believe the job always exist. Change-Id: Icdf2b70ede617e94eed53e6498fff71f403792db --- M zuul/launcher/jenkins.py 1 file changed, 7 insertions(+), 0 deletions(-) Approvals: Hashar: Verified; Looks good to me, approved diff --git a/zuul/launcher/jenkins.py b/zuul/launcher/jenkins.py index 1e58bce..63cc21f 100644 --- a/zuul/launcher/jenkins.py +++ b/zuul/launcher/jenkins.py @@ -206,6 +206,13 @@ params) self.jenkins_open(request) +def job_exists(self, name): +"""Lame hack by Hashar to skip reading the job infos +from Jenkins. That is very slow since wikimedia keeps +a ton of history. +Patch devised by James E. Blair from Opestack.""" +return True + class Jenkins(object): log = logging.getLogger("zuul.Jenkins") -- To view, visit https://gerrit.wikimedia.org/r/62095 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icdf2b70ede617e94eed53e6498fff71f403792db Gerrit-PatchSet: 1 Gerrit-Project: integration/zuul Gerrit-Branch: master Gerrit-Owner: Hashar Gerrit-Reviewer: Hashar ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] WMF: workaround Jenkins API slowness - change (integration/zuul)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/62095 Change subject: WMF: workaround Jenkins API slowness .. WMF: workaround Jenkins API slowness The calls to the jobs /api/json are really slow because they parse the whole build history. This work around will make Zuul believe the job always exist. Change-Id: Icdf2b70ede617e94eed53e6498fff71f403792db --- M zuul/launcher/jenkins.py 1 file changed, 7 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/zuul refs/changes/95/62095/1 diff --git a/zuul/launcher/jenkins.py b/zuul/launcher/jenkins.py index 1e58bce..63cc21f 100644 --- a/zuul/launcher/jenkins.py +++ b/zuul/launcher/jenkins.py @@ -206,6 +206,13 @@ params) self.jenkins_open(request) +def job_exists(self, name): +"""Lame hack by Hashar to skip reading the job infos +from Jenkins. That is very slow since wikimedia keeps +a ton of history. +Patch devised by James E. Blair from Opestack.""" +return True + class Jenkins(object): log = logging.getLogger("zuul.Jenkins") -- To view, visit https://gerrit.wikimedia.org/r/62095 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icdf2b70ede617e94eed53e6498fff71f403792db Gerrit-PatchSet: 1 Gerrit-Project: integration/zuul Gerrit-Branch: master Gerrit-Owner: Hashar ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Utility to dump campaign logs - change (wikimedia...tools)
Adamw has uploaded a new change for review. https://gerrit.wikimedia.org/r/62094 Change subject: Utility to dump campaign logs .. Utility to dump campaign logs Change-Id: I286e6faf897c11101918bed204ca0aacacc969b7 --- A live_analysis/dump_tests.py 1 file changed, 50 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/tools refs/changes/94/62094/1 diff --git a/live_analysis/dump_tests.py b/live_analysis/dump_tests.py new file mode 100644 index 000..9e3d866 --- /dev/null +++ b/live_analysis/dump_tests.py @@ -0,0 +1,50 @@ +#!/usr/bin/env python + +"""Script to dump campaign logs to a file +""" + +import csv +import sys +from fr.tests.spec import FrTestSpec, parse_spec +from fr.centralnotice import get_campaign_logs + +def is_relevant(entry): +''' +This change enabled/disabled a test; or an enabled test has been mutated. +''' +if not entry['end']['banners']: +return False + +if 'enabled' in entry['added'] or entry['begin']['enabled'] is 1: +return True + +def fetch(): +out = csv.DictWriter(sys.stdout, [ +'campaign', +'banner', +'start', +'end', +#FIXME: 'lps', +], delimiter="\t") + +out.writeheader() + +since = 2009 +# FIXME: the api does not lend itself to paging. + +while True: +logs = get_campaign_logs(since=since) + +for test in logs: +if is_relevant(test): +for banner in test['end']['banners'].keys(): +out.writerow( { +'campaign': test['campaign'], +'banner': banner, +'start': test['end']['start'], +'end': test['end']['end'], +} ) + +break + +fetch() -- To view, visit https://gerrit.wikimedia.org/r/62094 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I286e6faf897c11101918bed204ca0aacacc969b7 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/tools Gerrit-Branch: master Gerrit-Owner: Adamw ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] building db1059 - to be the new s4 master which switching to... - change (operations/puppet)
Asher has uploaded a new change for review. https://gerrit.wikimedia.org/r/62093 Change subject: building db1059 - to be the new s4 master which switching to mariadb, upgrading db1020 .. building db1059 - to be the new s4 master which switching to mariadb, upgrading db1020 Change-Id: I6cb618f837dc85b7e7e97f7b2f89d4c89ead210b --- M manifests/role/coredb.pp M manifests/site.pp 2 files changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/93/62093/1 diff --git a/manifests/role/coredb.pp b/manifests/role/coredb.pp index d9bd150..4fe4341 100644 --- a/manifests/role/coredb.pp +++ b/manifests/role/coredb.pp @@ -34,7 +34,7 @@ }, 's4' => { 'hosts' => { 'pmtpa' => [ 'db31', 'db51', 'db65', 'db72' ], - 'eqiad' => [ 'db1004', 'db1011', 'db1020', 'db1038' ] }, + 'eqiad' => [ 'db1004', 'db1011', 'db1020', 'db1038', 'db1059' ] }, 'primary_site' => $::mw_primary, 'masters' => { 'pmtpa' => "db31", 'eqiad' => "db1038" }, 'snapshot' => [ "db65", "db1020" ], diff --git a/manifests/site.pp b/manifests/site.pp index c1e1177..1ddedb5 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -573,8 +573,8 @@ } } -node /^db10(04|11|20|38)\.eqiad\.wmnet/ { - if $hostname =~ /^db10(04|11)/ { +node /^db10(04|11|20|38|59)\.eqiad\.wmnet/ { + if $hostname =~ /^db10(04|11|20|59)/ { class { role::coredb::s4 : mariadb => true } } else { include role::coredb::s4 -- To view, visit https://gerrit.wikimedia.org/r/62093 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6cb618f837dc85b7e7e97f7b2f89d4c89ead210b Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Asher ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] SpecialRedirect: Add @since documentation and add release notes - change (mediawiki/core)
GWicke has submitted this change and it was merged. Change subject: SpecialRedirect: Add @since documentation and add release notes .. SpecialRedirect: Add @since documentation and add release notes The Special:Redirect page was added in change I8b0785f4fbdb3dd438a7a45263c5f375ff9d2208. Change-Id: I1a4b9a8b0a008f16e554f7edc2f21b7142fde8d4 --- M RELEASE-NOTES-1.22 M includes/specials/SpecialRedirect.php 2 files changed, 4 insertions(+), 0 deletions(-) Approvals: Krinkle: Looks good to me, approved GWicke: Verified; Looks good to me, approved diff --git a/RELEASE-NOTES-1.22 b/RELEASE-NOTES-1.22 index ffdaa39..850b43d 100644 --- a/RELEASE-NOTES-1.22 +++ b/RELEASE-NOTES-1.22 @@ -126,6 +126,9 @@ * The Special:ActiveUsers special page was removed. * BREAKING CHANGE: mw.util.tooltipAccessKeyRegexp: The match group for the accesskey character is now $6 instead of $5. +* A new Special:Redirect page was added, providing lookup by revision ID, + user ID, or file name. The old Special:Filepath page was reimplemented + to redirect through Special:Redirect. == Compatibility == diff --git a/includes/specials/SpecialRedirect.php b/includes/specials/SpecialRedirect.php index 5ea98d5..210cee6 100644 --- a/includes/specials/SpecialRedirect.php +++ b/includes/specials/SpecialRedirect.php @@ -27,6 +27,7 @@ * the file for a given filename, or the page for a given revision id. * * @ingroup SpecialPage + * @since 1.22 */ class SpecialRedirect extends FormSpecialPage { -- To view, visit https://gerrit.wikimedia.org/r/61982 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1a4b9a8b0a008f16e554f7edc2f21b7142fde8d4 Gerrit-PatchSet: 5 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Cscott Gerrit-Reviewer: Cscott Gerrit-Reviewer: GWicke Gerrit-Reviewer: Krinkle Gerrit-Reviewer: Nikerabbit Gerrit-Reviewer: Parent5446 Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Better match PHP's \s expression when parsing optional spaces. - change (mediawiki...Parsoid)
Cscott has uploaded a new change for review. https://gerrit.wikimedia.org/r/62092 Change subject: Better match PHP's \s expression when parsing optional spaces. .. Better match PHP's \s expression when parsing optional spaces. The \s expression matches form feed. Also changed a few space productions to space_and_newline where I could tell by inspection of the PHP parser source (and testing on a local mediawiki install) that \s was used and newlines should be permitted. Change-Id: Ifd06542356dfbda4d069c8f320bf1ac797688bbc --- M js/lib/pegTokenizer.pegjs.txt 1 file changed, 35 insertions(+), 14 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Parsoid refs/changes/92/62092/1 diff --git a/js/lib/pegTokenizer.pegjs.txt b/js/lib/pegTokenizer.pegjs.txt index 3ad584b..185112e 100644 --- a/js/lib/pegTokenizer.pegjs.txt +++ b/js/lib/pegTokenizer.pegjs.txt @@ -826,7 +826,7 @@ ) autoref - = ref:('RFC' / 'PMID') (newline / space)+ identifier:[0-9]+ + = ref:('RFC' / 'PMID') space_or_newline+ identifier:[0-9]+ { identifier = identifier.join(''); @@ -847,10 +847,11 @@ } isbn - = 'ISBN' (newline / space)+ + = 'ISBN' space_or_newline+ head:[0-9] digits:(d:( c:[- ] &[0-9] { return c; } / [0-9] ) { return d; } )+ tail:'X'? +end_of_word { // TODO: round-trip non-decimals too! var isbn = [head, digits.join(''), tail].join(''), @@ -1008,7 +1009,7 @@ template_param = name:template_param_name // MW accepts |foo | = bar | as a single param.. -('|' (space / newline)* &'=')? +('|' space_or_newline* &'=')? val:( kEndPos:({return pos;}) optionalSpaceToken @@ -1210,8 +1211,12 @@ } / & { return stops.pop( 'pipe' ); } +/* the space around img_option is actually processed with php trim() + * which technically allows \0 and \x0b (and doesn't trim \x0c) but in + * interests of sanity we're using the standard \s* production. */ + img_option - = pipe space* + = pipe space_or_newline* o:( img_attribute / img_format @@ -1221,7 +1226,7 @@ / img_link / lt:link_text { return new KV('caption', lt); } ) - space* { + space_or_newline* { return o; }; @@ -1231,7 +1236,7 @@ } img_dimensions - = x:(n:[0-9]+ { return n.join(''); })? y:('x' n:[0-9]+ { return n.join(''); })? 'px' { + = x:(n:[0-9]+ { return n.join(''); })? y:('x' n:[0-9]+ { return n.join(''); })? (space_or_newline* 'px')? { if ( x === '' && y ) { return new KV( 'height', y ); } else if ( y === '' && x ) { @@ -1623,7 +1628,7 @@ = "<" end:"/"? name:[0-9a-zA-Z]+ attribs:generic_newline_attribute* -( space / newline ) * +space_or_newline* selfclose:"/"? ">" { name = name.join(''); @@ -1642,11 +1647,11 @@ // A generic attribute that can span multiple lines. generic_newline_attribute - = s:( space / newline )+ + = s:space_or_newline+ namePos0:({return pos;}) name:generic_attribute_name namePos:({return pos;}) -valueData:(( space / newline )* +valueData:( space_or_newline* v:generic_attribute_newline_value { return v; })? { //console.warn('generic_newline_attribute: ' + pp( name )) @@ -1710,7 +1715,7 @@ // A generic attribute, possibly spanning multiple lines. generic_attribute_newline_value - = "=" v:((space / newline )* vv:xml_att_value { return vv; })? { + = "=" v:( space_or_newline* vv:xml_att_value { return vv; })? { return v === '' ? [] : v; } // A generic but single-line attribute. @@ -1763,7 +1768,7 @@ = "<" end:"/"? name:(cs:[a-zA-Z]+ { return cs.join(''); }) attribs:generic_newline_attribute* -( space / newline ) * +space_or_newline* selfclose:"/"? ">" { var lcName = name.toLowerCase(); @@ -2174,6 +2179,22 @@ } } +/* This production corresponds to \s in the PHP preg_* functions, + * which is used frequently in the PHP parser. The inclusion of + * form feed (but not other whitespace, like vertical tab) is a quirk + * of Perl, which PHP inherited via the PCRE (Perl-Compatible Regular + * Expressions) library. + */ +space_or_newline + = [ \t\n\r\x0c] + +/* This production corresponds to \b in the PHP preg_* functions, + * after a word character. That is, it's a zero-width lookahead that + * the next character is not a word character. + */ +end_of_word + = eof / ! [A-Za-z0-9_] + // Extra newlines followed by at least another newline. Usually used to // compress surplus newlines into a meta tag, so that they don't trigger // paragraphs. @@ -2252,7 +2273,7 @@ */ include_limits = - "" { + "" { // End tag only name = name.join(''); var incl = name.toLowerCase(); @@ -2267,7 +2288,7 @@ return null; } } - / inclTag:("<" name:[0-9a-zA-Z]+ (space / newline)* ">" { + / inclTag:("<" name:[0-9a-zA-Z]+ space_or_newline* "
[MediaWiki-commits] [Gerrit] Add getMagicWordMatcher function to WikiConfig. - change (mediawiki...Parsoid)
Cscott has uploaded a new change for review. https://gerrit.wikimedia.org/r/62090 Change subject: Add getMagicWordMatcher function to WikiConfig. .. Add getMagicWordMatcher function to WikiConfig. This returns a regular expression which will match a given non-parameterized magic word. Change-Id: I89d3aac74315caeda01cb97999b9f7521fbb6ff4 --- M js/lib/mediawiki.WikiConfig.js 1 file changed, 32 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Parsoid refs/changes/90/62090/1 diff --git a/js/lib/mediawiki.WikiConfig.js b/js/lib/mediawiki.WikiConfig.js index b0fdba8..97ff9ab 100644 --- a/js/lib/mediawiki.WikiConfig.js +++ b/js/lib/mediawiki.WikiConfig.js @@ -6,6 +6,12 @@ Util = require( './mediawiki.Util.js' ).Util, request = require( 'request' ); +// escape 'special' characters in a regexp, returning a regexp which matches +// the string exactly +var re_escape = function(s) { + return s.replace(/[\^\\$*+?.()|{}\[\]]/g, '\\$&'); +}; + /** * @class * @@ -105,6 +111,11 @@ conf.magicWords[alias] = mw.name; conf.mwAliases[mw.name].push( alias ); } + conf.mwRegexps[mw.name] = + new RegExp( '^(' + + conf.mwAliases[mw.name].map(re_escape).join('|') + + ')$', + mw['case-sensitive'] === '' ? '' : 'i' ); } if ( mws.length > 0 ) { @@ -274,6 +285,11 @@ mwAliases: null, /** +* @property {Object/null} mwRegexp RegExp matching aliases, indexed by canonical magic word name. +*/ + mwRegexps: null, + + /** * @property {Object/null} specialPages Special page names on this wiki, indexed by aliases. */ specialPages: null, @@ -318,6 +334,7 @@ this.namespaceIds = {}; this.magicWords = {}; this.mwAliases = {}; + this.mwRegexps = {}; this.specialPages = {}; this.extensionTags = {}; this.interpolatedList = []; @@ -336,8 +353,21 @@ * @param {string} alias * @returns {string} */ - getMagicWord: function ( alias ) { + getMagicWordIdFromAlias: function ( alias ) { return this.magicWords[alias] || null; + }, + + /** +* @method +* +* Get a regexp matching a localized magic word, given its id. +* +* @param {string} id +* @return {RegExp} +*/ + getMagicWordMatcher: function ( id ) { + // if 'id' is not found, return a regexp which will never match. + return this.mwRegexps[id] || /[]/; }, /** @@ -369,7 +399,7 @@ if ( alias === null ) { return null; } - canonical = this.getMagicWord( alias ); + canonical = this.getMagicWordIdFromAlias( alias ); if ( canonical !== null ) { return { k: canonical, v: value, a: alias }; } -- To view, visit https://gerrit.wikimedia.org/r/62090 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I89d3aac74315caeda01cb97999b9f7521fbb6ff4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Parsoid Gerrit-Branch: master Gerrit-Owner: Cscott ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add 'sof' production to pegTokenizer, to complement 'eof' pr... - change (mediawiki...Parsoid)
Cscott has uploaded a new change for review. https://gerrit.wikimedia.org/r/62091 Change subject: Add 'sof' production to pegTokenizer, to complement 'eof' production. .. Add 'sof' production to pegTokenizer, to complement 'eof' production. This production will be used for #REDIRECT processing, since the #REDIRECT must appear at the start of the file. Change-Id: I5acc9971d5084750943ba9869c1293d89e0fb122 --- M js/lib/pegTokenizer.pegjs.txt 1 file changed, 7 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Parsoid refs/changes/91/62091/1 diff --git a/js/lib/pegTokenizer.pegjs.txt b/js/lib/pegTokenizer.pegjs.txt index d6f8ddc..3ad584b 100644 --- a/js/lib/pegTokenizer.pegjs.txt +++ b/js/lib/pegTokenizer.pegjs.txt @@ -315,6 +315,11 @@ // cache the input length var inputLength = input.length; +// pseudo-production that matches at start of input +var isSOF = function (pos) { +return pos === 0; +}; + // pseudo-production that matches at end of input var isEOF = function (pos) { return pos === inputLength; @@ -2329,6 +2334,8 @@ return [inclTag].concat(inclContentToks); } +sof = & { return isSOF(pos); } { return true; } + eof = & { return isEOF(pos); } { return true; } newline = '\n' / '\r\n' -- To view, visit https://gerrit.wikimedia.org/r/62091 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5acc9971d5084750943ba9869c1293d89e0fb122 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Parsoid Gerrit-Branch: master Gerrit-Owner: Cscott ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Don't ignore data-parsoid in DOMDiff, attempt 2 - change (mediawiki...Parsoid)
GWicke has uploaded a new change for review. https://gerrit.wikimedia.org/r/62089 Change subject: Don't ignore data-parsoid in DOMDiff, attempt 2 .. Don't ignore data-parsoid in DOMDiff, attempt 2 This is a fixed version of Subbu's 2c45ade9723ea06f538ff5b2255dcb5d1fbbd601, which I reverted due to https://bugzilla.wikimedia.org/show_bug.cgi?id=48018. * In VE, sometimes wrappers get moved around without their content which can cause p-wrapper of deleted content to be used on identical undeleted content. Since the identical undeleted content is marked as unchanged, selser tries to emit use dsr from its wrapper to emit original src, but the wrapper is not the right one and leads selser to emit more/less text depending on how VE manipulated the wrappers. Discovered via: /mnt/bugs/2013-05-01T09:43:14.960Z-Reverse_innovation * Unrelated fixes: Updated debugging output in DOMDiff. * Tested via: node parse --html2wt --selser --domdiff domdiff.diff.html --oldtextfile wt < editedHtml which emitted duplicate text before this patch and emits correct text after this patch. * parserTests results: - Inexplicably, this patch causes selser to reuse more original source fragments on parserTests. - Leads to one selser test passing (which passes in wt2wt mode), and 3 selser tests failing (all of which fail in wt2wt mode as well). - Updated blacklist. Change-Id: Ib0c781568d83b59c36acf47254e8dd9a6a30034f --- M js/lib/mediawiki.DOMDiff.js M js/tests/parserTests-blacklist.js 2 files changed, 21 insertions(+), 11 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Parsoid refs/changes/89/62089/1 diff --git a/js/lib/mediawiki.DOMDiff.js b/js/lib/mediawiki.DOMDiff.js index 9945454..6901216 100644 --- a/js/lib/mediawiki.DOMDiff.js +++ b/js/lib/mediawiki.DOMDiff.js @@ -26,10 +26,13 @@ // SSS FIXME: Is this required? // // First do a quick check on the top-level nodes themselves - if (!this.treeEquals(this.env.page.dom, workNode, false)) { - this.markNode(workNode, 'modified'); - return { isEmpty: false, dom: workNode }; - } + // FIXME gwicke: Disabled for now as the VE seems to drop data-parsoid on + // the body and the serializer does not respect a 'modified' flag on the + // body. This also assumes that we always diff on the body element. + //if (!this.treeEquals(this.env.page.dom, workNode, false)) { + // this.markNode(workNode, 'modified'); + // return { isEmpty: false, dom: workNode }; + //} // The root nodes are equal, call recursive differ var foundChange = this.doDOMDiff(this.env.page.dom, workNode); @@ -46,7 +49,11 @@ // subtree actually changes. So, ignoring this attribute in effect, // ignores the parser tests change. 'data-parsoid-changed': 1, - 'data-parsoid': 1, + // SSS: Don't ignore data-parsoid because in VE, sometimes wrappers get + // moved around without their content which occasionally leads to incorrect + // DSR being used by selser. Hard to describe a reduced test case here. + // Discovered via: /mnt/bugs/2013-05-01T09:43:14.960Z-Reverse_innovation + // 'data-parsoid': 1, 'data-parsoid-diff': 1, 'about': 1 }; @@ -151,10 +158,11 @@ DDP.doDOMDiff = function ( baseParentNode, newParentNode ) { var dd = this; - function debugOut(nodeA, nodeB) { + function debugOut(nodeA, nodeB, laPrefix) { + laPrefix = laPrefix || ""; if (dd.debugging) { - dd.debug("--> A: " + (DU.isElt(nodeA) ? nodeA.outerHTML : JSON.stringify(nodeA.nodeValue))); - dd.debug("--> B: " + (DU.isElt(nodeB) ? nodeB.outerHTML : JSON.stringify(nodeB.nodeValue))); + dd.debug("--> A" + laPrefix + ":" + (DU.isElt(nodeA) ? nodeA.outerHTML : JSON.stringify(nodeA.nodeValue))); + dd.debug("--> B" + laPrefix + ":" + (DU.isElt(nodeB) ? nodeB.outerHTML : JSON.stringify(nodeB.nodeValue))); } } @@ -181,7 +189,7 @@ this.debug("--lookahead in new dom--"); lookaheadNode = newNode.nextSibling; while (lookaheadNode) { - debugOut(baseNode, lookaheadNode); + debugOut(baseNode, lookaheadNode, "new"); if (DU.isContentNode(lookaheadNode) && this.treeEquals(baseNode, lookaheadNode, true)) { @@ -205,7 +213,7 @@ this.debug("--lookahead in old dom--"); lookaheadNode = baseNode.nextSibling;
[MediaWiki-commits] [Gerrit] mediawiki.htmlform: Use auto width for Chosen selects - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: mediawiki.htmlform: Use auto width for Chosen selects .. mediawiki.htmlform: Use auto width for Chosen selects Upgrading jQuery Chosen to 0.9.14 (which adds a "width" option) and setting width: auto in chosen calls for HTMLForm elements. Change-Id: Ib87f00ae0f3ad960d35d7a3c4529e56bbdaa6c38 --- M resources/jquery.chosen/chosen.css M resources/jquery.chosen/chosen.jquery.js M resources/mediawiki/mediawiki.htmlform.js 3 files changed, 138 insertions(+), 98 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/jquery.chosen/chosen.css b/resources/jquery.chosen/chosen.css index 8f6db26..17793ed 100644 --- a/resources/jquery.chosen/chosen.css +++ b/resources/jquery.chosen/chosen.css @@ -3,6 +3,7 @@ font-size: 13px; position: relative; display: inline-block; + vertical-align: middle; zoom: 1; *display: inline; } @@ -11,13 +12,24 @@ border: 1px solid #aaa; border-top: 0; position: absolute; - top: 29px; - left: 0; + top: 100%; + left: -px; -webkit-box-shadow: 0 4px 5px rgba(0,0,0,.15); -moz-box-shadow : 0 4px 5px rgba(0,0,0,.15); box-shadow: 0 4px 5px rgba(0,0,0,.15); z-index: 1010; + width: 100%; + -moz-box-sizing : border-box; + -ms-box-sizing: border-box; + -webkit-box-sizing: border-box; + -khtml-box-sizing : border-box; + box-sizing: border-box; } + +.chzn-container.chzn-with-drop .chzn-drop { + left: 0; +} + /* @end */ /* @group Single Chosen */ @@ -111,8 +123,15 @@ border: 1px solid #aaa; font-family: sans-serif; font-size: 1em; + width: 100%; + -moz-box-sizing : border-box; + -ms-box-sizing: border-box; + -webkit-box-sizing: border-box; + -khtml-box-sizing : border-box; + box-sizing: border-box; } .chzn-container-single .chzn-drop { + margin-top: -1px; -webkit-border-radius: 0 0 4px 4px; -moz-border-radius : 0 0 4px 4px; border-radius: 0 0 4px 4px; @@ -120,12 +139,11 @@ -webkit-background-clip: padding-box; background-clip: padding-box; } -/* @end */ - -.chzn-container-single-nosearch .chzn-search input { +.chzn-container-single-nosearch .chzn-search { position: absolute; - left: -9000px; + left: -px; } +/* @end */ /* @group Multi Chosen */ .chzn-container-multi .chzn-choices { @@ -143,6 +161,12 @@ height: auto !important; height: 1%; position: relative; + width: 100%; + -moz-box-sizing : border-box; + -ms-box-sizing: border-box; + -webkit-box-sizing: border-box; + -khtml-box-sizing : border-box; + box-sizing: border-box; } .chzn-container-multi .chzn-choices li { float: left; @@ -240,7 +264,7 @@ -webkit-overflow-scrolling: touch; } .chzn-container-multi .chzn-results { - margin: -1px 0 0; + margin: 0; padding: 0; } .chzn-container .chzn-results li { @@ -318,7 +342,7 @@ box-shadow: 0 0 5px rgba(0,0,0,.3); border: 1px solid #5897fb; } -.chzn-container-active .chzn-single-with-drop { +.chzn-container-active.chzn-with-drop .chzn-single { border: 1px solid #aaa; -webkit-box-shadow: 0 1px 0 #fff inset; -moz-box-shadow : 0 1px 0 #fff inset; @@ -337,11 +361,11 @@ border-bottom-left-radius : 0; border-bottom-right-radius: 0; } -.chzn-container-active .chzn-single-with-drop div { +.chzn-container-active.chzn-with-drop .chzn-single div { background: transparent; border-left: none; } -.chzn-container-active .chzn-single-with-drop div b { +.chzn-container-active.chzn-with-drop .chzn-single div b { background-position: -18px 2px; } .chzn-container-active .chzn-choices { @@ -381,9 +405,12 @@ .chzn-rtl .chzn-choices li { float: right; } .chzn-rtl .chzn-choices .search-choice { padding: 3px 5px 3px 19px; margin: 3px 5px 3px 0; } .chzn-rtl .chzn-choices .search-choice .search-choice-close { left: 4px; right: auto; } +.chzn-rtl .chzn-search { left: px; } +.chzn-rtl.chzn-with-drop .chzn-search { left: 0px; } +.chzn-rtl .chzn-drop { left: px; } .chzn-rtl.chzn-container-single .chzn-results { margin: 0 0 4px 4px; padding: 0 4px 0 0; } .chzn-rtl .chzn-results .group-option { padding-left: 0; padding-right: 15px; } -.chzn-rtl.chzn-container-active .chzn-single-with-drop div { border-right: none; } +.chzn-rtl.chzn-container-active.chzn-with-drop .chzn-single div { border-right: none; } .chzn-rtl .chzn-search input { background: #fff url('chosen-sprite.png') no-repeat -30px -20px; background: url('chosen-sprite.png') no-repeat -30px -20px, -webkit-gradient(linear, 0 0, 0 100%, color-stop(1%, #ee), color-stop(15%, #ff)); @@ -397,7 +424,7 @@ .chzn-container-single.chzn-rtl .chzn-single div b { background-position: 6px 2px; } -.chzn-container-single.chzn-rtl .chzn-single-with-drop div b { +.chzn-container-single.chzn-rtl.chzn-with-drop .chzn-si
[MediaWiki-commits] [Gerrit] Restrict Verified+1/2 and Submit to JenkinsBot and l10n-bot - change (mediawiki...TemplateData)
Catrope has submitted this change and it was merged. Change subject: Restrict Verified+1/2 and Submit to JenkinsBot and l10n-bot .. Restrict Verified+1/2 and Submit to JenkinsBot and l10n-bot Change-Id: If0ea510f5126868d108dec73f94d7fc67f563eed --- M groups M project.config 2 files changed, 10 insertions(+), 0 deletions(-) Approvals: Catrope: Verified; Looks good to me, approved diff --git a/groups b/groups index e8d9152..d463a45 100644 --- a/groups +++ b/groups @@ -1,3 +1,6 @@ # UUID Group Name # 4cdcb3a1ef2e19d73bc9a97f1d0f109d2e0209cd mediawiki +2bc47fcadf4e44ec9a1a73bcfa06232554f47ce2 JenkinsBot +cc37d98e3a4301744a0c0a9249173ae170696072 l10n-bot +global:Registered-UsersRegistered Users diff --git a/project.config b/project.config index dd766b3..b10f947 100644 --- a/project.config +++ b/project.config @@ -9,3 +9,10 @@ requireChangeId = true [submit] mergeContent = true +[access "refs/heads/master"] + label-Verified = -1..+2 group JenkinsBot + label-Verified = -1..+2 group l10n-bot + label-Verified = -1..+0 group Registered Users + submit = deny group Registered Users + submit = group JenkinsBot + submit = group l10n-bot -- To view, visit https://gerrit.wikimedia.org/r/62088 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If0ea510f5126868d108dec73f94d7fc67f563eed Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TemplateData Gerrit-Branch: refs/meta/config Gerrit-Owner: Krinkle Gerrit-Reviewer: Catrope ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Restrict Verified+1/2 and Submit to JenkinsBot and l10n-bot - change (mediawiki...TemplateData)
Krinkle has uploaded a new change for review. https://gerrit.wikimedia.org/r/62088 Change subject: Restrict Verified+1/2 and Submit to JenkinsBot and l10n-bot .. Restrict Verified+1/2 and Submit to JenkinsBot and l10n-bot Change-Id: If0ea510f5126868d108dec73f94d7fc67f563eed --- M groups M project.config 2 files changed, 10 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TemplateData refs/changes/88/62088/1 diff --git a/groups b/groups index e8d9152..d463a45 100644 --- a/groups +++ b/groups @@ -1,3 +1,6 @@ # UUID Group Name # 4cdcb3a1ef2e19d73bc9a97f1d0f109d2e0209cd mediawiki +2bc47fcadf4e44ec9a1a73bcfa06232554f47ce2 JenkinsBot +cc37d98e3a4301744a0c0a9249173ae170696072 l10n-bot +global:Registered-UsersRegistered Users diff --git a/project.config b/project.config index dd766b3..b10f947 100644 --- a/project.config +++ b/project.config @@ -9,3 +9,10 @@ requireChangeId = true [submit] mergeContent = true +[access "refs/heads/master"] + label-Verified = -1..+2 group JenkinsBot + label-Verified = -1..+2 group l10n-bot + label-Verified = -1..+0 group Registered Users + submit = deny group Registered Users + submit = group JenkinsBot + submit = group l10n-bot -- To view, visit https://gerrit.wikimedia.org/r/62088 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If0ea510f5126868d108dec73f94d7fc67f563eed Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TemplateData Gerrit-Branch: refs/meta/config Gerrit-Owner: Krinkle ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Bump GuidedTour for E3 deployment - change (mediawiki/core)
Mattflaschen has submitted this change and it was merged. Change subject: Bump GuidedTour for E3 deployment .. Bump GuidedTour for E3 deployment Change-Id: I2535d5e044763b0a8f6853001415d5032c193680 --- M extensions/GuidedTour 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Mattflaschen: Verified; Looks good to me, approved Spage: Looks good to me, approved diff --git a/extensions/GuidedTour b/extensions/GuidedTour index b272b61..e74a296 16 --- a/extensions/GuidedTour +++ b/extensions/GuidedTour -Subproject commit b272b610013de87cacfcf730ff6972121418a0a8 +Subproject commit e74a296ff4227b33e9a7bd3bd6d5b3e0f7bc0c12 -- To view, visit https://gerrit.wikimedia.org/r/62082 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2535d5e044763b0a8f6853001415d5032c193680 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.22wmf3 Gerrit-Owner: Mattflaschen Gerrit-Reviewer: Mattflaschen Gerrit-Reviewer: Spage ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Bump GuidedTour for E3 deployment - change (mediawiki/core)
Mattflaschen has submitted this change and it was merged. Change subject: Bump GuidedTour for E3 deployment .. Bump GuidedTour for E3 deployment Change-Id: I76ebb11796babcdb7d3bc8db7f3b431b9d23eb60 --- M extensions/GuidedTour 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Mattflaschen: Verified; Looks good to me, approved Spage: Looks good to me, approved diff --git a/extensions/GuidedTour b/extensions/GuidedTour index 488301b..e74a296 16 --- a/extensions/GuidedTour +++ b/extensions/GuidedTour -Subproject commit 488301b1ddf642f3e8daa1238fec06fe4d760f95 +Subproject commit e74a296ff4227b33e9a7bd3bd6d5b3e0f7bc0c12 -- To view, visit https://gerrit.wikimedia.org/r/62081 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I76ebb11796babcdb7d3bc8db7f3b431b9d23eb60 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.22wmf2 Gerrit-Owner: Mattflaschen Gerrit-Reviewer: Mattflaschen Gerrit-Reviewer: Spage ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fixing exports - change (operations/puppet)
Ottomata has submitted this change and it was merged. Change subject: Fixing exports .. Fixing exports Change-Id: I7c1e5863cfc003e2cccd448d2e03f4b14de791d5 --- M files/download/exports 1 file changed, 1 insertion(+), 2 deletions(-) Approvals: Ottomata: Verified; Looks good to me, approved diff --git a/files/download/exports b/files/download/exports index 1af6b8d..fbc458c 100644 --- a/files/download/exports +++ b/files/download/exports @@ -8,5 +8,4 @@ # /srv/nfs4gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check) # /srv/nfs4/homes gss/krb5i(rw,sync,no_subtree_check) # -/data snapshot1.pmtpa.wmnet(rw,async,no_root_squash,no_subtree_check) snapshot2.pmtpa.wmnet(rw,async,no_root_squash,no_subtree_check) snapshot3.pmtpa.wmnet(rw,async,no_root_squash,no_subtree_check) snapshot4.pmtpa.wmnet(rw,async,no_root_squash,no_subtree_check) bayes.wikimedia.org(rw,async,no_root_squash,no_subtree_check) snapshot1001.eqiad.wmnet(rw,async,no_root_squash,no_subtree_check) snapshot1002.eqiad.wmnet(rw,async,no_root_squash,no_subtree_check) snapshot1003.eqiad.wmnet(rw,async,no_root_squash,no_subtree_check) snapshot1004.eqiad.wmnet(rw,async,no_root_squash,no_subtree_check) stat1.wikimedia.org(ro,async,no_root_squash,no_subtree_check) -stat1002.eqiad.wmnet(ro,async,no_root_squash,no_subtree_check) +/data snapshot1.pmtpa.wmnet(rw,async,no_root_squash,no_subtree_check) snapshot2.pmtpa.wmnet(rw,async,no_root_squash,no_subtree_check) snapshot3.pmtpa.wmnet(rw,async,no_root_squash,no_subtree_check) snapshot4.pmtpa.wmnet(rw,async,no_root_squash,no_subtree_check) bayes.wikimedia.org(rw,async,no_root_squash,no_subtree_check) snapshot1001.eqiad.wmnet(rw,async,no_root_squash,no_subtree_check) snapshot1002.eqiad.wmnet(rw,async,no_root_squash,no_subtree_check) snapshot1003.eqiad.wmnet(rw,async,no_root_squash,no_subtree_check) snapshot1004.eqiad.wmnet(rw,async,no_root_squash,no_subtree_check) stat1.wikimedia.org(ro,async,no_root_squash,no_subtree_check) stat1002.eqiad.wmnet(ro,async,no_root_squash,no_subtree_check) -- To view, visit https://gerrit.wikimedia.org/r/62087 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7c1e5863cfc003e2cccd448d2e03f4b14de791d5 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ottomata Gerrit-Reviewer: Ottomata ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fixing exports - change (operations/puppet)
Ottomata has uploaded a new change for review. https://gerrit.wikimedia.org/r/62087 Change subject: Fixing exports .. Fixing exports Change-Id: I7c1e5863cfc003e2cccd448d2e03f4b14de791d5 --- M files/download/exports 1 file changed, 1 insertion(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/87/62087/1 diff --git a/files/download/exports b/files/download/exports index 1af6b8d..fbc458c 100644 --- a/files/download/exports +++ b/files/download/exports @@ -8,5 +8,4 @@ # /srv/nfs4gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check) # /srv/nfs4/homes gss/krb5i(rw,sync,no_subtree_check) # -/data snapshot1.pmtpa.wmnet(rw,async,no_root_squash,no_subtree_check) snapshot2.pmtpa.wmnet(rw,async,no_root_squash,no_subtree_check) snapshot3.pmtpa.wmnet(rw,async,no_root_squash,no_subtree_check) snapshot4.pmtpa.wmnet(rw,async,no_root_squash,no_subtree_check) bayes.wikimedia.org(rw,async,no_root_squash,no_subtree_check) snapshot1001.eqiad.wmnet(rw,async,no_root_squash,no_subtree_check) snapshot1002.eqiad.wmnet(rw,async,no_root_squash,no_subtree_check) snapshot1003.eqiad.wmnet(rw,async,no_root_squash,no_subtree_check) snapshot1004.eqiad.wmnet(rw,async,no_root_squash,no_subtree_check) stat1.wikimedia.org(ro,async,no_root_squash,no_subtree_check) -stat1002.eqiad.wmnet(ro,async,no_root_squash,no_subtree_check) +/data snapshot1.pmtpa.wmnet(rw,async,no_root_squash,no_subtree_check) snapshot2.pmtpa.wmnet(rw,async,no_root_squash,no_subtree_check) snapshot3.pmtpa.wmnet(rw,async,no_root_squash,no_subtree_check) snapshot4.pmtpa.wmnet(rw,async,no_root_squash,no_subtree_check) bayes.wikimedia.org(rw,async,no_root_squash,no_subtree_check) snapshot1001.eqiad.wmnet(rw,async,no_root_squash,no_subtree_check) snapshot1002.eqiad.wmnet(rw,async,no_root_squash,no_subtree_check) snapshot1003.eqiad.wmnet(rw,async,no_root_squash,no_subtree_check) snapshot1004.eqiad.wmnet(rw,async,no_root_squash,no_subtree_check) stat1.wikimedia.org(ro,async,no_root_squash,no_subtree_check) stat1002.eqiad.wmnet(ro,async,no_root_squash,no_subtree_check) -- To view, visit https://gerrit.wikimedia.org/r/62087 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7c1e5863cfc003e2cccd448d2e03f4b14de791d5 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ottomata ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits