[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceFoundation[master]: BSApiGroupStore: Implemented use of "query" parameter
Robert Vogel has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/328878 ) Change subject: BSApiGroupStore: Implemented use of "query" parameter .. BSApiGroupStore: Implemented use of "query" parameter Change-Id: Ic646cfc435bb4f4c450e7f439e063315009033cb --- M includes/api/BSApiGroupStore.php 1 file changed, 22 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceFoundation refs/changes/78/328878/1 diff --git a/includes/api/BSApiGroupStore.php b/includes/api/BSApiGroupStore.php index 1fda0d6..5d0822b 100644 --- a/includes/api/BSApiGroupStore.php +++ b/includes/api/BSApiGroupStore.php @@ -27,15 +27,16 @@ * Example request parameters of an ExtJS store */ class BSApiGroupStore extends BSApiExtJSStoreBase { + + protected $sLcQuery = ''; + /** -* @param string $sQuery Potential query provided by ExtJS component. -* This is some kind of preliminary filtering. Subclass has to decide if -* and how to process it -* @return array - Full list of of data objects. Filters, paging, sorting -* will be done by the base class +* @param string $sQuery +* @return array - List of of groups */ protected function makeData( $sQuery = '' ) { global $wgAdditionalGroups, $wgImplicitGroups; + $this->sLcQuery = strtolower( $sQuery ); $aData = array(); foreach ( BsGroupHelper::getAvailableGroups() as $sGroup ) { @@ -46,6 +47,10 @@ $oMsg = wfMessage( "group-$sGroup" ); if( $oMsg->exists() ) { $sDisplayName = $oMsg->plain()." ($sGroup)"; + } + + if( !$this->queryApplies( $sGroup, $sDisplayName ) ) { + continue; } $aData[] = (object) array( @@ -62,4 +67,16 @@ 'wikiadmin' ); } + + protected function queryApplies($sGroup, $sDisplayName) { + if( empty( $this->sLcQuery ) ) { + return true; + } + + $sLcGroup = strtolower( $sGroup ); + $sLcDisplayname = strtolower( $sDisplayName ); + + return strpos( $sLcGroup, $this->sLcQuery ) !== false + || strpos( $sLcDisplayname, $this->sLcQuery ) !== false; + } } -- To view, visit https://gerrit.wikimedia.org/r/328878 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic646cfc435bb4f4c450e7f439e063315009033cb Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation Gerrit-Branch: master Gerrit-Owner: Robert Vogel___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...PageCreationNotif[master]: Removed deprecated hook usage
Georggi199 has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/328877 ) Change subject: Removed deprecated hook usage .. Removed deprecated hook usage Bug: T151973 Change-Id: Ie5d7761bc4dda55b2d9698f1beb4def3fb65d671 --- M PageCreationNotif.hooks.php M PageCreationNotif.php M includes/PageCreationNotifEmailer.php 3 files changed, 21 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PageCreationNotif refs/changes/77/328877/1 diff --git a/PageCreationNotif.hooks.php b/PageCreationNotif.hooks.php index 20a0e9c..7286ceb 100644 --- a/PageCreationNotif.hooks.php +++ b/PageCreationNotif.hooks.php @@ -89,13 +89,24 @@ } /** -* Called just after a new Article is created. +* Called just after a new WikiPage is created. * +* @param WikiPage $wikiPage +* @param User $user +* @param Content $content +* @param string $summary +* @param bool $isMinor +* @param $isWatch +* @param $section +* @param $flags +* @param Revision $revision +* +* @return bool * @since 0.1 */ - public static function onArticleInsertComplete( &$article, User &$user, $text, $summary, $minoredit, $watchthis, $sectionanchor, &$flags, Revision - $revision ) { - PageCreationNotifEmailer::notifyOnNewArticle( $article, $user ); + public static function onPageContentInsertComplete( $wikiPage, $user, $content, $summary, $isMinor, + $isWatch, $section, $flags, $revision ) { + PageCreationNotifEmailer::notifyOnNewWikiPage( $wikiPage, $user ); return true; } diff --git a/PageCreationNotif.php b/PageCreationNotif.php index 256bb5f..9858a65 100644 --- a/PageCreationNotif.php +++ b/PageCreationNotif.php @@ -37,7 +37,7 @@ $wgHooks['LoadExtensionSchemaUpdates'][] = 'PageCreationNotifHooks::onSchemaUpdate'; $wgHooks['GetPreferences'][] = 'PageCreationNotifHooks::onGetPreferences'; $wgHooks['UserSaveOptions'][] = 'PageCreationNotifHooks::onUserSaveOptions'; -$wgHooks['ArticleInsertComplete'][] = 'PageCreationNotifHooks::onArticleInsertComplete'; +$wgHooks['PageContentInsertComplete'][] = 'PageCreationNotifHooks::onPageContentInsertComplete'; /** * Email address to use as the sender diff --git a/includes/PageCreationNotifEmailer.php b/includes/PageCreationNotifEmailer.php index e72a36b..0f20c7d 100644 --- a/includes/PageCreationNotifEmailer.php +++ b/includes/PageCreationNotifEmailer.php @@ -20,7 +20,7 @@ * @since 0.1 * */ - public static function notifyOnNewArticle( $article, $creator ) { + public static function notifyOnNewWikiPage( $wikiPage, $creator ) { global $wgPCNSender, $wgPCNSenderName; $users = self::getNotifUsers(); @@ -33,7 +33,7 @@ $subject = wfMessage( 'page-creation-email-subject', - $article->getTitle()->getFullText(), + $wikiPage->getTitle()->getFullText(), $GLOBALS['wgSitename'], $creator->getName() )->parse(); @@ -41,10 +41,10 @@ $emailText = wfMessage( 'page-creation-email-body', $user->getName(), - $article->getTitle()->getFullText(), + $wikiPage->getTitle()->getFullText(), $creator->getName(), - $article->getTitle()->getFullURL(), - $article->getText() + $wikiPage->getTitle()->getFullURL(), + ContentHandler::getContentText( $wikiPage->getContent() ) )->parse(); UserMailer::send( -- To view, visit https://gerrit.wikimedia.org/r/328877 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie5d7761bc4dda55b2d9698f1beb4def3fb65d671 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/PageCreationNotif Gerrit-Branch: master Gerrit-Owner: Georggi199___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Theme[master]: Remove old PHP entry point
SamanthaNguyen has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/328876 ) Change subject: Remove old PHP entry point .. Remove old PHP entry point Bug: T154005 Change-Id: I4621fb93d814e8c5e45de67d54e495e767f67944 --- D Theme.php 1 file changed, 0 insertions(+), 24 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Theme refs/changes/76/328876/1 diff --git a/Theme.php b/Theme.php deleted file mode 100644 index 1558a8b..000 --- a/Theme.php +++ /dev/null @@ -1,24 +0,0 @@ - - * @author Jack Phoenix- * @license https://en.wikipedia.org/wiki/Public_domain Public domain - * @link https://www.mediawiki.org/wiki/Extension:Theme Documentation - */ - -if ( function_exists( 'wfLoadExtension' ) ) { - wfLoadExtension( 'Theme' ); - $wgMessagesDirs['Theme'] = __DIR__ . '/i18n'; - /* wfWarn( - 'Deprecated PHP entry point used for Theme extension. Please use wfLoadExtension instead, ' . - 'see https://www.mediawiki.org/wiki/Extension_registration for more details.' - ); */ - return; -} else { - die( 'This version of the Theme extension requires MediaWiki 1.25+' ); -} -- To view, visit https://gerrit.wikimedia.org/r/328876 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4621fb93d814e8c5e45de67d54e495e767f67944 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Theme Gerrit-Branch: master Gerrit-Owner: SamanthaNguyen ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[master]: Remove unneeded padding from Special:Mobiledif
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/328723 ) Change subject: Remove unneeded padding from Special:Mobiledif .. Remove unneeded padding from Special:Mobiledif When the device width is big enough, e.g. desktop, the content width is already limited by `.content-unstyled`. Removing the padding will align the text left with the header and hamburger, while preventing it from touching the browser left or right. Bug: T147944 Change-Id: Id57f6626eff0ca8d52666464005c7c2c39b7a5ef --- M resources/mobile.special.mobilediff.styles/mobilediff.less 1 file changed, 1 insertion(+), 2 deletions(-) Approvals: Pmiazga: Looks good to me, but someone else must approve jenkins-bot: Verified Phuedx: Looks good to me, approved diff --git a/resources/mobile.special.mobilediff.styles/mobilediff.less b/resources/mobile.special.mobilediff.styles/mobilediff.less index 24a66f2..32207a5 100644 --- a/resources/mobile.special.mobilediff.styles/mobilediff.less +++ b/resources/mobile.special.mobilediff.styles/mobilediff.less @@ -131,8 +131,7 @@ } @media all and ( min-width: @wgMFDeviceWidthDesktop ) { - // FIXME: Overly specific selector - .beta #mw-mf-diffarea { + #mw-mf-diffarea { padding-left: 0; padding-right: 0; } -- To view, visit https://gerrit.wikimedia.org/r/328723 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id57f6626eff0ca8d52666464005c7c2c39b7a5ef Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: BmansurovGerrit-Reviewer: Jdlrobson Gerrit-Reviewer: Phuedx Gerrit-Reviewer: Pmiazga Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Fix DescriptionEditActivity layout
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/328414 ) Change subject: Fix DescriptionEditActivity layout .. Fix DescriptionEditActivity layout DescriptionEditActivity was changed to subclass SingleFragmentToolbar- Activity in I6ce1cee0807fe992d32a43ca22c3ccf82512f3dd, which breaks the layout. This changes it back to a non-toolbarred SingleFragmentActivity. Bug: T153969 Change-Id: I227a80ec0adab6781def7f4eab04b98925b0605d --- M app/src/main/java/org/wikipedia/descriptions/DescriptionEditActivity.java 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: BearND: Looks good to me, approved jenkins-bot: Verified diff --git a/app/src/main/java/org/wikipedia/descriptions/DescriptionEditActivity.java b/app/src/main/java/org/wikipedia/descriptions/DescriptionEditActivity.java index 173e08e..a7e8897 100644 --- a/app/src/main/java/org/wikipedia/descriptions/DescriptionEditActivity.java +++ b/app/src/main/java/org/wikipedia/descriptions/DescriptionEditActivity.java @@ -6,14 +6,14 @@ import android.support.annotation.NonNull; import org.wikipedia.R; -import org.wikipedia.activity.SingleFragmentToolbarActivity; +import org.wikipedia.activity.SingleFragmentActivity; import org.wikipedia.json.GsonMarshaller; import org.wikipedia.json.GsonUnmarshaller; import org.wikipedia.page.PageTitle; import static org.wikipedia.util.DeviceUtil.hideSoftKeyboard; -public class DescriptionEditActivity extends SingleFragmentToolbarActivity { +public class DescriptionEditActivity extends SingleFragmentActivity { private static final String EXTRA_TITLE = "title"; public static Intent newIntent(@NonNull Context context, @NonNull PageTitle title) { -- To view, visit https://gerrit.wikimedia.org/r/328414 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I227a80ec0adab6781def7f4eab04b98925b0605d Gerrit-PatchSet: 2 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: MhollowayGerrit-Reviewer: BearND Gerrit-Reviewer: Brion VIBBER Gerrit-Reviewer: Dbrant Gerrit-Reviewer: Mholloway Gerrit-Reviewer: Niedzielski Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Avoid pointless use of isset() in LBFactoryMulti()
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/328615 ) Change subject: Avoid pointless use of isset() in LBFactoryMulti() .. Avoid pointless use of isset() in LBFactoryMulti() Change-Id: Ibaaa97a515f627860f6681f204aa1542b1639640 --- M includes/libs/rdbms/lbfactory/LBFactoryMulti.php 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/libs/rdbms/lbfactory/LBFactoryMulti.php b/includes/libs/rdbms/lbfactory/LBFactoryMulti.php index 1d22873..4158e61 100644 --- a/includes/libs/rdbms/lbfactory/LBFactoryMulti.php +++ b/includes/libs/rdbms/lbfactory/LBFactoryMulti.php @@ -260,7 +260,7 @@ throw new InvalidArgumentException( __METHOD__ . ": Unknown cluster \"$cluster\"" ); } $template = $this->serverTemplate; - if ( isset( $this->externalTemplateOverrides ) ) { + if ( $this->externalTemplateOverrides ) { $template = $this->externalTemplateOverrides + $template; } if ( isset( $this->templateOverridesByCluster[$cluster] ) ) { @@ -348,7 +348,7 @@ $serverInfo = $template; if ( $master ) { $serverInfo['master'] = true; - if ( isset( $this->masterTemplateOverrides ) ) { + if ( $this->masterTemplateOverrides ) { $serverInfo = $this->masterTemplateOverrides + $serverInfo; } $master = false; -- To view, visit https://gerrit.wikimedia.org/r/328615 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibaaa97a515f627860f6681f204aa1542b1639640 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron SchulzGerrit-Reviewer: Legoktm Gerrit-Reviewer: Reedy Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Remove duplicate message movepage-max-pages
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/328873 ) Change subject: Remove duplicate message movepage-max-pages .. Remove duplicate message movepage-max-pages Change-Id: I129a9b0e22236bd08daf7d9f7aaeb599a68b0108 --- M languages/i18n/en.json 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/languages/i18n/en.json b/languages/i18n/en.json index e1fdc42..02831fc 100644 --- a/languages/i18n/en.json +++ b/languages/i18n/en.json @@ -2501,7 +2501,6 @@ "cant-move-to-category-page": "You do not have permission to move a page to a category page.", "cant-move-subpages": "You do not have permission to move subpages.", "namespace-nosubpages": "Namespace \"$1\" does not allow subpages.", - "movepage-max-pages": "The source page has more than the maximum $1 {{PLURAL:$1|subpage|subpages}}.", "newtitle": "New title:", "move-watch": "Watch source page and target page", "movepagebtn": "Move page", -- To view, visit https://gerrit.wikimedia.org/r/328873 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I129a9b0e22236bd08daf7d9f7aaeb599a68b0108 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: AnomieGerrit-Reviewer: Anomie Gerrit-Reviewer: Gergő Tisza Gerrit-Reviewer: Legoktm Gerrit-Reviewer: Raimond Spekking Gerrit-Reviewer: Siebrand Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Optimize api list=recentchanges=0=new
Brian Wolff has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/328875 ) Change subject: Optimize api list=recentchanges=0=new .. Optimize api list=recentchanges=0=new It's a somewhat common usecase to find all recently created pages. By adding rc_new = 1 in addition to rc_type = 1 when only showing new pages, we may be able to use the new_name_timestamp index which will yield a more efficient query for this common case. Change-Id: Ifd1b28a45beb8cfe99f98b841db0baf8af5ce65e --- M includes/api/ApiQueryRecentChanges.php 1 file changed, 8 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/75/328875/1 diff --git a/includes/api/ApiQueryRecentChanges.php b/includes/api/ApiQueryRecentChanges.php index 8b11dc2..d4a9494 100644 --- a/includes/api/ApiQueryRecentChanges.php +++ b/includes/api/ApiQueryRecentChanges.php @@ -177,7 +177,14 @@ if ( !is_null( $params['type'] ) ) { try { - $this->addWhereFld( 'rc_type', RecentChange::parseToRCType( $params['type'] ) ); + $typeField = RecentChange::parseToRCType( $params['type'] ); + $this->addWhereFld( 'rc_type', $typeField ); + // If only showing "new" pages, add rc_new condition + // so that mysql can use the new_name_timestamp index if + // appropriate. + if ( count( $typeField ) === 1 && $typeField[0] === RC_NEW ) { + $this->addWhereFld( 'rc_new', 1 ); + } } catch ( Exception $e ) { ApiBase::dieDebug( __METHOD__, $e->getMessage() ); } -- To view, visit https://gerrit.wikimedia.org/r/328875 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifd1b28a45beb8cfe99f98b841db0baf8af5ce65e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Brian Wolff___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Theme[master]: Actually describe the functionality in theme-desc
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/320107 ) Change subject: Actually describe the functionality in theme-desc .. Actually describe the functionality in theme-desc Bug: T136291 Change-Id: I1c52d547545abcbdd2a6769d178ff99889f2d067 --- M i18n/en.json 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jack Phoenix: Looks good to me, approved SamanthaNguyen: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/i18n/en.json b/i18n/en.json index fbebbfe..95ea532 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -3,5 +3,5 @@ "authors": [] }, "theme-extensionname": "Theme", - "theme-desc": "Theme loader extension for skins" + "theme-desc": "Controls the installation of CSS variants of the wiki's skins" } -- To view, visit https://gerrit.wikimedia.org/r/320107 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1c52d547545abcbdd2a6769d178ff99889f2d067 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Theme Gerrit-Branch: master Gerrit-Owner: Nemo bisGerrit-Reviewer: Jack Phoenix Gerrit-Reviewer: SamanthaNguyen Gerrit-Reviewer: Siebrand Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Setting $wgPageAssessmentsOnTalkPages to false for enwikivoyage
Kaldari has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/328874 ) Change subject: Setting $wgPageAssessmentsOnTalkPages to false for enwikivoyage .. Setting $wgPageAssessmentsOnTalkPages to false for enwikivoyage On English Wikivoyage page assessments are recorded on the pages themselves rather than on talk pages, so $wgPageAssessmentsOnTalkPages must be set to false in order for them to be properly recorded. Change-Id: If8214a9c9018d1a067cf24814d6be2f03da00e0e --- M wmf-config/InitialiseSettings.php 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/74/328874/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 6585c9e..8b459be 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -16694,6 +16694,10 @@ 'enwikivoyage' => true, // T142056 'testwiki' => true, // T137918 ], +'wgPageAssessmentsOnTalkPages' => [ + 'default' => true, + 'enwikivoyage' => false, +], 'wmgUsePageImages' => [ 'default' => true, -- To view, visit https://gerrit.wikimedia.org/r/328874 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If8214a9c9018d1a067cf24814d6be2f03da00e0e Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config 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] mediawiki/core[master]: Remove duplicate message movepage-max-pages
Anomie has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/328873 ) Change subject: Remove duplicate message movepage-max-pages .. Remove duplicate message movepage-max-pages Change-Id: I129a9b0e22236bd08daf7d9f7aaeb599a68b0108 --- M languages/i18n/en.json 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/73/328873/1 diff --git a/languages/i18n/en.json b/languages/i18n/en.json index e1fdc42..02831fc 100644 --- a/languages/i18n/en.json +++ b/languages/i18n/en.json @@ -2501,7 +2501,6 @@ "cant-move-to-category-page": "You do not have permission to move a page to a category page.", "cant-move-subpages": "You do not have permission to move subpages.", "namespace-nosubpages": "Namespace \"$1\" does not allow subpages.", - "movepage-max-pages": "The source page has more than the maximum $1 {{PLURAL:$1|subpage|subpages}}.", "newtitle": "New title:", "move-watch": "Watch source page and target page", "movepagebtn": "Move page", -- To view, visit https://gerrit.wikimedia.org/r/328873 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I129a9b0e22236bd08daf7d9f7aaeb599a68b0108 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Anomie___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...ArticleFeedbackv5[master]: Rewording some log entries so they make more sense
SamanthaNguyen has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/328872 ) Change subject: Rewording some log entries so they make more sense .. Rewording some log entries so they make more sense Bug: T146608 Change-Id: Iaa8a100892e9ee19b731123e1e0082147ab20edb --- M i18n/en.json 1 file changed, 16 insertions(+), 16 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ArticleFeedbackv5 refs/changes/72/328872/1 diff --git a/i18n/en.json b/i18n/en.json index ac5c335..73d89bd 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -582,26 +582,26 @@ "logentry-articlefeedbackv5-decline": "$1 {{GENDER:$2|declined oversight for}} [[$3|feedback post #$4]] on [[$5]]", "logentry-articlefeedbackv5-request": "$1 {{GENDER:$2|requested oversight for}} [[$3|feedback post #$4]] on [[$5]]", "logentry-articlefeedbackv5-unrequest": "$1 {{GENDER:$2|un-requested oversight for}} [[$3|feedback post #$4]] on [[$5]]", - "logentry-articlefeedbackv5-flag": "$1 {{GENDER:$2|flagged as abuse}} [[$3|feedback post #$4]] on [[$5]]", - "logentry-articlefeedbackv5-unflag": "$1 {{GENDER:$2|un-flagged as abuse}} [[$3|feedback post #$4]] on [[$5]]", - "logentry-articlefeedbackv5-autoflag": "$1 {{GENDER:$2|auto-flagged as abuse}} [[$3|feedback post #$4]] on [[$5]]", - "logentry-articlefeedbackv5-feature": "$1 {{GENDER:$2|marked as useful}} [[$3|feedback post #$4]] on [[$5]]", - "logentry-articlefeedbackv5-unfeature": "$1 {{GENDER:$2|un-marked as useful}} [[$3|feedback post #$4]] on [[$5]]", - "logentry-articlefeedbackv5-resolve": "$1 {{GENDER:$2|marked as resolved}} [[$3|feedback post #$4]] on [[$5]]", - "logentry-articlefeedbackv5-unresolve": "$1 {{GENDER:$2|un-marked as resolved}} [[$3|feedback post #$4]] on [[$5]]", - "logentry-articlefeedbackv5-noaction": "$1 {{GENDER:$2|marked as non-actionable}} [[$3|feedback post #$4]] on [[$5]]", - "logentry-articlefeedbackv5-unnoaction": "$1 {{GENDER:$2|un-marked as non-actionable}} [[$3|feedback post #$4]] on [[$5]]", - "logentry-articlefeedbackv5-inappropriate": "$1 {{GENDER:$2|marked as inappropriate}} [[$3|feedback post #$4]] on [[$5]]", - "logentry-articlefeedbackv5-uninappropriate": "$1 {{GENDER:$2|un-marked as inappropriate}} [[$3|feedback post #$4]] on [[$5]]", + "logentry-articlefeedbackv5-flag": "$1 {{GENDER:$2|flagged}} [[$3|feedback post #$4]] as abuse on [[$5]]", + "logentry-articlefeedbackv5-unflag": "$1 {{GENDER:$2|un-flagged}} [[$3|feedback post #$4]] as abuse on [[$5]]", + "logentry-articlefeedbackv5-autoflag": "$1 {{GENDER:$2|auto-flagged}} [[$3|feedback post #$4]] as abuse on [[$5]]", + "logentry-articlefeedbackv5-feature": "$1 {{GENDER:$2|marked}} [[$3|feedback post #$4]] as useful on [[$5]]", + "logentry-articlefeedbackv5-unfeature": "$1 {{GENDER:$2|un-marked}} [[$3|feedback post #$4]] as useful on [[$5]]", + "logentry-articlefeedbackv5-resolve": "$1 {{GENDER:$2|marked}} [[$3|feedback post #$4]] as resolved on [[$5]]", + "logentry-articlefeedbackv5-unresolve": "$1 {{GENDER:$2|un-marked}} [[$3|feedback post #$4]] as resolved on [[$5]]", + "logentry-articlefeedbackv5-noaction": "$1 {{GENDER:$2|marked}} [[$3|feedback post #$4]] as non-actionable on [[$5]]", + "logentry-articlefeedbackv5-unnoaction": "$1 {{GENDER:$2|un-marked}} [[$3|feedback post #$4]] as non-actionable on [[$5]]", + "logentry-articlefeedbackv5-inappropriate": "$1 {{GENDER:$2|marked}} [[$3|feedback post #$4]] as inappropriate on [[$5]]", + "logentry-articlefeedbackv5-uninappropriate": "$1 {{GENDER:$2|un-marked}} [[$3|feedback post #$4]] as inappropriate on [[$5]]", "logentry-articlefeedbackv5-archive": "$1 {{GENDER:$2|archived}} [[$3|feedback post #$4]] on [[$5]]", "logentry-articlefeedbackv5-unarchive": "$1 {{GENDER:$2|un-archived}} [[$3|feedback post #$4]] on [[$5]]", "logentry-articlefeedbackv5-hide": "$1 {{GENDER:$2|hid}} [[$3|feedback post #$4]] on [[$5]]", "logentry-articlefeedbackv5-unhide": "$1 {{GENDER:$2|un-hid}} [[$3|feedback post #$4]] on [[$5]]", "logentry-articlefeedbackv5-autohide": "$1 {{GENDER:$2|auto-hid}} [[$3|feedback post #$4]] on [[$5]]", - "logentry-articlefeedbackv5-helpful": "$1 {{GENDER:$2|marked as helpful}} [[$3|feedback post #$4]] on [[$5]]", - "logentry-articlefeedbackv5-unhelpful": "$1 {{GENDER:$2|marked as unhelpful}} [[$3|feedback post #$4]] on [[$5]]", - "logentry-articlefeedbackv5-undo-helpful": "$1 {{GENDER:$2|un-marked as helpful}} [[$3|feedback post #$4]] on [[$5]]", - "logentry-articlefeedbackv5-undo-unhelpful": "$1 {{GENDER:$2|un-marked as unhelpful}} [[$3|feedback post #$4]] on [[$5]]", + "logentry-articlefeedbackv5-helpful": "$1 {{GENDER:$2|marked}} [[$3|feedback post #$4]] as helpful on [[$5]]", +
[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Fix special page tests (broken on travis)
Aude has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/328871 ) Change subject: Fix special page tests (broken on travis) .. Fix special page tests (broken on travis) We need to control for user language, since we assert error messages in english. Also fixed minor spelling mistake. Change-Id: I600681f6c8bbbe38636eedae764baccd7856a8cd --- M repo/tests/phpunit/includes/Specials/SpecialNewEntityTest.php M repo/tests/phpunit/includes/Specials/SpecialNewItemTest.php M repo/tests/phpunit/includes/Specials/SpecialNewPropertyTest.php 3 files changed, 8 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/71/328871/1 diff --git a/repo/tests/phpunit/includes/Specials/SpecialNewEntityTest.php b/repo/tests/phpunit/includes/Specials/SpecialNewEntityTest.php index 1b8666e..1d09373 100644 --- a/repo/tests/phpunit/includes/Specials/SpecialNewEntityTest.php +++ b/repo/tests/phpunit/includes/Specials/SpecialNewEntityTest.php @@ -16,6 +16,12 @@ use HtmlAssertionHelpers; + protected function setUp() { + parent::setUp(); + + $this->setUserLang( 'en' ); + } + /** * @dataProvider provideValidEntityCreationRequests */ diff --git a/repo/tests/phpunit/includes/Specials/SpecialNewItemTest.php b/repo/tests/phpunit/includes/Specials/SpecialNewItemTest.php index 9d07b04..f56b03e 100644 --- a/repo/tests/phpunit/includes/Specials/SpecialNewItemTest.php +++ b/repo/tests/phpunit/includes/Specials/SpecialNewItemTest.php @@ -123,7 +123,7 @@ return [ 'unknown language' => [ [ - 'lang' => 'some-wierd-language', + 'lang' => 'some-weird-language', 'label' => 'label', 'description' => '', 'aliases' => '', diff --git a/repo/tests/phpunit/includes/Specials/SpecialNewPropertyTest.php b/repo/tests/phpunit/includes/Specials/SpecialNewPropertyTest.php index 9a89c80..70ff7a6 100644 --- a/repo/tests/phpunit/includes/Specials/SpecialNewPropertyTest.php +++ b/repo/tests/phpunit/includes/Specials/SpecialNewPropertyTest.php @@ -154,7 +154,7 @@ return [ 'unknown language' => [ [ - 'lang' => 'some-wierd-language', + 'lang' => 'some-weird-language', 'label' => 'label-that-does-not-exist-1', 'description' => '', 'aliases' => '', -- To view, visit https://gerrit.wikimedia.org/r/328871 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I600681f6c8bbbe38636eedae764baccd7856a8cd Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Aude___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Labs: remove TMH and MwEmbedSupport override
MaxSem has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/328867 ) Change subject: Labs: remove TMH and MwEmbedSupport override .. Labs: remove TMH and MwEmbedSupport override They match prod. Change-Id: Ic363534e8dd7302eea365076e79c7a45508f2cad --- M wmf-config/InitialiseSettings-labs.php 1 file changed, 0 insertions(+), 11 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/67/328867/1 diff --git a/wmf-config/InitialiseSettings-labs.php b/wmf-config/InitialiseSettings-labs.php index 03c7408..f7b2fa3 100644 --- a/wmf-config/InitialiseSettings-labs.php +++ b/wmf-config/InitialiseSettings-labs.php @@ -216,17 +216,6 @@ 'default' => true, ], - // Enable TimedMediaHandler and MwEmbedSupport for testing on commons and enwiki - // TimedMediaHandler requires MwEmbedSupport. - 'wmgUseMwEmbedSupport' => [ - 'commonswiki' => true, - 'enwiki'=> true, - ], - 'wmgUseTimedMediaHandler' => [ - 'commonswiki' => true, - 'enwiki'=> true, - ], - 'wgMobileUrlTemplate' => [ 'default' => '%h0.m.%h1.%h2.%h3.%h4', 'wikidatawiki' => 'm.%h0.%h1.%h2.%h3', // T87440 -- To view, visit https://gerrit.wikimedia.org/r/328867 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic363534e8dd7302eea365076e79c7a45508f2cad Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: MaxSem___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Labs: remove wmgUseGWToolset
MaxSem has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/328870 ) Change subject: Labs: remove wmgUseGWToolset .. Labs: remove wmgUseGWToolset Matches prod. Change-Id: Iaabf131e50c5c51ce7fa6154f58c9d8188eea403 --- M wmf-config/InitialiseSettings-labs.php 1 file changed, 0 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/70/328870/1 diff --git a/wmf-config/InitialiseSettings-labs.php b/wmf-config/InitialiseSettings-labs.php index 0d2baed..c07ca31 100644 --- a/wmf-config/InitialiseSettings-labs.php +++ b/wmf-config/InitialiseSettings-labs.php @@ -251,11 +251,6 @@ 'deploymentwiki' => 'personal', ], - 'wmgUseGWToolset' => [ - 'default' => false, - 'commonswiki' => true, - ], - // Don't use an http/https proxy '-wgCopyUploadProxy' => [ 'default' => false, -- To view, visit https://gerrit.wikimedia.org/r/328870 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iaabf131e50c5c51ce7fa6154f58c9d8188eea403 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: MaxSem___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Labs: remove unused wmgCommonsMetadataForceRecalculate
MaxSem has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/328869 ) Change subject: Labs: remove unused wmgCommonsMetadataForceRecalculate .. Labs: remove unused wmgCommonsMetadataForceRecalculate Change-Id: I0dfb8bacbda9633ef0263049ca9d635e17898f50 --- M wmf-config/InitialiseSettings-labs.php 1 file changed, 0 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/69/328869/1 diff --git a/wmf-config/InitialiseSettings-labs.php b/wmf-config/InitialiseSettings-labs.php index 7ea7c40..0d2baed 100644 --- a/wmf-config/InitialiseSettings-labs.php +++ b/wmf-config/InitialiseSettings-labs.php @@ -251,10 +251,6 @@ 'deploymentwiki' => 'personal', ], - 'wmgCommonsMetadataForceRecalculate' => [ - 'default' => true, - ], - 'wmgUseGWToolset' => [ 'default' => false, 'commonswiki' => true, -- To view, visit https://gerrit.wikimedia.org/r/328869 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0dfb8bacbda9633ef0263049ca9d635e17898f50 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: MaxSem___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Labs: remove wmgUseCommonsMetadata
MaxSem has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/328868 ) Change subject: Labs: remove wmgUseCommonsMetadata .. Labs: remove wmgUseCommonsMetadata Matches prod. Change-Id: Ifc9661fc19394b6e98df895f37b4c2f4f334b537 --- M wmf-config/InitialiseSettings-labs.php 1 file changed, 0 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/68/328868/1 diff --git a/wmf-config/InitialiseSettings-labs.php b/wmf-config/InitialiseSettings-labs.php index f7b2fa3..7ea7c40 100644 --- a/wmf-config/InitialiseSettings-labs.php +++ b/wmf-config/InitialiseSettings-labs.php @@ -251,9 +251,6 @@ 'deploymentwiki' => 'personal', ], - 'wmgUseCommonsMetadata' => [ - 'default' => true, - ], 'wmgCommonsMetadataForceRecalculate' => [ 'default' => true, ], -- To view, visit https://gerrit.wikimedia.org/r/328868 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifc9661fc19394b6e98df895f37b4c2f4f334b537 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: MaxSem___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Labs: remove unused wmgUseWebFonts
MaxSem has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/328864 ) Change subject: Labs: remove unused wmgUseWebFonts .. Labs: remove unused wmgUseWebFonts Change-Id: Ib6913279077d5f6747503058e85891b8221a17d3 --- M wmf-config/InitialiseSettings-labs.php 1 file changed, 0 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/64/328864/1 diff --git a/wmf-config/InitialiseSettings-labs.php b/wmf-config/InitialiseSettings-labs.php index 5e1be8d..6e66574 100644 --- a/wmf-config/InitialiseSettings-labs.php +++ b/wmf-config/InitialiseSettings-labs.php @@ -161,10 +161,6 @@ 'deploymentwiki' => false ], - 'wmgUseWebFonts' => [ - 'mywiki' => true, - ], - '-wgLogo' => [ 'default' => '/static/images/project-logos/betawiki.png', 'commonswiki' => '/static/images/project-logos/betacommons.png', -- To view, visit https://gerrit.wikimedia.org/r/328864 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib6913279077d5f6747503058e85891b8221a17d3 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: MaxSem___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Labs: remove unused wmgNoticeProject
MaxSem has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/328863 ) Change subject: Labs: remove unused wmgNoticeProject .. Labs: remove unused wmgNoticeProject Change-Id: Iad6989b41a7707908fe8abaaf8caf7c36c52a38f --- M wmf-config/InitialiseSettings-labs.php 1 file changed, 0 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/63/328863/1 diff --git a/wmf-config/InitialiseSettings-labs.php b/wmf-config/InitialiseSettings-labs.php index 81b1ec3..5e1be8d 100644 --- a/wmf-config/InitialiseSettings-labs.php +++ b/wmf-config/InitialiseSettings-labs.php @@ -135,10 +135,6 @@ 'default' => 'https://upload.$variant.wmflabs.org/math', ], - 'wmgNoticeProject' => [ - 'deploymentwiki' => 'meta', - ], - '-wgDebugLogFile' => [ 'default' => "udp://{$wmfUdp2logDest}/wfDebug", ], -- To view, visit https://gerrit.wikimedia.org/r/328863 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iad6989b41a7707908fe8abaaf8caf7c36c52a38f Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: MaxSem___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Labs: remove wmgUseEcho overrides
MaxSem has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/328865 ) Change subject: Labs: remove wmgUseEcho overrides .. Labs: remove wmgUseEcho overrides Now that it's enabled everywhere public in prod, differentiation is not needed. Change-Id: Id2f81362d4c282bb55e033e0820e21afc6cd90c4 --- M wmf-config/InitialiseSettings-labs.php 1 file changed, 0 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/65/328865/1 diff --git a/wmf-config/InitialiseSettings-labs.php b/wmf-config/InitialiseSettings-labs.php index 6e66574..f85964c 100644 --- a/wmf-config/InitialiseSettings-labs.php +++ b/wmf-config/InitialiseSettings-labs.php @@ -183,10 +183,6 @@ 'default' => true, ], - 'wmgUseEcho' => [ - 'enwiki' => true, - 'en_rtlwiki' => true, - ], '-wmgEchoCluster' => [ 'default' => false, ], -- To view, visit https://gerrit.wikimedia.org/r/328865 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id2f81362d4c282bb55e033e0820e21afc6cd90c4 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: MaxSem___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Labs: remove wmgEchoMentionStatusNotifications
MaxSem has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/328866 ) Change subject: Labs: remove wmgEchoMentionStatusNotifications .. Labs: remove wmgEchoMentionStatusNotifications Matches prod. Change-Id: Id67ffc9eafb12afec04d0aedf80176d4540f96a0 --- M wmf-config/InitialiseSettings-labs.php 1 file changed, 0 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/66/328866/1 diff --git a/wmf-config/InitialiseSettings-labs.php b/wmf-config/InitialiseSettings-labs.php index f85964c..03c7408 100644 --- a/wmf-config/InitialiseSettings-labs.php +++ b/wmf-config/InitialiseSettings-labs.php @@ -186,9 +186,6 @@ '-wmgEchoCluster' => [ 'default' => false, ], - '-wmgEchoMentionStatusNotifications' => [ - 'default' => true, - ], # FIXME: make that settings to be applied '-wgShowExceptionDetails' => [ -- To view, visit https://gerrit.wikimedia.org/r/328866 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id67ffc9eafb12afec04d0aedf80176d4540f96a0 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: MaxSem___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: build: Karma proxy should convert Host header
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/328384 ) Change subject: build: Karma proxy should convert Host header .. build: Karma proxy should convert Host header By default the Karma proxy does requests against 'localhost', however if the target wiki server has strict host validation (e.g. multiple virtual hosts or otherwise strictly verified) then requests may fail since load.php is not found. An example is with MW_SERVER=devwiki.local. MediaWiki-Vagrant and Wikimedia CI are not affected since they use 'localhost' as the virtual host. Set Karma proxy to change the hostname accordingly. Reference: https://github.com/karma-runner/karma/issues/1729 https://github.com/karma-runner/karma/commit/ae05ea4 Bug: T153757 Change-Id: I317d5686aecd1fb6cf6921cdca77670cded85607 --- M Gruntfile.js 1 file changed, 4 insertions(+), 1 deletion(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/Gruntfile.js b/Gruntfile.js index 55b7932..7b3af54 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -14,7 +14,10 @@ grunt.loadNpmTasks( 'grunt-karma' ); grunt.loadNpmTasks( 'grunt-stylelint' ); - karmaProxy[ wgScriptPath ] = wgServer + wgScriptPath; + karmaProxy[ wgScriptPath ] = { + target: wgServer + wgScriptPath, + changeOrigin: true + }; grunt.initConfig( { eslint: { -- To view, visit https://gerrit.wikimedia.org/r/328384 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I317d5686aecd1fb6cf6921cdca77670cded85607 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: HasharGerrit-Reviewer: Hashar Gerrit-Reviewer: Krinkle Gerrit-Reviewer: Paladox Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...PageAssessments[master]: Add check for extension installation to maintenance script
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/328692 ) Change subject: Add check for extension installation to maintenance script .. Add check for extension installation to maintenance script Change-Id: Ie3bbd7405db2e6aadcccef1947f379137226322e --- M maintenance/purgeUnusedProjects.php 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: jenkins-bot: Verified Samwilson: Looks good to me, approved diff --git a/maintenance/purgeUnusedProjects.php b/maintenance/purgeUnusedProjects.php index 22a4ba5..4461448 100644 --- a/maintenance/purgeUnusedProjects.php +++ b/maintenance/purgeUnusedProjects.php @@ -15,6 +15,7 @@ public function __construct() { parent::__construct(); + $this->requireExtension( 'PageAssessments' ); $this->addDescription( "Purge unused projects from the page_assessments_projects table" ); $this->addOption( 'dry-run', "Show how many projects would be deleted, but don't actually purge them." ); } -- To view, visit https://gerrit.wikimedia.org/r/328692 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie3bbd7405db2e6aadcccef1947f379137226322e Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/PageAssessments Gerrit-Branch: master Gerrit-Owner: KaldariGerrit-Reviewer: Alex Monk Gerrit-Reviewer: Legoktm Gerrit-Reviewer: MusikAnimal Gerrit-Reviewer: Niharika29 Gerrit-Reviewer: Samwilson Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Translate[master]: Fix class annotations
MaxSem has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/328862 ) Change subject: Fix class annotations .. Fix class annotations Change-Id: I854fafea726fcd5ea82246b5cf1c4c08d9ec258a --- M utils/MessageGroupCache.php M utils/MessageIndex.php 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/62/328862/1 diff --git a/utils/MessageGroupCache.php b/utils/MessageGroupCache.php index d3080e4..f2f9b44 100644 --- a/utils/MessageGroupCache.php +++ b/utils/MessageGroupCache.php @@ -26,7 +26,7 @@ protected $group; /** -* @var CdbReader +* @var \Cdb\Reader */ protected $cache; diff --git a/utils/MessageIndex.php b/utils/MessageIndex.php index 58bfb5e..05f86bb 100644 --- a/utils/MessageIndex.php +++ b/utils/MessageIndex.php @@ -586,7 +586,7 @@ protected $index; /** -* @var CdbReader|null +* @var \Cdb\Reader|null */ protected $reader; -- To view, visit https://gerrit.wikimedia.org/r/328862 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I854fafea726fcd5ea82246b5cf1c4c08d9ec258a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: MaxSem___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: [WIP] T113044: Complete templatearg representation in spec
Arlolra has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/328861 ) Change subject: [WIP] T113044: Complete templatearg representation in spec .. [WIP] T113044: Complete templatearg representation in spec * Adds a data-mw attribute with the argument name and default value, similar to how templates are structured. * TODO: * Find places where the mw:Param vs mw:Translucsion no longer makes sense. Perhaps in traversing with tmplinfo. * The content in mw:Param doesn't need data-parsoid, so it should be stripped like in mw:Transclusion. * Fix the escaping in "Fuzz testing: Parser25" Change-Id: Ib5c3da5e56b1fb8c587ec94071f5707ecc29 --- M lib/html2wt/DOMHandlers.js M lib/html2wt/WikitextSerializer.js M lib/wt2html/pp/processors/wrapTemplates.js M lib/wt2html/tt/TemplateHandler.js M tests/parserTests-blacklist.js M tests/parserTests.txt 6 files changed, 38 insertions(+), 25 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid refs/changes/61/328861/1 diff --git a/lib/html2wt/DOMHandlers.js b/lib/html2wt/DOMHandlers.js index 12c251c..69b1509 100644 --- a/lib/html2wt/DOMHandlers.js +++ b/lib/html2wt/DOMHandlers.js @@ -1414,20 +1414,14 @@ var dataMw = DU.getDataMw(node); var p; var typeOf = node.getAttribute('typeof') || ''; - if (/(?:^|\s)mw:Transclusion(?=$|\s)/.test(typeOf)) { + if (/(?:^|\s)(?:mw:Transclusion|mw:Param)(?=$|\s)/.test(typeOf)) { if (dataMw.parts) { p = self._buildTemplateWT(node, dataMw.parts); } else if (dp.src !== undefined) { env.log("error", "data-mw missing in: " + node.outerHTML); p = Promise.resolve(dp.src); } else { - throw new ClientError("Cannot serialize transclusion without data-mw.parts or data-parsoid.src."); - } - } else if (/(?:^|\s)mw:Param(?=$|\s)/.test(typeOf)) { - if (dp.src !== undefined) { - p = Promise.resolve(dp.src); - } else { - throw new ClientError("No source for params."); + throw new ClientError("Cannot serialize " + typeOf + " without data-mw.parts or data-parsoid.src"); } } else if (/(?:^|\s)mw:Extension\//.test(typeOf)) { if (!dataMw.name && dp.src === undefined) { diff --git a/lib/html2wt/WikitextSerializer.js b/lib/html2wt/WikitextSerializer.js index d8c2882..cc179c0 100644 --- a/lib/html2wt/WikitextSerializer.js +++ b/lib/html2wt/WikitextSerializer.js @@ -383,9 +383,13 @@ // See https://github.com/wikimedia/mediawiki-extensions-TemplateData/blob/master/Specification.md // for the templatedata specification. -WSP._serializeTemplate = function(node, tpl, isTpl, tplData) { +WSP._serializeTemplate = Promise.method(function(node, tpl, isTpl, tplData, isTplArg) { + var count = isTplArg ? 3 : 2; + var start = '{'.repeat(count); + var end = '}'.repeat(count); + // open the transclusion - var buf = '{{' + tpl.target.wt; + var buf = start + tpl.target.wt; // Trim whitespace from data-mw keys to deal with non-compliant // clients. Make sure param info is accessible for the stripped key @@ -398,7 +402,7 @@ return strippedK; }); if (!tplKeysFromDataMw.length) { - return buf + '}}'; + return buf + end; } var self = this; @@ -603,15 +607,23 @@ } } - return buf + '}}'; + return buf + end; }); -}; +}); WSP._buildTemplateWT = Promise.method(function(node, srcParts) { var env = this.env; var self = this; var useTplData = DU.isNewElt(node) || DU.hasDiffMarkers(node, env); return Promise.reduce(srcParts, function(buf, part) { + var tplarg = part.templatearg; + if (tplarg) { + return self._serializeTemplate(node, tplarg, false, null, true) + .then(function(str) { + return buf + str; + }); + } + var tpl = part.template; if (!tpl) { return buf + part; @@ -637,7 +649,7 @@ return p.then(function(apiResp) { tplData = apiResp && apiResp[Object.keys(apiResp)[0]];
[MediaWiki-commits] [Gerrit] operations...wikistats[master]: fix for updating miraheze wikis with custom URLs
Dzahn has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/328860 ) Change subject: fix for updating miraheze wikis with custom URLs .. fix for updating miraheze wikis with custom URLs Bug: T146712 Change-Id: I0f6c98d09ab16397386d8b4d0bfb876acaa7e516 --- M usr/lib/wikistats/update.php 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Dzahn: Verified; Looks good to me, approved diff --git a/usr/lib/wikistats/update.php b/usr/lib/wikistats/update.php index fd847d9..f178f89 100644 --- a/usr/lib/wikistats/update.php +++ b/usr/lib/wikistats/update.php @@ -201,7 +201,7 @@ $query = "select * from ${table} where http=${http} order by ts desc"; break; case "new": -$query = "select * from ${table} where total is null order by id desc limit 20"; +$query = "select * from ${table} where total is null order by id desc"; break; case "null": $query = "select * from ${table} where total is null"; @@ -320,7 +320,7 @@ } elseif (in_array($table, $tables_with_prefix_w)) { $prefix=$row['prefix']; if ($row['statsurl']!='') { -$url=$row['statsurl']; +$url="https://".$row['statsurl']."/w/api.php${api_query_stat}"; } else { $url="https://".$row['prefix'].".${domain}/w/api.php${api_query_stat}"; } -- To view, visit https://gerrit.wikimedia.org/r/328860 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0f6c98d09ab16397386d8b4d0bfb876acaa7e516 Gerrit-PatchSet: 2 Gerrit-Project: operations/debs/wikistats Gerrit-Branch: master Gerrit-Owner: DzahnGerrit-Reviewer: Dzahn ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations...wikistats[master]: fix for updating miraheze wikis with custom URLs
Dzahn has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/328860 ) Change subject: fix for updating miraheze wikis with custom URLs .. fix for updating miraheze wikis with custom URLs Bug: T146712 Change-Id: I0f6c98d09ab16397386d8b4d0bfb876acaa7e516 --- M usr/lib/wikistats/update.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/debs/wikistats refs/changes/60/328860/1 diff --git a/usr/lib/wikistats/update.php b/usr/lib/wikistats/update.php index fd847d9..f178f89 100644 --- a/usr/lib/wikistats/update.php +++ b/usr/lib/wikistats/update.php @@ -201,7 +201,7 @@ $query = "select * from ${table} where http=${http} order by ts desc"; break; case "new": -$query = "select * from ${table} where total is null order by id desc limit 20"; +$query = "select * from ${table} where total is null order by id desc"; break; case "null": $query = "select * from ${table} where total is null"; @@ -320,7 +320,7 @@ } elseif (in_array($table, $tables_with_prefix_w)) { $prefix=$row['prefix']; if ($row['statsurl']!='') { -$url=$row['statsurl']; +$url="https://".$row['statsurl']."/w/api.php${api_query_stat}"; } else { $url="https://".$row['prefix'].".${domain}/w/api.php${api_query_stat}"; } -- To view, visit https://gerrit.wikimedia.org/r/328860 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0f6c98d09ab16397386d8b4d0bfb876acaa7e516 Gerrit-PatchSet: 1 Gerrit-Project: operations/debs/wikistats 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] mediawiki/core[master]: Avoid starting transactions in getHeartbeatData()
Aaron Schulz has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/328859 ) Change subject: Avoid starting transactions in getHeartbeatData() .. Avoid starting transactions in getHeartbeatData() This can avoid excess round trips in LoadBalancer::getLagTimes() Change-Id: Ibe9558cc825c5a0dd03ea109926ff15d00c60e31 --- M includes/libs/rdbms/database/DatabaseMysqlBase.php 1 file changed, 14 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/59/328859/1 diff --git a/includes/libs/rdbms/database/DatabaseMysqlBase.php b/includes/libs/rdbms/database/DatabaseMysqlBase.php index 668443b..5d680e2 100644 --- a/includes/libs/rdbms/database/DatabaseMysqlBase.php +++ b/includes/libs/rdbms/database/DatabaseMysqlBase.php @@ -756,14 +756,20 @@ * @see https://www.percona.com/doc/percona-toolkit/2.1/pt-heartbeat.html */ protected function getHeartbeatData( array $conds ) { - $whereSQL = $this->makeList( $conds, self::LIST_AND ); - // Use ORDER BY for channel based queries since that field might not be UNIQUE. - // Note: this would use "TIMESTAMPDIFF(MICROSECOND,ts,UTC_TIMESTAMP(6))" but the - // percision field is not supported in MySQL <= 5.5. - $res = $this->query( - "SELECT ts FROM heartbeat.heartbeat WHERE $whereSQL ORDER BY ts DESC LIMIT 1" - ); - $row = $res ? $res->fetchObject() : false; + // Do not bother starting implicit transactions here + $this->clearFlag( self::DBO_TRX, self::REMEMBER_PRIOR ); + try { + $whereSQL = $this->makeList( $conds, self::LIST_AND ); + // Use ORDER BY for channel based queries since that field might not be UNIQUE. + // Note: this would use "TIMESTAMPDIFF(MICROSECOND,ts,UTC_TIMESTAMP(6))" but the + // percision field is not supported in MySQL <= 5.5. + $res = $this->query( + "SELECT ts FROM heartbeat.heartbeat WHERE $whereSQL ORDER BY ts DESC LIMIT 1" + ); + $row = $res ? $res->fetchObject() : false; + } finally { + $this->restoreFlags(); + } return [ $row ? $row->ts : null, microtime( true ) ]; } -- To view, visit https://gerrit.wikimedia.org/r/328859 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibe9558cc825c5a0dd03ea109926ff15d00c60e31 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Batch look up order status for Ingenico
Ejegg has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/328858 ) Change subject: Batch look up order status for Ingenico .. Batch look up order status for Ingenico Change-Id: Ibc748223e3c7c2cd3d08925eb6b8853c3dc6d7af --- A globalcollect_gateway/scripts/get_orderstatus.php 1 file changed, 66 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface refs/changes/58/328858/1 diff --git a/globalcollect_gateway/scripts/get_orderstatus.php b/globalcollect_gateway/scripts/get_orderstatus.php new file mode 100644 index 000..18edf2a --- /dev/null +++ b/globalcollect_gateway/scripts/get_orderstatus.php @@ -0,0 +1,66 @@ +addOption( 'file', 'Read order IDs in from a file', + true, true, 'f' ); + } + + public function execute() { + global $wgGlobalCollectGatewayEnableCustomFilters; + + // don't run fraud checks + $wgGlobalCollectGatewayEnableCustomFilters = false; + + $filename = $this->getOption( 'file' ); + if( !( $file = fopen( $filename, 'r' ) ) ){ + $this->error( 'Could not find order id file: ' . $filename, true ); +} + while ( $order = fgetcsv( $file ) ) { + $effort_id = 1; + if ( count( $order ) === 2 ) { + $effort_id = $order[1]; + } else if ( count( $order ) !== 1 ) { + $this->error( 'Input lines must have either one or two columns', true ); + } + $oid = $order[0]; + $gateway_opts = array( + 'batch_mode' => true, + 'external_data' => array( + 'order_id' => $oid, + 'effort_id' => $effort_id, + 'payment_method' => 'cc', + 'payment_submethod' => 'visa', + 'currency_code' => 'USD', + 'amount' => 500, + ), + ); + + $this->output( "Looking up transaction $oid\n" ); + $adapter = new GlobalCollectAdapter( $gateway_opts ); + // FIXME: effort_id is clobbered in setGatewayDefaults + $adapter->addRequestData( array( 'effort_id' => $effort_id ) ); + $result = $adapter->do_transaction( 'GET_ORDERSTATUS' ); + + // TODO: better formatting? + $this->output( print_r( $result->getData(), true ) ); + } + fclose( $file ); + } +} + +$maintClass = 'IngenicoGetOrderStatusMaintenance'; +require_once RUN_MAINTENANCE_IF_MAIN; -- To view, visit https://gerrit.wikimedia.org/r/328858 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibc748223e3c7c2cd3d08925eb6b8853c3dc6d7af Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DonationInterface Gerrit-Branch: master Gerrit-Owner: Ejegg___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations...wikistats[master]: fixes to import_miraheze_custom_wikis.sh
Dzahn has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/328857 ) Change subject: fixes to import_miraheze_custom_wikis.sh .. fixes to import_miraheze_custom_wikis.sh Change-Id: I5bf6b4f6de8d3db066a39add73d0d297acb8060c --- M usr/local/bin/wikistats/import_miraheze_custom_wikis.sh 1 file changed, 6 insertions(+), 4 deletions(-) Approvals: Dzahn: Verified; Looks good to me, approved diff --git a/usr/local/bin/wikistats/import_miraheze_custom_wikis.sh b/usr/local/bin/wikistats/import_miraheze_custom_wikis.sh index 03f493d..31696c8 100755 --- a/usr/local/bin/wikistats/import_miraheze_custom_wikis.sh +++ b/usr/local/bin/wikistats/import_miraheze_custom_wikis.sh @@ -18,12 +18,14 @@ wiki=$(echo $line|cut -d\| -f1) url=$(echo $line| cut -d\| -f2) -echo "DELETE from `miraheze` where prefix='${wiki}';" | tee $WORKDIR/$OUTFILE -echo "INSERT IGNORE INTO `miraheze` (`prefix`,`method`,`statsurl`) values ('${wiki}','8','${url}');" | tee $WORKDIR/$OUTFILE +echo "DELETE from miraheze where prefix='${wiki}';" | tee $OUTFILE +echo "INSERT IGNORE INTO miraheze (prefix,method,statsurl) values ('${wiki}','8','${url}');" | tee $OUTFILE done < "${INFILE}" -/usr/bin/mysql -u root wikistats < $WORKDIR/$OUTFILE +cat $OUTFILE -/bin/rm $WORKDIR/$INFILE +/usr/bin/mysql -u root wikistats < $OUTFILE + +/bin/rm $WORKDIR/$INFILE $OUTFILE -- To view, visit https://gerrit.wikimedia.org/r/328857 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5bf6b4f6de8d3db066a39add73d0d297acb8060c Gerrit-PatchSet: 3 Gerrit-Project: operations/debs/wikistats Gerrit-Branch: master Gerrit-Owner: DzahnGerrit-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] operations...wikistats[master]: fixes to import_miraheze_custom_wikis.sh
Dzahn has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/328857 ) Change subject: fixes to import_miraheze_custom_wikis.sh .. fixes to import_miraheze_custom_wikis.sh Change-Id: I5bf6b4f6de8d3db066a39add73d0d297acb8060c --- M usr/local/bin/wikistats/import_miraheze_custom_wikis.sh 1 file changed, 6 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/debs/wikistats refs/changes/57/328857/1 diff --git a/usr/local/bin/wikistats/import_miraheze_custom_wikis.sh b/usr/local/bin/wikistats/import_miraheze_custom_wikis.sh index 03f493d..bc4f1bd 100755 --- a/usr/local/bin/wikistats/import_miraheze_custom_wikis.sh +++ b/usr/local/bin/wikistats/import_miraheze_custom_wikis.sh @@ -18,12 +18,14 @@ wiki=$(echo $line|cut -d\| -f1) url=$(echo $line| cut -d\| -f2) -echo "DELETE from `miraheze` where prefix='${wiki}';" | tee $WORKDIR/$OUTFILE -echo "INSERT IGNORE INTO `miraheze` (`prefix`,`method`,`statsurl`) values ('${wiki}','8','${url}');" | tee $WORKDIR/$OUTFILE +echo "DELETE from miraheze where prefix='${wiki}';" | tee $OUTFILE +echo "INSERT IGNORE INTO miraheze (prefix,method,statsurl) values ('${wiki}','8','${url}');" | tee $OUTFILE done < "${INFILE}" -/usr/bin/mysql -u root wikistats < $WORKDIR/$OUTFILE +# /usr/bin/mysql -u root wikistats < $OUTFILE -/bin/rm $WORKDIR/$INFILE +cat $OUTFILE + +/bin/rm $WORKDIR/$INFILE $OUTFILE -- To view, visit https://gerrit.wikimedia.org/r/328857 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5bf6b4f6de8d3db066a39add73d0d297acb8060c Gerrit-PatchSet: 1 Gerrit-Project: operations/debs/wikistats 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] operations...wikistats[master]: script to import miraheze wikis with custom domains
Dzahn has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/328856 ) Change subject: script to import miraheze wikis with custom domains .. script to import miraheze wikis with custom domains importing miraheze wikis with custom domain names from the file generated at https://phabricator.miraheze.org/T1176 Bug: T153930 Change-Id: Ia506777b773faf314815494b8c1900354287b6d4 --- A usr/local/bin/wikistats/import_miraheze_custom_wikis.sh 1 file changed, 29 insertions(+), 0 deletions(-) Approvals: Dzahn: Verified; Looks good to me, approved diff --git a/usr/local/bin/wikistats/import_miraheze_custom_wikis.sh b/usr/local/bin/wikistats/import_miraheze_custom_wikis.sh new file mode 100755 index 000..03f493d --- /dev/null +++ b/usr/local/bin/wikistats/import_miraheze_custom_wikis.sh @@ -0,0 +1,29 @@ +#!/bin/bash +# import miraheze wikis with custom domain names +# Dzahn - https://phabricator.wikimedia.org/T153930 + +WORKDIR="/tmp" +INFILE="custom.txt" +URL="https://meta.miraheze.org/wstats/${INFILE}; +OUTFILE="${WORKDIR}/miraheze_custom_wikis.sql" + + +cd $WORKDIR +/bin/rm $INFILE +/usr/bin/wget $URL + +while read -r line + do + +wiki=$(echo $line|cut -d\| -f1) +url=$(echo $line| cut -d\| -f2) + +echo "DELETE from `miraheze` where prefix='${wiki}';" | tee $WORKDIR/$OUTFILE +echo "INSERT IGNORE INTO `miraheze` (`prefix`,`method`,`statsurl`) values ('${wiki}','8','${url}');" | tee $WORKDIR/$OUTFILE + +done < "${INFILE}" + +/usr/bin/mysql -u root wikistats < $WORKDIR/$OUTFILE + +/bin/rm $WORKDIR/$INFILE + -- To view, visit https://gerrit.wikimedia.org/r/328856 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia506777b773faf314815494b8c1900354287b6d4 Gerrit-PatchSet: 2 Gerrit-Project: operations/debs/wikistats Gerrit-Branch: master Gerrit-Owner: DzahnGerrit-Reviewer: Dzahn Gerrit-Reviewer: Southparkfan Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations...wikistats[master]: script to import miraheze wikis with custom domains
Dzahn has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/328856 ) Change subject: script to import miraheze wikis with custom domains .. script to import miraheze wikis with custom domains importing miraheze wikis with custom domain names from the file generated at https://phabricator.miraheze.org/T1176 Bug: T153930 Change-Id: Ia506777b773faf314815494b8c1900354287b6d4 --- A usr/local/bin/wikistats/import_miraheze_custom_wikis.sh 1 file changed, 29 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/debs/wikistats refs/changes/56/328856/1 diff --git a/usr/local/bin/wikistats/import_miraheze_custom_wikis.sh b/usr/local/bin/wikistats/import_miraheze_custom_wikis.sh new file mode 100755 index 000..03f493d --- /dev/null +++ b/usr/local/bin/wikistats/import_miraheze_custom_wikis.sh @@ -0,0 +1,29 @@ +#!/bin/bash +# import miraheze wikis with custom domain names +# Dzahn - https://phabricator.wikimedia.org/T153930 + +WORKDIR="/tmp" +INFILE="custom.txt" +URL="https://meta.miraheze.org/wstats/${INFILE}; +OUTFILE="${WORKDIR}/miraheze_custom_wikis.sql" + + +cd $WORKDIR +/bin/rm $INFILE +/usr/bin/wget $URL + +while read -r line + do + +wiki=$(echo $line|cut -d\| -f1) +url=$(echo $line| cut -d\| -f2) + +echo "DELETE from `miraheze` where prefix='${wiki}';" | tee $WORKDIR/$OUTFILE +echo "INSERT IGNORE INTO `miraheze` (`prefix`,`method`,`statsurl`) values ('${wiki}','8','${url}');" | tee $WORKDIR/$OUTFILE + +done < "${INFILE}" + +/usr/bin/mysql -u root wikistats < $WORKDIR/$OUTFILE + +/bin/rm $WORKDIR/$INFILE + -- To view, visit https://gerrit.wikimedia.org/r/328856 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia506777b773faf314815494b8c1900354287b6d4 Gerrit-PatchSet: 1 Gerrit-Project: operations/debs/wikistats 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] mediawiki...ParserFunctions[master]: Stop using deprecated core UtfNormal
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/328844 ) Change subject: Stop using deprecated core UtfNormal .. Stop using deprecated core UtfNormal Change-Id: If6b7de39ab9f32d50cfdf86312ed7edca9faaf01 --- M Expr.php 1 file changed, 3 insertions(+), 1 deletion(-) Approvals: EBernhardson: Looks good to me, approved jenkins-bot: Verified diff --git a/Expr.php b/Expr.php index 1541076..d484e09 100644 --- a/Expr.php +++ b/Expr.php @@ -1,5 +1,7 @@ https://gerrit.wikimedia.org/r/328844 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If6b7de39ab9f32d50cfdf86312ed7edca9faaf01 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/ParserFunctions Gerrit-Branch: master Gerrit-Owner: MaxSemGerrit-Reviewer: EBernhardson Gerrit-Reviewer: Jackmcbarn Gerrit-Reviewer: Krinkle Gerrit-Reviewer: Legoktm Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: WIP fetch contribution_id for orphans
Ejegg has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/328855 ) Change subject: WIP fetch contribution_id for orphans .. WIP fetch contribution_id for orphans Change-Id: I2d0c635148844978f0b856f58b95076d939eb174 --- M globalcollect_gateway/GlobalCollectOrphanRectifier.php M globalcollect_gateway/orphan.adapter.php M tests/phpunit/Adapter/GlobalCollect/GlobalCollectOrphanAdapterTest.php 3 files changed, 17 insertions(+), 28 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface refs/changes/55/328855/1 diff --git a/globalcollect_gateway/GlobalCollectOrphanRectifier.php b/globalcollect_gateway/GlobalCollectOrphanRectifier.php index 4de9e49..a6414e5 100644 --- a/globalcollect_gateway/GlobalCollectOrphanRectifier.php +++ b/globalcollect_gateway/GlobalCollectOrphanRectifier.php @@ -36,7 +36,7 @@ protected $time_buffer; /** -* @var GatewayType Payments adapter to do the processing. +* @var GlobalCollectOrphanAdapter Payments adapter to do the processing. */ protected $adapter; @@ -156,16 +156,14 @@ * fully rectified or not. * * @param array $normalized Orphaned message -* @param boolean $query_contribution_tracking A flag specifying if we -* should query the contribution_tracking table or not. Defaults to true. * * @return boolean True if the orphan has been rectified, false if not. */ - protected function rectifyOrphan( $normalized, $query_contribution_tracking = true ){ + protected function rectifyOrphan( $normalized ){ $this->logger->info( "Rectifying orphan: {$normalized['order_id']}" ); $is_rectified = false; - $this->adapter->loadDataAndReInit( $normalized, $query_contribution_tracking ); + $this->adapter->loadDataAndReInit( $normalized ); $results = $this->adapter->do_transaction( 'Confirm_CreditCard' ); // FIXME: error message is squishy and inconsistent with the error_map diff --git a/globalcollect_gateway/orphan.adapter.php b/globalcollect_gateway/orphan.adapter.php index 296b0d3..2bb647b 100644 --- a/globalcollect_gateway/orphan.adapter.php +++ b/globalcollect_gateway/orphan.adapter.php @@ -51,33 +51,21 @@ } // FIXME: This needs some serious code reuse trickery. - public function loadDataAndReInit( $data, $useDB = true ) { + public function loadDataAndReInit( $data ) { //re-init all these arrays, because this is a batch thing. $this->session_killAllEverything(); // just to be sure $this->transaction_response = new PaymentTransactionResponse(); - $this->hard_data = array( ); + $this->hard_data = array( + 'order_id' => $data['order_id'] + ); $this->unstaged_data = array( ); $this->staged_data = array( ); - - $this->hard_data['order_id'] = $data['order_id']; $this->dataObj = new DonationData( $this, $data ); $this->unstaged_data = $this->dataObj->getDataEscaped(); - if ( $useDB ){ - $this->hard_data = array_merge( $this->hard_data, $this->getUTMInfoFromDB() ); - } else { - $utm_keys = array( - 'utm_source', - 'utm_campaign', - 'utm_medium', - 'date' - ); - foreach($utm_keys as $key){ - $this->hard_data[$key] = $data[$key]; - } - } + $this->hard_data = array_merge( $this->hard_data, $this->getUTMInfoFromDB() ); $this->reAddHardData(); $this->staged_data = $this->unstaged_data; @@ -140,6 +128,7 @@ $res = $db->select( 'contribution_tracking', array( + 'contribution_id', 'utm_source', 'utm_campaign', 'utm_medium', @@ -147,7 +136,9 @@ ), array( 'id' => $ctid ) ); + // Fixme: if we get more than one row back, MySQL is broken foreach ( $res as $thing ) { + $data['contribution_id'] = $thing->contribution_id; $data['utm_source'] = $thing->utm_source; $data['utm_campaign'] = $thing->utm_campaign;
[MediaWiki-commits] [Gerrit] mediawiki...GeoData[master]: Move geosearch features to GeoData extension.
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/326039 ) Change subject: Move geosearch features to GeoData extension. .. Move geosearch features to GeoData extension. Depends on Id08efd46337a977639ebf3724ee3492512f326ac to actually work, but since it works via hook, can be merged independently. Bug: T152730 Change-Id: I24eb69b1aa91c528a230432164f6441593d95365 --- M extension.json M includes/Hooks.php A includes/Search/CirrusGeoFeature.php R includes/Search/CoordinatesIndexField.php R includes/Search/GeoPointIndexField.php A includes/Search/GeoRadiusFunctionScoreBuilder.php A tests/phpunit/GeoFeatureTest.php 7 files changed, 585 insertions(+), 3 deletions(-) Approvals: EBernhardson: Looks good to me, approved MaxSem: Looks good to me, approved jenkins-bot: Verified diff --git a/extension.json b/extension.json index f9f82a4..b3c4040 100644 --- a/extension.json +++ b/extension.json @@ -24,12 +24,14 @@ "GeoData\\ApiQueryGeoSearchDb": "includes/api/ApiQueryGeoSearchDb.php", "GeoData\\ApiQueryGeoSearchElastic": "includes/api/ApiQueryGeoSearchElastic.php", "GeoData\\BoundingBox": "includes/BoundingBox.php", + "GeoData\\CirrusGeoFeature": "includes/Search/CirrusGeoFeature.php", "GeoData\\Coord": "includes/Coord.php", - "GeoData\\CoordinatesIndexField" : "includes/CoordinatesIndexField.php", + "GeoData\\CoordinatesIndexField" : "includes/Search/CoordinatesIndexField.php", "GeoData\\CoordinatesOutput": "includes/CoordinatesOutput.php", "GeoData\\CoordinatesParserFunction": "includes/CoordinatesParserFunction.php", "GeoData\\GeoData": "includes/GeoData.body.php", - "GeoData\\GeoPointIndexField" : "includes/GeoPointIndexField.php", + "GeoData\\GeoPointIndexField" : "includes/Search/GeoPointIndexField.php", + "GeoData\\GeoRadiusFunctionScoreBuilder": "includes/Search/GeoRadiusFunctionScoreBuilder.php", "GeoData\\Globe": "includes/Globe.php", "GeoData\\Hooks": "includes/Hooks.php", "GeoData\\Math": "includes/Math.php", @@ -45,6 +47,7 @@ "SearchIndexFields": "GeoData\\Hooks::onSearchIndexFields", "SearchDataForIndex": "GeoData\\Hooks::onSearchDataForIndex", "ParserTestTables": "GeoData\\Hooks::onParserTestTables", + "CirrusSearchAddQueryFeatures": "GeoData\\Hooks::onCirrusSearchAddQueryFeatures", "ApiQuery::moduleManager": "GeoData\\Hooks::onApiQueryModuleManager" }, "TrackingCategories": [ @@ -115,6 +118,12 @@ "GeoDataUseCirrusSearch": { "value": false }, + "GeoDataRadiusScoreOverrides": { + "value": { + "config_override": "GeoDataPreferGeoRadiusWeight", + "uri_param_override": "geodataPreferGeoRadiusWeight" + } + }, "GeoDataDebug": { "value": false } diff --git a/includes/Hooks.php b/includes/Hooks.php index 133a73c..4ac1c91 100644 --- a/includes/Hooks.php +++ b/includes/Hooks.php @@ -4,6 +4,7 @@ use ApiModuleManager; use Article; +use CirrusSearch\SearchConfig; use Content; use DatabaseUpdater; use LinksUpdate; @@ -349,4 +350,13 @@ ); } } + + /** +* Add geo-search feature to search syntax +* @param SearchConfig $config +* @param array $features +*/ + public static function onCirrusSearchAddQueryFeatures( SearchConfig $config, array &$features ) { + $features[] = new CirrusGeoFeature(); + } } diff --git a/includes/Search/CirrusGeoFeature.php b/includes/Search/CirrusGeoFeature.php new file mode 100644 index 000..9b05cda --- /dev/null +++ b/includes/Search/CirrusGeoFeature.php @@ -0,0 +1,224 @@ +parseGeoNearbyTitle( + $context->getConfig(), + $value + ); + } else { + list( $coord, $radius ) = $this->parseGeoNearby( $context->getConfig(), $value ); + $excludeDocId = ''; + } + + $filter = null; + if ( $coord ) { + if ( substr( $key, 0, 6 ) === 'boost-' ) { + $this->getRescoreBuilder( $context, $negated ? 0.1 : 1, $coord, $radius ); + } else { + $filter = self::createQuery( $coord, $radius, $excludeDocId ); + } + } + + return [ $filter, false ]; + } + +
[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: Allow extensions to hook features
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/326037 ) Change subject: Allow extensions to hook features .. Allow extensions to hook features Also move GeoFeature to GeoData extension. See I24eb69b1aa91c528a230432164f6441593d95365 for GeoData code. Should not be merged before I24eb69b1aa91c528a230432164f6441593d95365 is merged, otherwise geosearch will break. Change-Id: Id08efd46337a977639ebf3724ee3492512f326ac Depends-On: I24eb69b1aa91c528a230432164f6441593d95365 Bug: T152730 --- M README M autoload.php A docs/hooks.txt D includes/Query/GeoFeature.php M includes/Search/RescoreBuilders.php M includes/Search/SearchContext.php M includes/Searcher.php M profiles/RescoreProfiles.config.php D tests/unit/Query/GeoFeatureTest.php 9 files changed, 170 insertions(+), 639 deletions(-) Approvals: Cindy-the-browser-test-bot: Looks good to me, but someone else must approve EBernhardson: Looks good to me, approved jenkins-bot: Verified diff --git a/README b/README index 23f5f92..f76813f 100644 --- a/README +++ b/README @@ -260,27 +260,7 @@ Hooks - -CirrusSearch provides hooks that other extensions can make use of to extend the core schema and -modify documents. - -There are currently two phases to building cirrus documents: the parse phase and the links phase. -The parse phase then the links phase is run when the article's rendered text would change (actual -article change and template change). Only the links phase is run when an article is newly links -or unlinked. - -Note that this whole thing is a somewhat experimental feature at this point and the API hasn't -really been settled. - -'CirrusSearchAnalysisConfig': Allows to hook into the configuration for analysis - - multi-dimensional configuration array for analysis of various languages and fields - $builder - instance of MappingConfigBuilder, for easier use of utility methods to build fields - -'CirrusSearchMappingConfig': Allows configuration of the mapping of fields - - multi-dimensional configuration array that contains Elasticsearch document configuration. - The 'page' index contains configuration for Elasticsearch documents representing pages. - The 'namespace' index contains namespace configuration for Elasticsearch documents representing - namespaces. - +See docs/hooks.txt. Validating a new version of Elasticsearch - diff --git a/autoload.php b/autoload.php index 92f7d56..33c806c 100644 --- a/autoload.php +++ b/autoload.php @@ -112,7 +112,6 @@ 'CirrusSearch\\Query\\FullTextQueryBuilder' => __DIR__ . '/includes/Query/FullTextQueryBuilder.php', 'CirrusSearch\\Query\\FullTextQueryStringQueryBuilder' => __DIR__ . '/includes/Query/FullTextQueryStringQueryBuilder.php', 'CirrusSearch\\Query\\FullTextSimpleMatchQueryBuilder' => __DIR__ . '/includes/Query/FullTextSimpleMatchQueryBuilder.php', - 'CirrusSearch\\Query\\GeoFeature' => __DIR__ . '/includes/Query/GeoFeature.php', 'CirrusSearch\\Query\\HasTemplateFeature' => __DIR__ . '/includes/Query/HasTemplateFeature.php', 'CirrusSearch\\Query\\InCategoryFeature' => __DIR__ . '/includes/Query/InCategoryFeature.php', 'CirrusSearch\\Query\\InTitleFeature' => __DIR__ . '/includes/Query/InTitleFeature.php', @@ -153,7 +152,6 @@ 'CirrusSearch\\Search\\FunctionScoreChain' => __DIR__ . '/includes/Search/RescoreBuilders.php', 'CirrusSearch\\Search\\FunctionScoreDecorator' => __DIR__ . '/includes/Search/RescoreBuilders.php', 'CirrusSearch\\Search\\GeoMeanFunctionScoreBuilder' => __DIR__ . '/includes/Search/RescoreBuilders.php', - 'CirrusSearch\\Search\\GeoRadiusFunctionScoreBuilder' => __DIR__ . '/includes/Search/RescoreBuilders.php', 'CirrusSearch\\Search\\IdResultsType' => __DIR__ . '/includes/Search/ResultsType.php', 'CirrusSearch\\Search\\IncomingLinksFunctionScoreBuilder' => __DIR__ . '/includes/Search/RescoreBuilders.php', 'CirrusSearch\\Search\\IntegerIndexField' => __DIR__ . '/includes/Search/IntegerIndexField.php', diff --git a/docs/hooks.txt b/docs/hooks.txt new file mode 100644 index 000..b0f0c17 --- /dev/null +++ b/docs/hooks.txt @@ -0,0 +1,47 @@ +CirrusSearch provides hooks that other extensions can make use of to extend the core schema and +modify documents. + +There are currently two phases to building CirrusSearch documents: the parse phase and the links phase. +The parse phase then the links phase is run when the article's rendered text would change (actual +article change and template change). Only the links phase is run when an article is newly linked +or unlinked. + +Note that this whole thing is a somewhat experimental feature at this point and the API hasn't +really been settled. + +'CirrusSearchAnalysisConfig': Allows to hook into the configuration for analysis + &$config -
[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Only values for tplarg
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/328848 ) Change subject: Only values for tplarg .. Only values for tplarg * tplargs don't have a k=v format, like in templates. Let's use template_param_value for the whole thing, so we don't stop on equals. * Hinted at in 0ee9fc04 Change-Id: Id268ac0bf851f8904d4d4f47713a71c9be50a0fd --- M lib/wt2html/pegTokenizer.pegjs M tests/parserTests-blacklist.js M tests/parserTests.txt 3 files changed, 13 insertions(+), 17 deletions(-) Approvals: Subramanya Sastry: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/wt2html/pegTokenizer.pegjs b/lib/wt2html/pegTokenizer.pegjs index 257702c..ff3d4b6 100644 --- a/lib/wt2html/pegTokenizer.pegjs +++ b/lib/wt2html/pegTokenizer.pegjs @@ -842,19 +842,24 @@ tplarg = "{{{" +p:("" { return endOffset(); }) target:template_param_value? params:(nl_comment_space* "|" r:( p0:("" { return endOffset(); }) v:nl_comment_space* -p:("" { return endOffset(); }) +p1:("" { return endOffset(); }) & "|" -{ return new KV('', tu.flattenIfArray(v), [p0, p0, p0, p]); } // empty argument -/ template_param +{ return { tokens: v, srcOffsets: [p0, p1] }; } // empty argument +/ template_param_value ) { return r; } )* nl_comment_space* "}}}" { - if (target === null) { target = { tokens: '' }; } + params = params.map(function(o) { +var s = o.srcOffsets; +return new KV('', tu.flattenIfArray(o.tokens), [s[0], s[0], s[0], s[1]]); + }); + if (target === null) { target = { tokens: '', srcOffsets: [p, p, p, p] }; } // Insert target as first positional attribute, so that it can be // generically expanded. The TemplateHandler then needs to shift it out // again. diff --git a/tests/parserTests-blacklist.js b/tests/parserTests-blacklist.js index 1b0ef60..a1c291b 100644 --- a/tests/parserTests-blacklist.js +++ b/tests/parserTests-blacklist.js @@ -166,7 +166,6 @@ add("wt2html", "Self closed html pairs (bug 5487)", "Centered text\nIn div text"); add("wt2html", "Fuzz testing: Parser14", " onmouseover= \nhttp://__TOC__\; data-parsoid='{\"stx\":\"url\",\"dsr\":[19,33,0,0]}'>http://__TOC__"); add("wt2html", "Fuzz testing: Parser24", "{{{|\n\nMOVE YOUR MOUSE CURSOR OVER THIS TEXT\n\n\n\n"); -add("wt2html", "Fuzz testing: Parser25 (bug 6055)", "blah\" onmouseover=\"alert('hello world');\" align=\"left\"MOVE MOUSE CURSOR OVER HERE"); add("wt2html", "Inline HTML vs wiki block nesting", "Bold paragraph\n\nNew wiki paragraph"); add("wt2html", "Special page transclusion", "Parser function implementation for pf_special missing in Parsoid."); add("wt2html", "Special page transclusion twice (bug 5021)", "Parser function implementation for pf_special missing in Parsoid.\nParser function implementation for pf_special missing in Parsoid."); @@ -344,7 +343,6 @@ add("wt2wt", "Fuzz testing: Parser21", "{|\n! irc://{{ftp://a\; onmouseover=\"alert('hello world');\"\n|\n|}"); add("wt2wt", "Fuzz testing: Parser22", "http://===r:::https://b\n\n{|\n|}"); add("wt2wt", "Fuzz testing: Parser24", "{{{|\n>\n\n\nMOVE YOUR MOUSE CURSOR OVER THIS TEXT\n{|\n\n|\n|}"); -add("wt2wt", "Fuzz testing: Parser25 (bug 6055)", "{{{\n| \n\n}}}blah\" onmouseover=\"alert('hello world');\" align=\"left\"'''MOVE MOUSE CURSOR OVER HERE'''\n"); add("wt2wt", "Inline wiki vs wiki block nesting", "'''Bold paragraph'''\n\nNew wiki paragraph\n"); add("wt2wt", "Mixing markup for italics and bold", "'''bold''bold''bolditalics'\n"); add("wt2wt", "Illegal character references (T106578)", "; Null: \n; FF: \n; CR: \n; Control (low): \n; Control (high): \n; Surrogate: \n; This is an okay astral character: "); @@ -1087,7 +1085,6 @@ add("html2wt", "Fuzz testing: Parser21", "{|\n! irc://{{ftp://a\; onmouseover=\"alert('hello world');\"\n|\n|}\n"); add("html2wt", "Fuzz testing: Parser22", "http://===r:::https://b\n\n{|\n|\n|}\n"); add("html2wt", "Fuzz testing: Parser24", "\n{{{|\n >\n\n\nMOVE YOUR MOUSE CURSOR OVER THIS TEXT\n\n{|\n|\n|}\n"); -add("html2wt", "Fuzz testing: Parser25 (bug 6055)", ", (Bug 6171)", "{| \n| Some tabular data\n| More tabular data ...\n| And yet som tabular data \n|}\n"); @@ -1964,15 +1961,6 @@ add("selser", "Fuzz testing: Parser24 [[2,2],[4],[2,2]]", "hndosskzwiiwl8fr{{{|\nsk3rl6utosgojemi>\n\n\njzny1t7i47mygb9\n{|\n\n||}"); add("selser", "Fuzz testing: Parser24 [[4,3],3,1]", "ajjrvymgwee45cdi\n{| data-foobar=\"q3u36zzq1lg3z0k9\"\n\n||}"); add("selser", "Fuzz testing: Parser24 [1,1,2]", "{{{|\n>\n\n\nMOVE YOUR MOUSE CURSOR OVER THIS TEXT\n\nwo1ljwyi3jlzbyb9\n{|\n{{{|\n
[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: HACKY WIP: T153885: Handle templated template names
Subramanya Sastry has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/328854 ) Change subject: HACKY WIP: T153885: Handle templated template names .. HACKY WIP: T153885: Handle templated template names Just to see if this works ... and it does. But, I am unhappy with this right now. To be cleaned up. Change-Id: I89ae79b5d9cd52a9a7b0dc9a2664feb2973ea61b --- M lib/wt2html/tt/TemplateHandler.js 1 file changed, 15 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid refs/changes/54/328854/1 diff --git a/lib/wt2html/tt/TemplateHandler.js b/lib/wt2html/tt/TemplateHandler.js index e11ad4f..b1bf671 100644 --- a/lib/wt2html/tt/TemplateHandler.js +++ b/lib/wt2html/tt/TemplateHandler.js @@ -96,6 +96,20 @@ // Default to 'safe' token-based template encapsulation for now. } + if (Array.isArray(token.attribs[0].k) && token.attribs[0].k[0].name === 'template') { + var th = this; + cb({async:true}); + var atm = new AttributeTransformManager( + this.manager, { wrapTemplates: true }, + function(attribs) { + token.attribs = attribs; + th.onTemplate(token, frame, cb); + } + ); + atm.process(token.attribs); + return; + } + var text = token.dataAttribs.src; var tgt = this.resolveTemplateTarget(state, token.attribs[0].k); var accumReceiveToksFromSibling; @@ -372,7 +386,7 @@ var ntt = tgtTokens[i]; if (ntt.constructor === String) { newTarget += ntt; - } else if (ntt.constructor === SelfclosingTagTk) { + } else if (ntt.constructor === SelfclosingTagTk && !/^mw:Transclusion($|\/)/.test(ntt.getAttribute('typeof'))) { allString = false; // Quotes are valid template targets if (ntt.name === 'mw-quote') { -- To view, visit https://gerrit.wikimedia.org/r/328854 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I89ae79b5d9cd52a9a7b0dc9a2664feb2973ea61b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/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] apps...wikipedia[master]: Fix crash caused by vector drawable on pre-lollipop devices
Mholloway has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/328853 ) Change subject: Fix crash caused by vector drawable on pre-lollipop devices .. Fix crash caused by vector drawable on pre-lollipop devices Switch to create a VectorDrawableCompat of the Nearby map marker icon to give to the Mapbox IconFactory, rather than passing a raw resource id, which crashes on pre-Lollipop devices. This crash occurred when the user selected either Nearby or History from the bottom tabbed navigation menu. Apparently the ViewPager was getting resources for the adjacent views to the current view teed up in the latter case. Bug: 153968 Change-Id: Iecbe0be5756d9bc9e34b119fdeb81dabb2fe297e --- M app/src/main/java/org/wikipedia/nearby/NearbyFragment.java 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/53/328853/1 diff --git a/app/src/main/java/org/wikipedia/nearby/NearbyFragment.java b/app/src/main/java/org/wikipedia/nearby/NearbyFragment.java index d4a0342..f0ceaf3 100644 --- a/app/src/main/java/org/wikipedia/nearby/NearbyFragment.java +++ b/app/src/main/java/org/wikipedia/nearby/NearbyFragment.java @@ -13,6 +13,7 @@ import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.design.widget.Snackbar; +import android.support.graphics.drawable.VectorDrawableCompat; import android.support.v4.app.Fragment; import android.support.v4.content.ContextCompat; import android.view.LayoutInflater; @@ -96,7 +97,8 @@ View view = inflater.inflate(R.layout.fragment_nearby, container, false); unbinder = ButterKnife.bind(this, view); -markerIconPassive = IconFactory.getInstance(getContext()).fromResource(R.drawable.ic_map_marker); +VectorDrawableCompat markerIconDrawable = VectorDrawableCompat.create(getResources(), R.drawable.ic_map_marker, null); +markerIconPassive = IconFactory.getInstance(getContext()).fromDrawable(markerIconDrawable); mapView.onCreate(savedInstanceState); -- To view, visit https://gerrit.wikimedia.org/r/328853 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iecbe0be5756d9bc9e34b119fdeb81dabb2fe297e Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Mholloway___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add text/plain as a trusted MIME type
TTO has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/328852 ) Change subject: Add text/plain as a trusted MIME type .. Add text/plain as a trusted MIME type Bug: T153843 Change-Id: I0f867d484915df7d54df2f59ab441bc51d0f7091 --- M includes/DefaultSettings.php 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/52/328852/1 diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 3274480..1f7686a 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -948,6 +948,7 @@ MEDIATYPE_VIDEO, // all plain video formats "image/svg+xml", // svg (only needed if inline rendering of svg is not supported) "application/pdf", // PDF files + "text/plain", // can't go wrong with plain text! # "application/x-shockwave-flash", //flash/shockwave movie ]; -- To view, visit https://gerrit.wikimedia.org/r/328852 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0f867d484915df7d54df2f59ab441bc51d0f7091 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: TTO___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations...wikistats[master]: fix HTML validation error
Dzahn has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/328851 ) Change subject: fix HTML validation error .. fix HTML validation error The main table and the included table for the "grand total" in each page can't both have id "table" or that does not validate as valid HTML in W3.org validator. Error Line 8042, Column 55: ID "table" already defined An "id" is a unique identifier. Each time this attribute is used in a document it must have a different value Change-Id: I48a398c1a7a6fbc171614c919d37e6f860c84f5a --- M usr/share/php/wikistats/grandtotal.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Dzahn: Verified; Looks good to me, approved diff --git a/usr/share/php/wikistats/grandtotal.php b/usr/share/php/wikistats/grandtotal.php index bffec2e..aa47d04 100644 --- a/usr/share/php/wikistats/grandtotal.php +++ b/usr/share/php/wikistats/grandtotal.php @@ -10,7 +10,7 @@ echo <<< GRANDTOTAL - + Grand Total (of current display) -- To view, visit https://gerrit.wikimedia.org/r/328851 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I48a398c1a7a6fbc171614c919d37e6f860c84f5a Gerrit-PatchSet: 2 Gerrit-Project: operations/debs/wikistats Gerrit-Branch: master Gerrit-Owner: DzahnGerrit-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] operations...wikistats[master]: fix HTML validation error
Dzahn has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/328851 ) Change subject: fix HTML validation error .. fix HTML validation error Change-Id: I48a398c1a7a6fbc171614c919d37e6f860c84f5a --- M usr/share/php/wikistats/grandtotal.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/debs/wikistats refs/changes/51/328851/1 diff --git a/usr/share/php/wikistats/grandtotal.php b/usr/share/php/wikistats/grandtotal.php index bffec2e..aa47d04 100644 --- a/usr/share/php/wikistats/grandtotal.php +++ b/usr/share/php/wikistats/grandtotal.php @@ -10,7 +10,7 @@ echo <<< GRANDTOTAL - + Grand Total (of current display) -- To view, visit https://gerrit.wikimedia.org/r/328851 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I48a398c1a7a6fbc171614c919d37e6f860c84f5a Gerrit-PatchSet: 1 Gerrit-Project: operations/debs/wikistats 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] mediawiki...Nuke[master]: Convert Special:Nuke prompt form to OOUI
Ladsgroup has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/328850 ) Change subject: Convert Special:Nuke prompt form to OOUI .. Convert Special:Nuke prompt form to OOUI Bug: T153988 Change-Id: Ifeee058b25c814f31be3df71624d3ca3ac241706 --- M Nuke_body.php 1 file changed, 97 insertions(+), 37 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Nuke refs/changes/50/328850/1 diff --git a/Nuke_body.php b/Nuke_body.php index 019653e..e176078 100644 --- a/Nuke_body.php +++ b/Nuke_body.php @@ -74,48 +74,108 @@ */ protected function promptForm( $userName = '' ) { $out = $this->getOutput(); + $out->enableOOUI(); $out->addModules( 'mediawiki.userSuggest' ); $out->addWikiMsg( 'nuke-tools' ); - $out->addHTML( - Xml::openElement( - 'form', - [ - 'action' => $this->getPageTitle()->getLocalURL( 'action=submit' ), - 'method' => 'post' - ] - ) - . '' - . '' . Xml::label( $this->msg( 'nuke-userorip' )->text(), 'nuke-target' ) . '' - . '' . Xml::input( - 'target', - 40, - $userName, - [ + $fields = []; + $fields[] = new OOUI\FieldLayout( + new MediaWiki\Widget\UserInputWidget( [ + 'id' => 'nuke-target', + 'title' => [ 'id' => 'nuke-target', - 'class' => 'mw-autocomplete-user', - 'autofocus' => true - ] - ) . '' - . '' - . '' . Xml::label( $this->msg( 'nuke-pattern' )->text(), 'nuke-pattern' ) . '' - . '' . Xml::input( 'pattern', 40, '', [ 'id' => 'nuke-pattern' ] ) . '' - . '' - . '' . Xml::label( $this->msg( 'nuke-namespace' )->text(), 'nuke-namespace' ) . '' - . '' . Html::namespaceSelector( - [ 'all' => 'all' ], - [ 'name' => 'namespace' ] - ) . '' - . '' - . '' . Xml::label( $this->msg( 'nuke-maxpages' )->text(), 'nuke-limit' ) . '' - . '' . Xml::input( 'limit', 7, '500', [ 'id' => 'nuke-limit' ] ) . '' - . '' - . '' - . '' . Xml::submitButton( $this->msg( 'nuke-submit-user' )->text() ) . '' - . '' - . Html::hidden( 'wpEditToken', $this->getUser()->getEditToken() ) - . Xml::closeElement( 'form' ) + 'name' => 'nuke-target', + 'value' => $userName, + ], + 'infusable' => true, + ] ), + [ + 'label' => $this->msg( 'nuke-userorip' )->text(), + 'align' => 'top', + ] + ); + + $fields[] = new OOUI\FieldLayout( + new OOUI\TextInputWidget( [ + 'name' => 'nuke-pattern', + 'id' => 'nuke-pattern', + 'maxLength' => 40, + 'infusable' => true, + 'value' => '', + ] ), + [ + 'label' => $this->msg( 'nuke-pattern' )->text(), + 'align' => 'top', + ] + ); + + $fields[] = new OOUI\FieldLayout( + new MediaWiki\Widget\NamespaceInputWidget( [ + 'name' => 'namespace', + 'id' => 'nuke-namespace', + 'infusable' => true, + 'includeAllValue' => 'all', + ] ), + [ + 'align' => 'top', + 'label' => $this->msg( 'nuke-namespace' )->text(), + ] + ); + + $fields[] = new OOUI\FieldLayout( + new OOUI\TextInputWidget( [ +
[MediaWiki-commits] [Gerrit] mediawiki...SiteMetrics[master]: Lowercasing strings for consistency and readability
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/328811 ) Change subject: Lowercasing strings for consistency and readability .. Lowercasing strings for consistency and readability Also fixing my author name in i18n/en-gb.json. Bug: T153551 Change-Id: I6b9d4b0021bd13bb8372c0d13322fbbc1a713829 --- M i18n/en-gb.json M i18n/en.json 2 files changed, 88 insertions(+), 87 deletions(-) Approvals: Jack Phoenix: Looks good to me, approved jenkins-bot: Verified diff --git a/i18n/en-gb.json b/i18n/en-gb.json index 44b1259..87b947d 100644 --- a/i18n/en-gb.json +++ b/i18n/en-gb.json @@ -2,7 +2,7 @@ "@metadata": { "authors": [ "Usandaru555", - "Codynguyen1116" + "SamanthaNguyen" ] }, "action-metricsview": "view statistics about social tools" diff --git a/i18n/en.json b/i18n/en.json index eb0a49d..5467da0 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -3,108 +3,109 @@ "authors": [ "Aaron Wright ", "David Pean ", - "Jack Phoenix " + "Jack Phoenix ", + "SamanthaNguyen " ] }, "sitemetrics": "Site Metrics", "sitemetrics-desc": "[[Special:SiteMetrics|Displays statistics]] about social tools", - "sitemetrics-anon-edits": "Anonymous Edits", - "sitemetrics-anon-edits-day": "Anonymous Edits By Day", - "sitemetrics-anon-edits-month": "Anonymous Edits By Month", - "sitemetrics-avatars": "Avatar Uploads", - "sitemetrics-avatars-day": "Avatar Uploads By Day", - "sitemetrics-avatars-month": "Avatar Uploads By Month", + "sitemetrics-anon-edits": "Anonymous edits", + "sitemetrics-anon-edits-day": "Anonymous edits by day", + "sitemetrics-anon-edits-month": "Anonymous edits by month", + "sitemetrics-avatars": "Avatar uploads", + "sitemetrics-avatars-day": "Avatar uploads by day", + "sitemetrics-avatars-month": "Avatar uploads by month", "sitemetrics-awards": "Awards", - "sitemetrics-awards-day": "Awards By Day", - "sitemetrics-awards-month": "Awards By Month", - "sitemetrics-blog-stats-header": "Blog and Voting Statistics", - "sitemetrics-casual-game-stats": "Casual Game Statistics", + "sitemetrics-awards-day": "Awards by day", + "sitemetrics-awards-month": "Awards by month", + "sitemetrics-blog-stats-header": "Blog and voting statistics", + "sitemetrics-casual-game-stats": "Casual game statistics", "sitemetrics-comments": "Comments", - "sitemetrics-comments-day": "Comments By Day", - "sitemetrics-comments-month": "Comments By Month", - "sitemetrics-contact-imports": "Contact Imports", - "sitemetrics-contact-invites-day": "Contact Invites By Day", - "sitemetrics-contact-invites-month": "Contact Invites By Month", - "sitemetrics-content-header": "Editing and Content Statistics", + "sitemetrics-comments-day": "Comments by day", + "sitemetrics-comments-month": "Comments by month", + "sitemetrics-contact-imports": "Contact imports", + "sitemetrics-contact-invites-day": "Contact invites by day", + "sitemetrics-contact-invites-month": "Contact invites by month", + "sitemetrics-content-header": "Editing and content statistics", "sitemetrics-count": "Count", "sitemetrics-date": "Date", "sitemetrics-difference": "Difference", "sitemetrics-edits": "Edits", "sitemetrics-foeships": "Foeships", - "sitemetrics-foeships-day": "Foeships by Day", - "sitemetrics-foeships-month": "Foeships By Month", + "sitemetrics-foeships-day": "Foeships by day", + "sitemetrics-foeships-month": "Foeships by month", "sitemetrics-friendships": "Friendships", - "sitemetrics-friendships-day": "Friendships by Day", - "sitemetrics-friendships-month": "Friendships by Month", + "sitemetrics-friendships-day": "Friendships by day", + "sitemetrics-friendships-month": "Friendships by month", "sitemetrics-gifts": "Gifts", - "sitemetrics-gifts-day": "Gifts by Day", - "sitemetrics-gifts-month": "Gifts by Month", - "sitemetrics-honorifics": "Honorific Advancements", - "sitemetrics-honorifics-day": "Honorific Advancements By Day", - "sitemetrics-honorifics-month": "Honorific Advancements By Month", + "sitemetrics-gifts-day": "Gifts by day", + "sitemetrics-gifts-month": "Gifts by month", + "sitemetrics-honorifics": "Honorific advancements", +
[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Only values for tplarg
Arlolra has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/328848 ) Change subject: Only values for tplarg .. Only values for tplarg * Don't break on equals. * Hinted at in 0ee9fc04 Change-Id: Id268ac0bf851f8904d4d4f47713a71c9be50a0fd --- M lib/wt2html/pegTokenizer.pegjs M tests/parserTests-blacklist.js M tests/parserTests.txt 3 files changed, 13 insertions(+), 17 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid refs/changes/48/328848/1 diff --git a/lib/wt2html/pegTokenizer.pegjs b/lib/wt2html/pegTokenizer.pegjs index 257702c..ff3d4b6 100644 --- a/lib/wt2html/pegTokenizer.pegjs +++ b/lib/wt2html/pegTokenizer.pegjs @@ -842,19 +842,24 @@ tplarg = "{{{" +p:("" { return endOffset(); }) target:template_param_value? params:(nl_comment_space* "|" r:( p0:("" { return endOffset(); }) v:nl_comment_space* -p:("" { return endOffset(); }) +p1:("" { return endOffset(); }) & "|" -{ return new KV('', tu.flattenIfArray(v), [p0, p0, p0, p]); } // empty argument -/ template_param +{ return { tokens: v, srcOffsets: [p0, p1] }; } // empty argument +/ template_param_value ) { return r; } )* nl_comment_space* "}}}" { - if (target === null) { target = { tokens: '' }; } + params = params.map(function(o) { +var s = o.srcOffsets; +return new KV('', tu.flattenIfArray(o.tokens), [s[0], s[0], s[0], s[1]]); + }); + if (target === null) { target = { tokens: '', srcOffsets: [p, p, p, p] }; } // Insert target as first positional attribute, so that it can be // generically expanded. The TemplateHandler then needs to shift it out // again. diff --git a/tests/parserTests-blacklist.js b/tests/parserTests-blacklist.js index 1b0ef60..a1c291b 100644 --- a/tests/parserTests-blacklist.js +++ b/tests/parserTests-blacklist.js @@ -166,7 +166,6 @@ add("wt2html", "Self closed html pairs (bug 5487)", "Centered text\nIn div text"); add("wt2html", "Fuzz testing: Parser14", " onmouseover= \nhttp://__TOC__\; data-parsoid='{\"stx\":\"url\",\"dsr\":[19,33,0,0]}'>http://__TOC__"); add("wt2html", "Fuzz testing: Parser24", "{{{|\n\nMOVE YOUR MOUSE CURSOR OVER THIS TEXT\n\n\n\n"); -add("wt2html", "Fuzz testing: Parser25 (bug 6055)", "blah\" onmouseover=\"alert('hello world');\" align=\"left\"MOVE MOUSE CURSOR OVER HERE"); add("wt2html", "Inline HTML vs wiki block nesting", "Bold paragraph\n\nNew wiki paragraph"); add("wt2html", "Special page transclusion", "Parser function implementation for pf_special missing in Parsoid."); add("wt2html", "Special page transclusion twice (bug 5021)", "Parser function implementation for pf_special missing in Parsoid.\nParser function implementation for pf_special missing in Parsoid."); @@ -344,7 +343,6 @@ add("wt2wt", "Fuzz testing: Parser21", "{|\n! irc://{{ftp://a\; onmouseover=\"alert('hello world');\"\n|\n|}"); add("wt2wt", "Fuzz testing: Parser22", "http://===r:::https://b\n\n{|\n|}"); add("wt2wt", "Fuzz testing: Parser24", "{{{|\n>\n\n\nMOVE YOUR MOUSE CURSOR OVER THIS TEXT\n{|\n\n|\n|}"); -add("wt2wt", "Fuzz testing: Parser25 (bug 6055)", "{{{\n| \n\n}}}blah\" onmouseover=\"alert('hello world');\" align=\"left\"'''MOVE MOUSE CURSOR OVER HERE'''\n"); add("wt2wt", "Inline wiki vs wiki block nesting", "'''Bold paragraph'''\n\nNew wiki paragraph\n"); add("wt2wt", "Mixing markup for italics and bold", "'''bold''bold''bolditalics'\n"); add("wt2wt", "Illegal character references (T106578)", "; Null: \n; FF: \n; CR: \n; Control (low): \n; Control (high): \n; Surrogate: \n; This is an okay astral character: "); @@ -1087,7 +1085,6 @@ add("html2wt", "Fuzz testing: Parser21", "{|\n! irc://{{ftp://a\; onmouseover=\"alert('hello world');\"\n|\n|}\n"); add("html2wt", "Fuzz testing: Parser22", "http://===r:::https://b\n\n{|\n|\n|}\n"); add("html2wt", "Fuzz testing: Parser24", "\n{{{|\n >\n\n\nMOVE YOUR MOUSE CURSOR OVER THIS TEXT\n\n{|\n|\n|}\n"); -add("html2wt", "Fuzz testing: Parser25 (bug 6055)", ", (Bug 6171)", "{| \n| Some tabular data\n| More tabular data ...\n| And yet som tabular data \n|}\n"); @@ -1964,15 +1961,6 @@ add("selser", "Fuzz testing: Parser24 [[2,2],[4],[2,2]]", "hndosskzwiiwl8fr{{{|\nsk3rl6utosgojemi>\n\n\njzny1t7i47mygb9\n{|\n\n||}"); add("selser", "Fuzz testing: Parser24 [[4,3],3,1]", "ajjrvymgwee45cdi\n{| data-foobar=\"q3u36zzq1lg3z0k9\"\n\n||}"); add("selser", "Fuzz testing: Parser24 [1,1,2]", "{{{|\n>\n\n\nMOVE YOUR MOUSE CURSOR OVER THIS TEXT\n\nwo1ljwyi3jlzbyb9\n{|\n{{{|\n >\n\n\nMOVE YOUR MOUSE CURSOR OVER THIS TEXT\n|"); -add("selser", "Fuzz testing: Parser25 (bug 6055) [0,2]", "{{{\n|
[MediaWiki-commits] [Gerrit] wikimedia...dash[master]: Add top10 to minifier config
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/328846 ) Change subject: Add top10 to minifier config .. Add top10 to minifier config Change-Id: I1f5e909cb3971afe0e8cc2913401054510c34a69 --- M gulpfile.js 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: jenkins-bot: Verified Ejegg: Looks good to me, approved diff --git a/gulpfile.js b/gulpfile.js index 1954a9e..2fdeb7b 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -45,6 +45,7 @@ 'components/widgets/distance-to-goal-chart/distance-to-goal-chart', 'components/widgets/donation-age/donation-age', 'components/widgets/fraud-gauge/fraud-gauge', + 'components/widgets/top10/top10', 'components/widgets/totals-earned-chart/totals-earned-chart', 'components/widgets/x-by-y/x-by-y' ], -- To view, visit https://gerrit.wikimedia.org/r/328846 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1f5e909cb3971afe0e8cc2913401054510c34a69 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/dash Gerrit-Branch: master Gerrit-Owner: EjeggGerrit-Reviewer: Cdentinger Gerrit-Reviewer: Ejegg Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: fix #T15619
Seth has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/328847 ) Change subject: fix #T15619 .. fix #T15619 cope with white space in German abbreviations. Change-Id: I42e33ab58829624923092b9274a7d2407f192852 --- M includes/parser/Parser.php 1 file changed, 37 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/47/328847/1 diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index 1ca9dac..fcf7b7e 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -1319,7 +1319,44 @@ } # Clean up special characters, only run once, next-to-last before doBlockLevels + # see T15619 + # last character before an abbr. + $wb = '[ \n([\x{201E}]'; + # first character after an abbr. + $we = '[ )\x5D,;:?!\'"\x{2018}-\x{201A}\x{201C}-\x{201D}\xAB\xBB\x{2039}\x{203A}]'; + # some space character + $s_re = '(?:&(?:nbsp|#160);|\x20)'; + # narrow non-breaking space + $nns = ''; + # replacements $fixtags = [ + # German whitespace, see T15619 + "/${wb}a\.\K$s_re?a\.$s_re?(?=O\.$we)/u" => "${nns}a.$nns", # a.a.O. + "/${wb}a\.\K$s_re?(?=D\.$we)/u" => $nns, # a.D. + "/${wb}[dD]\.\K$s_re?(?=h\.[ ,])/u" => $nns, # d.h. + "/${wb}[iI]\.\K$s_re?d\.$s_re?(?=R\.$we)/u" => "${nns}d.$nns", # i.d.R. + "/${wb}d\.\K$s_re?(?=[iJR\\xC4]\.$we)/u" => $nns, # d.i., d.J, d.R, d.Ä + "/${wb}e\.\K$s_re?(?=V\.$we)/u" => $nns, # e.V. + "/${wb}h\.\K$s_re?(?=c\.$we)/u" => $nns, # h.c. + "/${wb}i\.\K$s_re?V\.$s_re?(?=m\.$we)/u" => "${nns}V.$nns", # i.V.m. + "/${wb}i\.\K$s_re?(?=[ARV]\.$we)/u" => $nns, # i.A., i.R, i.V. + "/${wb}[nv]\.\K$s_re?(?=Chr\.$we)/u" => $nns, # n.Chr., v.Chr. + "/${wb}o\.\K$s_re?(?=[J\\xC4\\xE4]\.$we)/u" => $nns, # o.J., o.Ä, o.ä. + "/${wb}[sS]\.\K$s_re?(?=[ou]\.$we)/u" => $nns, # s.o., s.u. + "/${wb}u\.\K$s_re?a\.$s_re?(?=m\.$we)/u" => "${nns}a.$nns", # u.a.m. + "/${wb}u\.\K$s_re?v\.$s_re?a\.$s_re?(?=m\.$we)/u" => "${nns}v.${nns}a.", # u.v.a.m. + "/${wb}u\.\K$s_re?v\.$s_re?(?=a\.$we)/u" => "${nns}v.$nns", # u.v.a. + "/${wb}u\.\K$s_re?(?=[\\xC4\\xE4]\.$we)/u"=> $nns, # u.Ä., u.ä. + "/${wb}[uU]\.\K$s_re?(?=a\.$we)/u"=> $nns, # u.a. + "/${wb}u\.\K$s_re?(?=U\.[ ,])/u" => $nns, # u.U. + "/${wb}[vV]\.\K$s_re?(?=a\.$we)/u"=> $nns, # v.a. + "/${wb}[zZ]\.\K$s_re?(?=(?:[BT]|Zt?)\.[ ,])/u"=> $nns, # z.B., z.T., z.Zt. + "/(?:\(|,$s_re)[*\x{2020}]\K$s_re?(?=\d+[ ,)])/u" => $nns, # († 1865), (* 1634), ... + "/${wb}(?:A(?:rt|bs)|S)\.\K$s_re?(?=\d+$s_re?ff\.$we)/u" => "$nns$1$nns", # Art. 1 ff., Abs. 1 ff., S. 1 ff. + "/${wb}(?:A(?:rt|bs)|S)\.\K$s_re?(?=\d)/u"=> $nns, # Art. 1, Abs. 1, S. 1 + "/${wb}[1-3]?\d\.\K$s_re(?=(?:Januar|J\\xE4nner|Februar|M\\xE4rz|April|Mai|Ju[nl]i|August|September|Oktober|November|Dezember)\b)/u" => $nns, # 12. August, ... + "/${wb}\d+\.\K$s_re(?=(?:Jh\.|Jahrhundert\b))/u" => $nns, # 13. Jh., ... + "/\b\d+\K$s_re?(?=(?:[\\x24\\xA2\\xA5\x{09F3}\x{0E3F}\x{17DB}\x{20A0}-\x{20B5}\x{2133}\x{2116}]|DM|US[D\\x24]|EUR|CHF|CAD|AUD|GBP|\\xB0[CFR]|[stHNT]|[KMGT]iB|[kMGT]?(?:B|Wh?)|[cdhkm\\xB5\x{03BC}]?m|[cdh]?l|m?(?:mol|W)|Bq|Cd|Pa|pF|sm|kn|ha|Ar|eV|Ws|[km\\xB5\x{03BC}]?(?:Sv|[VAFg])|[mk]?\x{03A9}|VA?)\b)/u" => $nns, # <[prefix]unit|currency> # French spaces, last one Guillemet-left # only if there is something before the space '/(.) (?=\\?|:|;|!|%|\\302\\273)/' => '\\1', -- To view, visit https://gerrit.wikimedia.org/r/328847 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I42e33ab58829624923092b9274a7d2407f192852 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Seth
[MediaWiki-commits] [Gerrit] wikimedia...dash[master]: Add top10 to minifier config
Ejegg has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/328846 ) Change subject: Add top10 to minifier config .. Add top10 to minifier config Change-Id: I1f5e909cb3971afe0e8cc2913401054510c34a69 --- M gulpfile.js 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/dash refs/changes/46/328846/1 diff --git a/gulpfile.js b/gulpfile.js index 1954a9e..2fdeb7b 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -45,6 +45,7 @@ 'components/widgets/distance-to-goal-chart/distance-to-goal-chart', 'components/widgets/donation-age/donation-age', 'components/widgets/fraud-gauge/fraud-gauge', + 'components/widgets/top10/top10', 'components/widgets/totals-earned-chart/totals-earned-chart', 'components/widgets/x-by-y/x-by-y' ], -- To view, visit https://gerrit.wikimedia.org/r/328846 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1f5e909cb3971afe0e8cc2913401054510c34a69 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/dash Gerrit-Branch: master Gerrit-Owner: Ejegg___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Newsletter[master]: Add a `Special:Newsletter/id/subsrcibers` page
Pppery has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/328845 ) Change subject: Add a `Special:Newsletter/id/subsrcibers` page .. Add a `Special:Newsletter/id/subsrcibers` page This page lists all of the subscribers to a newsletter, and is only viewable by publishers and people with the `newsletter-manage` permission. Change-Id: Ia0697f66ca8e94d4a4abec9dc22abe6c7a4e026d --- M i18n/en.json M i18n/qqq.json M includes/specials/SpecialNewsletter.php 3 files changed, 28 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Newsletter refs/changes/45/328845/1 diff --git a/i18n/en.json b/i18n/en.json index 422d9db..485a052 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -31,6 +31,7 @@ "newsletter-subtitlelinks-subscribe": "subscribe", "newsletter-subtitlelinks-announce": "announce", "newsletter-subtitlelinks-manage": "manage", + "newsletter-subtitlelinks-subscribers": "view subscribers", "newsletters": "Newsletters", "newsletter-subscribe-loginrequired": "Please log in to subscribe to [[Special:Newsletters|newsletters]].", "newsletter-notfound": "Newsletter not found", @@ -89,6 +90,8 @@ "newsletter-unsubscribe-button-label": "No", "newsletter-subscribing": "Subscribing...", "newsletter-unsubscribing": "Unsubscribing...", + "newsletter-subscribers" : "Newsletter subscribers", + "newsletter-subscribers-nopermission": "You do not have permission to view the subscribers of this newsletter", "newsletter-available-newsletters-field-label": "Available newsletters", "newsletter-subscribed-newsletters-field-label": "Subscribed newsletters", "newsletter-none-found": "No newsletters exist. You can create a new newsletter through [[Special:CreateNewsletter]].", @@ -108,7 +111,7 @@ "action-newsletter-create": "create newsletters", "right-newsletter-delete": "Delete newsletters", "action-newsletter-delete": "delete newsletters", - "right-newsletter-manage": "Add or remove publishers from newsletters", + "right-newsletter-manage": "Add or remove publishers from and view the subscribers of newsletters", "action-newsletter-manage": "manage newsletters", "apihelp-newslettersubscribe-description": "Subscribe to or unsubscribe from a newsletter.", "apihelp-newslettersubscribe-param-id": "ID of the newsletter for which the subscription should be changed.", diff --git a/i18n/qqq.json b/i18n/qqq.json index 633a18b..315dcac 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -38,6 +38,7 @@ "newsletter-subtitlelinks-subscribe": "Label for link to Special:Newsletter subscribe page. Used as a navigation link on Special:Newsletter.\n\nSee also:\n* {{msg-mw|newsletter-subtitlelinks-unsubscribe}}\n* {{msg-mw|newsletter-subtitlelinks-announce}}\n* {{msg-mw|newsletter-subtitlelinks-manage}}\n{{Identical|Subscribe}}", "newsletter-subtitlelinks-announce": "Label for link to Special:Newsletter announce page. Used as a navigation link on Special:Newsletter.\n\nSee also:\n* {{msg-mw|newsletter-subtitlelinks-subscribe}}\n* {{msg-mw|newsletter-subtitlelinks-unsubscribe}}\n* {{msg-mw|newsletter-subtitlelinks-announce}}\n* {{msg-mw|newsletter-subtitlelinks-manage}}\n{{Identical|Announce}}", "newsletter-subtitlelinks-manage": "Label for link to Special:Newsletter manage page. Used as a navigation link on Special:Newsletter.\n\nSee also:\n* {{msg-mw|newsletter-subtitlelinks-subscribe}}\n* {{msg-mw|newsletter-subtitlelinks-unsubscribe}}\n* {{msg-mw|newsletter-subtitlelinks-announce}}\n{{Identical|Manage}}", + "newsletter-subtitlelinks-subscribers": "Label for link to Special:Newsletter subscribers", "newsletters": "Name of special page for user to subscribe to or unsubscribe from newsletters\n{{Identical|Newsletter}}", "newsletter-subscribe-loginrequired": "Error message shown on the login form for non-logged in users if they try to visit Special:Newsletter//subscribe.", "newsletter-notfound": "Header of Special:Newsletter/ if no newsletter by that id exists.\n\nSee also:\n* {{msg-mw|newsletter-not-found-id}}", @@ -96,6 +97,8 @@ "newsletter-unsubscribe-button-label": "Label of submit button of HTML form which allows users to un-subscribe.\n{{Identical|No}}", "newsletter-subscribing": "Message shown on Special:Newsletters while subscription is in progress when the user presses subscribe button.", "newsletter-unsubscribing": "Message shown on Special:Newsletters while unsubscription is in progress when the user presses the unsubscribe button.", + "newsletter-subscribers": "Header message shown on Special:Newsletter/id/subscribers", + "newsletter-subscribers-nopermission": "Error message shown on Special:Newsletter/id/subscribers
[MediaWiki-commits] [Gerrit] mediawiki...ParserFunctions[master]: Stop using deprecated stuff
MaxSem has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/328844 ) Change subject: Stop using deprecated stuff .. Stop using deprecated stuff Change-Id: If6b7de39ab9f32d50cfdf86312ed7edca9faaf01 --- M Expr.php M composer.json 2 files changed, 6 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ParserFunctions refs/changes/44/328844/1 diff --git a/Expr.php b/Expr.php index 1541076..d484e09 100644 --- a/Expr.php +++ b/Expr.php @@ -1,5 +1,7 @@ https://gerrit.wikimedia.org/r/328844 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If6b7de39ab9f32d50cfdf86312ed7edca9faaf01 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ParserFunctions Gerrit-Branch: master Gerrit-Owner: MaxSem___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...dash[deployment]: Merge branch 'master' into deployment
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/328843 ) Change subject: Merge branch 'master' into deployment .. Merge branch 'master' into deployment And run Gulp ebd6816 Change major donation cutoff to $1,000 d1544d5 Fix client-side $/sec calculation. 6620fe1 Clean up some ununsed stuff, fix WS 4e61f36 Fix npm test, add jscs 8bf636b Top 10 days / hours widget Change-Id: I14b0537d1fcc53747b7d451656cb25adddceb0c9 --- M dist/css.manifest.json A dist/images/top10.png M dist/index.html M dist/js.manifest.json R dist/scripts-d9ba4ad8.js R dist/style-5cfd47c6.css 6 files changed, 56 insertions(+), 30 deletions(-) Approvals: jenkins-bot: Verified Ejegg: Looks good to me, approved -- To view, visit https://gerrit.wikimedia.org/r/328843 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I14b0537d1fcc53747b7d451656cb25adddceb0c9 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/dash Gerrit-Branch: deployment Gerrit-Owner: EjeggGerrit-Reviewer: Ejegg Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...dash[deployment]: Merge branch 'master' into deployment
Ejegg has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/328843 ) Change subject: Merge branch 'master' into deployment .. Merge branch 'master' into deployment And run Gulp ebd6816 Change major donation cutoff to $1,000 d1544d5 Fix client-side $/sec calculation. 6620fe1 Clean up some ununsed stuff, fix WS 4e61f36 Fix npm test, add jscs 8bf636b Top 10 days / hours widget Change-Id: I14b0537d1fcc53747b7d451656cb25adddceb0c9 --- M dist/css.manifest.json A dist/images/top10.png M dist/index.html M dist/js.manifest.json R dist/scripts-d9ba4ad8.js R dist/style-5cfd47c6.css 6 files changed, 56 insertions(+), 30 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/dash refs/changes/43/328843/1 -- To view, visit https://gerrit.wikimedia.org/r/328843 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I14b0537d1fcc53747b7d451656cb25adddceb0c9 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/dash Gerrit-Branch: deployment Gerrit-Owner: Ejegg___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] performance/WebPageTest[master]: Exit on errors in the WebPageTest test script
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/328729 ) Change subject: Exit on errors in the WebPageTest test script .. Exit on errors in the WebPageTest test script If an error occur make sure we exit so we know that there are something wrong in a run. See https://gerrit.wikimedia.org/r/#/c/327706/ Change-Id: I97ab7bd006137e32d381a188468793e7f577e75b --- M test/rulethemall.sh 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/test/rulethemall.sh b/test/rulethemall.sh index 05fc23e..97a763f 100755 --- a/test/rulethemall.sh +++ b/test/rulethemall.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -e # Use this script to test all batch scripts. # To be able to run it you need to set a couple of env -- To view, visit https://gerrit.wikimedia.org/r/328729 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I97ab7bd006137e32d381a188468793e7f577e75b Gerrit-PatchSet: 2 Gerrit-Project: performance/WebPageTest Gerrit-Branch: master Gerrit-Owner: PhedenskogGerrit-Reviewer: Krinkle Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: prometheus: extend ops recording rules
Filippo Giunchedi has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/328842 ) Change subject: prometheus: extend ops recording rules .. prometheus: extend ops recording rules Add network-related derived metrics, plus misc additions and fixes. Change-Id: Ie1cc9baff4fcce13ce84c5d70d09aaf88cd9663f --- M modules/role/files/prometheus/rules_ops.conf 1 file changed, 88 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/42/328842/1 diff --git a/modules/role/files/prometheus/rules_ops.conf b/modules/role/files/prometheus/rules_ops.conf index aa44b5e..24beec1 100644 --- a/modules/role/files/prometheus/rules_ops.conf +++ b/modules/role/files/prometheus/rules_ops.conf @@ -1,7 +1,82 @@ # https://prometheus.io/docs/practices/rules/ +# Network interface utilization and errors cluster_device:network_transmit_bytes:rate5m = sum(rate(node_network_transmit_bytes{job="node"}[5m])) by (cluster,device) cluster_device:network_receive_bytes:rate5m = sum(rate(node_network_receive_bytes{job="node"}[5m])) by (cluster,device) +cluster_device:network_transmit_packets:rate5m = sum(rate(node_network_transmit_packets{job="node"}[5m])) by (cluster,device) +cluster_device:network_receive_packets:rate5m = sum(rate(node_network_receive_packets{job="node"}[5m])) by (cluster,device) + +cluster_device:network_transmit_drop:rate5m = sum(rate(node_network_transmit_drop{job="node"}[5m])) by (cluster,device) +cluster_device:network_receive_drop:rate5m = sum(rate(node_network_receive_drop{job="node"}[5m])) by (cluster,device) +cluster_device:network_transmit_errs:rate5m = sum(rate(node_network_transmit_errs{job="node"}[5m])) by (cluster,device) +cluster_device:network_receive_errs:rate5m = sum(rate(node_network_receive_errs{job="node"}[5m])) by (cluster,device) + +# Network protocols utilization and errors +cluster:netstat_IpExt_InCsumErrors:rate5m = sum by (cluster) (rate(node_netstat_IpExt_InCsumErrors{job="node"}[5m])) +cluster:netstat_Ip_FragFails:rate5m = sum by (cluster) (rate(node_netstat_Ip_FragFails{job="node"}[5m])) +cluster:netstat_Ip_InAddrErrors:rate5m = sum by (cluster) (rate(node_netstat_Ip_InAddrErrors{job="node"}[5m])) +cluster:netstat_Ip_InDiscards:rate5m = sum by (cluster) (rate(node_netstat_Ip_InDiscards{job="node"}[5m])) +cluster:netstat_Ip_InHdrErrors:rate5m = sum by (cluster) (rate(node_netstat_Ip_InHdrErrors{job="node"}[5m])) +cluster:netstat_Ip_OutDiscards:rate5m = sum by (cluster) (rate(node_netstat_Ip_OutDiscards{job="node"}[5m])) +cluster:netstat_Ip_OutNoRoutes:rate5m = sum by (cluster) (rate(node_netstat_Ip_OutNoRoutes{job="node"}[5m])) +cluster:netstat_Ip_ReasmFails:rate5m = sum by (cluster) (rate(node_netstat_Ip_ReasmFails{job="node"}[5m])) +cluster:netstat_Ip_ReasmTimeout:rate5m = sum by (cluster) (rate(node_netstat_Ip_ReasmTimeout{job="node"}[5m])) + +cluster:netstat_Icmp_InCsumErrors:rate5m = sum by (cluster) (rate(node_netstat_Icmp_InCsumErrors{job="node"}[5m])) +cluster:netstat_Icmp_InDestUnreachs:rate5m = sum by (cluster) (rate(node_netstat_Icmp_InDestUnreachs{job="node"}[5m])) +cluster:netstat_Icmp_InErrors:rate5m = sum by (cluster) (rate(node_netstat_Icmp_InErrors{job="node"}[5m])) +cluster:netstat_Icmp_InTimeExcds:rate5m = sum by (cluster) (rate(node_netstat_Icmp_InTimeExcds{job="node"}[5m])) +cluster:netstat_Icmp_OutDestUnreachs:rate5m = sum by (cluster) (rate(node_netstat_Icmp_OutDestUnreachs{job="node"}[5m])) +cluster:netstat_Icmp_OutErrors:rate5m = sum by (cluster) (rate(node_netstat_Icmp_OutErrors{job="node"}[5m])) + +cluster:netstat_Tcp_ActiveOpens:rate5m = sum by (cluster) (rate(node_netstat_Tcp_ActiveOpens{job="node"}[5m])) +cluster:netstat_Tcp_AttemptFails:rate5m = sum by (cluster) (rate(node_netstat_Tcp_AttemptFails{job="node"}[5m])) +cluster:netstat_Tcp_CurrEstab:rate5m = sum by (cluster) (rate(node_netstat_Tcp_CurrEstab{job="node"}[5m])) +cluster:netstat_Tcp_EstabResets:rate5m = sum by (cluster) (rate(node_netstat_Tcp_EstabResets{job="node"}[5m])) +cluster:netstat_Tcp_InCsumErrors:rate5m = sum by (cluster) (rate(node_netstat_Tcp_InCsumErrors{job="node"}[5m])) +cluster:netstat_Tcp_InErrs:rate5m = sum by (cluster) (rate(node_netstat_Tcp_InErrs{job="node"}[5m])) +cluster:netstat_Tcp_InSegs:rate5m = sum by (cluster) (rate(node_netstat_Tcp_InSegs{job="node"}[5m])) +cluster:netstat_Tcp_OutRsts:rate5m = sum by (cluster) (rate(node_netstat_Tcp_OutRsts{job="node"}[5m])) +cluster:netstat_Tcp_OutSegs:rate5m = sum by (cluster) (rate(node_netstat_Tcp_OutSegs{job="node"}[5m])) +cluster:netstat_Tcp_PassiveOpens:rate5m = sum by (cluster) (rate(node_netstat_Tcp_PassiveOpens{job="node"}[5m])) +cluster:netstat_Tcp_RetransSegs:rate5m = sum by (cluster) (rate(node_netstat_Tcp_RetransSegs{job="node"}[5m])) + +cluster:netstat_TcpExt_ListenDrops:rate5m = sum by (cluster) (rate(node_netstat_TcpExt_ListenDrops{job="node"}[5m]))
[MediaWiki-commits] [Gerrit] labs/striker[master]: Point SSH key goal at local key management screen
BryanDavis has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/328841 ) Change subject: Point SSH key goal at local key management screen .. Point SSH key goal at local key management screen WE have ssh public key management locally now, so point the user at it rather than the hideous OpenStackManager UI on Wikitech. Also includes a minor cosmetic change to the key management screen to prevent adding an empty div when there are no existing ssh keys for the account. Bug: T144711 Change-Id: Icbe404c1ae6bc9608f9e187d7a49d20510dcd96e --- M striker/templates/goals/ACCOUNT_SSH.html M striker/templates/profile/settings/ssh-keys.html 2 files changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/labs/striker refs/changes/41/328841/1 diff --git a/striker/templates/goals/ACCOUNT_SSH.html b/striker/templates/goals/ACCOUNT_SSH.html index 51d3b76..cff77b4 100644 --- a/striker/templates/goals/ACCOUNT_SSH.html +++ b/striker/templates/goals/ACCOUNT_SSH.html @@ -5,8 +5,6 @@ {% block body %} {% blocktrans %}Labs and Tool Labs servers are accessed using https://en.wikipedia.org/wiki/Secure_Shell;>SSH. You need to upload an ssh public key to enable your SSH access.{% endblocktrans %} -{% with url=wikitech_url|add:"/wiki/Special:Preferences#mw-prefsection-openstack" %} {% blocktrans %}See https://wikitech.wikimedia.org/wiki/Help:Tool_Labs/Access#Generating_and_uploading_an_SSH_key;>the help documentation for more information on how to generate and upload your public SSH key.{% endblocktrans %} -{% trans "Add public SSH key" %} -{% endwith %} +{% trans "Add public SSH key" %} {% endblock %} diff --git a/striker/templates/profile/settings/ssh-keys.html b/striker/templates/profile/settings/ssh-keys.html index 4c19d62..f8c501d 100644 --- a/striker/templates/profile/settings/ssh-keys.html +++ b/striker/templates/profile/settings/ssh-keys.html @@ -5,6 +5,7 @@ {% block title %}{% trans "SSH keys" %}{% endblock %} {% block content %} +{% if ssh_keys %} {% for key in ssh_keys %} {% trans "Show" as show %} @@ -47,6 +48,7 @@ {% endfor %} +{% endif %} {% fa_icon "square-o" "stack-2x" "fw" aria_hidden="true" %}{% fa_icon "key" "stack-1x" "fw" aria_hidden="true" %} {% trans "New SSH key" %} -- To view, visit https://gerrit.wikimedia.org/r/328841 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icbe404c1ae6bc9608f9e187d7a49d20510dcd96e Gerrit-PatchSet: 1 Gerrit-Project: labs/striker Gerrit-Branch: master Gerrit-Owner: BryanDavis___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Add page indicator view to description edit tutorial
Mholloway has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/328840 ) Change subject: Add page indicator view to description edit tutorial .. Add page indicator view to description edit tutorial Incorporates the PageIndicatorView[1] library to provide a page indicator view as specified in the tutorial mock. [1] https://github.com/romandanylyk/PageIndicatorView Bug: T148205 Change-Id: Ide208e92a777f4f1b9372b09b597ecb099482cff --- M app/build.gradle A app/src/main/assets/licenses/PageIndicatorView M app/src/main/java/org/wikipedia/descriptions/DescriptionEditTutorialFragment.java A app/src/main/res/drawable/view_pager_indicator_dot.xml M app/src/main/res/layout/fragment_description_edit_tutorial.xml M app/src/main/res/values/colors.xml M app/src/main/res/values/credits.xml 7 files changed, 55 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/40/328840/1 diff --git a/app/build.gradle b/app/build.gradle index 6034238..7407fd8 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -183,6 +183,7 @@ compile "com.facebook.fresco:fresco:$frescoVersion" compile "com.facebook.fresco:imagepipeline-okhttp3:$frescoVersion" compile 'com.google.code.gson:gson:2.7' +compile 'com.romandanylyk:pageindicatorview:0.0.8' compile "com.squareup.okhttp3:okhttp-urlconnection:$okHttpVersion" // for JavaNetCookieJar compile "com.squareup.okhttp3:logging-interceptor:$okHttpVersion" compile 'com.squareup:otto:1.3.8' diff --git a/app/src/main/assets/licenses/PageIndicatorView b/app/src/main/assets/licenses/PageIndicatorView new file mode 100644 index 000..45d72db --- /dev/null +++ b/app/src/main/assets/licenses/PageIndicatorView @@ -0,0 +1,13 @@ +Copyright 2016 Roman Danylyk + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. \ No newline at end of file diff --git a/app/src/main/java/org/wikipedia/descriptions/DescriptionEditTutorialFragment.java b/app/src/main/java/org/wikipedia/descriptions/DescriptionEditTutorialFragment.java index be546ac..a7064b4 100644 --- a/app/src/main/java/org/wikipedia/descriptions/DescriptionEditTutorialFragment.java +++ b/app/src/main/java/org/wikipedia/descriptions/DescriptionEditTutorialFragment.java @@ -10,6 +10,8 @@ import android.view.View; import android.view.ViewGroup; +import com.rd.PageIndicatorView; + import org.wikipedia.R; import org.wikipedia.activity.FragmentUtil; @@ -19,6 +21,8 @@ public class DescriptionEditTutorialFragment extends Fragment { @BindView(R.id.fragment_description_edit_tutorial_view_pager) ViewPager viewPager; +@BindView(R.id.fragment_description_edit_tutorial_page_indicator) PageIndicatorView pageIndicatorView; + private Unbinder unbinder; private PagerAdapter adapter; @@ -41,6 +45,7 @@ View view = inflater.inflate(R.layout.fragment_description_edit_tutorial, container, false); unbinder = ButterKnife.bind(this, view); viewPager.setAdapter(adapter); +pageIndicatorView.setViewPager(viewPager); return view; } diff --git a/app/src/main/res/drawable/view_pager_indicator_dot.xml b/app/src/main/res/drawable/view_pager_indicator_dot.xml new file mode 100644 index 000..0353a77 --- /dev/null +++ b/app/src/main/res/drawable/view_pager_indicator_dot.xml @@ -0,0 +1,8 @@ + +http://schemas.android.com/apk/res/android; +android:shape="oval"> + + + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_description_edit_tutorial.xml b/app/src/main/res/layout/fragment_description_edit_tutorial.xml index 59b4754..d3228ea 100644 --- a/app/src/main/res/layout/fragment_description_edit_tutorial.xml +++ b/app/src/main/res/layout/fragment_description_edit_tutorial.xml @@ -1,6 +1,22 @@ -http://schemas.android.com/apk/res/android; -android:id="@+id/fragment_description_edit_tutorial_view_pager" +http://schemas.android.com/apk/res/android; android:layout_width="match_parent" -android:layout_height="match_parent" /> \ No newline at end of file +android:layout_height="match_parent" +xmlns:attrs="http://schemas.android.com/apk/res-auto;> + + + + + + \ No newline at end of file diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index 89b01c5..f610f6f 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@
[MediaWiki-commits] [Gerrit] operations/puppet[production]: Revert "Disable l10nupdate cron"
Thcipriani has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/328839 ) Change subject: Revert "Disable l10nupdate cron" .. Revert "Disable l10nupdate cron" This reverts commit 4e20a1b73eaf6db12ae1456284f2927488f8d43c. Change-Id: I6be30e5f981f163b0ac3fccb6cf450f4ae33c022 --- M hieradata/hosts/tin.yaml 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/39/328839/1 diff --git a/hieradata/hosts/tin.yaml b/hieradata/hosts/tin.yaml index 1aafc32..9250bb3 100644 --- a/hieradata/hosts/tin.yaml +++ b/hieradata/hosts/tin.yaml @@ -3,4 +3,4 @@ - eqiad.wmnet - codfw.wmnet cluster: misc -scap::l10nupdate::run_l10nupdate: false +scap::l10nupdate::run_l10nupdate: true -- To view, visit https://gerrit.wikimedia.org/r/328839 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6be30e5f981f163b0ac3fccb6cf450f4ae33c022 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Thcipriani___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: Disable l10nupdate cron
Jcrespo has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/328738 ) Change subject: Disable l10nupdate cron .. Disable l10nupdate cron Disabled for the December deployment freeze. Change-Id: I07ae9e2ee0011a8981558f76d1f88cdf7806cd3d --- M hieradata/hosts/tin.yaml 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: jenkins-bot: Verified Jcrespo: Looks good to me, approved diff --git a/hieradata/hosts/tin.yaml b/hieradata/hosts/tin.yaml index 9250bb3..1aafc32 100644 --- a/hieradata/hosts/tin.yaml +++ b/hieradata/hosts/tin.yaml @@ -3,4 +3,4 @@ - eqiad.wmnet - codfw.wmnet cluster: misc -scap::l10nupdate::run_l10nupdate: true +scap::l10nupdate::run_l10nupdate: false -- To view, visit https://gerrit.wikimedia.org/r/328738 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I07ae9e2ee0011a8981558f76d1f88cdf7806cd3d Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: ThciprianiGerrit-Reviewer: Jcrespo Gerrit-Reviewer: Thcipriani Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...SiteMetrics[master]: Lowercasing strings for consistency and readability
SamanthaNguyen has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/328811 ) Change subject: Lowercasing strings for consistency and readability .. Lowercasing strings for consistency and readability Change-Id: I6b9d4b0021bd13bb8372c0d13322fbbc1a713829 --- M i18n/en-gb.json M i18n/en.json 2 files changed, 89 insertions(+), 88 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SiteMetrics refs/changes/11/328811/1 diff --git a/i18n/en-gb.json b/i18n/en-gb.json index 44b1259..87b947d 100644 --- a/i18n/en-gb.json +++ b/i18n/en-gb.json @@ -2,7 +2,7 @@ "@metadata": { "authors": [ "Usandaru555", - "Codynguyen1116" + "SamanthaNguyen" ] }, "action-metricsview": "view statistics about social tools" diff --git a/i18n/en.json b/i18n/en.json index eb0a49d..2bd7d4f 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -3,108 +3,109 @@ "authors": [ "Aaron Wright ", "David Pean ", - "Jack Phoenix " + "Jack Phoenix ", + "SamanthaNguyen " ] }, "sitemetrics": "Site Metrics", "sitemetrics-desc": "[[Special:SiteMetrics|Displays statistics]] about social tools", - "sitemetrics-anon-edits": "Anonymous Edits", - "sitemetrics-anon-edits-day": "Anonymous Edits By Day", - "sitemetrics-anon-edits-month": "Anonymous Edits By Month", - "sitemetrics-avatars": "Avatar Uploads", - "sitemetrics-avatars-day": "Avatar Uploads By Day", - "sitemetrics-avatars-month": "Avatar Uploads By Month", + "sitemetrics-anon-edits": "Anonymous edits", + "sitemetrics-anon-edits-day": "Anonymous edits by day", + "sitemetrics-anon-edits-month": "Anonymous edits by month", + "sitemetrics-avatars": "Avatar uploads", + "sitemetrics-avatars-day": "Avatar uploads by day", + "sitemetrics-avatars-month": "Avatar uploads by month", "sitemetrics-awards": "Awards", - "sitemetrics-awards-day": "Awards By Day", - "sitemetrics-awards-month": "Awards By Month", - "sitemetrics-blog-stats-header": "Blog and Voting Statistics", - "sitemetrics-casual-game-stats": "Casual Game Statistics", + "sitemetrics-awards-day": "Awards by day", + "sitemetrics-awards-month": "Awards by month", + "sitemetrics-blog-stats-header": "Blog and voting statistics", + "sitemetrics-casual-game-stats": "Casual game statistics", "sitemetrics-comments": "Comments", - "sitemetrics-comments-day": "Comments By Day", - "sitemetrics-comments-month": "Comments By Month", - "sitemetrics-contact-imports": "Contact Imports", - "sitemetrics-contact-invites-day": "Contact Invites By Day", - "sitemetrics-contact-invites-month": "Contact Invites By Month", - "sitemetrics-content-header": "Editing and Content Statistics", + "sitemetrics-comments-day": "Comments by day", + "sitemetrics-comments-month": "Comments by month", + "sitemetrics-contact-imports": "Contact imports", + "sitemetrics-contact-invites-day": "Contact invites by day", + "sitemetrics-contact-invites-month": "Contact invites by month", + "sitemetrics-content-header": "Editing and Content statistics", "sitemetrics-count": "Count", "sitemetrics-date": "Date", "sitemetrics-difference": "Difference", - "sitemetrics-edits": "Edits", + "sitemetrics-edits": "edits", "sitemetrics-foeships": "Foeships", - "sitemetrics-foeships-day": "Foeships by Day", - "sitemetrics-foeships-month": "Foeships By Month", + "sitemetrics-foeships-day": "Foeships by day", + "sitemetrics-foeships-month": "Foeships by month", "sitemetrics-friendships": "Friendships", - "sitemetrics-friendships-day": "Friendships by Day", - "sitemetrics-friendships-month": "Friendships by Month", + "sitemetrics-friendships-day": "Friendships by day", + "sitemetrics-friendships-month": "Friendships by month", "sitemetrics-gifts": "Gifts", - "sitemetrics-gifts-day": "Gifts by Day", - "sitemetrics-gifts-month": "Gifts by Month", - "sitemetrics-honorifics": "Honorific Advancements", - "sitemetrics-honorifics-day": "Honorific Advancements By Day", - "sitemetrics-honorifics-month": "Honorific Advancements By Month", + "sitemetrics-gifts-day": "Gifts by day", + "sitemetrics-gifts-month": "Gifts by month", + "sitemetrics-honorifics": "Honorific advancements", +
[MediaWiki-commits] [Gerrit] wikimedia...dash[master]: Top 10 days / hours widget
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/327401 ) Change subject: Top 10 days / hours widget .. Top 10 days / hours widget With filters TODO: So much boilerplate HTML - revive the template patch! Bug: T152028 Change-Id: I183615c9cb077f078cafa9602fe36aa8fcfbe31a --- M routes/data.js A schema/0005_top10.sql M src/app/startup.js A src/components/widgets/top10/top10.html A src/components/widgets/top10/top10.js M src/css/style.css A src/images/top10.png A widgets/top10.js 8 files changed, 223 insertions(+), 8 deletions(-) Approvals: XenoRyet: Looks good to me, approved jenkins-bot: Verified diff --git a/routes/data.js b/routes/data.js index 40f0304..65849c4 100644 --- a/routes/data.js +++ b/routes/data.js @@ -252,7 +252,9 @@ selectGroup = '', i, result, - cacheKey; + cacheKey, + whereCopies, + sqlParams = []; if ( !widget ) { res.json( { error: 'Error: ' + req.params.widget + ' is not a valid widget' } ); @@ -331,13 +333,19 @@ return; } } - sqlQuery = sqlQuery.replace( '[[WHERE]]', whereClause ); + // For SQL queries with repeated WHERE clauses (e.g. UNIONed) + // we need to know how many times to repeat the parameter values + whereCopies = ( sqlQuery.match( /\[\[WHERE\]\]/g ) || [] ).length; + for ( i = 0; i < whereCopies; i++ ) { + sqlParams = sqlParams.concat( values ); + } + sqlQuery = sqlQuery.replace( /\[\[WHERE\]\]/g, whereClause ); for ( i = 0; i < joins.length; i++ ) { joinClause += widget.optionalJoins[ joins[ i ] ].text + ' '; } - sqlQuery = sqlQuery.replace( '[[JOINS]]', joinClause ); - sqlQuery = sqlQuery.replace( '[[GROUP]]', groupClause ); - sqlQuery = sqlQuery.replace( '[[SELECTGROUP]]', selectGroup ); + sqlQuery = sqlQuery.replace( /\[\[JOINS\]\]/g, joinClause ); + sqlQuery = sqlQuery.replace( /\[\[GROUP\]\]/g, groupClause ); + sqlQuery = sqlQuery.replace( /\[\[SELECTGROUP\]\]/g, selectGroup ); connection = mysql.createConnection( { host: config.dbserver, @@ -351,15 +359,15 @@ return; } } ); - logger.debug( 'Query: ' + sqlQuery ); - connection.query( sqlQuery, values, function ( error, dbResults ) { + logger.debug( 'Query: ' + sqlQuery + '\nParams: ' + sqlParams.join( ', ' ) ); + connection.query( sqlQuery, sqlParams, function ( error, dbResults ) { if ( error ) { res.json( { error: 'Query error: ' + error } ); return; } result = { results: dbResults, - sqlQuery: substituteParams( sqlQuery, values ), + sqlQuery: substituteParams( sqlQuery, sqlParams ), timestamp: new Date().getTime() }; logger.debug( 'Storing results at cache key ' + cacheKey ); diff --git a/schema/0005_top10.sql b/schema/0005_top10.sql new file mode 100644 index 000..db1892e --- /dev/null +++ b/schema/0005_top10.sql @@ -0,0 +1,2 @@ +INSERT IGNORE INTO dash_widget (code, display_name, description, preview_path) + VALUES ('top10', 'Top 10s', 'Best 10 days and hours in the history of fundraising.', 'images/top10.png'); diff --git a/src/app/startup.js b/src/app/startup.js index b4b5c4e..0d9dadd 100644 --- a/src/app/startup.js +++ b/src/app/startup.js @@ -31,6 +31,7 @@ { require: 'components/widgets/distance-to-goal-chart/distance-to-goal-chart' } ); ko.components.register( 'donation-age', { require: 'components/widgets/donation-age/donation-age' } ); ko.components.register( 'fraud-gauge', { require: 'components/widgets/fraud-gauge/fraud-gauge' } ); + ko.components.register( 'top10', { require: 'components/widgets/top10/top10' } ); ko.components.register( 'totals-earned-chart', { require: 'components/widgets/totals-earned-chart/totals-earned-chart' } ); ko.components.register( 'x-by-y', { require: 'components/widgets/x-by-y/x-by-y' } ); diff --git a/src/components/widgets/top10/top10.html b/src/components/widgets/top10/top10.html new file mode 100644 index 000..b3be54e --- /dev/null +++ b/src/components/widgets/top10/top10.html @@ -0,0 +1,89 @@ + + + + + + + +Saved + + + + + + + + +
[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Add empty message key wikibase-SortedProperties
Raimond Spekking has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/328775 ) Change subject: Add empty message key wikibase-SortedProperties .. Add empty message key wikibase-SortedProperties This way it is visible on Special:AllMessages Change-Id: Icd83104db9ed07ea1855fb6462f6a32427dce58f --- M lib/i18n/en.json M lib/i18n/qqq.json 2 files changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/75/328775/1 diff --git a/lib/i18n/en.json b/lib/i18n/en.json index 500f909..876bf99 100644 --- a/lib/i18n/en.json +++ b/lib/i18n/en.json @@ -153,5 +153,6 @@ "wikibase-property-summary-wbeditentity-create": "Created a new property", "wikibase-property-summary-wbeditentity-update": "Changed a property", "wikibase-property-summary-wbeditentity-override": "Cleared a property", - "wikibase-property-summary-special-create-property": "Created a [$2] property with {{PLURAL:$1|value|values}}" + "wikibase-property-summary-special-create-property": "Created a [$2] property with {{PLURAL:$1|value|values}}", + "wikibase-SortedProperties": "" } diff --git a/lib/i18n/qqq.json b/lib/i18n/qqq.json index 298b8b8..0ad24ef 100644 --- a/lib/i18n/qqq.json +++ b/lib/i18n/qqq.json @@ -163,5 +163,6 @@ "wikibase-property-summary-wbeditentity-create": "Automatic edit summary generated when creating a new property.", "wikibase-property-summary-wbeditentity-update": "Automatic edit summary generated when updating an existing property.", "wikibase-property-summary-wbeditentity-override": "Automatic edit summary generated when overriding an existing property.", - "wikibase-property-summary-special-create-property": "Automatic edit summary when creating a property, and supplying one or more values. Parameters:\n* $1 - the number of values set (that is 0 - zero)\n* $2 - the language code of the entity page during creation" + "wikibase-property-summary-special-create-property": "Automatic edit summary when creating a property, and supplying one or more values. Parameters:\n* $1 - the number of values set (that is 0 - zero)\n* $2 - the language code of the entity page during creation", + "wikibase-SortedProperties": "Used to defines the sorting of the properties. Example: https://www.wikidata.org/wiki/MediaWiki:Wikibase-SortedProperties; } -- To view, visit https://gerrit.wikimedia.org/r/328775 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icd83104db9ed07ea1855fb6462f6a32427dce58f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Raimond Spekking___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: Disable l10nupdate cron
Thcipriani has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/328738 ) Change subject: Disable l10nupdate cron .. Disable l10nupdate cron Disabled for the December deployment freeze. Change-Id: I07ae9e2ee0011a8981558f76d1f88cdf7806cd3d --- M hieradata/hosts/tin.yaml 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/38/328738/1 diff --git a/hieradata/hosts/tin.yaml b/hieradata/hosts/tin.yaml index 9250bb3..1aafc32 100644 --- a/hieradata/hosts/tin.yaml +++ b/hieradata/hosts/tin.yaml @@ -3,4 +3,4 @@ - eqiad.wmnet - codfw.wmnet cluster: misc -scap::l10nupdate::run_l10nupdate: true +scap::l10nupdate::run_l10nupdate: false -- To view, visit https://gerrit.wikimedia.org/r/328738 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I07ae9e2ee0011a8981558f76d1f88cdf7806cd3d Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Thcipriani___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: Use the right counter for the right badge
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/328730 ) Change subject: Use the right counter for the right badge .. Use the right counter for the right badge Follow-up to Ib8aa673cf9e60ade80490ea0eccb7453d3747cd0 Bug: T142454 Change-Id: I086383a3002d28c2af8f3d8b5189bd7a58b02e98 --- M Hooks.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/Hooks.php b/Hooks.php index 8e23aee..8891532 100644 --- a/Hooks.php +++ b/Hooks.php @@ -952,7 +952,7 @@ $alertLinkClasses[] = 'mw-echo-notifications-badge-all-read'; } - if ( $msgCount > MWEchoNotifUser::MAX_BADGE_COUNT ) { + if ( $alertCount > MWEchoNotifUser::MAX_BADGE_COUNT ) { $alertLinkClasses[] = 'mw-echo-notifications-badge-long-label'; } -- To view, visit https://gerrit.wikimedia.org/r/328730 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I086383a3002d28c2af8f3d8b5189bd7a58b02e98 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: SbissonGerrit-Reviewer: Catrope Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Transliterator[master]: Removed deprecated hook usage
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/328647 ) Change subject: Removed deprecated hook usage .. Removed deprecated hook usage Bug: T151973 Change-Id: I12de5cfe56ff341795a9820c8004e50cb2b810fd --- M Transliterator.php M Transliterator_body.php 2 files changed, 8 insertions(+), 4 deletions(-) Approvals: Reedy: Looks good to me, approved Filip: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/Transliterator.php b/Transliterator.php index e7219c0..c7ae296 100644 --- a/Transliterator.php +++ b/Transliterator.php @@ -42,4 +42,4 @@ $wgHooks['TitleMoveComplete'][] = 'ExtTransliterator::purgeNewtitle'; # Show error messages when editing the map pages or prefix. $wgHooks['EditFilter'][] = 'ExtTransliterator::validate'; -$wgHooks['EditPageGetPreviewText'][] = 'ExtTransliterator::preview'; +$wgHooks['EditPageGetPreviewContent'][] = 'ExtTransliterator::preview'; diff --git a/Transliterator_body.php b/Transliterator_body.php index e1898f4..6ca93d7 100644 --- a/Transliterator_body.php +++ b/Transliterator_body.php @@ -598,11 +598,15 @@ /** * Prepend any error message caused by parsing the text for preview. * (EditPageGetPreviewText hook) +* @param $editPage EditPage +* @param $content Content +* @return bool */ - static function preview( $editPage, &$text ) { - self::validate( $editPage, $text, null, $hookError ); + static function preview( $editPage, &$content ) { + self::validate( $editPage, ContentHandler::getContentText( $content ), null, $hookError ); if ( $hookError ) { - $text = $hookError . "\n\n" . $text; + $content = ContentHandler::makeContent( + $hookError . "\n\n" . ContentHandler::getContentText( $content ) ); } return true; } -- To view, visit https://gerrit.wikimedia.org/r/328647 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I12de5cfe56ff341795a9820c8004e50cb2b810fd Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Transliterator Gerrit-Branch: master Gerrit-Owner: Georggi199Gerrit-Reviewer: Filip Gerrit-Reviewer: Georggi199 Gerrit-Reviewer: Reedy Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...PageInCat[master]: Replaced deprecated hook usage
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/328646 ) Change subject: Replaced deprecated hook usage .. Replaced deprecated hook usage Bug: T151973 Change-Id: I53c249f413e12b66335399b97442acacb83e2660 --- M PageInCat_body.php M extension.json 2 files changed, 8 insertions(+), 7 deletions(-) Approvals: Reedy: Looks good to me, approved Filip: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/PageInCat_body.php b/PageInCat_body.php index 0d9456c..28425a2 100644 --- a/PageInCat_body.php +++ b/PageInCat_body.php @@ -24,7 +24,7 @@ /** * Really hacky array for categories of page -* that we are previewing. See onEditPageGetPreviewText +* that we are previewing. See onEditPageGetPreviewContent * method. Each key is an md5sum of page text, and each key * is an array of categories */ @@ -244,10 +244,10 @@ * @todo Find a non-ugly way of doing this (is that possible?) * * @param $editPage EditPage -* @param $text String wikitext to be parsed +* @param $content Content wikitext to be parsed * @return boolean true */ - public static function onEditPageGetPreviewText( EditPage $editPage, $text ) { + public static function onEditPageGetPreviewContent( EditPage $editPage, $content ) { global $wgPageInCatUseAccuratePreview; if ( !$wgPageInCatUseAccuratePreview ) { return true; // disable this hacky mess ;) @@ -268,7 +268,8 @@ $parserOptions->enableLimitReport(); // I suppose I should be using $editPage->getTitle() but that's new in 1.19 - $toparse = $wgParser->preSaveTransform( $text, $editPage->mTitle, $curUser, $parserOptions ); + $toparse = $wgParser->preSaveTransform( + ContentHandler::getContentText( $content ), $editPage->mTitle, $curUser, $parserOptions ); $hash = md5( $toparse, true ); $parserOutput = $wgParser->parse( $toparse, $editPage->mTitle, $parserOptions ); @@ -287,7 +288,7 @@ /** * Insert categories from previous pre-preview parse into parser. * -* See onEditPageGetPreviewText. This is rather fragile/scary. +* See onEditPageGetPreviewContent. This is rather fragile/scary. * If anyone has a suggestion for how to do this better, please let me know. * * @param $parser Parser diff --git a/extension.json b/extension.json index 6b1d187..bc2cc8f 100644 --- a/extension.json +++ b/extension.json @@ -30,8 +30,8 @@ "ParserAfterTidy": [ "PageInCat::onParserAfterTidy" ], - "EditPageGetPreviewText": [ - "PageInCat::onEditPageGetPreviewText" + "EditPageGetPreviewContent": [ + "PageInCat::onEditPageGetPreviewContent" ], "ParserBeforeInternalParse": [ "PageInCat::onParserBeforeInternalParse" -- To view, visit https://gerrit.wikimedia.org/r/328646 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I53c249f413e12b66335399b97442acacb83e2660 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/PageInCat Gerrit-Branch: master Gerrit-Owner: Georggi199Gerrit-Reviewer: Filip Gerrit-Reviewer: Georggi199 Gerrit-Reviewer: Reedy Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/vagrant[master]: phab: clone libphutil and arcanist from WMF repos
BryanDavis has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/328731 ) Change subject: phab: clone libphutil and arcanist from WMF repos .. phab: clone libphutil and arcanist from WMF repos Use the wmf/stable versions of libphutil and arcanist rather than the upstream master. Change-Id: I6b0ab5f3c01b69060ef5bd65e3b5ba5254852ce0 --- M puppet/modules/arcanist/manifests/init.pp 1 file changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant refs/changes/31/328731/1 diff --git a/puppet/modules/arcanist/manifests/init.pp b/puppet/modules/arcanist/manifests/init.pp index ec73c17..0a5b46e 100644 --- a/puppet/modules/arcanist/manifests/init.pp +++ b/puppet/modules/arcanist/manifests/init.pp @@ -15,12 +15,14 @@ git::clone { 'libphutil': directory => "${deploy_dir}/libphutil", -remote=> 'https://secure.phabricator.com/diffusion/PHU/libphutil.git', +branch=> 'wmf/stable', +remote=> 'https://phabricator.wikimedia.org/diffusion/PHUTIL/libphutil.git', } git::clone { 'arcanist': directory => "${deploy_dir}/arcanist", -remote=> 'https://secure.phabricator.com/diffusion/ARC/arcanist.git', +branch=> 'wmf/stable', +remote=> 'https://phabricator.wikimedia.org/diffusion/ARC/arcanist.git', } env::profile_script { 'add arcanist bin to path': -- To view, visit https://gerrit.wikimedia.org/r/328731 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6b0ab5f3c01b69060ef5bd65e3b5ba5254852ce0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: BryanDavis___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Premoderation[master]: Removed deprecated hook usage
Reedy has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/328643 ) Change subject: Removed deprecated hook usage .. Removed deprecated hook usage Bug: T151973 Change-Id: I81f4e3416f76598e31a4fa593f59862b6c145436 --- M Premoderation.class.php 1 file changed, 21 insertions(+), 10 deletions(-) Approvals: Reedy: Verified; Looks good to me, approved Filip: Looks good to me, but someone else must approve diff --git a/Premoderation.class.php b/Premoderation.class.php index d52003a..7c89c8f 100644 --- a/Premoderation.class.php +++ b/Premoderation.class.php @@ -6,7 +6,7 @@ switch( $wgPremoderationType ) { case 'all': - $wgHooks['ArticleSave'][] = 'Premoderation::processEditRequest'; + $wgHooks['PageContentSave'][] = 'Premoderation::processEditRequest'; break; case 'abusefilter': @@ -27,17 +27,29 @@ return true; } - - public static function processEditRequest( &$article, &$user, &$text, &$summary, $minor, $watchthis, - $sectionanchor, &$flags, &$status ) - { + + /** +* @param WikiPage $wikiPage +* @param User $user +* @param Content $content +* @param string $summary +* @param bool $isMinor +* @param $isWatch +* @param $section +* @param $flags +* @param Status $status +* @return bool +* @throws ErrorPageError +*/ + public static function processEditRequest( $wikiPage, $user, $content, $summary, $isMinor, $isWatch, + $section, $flags, $status ) { global $wgRequest; $userIP = $wgRequest->getIP(); if( $user->isAllowed( 'skipmoderation' ) || self::checkWhitelist( $userIP ) ) { return true; } - $title = $article->mTitle; + $title = $wikiPage->getTitle(); $dbw = wfGetDB( DB_MASTER ); $dbQuery = array( @@ -45,13 +57,13 @@ 'pmq_page_last_id' => $title->getLatestRevID(), 'pmq_page_ns' => $title->getNamespace(), 'pmq_page_title' => $title->getDBkey(), - 'pmq_user' => $user->getID(), + 'pmq_user' => $user->getId(), 'pmq_user_text' => $user->getName(), 'pmq_timestamp' => $dbw->timestamp( wfTimestampNow() ), - 'pmq_minor' => $minor, + 'pmq_minor' => $isMinor, 'pmq_summary' => $summary, 'pmq_len' => $title->getLength(), - 'pmq_text' => $text, + 'pmq_text' => ContentHandler::getContentText( $content ), 'pmq_flags' => $flags, 'pmq_ip' => $userIP, 'pmq_status' => 'new' @@ -60,7 +72,6 @@ $dbw->commit( __METHOD__ ); throw new ErrorPageError( 'premoderation-success', 'premoderation-added-success-text' ); - return true; } public static function handleAFAction( $action, $parameters, $title, $vars, $rule_desc ) { -- To view, visit https://gerrit.wikimedia.org/r/328643 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I81f4e3416f76598e31a4fa593f59862b6c145436 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/Premoderation Gerrit-Branch: master Gerrit-Owner: Georggi199Gerrit-Reviewer: Filip Gerrit-Reviewer: Georggi199 Gerrit-Reviewer: Reedy Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: Use the right counter for the right badge
Sbisson has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/328730 ) Change subject: Use the right counter for the right badge .. Use the right counter for the right badge Follow-up to Ib8aa673cf9e60ade80490ea0eccb7453d3747cd0 Bug: T142454 Change-Id: I086383a3002d28c2af8f3d8b5189bd7a58b02e98 --- M Hooks.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo refs/changes/30/328730/1 diff --git a/Hooks.php b/Hooks.php index 8e23aee..8891532 100644 --- a/Hooks.php +++ b/Hooks.php @@ -952,7 +952,7 @@ $alertLinkClasses[] = 'mw-echo-notifications-badge-all-read'; } - if ( $msgCount > MWEchoNotifUser::MAX_BADGE_COUNT ) { + if ( $alertCount > MWEchoNotifUser::MAX_BADGE_COUNT ) { $alertLinkClasses[] = 'mw-echo-notifications-badge-long-label'; } -- To view, visit https://gerrit.wikimedia.org/r/328730 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I086383a3002d28c2af8f3d8b5189bd7a58b02e98 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: Sbisson___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] performance/WebPageTest[master]: Exit on errors in the WebPageTest test script
Phedenskog has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/328729 ) Change subject: Exit on errors in the WebPageTest test script .. Exit on errors in the WebPageTest test script If an error occur make sure we exit so we know that there are something wrong in a run. See https://gerrit.wikimedia.org/r/#/c/327706/ Change-Id: I97ab7bd006137e32d381a188468793e7f577e75b --- M test/rulethemall.sh 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/performance/WebPageTest refs/changes/29/328729/1 diff --git a/test/rulethemall.sh b/test/rulethemall.sh index 05fc23e..a79783f 100755 --- a/test/rulethemall.sh +++ b/test/rulethemall.sh @@ -1,4 +1,5 @@ #!/bin/bash +set -e # Use this script to test all batch scripts. # To be able to run it you need to set a couple of env -- To view, visit https://gerrit.wikimedia.org/r/328729 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I97ab7bd006137e32d381a188468793e7f577e75b Gerrit-PatchSet: 1 Gerrit-Project: performance/WebPageTest Gerrit-Branch: master Gerrit-Owner: Phedenskog___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] oojs/ui[master]: Properly hide labels if they are set to null
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/318957 ) Change subject: Properly hide labels if they are set to null .. Properly hide labels if they are set to null Using `:empty` excludes perfect layout for IE 8 and below, but seems given that it's not hindering functionality the best approach. Bug: T149587 Change-Id: I08fd4f007e4bc247c4c5a9d600698397d0ee1220 --- M src/styles/layouts/FieldsetLayout.less 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Bartosz Dziewoński: Looks good to me, approved jenkins-bot: Verified diff --git a/src/styles/layouts/FieldsetLayout.less b/src/styles/layouts/FieldsetLayout.less index 41d34e7..bf42f1a 100644 --- a/src/styles/layouts/FieldsetLayout.less +++ b/src/styles/layouts/FieldsetLayout.less @@ -24,6 +24,10 @@ padding: 0; white-space: normal; // Correct the text wrapping in Edge and IE float: left; // Prevent positioning problems in Firefox, see T146462 + + &:empty { + display: none; + } } &-group { -- To view, visit https://gerrit.wikimedia.org/r/318957 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I08fd4f007e4bc247c4c5a9d600698397d0ee1220 Gerrit-PatchSet: 5 Gerrit-Project: oojs/ui Gerrit-Branch: master Gerrit-Owner: EsandersGerrit-Reviewer: Bartosz Dziewoński Gerrit-Reviewer: Esanders Gerrit-Reviewer: Jforrester Gerrit-Reviewer: VolkerE Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: WIP: Process payment before popping out of iframe
Cdentinger has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/328725 ) Change subject: WIP: Process payment before popping out of iframe .. WIP: Process payment before popping out of iframe I'm sure it's not actually this simple but isn't this basically, conceptually what we want to do? Bug: T153972 Change-Id: I9c3b143074e8394519e6828ccea16029097559d8 --- M globalcollect_gateway/globalcollect_resultswitcher.body.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface refs/changes/25/328725/1 diff --git a/globalcollect_gateway/globalcollect_resultswitcher.body.php b/globalcollect_gateway/globalcollect_resultswitcher.body.php index bcf88d3..60e1feb 100644 --- a/globalcollect_gateway/globalcollect_resultswitcher.body.php +++ b/globalcollect_gateway/globalcollect_resultswitcher.body.php @@ -54,7 +54,7 @@ } else { $result = $this->popout_if_iframe(); if ( $result ) { - return; + //return; } } -- To view, visit https://gerrit.wikimedia.org/r/328725 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9c3b143074e8394519e6828ccea16029097559d8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DonationInterface Gerrit-Branch: master Gerrit-Owner: Cdentinger___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[master]: Remove unneeded padding from Special:Mobiledif
Bmansurov has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/328723 ) Change subject: Remove unneeded padding from Special:Mobiledif .. Remove unneeded padding from Special:Mobiledif When the device width is big enough, e.g. desktop, the content width is already limited by `.content-unstyled`. Removing the padding will align the text left with the header and hamburger, while preventing it from touching the browser left or right. Bug: T147944 Change-Id: Id57f6626eff0ca8d52666464005c7c2c39b7a5ef --- M resources/mobile.special.mobilediff.styles/mobilediff.less 1 file changed, 1 insertion(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/23/328723/1 diff --git a/resources/mobile.special.mobilediff.styles/mobilediff.less b/resources/mobile.special.mobilediff.styles/mobilediff.less index 24a66f2..32207a5 100644 --- a/resources/mobile.special.mobilediff.styles/mobilediff.less +++ b/resources/mobile.special.mobilediff.styles/mobilediff.less @@ -131,8 +131,7 @@ } @media all and ( min-width: @wgMFDeviceWidthDesktop ) { - // FIXME: Overly specific selector - .beta #mw-mf-diffarea { + #mw-mf-diffarea { padding-left: 0; padding-right: 0; } -- To view, visit https://gerrit.wikimedia.org/r/328723 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id57f6626eff0ca8d52666464005c7c2c39b7a5ef Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Bmansurov___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Spanish alias to ContentTranslation.alias.php
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/328686 ) Change subject: Spanish alias to ContentTranslation.alias.php .. Spanish alias to ContentTranslation.alias.php Translated special page names into Spanish. Bug: T153954 Change-Id: I366a34672c04bef02285888a36a4a3cb250bf38e --- M ContentTranslation.alias.php 1 file changed, 6 insertions(+), 0 deletions(-) Approvals: Amire80: Looks good to me, approved jenkins-bot: Verified diff --git a/ContentTranslation.alias.php b/ContentTranslation.alias.php index 65b2642..04a6841 100644 --- a/ContentTranslation.alias.php +++ b/ContentTranslation.alias.php @@ -52,6 +52,12 @@ 'ContentTranslation' => array( 'AçarnayışêZerreki', 'AZ' ), ); +/** Spanish (Español) */ +$specialPageAliases['es'] = array( + 'ContentTranslation' => array( 'Traducción_de_contenidos' ), + 'ContentTranslationStats' => array( 'Estadísticas_de_traducción_de_contenidos' ), +); + /** Persian (فارسی) */ $specialPageAliases['fa'] = array( 'ContentTranslation' => array( 'ترجمهٔ_محتوا', 'ترجمه_محتوا' ), -- To view, visit https://gerrit.wikimedia.org/r/328686 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I366a34672c04bef02285888a36a4a3cb250bf38e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: MarcoAurelioGerrit-Reviewer: Amire80 Gerrit-Reviewer: KartikMistry Gerrit-Reviewer: Nikerabbit Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...OAuth[wmf/1.29.0-wmf.6]: When authorizing, differentiate mwoauth-authonlyprivate from...
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/328722 ) Change subject: When authorizing, differentiate mwoauth-authonlyprivate from mwoauth-authonly or basic .. When authorizing, differentiate mwoauth-authonlyprivate from mwoauth-authonly or basic People have expressed concern that the authorization message is the same when giving access to your email address and when not doing so. Change-Id: Idf4618977f172dfa538ef7a4a6ef15e808f2c593 (cherry picked from commit 9e3bb04405a491d73a3b64c3d032428a7707761b) --- M frontend/specialpages/SpecialMWOAuth.php M i18n/en.json M i18n/qqq.json 3 files changed, 15 insertions(+), 5 deletions(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/frontend/specialpages/SpecialMWOAuth.php b/frontend/specialpages/SpecialMWOAuth.php index 0842190..f4cd634 100644 --- a/frontend/specialpages/SpecialMWOAuth.php +++ b/frontend/specialpages/SpecialMWOAuth.php @@ -383,6 +383,8 @@ // * mwoauth-form-description-onewiki // * mwoauth-form-description-allwikis-nogrants // * mwoauth-form-description-onewiki-nogrants + // * mwoauth-form-description-allwikis-privateinfo + // * mwoauth-form-description-onewiki-privateinfo $msgKey = 'mwoauth-form-description'; $params = [ $this->getUser()->getName(), @@ -397,7 +399,11 @@ } $grantsText = \MWGrants::getGrantsWikiText( $cmr->get( 'grants' ), $this->getLanguage() ); if ( $grantsText === "\n" ) { - $msgKey .= '-nogrants'; + if ( in_array( 'mwoauth-authonlyprivate', $cmr->get( 'grants' ), true ) ) { + $msgKey .= '-privateinfo'; + } else { + $msgKey .= '-nogrants'; + } } else { $params[] = $grantsText; } diff --git a/i18n/en.json b/i18n/en.json index 23a95d7..7adcf5e 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -220,6 +220,8 @@ "mwoauth-form-description-onewiki": "Hi $1,\n\nIn order to complete your request, '''$2''' needs permission to perform the following actions on your behalf on ''$4'':\n\n$5", "mwoauth-form-description-allwikis-nogrants": "Hi $1,\n\nIn order to complete your request, '''$2''' needs permission to access information on all projects of this site on your behalf. No changes will be made with your account.", "mwoauth-form-description-onewiki-nogrants": "Hi $1,\n\nIn order to complete your request, '''$2''' needs permission to access information on ''$4'' on your behalf. No changes will be made with your account.", + "mwoauth-form-description-allwikis-privateinfo": "Hi $1,\n\nIn order to complete your request, '''$2''' needs permission to access information about you, including your real name and email address, on all projects of this site. No changes will be made with your account.", + "mwoauth-form-description-onewiki-privateinfo": "Hi $1,\n\nIn order to complete your request, '''$2''' needs permission to access information, including your real name and email address, on ''$4''. No changes will be made with your account.", "mwoauth-form-legal": "", "mwoauth-form-button-approve": "Allow", "mwoauth-form-button-cancel": "Cancel", diff --git a/i18n/qqq.json b/i18n/qqq.json index 9276133..2391c7d 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -225,10 +225,12 @@ "mwoauth-invalid-authorization-wrong-user": "Text of the error page when the Authorization header is for the wrong user", "mwoauth-invalid-authorization-not-approved": "Text of the error page when the Authorization header is for a consumer that isn't approved.\n\nParameters:\n* $1 - ...", "mwoauth-invalid-authorization-blocked-user": "Text of the error page when Authorization header is for a user who is blocked", - "mwoauth-form-description-allwikis": "Description of a form requesting the user authorize an OAuth consumer to use MediaWiki on their behalf.\n\nParameters:\n* $1 - the username\n* $2 - application name\n* $3 - application publisher\n* $4 - formatted list of grants\nSee also:\n* {{msg-mw|Mwoauth-form-description-onewiki}}\n* {{msg-mw|Mwoauth-form-description-allwikis-nogrants}}\n* {{msg-mw|Mwoauth-form-description-onewiki-nogrants}}", - "mwoauth-form-description-onewiki": "Description of a form requesting the user authorize an OAuth consumer to use MediaWiki on their behalf, without any non-hidden grants.\n\nParameters:\n* $1 - the username\n* $2 - application name\n* $3 - application publisher\n* $4 - wiki project name\nSee also:\n* {{msg-mw|Mwoauth-form-description-allwikis}}\n*
[MediaWiki-commits] [Gerrit] mediawiki...OAuth[wmf/1.29.0-wmf.6]: When authorizing, differentiate mwoauth-authonlyprivate from...
Catrope has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/328722 ) Change subject: When authorizing, differentiate mwoauth-authonlyprivate from mwoauth-authonly or basic .. When authorizing, differentiate mwoauth-authonlyprivate from mwoauth-authonly or basic People have expressed concern that the authorization message is the same when giving access to your email address and when not doing so. Change-Id: Idf4618977f172dfa538ef7a4a6ef15e808f2c593 (cherry picked from commit 9e3bb04405a491d73a3b64c3d032428a7707761b) --- M frontend/specialpages/SpecialMWOAuth.php M i18n/en.json M i18n/qqq.json 3 files changed, 15 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OAuth refs/changes/22/328722/1 diff --git a/frontend/specialpages/SpecialMWOAuth.php b/frontend/specialpages/SpecialMWOAuth.php index 0842190..f4cd634 100644 --- a/frontend/specialpages/SpecialMWOAuth.php +++ b/frontend/specialpages/SpecialMWOAuth.php @@ -383,6 +383,8 @@ // * mwoauth-form-description-onewiki // * mwoauth-form-description-allwikis-nogrants // * mwoauth-form-description-onewiki-nogrants + // * mwoauth-form-description-allwikis-privateinfo + // * mwoauth-form-description-onewiki-privateinfo $msgKey = 'mwoauth-form-description'; $params = [ $this->getUser()->getName(), @@ -397,7 +399,11 @@ } $grantsText = \MWGrants::getGrantsWikiText( $cmr->get( 'grants' ), $this->getLanguage() ); if ( $grantsText === "\n" ) { - $msgKey .= '-nogrants'; + if ( in_array( 'mwoauth-authonlyprivate', $cmr->get( 'grants' ), true ) ) { + $msgKey .= '-privateinfo'; + } else { + $msgKey .= '-nogrants'; + } } else { $params[] = $grantsText; } diff --git a/i18n/en.json b/i18n/en.json index 23a95d7..7adcf5e 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -220,6 +220,8 @@ "mwoauth-form-description-onewiki": "Hi $1,\n\nIn order to complete your request, '''$2''' needs permission to perform the following actions on your behalf on ''$4'':\n\n$5", "mwoauth-form-description-allwikis-nogrants": "Hi $1,\n\nIn order to complete your request, '''$2''' needs permission to access information on all projects of this site on your behalf. No changes will be made with your account.", "mwoauth-form-description-onewiki-nogrants": "Hi $1,\n\nIn order to complete your request, '''$2''' needs permission to access information on ''$4'' on your behalf. No changes will be made with your account.", + "mwoauth-form-description-allwikis-privateinfo": "Hi $1,\n\nIn order to complete your request, '''$2''' needs permission to access information about you, including your real name and email address, on all projects of this site. No changes will be made with your account.", + "mwoauth-form-description-onewiki-privateinfo": "Hi $1,\n\nIn order to complete your request, '''$2''' needs permission to access information, including your real name and email address, on ''$4''. No changes will be made with your account.", "mwoauth-form-legal": "", "mwoauth-form-button-approve": "Allow", "mwoauth-form-button-cancel": "Cancel", diff --git a/i18n/qqq.json b/i18n/qqq.json index 9276133..2391c7d 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -225,10 +225,12 @@ "mwoauth-invalid-authorization-wrong-user": "Text of the error page when the Authorization header is for the wrong user", "mwoauth-invalid-authorization-not-approved": "Text of the error page when the Authorization header is for a consumer that isn't approved.\n\nParameters:\n* $1 - ...", "mwoauth-invalid-authorization-blocked-user": "Text of the error page when Authorization header is for a user who is blocked", - "mwoauth-form-description-allwikis": "Description of a form requesting the user authorize an OAuth consumer to use MediaWiki on their behalf.\n\nParameters:\n* $1 - the username\n* $2 - application name\n* $3 - application publisher\n* $4 - formatted list of grants\nSee also:\n* {{msg-mw|Mwoauth-form-description-onewiki}}\n* {{msg-mw|Mwoauth-form-description-allwikis-nogrants}}\n* {{msg-mw|Mwoauth-form-description-onewiki-nogrants}}", - "mwoauth-form-description-onewiki": "Description of a form requesting the user authorize an OAuth consumer to use MediaWiki on their behalf, without any non-hidden grants.\n\nParameters:\n* $1 - the username\n* $2 - application name\n* $3 - application publisher\n* $4 - wiki project name\nSee also:\n* {{msg-mw|Mwoauth-form-description-allwikis}}\n*
[MediaWiki-commits] [Gerrit] mediawiki...Cargo[master]: Fix for 097df1167cec
Yaron Koren has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/328720 ) Change subject: Fix for 097df1167cec .. Fix for 097df1167cec Change-Id: Idd4dc8563b4c4fc7f585641a1c0d650e3d0fcd65 --- M maintenance/cargoRecreateData.php M maintenance/setCargoFileData.php M maintenance/setCargoPageData.php 3 files changed, 15 insertions(+), 3 deletions(-) Approvals: Yaron Koren: Looks good to me, approved jenkins-bot: Verified diff --git a/maintenance/cargoRecreateData.php b/maintenance/cargoRecreateData.php index edc8d19..8d55f44 100644 --- a/maintenance/cargoRecreateData.php +++ b/maintenance/cargoRecreateData.php @@ -34,7 +34,11 @@ public function __construct() { parent::__construct(); - $this->requireExtension( 'Cargo' ); + + // MW 1.28 + if ( method_exists( $this, 'requireExtension' ) ) { + $this->requireExtension( 'Cargo' ); + } $this->mDescription = "Recreate the data for one or more Cargo database tables."; $this->addOption( 'table', 'The Cargo table to recreate', false, true ); } diff --git a/maintenance/setCargoFileData.php b/maintenance/setCargoFileData.php index d6ec649..5af4bfa 100644 --- a/maintenance/setCargoFileData.php +++ b/maintenance/setCargoFileData.php @@ -34,7 +34,11 @@ public function __construct() { parent::__construct(); - $this->requireExtension( 'Cargo' ); + + // MW 1.28 + if ( method_exists( $this, 'requireExtension' ) ) { + $this->requireExtension( 'Cargo' ); + } $this->mDescription = "Stores a set of data for each file in the wiki in one or more database tables, for use within Cargo queries."; $this->addOption( "delete", "Delete the file data DB table(s)", false, false ); } diff --git a/maintenance/setCargoPageData.php b/maintenance/setCargoPageData.php index bf156a5..b2d04bd 100644 --- a/maintenance/setCargoPageData.php +++ b/maintenance/setCargoPageData.php @@ -34,7 +34,11 @@ public function __construct() { parent::__construct(); - $this->requireExtension( 'Cargo' ); + + // MW 1.28 + if ( method_exists( $this, 'requireExtension' ) ) { + $this->requireExtension( 'Cargo' ); + } $this->mDescription = "Stores a set of data for each page in the wiki in one or more database tables, for use within Cargo queries."; $this->addOption( "delete", "Delete the page data DB table(s)", false, false ); } -- To view, visit https://gerrit.wikimedia.org/r/328720 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idd4dc8563b4c4fc7f585641a1c0d650e3d0fcd65 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Cargo Gerrit-Branch: master Gerrit-Owner: Yaron KorenGerrit-Reviewer: Yaron Koren Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[master]: Hygiene: rename a variable
Bmansurov has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/328721 ) Change subject: Hygiene: rename a variable .. Hygiene: rename a variable Remove the word `beta` from a variable name as it doesn't capture the current sitatuion, where we have only one reference drawer. Bug: T147944 Change-Id: I72a656e4cef4f15b701283edaa593c39ba2ddbaf --- M resources/mobile.references/references.less 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/21/328721/1 diff --git a/resources/mobile.references/references.less b/resources/mobile.references/references.less index 9a50c1a..ce50f3e 100644 --- a/resources/mobile.references/references.less +++ b/resources/mobile.references/references.less @@ -1,7 +1,7 @@ @import 'minerva.variables'; @import 'minerva.mixins'; -@betaDrawerPadding: 20px; +@drawerPadding: 20px; // prevent body from scrolling // won't work on firefox for android because of this bug: https://bugzilla.mozilla.org/show_bug.cgi?id=886969 @@ -14,7 +14,7 @@ color: @colorGray12; max-height: 400px; // or half of window height, whichever is smaller (see ReferencesDrawerBeta.js) overflow-y: auto; - padding: @betaDrawerPadding; + padding: @drawerPadding; &.text { font-size: 1em; } @@ -60,8 +60,8 @@ // the icon:before already has 1em margin on both sides padding: @extraPadding 0; position: absolute; - right: @betaDrawerPadding; - top: @betaDrawerPadding; + right: @drawerPadding; + top: @drawerPadding; } } -- To view, visit https://gerrit.wikimedia.org/r/328721 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I72a656e4cef4f15b701283edaa593c39ba2ddbaf Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Bmansurov___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/vagrant[master]: Install latest git client from PPA; upgrade git-review
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/328691 ) Change subject: Install latest git client from PPA; upgrade git-review .. Install latest git client from PPA; upgrade git-review * Add the https://launchpad.net/~git-core/+archive/ubuntu/ppa PPA to provide current stable Git packages. * Bump git-review to the latest upstream version. Bug: T152801 Change-Id: Id4796201a0d9d8554f981decf9f55a4566c95307 --- M puppet/modules/git/manifests/init.pp 1 file changed, 4 insertions(+), 1 deletion(-) Approvals: Mainframe98: Looks good to me, but someone else must approve BryanDavis: Looks good to me, approved jenkins-bot: Verified diff --git a/puppet/modules/git/manifests/init.pp b/puppet/modules/git/manifests/init.pp index 46bfda4..d3b4058 100644 --- a/puppet/modules/git/manifests/init.pp +++ b/puppet/modules/git/manifests/init.pp @@ -28,12 +28,15 @@ ) { include ::git::gerrit +apt::ppa { 'git-core/ppa': } + package { 'git': ensure => latest, +require => Apt::Ppa['git-core/ppa'], } package { 'git-review': -ensure => '1.24', +ensure => '1.25', provider => 'pip', } } -- To view, visit https://gerrit.wikimedia.org/r/328691 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id4796201a0d9d8554f981decf9f55a4566c95307 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: BryanDavisGerrit-Reviewer: BryanDavis Gerrit-Reviewer: Dduvall Gerrit-Reviewer: Gergő Tisza Gerrit-Reviewer: Mainframe98 Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Cargo[master]: Fix for 097df1167cec
Yaron Koren has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/328720 ) Change subject: Fix for 097df1167cec .. Fix for 097df1167cec Change-Id: Idd4dc8563b4c4fc7f585641a1c0d650e3d0fcd65 --- M maintenance/cargoRecreateData.php M maintenance/setCargoFileData.php M maintenance/setCargoPageData.php 3 files changed, 15 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Cargo refs/changes/20/328720/2 diff --git a/maintenance/cargoRecreateData.php b/maintenance/cargoRecreateData.php index edc8d19..8d55f44 100644 --- a/maintenance/cargoRecreateData.php +++ b/maintenance/cargoRecreateData.php @@ -34,7 +34,11 @@ public function __construct() { parent::__construct(); - $this->requireExtension( 'Cargo' ); + + // MW 1.28 + if ( method_exists( $this, 'requireExtension' ) ) { + $this->requireExtension( 'Cargo' ); + } $this->mDescription = "Recreate the data for one or more Cargo database tables."; $this->addOption( 'table', 'The Cargo table to recreate', false, true ); } diff --git a/maintenance/setCargoFileData.php b/maintenance/setCargoFileData.php index d6ec649..5af4bfa 100644 --- a/maintenance/setCargoFileData.php +++ b/maintenance/setCargoFileData.php @@ -34,7 +34,11 @@ public function __construct() { parent::__construct(); - $this->requireExtension( 'Cargo' ); + + // MW 1.28 + if ( method_exists( $this, 'requireExtension' ) ) { + $this->requireExtension( 'Cargo' ); + } $this->mDescription = "Stores a set of data for each file in the wiki in one or more database tables, for use within Cargo queries."; $this->addOption( "delete", "Delete the file data DB table(s)", false, false ); } diff --git a/maintenance/setCargoPageData.php b/maintenance/setCargoPageData.php index bf156a5..b2d04bd 100644 --- a/maintenance/setCargoPageData.php +++ b/maintenance/setCargoPageData.php @@ -34,7 +34,11 @@ public function __construct() { parent::__construct(); - $this->requireExtension( 'Cargo' ); + + // MW 1.28 + if ( method_exists( $this, 'requireExtension' ) ) { + $this->requireExtension( 'Cargo' ); + } $this->mDescription = "Stores a set of data for each page in the wiki in one or more database tables, for use within Cargo queries."; $this->addOption( "delete", "Delete the page data DB table(s)", false, false ); } -- To view, visit https://gerrit.wikimedia.org/r/328720 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idd4dc8563b4c4fc7f585641a1c0d650e3d0fcd65 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Cargo Gerrit-Branch: master Gerrit-Owner: Yaron KorenGerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Cargo[master]: Added "text color" parameter for "calendar" format
Yaron Koren has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/328717 ) Change subject: Added "text color" parameter for "calendar" format .. Added "text color" parameter for "calendar" format Based on a patch by Duncan Crane. Change-Id: Ib24db72cbc0fbe5854ac43b4cc968a6120683b36 --- M formats/CargoCalendarFormat.php M specials/CargoExport.php 2 files changed, 12 insertions(+), 1 deletion(-) Approvals: Yaron Koren: Looks good to me, approved jenkins-bot: Verified diff --git a/formats/CargoCalendarFormat.php b/formats/CargoCalendarFormat.php index 92bb08e..fb49a7e 100644 --- a/formats/CargoCalendarFormat.php +++ b/formats/CargoCalendarFormat.php @@ -6,7 +6,7 @@ class CargoCalendarFormat extends CargoDeferredFormat { function allowedParameters() { - return array( 'width', 'start date', 'color', 'height' ); + return array( 'width', 'start date', 'color', 'text color', 'height' ); } /** @@ -22,6 +22,7 @@ $queryParams = $this->sqlQueriesToQueryParams( $sqlQueries ); $queryParams['format'] = 'fullcalendar'; $queryParams['color'] = array(); + $queryParams['text color'] = array(); foreach ( $sqlQueries as $i => $sqlQuery ) { if ( $querySpecificParams != null ) { if ( array_key_exists( 'color', $querySpecificParams[$i] ) ) { @@ -32,6 +33,14 @@ // that do contain a color. $queryParams['color'][] = null; } + if ( array_key_exists( 'text color', $querySpecificParams[$i] ) ) { + $queryParams['text color'][] = $querySpecificParams[$i]['text color']; + } else { + // Stick an empty value in there, to + // preserve the order for the queries + // that do contain a color. + $queryParams['text color'][] = null; + } } } diff --git a/specials/CargoExport.php b/specials/CargoExport.php index 9296ff1..8c83baa 100644 --- a/specials/CargoExport.php +++ b/specials/CargoExport.php @@ -86,6 +86,7 @@ $req = $this->getRequest(); $colorArray = $req->getArray( 'color' ); + $textColorArray = $req->getArray( 'text_color' ); $datesLowerLimit = $req->getVal( 'start' ); $datesUpperLimit = $req->getVal( 'end' ); @@ -142,6 +143,7 @@ 'url' => $title->getLocalURL(), 'start' => $queryResult[$dateFieldAliases[0]], 'color' => $colorArray[$i], + 'textColor' => $textColorArray[$i], 'description' => $eventDescription ); if ( $startDatePrecision != CargoStore::DATE_AND_TIME ) { -- To view, visit https://gerrit.wikimedia.org/r/328717 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib24db72cbc0fbe5854ac43b4cc968a6120683b36 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/Cargo Gerrit-Branch: master Gerrit-Owner: Yaron KorenGerrit-Reviewer: Yaron Koren Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Add DW alias for NS_PROJECT_TALK in frwiki
Urbanecm has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/328719 ) Change subject: Add DW alias for NS_PROJECT_TALK in frwiki .. Add DW alias for NS_PROJECT_TALK in frwiki Bug: T153952 Change-Id: I9d7711a1ad7ead596d89cde08bc57555b13ad62c --- M wmf-config/InitialiseSettings.php 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/19/328719/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 6585c9e..7b9244a 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -3098,6 +3098,7 @@ ], '+frwiki' => [ 'WP' => NS_PROJECT, + 'DW' => NS_PROJECT_TALK, // T153952 'Discussion_Wikipedia' => NS_PROJECT_TALK, 'Utilisatrice' => NS_USER, 'Discussion_Utilisatrice' => NS_USER_TALK, -- To view, visit https://gerrit.wikimedia.org/r/328719 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9d7711a1ad7ead596d89cde08bc57555b13ad62c Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Urbanecm___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Cargo[master]: Added "text color" parameter for "calendar" format
Yaron Koren has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/328717 ) Change subject: Added "text color" parameter for "calendar" format .. Added "text color" parameter for "calendar" format Based on a patch by Duncan Crane. Change-Id: Ib24db72cbc0fbe5854ac43b4cc968a6120683b36 --- M formats/CargoCalendarFormat.php M specials/CargoExport.php 2 files changed, 12 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Cargo refs/changes/17/328717/2 diff --git a/formats/CargoCalendarFormat.php b/formats/CargoCalendarFormat.php index 92bb08e..78769b1 100644 --- a/formats/CargoCalendarFormat.php +++ b/formats/CargoCalendarFormat.php @@ -6,7 +6,7 @@ class CargoCalendarFormat extends CargoDeferredFormat { function allowedParameters() { - return array( 'width', 'start date', 'color', 'height' ); + return array( 'width', 'start date', 'color', 'text color', 'height' ); } /** @@ -22,6 +22,7 @@ $queryParams = $this->sqlQueriesToQueryParams( $sqlQueries ); $queryParams['format'] = 'fullcalendar'; $queryParams['color'] = array(); + $queryParams['text color'] = array() foreach ( $sqlQueries as $i => $sqlQuery ) { if ( $querySpecificParams != null ) { if ( array_key_exists( 'color', $querySpecificParams[$i] ) ) { @@ -32,6 +33,14 @@ // that do contain a color. $queryParams['color'][] = null; } + if ( array_key_exists( 'text color', $querySpecificParams[$i] ) ) { + $queryParams['text color'][] = $querySpecificParams[$i]['text color']; + } else { + // Stick an empty value in there, to + // preserve the order for the queries + // that do contain a color. + $queryParams['text color'][] = null; + } } } diff --git a/specials/CargoExport.php b/specials/CargoExport.php index 9296ff1..8c83baa 100644 --- a/specials/CargoExport.php +++ b/specials/CargoExport.php @@ -86,6 +86,7 @@ $req = $this->getRequest(); $colorArray = $req->getArray( 'color' ); + $textColorArray = $req->getArray( 'text_color' ); $datesLowerLimit = $req->getVal( 'start' ); $datesUpperLimit = $req->getVal( 'end' ); @@ -142,6 +143,7 @@ 'url' => $title->getLocalURL(), 'start' => $queryResult[$dateFieldAliases[0]], 'color' => $colorArray[$i], + 'textColor' => $textColorArray[$i], 'description' => $eventDescription ); if ( $startDatePrecision != CargoStore::DATE_AND_TIME ) { -- To view, visit https://gerrit.wikimedia.org/r/328717 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib24db72cbc0fbe5854ac43b4cc968a6120683b36 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Cargo Gerrit-Branch: master Gerrit-Owner: Yaron KorenGerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Don't create the test DB if the test doesn't need it.
Edward Chernenko has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/328718 ) Change subject: Don't create the test DB if the test doesn't need it. .. Don't create the test DB if the test doesn't need it. The following change - https://gerrit.wikimedia.org/r/#/c/289369/ - introduced two problems: 1) tests which do blackbox testing (make HTTP requests to the server, as user would do) are completely broken, because they need to analyze the real database and not the cloned one. For example, testsuite of Extension:Moderation. Right now they have to call teardownTestDB() at the beginning of each test. And that may stop working in future versions of MediaWiki. Now, the original argument for this change was "some extensions forget to say that they need the database", but ultimately it's their problem, one they can fix. On the other hand, overriding this "always create test DB" behavior is pretty difficult for tests which need to intentionally disable it. 2) tests which don't need to copy database become really slow. I have a testsuite of 40 tests. It's 40 copies of the database. Seriously? Change-Id: I136a785b948c6521cce77130ff60b5428a88953f --- M tests/phpunit/MediaWikiTestCase.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/18/328718/1 diff --git a/tests/phpunit/MediaWikiTestCase.php b/tests/phpunit/MediaWikiTestCase.php index fd02a3e..0d959fd 100644 --- a/tests/phpunit/MediaWikiTestCase.php +++ b/tests/phpunit/MediaWikiTestCase.php @@ -366,7 +366,7 @@ $needsResetDB = false; - if ( !self::$dbSetup || $this->needsDB() ) { + if ( !self::$dbSetup && $this->needsDB() ) { // set up a DB connection for this test to use self::$useTemporaryTables = !$this->getCliArg( 'use-normal-tables' ); -- To view, visit https://gerrit.wikimedia.org/r/328718 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I136a785b948c6521cce77130ff60b5428a88953f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Edward Chernenko___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Make the tplarg rule resemble template
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/328592 ) Change subject: Make the tplarg rule resemble template .. Make the tplarg rule resemble template Change-Id: Ib2d73d0621493575546534109a9522fbcfddf16d --- M lib/wt2html/pegTokenizer.pegjs M lib/wt2html/tokenizer.utils.js 2 files changed, 16 insertions(+), 13 deletions(-) Approvals: Subramanya Sastry: Looks good to me, approved jenkins-bot: Verified Arlolra: Looks good to me, approved diff --git a/lib/wt2html/pegTokenizer.pegjs b/lib/wt2html/pegTokenizer.pegjs index 5e5996b..257702c 100644 --- a/lib/wt2html/pegTokenizer.pegjs +++ b/lib/wt2html/pegTokenizer.pegjs @@ -842,24 +842,26 @@ tplarg = "{{{" -name:template_param_value? -params:( nl_comment_space* - '|' nl_comment_space* - r:( -&'}}}' { return new KV('', ''); } +target:template_param_value? +params:(nl_comment_space* "|" +r:( p0:("" { return endOffset(); }) +v:nl_comment_space* +p:("" { return endOffset(); }) +& "|" +{ return new KV('', tu.flattenIfArray(v), [p0, p0, p0, p]); } // empty argument / template_param - ) { return r; } - )* + ) { return r; } +)* nl_comment_space* "}}}" { - if (name) { -params.unshift(new KV(tu.flattenIfArray(name.tokens), '', name.srcOffsets)); - } else { -params.unshift(new KV('', '')); - } + if (target === null) { target = { tokens: '' }; } + // Insert target as first positional attribute, so that it can be + // generically expanded. The TemplateHandler then needs to shift it out + // again. + params.unshift(new KV(tu.flattenIfArray(target.tokens), '', target.srcOffsets)); var obj = new SelfclosingTagTk('templatearg', params, { tsr: tsrOffsets(), src: text() }); return obj; - } +} template_param = name:template_param_name diff --git a/lib/wt2html/tokenizer.utils.js b/lib/wt2html/tokenizer.utils.js index c09ed65..514ae78 100644 --- a/lib/wt2html/tokenizer.utils.js +++ b/lib/wt2html/tokenizer.utils.js @@ -203,6 +203,7 @@ input.substr(pos, 10) === '{{!}}{{!}}') ); case '}': + // NOTE: This will also break `tplarg` return counters.template && input[pos + 1] === "}"; case ':': return counters.colon && -- To view, visit https://gerrit.wikimedia.org/r/328592 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib2d73d0621493575546534109a9522fbcfddf16d Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/services/parsoid Gerrit-Branch: master Gerrit-Owner: ArlolraGerrit-Reviewer: Arlolra Gerrit-Reviewer: C. Scott Ananian Gerrit-Reviewer: Subramanya Sastry 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] mediawiki...mobileapps[master]: Add revision support to mobile content service
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/326868 ) Change subject: Add revision support to mobile content service .. Add revision support to mobile content service When editing a page, the API returns the revision number of the most recent edit. This can then be used to refresh the page and get the fresh content, rather than wait and hope the mobile content service gets updated before you request it. Bug: T146836 Change-Id: I5df2bce6e5c125be687edab0951bb827b6fb95c7 --- M lib/parsoid-access.js M test/features/mobile-sections/pagecontent.js 2 files changed, 74 insertions(+), 1 deletion(-) Approvals: BearND: Looks good to me, approved jenkins-bot: Verified Mholloway: Looks good to me, but someone else must approve diff --git a/lib/parsoid-access.js b/lib/parsoid-access.js index 1cc290e..ea1e4f4 100644 --- a/lib/parsoid-access.js +++ b/lib/parsoid-access.js @@ -22,8 +22,13 @@ * of the given page. */ function getParsoidHtml(app, req) { +const rev = req.params.revision; +let suffix = ''; +if (rev) { +suffix = `/${rev}`; +} const domain = req.params.domain.replace(/^(\w+\.)m\./, '$1'); -const path = `page/html/${encodeURIComponent(req.params.title)}`; +const path = `page/html/${encodeURIComponent(req.params.title)}${suffix}`; const restReq = { query: { redirect: 'false' }, headers: { accept: 'text/html; charset=utf-8; profile="mediawiki.org/specs/html/1.2.0"' } diff --git a/test/features/mobile-sections/pagecontent.js b/test/features/mobile-sections/pagecontent.js index 1d85d39..e5eb391 100644 --- a/test/features/mobile-sections/pagecontent.js +++ b/test/features/mobile-sections/pagecontent.js @@ -4,6 +4,7 @@ const assert = require('../../utils/assert.js'); const server = require('../../utils/server.js'); const headers = require('../../utils/headers.js'); +const enWikiHost = 'en.wikipedia.org/v1'; describe('mobile-sections', function() { @@ -11,6 +12,73 @@ before(() => { return server.start(); }); +it('Supports revision number request in URL', () => { +const title = '%2Fr%2FThe_Donald'; +const rev = 754364361; +const uri = `${server.config.uri}${enWikiHost}/page/mobile-sections/${title}/${rev}`; +return preq.get({ uri }) +.then((res) => { +assert.equal(res.body.lead.revision, rev, +'We return the page with requested revision'); +}); +}); + +it('Mixmatch valid title and valid revision id gives 404', () => { +const title = '%2Fr%2FThe_Donald'; +// belongs to Roald Dahl +const rev = 752758357; +const uri = `${server.config.uri}${enWikiHost}/page/mobile-sections/${title}/${rev}`; +return preq.get({ uri }) +.catch((res) => { +assert.equal(res.status, 404); +}); +}); + +it('Bad revision id gives bad request', () => { +const title = '%2Fr%2FThe_Donald'; +// belongs to Roald Dahl +const rev = 'Reddit'; +const uri = `${server.config.uri}${enWikiHost}/page/mobile-sections/${title}/${rev}`; +return preq.get({ uri }) +.catch((res) => { +assert.equal(res.status, 400, 'Should be integer'); +}); +}); + +it('Check content of revision', () => { +const title = 'Leonard_Cohen'; +// revision before his death. +const rev = 747517267; +const uri = `${server.config.uri}${enWikiHost}/page/mobile-sections/${title}/${rev}`; +return preq.get({ uri }) +.then((res) => { +let hasDeathSection = false; +res.body.remaining.sections.forEach((section) => { +if (section.line === 'Death') { +hasDeathSection = true; +} +}); +assert.ok(!hasDeathSection, +'Leonard Cohen did not use to be dead. RIP dear man...'); +}); +}); + +it('Check content of fresh revision', () => { +const title = 'Leonard_Cohen'; +const uri = `${server.config.uri}${enWikiHost}/page/mobile-sections/${title}`; +return preq.get({ uri }) +.then((res) => { +let hasDeathSection = false; +res.body.remaining.sections.forEach((section) => { +if (section.line === 'Death') { +hasDeathSection = true; +} +}); +assert.ok(hasDeathSection, +'... but he is now which makes me sad.'); +}); +}); + it('should respond to GET request with expected headers, incl. CORS and CSP headers', () => { const uri = `${server.config.uri}en.wikipedia.org/v1/page/mobile-sections/Foobar`;
[MediaWiki-commits] [Gerrit] mediawiki...WikimediaEvents[master]: geoFeatures: Remove dead code and minor optimisations
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/328454 ) Change subject: geoFeatures: Remove dead code and minor optimisations .. geoFeatures: Remove dead code and minor optimisations The following happens on all page loads (all projects, namespaces, page actions). * Trying to remove old "GeoFeaturesUser" cookies. (since 2e947dce31) * Find anchor link to "tools.wmflabs.org/geohack/geohack.php". * Try to attach a "click" handler to $geoHackLinks. * 5 attempts to trackButton for ".osm-icon-coordinates". * Trying to find "#mapwrap #mapdiv". Changes: * Remove "GeoFeaturesUser" code (2e947dce31 landed in March 2016). * Simplify $geoHackLinks selector. * Don't create $geoHackLinks event handler on pages without the link. * Don't run $geoHackLinks.on() on pages without the link. * Replace trackButton() use of setTimeout with requestIdleCallback, this way the "waiting for element X" will not, itself, be blocking elements from appearing. Timeout parameter of 1s is kept for now. Change-Id: I12f0b1794ed6ba12fcb8bab66f7994b09c24e403 --- M modules/ext.wikimediaEvents.geoFeatures.js 1 file changed, 47 insertions(+), 47 deletions(-) Approvals: MaxSem: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ext.wikimediaEvents.geoFeatures.js b/modules/ext.wikimediaEvents.geoFeatures.js index 7ef11e3..35d201a 100644 --- a/modules/ext.wikimediaEvents.geoFeatures.js +++ b/modules/ext.wikimediaEvents.geoFeatures.js @@ -131,66 +131,66 @@ return; } // Give the tool some time to load, can't hook to it cleanly because it's not in a RL module - setTimeout( function () { - var $button = $( selector ); + setTimeout( + function () { + mw.requestIdleCallback( function () { + var $button = $( selector ); - if ( $button.length ) { - $button.on( 'click', callback ); - } else { - trackButton( selector, callback, attemptsLeft - 1 ); - } + if ( $button.length ) { + $button.on( 'click', callback ); + } else { + trackButton( selector, callback, attemptsLeft - 1 ); + } + }, 1000 ); }, 1000 ); } mw.requestIdleCallback( function () { - // Nuke old cookies - mw.cookie.set( 'GeoFeaturesUser', null ); - // Track GeoHack usage - $geoHackLinks = $( 'a[href^=\'//tools.wmflabs.org/geohack/geohack.php\']' ); - $geoHackLinks.on( 'click', function ( event ) { - var $this = $( this ), - isTitle = isTitleCoordinate( $this ); + $geoHackLinks = $( 'a[href^="//tools.wmflabs.org/geohack/geohack.php"]' ); - // Don't override all the weird input combinations because this may, for example, - // result in link being opened in the same tab instead of another - if ( event.buttons === undefined - || event.buttons > 1 - || event.button - || event.altKey - || event.ctrlKey - || event.metaKey - || event.shiftKey - ) { - doTrack( 'GeoHack', 'open', isTitle ); - } else { - // Ordinary click, override to ensure it's logged - doTrack( 'GeoHack', 'open', isTitle, $this.attr( 'href' ) ); - event.preventDefault(); - } - } ); - - // Track WikiMiniAtlas usage if ( $geoHackLinks.length ) { + $geoHackLinks.on( 'click', function ( event ) { + var $this = $( this ), + isTitle = isTitleCoordinate( $this ); + + // Don't override all the weird input combinations because this may, for example, + // result in link being opened in the same tab instead of another + if ( event.buttons === undefined + || event.buttons > 1 +
[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Site.search: Search all namespaces when none is given
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/306082 ) Change subject: Site.search: Search all namespaces when none is given .. Site.search: Search all namespaces when none is given This behavior matches what had been previously described in the docstring. Also remove the warning which was falsely triggered when the namespaces was 0. Amend the related test accordingly. Change-Id: I49df0a1441ec976a474a3d05448b4d09ea932a60 --- M pywikibot/site.py M tests/site_tests.py 2 files changed, 2 insertions(+), 5 deletions(-) Approvals: Lokal Profil: Looks good to me, approved jenkins-bot: Verified diff --git a/pywikibot/site.py b/pywikibot/site.py index 31cbebd..c317f8c 100644 --- a/pywikibot/site.py +++ b/pywikibot/site.py @@ -4498,11 +4498,8 @@ where = 'titles' else: where = 'title' -if namespaces == []: +if not namespaces and namespaces != 0: namespaces = [ns_id for ns_id in self.namespaces if ns_id >= 0] -if not namespaces: -pywikibot.warning(u"search: namespaces cannot be empty; using [0].") -namespaces = [0] srgen = self._generator(api.PageGenerator, type_arg="search", gsrsearch=searchstring, gsrwhat=where, namespaces=namespaces, diff --git a/tests/site_tests.py b/tests/site_tests.py index 82f1c0b..d95e41f 100644 --- a/tests/site_tests.py +++ b/tests/site_tests.py @@ -1377,7 +1377,7 @@ """Test the site.search() method.""" mysite = self.site try: -se = list(mysite.search("wiki", total=100)) +se = list(mysite.search("wiki", total=100, namespaces=0)) self.assertLessEqual(len(se), 100) self.assertTrue(all(isinstance(hit, pywikibot.Page) for hit in se)) -- To view, visit https://gerrit.wikimedia.org/r/306082 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I49df0a1441ec976a474a3d05448b4d09ea932a60 Gerrit-PatchSet: 5 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: DalbaGerrit-Reviewer: Dalba Gerrit-Reviewer: John Vandenberg Gerrit-Reviewer: Lokal Profil Gerrit-Reviewer: Merlijn van Deen Gerrit-Reviewer: Xqt Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Give a chance to break on | in element attribute name in tem...
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/328614 ) Change subject: Give a chance to break on | in element attribute name in template .. Give a chance to break on | in element attribute name in template * This is similar to cf9fb74f where it doesn't affect the rendering since we send the whole src to the mw api. * The new wt2wt failure is because we need a html/parsoid section to add the autoInsertedEnd for the bold. Not adding that here because the output is wrong. A simplified example of what's going on is {{{test|hi=ho}}}. The php parser will output hi=ho, but Parsoid tokenizes the argument as KV(hi, ho) and only outputs the value, ho. Will be fixed in a follow up. Change-Id: I84752b22463f31c9a1f484d1c9977734a6ccbb99 --- M lib/wt2html/pegTokenizer.pegjs M tests/parserTests-blacklist.js M tests/parserTests.txt 3 files changed, 21 insertions(+), 3 deletions(-) Approvals: Subramanya Sastry: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/wt2html/pegTokenizer.pegjs b/lib/wt2html/pegTokenizer.pegjs index 7867874..5e5996b 100644 --- a/lib/wt2html/pegTokenizer.pegjs +++ b/lib/wt2html/pegTokenizer.pegjs @@ -1353,7 +1353,7 @@ // by html5 and what's necessary to give directive a chance. // See: http://www.w3.org/TR/html5/syntax.html#attributes-0 generic_attribute_name - = r:( $[^ \t\r\n\0/=>"'<&{}\-]+ + = r:( $[^ \t\r\n\0/=>"'<&{}\-!|]+ / !inline_breaks // \0/=>"' is the html5 attribute name set we do not want. t:( directive / !( space_or_newline / [\0/=>"'] ) c:. { return c; } @@ -1368,7 +1368,7 @@ // Same as generic_attribute_name, except for accepting tags and wikilinks. // (That doesn't make sense (ie. match php) in the generic case.) -// We also give a chance to break on !, |, and \[ (see T2553). +// We also give a chance to break on \[ (see T2553). table_attribute_name = r:( $[^ \t\r\n\0/=>"'<&{}\-!|\[]+ / !inline_breaks diff --git a/tests/parserTests-blacklist.js b/tests/parserTests-blacklist.js index 156f33b..1b0ef60 100644 --- a/tests/parserTests-blacklist.js +++ b/tests/parserTests-blacklist.js @@ -166,7 +166,7 @@ add("wt2html", "Self closed html pairs (bug 5487)", "Centered text\nIn div text"); add("wt2html", "Fuzz testing: Parser14", " onmouseover= \nhttp://__TOC__\; data-parsoid='{\"stx\":\"url\",\"dsr\":[19,33,0,0]}'>http://__TOC__"); add("wt2html", "Fuzz testing: Parser24", "{{{|\n\nMOVE YOUR MOUSE CURSOR OVER THIS TEXT\n\n\n\n"); -add("wt2html", "Fuzz testing: Parser25 (bug 6055)", "\nblah\" onmouseover=\"alert('hello world');\" align=\"left\"MOVE MOUSE CURSOR OVER HERE"); +add("wt2html", "Fuzz testing: Parser25 (bug 6055)", "blah\" onmouseover=\"alert('hello world');\" align=\"left\"MOVE MOUSE CURSOR OVER HERE"); add("wt2html", "Inline HTML vs wiki block nesting", "Bold paragraph\n\nNew wiki paragraph"); add("wt2html", "Special page transclusion", "Parser function implementation for pf_special missing in Parsoid."); add("wt2html", "Special page transclusion twice (bug 5021)", "Parser function implementation for pf_special missing in Parsoid.\nParser function implementation for pf_special missing in Parsoid."); @@ -344,6 +344,7 @@ add("wt2wt", "Fuzz testing: Parser21", "{|\n! irc://{{ftp://a\; onmouseover=\"alert('hello world');\"\n|\n|}"); add("wt2wt", "Fuzz testing: Parser22", "http://===r:::https://b\n\n{|\n|}"); add("wt2wt", "Fuzz testing: Parser24", "{{{|\n>\n\n\nMOVE YOUR MOUSE CURSOR OVER THIS TEXT\n{|\n\n|\n|}"); +add("wt2wt", "Fuzz testing: Parser25 (bug 6055)", "{{{\n| \n\n}}}blah\" onmouseover=\"alert('hello world');\" align=\"left\"'''MOVE MOUSE CURSOR OVER HERE'''\n"); add("wt2wt", "Inline wiki vs wiki block nesting", "'''Bold paragraph'''\n\nNew wiki paragraph\n"); add("wt2wt", "Mixing markup for italics and bold", "'''bold''bold''bolditalics'\n"); add("wt2wt", "Illegal character references (T106578)", "; Null: \n; FF: \n; CR: \n; Control (low): \n; Control (high): \n; Surrogate: \n; This is an okay astral character: "); @@ -1963,6 +1964,15 @@ add("selser", "Fuzz testing: Parser24 [[2,2],[4],[2,2]]", "hndosskzwiiwl8fr{{{|\nsk3rl6utosgojemi>\n\n\njzny1t7i47mygb9\n{|\n\n||}"); add("selser", "Fuzz testing: Parser24 [[4,3],3,1]", "ajjrvymgwee45cdi\n{| data-foobar=\"q3u36zzq1lg3z0k9\"\n\n||}"); add("selser", "Fuzz testing: Parser24 [1,1,2]", "{{{|\n>\n\n\nMOVE YOUR MOUSE CURSOR OVER THIS TEXT\n\nwo1ljwyi3jlzbyb9\n{|\n{{{|\n >\n\n\nMOVE YOUR MOUSE CURSOR OVER THIS TEXT\n|"); +add("selser", "Fuzz testing: Parser25 (bug 6055) [0,2]", "{{{\n| \n\n}}}zstgbb6nw6nr8uxr\n\nblah\" onmouseover=\"alert('hello world');\" align=\"left\"'''MOVE MOUSE CURSOR OVER HERE"); +add("selser", "Fuzz testing: Parser25 (bug 6055) [0,1]", "{{{\n| \n\n}}}blah\" onmouseover=\"alert('hello world');\" align=\"left\"'''MOVE MOUSE
[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Suppress breaking on table pipe in tags
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/328613 ) Change subject: Suppress breaking on table pipe in tags .. Suppress breaking on table pipe in tags * Just does what the FIXME from 566f4c0f said to do. * The passing test was brought over in 2291f85ed which mentions where this got "broken" in cf9fb74f. I put broken in quotes because that was still the right thing to do, just incomplete. Change-Id: Ia44c2a6e235d78f9f4a825fe6cd2d1dee8e2d9bd --- M lib/wt2html/pegTokenizer.pegjs M tests/parserTests-blacklist.js 2 files changed, 14 insertions(+), 17 deletions(-) Approvals: Subramanya Sastry: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/wt2html/pegTokenizer.pegjs b/lib/wt2html/pegTokenizer.pegjs index 9c3d1ec..7867874 100644 --- a/lib/wt2html/pegTokenizer.pegjs +++ b/lib/wt2html/pegTokenizer.pegjs @@ -1223,10 +1223,9 @@ = & { // By the time we get to `doTableStuff` in the php parser, we've already // safely encoded element attributes. See 55313f4e in core. - // FIXME: Also need to handle the || case here, which probably means - // pushing 'table'. See the failing test, "! and || in element attributes - // should not be parsed as /". - return stops.push('tableCellArg', false); + stops.push('table', false); + stops.push('tableCellArg', false); + return true; } "<" end:"/"? name:$(tn:tag_name & { @@ -1237,6 +1236,7 @@ selfclose:"/"? bad_ws:space* // No need to preserve this -- canonicalize on RT via dirty diff ">" { +stops.pop('table'); stops.pop('tableCellArg'); stops.pop('extTag'); @@ -1264,7 +1264,7 @@ return maybeExtensionTag(res); } / "<" "/"? tag_name & { return stops.pop('extTag'); } -/ & { return stops.pop('tableCellArg'); } +/ & { stops.pop('table'); return stops.pop('tableCellArg'); } /* * A variant of xmlish_tag, but also checks if the tag name is a block-level @@ -1273,7 +1273,13 @@ * following paragraphs. */ block_tag - = & { return stops.push('tableCellArg', false); } + = & { + // By the time we get to `doTableStuff` in the php parser, we've already + // safely encoded element attributes. See 55313f4e in core. + stops.push('table', false); + stops.push('tableCellArg', false); + return true; +} "<" end:"/"? name:$(tn:tag_name & { return isXMLTag(tn, true); // NOTE: 'extTag' stop was pushed. @@ -1282,13 +1288,14 @@ space_or_newline* selfclose:"/"? ">" { + stops.pop('table'); stops.pop('tableCellArg'); stops.pop('extTag'); var t = tu.buildXMLTag(name, name.toLowerCase(), attribs, end, selfclose, tsrOffsets()); return [maybeExtensionTag(t)]; } / "<" "/"? tag_name & { return stops.pop('extTag'); } -/ & { return stops.pop('tableCellArg'); } +/ & { stops.pop('table'); return stops.pop('tableCellArg'); } // A generic attribute that can span multiple lines. generic_newline_attribute diff --git a/tests/parserTests-blacklist.js b/tests/parserTests-blacklist.js index bb03503..156f33b 100644 --- a/tests/parserTests-blacklist.js +++ b/tests/parserTests-blacklist.js @@ -55,7 +55,6 @@ add("wt2html", "Definition Lists: colons and tables 1", "\n x\n\n\n y\n"); add("wt2html", "Bug 2702: Mismatched , and tags are invalid", "http://example.com\; data-parsoid='{\"targetOff\":22,\"contentOffsets\":[22,28],\"dsr\":[2,29,20,1]}'>text\nhttp://example.com\; data-parsoid='{\"targetOff\":50,\"contentOffsets\":[50,57],\"dsr\":[30,58,20,1]}'>text\nSomething http://example.com\; data-parsoid='{\"targetOff\":94,\"contentOffsets\":[94,105],\"dsr\":[74,106,20,1]}'>in italic\nSomething http://example.com\; data-parsoid='{\"targetOff\":139,\"contentOffsets\":[139,160],\"dsr\":[119,161,20,1]}'>mixed, even bold'\nNow http://example.com\; data-parsoid='{\"targetOff\":194,\"contentOffsets\":[194,203],\"dsr\":[174,204,20,1]}'>both"); add("wt2html", "External link containing double-single-quotes in text embedded in italics (bug 4598 sanity check)", "Some http://example.com/\; data-parsoid='{\"targetOff\":28,\"contentOffsets\":[28,56],\"dsr\":[7,57,21,1]}'>pretty italics and stuff!"); -add("wt2html", "! and || in element attributes should not be parsed as /", "\n div style=\"color: red !important;\" data-contrived=\"put this here \">hi\n"); add("wt2html", "Self-link to numeric title", "0"); add("wt2html", " inside a link", "Main Page the main page [it's not very good]"); add("wt2html", "Interlanguage link with spacing", "Blah blah blah\nhttp://zh.wikipedia.org/wiki/%20%20%20%20Chinese%20%20%20%20%20\; data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"http://zh.wikipedia.org/wiki/%20%20%20%20Chinese%20%20%20%20%20\"},\"sa\":{\"href\":\; zh :Chinese \"},\"dsr\":[15,43,null,null]}'/>"); @@
[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: DON'T PUSH: remove a bunch of tests which *ought* to pass fr...
C. Scott Ananian has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/328716 ) Change subject: DON'T PUSH: remove a bunch of tests which *ought* to pass from blacklist. .. DON'T PUSH: remove a bunch of tests which *ought* to pass from blacklist. Remove all the language-converter related tests from blacklist, so I can see more clearly what is still failing. Change-Id: Ibc16988fb1e3230362bbdd36809716df08d91919 --- M tests/parserTests-blacklist.js 1 file changed, 0 insertions(+), 120 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid refs/changes/16/328716/1 diff --git a/tests/parserTests-blacklist.js b/tests/parserTests-blacklist.js index bb03503..e20068c 100644 --- a/tests/parserTests-blacklist.js +++ b/tests/parserTests-blacklist.js @@ -163,7 +163,6 @@ add("wt2html", "CSS line continuation 2", ""); add("wt2html", "Sanitizer: Closing of closed but not open table tags", "Table not started"); add("wt2html", "Sanitizer: Validating that and work, but only for Microdata", "\n\tmeta itemprop=\"hello\" content=\"world\">\n\tmeta http-equiv=\"refresh\" content=\"5\">\n\tmeta itemprop=\"hello\" http-equiv=\"refresh\" content=\"5\">\n\tlink itemprop=\"hello\" href=\"{{SERVER}}\">\n\tlink rel=\"stylesheet\" href=\"{{SERVER}}\">\n\tlink rel=\"stylesheet\" itemprop=\"hello\" href=\"{{SERVER}}\">\n"); -add("wt2html", "Language converter: output gets cut off unexpectedly (bug 5757)", "this bit is safe: }-\n\nbut if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-\n\nthen we get cut off here: }-\n\nall additional text is vanished"); add("wt2html", "Self closed html pairs (bug 5487)", "Centered text\nIn div text"); add("wt2html", "Fuzz testing: Parser14", " onmouseover= \nhttp://__TOC__\; data-parsoid='{\"stx\":\"url\",\"dsr\":[19,33,0,0]}'>http://__TOC__"); add("wt2html", "Fuzz testing: Parser24", "{{{|\n\nMOVE YOUR MOUSE CURSOR OVER THIS TEXT\n\n\n\n"); @@ -192,45 +191,6 @@ add("wt2html", "anchorencode trims spaces", "__pretty__please__"); add("wt2html", "anchorencode deals with links", "world hi"); add("wt2html", "anchorencode encodes like the TOC generator: (bug 18431)", " _ +:.3A%3A]] \n_ +:.3A%3A]]\n"); -add("wt2html", "Self-link in language variants", "Both Dunav and Дунав are names for this river."); -add("wt2html", "Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title", "Дуна is not a self-link while Duna and Dуна are still self-links."); -add("wt2html", "Link to a section of a variant of this title shouldn't be parsed as self-link", "Dуна is a self-link while Dunа#Foo and Dуна#Foo are not self-links."); -add("wt2html", "Link to pages in language variants", "Main Page can be written as Маин Паге"); -add("wt2html", "Multiple links to pages in language variants", "Main Page can be written as Маин Паге same as Маин Паге."); -add("wt2html", "Simple template in language variants", "Warning: Page/template fetching disabled, and no cache for Шаблон:Тест"); -add("wt2html", "Template with explicit namespace in language variants", "Warning: Page/template fetching disabled, and no cache for Шаблон:Тест"); -add("wt2html", "Basic test for template parameter in language variants", "Warning: Page/template fetching disabled, and no cache for Шаблон:Парамтест"); -add("wt2html", "Stripping -{}- tags (language variants)", "Latin proverb: -{Ne nuntium necare}-"); -add("wt2html", "Prevent conversion with -{}- tags (language variants)", "Latinski: -{Ne nuntium necare}-"); -add("wt2html", "Prevent conversion of text with -{}- tags (language variants)", "Latinski: -{Ne nuntium necare}-"); -add("wt2html", "Prevent conversion of links with -{}- tags (language variants)", "-{Main Page}-"); -add("wt2html", "-{}- tags within headlines (within html for parserConvert())", " -{Naslov}- "); -add("wt2html", "Explicit definition of language variant alternatives", "-{zh:China;zh-tw:Taiwan}-, not China"); -add("wt2html", "Conversion around HTML tags", "-{H|span=>sr-ec:script;title=>sr-ec:src;}-\nski"); -add("wt2html", "Explicit session-wise language variant mapping (A flag and - flag)", "Taiwan is not China.\nBut -{A|zh:China;zh-tw:Taiwan}- is China,\n(This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)\nand -{China}- is China."); -add("wt2html", "Explicit session-wise language variant mapping (H flag for hide)", "(This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)\nTaiwan is China."); -add("wt2html", "Adding explicit conversion rule for title (T flag)", "Should be stripped-{T|zh:China;zh-tw:Taiwan}-!"); -add("wt2html", "Testing that changing the language variant here in the tests actually works", "Should be stripped-{T|zh:China;zh-tw:Taiwan}-!"); -add("wt2html", "Recursive conversion of alt and title attrs shouldn't clear converter state", "-{H|zh-cn:Exclamation;zh-tw:exclamation;}-\nShould be
[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Remove dead code
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/328585 ) Change subject: Remove dead code .. Remove dead code I was routinely scanning for unused code and found all this. Change-Id: Ieddd8b781cebc29978d71bd0c1841eef2437fcdc --- M client/WikibaseClient.hooks.php M client/tests/phpunit/includes/DataAccess/PropertyParserFunction/RunnerTest.php M lib/WikibaseLib.php M repo/tests/phpunit/includes/Specials/SpecialNewEntityTest.php M repo/tests/phpunit/includes/Store/Sql/WikiPageEntityMetaDataLookupTest.php 5 files changed, 4 insertions(+), 5 deletions(-) Approvals: Daniel Kinzler: Looks good to me, approved jenkins-bot: Verified diff --git a/client/WikibaseClient.hooks.php b/client/WikibaseClient.hooks.php index 4af375e..1151ce3 100644 --- a/client/WikibaseClient.hooks.php +++ b/client/WikibaseClient.hooks.php @@ -419,7 +419,6 @@ $wikibaseClient->getTermBuffer() ); $idParser = $wikibaseClient->getEntityIdParser(); - $title = $context->getTitle(); $infoActionHookHandler = new InfoActionHookHandler( $namespaceChecker, diff --git a/client/tests/phpunit/includes/DataAccess/PropertyParserFunction/RunnerTest.php b/client/tests/phpunit/includes/DataAccess/PropertyParserFunction/RunnerTest.php index 0ae2d4e..191d2d1 100644 --- a/client/tests/phpunit/includes/DataAccess/PropertyParserFunction/RunnerTest.php +++ b/client/tests/phpunit/includes/DataAccess/PropertyParserFunction/RunnerTest.php @@ -272,7 +272,7 @@ * @return StatementGroupRendererFactory */ private function getStatementGroupRendererFactory( EntityId $entityId, $propertyLabelOrId, $type ) { - $renderer = $this->getRenderer( $entityId, $propertyLabelOrId, $type ); + $renderer = $this->getRenderer( $entityId, $propertyLabelOrId ); $rendererFactory = $this->getMockBuilder( StatementGroupRendererFactory::class ) ->disableOriginalConstructor() diff --git a/lib/WikibaseLib.php b/lib/WikibaseLib.php index 68a6573..b7a474d 100644 --- a/lib/WikibaseLib.php +++ b/lib/WikibaseLib.php @@ -54,7 +54,7 @@ } call_user_func( function() { - global $wgExtensionCredits, $wgJobClasses, $wgHooks, $wgResourceModules, $wgMessagesDirs; + global $wgExtensionCredits, $wgHooks, $wgResourceModules, $wgMessagesDirs; $wgExtensionCredits['wikibase'][] = array( 'path' => __DIR__, diff --git a/repo/tests/phpunit/includes/Specials/SpecialNewEntityTest.php b/repo/tests/phpunit/includes/Specials/SpecialNewEntityTest.php index 50f1014..1b8666e 100644 --- a/repo/tests/phpunit/includes/Specials/SpecialNewEntityTest.php +++ b/repo/tests/phpunit/includes/Specials/SpecialNewEntityTest.php @@ -24,7 +24,7 @@ $request = new FauxRequest( $formData, true ); /** @var \FauxResponse $webResponse */ - list( $output, $webResponse ) = $this->executeSpecialPage( '', $request ); + list( , $webResponse ) = $this->executeSpecialPage( '', $request ); $entityId = $this->extractEntityIdFromUrl( $webResponse->getHeader( 'location' ) ); /* @var $entity EntityDocument */ diff --git a/repo/tests/phpunit/includes/Store/Sql/WikiPageEntityMetaDataLookupTest.php b/repo/tests/phpunit/includes/Store/Sql/WikiPageEntityMetaDataLookupTest.php index 106e566..166e4b2 100644 --- a/repo/tests/phpunit/includes/Store/Sql/WikiPageEntityMetaDataLookupTest.php +++ b/repo/tests/phpunit/includes/Store/Sql/WikiPageEntityMetaDataLookupTest.php @@ -280,7 +280,7 @@ $this->setExpectedException( InvalidArgumentException::class ); - $result = $lookup->loadRevisionInformation( + $lookup->loadRevisionInformation( [ new ItemId( 'foo:Q123' ) ], EntityRevisionLookup::LATEST_FROM_SLAVE ); -- To view, visit https://gerrit.wikimedia.org/r/328585 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ieddd8b781cebc29978d71bd0c1841eef2437fcdc Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Thiemo Mättig (WMDE)Gerrit-Reviewer: Addshore Gerrit-Reviewer: Aleksey Bekh-Ivanov (WMDE) Gerrit-Reviewer: Aude Gerrit-Reviewer: Daniel Kinzler Gerrit-Reviewer: Hoo man Gerrit-Reviewer: Smalyshev Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org
[MediaWiki-commits] [Gerrit] labs...deploy[master]: Bump wheels submodule for SSH public key management
BryanDavis has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/328715 ) Change subject: Bump wheels submodule for SSH public key management .. Bump wheels submodule for SSH public key management * Add wheels for sshpubkeys and dependencies * Update cryptography to latest upstream version Bug: T144711 Depends-On: I7c12008bbbd49e2c31b0acbb28fdcc3fe4906d54 Change-Id: Ib209b1db27e6943f8fd3605cada7f20b6bc07d67 --- M requirements.txt M wheels 2 files changed, 5 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/labs/striker/deploy refs/changes/15/328715/1 diff --git a/requirements.txt b/requirements.txt index fad84bd..3810ca5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,7 +2,7 @@ Django==1.8.14 PyJWT==1.4.2 cffi==1.7.0 -cryptography==1.4 +cryptography==1.5 django-auth-ldap==1.2.8 django-bootstrap3==7.0.1 django-csp==3.0 @@ -12,6 +12,7 @@ django-log-request-id==1.3.1 django-parsley==0.6 django-ratelimit-backend==1.0 +ecdsa==0.13 idna==2.1 mwclient==0.8.2 mwoauth==0.2.8 @@ -19,9 +20,11 @@ oauthlib==1.1.2 pyasn1==0.1.9 pycparser==2.14 +pycrypto==2.6.1 pyldap==2.4.25.1 python-logstash==0.4.6 python-memcached==1.58 requests==2.11.1 requests-oauthlib==0.6.2 six==1.10.0 +sshpubkeys==2.2.0 diff --git a/wheels b/wheels index 3cc4612..afdc35e 16 --- a/wheels +++ b/wheels @@ -1 +1 @@ -Subproject commit 3cc4612724708c26efef76a5ac821db007f9bbca +Subproject commit afdc35edc2d3f07118e7b8d67a941510c68549d3 -- To view, visit https://gerrit.wikimedia.org/r/328715 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib209b1db27e6943f8fd3605cada7f20b6bc07d67 Gerrit-PatchSet: 1 Gerrit-Project: labs/striker/deploy Gerrit-Branch: master Gerrit-Owner: BryanDavis___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: swift: drain thumbor traffic
Filippo Giunchedi has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/328713 ) Change subject: swift: drain thumbor traffic .. swift: drain thumbor traffic Given that Thumbor sometimes suffers from resource exhaustion, pull all traffic until debugging work is resumed. Bug: T151851 Change-Id: I7396fe51ec44d58b8b5297f5f7a13a0d89d964d2 --- M hieradata/common/swift/proxy.yaml 1 file changed, 1 insertion(+), 17 deletions(-) Approvals: jenkins-bot: Verified Filippo Giunchedi: Looks good to me, approved diff --git a/hieradata/common/swift/proxy.yaml b/hieradata/common/swift/proxy.yaml index b606ca3..b8fa43b 100644 --- a/hieradata/common/swift/proxy.yaml +++ b/hieradata/common/swift/proxy.yaml @@ -56,20 +56,4 @@ # no trailing comma! ] -swift::proxy::thumbor_wiki_list: [ - 'wikimedia-commons', - 'wikipedia-en', 'wikipedia-ja', 'wikipedia-de', 'wikipedia-ru', - 'wikipedia-it', 'wikipedia-pt', 'wikipedia-he', 'wikipedia-fr', - 'wikipedia-id', 'wikipedia-zh', 'wikipedia-th', 'wikipedia-uk', - 'wikipedia-ar', 'wikipedia-tr', 'wikipedia-es', - 'wikipedia-fa', 'wikipedia-vi', 'wikipedia-fi', 'wikipedia-hu', - 'wikipedia-ro', 'wikipedia-sr', 'wikipedia-ko', 'wikipedia-ms', - 'wikipedia-arz', 'wikipedia-az', 'wikipedia-el', 'wikipedia-lt', - 'wikipedia-hr', 'wikipedia-lv', 'wikipedia-af', 'wikipedia-bs', - 'wikipedia-te', 'wikipedia-ka', 'wikipedia-ta', 'wikipedia-sq', - 'wikipedia-kk', 'wikibooks-de', 'wikipedia-hi', 'wikipedia-sl', - 'wikibooks-en', 'wikipedia-cy', 'wikipedia-bn', 'wikipedia-ca', - 'wikiversity-en', 'wikipedia-mr', 'wikipedia-gl', 'wikipedia-sh', - 'wikipedia-hy', 'wikisource-ar', 'wikipedia-my' -# no trailing comma! -] +swift::proxy::thumbor_wiki_list: [] -- To view, visit https://gerrit.wikimedia.org/r/328713 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7396fe51ec44d58b8b5297f5f7a13a0d89d964d2 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Filippo GiunchediGerrit-Reviewer: Filippo Giunchedi Gerrit-Reviewer: Gilles Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: Provide id-filtering to runSearch.php
EBernhardson has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/328714 ) Change subject: Provide id-filtering to runSearch.php .. Provide id-filtering to runSearch.php Adds support for 'extended-queries', which provide a json object to runSearch.php rather than a a straight query to run. This initially supports id-filtering, so ltr feature extraction can run against only page id's we have relevance scores for, but could be extended to support a variety of features like search profiles, namespace filters, offset/limit, etc. Change-Id: I1e5299a8394cb9ed8ad8fa227c16ed36fa25522a --- M CirrusSearch.php M autoload.php M docs/settings.txt A includes/Query/IdFilterFeature.php M includes/Searcher.php M maintenance/runSearch.php 6 files changed, 68 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch refs/changes/14/328714/1 diff --git a/CirrusSearch.php b/CirrusSearch.php index 6fe4474..d23e607 100644 --- a/CirrusSearch.php +++ b/CirrusSearch.php @@ -1173,6 +1173,12 @@ 'opening_text' => \CirrusSearch\Search\OpeningTextIndexField::class, ]; +/** + * Hack to allow runSearch.php to set an id filter. Never enable + * for normal use + */ +$wgCirrusSearchIdFilterHack = []; + /* * Please update docs/settings.txt if you add new values! */ diff --git a/autoload.php b/autoload.php index 2b72e9a..68106f9 100644 --- a/autoload.php +++ b/autoload.php @@ -115,6 +115,7 @@ 'CirrusSearch\\Query\\FullTextSimpleMatchQueryBuilder' => __DIR__ . '/includes/Query/FullTextSimpleMatchQueryBuilder.php', 'CirrusSearch\\Query\\GeoFeature' => __DIR__ . '/includes/Query/GeoFeature.php', 'CirrusSearch\\Query\\HasTemplateFeature' => __DIR__ . '/includes/Query/HasTemplateFeature.php', + 'CirrusSearch\\Query\\IdFilterFeature' => __DIR__ . '/includes/Query/IdFilterFeature.php', 'CirrusSearch\\Query\\InCategoryFeature' => __DIR__ . '/includes/Query/InCategoryFeature.php', 'CirrusSearch\\Query\\InTitleFeature' => __DIR__ . '/includes/Query/InTitleFeature.php', 'CirrusSearch\\Query\\KeywordFeature' => __DIR__ . '/includes/Query/KeywordFeature.php', diff --git a/docs/settings.txt b/docs/settings.txt index bfc0160..dad79c1 100644 --- a/docs/settings.txt +++ b/docs/settings.txt @@ -1436,6 +1436,15 @@ Useful to apply CirrusSearch specific config to fields controlled by MediaWiki core. +; $wgCirrusSearchIdFilterHack + +Default: + $wgCirrusSearchIdFilterHack = []; + +Hack to allow runSearch.php to set an id filter. Never enable +for normal use. + + === Deprecated settings === ; $wgCirrusSearchPhraseSuggestMaxErrors diff --git a/includes/Query/IdFilterFeature.php b/includes/Query/IdFilterFeature.php new file mode 100644 index 000..9db10e4 --- /dev/null +++ b/includes/Query/IdFilterFeature.php @@ -0,0 +1,29 @@ +addFilter( $filter ); + } + } +} diff --git a/includes/Searcher.php b/includes/Searcher.php index 7f3c467..5424fb0 100644 --- a/includes/Searcher.php +++ b/includes/Searcher.php @@ -329,6 +329,8 @@ new Query\FileTypeFeature(), // File numeric characteristics - size, resolution, etc. new Query\FileNumericFeature(), + // Evil hax to allow runSearch.php to set id filters + new Query\IdFilterFeature(), ], $builderSettings['settings'] ); diff --git a/maintenance/runSearch.php b/maintenance/runSearch.php index cd7c89d..55fccb4 100644 --- a/maintenance/runSearch.php +++ b/maintenance/runSearch.php @@ -57,6 +57,7 @@ $this->addOption( 'decode', 'urldecode() queries before running them', false, false ); $this->addOption( 'explain', 'Include lucene explanation in the results', false, false ); $this->addOption( 'limit', 'Set the max number of results returned by query (defaults to 10)', false, true ); + $this->addOption( 'extended-queries', 'When provided queries from stdin are expected to be json formatted objects. The "query" key will be the query, and advanced functionality can be specified with other keys' ); } public function execute() { @@ -167,6 +168,26 @@ RequestContext::getMain()->getRequest()->setVal( 'cirrusExplain', true ); } + if ( $this->getOption( 'extended-queries' ) ) { + $extended = json_decode( $query, true ); + if ( json_last_error() !== JSON_ERROR_NONE ) { + // ??? + return Status::newFatal( 'bad query' ); + } + if ( !isset( $extended['query'] ) ) { +
[MediaWiki-commits] [Gerrit] operations/puppet[production]: swift: drain thumbor traffic
Filippo Giunchedi has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/328713 ) Change subject: swift: drain thumbor traffic .. swift: drain thumbor traffic Given that Thumbor sometimes suffers from resource exhaustion, pull all traffic until debugging work is resumed. Bug: T151851 Change-Id: I7396fe51ec44d58b8b5297f5f7a13a0d89d964d2 --- M hieradata/common/swift/proxy.yaml 1 file changed, 1 insertion(+), 17 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/13/328713/1 diff --git a/hieradata/common/swift/proxy.yaml b/hieradata/common/swift/proxy.yaml index b606ca3..b8fa43b 100644 --- a/hieradata/common/swift/proxy.yaml +++ b/hieradata/common/swift/proxy.yaml @@ -56,20 +56,4 @@ # no trailing comma! ] -swift::proxy::thumbor_wiki_list: [ - 'wikimedia-commons', - 'wikipedia-en', 'wikipedia-ja', 'wikipedia-de', 'wikipedia-ru', - 'wikipedia-it', 'wikipedia-pt', 'wikipedia-he', 'wikipedia-fr', - 'wikipedia-id', 'wikipedia-zh', 'wikipedia-th', 'wikipedia-uk', - 'wikipedia-ar', 'wikipedia-tr', 'wikipedia-es', - 'wikipedia-fa', 'wikipedia-vi', 'wikipedia-fi', 'wikipedia-hu', - 'wikipedia-ro', 'wikipedia-sr', 'wikipedia-ko', 'wikipedia-ms', - 'wikipedia-arz', 'wikipedia-az', 'wikipedia-el', 'wikipedia-lt', - 'wikipedia-hr', 'wikipedia-lv', 'wikipedia-af', 'wikipedia-bs', - 'wikipedia-te', 'wikipedia-ka', 'wikipedia-ta', 'wikipedia-sq', - 'wikipedia-kk', 'wikibooks-de', 'wikipedia-hi', 'wikipedia-sl', - 'wikibooks-en', 'wikipedia-cy', 'wikipedia-bn', 'wikipedia-ca', - 'wikiversity-en', 'wikipedia-mr', 'wikipedia-gl', 'wikipedia-sh', - 'wikipedia-hy', 'wikisource-ar', 'wikipedia-my' -# no trailing comma! -] +swift::proxy::thumbor_wiki_list: [] -- To view, visit https://gerrit.wikimedia.org/r/328713 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7396fe51ec44d58b8b5297f5f7a13a0d89d964d2 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Filippo Giunchedi___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...WikibaseLexeme[master]: Change a duplicate message key wikibase-newentity-language
Amire80 has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/328712 ) Change subject: Change a duplicate message key wikibase-newentity-language .. Change a duplicate message key wikibase-newentity-language This key was the same as a key in Wikibase, and this caused issues in translatewiki. Eventually all messages should have a wikibase-lexeme- prefixm but this one is the most urgent. Bug: Change-Id: I03507f87786cbad3ac21ea6d537fac6a0d0fce2b --- M i18n/en.json M i18n/qqq.json M src/Specials/SpecialNewLexeme.php 3 files changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikibaseLexeme refs/changes/12/328712/1 diff --git a/i18n/en.json b/i18n/en.json index c425590..a30793f 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -9,6 +9,6 @@ "wikibase-lemma-edit-placeholder": "Enter the lemma", "wikibase-newentity-lexicalcategory": "Lexical category", "wikibase-lexicalcategory-edit-placeholder": "Enter the lexical category item ID e.g. Q10", - "wikibase-newentity-language": "Language of lexeme", + "wikibase-lexeme-newentity-language": "Language of lexeme", "wikibase-language-edit-placeholder": "Enter the language item ID e.g. Q20" } diff --git a/i18n/qqq.json b/i18n/qqq.json index 6f41ac1..714e2e5 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -11,6 +11,6 @@ "wikibase-lemma-edit-placeholder": "Placeholder content for lemma", "wikibase-newentity-lexicalcategory": "Name for \"lexical category\"", "wikibase-lexicalcategory-edit-placeholder": "Placeholder content for lexical category", - "wikibase-newentity-language": "Name for \"language\"", + "wikibase-lexeme-newentity-language": "Name for \"language\"", "wikibase-language-edit-placeholder": "Placeholder content for language" } diff --git a/src/Specials/SpecialNewLexeme.php b/src/Specials/SpecialNewLexeme.php index 0142108..a3f14d1 100644 --- a/src/Specials/SpecialNewLexeme.php +++ b/src/Specials/SpecialNewLexeme.php @@ -270,7 +270,7 @@ 'default' => $langCode, 'type' => 'combobox', 'id' => 'wb-newentity-language', - 'label-message' => 'wikibase-newentity-language' + 'label-message' => 'wikibase-lexeme-newentity-language' ], 'lemma' => [ 'name' => 'lemma', @@ -306,7 +306,7 @@ 'placeholder' => $this->msg( 'wikibase-language-edit-placeholder' )->text(), - 'label-message' => 'wikibase-newentity-language' + 'label-message' => 'wikibase-lexeme-newentity-language' ] ]; } -- To view, visit https://gerrit.wikimedia.org/r/328712 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I03507f87786cbad3ac21ea6d537fac6a0d0fce2b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikibaseLexeme Gerrit-Branch: master Gerrit-Owner: Amire80___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Suppress breaking on tableCellArg in block tags too
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/328612 ) Change subject: Suppress breaking on tableCellArg in block tags too .. Suppress breaking on tableCellArg in block tags too * The same comment as for xmlish_tag applies. * Should have been part of 566f4c0f but it's only in adeb4e47 and c1a5cfd1 that block_tag and xmlish_tag are converging. Change-Id: I7ad6435206841844505a7751101ad1e8b99a87b3 --- M lib/wt2html/pegTokenizer.pegjs 1 file changed, 4 insertions(+), 1 deletion(-) Approvals: Subramanya Sastry: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/wt2html/pegTokenizer.pegjs b/lib/wt2html/pegTokenizer.pegjs index 624bc17..9c3d1ec 100644 --- a/lib/wt2html/pegTokenizer.pegjs +++ b/lib/wt2html/pegTokenizer.pegjs @@ -1273,7 +1273,8 @@ * following paragraphs. */ block_tag - = "<" end:"/"? + = & { return stops.push('tableCellArg', false); } +"<" end:"/"? name:$(tn:tag_name & { return isXMLTag(tn, true); // NOTE: 'extTag' stop was pushed. }) @@ -1281,11 +1282,13 @@ space_or_newline* selfclose:"/"? ">" { + stops.pop('tableCellArg'); stops.pop('extTag'); var t = tu.buildXMLTag(name, name.toLowerCase(), attribs, end, selfclose, tsrOffsets()); return [maybeExtensionTag(t)]; } / "<" "/"? tag_name & { return stops.pop('extTag'); } +/ & { return stops.pop('tableCellArg'); } // A generic attribute that can span multiple lines. generic_newline_attribute -- To view, visit https://gerrit.wikimedia.org/r/328612 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7ad6435206841844505a7751101ad1e8b99a87b3 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/services/parsoid Gerrit-Branch: master Gerrit-Owner: ArlolraGerrit-Reviewer: Arlolra Gerrit-Reviewer: C. Scott Ananian Gerrit-Reviewer: Subramanya Sastry 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] labs...wheels[master]: Add wheels for sshpubkeys; upgrade cryptography
BryanDavis has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/328711 ) Change subject: Add wheels for sshpubkeys; upgrade cryptography .. Add wheels for sshpubkeys; upgrade cryptography Bug: T144711 Depends-On: Ia6d0b559636df0ce9a566a884d793ea8fb7f9b21 Change-Id: I7c12008bbbd49e2c31b0acbb28fdcc3fe4906d54 --- A cryptography-1.5-cp34-cp34m-linux_x86_64.whl A ecdsa-0.13-py2.py3-none-any.whl A pycrypto-2.6.1-cp34-cp34m-linux_x86_64.whl A setuptools-32.2.0-py2.py3-none-any.whl A sshpubkeys-2.2.0-py2.py3-none-any.whl 5 files changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/labs/striker/wheels refs/changes/11/328711/1 diff --git a/cryptography-1.5-cp34-cp34m-linux_x86_64.whl b/cryptography-1.5-cp34-cp34m-linux_x86_64.whl new file mode 100644 index 000..c0788cb --- /dev/null +++ b/cryptography-1.5-cp34-cp34m-linux_x86_64.whl Binary files differ diff --git a/ecdsa-0.13-py2.py3-none-any.whl b/ecdsa-0.13-py2.py3-none-any.whl new file mode 100644 index 000..3c71207 --- /dev/null +++ b/ecdsa-0.13-py2.py3-none-any.whl Binary files differ diff --git a/pycrypto-2.6.1-cp34-cp34m-linux_x86_64.whl b/pycrypto-2.6.1-cp34-cp34m-linux_x86_64.whl new file mode 100644 index 000..9a3348f --- /dev/null +++ b/pycrypto-2.6.1-cp34-cp34m-linux_x86_64.whl Binary files differ diff --git a/setuptools-32.2.0-py2.py3-none-any.whl b/setuptools-32.2.0-py2.py3-none-any.whl new file mode 100644 index 000..e33f8b5 --- /dev/null +++ b/setuptools-32.2.0-py2.py3-none-any.whl Binary files differ diff --git a/sshpubkeys-2.2.0-py2.py3-none-any.whl b/sshpubkeys-2.2.0-py2.py3-none-any.whl new file mode 100644 index 000..7906a41 --- /dev/null +++ b/sshpubkeys-2.2.0-py2.py3-none-any.whl Binary files differ -- To view, visit https://gerrit.wikimedia.org/r/328711 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7c12008bbbd49e2c31b0acbb28fdcc3fe4906d54 Gerrit-PatchSet: 1 Gerrit-Project: labs/striker/wheels Gerrit-Branch: master Gerrit-Owner: BryanDavis___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...OAuth[master]: When authorizing, differentiate mwoauth-authonlyprivate from...
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/328680 ) Change subject: When authorizing, differentiate mwoauth-authonlyprivate from mwoauth-authonly or basic .. When authorizing, differentiate mwoauth-authonlyprivate from mwoauth-authonly or basic People have expressed concern that the authorization message is the same when giving access to your email address and when not doing so. Change-Id: Idf4618977f172dfa538ef7a4a6ef15e808f2c593 --- M frontend/specialpages/SpecialMWOAuth.php M i18n/en.json M i18n/qqq.json 3 files changed, 15 insertions(+), 5 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/frontend/specialpages/SpecialMWOAuth.php b/frontend/specialpages/SpecialMWOAuth.php index 0842190..f4cd634 100644 --- a/frontend/specialpages/SpecialMWOAuth.php +++ b/frontend/specialpages/SpecialMWOAuth.php @@ -383,6 +383,8 @@ // * mwoauth-form-description-onewiki // * mwoauth-form-description-allwikis-nogrants // * mwoauth-form-description-onewiki-nogrants + // * mwoauth-form-description-allwikis-privateinfo + // * mwoauth-form-description-onewiki-privateinfo $msgKey = 'mwoauth-form-description'; $params = [ $this->getUser()->getName(), @@ -397,7 +399,11 @@ } $grantsText = \MWGrants::getGrantsWikiText( $cmr->get( 'grants' ), $this->getLanguage() ); if ( $grantsText === "\n" ) { - $msgKey .= '-nogrants'; + if ( in_array( 'mwoauth-authonlyprivate', $cmr->get( 'grants' ), true ) ) { + $msgKey .= '-privateinfo'; + } else { + $msgKey .= '-nogrants'; + } } else { $params[] = $grantsText; } diff --git a/i18n/en.json b/i18n/en.json index 23a95d7..7adcf5e 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -220,6 +220,8 @@ "mwoauth-form-description-onewiki": "Hi $1,\n\nIn order to complete your request, '''$2''' needs permission to perform the following actions on your behalf on ''$4'':\n\n$5", "mwoauth-form-description-allwikis-nogrants": "Hi $1,\n\nIn order to complete your request, '''$2''' needs permission to access information on all projects of this site on your behalf. No changes will be made with your account.", "mwoauth-form-description-onewiki-nogrants": "Hi $1,\n\nIn order to complete your request, '''$2''' needs permission to access information on ''$4'' on your behalf. No changes will be made with your account.", + "mwoauth-form-description-allwikis-privateinfo": "Hi $1,\n\nIn order to complete your request, '''$2''' needs permission to access information about you, including your real name and email address, on all projects of this site. No changes will be made with your account.", + "mwoauth-form-description-onewiki-privateinfo": "Hi $1,\n\nIn order to complete your request, '''$2''' needs permission to access information, including your real name and email address, on ''$4''. No changes will be made with your account.", "mwoauth-form-legal": "", "mwoauth-form-button-approve": "Allow", "mwoauth-form-button-cancel": "Cancel", diff --git a/i18n/qqq.json b/i18n/qqq.json index 9276133..2391c7d 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -225,10 +225,12 @@ "mwoauth-invalid-authorization-wrong-user": "Text of the error page when the Authorization header is for the wrong user", "mwoauth-invalid-authorization-not-approved": "Text of the error page when the Authorization header is for a consumer that isn't approved.\n\nParameters:\n* $1 - ...", "mwoauth-invalid-authorization-blocked-user": "Text of the error page when Authorization header is for a user who is blocked", - "mwoauth-form-description-allwikis": "Description of a form requesting the user authorize an OAuth consumer to use MediaWiki on their behalf.\n\nParameters:\n* $1 - the username\n* $2 - application name\n* $3 - application publisher\n* $4 - formatted list of grants\nSee also:\n* {{msg-mw|Mwoauth-form-description-onewiki}}\n* {{msg-mw|Mwoauth-form-description-allwikis-nogrants}}\n* {{msg-mw|Mwoauth-form-description-onewiki-nogrants}}", - "mwoauth-form-description-onewiki": "Description of a form requesting the user authorize an OAuth consumer to use MediaWiki on their behalf, without any non-hidden grants.\n\nParameters:\n* $1 - the username\n* $2 - application name\n* $3 - application publisher\n* $4 - wiki project name\nSee also:\n* {{msg-mw|Mwoauth-form-description-allwikis}}\n* {{msg-mw|Mwoauth-form-description-onewiki}}\n*