[MediaWiki-commits] [Gerrit] Improve appearence of task toolbar on low width screens. - change (mediawiki...GettingStarted)
Mattflaschen has uploaded a new change for review. https://gerrit.wikimedia.org/r/69282 Change subject: Improve appearence of task toolbar on low width screens. .. Improve appearence of task toolbar on low width screens. Bug: 48562 Change-Id: I44a472e97e99f4107a964f64422e7892533d194b --- M GettingStarted.php M resources/ext.gettingstarted.taskToolbar.css M resources/ext.gettingstarted.taskToolbar.js A resources/ext.gettingstarted.taskToolbar.lowWidth.css 4 files changed, 42 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GettingStarted refs/changes/82/69282/1 diff --git a/GettingStarted.php b/GettingStarted.php index 3bdeb61..bbb158a 100644 --- a/GettingStarted.php +++ b/GettingStarted.php @@ -173,10 +173,16 @@ 'styles' = 'ext.gettingstarted.css', ) + $gettingStartedModuleInfo; -// Added if they are in the test group and this page is one of their GettingStarted tasks +// Added if this page is one of their GettingStarted tasks $wgResourceModules[ 'ext.gettingstarted.taskToolbar' ] = array( 'scripts' = 'ext.gettingstarted.taskToolbar.js', - 'styles' = 'ext.gettingstarted.taskToolbar.css', + 'styles' = array( + 'ext.gettingstarted.taskToolbar.css' = array( 'media' = 'screen' ), + 'ext.gettingstarted.taskToolbar.lowWidth.css' = array( 'media' = 'screen and (max-width: 1005px)' ), + + // Requires fix for https://bugzilla.wikimedia.org/show_bug.cgi?id=49722 to work. + 'ext.gettingstarted.taskToolbar.print.css' = array( 'media' = 'print' ), + ), 'dependencies' = array( 'mediawiki.action.view.postEdit', 'mediawiki.jqueryMsg', diff --git a/resources/ext.gettingstarted.taskToolbar.css b/resources/ext.gettingstarted.taskToolbar.css index d6117e7..2deb569 100644 --- a/resources/ext.gettingstarted.taskToolbar.css +++ b/resources/ext.gettingstarted.taskToolbar.css @@ -2,12 +2,12 @@ below the onboarding toolbar. TODO (mattflaschen, 2013-04-18): This can probably be done in a better way. */ -.mw-gettingstarted-relative-40 { +.mw-gettingstarted-relative-vshift { position: relative; top: 40px; } -.mw-gettingstarted-margin-40 { +.mw-gettingstarted-margin-vshift { margin-top: 40px; } diff --git a/resources/ext.gettingstarted.taskToolbar.js b/resources/ext.gettingstarted.taskToolbar.js index bfd3c19..3adcc02 100644 --- a/resources/ext.gettingstarted.taskToolbar.js +++ b/resources/ext.gettingstarted.taskToolbar.js @@ -1,6 +1,6 @@ ( function ( $, mw ) { $( document ).ready( function () { - var $toolbar, $left, $center, $right, $tryAnother, $close, + var $toolbar, $left, $center, $centerMessage, $right, $tryAnother, $close, toolbarInfo, $relativeElements, $marginElements, logging, cfg, $returnToList, returnToListUri, tryAnotherUri, $showGuide, fullTask; @@ -43,6 +43,10 @@ $center = $( 'div' ).attr( { 'class': 'mw-gettingstarted-toolbar-center' + } ); + + $centerMessage = $( 'span' ).attr( { + 'class': 'mw-gettingstarted-toolbar-center-message' } ).text( mw.message( toolbarInfo.description ) ); $showGuide = $( 'a' ).attr( { @@ -55,7 +59,7 @@ evt.stopPropagation(); } ); - $center.append( $showGuide ); + $center.append( $centerMessage, $showGuide ); tryAnotherUri = new mw.Uri( @@ -97,8 +101,8 @@ logging.setTask( title.getPrefixedText(), null ); $toolbar.slideUp( 200, function () { - $relativeElements.removeClass( 'mw-gettingstarted-relative-40' ); - $marginElements.removeClass( 'mw-gettingstarted-margin-40' ); + $relativeElements.removeClass( 'mw-gettingstarted-relative-vshift' ); + $marginElements.removeClass( 'mw-gettingstarted-margin-vshift' ); } ); } ); @@ -116,8 +120,8 @@ $marginElements = $( '#mw-head, #mw-panel' ); function showToolbarInternal() { - $relativeElements.addClass( 'mw-gettingstarted-relative-40' ); - $marginElements.addClass( 'mw-gettingstarted-margin-40' ); + $relativeElements.addClass( 'mw-gettingstarted-relative-vshift' ); + $marginElements.addClass( 'mw-gettingstarted-margin-vshift' ); $toolbar.slideDown( 200, function () { mw.libs.guiders.reposition(); diff --git
[MediaWiki-commits] [Gerrit] Fixed link to mobile homepage - change (mediawiki...MobileFrontend)
Yurik has uploaded a new change for review. https://gerrit.wikimedia.org/r/69283 Change subject: Fixed link to mobile homepage .. Fixed link to mobile homepage Change-Id: Ibe2c001cd1f979337c9e7db90273e179f4c84070 --- M MobileFrontend.i18n.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/83/69283/1 diff --git a/MobileFrontend.i18n.php b/MobileFrontend.i18n.php index 891ad70..6fdfe8d 100644 --- a/MobileFrontend.i18n.php +++ b/MobileFrontend.i18n.php @@ -39,7 +39,7 @@ 'mobile-frontend-back-to-top-of-section' = 'Jump back a section', 'mobile-frontend-close-section' = 'Close this section', - 'mobile-frontend-empty-homepage-text' = 'This homepage needs to be configured. [//meta.wikimedia.org/wiki/Mobile_Projects/Mobile_Gateway#Mobile_homepage Instructions on how to get this site mobile enabled]', + 'mobile-frontend-empty-homepage-text' = 'This homepage needs to be configured. [//www.mediawiki.org/wiki/Wikimedia_Mobile_engineering/imported/Mobile_projects/Mobile_Gateway/Mobile_homepage_formatting Instructions on how to get this site mobile enabled]', 'mobile-frontend-regular-site' = 'Desktop view', 'mobile-frontend-wml-continue' = 'Continue...', 'mobile-frontend-wml-back' = 'Back...', -- To view, visit https://gerrit.wikimedia.org/r/69283 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibe2c001cd1f979337c9e7db90273e179f4c84070 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Yurik yu...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Further decouple banners from MobileFrontend. Dependent on c... - change (mediawiki...ZeroRatedMobileAccess)
jenkins-bot has submitted this change and it was merged. Change subject: Further decouple banners from MobileFrontend. Dependent on change 67546. .. Further decouple banners from MobileFrontend. Dependent on change 67546. * Puts banners into template rendering hook instead of article render hook. * Removed superfluous display:none now that only one banner is needed. * Converted 'x' close symbol to an HTML entity for i18n. * Some code reformat fixes from IDE. * Display clickthrough URL in case user accidentally accessed Zero. Change-Id: I1c05d1f97e2d6794b5e16eb20062df7153adbc05 --- M includes/PageRenderingHooks.php 1 file changed, 162 insertions(+), 66 deletions(-) Approvals: Yurik: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/PageRenderingHooks.php b/includes/PageRenderingHooks.php index d7e5346..74fc587 100644 --- a/includes/PageRenderingHooks.php +++ b/includes/PageRenderingHooks.php @@ -25,6 +25,9 @@ * @ingroup Extensions */ class PageRenderingHooks { + + // TODO: Clean up HTML concatenation. Review for any non-escaped user input. + private static $formatMobileUrl = '//%s.m.wikipedia.org/wiki/Main_Page'; private static $formatZeroUrl = '//%s.zero.wikipedia.org/wiki/Main_Page'; private static $originParent = '.wikipedia.org/'; @@ -46,13 +49,39 @@ return true; } - public static function onMinervaPreRender( \BaseTemplate $template ) { - global $wgRequest; + $req = $template-getSkin()-getRequest(); + $out = $template-getSkin()-getOutput(); + + // TODO: alias $template-data where appropriate + $bannersSupported = array_key_exists( 'banners', $template-data ); $config = self::getConfig(); if ( $config === null ) { + if ( self::isZeroSubdomain() $bannersSupported ) { + $unsupported = self::renderUnknownCarrier( $req, $out); + $template-data['banners'] = array( $unsupported ); + $template-set( 'banners', $template-data['banners'] ); + } return true; + } + + $redirectWarningQPS = 'renderZeroRatedRedirect=truereturnto='; + + $warning = self::renderWarning( $config, $req, $out ); + + // TODO: If clearer way to put this, make it clearer + // trump all existing banners when in a banner-rendering context + if ( $bannersSupported ) { + if ( isset( $warning ) ) { + $template-data['banners'] = array( $warning ); + $template-set( 'banners', $template-data['banners'] ); + self::emptyLangLinks( $template ); + } else { + $template-data['banners'] = array( self::renderBanner( $config ) ); + $template-set( 'banners', $template-data['banners'] ); + self::rewriteLangLinks( $template, $config, $redirectWarningQPS, $req ); + } } $skin = new SkinTemplate(); @@ -63,35 +92,13 @@ $privacyText = $skin-footerLink( 'mobile-frontend-privacy-link-text', 'privacypage' ); $termsText = wfMessage( 'mobile-frontend-terms-use-text' )-parse(); - $licenseText = self::addWarning( $wgRequest, $pattern, $licenseText, $redirectWarning ) ; - $privacyText = self::addWarning( $wgRequest, $pattern, $privacyText, $redirectWarning ); - $termsText = self::addWarning( $wgRequest, $pattern, $termsText, $redirectWarning ); + $licenseText = self::addWarning( $req, $pattern, $licenseText, $redirectWarning ); + $privacyText = self::addWarning( $req, $pattern, $privacyText, $redirectWarning ); + $termsText = self::addWarning( $req, $pattern, $termsText, $redirectWarning ); $template-set( 'mobile-license', $licenseText ); $template-set( 'privacy', $privacyText ); $template-set( 'terms-use', $termsText ); - - $redirectWarningQPS = 'renderZeroRatedRedirect=truereturnto='; - - if ( isset( $template-data['language_urls'] ) -0 count( $template-data['language_urls'] ) - ) { - $languageUrls = $template-data['language_urls']; - $freeLangs = $config['whitelistedLangs']; - foreach ( $languageUrls as $lang ) { - if ( preg_match('#^//([-a-zA-Z_]+)\.(zero|m)\.#', $lang['href'], $match ) ) { - $link =
[MediaWiki-commits] [Gerrit] Remove Zero banner cruft - change (mediawiki...MobileFrontend)
Yurik has submitted this change and it was merged. Change subject: Remove Zero banner cruft .. Remove Zero banner cruft Rely on GetMobileNotice hook for it instead Change-Id: Ia7ede9c5b782db6e9b7dbf23952e939cc18a7cc8 --- M includes/MobileFrontend.body.php M includes/skins/SkinMobileBase.php 2 files changed, 1 insertion(+), 38 deletions(-) Approvals: Yurik: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/MobileFrontend.body.php b/includes/MobileFrontend.body.php index b712cac..1286d51 100644 --- a/includes/MobileFrontend.body.php +++ b/includes/MobileFrontend.body.php @@ -2,25 +2,8 @@ class ExtMobileFrontend extends ContextSource { - protected $zeroRatedBanner; - public function __construct( IContextSource $context ) { $this-setContext( $context ); - } - - /** -* FIXME: Move to ZeroRatedMobileAccess extension -* @return string -*/ - public function getZeroRatedBanner() { - $zeroRatedBanner = $this-zeroRatedBanner ? str_replace( 'display:none;', '', $this-zeroRatedBanner ) : ''; - - if ( $zeroRatedBanner ) { - if ( strstr( $zeroRatedBanner, 'id=zero-rated-bannerspan' ) ) { - $zeroRatedBanner = str_replace( 'id=zero-rated-bannerspan', 'id=zero-rated-bannerspan', $zeroRatedBanner ); - } - } - return $zeroRatedBanner; } private function sendHeaders() { @@ -60,21 +43,9 @@ wfProfileIn( __METHOD__ . '-formatter-init' ); $context = MobileContext::singleton(); + $formatter = MobileFormatter::newFromContext( $context, $html ); - $doc = $formatter-getDoc(); wfProfileOut( __METHOD__ . '-formatter-init' ); - - wfProfileIn( __METHOD__ . '-zero' ); - $zeroRatedBannerElement = $doc-getElementById( 'zero-rated-banner' ); - - if ( !$zeroRatedBannerElement ) { - $zeroRatedBannerElement = $doc-getElementById( 'zero-rated-banner-red' ); - } - - if ( $zeroRatedBannerElement ) { - $this-zeroRatedBanner = $doc-saveXML( $zeroRatedBannerElement, LIBXML_NOEMPTYTAG ); - } - wfProfileOut( __METHOD__ . '-zero' ); wfProfileIn( __METHOD__ . '-filter' ); if ( $context-getContentTransformations() ) { diff --git a/includes/skins/SkinMobileBase.php b/includes/skins/SkinMobileBase.php index 658eb28..cd6c0e3 100644 --- a/includes/skins/SkinMobileBase.php +++ b/includes/skins/SkinMobileBase.php @@ -26,12 +26,6 @@ $tpl-set( '_show_menu_headers', $menuHeaders ); $tpl-set( 'searchBox', $search ); - $banners = $tpl-data['banners']; - // FIXME: Move to Zero extension MinervaPreRender hook - if ( isset( $tpl-data['zeroRatedBanner'] ) ) { - $banners[] = $tpl-data['zeroRatedBanner']; - } - $tpl-set( 'banners', $banners ); if ( $inBeta ) { $this-prepareDataBeta( $tpl ); } @@ -199,8 +193,6 @@ $tpl = $this-prepareTemplate(); $tpl-set( 'headelement', $out-headElement( $this ) ); $tpl-set( 'bodytext', $html ); - // FIXME: Move to ZeroRatedMobileAccess extension - $tpl-set( 'zeroRatedBanner', $this-extMobileFrontend-getZeroRatedBanner() ); $notice = ''; wfRunHooks( 'GetMobileNotice', array( $this, $notice ) ); $tpl-set( 'notice', $notice ); -- To view, visit https://gerrit.wikimedia.org/r/67546 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia7ede9c5b782db6e9b7dbf23952e939cc18a7cc8 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: MaxSem maxsem.w...@gmail.com Gerrit-Reviewer: Dr0ptp4kt ab...@wikimedia.org Gerrit-Reviewer: Jdlrobson jrob...@wikimedia.org Gerrit-Reviewer: Yurik yu...@wikimedia.org Gerrit-Reviewer: awjrichards aricha...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add a way to make categories more require-looking - change (mediawiki...UploadWizard)
Nischayn22 has uploaded a new change for review. https://gerrit.wikimedia.org/r/69284 Change subject: Add a way to make categories more require-looking .. Add a way to make categories more require-looking Bug: 49710 Change-Id: I72ed4a357d09d7ba5b1ebf5cb6e19f580f4860ea --- M UploadWizard.i18n.php M UploadWizardHooks.php M resources/mw.UploadWizard.js M resources/mw.UploadWizardDetails.js 4 files changed, 52 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UploadWizard refs/changes/84/69284/1 diff --git a/UploadWizard.i18n.php b/UploadWizard.i18n.php index fbbc76d..1e8cb8c 100644 --- a/UploadWizard.i18n.php +++ b/UploadWizard.i18n.php @@ -246,6 +246,9 @@ 'mwe-upwiz-file-too-large-ok' = 'OK', 'mwe-upwiz-file-too-large-text' = 'You can only upload files with a size of up to $1. You tried to upload a file that is $2.', 'mwe-upwiz-file-too-large' = 'File too large.', + 'mwe-upwiz-necessary-confirm' = 'It is recommended that you fill in a category for your uploads. Do you want to continue without filling all the fields?', + 'mwe-upwiz-dialog-yes' = 'Yes', + 'mwe-upwiz-dialog-no' = 'No', /* LICENSES combinations of licenses */ /* may be a good idea to shift to WikimediaLicenseTexts? */ @@ -759,6 +762,9 @@ * $1 is the maximum file size; * $2 is the size of the file they tried to upload.', 'mwe-upwiz-file-too-large' = 'Error dialog title', + 'mwe-upwiz-necessary-confirm' = 'Confirmation box suggesting that it is recommended to fill in a category for uploads and asking the uploader whether they want to continue without them', + 'mwe-upwiz-dialog-yes' = 'Yes', + 'mwe-upwiz-dialog-no' = 'No', 'mwe-upwiz-license-cc-by-sa-3.0' = '{{CreativeCommonsLicense|by-sa|3.0}} For more information, see https://www.mediawiki.org/wiki/UploadWizard', 'mwe-upwiz-license-cc-by-sa-3.0-at' = '{{CreativeCommonsLicense|by-sa|3.0|at}} diff --git a/UploadWizardHooks.php b/UploadWizardHooks.php index 7dc6fbf..58d55a1 100644 --- a/UploadWizardHooks.php +++ b/UploadWizardHooks.php @@ -450,6 +450,9 @@ 'mwe-upwiz-file-too-large-ok', 'mwe-upwiz-file-too-large-text', 'mwe-upwiz-file-too-large', + 'mwe-upwiz-necessary-confirm', + 'mwe-upwiz-dialog-yes', + 'mwe-upwiz-dialog-no', 'prefs-uploads', 'prefs-upwiz-interface', 'colon-separator', diff --git a/resources/mw.UploadWizard.js b/resources/mw.UploadWizard.js index 1c7a638..a540c1b 100644 --- a/resources/mw.UploadWizard.js +++ b/resources/mw.UploadWizard.js @@ -1038,9 +1038,10 @@ * @return boolean */ detailsValid: function(cb, cberr) { - var _this = this; - var valid = 0; - var total = 0; + var _this = this, + valid = 0, + necessary = 0, + total = 0; $j.each( _this.uploads, function(i, upload) { if ( upload === undefined ) { return; @@ -1049,9 +1050,35 @@ upload.details.valid( function () { valid += 1; }); + upload.details.necessaryFilled( function () { + necessary += 1; + }); }); - if ( valid == total ) { + + // Set up buttons for dialog box. We have to do it the hard way since the json keys are localized + var buttons = {}; + buttons[ mw.msg( 'mwe-upwiz-dialog-yes' ) ] = function() { + $( this ).dialog( close ); cb(); + }; + buttons[ mw.msg( 'mwe-upwiz-dialog-no' ) ] = function() { + $( this ).dialog( close ); + }; + var confirmationDialog = $j( 'div/div' ) + .html( mw.msg( 'mwe-upwiz-necessary-confirm' ) ) + .dialog( { + width: 500, + zIndex: 20, + autoOpen: false, + modal: true, + buttons: buttons + } ); + if ( valid == total ) { + if ( necessary == total ) { + cb(); + } else { + confirmationDialog.dialog( 'open' ); + } } else {
[MediaWiki-commits] [Gerrit] Allow debug params X-CS and X-SUBDOMAIN in URL - change (mediawiki...ZeroRatedMobileAccess)
jenkins-bot has submitted this change and it was merged. Change subject: Allow debug params X-CS and X-SUBDOMAIN in URL .. Allow debug params X-CS and X-SUBDOMAIN in URL * Having X-CS in URL overrides the X-CS header and ignores the 'enabled' parameter of the zero configuration * Having X-SUBDOMAIN in URL overrides header with the same name Change-Id: Ifc869adea24f3b9d27918557ac7fa954e406c7d0 --- M includes/PageRenderingHooks.php 1 file changed, 13 insertions(+), 8 deletions(-) Approvals: MaxSem: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/includes/PageRenderingHooks.php b/includes/PageRenderingHooks.php index d7e5346..1017af7 100644 --- a/includes/PageRenderingHooks.php +++ b/includes/PageRenderingHooks.php @@ -498,7 +498,8 @@ $config = null; // Allow URL override of the X-CS parameter for testing purposes $id = $wgRequest-getVal( 'X-CS' ); - if ( $id === null ) { + $isDebug = $id !== null; + if ( !$isDebug ) { $id = $wgRequest-getHeader( 'X-CS' ); } if ( $id === '(null)' || !$id ) { @@ -511,7 +512,7 @@ $conf = new CarrierConfig( $text ); if ( !$conf-isError() ) { $config = $conf-getData(); - if ( !self::isZeroEnabled( $config ) ) { + if ( !self::isZeroEnabled( $config, $isDebug ) ) { $config = null; } } @@ -525,18 +526,17 @@ * As part of self::getConfig(), determine if zero should be enabled * for this site based on configuration * @param array $config +* @param bool $isDebug If true, overrides 'enabled' config value * @return bool */ - private static function isZeroEnabled( $config ) { - if ( !$config['enabled'] ) { + private static function isZeroEnabled( $config, $isDebug ) { + if ( !$isDebug !$config['enabled'] ) { // If the configuration is disabled, pretend like it doesn't exist return false; } // Check if the wiki is in the allowed list // @FIXME: expand to allow non-wikipedia sites - global $wgRequest; - $subdomain = $wgRequest-getHeader( 'X-SUBDOMAIN' ); - $site = strtolower( $subdomain ) . '.wikipedia'; + $site = self::isZeroSubdomain() ? 'zero.wikipedia' : 'm.wikipedia'; if ( !in_array( $site, $config['sites'] ) ) { return false; } @@ -563,7 +563,12 @@ static $isZero = null; if ( $isZero === null ) { global $wgRequest; - $isZero = $wgRequest-getHeader( 'X-SUBDOMAIN' ) === 'ZERO'; + // Allow URL override for testing purposes + $subdomain = $wgRequest-getVal( 'X-SUBDOMAIN' ); + if ( $subdomain === null ) { + $subdomain = $wgRequest-getHeader( 'X-SUBDOMAIN' ); + } + $isZero = strcasecmp( $subdomain, 'ZERO' ) === 0; } return $isZero; } -- To view, visit https://gerrit.wikimedia.org/r/69280 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifc869adea24f3b9d27918557ac7fa954e406c7d0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ZeroRatedMobileAccess Gerrit-Branch: master Gerrit-Owner: Yurik yu...@wikimedia.org Gerrit-Reviewer: Dr0ptp4kt ab...@wikimedia.org Gerrit-Reviewer: MaxSem maxsem.w...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [WIP]Special page TranslationStash - change (mediawiki...Translate)
Santhosh has uploaded a new change for review. https://gerrit.wikimedia.org/r/69285 Change subject: [WIP]Special page TranslationStash .. [WIP]Special page TranslationStash Change-Id: Ia112b86a07f75c476139f92fde8941559bfb6799 --- M Resources.php M Translate.alias.php M Translate.php M _autoload.php A resources/js/ext.translate.special.translationstash.js A specials/SpecialTranslationStash.php 6 files changed, 172 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/85/69285/1 diff --git a/Resources.php b/Resources.php index 70ee5a7..9075b7b 100644 --- a/Resources.php +++ b/Resources.php @@ -355,6 +355,14 @@ ) ) + $resourcePaths; +$wgResourceModules['ext.translate.special.translationstash'] = array( + 'scripts' = 'resources/js/ext.translate.special.translationstash.js', + 'dependencies' = array( + 'ext.translate.editor', + 'ext.translate.messagetable', + ) +) + $resourcePaths; + $wgResourceModules['ext.translate.special.translationstats'] = array( 'scripts' = 'resources/js/ext.translate.special.translationstats.js', 'dependencies' = array( diff --git a/Translate.alias.php b/Translate.alias.php index bd475c5..d647e43 100644 --- a/Translate.alias.php +++ b/Translate.alias.php @@ -26,6 +26,7 @@ 'AggregateGroups' = array( 'AggregateGroups' ), 'SearchTranslations' = array( 'SearchTranslations' ), 'TranslateSandbox' = array( 'ManageTranslatorSandbox', 'TranslateSandbox' ), + 'TranslationStash' = array( 'TranslationStash' ), ); /** Afrikaans (Afrikaans) */ @@ -1086,4 +1087,4 @@ 'AggregateGroups' = array( '聚合組' ), 'SearchTranslations' = array( '搜尋翻譯' ), 'TranslateSandbox' = array( '管理翻譯者沙盒' ), -); \ No newline at end of file +); diff --git a/Translate.php b/Translate.php index b186e70..887aeca 100644 --- a/Translate.php +++ b/Translate.php @@ -50,6 +50,7 @@ $wgExtensionMessagesFiles['TranslateGroupDescriptions'] = $dir/TranslateGroupDescriptions.i18n.php; $wgExtensionMessagesFiles['TranslateSearch'] = $dir/TranslateSearch.i18n.php; $wgExtensionMessagesFiles['TranslateSandbox'] = $dir/TranslateSandbox.i18n.php; +$wgExtensionMessagesFiles['TranslationStash'] = $dir/TranslationStash.i18n.php; $wgExtensionMessagesFiles['TranslateAlias'] = $dir/Translate.alias.php; $wgExtensionMessagesFiles['TranslateMagic'] = $dir/Translate.magic.php; @@ -90,7 +91,8 @@ $wgSpecialPages['SearchTranslations'] = 'SpecialSearchTranslations'; $wgSpecialPageGroups['SearchTranslations'] = 'wiki'; $wgSpecialPages['TranslateSandbox'] = 'SpecialTranslateSandbox'; - +$wgSpecialPages['TranslationStash'] = 'SpecialTranslationStash'; +$wgSpecialPageGroups['TranslationStash'] = 'wiki'; // API $wgAPIListModules['messagecollection'] = 'ApiQueryMessageCollection'; $wgAPIMetaModules['languagestats'] = 'ApiQueryLanguageStats'; diff --git a/_autoload.php b/_autoload.php index a8c0280..9d0b642 100644 --- a/_autoload.php +++ b/_autoload.php @@ -49,6 +49,7 @@ $wgAutoloadClasses['SpecialTranslateSandbox'] = $dir/specials/SpecialTranslateSandbox.php; $wgAutoloadClasses['SpecialTranslationStats'] = $dir/specials/SpecialTranslationStats.php; $wgAutoloadClasses['SpecialTranslations'] = $dir/specials/SpecialTranslations.php; +$wgAutoloadClasses['SpecialTranslationStash'] = $dir/specials/SpecialTranslationStash.php; /**@}*/ /** diff --git a/resources/js/ext.translate.special.translationstash.js b/resources/js/ext.translate.special.translationstash.js new file mode 100644 index 000..52ddf83 --- /dev/null +++ b/resources/js/ext.translate.special.translationstash.js @@ -0,0 +1,102 @@ +( function ( $, mw ) { + 'use strict'; + function getMessages( messageGroup, language, offset, limit ) { + var api = new mw.Api(); + + return api.get( { + action: 'query', + list: 'messagecollection', + mcgroup: messageGroup, + format: 'json', + mclanguage: language, + mcoffset: offset, + mclimit: limit, + //mcfilter: '!translated', + mcprop: 'definition|translation|tags|properties' + } ); + } + + function addMessage( message ) { + var $messageWrapper, $message, + $messageTable = $( '.tux-messagelist' ), + sourceLanguage = $messageTable .data( 'sourcelangcode' ), + sourceLanguageDir = $.uls.data.getDir( sourceLanguage ), + targetLanguage = $messageTable .data( 'targetlangcode' ), + targetLanguageDir = $.uls.data.getDir( targetLanguage ), + status = message.properties.status, +
[MediaWiki-commits] [Gerrit] ULS to master - change (mediawiki/core)
Nikerabbit has uploaded a new change for review. https://gerrit.wikimedia.org/r/69286 Change subject: ULS to master .. ULS to master Change-Id: I99cfadd0816daa621920df65809b80939d8fc38b --- M extensions/UniversalLanguageSelector 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/86/69286/1 diff --git a/extensions/UniversalLanguageSelector b/extensions/UniversalLanguageSelector index 6a34b61..1b51d0a 16 --- a/extensions/UniversalLanguageSelector +++ b/extensions/UniversalLanguageSelector -Subproject commit 6a34b6159d045ee7bc095b089ef189ba2fba1fda +Subproject commit 1b51d0af80d350ae247d80624ef7fe10de6d0655 -- To view, visit https://gerrit.wikimedia.org/r/69286 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I99cfadd0816daa621920df65809b80939d8fc38b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.22wmf7 Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] ULS to master - change (mediawiki/core)
Nikerabbit has uploaded a new change for review. https://gerrit.wikimedia.org/r/69287 Change subject: ULS to master .. ULS to master Change-Id: I4aa2db4f7c36f46852137bccdd7021060ee13587 --- M extensions/UniversalLanguageSelector 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/87/69287/1 diff --git a/extensions/UniversalLanguageSelector b/extensions/UniversalLanguageSelector index 1fdd946..1b51d0a 16 --- a/extensions/UniversalLanguageSelector +++ b/extensions/UniversalLanguageSelector -Subproject commit 1fdd946460cdd5aedeb37d76a2efcfc7709e522a +Subproject commit 1b51d0af80d350ae247d80624ef7fe10de6d0655 -- To view, visit https://gerrit.wikimedia.org/r/69287 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4aa2db4f7c36f46852137bccdd7021060ee13587 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.22wmf6 Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Actually normalize page titles correctly in MWLinkTargetInpu... - change (mediawiki...VisualEditor)
Catrope has uploaded a new change for review. https://gerrit.wikimedia.org/r/69288 Change subject: Actually normalize page titles correctly in MWLinkTargetInputWidget .. Actually normalize page titles correctly in MWLinkTargetInputWidget matchingPages contains titles with spaces, but .toString() returns titles with underscores, so normalizing with .toString() is incorrect. Use .getPrefixedText() instead. This caused a bug in the link dialog where, if the link was an internal link pointing to an existing page with a space in its name, the New page section would be displayed but would be empty, and the link's target would be displayed in the Existing page section but colored red. Change-Id: I59d8b87b996d80da1b25124b942bd2b72ef50845 --- M modules/ve/ui/widgets/ve.ui.MWLinkTargetInputWidget.js 1 file changed, 9 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/88/69288/1 diff --git a/modules/ve/ui/widgets/ve.ui.MWLinkTargetInputWidget.js b/modules/ve/ui/widgets/ve.ui.MWLinkTargetInputWidget.js index bac929a..7defcae 100644 --- a/modules/ve/ui/widgets/ve.ui.MWLinkTargetInputWidget.js +++ b/modules/ve/ui/widgets/ve.ui.MWLinkTargetInputWidget.js @@ -111,11 +111,15 @@ } // Internal link - if ( !pageExists ( !matchingPages || - // Run value through mw.Title to avoid treating a match as a mismatch where - // normalisation would make them matching (bug 48476) - matchingPages.indexOf( new mw.Title( this.value ).toString() ) === -1 - ) ) { + if ( + !pageExists + ( + !matchingPages || + // Run value through mw.Title to avoid treating a match as a mismatch where + // normalisation would make them matching (bug 48476) + matchingPages.indexOf( new mw.Title( this.value ).getPrefixedText() ) === -1 + ) + ) { items.push( new ve.ui.MenuSectionItemWidget( 'newPage', { '$$': menu$$, 'label': ve.msg( 'visualeditor-linkinspector-suggest-new-page' ) } -- To view, visit https://gerrit.wikimedia.org/r/69288 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I59d8b87b996d80da1b25124b942bd2b72ef50845 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Catrope roan.katt...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] ULS to master - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: ULS to master .. ULS to master Change-Id: I4aa2db4f7c36f46852137bccdd7021060ee13587 --- M extensions/UniversalLanguageSelector 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Nikerabbit: Looks good to me, approved jenkins-bot: Verified diff --git a/extensions/UniversalLanguageSelector b/extensions/UniversalLanguageSelector index 1fdd946..1b51d0a 16 --- a/extensions/UniversalLanguageSelector +++ b/extensions/UniversalLanguageSelector -Subproject commit 1fdd946460cdd5aedeb37d76a2efcfc7709e522a +Subproject commit 1b51d0af80d350ae247d80624ef7fe10de6d0655 -- To view, visit https://gerrit.wikimedia.org/r/69287 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4aa2db4f7c36f46852137bccdd7021060ee13587 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.22wmf6 Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add tools- and etherpad.wmflabs.org to $wgNoFollowDomainExce... - change (operations/mediawiki-config)
Nemo bis has uploaded a new change for review. https://gerrit.wikimedia.org/r/69289 Change subject: Add tools- and etherpad.wmflabs.org to $wgNoFollowDomainExceptions .. Add tools- and etherpad.wmflabs.org to $wgNoFollowDomainExceptions Tool Labs: obvious. Unless dead prematurely, it will get many links. Etherpad: documents outside wikis bad, if unindexed devilish. Change-Id: I502edc133485d5d67100bc2b6ab62827402d176b --- M wmf-config/InitialiseSettings.php 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/89/69289/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index fb9383d..5307e1a 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -6451,6 +6451,8 @@ 'wiktionary.org', 'wikivoyage.org', 'wikidata.org', + 'tools.wmflabs.org', + 'etherpad.wmflabs.org', ), ), # @} -- To view, visit https://gerrit.wikimedia.org/r/69289 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I502edc133485d5d67100bc2b6ab62827402d176b Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Nemo bis federicol...@tiscali.it ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] ULS to master - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: ULS to master .. ULS to master Change-Id: I99cfadd0816daa621920df65809b80939d8fc38b --- M extensions/UniversalLanguageSelector 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Nikerabbit: Looks good to me, approved jenkins-bot: Verified diff --git a/extensions/UniversalLanguageSelector b/extensions/UniversalLanguageSelector index 6a34b61..1b51d0a 16 --- a/extensions/UniversalLanguageSelector +++ b/extensions/UniversalLanguageSelector -Subproject commit 6a34b6159d045ee7bc095b089ef189ba2fba1fda +Subproject commit 1b51d0af80d350ae247d80624ef7fe10de6d0655 -- To view, visit https://gerrit.wikimedia.org/r/69286 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I99cfadd0816daa621920df65809b80939d8fc38b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.22wmf7 Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] add. config vars for path, user, and target. - change (sartoris)
Rfaulk has uploaded a new change for review. https://gerrit.wikimedia.org/r/69290 Change subject: add. config vars for path, user, and target. .. add. config vars for path, user, and target. Change-Id: I44b8b1f787fd14bbfea34652a5a89d84cabb54ed --- M sartoris/sartoris.py 1 file changed, 30 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/sartoris refs/changes/90/69290/1 diff --git a/sartoris/sartoris.py b/sartoris/sartoris.py index 295ab0b..c0859eb 100755 --- a/sartoris/sartoris.py +++ b/sartoris/sartoris.py @@ -52,6 +52,9 @@ 22: 'Missing repo configuration item tag-prefix. ' 'Please configure this using:' '\n\tgit config tag-prefix repo', +23: 'Missing system configuration item path. Exiting.', +24: 'Missing system configuration item user. Exiting.', +25: 'Missing system configuration item target. Exiting.', 30: 'No deploy started. Please run: git deploy start', 31: 'Failed to write tag on sync. Exiting.', 32: 'Failed to write the .deploy file. Exiting.', @@ -189,6 +192,7 @@ self.config['deploy_file'] = self.config['top_dir'] + \ '/.git/.deploy' +# Get config for deploy.hook-dir try: self.config['hook_dir'] = sc.get('deploy', 'hook-dir') except KeyError: @@ -196,12 +200,38 @@ log.error({0}::{1}.format(__name__, exit_codes[exit_code])) sys.exit(exit_code) +# Get config for deploy.hook-dir +try: +self.config['path'] = sc.get('deploy', 'path') +except KeyError: +exit_code = 23 +log.error({0}::{1}.format(__name__, exit_codes[exit_code])) +sys.exit(exit_code) + +# Get config for deploy.hook-dir +try: +self.config['user'] = sc.get('deploy', 'user') +except KeyError: +exit_code = 24 +log.error({0}::{1}.format(__name__, exit_codes[exit_code])) +sys.exit(exit_code) + +# Get config for deploy.hook-dir +try: +self.config['target'] = sc.get('deploy', 'target') +except KeyError: +exit_code = 25 +log.error({0}::{1}.format(__name__, exit_codes[exit_code])) +sys.exit(exit_code) + +# Get config for repo name from deploy.tag-prefix try: self.config['repo_name'] = sc.get('deploy', 'tag-prefix') except KeyError: exit_code = 22 log.error({0}::{1}.format(__name__, exit_codes[exit_code])) sys.exit(exit_code) + self.config['sync_dir'] = '{0}/sync'.format(self.config['hook_dir']) def _check_lock(self): -- To view, visit https://gerrit.wikimedia.org/r/69290 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I44b8b1f787fd14bbfea34652a5a89d84cabb54ed Gerrit-PatchSet: 1 Gerrit-Project: sartoris Gerrit-Branch: master Gerrit-Owner: Rfaulk rfaulk...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] add. config vars for path, user, and target. - change (sartoris)
Rfaulk has submitted this change and it was merged. Change subject: add. config vars for path, user, and target. .. add. config vars for path, user, and target. Change-Id: I44b8b1f787fd14bbfea34652a5a89d84cabb54ed --- M sartoris/sartoris.py 1 file changed, 30 insertions(+), 0 deletions(-) Approvals: Rfaulk: Verified; Looks good to me, approved jenkins-bot: Checked diff --git a/sartoris/sartoris.py b/sartoris/sartoris.py index 295ab0b..c0859eb 100755 --- a/sartoris/sartoris.py +++ b/sartoris/sartoris.py @@ -52,6 +52,9 @@ 22: 'Missing repo configuration item tag-prefix. ' 'Please configure this using:' '\n\tgit config tag-prefix repo', +23: 'Missing system configuration item path. Exiting.', +24: 'Missing system configuration item user. Exiting.', +25: 'Missing system configuration item target. Exiting.', 30: 'No deploy started. Please run: git deploy start', 31: 'Failed to write tag on sync. Exiting.', 32: 'Failed to write the .deploy file. Exiting.', @@ -189,6 +192,7 @@ self.config['deploy_file'] = self.config['top_dir'] + \ '/.git/.deploy' +# Get config for deploy.hook-dir try: self.config['hook_dir'] = sc.get('deploy', 'hook-dir') except KeyError: @@ -196,12 +200,38 @@ log.error({0}::{1}.format(__name__, exit_codes[exit_code])) sys.exit(exit_code) +# Get config for deploy.hook-dir +try: +self.config['path'] = sc.get('deploy', 'path') +except KeyError: +exit_code = 23 +log.error({0}::{1}.format(__name__, exit_codes[exit_code])) +sys.exit(exit_code) + +# Get config for deploy.hook-dir +try: +self.config['user'] = sc.get('deploy', 'user') +except KeyError: +exit_code = 24 +log.error({0}::{1}.format(__name__, exit_codes[exit_code])) +sys.exit(exit_code) + +# Get config for deploy.hook-dir +try: +self.config['target'] = sc.get('deploy', 'target') +except KeyError: +exit_code = 25 +log.error({0}::{1}.format(__name__, exit_codes[exit_code])) +sys.exit(exit_code) + +# Get config for repo name from deploy.tag-prefix try: self.config['repo_name'] = sc.get('deploy', 'tag-prefix') except KeyError: exit_code = 22 log.error({0}::{1}.format(__name__, exit_codes[exit_code])) sys.exit(exit_code) + self.config['sync_dir'] = '{0}/sync'.format(self.config['hook_dir']) def _check_lock(self): -- To view, visit https://gerrit.wikimedia.org/r/69290 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I44b8b1f787fd14bbfea34652a5a89d84cabb54ed Gerrit-PatchSet: 1 Gerrit-Project: sartoris Gerrit-Branch: master Gerrit-Owner: Rfaulk rfaulk...@wikimedia.org Gerrit-Reviewer: Rfaulk rfaulk...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] ULS config for phase 2 - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: ULS config for phase 2 .. ULS config for phase 2 https://www.mediawiki.org/wiki/UniversalLanguageSelector/Deployment/Planning#Phase_2:_Expand_and_learn:_Wikipedia_top_11-20 Change-Id: I922d888a1db53a458d69ee537749dec5541955d5 --- M wmf-config/InitialiseSettings.php 1 file changed, 10 insertions(+), 0 deletions(-) Approvals: Mxn: Looks good to me, but someone else must approve Nikerabbit: Looks good to me, approved Nemo bis: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index fb9383d..fdd96cf 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -12248,11 +12248,15 @@ 'bnwiktionary' = true, 'bpywiki' = true, 'bugwiki' = true, + 'cawiki' = true, + 'cebwiki' = true, 'commonswiki' = true, // bug 48620 'dvwiki' = true, 'dvwiktionary' = true, 'enwikisource' = true, 'enwiktionary' = true, + 'fawiki' = true, + 'fiwiki' = true, 'frwikisource' = true, 'guwiki' = true, 'guwikibooks' = true, @@ -12290,12 +12294,14 @@ 'newiki' = true, 'newikibooks' = true, 'newiktionary' = true, + 'nowiki' = true, 'orwiki' = true, 'orwiktionary' = true, 'outreachwiki' = true, 'pawiki' = true, 'pawikibooks' = true, 'pawiktionary' = true, + 'ptwiki' = true, 'sawiki' = true, 'sawikibooks' = true, 'sawikiquote' = true, @@ -12317,10 +12323,14 @@ 'tewikiquote' = true, 'tewikisource' = true, 'tewiktionary' = true, + 'ukwiki' = true, + 'viwiki' = true, + 'warwiki' = true, 'wikidata' = true, 'wikimania2012wiki' = true, 'wikimania2013wiki' = true, 'wikimania2014wiki' = true, + 'zhwiki' = true, ), 'wmgULSPosition' = array( -- To view, visit https://gerrit.wikimedia.org/r/68146 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I922d888a1db53a458d69ee537749dec5541955d5 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com Gerrit-Reviewer: Helder.wiki helder.w...@gmail.com Gerrit-Reviewer: Liangent liang...@gmail.com Gerrit-Reviewer: Mardetanha mardetanha.w...@gmail.com Gerrit-Reviewer: Mxn m...@1ec5.org Gerrit-Reviewer: Nemo bis federicol...@tiscali.it Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com Gerrit-Reviewer: Platonides platoni...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Actually normalize page titles correctly in MWLinkTargetInpu... - change (mediawiki...VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: Actually normalize page titles correctly in MWLinkTargetInputWidget .. Actually normalize page titles correctly in MWLinkTargetInputWidget matchingPages contains titles with spaces, but .toString() returns titles with underscores, so normalizing with .toString() is incorrect. Use .getPrefixedText() instead. This caused a bug in the link dialog where, if the link was an internal link pointing to an existing page with a space in its name, the New page section would be displayed but would be empty, and the link's target would be displayed in the Existing page section but colored red. Change-Id: I59d8b87b996d80da1b25124b942bd2b72ef50845 --- M modules/ve/ui/widgets/ve.ui.MWLinkTargetInputWidget.js 1 file changed, 9 insertions(+), 5 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ve/ui/widgets/ve.ui.MWLinkTargetInputWidget.js b/modules/ve/ui/widgets/ve.ui.MWLinkTargetInputWidget.js index bac929a..7defcae 100644 --- a/modules/ve/ui/widgets/ve.ui.MWLinkTargetInputWidget.js +++ b/modules/ve/ui/widgets/ve.ui.MWLinkTargetInputWidget.js @@ -111,11 +111,15 @@ } // Internal link - if ( !pageExists ( !matchingPages || - // Run value through mw.Title to avoid treating a match as a mismatch where - // normalisation would make them matching (bug 48476) - matchingPages.indexOf( new mw.Title( this.value ).toString() ) === -1 - ) ) { + if ( + !pageExists + ( + !matchingPages || + // Run value through mw.Title to avoid treating a match as a mismatch where + // normalisation would make them matching (bug 48476) + matchingPages.indexOf( new mw.Title( this.value ).getPrefixedText() ) === -1 + ) + ) { items.push( new ve.ui.MenuSectionItemWidget( 'newPage', { '$$': menu$$, 'label': ve.msg( 'visualeditor-linkinspector-suggest-new-page' ) } -- To view, visit https://gerrit.wikimedia.org/r/69288 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I59d8b87b996d80da1b25124b942bd2b72ef50845 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Catrope roan.katt...@gmail.com Gerrit-Reviewer: Krinkle krinklem...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Improve TravisCI build script - change (mediawiki...WikibaseQueryEngine)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/69291 Change subject: Improve TravisCI build script .. Improve TravisCI build script Change-Id: I0868ad4ff3248a8be3c2ec997951c34df47f14c0 --- M .travis.sh M .travis.yml 2 files changed, 9 insertions(+), 15 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikibaseQueryEngine refs/changes/91/69291/1 diff --git a/.travis.sh b/.travis.sh index 291c9eb..b922d0b 100644 --- a/.travis.sh +++ b/.travis.sh @@ -8,19 +8,17 @@ phpunit --testsuite=QueryEngine else cd .. - pwd git clone https://gerrit.wikimedia.org/r/p/mediawiki/core.git phase3 --depth 1 + cd phase3 mysql -e 'create database its_a_mw;' - php maintenance/install.php --dbtype $DBTYPE --dbuser root --dbname its_a_mw --dbpath $(pwd) --pass nyan TravisWiki admin + cd extensions - git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Diff.git - git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/DataValues.git - git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Ask.git - git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Wikibase.git - git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/WikibaseDataModel.git - git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/WikibaseDatabase.git - git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/WikibaseQueryEngine.git - cd WikibaseQueryEngine + composer create-project wikibase/query-engine:dev-master WikibaseQueryEngine --keep-vcs + + cd .. + php maintenance/install.php --dbtype $DBTYPE --dbuser root --dbname its_a_mw --dbpath $(pwd) --pass nyan TravisWiki admin + + cd extensions/WikibaseQueryEngine phpunit fi diff --git a/.travis.yml b/.travis.yml index 9b55ddb..9c7525f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,11 +26,7 @@ - php: 5.3 env: DBTYPE=sqlite STANDALONE=yeah - -before_script: - - bash .travis.sh $STANDALONE - -script: true +script: bash .travis.sh $STANDALONE notifications: email: -- To view, visit https://gerrit.wikimedia.org/r/69291 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0868ad4ff3248a8be3c2ec997951c34df47f14c0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikibaseQueryEngine Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add PCRE Functions (version 0.4.3) - change (mediawiki...Foxway)
jenkins-bot has submitted this change and it was merged. Change subject: Add PCRE Functions (version 0.4.3) .. Add PCRE Functions (version 0.4.3) * fix and optimize function process_slashes() * use wfSuppressWarnings() Change-Id: I29ca62d575b86e91a4aeba29f40316a9da2bfb07 --- M Foxway.i18n.php M Foxway.php M Settings.php M includes/Interpreter.php M includes/functions/FArray.php M includes/functions/FString.php A includes/functions/Fpcre.php M tests/phpunit/includes/InterpreterTest.php 8 files changed, 237 insertions(+), 22 deletions(-) Approvals: Pastakhov: Looks good to me, approved jenkins-bot: Verified diff --git a/Foxway.i18n.php b/Foxway.i18n.php index db08d77..7cd8076 100644 --- a/Foxway.i18n.php +++ b/Foxway.i18n.php @@ -15,6 +15,9 @@ $messages['en'] = array( 'foxway-desc' = 'Adds in the wikitext parser the ability to use the syntax and functions of PHP', 'foxway-disabled-for-namespace' = 'Extension foxway disabled for this namespace $1', + 'foxway-error-bad-delimiter' = 'Delimiter must not be alphanumeric or backslash', + 'foxway-error-no-ending-matching-delimiter' = 'No ending matching delimiter $1 found', + 'foxway-error-unknown-modifier' = 'Unknown modifier $1', 'foxway-php-fatal-error-undefined-function' = 'PHP fatal error: Call to undefined function $1() on page $2 line $3.', 'foxway-php-not-variable-passed-by-reference' = 'PHP fatal error: Only variables can be passed by reference, function $1() on page $2 line $3.', 'foxway-php-syntax-error-unexpected' = 'PHP parse error: Syntax error, unexpected $1 in command line code on line $2.', @@ -30,6 +33,9 @@ 'foxway-desc' = '{{desc|name=Foxway|url=https://www.mediawiki.org/wiki/Extension:Foxway}}', 'foxway-disabled-for-namespace' = 'Error message when trying use this extension on the pages of the namespace where it is not permitted, parameters: * $1 - the namespace name', + 'foxway-error-bad-delimiter' = 'Error message. Delimiter for function preg_replace()', + 'foxway-error-no-ending-matching-delimiter'= 'Error message, parameter $1 is delimiter', + 'foxway-error-unknown-modifier' = 'Error message, parameter $1 is modifier', 'foxway-php-fatal-error-undefined-function' = 'Error message, parameters: * $1 - user-specified function name * $2 - the name of the page on which the error occurred diff --git a/Foxway.php b/Foxway.php index de30ac2..5809ac9 100644 --- a/Foxway.php +++ b/Foxway.php @@ -15,7 +15,7 @@ die( 'This file is an extension to MediaWiki and thus not a valid entry point.' ); } -define( 'Foxway_VERSION' , '0.4.2' ); +define( 'Foxway_VERSION' , '0.4.3' ); // Register this extension on Special:Version $wgExtensionCredits['parserhook'][] = array( @@ -64,6 +64,7 @@ $wgAutoloadClasses['Foxway\\BaseFunction'] = $dir . '/includes/functions/BaseFunction.php'; $wgAutoloadClasses['Foxway\\FArray'] = $dir . '/includes/functions/FArray.php'; +$wgAutoloadClasses['Foxway\\Fpcre']= $dir . '/includes/functions/Fpcre.php'; $wgAutoloadClasses['Foxway\\FString'] = $dir . '/includes/functions/FString.php'; $wgAutoloadClasses['Foxway\\FVariable']= $dir . '/includes/functions/FVariable.php'; @@ -120,4 +121,8 @@ 'sscanf' = 2147483644, // 0b100 'str_ireplace' = 8, // 0b1000 'str_replace' = 8, // 0b1000 + 'preg_filter' = 16, // 0b1 + 'preg_match_all' = 4, // 0b100 + 'preg_match' = 4, // 0b100 + 'preg_replace' = 16, // 0b1 ); diff --git a/Settings.php b/Settings.php index be813f8..d5fbd49 100644 --- a/Settings.php +++ b/Settings.php @@ -213,6 +213,17 @@ 'vsprintf', 'wordwrap', ), + 'Fpcre' = array( // PCRE Functions @see http://php.net/manual/en/ref.pcre.php + 'preg_filter', + 'preg_grep', + 'preg_last_error', + 'preg_match_all', + 'preg_match_all', + 'preg_match', + 'preg_quote', + //'preg_replace', not tested + 'preg_split', + ), ); $wgFoxwayAllowedPHPConstants = array( @@ -321,4 +332,19 @@ 'YESSTR', 'NOSTR', 'CODESET', + // @see http://www.php.net/manual/en/pcre.constants.php + 'PREG_PATTERN_ORDER', + 'PREG_SET_ORDER', + 'PREG_OFFSET_CAPTURE', + 'PREG_SPLIT_NO_EMPTY', + 'PREG_SPLIT_DELIM_CAPTURE', + 'PREG_SPLIT_OFFSET_CAPTURE', + 'PREG_NO_ERROR', + 'PREG_INTERNAL_ERROR', + 'PREG_BACKTRACK_LIMIT_ERROR', + 'PREG_RECURSION_LIMIT_ERROR', + 'PREG_BAD_UTF8_ERROR', + 'PREG_BAD_UTF8_OFFSET_ERROR', + 'PCRE_VERSION', + 'PREG_GREP_INVERT', ); \ No newline at end of file diff
[MediaWiki-commits] [Gerrit] SMW\Profiler encapsulates MediaWiki's (wfProfileIn/wfProfile... - change (mediawiki...SemanticMediaWiki)
Mwjames has uploaded a new change for review. https://gerrit.wikimedia.org/r/69292 Change subject: SMW\Profiler encapsulates MediaWiki's (wfProfileIn/wfProfileOut) .. SMW\Profiler encapsulates MediaWiki's (wfProfileIn/wfProfileOut) Code coverage: 100% CRAP: 12 SMW\Profiler natively supports processor/caller profiling which enables /profileinfo.php to view those recorded items with a profiling tree * wfProfileIn( __METHOOD__ ) with Profiler::In( __METHOOD__ ) * wfProfileOut( __METHOOD__ ) with Profiler::Out( __METHOOD__ ) ## Example wfProfileIn( __METHOOD__ )/wfProfileOut( __METHOOD__ ) shows SMW\ParserData::addPropertyValue 3 0.719 0.240 0.013% 1480 (0.218 -0.263) [0] while Profiler::In( __METHOOD__, true )/Profiler::Out( __METHOOD__, true ) will show both the processor and the caller SMW\ParserData::addPropertyValue-SMW\ParserTextProcessor::addPropertyValue 3 0.719 0.240 0.013% 1480 (0.218 - 0.263) [0] SMW\ParserData::updateStore-SMWHooks::onParserAfterTidy 1 108.272 108.272 2.047%281115 ( 108.272 - 108.272) [99] SMW\DataValueFactory::newPropertyValue-SMW\SubobjectParserFunction::addSubo 214.906 7.453 0.282% 8008 (3.728 - 11.178) [31] Change-Id: I851fb0ae993639e91771555807f7d2c02892e0b2 --- M includes/DataValueFactory.php M includes/ParserData.php A includes/Profiler.php M includes/Setup.php A tests/phpunit/includes/ProfilerTest.php 5 files changed, 253 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SemanticMediaWiki refs/changes/92/69292/1 diff --git a/includes/DataValueFactory.php b/includes/DataValueFactory.php index 289d123..e10ee09 100644 --- a/includes/DataValueFactory.php +++ b/includes/DataValueFactory.php @@ -209,19 +209,19 @@ public static function newPropertyValue( $propertyName, $valueString, $caption = false, SMWDIWikiPage $contextPage = null ) { - wfProfileIn( __METHOD__ ); + Profiler::In( __METHOD__, true ); $propertyDV = SMWPropertyValue::makeUserProperty( $propertyName ); if ( !$propertyDV-isValid() ) { - wfProfileOut( __METHOD__ ); + Profiler::Out( __METHOD__, true ); return $propertyDV; } $propertyDI = $propertyDV-getDataItem(); if ( $propertyDI instanceof SMWDIError ) { - wfProfileOut( __METHOD__ ); + Profiler::Out( __METHOD__, true ); return $propertyDV; } @@ -244,7 +244,7 @@ ); } - wfProfileOut( __METHOD__ ); + Profiler::Out( __METHOD__, true ); return $dataValue; } diff --git a/includes/ParserData.php b/includes/ParserData.php index c914958..a40baf3 100644 --- a/includes/ParserData.php +++ b/includes/ParserData.php @@ -329,7 +329,7 @@ * @param SMWDataValue $dataValue */ public function addPropertyValue( SMWDataValue $dataValue ) { - wfProfileIn( __METHOD__ ); + Profiler::In( __METHOD__, true ); if ( $dataValue-getProperty() instanceof SMWDIProperty ) { if ( !$dataValue-isValid() ) { @@ -348,7 +348,7 @@ $this-addError( $dataValue-getErrors() ); } - wfProfileOut( __METHOD__ ); + Profiler::Out( __METHOD__, true ); } /** @@ -507,7 +507,7 @@ * @return boolean */ public function updateStore() { - wfProfileIn( __METHOD__ ); + Profiler::In( __METHOD__, true ); // FIXME get rid of globals and use options array instead while // invoking the constructor @@ -556,7 +556,7 @@ Job::batchInsert( $jobs ); } - wfProfileOut( __METHOD__ ); + Profiler::Out( __METHOD__, true ); return true; } @@ -573,7 +573,7 @@ * @param array $jobs */ protected function getDiffPropertyTypes( SMWStore $store, array $jobs ) { - wfProfileIn( __METHOD__ ); + Profiler::In( __METHOD__, true ); $updatejobflag = false; $ptype = new SMWDIProperty( SMWDIProperty::TYPE_HAS_TYPE ); @@ -629,7 +629,7 @@ $this-addJobs( $subjects, $jobs ); } - wfProfileOut( __METHOD__ ); + Profiler::Out( __METHOD__, true ); } /** diff --git a/includes/Profiler.php
[MediaWiki-commits] [Gerrit] Enabling MathJaX in LaTeXML rendering mode exept for Firefox - change (mediawiki...Math)
Physikerwelt has uploaded a new change for review. https://gerrit.wikimedia.org/r/69293 Change subject: Enabling MathJaX in LaTeXML rendering mode exept for Firefox .. Enabling MathJaX in LaTeXML rendering mode exept for Firefox Due to a bad mathml support for all browsers expect Firefox, the LaTeXML rendering mode will use MathJaX's MML to something that can be displyed by the brower rendering mode. This is not the same as enabling MathJaX since it it is much faster since the MathML must only be transformed to e.g. SVG. In contrast to that MathJaX must compile the tex code in oder to get the SVG output at the client side which takes much longer. Change-Id: I188d85a914483c5c1ce5a16debfece93a3c438a7 --- M Math.hooks.php M Math.php A modules/ext.math.mathjax.enabler.mml.js 3 files changed, 100 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Math refs/changes/93/69293/1 diff --git a/Math.hooks.php b/Math.hooks.php index c8159c2..88295bc 100644 --- a/Math.hooks.php +++ b/Math.hooks.php @@ -65,7 +65,14 @@ // $renderer-addModules($parser); $parser-getOutput()-addModules( array( 'ext.math.mathjax.enabler' ) ); } elseif ( $wgUseMathJax $mode == MW_MATH_LATEXML ) { - $parser-getOutput()-addModules( array( 'ext.math.mathjax.enabler.mml' ) ); + if(isset($_SERVER['HTTP_USER_AGENT'])){ + $UA=$_SERVER['HTTP_USER_AGENT']; + } else + {$UA=undefined; //required for maitenance script runs + } + if (!preg_match('/Firefox/',$UA)){ //Don't use MathJax with Firefox this has to be extenden to other browser that suppert MathML maybe a function supports MathML was the correct way to go + $parser-getOutput()-addModules( array( 'ext.math.mathjax.enabler.mml' ) ); + } } // Writes cache if rendering was successful $renderer-writeCache(); diff --git a/Math.php b/Math.php index feb9d6b..f171c3a 100644 --- a/Math.php +++ b/Math.php @@ -178,3 +178,7 @@ $wgResourceModules['ext.math.mathjax.enabler'] = array( 'scripts' = 'ext.math.mathjax.enabler.js', ) + $moduleTemplate; +// Customized module for LaTeXML +$wgResourceModules['ext.math.mathjax.enabler.mml'] = array( + 'scripts' = 'ext.math.mathjax.enabler.mml.js', +) + $moduleTemplate; diff --git a/modules/ext.math.mathjax.enabler.mml.js b/modules/ext.math.mathjax.enabler.mml.js new file mode 100644 index 000..7629b42 --- /dev/null +++ b/modules/ext.math.mathjax.enabler.mml.js @@ -0,0 +1,88 @@ +/** + * From https://en.wikipedia.org/wiki/User:Nageh/mathJax.js + */ +/*global mathJax:true, MathJax */ +( function ( mw, $ ) { + if ( typeof mathJax === 'undefined' ) { +mathJax = {}; + } + + mathJax.version = '0.2'; + + mathJax.loaded = false; + + mathJax.config = $.extend( true, { +root: mw.config.get('wgExtensionAssetsPath') + '/Math/modules/MathJax', +config: ['MML_HTMLorMML-full.js'], +'v1.0-compatible': false, +displayAlign: 'left', +menuSettings: { + zoom: 'Click' +}, +'HTML-CSS': { + imageFont: null, + availableFonts: ['TeX'], + mtextFontInherit: true +} + }, mathJax.config ); + + mathJax.Config = function () { +MathJax.Hub.Config( mathJax.config ); +MathJax.OutputJax.fontDir = mw.config.get('wgExtensionAssetsPath') + '/Math/modules/MathJax/fonts'; + }; + + /** + * Renders all Math TeX inside the given elements. + * @param {function} callback to be executed after text elements have rendered [optional] + */ + $.fn.renderTex = function ( callback ) { +var elem = this.find( '.tex' ).parent().toArray(); + +if ( !$.isFunction( callback ) ) { + callback = $.noop; +} + +function render () { + MathJax.Hub.Queue( ['Typeset', MathJax.Hub, elem, callback] ); +} + +mw.loader.using( 'ext.math.mathjax', function () { + if ( MathJax.isReady ) { +render(); + } else { +MathJax.Hub.Startup.signal.MessageHook( 'End', render ); + } +}); +return this; + }; + + mathJax.Load = function () { +var config, script; +if (this.loaded) { + return true; +} + +// create configuration element +config = 'mathJax.Config();'; +script = document.createElement( 'script' ); +script.setAttribute( 'type', 'text/x-mathjax-config' ); +if ( window.opera ) { + script.innerHTML = config; +} else { + script.text = config; +} +document.getElementsByTagName('head')[0].appendChild( script ); + +// create startup element +mw.loader.load('ext.math.mathjax'); + +this.loaded = true; + +return false; + }; + + $( document ).ready(
[MediaWiki-commits] [Gerrit] (Bug 49169) Draft: Check all tex commands before passing the... - change (mediawiki...Math)
Physikerwelt has submitted this change and it was merged. Change subject: (Bug 49169) Draft: Check all tex commands before passing them to renderer .. (Bug 49169) Draft: Check all tex commands before passing them to renderer This is just the demo that uses the texvc source. It would be preferrable if the functin would be implemented in php. See the discussion in the bug report. Bug: 49169 Change-Id: I9e4b22b3f08317b7221c4d279e717d18ddb7966b --- M Math.hooks.php M Math.php M MathRenderer.php 3 files changed, 42 insertions(+), 3 deletions(-) Approvals: Physikerwelt: Verified; Looks good to me, approved diff --git a/Math.hooks.php b/Math.hooks.php index 28798db..c8159c2 100644 --- a/Math.hooks.php +++ b/Math.hooks.php @@ -36,13 +36,13 @@ /** * Callback function for the math parser hook. * -* @param $content (the LaTeX input) +* @param $content the LaTeX input * @param $attributes * @param $parser Parser * @return string */ static function mathTagHook( $content, $attributes, $parser ) { - global $wgContLang, $wgUseMathJax; + global $wgContLang, $wgUseMathJax, $wgDisableTexFilter; if ( trim( $content ) === ) { // bug 8372 return ; } @@ -50,6 +50,13 @@ $renderer = MathRenderer::getRenderer( $content, $attributes, $mode ); + if (! $wgDisableTexFilter){ + $checkResult = $renderer-checkTex(); + if (! ($checkResult === true)){ + //returns the error message + return $checkResult; + } + } $renderedMath = $renderer-render(); wfRunHooks( 'MathFormulaRendered', array( $renderer,$renderedMath,$parser-getTitle()-getArticleID(), diff --git a/Math.php b/Math.php index 090039c..feb9d6b 100644 --- a/Math.php +++ b/Math.php @@ -121,13 +121,19 @@ /** * Allows to use LaTeXML as renderer for mathematical equation. */ -$wgUseLaTeXML = false; +$wgUseLaTeXML = true; /** * The timeout for the HTTP-Request sent to the LaTeXML to render an equation, * in seconds. */ $wgLaTeXMLTimeout = 240; +/** + * Option to disable the tex filter. If set to true any LaTeX espression is parsed + * this can be a potential security risk. If set to false only a subset of the tex + * commands is allowed. See the wikipedia page Help:Math for details. + */ +$wgDisableTexFilter = false; // end of config settings. diff --git a/MathRenderer.php b/MathRenderer.php index 8d198bb..7035b93 100644 --- a/MathRenderer.php +++ b/MathRenderer.php @@ -47,6 +47,7 @@ protected $storedInDatabase = false; protected $statusCode = 0; protected $timestamp; + protected $texSecure = false; /** * Constructs a base MathRenderer @@ -485,5 +486,30 @@ $this-changed = true; $this-statusCode = $statusCode; } + + /** +* Get if the input tex was marked as secure +* @return boolean +*/ + public function isTexSecure (){ + return $this-texSecure; + } + + public function checkTex(){ + $this-texSecure = false; + //TODO Update tex checking + $renderer=self::getRenderer($this-tex,$this-params,MW_MATH_PNG); + $texvcResult = $renderer-callTexvc(); + if( $texvcResult === MathTexvc::MW_TEXVC_SUCCESS) { + $this-tex = $renderer-getSecureTex(); + $this-texSecure = true; + wfDebugLog('Math', 'checkTex successful tex is now: '.$this-tex); + return true; + } else { + wfDebugLog('Math', 'checkTex failed:'.$texvcResult); + return $texvcResult; + } + + } } -- To view, visit https://gerrit.wikimedia.org/r/67607 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9e4b22b3f08317b7221c4d279e717d18ddb7966b Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Math Gerrit-Branch: LaTeXML Gerrit-Owner: Physikerwelt w...@physikerwelt.de Gerrit-Reviewer: Physikerwelt w...@physikerwelt.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] EntityLookup::hasEntity for quick checks. - change (mediawiki...Wikibase)
Daniel Kinzler has uploaded a new change for review. https://gerrit.wikimedia.org/r/69294 Change subject: EntityLookup::hasEntity for quick checks. .. EntityLookup::hasEntity for quick checks. This will be particularly useful for the EntityExistsValidator. Change-Id: Iad65b4b19b3c82a8db8526b5fa237b65b274254f --- M lib/includes/store/EntityLookup.php M lib/includes/store/sql/CachingEntityLoader.php M lib/includes/store/sql/WikiPageEntityLookup.php M lib/tests/phpunit/EntityLookupTest.php M lib/tests/phpunit/MockRepository.php M lib/tests/phpunit/MockRepositoryTest.php M lib/tests/phpunit/store/WikiPageEntityLookupTest.php 7 files changed, 263 insertions(+), 70 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/94/69294/1 diff --git a/lib/includes/store/EntityLookup.php b/lib/includes/store/EntityLookup.php index 48c0ca5..51ca608 100644 --- a/lib/includes/store/EntityLookup.php +++ b/lib/includes/store/EntityLookup.php @@ -49,6 +49,19 @@ public function getEntity( EntityID $entityId, $revision = 0 ); /** +* Returns whether the given entity can bee looked up using +* getEntity(). This avoids loading and deserializing entity content +* just to check whether the entity exists. +* +* @since 0.4 +* +* @param EntityID $entityId +* +* @return bool +*/ + public function hasEntity( EntityID $entityId ); + + /** * Fetches the entities with provided ids and returns them. * The result array contains the prefixed entity ids as keys. * The values are either an Entity or null, if there is no entity with the associated id. diff --git a/lib/includes/store/sql/CachingEntityLoader.php b/lib/includes/store/sql/CachingEntityLoader.php index bc053ec..60dfda5 100644 --- a/lib/includes/store/sql/CachingEntityLoader.php +++ b/lib/includes/store/sql/CachingEntityLoader.php @@ -36,7 +36,7 @@ class CachingEntityLoader implements EntityLookup { /** -* @var Entity|null[] +* @var Entity|bool|null[] */ protected $loadedEntities = array(); @@ -85,7 +85,12 @@ wfProfileIn( __METHOD__ ); $key = $this-getCacheKey( $entityId, $revision ); - if ( !array_key_exists( $key, $this-loadedEntities ) ) { + // $this-loadedEntities[$key] is null if the entity is known to not exist, + // true if it is known to exist, and an Entity if it is loaded. + // If $this-loadedEntities[$key] is true, we still need to load it. + + if ( !array_key_exists( $key, $this-loadedEntities ) + || $this-loadedEntities[$key] === true ) { $entity = $this-lookup-getEntity( $entityId, $revision ); $this-loadedEntities[$key] = $entity; } @@ -95,6 +100,31 @@ } /** +* See EntityLookup::hasEntity() +* +* @since 0.4 +* +* @param EntityID $entityId +* +* @return bool +*/ + public function hasEntity( EntityId $entityId ) { + wfProfileIn( __METHOD__ ); + $key = $this-getCacheKey( $entityId ); + + // $this-loadedEntities[$key] is null if the entity is known to not exist, + // true if it is known to exist, and an Entity if it is loaded. + + if ( !array_key_exists( $key, $this-loadedEntities ) ) { + $hasEntity = $this-lookup-hasEntity( $entityId ); + $this-loadedEntities[$key] = $hasEntity === true ? true : null; + } + + wfProfileOut( __METHOD__ ); + return $this-loadedEntities[$key] !== null; + } + + /** * @see EntityLookup::getEntities * * @since 0.4 diff --git a/lib/includes/store/sql/WikiPageEntityLookup.php b/lib/includes/store/sql/WikiPageEntityLookup.php index 0d83aa4..51ade77 100644 --- a/lib/includes/store/sql/WikiPageEntityLookup.php +++ b/lib/includes/store/sql/WikiPageEntityLookup.php @@ -1,6 +1,7 @@ ?php namespace Wikibase; +use DBQueryError; use MWException; use Wikibase\Lib\EntityRetrievingDataTypeLookup; @@ -118,13 +119,13 @@ /** * @since 0.4 -* @see EntityRevisionLookup::getEntityRevision +* @see EntityRevisionLookup::getEntityRevision * * @param EntityID $entityId -* @param int $revision The desired revision id, 0 means current. +* @param int $revision The desired revision id, 0 means current. * * @return EntityRevision|null -* @throw StorageException +* @throws StorageException */ public function getEntityRevision( EntityID $entityId, $revision = 0 ) {
[MediaWiki-commits] [Gerrit] Get rid of deprecated method usage in repo API tests - change (mediawiki...Wikibase)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/69295 Change subject: Get rid of deprecated method usage in repo API tests .. Get rid of deprecated method usage in repo API tests Change-Id: Id82b85f203429127c493ce721e19225e483d0945 --- M repo/tests/phpunit/includes/api/CreateClaimTest.php M repo/tests/phpunit/includes/api/GetClaimsTest.php 2 files changed, 23 insertions(+), 11 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/95/69295/1 diff --git a/repo/tests/phpunit/includes/api/CreateClaimTest.php b/repo/tests/phpunit/includes/api/CreateClaimTest.php index 1cf4e17..f19fe58 100644 --- a/repo/tests/phpunit/includes/api/CreateClaimTest.php +++ b/repo/tests/phpunit/includes/api/CreateClaimTest.php @@ -2,6 +2,7 @@ namespace Wikibase\Test\Api; use Wikibase\Entity; +use Wikibase\Repo\WikibaseRepo; /** * Unit tests for the Wikibase\ApiCreateClaim class. @@ -72,9 +73,9 @@ $params = array( 'action' = 'wbcreateclaim', - 'entity' = $entity-getPrefixedId(), + 'entity' = $this-getFormattedIdForEntity( $entity ), 'snaktype' = 'value', - 'property' = $property-getPrefixedId(), + 'property' = $this-getFormattedIdForEntity( $property ), 'value' = 'foo', 'token' = $GLOBALS['wgUser']-getEditToken() ); @@ -91,7 +92,7 @@ $entityId = \Wikibase\Entity::getIdFromClaimGuid( $claim['id'] ); - $this-assertEquals( $entity-getPrefixedId(), $entityId ); + $this-assertEquals( $this-getFormattedIdForEntity( $entity ), $entityId ); $this-assertEquals( 'value', $claim['mainsnak']['snaktype'] ); @@ -206,11 +207,11 @@ $params['token'] = $GLOBALS['wgUser']-getEditToken(); if ( array_key_exists( 'entity', $params ) $params['entity'] === '-' ) { - $params['entity'] = $entity-getPrefixedId(); + $params['entity'] = $this-getFormattedIdForEntity( $entity ); } if ( array_key_exists( 'property', $params ) $params['property'] === '-' ) { - $params['property'] = $property-getPrefixedId(); + $params['property'] = $this-getFormattedIdForEntity( $entity ); } try { @@ -226,6 +227,11 @@ $this-assertFalse( $entityContent-getEntity()-hasClaims() ); } + protected function getFormattedIdForEntity( Entity $entity ) { + $idFormatter = WikibaseRepo::getDefaultInstance()-getIdFormatter(); + return $idFormatter-format( $entity-getId() ); + } + public function testMultipleRequests() { /** * @var Entity $entity @@ -235,9 +241,9 @@ $params = array( 'action' = 'wbcreateclaim', - 'entity' = $entity-getPrefixedId(), + 'entity' = $this-getFormattedIdForEntity( $entity ), 'snaktype' = 'value', - 'property' = $property-getPrefixedId(), + 'property' = $this-getFormattedIdForEntity( $property ), 'value' = 'foo', 'token' = $GLOBALS['wgUser']-getEditToken() ); @@ -252,9 +258,9 @@ $params = array( 'action' = 'wbcreateclaim', - 'entity' = $entity-getPrefixedId(), + 'entity' = $this-getFormattedIdForEntity( $entity ), 'snaktype' = 'value', - 'property' = $property-getPrefixedId(), + 'property' = $this-getFormattedIdForEntity( $property ), 'value' = 'bar', 'token' = $GLOBALS['wgUser']-getEditToken(), 'baserevid' = $revId diff --git a/repo/tests/phpunit/includes/api/GetClaimsTest.php b/repo/tests/phpunit/includes/api/GetClaimsTest.php index 0888c1f..4bb36e2 100644 --- a/repo/tests/phpunit/includes/api/GetClaimsTest.php +++ b/repo/tests/phpunit/includes/api/GetClaimsTest.php @@ -4,6 +4,7 @@ use Wikibase\Entity; use Wikibase\Claim; use Wikibase\Claims; +use Wikibase\Repo\WikibaseRepo; use Wikibase\Statement; /** @@ -85,7 +86,7 @@ foreach ( $entities as $entity ) { $params = array( 'action' = 'wbgetclaims', - 'entity' = $entity-getPrefixedId(), + 'entity' = $this-getFormattedIdForEntity( $entity ), );
[MediaWiki-commits] [Gerrit] Complexity reduction in ModifyEntity - change (mediawiki...Wikibase)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/69297 Change subject: Complexity reduction in ModifyEntity .. Complexity reduction in ModifyEntity Change-Id: Ic2ddb65cf3476c50e66f48d903d1d22476e4ea2c --- M repo/includes/api/ModifyEntity.php 1 file changed, 44 insertions(+), 26 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/97/69297/1 diff --git a/repo/includes/api/ModifyEntity.php b/repo/includes/api/ModifyEntity.php index 4792033..a89e32e 100644 --- a/repo/includes/api/ModifyEntity.php +++ b/repo/includes/api/ModifyEntity.php @@ -2,7 +2,10 @@ namespace Wikibase\Api; -use User, Title, ApiBase; +use Status; +use User; +use Title; +use ApiBase; use Wikibase\EntityId; use Wikibase\Entity; @@ -11,7 +14,6 @@ use Wikibase\ItemHandler; use Wikibase\Summary; use Wikibase\Utils; -use Wikibase\Settings; /** * Base class for API modules modifying a single entity identified based on id xor a combination of site and page title. @@ -23,7 +25,6 @@ * @ingroup API * * @licence GNU GPL v2+ - * @author Jeroen De Dauw jeroended...@gmail.com * @author John Erling Blad jeb...@gmail.com * @author Daniel Kinzler */ @@ -198,21 +199,34 @@ $summary = new Summary( $this-getModuleName() ); } - // if the entity is not up for creation, set the EDIT_UPDATE flags - if ( !$entityContent-isNew() ( $this-flags EDIT_NEW ) === 0 ) { - $this-flags |= EDIT_UPDATE; - } - - $this-flags |= ( $user-isAllowed( 'bot' ) $params['bot'] ) ? EDIT_FORCE_BOT : 0; + $this-addFlags( $entityContent-isNew() ); //NOTE: EDIT_NEW will not be set automatically. If the entity doesn't exist, and EDIT_NEW was // not added to $this-flags explicitly, the save will fail. // collect information and create an EditEntity - $status = $this-attemptSaveEntity( $entityContent, + $status = $this-attemptSaveEntity( + $entityContent, $summary-toString(), - $this-flags ); + $this-flags + ); + $this-addToOutput( $entityContent, $status ); + + wfProfileOut( __METHOD__ ); + } + + protected function addFlags( $entityContentIsNew ) { + // if the entity is not up for creation, set the EDIT_UPDATE flags + if ( !$entityContentIsNew ( $this-flags EDIT_NEW ) === 0 ) { + $this-flags |= EDIT_UPDATE; + } + + $params = $this-extractRequestParams(); + $this-flags |= ( $this-getUser()-isAllowed( 'bot' ) $params['bot'] ) ? EDIT_FORCE_BOT : 0; + } + + protected function addToOutput( EntityContent $entityContent, Status $status ) { $this-getResult()-addValue( 'entity', 'id', $entityContent-getEntity()-getPrefixedId() @@ -225,21 +239,10 @@ $this-addRevisionIdFromStatusToResult( 'entity', 'lastrevid', $status ); + $params = $this-extractRequestParams(); + if ( isset( $params['site'] ) isset( $params['title'] ) ) { - $normalized = array(); - - $normTitle = Utils::trimToNFC( $params['title'] ); - if ( $normTitle !== $params['title'] ) { - $normalized['from'] = $params['title']; - $normalized['to'] = $normTitle; - } - - if ( $normalized !== array() ) { - $this-getResult()-addValue( - 'entity', - 'normalized', $normalized - ); - } + $this-addToAndFromToOutput( $params['title'] ); } $this-getResult()-addValue( @@ -247,8 +250,23 @@ 'success', 1 ); + } - wfProfileOut( __METHOD__ ); + protected function addToAndFromToOutput( $title ) { + $normalized = array(); + + $normTitle = Utils::trimToNFC( $title ); + if ( $normTitle !== $title ) { + $normalized['from'] = $title; + $normalized['to'] = $normTitle; + } + + if ( $normalized !== array() ) { + $this-getResult()-addValue( + 'entity', + 'normalized', $normalized + ); + }
[MediaWiki-commits] [Gerrit] Enabling MathJaX in LaTeXML rendering mode except for Firefox - change (mediawiki...Math)
Physikerwelt has uploaded a new change for review. https://gerrit.wikimedia.org/r/69298 Change subject: Enabling MathJaX in LaTeXML rendering mode except for Firefox .. Enabling MathJaX in LaTeXML rendering mode except for Firefox Due to a bad MathML support for all browsers, expect Firefox, the LaTeXML rendering mode will use MathJaX's MML to something that can be displayed by the browser rendering mode. This is not the same as enabling MathJaX since it is much faster since the MathML must only be transformed to e.g. SVG. In contrast to that MathJaX must compile the TeX code in order to get the SVG output at the client side which takes much longer. Change-Id: I6ad17a04e9d4afff71ebbb3f4bc3cb6d4fd15e5d --- M Math.hooks.php M Math.php A modules/ext.math.mathjax.enabler.mml.js 3 files changed, 102 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Math refs/changes/98/69298/1 diff --git a/Math.hooks.php b/Math.hooks.php index 3489da5..2eb6ec5 100644 --- a/Math.hooks.php +++ b/Math.hooks.php @@ -53,7 +53,17 @@ $renderedMath = $renderer-render(); if ( $wgUseMathJax $mode == MW_MATH_MATHJAX ) { $parser-getOutput()-addModules( array( 'ext.math.mathjax.enabler' ) ); + } elseif ( $wgUseMathJax $mode == MW_MATH_LATEXML ) { + if(isset($_SERVER['HTTP_USER_AGENT'])){ + $UA=$_SERVER['HTTP_USER_AGENT']; + } else + {$UA=undefined; //required for maitenance script runs + } + if (!preg_match('/Firefox/',$UA)){ //Don't use MathJax with Firefox this has to be extenden to other browser that suppert MathML maybe a function supports MathML was the correct way to go + $parser-getOutput()-addModules( array( 'ext.math.mathjax.enabler.mml' ) ); } + } + // Writes cache if rendering was successful $renderer-writeCache(); return $wgContLang-armourMath( $renderedMath ); } diff --git a/Math.php b/Math.php index 9314cb7..38935db 100644 --- a/Math.php +++ b/Math.php @@ -168,3 +168,7 @@ $wgResourceModules['ext.math.mathjax.enabler'] = array( 'scripts' = 'ext.math.mathjax.enabler.js', ) + $moduleTemplate; +// Customized module for LaTeXML +$wgResourceModules['ext.math.mathjax.enabler.mml'] = array( + 'scripts' = 'ext.math.mathjax.enabler.mml.js', +) + $moduleTemplate; diff --git a/modules/ext.math.mathjax.enabler.mml.js b/modules/ext.math.mathjax.enabler.mml.js new file mode 100644 index 000..7629b42 --- /dev/null +++ b/modules/ext.math.mathjax.enabler.mml.js @@ -0,0 +1,88 @@ +/** + * From https://en.wikipedia.org/wiki/User:Nageh/mathJax.js + */ +/*global mathJax:true, MathJax */ +( function ( mw, $ ) { + if ( typeof mathJax === 'undefined' ) { +mathJax = {}; + } + + mathJax.version = '0.2'; + + mathJax.loaded = false; + + mathJax.config = $.extend( true, { +root: mw.config.get('wgExtensionAssetsPath') + '/Math/modules/MathJax', +config: ['MML_HTMLorMML-full.js'], +'v1.0-compatible': false, +displayAlign: 'left', +menuSettings: { + zoom: 'Click' +}, +'HTML-CSS': { + imageFont: null, + availableFonts: ['TeX'], + mtextFontInherit: true +} + }, mathJax.config ); + + mathJax.Config = function () { +MathJax.Hub.Config( mathJax.config ); +MathJax.OutputJax.fontDir = mw.config.get('wgExtensionAssetsPath') + '/Math/modules/MathJax/fonts'; + }; + + /** + * Renders all Math TeX inside the given elements. + * @param {function} callback to be executed after text elements have rendered [optional] + */ + $.fn.renderTex = function ( callback ) { +var elem = this.find( '.tex' ).parent().toArray(); + +if ( !$.isFunction( callback ) ) { + callback = $.noop; +} + +function render () { + MathJax.Hub.Queue( ['Typeset', MathJax.Hub, elem, callback] ); +} + +mw.loader.using( 'ext.math.mathjax', function () { + if ( MathJax.isReady ) { +render(); + } else { +MathJax.Hub.Startup.signal.MessageHook( 'End', render ); + } +}); +return this; + }; + + mathJax.Load = function () { +var config, script; +if (this.loaded) { + return true; +} + +// create configuration element +config = 'mathJax.Config();'; +script = document.createElement( 'script' ); +script.setAttribute( 'type', 'text/x-mathjax-config' ); +if ( window.opera ) { + script.innerHTML = config; +} else { + script.text = config; +} +document.getElementsByTagName('head')[0].appendChild( script ); + +// create startup element +mw.loader.load('ext.math.mathjax'); + +this.loaded = true; + +return false; + }; + +
[MediaWiki-commits] [Gerrit] Enabling MathJaX in LaTeXML rendering mode exept for Firefox - change (mediawiki...Math)
Physikerwelt has submitted this change and it was merged. Change subject: Enabling MathJaX in LaTeXML rendering mode exept for Firefox .. Enabling MathJaX in LaTeXML rendering mode exept for Firefox Due to a bad mathml support for all browsers expect Firefox, the LaTeXML rendering mode will use MathJaX's MML to something that can be displyed by the brower rendering mode. This is not the same as enabling MathJaX since it it is much faster since the MathML must only be transformed to e.g. SVG. In contrast to that MathJaX must compile the tex code in oder to get the SVG output at the client side which takes much longer. Change-Id: I188d85a914483c5c1ce5a16debfece93a3c438a7 --- M Math.hooks.php M Math.php A modules/ext.math.mathjax.enabler.mml.js M tests/MathDatabaseTest.php 4 files changed, 106 insertions(+), 1 deletion(-) Approvals: Physikerwelt: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/Math.hooks.php b/Math.hooks.php index c8159c2..88295bc 100644 --- a/Math.hooks.php +++ b/Math.hooks.php @@ -65,7 +65,14 @@ // $renderer-addModules($parser); $parser-getOutput()-addModules( array( 'ext.math.mathjax.enabler' ) ); } elseif ( $wgUseMathJax $mode == MW_MATH_LATEXML ) { - $parser-getOutput()-addModules( array( 'ext.math.mathjax.enabler.mml' ) ); + if(isset($_SERVER['HTTP_USER_AGENT'])){ + $UA=$_SERVER['HTTP_USER_AGENT']; + } else + {$UA=undefined; //required for maitenance script runs + } + if (!preg_match('/Firefox/',$UA)){ //Don't use MathJax with Firefox this has to be extenden to other browser that suppert MathML maybe a function supports MathML was the correct way to go + $parser-getOutput()-addModules( array( 'ext.math.mathjax.enabler.mml' ) ); + } } // Writes cache if rendering was successful $renderer-writeCache(); diff --git a/Math.php b/Math.php index feb9d6b..f171c3a 100644 --- a/Math.php +++ b/Math.php @@ -178,3 +178,7 @@ $wgResourceModules['ext.math.mathjax.enabler'] = array( 'scripts' = 'ext.math.mathjax.enabler.js', ) + $moduleTemplate; +// Customized module for LaTeXML +$wgResourceModules['ext.math.mathjax.enabler.mml'] = array( + 'scripts' = 'ext.math.mathjax.enabler.mml.js', +) + $moduleTemplate; diff --git a/modules/ext.math.mathjax.enabler.mml.js b/modules/ext.math.mathjax.enabler.mml.js new file mode 100644 index 000..7629b42 --- /dev/null +++ b/modules/ext.math.mathjax.enabler.mml.js @@ -0,0 +1,88 @@ +/** + * From https://en.wikipedia.org/wiki/User:Nageh/mathJax.js + */ +/*global mathJax:true, MathJax */ +( function ( mw, $ ) { + if ( typeof mathJax === 'undefined' ) { +mathJax = {}; + } + + mathJax.version = '0.2'; + + mathJax.loaded = false; + + mathJax.config = $.extend( true, { +root: mw.config.get('wgExtensionAssetsPath') + '/Math/modules/MathJax', +config: ['MML_HTMLorMML-full.js'], +'v1.0-compatible': false, +displayAlign: 'left', +menuSettings: { + zoom: 'Click' +}, +'HTML-CSS': { + imageFont: null, + availableFonts: ['TeX'], + mtextFontInherit: true +} + }, mathJax.config ); + + mathJax.Config = function () { +MathJax.Hub.Config( mathJax.config ); +MathJax.OutputJax.fontDir = mw.config.get('wgExtensionAssetsPath') + '/Math/modules/MathJax/fonts'; + }; + + /** + * Renders all Math TeX inside the given elements. + * @param {function} callback to be executed after text elements have rendered [optional] + */ + $.fn.renderTex = function ( callback ) { +var elem = this.find( '.tex' ).parent().toArray(); + +if ( !$.isFunction( callback ) ) { + callback = $.noop; +} + +function render () { + MathJax.Hub.Queue( ['Typeset', MathJax.Hub, elem, callback] ); +} + +mw.loader.using( 'ext.math.mathjax', function () { + if ( MathJax.isReady ) { +render(); + } else { +MathJax.Hub.Startup.signal.MessageHook( 'End', render ); + } +}); +return this; + }; + + mathJax.Load = function () { +var config, script; +if (this.loaded) { + return true; +} + +// create configuration element +config = 'mathJax.Config();'; +script = document.createElement( 'script' ); +script.setAttribute( 'type', 'text/x-mathjax-config' ); +if ( window.opera ) { + script.innerHTML = config; +} else { + script.text = config; +} +document.getElementsByTagName('head')[0].appendChild( script ); + +// create startup element +mw.loader.load('ext.math.mathjax'); + +this.loaded = true; + +return false; + }; + + $( document ).ready( function
[MediaWiki-commits] [Gerrit] remove wgSquidServersNoPurge for labs - change (operations/mediawiki-config)
ArielGlenn has uploaded a new change for review. https://gerrit.wikimedia.org/r/69299 Change subject: remove wgSquidServersNoPurge for labs .. remove wgSquidServersNoPurge for labs there are no front end squids in labs, so no need for this var to be populated Change-Id: Ib812569daef45458345b0d1d74903bd83ef9f3b7 --- M wmf-config/squid-labs.php 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/99/69299/1 diff --git a/wmf-config/squid-labs.php b/wmf-config/squid-labs.php index 73470dc..678cf15 100644 --- a/wmf-config/squid-labs.php +++ b/wmf-config/squid-labs.php @@ -1,4 +1,3 @@ ?php $wgSquidServers = array( '10.4.0.17' ); -$wgSquidServersNoPurge = array( '10.4.0.17' ); \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/69299 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib812569daef45458345b0d1d74903bd83ef9f3b7 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: ArielGlenn ar...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add audio transcodes to Special:TimedMediaHandler and added ... - change (mediawiki...TimedMediaHandler)
jenkins-bot has submitted this change and it was merged. Change subject: Add audio transcodes to Special:TimedMediaHandler and added a condition to check for audio transcodes in TimedMediaHandler.hooks.php . .. Add audio transcodes to Special:TimedMediaHandler and added a condition to check for audio transcodes in TimedMediaHandler.hooks.php . Future todo: Add number audio files to summary at top. Bug: 49654 Change-Id: I99d29908f1d2a0ebdd3a44db4652a0aa4e35b034 --- M SpecialTimedMediaHandler.php M TimedMediaHandler.hooks.php 2 files changed, 9 insertions(+), 7 deletions(-) Approvals: J: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/SpecialTimedMediaHandler.php b/SpecialTimedMediaHandler.php index 8403dd9..465cff2 100644 --- a/SpecialTimedMediaHandler.php +++ b/SpecialTimedMediaHandler.php @@ -64,7 +64,8 @@ * @param bool $showTable */ private function renderState ( $out, $state, $stats, $showTable = true ) { - global $wgEnabledTranscodeSet; + global $wgEnabledTranscodeSet, $wgEnabledAudioTranscodeSet; + $allTranscodes = array_merge( $wgEnabledTranscodeSet, $wgEnabledAudioTranscodeSet ); if ( $stats[ $state ][ 'total' ] ) { // Give grep a chance to find the usages: // timedmedia-derivative-state-transcodes, timedmedia-derivative-state-active, @@ -74,7 +75,7 @@ . $this-msg( 'timedmedia-derivative-state-' . $state, $stats[ $state ]['total'] )-escaped() . /h2 ); - foreach( $wgEnabledTranscodeSet as $key ) { + foreach( $allTranscodes as $key ) { if ( $stats[ $state ][ $key ] ) { $out-addHTML( $stats[ $state ][ $key ] @@ -129,20 +130,21 @@ } private function getStats() { - global $wgEnabledTranscodeSet; + global $wgEnabledTranscodeSet, $wgEnabledAudioTranscodeSet; + $allTranscodes = array_merge( $wgEnabledTranscodeSet, $wgEnabledAudioTranscodeSet ); $stats = array(); $dbr = wfGetDB( DB_SLAVE ); $stats[ 'transcodes' ] = array( 'total' = 0 ); foreach ( $this-transcodeStates as $state = $condition ) { $stats[ $state ] = array( 'total' = 0 ); - foreach( $wgEnabledTranscodeSet as $type ) { + foreach( $allTranscodes as $type ) { // Important to pre-initialize, as can give // warnings if you don't have a lot of things in transcode table. $stats[ $state ][ $type ] = 0; } } foreach ( $this-transcodeStates as $state = $condition ) { - $cond = array( 'transcode_key' = $wgEnabledTranscodeSet ); + $cond = array( 'transcode_key' = $allTranscodes ); $cond[] = $condition; $res = $dbr-select( 'transcode', array('COUNT(*) as count', 'transcode_key'), @@ -158,7 +160,7 @@ } $res = $dbr-select( 'transcode', array( 'COUNT(*) as count', 'transcode_key' ), - array( 'transcode_key' = $wgEnabledTranscodeSet ), + array( 'transcode_key' = $allTranscodes ), __METHOD__, array( 'GROUP BY' = 'transcode_key' ) ); diff --git a/TimedMediaHandler.hooks.php b/TimedMediaHandler.hooks.php index 1807d86..0f3202b 100644 --- a/TimedMediaHandler.hooks.php +++ b/TimedMediaHandler.hooks.php @@ -189,7 +189,7 @@ global $wgEnableTranscode, $wgEnabledAudioTranscodeSet; // don't show the transcode table if transcode is disabled - if( $wgEnableTranscode === false ){ + if( !$wgEnableTranscode !$wgEnabledAudioTranscodeSet ){ return false; } // Can't find file -- To view, visit https://gerrit.wikimedia.org/r/69023 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I99d29908f1d2a0ebdd3a44db4652a0aa4e35b034 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/TimedMediaHandler Gerrit-Branch: master Gerrit-Owner: Brian Wolff bawolff...@gmail.com Gerrit-Reviewer: J jger...@wikimedia.org Gerrit-Reviewer: Rahul21 rahul14...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org
[MediaWiki-commits] [Gerrit] Get rid of many getPrefixedEtity id usages in repo - change (mediawiki...Wikibase)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/69300 Change subject: Get rid of many getPrefixedEtity id usages in repo .. Get rid of many getPrefixedEtity id usages in repo Change-Id: Ieddc5a6b8ec48fbd3fafc4f365944c401ac4300d --- M repo/includes/EntityView.php M repo/includes/ItemDisambiguation.php M repo/includes/ItemView.php M repo/includes/actions/HistoryEntityAction.php M repo/includes/actions/ViewEntityAction.php 5 files changed, 57 insertions(+), 18 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/00/69300/1 diff --git a/repo/includes/EntityView.php b/repo/includes/EntityView.php index 5a2caa9..29273e3 100644 --- a/repo/includes/EntityView.php +++ b/repo/includes/EntityView.php @@ -1,12 +1,23 @@ ?php namespace Wikibase; -use Html, ParserOptions, ParserOutput, Title, Language, IContextSource, OutputPage, MediaWikiSite; -use MWException, FormatJson; -use \Wikibase\Lib\Serializers\SerializerFactory; -use \ValueFormatters\ValueFormatterFactory, - \ValueFormatters\FormatterOptions, - \ValueFormatters\ValueFormatter; + +use Html; +use ParserOptions; +use ParserOutput; +use Title; +use Language; +use IContextSource; +use OutputPage; +use MediaWikiSite; +use MWException; +use FormatJson; +use Wikibase\Lib\EntityIdFormatter; +use Wikibase\Lib\Serializers\SerializerFactory; +use ValueFormatters\ValueFormatterFactory; +use ValueFormatters\FormatterOptions; +use ValueFormatters\ValueFormatter; +use Wikibase\Repo\WikibaseRepo; /** * Base class for creating views for all different kinds of Wikibase\Entity. @@ -41,6 +52,7 @@ * @author Daniel Werner */ abstract class EntityView extends \ContextSource { + /** * @since 0.4 * @@ -49,7 +61,13 @@ protected $valueFormatters; /** +* @var EntityIdFormatter +*/ + protected $idFormatter; + + /** * Maps entity types to the corresponding entity view. +* FIXME: remove this stuff, big OCP violation * * @since 0.2 * @@ -81,6 +99,9 @@ $context = \RequestContext::getMain(); } $this-setContext( $context ); + + // TODO: this need to be properly injected + $this-idFormatter = WikibaseRepo::getDefaultInstance()-getIdFormatter(); } /** @@ -99,7 +120,7 @@ //NOTE: even though $editable is unused at the moment, we will need it for the JS-less editing model. $info = $this-extractEntityInfo( $entity, $lang ); - $entityId = $entity-getEntity()-getPrefixedId() ?: 'new'; // if id is not set, use 'new' suffix for css classes + $entityId = $entity-getEntity()-getId() ?: 'new'; // if id is not set, use 'new' suffix for css classes $html = ''; $html .= wfTemplate( 'wb-entity', @@ -137,6 +158,10 @@ wfProfileOut( __METHOD__ ); return $html; + } + + protected function getFormattedIdForEntity( Entity $entity ) { + return $this-idFormatter-format( $entity-getId() ); } /** @@ -416,13 +441,13 @@ $alternatingClass = ( $rowNumber++ % 2 ) ? 'even' : 'uneven'; $editLabelLink = $specialLabelPage-getTitle()-getLocalURL() - . '/' . $entity-getEntity()-getPrefixedId() . '/' . $language; + . '/' . $this-getFormattedIdForEntity( $entity-getEntity() ) . '/' . $language; // TODO: this if is here just until the SetDescription special page exists and // can be removed then if ( $specialDescriptionPage !== null ) { $editDescriptionLink = $specialDescriptionPage-getTitle()-getLocalURL() - . '/' . $entity-getEntity()-getPrefixedId() . '/' . $language; + . '/' . $this-getFormattedIdForEntity( $entity-getEntity() ) . '/' . $language; } else { $editDescriptionLink = ''; } @@ -695,7 +720,7 @@ } return array( 'lang' = $lang, - 'id' = $entity-getEntity()-getPrefixedId() + 'id' = $this-getFormattedIdForEntity( $entity-getEntity() ) ); } @@ -785,7 +810,7 @@ $out-addJsConfigVars( 'wbDataLangName', Utils::fetchLanguageName( $langCode ) ); // entity specific data - $out-addJsConfigVars( 'wbEntityId', $entity-getPrefixedId() ); + $out-addJsConfigVars( 'wbEntityId',
[MediaWiki-commits] [Gerrit] clean up squid NoPurge list for beta labs - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: clean up squid NoPurge list for beta labs .. clean up squid NoPurge list for beta labs the regular ip address of the squid shouldn't be there but the local ip, used by ssl terminators, should be Change-Id: Ib812569daef45458345b0d1d74903bd83ef9f3b7 --- M wmf-config/squid-labs.php 1 file changed, 7 insertions(+), 1 deletion(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/squid-labs.php b/wmf-config/squid-labs.php index 73470dc..ae6a144 100644 --- a/wmf-config/squid-labs.php +++ b/wmf-config/squid-labs.php @@ -1,4 +1,10 @@ ?php $wgSquidServers = array( '10.4.0.17' ); -$wgSquidServersNoPurge = array( '10.4.0.17' ); \ No newline at end of file + +# our text squid in beta labs gets forwarded requests +# from the ssl terminator, to 127.0.0.1, so adding that +# address to the NoPurge list so that XFF headers for it +# will be stripped; purge requests should get to it +# on the address in the SquidServers list +$wgSquidServersNoPurge = array( '127.0.0.1' ); -- To view, visit https://gerrit.wikimedia.org/r/69299 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib812569daef45458345b0d1d74903bd83ef9f3b7 Gerrit-PatchSet: 2 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: ArielGlenn ar...@wikimedia.org Gerrit-Reviewer: Hashar has...@free.fr Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Got tid of getPrefixedId in entity serializer - change (mediawiki...Wikibase)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/69301 Change subject: Got tid of getPrefixedId in entity serializer .. Got tid of getPrefixedId in entity serializer This forces chanegs elsewhere since the entity serializer needs to request a id formatter as dependency, due to the lack of reasonable default Change-Id: If66bc0716ee6124a73525d4b4016b63ffded3116 --- M client/includes/WikibaseLibrary.php M lib/includes/serializers/EntitySerializer.php M lib/includes/serializers/SerializationOptions.php M lib/includes/serializers/SerializerFactory.php M repo/includes/EntityView.php M repo/includes/api/GetEntities.php M repo/includes/specials/EntityDataSerializationService.php 7 files changed, 61 insertions(+), 49 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/01/69301/1 diff --git a/client/includes/WikibaseLibrary.php b/client/includes/WikibaseLibrary.php index 17bb45c..8123e65 100644 --- a/client/includes/WikibaseLibrary.php +++ b/client/includes/WikibaseLibrary.php @@ -26,6 +26,8 @@ use ValueParsers\ParseException; use Wikibase\Client\WikibaseClient; +use Wikibase\Lib\Serializers\EntitySerializationOptions; +use Wikibase\Lib\Serializers\SerializerFactory; class Scribunto_LuaWikibaseLibrary extends Scribunto_LuaLibraryBase { @@ -72,10 +74,10 @@ return array( null ); } - $serializerFactory = new \Wikibase\Lib\Serializers\SerializerFactory(); + $serializerFactory = new SerializerFactory(); $serializer = $serializerFactory-newSerializerForObject( $entityObject ); - $opt = new \Wikibase\Lib\Serializers\EntitySerializationOptions(); + $opt = new EntitySerializationOptions( WikibaseClient::getDefaultInstance()-getEntityIdFormatter() ); $serializer-setOptions( $opt ); try { diff --git a/lib/includes/serializers/EntitySerializer.php b/lib/includes/serializers/EntitySerializer.php index 1f4ce36..782eab8 100644 --- a/lib/includes/serializers/EntitySerializer.php +++ b/lib/includes/serializers/EntitySerializer.php @@ -1,8 +1,11 @@ ?php namespace Wikibase\Lib\Serializers; -use ApiResult, MWException; + +use ApiResult; +use MWException; use Wikibase\Entity; +use Wikibase\Repo\WikibaseRepo; /** * Serializer for entities. @@ -47,13 +50,9 @@ * * @since 0.2 * -* @param EntitySerializationOptions|null $options +* @param EntitySerializationOptions $options */ - public function __construct( EntitySerializationOptions $options = null ) { - if ( $options === null ) { - $options = new EntitySerializationOptions(); - } - + public function __construct( EntitySerializationOptions $options ) { parent::__construct( $options ); } @@ -72,7 +71,7 @@ throw new MWException( 'EntitySerializer can only serialize Entity objects' ); } - $serialization['id'] = $entity-getPrefixedId(); + $serialization['id'] = $this-options-getIdFormatter()-format( $entity-getId() ); $serialization['type'] = $entity-getType(); foreach ( $this-options-getProps() as $key ) { @@ -236,30 +235,6 @@ } return $value; - } - - /** -* Returns an EntitySerializer for the provided entity. -* If there is no specific serializer registered for the type of entity, -* a plain EntitySerializer is returned, else the more specific one is. -* -* @since 0.3 -* @deprecated since 0.4 -* -* @param Entity $entity -* @param EntitySerializationOptions $options -* -* @return EntitySerializer -*/ - public static function newForEntity( Entity $entity, EntitySerializationOptions $options = null ) { - $factory = new SerializerFactory(); - - $serializer = $factory-newSerializerForObject( $entity ); - $serializer-setOptions( $options ); - - assert( $serializer instanceof EntitySerializer ); - - return $serializer; } } diff --git a/lib/includes/serializers/SerializationOptions.php b/lib/includes/serializers/SerializationOptions.php index 086f7d9..5895045 100644 --- a/lib/includes/serializers/SerializationOptions.php +++ b/lib/includes/serializers/SerializationOptions.php @@ -2,6 +2,9 @@ namespace Wikibase\Lib\Serializers; use MWException; +use ValueFormatters\ValueFormatter; +use Wikibase\EntityId; +use Wikibase\Lib\EntityIdFormatter; /** * Options for Serializer objects. @@ -148,6 +151,22 @@ protected $sortDirection = self::SORT_NONE; /** +* @since 0.4 +
[MediaWiki-commits] [Gerrit] (Bug 45194) Fix: Remove Bugfix that is now unnecessary - change (mediawiki...Math)
Physikerwelt has uploaded a new change for review. https://gerrit.wikimedia.org/r/69302 Change subject: (Bug 45194) Fix: Remove Bugfix that is now unnecessary .. (Bug 45194) Fix: Remove Bugfix that is now unnecessary Bug: 45194 Change-Id: Ibb288aba0fd68f25ef012f82489d6f87d9bac072 --- M tests/MathDatabaseTest.php 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Math refs/changes/02/69302/1 diff --git a/tests/MathDatabaseTest.php b/tests/MathDatabaseTest.php index 0ff4d52..280f387 100644 --- a/tests/MathDatabaseTest.php +++ b/tests/MathDatabaseTest.php @@ -118,7 +118,6 @@ ); } global $wgDebugMath; - sleep( 1 ); // see https://bugzilla.wikimedia.org/show_bug.cgi?id=45194 $this-db-dropTable( math, __METHOD__ ); $wgDebugMath = true; $dbu = DatabaseUpdater::newForDB( $this-db ); -- To view, visit https://gerrit.wikimedia.org/r/69302 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibb288aba0fd68f25ef012f82489d6f87d9bac072 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Math Gerrit-Branch: LaTeXML Gerrit-Owner: Physikerwelt w...@physikerwelt.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] (Bug 45194) Fix: Remove Bugfix that is now unnecessary - change (mediawiki...Math)
Physikerwelt has submitted this change and it was merged. Change subject: (Bug 45194) Fix: Remove Bugfix that is now unnecessary .. (Bug 45194) Fix: Remove Bugfix that is now unnecessary Bug: 45194 Change-Id: Ibb288aba0fd68f25ef012f82489d6f87d9bac072 --- M tests/MathDatabaseTest.php 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: Physikerwelt: Verified; Looks good to me, approved diff --git a/tests/MathDatabaseTest.php b/tests/MathDatabaseTest.php index 0ff4d52..280f387 100644 --- a/tests/MathDatabaseTest.php +++ b/tests/MathDatabaseTest.php @@ -118,7 +118,6 @@ ); } global $wgDebugMath; - sleep( 1 ); // see https://bugzilla.wikimedia.org/show_bug.cgi?id=45194 $this-db-dropTable( math, __METHOD__ ); $wgDebugMath = true; $dbu = DatabaseUpdater::newForDB( $this-db ); -- To view, visit https://gerrit.wikimedia.org/r/69302 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibb288aba0fd68f25ef012f82489d6f87d9bac072 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Math Gerrit-Branch: LaTeXML Gerrit-Owner: Physikerwelt w...@physikerwelt.de Gerrit-Reviewer: Physikerwelt w...@physikerwelt.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Log blacklist hits to Special:Log - change (mediawiki...SpamBlacklist)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/69303 Change subject: Log blacklist hits to Special:Log .. Log blacklist hits to Special:Log By default this is disabled, and is controlled by $wgLogBlacklistHits. It is only viewable by users with the spamblacklistlog permission, which by default is sysops. Bug: 1542 Change-Id: I7b1ee2b3bb02b693d695bf66d157e2c33526c919 --- M SpamBlacklist.i18n.php M SpamBlacklist.php M SpamBlacklist_body.php 3 files changed, 28 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SpamBlacklist refs/changes/03/69303/1 diff --git a/SpamBlacklist.i18n.php b/SpamBlacklist.i18n.php index 6824f0f..0ae352d 100644 --- a/SpamBlacklist.i18n.php +++ b/SpamBlacklist.i18n.php @@ -54,6 +54,9 @@ 'spam-invalid-lines' = The following spam blacklist {{PLURAL:$1|line is an|lines are}} invalid regular {{PLURAL:$1|expression|expressions}} and {{PLURAL:$1|needs|need}} to be corrected before saving the page:, 'spam-blacklist-desc' = 'Regex-based anti-spam tool: [[MediaWiki:Spam-blacklist]] and [[MediaWiki:Spam-whitelist]]', + 'log-name-spamblacklist' = 'Spam blacklist log', + 'log-description-spamblacklist' = 'These events track spamblacklist hits.', + 'logentry-spamblacklist-hit' = '$1 caused a spam blacklist hit on $3', ); /** Message documentation (Message documentation) @@ -79,6 +82,12 @@ Parameters: * $1 - the number of bad lines', 'spam-blacklist-desc' = '{{desc|name=Spam Blacklist|url=http://www.mediawiki.org/wiki/Extension:SpamBlacklist}}', +'log-name-spamblacklist' = 'Name of log that appears on [[Special:Log]].', +'log-description-spamblacklist' = 'Description of spam blacklist log', +'logentry-spamblacklist-hit' = 'Log entry that is created when a user adds a link that is blacklisted on the spam blacklist. Parameters: +* $1 is a user link, for example Jane Doe (Talk | contribs). +* $2 is a username. Can be used for GENDER. +* $3 is the page the user attempted to edit.', ); /** Aragonese (aragonés) diff --git a/SpamBlacklist.php b/SpamBlacklist.php index f3e27f3..2631d4b 100644 --- a/SpamBlacklist.php +++ b/SpamBlacklist.php @@ -24,6 +24,11 @@ $wgBlacklistSettings = array(); /** + * Log blacklist hits to Special:Log + */ +$wgLogBlacklistHits = false; + +/** * @deprecated */ $wgSpamBlacklistFiles = $wgBlacklistSettings['spam']['files']; @@ -45,3 +50,8 @@ $wgAutoloadClasses['SpamBlacklistHooks'] = $dir . 'SpamBlacklistHooks.php'; $wgAutoloadClasses['SpamBlacklist'] = $dir . 'SpamBlacklist_body.php'; $wgAutoloadClasses['SpamRegexBatch'] = $dir . 'SpamRegexBatch.php'; + +$wgLogTypes[] = 'spamblacklist'; +$wgLogActionsHandlers['spamblacklist/*'] = 'LogFormatter'; +$wgLogRestrictions['spamblacklist'] = 'spamblacklistlog'; +$wgGroupPermissions['sysop']['spamblacklistlog'] = true; diff --git a/SpamBlacklist_body.php b/SpamBlacklist_body.php index 7279e20..5389953 100644 --- a/SpamBlacklist_body.php +++ b/SpamBlacklist_body.php @@ -29,7 +29,7 @@ /** * @var $wgParser Parser */ - global $wgParser, $wgUser; + global $wgParser, $wgUser, $wgLogBlacklistHits; $fname = 'wfSpamBlacklistFilter'; wfProfileIn( $fname ); @@ -99,6 +99,14 @@ $ip = $wgRequest-getIP(); $imploded = implode( ' ', $matches[0] ); wfDebugLog( 'SpamBlacklistHit', $ip caught submitting spam: $imploded\n ); + if ( $wgLogBlacklistHits ) { + $logEntry = new ManualLogEntry( 'spamblacklist', 'hit' ); + $logEntry-setPerformer( $wgUser ); + $logEntry-setTarget( $title ); + $logEntry-setComment( $imploded ); + $logid = $logEntry-insert(); + $logEntry-publish( $logid, rc ); + } if( $retVal === false ){ $retVal = array(); } -- To view, visit https://gerrit.wikimedia.org/r/69303 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7b1ee2b3bb02b693d695bf66d157e2c33526c919 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SpamBlacklist Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org
[MediaWiki-commits] [Gerrit] Remove global scope assumptions in client and exec code in n... - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Remove global scope assumptions in client and exec code in non global scope .. Remove global scope assumptions in client and exec code in non global scope Change-Id: I0722413d09a48e4d54680ea5888e419fc7e9075e --- M client/WikibaseClient.php 1 file changed, 106 insertions(+), 99 deletions(-) Approvals: Daniel Kinzler: Looks good to me, approved jenkins-bot: Verified diff --git a/client/WikibaseClient.php b/client/WikibaseClient.php index 2d54e64..cff3235 100644 --- a/client/WikibaseClient.php +++ b/client/WikibaseClient.php @@ -28,10 +28,7 @@ return; } -define( 'WBC_VERSION', '0.4 alpha' - . ( defined( 'WB_EXPERIMENTAL_FEATURES' ) WB_EXPERIMENTAL_FEATURES ? '/experimental' : '' ) ); - -if ( version_compare( $wgVersion, '1.21c', '' ) ) { // Needs to be 1.21c because version_compare() works in confusing ways. +if ( version_compare( $GLOBALS['wgVersion'], '1.21c', '' ) ) { // Needs to be 1.21c because version_compare() works in confusing ways. die( bError:/b Wikibase requires MediaWiki 1.21 alpha or above.\n ); } @@ -41,122 +38,132 @@ } if ( !defined( 'WBL_VERSION' ) ) { - die( 'bError:/b WikibaseClient depends on the a href=https://www.mediawiki.org/wiki/Extension:WikibaseLib;WikibaseLib/a extension.' ); + throw new Exception( 'WikibaseClient depends on the WikibaseLib extension.' ); } -$wgExtensionCredits['wikibase'][] = array( - 'path' = __DIR__, - 'name' = 'Wikibase Client', - 'version' = WBC_VERSION, - 'author' = array( - 'The Wikidata team', // TODO: link? - ), - 'url' = 'https://www.mediawiki.org/wiki/Extension:Wikibase_Client', - 'descriptionmsg' = 'wikibase-client-desc' -); +define( 'WBC_VERSION', '0.4 alpha' + . ( defined( 'WB_EXPERIMENTAL_FEATURES' ) WB_EXPERIMENTAL_FEATURES ? '/experimental' : '' ) ); -$dir = __DIR__ . '/'; +call_user_func( function() { + global $wgExtensionCredits, $wgExtensionMessagesFiles, $wgAutoloadClasses, $wgHooks; + global $wgAPIMetaModules, $wgSpecialPages, $wgSpecialPageGroups, $wgResourceModules; + global $wgWBClientStores, $wgWBClientSettings, $wgWBSettings; -// i18n -$wgExtensionMessagesFiles['wikibaseclient']= $dir . 'WikibaseClient.i18n.php'; -$wgExtensionMessagesFiles['Wikibaseclientalias'] = $dir . 'WikibaseClient.i18n.alias.php'; -$wgExtensionMessagesFiles['wikibaseclientmagic'] = $dir . 'WikibaseClient.i18n.magic.php'; -// Autoloading -$wgAutoloadClasses['Wikibase\ClientHooks'] = $dir . 'WikibaseClient.hooks.php'; + $wgExtensionCredits['wikibase'][] = array( + 'path' = __DIR__, + 'name' = 'Wikibase Client', + 'version' = WBC_VERSION, + 'author' = array( + 'The Wikidata team', // TODO: link? + ), + 'url' = 'https://www.mediawiki.org/wiki/Extension:Wikibase_Client', + 'descriptionmsg' = 'wikibase-client-desc' + ); -$wgAutoloadClasses['Wikibase\CachedEntity']= $dir . 'includes/CachedEntity.php'; -$wgAutoloadClasses['Wikibase\EntityCacheUpdater'] = $dir . 'includes/EntityCacheUpdater.php'; -$wgAutoloadClasses['Wikibase\EntityIdPropertyUpdater'] = $dir . 'includes/EntityIdPropertyUpdater.php'; -$wgAutoloadClasses['Wikibase\InterwikiSorter'] = $dir . 'includes/InterwikiSorter.php'; -$wgAutoloadClasses['Wikibase\LangLinkHandler'] = $dir . 'includes/LangLinkHandler.php'; -$wgAutoloadClasses['Wikibase\ChangeHandler'] = $dir . 'includes/ChangeHandler.php'; -$wgAutoloadClasses['Wikibase\NamespaceChecker']= $dir . 'includes/NamespaceChecker.php'; -$wgAutoloadClasses['Wikibase\RepoItemLinkGenerator'] = $dir . 'includes/RepoItemLinkGenerator.php'; -$wgAutoloadClasses['Wikibase\RepoLinker'] = $dir . 'includes/RepoLinker.php'; -$wgAutoloadClasses['Wikibase\Client\WikibaseClient'] = $dir . 'includes/WikibaseClient.php'; -$wgAutoloadClasses['Scribunto_LuaWikibaseLibrary'] = $dir . 'includes/WikibaseLibrary.php'; -$wgAutoloadClasses['Wikibase\PageUpdater'] = $dir . 'includes/PageUpdater.php'; -$wgAutoloadClasses['Wikibase\WikiPageUpdater'] = $dir . 'includes/WikiPageUpdater.php'; + $dir = __DIR__ . '/'; -// includes/api -$wgAutoloadClasses['Wikibase\ApiClientInfo'] = $dir . 'includes/api/ApiClientInfo.php'; + // i18n + $wgExtensionMessagesFiles['wikibaseclient'] = $dir . 'WikibaseClient.i18n.php'; + $wgExtensionMessagesFiles['Wikibaseclientalias']= $dir . 'WikibaseClient.i18n.alias.php'; + $wgExtensionMessagesFiles['wikibaseclientmagic']= $dir . 'WikibaseClient.i18n.magic.php'; -// includes/modules
[MediaWiki-commits] [Gerrit] Make EntityId-getPrefix private - change (mediawiki...WikibaseDataModel)
jenkins-bot has submitted this change and it was merged. Change subject: Make EntityId-getPrefix private .. Make EntityId-getPrefix private Change-Id: Ie2e194468fdf3d259902ba2965d3d9aa45785ce3 --- M DataModel/Entity/EntityId.php 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Daniel Kinzler: Looks good to me, approved jenkins-bot: Verified diff --git a/DataModel/Entity/EntityId.php b/DataModel/Entity/EntityId.php index 8488b46..73c8488 100644 --- a/DataModel/Entity/EntityId.php +++ b/DataModel/Entity/EntityId.php @@ -76,11 +76,11 @@ * Returns the prefixed used when serializing the ID. * * @since 0.3 -* @deprecated since 0.4 +* @deprecated since 0.4, private since 0.5 * * @return string */ - public function getPrefix() { + private function getPrefix() { static $prefixMap = false; if ( $prefixMap === false ) { -- To view, visit https://gerrit.wikimedia.org/r/69117 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie2e194468fdf3d259902ba2965d3d9aa45785ce3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikibaseDataModel Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com Gerrit-Reviewer: Daniel Kinzler daniel.kinz...@wikimedia.de Gerrit-Reviewer: Henning Snater henning.sna...@wikimedia.de Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Get rid of deprecated method usage in repo API tests - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Get rid of deprecated method usage in repo API tests .. Get rid of deprecated method usage in repo API tests Change-Id: Id82b85f203429127c493ce721e19225e483d0945 --- M repo/tests/phpunit/includes/api/CreateClaimTest.php M repo/tests/phpunit/includes/api/GetClaimsTest.php 2 files changed, 23 insertions(+), 11 deletions(-) Approvals: Daniel Kinzler: Looks good to me, approved jenkins-bot: Verified diff --git a/repo/tests/phpunit/includes/api/CreateClaimTest.php b/repo/tests/phpunit/includes/api/CreateClaimTest.php index 1cf4e17..f19fe58 100644 --- a/repo/tests/phpunit/includes/api/CreateClaimTest.php +++ b/repo/tests/phpunit/includes/api/CreateClaimTest.php @@ -2,6 +2,7 @@ namespace Wikibase\Test\Api; use Wikibase\Entity; +use Wikibase\Repo\WikibaseRepo; /** * Unit tests for the Wikibase\ApiCreateClaim class. @@ -72,9 +73,9 @@ $params = array( 'action' = 'wbcreateclaim', - 'entity' = $entity-getPrefixedId(), + 'entity' = $this-getFormattedIdForEntity( $entity ), 'snaktype' = 'value', - 'property' = $property-getPrefixedId(), + 'property' = $this-getFormattedIdForEntity( $property ), 'value' = 'foo', 'token' = $GLOBALS['wgUser']-getEditToken() ); @@ -91,7 +92,7 @@ $entityId = \Wikibase\Entity::getIdFromClaimGuid( $claim['id'] ); - $this-assertEquals( $entity-getPrefixedId(), $entityId ); + $this-assertEquals( $this-getFormattedIdForEntity( $entity ), $entityId ); $this-assertEquals( 'value', $claim['mainsnak']['snaktype'] ); @@ -206,11 +207,11 @@ $params['token'] = $GLOBALS['wgUser']-getEditToken(); if ( array_key_exists( 'entity', $params ) $params['entity'] === '-' ) { - $params['entity'] = $entity-getPrefixedId(); + $params['entity'] = $this-getFormattedIdForEntity( $entity ); } if ( array_key_exists( 'property', $params ) $params['property'] === '-' ) { - $params['property'] = $property-getPrefixedId(); + $params['property'] = $this-getFormattedIdForEntity( $entity ); } try { @@ -226,6 +227,11 @@ $this-assertFalse( $entityContent-getEntity()-hasClaims() ); } + protected function getFormattedIdForEntity( Entity $entity ) { + $idFormatter = WikibaseRepo::getDefaultInstance()-getIdFormatter(); + return $idFormatter-format( $entity-getId() ); + } + public function testMultipleRequests() { /** * @var Entity $entity @@ -235,9 +241,9 @@ $params = array( 'action' = 'wbcreateclaim', - 'entity' = $entity-getPrefixedId(), + 'entity' = $this-getFormattedIdForEntity( $entity ), 'snaktype' = 'value', - 'property' = $property-getPrefixedId(), + 'property' = $this-getFormattedIdForEntity( $property ), 'value' = 'foo', 'token' = $GLOBALS['wgUser']-getEditToken() ); @@ -252,9 +258,9 @@ $params = array( 'action' = 'wbcreateclaim', - 'entity' = $entity-getPrefixedId(), + 'entity' = $this-getFormattedIdForEntity( $entity ), 'snaktype' = 'value', - 'property' = $property-getPrefixedId(), + 'property' = $this-getFormattedIdForEntity( $property ), 'value' = 'bar', 'token' = $GLOBALS['wgUser']-getEditToken(), 'baserevid' = $revId diff --git a/repo/tests/phpunit/includes/api/GetClaimsTest.php b/repo/tests/phpunit/includes/api/GetClaimsTest.php index 0888c1f..4bb36e2 100644 --- a/repo/tests/phpunit/includes/api/GetClaimsTest.php +++ b/repo/tests/phpunit/includes/api/GetClaimsTest.php @@ -4,6 +4,7 @@ use Wikibase\Entity; use Wikibase\Claim; use Wikibase\Claims; +use Wikibase\Repo\WikibaseRepo; use Wikibase\Statement; /** @@ -85,7 +86,7 @@ foreach ( $entities as $entity ) { $params = array( 'action' = 'wbgetclaims', - 'entity' = $entity-getPrefixedId(), + 'entity' = $this-getFormattedIdForEntity( $entity ), ); $argLists[] = array( $params, $entity-getClaims() ); @@
[MediaWiki-commits] [Gerrit] add upload cache to squids list for labs - change (operations/mediawiki-config)
ArielGlenn has uploaded a new change for review. https://gerrit.wikimedia.org/r/69304 Change subject: add upload cache to squids list for labs .. add upload cache to squids list for labs Change-Id: Ia0333fb2c8e344635f7bf3582297ab394f61b155 --- M wmf-config/squid-labs.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/04/69304/1 diff --git a/wmf-config/squid-labs.php b/wmf-config/squid-labs.php index ae6a144..b3f817b 100644 --- a/wmf-config/squid-labs.php +++ b/wmf-config/squid-labs.php @@ -1,6 +1,6 @@ ?php -$wgSquidServers = array( '10.4.0.17' ); +$wgSquidServers = array( '10.4.0.17', '10.4.0.214' ); # our text squid in beta labs gets forwarded requests # from the ssl terminator, to 127.0.0.1, so adding that -- To view, visit https://gerrit.wikimedia.org/r/69304 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia0333fb2c8e344635f7bf3582297ab394f61b155 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: ArielGlenn ar...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] add upload cache to squids list for labs - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: add upload cache to squids list for labs .. add upload cache to squids list for labs Change-Id: Ia0333fb2c8e344635f7bf3582297ab394f61b155 --- M wmf-config/squid-labs.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/squid-labs.php b/wmf-config/squid-labs.php index ae6a144..b3f817b 100644 --- a/wmf-config/squid-labs.php +++ b/wmf-config/squid-labs.php @@ -1,6 +1,6 @@ ?php -$wgSquidServers = array( '10.4.0.17' ); +$wgSquidServers = array( '10.4.0.17', '10.4.0.214' ); # our text squid in beta labs gets forwarded requests # from the ssl terminator, to 127.0.0.1, so adding that -- To view, visit https://gerrit.wikimedia.org/r/69304 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia0333fb2c8e344635f7bf3582297ab394f61b155 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: ArielGlenn ar...@wikimedia.org Gerrit-Reviewer: Hashar has...@free.fr Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix wgWBSettings alias. - change (mediawiki...Wikibase)
Daniel Kinzler has uploaded a new change for review. https://gerrit.wikimedia.org/r/69305 Change subject: Fix wgWBSettings alias. .. Fix wgWBSettings alias. Aliassing globals in a non-global scope is tricky. So use trickery. Change-Id: I0a5e8971ed8b7668578176bcc28232033fa70f09 --- M client/WikibaseClient.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/05/69305/1 diff --git a/client/WikibaseClient.php b/client/WikibaseClient.php index cff3235..2583f0d 100644 --- a/client/WikibaseClient.php +++ b/client/WikibaseClient.php @@ -47,7 +47,7 @@ call_user_func( function() { global $wgExtensionCredits, $wgExtensionMessagesFiles, $wgAutoloadClasses, $wgHooks; global $wgAPIMetaModules, $wgSpecialPages, $wgSpecialPageGroups, $wgResourceModules; - global $wgWBClientStores, $wgWBClientSettings, $wgWBSettings; + global $wgWBClientStores, $wgWBClientSettings; $wgExtensionCredits['wikibase'][] = array( @@ -161,7 +161,7 @@ require( __DIR__ . '/config/WikibaseClient.default.php' ) ); - $wgWBSettings = $wgWBClientSettings; // B/C + $GLOBALS['wgWBSettings'] = $GLOBALS['wgWBClientSettings']; // B/C alias if ( defined( 'WB_EXPERIMENTAL_FEATURES' ) WB_EXPERIMENTAL_FEATURES ) { include_once( $dir . 'config/WikibaseClient.experimental.php' ); -- To view, visit https://gerrit.wikimedia.org/r/69305 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0a5e8971ed8b7668578176bcc28232033fa70f09 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Daniel Kinzler daniel.kinz...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Adds support for sorting Special:Properties by usage - change (mediawiki...SemanticMediaWiki)
Nischayn22 has uploaded a new change for review. https://gerrit.wikimedia.org/r/69306 Change subject: Adds support for sorting Special:Properties by usage .. Adds support for sorting Special:Properties by usage This needs more work and has the following problems * No UI * Only works for SQLStore3 Change-Id: I2b0dfab74c9a35af54eb65c83362e8665afc1b56 --- M includes/SMW_QueryPage.php M includes/specials/SMW_SpecialProperties.php M includes/storage/SQLStore/SMW_SQLStore3_SpecialPageHandlers.php 3 files changed, 17 insertions(+), 32 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SemanticMediaWiki refs/changes/06/69306/1 diff --git a/includes/SMW_QueryPage.php b/includes/SMW_QueryPage.php index a479d96..c3a5931 100644 --- a/includes/SMW_QueryPage.php +++ b/includes/SMW_QueryPage.php @@ -46,13 +46,14 @@ * @param $offset database query offset * @param $limit database query limit */ - function doQuery( $offset = false, $limit = false ) { + function doQuery( $offset = false, $limit = false, $sort_by = '' ) { $out = $this-getOutput(); $sk = $this-getSkin(); $options = new SMWRequestOptions(); $options-limit = $limit; $options-offset = $offset; + $options-sort_by = $sort_by; $options-sort = true; $res = $this-getResults( $options ); $num = count( $res ); diff --git a/includes/specials/SMW_SpecialProperties.php b/includes/specials/SMW_SpecialProperties.php index f24899f..2896f07 100644 --- a/includes/specials/SMW_SpecialProperties.php +++ b/includes/specials/SMW_SpecialProperties.php @@ -27,7 +27,8 @@ $rep = new SMWPropertiesPage(); list( $limit, $offset ) = wfCheckLimits(); - $rep-doQuery( $offset, $limit ); + $sort_by = $this-getRequest()-getText( 'sort_by' ); + $rep-doQuery( $offset, $limit, $sort_by ); // Ensure locally collected output data is pushed to the output! SMWOutputs::commitToOutputPage( $wgOut ); diff --git a/includes/storage/SQLStore/SMW_SQLStore3_SpecialPageHandlers.php b/includes/storage/SQLStore/SMW_SQLStore3_SpecialPageHandlers.php index cc1492f..d38dadc 100644 --- a/includes/storage/SQLStore/SMW_SQLStore3_SpecialPageHandlers.php +++ b/includes/storage/SQLStore/SMW_SQLStore3_SpecialPageHandlers.php @@ -61,6 +61,9 @@ $options['LIMIT'] = $requestoptions-limit; $options['OFFSET'] = max( $requestoptions-offset, 0 ); } + if ( $requestoptions-sort_by !== '' ) { + $options['ORDER BY'] = $requestoptions-sort_by; + } } $conds = array( @@ -70,33 +73,16 @@ if ( $unusedProperties ) { $conds['usage_count'] = 0; - - $res = $dbr-select( - array( SMWSql3SmwIds::tableName, SMWSQLStore3::PROPERTY_STATISTICS_TABLE ), - array( 'smw_title', 'usage_count' ), - $conds, - __METHOD__, - $options, - array( SMWSql3SmwIds::tableName = array( 'INNER JOIN', array( 'smw_id=p_id' ) ) ) - ); - } else { - $res = $dbr-select( - SMWSql3SmwIds::tableName, - array( 'smw_id', 'smw_title' ), - $conds, - __METHOD__, - $options - ); - - $propertyIds = array(); - - foreach ( $res as $row ) { - $propertyIds[] = (int)$row-smw_id; - } - - $statsTable = new \SMW\SQLStore\PropertyStatisticsTable( SMWSQLStore3::PROPERTY_STATISTICS_TABLE, $dbr ); - $usageCounts = $statsTable-getUsageCounts( $propertyIds ); } + + $res = $dbr-select( + array( SMWSql3SmwIds::tableName, SMWSQLStore3::PROPERTY_STATISTICS_TABLE ), + array( 'smw_title', 'usage_count' ), + $conds, + __METHOD__, + $options, + array( SMWSql3SmwIds::tableName = array( 'INNER JOIN', array( 'smw_id=p_id' ) ) ) + ); $result = array(); foreach ( $res as $row ) { @@ -112,10 +98,7 @@ if ( $unusedProperties){ $result[] = $property;
[MediaWiki-commits] [Gerrit] updating motd to make it clear which server is which - change (operations/puppet)
coren has submitted this change and it was merged. Change subject: updating motd to make it clear which server is which .. updating motd to make it clear which server is which Change-Id: I135dea142ef26912d4c4b8be1563f6c2fda3f230 --- M modules/toollabs/files/40-tools-infrastructure-banner 1 file changed, 18 insertions(+), 0 deletions(-) Approvals: coren: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/toollabs/files/40-tools-infrastructure-banner b/modules/toollabs/files/40-tools-infrastructure-banner old mode 100644 new mode 100755 index 5a67afb..d26e9a5 --- a/modules/toollabs/files/40-tools-infrastructure-banner +++ b/modules/toollabs/files/40-tools-infrastructure-banner @@ -4,10 +4,28 @@ # This script is managed by puppet # +if [ -f /data/project/.system/.testing ];then cat EOF [33;1m^[0m [33;1m/ \[0mThis server is part of the Tool Labs infrastructure. [33;1m/ [31m![33m \[0m [33;1m/_\[0m No user-serviceable parts inside. + *** This is a [32;1mtesting [0mserver *** + EOF + +exit 0 +fi + +cat EOF + [33;1m^[0m + [33;1m/ \[0mThis server is part of the Tool Labs infrastructure. +[33;1m/ [31m![33m \[0m + [33;1m/_\[0m No user-serviceable parts inside. + + *** This is a [31mproduction [0mserver *** + +EOF + + -- To view, visit https://gerrit.wikimedia.org/r/69133 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I135dea142ef26912d4c4b8be1563f6c2fda3f230 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Petrb benap...@gmail.com Gerrit-Reviewer: Dzahn dz...@wikimedia.org Gerrit-Reviewer: Petrb benap...@gmail.com Gerrit-Reviewer: Reedy re...@wikimedia.org Gerrit-Reviewer: Tim Landscheidt t...@tim-landscheidt.de Gerrit-Reviewer: coren mpellet...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix wgWBSettings alias. - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Fix wgWBSettings alias. .. Fix wgWBSettings alias. Aliassing globals in a non-global scope is tricky. So use trickery. Change-Id: I0a5e8971ed8b7668578176bcc28232033fa70f09 --- M client/WikibaseClient.php 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Tobias Gritschacher: Looks good to me, approved jenkins-bot: Verified diff --git a/client/WikibaseClient.php b/client/WikibaseClient.php index cff3235..2583f0d 100644 --- a/client/WikibaseClient.php +++ b/client/WikibaseClient.php @@ -47,7 +47,7 @@ call_user_func( function() { global $wgExtensionCredits, $wgExtensionMessagesFiles, $wgAutoloadClasses, $wgHooks; global $wgAPIMetaModules, $wgSpecialPages, $wgSpecialPageGroups, $wgResourceModules; - global $wgWBClientStores, $wgWBClientSettings, $wgWBSettings; + global $wgWBClientStores, $wgWBClientSettings; $wgExtensionCredits['wikibase'][] = array( @@ -161,7 +161,7 @@ require( __DIR__ . '/config/WikibaseClient.default.php' ) ); - $wgWBSettings = $wgWBClientSettings; // B/C + $GLOBALS['wgWBSettings'] = $GLOBALS['wgWBClientSettings']; // B/C alias if ( defined( 'WB_EXPERIMENTAL_FEATURES' ) WB_EXPERIMENTAL_FEATURES ) { include_once( $dir . 'config/WikibaseClient.experimental.php' ); -- To view, visit https://gerrit.wikimedia.org/r/69305 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0a5e8971ed8b7668578176bcc28232033fa70f09 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Daniel Kinzler daniel.kinz...@wikimedia.de Gerrit-Reviewer: Jeroen De Dauw jeroended...@gmail.com Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove global scope assumptions in repo and exec code in non... - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Remove global scope assumptions in repo and exec code in non global scope .. Remove global scope assumptions in repo and exec code in non global scope Change-Id: I651ff4901ce3ddf948763a49b793ded5448b7b7f --- M repo/Wikibase.php M repo/config/Wikibase.experimental.php 2 files changed, 137 insertions(+), 129 deletions(-) Approvals: Tobias Gritschacher: Looks good to me, approved jenkins-bot: Verified diff --git a/repo/Wikibase.php b/repo/Wikibase.php index ea6c1ed..f136876 100644 --- a/repo/Wikibase.php +++ b/repo/Wikibase.php @@ -39,10 +39,7 @@ return; } -define( 'WB_VERSION', '0.4 alpha' - . ( defined( 'WB_EXPERIMENTAL_FEATURES' ) WB_EXPERIMENTAL_FEATURES ? '/experimental' : '' ) ); - -if ( version_compare( $wgVersion, '1.20c', '' ) ) { // Needs to be 1.20c because version_compare() works in confusing ways. +if ( version_compare( $GLOBALS['wgVersion'], '1.20c', '' ) ) { // Needs to be 1.20c because version_compare() works in confusing ways. die( 'bError:/b Wikibase requires MediaWiki 1.20 or above.' ); } @@ -52,145 +49,154 @@ } if ( !defined( 'WBL_VERSION' ) ) { - die( 'bError:/b Wikibase depends on the a href=https://www.mediawiki.org/wiki/Extension:WikibaseLib;WikibaseLib/a extension.' ); + throw new Exception( 'Wikibase depends on the WikibaseLib extension.' ); } -$wgExtensionCredits['wikibase'][] = array( - 'path' = __DIR__, - 'name' = 'Wikibase Repository', - 'version' = WB_VERSION, - 'author' = array( - 'The Wikidata team', // TODO: link? - ), - 'url' = 'https://www.mediawiki.org/wiki/Extension:Wikibase', - 'descriptionmsg' = 'wikibase-desc' -); +define( 'WB_VERSION', '0.4 alpha' + . ( defined( 'WB_EXPERIMENTAL_FEATURES' ) WB_EXPERIMENTAL_FEATURES ? '/experimental' : '' ) ); -// constants -define( 'CONTENT_MODEL_WIKIBASE_ITEM', wikibase-item ); -define( 'CONTENT_MODEL_WIKIBASE_PROPERTY', wikibase-property ); +call_user_func( function() { + global $wgExtensionCredits, $wgAutoloadClasses, $wgGroupPermissions, $wgExtensionMessagesFiles; + global $wgAPIModules, $wgSpecialPages, $wgSpecialPageGroups, $wgHooks, $wgContentHandlers; + global $wgWBStores, $wgWBRepoSettings, $wgResourceModules; -// Autoloading -foreach ( include( __DIR__ . '/Wikibase.classes.php' ) as $class = $file ) { - $wgAutoloadClasses[$class] = __DIR__ . '/' . $file; -} + $wgExtensionCredits['wikibase'][] = array( + 'path' = __DIR__, + 'name' = 'Wikibase Repository', + 'version' = WB_VERSION, + 'author' = array( + 'The Wikidata team', + ), + 'url' = 'https://www.mediawiki.org/wiki/Extension:Wikibase', + 'descriptionmsg' = 'wikibase-desc' + ); -// rights -// names should be according to other naming scheme -$wgGroupPermissions['*']['item-override'] = true; -$wgGroupPermissions['*']['item-create']= true; -$wgGroupPermissions['*']['item-remove']= true; -$wgGroupPermissions['*']['property-override'] = true; -$wgGroupPermissions['*']['property-create']= true; -$wgGroupPermissions['*']['property-remove']= true; -$wgGroupPermissions['*']['alias-update'] = true; -$wgGroupPermissions['*']['alias-remove'] = true; -$wgGroupPermissions['*']['sitelink-remove']= true; -$wgGroupPermissions['*']['sitelink-update']= true; -$wgGroupPermissions['*']['linktitles-update'] = true; -$wgGroupPermissions['*']['label-remove'] = true; -$wgGroupPermissions['*']['label-update'] = true; -$wgGroupPermissions['*']['description-remove'] = true; -$wgGroupPermissions['*']['description-update'] = true; + // constants + define( 'CONTENT_MODEL_WIKIBASE_ITEM', wikibase-item ); + define( 'CONTENT_MODEL_WIKIBASE_PROPERTY', wikibase-property ); -// i18n -$wgExtensionMessagesFiles['Wikibase'] = __DIR__ . '/Wikibase.i18n.php'; -$wgExtensionMessagesFiles['WikibaseAlias'] = __DIR__ . '/Wikibase.i18n.alias.php'; -$wgExtensionMessagesFiles['WikibaseNS']= __DIR__ . '/Wikibase.i18n.namespaces.php'; + // Autoloading + foreach ( include( __DIR__ . '/Wikibase.classes.php' ) as $class = $file ) { + $wgAutoloadClasses[$class] = __DIR__ . '/' . $file; + } -// API module registration -$wgAPIModules['wbgetentities'] = 'Wikibase\Api\GetEntities'; -$wgAPIModules['wbsetlabel']= 'Wikibase\Api\SetLabel'; -$wgAPIModules['wbsetdescription'] =
[MediaWiki-commits] [Gerrit] Remove global scope assumptions in lib and exec code in non ... - change (mediawiki...Wikibase)
Tobias Gritschacher has submitted this change and it was merged. Change subject: Remove global scope assumptions in lib and exec code in non global scope .. Remove global scope assumptions in lib and exec code in non global scope Change-Id: Ie506bafc66932b15d3d3d4c03b3d3127806d --- M lib/WikibaseLib.php 1 file changed, 82 insertions(+), 81 deletions(-) Approvals: Tobias Gritschacher: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/WikibaseLib.php b/lib/WikibaseLib.php index 6d468f1..8fe59e8 100644 --- a/lib/WikibaseLib.php +++ b/lib/WikibaseLib.php @@ -31,7 +31,7 @@ die( 'Not an entry point.' ); } -if ( version_compare( $wgVersion, '1.20c', '' ) ) { // Needs to be 1.20c because version_compare() works in confusing ways. +if ( version_compare( $GLOBALS['wgVersion'], '1.20c', '' ) ) { // Needs to be 1.20c because version_compare() works in confusing ways. die( 'bError:/b WikibaseLib requires MediaWiki 1.20 or above.' ); } @@ -74,96 +74,97 @@ foreach ( $dependencies as $constant = $name ) { if ( !defined( $constant ) ) { - die( - 'bError:/b WikibaseLib depends on the a href=https://www.mediawiki.org/wiki/Extension:' - . $name . '' . $name . '/a extension.' - ); + throw new Exception( 'WikibaseLib depends on the ' . $name . ' extension.' ); } } unset( $dependencies ); +call_user_func( function() { + global $wgExtensionCredits, $wgAutoloadClasses, $wgExtensionMessagesFiles, $wgExtensionFunctions; + global $wgValueParsers, $wgDataValues, $wgJobClasses, $wgHooks, $wgResourceModules, $wgValueFormatters; -$wgExtensionCredits['wikibase'][] = array( - 'path' = __DIR__, - 'name' = 'WikibaseLib', - 'version' = WBL_VERSION, - 'author' = array( - 'The Wikidata team', // TODO: link? - ), - 'url' = 'https://www.mediawiki.org/wiki/Extension:WikibaseLib', - 'descriptionmsg' = 'wikibase-lib-desc' -); + $wgExtensionCredits['wikibase'][] = array( + 'path' = __DIR__, + 'name' = 'WikibaseLib', + 'version' = WBL_VERSION, + 'author' = array( + 'The Wikidata team', // TODO: link? + ), + 'url' = 'https://www.mediawiki.org/wiki/Extension:WikibaseLib', + 'descriptionmsg' = 'wikibase-lib-desc' + ); -foreach ( include( __DIR__ . '/WikibaseLib.classes.php' ) as $class = $file ) { - $wgAutoloadClasses[$class] = __DIR__ . '/' . $file; -} - -define( 'SUMMARY_MAX_LENGTH', 250 ); - -// i18n -$wgExtensionMessagesFiles['WikibaseLib'] = __DIR__ . '/WikibaseLib.i18n.php'; - -// TODO: this is not nice, figure out a better design -$wgExtensionFunctions[] = function() { - \Wikibase\TemplateRegistry::singleton()-addTemplates( include( __DIR__ . /resources/templates.php ) ); - return true; -}; - -$wgValueParsers['wikibase-entityid'] = 'Wikibase\Lib\EntityIdParser'; -$wgDataValues['wikibase-entityid'] = 'Wikibase\EntityId'; -$wgJobClasses['ChangeNotification'] = 'Wikibase\ChangeNotificationJob'; - -// Hooks -$wgHooks['UnitTestsList'][] = 'Wikibase\LibHooks::registerPhpUnitTests'; -$wgHooks['ResourceLoaderTestModules'][]= 'Wikibase\LibHooks::registerQUnitTests'; - -/** - * Called when generating the extensions credits, use this to change the tables headers. - * @see https://www.mediawiki.org/wiki/Manual:Hooks/ExtensionTypes - * - * @since 0.1 - * - * @param array $extensionTypes - * - * @return boolean - */ -$wgHooks['ExtensionTypes'][] = function( array $extensionTypes ) { - // @codeCoverageIgnoreStart - $extensionTypes['wikibase'] = wfMessage( 'version-wikibase' )-text(); - - return true; - // @codeCoverageIgnoreEnd -}; - -/** - * Shorthand function to retrieve a template filled with the specified parameters. - * - * @since 0.2 - * - * @param $key string template key - * Varargs: normal template parameters - * - * @return string - */ -function wfTemplate( $key /*...*/ ) { - $params = func_get_args(); - array_shift( $params ); - - if ( isset( $params[0] ) is_array( $params[0] ) ) { - $params = $params[0]; + foreach ( include( __DIR__ . '/WikibaseLib.classes.php' ) as $class = $file ) { + $wgAutoloadClasses[$class] = __DIR__ . '/' . $file; } - $template = new \Wikibase\Template( \Wikibase\TemplateRegistry::singleton(), $key, $params ); - return $template-text(); -} + define( 'SUMMARY_MAX_LENGTH', 250 ); -// Resource Loader Modules: -$wgResourceModules = array_merge( $wgResourceModules, include( __DIR__ . /resources/Resources.php ) ); + // i18n +
[MediaWiki-commits] [Gerrit] Lowering alert thresholds on kakfa-broker-ProduceRequestsPer... - change (operations/puppet)
Ottomata has uploaded a new change for review. https://gerrit.wikimedia.org/r/69307 Change subject: Lowering alert thresholds on kakfa-broker-ProduceRequestsPerSecond .. Lowering alert thresholds on kakfa-broker-ProduceRequestsPerSecond Change-Id: Id92025011d8a440339e792fa0b795be67a71fae0 --- M manifests/misc/analytics.pp 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/07/69307/1 diff --git a/manifests/misc/analytics.pp b/manifests/misc/analytics.pp index bea13d8..cf598fa 100644 --- a/manifests/misc/analytics.pp +++ b/manifests/misc/analytics.pp @@ -32,7 +32,7 @@ # for this udp2log instance. monitor_service { kakfa-broker-ProduceRequestsPerSecond: description = kafka_network_SocketServerStats.ProduceRequestsPerSecond, - check_command = check_kafka_broker_produce_requests!3!2, + check_command = check_kafka_broker_produce_requests!2!1, contact_group = analytics, } } -- To view, visit https://gerrit.wikimedia.org/r/69307 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id92025011d8a440339e792fa0b795be67a71fae0 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ottomata o...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Lowering alert thresholds on kakfa-broker-ProduceRequestsPer... - change (operations/puppet)
Ottomata has submitted this change and it was merged. Change subject: Lowering alert thresholds on kakfa-broker-ProduceRequestsPerSecond .. Lowering alert thresholds on kakfa-broker-ProduceRequestsPerSecond Change-Id: Id92025011d8a440339e792fa0b795be67a71fae0 --- M manifests/misc/analytics.pp 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Ottomata: Verified; Looks good to me, approved diff --git a/manifests/misc/analytics.pp b/manifests/misc/analytics.pp index bea13d8..cf598fa 100644 --- a/manifests/misc/analytics.pp +++ b/manifests/misc/analytics.pp @@ -32,7 +32,7 @@ # for this udp2log instance. monitor_service { kakfa-broker-ProduceRequestsPerSecond: description = kafka_network_SocketServerStats.ProduceRequestsPerSecond, - check_command = check_kafka_broker_produce_requests!3!2, + check_command = check_kafka_broker_produce_requests!2!1, contact_group = analytics, } } -- To view, visit https://gerrit.wikimedia.org/r/69307 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id92025011d8a440339e792fa0b795be67a71fae0 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ottomata o...@wikimedia.org Gerrit-Reviewer: Ottomata o...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Store originalIndex instead of mwOriginal in Transclusions - change (mediawiki...VisualEditor)
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/69308 Change subject: Store originalIndex instead of mwOriginal in Transclusions .. Store originalIndex instead of mwOriginal in Transclusions Slightly more efficient way of seeing if the template has changed, and results in a cleaner set of data element attributes. Change-Id: I1507520005bfb8a88bfa6038dac5c3b15506425d --- M modules/ve/dm/nodes/ve.dm.MWTransclusionNode.js M modules/ve/test/dm/ve.dm.example.js 2 files changed, 15 insertions(+), 30 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/08/69308/1 diff --git a/modules/ve/dm/nodes/ve.dm.MWTransclusionNode.js b/modules/ve/dm/nodes/ve.dm.MWTransclusionNode.js index 71a2499..5661320 100644 --- a/modules/ve/dm/nodes/ve.dm.MWTransclusionNode.js +++ b/modules/ve/dm/nodes/ve.dm.MWTransclusionNode.js @@ -59,7 +59,7 @@ }; ve.dm.MWTransclusionNode.static.toDataElement = function ( domElements, converter ) { - var dataElement, + var dataElement, index, mw = JSON.parse( domElements[0].getAttribute( 'data-mw' ) ), isInline = this.isHybridInline( domElements, converter ), type = isInline ? 'mwTransclusionInline' : 'mwTransclusionBlock'; @@ -67,21 +67,24 @@ dataElement = { 'type': type, 'attributes': { - 'mw': mw, - 'mwOriginal': ve.copyObject( mw ) + 'mw': mw } }; - this.storeDomElements( dataElement, domElements, converter.getStore() ); + + index = this.storeDomElements( dataElement, domElements, converter.getStore() ); + dataElement.attributes.originalIndex = index; + return dataElement; }; ve.dm.MWTransclusionNode.static.toDomElements = function ( dataElement, doc, converter ) { - var span, index; - if ( ve.compare( dataElement.attributes.mw, dataElement.attributes.mwOriginal ) ) { - // If the transclusion is unchanged just send back the original dom elements so selser can - // skip over it + var span, index = converter.getStore().indexOfHash( ve.getHash( this.getHashObject( dataElement ) ) ); - // The object in the store is also used for rendering so return a copy + + // If the transclusion is unchanged just send back the + // original DOM elements so selser can skip over it + if ( index === dataElement.attributes.originalIndex ) { + // The object in the store is also used for CE rendering so return a copy return ve.copyArray( converter.getStore().value( index ) ); } else { span = doc.createElement( 'span' ); diff --git a/modules/ve/test/dm/ve.dm.example.js b/modules/ve/test/dm/ve.dm.example.js index 236e907..95788ef 100644 --- a/modules/ve/test/dm/ve.dm.example.js +++ b/modules/ve/test/dm/ve.dm.example.js @@ -870,13 +870,7 @@ '1': { 'wt': 'Hello, world!' } } }, - 'mwOriginal': { - 'id': 'mwt1', - 'target': { 'wt' : 'Test' }, - 'params': { - '1': { 'wt': 'Hello, world!' } - } - } + 'originalIndex': 0 }, 'htmlAttributes': [ { 'values': { @@ -905,13 +899,7 @@ '1': { 'wt': '1,234' } } }, - 'mwOriginal': { - 'id': 'mwt1', - 'target': { 'wt' : 'Inline' }, - 'params': { - '1': { 'wt': '1,234' } - } - } + 'originalIndex': 0 }, 'htmlAttributes': [ { 'values': { 'about': '#mwt1', @@ -931,13 +919,7 @@ '1': { 'wt': '5,678' } } }, - 'mwOriginal': { - 'id': 'mwt1', - 'target': { 'wt': 'Inline' }, - 'params': { - '1': { 'wt': '5,678' } - } - } + 'originalIndex': 0 }, 'htmlAttributes': [ { 'values': { -- To view, visit https://gerrit.wikimedia.org/r/69308 To unsubscribe, visit
[MediaWiki-commits] [Gerrit] Better rounding for width, avoids pixelation in large displays - change (apps...commons)
SuchABot has uploaded a new change for review. https://gerrit.wikimedia.org/r/69309 Change subject: Better rounding for width, avoids pixelation in large displays .. Better rounding for width, avoids pixelation in large displays Bug: 49718 Change-Id: I67541852b9bcb20fbb4b0af4b3900f2af4ace7bc GitHub: https://github.com/wikimedia/apps-android-commons/pull/15 --- M commons/src/main/java/org/wikimedia/commons/MediaWikiImageView.java 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/commons refs/changes/09/69309/1 diff --git a/commons/src/main/java/org/wikimedia/commons/MediaWikiImageView.java b/commons/src/main/java/org/wikimedia/commons/MediaWikiImageView.java index 8332003..f220ab3 100644 --- a/commons/src/main/java/org/wikimedia/commons/MediaWikiImageView.java +++ b/commons/src/main/java/org/wikimedia/commons/MediaWikiImageView.java @@ -88,11 +88,11 @@ if(tryOriginal) { mUrl = mMedia.getImageUrl(); } else { -// Round it down to the nearest 320 +// Round it to the nearest 320 // Possible a similar size image has already been generated. // Reduces Server cache fragmentation, also increases chance of cache hit -// If width is less than 320, we just use that directly, to avoid a case of the Maths -int bucketedWidth = width = 320 ? width: (width / 320) * 320; +// If width is less than 320, we round up to 320 +int bucketedWidth = width = 320 ? 320 : (int)(long)(Math.round(width / 320)) * 320; if(mMedia.getWidth() != 0 mMedia.getWidth() bucketedWidth) { // If we know that the width of the image is lesser than the required width // We don't even try to load the thumbnai, go directly to the source -- To view, visit https://gerrit.wikimedia.org/r/69309 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I67541852b9bcb20fbb4b0af4b3900f2af4ace7bc Gerrit-PatchSet: 1 Gerrit-Project: apps/android/commons Gerrit-Branch: master Gerrit-Owner: SuchABot yuvipanda+sucha...@gmail.com Gerrit-Reviewer: Yuvipanda yuvipa...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Don't find AFT results if tagfilter set - change (mediawiki...ArticleFeedbackv5)
jenkins-bot has submitted this change and it was merged. Change subject: Don't find AFT results if tagfilter set .. Don't find AFT results if tagfilter set Bug: 49714 Change-Id: I6f4309bcfc6b7d5f4d1b4c01a6fad6cf6590ddf5 --- M ArticleFeedbackv5.hooks.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Alex Monk: Looks good to me, approved jenkins-bot: Verified diff --git a/ArticleFeedbackv5.hooks.php b/ArticleFeedbackv5.hooks.php index b39a8e7..62b3aad 100644 --- a/ArticleFeedbackv5.hooks.php +++ b/ArticleFeedbackv5.hooks.php @@ -552,7 +552,7 @@ * @return bool */ public static function contributionsData( $data, $pager, $offset, $limit, $descending ) { - if ( $pager-namespace !== '' ) { + if ( $pager-namespace !== '' || $pager-tagFilter !== false ) { return true; } -- To view, visit https://gerrit.wikimedia.org/r/69152 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6f4309bcfc6b7d5f4d1b4c01a6fad6cf6590ddf5 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/ArticleFeedbackv5 Gerrit-Branch: master Gerrit-Owner: Matthias Mullie mmul...@wikimedia.org Gerrit-Reviewer: Alex Monk kren...@gmail.com Gerrit-Reviewer: Nemo bis federicol...@tiscali.it Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix crash on Android 2.3 caused by missing method - change (apps...commons)
SuchABot has uploaded a new change for review. https://gerrit.wikimedia.org/r/69310 Change subject: Fix crash on Android 2.3 caused by missing method .. Fix crash on Android 2.3 caused by missing method Bug: 49716 Change-Id: I34d34fbefc98a943d55dc6beb6c116f0f7f5e29c GitHub: https://github.com/wikimedia/apps-android-commons/pull/16 --- M commons/src/main/java/org/wikimedia/commons/CommonsApplication.java 1 file changed, 8 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/commons refs/changes/10/69310/1 diff --git a/commons/src/main/java/org/wikimedia/commons/CommonsApplication.java b/commons/src/main/java/org/wikimedia/commons/CommonsApplication.java index b9492dd..3ed2ce6 100644 --- a/commons/src/main/java/org/wikimedia/commons/CommonsApplication.java +++ b/commons/src/main/java/org/wikimedia/commons/CommonsApplication.java @@ -121,9 +121,16 @@ private LruCacheString, Bitmap imageCache = new LruCacheString, Bitmap((int) (Runtime.getRuntime().maxMemory() / (1024 * 8))) { @Override protected int sizeOf(String key, Bitmap bitmap) { +// bitmap.getByteCount() not available on older androids +int bitmapSize; +if (Build.VERSION.SDK_INT Build.VERSION_CODES.HONEYCOMB_MR1) { +bitmapSize = bitmap.getRowBytes() * bitmap.getHeight(); +} else { +bitmapSize = bitmap.getByteCount(); +} // The cache size will be measured in kilobytes rather than // number of items. -return bitmap.getByteCount() / 1024; +return bitmapSize / 1024; } }; -- To view, visit https://gerrit.wikimedia.org/r/69310 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I34d34fbefc98a943d55dc6beb6c116f0f7f5e29c Gerrit-PatchSet: 1 Gerrit-Project: apps/android/commons Gerrit-Branch: master Gerrit-Owner: SuchABot yuvipanda+sucha...@gmail.com Gerrit-Reviewer: Yuvipanda yuvipa...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Pass along tagFilter to ContribsPager, it already expects it - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Pass along tagFilter to ContribsPager, it already expects it .. Pass along tagFilter to ContribsPager, it already expects it ContribsPager already has this below line: $this-tagFilter = isset( $options['tagfilter'] ) ? $options['tagfilter'] : false; The reason the code already works fine is because, in ChangeTags.php, there's this fallback: if ( $filter_tag === false ) { $filter_tag = $wgRequest-getVal( 'tagfilter' ); } Which essentially boils down to the same result as passing along tagfilter, which in SpecialContributions is read from $wgRequest, passed to ContribsPager, and (well, currently not) passed to ChangeTags Change-Id: I12c0336ae31c5524e41fa0087afe2ba104dc7d37 --- M includes/specials/SpecialContributions.php 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Alex Monk: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/specials/SpecialContributions.php b/includes/specials/SpecialContributions.php index 21becd6..2f37cb4 100644 --- a/includes/specials/SpecialContributions.php +++ b/includes/specials/SpecialContributions.php @@ -175,6 +175,7 @@ 'target' = $target, 'contribs' = $this-opts['contribs'], 'namespace' = $this-opts['namespace'], + 'tagfilter' = $this-opts['tagfilter'], 'year' = $this-opts['year'], 'month' = $this-opts['month'], 'deletedOnly' = $this-opts['deletedOnly'], -- To view, visit https://gerrit.wikimedia.org/r/69153 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I12c0336ae31c5524e41fa0087afe2ba104dc7d37 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Matthias Mullie mmul...@wikimedia.org Gerrit-Reviewer: Alex Monk kren...@gmail.com Gerrit-Reviewer: Nemo bis federicol...@tiscali.it Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove Machine specific IML files - change (apps...commons)
SuchABot has uploaded a new change for review. https://gerrit.wikimedia.org/r/69311 Change subject: Remove Machine specific IML files .. Remove Machine specific IML files Change-Id: Icc59a5738f522f601e68dde6a080a5d4c37b0a85 GitHub: https://github.com/wikimedia/apps-android-commons/pull/17 --- D commons-parent.iml D commons/commons.iml 2 files changed, 0 insertions(+), 58 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/commons refs/changes/11/69311/1 diff --git a/commons-parent.iml b/commons-parent.iml deleted file mode 100644 index 87e527b..000 --- a/commons-parent.iml +++ /dev/null @@ -1,14 +0,0 @@ -?xml version=1.0 encoding=UTF-8? -module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule=true type=JAVA_MODULE version=4 - component name=NewModuleRootManager LANGUAGE_LEVEL=JDK_1_5 inherit-compiler-output=false -output url=file://$MODULE_DIR$/target/classes / -output-test url=file://$MODULE_DIR$/target/test-classes / -exclude-output / -content url=file://$MODULE_DIR$ - excludeFolder url=file://$MODULE_DIR$/target / -/content -orderEntry type=inheritedJdk / -orderEntry type=sourceFolder forTests=false / - /component -/module - diff --git a/commons/commons.iml b/commons/commons.iml deleted file mode 100644 index 1243a35..000 --- a/commons/commons.iml +++ /dev/null @@ -1,44 +0,0 @@ -?xml version=1.0 encoding=UTF-8? -module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule=true type=JAVA_MODULE version=4 - component name=FacetManager -facet type=android name=Android - configuration -option name=GEN_FOLDER_RELATIVE_PATH_APT value=/target/generated-sources/r / -option name=GEN_FOLDER_RELATIVE_PATH_AIDL value=/target/generated-sources/aidl / -option name=LIBS_FOLDER_RELATIVE_PATH value=/src/main/native / -option name=CUSTOM_APK_RESOURCE_FOLDER value=/target/generated-sources/combined-resources/res / -option name=APK_PATH value=/target/commons.apk / -option name=RUN_PROCESS_RESOURCES_MAVEN_TASK value=false / -includeAssetsFromLibrariestrue/includeAssetsFromLibraries - /configuration -/facet - /component - component name=NewModuleRootManager LANGUAGE_LEVEL=JDK_1_5 inherit-compiler-output=false -output url=file://$MODULE_DIR$/target/idea-classes / -output-test url=file://$MODULE_DIR$/target/idea-test-classes / -content url=file://$MODULE_DIR$ - sourceFolder url=file://$MODULE_DIR$/target/generated-sources/r isTestSource=false / - sourceFolder url=file://$MODULE_DIR$/src/main/java isTestSource=false / - excludeFolder url=file://$MODULE_DIR$/target/generated-sources/combined-assets / - excludeFolder url=file://$MODULE_DIR$/target/generated-sources/combined-resources / - excludeFolder url=file://$MODULE_DIR$/target/generated-sources/extracted-dependencies / - excludeFolder url=file://$MODULE_DIR$/target/idea-classes / -/content -orderEntry type=sourceFolder forTests=false / -orderEntry type=jdk jdkName=Maven Android 4.2.2 Platform jdkType=Android SDK / -orderEntry type=library name=Maven: org.mediawiki:api:1.3 level=project / -orderEntry type=library name=Maven: in.yuvi:http.fluent:1.3 level=project / -orderEntry type=library name=Maven: org.apache.httpcomponents:httpclient:4.2.2 level=project / -orderEntry type=library name=Maven: org.apache.httpcomponents:httpcore:4.2.2 level=project / -orderEntry type=library name=Maven: commons-logging:commons-logging:1.1.1 level=project / -orderEntry type=library name=Maven: commons-codec:commons-codec:1.6 level=project / -orderEntry type=library name=Maven: org.apache.httpcomponents:httpmime:4.2.2 level=project / -orderEntry type=library scope=PROVIDED name=Maven: android:android:4.1_r2 level=project / -orderEntry type=library name=Maven: android.support:compatibility-v4:11 level=project / -orderEntry type=library name=Maven: com.nostra13.universalimageloader:universal-image-loader:1.8.2 level=project / -orderEntry type=library name=Maven: ch.acra:acra:4.4.0 level=project / -orderEntry type=library name=Maven: de.keyboardsurfer.android.widget:crouton:1.7 level=project / -orderEntry type=module module-name=~apklib-com.actionbarsherlock_actionbarsherlock_4.2.0 / - /component -/module - -- To view, visit https://gerrit.wikimedia.org/r/69311 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icc59a5738f522f601e68dde6a080a5d4c37b0a85 Gerrit-PatchSet: 1 Gerrit-Project: apps/android/commons Gerrit-Branch: master Gerrit-Owner: SuchABot yuvipanda+sucha...@gmail.com Gerrit-Reviewer: Yuvipanda yuvipa...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org
[MediaWiki-commits] [Gerrit] Got rid of getPrefixedId in entity serializer - change (mediawiki...Wikibase)
Tobias Gritschacher has submitted this change and it was merged. Change subject: Got rid of getPrefixedId in entity serializer .. Got rid of getPrefixedId in entity serializer This forces chanegs elsewhere since the entity serializer needs to request a id formatter as dependency, due to the lack of reasonable default Change-Id: If66bc0716ee6124a73525d4b4016b63ffded3116 --- M client/includes/WikibaseLibrary.php M lib/includes/formatters/EntityIdFormatter.php M lib/includes/serializers/EntitySerializer.php M lib/includes/serializers/SerializationOptions.php M lib/includes/serializers/SerializerFactory.php M lib/tests/phpunit/serializers/EntitySerializerBaseTest.php M lib/tests/phpunit/serializers/ItemSerializerTest.php M lib/tests/phpunit/serializers/PropertySerializerTest.php M lib/tests/phpunit/serializers/SerializerBaseTest.php M lib/tests/phpunit/serializers/SerializerFactoryTest.php M repo/includes/EntityView.php M repo/includes/api/GetEntities.php M repo/includes/specials/EntityDataSerializationService.php 13 files changed, 128 insertions(+), 87 deletions(-) Approvals: Tobias Gritschacher: Looks good to me, approved jenkins-bot: Verified diff --git a/client/includes/WikibaseLibrary.php b/client/includes/WikibaseLibrary.php index 17bb45c..8123e65 100644 --- a/client/includes/WikibaseLibrary.php +++ b/client/includes/WikibaseLibrary.php @@ -26,6 +26,8 @@ use ValueParsers\ParseException; use Wikibase\Client\WikibaseClient; +use Wikibase\Lib\Serializers\EntitySerializationOptions; +use Wikibase\Lib\Serializers\SerializerFactory; class Scribunto_LuaWikibaseLibrary extends Scribunto_LuaLibraryBase { @@ -72,10 +74,10 @@ return array( null ); } - $serializerFactory = new \Wikibase\Lib\Serializers\SerializerFactory(); + $serializerFactory = new SerializerFactory(); $serializer = $serializerFactory-newSerializerForObject( $entityObject ); - $opt = new \Wikibase\Lib\Serializers\EntitySerializationOptions(); + $opt = new EntitySerializationOptions( WikibaseClient::getDefaultInstance()-getEntityIdFormatter() ); $serializer-setOptions( $opt ); try { diff --git a/lib/includes/formatters/EntityIdFormatter.php b/lib/includes/formatters/EntityIdFormatter.php index 61d0304..62d4470 100644 --- a/lib/includes/formatters/EntityIdFormatter.php +++ b/lib/includes/formatters/EntityIdFormatter.php @@ -36,6 +36,8 @@ class EntityIdFormatter extends ValueFormatterBase { /** +* @todo The documentation here is wrong. It's currently behaving the other way around. +* * Option name for the required prefixmap option. * The value of this option should be an array of * prefixes (string) pointing to the entity type diff --git a/lib/includes/serializers/EntitySerializer.php b/lib/includes/serializers/EntitySerializer.php index 1f4ce36..782eab8 100644 --- a/lib/includes/serializers/EntitySerializer.php +++ b/lib/includes/serializers/EntitySerializer.php @@ -1,8 +1,11 @@ ?php namespace Wikibase\Lib\Serializers; -use ApiResult, MWException; + +use ApiResult; +use MWException; use Wikibase\Entity; +use Wikibase\Repo\WikibaseRepo; /** * Serializer for entities. @@ -47,13 +50,9 @@ * * @since 0.2 * -* @param EntitySerializationOptions|null $options +* @param EntitySerializationOptions $options */ - public function __construct( EntitySerializationOptions $options = null ) { - if ( $options === null ) { - $options = new EntitySerializationOptions(); - } - + public function __construct( EntitySerializationOptions $options ) { parent::__construct( $options ); } @@ -72,7 +71,7 @@ throw new MWException( 'EntitySerializer can only serialize Entity objects' ); } - $serialization['id'] = $entity-getPrefixedId(); + $serialization['id'] = $this-options-getIdFormatter()-format( $entity-getId() ); $serialization['type'] = $entity-getType(); foreach ( $this-options-getProps() as $key ) { @@ -236,30 +235,6 @@ } return $value; - } - - /** -* Returns an EntitySerializer for the provided entity. -* If there is no specific serializer registered for the type of entity, -* a plain EntitySerializer is returned, else the more specific one is. -* -* @since 0.3 -* @deprecated since 0.4 -* -* @param Entity $entity -* @param EntitySerializationOptions $options -* -* @return EntitySerializer -*/ - public static function newForEntity( Entity $entity, EntitySerializationOptions
[MediaWiki-commits] [Gerrit] Remove Machine specific IML files - change (apps...commons)
Brion VIBBER has submitted this change and it was merged. Change subject: Remove Machine specific IML files .. Remove Machine specific IML files Change-Id: Icc59a5738f522f601e68dde6a080a5d4c37b0a85 GitHub: https://github.com/wikimedia/apps-android-commons/pull/17 --- D commons-parent.iml D commons/commons.iml 2 files changed, 0 insertions(+), 58 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/commons-parent.iml b/commons-parent.iml deleted file mode 100644 index 87e527b..000 --- a/commons-parent.iml +++ /dev/null @@ -1,14 +0,0 @@ -?xml version=1.0 encoding=UTF-8? -module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule=true type=JAVA_MODULE version=4 - component name=NewModuleRootManager LANGUAGE_LEVEL=JDK_1_5 inherit-compiler-output=false -output url=file://$MODULE_DIR$/target/classes / -output-test url=file://$MODULE_DIR$/target/test-classes / -exclude-output / -content url=file://$MODULE_DIR$ - excludeFolder url=file://$MODULE_DIR$/target / -/content -orderEntry type=inheritedJdk / -orderEntry type=sourceFolder forTests=false / - /component -/module - diff --git a/commons/commons.iml b/commons/commons.iml deleted file mode 100644 index 1243a35..000 --- a/commons/commons.iml +++ /dev/null @@ -1,44 +0,0 @@ -?xml version=1.0 encoding=UTF-8? -module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule=true type=JAVA_MODULE version=4 - component name=FacetManager -facet type=android name=Android - configuration -option name=GEN_FOLDER_RELATIVE_PATH_APT value=/target/generated-sources/r / -option name=GEN_FOLDER_RELATIVE_PATH_AIDL value=/target/generated-sources/aidl / -option name=LIBS_FOLDER_RELATIVE_PATH value=/src/main/native / -option name=CUSTOM_APK_RESOURCE_FOLDER value=/target/generated-sources/combined-resources/res / -option name=APK_PATH value=/target/commons.apk / -option name=RUN_PROCESS_RESOURCES_MAVEN_TASK value=false / -includeAssetsFromLibrariestrue/includeAssetsFromLibraries - /configuration -/facet - /component - component name=NewModuleRootManager LANGUAGE_LEVEL=JDK_1_5 inherit-compiler-output=false -output url=file://$MODULE_DIR$/target/idea-classes / -output-test url=file://$MODULE_DIR$/target/idea-test-classes / -content url=file://$MODULE_DIR$ - sourceFolder url=file://$MODULE_DIR$/target/generated-sources/r isTestSource=false / - sourceFolder url=file://$MODULE_DIR$/src/main/java isTestSource=false / - excludeFolder url=file://$MODULE_DIR$/target/generated-sources/combined-assets / - excludeFolder url=file://$MODULE_DIR$/target/generated-sources/combined-resources / - excludeFolder url=file://$MODULE_DIR$/target/generated-sources/extracted-dependencies / - excludeFolder url=file://$MODULE_DIR$/target/idea-classes / -/content -orderEntry type=sourceFolder forTests=false / -orderEntry type=jdk jdkName=Maven Android 4.2.2 Platform jdkType=Android SDK / -orderEntry type=library name=Maven: org.mediawiki:api:1.3 level=project / -orderEntry type=library name=Maven: in.yuvi:http.fluent:1.3 level=project / -orderEntry type=library name=Maven: org.apache.httpcomponents:httpclient:4.2.2 level=project / -orderEntry type=library name=Maven: org.apache.httpcomponents:httpcore:4.2.2 level=project / -orderEntry type=library name=Maven: commons-logging:commons-logging:1.1.1 level=project / -orderEntry type=library name=Maven: commons-codec:commons-codec:1.6 level=project / -orderEntry type=library name=Maven: org.apache.httpcomponents:httpmime:4.2.2 level=project / -orderEntry type=library scope=PROVIDED name=Maven: android:android:4.1_r2 level=project / -orderEntry type=library name=Maven: android.support:compatibility-v4:11 level=project / -orderEntry type=library name=Maven: com.nostra13.universalimageloader:universal-image-loader:1.8.2 level=project / -orderEntry type=library name=Maven: ch.acra:acra:4.4.0 level=project / -orderEntry type=library name=Maven: de.keyboardsurfer.android.widget:crouton:1.7 level=project / -orderEntry type=module module-name=~apklib-com.actionbarsherlock_actionbarsherlock_4.2.0 / - /component -/module - -- To view, visit https://gerrit.wikimedia.org/r/69311 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icc59a5738f522f601e68dde6a080a5d4c37b0a85 Gerrit-PatchSet: 1 Gerrit-Project: apps/android/commons Gerrit-Branch: master Gerrit-Owner: SuchABot yuvipanda+sucha...@gmail.com Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org Gerrit-Reviewer: Yuvipanda yuvipa...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list
[MediaWiki-commits] [Gerrit] Remove $wgCentralAuthSilentLogin, defaulted to true - change (mediawiki...CentralAuth)
Anomie has uploaded a new change for review. https://gerrit.wikimedia.org/r/69312 Change subject: Remove $wgCentralAuthSilentLogin, defaulted to true .. Remove $wgCentralAuthSilentLogin, defaulted to true Clean up feature flag that was requested for Ibf6e271f. Change-Id: Ib9e700f8c8ecab25e529bd4135d3b9af2f1a744e --- M CentralAuth.i18n.php M CentralAuth.php M CentralAuthHooks.php D modules/ext.centralauth.edgeautologin.nonsilent.css D modules/ext.centralauth.edgeautologin.nonsilent.js M modules/ext.centralauth.js M specials/SpecialCentralAutoLogin.php M specials/SpecialCentralLogin.php 8 files changed, 15 insertions(+), 328 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth refs/changes/12/69312/1 diff --git a/CentralAuth.i18n.php b/CentralAuth.i18n.php index 437d8f1..2e28975 100644 --- a/CentralAuth.i18n.php +++ b/CentralAuth.i18n.php @@ -260,8 +260,6 @@ 'centralauth-invalid-wiki' = 'No such wiki database: $1', 'centralauth-account-exists' = 'Cannot create account: the requested username is already taken in the unified login system.', 'centralauth-account-exists-reset' = 'The username $1 is not registered on this wiki, but it does exist in the unified login system.', - 'centralauth-login-no-others'= 'You have been automatically logged into other projects of {{int:Centralauth-groupname}}.', - 'centralauth-logout-no-others' = 'You have been automatically logged out of other projects of {{int:Centralauth-groupname}}.', 'centralauth-hidden-blockreason' = 'globally hidden by $1 at $2 with following reason: $3', // Logging @@ -319,8 +317,6 @@ Please review this site\'s human-readable privacy policy to determine how any information collected might be used.', 'centralauth-centralautologin-logged-in' = 'You are centrally logged in as $1. Reload the page to apply your user settings.', - 'centralauth-edge-logging-in' = 'Now automatically logging you into other projects of {{int:Centralauth-groupname}}.', - 'centralauth-edge-logged-in' = 'You have been automatically logged into other projects of {{int:Centralauth-groupname}}.', // Global group membership 'globalgroupmembership' = 'Membership in global groups', @@ -422,11 +418,6 @@ 'centrallogin' = 'Central user log in', 'centralloginsuccesful' = 'Login successful', - 'centralauth-completelogin-legend' = 'Complete login process', - 'centralauth-completelogin-finishing' = 'Authenticating on Wikimedia Foundation sites, please wait...', - 'centralauth-completelogin-text' = 'Authentication of your account on Wikimedia Foundation sites is almost complete! Use the button below to confirm and complete your login.', - 'centralauth-completelogin-submit' = 'Log in now', - 'centralauth-completelogin-back' = 'Return to the previous page.', 'centralauth-error-nologinattempt' = 'No active login attempt is in progress for your session.', 'centralauth-error-badtoken' = 'The provided authentication token is either expired or invalid.', @@ -856,14 +847,6 @@ 'centralauth-centralautologin-logged-in' = 'Message displayed by JavaScript when the auto-login succeeds. * $1 - User name * $2 - User gender code {{gender}}', - 'centralauth-edge-logging-in' = 'Message used from JavaScript to tell the user that they are being logged in to additional sites. -* $1 - mw.user object {{gender}} -Used with the following messages: -* {{msg-mw|centralauth-edge-logged-in}}', - 'centralauth-edge-logged-in' = 'Message used from JavaScript to tell the user that they have been logged in to additional sites. -* $1 - mw.user object {{gender}} -Used with the following messages: -* {{msg-mw|centralauth-edge-logging-in}}', 'globalgroupmembership' = '{{doc-special|GlobalGroupMembership}}', 'globalgrouppermissions' = '{{doc-special|GlobalGroupPermissions}} See example: [[w:Special:GlobalGroupPermissions]] and [[w:Special:SpecialPages]]', @@ -961,12 +944,6 @@ 'centrallogin' = '{{doc-special|CentralLogin|unlisted=1}}', 'centralloginsuccesful' = 'Used as page title. {{Identical|Login successful}}', - 'centralauth-completelogin-legend' = 'Used as the fieldset label. - -Followed by the Submit button text {{msg-mw|Centralauth-completelogin-submit}}.', - 'centralauth-completelogin-finishing' = 'Shown next to a spinner while the user is being logged in', - 'centralauth-completelogin-submit' = 'Used as label for the Submit button.', - 'centralauth-completelogin-back' = 'Used as action link text.', 'centralauth-warning-notloggedin' = 'Used as error message.', 'centralauth-finishglobaliseemail_subject' = 'Subject field for account confirmation emails', 'centralauth-finishglobaliseemail_body' = 'Body text for
[MediaWiki-commits] [Gerrit] Fix crash on Android 2.3 caused by missing method - change (apps...commons)
Brion VIBBER has submitted this change and it was merged. Change subject: Fix crash on Android 2.3 caused by missing method .. Fix crash on Android 2.3 caused by missing method Bug: 49716 Change-Id: I34d34fbefc98a943d55dc6beb6c116f0f7f5e29c GitHub: https://github.com/wikimedia/apps-android-commons/pull/16 --- M commons/src/main/java/org/wikimedia/commons/CommonsApplication.java 1 file changed, 8 insertions(+), 1 deletion(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/commons/src/main/java/org/wikimedia/commons/CommonsApplication.java b/commons/src/main/java/org/wikimedia/commons/CommonsApplication.java index b9492dd..3ed2ce6 100644 --- a/commons/src/main/java/org/wikimedia/commons/CommonsApplication.java +++ b/commons/src/main/java/org/wikimedia/commons/CommonsApplication.java @@ -121,9 +121,16 @@ private LruCacheString, Bitmap imageCache = new LruCacheString, Bitmap((int) (Runtime.getRuntime().maxMemory() / (1024 * 8))) { @Override protected int sizeOf(String key, Bitmap bitmap) { +// bitmap.getByteCount() not available on older androids +int bitmapSize; +if (Build.VERSION.SDK_INT Build.VERSION_CODES.HONEYCOMB_MR1) { +bitmapSize = bitmap.getRowBytes() * bitmap.getHeight(); +} else { +bitmapSize = bitmap.getByteCount(); +} // The cache size will be measured in kilobytes rather than // number of items. -return bitmap.getByteCount() / 1024; +return bitmapSize / 1024; } }; -- To view, visit https://gerrit.wikimedia.org/r/69310 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I34d34fbefc98a943d55dc6beb6c116f0f7f5e29c Gerrit-PatchSet: 1 Gerrit-Project: apps/android/commons Gerrit-Branch: master Gerrit-Owner: SuchABot yuvipanda+sucha...@gmail.com Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org Gerrit-Reviewer: Yuvipanda yuvipa...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Cleanup JS - change (mediawiki...Echo)
Alex Monk has uploaded a new change for review. https://gerrit.wikimedia.org/r/69314 Change subject: Cleanup JS .. Cleanup JS * Add missing spaces after 'function' * Remove underscores from identifiers * Don't use typeof for undefined with local variables and object properties * API ok/err is deprecated since MediaWiki 1.20 ( 1.22-alpha), use .done and .fail Change-Id: I5ca3403ee263a0c3e6709618e48e896340952337 --- M modules/alert/ext.echo.alert.js M modules/base/ext.echo.base.js M modules/overlay/ext.echo.overlay.js M modules/special/ext.echo.special.js 4 files changed, 87 insertions(+), 96 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo refs/changes/14/69314/1 diff --git a/modules/alert/ext.echo.alert.js b/modules/alert/ext.echo.alert.js index f1104d3..8fffe54 100644 --- a/modules/alert/ext.echo.alert.js +++ b/modules/alert/ext.echo.alert.js @@ -1,4 +1,4 @@ -( function( $, mw ) { +( function ( $, mw ) { 'use strict'; if ( mw.config.get( 'wgUserNewMsgRevisionId' ) !mw.config.get( 'echoNewMsgAlertDisplayed' ) ) { var alertMessage = mw.html.escape( mw.msg( 'colon-separator' ) + mw.msg( 'echo-new-messages' ) ); diff --git a/modules/base/ext.echo.base.js b/modules/base/ext.echo.base.js index 35dd7a4..4d29e4a 100644 --- a/modules/base/ext.echo.base.js +++ b/modules/base/ext.echo.base.js @@ -26,7 +26,7 @@ // Log the impression mw.echo.logInteraction( 'notification-impression', context, eventId, eventType ); // Set up logging for clickthrough - notification.find( 'a' ).click( function() { + notification.find( 'a' ).click( function () { mw.echo.logInteraction( 'notification-link-click', context, eventId, eventType ); } ); }, @@ -38,7 +38,7 @@ * @param {int} eventId Notification event id * @param {string} eventType notification type */ - logInteraction: function( action, context, eventId, eventType ) { + logInteraction: function ( action, context, eventId, eventType ) { // Check if Schema:EchoInteraction is enabled if ( !mw.echo.clickThroughEnabled ) { return; @@ -66,13 +66,13 @@ * Change the user's preferences related to this notification type and * reload the page. */ - dismiss: function( notification ) { + dismiss: function ( notification ) { var $notification = $( notification ), eventCategory = $notification.attr( 'data-notification-category' ), prefName = '', prefs = [], prefRequest = {}; - $.each( mw.echo.dismissOutputFormats, function( index, format ) { + $.each( mw.echo.dismissOutputFormats, function ( index, format ) { // Make sure output format pref exists for this event type prefName = 'echo-subscriptions-' + format + '-' + eventCategory; if ( mw.user.options.exists( prefName ) ) { @@ -102,7 +102,7 @@ $notification.data( 'dismiss', false ); } }, - error: function() { + error: function () { alert( mw.msg( 'echo-error-preference' ) ); } } ); @@ -112,7 +112,7 @@ * Handle clicking the Dismiss button. * First we have to retrieve the options token. */ - setOptionsToken: function( callback, notification ) { + setOptionsToken: function ( callback, notification ) { var tokenRequest = { 'action': 'tokens', 'type' : 'options', @@ -127,7 +127,7 @@ url: mw.util.wikiScript( 'api' ), data: tokenRequest, dataType: 'json', - success: function( data ) { + success: function ( data ) { if ( data.tokens.optionstoken === undefined ) { alert( mw.msg( 'echo-error-token' ) ); } else {
[MediaWiki-commits] [Gerrit] Removed X-Carrier header - change (operations/puppet)
Faidon has submitted this change and it was merged. Change subject: Removed X-Carrier header .. Removed X-Carrier header Over a month ago, Zero Mobile frontend stopped varrying cache based on X-Carrier in favor of X-CS. Time to wave it good bye. See also: daae64398ace55a17fc647cf1eac78b4dc006718 Change-Id: I6c4ea541685b25c3115eb1e5dfdc192b9cb55412 --- M templates/varnish/mobile-frontend.inc.vcl.erb M templates/varnish/zero.inc.vcl.erb 2 files changed, 1 insertion(+), 27 deletions(-) Approvals: Faidon: Looks good to me, approved jenkins-bot: Verified diff --git a/templates/varnish/mobile-frontend.inc.vcl.erb b/templates/varnish/mobile-frontend.inc.vcl.erb index 54ce1c4..0ebf05d 100644 --- a/templates/varnish/mobile-frontend.inc.vcl.erb +++ b/templates/varnish/mobile-frontend.inc.vcl.erb @@ -9,8 +9,7 @@ /* This call will always set the following req.http values: X-Subdomain = M or ZERO X-DfltLang = en|fr|ru|... - These values are only set if the carrier has been successfully detected - X-Carrier = Celcom Malaysia + This value is only set if the carrier has been successfully detected X-CS = 502-13 */ call tag_carrier; @@ -85,8 +84,6 @@ sub vcl_fetch { set beresp.http.X-Device = req.http.X-Device; - /* TODO: remove X-Carrier header */ - set beresp.http.X-Carrier = req.http.X-Carrier; set beresp.http.X-CS = req.http.X-CS; if ( beresp.http.X-Analytics ) { # Do nothing, X-Analytics has already been handled diff --git a/templates/varnish/zero.inc.vcl.erb b/templates/varnish/zero.inc.vcl.erb index e9c81d3..44ebc45 100644 --- a/templates/varnish/zero.inc.vcl.erb +++ b/templates/varnish/zero.inc.vcl.erb @@ -312,143 +312,120 @@ /* Please keep this list alphabetized by the ACL variable */ if (client.ip ~ carrier_502_13) { if (req.http.X-Subdomain == ZERO) { - set req.http.X-Carrier = Celcom Malaysia; set req.http.X-CS = 502-13; } } else if (client.ip ~ carrier_623_01) { set req.http.X-DfltLang = fr; if (req.http.X-Subdomain == M) { if (req.http.host ~ (^(fr|ar|sg|en|es|zh|ha|ln|eo)\.m|^m)\.([a-zA-Z0-9-]+)\.org) { - set req.http.X-Carrier = Orange Central African Republic; set req.http.X-CS = 623-01; } } } else if (client.ip ~ carrier_413_02) { if (req.http.X-Subdomain == ZERO) { if (req.http.host ~ (^(en|ta|si)\.zero|^zero)\.([a-zA-Z0-9-]+)\.org) { - set req.http.X-Carrier = Dialog Sri Lanka; set req.http.X-CS = 413-02; } } } else if (client.ip ~ carrier_502_16) { if (req.http.X-Subdomain == ZERO) { if (req.http.User-Agent ~ Opera) { - set req.http.X-Carrier = DIGI; set req.http.X-CS = 502-16; } } } else if (client.ip ~ carrier_520_18) { set req.http.X-DfltLang = th; if (req.http.X-Subdomain == ZERO) { - set req.http.X-Carrier = DTAC; set req.http.X-CS = 520-18; } } else if (client.ip ~ carrier_470_01) { set req.http.X-DfltLang = bn; if (req.http.X-Subdomain == ZERO) { if (req.http.host ~ (^(bn)\.zero|^zero)\.([a-zA-Z0-9-]+)\.org) { - set req.http.X-Carrier = Grameenphone Bangladesh; set req.http.X-CS = 470-01; } } } else if (client.ip ~ carrier_456_02) { if (req.http.X-Subdomain == ZERO) { - set req.http.X-Carrier = Hello Cambodia; set req.http.X-CS = 456-02; } } else if (client.ip ~ carrier_652_02) { if (req.http.X-Subdomain == M) { - set req.http.X-Carrier = Orange Botswana; set req.http.X-CS = 652-02; } } else if (client.ip ~ carrier_624_02) { set req.http.X-DfltLang = fr; if (req.http.X-Subdomain == M) { if (req.http.host ~ (^(fr|en|es|de|zh|ar|ha|ln|yo|eo)\.m|^m)\.([a-zA-Z0-9-]+)\.org) { - set req.http.X-Carrier = Orange Cameroon; set req.http.X-CS = 624-02; } } } else if (client.ip ~ carrier_630_86) {
[MediaWiki-commits] [Gerrit] Better rounding for width, avoids pixelation in large displays - change (apps...commons)
Brion VIBBER has submitted this change and it was merged. Change subject: Better rounding for width, avoids pixelation in large displays .. Better rounding for width, avoids pixelation in large displays Bug: 49718 Change-Id: I67541852b9bcb20fbb4b0af4b3900f2af4ace7bc GitHub: https://github.com/wikimedia/apps-android-commons/pull/15 --- M commons/src/main/java/org/wikimedia/commons/MediaWikiImageView.java 1 file changed, 4 insertions(+), 4 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/commons/src/main/java/org/wikimedia/commons/MediaWikiImageView.java b/commons/src/main/java/org/wikimedia/commons/MediaWikiImageView.java index 8332003..fac11f4 100644 --- a/commons/src/main/java/org/wikimedia/commons/MediaWikiImageView.java +++ b/commons/src/main/java/org/wikimedia/commons/MediaWikiImageView.java @@ -88,18 +88,18 @@ if(tryOriginal) { mUrl = mMedia.getImageUrl(); } else { -// Round it down to the nearest 320 +// Round it to the nearest 320 // Possible a similar size image has already been generated. // Reduces Server cache fragmentation, also increases chance of cache hit -// If width is less than 320, we just use that directly, to avoid a case of the Maths -int bucketedWidth = width = 320 ? width: (width / 320) * 320; +// If width is less than 320, we round up to 320 +int bucketedWidth = width = 320 ? 320 : Math.round((float)width / 320.0f) * 320; if(mMedia.getWidth() != 0 mMedia.getWidth() bucketedWidth) { // If we know that the width of the image is lesser than the required width // We don't even try to load the thumbnai, go directly to the source loadImageIfNecessary(isInLayoutPass, true); return; } else { -mUrl = mMedia.getThumbnailUrl(width = 320 ? width : (width / 320) * 320); +mUrl = mMedia.getThumbnailUrl(bucketedWidth); } } -- To view, visit https://gerrit.wikimedia.org/r/69309 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I67541852b9bcb20fbb4b0af4b3900f2af4ace7bc Gerrit-PatchSet: 3 Gerrit-Project: apps/android/commons Gerrit-Branch: master Gerrit-Owner: SuchABot yuvipanda+sucha...@gmail.com Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org Gerrit-Reviewer: Yuvipanda yuvipa...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Adding spetrea to admins::mortals so he has an account on ba... - change (operations/puppet)
Ottomata has uploaded a new change for review. https://gerrit.wikimedia.org/r/69313 Change subject: Adding spetrea to admins::mortals so he has an account on bastion hosts. .. Adding spetrea to admins::mortals so he has an account on bastion hosts. Stefan needs and already has access to stat1002.eqiad.wmnet, but does not have an account on bast1001.wikimedia.org. Change-Id: Id8ac1335c1b149010f0bbcadee4d6d82469e2e38 --- M manifests/admins.pp 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/13/69313/1 diff --git a/manifests/admins.pp b/manifests/admins.pp index 985f155..d849ebf 100644 --- a/manifests/admins.pp +++ b/manifests/admins.pp @@ -2977,6 +2977,7 @@ include accounts::rmoen include accounts::robla include accounts::spage + include accounts::spetrea include accounts::sumanah #RT 3752 include accounts::yurik #rt 4835, rt 5069 include accounts::zak # access revoked -- To view, visit https://gerrit.wikimedia.org/r/69313 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id8ac1335c1b149010f0bbcadee4d6d82469e2e38 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ottomata o...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Improve ./configure search for lua - change (mediawiki...luasandbox)
Anomie has uploaded a new change for review. https://gerrit.wikimedia.org/r/69315 Change subject: Improve ./configure search for lua .. Improve ./configure search for lua It is possible that the lua in pkg-config is not Lua 5.1. Fortunately, pkg-config handles predicates such as lua = 5.1 lua 5.2 properly. Also, adjust pkg.m4 to print the pkg-config module being checked, rather than the variable being defined. Otherwise ./configure says checking for LUA... no / checking for LUA... yes, which is less than helpful. Change-Id: I330f42edefb1000bc381070f5232919cd9bef692 --- M config.m4 M m4/pkg.m4 2 files changed, 7 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/php/luasandbox refs/changes/15/69315/1 diff --git a/config.m4 b/config.m4 index 13b15f9..1f32754 100644 --- a/config.m4 +++ b/config.m4 @@ -14,7 +14,7 @@ dnl We need lua or fallback to luajit. dnl Under debian package is known as 'lua5.1' dnl Under freebsd package is known as 'lua-5.1' - PKG_CHECK_MODULES([LUA], [lua],, [ + PKG_CHECK_MODULES([LUA], [lua = 5.1 lua 5.2],, [ PKG_CHECK_MODULES([LUA], [lua5.1],, [ PKG_CHECK_MODULES([LUA], [lua-5.1],, [ PKG_CHECK_MODULES([LUA], [luajit]) diff --git a/m4/pkg.m4 b/m4/pkg.m4 index 9a71878..887d94c 100644 --- a/m4/pkg.m4 +++ b/m4/pkg.m4 @@ -21,6 +21,11 @@ # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. +# +# +# CHANGES: +# 2013-06-18: bjor...@wikimedia.org Print $2 instead of $1 in the checking +# for XXX line. # PKG_PROG_PKG_CONFIG([MIN-VERSION]) # -- @@ -109,7 +114,7 @@ AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no -AC_MSG_CHECKING([for $1]) +AC_MSG_CHECKING([for $2]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) -- To view, visit https://gerrit.wikimedia.org/r/69315 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I330f42edefb1000bc381070f5232919cd9bef692 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/php/luasandbox Gerrit-Branch: master Gerrit-Owner: Anomie bjor...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Synced up varnish VCL file with configuration on meta - change (operations/puppet)
Faidon has submitted this change and it was merged. Change subject: Synced up varnish VCL file with configuration on meta .. Synced up varnish VCL file with configuration on meta Change-Id: I65df1a782e6f1886404e3f25bd879f3e82fb97db --- M templates/varnish/zero.inc.vcl.erb 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Faidon: Looks good to me, approved jenkins-bot: Verified diff --git a/templates/varnish/zero.inc.vcl.erb b/templates/varnish/zero.inc.vcl.erb index 385f3ba..e9c81d3 100644 --- a/templates/varnish/zero.inc.vcl.erb +++ b/templates/varnish/zero.inc.vcl.erb @@ -69,8 +69,8 @@ 123.231.40.0/21; 123.231.48.0/20; 123.231.120.0/21; - 125.214.169.32/32; # WAP - 125.214.170.1/32; # WAP + 125.214.169.32; # WAP + 125.214.170.1; # WAP 175.157.0.0/16; 182.161.0.0/19; } @@ -112,7 +112,7 @@ 219.64.175.219; } -acl carrier_502_16 { // DIGI +acl carrier_502_16 { // DIGI Malaysia 115.164.0.0/16; 116.197.0.0/17; 203.92.128.185; -- To view, visit https://gerrit.wikimedia.org/r/68840 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I65df1a782e6f1886404e3f25bd879f3e82fb97db Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Yurik yu...@wikimedia.org Gerrit-Reviewer: Dr0ptp4kt ab...@wikimedia.org Gerrit-Reviewer: Faidon fai...@wikimedia.org Gerrit-Reviewer: Mark Bergsma m...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Allow users to select preferred license for their contributions - change (apps...commons)
Brion VIBBER has submitted this change and it was merged. Change subject: Allow users to select preferred license for their contributions .. Allow users to select preferred license for their contributions Needs some UI love on both selection intimation, but works otherwise People can pick from CC BY-SA, CC BY, or CC0. The commons templates are set using {[self}}, which I think is good enough. GitHub: https://github.com/wikimedia/apps-android-commons/pull/14 Change-Id: Iffca6f75c63de6fbe61c4dc41b93dd5f692065a5 --- M commons/res/layout/fragment_single_upload.xml M commons/res/values-qq/strings.xml M commons/res/values/strings.xml M commons/res/xml/preferences.xml M commons/src/main/java/org/wikimedia/commons/Media.java M commons/src/main/java/org/wikimedia/commons/Prefs.java M commons/src/main/java/org/wikimedia/commons/SettingsActivity.java M commons/src/main/java/org/wikimedia/commons/SingleUploadFragment.java M commons/src/main/java/org/wikimedia/commons/StartUploadTask.java M commons/src/main/java/org/wikimedia/commons/Utils.java M commons/src/main/java/org/wikimedia/commons/contributions/Contribution.java 11 files changed, 112 insertions(+), 10 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/commons/res/layout/fragment_single_upload.xml b/commons/res/layout/fragment_single_upload.xml index 30046ec..a11df61 100644 --- a/commons/res/layout/fragment_single_upload.xml +++ b/commons/res/layout/fragment_single_upload.xml @@ -36,5 +36,7 @@ android:layout_width=wrap_content android:layout_height=wrap_content android:text=@string/share_license_summary -android:id=@+id/licenseLabel android:layout_gravity=center android:layout_marginTop=16dp/ +android:id=@+id/share_license_summary +android:layout_gravity=center +android:layout_marginTop=16dp/ /LinearLayout diff --git a/commons/res/values-qq/strings.xml b/commons/res/values-qq/strings.xml index dbd9e3b..4d35d6c 100644 --- a/commons/res/values-qq/strings.xml +++ b/commons/res/values-qq/strings.xml @@ -75,7 +75,10 @@ string name=menu_retryMenu item text prompting user to retry a failed upload. {{Identical|Retry}}/string string name=menu_abortMenu item text prompting user to abort and delete a failed upload./string - string name=share_license_summaryText label briefly describing CC-BY-SA license./string + string name=share_license_summaryText label telling user the license of the current upload in progress. %1$s refers to appropriate display text for the chosen CC license/string string name=menu_downloadMenu item text prompting user to download a selected photo or media file locally. {{Identical|Download}}/string +string name=license_name_cc_by_saCC Attribution-Sharelike License display name. Use the non-breaking space character(\u00A0) between \'CC\' and \'Attribution-Sharealike\'/string +string name=license_name_cc_byCC Attribution License display name. Use the non-breaking space character(\u00A0) between \'CC\' and \'Attribution\'/string +string name=license_name_cc0CC0 License display name./string /resources diff --git a/commons/res/values/strings.xml b/commons/res/values/strings.xml index c76dc96..64f6140 100644 --- a/commons/res/values/strings.xml +++ b/commons/res/values/strings.xml @@ -88,7 +88,12 @@ string name=menu_retryRetry/string string name=menu_abortAbort/string -string name=share_license_summaryYou agree to upload under the terms of the CC-BY-SA 3.0 license./string +string name=share_license_summaryThis image will be licensed under %1$s/string string name=menu_downloadDownload/string +string name=preference_licenseLicense/string + +string name=license_name_cc_by_saCC\u00A0Attribution-ShareAlike/string +string name=license_name_cc_byCC\u00A0Attribution/string +string name=license_name_cc0CC0/string /resources diff --git a/commons/res/xml/preferences.xml b/commons/res/xml/preferences.xml index b489e2e..50457fc 100644 --- a/commons/res/xml/preferences.xml +++ b/commons/res/xml/preferences.xml @@ -7,5 +7,11 @@ android:summary=@string/preference_tracking_summary android:defaultValue=true / +ListPreference +android:key=defaultLicense +android:title=@string/preference_license +android:defaultValue=CC BY-SA +/ + /PreferenceScreen \ No newline at end of file diff --git a/commons/src/main/java/org/wikimedia/commons/Media.java b/commons/src/main/java/org/wikimedia/commons/Media.java index f96e0cf..d300f30 100644 --- a/commons/src/main/java/org/wikimedia/commons/Media.java +++ b/commons/src/main/java/org/wikimedia/commons/Media.java @@ -119,6 +119,14 @@ this.height = height; } +public String getLicense() { +return license; +} + +public void setLicense(String license) { +
[MediaWiki-commits] [Gerrit] Link to mediawiki.org page in 'edithelppage' message - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Link to mediawiki.org page in 'edithelppage' message .. Link to mediawiki.org page in 'edithelppage' message The local page usually does not exist and the link is of little use to the point it was removed on en.wiki. The page on mediawiki.org is now translatable with all old translations imported and ready to get more. Also mark the message ignored per Siebrand. Bug: 45977 Change-Id: Ic0469c6c51a4d54ee214347fc416615c2f6cb1f0 --- M languages/messages/MessagesEn.php M languages/messages/MessagesQqq.php M maintenance/language/messageTypes.inc 3 files changed, 3 insertions(+), 2 deletions(-) Approvals: Brian Wolff: Looks good to me, approved Siebrand: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index c539dba..6f51326 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -908,7 +908,7 @@ 'disclaimers' = 'Disclaimers', 'disclaimerpage' = 'Project:General disclaimer', 'edithelp' = 'Editing help', -'edithelppage' = 'Help:Editing', +'edithelppage' = '//www.mediawiki.org/wiki/Special:MyLanguage/Help:Editing_pages', # do not translate or duplicate this message to other languages 'helppage' = 'Help:Contents', 'mainpage' = 'Main Page', 'mainpage-description' = 'Main page', diff --git a/languages/messages/MessagesQqq.php b/languages/messages/MessagesQqq.php index bec6bad..7366333 100644 --- a/languages/messages/MessagesQqq.php +++ b/languages/messages/MessagesQqq.php @@ -658,7 +658,7 @@ {{doc-important|Do not change the ttProject:/tt part.}}', 'edithelp' = 'This is the text that appears on the editing help link that is near the bottom of the editing page', 'edithelppage' = 'The help page displayed when a user clicks on editing help link which is present on the right of Show changes button. -{{doc-important|Do not change the ttHelp:/tt part.}}', +Can be customized by local wikis to point to a local page, but not translated.', 'helppage' = 'The link destination used by default in the sidebar, and in {{msg-mw|noarticletext}}. {{doc-important|Do not change the ttHelp:/tt part.}} {{Identical|HelpContent}}', diff --git a/maintenance/language/messageTypes.inc b/maintenance/language/messageTypes.inc index 17feaf9..e54af10 100644 --- a/maintenance/language/messageTypes.inc +++ b/maintenance/language/messageTypes.inc @@ -258,6 +258,7 @@ 'createacct-benefit-icon3', 'today-at', 'redirect-text', + 'edithelppage', ); /** Optional messages, which may be translated only if changed in the target language. */ -- To view, visit https://gerrit.wikimedia.org/r/62337 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic0469c6c51a4d54ee214347fc416615c2f6cb1f0 Gerrit-PatchSet: 5 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Matmarex matma@gmail.com Gerrit-Reviewer: Brian Wolff bawolff...@gmail.com Gerrit-Reviewer: Krinkle krinklem...@gmail.com Gerrit-Reviewer: Matmarex matma@gmail.com Gerrit-Reviewer: Nemo bis federicol...@tiscali.it Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com Gerrit-Reviewer: Siebrand siebr...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Only undo on MWMetaDialog close if small stack is non-empty - change (mediawiki...VisualEditor)
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/69316 Change subject: Only undo on MWMetaDialog close if small stack is non-empty .. Only undo on MWMetaDialog close if small stack is non-empty Added return boolean to ve.dm.Surface#breakpoint to indicate if and transactions were pushed to the big stack. Use this value in MWMetaDialog to see if we need to undo on close. Added tests for ve.dm.Surface#breakpoint. Bug: 49630 Change-Id: Ieb2e9e361afe057af93c4d374acc85df58bfb4c3 --- M modules/ve/dm/ve.dm.Surface.js M modules/ve/test/dm/ve.dm.Surface.test.js M modules/ve/ui/dialogs/ve.ui.MWMetaDialog.js 3 files changed, 30 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/16/69316/1 diff --git a/modules/ve/dm/ve.dm.Surface.js b/modules/ve/dm/ve.dm.Surface.js index bb71756..44c7cba 100644 --- a/modules/ve/dm/ve.dm.Surface.js +++ b/modules/ve/dm/ve.dm.Surface.js @@ -411,10 +411,11 @@ * @method * @param {ve.Range} selection New selection range * @emits history + * @returns {boolean} A breakpoint was added */ ve.dm.Surface.prototype.breakpoint = function ( selection ) { if ( !this.enabled ) { - return; + return false; } if ( this.smallStack.length 0 ) { this.bigStack.push( { @@ -423,7 +424,9 @@ } ); this.smallStack = []; this.emit( 'history' ); + return true; } + return false; }; /** diff --git a/modules/ve/test/dm/ve.dm.Surface.test.js b/modules/ve/test/dm/ve.dm.Surface.test.js index a5cf46c..232897d 100644 --- a/modules/ve/test/dm/ve.dm.Surface.test.js +++ b/modules/ve/test/dm/ve.dm.Surface.test.js @@ -57,3 +57,26 @@ surface.change( tx, new ve.Range( 2, 2 ) ); assert.deepEqual( events, { 'transact': 2, 'select': 2, 'change': 3 } ); } ); + +QUnit.test( 'breakpoint', 7, function ( assert ) { + var surface = new ve.dm.SurfaceStub(), + tx = new ve.dm.Transaction.newFromInsertion( surface.dm, 1, ['x'] ), + selection = new ve.Range( 1, 1 ); + + assert.equal( surface.breakpoint(), false, 'Returns false if no transactions applied' ); + + surface.change( tx, selection ); + assert.deepEqual( surface.bigStack, [], 'Big stack data matches before breakpoint' ); + assert.deepEqual( surface.smallStack, [tx], 'Small stack data matches before breakpoint' ); + + assert.equal( surface.breakpoint(), true, 'Returns true after transaction applied' ); + assert.equal( surface.breakpoint(), false, 'Returns false if no transactions applied since last breakpoint' ); + + assert.deepEqual( surface.bigStack, [ { + 'stack': [tx], + 'selection': selection + } ], + 'Big stack data matches after breakpoint' + ); + assert.deepEqual( surface.smallStack, [], 'Small stack data matches after breakpoint' ); +} ); diff --git a/modules/ve/ui/dialogs/ve.ui.MWMetaDialog.js b/modules/ve/ui/dialogs/ve.ui.MWMetaDialog.js index ffeeb43..21f6619 100644 --- a/modules/ve/ui/dialogs/ve.ui.MWMetaDialog.js +++ b/modules/ve/ui/dialogs/ve.ui.MWMetaDialog.js @@ -178,7 +178,7 @@ * @param {string} action Action that caused the window to be closed */ ve.ui.MWMetaDialog.prototype.onClose = function ( action ) { - var newDefaultSortKeyItem, newDefaultSortKeyItemData, + var hasTransactions, newDefaultSortKeyItem, newDefaultSortKeyItemData, surfaceModel = this.surface.getModel(), currentDefaultSortKeyItem = this.getDefaultSortKeyItem(); @@ -186,10 +186,10 @@ ve.ui.PagedDialog.prototype.onClose.call( this ); // Place transactions made while dialog was open in a common history state - surfaceModel.breakpoint(); + hasTransactions = surfaceModel.breakpoint(); // Undo everything done in the dialog and prevent redoing those changes - if ( action === 'cancel' ) { + if ( action === 'cancel' hasTransactions ) { surfaceModel.undo(); surfaceModel.truncateUndoStack(); } -- To view, visit https://gerrit.wikimedia.org/r/69316 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ieb2e9e361afe057af93c4d374acc85df58bfb4c3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders esand...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Display an introductory text for predefined properties - change (mediawiki...SemanticMediaWiki)
jenkins-bot has submitted this change and it was merged. Change subject: Display an introductory text for predefined properties .. Display an introductory text for predefined properties This is for users who barely know SMW (and for all others as well). It will display an introductory text for all predefined properties and links to smw.org allowing for easier access to available online resources. It is further possible to maintain an individual text component for each predefined property using the following message key 'smw-pa-property-predefined' + internal property key. ## Example Query size 'smw-pa-property-predefined' + '_asksi' = smw-pa-property-predefined_asksi' Query size is a predefined property (also known as special property) which collects the number of conditions used in a query. It is a built-in property that comes with additional administrative privileges but can be used just like any other user-defined property. ## Red links and predefined properties Using the TitleIsAlwaysKnown hook to override the known status which enables predefined properties to be shown as blue links. TitleIsAlwaysKnown hook was introduced in MW 1.20 which means that for 1.19 predefined properties are still displayed as red links (that's the price to be paid for people running an old MW). Of course you can combine LinkBegin + BeforeDisplayNoArticleText to shoulder also MW 1.19 but that's too much effort to justify to make it workable in MW 1.19 as well. One could extend SMWWikiPageValue to set the link options parameter $options[] = 'known' which would solve the issue for MW 1.19 but that's not part of this change. Bug: 23691 Change-Id: I029716a67302962e1b6e2d9a769c150b63d7da74 --- M SemanticMediaWiki.hooks.php M includes/Setup.php M includes/articlepages/ConceptPage.php M includes/articlepages/SMW_OrderedListPage.php M includes/articlepages/SMW_PropertyPage.php M languages/SMW_Messages.php M tests/phpunit/includes/HooksTest.php 7 files changed, 192 insertions(+), 9 deletions(-) Approvals: Mwjames: Looks good to me, approved jenkins-bot: Verified diff --git a/SemanticMediaWiki.hooks.php b/SemanticMediaWiki.hooks.php index 31d8389..fb3633c 100644 --- a/SemanticMediaWiki.hooks.php +++ b/SemanticMediaWiki.hooks.php @@ -122,6 +122,64 @@ } /** +* Hook: Before displaying noarticletext or noarticletext-nopermission messages. +* +* @see http://www.mediawiki.org/wiki/Manual:Hooks/BeforeDisplayNoArticleText +* +* @since 1.9 +* +* @param $article Article +* +* @return boolean +*/ + public static function onBeforeDisplayNoArticleText( $article ) { + + // Avoid having noarticletext info being generated for predefined + // properties as we are going to display an introductory text + if ( $article-getTitle()-getNamespace() === SMW_NS_PROPERTY ) { + return SMWDIProperty::newFromUserLabel( $article-getTitle()-getText() )-isUserDefined(); + } + + return true; + } + + /** +* Hook: Allows overriding default behaviour for determining if a page exists. +* +* @see http://www.mediawiki.org/wiki/Manual:Hooks/TitleIsAlwaysKnown +* +* @since 1.9 +* +* @param Title $title Title object that is being checked +* @param Boolean|null $result whether MediaWiki currently thinks this page is known +* +* @return boolean +*/ + public static function onTitleIsAlwaysKnown( Title $title, $result ) { + + // Two possible ways of going forward: + // + // The FIRST seen here is to use the hook to override the known status + // for predefined properties in order to avoid any edit link + // which makes no-sense for predefined properties + // + // The SECOND approach is to inject SMWWikiPageValue with a setLinkOptions setter + // that enables to set the custom options 'known' for each invoked linker during + // getShortHTMLText + // $linker-link( $this-getTitle(), $caption, $customAttributes, $customQuery, $customOptions ) + // + // @see also HooksTest::testOnTitleIsAlwaysKnown + + if ( $title-getNamespace() === SMW_NS_PROPERTY ) { + if ( !SMWDIProperty::newFromUserLabel( $title-getText() )-isUserDefined() ) { + $result = true; + } + } + + return true; + } + + /** * This hook registers parser functions and hooks to the given parser. It is * called during SMW initialisation. Note that parser hooks are something different * than MW hooks in general,
[MediaWiki-commits] [Gerrit] Add parameter new to editEntity API - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Add parameter new to editEntity API .. Add parameter new to editEntity API * Note that this will probably break current bots! * This also breaks some QUnit tests due to current incompatibility of wikibase.RepoApi.js. Fix will be provided in a follow-up. Bug: 49526 Change-Id: I6cdd0039dee35892fc9ea5ed8b3b60133adb03b9 --- M repo/includes/api/EditEntity.php M repo/includes/content/EntityContentFactory.php M repo/tests/phpunit/includes/api/BotEditTest.php M repo/tests/phpunit/includes/api/EditEntityTest.php M repo/tests/phpunit/includes/api/ModifyItemBase.php M repo/tests/phpunit/includes/api/PermissionsTest.php M repo/tests/phpunit/includes/content/EntityContentFactoryTest.php 7 files changed, 140 insertions(+), 70 deletions(-) Approvals: Daniel Kinzler: Looks good to me, approved jenkins-bot: Verified diff --git a/repo/includes/api/EditEntity.php b/repo/includes/api/EditEntity.php index feb7452..543b042 100644 --- a/repo/includes/api/EditEntity.php +++ b/repo/includes/api/EditEntity.php @@ -2,6 +2,8 @@ namespace Wikibase\Api; +use Wikibase\EntityContentFactory; +use InvalidArgumentException; use Wikibase\ChangeOps; use Wikibase\ChangeOpLabel; use Wikibase\ChangeOpDescription; @@ -12,7 +14,8 @@ use Wikibase\Entity; use Wikibase\EntityContent; use Wikibase\Item; -use Wikibase\ItemContent; +use Wikibase\Property; +use Wikibase\QueryContent; use Wikibase\Autocomment; use Wikibase\Utils; @@ -63,25 +66,18 @@ * @see ApiModifyEntity::createEntity() */ protected function createEntity( array $params ) { - if ( isset( $params['data'] ) ) { - $this-flags |= EDIT_NEW; - if ( isset($params['id']) ) { - switch ( $params['data'] ) { - case 'item': - return ItemContent::newEmpty(); - case 'property': - return \Wikibase\PropertyContent::newEmpty(); - case 'query': - return \Wikibase\QueryContent::newEmpty(); - default: - $this-dieUsage( $this-msg( 'wikibase-api-no-such-entity' )-text(), 'no-such-entity' ); - } - } - else { - return ItemContent::newEmpty(); - } + if ( !isset( $params['new'] ) ) { + $this-dieUsage( Either 'id' or 'new' parameter has to be set, 'no-such-entity' ); } - $this-dieUsage( $this-msg( 'wikibase-api-no-such-entity' )-text(), 'no-such-entity' ); + + $type = $params['new']; + $this-flags |= EDIT_NEW; + $entityContentFactory = EntityContentFactory::singleton(); + try { + return $entityContentFactory-newFromType( $type ); + } catch ( InvalidArgumentException $e ) { + $this-dieUsage( No such entity type: '$type', 'no-such-entity-type' ); + } } /** @@ -91,6 +87,12 @@ // note that this is changed back and could fail if ( !( isset( $params['data'] ) OR isset( $params['id'] ) XOR ( isset( $params['site'] ) isset( $params['title'] ) ) ) ) { $this-dieUsage( $this-msg( 'wikibase-api-data-or-id-xor-wikititle' )-text(), 'data-or-id-xor-wikititle' ); + } + if ( isset( $params['id'] ) isset( $params['new'] ) ) { + $this-dieUsage( Parameter 'id' and 'new' are not allowed to be both set in the same request, 'add-with-id' ); + } + if ( !isset( $params['id'] ) !isset( $params['new'] ) ) { + $this-dieUsage( Either 'id' or 'new' parameter has to be set, 'no-such-entity' ); } } @@ -126,6 +128,15 @@ $entityContent-getEntity()-clear(); } + // if we create a new property, make sure we set the datatype + if ( $entityContent-isNew() $entity-getType() === Property::ENTITY_TYPE ) { + if ( !isset( $data['datatype'] ) ) { + $this-dieUsage( 'No datatype given', 'edit-entity-create-property-failed' ); + } else { + $entity-setDataTypeId( $data['datatype'] ); + } + } + if ( array_key_exists( 'labels', $data ) ) { $changeOps-add( $this-getLabelChangeOps( $data['labels'], $status ) ); } @@ -157,20 +168,13
[MediaWiki-commits] [Gerrit] Fix handling of height parameter in TMH. - change (mediawiki...TimedMediaHandler)
J has submitted this change and it was merged. Change subject: Fix handling of height parameter in TMH. .. Fix handling of height parameter in TMH. The height parameter was being mostly ignored by TMH. Example invocations of height parameter that this changes: *[[File:Hindesite - Lily - Focus Stacking (by).ogv|900x150px]] *[[File:Hindesite - Lily - Focus Stacking (by).ogv|x100px]] Change-Id: Id37d771c4d0693980eb672f1f03f4c1a7129973d --- M TimedMediaHandler_body.php 1 file changed, 29 insertions(+), 7 deletions(-) Approvals: J: Verified; Looks good to me, approved jenkins-bot: Checked diff --git a/TimedMediaHandler_body.php b/TimedMediaHandler_body.php index 55b7bdc..5821a51 100644 --- a/TimedMediaHandler_body.php +++ b/TimedMediaHandler_body.php @@ -41,13 +41,15 @@ if ( $this-parseTimeString( $value ) === false ) { return false; } - } else if ( $name == 'disablecontrols' ) { + } elseif ( $name == 'disablecontrols' ) { $values = explode( ',', $value); foreach($values as $v) { if ( !in_array( $v, array( 'options', 'timedText', 'fullscreen' ) ) ) { return false; } } + } elseif( $name === 'width' || $name === 'height' ) { + return $value 0; } return true; } @@ -106,7 +108,7 @@ $timeParam = array( 'thumbtime', 'start', 'end' ); // Parse time values if endtime or thumbtime can't be more than length -1 foreach($timeParam as $pn){ - if ( isset( $params[$pn] ) ) { + if ( isset( $params[$pn] ) $params[$pn] !== false ) { $length = $this-getLength( $image ); $time = $this-parseTimeString( $params[$pn] ); if ( $time === false ) { @@ -118,13 +120,29 @@ } } } - // Make sure we don't try and up-scale the asset: - if( isset( $params['width'] ) (int)$params['width'] $image-getWidth() ){ - $params['width'] = $image-getWidth(); + + if ( !$this-isAudio( $image ) ) { + // Make sure we don't try and up-scale the asset: + if( isset( $params['width'] ) (int)$params['width'] $image-getWidth() ){ + $params['width'] = $image-getWidth(); + } + + if ( isset( $params['height'] ) $params['height'] != -1 ) { + if( $params['width'] * $image-getHeight() $params['height'] * $image-getWidth() ) { + $params['width'] = self::fitBoxWidth( $image-getWidth(), $image-getHeight(), $params['height'] ); + } + } + + $params['height'] = File::scaleHeight( $image-getWidth(), $image-getHeight(), $params['width'] ); + } // Make sure start time is not than end time - if(isset($params['start']) isset($params['end']) ){ + if( isset($params['start']) +isset($params['end'] ) +$params['start'] !== false +$params['end'] !== false + ) { if($params['start'] $params['end']) return false; } @@ -299,6 +317,11 @@ * @return bool|MediaTransformError|MediaTransformOutput|TimedMediaTransformOutput */ function doTransform( $file, $dstPath, $dstUrl, $params, $flags = 0 ) { + # Important or height handling is wrong. + if ( !$this-normaliseParams( $file, $params ) ) { + return new TransformParameterError( $params ); + } + $srcWidth = $file-getWidth(); $srcHeight = $file-getHeight(); @@ -317,7 +340,6 @@ $targetHeight = $params['height']; $targetWidth = round( $params['width']* $srcWidth / $srcHeight ); } - $options = array( 'file' = $file, 'length' = $this-getLength( $file ), -- To view, visit https://gerrit.wikimedia.org/r/68953 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id37d771c4d0693980eb672f1f03f4c1a7129973d Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/TimedMediaHandler Gerrit-Branch: master Gerrit-Owner:
[MediaWiki-commits] [Gerrit] Make JS repoApi aware of editEntity's new parameter - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Make JS repoApi aware of editEntity's new parameter .. Make JS repoApi aware of editEntity's new parameter Bug: 49526 Change-Id: If4a37d5de31c930d9227bdacbddf2fc6b9efa7ae --- M lib/resources/wikibase.RepoApi/wikibase.RepoApi.js M lib/tests/qunit/wikibase.RepoApi/wikibase.RepoApi.tests.js 2 files changed, 7 insertions(+), 4 deletions(-) Approvals: Daniel Kinzler: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/resources/wikibase.RepoApi/wikibase.RepoApi.js b/lib/resources/wikibase.RepoApi/wikibase.RepoApi.js index ae34f67..461c862 100644 --- a/lib/resources/wikibase.RepoApi/wikibase.RepoApi.js +++ b/lib/resources/wikibase.RepoApi/wikibase.RepoApi.js @@ -36,15 +36,18 @@ _api: new mw.Api(), /** -* Creates a new entity with given data. +* Creates a new entity with the given type and data. * +* @param {String} type The type of the entity that should be created. +* Currently supported types: item|property|query * @param {Object} [data] The entity data (may be omitted to create an empty entity) * @return {jQuery.Promise} */ - createEntity: function( data ) { + createEntity: function( type, data ) { var params = { action: 'wbeditentity', - data: $.toJSON( data ) + data: $.toJSON( data ), + 'new': type }; return this.post( params ); }, diff --git a/lib/tests/qunit/wikibase.RepoApi/wikibase.RepoApi.tests.js b/lib/tests/qunit/wikibase.RepoApi/wikibase.RepoApi.tests.js index 3dfed5a..f5b9c59 100644 --- a/lib/tests/qunit/wikibase.RepoApi/wikibase.RepoApi.tests.js +++ b/lib/tests/qunit/wikibase.RepoApi/wikibase.RepoApi.tests.js @@ -76,7 +76,7 @@ var createItem = function( data ) { data = data || {}; - api.createEntity( data ).done( function( response ) { + api.createEntity( 'item', data ).done( function( response ) { QUnit.assert.equal( response.success, 1, -- To view, visit https://gerrit.wikimedia.org/r/68639 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If4a37d5de31c930d9227bdacbddf2fc6b9efa7ae Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: Daniel Kinzler daniel.kinz...@wikimedia.de Gerrit-Reviewer: Daniel Werner daniel.wer...@wikimedia.de Gerrit-Reviewer: Henning Snater henning.sna...@wikimedia.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make use of centralauth tokens for MobileFrontend photo uploads - change (operations/mediawiki-config)
Jdlrobson has uploaded a new change for review. https://gerrit.wikimedia.org/r/69318 Change subject: Make use of centralauth tokens for MobileFrontend photo uploads .. Make use of centralauth tokens for MobileFrontend photo uploads Dependencies: * Ia3657a5f7c9f1f0035f2b244d56995a8ed8a9cc0 * Iada82266e0108189a727c39dad9e32c6cc1c120c Change-Id: I879ad418b0e927448994559e41a8280279661fa7 --- M wmf-config/InitialiseSettings.php M wmf-config/mobile.php 2 files changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/18/69318/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 612db4e..95f0be6 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -11131,6 +11131,9 @@ 'commonswiki' = '', # bug 45256 'test2wiki' = '', ), +'wgMFUseCentralAuthToken' = array( + 'default' = true, +), 'wmgMFForceSecureLogin' = array( 'default' = true, ), diff --git a/wmf-config/mobile.php b/wmf-config/mobile.php index f79db42..1e569c8 100644 --- a/wmf-config/mobile.php +++ b/wmf-config/mobile.php @@ -8,6 +8,7 @@ $wgMFNoindexPages = false; $wgMFNearby = $wmgMFNearby $wmgEnableGeoData; $wgMFPhotoUploadEndpoint = $wmgMFPhotoUploadEndpoint; + $wgMFUseCentralAuthToken = $wmgMFUseCentralAuthToken; $wgMFPhotoUploadWiki = $wmgMFPhotoUploadWiki; $wgMFPhotoUploadAppendToDesc = $wmgMFPhotoUploadAppendToDesc; -- To view, visit https://gerrit.wikimedia.org/r/69318 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I879ad418b0e927448994559e41a8280279661fa7 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Jdlrobson jrob...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use default mediawiki list formatting, and correct padding o... - change (mediawiki...erudite)
Njw has uploaded a new change for review. https://gerrit.wikimedia.org/r/69319 Change subject: Use default mediawiki list formatting, and correct padding of top menu items .. Use default mediawiki list formatting, and correct padding of top menu items Change-Id: Ib8ac831ba97f6d89b4a4be57354f9e7056905200 --- M assets/erudite.css 1 file changed, 2 insertions(+), 17 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/erudite refs/changes/19/69319/1 diff --git a/assets/erudite.css b/assets/erudite.css index 7f8356b..70f9e8a 100644 --- a/assets/erudite.css +++ b/assets/erudite.css @@ -169,8 +169,7 @@ #menu li { display: block; float: left; - margin-right: 2em; - margin-bottom: 0em; + margin: 0em 2em 0em 0em; } /* Footer */ @@ -296,11 +295,6 @@ padding-left: 3em; } -li { - list-style-position: outside; - margin-left: 2em; -} - .center { width: 100%; text-align: center; @@ -365,11 +359,8 @@ font-size: 0.875em; } +sup.reference:target, ol.references li:target { - background-color: #ddeeff; -} - -sup.reference:target { background-color: #ddeeff; } @@ -564,12 +555,6 @@ div#bodyContent { padding-bottom: 1.5em; -} - -/* don't give lists massive margins when in tds */ -.mw-content-ltr ul, -.mw-content-rtl ul { - margin-left: 0em; } /* reduce h3 top margin in a table, so can be used as a table title */ -- To view, visit https://gerrit.wikimedia.org/r/69319 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib8ac831ba97f6d89b4a4be57354f9e7056905200 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/erudite Gerrit-Branch: master Gerrit-Owner: Njw nick.wh...@durham.ac.uk ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fixed link to mobile homepage - change (mediawiki...MobileFrontend)
jenkins-bot has submitted this change and it was merged. Change subject: Fixed link to mobile homepage .. Fixed link to mobile homepage Change-Id: Ibe2c001cd1f979337c9e7db90273e179f4c84070 --- M MobileFrontend.i18n.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Yurik: Looks good to me, approved jenkins-bot: Verified diff --git a/MobileFrontend.i18n.php b/MobileFrontend.i18n.php index 891ad70..3b3786e 100644 --- a/MobileFrontend.i18n.php +++ b/MobileFrontend.i18n.php @@ -39,7 +39,7 @@ 'mobile-frontend-back-to-top-of-section' = 'Jump back a section', 'mobile-frontend-close-section' = 'Close this section', - 'mobile-frontend-empty-homepage-text' = 'This homepage needs to be configured. [//meta.wikimedia.org/wiki/Mobile_Projects/Mobile_Gateway#Mobile_homepage Instructions on how to get this site mobile enabled]', + 'mobile-frontend-empty-homepage-text' = 'This homepage needs to be configured. [https://www.mediawiki.org/wiki/Mobile_Gateway/Mobile_homepage_formatting Instructions on how to get this site mobile enabled]', 'mobile-frontend-regular-site' = 'Desktop view', 'mobile-frontend-wml-continue' = 'Continue...', 'mobile-frontend-wml-back' = 'Back...', -- To view, visit https://gerrit.wikimedia.org/r/69283 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibe2c001cd1f979337c9e7db90273e179f4c84070 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Yurik yu...@wikimedia.org Gerrit-Reviewer: MaxSem maxsem.w...@gmail.com Gerrit-Reviewer: Siebrand siebr...@wikimedia.org Gerrit-Reviewer: Yurik yu...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix $wgWBWikibase alias for PHP 5.5. - change (mediawiki...Wikibase)
Daniel Kinzler has uploaded a new change for review. https://gerrit.wikimedia.org/r/69320 Change subject: Fix $wgWBWikibase alias for PHP 5.5. .. Fix $wgWBWikibase alias for PHP 5.5. PHP 5.5 doesn't support referencing via the $GLOBALS array. So do it in the file scope. That will only work if that is actually the global scope, for for a B/C hack, that should be good enough. Change-Id: Ie9549b35f89458acf8bb981a4433291446090634 --- M client/WikibaseClient.php M repo/Wikibase.php 2 files changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/20/69320/1 diff --git a/client/WikibaseClient.php b/client/WikibaseClient.php index 2583f0d..1dee99c 100644 --- a/client/WikibaseClient.php +++ b/client/WikibaseClient.php @@ -161,9 +161,9 @@ require( __DIR__ . '/config/WikibaseClient.default.php' ) ); - $GLOBALS['wgWBSettings'] = $GLOBALS['wgWBClientSettings']; // B/C alias - if ( defined( 'WB_EXPERIMENTAL_FEATURES' ) WB_EXPERIMENTAL_FEATURES ) { include_once( $dir . 'config/WikibaseClient.experimental.php' ); } } ); + +$wgWBSettings = $wgWBClientSettings; // B/C alias diff --git a/repo/Wikibase.php b/repo/Wikibase.php index f136876..b541afb 100644 --- a/repo/Wikibase.php +++ b/repo/Wikibase.php @@ -194,9 +194,9 @@ require( __DIR__ . '/config/Wikibase.default.php' ) ); - $GLOBALS['wgWBSettings'] = $GLOBALS['wgWBRepoSettings']; // B/C alias - if ( defined( 'WB_EXPERIMENTAL_FEATURES' ) WB_EXPERIMENTAL_FEATURES ) { include_once( __DIR__ . '/config/Wikibase.experimental.php' ); } } ); + +$wgWBSettings = $wgWBRepoSettings; // B/C alias -- To view, visit https://gerrit.wikimedia.org/r/69320 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie9549b35f89458acf8bb981a4433291446090634 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Daniel Kinzler daniel.kinz...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix $wgWBWikibase alias for PHP 5.5. - change (mediawiki...Wikibase)
Jeroen De Dauw has submitted this change and it was merged. Change subject: Fix $wgWBWikibase alias for PHP 5.5. .. Fix $wgWBWikibase alias for PHP 5.5. PHP 5.5 doesn't support referencing via the $GLOBALS array. So do it in the file scope. That will only work if that is actually the global scope, for for a B/C hack, that should be good enough. Change-Id: Ie9549b35f89458acf8bb981a4433291446090634 --- M client/WikibaseClient.php M repo/Wikibase.php 2 files changed, 4 insertions(+), 4 deletions(-) Approvals: Jeroen De Dauw: Looks good to me, approved jenkins-bot: Verified diff --git a/client/WikibaseClient.php b/client/WikibaseClient.php index 2583f0d..1dee99c 100644 --- a/client/WikibaseClient.php +++ b/client/WikibaseClient.php @@ -161,9 +161,9 @@ require( __DIR__ . '/config/WikibaseClient.default.php' ) ); - $GLOBALS['wgWBSettings'] = $GLOBALS['wgWBClientSettings']; // B/C alias - if ( defined( 'WB_EXPERIMENTAL_FEATURES' ) WB_EXPERIMENTAL_FEATURES ) { include_once( $dir . 'config/WikibaseClient.experimental.php' ); } } ); + +$wgWBSettings = $wgWBClientSettings; // B/C alias diff --git a/repo/Wikibase.php b/repo/Wikibase.php index f136876..b541afb 100644 --- a/repo/Wikibase.php +++ b/repo/Wikibase.php @@ -194,9 +194,9 @@ require( __DIR__ . '/config/Wikibase.default.php' ) ); - $GLOBALS['wgWBSettings'] = $GLOBALS['wgWBRepoSettings']; // B/C alias - if ( defined( 'WB_EXPERIMENTAL_FEATURES' ) WB_EXPERIMENTAL_FEATURES ) { include_once( __DIR__ . '/config/Wikibase.experimental.php' ); } } ); + +$wgWBSettings = $wgWBRepoSettings; // B/C alias -- To view, visit https://gerrit.wikimedia.org/r/69320 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie9549b35f89458acf8bb981a4433291446090634 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Daniel Kinzler daniel.kinz...@wikimedia.de Gerrit-Reviewer: Jeroen De Dauw jeroended...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix a message that is not client name free - change (mediawiki...Wikibase)
Tpt has uploaded a new change for review. https://gerrit.wikimedia.org/r/69321 Change subject: Fix a message that is not client name free .. Fix a message that is not client name free Change-Id: I659e4650f445c8f8d666df3ed8f49ad252a1f7a6 --- M lib/WikibaseLib.i18n.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/21/69321/1 diff --git a/lib/WikibaseLib.i18n.php b/lib/WikibaseLib.i18n.php index dc5d086..4c14310 100644 --- a/lib/WikibaseLib.i18n.php +++ b/lib/WikibaseLib.i18n.php @@ -35,7 +35,7 @@ 'wikibase-error-remove-connection' = 'A connection error occurred while trying to perform remove, and because of this your changes could not be completed. Please check your Internet connection.', 'wikibase-error-save-timeout' = 'We are experiencing technical difficulties, and because of this your save could not be completed.', 'wikibase-error-remove-timeout' = 'We are experiencing technical difficulties, and because of this your remove could not be completed.', - 'wikibase-error-autocomplete-connection' = 'Could not query Wikipedia API. Please try again later.', + 'wikibase-error-autocomplete-connection' = 'Could not query site API. Please try again later.', 'wikibase-error-autocomplete-response' = 'Server responded: $1', 'wikibase-error-ui-client-error' = 'The connection to the client page failed. Please try again later.', 'wikibase-error-ui-no-external-page' = 'The specified article could not be found on the corresponding site.', @@ -114,7 +114,7 @@ 'wikibase-sitelinks-sitename-columnheading' = 'Site links table column heading for the column containing the language names. {{Identical|Language}}', 'wikibase-sitelinks-siteid-columnheading' = 'Site links table column heading for the column containing the language codes.', - 'wikibase-sitelinks-link-columnheading' = 'Site links table column heading for the column containg the title/link of/to the referenced (Wikipedia) page.', + 'wikibase-sitelinks-link-columnheading' = 'Site links table column heading for the column containg the title/link of/to the referenced (wiki) page.', 'wikibase-tooltip-error-details' = 'Link within an error tooltip that will unfold additional information regarding the error (i.e. the more specific error message returned from the underlying API). {{Identical|Details}}', 'datatypes-type-wikibase-item' = 'The name of a data type for items in Wikibase. -- To view, visit https://gerrit.wikimedia.org/r/69321 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I659e4650f445c8f8d666df3ed8f49ad252a1f7a6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Tpt thoma...@hotmail.fr ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix a message that is not client name free - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Fix a message that is not client name free .. Fix a message that is not client name free Change-Id: I659e4650f445c8f8d666df3ed8f49ad252a1f7a6 --- M lib/WikibaseLib.i18n.php 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Aude: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/WikibaseLib.i18n.php b/lib/WikibaseLib.i18n.php index dc5d086..4c14310 100644 --- a/lib/WikibaseLib.i18n.php +++ b/lib/WikibaseLib.i18n.php @@ -35,7 +35,7 @@ 'wikibase-error-remove-connection' = 'A connection error occurred while trying to perform remove, and because of this your changes could not be completed. Please check your Internet connection.', 'wikibase-error-save-timeout' = 'We are experiencing technical difficulties, and because of this your save could not be completed.', 'wikibase-error-remove-timeout' = 'We are experiencing technical difficulties, and because of this your remove could not be completed.', - 'wikibase-error-autocomplete-connection' = 'Could not query Wikipedia API. Please try again later.', + 'wikibase-error-autocomplete-connection' = 'Could not query site API. Please try again later.', 'wikibase-error-autocomplete-response' = 'Server responded: $1', 'wikibase-error-ui-client-error' = 'The connection to the client page failed. Please try again later.', 'wikibase-error-ui-no-external-page' = 'The specified article could not be found on the corresponding site.', @@ -114,7 +114,7 @@ 'wikibase-sitelinks-sitename-columnheading' = 'Site links table column heading for the column containing the language names. {{Identical|Language}}', 'wikibase-sitelinks-siteid-columnheading' = 'Site links table column heading for the column containing the language codes.', - 'wikibase-sitelinks-link-columnheading' = 'Site links table column heading for the column containg the title/link of/to the referenced (Wikipedia) page.', + 'wikibase-sitelinks-link-columnheading' = 'Site links table column heading for the column containg the title/link of/to the referenced (wiki) page.', 'wikibase-tooltip-error-details' = 'Link within an error tooltip that will unfold additional information regarding the error (i.e. the more specific error message returned from the underlying API). {{Identical|Details}}', 'datatypes-type-wikibase-item' = 'The name of a data type for items in Wikibase. -- To view, visit https://gerrit.wikimedia.org/r/69321 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I659e4650f445c8f8d666df3ed8f49ad252a1f7a6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Tpt thoma...@hotmail.fr Gerrit-Reviewer: Aude aude.w...@gmail.com Gerrit-Reviewer: Denny Vrandecic denny.vrande...@wikimedia.de Gerrit-Reviewer: Siebrand siebr...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Enable Special:LoginHandshake on betlabs - change (operations/mediawiki-config)
awjrichards has uploaded a new change for review. https://gerrit.wikimedia.org/r/69322 Change subject: Enable Special:LoginHandshake on betlabs .. Enable Special:LoginHandshake on betlabs Change-Id: I6d34eca91e92f4ab414148a7149c98552a3c2b1d --- M wmf-config/InitialiseSettings-labs.php 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/22/69322/1 diff --git a/wmf-config/InitialiseSettings-labs.php b/wmf-config/InitialiseSettings-labs.php index e716702..5b8f8e8 100644 --- a/wmf-config/InitialiseSettings-labs.php +++ b/wmf-config/InitialiseSettings-labs.php @@ -223,6 +223,9 @@ 'wmgMFLogEvents' = array( 'default' = false, ), + 'wmgMFLoginHandshakeUrl' = array( + 'default' = '//commons.wikimedia.org/wiki/Special:LoginHandshake?useformat=mobile', + ), 'wmgEnableGeoData' = array( 'default' = true, -- To view, visit https://gerrit.wikimedia.org/r/69322 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6d34eca91e92f4ab414148a7149c98552a3c2b1d Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: awjrichards aricha...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Restrict Verified/Submit to JenkinsBot and l10n-bot - change (qa/browsertests)
Krinkle has uploaded a new change for review. https://gerrit.wikimedia.org/r/69323 Change subject: Restrict Verified/Submit to JenkinsBot and l10n-bot .. Restrict Verified/Submit to JenkinsBot and l10n-bot Change-Id: I604dae99396b0d4ef5ac20fa5122be1fab69cbf4 --- M groups M project.config 2 files changed, 10 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/qa/browsertests refs/changes/23/69323/1 diff --git a/groups b/groups index 5596ff8..9fdf2d8 100644 --- a/groups +++ b/groups @@ -1,4 +1,7 @@ # UUID Group Name # +global:Registered-UsersRegistered Users +2bc47fcadf4e44ec9a1a73bcfa06232554f47ce2 JenkinsBot +cc37d98e3a4301744a0c0a9249173ae170696072 l10n-bot 820a70a4a276bb79b029e06283093d9288008500 mediawiki-replication f1a4f45ff494ed376aa7ef497c72fb78e84f14f6 qa diff --git a/project.config b/project.config index c76dd85..69f2802 100644 --- a/project.config +++ b/project.config @@ -5,6 +5,13 @@ [access refs/*] owner = group qa read = group mediawiki-replication +[access refs/heads/master] + label-Verified = -1..+2 group JenkinsBot + label-Verified = -1..+2 group l10n-bot + label-Verified = -1..+0 group Registered Users + submit = deny group Registered Users + submit = group JenkinsBot + submit = group l10n-bot [receive] requireChangeId = true [submit] -- To view, visit https://gerrit.wikimedia.org/r/69323 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I604dae99396b0d4ef5ac20fa5122be1fab69cbf4 Gerrit-PatchSet: 1 Gerrit-Project: qa/browsertests Gerrit-Branch: refs/meta/config Gerrit-Owner: Krinkle krinklem...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Enable Special:LoginHandshake on betlabs - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: Enable Special:LoginHandshake on betlabs .. Enable Special:LoginHandshake on betlabs Change-Id: I6d34eca91e92f4ab414148a7149c98552a3c2b1d --- M wmf-config/InitialiseSettings-labs.php 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: awjrichards: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/InitialiseSettings-labs.php b/wmf-config/InitialiseSettings-labs.php index e716702..6f9b3fa 100644 --- a/wmf-config/InitialiseSettings-labs.php +++ b/wmf-config/InitialiseSettings-labs.php @@ -223,6 +223,9 @@ 'wmgMFLogEvents' = array( 'default' = false, ), + 'wmgMFLoginHandshakeUrl' = array( + 'default' = '//commons.wikimedia.beta.wmflabs.org/wiki/Special:LoginHandshake?useformat=mobile', + ), 'wmgEnableGeoData' = array( 'default' = true, -- To view, visit https://gerrit.wikimedia.org/r/69322 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6d34eca91e92f4ab414148a7149c98552a3c2b1d Gerrit-PatchSet: 2 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: awjrichards aricha...@wikimedia.org Gerrit-Reviewer: awjrichards aricha...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Instruct robots to stop indexing zero.wikipedia.org and its ... - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: Instruct robots to stop indexing zero.wikipedia.org and its subdomains. .. Instruct robots to stop indexing zero.wikipedia.org and its subdomains. Change-Id: I63a4542c9792e4979f2a9668d0a5c858f21f591b --- M w/robots.php 1 file changed, 8 insertions(+), 2 deletions(-) Approvals: Mark Bergsma: Looks good to me, but someone else must approve Yurik: Looks good to me, approved jenkins-bot: Verified diff --git a/w/robots.php b/w/robots.php index af697e9..f0ed293 100644 --- a/w/robots.php +++ b/w/robots.php @@ -16,14 +16,20 @@ $robots = fopen( $robotsfile, 'rb' ); $text = ''; +$zeroRated = isset( $_SERVER['HTTP_X_SUBDOMAIN'] ) $_SERVER['HTTP_X_SUBDOMAIN'] === 'ZERO'; + header( 'Cache-Control: s-maxage=3600, must-revalidate, max-age=0' ); -if ( $wgArticle-getID() != 0 ) { +$dontIndex = User-agent: *\nDisallow: /\n; + +if ( $zeroRated ) { + echo $dontIndex; +} elseif ( $wgArticle-getID() != 0 ) { $text = $wgArticle-getContent( false ) ; $lastmod = gmdate( 'D, j M Y H:i:s', wfTimestamp( TS_UNIX, $wgArticle-getTouched() ) ) . ' GMT'; header( Last-modified: $lastmod ); } elseif( $wmfRealm == 'labs' ) { - echo User-agent: *\nDisallow: /\n; + echo $dontIndex; } else { $stats = fstat( $robots ); -- To view, visit https://gerrit.wikimedia.org/r/64629 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I63a4542c9792e4979f2a9668d0a5c858f21f591b Gerrit-PatchSet: 4 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Dr0ptp4kt ab...@wikimedia.org Gerrit-Reviewer: Asher afeld...@wikimedia.org Gerrit-Reviewer: CSteipp cste...@wikimedia.org Gerrit-Reviewer: Dr0ptp4kt ab...@wikimedia.org Gerrit-Reviewer: Jdlrobson jrob...@wikimedia.org Gerrit-Reviewer: MZMcBride w...@mzmcbride.com Gerrit-Reviewer: Mark Bergsma m...@wikimedia.org Gerrit-Reviewer: MaxSem maxsem.w...@gmail.com Gerrit-Reviewer: Ryan Lane rl...@wikimedia.org Gerrit-Reviewer: Yurik yu...@wikimedia.org Gerrit-Reviewer: awjrichards aricha...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add Tabs to Console Log Output - change (wikimedia...PaymentsListeners)
Mwalker has uploaded a new change for review. https://gerrit.wikimedia.org/r/69324 Change subject: Add Tabs to Console Log Output .. Add Tabs to Console Log Output Instead of using a space character to separate components in the log stream -- this now uses tabs. It results in a much more readable wall o' text. Change-Id: Ib9698485be253640ba1694d3d69f9013c55884ec --- M SmashPig/Core/Logging/ConsoleLogStream.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/PaymentsListeners refs/changes/24/69324/1 diff --git a/SmashPig/Core/Logging/ConsoleLogStream.php b/SmashPig/Core/Logging/ConsoleLogStream.php index d5ff938..256bff6 100644 --- a/SmashPig/Core/Logging/ConsoleLogStream.php +++ b/SmashPig/Core/Logging/ConsoleLogStream.php @@ -29,7 +29,7 @@ $msgstr = $msg[ 'message' ]; } - print( [{$name}] ({$this-context}) $msgstr\n ); + print( [{$name}]\t({$this-context})\t$msgstr\n ); } /** -- To view, visit https://gerrit.wikimedia.org/r/69324 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib9698485be253640ba1694d3d69f9013c55884ec Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/PaymentsListeners Gerrit-Branch: master Gerrit-Owner: Mwalker mwal...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Improve ./configure search for lua - change (mediawiki...luasandbox)
jenkins-bot has submitted this change and it was merged. Change subject: Improve ./configure search for lua .. Improve ./configure search for lua It is possible that the lua in pkg-config is not Lua 5.1. Fortunately, pkg-config handles predicates such as lua = 5.1 lua 5.2 properly. Also, adjust pkg.m4 to print the pkg-config module being checked, rather than the variable being defined. Otherwise ./configure says checking for LUA... no / checking for LUA... yes, which is less than helpful. Change-Id: I330f42edefb1000bc381070f5232919cd9bef692 --- M config.m4 M m4/pkg.m4 2 files changed, 7 insertions(+), 2 deletions(-) Approvals: Aaron Schulz: Looks good to me, approved jenkins-bot: Verified diff --git a/config.m4 b/config.m4 index 13b15f9..1f32754 100644 --- a/config.m4 +++ b/config.m4 @@ -14,7 +14,7 @@ dnl We need lua or fallback to luajit. dnl Under debian package is known as 'lua5.1' dnl Under freebsd package is known as 'lua-5.1' - PKG_CHECK_MODULES([LUA], [lua],, [ + PKG_CHECK_MODULES([LUA], [lua = 5.1 lua 5.2],, [ PKG_CHECK_MODULES([LUA], [lua5.1],, [ PKG_CHECK_MODULES([LUA], [lua-5.1],, [ PKG_CHECK_MODULES([LUA], [luajit]) diff --git a/m4/pkg.m4 b/m4/pkg.m4 index 9a71878..887d94c 100644 --- a/m4/pkg.m4 +++ b/m4/pkg.m4 @@ -21,6 +21,11 @@ # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. +# +# +# CHANGES: +# 2013-06-18: bjor...@wikimedia.org Print $2 instead of $1 in the checking +# for XXX line. # PKG_PROG_PKG_CONFIG([MIN-VERSION]) # -- @@ -109,7 +114,7 @@ AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no -AC_MSG_CHECKING([for $1]) +AC_MSG_CHECKING([for $2]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) -- To view, visit https://gerrit.wikimedia.org/r/69315 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I330f42edefb1000bc381070f5232919cd9bef692 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/php/luasandbox Gerrit-Branch: master Gerrit-Owner: Anomie bjor...@wikimedia.org Gerrit-Reviewer: Aaron Schulz asch...@wikimedia.org Gerrit-Reviewer: Demon ch...@wikimedia.org Gerrit-Reviewer: Hashar has...@free.fr Gerrit-Reviewer: Tim Starling tstarl...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Restrict Verified/Submit to JenkinsBot and l10n-bot - change (qa/browsertests)
Krinkle has submitted this change and it was merged. Change subject: Restrict Verified/Submit to JenkinsBot and l10n-bot .. Restrict Verified/Submit to JenkinsBot and l10n-bot Change-Id: I604dae99396b0d4ef5ac20fa5122be1fab69cbf4 --- M groups M project.config 2 files changed, 10 insertions(+), 0 deletions(-) Approvals: Krinkle: Verified; Looks good to me, approved diff --git a/groups b/groups index 5596ff8..9fdf2d8 100644 --- a/groups +++ b/groups @@ -1,4 +1,7 @@ # UUID Group Name # +global:Registered-UsersRegistered Users +2bc47fcadf4e44ec9a1a73bcfa06232554f47ce2 JenkinsBot +cc37d98e3a4301744a0c0a9249173ae170696072 l10n-bot 820a70a4a276bb79b029e06283093d9288008500 mediawiki-replication f1a4f45ff494ed376aa7ef497c72fb78e84f14f6 qa diff --git a/project.config b/project.config index c76dd85..69f2802 100644 --- a/project.config +++ b/project.config @@ -5,6 +5,13 @@ [access refs/*] owner = group qa read = group mediawiki-replication +[access refs/heads/master] + label-Verified = -1..+2 group JenkinsBot + label-Verified = -1..+2 group l10n-bot + label-Verified = -1..+0 group Registered Users + submit = deny group Registered Users + submit = group JenkinsBot + submit = group l10n-bot [receive] requireChangeId = true [submit] -- To view, visit https://gerrit.wikimedia.org/r/69323 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I604dae99396b0d4ef5ac20fa5122be1fab69cbf4 Gerrit-PatchSet: 1 Gerrit-Project: qa/browsertests Gerrit-Branch: refs/meta/config Gerrit-Owner: Krinkle krinklem...@gmail.com Gerrit-Reviewer: Krinkle krinklem...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Enable centralauth token for mobile on betalabs - change (operations/mediawiki-config)
awjrichards has uploaded a new change for review. https://gerrit.wikimedia.org/r/69325 Change subject: Enable centralauth token for mobile on betalabs .. Enable centralauth token for mobile on betalabs Change-Id: Ie757e873bd12666bc7614e6f39cfffd7f48a488d --- M wmf-config/InitialiseSettings-labs.php M wmf-config/mobile-labs.php 2 files changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/25/69325/1 diff --git a/wmf-config/InitialiseSettings-labs.php b/wmf-config/InitialiseSettings-labs.php index 6f9b3fa..61396fb 100644 --- a/wmf-config/InitialiseSettings-labs.php +++ b/wmf-config/InitialiseSettings-labs.php @@ -226,6 +226,9 @@ 'wmgMFLoginHandshakeUrl' = array( 'default' = '//commons.wikimedia.beta.wmflabs.org/wiki/Special:LoginHandshake?useformat=mobile', ), + 'wmgMFUseCentralAuthToken' = array( + 'default' = true, + ), 'wmgEnableGeoData' = array( 'default' = true, diff --git a/wmf-config/mobile-labs.php b/wmf-config/mobile-labs.php index 35182f0..f77a6b4 100644 --- a/wmf-config/mobile-labs.php +++ b/wmf-config/mobile-labs.php @@ -7,4 +7,4 @@ require_once( __DIR__ . '/mobile.php' ); $wgMFForceSecureLogin = false; -$wgMFLoginHandshakeUrl = 'http://commons.wikimedia.beta.wmflabs.org/wiki/Special:LoginHandshake?useformat=mobile'; +$wgMFUseCentralAuthToken = $wmgMFUseCentralAuthToken; -- To view, visit https://gerrit.wikimedia.org/r/69325 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie757e873bd12666bc7614e6f39cfffd7f48a488d Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: awjrichards aricha...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Enable centralauth token for mobile on betalabs - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: Enable centralauth token for mobile on betalabs .. Enable centralauth token for mobile on betalabs Change-Id: Ie757e873bd12666bc7614e6f39cfffd7f48a488d --- M wmf-config/InitialiseSettings-labs.php M wmf-config/mobile-labs.php 2 files changed, 4 insertions(+), 1 deletion(-) Approvals: awjrichards: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/InitialiseSettings-labs.php b/wmf-config/InitialiseSettings-labs.php index 6f9b3fa..61396fb 100644 --- a/wmf-config/InitialiseSettings-labs.php +++ b/wmf-config/InitialiseSettings-labs.php @@ -226,6 +226,9 @@ 'wmgMFLoginHandshakeUrl' = array( 'default' = '//commons.wikimedia.beta.wmflabs.org/wiki/Special:LoginHandshake?useformat=mobile', ), + 'wmgMFUseCentralAuthToken' = array( + 'default' = true, + ), 'wmgEnableGeoData' = array( 'default' = true, diff --git a/wmf-config/mobile-labs.php b/wmf-config/mobile-labs.php index 35182f0..f77a6b4 100644 --- a/wmf-config/mobile-labs.php +++ b/wmf-config/mobile-labs.php @@ -7,4 +7,4 @@ require_once( __DIR__ . '/mobile.php' ); $wgMFForceSecureLogin = false; -$wgMFLoginHandshakeUrl = 'http://commons.wikimedia.beta.wmflabs.org/wiki/Special:LoginHandshake?useformat=mobile'; +$wgMFUseCentralAuthToken = $wmgMFUseCentralAuthToken; -- To view, visit https://gerrit.wikimedia.org/r/69325 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie757e873bd12666bc7614e6f39cfffd7f48a488d Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: awjrichards aricha...@wikimedia.org Gerrit-Reviewer: awjrichards aricha...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] (bug 49286) ArticleFeedbackv5: Consider showing reader feed... - change (mediawiki...ArticleFeedbackv5)
jenkins-bot has submitted this change and it was merged. Change subject: (bug 49286) ArticleFeedbackv5: Consider showing reader feedback less or not on top of the page .. (bug 49286) ArticleFeedbackv5: Consider showing reader feedback less or not on top of the page Bug: 49286 Change-Id: If8e8808f5b0d94fe3d1c0718adbf166a333aff92 --- M modules/ext.articleFeedbackv5/ext.articleFeedbackv5.css M modules/ext.articleFeedbackv5/ext.articleFeedbackv5.js M modules/ext.articleFeedbackv5/ext.articleFeedbackv5.talk.css M modules/ext.articleFeedbackv5/ext.articleFeedbackv5.talk.js 4 files changed, 26 insertions(+), 10 deletions(-) Approvals: Kaldari: Looks good to me, approved EBernhardson (WMF): Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/modules/ext.articleFeedbackv5/ext.articleFeedbackv5.css b/modules/ext.articleFeedbackv5/ext.articleFeedbackv5.css index 3b97d5c..9c1a859 100644 --- a/modules/ext.articleFeedbackv5/ext.articleFeedbackv5.css +++ b/modules/ext.articleFeedbackv5/ext.articleFeedbackv5.css @@ -1,6 +1,4 @@ #articlefeedbackv5-article-feedback-link { - font-size: 14px; - /* @embed */ background-image: url(../jquery.articleFeedbackv5/images/toolbox_discuss.png); /* @embed */ diff --git a/modules/ext.articleFeedbackv5/ext.articleFeedbackv5.js b/modules/ext.articleFeedbackv5/ext.articleFeedbackv5.js index 9da3bcd..94372f2 100644 --- a/modules/ext.articleFeedbackv5/ext.articleFeedbackv5.js +++ b/modules/ext.articleFeedbackv5/ext.articleFeedbackv5.js @@ -41,11 +41,21 @@ url += ( url.indexOf( '?' ) = 0 ? '' : '?' ) + $.param( { ref: 'article', filter: 'featured' } ); // Add the link to the feedback-page next to the title - $( 'a id=articlefeedbackv5-article-feedback-link/a' ) + var $link = $( 'a id=articlefeedbackv5-article-feedback-link/a' ) .msg( 'articlefeedbackv5-article-view-feedback', count ) .attr( 'href', url ) - .click( { trackingId: 'article_page_view_feedback-button_click' }, $.aftTrack.trackEvent ) - .insertAfter( '#siteSub' ); + .click( { trackingId: 'article_page_view_feedback-button_click' }, $.aftTrack.trackEvent ); + + /* +* Add the link next to #siteSub. Append to #siteSub node if +* it's visible, so we inherit it's style. Otherwise, add as +* new node, right after #siteSub +*/ + if ( $( '#siteSub' ).is( ':visible' ) ) { + $link.appendTo( '#siteSub' ); + } else { + $link.insertAfter( '#siteSub' ); + } // Track an impression $.aftTrack.init(); diff --git a/modules/ext.articleFeedbackv5/ext.articleFeedbackv5.talk.css b/modules/ext.articleFeedbackv5/ext.articleFeedbackv5.talk.css index d3b2357..4309808 100644 --- a/modules/ext.articleFeedbackv5/ext.articleFeedbackv5.talk.css +++ b/modules/ext.articleFeedbackv5/ext.articleFeedbackv5.talk.css @@ -1,6 +1,4 @@ #articlefeedbackv5-talk-feedback-link { - font-size: 14px; - /* @embed */ background-image: url(../jquery.articleFeedbackv5/images/toolbox_discuss.png); /* @embed */ diff --git a/modules/ext.articleFeedbackv5/ext.articleFeedbackv5.talk.js b/modules/ext.articleFeedbackv5/ext.articleFeedbackv5.talk.js index efd4675..a3600da 100644 --- a/modules/ext.articleFeedbackv5/ext.articleFeedbackv5.talk.js +++ b/modules/ext.articleFeedbackv5/ext.articleFeedbackv5.talk.js @@ -35,11 +35,21 @@ url += ( url.indexOf( '?' ) = 0 ? '' : '?' ) + $.param( { ref: 'talk', filter: 'featured' } ); // Add the link to the feedback-page next to the title - $( 'a id=articlefeedbackv5-talk-feedback-link/a' ) + var $link = $( 'a id=articlefeedbackv5-talk-feedback-link/a' ) .text( mw.msg( 'articlefeedbackv5-talk-view-feedback' ) ) .attr( 'href', url ) - .click( { trackingId: 'talk_page_view_feedback-button_click' }, $.aftTrack.trackEvent ) - .insertAfter( '#siteSub' ); + .click( { trackingId:
[MediaWiki-commits] [Gerrit] Correctly distinguish between Deferred and Promise - change (mediawiki...VisualEditor)
Catrope has uploaded a new change for review. https://gerrit.wikimedia.org/r/69326 Change subject: Correctly distinguish between Deferred and Promise .. Correctly distinguish between Deferred and Promise Deferred is read-write, Promise is read-only. Document and return the correct types. Change-Id: Icfd6efb07b222c73d49b97ddbfe6565b8542ad00 --- M modules/ve/ce/nodes/ve.ce.MWTransclusionNode.js M modules/ve/ui/dialogs/ve.ui.MWMetaDialog.js M modules/ve/ui/widgets/ve.ui.LookupInputWidget.js M modules/ve/ui/widgets/ve.ui.MWCategoryInputWidget.js M modules/ve/ui/widgets/ve.ui.MWLinkTargetInputWidget.js 5 files changed, 20 insertions(+), 20 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/26/69326/1 diff --git a/modules/ve/ce/nodes/ve.ce.MWTransclusionNode.js b/modules/ve/ce/nodes/ve.ce.MWTransclusionNode.js index 5dc5738..d61c631 100644 --- a/modules/ve/ce/nodes/ve.ce.MWTransclusionNode.js +++ b/modules/ve/ce/nodes/ve.ce.MWTransclusionNode.js @@ -51,7 +51,7 @@ /* Methods */ ve.ce.MWTransclusionNode.prototype.generateContents = function () { - var promise = $.Deferred(); + var deferred = $.Deferred(); $.ajax( { 'url': mw.util.wikiScript( 'api' ), 'data': { @@ -67,19 +67,19 @@ // Wait up to 100 seconds before giving up 'timeout': 10, 'cache': 'false', - 'success': ve.bind( this.onParseSuccess, this, promise ), - 'error': ve.bind( this.onParseError, this, promise ) + 'success': ve.bind( this.onParseSuccess, this, deferred ), + 'error': ve.bind( this.onParseError, this, deferred ) } ); - return promise; + return deferred.promise(); }; /** * Handle a successful response from the parser for the wikitext fragment. * - * @param {jQuery.Promise} promise The promise object created by generateContents + * @param {jQuery.Deferred} deferred The Deferred object created by generateContents * @param {Object} response Response data */ -ve.ce.MWTransclusionNode.prototype.onParseSuccess = function ( promise, response ) { +ve.ce.MWTransclusionNode.prototype.onParseSuccess = function ( deferred, response ) { var data = response.visualeditor, contentNodes = $( data.content ).get(); // HACK: if $content consists of a single paragraph, unwrap it. // We have to do this because the PHP parser wraps everything in ps, and inline templates @@ -87,17 +87,17 @@ if ( contentNodes.length === 1 contentNodes[0].nodeName.toLowerCase() === 'p' ) { contentNodes = contentNodes[0].childNodes; } - promise.resolve( contentNodes ); + deferred.resolve( contentNodes ); }; /** * Handle an unsuccessful response from the parser for the wikitext fragment. * - * @param {jQuery.Promise} promise The promise object created by generateContents + * @param {jQuery.Deferred} deferred The promise object created by generateContents * @param {Object} response Response data */ -ve.ce.MWTransclusionNode.prototype.onParseError = function ( promise ) { - promise.reject(); +ve.ce.MWTransclusionNode.prototype.onParseError = function ( deferred ) { + deferred.reject(); }; /* Concrete subclasses */ diff --git a/modules/ve/ui/dialogs/ve.ui.MWMetaDialog.js b/modules/ve/ui/dialogs/ve.ui.MWMetaDialog.js index ffeeb43..e258e45 100644 --- a/modules/ve/ui/dialogs/ve.ui.MWMetaDialog.js +++ b/modules/ve/ui/dialogs/ve.ui.MWMetaDialog.js @@ -318,10 +318,10 @@ * Get array of language items from meta list * * @method - * @returns {Object[]} items + * @returns {jQuery.Promise} */ ve.ui.MWMetaDialog.prototype.getAllLanguageItems = function () { - var promise = $.Deferred(); + var deferred = $.Deferred(); // TODO: Detect paging token if results exceed limit $.ajax( { 'url': mw.util.wikiScript( 'api' ), @@ -338,13 +338,13 @@ // Wait up to 100 seconds before giving up 'timeout': 10, 'cache': 'false', - 'success': ve.bind( this.onAllLanuageItemsSuccess, this, promise ), - 'error': ve.bind( this.onAllLanuageItemsError, this, promise ) + 'success': ve.bind( this.onAllLanuageItemsSuccess, this, deferred ), + 'error': ve.bind( this.onAllLanuageItemsError, this, deferred ) } ); - return promise; + return deferred.promise(); }; -ve.ui.MWMetaDialog.prototype.onAllLanuageItemsSuccess = function ( promise, response ) { +ve.ui.MWMetaDialog.prototype.onAllLanuageItemsSuccess = function ( deferred, response ) { var i, iLen, languages = [], langlinks = response.query.pages[response.query.pageids[0]].langlinks; if ( langlinks ) { for ( i = 0, iLen =
[MediaWiki-commits] [Gerrit] 'articlefeedbackv5-disable-flyover-help-location' is poorly ... - change (mediawiki...ArticleFeedbackv5)
jenkins-bot has submitted this change and it was merged. Change subject: 'articlefeedbackv5-disable-flyover-help-location' is poorly placed and not needed .. 'articlefeedbackv5-disable-flyover-help-location' is poorly placed and not needed Bug: 35288 Change-Id: I195eb8e19818ad4564da0d8c3216a1544c6f8138 --- M ArticleFeedbackv5.i18n.php M ArticleFeedbackv5.php M modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.js 3 files changed, 12 insertions(+), 19 deletions(-) Approvals: Siebrand: Looks good to me, but someone else must approve Kaldari: Looks good to me, approved jenkins-bot: Verified diff --git a/ArticleFeedbackv5.i18n.php b/ArticleFeedbackv5.i18n.php index 58d5bbc..0ecc072 100644 --- a/ArticleFeedbackv5.i18n.php +++ b/ArticleFeedbackv5.i18n.php @@ -717,9 +717,7 @@ /* Front-end: feedback link close button */ 'articlefeedbackv5-disable-flyover-title' = 'Remove this tool?', - 'articlefeedbackv5-disable-flyover-help' = 'To remove $1, go to $2 and check $3', - 'articlefeedbackv5-disable-flyover-help-emphasis-text' = 'Article Feedback', - 'articlefeedbackv5-disable-flyover-help-location' = 'My preferences Appearance', + 'articlefeedbackv5-disable-flyover-help-message' = 'To remove Article Feedback, go to $1 $2 and check $3', 'articlefeedbackv5-disable-flyover-prefbutton' = 'Go to my preferences', /* Custom AbuseFilter actions */ @@ -2124,16 +2122,12 @@ * $3 – URL directly to feedback location * $4 – The help link', 'articlefeedbackv5-disable-flyover-title' = 'Title of the tooltip that pops up when you click the close button on a feedback trigger link, explaining how to remove the Article Feedback tool', - 'articlefeedbackv5-disable-flyover-help' = 'Help text for the tooltip that pops up when you click the close button on a feedback trigger link, explaining how to remove the Article Feedback tool. + 'articlefeedbackv5-disable-flyover-help-message' = 'Help text for the tooltip that pops up when you click the close button on a feedback trigger link, explaining how to remove the Article Feedback tool. Parameters: -* $1 - Emphasized name of the tool ({{msg-mw|articlefeedbackv5-disable-flyover-help-emphasis-text}}) -* $2 - The location of the preference panel ({{msg-mw|articlefeedbackv5-disable-flyover-help-location}}) -* $3 - The label of the checkbox ( {{msg-mw|articlefeedbackv5-disable-preference}})', - 'articlefeedbackv5-disable-flyover-help-emphasis-text' = 'The emphasis text for {{msg-mw|articlefeedbackv5-disable-flyover-help}} (the name of the tool)', - 'articlefeedbackv5-disable-flyover-help-location' = 'A short indication of where to go to change your Article Feedback preferences, inside {{msg-mw|articlefeedbackv5-disable-flyover-help}}. - -It must be: {{msg-mw|mypreferences}} {{msg-mw|prefs-rendering}}', +* $1 - Reference to preferences: {{msg-mw|mypreferences}} +* $2 - Reference to the preference\'s appearance panel: {{msg-mw|prefs-rendering}} +* $3 - The label of the checkbox: {{msg-mw|articlefeedbackv5-disable-preference}}', 'articlefeedbackv5-disable-flyover-prefbutton' = 'The text of the big glossy button used to send the user to their preferences in the tooltip that pops up when you click the close button on a feedback trigger link, explaining how to remove the Article Feedback tool', 'abusefilter-edit-action-aftv5resolve' = 'The text for the checkbox used by Special:AbuseFilter to indicate that a rule should result in the feedback being auto-resolved', 'articlefeedbackv5-abusefilter-note-aftv5resolve' = 'The note to add to the activity log when auto-resolving a new feedback post (code$1/code is the name of the filter)', diff --git a/ArticleFeedbackv5.php b/ArticleFeedbackv5.php index c60bc9c..dd21771 100644 --- a/ArticleFeedbackv5.php +++ b/ArticleFeedbackv5.php @@ -696,15 +696,14 @@ 'articlefeedbackv5-help-transparency-terms-anon', 'parentheses', 'articlefeedbackv5-disable-flyover-title', - 'articlefeedbackv5-disable-flyover-help', - 'articlefeedbackv5-disable-flyover-help-emphasis-text', - 'articlefeedbackv5-disable-flyover-help-location', - 'articlefeedbackv5-disable-flyover-help-direction', + 'articlefeedbackv5-disable-flyover-help-message', 'articlefeedbackv5-disable-flyover-prefbutton', 'articlefeedbackv5-disable-preference', 'pipe-separator', 'articlefeedbackv5-toolbox-view', 'articlefeedbackv5-toolbox-add', + 'mypreferences', + 'prefs-rendering', ), 'dependencies' = array( 'jquery.appear', diff --git a/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.js
[MediaWiki-commits] [Gerrit] Correctly distinguish between Deferred and Promise - change (mediawiki...VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: Correctly distinguish between Deferred and Promise .. Correctly distinguish between Deferred and Promise Deferred is read-write, Promise is read-only. Document and return the correct types. Change-Id: Icfd6efb07b222c73d49b97ddbfe6565b8542ad00 --- M modules/ve/ce/nodes/ve.ce.MWTransclusionNode.js M modules/ve/ui/dialogs/ve.ui.MWMetaDialog.js M modules/ve/ui/widgets/ve.ui.LookupInputWidget.js M modules/ve/ui/widgets/ve.ui.MWCategoryInputWidget.js M modules/ve/ui/widgets/ve.ui.MWLinkTargetInputWidget.js 5 files changed, 20 insertions(+), 20 deletions(-) Approvals: Trevor Parscal: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ve/ce/nodes/ve.ce.MWTransclusionNode.js b/modules/ve/ce/nodes/ve.ce.MWTransclusionNode.js index 5dc5738..d61c631 100644 --- a/modules/ve/ce/nodes/ve.ce.MWTransclusionNode.js +++ b/modules/ve/ce/nodes/ve.ce.MWTransclusionNode.js @@ -51,7 +51,7 @@ /* Methods */ ve.ce.MWTransclusionNode.prototype.generateContents = function () { - var promise = $.Deferred(); + var deferred = $.Deferred(); $.ajax( { 'url': mw.util.wikiScript( 'api' ), 'data': { @@ -67,19 +67,19 @@ // Wait up to 100 seconds before giving up 'timeout': 10, 'cache': 'false', - 'success': ve.bind( this.onParseSuccess, this, promise ), - 'error': ve.bind( this.onParseError, this, promise ) + 'success': ve.bind( this.onParseSuccess, this, deferred ), + 'error': ve.bind( this.onParseError, this, deferred ) } ); - return promise; + return deferred.promise(); }; /** * Handle a successful response from the parser for the wikitext fragment. * - * @param {jQuery.Promise} promise The promise object created by generateContents + * @param {jQuery.Deferred} deferred The Deferred object created by generateContents * @param {Object} response Response data */ -ve.ce.MWTransclusionNode.prototype.onParseSuccess = function ( promise, response ) { +ve.ce.MWTransclusionNode.prototype.onParseSuccess = function ( deferred, response ) { var data = response.visualeditor, contentNodes = $( data.content ).get(); // HACK: if $content consists of a single paragraph, unwrap it. // We have to do this because the PHP parser wraps everything in ps, and inline templates @@ -87,17 +87,17 @@ if ( contentNodes.length === 1 contentNodes[0].nodeName.toLowerCase() === 'p' ) { contentNodes = contentNodes[0].childNodes; } - promise.resolve( contentNodes ); + deferred.resolve( contentNodes ); }; /** * Handle an unsuccessful response from the parser for the wikitext fragment. * - * @param {jQuery.Promise} promise The promise object created by generateContents + * @param {jQuery.Deferred} deferred The promise object created by generateContents * @param {Object} response Response data */ -ve.ce.MWTransclusionNode.prototype.onParseError = function ( promise ) { - promise.reject(); +ve.ce.MWTransclusionNode.prototype.onParseError = function ( deferred ) { + deferred.reject(); }; /* Concrete subclasses */ diff --git a/modules/ve/ui/dialogs/ve.ui.MWMetaDialog.js b/modules/ve/ui/dialogs/ve.ui.MWMetaDialog.js index ffeeb43..e258e45 100644 --- a/modules/ve/ui/dialogs/ve.ui.MWMetaDialog.js +++ b/modules/ve/ui/dialogs/ve.ui.MWMetaDialog.js @@ -318,10 +318,10 @@ * Get array of language items from meta list * * @method - * @returns {Object[]} items + * @returns {jQuery.Promise} */ ve.ui.MWMetaDialog.prototype.getAllLanguageItems = function () { - var promise = $.Deferred(); + var deferred = $.Deferred(); // TODO: Detect paging token if results exceed limit $.ajax( { 'url': mw.util.wikiScript( 'api' ), @@ -338,13 +338,13 @@ // Wait up to 100 seconds before giving up 'timeout': 10, 'cache': 'false', - 'success': ve.bind( this.onAllLanuageItemsSuccess, this, promise ), - 'error': ve.bind( this.onAllLanuageItemsError, this, promise ) + 'success': ve.bind( this.onAllLanuageItemsSuccess, this, deferred ), + 'error': ve.bind( this.onAllLanuageItemsError, this, deferred ) } ); - return promise; + return deferred.promise(); }; -ve.ui.MWMetaDialog.prototype.onAllLanuageItemsSuccess = function ( promise, response ) { +ve.ui.MWMetaDialog.prototype.onAllLanuageItemsSuccess = function ( deferred, response ) { var i, iLen, languages = [], langlinks = response.query.pages[response.query.pageids[0]].langlinks; if ( langlinks ) { for ( i = 0, iLen = langlinks.length; i iLen; i++ ) { @@ -355,7 +355,7 @@
[MediaWiki-commits] [Gerrit] Respect revision suppression within Echo - change (mediawiki...Echo)
jenkins-bot has submitted this change and it was merged. Change subject: Respect revision suppression within Echo .. Respect revision suppression within Echo Update the echo formatter to properly display suppressed revision content Bug: 48059 Change-Id: Iee3c9a41ad24c66b0e2abdd5f1375ebdbd74314e --- M Echo.i18n.php M Hooks.php A db_patches/patch-drop-echo_event-event_page_namespace.sql A db_patches/patch-drop-echo_event-event_page_title.sql M formatters/BasicFormatter.php M formatters/EditFormatter.php M formatters/NotificationFormatter.php M formatters/PageLinkFormatter.php M model/Event.php M tests/NotificationFormatterTest.php 10 files changed, 212 insertions(+), 73 deletions(-) Approvals: Kaldari: Looks good to me, approved jenkins-bot: Verified diff --git a/Echo.i18n.php b/Echo.i18n.php index dbb3703..2135c6e 100644 --- a/Echo.i18n.php +++ b/Echo.i18n.php @@ -188,6 +188,9 @@ $4 $5', + + // Supressed Revisions + 'echo-rev-deleted-text-view' = 'This page revision has been suppressed', ); /** Message documentation (Message documentation) @@ -580,6 +583,9 @@ * $5 is the e-mail footer, {{msg-mw|echo-email-footer-default}} See also: * {{msg-mw|Echo-email-batch-body-daily}}', + + // Supressed Revisions + echo-rev-deleted-text-view = Short message displayed instead of edit content when revision text is suppressed., ); /** Afrikaans (Afrikaans) @@ -1907,7 +1913,7 @@ 'notification-reverted-email-subject2' = 'شما {{PLURAL:$3| ویرایش بر روی $2 was|edits در $2 شدند}} {{GENDER:$1| واگردانی}} با $1 در {{SITENAME}}', 'notification-reverted-email-body2' = '{{PLURAL:$7|ویرایش|ویرایشهای}} شما در $2 توسط $1 واگردانی شدهاند. -$5 +$5 بیشتر ببینید: @@ -3358,7 +3364,7 @@ 'echo-email-batch-subject-weekly' = '이번 주에 {{SITENAME}}에서 {{PLURAL:$2|새 알림}}이 있습니다', 'echo-email-batch-body-daily' = '$1님 안녕하세요, -오늘 {{SITENAME}}에 {{PLURAL:$3|새 알림}}이 있습니다. +오늘 {{SITENAME}}에 {{PLURAL:$3|새 알림}}이 있습니다. 여기서 볼 수 있습니다: {{canonicalurl:{{#special:Notifications @@ -5312,7 +5318,7 @@ $5', 'notification-mention-email-batch-body' = '{{GENDER:$1|Користувач|Користувачка}} $1 {{GENDER:$1|згадав|згадала}} Вас на $2', 'notification-user-rights-email-subject' = 'Змінились Ваші права користувача на {{GRAMMAR:locative|{{SITENAME.', - 'notification-user-rights-email-body' = 'Ваші права користувача було змінено {{GENDER:$1|користувачем|користувачкою}} $1. $2. + 'notification-user-rights-email-body' = 'Ваші права користувача було змінено {{GENDER:$1|користувачем|користувачкою}} $1. $2. Див. більше: diff --git a/Hooks.php b/Hooks.php index ce994de..8ebf8b6 100644 --- a/Hooks.php +++ b/Hooks.php @@ -85,6 +85,7 @@ $updater-addExtensionField( 'echo_event', 'event_page_id', $dir/db_patches/patch-add-echo_event-event_page_id.sql ); $updater-addExtensionIndex( 'echo_event', 'echo_event_type', $dir/db_patches/patch-alter-event_type-index.sql ); $updater-addExtensionIndex( 'echo_notification', 'echo_user_timestamp', $dir/db_patches/patch-alter-user_timestamp-index.sql ); + return true; } diff --git a/db_patches/patch-drop-echo_event-event_page_namespace.sql b/db_patches/patch-drop-echo_event-event_page_namespace.sql new file mode 100644 index 000..95244ff --- /dev/null +++ b/db_patches/patch-drop-echo_event-event_page_namespace.sql @@ -0,0 +1,3 @@ +-- Patch to drop unused event_page_namespace +alter table /*_*/echo_event drop event_page_namespace; + diff --git a/db_patches/patch-drop-echo_event-event_page_title.sql b/db_patches/patch-drop-echo_event-event_page_title.sql new file mode 100644 index 000..34451c4 --- /dev/null +++ b/db_patches/patch-drop-echo_event-event_page_title.sql @@ -0,0 +1,3 @@ +-- Patch to drop unused event_page_title +alter table /*_*/echo_event drop event_page_title; + diff --git a/formatters/BasicFormatter.php b/formatters/BasicFormatter.php index cedcfb1..2953f82 100644 --- a/formatters/BasicFormatter.php +++ b/formatters/BasicFormatter.php @@ -323,6 +323,9 @@ * @return string Up to the first 200 characters of the comment */ protected function formatCommentText( EchoEvent $event, $user ) { + if ( !$event-userCan( Revision::DELETED_TEXT, $user ) ) { + return wfMessage( 'echo-rev-deleted-text-view' )-text(); + } $extra = $event-getExtra(); if ( !isset( $extra['content'] ) ) { return ''; @@ -341,8 +344,11 @@ * @return string The anchor on page, or an empty string */ protected function formatSubjectAnchor( EchoEvent $event ) { - global $wgParser; + global $wgParser, $wgUser; + if ( !$event-userCan( Revision::DELETED_TEXT, $wgUser ) ) { +
[MediaWiki-commits] [Gerrit] Add icons to menu items (Gingerbread support) - change (apps...commons)
SuchABot has uploaded a new change for review. https://gerrit.wikimedia.org/r/69327 Change subject: Add icons to menu items (Gingerbread support) .. Add icons to menu items (Gingerbread support) Change-Id: I96bf3e2bb74ae3c0503d10a33064e865e42f97ad GitHub: https://github.com/wikimedia/apps-android-commons/pull/18 --- M commons/res/menu/fragment_contributions_list.xml 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/commons refs/changes/27/69327/1 diff --git a/commons/res/menu/fragment_contributions_list.xml b/commons/res/menu/fragment_contributions_list.xml index e9ee044..d8fa0ef 100644 --- a/commons/res/menu/fragment_contributions_list.xml +++ b/commons/res/menu/fragment_contributions_list.xml @@ -14,14 +14,17 @@ item android:id=@+id/menu_settings android:title=@string/menu_settings android:showAsAction=never + android:icon=@android:drawable/ic_menu_preferences / item android:id=@+id/menu_about android:title=@string/menu_about android:showAsAction=never + android:icon=@android:drawable/ic_menu_info_details / item android:id=@+id/menu_feedback android:title=@string/menu_feedback android:showAsAction=never + android:icon=@android:drawable/ic_menu_send / -- To view, visit https://gerrit.wikimedia.org/r/69327 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I96bf3e2bb74ae3c0503d10a33064e865e42f97ad Gerrit-PatchSet: 1 Gerrit-Project: apps/android/commons Gerrit-Branch: master Gerrit-Owner: SuchABot yuvipanda+sucha...@gmail.com Gerrit-Reviewer: Yuvipanda yuvipa...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add Ajax-y interface for Special:NovaAddress - change (mediawiki...OpenStackManager)
Ryan Lane has submitted this change and it was merged. Change subject: Add Ajax-y interface for Special:NovaAddress .. Add Ajax-y interface for Special:NovaAddress Continuing along the trend! Refactored some things so it's easier to do some of the dependency and general things that more than one interface is going to need to do (like notifications and having a base class), and modified the Instance module to make those things work. Change-Id: Ic5f264707b3583bf61031d0d6f2774792b5ba8d0 --- M OpenStackManager.i18n.php M OpenStackManager.php A api/ApiNovaAddress.php A modules/ext.openstack.Address.js M modules/ext.openstack.Instance.js M modules/ext.openstack.js M special/SpecialNovaAddress.php M special/SpecialNovaInstance.php 8 files changed, 465 insertions(+), 39 deletions(-) Approvals: Ryan Lane: Verified; Looks good to me, approved jenkins-bot: Checked diff --git a/OpenStackManager.i18n.php b/OpenStackManager.i18n.php index a5b5ef8..2311bac 100644 --- a/OpenStackManager.i18n.php +++ b/OpenStackManager.i18n.php @@ -303,6 +303,8 @@ 'openstackmanager-nonexistenthost' = 'The requested host does not exist.', 'openstackmanager-nonexistentrole' = 'The requested role does not exist.', + 'openstackmanager-unknownerror' = 'An error occurred.', + 'openstackmanager-needrole' = '$1 role required in project $2', 'openstackmanager-needrole2' = 'You must be a member of the $1 role in project $2 to perform this action.', @@ -589,7 +591,8 @@ Parameters: * $1 - an alphanumeric instance id for the instance to be deleted * $2 - the human-readable name for the same instance', - 'openstackmanager-deleteinstance' = 'An instance is a virtual machine. In this particular case, a clone of an image for a virtual machine. [http://docs.openstack.org/diablo/openstack-compute/starter/content/Introduction-d1e2084.html More on OpenStack].', +'openstackmanager-deleteinstance' = 'An instance is a virtual machine. In this particular case, a clone of an image for a virtual machine. [http://docs.openstack.org/diablo/openstack-compute/starter/content/Introduction-d1e2084.html More on OpenStack].', + 'openstackmanager-unknownerror' = 'Used when an unknown error occurs in an Ajax request, catch-all for unforeseen cases.', 'openstackmanager-deleteinstancequestion' = 'Used in Special:NovaInstance. An instance is a virtual machine. In this particular case, a clone of an image for a virtual machine. [http://docs.openstack.org/diablo/openstack-compute/starter/content/Introduction-d1e2084.html More on OpenStack]. diff --git a/OpenStackManager.php b/OpenStackManager.php index 8b17efa..cebf721 100644 --- a/OpenStackManager.php +++ b/OpenStackManager.php @@ -170,6 +170,7 @@ $wgAutoloadClasses['SpecialNovaPuppetGroup'] = $dir . 'special/SpecialNovaPuppetGroup.php'; $wgAutoloadClasses['SpecialNova'] = $dir . 'special/SpecialNova.php'; $wgAutoloadClasses['ApiNovaInstance'] = $dir . 'api/ApiNovaInstance.php'; +$wgAutoloadClasses['ApiNovaAddress'] = $dir . 'api/ApiNovaAddress.php'; $wgAutoloadClasses['ApiNovaProjects'] = $dir . 'api/ApiNovaProjects.php'; $wgAutoloadClasses['Spyc'] = $dir . 'Spyc.php'; $wgAutoloadClasses['OpenStackManagerNotificationFormatter'] = $dir . 'OpenStackManagerNotificationFormatter.php'; @@ -213,18 +214,51 @@ $wgResourceModules['ext.openstack'] = array( 'styles' = 'ext.openstack.css', + 'dependencies' = array( 'jquery.spinner', 'mediawiki.api', + 'jquery.ui.dialog', ), - 'messages' = array( 'openstackmanager-rebootinstancefailed', 'openstackmanager-rebootedinstance' ), + 'scripts' = array( - 'ext.openstack.Instance.js', 'ext.openstack.js', ), ) + $commonModuleInfo; +$wgResourceModules['ext.openstack.Instance'] = array( + 'dependencies' = array( + 'ext.openstack', + ), + + 'messages' = array( 'openstackmanager-rebootinstancefailed', 'openstackmanager-rebootedinstance' ), + + 'scripts' = array( + 'ext.openstack.Instance.js', + ), +) + $commonModuleInfo; + +$wgResourceModules['ext.openstack.Address'] = array( + 'dependencies' = array( + 'ext.openstack', + ), + + 'messages' = array( + 'openstackmanager-disassociateaddressfailed', + 'openstackmanager-disassociateaddress-confirm', + 'openstackmanager-disassociatedaddress', + 'openstackmanager-associateaddress', + 'openstackmanager-releaseaddress', + 'openstackmanager-unknownerror', + ), + + 'scripts' = array( + 'ext.openstack.Address.js', + ), +) + $commonModuleInfo; + $wgAPIModules['novainstance'] = 'ApiNovaInstance'; +$wgAPIModules['novaaddress'] = 'ApiNovaAddress';
[MediaWiki-commits] [Gerrit] Add icons to menu items (Gingerbread support) - change (apps...commons)
Brion VIBBER has submitted this change and it was merged. Change subject: Add icons to menu items (Gingerbread support) .. Add icons to menu items (Gingerbread support) Change-Id: I96bf3e2bb74ae3c0503d10a33064e865e42f97ad GitHub: https://github.com/wikimedia/apps-android-commons/pull/18 --- M commons/res/menu/fragment_contributions_list.xml 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/commons/res/menu/fragment_contributions_list.xml b/commons/res/menu/fragment_contributions_list.xml index e9ee044..d8fa0ef 100644 --- a/commons/res/menu/fragment_contributions_list.xml +++ b/commons/res/menu/fragment_contributions_list.xml @@ -14,14 +14,17 @@ item android:id=@+id/menu_settings android:title=@string/menu_settings android:showAsAction=never + android:icon=@android:drawable/ic_menu_preferences / item android:id=@+id/menu_about android:title=@string/menu_about android:showAsAction=never + android:icon=@android:drawable/ic_menu_info_details / item android:id=@+id/menu_feedback android:title=@string/menu_feedback android:showAsAction=never + android:icon=@android:drawable/ic_menu_send / -- To view, visit https://gerrit.wikimedia.org/r/69327 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I96bf3e2bb74ae3c0503d10a33064e865e42f97ad Gerrit-PatchSet: 1 Gerrit-Project: apps/android/commons Gerrit-Branch: master Gerrit-Owner: SuchABot yuvipanda+sucha...@gmail.com Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org Gerrit-Reviewer: Yuvipanda yuvipa...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Multiply Capture Amount by 100! - change (wikimedia...PaymentsListeners)
Mwalker has uploaded a new change for review. https://gerrit.wikimedia.org/r/69328 Change subject: Multiply Capture Amount by 100! .. Multiply Capture Amount by 100! Adyen, like GlobalCollect, does not deal with decimals. Interally to SmashPig though we do. Therefore I need to multiply by 100 to get Adyen to capture the right amount :P Change-Id: Ia52827eb9f93ec63bb8af8e0a2d4fac7f9255ad8 --- M SmashPig/PaymentProviders/Adyen/AdyenPaymentsAPI.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/PaymentsListeners refs/changes/28/69328/1 diff --git a/SmashPig/PaymentProviders/Adyen/AdyenPaymentsAPI.php b/SmashPig/PaymentProviders/Adyen/AdyenPaymentsAPI.php index c45dd70..b454f1a 100644 --- a/SmashPig/PaymentProviders/Adyen/AdyenPaymentsAPI.php +++ b/SmashPig/PaymentProviders/Adyen/AdyenPaymentsAPI.php @@ -44,7 +44,7 @@ $data-modificationRequest-merchantAccount = $this-account; $data-modificationRequest-modificationAmount-currency = $currency; - $data-modificationRequest-modificationAmount-value = $amount; + $data-modificationRequest-modificationAmount-value = floor( $amount * 100 ); // Todo: Make this CLDR aware $data-modificationRequest-originalReference = $pspReference; Logger::enterContext( 'RawData' ); -- To view, visit https://gerrit.wikimedia.org/r/69328 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia52827eb9f93ec63bb8af8e0a2d4fac7f9255ad8 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/PaymentsListeners Gerrit-Branch: master Gerrit-Owner: Mwalker mwal...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update PageTriage, Echo, and ArticleFeedbackv5 to master - change (mediawiki/core)
Kaldari has uploaded a new change for review. https://gerrit.wikimedia.org/r/69329 Change subject: Update PageTriage, Echo, and ArticleFeedbackv5 to master .. Update PageTriage, Echo, and ArticleFeedbackv5 to master Change-Id: I5a6ea5cbbfb8778f0b0fb70fd0a8ce53f62cc61e --- M extensions/ArticleFeedbackv5 M extensions/Echo M extensions/PageTriage 3 files changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/29/69329/1 diff --git a/extensions/ArticleFeedbackv5 b/extensions/ArticleFeedbackv5 index 2445f84..4f09687 16 --- a/extensions/ArticleFeedbackv5 +++ b/extensions/ArticleFeedbackv5 -Subproject commit 2445f84b1b3bde6aac3ed66edad26da90c3372b0 +Subproject commit 4f0968742f5dda860de74b14ed7619f0f9469942 diff --git a/extensions/Echo b/extensions/Echo index dc6e839..34fbeaf 16 --- a/extensions/Echo +++ b/extensions/Echo -Subproject commit dc6e8394fceff0ed61c89d62312c4dfa13f9f794 +Subproject commit 34fbeaf8c9d7ab7ca92cc691dfd0607c483e623d diff --git a/extensions/PageTriage b/extensions/PageTriage index c0c7fac..4608051 16 --- a/extensions/PageTriage +++ b/extensions/PageTriage -Subproject commit c0c7facdfccedf6c353ed12a4fde41b3b72136d5 +Subproject commit 4608051c1f48e8f5c69f5206498df4a7dddba17a -- To view, visit https://gerrit.wikimedia.org/r/69329 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5a6ea5cbbfb8778f0b0fb70fd0a8ce53f62cc61e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.22wmf6 Gerrit-Owner: Kaldari rkald...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] i18n and patchwork messages !!! - change (mediawiki...SemanticMediaWiki)
Mwjames has uploaded a new change for review. https://gerrit.wikimedia.org/r/69330 Change subject: i18n and patchwork messages !!! .. i18n and patchwork messages !!! I hope this makes someone happy by having default text being copied over and over again. Anyway good luck for the next 20+ fixed property messages. [1] https://gerrit.wikimedia.org/r/#/c/67609/7/languages/SMW_Messages.php Change-Id: Icde56b3ca37ae72d9e69f26e7c62676874d44c69 --- M includes/articlepages/SMW_PropertyPage.php M languages/SMW_Messages.php 2 files changed, 9 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SemanticMediaWiki refs/changes/30/69330/1 diff --git a/includes/articlepages/SMW_PropertyPage.php b/includes/articlepages/SMW_PropertyPage.php index d72aa7c..0e357e0 100644 --- a/includes/articlepages/SMW_PropertyPage.php +++ b/includes/articlepages/SMW_PropertyPage.php @@ -56,12 +56,12 @@ $propertyName = htmlspecialchars( $this-mTitle-getText() ); $propertyKey = 'smw-pa-property-predefined' . strtolower( $this-mProperty-getKey() ); - $propertyText = wfMessage( $propertyKey )-exists() ? wfMessage( $propertyKey )-text() : ''; + $messageKey = wfMessage( $propertyKey )-exists() ? $propertyKey : 'smw-pa-property-predefined-default'; return Html::rawElement( 'div', array( 'class' = 'smw-pa-property-predefined-intro' ), - wfMessage( 'smw-pa-property-predefined-intro', $propertyName, $propertyText )-parse() + wfMessage( $messageKey, $propertyName )-parse() ); } diff --git a/languages/SMW_Messages.php b/languages/SMW_Messages.php index 02e6de5..08e1726 100644 --- a/languages/SMW_Messages.php +++ b/languages/SMW_Messages.php @@ -455,9 +455,9 @@ 'action-smw-admin' = 'access Semantic MediaWiki administration tasks', // Property pages (Predefined properties) - 'smw-pa-property-predefined-intro' = '$1 is a predefined property (also known as [https://www.semantic-mediawiki.org/wiki/Help:Special_properties special property])$2. It is a built-in property that comes with additional administrative privileges but can be used just like any other [https://www.semantic-mediawiki.org/wiki/Property user-defined property].', - 'smw-pa-property-predefined_ask' = ' which links to the meta data [https://www.semantic-mediawiki.org/wiki/Subobject subobject] of a query', - 'smw-pa-property-predefined_asksi' = ' which collects the number of conditions used in a query' + 'smw-pa-property-predefined-default' = '$1 is a predefined property (also known as [https://www.semantic-mediawiki.org/wiki/Help:Special_properties special property]). It is a built-in property that comes with additional administrative privileges but can be used just like any other [https://www.semantic-mediawiki.org/wiki/Property user-defined property].', + 'smw-pa-property-predefined_ask' = '$1 is a predefined property (also known as [https://www.semantic-mediawiki.org/wiki/Help:Special_properties special property]) which links to the meta data [https://www.semantic-mediawiki.org/wiki/Subobject subobject] of a query. It is a built-in property that comes with additional administrative privileges but can be used just like any other [https://www.semantic-mediawiki.org/wiki/Property user-defined property].', + 'smw-pa-property-predefined_asksi' = '$1 is a predefined property (also known as [https://www.semantic-mediawiki.org/wiki/Help:Special_properties special property]) which collects the number of conditions used in a query. It is a built-in property that comes with additional administrative privileges but can be used just like any other [https://www.semantic-mediawiki.org/wiki/Property user-defined property].' ); @@ -992,14 +992,13 @@ 'group-smwadministrator-member' = '{{doc-group|smwadministrator|member}}', 'grouppage-smwadministrator' = '{{doc-group|smwadministrator|page}}', 'action-smw-admin' = '{{doc-action|smw-admin}}', - 'smw-pa-property-predefined-intro' = 'A patchwork message representing an introductory text for predefined properties such as {{msg-mw|smw-pa-property-predefined_ask}}. + 'smw-pa-property-predefined-intro' = 'Introductory text for predefined properties. Parameters: -* $1 - Name of the invoked predefined property -* $2 - Additional text component for a detailed predefined property description such as {{msg-mw|smw-pa-property-predefined_ask}}', +* $1 - Name of the invoked predefined property', - 'smw-pa-property-predefined_ask' = 'Additional text component which describes a predefined property and extends
[MediaWiki-commits] [Gerrit] Multiply Capture Amount by 100! - change (wikimedia...PaymentsListeners)
Katie Horn has submitted this change and it was merged. Change subject: Multiply Capture Amount by 100! .. Multiply Capture Amount by 100! Adyen, like GlobalCollect, does not deal with decimals. Interally to SmashPig though we do. Therefore I need to multiply by 100 to get Adyen to capture the right amount :P Change-Id: Ia52827eb9f93ec63bb8af8e0a2d4fac7f9255ad8 --- M SmashPig/PaymentProviders/Adyen/AdyenPaymentsAPI.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Katie Horn: Verified; Looks good to me, approved diff --git a/SmashPig/PaymentProviders/Adyen/AdyenPaymentsAPI.php b/SmashPig/PaymentProviders/Adyen/AdyenPaymentsAPI.php index c45dd70..b454f1a 100644 --- a/SmashPig/PaymentProviders/Adyen/AdyenPaymentsAPI.php +++ b/SmashPig/PaymentProviders/Adyen/AdyenPaymentsAPI.php @@ -44,7 +44,7 @@ $data-modificationRequest-merchantAccount = $this-account; $data-modificationRequest-modificationAmount-currency = $currency; - $data-modificationRequest-modificationAmount-value = $amount; + $data-modificationRequest-modificationAmount-value = floor( $amount * 100 ); // Todo: Make this CLDR aware $data-modificationRequest-originalReference = $pspReference; Logger::enterContext( 'RawData' ); -- To view, visit https://gerrit.wikimedia.org/r/69328 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia52827eb9f93ec63bb8af8e0a2d4fac7f9255ad8 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/PaymentsListeners Gerrit-Branch: master Gerrit-Owner: Mwalker mwal...@wikimedia.org Gerrit-Reviewer: Katie Horn kh...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update Echo, ArticleFeedbackv5, PageTriage to master - change (mediawiki/core)
Bsitu has uploaded a new change for review. https://gerrit.wikimedia.org/r/69331 Change subject: Update Echo, ArticleFeedbackv5, PageTriage to master .. Update Echo, ArticleFeedbackv5, PageTriage to master Change-Id: I462ec5bf7f310dc3f3005a01769252f961d70bc7 --- M extensions/ArticleFeedbackv5 M extensions/Echo M extensions/PageTriage 3 files changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/31/69331/1 diff --git a/extensions/ArticleFeedbackv5 b/extensions/ArticleFeedbackv5 index ec8e6e3..4f09687 16 --- a/extensions/ArticleFeedbackv5 +++ b/extensions/ArticleFeedbackv5 -Subproject commit ec8e6e329fcb86bf4dce886ee3f6a08050a8430a +Subproject commit 4f0968742f5dda860de74b14ed7619f0f9469942 diff --git a/extensions/Echo b/extensions/Echo index aa5771b..34fbeaf 16 --- a/extensions/Echo +++ b/extensions/Echo -Subproject commit aa5771bceb527394328a914c11d7baabaf6e2c3c +Subproject commit 34fbeaf8c9d7ab7ca92cc691dfd0607c483e623d diff --git a/extensions/PageTriage b/extensions/PageTriage index cec022f..4608051 16 --- a/extensions/PageTriage +++ b/extensions/PageTriage -Subproject commit cec022f0aa694f95ecce3ec4fb2bc088f5d31a5b +Subproject commit 4608051c1f48e8f5c69f5206498df4a7dddba17a -- To view, visit https://gerrit.wikimedia.org/r/69331 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I462ec5bf7f310dc3f3005a01769252f961d70bc7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.22wmf7 Gerrit-Owner: Bsitu bs...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits