[MediaWiki-commits] [Gerrit] labstore: Followup to I90dc98401b89e769fa058943e3714e383dfe25ea - change (operations/puppet)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/227413 Change subject: labstore: Followup to I90dc98401b89e769fa058943e3714e383dfe25ea .. labstore: Followup to I90dc98401b89e769fa058943e3714e383dfe25ea - Make sure replica.my.cnf permissions are set properly - Protect against symlink following - Add more debugging information Bug: T104453 Change-Id: I1a69d92cac4bfdd7defb565e6ec75ea0aa930a53 --- M modules/labstore/files/create-dbusers 1 file changed, 29 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/13/227413/1 diff --git a/modules/labstore/files/create-dbusers b/modules/labstore/files/create-dbusers index b1329a0..244deda 100755 --- a/modules/labstore/files/create-dbusers +++ b/modules/labstore/files/create-dbusers @@ -21,6 +21,7 @@ import string import random import configparser +import io class User: @@ -58,6 +59,17 @@ return users +def write_user_file(self, path, content): +try: +f = os.open(path, os.O_CREAT | os.O_WRONLY) +os.write(f, content.encode('utf-8')) +# uid == gid +os.fchown(f, self.uid, self.uid) +os.fchmod(f, 0o400) +finally: +if f: +os.close(f) + class CredentialCreator: PASSWORD_LENGTH = 16 @@ -79,6 +91,20 @@ return ''.join(sysrandom.sample( CredentialCreator.PASSWORD_CHARS, CredentialCreator.PASSWORD_LENGTH)) + +def write_credentials_file(self, path, user): +password = self._generate_pass() +replica_config = configparser.ConfigParser() +replica_config['client'] = { +'user': user.db_username, +'password': password +} +self.create_user(user, password) +# Because ConfigParser can only write to a file +# and not just return the value as a string directly +replica_buffer = io.StringIO() +replica_config.write(replica_buffer) +sg.write_user_file(replica_path, replica_buffer.getvalue()) def check_user_exists(self, user): exists = True @@ -106,6 +132,7 @@ user_pass=password ) cur.execute(sql) +logging.info('Created user %s in %s', user.db_username, conn.host) finally: cur.close() @@ -150,15 +177,8 @@ if not cgen.check_user_exists(sg): # No replica.my.cnf and no user in db # Generate new creds and put them in there! -password = cgen._generate_pass() -replica_config = configparser.ConfigParser() -replica_config['client'] = { -'user': sg.db_username, -'password': password -} -cgen.create_user(sg, password) -with open(replica_path, 'w') as f: -replica_config.write(f) +logging.info('Creating DB accounts for %s with db username %s', sg.name, sg.db_username) +cgen.write_credentials_file(replica_path, sg) logging.info(Created replica.my.cnf for %s, with username %s, sg.name, sg.db_username) else: logging.info('Missing replica.my.cnf for user %s despite grants present in db', sg.name) -- To view, visit https://gerrit.wikimedia.org/r/227413 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1a69d92cac4bfdd7defb565e6ec75ea0aa930a53 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Yuvipanda yuvipa...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] labstore: Followup to I90dc98401b89e769fa058943e3714e383dfe25ea - change (operations/puppet)
Yuvipanda has submitted this change and it was merged. Change subject: labstore: Followup to I90dc98401b89e769fa058943e3714e383dfe25ea .. labstore: Followup to I90dc98401b89e769fa058943e3714e383dfe25ea - Make sure replica.my.cnf permissions are set properly - Protect against symlink following - Add more debugging information Bug: T104453 Change-Id: I1a69d92cac4bfdd7defb565e6ec75ea0aa930a53 --- M modules/labstore/files/create-dbusers 1 file changed, 29 insertions(+), 9 deletions(-) Approvals: Yuvipanda: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/labstore/files/create-dbusers b/modules/labstore/files/create-dbusers index b1329a0..244deda 100755 --- a/modules/labstore/files/create-dbusers +++ b/modules/labstore/files/create-dbusers @@ -21,6 +21,7 @@ import string import random import configparser +import io class User: @@ -58,6 +59,17 @@ return users +def write_user_file(self, path, content): +try: +f = os.open(path, os.O_CREAT | os.O_WRONLY) +os.write(f, content.encode('utf-8')) +# uid == gid +os.fchown(f, self.uid, self.uid) +os.fchmod(f, 0o400) +finally: +if f: +os.close(f) + class CredentialCreator: PASSWORD_LENGTH = 16 @@ -79,6 +91,20 @@ return ''.join(sysrandom.sample( CredentialCreator.PASSWORD_CHARS, CredentialCreator.PASSWORD_LENGTH)) + +def write_credentials_file(self, path, user): +password = self._generate_pass() +replica_config = configparser.ConfigParser() +replica_config['client'] = { +'user': user.db_username, +'password': password +} +self.create_user(user, password) +# Because ConfigParser can only write to a file +# and not just return the value as a string directly +replica_buffer = io.StringIO() +replica_config.write(replica_buffer) +sg.write_user_file(replica_path, replica_buffer.getvalue()) def check_user_exists(self, user): exists = True @@ -106,6 +132,7 @@ user_pass=password ) cur.execute(sql) +logging.info('Created user %s in %s', user.db_username, conn.host) finally: cur.close() @@ -150,15 +177,8 @@ if not cgen.check_user_exists(sg): # No replica.my.cnf and no user in db # Generate new creds and put them in there! -password = cgen._generate_pass() -replica_config = configparser.ConfigParser() -replica_config['client'] = { -'user': sg.db_username, -'password': password -} -cgen.create_user(sg, password) -with open(replica_path, 'w') as f: -replica_config.write(f) +logging.info('Creating DB accounts for %s with db username %s', sg.name, sg.db_username) +cgen.write_credentials_file(replica_path, sg) logging.info(Created replica.my.cnf for %s, with username %s, sg.name, sg.db_username) else: logging.info('Missing replica.my.cnf for user %s despite grants present in db', sg.name) -- To view, visit https://gerrit.wikimedia.org/r/227413 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1a69d92cac4bfdd7defb565e6ec75ea0aa930a53 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Yuvipanda yuvipa...@wikimedia.org Gerrit-Reviewer: Yuvipanda yuvipa...@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] [WIP] toolbar thing - change (mediawiki...UrlShortener)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/227414 Change subject: [WIP] toolbar thing .. [WIP] toolbar thing Change-Id: Ia646c9554d2434342b414e53ab99b437002ee2e8 --- M UrlShortener.hooks.php M UrlShortener.php A modules/ext.urlShortener.toolbar.js 3 files changed, 29 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UrlShortener refs/changes/14/227414/1 diff --git a/UrlShortener.hooks.php b/UrlShortener.hooks.php index 6e881e1..dd8cf52 100644 --- a/UrlShortener.hooks.php +++ b/UrlShortener.hooks.php @@ -25,6 +25,10 @@ return true; } + public static function onBeforePageDisplay( OutputPage $out ) { + $out-addModules( 'ext.urlShortener.toolbar' ); + } + /** * @param $du DatabaseUpdater * @return bool diff --git a/UrlShortener.php b/UrlShortener.php index 285f931..3d4165e 100644 --- a/UrlShortener.php +++ b/UrlShortener.php @@ -115,6 +115,7 @@ $wgHooks['LoadExtensionSchemaUpdates'][] = 'UrlShortenerHooks::onLoadExtensionSchemaUpdates'; $wgHooks['WebRequestPathInfoRouter'][] = 'UrlShortenerHooks::onWebRequestPathInfoRouter'; +$wgHooks['BeforePageDisplay'][] = 'UrlShortenerHooks::onBeforePageDisplay'; $wgAPIModules['shortenurl'] = 'ApiShortenUrl'; @@ -138,3 +139,14 @@ 'mediawiki.Uri', ), ); + +$wgResourceModules['ext.urlShortener.toolbar'] = array( + 'scripts' = array( + 'modules/ext.urlShortener.toolbar.js', + ), + 'dependencies' = array( + 'oojs-ui', + ), + 'localBasePath' = __DIR__, + 'remoteExtPath' = 'UrlShortener', +); diff --git a/modules/ext.urlShortener.toolbar.js b/modules/ext.urlShortener.toolbar.js new file mode 100644 index 000..8d938d4 --- /dev/null +++ b/modules/ext.urlShortener.toolbar.js @@ -0,0 +1,13 @@ +( function ( mw, $, OO ) { + $( function () { + var progress = new OO.ui.ProgressBarWidget(), + popup = new OO.ui.PopupWidget( { + $content: progress.$element, + padded: true, + align: 'forwards' + } ); + $( '#t-print' ).append( popup.$element ); + popup.toggle( true ); + } ); + +} )( mediaWiki, jQuery, OO ); -- To view, visit https://gerrit.wikimedia.org/r/227414 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia646c9554d2434342b414e53ab99b437002ee2e8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UrlShortener Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Commonscat l18n for Scots Wikipedia per T106932 - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: Commonscat l18n for Scots Wikipedia per T106932 .. Commonscat l18n for Scots Wikipedia per T106932 Change-Id: Ica02b18e66115ec504f3b172b16785d1307ec28c --- M scripts/commonscat.py 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified diff --git a/scripts/commonscat.py b/scripts/commonscat.py index 55cd8c1..54be96b 100755 --- a/scripts/commonscat.py +++ b/scripts/commonscat.py @@ -130,6 +130,7 @@ 'os': (u'Commonscat', [u'Commons cat']), 'pt': (u'Commonscat', [u'Commons cat']), 'ro': (u'Commonscat', [u'Commons cat']), +'sco': ('Commons category', ['Commonscat', 'Commons cat']), 'ru': (u'Commonscat', [u'Викисклад-кат', u'Commons category']), 'simple': (u'Commonscat', [u'Commons cat', u'Commons cat multi', u'Commons category', -- To view, visit https://gerrit.wikimedia.org/r/227202 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ica02b18e66115ec504f3b172b16785d1307ec28c Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Avicennasis avicenna...@gmail.com Gerrit-Reviewer: John Vandenberg jay...@gmail.com Gerrit-Reviewer: Ladsgroup ladsgr...@gmail.com Gerrit-Reviewer: Merlijn van Deen valhall...@arctus.nl Gerrit-Reviewer: Xqt i...@gno.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] Revert Remove w/COPYING and w/CREDITS dead symlinks - change (operations/mediawiki-config)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/227210 Change subject: Revert Remove w/COPYING and w/CREDITS dead symlinks .. Revert Remove w/COPYING and w/CREDITS dead symlinks Files are linked from mediawiki/core Special:Version page and Special:Version/License/* This reverts commit 5194b34499e28e49ae71db7352becb2e40d2cc8d. Bug: T107007 Change-Id: Ib9e0ff77788c700e0f1ba4d1d23c3d9be1348e91 --- A w/COPYING A w/CREDITS 2 files changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/10/227210/1 diff --git a/w/COPYING b/w/COPYING new file mode 12 index 000..aace6cc --- /dev/null +++ b/w/COPYING @@ -0,0 +1 @@ +../../php/COPYING \ No newline at end of file diff --git a/w/CREDITS b/w/CREDITS new file mode 12 index 000..7ef12ef --- /dev/null +++ b/w/CREDITS @@ -0,0 +1 @@ +../../php/CREDITS \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/227210 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib9e0ff77788c700e0f1ba4d1d23c3d9be1348e91 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Hashar has...@free.fr ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Added handling of quotes, backslashes to CargoUtils::smartPa... - change (mediawiki...Cargo)
Yaron Koren has uploaded a new change for review. https://gerrit.wikimedia.org/r/227213 Change subject: Added handling of quotes, backslashes to CargoUtils::smartParse() .. Added handling of quotes, backslashes to CargoUtils::smartParse() Change-Id: Ia094cd41984f9d1aaf82e2e66851fefa206d493c --- M CargoUtils.php 1 file changed, 29 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Cargo refs/changes/13/227213/1 diff --git a/CargoUtils.php b/CargoUtils.php index 2a2293d..3966fe5 100644 --- a/CargoUtils.php +++ b/CargoUtils.php @@ -186,19 +186,46 @@ return array(); } + $ignoreNextChar = false; $returnValues = array(); $numOpenParentheses = 0; + $numOpenSingleQuotes = 0; + $numOpenDoubleQuotes = 0; $curReturnValue = ''; for ( $i = 0; $i strlen( $string ); $i++ ) { $curChar = $string{$i}; - if ( $curChar == '(' ) { + + if ( $ignoreNextChar ) { + // If previous character was a backslash, + // ignore the current one, since it's escaped. + // What if this one is a backslash too? + // Doesn't matter - it's escaped. + $ignoreNextChar = false; + } elseif ( $curChar == '(' ) { $numOpenParentheses++; } elseif ( $curChar == ')' ) { $numOpenParentheses--; + } elseif ( $curChar == '\'' ) { + if ( $numOpenSingleQuotes == 0 ) { + $numOpenSingleQuotes = 1; + } else { + $numOpenSingleQuotes = 0; + } + } elseif ( $curChar == '' ) { + if ( $numOpenDoubleQuotes == 0 ) { + $numOpenDoubleQuotes = 1; + } else { + $numOpenDoubleQuotes = 0; + } + } elseif ( $curChar == '\\' ) { + $ignoreNextChar = true; } - if ( $curChar == $delimiter $numOpenParentheses == 0 ) { + if ( $curChar == $delimiter + $numOpenParentheses == 0 + $numOpenSingleQuotes == 0 + $numOpenDoubleQuotes == 0 ) { $returnValues[] = trim( $curReturnValue ); $curReturnValue = ''; } else { -- To view, visit https://gerrit.wikimedia.org/r/227213 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia094cd41984f9d1aaf82e2e66851fefa206d493c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Cargo Gerrit-Branch: master Gerrit-Owner: Yaron Koren yaro...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove multi-level subdomains from wikipedia.org - change (operations/dns)
BBlack has uploaded a new change for review. https://gerrit.wikimedia.org/r/227214 Change subject: Remove multi-level subdomains from wikipedia.org .. Remove multi-level subdomains from wikipedia.org Bug: T102814 Change-Id: I539c46cbdd0ade484ec4dd985052c66f0870aca9 --- M templates/wikipedia.org 1 file changed, 0 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/dns refs/changes/14/227214/1 diff --git a/templates/wikipedia.org b/templates/wikipedia.org index 51517bf..e3cfdf5 100644 --- a/templates/wikipedia.org +++ b/templates/wikipedia.org @@ -56,14 +56,6 @@ www 600 IN DYNA geoip!text-addrs zh-tw 600 IN DYNA geoip!text-addrs -; Old double-subdomain aliases (bug 31335) -arbcom.de 600 IN DYNA geoip!text-addrs -arbcom.en 600 IN DYNA geoip!text-addrs -arbcom.fi 600 IN DYNA geoip!text-addrs -arbcom.nl 600 IN DYNA geoip!text-addrs -wg.en 600 IN DYNA geoip!text-addrs - - ; All languages will automatically be included here {{ geolanglist('text-addrs') }} -- To view, visit https://gerrit.wikimedia.org/r/227214 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I539c46cbdd0ade484ec4dd985052c66f0870aca9 Gerrit-PatchSet: 1 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: BBlack bbl...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix wbgetclaims props parameter - change (mediawiki...Wikibase)
Addshore has uploaded a new change for review. https://gerrit.wikimedia.org/r/227200 Change subject: Fix wbgetclaims props parameter .. Fix wbgetclaims props parameter Bug: T106899 Change-Id: I934e7eb6a18ab24d84f43fcde144189079654323 --- M repo/includes/api/GetClaims.php M repo/includes/api/ResultBuilder.php M repo/tests/phpunit/includes/api/ResultBuilderTest.php 3 files changed, 60 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/00/227200/1 diff --git a/repo/includes/api/GetClaims.php b/repo/includes/api/GetClaims.php index d87331c..fe63dff 100644 --- a/repo/includes/api/GetClaims.php +++ b/repo/includes/api/GetClaims.php @@ -114,7 +114,7 @@ } $claims = $this-getClaims( $entity, $guid ); - $this-resultBuilder-addClaims( $claims, null ); + $this-resultBuilder-addClaims( $claims, null, $params['props'] ); } private function validateParameters( array $params ) { @@ -254,6 +254,7 @@ 'references', ), self::PARAM_DFLT = 'references', + self::PARAM_ISMULTI = true, ), 'ungroupedlist' = array( self::PARAM_TYPE = 'boolean', diff --git a/repo/includes/api/ResultBuilder.php b/repo/includes/api/ResultBuilder.php index ed788ea..b301b4f 100644 --- a/repo/includes/api/ResultBuilder.php +++ b/repo/includes/api/ResultBuilder.php @@ -582,12 +582,24 @@ * * @param Claim[] $claims the labels to set in the result * @param array|string $path where the data is located +* @param array|string $props a list of fields to include, or all */ - public function addClaims( array $claims, $path ) { + public function addClaims( array $claims, $path, $props = 'all' ) { $claimsSerializer = $this-libSerializerFactory-newClaimsSerializer( $this-getOptions() ); $values = $claimsSerializer-getSerialized( new Claims( $claims ) ); + if ( is_array( $props ) !in_array( 'references', $props ) ) { + $values = $this-modifier-modifyUsingCallback( + $values, + '*/*', + function ( $array ) { + unset( $array['references'] ); + return $array; + } + ); + } + // HACK: comply with ApiResult::setIndexedTagName $tag = isset( $values['_element'] ) ? $values['_element'] : 'claim'; $this-setList( $path, 'claims', $values, $tag ); diff --git a/repo/tests/phpunit/includes/api/ResultBuilderTest.php b/repo/tests/phpunit/includes/api/ResultBuilderTest.php index 274e5b2..94d33d2 100644 --- a/repo/tests/phpunit/includes/api/ResultBuilderTest.php +++ b/repo/tests/phpunit/includes/api/ResultBuilderTest.php @@ -1011,6 +1011,51 @@ $this-assertEquals( $expected, $data ); } + public function testAddClaimsNoProps() { + $result = $this-getDefaultResult(); + $path = array( 'entities', 'Q1' ); + + $statement = new Statement( + new PropertySomeValueSnak( new PropertyId( 'P12' ) ), + null, + new Referencelist( array( + new Reference( array( + new PropertyValueSnak( new PropertyId( 'P12' ), new StringValue( 'refSnakVal' ) ), + ) ), + ) ), + 'fooguidbar' + ); + + $expected = array( + 'entities' = array( + 'Q1' = array( + 'claims' = array( + 'P12' = array( + array( + 'id' = 'fooguidbar', + 'mainsnak' = array( + 'snaktype' = 'somevalue', + 'property' = 'P12', + ), + 'type' = 'statement', + 'rank' = 'normal', + ), +
[MediaWiki-commits] [Gerrit] Adjust Herald field values to upstream changes - change (phabricator...security)
Aklapper has uploaded a new change for review. https://gerrit.wikimedia.org/r/227205 Change subject: Adjust Herald field values to upstream changes .. Adjust Herald field values to upstream changes Related: https://secure.phabricator.com/D13613 and https://secure.phabricator.com/D13616 Bug: T107027 Change-Id: I675657cb6a2cfbca141d0eea851f1e6c5c2bf8c3 --- M src/policy/SecurityPolicyEnforcerAction.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/phabricator/extensions/security refs/changes/05/227205/1 diff --git a/src/policy/SecurityPolicyEnforcerAction.php b/src/policy/SecurityPolicyEnforcerAction.php index 86c3c57..5ada4d4 100644 --- a/src/policy/SecurityPolicyEnforcerAction.php +++ b/src/policy/SecurityPolicyEnforcerAction.php @@ -25,7 +25,7 @@ } public function getActionType() { -return HeraldAdapter::VALUE_NONE; +return new HeraldEmptyFieldValue(); } public function applyEffect( -- To view, visit https://gerrit.wikimedia.org/r/227205 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I675657cb6a2cfbca141d0eea851f1e6c5c2bf8c3 Gerrit-PatchSet: 1 Gerrit-Project: phabricator/extensions/security Gerrit-Branch: master Gerrit-Owner: Aklapper aklap...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Support aliases in SpecialNewEntity - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Support aliases in SpecialNewEntity .. Support aliases in SpecialNewEntity Bug: T74316 Change-Id: I6b99deabcda6e2e10cabf47a4dbce28f69bc1123 --- M repo/i18n/en.json M repo/i18n/qqq.json M repo/includes/specials/SpecialNewEntity.php 3 files changed, 46 insertions(+), 8 deletions(-) Approvals: Jonas Kress (WMDE): Looks good to me, but someone else must approve Addshore: Looks good to me, approved jenkins-bot: Verified diff --git a/repo/i18n/en.json b/repo/i18n/en.json index 53133fe..26bbfb4 100644 --- a/repo/i18n/en.json +++ b/repo/i18n/en.json @@ -41,6 +41,7 @@ wikibase-description-empty: No description defined, wikibase-description-edit-placeholder: enter a description, wikibase-description-edit-placeholder-language-aware: enter a description in $1, + wikibase-aliases-edit-placeholder-language-aware: enter some aliases in $1, wikibase-diffview-reference: reference, wikibase-diffview-rank: rank, wikibase-diffview-rank-preferred: Preferred rank, @@ -167,6 +168,7 @@ wikibase-newitem-not-recognized-siteid: The provided site identifier was not recognized., wikibase-newentity-label: Label:, wikibase-newentity-description: Description:, + wikibase-newentity-aliases: Aliases, pipe-separated:, wikibase-newentity-submit: Create, special-setlabel: Set a label, wikibase-setlabel-introfull: You are setting the label in $2 for [[$1]]., diff --git a/repo/i18n/qqq.json b/repo/i18n/qqq.json index f52dc12..445414c 100644 --- a/repo/i18n/qqq.json +++ b/repo/i18n/qqq.json @@ -70,6 +70,7 @@ wikibase-description-empty: Placeholder message displayed instead of the item's description in case no description has been specified yet. This message is displayed only when the user has JavaScript disabled. (When JavaScript is enabled, an input box will be displayed instead.), wikibase-description-edit-placeholder: [[File:Screenshot WikidataRepo 2012-05-13 G.png|right|0x150px]]\nThis is a generic text used as a placeholder while editing a new description. See also the Wikidata glossary on [[d:Wikidata:Glossary#languageattribute-description|description]]., wikibase-description-edit-placeholder-language-aware: Like {{msg-mw|Wikibase-description-edit-placeholder}}, but language ($1) aware., + wikibase-aliases-edit-placeholder-language-aware: Like {{msg-mw|Wikibase-alias-edit-placeholder}}, but for multiple pipe-separated aliases and language ($1) aware., wikibase-diffview-reference: Label within the header of a diff-operation on the entity diff view to describe that the diff-operation affects a reference. Will be shown as e.g. \claim / property q1 / reference\.\n{{Identical|Reference}}, wikibase-diffview-rank: Label within the header of a diff-operation on the entity diff view to describe that the diff-operation affects the rank of the statement. Will be shown as e.g. \claim / property q1 / rank\.\n{{Identical|Rank}}, wikibase-diffview-rank-preferred: The [[d:Wikidata:Glossary#Rank-preferred|Preferred Rank]] to be shown in diffs., @@ -195,6 +196,7 @@ wikibase-newitem-not-recognized-siteid: Error message shown when a user tries to add a link to a site with an unknown identifier.\n\nSee also:\n* {{msg-mw|Wikibase-api-not-recognized-siteid}}, wikibase-newentity-label: Label for the \label\ textfield holding the label of the new item.\n{{Identical|Label}}, wikibase-newentity-description: Label for the \description\ textfield holding the description of the new item.\n{{Identical|Description}}, + wikibase-newentity-aliases: Label for the \aliases\ textfield holding the pipe-separated aliases of the new item., wikibase-newentity-submit: Text for the submit button on the CreateItem special page.\n{{Identical|Create}}, special-setlabel: {{doc-special|SetLabel}}\nThe special page allows the user to set an entity's label in a particular language., wikibase-setlabel-introfull: Intro text when label is to be set. Parameters:\n* $1 - the ID that links to the entity\n* $2 - the translated language name (possibly autonym) label, description and aliases are to be set in., diff --git a/repo/includes/specials/SpecialNewEntity.php b/repo/includes/specials/SpecialNewEntity.php index 6e57ca2..3c3f767 100644 --- a/repo/includes/specials/SpecialNewEntity.php +++ b/repo/includes/specials/SpecialNewEntity.php @@ -155,6 +155,8 @@ 'description', isset( $this-parts[1] ) ? $this-parts[1] : '' ); + $aliases = $this-getRequest()-getVal( 'aliases' ); + $this-aliases = ( $aliases === null ? array() : explode( '|', $aliases ) ); $this-contentLanguage = Language::factory(
[MediaWiki-commits] [Gerrit] Also add srijan to bastiononly - change (operations/puppet)
Filippo Giunchedi has submitted this change and it was merged. Change subject: Also add srijan to bastiononly .. Also add srijan to bastiononly Was added to researchers already, but this is another one of those groups which for some reason don't grant any actual bastion access Bug: T106407 Change-Id: I69f66e0d234daff54bd8839b1c61e7ca9d836aeb --- M modules/admin/data/data.yaml 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Filippo Giunchedi: Verified; Looks good to me, approved diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml index 315c053..f0d757c 100644 --- a/modules/admin/data/data.yaml +++ b/modules/admin/data/data.yaml @@ -71,7 +71,7 @@ bmansurov, west1, jhernandez, smalyshev, ananthrk, tbayer, zfilipin, joal, thcipriani, daisy, ashwinpp, mvolz, jhobs, tomasz, lpintscher, pcoombe, mholloway-shell, madhuvishy, niedzielski, neilpquinn-wmf, - gpaumier, moushira, aklapper, qchris, tjones] + gpaumier, moushira, aklapper, qchris, tjones, srijan] cassandra-test-roots: gid: 708 description: users with root on cassandra hosts -- To view, visit https://gerrit.wikimedia.org/r/226941 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I69f66e0d234daff54bd8839b1c61e7ca9d836aeb Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Alex Monk kren...@gmail.com Gerrit-Reviewer: Filippo Giunchedi fgiunch...@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] Increase line-height for source and translation content to 1... - change (mediawiki...ContentTranslation)
Santhosh has uploaded a new change for review. https://gerrit.wikimedia.org/r/227207 Change subject: Increase line-height for source and translation content to 1.5em .. Increase line-height for source and translation content to 1.5em Applying general typography guidelines for better readability. Resulting font-size: 16px, line-height: 24px. Change-Id: Ia1bef3c54737102f872c87e69250d2276b104d54 --- M modules/translationview/styles/ext.cx.translationview.less 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/07/227207/1 diff --git a/modules/translationview/styles/ext.cx.translationview.less b/modules/translationview/styles/ext.cx.translationview.less index 8b8e823..f897abf 100644 --- a/modules/translationview/styles/ext.cx.translationview.less +++ b/modules/translationview/styles/ext.cx.translationview.less @@ -65,6 +65,7 @@ } .cx-column__content { + line-height: 1.5em; clear: both; word-wrap: break-word; position: relative; -- To view, visit https://gerrit.wikimedia.org/r/227207 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia1bef3c54737102f872c87e69250d2276b104d54 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add BlogPage to testextension - change (integration/config)
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/227217 Change subject: Add BlogPage to testextension .. Add BlogPage to testextension The extension was already running it but failing. Please see https://integration.wikimedia.org/ci/job/mwext-testextension-zend/5409/console and https://integration.wikimedia.org/ci/job/mwext-testextension-zend/5408/console Change-Id: I315f11a1e9922b59d2da7c0f110e705b6ec859eb --- M jjb/mediawiki-extensions.yaml M zuul/layout.yaml 2 files changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/17/227217/1 diff --git a/jjb/mediawiki-extensions.yaml b/jjb/mediawiki-extensions.yaml index 7ea3290..1d0789d 100644 --- a/jjb/mediawiki-extensions.yaml +++ b/jjb/mediawiki-extensions.yaml @@ -428,6 +428,7 @@ - BayesianFilter - BlameMaps - BlockAndNuke + - BlogPage - BlueSpiceExtensions - BookManager - Bootstrap diff --git a/zuul/layout.yaml b/zuul/layout.yaml index 0484c69..cdc2fae 100644 --- a/zuul/layout.yaml +++ b/zuul/layout.yaml @@ -6531,6 +6531,9 @@ experimental: - mathoid-deploy-npm + - name: mediawiki/services/mobileapps +template: + - name: npm - name: mediawiki/services/parsoid check: -- To view, visit https://gerrit.wikimedia.org/r/227217 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I315f11a1e9922b59d2da7c0f110e705b6ec859eb Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Paladox thomasmulhall...@yahoo.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Allow to scroll suggested lists of links in the link inspector - change (mediawiki...ContentTranslation)
jenkins-bot has submitted this change and it was merged. Change subject: Allow to scroll suggested lists of links in the link inspector .. Allow to scroll suggested lists of links in the link inspector Set max-height for page selector menu and make it scrollable. Bug: T106530 Change-Id: I3d4ed5befb40d03dc2996f91050e7332dc8c39d6 --- M modules/widgets/pageselector/ext.cx.pageselector.less 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Amire80: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/widgets/pageselector/ext.cx.pageselector.less b/modules/widgets/pageselector/ext.cx.pageselector.less index 3a2ca14..c98957f 100644 --- a/modules/widgets/pageselector/ext.cx.pageselector.less +++ b/modules/widgets/pageselector/ext.cx.pageselector.less @@ -11,6 +11,8 @@ // Show it on top of others z-index: ; max-width: 30%; + max-height: 300px; + overflow-y: auto; li { border-bottom: 1px solid #eee; -- To view, visit https://gerrit.wikimedia.org/r/227181 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3d4ed5befb40d03dc2996f91050e7332dc8c39d6 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com Gerrit-Reviewer: Amire80 amir.ahar...@mail.huji.ac.il Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update .gitreview project link - change (mediawiki...BlogPage)
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/227221 Change subject: Update .gitreview project link .. Update .gitreview project link Updates project link in .gitreview. Matches most repos on wikimedia git that have .git in there project link. Change-Id: I2ef24c9bf6a95611cf31fb6d34e90cf7367fa6af --- M .gitreview M i18n/en.json M i18n/fi.json 3 files changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlogPage refs/changes/21/227221/1 diff --git a/.gitreview b/.gitreview index 2b30b85..0d37a47 100644 --- a/.gitreview +++ b/.gitreview @@ -1,6 +1,6 @@ [gerrit] host=gerrit.wikimedia.org port=29418 -project=mediawiki/extensions/BlogPage +project=mediawiki/extensions/BlogPage.git defaultbranch=master defaultrebase=0 \ No newline at end of file diff --git a/i18n/en.json b/i18n/en.json index 6232fac..7ac38d5 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -65,6 +65,7 @@ blog-time-hours: {{PLURAL:$1|one hour|$1 hours}}, blog-time-minutes: {{PLURAL:$1|one minute|$1 minutes}}, blog-time-seconds: {{PLURAL:$1|one second|$1 seconds}}, + action-createblogpost: create new blog posts, right-createblogpost: [[Special:CreateBlogPost|Create new blog posts]], blog-user-articles-title: Blogs, blog-user-articles-votes: {{PLURAL:$1|one vote|$1 votes}}, diff --git a/i18n/fi.json b/i18n/fi.json index 0667bb5..95a5386 100644 --- a/i18n/fi.json +++ b/i18n/fi.json @@ -61,6 +61,7 @@ blog-js-create-error-need-content: Blogikirjoituksellasi tulee olla myös sisältöä!, blog-js-create-error-need-title: Sinun tulee antaa otsikko blogikirjoituksellesi!, blog-js-create-error-page-exists: Olemassaolevalla blogikirjoituksella on jo sama otsikko. Annathan erilaisen otsikon blogikirjoituksellesi., + action-createblogpost: luoda uusia blogikirjoituksia, right-createblogpost: [[Special:CreateBlogPost|Luoda uusia blogikirjoituksia]], blog-user-articles-title: Blogit, blog-user-articles-votes: {{PLURAL:$1|yksi ääni|$1 ääntä}}, -- To view, visit https://gerrit.wikimedia.org/r/227221 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2ef24c9bf6a95611cf31fb6d34e90cf7367fa6af Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/BlogPage Gerrit-Branch: master Gerrit-Owner: Paladox thomasmulhall...@yahoo.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] adds conduit methods to set and get start and end dates for ... - change (phabricator...Sprint)
Christopher Johnson (WMDE) has submitted this change and it was merged. Change subject: adds conduit methods to set and get start and end dates for a Sprint .. adds conduit methods to set and get start and end dates for a Sprint Bug: T106815 Change-Id: Ib5d16432156c0f98c9b3c90dc0b4b8eed34ee363 --- M src/__phutil_library_map__.php M src/conduit/SprintConduitAPIMethod.php A src/conduit/SprintGetStartEndDatesConduitAPIMethod.php A src/conduit/SprintSetStartEndDatesConduitAPIMethod.php 4 files changed, 155 insertions(+), 1 deletion(-) Approvals: Christopher Johnson (WMDE): Verified; Looks good to me, approved diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index 20d42d8..f0a2754 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -51,6 +51,7 @@ 'SprintDefaultViewCapability' = 'capability/SprintDefaultViewCapability.php', 'SprintEndDateField' = 'customfield/SprintEndDateField.php', 'SprintGetIsSprintConduitAPIMethod' = 'conduit/SprintGetIsSprintConduitAPIMethod.php', +'SprintGetStartEndDatesConduitAPIMethod' = 'conduit/SprintGetStartEndDatesConduitAPIMethod.php', 'SprintGetTaskProjectHistoryConduitAPIMethod' = 'conduit/SprintGetTaskProjectHistoryConduitAPIMethod.php', 'SprintHandleIconView' = 'view/SprintHandleIconView.php', 'SprintHistoryController' = 'controller/SprintHistoryController.php', @@ -70,6 +71,7 @@ 'SprintReportController' = 'controller/SprintReportController.php', 'SprintReportOpenTasksView' = 'view/reports/SprintReportOpenTasksView.php', 'SprintSetIsSprintConduitAPIMethod' = 'conduit/SprintSetIsSprintConduitAPIMethod.php', +'SprintSetStartEndDatesConduitAPIMethod' = 'conduit/SprintSetStartEndDatesConduitAPIMethod.php', 'SprintStats' = 'storage/SprintStats.php', 'SprintStatsTest' = 'tests/SprintStatsTest.php', 'SprintTableView' = 'view/SprintTableView.php', @@ -121,6 +123,7 @@ 'SprintDefaultViewCapability' = 'PhabricatorPolicyCapability', 'SprintEndDateField' = 'SprintProjectCustomField', 'SprintGetIsSprintConduitAPIMethod' = 'SprintConduitAPIMethod', +'SprintGetStartEndDatesConduitAPIMethod' = 'SprintConduitAPIMethod', 'SprintGetTaskProjectHistoryConduitAPIMethod' = 'SprintConduitAPIMethod', 'SprintHandleIconView' = 'AphrontTagView', 'SprintHistoryController' = 'SprintController', @@ -141,6 +144,7 @@ 'SprintReportController' = 'SprintController', 'SprintReportOpenTasksView' = 'SprintView', 'SprintSetIsSprintConduitAPIMethod' = 'SprintConduitAPIMethod', +'SprintSetStartEndDatesConduitAPIMethod' = 'SprintConduitAPIMethod', 'SprintStatsTest' = 'SprintTestCase', 'SprintTableView' = 'AphrontView', 'SprintTaskStoryPointsField' = array( diff --git a/src/conduit/SprintConduitAPIMethod.php b/src/conduit/SprintConduitAPIMethod.php index c41a204..3b0cc56 100644 --- a/src/conduit/SprintConduitAPIMethod.php +++ b/src/conduit/SprintConduitAPIMethod.php @@ -11,6 +11,36 @@ return idx($results, $project-getPHID()); } + protected function buildSprintInfoDictionary(PhabricatorProject $project, $user) { +$result = array(); +$query = id(new SprintQuery()) +-setViewer($user); +$dates = $this-getStartEndDates($query, $project); +$member_phids = $project-getMemberPHIDs(); +$member_phids = array_values($member_phids); +$project_slugs = $project-getSlugs(); +$project_slugs = array_values(mpull($project_slugs, 'getSlug')); +$issprint = $this-isSprint($project-getPHID()); +$project_icon = PhabricatorProjectIcon::getAPIName($project-getIcon()); + +$result[$project-getPHID()] = array( +'id' = $project-getID(), +'phid' = $project-getPHID(), +'name' = $project-getName(), +'profileImagePHID' = $project-getProfileImagePHID(), +'icon' = $project_icon, +'color'= $project-getColor(), +'members' = $member_phids, +'slugs'= $project_slugs, +'issprint' = $issprint, +'startDate'= $dates['start'], +'endDate' = $dates['end'], +'dateCreated' = $project-getDateCreated(), +'dateModified' = $project-getDateModified(), +); +return $result; + } + protected function buildProjectInfoDictionaries(array $projects) { assert_instances_of($projects, 'PhabricatorProject'); if (empty($projects)) { @@ -22,7 +52,6 @@ $member_phids = $project-getMemberPHIDs(); $member_phids = array_values($member_phids); - $project_slugs = $project-getSlugs(); $project_slugs = array_values(mpull($project_slugs, 'getSlug')); $issprint = $this-isSprint($project-getPHID()); @@ -52,4 +81,13 @@ array($validator, 'isSprint'), $project_phid); return
[MediaWiki-commits] [Gerrit] adds sprint.getissprint and sprint.setissprint conduit API m... - change (phabricator...Sprint)
Christopher Johnson (WMDE) has submitted this change and it was merged. Change subject: adds sprint.getissprint and sprint.setissprint conduit API methods .. adds sprint.getissprint and sprint.setissprint conduit API methods Bug: T106816 Change-Id: I21d6da4067a1b89b8ce5e4f841a0a289a2b494a7 --- M .gitignore M src/__phutil_library_map__.php M src/conduit/SprintConduitAPIMethod.php A src/conduit/SprintGetIsSprintConduitAPIMethod.php A src/conduit/SprintSetIsSprintConduitAPIMethod.php 5 files changed, 120 insertions(+), 1 deletion(-) Approvals: Christopher Johnson (WMDE): Verified; Looks good to me, approved diff --git a/.gitignore b/.gitignore index e2c639d..b028a5d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ .phutil_module_cache vendor/ /src/tests/clover.xml +/src/tests/selenium/.idea/ +/src/tests/selenium/phabricator.sprint/.idea/ +/src/tests/selenium/phabricator.sprint/phabricator.sprint.iml diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index 84b3327..20d42d8 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -50,6 +50,7 @@ 'SprintDataViewController' = 'controller/SprintDataViewController.php', 'SprintDefaultViewCapability' = 'capability/SprintDefaultViewCapability.php', 'SprintEndDateField' = 'customfield/SprintEndDateField.php', +'SprintGetIsSprintConduitAPIMethod' = 'conduit/SprintGetIsSprintConduitAPIMethod.php', 'SprintGetTaskProjectHistoryConduitAPIMethod' = 'conduit/SprintGetTaskProjectHistoryConduitAPIMethod.php', 'SprintHandleIconView' = 'view/SprintHandleIconView.php', 'SprintHistoryController' = 'controller/SprintHistoryController.php', @@ -68,6 +69,7 @@ 'SprintReportBurnUpView' = 'view/reports/SprintReportBurnUpView.php', 'SprintReportController' = 'controller/SprintReportController.php', 'SprintReportOpenTasksView' = 'view/reports/SprintReportOpenTasksView.php', +'SprintSetIsSprintConduitAPIMethod' = 'conduit/SprintSetIsSprintConduitAPIMethod.php', 'SprintStats' = 'storage/SprintStats.php', 'SprintStatsTest' = 'tests/SprintStatsTest.php', 'SprintTableView' = 'view/SprintTableView.php', @@ -82,15 +84,21 @@ ), 'function' = array(), 'xmap' = array( +'BoardDataPieView' = 'Phobject', +'BoardDataTableView' = 'Phobject', 'BurndownActionMenuEventListener' = 'PhabricatorEventListener', +'BurndownChartView' = 'Phobject', +'BurndownDataDate' = 'Phobject', 'BurndownException' = 'AphrontUsageException', 'CeleritySprintResources' = 'CelerityResourcesOnDisk', 'DateIterator' = 'Iterator', +'EventTableView' = 'Phobject', 'ProjectOpenTasksView' = 'OpenTasksView', 'SprintApplication' = 'PhabricatorApplication', 'SprintApplicationTest' = 'SprintTestCase', 'SprintBeginDateField' = 'SprintProjectCustomField', 'SprintBoardBatchEditController' = 'ManiphestController', +'SprintBoardCardToken' = 'Phobject', 'SprintBoardColumnDetailController' = 'SprintBoardController', 'SprintBoardColumnEditController' = 'SprintBoardController', 'SprintBoardColumnHideController' = 'SprintBoardController', @@ -98,6 +106,7 @@ 'SprintBoardImportController' = 'SprintBoardController', 'SprintBoardMoveController' = 'SprintBoardController', 'SprintBoardReorderController' = 'SprintBoardController', +'SprintBoardTaskCard' = 'Phobject', 'SprintBoardTaskEditController' = 'ManiphestController', 'SprintBoardViewController' = 'SprintBoardController', 'SprintConduitAPIMethod' = 'ConduitAPIMethod', @@ -111,11 +120,15 @@ 'SprintDataViewController' = 'SprintController', 'SprintDefaultViewCapability' = 'PhabricatorPolicyCapability', 'SprintEndDateField' = 'SprintProjectCustomField', +'SprintGetIsSprintConduitAPIMethod' = 'SprintConduitAPIMethod', 'SprintGetTaskProjectHistoryConduitAPIMethod' = 'SprintConduitAPIMethod', 'SprintHandleIconView' = 'AphrontTagView', 'SprintHistoryController' = 'SprintController', +'SprintHistoryTableView' = 'SprintView', 'SprintIsSprintField' = 'SprintProjectCustomField', 'SprintListController' = 'SprintController', +'SprintListTableView' = 'Phobject', +'SprintPoints' = 'Phobject', 'SprintProjectCustomField' = array( 'PhabricatorProjectCustomField', 'PhabricatorStandardCustomFieldInterface', @@ -127,6 +140,7 @@ 'SprintReportBurnUpView' = 'SprintView', 'SprintReportController' = 'SprintController', 'SprintReportOpenTasksView' = 'SprintView', +'SprintSetIsSprintConduitAPIMethod' = 'SprintConduitAPIMethod', 'SprintStatsTest' = 'SprintTestCase', 'SprintTableView' = 'AphrontView', 'SprintTaskStoryPointsField' = array( @@ -135,7 +149,9 @@ ), 'SprintTestCase' = 'PHPUnit_Framework_TestCase', 'SprintUIObjectBoxView' = 'AphrontView', +'SprintValidator' =
[MediaWiki-commits] [Gerrit] fixes dataTables.css - change (phabricator...Sprint)
Christopher Johnson (WMDE) has submitted this change and it was merged. Change subject: fixes dataTables.css .. fixes dataTables.css Bug: T106903 Change-Id: I1d74568e39d92c2de02807e8bd1d92ff55c63524 --- M rsrc/dataTables.css 1 file changed, 1 insertion(+), 3 deletions(-) Approvals: Christopher Johnson (WMDE): Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/rsrc/dataTables.css b/rsrc/dataTables.css index 0fc05d6..cfc48c6 100644 --- a/rsrc/dataTables.css +++ b/rsrc/dataTables.css @@ -302,10 +302,8 @@ .dataTables_wrapper { position: relative; clear: both; -*zoom: 1; -zoom: 1; -overflow-x: scroll; } + .dataTables_wrapper .dataTables_length { float: left; } -- To view, visit https://gerrit.wikimedia.org/r/226962 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1d74568e39d92c2de02807e8bd1d92ff55c63524 Gerrit-PatchSet: 2 Gerrit-Project: phabricator/extensions/Sprint Gerrit-Branch: master Gerrit-Owner: Christopher Johnson (WMDE) christopher.john...@wikimedia.de Gerrit-Reviewer: Christopher Johnson (WMDE) christopher.john...@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] Reduce the code duplication in applyTranslationTemplate method - change (mediawiki...ContentTranslation)
Santhosh has uploaded a new change for review. https://gerrit.wikimedia.org/r/227203 Change subject: Reduce the code duplication in applyTranslationTemplate method .. Reduce the code duplication in applyTranslationTemplate method Change-Id: If38aa7cf381cb72a136a038724d29bf38e7b6fd4 --- M modules/translation/ext.cx.translation.js 1 file changed, 11 insertions(+), 22 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/03/227203/1 diff --git a/modules/translation/ext.cx.translation.js b/modules/translation/ext.cx.translation.js index f7081ea..c4365b6 100644 --- a/modules/translation/ext.cx.translation.js +++ b/modules/translation/ext.cx.translation.js @@ -265,39 +265,28 @@ 'data-cx-state': 'source' } ); - if ( origin === 'mt-user-disabled' ) { + if ( origin === 'mt-user-disabled' || origin === 'clear' ) { $clone.attr( 'data-cx-state', 'empty' ); - if ( $sourceSection.prop( 'tagName' ) === 'FIGURE' ) { - // Clear figure caption alone. - $clone.find( 'figcaption' ).empty(); + if ( $sourceSection.is( 'figure' ) ) { + if ( origin === 'clear' ) { + // When clearing figures, replace it with placeholder. + $clone = getPlaceholder( sourceId ).attr( 'data-cx-section-type', 'figure' ); + } else { + // Clear figure caption alone. + $clone.find( 'figcaption' ).empty(); + } } else if ( $sourceSection.is( 'ul, ol' ) ) { $clone = $sourceSection.clone(); // Explicit contenteditable attribute helps to place the cursor - // in empty UL. + // in empty ul or ol. $clone.prop( 'contenteditable', true ).find( 'li' ).empty(); } else { $clone.empty(); } } - - if ( origin === 'clear' ) { - $clone.attr( 'data-cx-state', 'empty' ); - if ( $sourceSection.prop( 'tagName' ) === 'FIGURE' ) { - // When clearing figures, replace it with placeholder. - $clone = getPlaceholder( sourceId ) - .attr( 'data-cx-section-type', $sourceSection.prop( 'tagName' ) ); - } else if ( $sourceSection.is( 'ul, ol' ) ) { - $clone = $sourceSection.clone(); - // Explicit contenteditable attribute helps to place the cursor - // in empty UL. - $clone.prop( 'contenteditable', true ).find( 'li' ).empty(); - } else { - $clone.empty(); - } - } // else: service-failure, non-editable, mt-not-available + // else: service-failure, non-editable, mt-not-available // Replace the placeholder with a translatable element $section.replaceWith( $clone ); - // $section was replaced. Get the updated instance. $section = mw.cx.getTranslationSection( sourceId ); mw.hook( 'mw.cx.translation.postMT' ).fire( $section ); -- To view, visit https://gerrit.wikimedia.org/r/227203 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If38aa7cf381cb72a136a038724d29bf38e7b6fd4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Allow to serialize Element objects as JSON - change (labs...ptable)
Ricordisamoa has submitted this change and it was merged. Change subject: Allow to serialize Element objects as JSON .. Allow to serialize Element objects as JSON The API is currently failing because of tritium: (it shouldn't be there, by the way) https://tools.wmflabs.org/ptable/api?props=incomplete Change-Id: I1cba28bc178f883bbb430dab6bb6bea8f06e4302 --- M app.py 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Ricordisamoa: Verified; Looks good to me, approved Lucie Kaffee: Looks good to me, but someone else must approve diff --git a/app.py b/app.py index 5b9ed06..00ad692 100644 --- a/app.py +++ b/app.py @@ -24,7 +24,7 @@ class CustomJSONEncoder(JSONEncoder): def default(self, obj): -if isinstance(obj, chemistry.TableCell): +if isinstance(obj, (chemistry.Element, chemistry.TableCell)): return obj.__dict__ return super(CustomJSONEncoder, self).default(obj) -- To view, visit https://gerrit.wikimedia.org/r/225269 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1cba28bc178f883bbb430dab6bb6bea8f06e4302 Gerrit-PatchSet: 1 Gerrit-Project: labs/tools/ptable Gerrit-Branch: master Gerrit-Owner: Ricordisamoa ricordisa...@openmailbox.org Gerrit-Reviewer: Lucie Kaffee lucie.kaf...@wikimedia.de Gerrit-Reviewer: Ricordisamoa ricordisa...@openmailbox.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Repool db1035 - change (operations/mediawiki-config)
Jcrespo has uploaded a new change for review. https://gerrit.wikimedia.org/r/227206 Change subject: Repool db1035 .. Repool db1035 After table cache and statistics have been forced on all tables, we try again with lower weight. Change-Id: I4fe70d97c8340ebc32c96b9a6d25fb5a70d6cc4f --- M wmf-config/db-eqiad.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/06/227206/1 diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php index 0a2a768..2e67722 100755 --- a/wmf-config/db-eqiad.php +++ b/wmf-config/db-eqiad.php @@ -112,7 +112,7 @@ 'db1038' = 0, # 1.4TB 64GB 'db1027' = 0, # 1.4TB 64GB, vslow, dump 'db1015' = 0, # 1.4TB 64GB, watchlist, recentchanges, contributions, logpager -# 'db1035' = 400, # 1.4TB 64GB (T106986) + 'db1035' = 40, # 1.4TB 64GB 'db1044' = 400, # 1.4TB 64GB ), 's4' = array( -- To view, visit https://gerrit.wikimedia.org/r/227206 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4fe70d97c8340ebc32c96b9a6d25fb5a70d6cc4f Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Jcrespo jcre...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove LibSerializerFactory from SetClaimTest - change (mediawiki...Wikibase)
Addshore has uploaded a new change for review. https://gerrit.wikimedia.org/r/227219 Change subject: Remove LibSerializerFactory from SetClaimTest .. Remove LibSerializerFactory from SetClaimTest This is the final use of this factory in the API and API tests. YAY Change-Id: I9b3ba692442ab4854fa0e05d5a363c7255b9ae3c --- M repo/tests/phpunit/includes/api/SetClaimTest.php 1 file changed, 10 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/19/227219/1 diff --git a/repo/tests/phpunit/includes/api/SetClaimTest.php b/repo/tests/phpunit/includes/api/SetClaimTest.php index d8b70d7..42a10f2 100644 --- a/repo/tests/phpunit/includes/api/SetClaimTest.php +++ b/repo/tests/phpunit/includes/api/SetClaimTest.php @@ -3,6 +3,7 @@ namespace Wikibase\Test\Repo\Api; use DataValues\NumberValue; +use DataValues\Serializers\DataValueSerializer; use DataValues\StringValue; use FormatJson; use UsageException; @@ -19,6 +20,7 @@ use Wikibase\DataModel\Snak\Snak; use Wikibase\DataModel\Snak\SnakList; use Wikibase\DataModel\Statement\Statement; +use Wikibase\InternalSerialization\SerializerFactory; use Wikibase\Lib\ClaimGuidGenerator; use Wikibase\Lib\Serializers\LibSerializerFactory; use Wikibase\Lib\Serializers\SerializationOptions; @@ -146,9 +148,9 @@ // Simply reorder the qualifiers by putting the first qualifier to the end. This is // supposed to be done in the serialized representation since changing the actual // object might apply intrinsic sorting. - $serializerFactory = new LibSerializerFactory(); - $serializer = $serializerFactory-newClaimSerializer( new SerializationOptions() ); - $serializedClaim = $serializer-getSerialized( $statement ); + $serializerFactory = new SerializerFactory( new DataValueSerializer() ); + $statementSerializer = $serializerFactory-newStatementSerializer(); + $serializedClaim = $statementSerializer-serialize( $statement ); $firstPropertyId = array_shift( $serializedClaim['qualifiers-order'] ); array_push( $serializedClaim['qualifiers-order'], $firstPropertyId ); $this-makeRequest( $serializedClaim, $itemId, 1, 'reorder qualifiers' ); @@ -296,15 +298,15 @@ $baserevid = null, $error = null ) { - $serializerFactory = new LibSerializerFactory(); + $serializerFactory = new SerializerFactory( new DataValueSerializer() ); + $statementSerializer = $serializerFactory-newStatementSerializer(); + $statementDeserializer = WikibaseRepo::getDefaultInstance()-getStatementDeserializer(); if ( $claim instanceof Statement ) { - $serializer = $serializerFactory-newClaimSerializer( new SerializationOptions() ); - $serializedClaim = $serializer-getSerialized( $claim ); + $serializedClaim = $statementSerializer-serialize( $claim ); } else { - $unserializer = $serializerFactory-newClaimUnserializer( new SerializationOptions() ); $serializedClaim = $claim; - $claim = $unserializer-newFromSerialization( $serializedClaim ); + $claim = $statementDeserializer-deserialize( $serializedClaim ); } $params = array( -- To view, visit https://gerrit.wikimedia.org/r/227219 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9b3ba692442ab4854fa0e05d5a363c7255b9ae3c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Addshore addshorew...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove wap and mobile subdomains - change (operations/dns)
BBlack has submitted this change and it was merged. Change subject: Remove wap and mobile subdomains .. Remove wap and mobile subdomains Bug: T104942 Change-Id: Iac4deed5adc18f6d9d2f5d14c93224a8ba8ca0b8 --- M templates/wikipedia.org 1 file changed, 1 insertion(+), 8 deletions(-) Approvals: Chmarkine: Looks good to me, but someone else must approve Jhobs: Looks good to me, but someone else must approve BBlack: Looks good to me, approved jenkins-bot: Verified diff --git a/templates/wikipedia.org b/templates/wikipedia.org index b6b8084..51517bf 100644 --- a/templates/wikipedia.org +++ b/templates/wikipedia.org @@ -83,12 +83,5 @@ www.m 600 IN DYNA geoip!mobile-addrs zero600 IN DYNA geoip!mobile-addrs -; SNI testing, temporary +; TLS testing, temporary pinkunicorn 600 IN A208.80.154.42 - -$ORIGIN wap.{{ zonename }}. -{{ geolanglist('mobile-addrs') }} -beta600 IN DYNA geoip!text-addrs - -$ORIGIN mobile.{{ zonename }}. -{{ geolanglist('mobile-addrs') }} -- To view, visit https://gerrit.wikimedia.org/r/223972 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iac4deed5adc18f6d9d2f5d14c93224a8ba8ca0b8 Gerrit-PatchSet: 2 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: BBlack bbl...@wikimedia.org Gerrit-Reviewer: BBlack bbl...@wikimedia.org Gerrit-Reviewer: Bmansurov bmansu...@wikimedia.org Gerrit-Reviewer: Chmarkine chmark...@hotmail.com Gerrit-Reviewer: Dr0ptp4kt ab...@wikimedia.org Gerrit-Reviewer: Faidon Liambotis fai...@wikimedia.org Gerrit-Reviewer: Jdlrobson jrob...@wikimedia.org Gerrit-Reviewer: Jhernandez jhernan...@wikimedia.org Gerrit-Reviewer: Jhobs jhob...@wikimedia.org Gerrit-Reviewer: Robmoen rm...@wikimedia.org Gerrit-Reviewer: Ssmith ssm...@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] Prefix files with extension name - change (mediawiki...BlogPage)
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/227220 Change subject: Prefix files with extension name .. Prefix files with extension name * Test fails because BlogPgae is a class not main php file. This fixes test. Change-Id: If49308f52cbaacbb5417842b680669f43f512fb6 --- D Blog.php R BlogPage.alias.php R BlogPage.namespaces.php M BlogPage.php A BlogPageClass.php R BlogPageHooks.php M i18n/en.json M i18n/fi.json 8 files changed, 1,391 insertions(+), 1,389 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlogPage refs/changes/20/227220/1 diff --git a/Blog.php b/Blog.php deleted file mode 100644 index a5f1062..000 --- a/Blog.php +++ /dev/null @@ -1,145 +0,0 @@ -?php -/** - * BlogPage -- introduces a new namespace, NS_BLOG (numeric index is 500 by - * default) and some special handling for the pages in this namespace - * - * @file - * @ingroup Extensions - * @version 2.3 - * @author David Pean david.p...@gmail.com - * @author Jack Phoenix j...@countervandalism.net - * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later - * @link https://www.mediawiki.org/wiki/Extension:BlogPage Documentation - */ -if ( !defined( 'MEDIAWIKI' ) ) { - die(); -} - -// Extension credits that will show up on Special:Version -$wgExtensionCredits['other'][] = array( - 'name' = 'BlogPage', - 'version' = '2.3', - 'author' = array( 'David Pean', 'Jack Phoenix' ), - 'descriptionmsg' = 'blogpage-desc', - 'url' = 'https://www.mediawiki.org/wiki/Extension:BlogPage', -); - -// Define the namespace constants -define( 'NS_BLOG', 500 ); -define( 'NS_BLOG_TALK', 501 ); - -// ResourceLoader support for MediaWiki 1.17+ -$blogResourceTemplate = array( - 'localBasePath' = __DIR__, - 'remoteExtPath' = 'BlogPage' -); - -// Main module, used on *all* blog pages (see the hooks file) -$wgResourceModules['ext.blogPage'] = $blogResourceTemplate + array( - 'styles' = 'resources/css/BlogPage.css', - 'position' = 'top' -); - -// Used on Special:ArticlesHome Special:ArticleLists -$wgResourceModules['ext.blogPage.articlesHome'] = $blogResourceTemplate + array( - 'styles' = 'resources/css/ArticlesHome.css', - 'position' = 'top' -); - -// Used on Special:CreateBlogPost -$wgResourceModules['ext.blogPage.create.css'] = $blogResourceTemplate + array( - 'styles' = 'resources/css/CreateBlogPost.css', - 'position' = 'top' -); - -$wgResourceModules['ext.blogPage.create.js'] = $blogResourceTemplate + array( - 'scripts' = 'resources/js/CreateBlogPost.js', - // 'dependencies' = 'mediawiki.action.edit', - 'messages' = array( - 'blog-js-create-error-need-content', 'blog-js-create-error-need-title', - 'blog-js-create-error-page-exists' - ) -); - -// Default setup for displaying sections -$wgBlogPageDisplay = array( - // Output the left-hand column? This column contains the list of authors, - // recent editors (if enabled), recent voters (if enabled), embed widget - // (if enabled) and left-side advertisement (if enabled). - 'leftcolumn' = true, - // Output the right-hand column? This column contains the list of popular - // blog articles (if enabled), in the news section (if enabled), comments - // of the day (if enabled), a random casual game (if enabled) and a list of - // new blog articles. - 'rightcolumn' = true, - // Display the box that contains some information about the author of the - // blog post? - 'author' = true, - // Display some (three, to be exact) other blog articles written by the - // same user? - 'author_articles' = true, - // Display a list of people (complete with their avatars) who recently - // edited this blog post? - 'recent_editors' = true, - // Display a list of people (complete with their avatars) who recently - // voted for this blog post? - 'recent_voters' = true, - // Show an advertisement in the left-hand column? - 'left_ad' = false, - // Show a listing of the most popular blog posts? - 'popular_articles' = true, - // Should we display some random news items from [[MediaWiki:Inthenews]]? - 'in_the_news' = true, - // Show comments of the day (comments with the most votes) in the sidebar - // on a blog post page? - 'comments_of_day' = true, - // Display a random casual game (picture game, poll or quiz)? - // Requires the RandomGameUnit extension. - 'games' = true, - // Show a listing of the newest blog posts in blog pages? - 'new_articles' = true, - // Display the widget that allows you to embed the blog post on another - // site? Off by default since it requires the ContentWidget extension, - // which
[MediaWiki-commits] [Gerrit] Remove custom fact ec2id (2nd try), unused - change (operations/puppet)
Faidon Liambotis has uploaded a new change for review. https://gerrit.wikimedia.org/r/227201 Change subject: Remove custom fact ec2id (2nd try), unused .. Remove custom fact ec2id (2nd try), unused All uses of $::ec2id within puppet have been removed, no reason to carry this fact anymore. Change-Id: I7dd66d906b819aa82a325487d0dd7b65586c62f5 --- D modules/base/lib/facter/ec2id.rb M modules/puppet/manifests/self/master.pp 2 files changed, 0 insertions(+), 19 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/01/227201/1 diff --git a/modules/base/lib/facter/ec2id.rb b/modules/base/lib/facter/ec2id.rb deleted file mode 100644 index 1d2d61e..000 --- a/modules/base/lib/facter/ec2id.rb +++ /dev/null @@ -1,18 +0,0 @@ -# ec2id.rb -# -# This fact provides ec2id (old-timey instance id) for instances in labs. -# This is used to set the puppet certname, among other things. - -require 'facter' - -Facter.add(:ec2id) do - setcode do -domain = Facter::Util::Resolution.exec(hostname -d).chomp -if domain.include? wmflabs - Facter::Util::Resolution.exec(curl -f http://169.254.169.254/1.0/meta-data/instance-id 2 /dev/null).chomp -else - -end - end -end - diff --git a/modules/puppet/manifests/self/master.pp b/modules/puppet/manifests/self/master.pp index c987131..fc63434 100644 --- a/modules/puppet/manifests/self/master.pp +++ b/modules/puppet/manifests/self/master.pp @@ -44,7 +44,6 @@ } # If localhost, then just name the cert 'localhost'. -# Else certname should be the labs instanceid. ($::ec2id comes from instance metadata.) $certname = $server ? { 'localhost' = 'localhost', default = $fqdn -- To view, visit https://gerrit.wikimedia.org/r/227201 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7dd66d906b819aa82a325487d0dd7b65586c62f5 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Faidon Liambotis fai...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] WIP/RfC: Allow multiple/dynamic range of ports for ferm serv... - change (operations/puppet)
Muehlenhoff has uploaded a new change for review. https://gerrit.wikimedia.org/r/227216 Change subject: WIP/RfC: Allow multiple/dynamic range of ports for ferm services .. WIP/RfC: Allow multiple/dynamic range of ports for ferm services rcstream uses a dynamic range of ports depending on how many CPUs/core the server has. Since Puppet doesn't have builtin iteration in the current version, the expansion occurs in the ERB template. If anyone has a alternate suggestion to implement this, I'd be interested to learn about it. This introduces a bit of code duplication in form of a separate ferm::service_multiport, an alternative would be to also move existing call sites of ferm::service to use an array instead of a string to specify the ports. The current approach is less intrusive, though. Bug: T104981 Change-Id: I0e31307b46ff56286dd6f17595ed620682482628 --- M modules/ferm/manifests/service.pp A modules/ferm/templates/service-multi.erb 2 files changed, 47 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/16/227216/1 diff --git a/modules/ferm/manifests/service.pp b/modules/ferm/manifests/service.pp index 8b1f5ae..ae0b77a 100644 --- a/modules/ferm/manifests/service.pp +++ b/modules/ferm/manifests/service.pp @@ -25,3 +25,31 @@ tag = 'ferm', } } + +# == Define ferm::service_multiport +# Uses ferm def SERVICE or R_SERVICE to allow incoming +# connections on the specific protocol and ports. This is similar +# to ferm::service, but allows to specify a list of ports +# +# If $srange is not provided, all source addresses will be allowed. +# otherwise only traffic coming from $srange will be allowed. +define ferm::service_multiport( +$proto, +$ports, +$ensure = present, +$desc= '', +$prio= '10', +$srange = undef, +$notrack = false, +) { +@file { /etc/ferm/conf.d/${prio}_${name}: +ensure = $ensure, +owner = 'root', +group = 'root', +mode= '0400', +content = template('ferm/service-multi.erb'), +require = File['/etc/ferm/conf.d'], +notify = Service['ferm'], +tag = 'ferm', +} +} diff --git a/modules/ferm/templates/service-multi.erb b/modules/ferm/templates/service-multi.erb new file mode 100644 index 000..73df7f5 --- /dev/null +++ b/modules/ferm/templates/service-multi.erb @@ -0,0 +1,19 @@ +# Autogenerated by puppet. DO NOT EDIT BY HAND! +# +# %= @desc % +% if @srange -% + % for @port in @ports -% + R_SERVICE(%= @proto %, %= @port %, %= @srange %); + % end % + +% else -% + % for @port in @ports -% + SERVICE(%= @proto %, %= @port %); + % end -% +% end -% + +% if @notrack == true % + % for @port in @ports -% + NO_TRACK(%= @proto %, %= @port %); + % end -% +% end -% -- To view, visit https://gerrit.wikimedia.org/r/227216 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0e31307b46ff56286dd6f17595ed620682482628 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Muehlenhoff mmuhlenh...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add ferm rules for rcstream - change (operations/puppet)
Muehlenhoff has uploaded a new change for review. https://gerrit.wikimedia.org/r/227218 Change subject: Add ferm rules for rcstream .. Add ferm rules for rcstream Bug: T104981 Change-Id: I31baeb07816be7c76d0d23d8aeca8c3e654468f1 --- M modules/rcstream/manifests/init.pp 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/18/227218/1 diff --git a/modules/rcstream/manifests/init.pp b/modules/rcstream/manifests/init.pp index a51c199..2908414 100644 --- a/modules/rcstream/manifests/init.pp +++ b/modules/rcstream/manifests/init.pp @@ -81,6 +81,12 @@ force = true, } +ferm::service_multiport {'rcstream': +proto = 'tcp', +port = $ports, +srange = '$INTERNAL', +} + service { 'rcstream': ensure = 'running', provider = 'base', -- To view, visit https://gerrit.wikimedia.org/r/227218 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I31baeb07816be7c76d0d23d8aeca8c3e654468f1 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Muehlenhoff mmuhlenh...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] update support url - change (apps...wikipedia)
jenkins-bot has submitted this change and it was merged. Change subject: update support url .. update support url Change-Id: I5e6457e4c1baa3205cd3fda27028eb89d5df15b5 --- M fastlane/metadata/en-US/support_url.txt 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Fjalapeno: Looks good to me, approved jenkins-bot: Verified diff --git a/fastlane/metadata/en-US/support_url.txt b/fastlane/metadata/en-US/support_url.txt index 89310b9..5fc3501 100644 --- a/fastlane/metadata/en-US/support_url.txt +++ b/fastlane/metadata/en-US/support_url.txt @@ -1 +1 @@ -https://www.mediawiki.org/wiki/Wikimedia_Apps/FAQ +https://www.mediawiki.org/wiki/Wikimedia_Apps/iOS_FAQ -- To view, visit https://gerrit.wikimedia.org/r/226979 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5e6457e4c1baa3205cd3fda27028eb89d5df15b5 Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Bgerstle bgers...@wikimedia.org Gerrit-Reviewer: Fjalapeno cfl...@wikimedia.org Gerrit-Reviewer: Mhurd mh...@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] Clean up Apex skin - change (mediawiki...apex)
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/227212 Change subject: Clean up Apex skin .. Clean up Apex skin * Cleans up code in apex skin to match some of vector which this skin is * based on. Includes two new configs to enable or disable watch icon and the search bar with an icon instead of button. Adds two missing files. Add search icon in svg format too. Convert css to less Add some svg images Fixes login and create account was hidden with this patch it is un hidden. Updated the personal menu so when your logged out it shows The name as guest which should fix login in and creating account issue. Change-Id: I9aca5319ee9bee1e069fa7f0ce83c70e1a381c7a --- M ApexTemplate.php M SkinApex.php A csshover.htc A csshover.min.htc A hooks.txt A i18n/de.json M i18n/en.json A i18n/es.json A i18n/ksh.json A i18n/lb.json A i18n/mk.json A i18n/my.json A i18n/pl.json M i18n/qqq.json A i18n/ro.json A i18n/ru.json A i18n/shn.json A i18n/vi.json A i18n/zh-hans.json A images/bullet-icon.png A images/bullet-icon.svg R images/menu-hover.png R images/menu.png R images/nav-hover.png R images/nav.png R images/search-ltr.png A images/search-ltr.svg A images/search-rtl.png A images/search-rtl.svg R images/talk.png R images/toc-hover.png R images/toc.png A images/unwatch-icon-hl.png A images/unwatch-icon-hl.svg A images/unwatch-icon.png A images/unwatch-icon.svg A images/user-icon.png A images/user-icon.svg R images/user.png A images/watch-icon-hl.png A images/watch-icon-hl.svg A images/watch-icon-loading.png A images/watch-icon-loading.svg A images/watch-icon.png A images/watch-icon.svg D resources/images/icons/watch-loading.gif D resources/images/icons/watch.png R resources/screen-narrow.less R resources/screen-wide.less R resources/screen.less M skin.json 51 files changed, 1,128 insertions(+), 290 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/apex refs/changes/12/227212/1 diff --git a/ApexTemplate.php b/ApexTemplate.php index 23b673c..48faf0e 100644 --- a/ApexTemplate.php +++ b/ApexTemplate.php @@ -14,12 +14,18 @@ public function execute() { global $wgSitename, $wgApexLogo, $wgStylePath; + $skin = $this-getSkin(); + // Build additional attributes for navigation urls $nav = $this-data['content_navigation']; - $mode = $this-getSkin()-getUser()-isWatched( $this-getSkin()-getRelevantTitle() ) ? - 'unwatch' : 'watch'; + + $mode = $this-getSkin()-getUser()-isWatched( $this-getSkin()-getRelevantTitle() ) + ? 'unwatch' + : 'watch'; + if ( isset( $nav['actions'][$mode] ) ) { $nav['views'][$mode] = $nav['actions'][$mode]; + $nav['views'][$mode]['class'] = rtrim( 'icon ' . $nav['views'][$mode]['class'], ' ' ); $nav['views'][$mode]['primary'] = true; unset( $nav['actions'][$mode] ); } @@ -69,55 +75,136 @@ $this-data['personal_urls'] = array_reverse( $this-data['personal_urls'] ); } + + $this-data['pageLanguage'] = + $this-getSkin()-getTitle()-getPageViewLanguage()-getHtmlCode(); + + + // User name (or Guest) to be displayed at the top right (on LTR + // interfaces) portion of the skin + $user = $skin-getUser(); + if ( !$user-isLoggedIn() ) { + $userNameTop = $skin-msg( 'apex-guest' )-text(); + } else { + $userNameTop = htmlspecialchars( $user-getName(), ENT_QUOTES ); + } + // Output HTML Page $this-html( 'headelement' ); -? + ? div class=apex-content-wrapper - div id=content class=mw-body + div id=content class=mw-body role=main a id=top/a - div id=mw-js-message style=display:none;?php $this-html( 'userlangattributes' ) ?/div - ?php if ( $this-data['sitenotice'] ): ? - div id=siteNotice?php $this-html( 'sitenotice' ) ?/div - ?php endif; ? - h1 id=firstHeading class=firstHeading?php $this-html( 'title' ) ?/h1 - div id=bodyContent - ?php if ( $this-data['isarticle'] ): ? - div id=siteSub?php $this-msg( 'tagline' ) ?/div - ?php endif; ? - div id=contentSub?php $this-html( 'userlangattributes' ) ??php
[MediaWiki-commits] [Gerrit] Minor improvements in README.rst - change (pywikibot/core)
Ladsgroup has uploaded a new change for review. https://gerrit.wikimedia.org/r/227211 Change subject: Minor improvements in README.rst .. Minor improvements in README.rst - Add link to doc.wikimedia.org for further documentation. - Add commands to install pywikibot via PyPI Change-Id: Ica65a16befbe1a6fe7471a3ac44c5ca7ae5fe135 --- M README.rst 1 file changed, 6 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/11/227211/1 diff --git a/README.rst b/README.rst index 93a1135..ef00ae9 100644 --- a/README.rst +++ b/README.rst @@ -6,7 +6,7 @@ version 1.14 or higher. Also included are various general function scripts that can be adapted for -different tasks. +different tasks. For Further information see the full `code documentation https://doc.wikimedia.org/pywikibot/`_. Quick start --- @@ -18,6 +18,11 @@ git submodule update --init python pwb.py script_name +Or to install using PyPI +:: + +pip install pywikibot --pre + Our `installation guide https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Pywikibot/Installation`_ has more details for advanced usage. -- To view, visit https://gerrit.wikimedia.org/r/227211 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ica65a16befbe1a6fe7471a3ac44c5ca7ae5fe135 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Ladsgroup ladsgr...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] update for unicode_literals - change (pywikibot/core)
Avicennasis has uploaded a new change for review. https://gerrit.wikimedia.org/r/227204 Change subject: update for unicode_literals .. update for unicode_literals Change-Id: Iedabbb871e2a0493c4a22aaedb6bab4781727c88 --- M scripts/commonscat.py 1 file changed, 137 insertions(+), 137 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/04/227204/1 diff --git a/scripts/commonscat.py b/scripts/commonscat.py index 54be96b..cc89a4d 100755 --- a/scripts/commonscat.py +++ b/scripts/commonscat.py @@ -74,147 +74,147 @@ # Primary template, list of alternatives # No entry needed if it is like _default commonscatTemplates = { -'_default': (u'Commonscat', []), -'af': (u'CommonsKategorie', [u'commonscat']), -'an': (u'Commonscat', [u'Commons cat']), -'ar': (u'تصنيف كومنز', - [u'Commonscat', u'تصنيف كومونز', u'Commons cat', u'CommonsCat']), -'arz': (u'Commons cat', [u'Commoncat']), -'az': (u'CommonsKat', [u'Commonscat']), -'bn': (u'কমন্সক্যাট', [u'Commonscat']), -'ca': (u'Commonscat', [u'Commons cat', u'Commons category']), -'crh': (u'CommonsKat', [u'Commonscat']), -'cs': (u'Commonscat', [u'Commons cat']), -'da': (u'Commonscat', - [u'Commons cat', u'Commons category', u'Commonscat left', -u'Commonscat2']), -'en': (u'Commons category', - [u'Commoncat', u'Commonscat', u'Commons cat', u'Commons+cat', -u'Commonscategory', u'Commons and category', u'Commonscat-inline', -u'Commons category-inline', u'Commons2', u'Commons category multi', -u'Cms-catlist-up', u'Catlst commons', u'Commonscat show2', -u'Sister project links']), -'es': (u'Commonscat', - [u'Ccat', u'Commons cat', u'Categoría Commons', -u'Commonscat-inline']), -'et': (u'Commonsi kategooria', - [u'Commonscat', u'Commonskat', u'Commons cat', u'Commons category']), -'eu': (u'Commonskat', [u'Commonscat']), -'fa': (u'ویکیانبار-رده', - [u'Commonscat', u'Commons cat', u'انبار رده', u'Commons category', -u'انبار-رده', u'جعبه پیوند به پروژههای خواهر', -u'در پروژههای خواهر', u'پروژههای خواهر']), -'fr': (u'Commonscat', [u'CommonsCat', u'Commons cat', u'Commons category']), -'frp': (u'Commonscat', [u'CommonsCat']), -'ga': (u'Catcómhaoin', [u'Commonscat']), -'he': (u'ויקישיתוף בשורה', []), -'hi': (u'Commonscat', [u'Commons2', u'Commons cat', u'Commons category']), -'hu': (u'Commonskat', [u'Közvagyonkat']), -'hy': (u'Վիքիպահեստ կատեգորիա', - [u'Commonscat', u'Commons cat', u'Commons category']), -'id': (u'Commonscat', - [u'Commons cat', u'Commons2', u'CommonsCat', u'Commons category']), -'is': (u'CommonsCat', [u'Commonscat']), -'ja': (u'Commonscat', [u'Commons cat', u'Commons category']), -'jv': (u'Commonscat', [u'Commons cat']), -'kaa': (u'Commons cat', [u'Commonscat']), -'kk': (u'Commonscat', [u'Commons2']), -'ko': (u'Commonscat', [u'Commons cat', u'공용분류']), -'la': (u'CommuniaCat', []), -'mk': (u'Ризница-врска', - [u'Commonscat', u'Commons cat', u'CommonsCat', u'Commons2', -u'Commons category']), -'ml': (u'Commonscat', [u'Commons cat', u'Commons2']), -'ms': (u'Kategori Commons', [u'Commonscat', u'Commons category']), -'nn': (u'Commonscat', [u'Commons cat']), -'os': (u'Commonscat', [u'Commons cat']), -'pt': (u'Commonscat', [u'Commons cat']), -'ro': (u'Commonscat', [u'Commons cat']), +'_default': ('Commonscat', []), +'af': ('CommonsKategorie', ['commonscat']), +'an': ('Commonscat', ['Commons cat']), +'ar': ('تصنيف كومنز', + ['Commonscat', u'تصنيف كومونز', 'Commons cat', 'CommonsCat']), +'arz': ('Commons cat', ['Commoncat']), +'az': ('CommonsKat', ['Commonscat']), +'bn': ('কমন্সক্যাট', ['Commonscat']), +'ca': ('Commonscat', ['Commons cat', 'Commons category']), +'crh': ('CommonsKat', ['Commonscat']), +'cs': ('Commonscat', ['Commons cat']), +'da': ('Commonscat', + ['Commons cat', 'Commons category', 'Commonscat left', +'Commonscat2']), +'en': ('Commons category', + ['Commoncat', 'Commonscat', 'Commons cat', 'Commons+cat', +'Commonscategory', 'Commons and category', 'Commonscat-inline', +'Commons category-inline', 'Commons2', 'Commons category multi', +'Cms-catlist-up', 'Catlst commons', 'Commonscat show2', +'Sister project links']), +'es': ('Commonscat', + ['Ccat', 'Commons cat', 'Categoría Commons', +'Commonscat-inline']), +'et': ('Commonsi kategooria', + ['Commonscat', 'Commonskat', 'Commons cat', 'Commons category']), +'e': ('Commonskat', ['Commonscat']), +'fa': ('ویکیانبار-رده', + ['Commonscat', 'Commons cat', 'انبار رده',
[MediaWiki-commits] [Gerrit] Adjust Herald field values to upstream changes - change (phabricator...security)
20after4 has submitted this change and it was merged. Change subject: Adjust Herald field values to upstream changes .. Adjust Herald field values to upstream changes Related: https://secure.phabricator.com/D13613 and https://secure.phabricator.com/D13616 Bug: T107027 Change-Id: I675657cb6a2cfbca141d0eea851f1e6c5c2bf8c3 --- M src/policy/SecurityPolicyEnforcerAction.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: 20after4: Looks good to me, approved jenkins-bot: Verified diff --git a/src/policy/SecurityPolicyEnforcerAction.php b/src/policy/SecurityPolicyEnforcerAction.php index 86c3c57..5ada4d4 100644 --- a/src/policy/SecurityPolicyEnforcerAction.php +++ b/src/policy/SecurityPolicyEnforcerAction.php @@ -25,7 +25,7 @@ } public function getActionType() { -return HeraldAdapter::VALUE_NONE; +return new HeraldEmptyFieldValue(); } public function applyEffect( -- To view, visit https://gerrit.wikimedia.org/r/227205 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I675657cb6a2cfbca141d0eea851f1e6c5c2bf8c3 Gerrit-PatchSet: 1 Gerrit-Project: phabricator/extensions/security Gerrit-Branch: master Gerrit-Owner: Aklapper aklap...@wikimedia.org Gerrit-Reviewer: 20after4 mmod...@wikimedia.org Gerrit-Reviewer: Aklapper aklap...@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] Batch MW parser and imageinfo API requests - change (mediawiki...parsoid)
Tim Starling has uploaded a new change for review. https://gerrit.wikimedia.org/r/227208 Change subject: Batch MW parser and imageinfo API requests .. Batch MW parser and imageinfo API requests * Implement a system for mixed batches of parser, preprocessor and imageinfo requests. This uses an MW extension specific to Parsoid which provides the relevant API. * Implement caching inside Batcher, replacing env.pageCache, except for its original use case. parserTests.js uses env.pageCache to inject template wikitext, which will still work -- it was never really correct to allow parserTests.js to inject other API responses into the cache. * Remove Processor parameter from fetchExpandedTpl() since it was always the same. Bug: T45888 Change-Id: I2bd6f574bca8c64302810a9569f9390c4cf64626 --- M lib/ParsoidLogger.js M lib/ext.core.ExtensionHandler.js M lib/ext.core.LinkHandler.js M lib/ext.core.TemplateHandler.js M lib/mediawiki.ApiRequest.js A lib/mediawiki.Batcher.js M lib/mediawiki.ParsoidConfig.js M lib/mediawiki.TokenTransformManager.js M lib/mediawiki.parser.environment.js 9 files changed, 589 insertions(+), 143 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid refs/changes/08/227208/1 diff --git a/lib/ParsoidLogger.js b/lib/ParsoidLogger.js index 5a80ffc..8f2ba5b 100644 --- a/lib/ParsoidLogger.js +++ b/lib/ParsoidLogger.js @@ -139,7 +139,8 @@ debug/wts/sep:[SEP], trace/selser: [SELSER], trace/domdiff:[DOM-DIFF], - trace/wt-escape: [wt-esc] + trace/wt-escape: [wt-esc], + trace/batcher:[batcher] }; ParsoidLogger.prototype._defaultTracerBackend = function(logData, cb) { diff --git a/lib/ext.core.ExtensionHandler.js b/lib/ext.core.ExtensionHandler.js index 74c0f2a..7150310 100644 --- a/lib/ext.core.ExtensionHandler.js +++ b/lib/ext.core.ExtensionHandler.js @@ -4,7 +4,6 @@ var coreutil = require('util'); var Util = require('./mediawiki.Util.js').Util; var DU = require('./mediawiki.DOMUtils.js').DOMUtils; -var PHPParseRequest = require('./mediawiki.ApiRequest.js').PHPParseRequest; var defines = require('./mediawiki.parser.defines.js'); // define some constructor shortcuts @@ -83,16 +82,12 @@ var env = this.env; // We are about to start an async request for an extension env.dp('Note: trying to expand ', text); - - // Start a new request if none is outstanding - if (env.requestQueue[text] === undefined) { - env.tp('Note: Starting new request for ' + text); - env.requestQueue[text] = new PHPParseRequest(env, title, text); + var cacheEntry = env.batcher.parse(title, text, cb); + if (cacheEntry !== undefined) { + cb(cacheEntry); + } else { + parentCB ({ async: true }); } - // append request, process in document order - env.requestQueue[text].once('src', cb); - - parentCB ({ async: true }); }; function normalizeExtOptions(options) { diff --git a/lib/ext.core.LinkHandler.js b/lib/ext.core.LinkHandler.js index f18bd0c..35b23d6 100644 --- a/lib/ext.core.LinkHandler.js +++ b/lib/ext.core.LinkHandler.js @@ -942,8 +942,17 @@ var containerClose = new EndTagTk(containerName); if (!err data) { - var ns = data.imgns; - image = data.pages[ns + ':' + title.key]; + if (data.batchResponse !== undefined) { + info = data.batchResponse; + } else { + var ns = data.imgns; + image = data.pages[ns + ':' + title.key]; + if (image image.info image.info[0]) { + info = image.info[0]; + } else { + info = false; + } + } } // FIXME gwicke: Make sure our filename is never of the form @@ -956,18 +965,14 @@ // full 'filename' does not match any of them, so image is then // undefined here. So for now (as a workaround) check if we // actually have an image to work with instead of crashing. - if (!image || !image.imageinfo) { + if (!info) { // Use sane defaults. - image = { - imageinfo: [ - { - url: './Special:FilePath/' + Util.sanitizeTitleURI(title.key), - // Preserve width and height from the wikitext options - // even if the image is non-existent. - width: opts.size.v.width || 220, - height: opts.size.v.height || opts.size.v.width || 220 - } - ] + info =
[MediaWiki-commits] [Gerrit] Repool db1035 - change (operations/mediawiki-config)
Jcrespo has submitted this change and it was merged. Change subject: Repool db1035 .. Repool db1035 After table cache and statistics have been forced on all tables, we try again with lower weight. Change-Id: I4fe70d97c8340ebc32c96b9a6d25fb5a70d6cc4f --- M wmf-config/db-eqiad.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jcrespo: Looks good to me, approved diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php index 0a2a768..2e67722 100755 --- a/wmf-config/db-eqiad.php +++ b/wmf-config/db-eqiad.php @@ -112,7 +112,7 @@ 'db1038' = 0, # 1.4TB 64GB 'db1027' = 0, # 1.4TB 64GB, vslow, dump 'db1015' = 0, # 1.4TB 64GB, watchlist, recentchanges, contributions, logpager -# 'db1035' = 400, # 1.4TB 64GB (T106986) + 'db1035' = 40, # 1.4TB 64GB 'db1044' = 400, # 1.4TB 64GB ), 's4' = array( -- To view, visit https://gerrit.wikimedia.org/r/227206 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4fe70d97c8340ebc32c96b9a6d25fb5a70d6cc4f Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Jcrespo jcre...@wikimedia.org Gerrit-Reviewer: Jcrespo jcre...@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] Dummy commit to test Jenkins - change (mediawiki...mobileapps)
Mobrovac has uploaded a new change for review. https://gerrit.wikimedia.org/r/227215 Change subject: Dummy commit to test Jenkins .. Dummy commit to test Jenkins Change-Id: I9928aa3750f50816e9a70f48f9c63102e66630ec --- M config.dev.yaml 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/mobileapps refs/changes/15/227215/1 diff --git a/config.dev.yaml b/config.dev.yaml index 80b5d04..e3353cd 100644 --- a/config.dev.yaml +++ b/config.dev.yaml @@ -47,4 +47,5 @@ # no_proxy_list: # - domain1.com # - domain2.org + # restbase URI restbase_uri: https://restbase.wikimedia.org -- To view, visit https://gerrit.wikimedia.org/r/227215 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9928aa3750f50816e9a70f48f9c63102e66630ec Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/mobileapps Gerrit-Branch: master Gerrit-Owner: Mobrovac mobro...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Commonscat l18n for Scots Wikipedia per T106932 - change (pywikibot/core)
Avicennasis has uploaded a new change for review. https://gerrit.wikimedia.org/r/227202 Change subject: Commonscat l18n for Scots Wikipedia per T106932 .. Commonscat l18n for Scots Wikipedia per T106932 Change-Id: Ica02b18e66115ec504f3b172b16785d1307ec28c --- M scripts/commonscat.py 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/02/227202/1 diff --git a/scripts/commonscat.py b/scripts/commonscat.py index 55cd8c1..54be96b 100755 --- a/scripts/commonscat.py +++ b/scripts/commonscat.py @@ -130,6 +130,7 @@ 'os': (u'Commonscat', [u'Commons cat']), 'pt': (u'Commonscat', [u'Commons cat']), 'ro': (u'Commonscat', [u'Commons cat']), +'sco': ('Commons category', ['Commonscat', 'Commons cat']), 'ru': (u'Commonscat', [u'Викисклад-кат', u'Commons category']), 'simple': (u'Commonscat', [u'Commons cat', u'Commons cat multi', u'Commons category', -- To view, visit https://gerrit.wikimedia.org/r/227202 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ica02b18e66115ec504f3b172b16785d1307ec28c Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Avicennasis avicenna...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Enable ferm on lead - change (operations/puppet)
Faidon Liambotis has submitted this change and it was merged. Change subject: Enable ferm on lead .. Enable ferm on lead Bug: T104979 While there will be a brief window while ferm is enabled, where SMTP will be blocked, mail servers will retry mail delivery later. Change-Id: Idd6f83d59f03db1f703d76ed22ebac5a000733f0 --- M manifests/site.pp 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Faidon Liambotis: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/site.pp b/manifests/site.pp index 7406fc7..26fb234 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -1321,6 +1321,7 @@ node 'lead.wikimedia.org' { role mail::mx include standard +include base::firewall interface::add_ip6_mapped { 'main': } } -- To view, visit https://gerrit.wikimedia.org/r/226707 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idd6f83d59f03db1f703d76ed22ebac5a000733f0 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Muehlenhoff mmuhlenh...@wikimedia.org Gerrit-Reviewer: Dzahn dz...@wikimedia.org Gerrit-Reviewer: Faidon Liambotis fai...@wikimedia.org Gerrit-Reviewer: RobH r...@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] WIP Stop using LibDeserializer in EditEntity SetClaim - change (mediawiki...Wikibase)
Addshore has uploaded a new change for review. https://gerrit.wikimedia.org/r/227209 Change subject: WIP Stop using LibDeserializer in EditEntity SetClaim .. WIP Stop using LibDeserializer in EditEntity SetClaim This requires a change in DM serialization to allow the deserialization or statements with a null guid set Change-Id: If641f67a77c37317de9cd80d06f77058a3ffdc81 --- M lib/includes/changes/EntityChange.php M repo/includes/WikibaseRepo.php M repo/includes/api/EditEntity.php M repo/includes/api/SetClaim.php M repo/tests/phpunit/includes/EntityModificationTestHelper.php M repo/tests/phpunit/includes/WikibaseRepoTest.php M repo/tests/phpunit/includes/api/SetClaimTest.php M repo/tests/phpunit/includes/content/DeferredDecodingEntityHolderTest.php 8 files changed, 56 insertions(+), 43 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/09/227209/1 diff --git a/lib/includes/changes/EntityChange.php b/lib/includes/changes/EntityChange.php index 485b7d7..4f570d3 100644 --- a/lib/includes/changes/EntityChange.php +++ b/lib/includes/changes/EntityChange.php @@ -309,7 +309,7 @@ // FIXME: the change row system needs to be reworked to either allow for sane injection // or to avoid this kind of configuration dependent tasks. if ( defined( 'WB_VERSION' ) ) { - return WikibaseRepo::getDefaultInstance()-getInternalStatementDeserializer(); + return WikibaseRepo::getDefaultInstance()-getStatementDeserializer(); } elseif ( defined( 'WBC_VERSION' ) ) { return WikibaseClient::getDefaultInstance()-getInternalStatementDeserializer(); } else { diff --git a/repo/includes/WikibaseRepo.php b/repo/includes/WikibaseRepo.php index 69e6601..81fe49a 100644 --- a/repo/includes/WikibaseRepo.php +++ b/repo/includes/WikibaseRepo.php @@ -917,15 +917,15 @@ return new EntityContentDataCodec( $this-getEntityIdParser(), $this-getInternalEntitySerializer(), - $this-getInternalEntityDeserializer() + $this-getEntityDeserializer() ); } /** * @return Deserializer */ - public function getInternalEntityDeserializer() { - return $this-getInternalDeserializerFactory()-newEntityDeserializer(); + public function getEntityDeserializer() { + return $this-getDeserializerFactory()-newEntityDeserializer(); } /** @@ -935,7 +935,7 @@ $entitySerializerClass = $this-settings-getSetting( 'internalEntitySerializerClass' ); if ( $entitySerializerClass === null ) { - return $this-getInternalSerializerFactory()-newEntitySerializer(); + return $this-getSerializerFactory()-newEntitySerializer(); } return new $entitySerializerClass(); @@ -948,7 +948,7 @@ $claimSerializerClass = $this-settings-getSetting( 'internalClaimSerializerClass' ); if ( $claimSerializerClass === null ) { - return $this-getInternalSerializerFactory()-newStatementSerializer(); + return $this-getSerializerFactory()-newStatementSerializer(); } return new $claimSerializerClass(); @@ -957,14 +957,14 @@ /** * @return Deserializer */ - public function getInternalStatementDeserializer() { - return $this-getInternalDeserializerFactory()-newStatementDeserializer(); + public function getStatementDeserializer() { + return $this-getDeserializerFactory()-newStatementDeserializer(); } /** * @return DeserializerFactory */ - protected function getInternalDeserializerFactory() { + protected function getDeserializerFactory() { return new DeserializerFactory( $this-getDataValueDeserializer(), $this-getEntityIdParser() @@ -992,7 +992,7 @@ /** * @return SerializerFactory */ - protected function getInternalSerializerFactory() { + protected function getSerializerFactory() { return new SerializerFactory( new DataValueSerializer() ); } diff --git a/repo/includes/api/EditEntity.php b/repo/includes/api/EditEntity.php index ed4cae0..ea2b424 100644 --- a/repo/includes/api/EditEntity.php +++ b/repo/includes/api/EditEntity.php @@ -4,6 +4,7 @@ use ApiMain; use DataValues\IllegalValueException; +use Deserializers\Deserializer; use InvalidArgumentException; use LogicException; use MWException; @@ -15,16 +16,14 @@ use Wikibase\ChangeOp\StatementChangeOpFactory; use
[MediaWiki-commits] [Gerrit] move majority of privates/files usage to secret() - change (operations/puppet)
BBlack has submitted this change and it was merged. Change subject: move majority of privates/files usage to secret() .. move majority of privates/files usage to secret() This is all of the trivial cases, where a fixed path was hardcoded as the source attribute of a 'file', 'ssh::userkey', or 'exim4::dkim' definition, all of which are known to handle the source/content switch ok. Change-Id: I0db6fdb1c75355b58095e0ec29d6028bbc614649 --- M manifests/mail.pp M manifests/role/access_new_install.pp M manifests/role/ci.pp M manifests/role/designate.pp M manifests/role/ganeti.pp M manifests/role/mha.pp M modules/authdns/manifests/account.pp M modules/gerrit/manifests/jetty.pp M modules/icinga/manifests/init.pp M modules/icinga/manifests/nsca/client.pp M modules/icinga/manifests/nsca/daemon.pp M modules/keyholder/manifests/private_key.pp M modules/labstore/manifests/init.pp M modules/lvs/manifests/balancer/runcommand.pp M modules/mailman/manifests/webui.pp M modules/mw-rc-irc/manifests/ircserver.pp M modules/openstack/manifests/glance/service.pp M modules/openstack/manifests/nova/compute.pp M modules/puppet/manifests/self/gitclone.pp M modules/puppetmaster/manifests/gitpuppet.pp M modules/scap/manifests/l10nupdate.pp M modules/statistics/manifests/sites/stats.pp 22 files changed, 34 insertions(+), 34 deletions(-) Approvals: BBlack: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/mail.pp b/manifests/mail.pp index 22957e4..1bc238e 100644 --- a/manifests/mail.pp +++ b/manifests/mail.pp @@ -97,7 +97,7 @@ exim4::dkim { 'wikimedia.org': domain = 'wikimedia.org', selector = 'wikimedia', -source = 'puppet:///private/dkim/wikimedia.org-wikimedia.key', +content = secret('dkim/wikimedia.org-wikimedia.key'), } } @@ -113,7 +113,7 @@ exim4::dkim { 'lists.wikimedia.org': domain = 'lists.wikimedia.org', selector = 'wikimedia', -source = 'puppet:///private/dkim/lists.wikimedia.org-wikimedia.key', +content = secret('dkim/lists.wikimedia.org-wikimedia.key'), } } @@ -121,7 +121,7 @@ exim4::dkim { 'wiki-mail': domain = 'wikimedia.org', selector = 'wiki-mail', -source = 'puppet:///private/dkim/wikimedia.org-wiki-mail.key', +content = secret('dkim/wikimedia.org-wiki-mail.key'), } } diff --git a/manifests/role/access_new_install.pp b/manifests/role/access_new_install.pp index ab761dd..d6385de 100644 --- a/manifests/role/access_new_install.pp +++ b/manifests/role/access_new_install.pp @@ -6,12 +6,12 @@ owner = 'root', group = 'root', mode = '0400', -source = 'puppet:///private/ssh/new_install/new_install', +content = secret('ssh/new_install/new_install'), } file { '/root/.ssh/new_install.pub': owner = 'root', group = 'root', mode = '0444', -source = 'puppet:///private/ssh/new_install/new_install.pub', +content = secret('ssh/new_install/new_install.pub'), } } diff --git a/manifests/role/ci.pp b/manifests/role/ci.pp index 15f5e0b..f476ef4 100644 --- a/manifests/role/ci.pp +++ b/manifests/role/ci.pp @@ -104,7 +104,7 @@ owner = 'jenkins', group = 'jenkins', mode= '0400', -source = 'puppet:///private/ssh/ci/jenkins-mwext-sync_id_rsa', +content = secret('ssh/ci/jenkins-mwext-sync_id_rsa'), require = User['jenkins'], } @@ -208,7 +208,7 @@ ensure = present, owner = 'npmtravis', mode= '0400', -source = 'puppet:///private/ssh/ci/npmtravis_id_rsa', +content = secret('ssh/ci/npmtravis_id_rsa'), require = File['/home/npmtravis/.ssh'], } diff --git a/manifests/role/designate.pp b/manifests/role/designate.pp index e5ddbef..75de288 100644 --- a/manifests/role/designate.pp +++ b/manifests/role/designate.pp @@ -101,6 +101,6 @@ owner = 'designate', group = 'designate', mode = '0400', -source = 'puppet:///private/ssh/puppet_cert_manager/cert_manager' +content = secret('ssh/puppet_cert_manager/cert_manager') } } diff --git a/manifests/role/ganeti.pp b/manifests/role/ganeti.pp index 05bb1c0..afd3221 100644 --- a/manifests/role/ganeti.pp +++ b/manifests/role/ganeti.pp @@ -17,7 +17,7 @@ owner = 'root', group = 'root', mode = '0400', -source = 'puppet:///private/ganeti/id_dsa', +content = secret('ganeti/id_dsa'), } # This is here for completeness file { '/root/.ssh/id_dsa.pub': diff --git a/manifests/role/mha.pp b/manifests/role/mha.pp index 5d7d118..e0ba1e5 100644
[MediaWiki-commits] [Gerrit] Prevent leaking title fragments across invokes - change (mediawiki...Scribunto)
jenkins-bot has submitted this change and it was merged. Change subject: Prevent leaking title fragments across invokes .. Prevent leaking title fragments across invokes Bug: T106951 Change-Id: Iace5d75deac3d8ffde6f3dec6a4f910dcb77d1e2 --- M engines/LuaCommon/lualib/mw.title.lua M tests/engines/LuaCommon/TitleLibraryTests.lua 2 files changed, 9 insertions(+), 1 deletion(-) Approvals: Anomie: Looks good to me, approved jenkins-bot: Verified diff --git a/engines/LuaCommon/lualib/mw.title.lua b/engines/LuaCommon/lualib/mw.title.lua index 4459066..3a44318 100644 --- a/engines/LuaCommon/lualib/mw.title.lua +++ b/engines/LuaCommon/lualib/mw.title.lua @@ -290,7 +290,7 @@ -- Set current title title.getCurrentTitle = function () - return makeTitleObject( options.thisTitle ) + return makeTitleObject( mw.clone( options.thisTitle ) ) end -- Register this library in the mw global diff --git a/tests/engines/LuaCommon/TitleLibraryTests.lua b/tests/engines/LuaCommon/TitleLibraryTests.lua index ed7c146..b65a4f9 100644 --- a/tests/engines/LuaCommon/TitleLibraryTests.lua +++ b/tests/engines/LuaCommon/TitleLibraryTests.lua @@ -74,6 +74,11 @@ return mw.title.new( 'ScribuntoTestPage' ):getContent() end +local function test_getCurrentTitle_fragment() + mw.title.getCurrentTitle().fragment = 'bad' + return mw.title.getCurrentTitle().fragment +end + -- Tests local tests = { { name = 'tostring', func = identity, type = 'ToString', @@ -382,6 +387,9 @@ { name = inexpensive actions shouldn't count as expensive, func = test_inexpensive, expect = { 'did not error' } }, + { name = fragments don't leak via getCurrentTitle(), func = test_getCurrentTitle_fragment, + expect = { '' } + }, } return testframework.getTestProvider( tests ) -- To view, visit https://gerrit.wikimedia.org/r/226987 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iace5d75deac3d8ffde6f3dec6a4f910dcb77d1e2 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Scribunto Gerrit-Branch: master Gerrit-Owner: Jackmcbarn jackmcb...@gmail.com Gerrit-Reviewer: Anomie bjor...@wikimedia.org Gerrit-Reviewer: Mr. Stradivarius misterst...@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] Improved handling when more results text is set to blank - change (mediawiki...Cargo)
Yaron Koren has submitted this change and it was merged. Change subject: Improved handling when more results text is set to blank .. Improved handling when more results text is set to blank Change-Id: I5e50a86fd5965d43395f84ed76e48df1745ac059 --- M CargoQueryDisplayer.php 1 file changed, 5 insertions(+), 2 deletions(-) Approvals: Yaron Koren: Checked; Looks good to me, approved diff --git a/CargoQueryDisplayer.php b/CargoQueryDisplayer.php index c7544fc..df9aef6 100644 --- a/CargoQueryDisplayer.php +++ b/CargoQueryDisplayer.php @@ -247,8 +247,11 @@ $vd = Title::makeTitleSafe( NS_SPECIAL, 'ViewData' ); if ( array_key_exists( 'more results text', $this-mDisplayParams ) ) { $moreResultsText = $this-mDisplayParams['more results text']; - } - else { + // If the value is blank, don't show a link at all. + if ( $moreResultsText == '' ) { + return ''; + } + } else { $moreResultsText = wfMessage( 'moredotdotdot' )-parse(); } -- To view, visit https://gerrit.wikimedia.org/r/227228 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5e50a86fd5965d43395f84ed76e48df1745ac059 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Cargo Gerrit-Branch: master Gerrit-Owner: Yaron Koren yaro...@gmail.com Gerrit-Reviewer: Yaron Koren yaro...@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] Literal strings can now be selected again - change (mediawiki...Cargo)
Yaron Koren has uploaded a new change for review. https://gerrit.wikimedia.org/r/227229 Change subject: Literal strings can now be selected again .. Literal strings can now be selected again Change-Id: Iacd32c2b9957177bc43f608524e288a8a99669d0 --- M CargoSQLQuery.php 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Cargo refs/changes/29/227229/1 diff --git a/CargoSQLQuery.php b/CargoSQLQuery.php index 5b1820c..8c1b050 100644 --- a/CargoSQLQuery.php +++ b/CargoSQLQuery.php @@ -390,6 +390,8 @@ array( 'DATE', 'DATE_FORMAT', 'DATE_ADD', 'DATE_SUB', 'DATE_DIFF' ) ) ) { $description-mType = 'Date'; } + } elseif ( preg_match( /^'.*'$/m, $fieldName ) ) { + // It's a quoted, literal string - do nothing. } else { // It's a standard field - though if it's // '_value', or ends in '__full', it's actually -- To view, visit https://gerrit.wikimedia.org/r/227229 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iacd32c2b9957177bc43f608524e288a8a99669d0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Cargo Gerrit-Branch: master Gerrit-Owner: Yaron Koren yaro...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fixes counting of references - change (mediawiki...Wikibase)
Jonas Kress (WMDE) has uploaded a new change for review. https://gerrit.wikimedia.org/r/227230 Change subject: Fixes counting of references .. Fixes counting of references Fixes counting of references by filtering on class 'wb-reference-new' instead of items with value. Bug: T98593 Change-Id: I7bbcd9142b4e6e64e112f8e9cd67dad0a8714b53 --- M view/resources/jquery/wikibase/jquery.wikibase.statementview.js 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/30/227230/1 diff --git a/view/resources/jquery/wikibase/jquery.wikibase.statementview.js b/view/resources/jquery/wikibase/jquery.wikibase.statementview.js index 30dfca0..ff7e451 100644 --- a/view/resources/jquery/wikibase/jquery.wikibase.statementview.js +++ b/view/resources/jquery/wikibase/jquery.wikibase.statementview.js @@ -626,8 +626,8 @@ numberOfPendingValues = 0; if( this._referencesListview ) { - numberOfValues = this._referencesListview.nonEmptyItems().length; - numberOfPendingValues = this._referencesListview.items().length - numberOfValues; + numberOfPendingValues = this._referencesListview.items().filter( '.wb-reference-new' ).length; + numberOfValues = this._referencesListview.items().length - numberOfPendingValues; } // build a nice counter, displaying fixed and pending values: -- To view, visit https://gerrit.wikimedia.org/r/227230 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7bbcd9142b4e6e64e112f8e9cd67dad0a8714b53 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Jonas Kress (WMDE) jonas.kr...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] switch nagios private contacts to secret() - change (operations/puppet)
BBlack has submitted this change and it was merged. Change subject: switch nagios private contacts to secret() .. switch nagios private contacts to secret() Change-Id: I5a5e88d341230907b9082a2da809ce9cb16d2f4c --- M modules/icinga/manifests/init.pp M modules/nagios_common/manifests/contacts.pp 2 files changed, 10 insertions(+), 9 deletions(-) Approvals: BBlack: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/icinga/manifests/init.pp b/modules/icinga/manifests/init.pp index 9c41169..34a4e7c 100644 --- a/modules/icinga/manifests/init.pp +++ b/modules/icinga/manifests/init.pp @@ -78,7 +78,7 @@ } class { 'nagios_common::contacts': -source = 'puppet:///private/nagios/contacts.cfg', +content = secret('nagios/contacts.cfg'), require = Package['icinga'], notify = Service['icinga'], } diff --git a/modules/nagios_common/manifests/contacts.pp b/modules/nagios_common/manifests/contacts.pp index 573ed43..aa78141 100644 --- a/modules/nagios_common/manifests/contacts.pp +++ b/modules/nagios_common/manifests/contacts.pp @@ -10,12 +10,6 @@ # The base directory to put configuration directory in. # Defaults to '/etc/icinga/' # -# [*source*] -# Optional - allows to input a prewritten file as a source. -# [*template*] -# puppet URL specifying the template of the contacts.cfg file -# Defaults to 'nagios_common/contacts.cfg.erb' -# # [*owner*] # The user which should own the check config files. # Defaults to 'icinga' @@ -27,11 +21,18 @@ # [*contacts*] # The list of contacts to include in the configuration. # +# [*source*] +# Allows to input a prewritten file as a source. Overrides content if +# defined, but content is used if this is undefined. +# [*content*] +# Allows to input the data as a content string. The default is +# template('nagios_common/contacts.cfg.erb') +# class nagios_common::contacts( $ensure = present, $config_dir = '/etc/icinga', $source = undef, -$template = 'nagios_common/contacts.cfg.erb', +$content = template('nagios_common/contacts.cfg.erb'), $owner = 'icinga', $group = 'icinga', $contacts = [], @@ -47,7 +48,7 @@ } else { file { ${config_dir}/contacts.cfg: ensure = $ensure, -content = template($template), +content = $content, owner = $owner, group = $group, mode= '0600', # Only $owner:$group can read/write -- To view, visit https://gerrit.wikimedia.org/r/227227 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5a5e88d341230907b9082a2da809ce9cb16d2f4c Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BBlack bbl...@wikimedia.org Gerrit-Reviewer: BBlack bbl...@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] Rm EntityParserOutputGeneratorFactory bad opts - change (mediawiki...Wikibase)
Addshore has uploaded a new change for review. https://gerrit.wikimedia.org/r/227222 Change subject: Rm EntityParserOutputGeneratorFactory bad opts .. Rm EntityParserOutputGeneratorFactory bad opts This class sets an option with the ValueFormatter::OPT_LANG key. This key a) should not be used with SerializationOptions and b) is not used anywhere when set in this case So it is removed, as it was stupid, and shouldn't do anything.. Change-Id: I79085263db81c75346d23baa6a7fdc1b3a91afa6 --- M repo/includes/EntityParserOutputGeneratorFactory.php 1 file changed, 3 insertions(+), 23 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/22/227222/1 diff --git a/repo/includes/EntityParserOutputGeneratorFactory.php b/repo/includes/EntityParserOutputGeneratorFactory.php index c3f4153..4e12f38 100644 --- a/repo/includes/EntityParserOutputGeneratorFactory.php +++ b/repo/includes/EntityParserOutputGeneratorFactory.php @@ -91,7 +91,7 @@ return new EntityParserOutputGenerator( $this-entityViewFactory, - $this-newParserOutputJsConfigBuilder( $languageCode ), + $this-newParserOutputJsConfigBuilder(), $this-entityTitleLookup, $this-valuesFinder, $this-entityInfoBuilderFactory, @@ -104,14 +104,10 @@ } /** -* @param string $languageCode -* * @return ParserOutputJsConfigBuilder */ - private function newParserOutputJsConfigBuilder( $languageCode ) { - return new ParserOutputJsConfigBuilder( - $this-makeJsConfigSerializationOptions( $languageCode ) - ); + private function newParserOutputJsConfigBuilder() { + return new ParserOutputJsConfigBuilder( new SerializationOptions() ); } /** @@ -125,22 +121,6 @@ return $this-languageFallbackChainFactory-newFromLanguageCode( $languageCode ); - } - - /** -* @param string $languageCode -* -* @return SerializationOptions -*/ - private function makeJsConfigSerializationOptions( $languageCode ) { - // NOTE: when serializing the full entity to be stored in the - // wbEntity JS config variable, we currently do not want any - // language fallback to be applied. - - $options = new SerializationOptions(); - $options-setOption( ValueFormatter::OPT_LANG, $languageCode ); - - return $options; } } -- To view, visit https://gerrit.wikimedia.org/r/227222 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I79085263db81c75346d23baa6a7fdc1b3a91afa6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Addshore addshorew...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Enable VisualEditor for auto-created accounts on enwiki - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: Enable VisualEditor for auto-created accounts on enwiki .. Enable VisualEditor for auto-created accounts on enwiki Change-Id: I8f2a4a1c409b56cfc006e9e4c561c2e957bed377 --- M wmf-config/InitialiseSettings.php 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Thcipriani: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 835160b..b7e7a20 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -12645,6 +12645,7 @@ // wiki where it's not already on by default. '$wmgVisualEditorAutoAccountEnable' = array( 'default' = false, + 'enwiki' = true, ), // Should VisualEditor's beta welcome be shown -- To view, visit https://gerrit.wikimedia.org/r/226337 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8f2a4a1c409b56cfc006e9e4c561c2e957bed377 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Jforrester jforres...@wikimedia.org Gerrit-Reviewer: Thcipriani tcipri...@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] Rename 'cookie_munging' VCL subroutine to 'stash_cookie' - change (operations/puppet)
BBlack has submitted this change and it was merged. Change subject: Rename 'cookie_munging' VCL subroutine to 'stash_cookie' .. Rename 'cookie_munging' VCL subroutine to 'stash_cookie' We have 'evaluate_cookie', 'restore_cookie', and .. 'cookie_munging'. Rename the latter to 'stash_cookie' for consistency with the others. Change-Id: I8c3ba5dc074b8c878b2d2128bc0a6a29f2a8e1d1 --- M templates/varnish/text-common.inc.vcl.erb 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Gilles: Looks good to me, but someone else must approve BBlack: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/templates/varnish/text-common.inc.vcl.erb b/templates/varnish/text-common.inc.vcl.erb index a0d0369..b35a91a 100644 --- a/templates/varnish/text-common.inc.vcl.erb +++ b/templates/varnish/text-common.inc.vcl.erb @@ -1,6 +1,6 @@ // Common functions for the Text Varnish cluster -sub cookie_munging { +sub stash_cookie { // This header is saved, and restored before sending it to MediaWiki if (req.restarts == 0) { set req.http.Orig-Cookie = req.http.Cookie; @@ -32,7 +32,7 @@ req.url !~ ^/w/load\.php) { set req.hash_ignore_busy = true; } else { - call cookie_munging; + call stash_cookie; } } -- To view, visit https://gerrit.wikimedia.org/r/225281 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8c3ba5dc074b8c878b2d2128bc0a6a29f2a8e1d1 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ori.livneh o...@wikimedia.org Gerrit-Reviewer: BBlack bbl...@wikimedia.org Gerrit-Reviewer: Gilles gdu...@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] Improve messages related to $wgAllowCategorizedRecentChanges - change (mediawiki/core)
Bartosz Dziewoński has uploaded a new change for review. https://gerrit.wikimedia.org/r/227233 Change subject: Improve messages related to $wgAllowCategorizedRecentChanges .. Improve messages related to $wgAllowCategorizedRecentChanges * Add missing colon to 'rc_categories' to match the rest of the form. * Expand 'rc_categories_any' because its purpose is completely opaque. Change-Id: I29bc9343e10c3d96c758379ec717c32809c653bd --- M languages/i18n/en.json 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/33/227233/1 diff --git a/languages/i18n/en.json b/languages/i18n/en.json index 97f1310..0531d7f 100644 --- a/languages/i18n/en.json +++ b/languages/i18n/en.json @@ -1267,8 +1267,8 @@ unpatrolledletter: !, number_of_watching_users_RCview: [$1], number_of_watching_users_pageview: [$1 watching {{PLURAL:$1|user|users}}], - rc_categories: Limit to categories (separate with \|\), - rc_categories_any: Any, + rc_categories: Limit to categories (separate with \|\):, + rc_categories_any: Any of the chosen, rc-change-size: $1, rc-change-size-new: $1 {{PLURAL:$1|byte|bytes}} after change, newsectionsummary: /* $1 */ new section, -- To view, visit https://gerrit.wikimedia.org/r/227233 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I29bc9343e10c3d96c758379ec717c32809c653bd Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Bartosz Dziewoński matma@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove SerializationOptions ID_KEY_MODE - change (mediawiki...Wikibase)
Addshore has uploaded a new change for review. https://gerrit.wikimedia.org/r/227224 Change subject: Remove SerializationOptions ID_KEY_MODE .. Remove SerializationOptions ID_KEY_MODE This was only used in one place and this one place used the default anyway... SO it has been removed and the default is now used everywhere... Change-Id: I39cccb54b2b7bb3227aadaf70fefe365a6e4fac1 --- M client/includes/DataAccess/Scribunto/EntityAccessor.php M lib/includes/serializers/ByPropertyListSerializer.php M lib/includes/serializers/SerializationOptions.php M lib/tests/phpunit/serializers/ByPropertyListSerializerTest.php M lib/tests/phpunit/serializers/SerializationOptionsTest.php 5 files changed, 2 insertions(+), 216 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/24/227224/1 diff --git a/client/includes/DataAccess/Scribunto/EntityAccessor.php b/client/includes/DataAccess/Scribunto/EntityAccessor.php index b4b6e29..d537056 100644 --- a/client/includes/DataAccess/Scribunto/EntityAccessor.php +++ b/client/includes/DataAccess/Scribunto/EntityAccessor.php @@ -181,8 +181,6 @@ // SerializationOptions accepts mixed types of keys happily. $options-setLanguages( $languages ); - $options-setIdKeyMode( SerializationOptions::ID_KEYS_UPPER ); - return $options; } diff --git a/lib/includes/serializers/ByPropertyListSerializer.php b/lib/includes/serializers/ByPropertyListSerializer.php index 1b585d3..aa10258 100644 --- a/lib/includes/serializers/ByPropertyListSerializer.php +++ b/lib/includes/serializers/ByPropertyListSerializer.php @@ -81,17 +81,8 @@ $serializedObjects['id'] = $propertyId-getSerialization(); $serialization[] = $serializedObjects; } else { - $key = $propertyId-getSerialization(); - - if ( $this-getOptions()-shouldUseUpperCaseIdsAsKeys() ) { - $key = strtoupper( $key ); - $serialization[$key] = $serializedObjects; - } - - if ( $this-getOptions()-shouldUseLowerCaseIdsAsKeys() ) { - $key = strtolower( $key ); - $serialization[$key] = $serializedObjects; - } + $key = strtoupper( $propertyId-getSerialization() ); + $serialization[$key] = $serializedObjects; } } diff --git a/lib/includes/serializers/SerializationOptions.php b/lib/includes/serializers/SerializationOptions.php index 24383c0..43841f6 100644 --- a/lib/includes/serializers/SerializationOptions.php +++ b/lib/includes/serializers/SerializationOptions.php @@ -21,18 +21,6 @@ /** * @since 0.5 -* @const key for the entityIdKeyMode option, a bit field determining whether to use -*upper case entities IDs as keys in the serialized structure, or lower case -*IDs, or both. -*/ - const OPT_ID_KEY_MODE = 'entityIdKeyMode'; - - const ID_KEYS_UPPER = 1; - const ID_KEYS_LOWER = 2; - const ID_KEYS_BOTH = 3; - - /** -* @since 0.5 * @const key for the indexTags option, a boolean indicating whether associative or indexed *arrays should be used for output. This allows indexed mode to be forced for used *with ApiResults in XML model. @@ -82,7 +70,6 @@ public function __construct( array $options = array() ) { $this-setOptions( $options ); - $this-initOption( self::OPT_ID_KEY_MODE, self::ID_KEYS_UPPER ); $this-initOption( self::OPT_INDEX_TAGS, false ); $this-initOption( self::OPT_GROUP_BY_PROPERTIES, array( 'claims', 'qualifiers', 'references' ) ); $this-initOption( self::OPT_SERIALIZE_SNAKS_WITH_HASH, false ); @@ -287,62 +274,6 @@ */ public function shouldIndexTags() { return $this-getOption( self::OPT_INDEX_TAGS ); - } - - /** -* Returns whether lower case entities IDs should be used as keys in the serialized data structure. -* -* @see setIdKeyMode() -* -* @since 0.5 -* -* @return boolean -*/ - public function shouldUseLowerCaseIdsAsKeys() { - $idKeyMode = $this-getOption( self::OPT_ID_KEY_MODE ); - return ( $idKeyMode self::ID_KEYS_LOWER ) 0; - } - - /** -* Returns whether upper case entities IDs should be used as keys in the serialized data structure. -* -* @see
[MediaWiki-commits] [Gerrit] Improved handling when more results text is set to blank - change (mediawiki...Cargo)
Yaron Koren has uploaded a new change for review. https://gerrit.wikimedia.org/r/227228 Change subject: Improved handling when more results text is set to blank .. Improved handling when more results text is set to blank Change-Id: I5e50a86fd5965d43395f84ed76e48df1745ac059 --- M CargoQueryDisplayer.php 1 file changed, 5 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Cargo refs/changes/28/227228/1 diff --git a/CargoQueryDisplayer.php b/CargoQueryDisplayer.php index c7544fc..df9aef6 100644 --- a/CargoQueryDisplayer.php +++ b/CargoQueryDisplayer.php @@ -247,8 +247,11 @@ $vd = Title::makeTitleSafe( NS_SPECIAL, 'ViewData' ); if ( array_key_exists( 'more results text', $this-mDisplayParams ) ) { $moreResultsText = $this-mDisplayParams['more results text']; - } - else { + // If the value is blank, don't show a link at all. + if ( $moreResultsText == '' ) { + return ''; + } + } else { $moreResultsText = wfMessage( 'moredotdotdot' )-parse(); } -- To view, visit https://gerrit.wikimedia.org/r/227228 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5e50a86fd5965d43395f84ed76e48df1745ac059 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Cargo Gerrit-Branch: master Gerrit-Owner: Yaron Koren yaro...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] misc-web varnish: retab - change (operations/puppet)
BBlack has submitted this change and it was merged. Change subject: misc-web varnish: retab .. misc-web varnish: retab Let's use spaces instead of literal tabs because we do in all the puppet classes and this just means having to switch editor config back and forth. Change-Id: Iff01aa9549e0db474b3439bf238c0f58d0a0f57e --- M templates/varnish/misc.inc.vcl.erb 1 file changed, 99 insertions(+), 99 deletions(-) Approvals: BBlack: Verified; Looks good to me, approved diff --git a/templates/varnish/misc.inc.vcl.erb b/templates/varnish/misc.inc.vcl.erb index f293517..0b2a656 100644 --- a/templates/varnish/misc.inc.vcl.erb +++ b/templates/varnish/misc.inc.vcl.erb @@ -1,109 +1,109 @@ include errorpage.inc.vcl; sub vcl_recv { - if (req.http.Host == git.wikimedia.org) { - set req.backend = antimony; - // gitblit requires the following request headers: - set req.http.X-Forwarded-Proto = https; - set req.http.X-Forwarded-Port = 443; - } elsif (req.http.Host == doc.wikimedia.org || req.http.Host == integration.wikimedia.org) { - set req.backend = gallium; - } elsif (req.http.Host == download.wikimedia.org) { - set req.backend = dataset1001; - } elsif (req.http.Host == gerrit.wikimedia.org) { - set req.backend = ytterbium; - // No caching - return (pass); - } elsif (req.http.Host == gdash.wikimedia.org || req.http.Host == tessera.wikimedia.org || req.http.Host == performance.wikimedia.org || req.http.Host == graphite.wikimedia.org) { - set req.backend = graphite1001; - } elsif (req.http.Host == logstash.wikimedia.org){ - set req.backend = logstash; - } elsif (req.http.Host == releases.wikimedia.org) { - set req.backend = caesium; - } elsif (req.http.Host == grafana.wikimedia.org) { - set req.backend = zirconium; - } elsif (req.http.Host == parsoid-tests.wikimedia.org) { - set req.backend = ruthenium; - } elsif (req.http.Host == horizon.wikimedia.org) { - set req.backend = californium; - } elsif (req.http.Host == phabricator.wikimedia.org || req.http.Host == phab.wmfusercontent.org || req.http.Host == bugzilla.wikimedia.org || req.http.Host == bugs.wikimedia.org) { - set req.backend = iridium; - } elsif (req.http.Host == static-bugzilla.wikimedia.org || req.http.Host == annual.wikimedia.org || req.http.Host == transparency.wikimedia.org || req.http.Host == policy.wikimedia.org) { - set req.backend = bromine; - return (pass); - } elsif (req.http.Host == servermon.wikimedia.org) { - set req.backend = netmon1001; - } elsif (req.http.Host == people.wikimedia.org) { - set req.backend = terbium; - // No caching of public_html dirs - return (pass); - } elsif (req.http.Host == ishmael.wikimedia.org) { - set req.backend = neon; - } elsif (req.http.Host == racktables.wikimedia.org || req.http.Host == rt.wikimedia.org) { - set req.backend = magnesium; - } elsif (req.http.Host == metrics.wikimedia.org || req.http.Host == stats.wikimedia.org) { - set req.backend = stat1001; - } elsif (req.http.Host == datasets.wikimedia.org) { - set req.backend = stat1001; - // No caching of datasets. They can be larger than misc varnish can deal with. - return (pass); - } elsif (req.http.Host == config-master.wikimedia.org) { - set req.backend = palladium; - // No caching of configs; scripts may want to know when things change - return (pass); - } elsif (req.http.Host == noc.wikimedia.org || req.http.Host == dbtree.wikimedia.org) { - set req.backend = terbium; - } elsif (req.http.Host == scholarships.wikimedia.org || req.http.Host == iegreview.wikimedia.org) { - set req.backend = krypton; - } elsif (req.http.Host == hue.wikimedia.org) { - // make sure all requests to Hue are via https proxy - if (req.http.X-Forwarded-Proto != https) { - set req.http.Location = https://; + req.http.Host + req.url; - // Use a custom 755 error code to indicate internally - // that we are forcing a 301 redirect to https. - error 755 TLS Redirect; - } - else { - set req.backend = analytics1027; - } - } - elsif (req.http.Host == yarn.wikimedia.org) { - // make sure all requests to Yarn ResourceManager UI are via https proxy - if (req.http.X-Forwarded-Proto != https) { -
[MediaWiki-commits] [Gerrit] Reduce the code duplication in applyTranslationTemplate method - change (mediawiki...ContentTranslation)
jenkins-bot has submitted this change and it was merged. Change subject: Reduce the code duplication in applyTranslationTemplate method .. Reduce the code duplication in applyTranslationTemplate method Change-Id: If38aa7cf381cb72a136a038724d29bf38e7b6fd4 --- M modules/translation/ext.cx.translation.js 1 file changed, 11 insertions(+), 23 deletions(-) Approvals: Amire80: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/translation/ext.cx.translation.js b/modules/translation/ext.cx.translation.js index f7081ea..41e5247 100644 --- a/modules/translation/ext.cx.translation.js +++ b/modules/translation/ext.cx.translation.js @@ -265,39 +265,27 @@ 'data-cx-state': 'source' } ); - if ( origin === 'mt-user-disabled' ) { + if ( origin === 'mt-user-disabled' || origin === 'clear' ) { $clone.attr( 'data-cx-state', 'empty' ); - if ( $sourceSection.prop( 'tagName' ) === 'FIGURE' ) { - // Clear figure caption alone. - $clone.find( 'figcaption' ).empty(); + if ( $sourceSection.is( 'figure' ) ) { + if ( origin === 'clear' ) { + // When clearing figures, replace it with placeholder. + $clone = getPlaceholder( sourceId ).attr( 'data-cx-section-type', 'figure' ); + } else { + // Clear figure caption alone. + $clone.find( 'figcaption' ).empty(); + } } else if ( $sourceSection.is( 'ul, ol' ) ) { - $clone = $sourceSection.clone(); // Explicit contenteditable attribute helps to place the cursor - // in empty UL. + // in empty ul or ol. $clone.prop( 'contenteditable', true ).find( 'li' ).empty(); } else { $clone.empty(); } } - - if ( origin === 'clear' ) { - $clone.attr( 'data-cx-state', 'empty' ); - if ( $sourceSection.prop( 'tagName' ) === 'FIGURE' ) { - // When clearing figures, replace it with placeholder. - $clone = getPlaceholder( sourceId ) - .attr( 'data-cx-section-type', $sourceSection.prop( 'tagName' ) ); - } else if ( $sourceSection.is( 'ul, ol' ) ) { - $clone = $sourceSection.clone(); - // Explicit contenteditable attribute helps to place the cursor - // in empty UL. - $clone.prop( 'contenteditable', true ).find( 'li' ).empty(); - } else { - $clone.empty(); - } - } // else: service-failure, non-editable, mt-not-available + // else: service-failure, non-editable, mt-not-available // Replace the placeholder with a translatable element $section.replaceWith( $clone ); - // $section was replaced. Get the updated instance. $section = mw.cx.getTranslationSection( sourceId ); mw.hook( 'mw.cx.translation.postMT' ).fire( $section ); -- To view, visit https://gerrit.wikimedia.org/r/227203 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If38aa7cf381cb72a136a038724d29bf38e7b6fd4 Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com Gerrit-Reviewer: Amire80 amir.ahar...@mail.huji.ac.il Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Set $wgCategoryCollation to 'uca-default' on cswiktionary - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: Set $wgCategoryCollation to 'uca-default' on cswiktionary .. Set $wgCategoryCollation to 'uca-default' on cswiktionary Please run updateCollation.php Bug: T106337 Change-Id: I70134cdcbcbd20583ab449515b73831dbdf428d1 --- M wmf-config/InitialiseSettings.php 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Thcipriani: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 3dd01b4..2ca724a 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -12739,6 +12739,7 @@ 'bewikisource' = 'uca-be', // T48004 'ckbwiki' = 'xx-uca-ckb', // T57630 'cswiki' = 'uca-cs', // T66885 + 'cswiktionary' = 'uca-default', // T106337 'cywiki' = 'uca-cy', // T61800 'cywikibooks' = 'uca-cy', // T61800 'cywikiquote' = 'uca-cy', // T61800 -- To view, visit https://gerrit.wikimedia.org/r/226483 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I70134cdcbcbd20583ab449515b73831dbdf428d1 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Glaisher glaisher.w...@gmail.com Gerrit-Reviewer: Thcipriani tcipri...@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 Quiz extension at French Wikibooks - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: Enable Quiz extension at French Wikibooks .. Enable Quiz extension at French Wikibooks Bug: T103263 Change-Id: I77ea3109c9cb047aa82ce38c09030a762a1c659f --- M wmf-config/InitialiseSettings.php 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Thcipriani: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 3a8ca35..3119aa9 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -10436,6 +10436,7 @@ 'dewikibooks' = true, 'enwikibooks' = true, 'enwikinews' = true, + 'frwikibooks' = true, // T103263 'frwiktionary' = true, 'hiwiki' = true, 'iswikibooks' = true, -- To view, visit https://gerrit.wikimedia.org/r/225021 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I77ea3109c9cb047aa82ce38c09030a762a1c659f Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Glaisher glaisher.w...@gmail.com Gerrit-Reviewer: Alex Monk kren...@gmail.com Gerrit-Reviewer: Glaisher glaisher.w...@gmail.com Gerrit-Reviewer: Thcipriani tcipri...@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] Decolonize 'viewsourcetext' and 'viewyourtext' messages - change (mediawiki/core)
Bartosz Dziewoński has uploaded a new change for review. https://gerrit.wikimedia.org/r/227231 Change subject: Decolonize 'viewsourcetext' and 'viewyourtext' messages .. Decolonize 'viewsourcetext' and 'viewyourtext' messages I think it reads better. A number of translations for this message also use a full stop instead of the colon. Change-Id: Ie39657f8308123bb14584cf18cf75e489683eca8 --- M languages/i18n/en.json 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/31/227231/1 diff --git a/languages/i18n/en.json b/languages/i18n/en.json index 97f1310..e9f7d8b 100644 --- a/languages/i18n/en.json +++ b/languages/i18n/en.json @@ -357,8 +357,8 @@ actionthrottled: Action throttled, actionthrottledtext: As an anti-spam measure, you are limited from performing this action too many times in a short space of time, and you have exceeded this limit.\nPlease try again in a few minutes., protectedpagetext: This page has been protected to prevent editing or other actions., - viewsourcetext: You can view and copy the source of this page:, - viewyourtext: You can view and copy the source of strongyour edits/strong to this page:, + viewsourcetext: You can view and copy the source of this page., + viewyourtext: You can view and copy the source of strongyour edits/strong to this page., protectedinterface: This page provides interface text for the software on this wiki, and is protected to prevent abuse.\nTo add or change translations for all wikis, please use [//translatewiki.net/ translatewiki.net], the MediaWiki localisation project., editinginterface: strongWarning:/strong You are editing a page that is used to provide interface text for the software.\nChanges to this page will affect the appearance of the user interface for other users on this wiki., translateinterface: To add or change translations for all wikis, please use [//translatewiki.net/ translatewiki.net], the MediaWiki localisation project., -- To view, visit https://gerrit.wikimedia.org/r/227231 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie39657f8308123bb14584cf18cf75e489683eca8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Bartosz Dziewoński matma@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] (WIP) Unfix suite ?? (WIP) - change (mediawiki/core)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/227232 Change subject: (WIP) Unfix suite ?? (WIP) .. (WIP) Unfix suite ?? (WIP) Change-Id: I5a59d69c96273725c2d4ca78d5e1b7303dd5cbf2 --- M tests/phpunit/suites/LessTestSuite.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/32/227232/1 diff --git a/tests/phpunit/suites/LessTestSuite.php b/tests/phpunit/suites/LessTestSuite.php index 26a784a..cb99b13 100644 --- a/tests/phpunit/suites/LessTestSuite.php +++ b/tests/phpunit/suites/LessTestSuite.php @@ -29,6 +29,6 @@ } public static function suite() { - return new static; + return new self; } } -- To view, visit https://gerrit.wikimedia.org/r/227232 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5a59d69c96273725c2d4ca78d5e1b7303dd5cbf2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Hashar has...@free.fr ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Literal strings can now be selected again - change (mediawiki...Cargo)
Yaron Koren has submitted this change and it was merged. Change subject: Literal strings can now be selected again .. Literal strings can now be selected again Change-Id: Iacd32c2b9957177bc43f608524e288a8a99669d0 --- M CargoSQLQuery.php 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Yaron Koren: Checked; Looks good to me, approved diff --git a/CargoSQLQuery.php b/CargoSQLQuery.php index 5b1820c..8c1b050 100644 --- a/CargoSQLQuery.php +++ b/CargoSQLQuery.php @@ -390,6 +390,8 @@ array( 'DATE', 'DATE_FORMAT', 'DATE_ADD', 'DATE_SUB', 'DATE_DIFF' ) ) ) { $description-mType = 'Date'; } + } elseif ( preg_match( /^'.*'$/m, $fieldName ) ) { + // It's a quoted, literal string - do nothing. } else { // It's a standard field - though if it's // '_value', or ends in '__full', it's actually -- To view, visit https://gerrit.wikimedia.org/r/227229 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iacd32c2b9957177bc43f608524e288a8a99669d0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Cargo Gerrit-Branch: master Gerrit-Owner: Yaron Koren yaro...@gmail.com Gerrit-Reviewer: Yaron Koren yaro...@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] New Wikidata Build - 2015-07-27T10:00:01+0000 - change (mediawiki...Wikidata)
jenkins-bot has submitted this change and it was merged. Change subject: New Wikidata Build - 2015-07-27T10:00:01+ .. New Wikidata Build - 2015-07-27T10:00:01+ Change-Id: Idde29fab3200875b9231cb38e897379df9cc85fe --- M composer.lock M extensions/Wikibase/client/i18n/dty.json M extensions/Wikibase/client/i18n/ne.json M extensions/Wikibase/client/i18n/sr-ec.json M extensions/Wikibase/client/i18n/sr-el.json M extensions/Wikibase/lib/i18n/luz.json M extensions/Wikibase/repo/i18n/luz.json M vendor/composer/installed.json 8 files changed, 34 insertions(+), 25 deletions(-) Approvals: Tobias Gritschacher: Looks good to me, approved jenkins-bot: Verified diff --git a/composer.lock b/composer.lock index 74e3725..3a8ddcf 100644 --- a/composer.lock +++ b/composer.lock @@ -1326,12 +1326,12 @@ source: { type: git, url: https://github.com/wikimedia/mediawiki-extensions-Wikibase.git;, -reference: 738d73d1c9adff9ef8a1255760f8cd11d7a6792f +reference: 7d80a60c43ad630fa2339e30631ab9d1b41204e2 }, dist: { type: zip, -url: https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/738d73d1c9adff9ef8a1255760f8cd11d7a6792f;, -reference: 738d73d1c9adff9ef8a1255760f8cd11d7a6792f, +url: https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/7d80a60c43ad630fa2339e30631ab9d1b41204e2;, +reference: 7d80a60c43ad630fa2339e30631ab9d1b41204e2, shasum: }, require: { @@ -1399,7 +1399,7 @@ wikibaserepo, wikidata ], -time: 2015-07-25 19:58:48 +time: 2015-07-26 19:42:34 }, { name: wikibase/wikimedia-badges, diff --git a/extensions/Wikibase/client/i18n/dty.json b/extensions/Wikibase/client/i18n/dty.json index 4d246ba..56eb738 100644 --- a/extensions/Wikibase/client/i18n/dty.json +++ b/extensions/Wikibase/client/i18n/dty.json @@ -10,11 +10,16 @@ wikibase-dataitem: {{WBREPONAME}} प्रकार, wikibase-editlinks: लिंक सम्पादन अरिदिय, wikibase-editlinkstitle: अन्तरभाषिक लिङ्क सम्पादन गरिदिय, + wikibase-linkitem-alreadylinked: जो पानो तमी जोड्ड चाहन्छौ त्यो पहिली बठे नै केन्द्रीय डाटा रिपोजिटरी को [$1 आइटम] सँग जोडियाको छ जो लिङ्क $2 सँग जोडियाको छ । आइटममी एउटा लिङ्क एउटा पानासँग मात्र जोड्ड सकिन्छ । कृपया कुनै अन्य पानालाई जोड्डका लागि छान ।, wikibase-linkitem-selectlink: यै पानासँग लिङ्क गद्दाका निउती कृपया तम साइट पानो छान ।, + wikibase-linkitem-confirmitem-text: जो पानो तमीले छान्या छौ त्यो [$1 केन्द्रीय डाटा रिपोजिटरी] सँग पहिला नै जोडी सकियाको छ । कृपया सुनिश्चित गर यहाँ देखाइयाको {{PLURAL:$2|page|पानो}} त्यही हो जो तमी {{PLURAL:$2|is|यै}} पानासँग {{PLURAL:$2|one|जोड्ड}} चाहन्छौ।, + wikibase-linkitem-not-loggedin: यो सुविधाको उपयोग गद्दका निउती तमी यो विकि तथा [$1 केन्द्रीय डाटा रिपोजिटरी] मी लगइन गद्दु आवश्यक छ ।, + wikibase-linkitem-success-link: पानो सफलतापूर्वक जोडियो । तमी लिङ्क जोडियाको आइटम आफ्नो [$1 केन्द्रीय डाटा रिपोजिटरी] मी खोज्द सक्द्याहौ ।, wikibase-rc-hide-wikidata: $1 {{WBREPONAME}}, wikibase-rc-hide-wikidata-hide: लुकाइदिय, wikibase-rc-hide-wikidata-show: धेकाइदिय, wikibase-rc-wikibase-edit-letter: डि, wikibase-rc-wikibase-edit-title: {{WBREPONAME}} सम्पादन, + wikibase-watchlist-show-changes-pref: तमी आफ्नो ध्यानसूचीमी {{WBREPONAME}} सम्पादन धेकाओ, wikibase-otherprojects: और प्रोजेक्टहरू } diff --git a/extensions/Wikibase/client/i18n/ne.json b/extensions/Wikibase/client/i18n/ne.json index 6f8c144..fba8a3a 100644 --- a/extensions/Wikibase/client/i18n/ne.json +++ b/extensions/Wikibase/client/i18n/ne.json @@ -22,7 +22,7 @@ wikibase-editlinkstitle: अन्तरभाषिक लिङ्क सम्पादन गर्नुहोस्, wikibase-addlinkstitle: अन्तरभाषिक लिङ्क जोड्नुहोस्, wikibase-linkitem-addlinks: लिङ्क थप्नुहोस, - wikibase-linkitem-alreadylinked: जुन पृष्ठ तपाई जोड्न चाहनुहुन्छ त्यो पहिला देखि नै केन्द्रीय डाटा रिपोजिटरी को [$1 आइटम] सँग जोडिएको छ जुन लिङ्क $2 सँग जोडिएको छ। आइटममा एउटा लिङ्क एउटा पृष्ठ सँग मात्र जोड्न सकिन्छ। कृपया कुनै अन्य पृष्ठलाई जोड्नका लागि छान्नुहोला।, + wikibase-linkitem-alreadylinked: जुन पृष्ठ तपाईं जोड्न चाहनुहुन्छ त्यो पहिला देखि नै केन्द्रीय डाटा रिपोजिटरी को [$1 आइटम] सँग जोडिएको छ जुन लिङ्क $2 सँग जोडिएको छ । आइटममा एउटा लिङ्क एउटा पृष्ठ सँग मात्र जोड्न सकिन्छ । कृपया कुनै अन्य पृष्ठलाई जोड्नका लागि छान्नुहोला ।, wikibase-linkitem-close: संवाद बन्द गर्नुहोस् र पृष्ठ पुन: लोड गर्नुहोस्, wikibase-linkitem-failure: दिइएको पृष्ठलाई जोड्न लाग्दा अज्ञात त्रुटी उत्पन्न भयो।, wikibase-linkitem-title: पृष्ठसँग लिङ्क गर्नुहोस्, @@ -30,11 +30,11 @@ wikibase-linkitem-selectlink: यस पृष्ठसँग लिङ्क
[MediaWiki-commits] [Gerrit] Throttle mediawiki core jobs to one per node - change (integration/config)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/227234 Change subject: Throttle mediawiki core jobs to one per node .. Throttle mediawiki core jobs to one per node Limit mediawiki job to one per node to prevent filling the slave disks. At worth that limits the Zend jobs to 4 concurrent builds (the number of Precise slaves we have). Change-Id: Iad6af55baba50fe83cc6a12df0f3b2d8e3a7df85 --- M jjb/mediawiki.yaml 1 file changed, 16 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/34/227234/1 diff --git a/jjb/mediawiki.yaml b/jjb/mediawiki.yaml index 8f095cc..6305935 100644 --- a/jjb/mediawiki.yaml +++ b/jjb/mediawiki.yaml @@ -9,6 +9,8 @@ node: contintLabsSlave UbuntuTrusty defaults: use-remote-zuul-no-submodules concurrent: true +properties: + - throttle-one-per-node logrotate: daysToKeep: 15 triggers: @@ -21,6 +23,8 @@ name: 'mediawiki-core-qunit' node: contintLabsSlave UbuntuTrusty concurrent: true +properties: + - throttle-one-per-node logrotate: daysToKeep: 15 triggers: @@ -43,6 +47,8 @@ node: contintLabsSlave UbuntuTrusty defaults: use-remote-zuul-no-submodules concurrent: true +properties: + - throttle-one-per-node logrotate: daysToKeep: 15 triggers: @@ -120,6 +126,8 @@ # matching the expression. node: 'contintLabsSlave (UbuntuPrecise phpflavor-zend phpflavor-{phpflavor}) || (UbuntuTrusty phpflavor-hhvm phpflavor-{phpflavor})' concurrent: true +properties: + - throttle-one-per-node triggers: - zuul builders: @@ -145,6 +153,8 @@ name: 'mediawiki-phpunit-{phpflavor}-composer' node: 'contintLabsSlave (UbuntuPrecise phpflavor-zend phpflavor-{phpflavor}) || (UbuntuTrusty phpflavor-hhvm phpflavor-{phpflavor})' concurrent: true +properties: + - throttle-one-per-node triggers: - zuul builders: @@ -194,9 +204,10 @@ name: 'mediawiki-extensions-{phpflavor}' node: 'contintLabsSlave (UbuntuPrecise phpflavor-zend phpflavor-{phpflavor}) || (UbuntuTrusty phpflavor-hhvm phpflavor-{phpflavor})' concurrent: true +properties: + - throttle-one-per-node logrotate: daysToKeep: 15 - triggers: - zuul builders: @@ -226,6 +237,8 @@ name: 'mediawiki-extensions-qunit' node: contintLabsSlave UbuntuTrusty concurrent: true +properties: + - throttle-one-per-node logrotate: daysToKeep: 15 @@ -257,6 +270,8 @@ name: 'integration-phpunit-mediawiki-{mwbranch}' node: contintLabsSlave UbuntuPrecise # Zend PHP 5.3.x concurrent: true +properties: + - throttle-one-per-node triggers: - zuul builders: -- To view, visit https://gerrit.wikimedia.org/r/227234 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iad6af55baba50fe83cc6a12df0f3b2d8e3a7df85 Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Hashar has...@free.fr ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] 'recheck' on CR+2 now triggers gate-and-submit - change (integration/config)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/227223 Change subject: 'recheck' on CR+2 now triggers gate-and-submit .. 'recheck' on CR+2 now triggers gate-and-submit Does not work yet because the other pipelines should filter out the change. Require our Zuul version to be bumped and include: https://review.openstack.org/#/c/102726/26/doc/source/zuul.rst Will let us have negative condition on the independent pipelines such as: any-approval: code-review: '![2]' Bug: T105474 Change-Id: Ifc3d0478ad2487b996c4c08d0dbb84b47ac3e9ae --- M tests/test_zuul_layout.py M zuul/layout.yaml 2 files changed, 33 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/23/227223/1 diff --git a/tests/test_zuul_layout.py b/tests/test_zuul_layout.py index f45cc72..797d1bf 100644 --- a/tests/test_zuul_layout.py +++ b/tests/test_zuul_layout.py @@ -336,6 +336,35 @@ event.account = {'email': 'untrus...@example.org'} self.assertFalse(test_manager.eventMatches(event, change)) +def test_recheck_on_approved_change_triggers_gate(self): +gate_manager = self.getPipeline('gate-and-submit').manager + +change = zuul.model.Change('mediawiki/core') +change.approvals = [{'type': 'Code-Review', + 'description': 'Code Review', + 'value': '2', + 'by': {'email': 'some...@wikimedia.org'}, + }] + +event = zuul.model.TriggerEvent() +event.type = 'comment-added' +event.comment = 'Patch Set 1:\n\nrecheck' + +self.assertTrue(gate_manager.eventMatches(event, change), +gate-and-submit pipeline must process 'recheck' +on CR+2) + +indep_pipelines = [p for p in self.getPipelines() + if p.manager.__class__.__name__ == + 'IndependentPipelineManager'] +self.assertGreater(len(indep_pipelines), 0) + +for pipeline in indep_pipelines: +# XXX need to bump our Zuul version to supports negative filters +self.assertFalse(pipeline.manager.eventMatches(event, change), + Independent pipeline %s must not process + 'recheck' on CR+2 % pipeline.name) + def test_pipelines_trustiness(self): check_manager = self.getPipeline('check').manager test_manager = self.getPipeline('test').manager diff --git a/zuul/layout.yaml b/zuul/layout.yaml index cdc2fae..79d5922 100644 --- a/zuul/layout.yaml +++ b/zuul/layout.yaml @@ -447,6 +447,10 @@ - ^(?!l10n-bot@translatewiki\.net).*$ approval: - code-review: 2 +- event: comment-added + comment_filter: (?im)^Patch Set \d+:\n\n\s*recheck\.?\s*$ + require-approval: +- code-review: 2 start: gerrit: verified: 0 -- To view, visit https://gerrit.wikimedia.org/r/227223 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifc3d0478ad2487b996c4c08d0dbb84b47ac3e9ae Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Hashar has...@free.fr ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] switch zerofetcher auth to secret() - change (operations/puppet)
BBlack has uploaded a new change for review. https://gerrit.wikimedia.org/r/227226 Change subject: switch zerofetcher auth to secret() .. switch zerofetcher auth to secret() Change-Id: Ib4d9d5ce230b0136fa4a95130bacc6ff355683df --- M modules/role/manifests/cache/mobile.pp M modules/varnish/manifests/zero_update.pp 2 files changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/26/227226/1 diff --git a/modules/role/manifests/cache/mobile.pp b/modules/role/manifests/cache/mobile.pp index 6f24b15..eda4858 100644 --- a/modules/role/manifests/cache/mobile.pp +++ b/modules/role/manifests/cache/mobile.pp @@ -64,8 +64,8 @@ } class { 'varnish::zero_update': -site = $zero_site, -auth_src = 'puppet:///private/misc/zerofetcher.auth', +site = $zero_site, +auth_content = secret('misc/zerofetcher.auth'), } $runtime_param = $::site ? { diff --git a/modules/varnish/manifests/zero_update.pp b/modules/varnish/manifests/zero_update.pp index bc4b6b7..f5b4f14 100644 --- a/modules/varnish/manifests/zero_update.pp +++ b/modules/varnish/manifests/zero_update.pp @@ -23,7 +23,7 @@ } # Zero-specific update stuff -class varnish::zero_update($site, $auth_src, $hour = '*', $minute = '*/5') { +class varnish::zero_update($site, $auth_content, $hour = '*', $minute = '*/5') { require 'varnish::netmapper_update_common' package { 'python-requests': ensure = installed; } @@ -47,7 +47,7 @@ owner = 'netmap', group = 'netmap', mode= '0400', -source = $auth_src, +content = $auth_content, require = [File[/etc/zerofetcher]], } -- To view, visit https://gerrit.wikimedia.org/r/227226 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib4d9d5ce230b0136fa4a95130bacc6ff355683df Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BBlack bbl...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] switch nagios private contacts to secret() - change (operations/puppet)
BBlack has uploaded a new change for review. https://gerrit.wikimedia.org/r/227227 Change subject: switch nagios private contacts to secret() .. switch nagios private contacts to secret() Change-Id: I5a5e88d341230907b9082a2da809ce9cb16d2f4c --- M modules/icinga/manifests/init.pp M modules/nagios_common/manifests/contacts.pp 2 files changed, 10 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/27/227227/1 diff --git a/modules/icinga/manifests/init.pp b/modules/icinga/manifests/init.pp index 9c41169..34a4e7c 100644 --- a/modules/icinga/manifests/init.pp +++ b/modules/icinga/manifests/init.pp @@ -78,7 +78,7 @@ } class { 'nagios_common::contacts': -source = 'puppet:///private/nagios/contacts.cfg', +content = secret('nagios/contacts.cfg'), require = Package['icinga'], notify = Service['icinga'], } diff --git a/modules/nagios_common/manifests/contacts.pp b/modules/nagios_common/manifests/contacts.pp index 573ed43..aa78141 100644 --- a/modules/nagios_common/manifests/contacts.pp +++ b/modules/nagios_common/manifests/contacts.pp @@ -10,12 +10,6 @@ # The base directory to put configuration directory in. # Defaults to '/etc/icinga/' # -# [*source*] -# Optional - allows to input a prewritten file as a source. -# [*template*] -# puppet URL specifying the template of the contacts.cfg file -# Defaults to 'nagios_common/contacts.cfg.erb' -# # [*owner*] # The user which should own the check config files. # Defaults to 'icinga' @@ -27,11 +21,18 @@ # [*contacts*] # The list of contacts to include in the configuration. # +# [*source*] +# Allows to input a prewritten file as a source. Overrides content if +# defined, but content is used if this is undefined. +# [*content*] +# Allows to input the data as a content string. The default is +# template('nagios_common/contacts.cfg.erb') +# class nagios_common::contacts( $ensure = present, $config_dir = '/etc/icinga', $source = undef, -$template = 'nagios_common/contacts.cfg.erb', +$content = template('nagios_common/contacts.cfg.erb'), $owner = 'icinga', $group = 'icinga', $contacts = [], @@ -47,7 +48,7 @@ } else { file { ${config_dir}/contacts.cfg: ensure = $ensure, -content = template($template), +content = $content, owner = $owner, group = $group, mode= '0600', # Only $owner:$group can read/write -- To view, visit https://gerrit.wikimedia.org/r/227227 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5a5e88d341230907b9082a2da809ce9cb16d2f4c Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BBlack bbl...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add global default report fields - change (analytics/wikimetrics)
Madhuvishy has submitted this change and it was merged. Change subject: Add global default report fields .. Add global default report fields Test plan: * select metric - see local default * set global default, select metric, see global default * select metric, set global default, see change * set global default, select metric, change metric input, doesn't revert * change timezone, no change is visible but underlying dates change Bug: T74117 Change-Id: Ieaf162fe3695a7467bd42ed09ef47c464ae29490 --- M wikimetrics/static/js/knockout.util.js M wikimetrics/static/js/reportCreate.js M wikimetrics/templates/forms/metric_configuration.html M wikimetrics/templates/report.html 4 files changed, 406 insertions(+), 136 deletions(-) Approvals: Madhuvishy: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/wikimetrics/static/js/knockout.util.js b/wikimetrics/static/js/knockout.util.js index 640cccb..2a11195 100644 --- a/wikimetrics/static/js/knockout.util.js +++ b/wikimetrics/static/js/knockout.util.js @@ -1,38 +1,93 @@ +'use strict'; /** * Custom binding that is used as follows: - * `section data-bind=metricConfigurationForm: property/section` - * And works as follows: - * In the example above, property is a ko.observable or plain property that evaluates to some HTML which - * should be rendered inside the section/section - * The binding then sets the context for the section's child elements as the same as the current context + * + * `section data-bind=metricConfigurationForm: { + * content: property, + * defaults: defaults + * }/section` + * + * Parameters + * content : is a ko.observable or plain property that evaluates to some HTML + * which should be rendered inside the section/section + * + * defaults : a set of observables that may control the value of the + * input elements inside the configuration HTML + * + * This binding passes the current context to the child elements */ ko.bindingHandlers.metricConfigurationForm = { -init: function(element, valueAccessor, allBindingsAccessor, viewModel, bindingContext){ +init: function(){ return { controlsDescendantBindings: true }; }, update: function(element, valueAccessor, allBindingsAccessor, viewModel, bindingContext){ -var unwrapped, childContext; -unwrapped = ko.utils.unwrapObservable(valueAccessor()); -if (unwrapped != null) { -$(unwrapped).find(':input').each(function(){ +var unwrapped = ko.unwrap(valueAccessor()), +content = ko.unwrap(unwrapped.content), +// must be careful when accessing defaults below, we don't want to re-create the form +defaults = unwrapped.defaults, +childContext = bindingContext.createChildContext(bindingContext.$data); + +if (content) { +bindingContext.subscriptions = []; + +$(content).find(':input,div.datetimepicker').each(function(){ var value = ''; var name = $(this).attr('name'); if (!name) { return; } - -if ($(this).is('[type=checkbox]')){ + +if (defaults[name] defaults[name].peek() != null) { +value = ( +defaults[name].localDate ? +defaults[name].localDate : +defaults[name] +).peek(); +} else if ($(this).is('[type=checkbox]')){ value = $(this).is(':checked'); +// support date time picker containers that don't have an input +} else if ($(this).is('.datetimepicker')) { +value = $(this).data('value'); } else { value = $(this).val(); } -bindingContext.$data[name] = ko.observable(value); +var inputObservable = ko.observable(value); +bindingContext.$data[name] = inputObservable; + +// set up subscriptions to the defaults +// This is important to do as subscriptions, otherwise the binding will +// think there's a dependency on defaults and run update each time a default is set, +if (defaults[name]) { +bindingContext.subscriptions.push( +defaults[name].subscribe(function(val){ +inputObservable(val); +}) +); +} }); -$(element).html(unwrapped); -childContext = bindingContext.createChildContext(bindingContext.$data); + +$(element).html(content); ko.applyBindingsToDescendants(childContext, element); + +} else { +
[MediaWiki-commits] [Gerrit] Enable EducationProgram extension at French Wikisource - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: Enable EducationProgram extension at French Wikisource .. Enable EducationProgram extension at French Wikisource Needs DB changes as well. Bug: T105853 Change-Id: I0141b61f0eef2f7f3a59b95380b54f5f4df0902a --- M wmf-config/InitialiseSettings.php 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Thcipriani: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 3a8ca35..27551d5 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -14251,6 +14251,7 @@ 'enwikinews' = true, // T55984 'eswiki' = true, // T56826 'fawiki' = true, + 'frwikisource' = true, // T105853 'hewiki' = true, // T50848 'hewiktionary' = true, // T89393 'legalteamwiki' = true, // T64610 -- To view, visit https://gerrit.wikimedia.org/r/225019 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0141b61f0eef2f7f3a59b95380b54f5f4df0902a Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Glaisher glaisher.w...@gmail.com Gerrit-Reviewer: Alex Monk kren...@gmail.com Gerrit-Reviewer: Glaisher glaisher.w...@gmail.com Gerrit-Reviewer: Thcipriani tcipri...@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 placing cursor inside empty list when translating from... - change (mediawiki...ContentTranslation)
jenkins-bot has submitted this change and it was merged. Change subject: Allow placing cursor inside empty list when translating from scratch .. Allow placing cursor inside empty list when translating from scratch Testplan: Translate any page with list. Translate such a section, clear it using Clear paragraph, try typing to the list items. You should be able to type there. Alternatively, try language pairs with different directionality or choose 'Disable machine translation' There is some code duplication in the place the fix was made. Deferred to another commit. Bug: T103504 Change-Id: I52a26d67aef2e8e248565fb7f8ccc3b0b36d6571 --- M modules/translation/ext.cx.translation.js 1 file changed, 10 insertions(+), 0 deletions(-) Approvals: Amire80: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/translation/ext.cx.translation.js b/modules/translation/ext.cx.translation.js index 45ffb35..f7081ea 100644 --- a/modules/translation/ext.cx.translation.js +++ b/modules/translation/ext.cx.translation.js @@ -270,6 +270,11 @@ if ( $sourceSection.prop( 'tagName' ) === 'FIGURE' ) { // Clear figure caption alone. $clone.find( 'figcaption' ).empty(); + } else if ( $sourceSection.is( 'ul, ol' ) ) { + $clone = $sourceSection.clone(); + // Explicit contenteditable attribute helps to place the cursor + // in empty UL. + $clone.prop( 'contenteditable', true ).find( 'li' ).empty(); } else { $clone.empty(); } @@ -281,6 +286,11 @@ // When clearing figures, replace it with placeholder. $clone = getPlaceholder( sourceId ) .attr( 'data-cx-section-type', $sourceSection.prop( 'tagName' ) ); + } else if ( $sourceSection.is( 'ul, ol' ) ) { + $clone = $sourceSection.clone(); + // Explicit contenteditable attribute helps to place the cursor + // in empty UL. + $clone.prop( 'contenteditable', true ).find( 'li' ).empty(); } else { $clone.empty(); } -- To view, visit https://gerrit.wikimedia.org/r/227196 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I52a26d67aef2e8e248565fb7f8ccc3b0b36d6571 Gerrit-PatchSet: 5 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com Gerrit-Reviewer: Amire80 amir.ahar...@mail.huji.ac.il Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] DO NOT MERGE YET: DNS changes for logstash1001 and logstash1003 - change (operations/dns)
Cmjohnson has submitted this change and it was merged. Change subject: DO NOT MERGE YET: DNS changes for logstash1001 and logstash1003 .. DO NOT MERGE YET: DNS changes for logstash1001 and logstash1003 Change-Id: I22b50856866c47a706ad4147969cfb50ac3c6a2e --- M templates/10.in-addr.arpa M templates/wmnet 2 files changed, 4 insertions(+), 4 deletions(-) Approvals: Cmjohnson: Looks good to me, approved jenkins-bot: Verified diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa index dbfa327..74dee14 100644 --- a/templates/10.in-addr.arpa +++ b/templates/10.in-addr.arpa @@ -336,6 +336,7 @@ 113 1H IN PTR elastic1006.eqiad.wmnet. 120 1H IN PTR snapshot1001.eqiad.wmnet. 121 1H IN PTR snapshot1002.eqiad.wmnet. +122 1H IN PTR logstash1001.eqiad.wmnet. 162 1H IN PTR logstash1004.eqiad.wmnet. @@ -780,9 +781,7 @@ 133 1H IN PTR cp1056.eqiad.wmnet. 134 1H IN PTR cp1057.eqiad.wmnet. 135 1H IN PTR erbium.eqiad.wmnet. -136 1H IN PTR logstash1003.eqiad.wmnet. 137 1H IN PTR logstash1002.eqiad.wmnet. -138 1H IN PTR logstash1001.eqiad.wmnet. 139 1H IN PTR elastic1007.eqiad.wmnet. 140 1H IN PTR elastic1008.eqiad.wmnet. 141 1H IN PTR elastic1009.eqiad.wmnet. @@ -1027,6 +1026,7 @@ 110 1H IN PTR restbase1009.eqiad.wmnet. 111 1H IN PTR conf1003.eqiad.wmnet. 112 1H IN PTR wdqs1001.eqiad.wmnet. +113 1H IN PTR logstash1003.eqiad.wmnet. $ORIGIN 49.64.{{ zonename }}. 1 1H IN PTR vl1020-eth3.lvs1001.wikimedia.org. diff --git a/templates/wmnet b/templates/wmnet index 6fe924a..24e9a12 100644 --- a/templates/wmnet +++ b/templates/wmnet @@ -737,9 +737,9 @@ tin 1H IN 2620:0:861:101:10:64:0:196 terbium 1H IN A10.64.32.13 lithium 1H IN A10.64.32.154 -logstash10011H IN A10.64.32.138 +logstash10011H IN A10.64.0.122 logstash10021H IN A10.64.32.137 -logstash10031H IN A10.64.32.136 +logstash10031H IN A10.64.48.113 logstash10041H IN A10.64.0.162 logstash10051H IN A10.64.16.185 logstash10061H IN A10.64.48.109 -- To view, visit https://gerrit.wikimedia.org/r/226722 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I22b50856866c47a706ad4147969cfb50ac3c6a2e Gerrit-PatchSet: 2 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: Cmjohnson cmjohn...@wikimedia.org Gerrit-Reviewer: Cmjohnson cmjohn...@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] Added handling of quotes, backslashes to CargoUtils::smartPa... - change (mediawiki...Cargo)
Yaron Koren has submitted this change and it was merged. Change subject: Added handling of quotes, backslashes to CargoUtils::smartParse() .. Added handling of quotes, backslashes to CargoUtils::smartParse() Change-Id: Ia094cd41984f9d1aaf82e2e66851fefa206d493c --- M CargoUtils.php 1 file changed, 29 insertions(+), 2 deletions(-) Approvals: Yaron Koren: Verified; Looks good to me, approved diff --git a/CargoUtils.php b/CargoUtils.php index 2a2293d..3966fe5 100644 --- a/CargoUtils.php +++ b/CargoUtils.php @@ -186,19 +186,46 @@ return array(); } + $ignoreNextChar = false; $returnValues = array(); $numOpenParentheses = 0; + $numOpenSingleQuotes = 0; + $numOpenDoubleQuotes = 0; $curReturnValue = ''; for ( $i = 0; $i strlen( $string ); $i++ ) { $curChar = $string{$i}; - if ( $curChar == '(' ) { + + if ( $ignoreNextChar ) { + // If previous character was a backslash, + // ignore the current one, since it's escaped. + // What if this one is a backslash too? + // Doesn't matter - it's escaped. + $ignoreNextChar = false; + } elseif ( $curChar == '(' ) { $numOpenParentheses++; } elseif ( $curChar == ')' ) { $numOpenParentheses--; + } elseif ( $curChar == '\'' ) { + if ( $numOpenSingleQuotes == 0 ) { + $numOpenSingleQuotes = 1; + } else { + $numOpenSingleQuotes = 0; + } + } elseif ( $curChar == '' ) { + if ( $numOpenDoubleQuotes == 0 ) { + $numOpenDoubleQuotes = 1; + } else { + $numOpenDoubleQuotes = 0; + } + } elseif ( $curChar == '\\' ) { + $ignoreNextChar = true; } - if ( $curChar == $delimiter $numOpenParentheses == 0 ) { + if ( $curChar == $delimiter + $numOpenParentheses == 0 + $numOpenSingleQuotes == 0 + $numOpenDoubleQuotes == 0 ) { $returnValues[] = trim( $curReturnValue ); $curReturnValue = ''; } else { -- To view, visit https://gerrit.wikimedia.org/r/227213 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia094cd41984f9d1aaf82e2e66851fefa206d493c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Cargo Gerrit-Branch: master Gerrit-Owner: Yaron Koren yaro...@gmail.com Gerrit-Reviewer: Yaron Koren yaro...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [WIP] Fedora 22 instructions for vagrant-lxc - change (mediawiki/vagrant)
Nemo bis has uploaded a new change for review. https://gerrit.wikimedia.org/r/227225 Change subject: [WIP] Fedora 22 instructions for vagrant-lxc .. [WIP] Fedora 22 instructions for vagrant-lxc Setup is easy once you know the correct packages, but vagrant up fails. Tips assembled from multiple sources: * https://fedoraproject.org/wiki/LXC * http://blog.obnox.de/vagrant-with-lxc-and-libvirt-reprise/ * https://stackoverflow.com/a/4502672 * https://github.com/jedi4ever/veewee/issues/510#issuecomment-77170337 * http://blog.bak1an.so/blog/2014/03/23/fedora-vagrant-nfs/ * https://github.com/coreos/coreos-vagrant/issues/162#issuecomment-53849603 Currently stuck on https://unix.stackexchange.com/q/218631 Change-Id: I6ca6f6178aab7a124ac9467c7f33e392026b23f3 --- M support/README-lxc.md 1 file changed, 39 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant refs/changes/25/227225/1 diff --git a/support/README-lxc.md b/support/README-lxc.md index 62ae411..55f6fb8 100644 --- a/support/README-lxc.md +++ b/support/README-lxc.md @@ -59,3 +59,42 @@ You can also set `VAGRANT_DEFAULT_PROVIDER=lxc` in your shell environment to tell Vagrant your preferred default provider. + + +Setup on a Fedora 22 host + + +Since Fedora 22, everything is packaged, you just need to remember all the packages: + +sudo dnf install lxc lxc-templates lxc-extra vagrant vagrant-libvirt \ +vagrant-lxc vagrant-libvirt-doc gcc ruby-devel rubygems libvirt-devel \ +redir nfs-utils + +Now you can simplify your life reducing the sudo passwords to type in vagrant: + +sudo cp /usr/share/vagrant/gems/doc/vagrant-libvirt-0.0.*/polkit/10-vagrant-libvirt.rules /usr/share/polkit-1/rules.d/ + +Start NFS and allow access to it: + +sudo systemctl start rpcbind.service nfs-idmap.service nfs-server.service ; \ +sudo firewall-cmd --zone=internal --change-interface=docker0 ; \ +sudo firewall-cmd --permanent --zone=public --add-service=nfs ; \ +sudo firewall-cmd --permanent --zone=public --add-service=rpc-bind ; \ +sudo firewall-cmd --permanent --zone=public --add-service=mountd ; \ +sudo firewall-cmd --permanent --zone=public --add-port=2049/udp ; \ +sudo firewall-cmd --reload + +Continue installing MediaWiki-Vagrant using normal instructions: + +git clone https://gerrit.wikimedia.org/r/mediawiki/vagrant +cd vagrant +git submodule update --init --recursive +./setup.sh + +Vagrant may automatically select LXC as the default provider when it is +available, but if is not picked for you it can be forced: + +vagrant up --provider=lxc + +You can also set `VAGRANT_DEFAULT_PROVIDER=lxc` in your shell environment to +tell Vagrant your preferred default provider. \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/227225 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6ca6f6178aab7a124ac9467c7f33e392026b23f3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/vagrant 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] switch zerofetcher auth to secret() - change (operations/puppet)
BBlack has submitted this change and it was merged. Change subject: switch zerofetcher auth to secret() .. switch zerofetcher auth to secret() Change-Id: Ib4d9d5ce230b0136fa4a95130bacc6ff355683df --- M modules/role/manifests/cache/mobile.pp M modules/varnish/manifests/zero_update.pp 2 files changed, 4 insertions(+), 4 deletions(-) Approvals: BBlack: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/role/manifests/cache/mobile.pp b/modules/role/manifests/cache/mobile.pp index 6f24b15..eda4858 100644 --- a/modules/role/manifests/cache/mobile.pp +++ b/modules/role/manifests/cache/mobile.pp @@ -64,8 +64,8 @@ } class { 'varnish::zero_update': -site = $zero_site, -auth_src = 'puppet:///private/misc/zerofetcher.auth', +site = $zero_site, +auth_content = secret('misc/zerofetcher.auth'), } $runtime_param = $::site ? { diff --git a/modules/varnish/manifests/zero_update.pp b/modules/varnish/manifests/zero_update.pp index bc4b6b7..f5b4f14 100644 --- a/modules/varnish/manifests/zero_update.pp +++ b/modules/varnish/manifests/zero_update.pp @@ -23,7 +23,7 @@ } # Zero-specific update stuff -class varnish::zero_update($site, $auth_src, $hour = '*', $minute = '*/5') { +class varnish::zero_update($site, $auth_content, $hour = '*', $minute = '*/5') { require 'varnish::netmapper_update_common' package { 'python-requests': ensure = installed; } @@ -47,7 +47,7 @@ owner = 'netmap', group = 'netmap', mode= '0400', -source = $auth_src, +content = $auth_content, require = [File[/etc/zerofetcher]], } -- To view, visit https://gerrit.wikimedia.org/r/227226 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib4d9d5ce230b0136fa4a95130bacc6ff355683df Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BBlack bbl...@wikimedia.org Gerrit-Reviewer: BBlack bbl...@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] Update links on dumps.wm.org to HTTPS - change (operations/puppet)
BBlack has submitted this change and it was merged. Change subject: Update links on dumps.wm.org to HTTPS .. Update links on dumps.wm.org to HTTPS Some links on https://dumps.wikimedia.org/ are hard-coded http:. I changed them to either https: or relative links. Change-Id: Ic8abfffa607dbe19106a5b9cf927a38d788cf234 --- M modules/dataset/files/html/legal.html M modules/dataset/files/html/pagecounts-ez_index.html M modules/dataset/files/html/poty_index.html M modules/dataset/files/html/public_index.html 4 files changed, 17 insertions(+), 17 deletions(-) Approvals: BBlack: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/dataset/files/html/legal.html b/modules/dataset/files/html/legal.html index fc98664..07b4451 100644 --- a/modules/dataset/files/html/legal.html +++ b/modules/dataset/files/html/legal.html @@ -108,22 +108,22 @@ div id=globalWrapper div id=content h1License information/h1 -pWikimedia’s a href=https://wikimediafoundation.org/wiki/Mission;mission/a is to create educational content that is freely available to all people. In keeping with that goal, all information on Wikimedia projects may be freely shared, copied, remixed, and used for any purpose (including commercial purposes!) in perpetuity. To help guide users of a href=http://dumps.wikimedia.org/;dumps.wikimedia.org/a, this page contains more detailed information about Wikimedia’s licensing and licensing policies as they may apply to our dumps./p +pWikimedia’s a href=https://wikimediafoundation.org/wiki/Mission;mission/a is to create educational content that is freely available to all people. In keeping with that goal, all information on Wikimedia projects may be freely shared, copied, remixed, and used for any purpose (including commercial purposes!) in perpetuity. To help guide users of a href=https://dumps.wikimedia.org/;dumps.wikimedia.org/a, this page contains more detailed information about Wikimedia’s licensing and licensing policies as they may apply to our dumps./p div style=background:#ff;border-width:1px;border-style:solid;border-color:red;padding:1em;font-size:large;This is a high-level guide only. Where this information conflicts with specific information in the a href=https://wikimediafoundation.org/wiki/Terms_of_Use;Wikimedia Foundation Terms of Use/a, or with other information contained inside the dumps themselves, this description should be ignored. Those terms are controlling./div h2Text/h2 -pExcept as discussed below, all original textual content is licensed under the a href=http://www.wikipedia.org/wiki/Wikipedia:Copyrights; title=Wikipedia Copyrights -GNU Free Documentation License/a (GFDL) and the a href=http://creativecommons.org/licenses/by-sa/3.0/; title=Creative Commons Attribution-Share-Alike 3.0 LicenseCreative Commons Attribution-Share-Alike 3.0 License/a. Some text may be available only under the Creative Commons license; see our a href=http://wikimediafoundation.org/wiki/Terms_of_use;Terms of Use/a for details. Text written by some authors may be released under additional licenses or into the public domain./p +pExcept as discussed below, all original textual content is licensed under the a href=https://www.wikipedia.org/wiki/Wikipedia:Copyrights; title=Wikipedia Copyrights +GNU Free Documentation License/a (GFDL) and the a href=https://creativecommons.org/licenses/by-sa/3.0/; title=Creative Commons Attribution-Share-Alike 3.0 LicenseCreative Commons Attribution-Share-Alike 3.0 License/a. Some text may be available only under the Creative Commons license; see our a href=https://wikimediafoundation.org/wiki/Terms_of_use;Terms of Use/a for details. Text written by some authors may be released under additional licenses or into the public domain./p h2Images/h2 -pBy default, images uploaded to our services are under the a href=http://creativecommons.org/licenses/by-sa/3.0/; title=Creative Commons Attribution-Share-Alike 3.0 LicenseCreative Commons Attribution-Share-Alike 3.0 License/a. However, many images are NOT released under Creative Commons. Image copyright information is contained in the image description page inside the text dumps.p +pBy default, images uploaded to our services are under the a href=https://creativecommons.org/licenses/by-sa/3.0/; title=Creative Commons Attribution-Share-Alike 3.0 LicenseCreative Commons Attribution-Share-Alike 3.0 License/a. However, many images are NOT released under Creative Commons. Image copyright information is contained in the image description page inside the text dumps.p h2Exceptions/h2 h3Wikinews/h3 -pAs of 2005-09-25 all Wikinews textual content is licensed under the a href=http://creativecommons.org/licenses/by/2.5/; title=Creative Commons Attribution 2.5
[MediaWiki-commits] [Gerrit] Read extension.json files in the web updater - change (mediawiki/core)
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/227240 Change subject: Read extension.json files in the web updater .. Read extension.json files in the web updater The web updater reads LocalSettings.php in function scope to figure out what extensions have been loaded. This doesn't work for extensions being loaded through the ExtensionRegistry since they're only added to a queue. This adds the ability for the installer to read and get information from the current extension load queue. LocalSettings.php is still read for extensions that have not been converted yet. Other uses of Installer::getExistingLocalSettings() were audited and determined to be safe with regards to extension usage. Extensions that register hooks using explicit globals ($GLOBALS['wgHooks']['FooBar']) are still broken. Bug: T100414 Change-Id: Icc574a38a7947a1e3aff8622a4889e9dcfd7a4b2 --- M includes/installer/DatabaseUpdater.php M includes/registration/ExtensionRegistry.php 2 files changed, 35 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/40/227240/1 diff --git a/includes/installer/DatabaseUpdater.php b/includes/installer/DatabaseUpdater.php index 702f850..7070790 100644 --- a/includes/installer/DatabaseUpdater.php +++ b/includes/installer/DatabaseUpdater.php @@ -145,15 +145,26 @@ return; // already loaded } $vars = Installer::getExistingLocalSettings(); - if ( !$vars ) { - return; // no LocalSettings found + + $registry = ExtensionRegistry::getInstance(); + $queue = $registry-getQueue(); + // Don't accidentally load extensions in the future + $registry-clearQueue(); + + // This will automatically add AutoloadClasses to $wgAutoloadClasses + $data = $registry-readFromQueue( $queue ); + $hooks = array( 'wgHooks' = array( 'LoadExtensionSchemaUpdates' = array() ) ); + if ( isset( $data['globals']['wgHooks']['LoadExtensionSchemaUpdates'] ) ) { + $hooks = $data['globals']['wgHooks']['LoadExtensionSchemaUpdates']; } - if ( !isset( $vars['wgHooks'] ) || !isset( $vars['wgHooks']['LoadExtensionSchemaUpdates'] ) ) { - return; + if ( $vars isset( $vars['wgHooks']['LoadExtensionSchemaUpdates'] ) ) { + $hooks = array_merge_recursive( $hooks, $vars['wgHooks']['LoadExtensionSchemaUpdates'] ); } global $wgHooks, $wgAutoloadClasses; - $wgHooks['LoadExtensionSchemaUpdates'] = $vars['wgHooks']['LoadExtensionSchemaUpdates']; - $wgAutoloadClasses = $wgAutoloadClasses + $vars['wgAutoloadClasses']; + $wgHooks['LoadExtensionSchemaUpdates'] = $hooks; + if ( $vars isset( $vars['wgAutoloadClasses'] ) ) { + $wgAutoloadClasses += $vars['wgAutoloadClasses']; + } } /** diff --git a/includes/registration/ExtensionRegistry.php b/includes/registration/ExtensionRegistry.php index 0cdb2c1..4e690aa 100644 --- a/includes/registration/ExtensionRegistry.php +++ b/includes/registration/ExtensionRegistry.php @@ -109,6 +109,24 @@ } /** +* Get the current load queue. Not intended to be used +* outside of the installer. +* +* @return array +*/ + public function getQueue() { + return $this-queued; + } + + /** +* Clear the current load queue. Not intended to be used +* outside of the installer. +*/ + public function clearQueue() { + $this-queued = array(); + } + + /** * Process a queue of extensions and return their extracted data * * @param array $queue keys are filenames, values are ignored -- To view, visit https://gerrit.wikimedia.org/r/227240 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icc574a38a7947a1e3aff8622a4889e9dcfd7a4b2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: REL1_25 Gerrit-Owner: Paladox thomasmulhall...@yahoo.com Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Undefined variables are not cool. - change (mediawiki...DPLforum)
jenkins-bot has submitted this change and it was merged. Change subject: Undefined variables are not cool. .. Undefined variables are not cool. Change-Id: I6b932046f362b35f8dc2e2b4f17bafa5f408a81a --- M DPLforum_body.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/DPLforum_body.php b/DPLforum_body.php index e48620d..0bb2721 100644 --- a/DPLforum_body.php +++ b/DPLforum_body.php @@ -499,7 +499,7 @@ $text = substr( $text, strlen( $this-sOmit ) ); } - $props = ''; + $props = $query = ''; if ( is_numeric( $time ) ) { if ( $this-bTimestamp ) { $query = 't=' . $time; -- To view, visit https://gerrit.wikimedia.org/r/227236 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6b932046f362b35f8dc2e2b4f17bafa5f408a81a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DPLforum Gerrit-Branch: master Gerrit-Owner: Jack Phoenix j...@countervandalism.net Gerrit-Reviewer: Legoktm legoktm.wikipe...@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] Read extension.json files in the web updater - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Read extension.json files in the web updater .. Read extension.json files in the web updater The web updater reads LocalSettings.php in function scope to figure out what extensions have been loaded. This doesn't work for extensions being loaded through the ExtensionRegistry since they're only added to a queue. This adds the ability for the installer to read and get information from the current extension load queue. LocalSettings.php is still read for extensions that have not been converted yet. Other uses of Installer::getExistingLocalSettings() were audited and determined to be safe with regards to extension usage. Extensions that register hooks using explicit globals ($GLOBALS['wgHooks']['FooBar']) are still broken. Bug: T100414 Change-Id: Icc574a38a7947a1e3aff8622a4889e9dcfd7a4b2 (cherry picked from commit 648ef0d8687ce3efc404225263aa10ca45c244a5) --- M includes/installer/DatabaseUpdater.php M includes/registration/ExtensionRegistry.php 2 files changed, 35 insertions(+), 6 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/installer/DatabaseUpdater.php b/includes/installer/DatabaseUpdater.php index 702f850..7070790 100644 --- a/includes/installer/DatabaseUpdater.php +++ b/includes/installer/DatabaseUpdater.php @@ -145,15 +145,26 @@ return; // already loaded } $vars = Installer::getExistingLocalSettings(); - if ( !$vars ) { - return; // no LocalSettings found + + $registry = ExtensionRegistry::getInstance(); + $queue = $registry-getQueue(); + // Don't accidentally load extensions in the future + $registry-clearQueue(); + + // This will automatically add AutoloadClasses to $wgAutoloadClasses + $data = $registry-readFromQueue( $queue ); + $hooks = array( 'wgHooks' = array( 'LoadExtensionSchemaUpdates' = array() ) ); + if ( isset( $data['globals']['wgHooks']['LoadExtensionSchemaUpdates'] ) ) { + $hooks = $data['globals']['wgHooks']['LoadExtensionSchemaUpdates']; } - if ( !isset( $vars['wgHooks'] ) || !isset( $vars['wgHooks']['LoadExtensionSchemaUpdates'] ) ) { - return; + if ( $vars isset( $vars['wgHooks']['LoadExtensionSchemaUpdates'] ) ) { + $hooks = array_merge_recursive( $hooks, $vars['wgHooks']['LoadExtensionSchemaUpdates'] ); } global $wgHooks, $wgAutoloadClasses; - $wgHooks['LoadExtensionSchemaUpdates'] = $vars['wgHooks']['LoadExtensionSchemaUpdates']; - $wgAutoloadClasses = $wgAutoloadClasses + $vars['wgAutoloadClasses']; + $wgHooks['LoadExtensionSchemaUpdates'] = $hooks; + if ( $vars isset( $vars['wgAutoloadClasses'] ) ) { + $wgAutoloadClasses += $vars['wgAutoloadClasses']; + } } /** diff --git a/includes/registration/ExtensionRegistry.php b/includes/registration/ExtensionRegistry.php index 0cdb2c1..4e690aa 100644 --- a/includes/registration/ExtensionRegistry.php +++ b/includes/registration/ExtensionRegistry.php @@ -109,6 +109,24 @@ } /** +* Get the current load queue. Not intended to be used +* outside of the installer. +* +* @return array +*/ + public function getQueue() { + return $this-queued; + } + + /** +* Clear the current load queue. Not intended to be used +* outside of the installer. +*/ + public function clearQueue() { + $this-queued = array(); + } + + /** * Process a queue of extensions and return their extracted data * * @param array $queue keys are filenames, values are ignored -- To view, visit https://gerrit.wikimedia.org/r/227240 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icc574a38a7947a1e3aff8622a4889e9dcfd7a4b2 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: REL1_25 Gerrit-Owner: Paladox thomasmulhall...@yahoo.com Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: MarkAHershberger m...@nichework.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] i18n: Update i18n - change (mediawiki...WikidataPageBanner)
jenkins-bot has submitted this change and it was merged. Change subject: i18n: Update i18n .. i18n: Update i18n Replaced copied i18n text with WikiDataPageBanner Adds description and extension name to extension i18n files. Change-Id: I23a4433ba3883286c89683362230161674738ff7 --- M WikidataPageBanner.php M i18n/en.json M i18n/qqq.json 3 files changed, 15 insertions(+), 18 deletions(-) Approvals: Jdlrobson: Looks good to me, approved jenkins-bot: Verified diff --git a/WikidataPageBanner.php b/WikidataPageBanner.php index ca3bf16..1ce0d01 100644 --- a/WikidataPageBanner.php +++ b/WikidataPageBanner.php @@ -6,20 +6,20 @@ * @author Sumit Asthana, 2015 * @license GNU General Public Licence 2.0 or later */ + if ( !defined( 'MEDIAWIKI' ) ) { die( 'This file is a MediaWiki extension, it is not a valid entry point' ); } $wgExtensionCredits['other'][] = array( - 'path' = __FILE__, - 'name' = 'WikidataPageBanner', - 'namemsg'= WikidataPageBanner, - 'description'= Render banners on wikivoyage, - 'descriptionmsg' = 'Display pagewide banners on wikivoyage', - 'author' = array( 'Sumit Asthana' ), - 'version'= '0.0.1', - 'url'= 'https://www.mediawiki.org/wiki/Extension:WikidataPageBanner', - 'license-name' = 'GPL-2.0+', + 'path' = __FILE__, + 'name' = 'WikidataPageBanner', + 'namemsg' = 'Wikidatapagebanner-extname', + 'descriptionmsg' = 'wikidatapagebanner-desc', + 'author' = array( 'Sumit Asthana' ), + 'version' = '0.0.1', + 'url' = 'https://www.mediawiki.org/wiki/Extension:WikidataPageBanner', + 'license-name' = 'GPL-2.0+', ); /** diff --git a/i18n/en.json b/i18n/en.json index a9c79b7..2bc4c14 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -2,6 +2,6 @@ @metadata: { authors: [] }, - boilerplate-desc: This is an example extension, - boilerplate-i18n-welcome: Welcome to the localization file of the BoilerPlate extension. + wikidatapagebanner-extname: WikidataPageBanner, + wikidatapagebanner-desc: Render banners on specified pages of wiki at the beginning of articles } \ No newline at end of file diff --git a/i18n/qqq.json b/i18n/qqq.json index fdeb937..b3061d4 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -1,10 +1,7 @@ { @metadata: { - authors: [ - Shirayuki, - Umherirrender - ] + authors: [] }, - boilerplate-desc: {{desc|name=Boilerplate|url=https://www.mediawiki.org/wiki/Extension:Boilerplate}};, - boilerplate-i18n-welcome: Used to greet the user when reading the .i18n.php file. -} + wikidatapagebanner-extname: Used for the name of extension., + wikidatapagebanner-desc: {{desc|name=WikidataPageBanner|url=https://www.mediawiki.org/wiki/Extension:WikidataPageBanner}}; +} \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/226935 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I23a4433ba3883286c89683362230161674738ff7 Gerrit-PatchSet: 5 Gerrit-Project: mediawiki/extensions/WikidataPageBanner Gerrit-Branch: master Gerrit-Owner: Paladox thomasmulhall...@yahoo.com Gerrit-Reviewer: Addshore addshorew...@gmail.com Gerrit-Reviewer: Jdlrobson jrob...@wikimedia.org Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com Gerrit-Reviewer: Paladox thomasmulhall...@yahoo.com Gerrit-Reviewer: Raimond Spekking raimond.spekk...@gmail.com Gerrit-Reviewer: Siebrand siebr...@kitano.nl Gerrit-Reviewer: Sumit asthana.sumi...@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] Updating dhcp file for logstash1001-1003 to use jessie insta... - change (operations/puppet)
Cmjohnson has uploaded a new change for review. https://gerrit.wikimedia.org/r/227245 Change subject: Updating dhcp file for logstash1001-1003 to use jessie installer per phab task https://phabricator.wikimedia.org/T97545 .. Updating dhcp file for logstash1001-1003 to use jessie installer per phab task https://phabricator.wikimedia.org/T97545 Change-Id: Ib8fc174e435a83ccbf2d8e80907efd884d2948f6 --- M modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/45/227245/1 diff --git a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 index c5fd25d..dba68b0 100644 --- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 +++ b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 @@ -2487,16 +2487,22 @@ host logstash1001 { hardware ethernet 90:B1:1C:00:B1:4B; fixed-address logstash1001.eqiad.wmnet; +option pxelinux.pathprefix jessie-installer/; +filename jessie-installer/debian-installer/amd64/pxelinux.0; } host logstash1002 { hardware ethernet D4:AE:52:AF:65:94; fixed-address logstash1002.eqiad.wmnet; +option pxelinux.pathprefix jessie-installer/; +filename jessie-installer/debian-installer/amd64/pxelinux.0; } host logstash1003 { hardware ethernet D4:AE:52:AF:4B:AF; fixed-address logstash1003.eqiad.wmnet; +option pxelinux.pathprefix jessie-installer/; +filename jessie-installer/debian-installer/amd64/pxelinux.0; } host logstash1004 { -- To view, visit https://gerrit.wikimedia.org/r/227245 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib8fc174e435a83ccbf2d8e80907efd884d2948f6 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Cmjohnson cmjohn...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add datatypes to API output for all types of Snak - change (mediawiki...Wikibase)
Addshore has uploaded a new change for review. https://gerrit.wikimedia.org/r/227252 Change subject: Add datatypes to API output for all types of Snak .. Add datatypes to API output for all types of Snak Prior to this change only snaks with a type 'value' will have had the datatype injected. To me there is little point in limiting this and the datatype can also be usefull for somevalue and novalue snaks so always add it.. As well as changing the API output this will also change the output of the EntityDataSerializationService which uses the ResultBuilder. Change-Id: Id880a2da8dbac08e8b88fe6ac51205e5673a85c4 --- M repo/includes/api/ResultBuilder.php M repo/tests/phpunit/includes/api/ResultBuilderTest.php 2 files changed, 13 insertions(+), 22 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/52/227252/1 diff --git a/repo/includes/api/ResultBuilder.php b/repo/includes/api/ResultBuilder.php index dbeba62..a6f1608 100644 --- a/repo/includes/api/ResultBuilder.php +++ b/repo/includes/api/ResultBuilder.php @@ -1061,15 +1061,7 @@ foreach ( $array as $propertyIdGroupKey = $snakGroup ) { $dataType = $dtLookup-getDataTypeIdForProperty( new PropertyId( $propertyIdGroupKey ) ); foreach ( $snakGroup as $snak ) { - /** -* TODO: We probably want to return the datatype for NoValue and SomeValue snaks too -* but this is not done by the LibSerializers thus not done here. -* TODO: Also DataModelSerialization has a TypedSnak object and serializer which we -* might be able to use in some way here -*/ - if ( $snak['snaktype'] === 'value' ) { - $snak['datatype'] = $dataType; - } + $snak['datatype'] = $dataType; } } return $array; @@ -1080,15 +1072,7 @@ $dtLookup = $this-dataTypeLookup; return function ( $array ) use ( $dtLookup ) { $dataType = $dtLookup-getDataTypeIdForProperty( new PropertyId( $array['property'] ) ); - /** -* TODO: We probably want to return the datatype for NoValue and SomeValue snaks too -* but this is not done by the LibSerializers thus not done here. -* TODO: Also DataModelSerialization has a TypedSnak object and serializer which we -* might be able to use in some way here -*/ - if ( $array['snaktype'] === 'value' ) { - $array['datatype'] = $dataType; - } + $array['datatype'] = $dataType; return $array; }; } diff --git a/repo/tests/phpunit/includes/api/ResultBuilderTest.php b/repo/tests/phpunit/includes/api/ResultBuilderTest.php index 2c2135d..9083ca8 100644 --- a/repo/tests/phpunit/includes/api/ResultBuilderTest.php +++ b/repo/tests/phpunit/includes/api/ResultBuilderTest.php @@ -208,6 +208,7 @@ 'hash' = '210b00274bf03247a89de918f15b12142ebf9e56', 'snaktype' = 'somevalue', 'property' = 'P65', + 'datatype' = 'DtIdFor_P65', ), ), ), @@ -222,13 +223,15 @@ 'P65' = array( array( 'snaktype' = 'somevalue', - 'property' = 'P65' + 'property' = 'P65', +
[MediaWiki-commits] [Gerrit] WikidataPageBanner improve documentation - change (mediawiki...WikidataPageBanner)
Sumit has uploaded a new change for review. https://gerrit.wikimedia.org/r/227254 Change subject: WikidataPageBanner improve documentation .. WikidataPageBanner improve documentation Improve the description of functions in WikidataPageBanner.hooks.php Change-Id: I8257914b86f07d4bb51ffba4d6ede60055aa3f57 --- M includes/WikidataPageBanner.hooks.php 1 file changed, 10 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikidataPageBanner refs/changes/54/227254/1 diff --git a/includes/WikidataPageBanner.hooks.php b/includes/WikidataPageBanner.hooks.php index dea3058..e5980ad 100644 --- a/includes/WikidataPageBanner.hooks.php +++ b/includes/WikidataPageBanner.hooks.php @@ -2,7 +2,8 @@ class WikidataPageBanner { /** * WikidataPageBanner::addBanner Generates banner from given options and adds it and its styles -* to Output Page +* to Output Page. If no options defined through {{PAGEBANNER}}, tries to add a wikidata banner +* or a default one. * * @param $out OutputPage * @param $skin Skin Object @@ -69,6 +70,7 @@ /** * WikidataPageBanner::onOutputPageParserOutput add banner parameters from ParserOutput to * Output page +* * @param OutputPage $out * @param ParserOutput $pOut */ @@ -87,19 +89,22 @@ if ( strpos( $options['toc'], 'class=toc' ) !== false ) { $options['toc'] = str_replace( 'class=toc', '', $options['toc'] ); } + // disable default TOC $out-enableTOC( false ); } + // set banner properties as an OutputPage property $out-setProperty( 'wpb-banner-options', $options ); } } /** * WikidataPageBanner::addCustomBanner -* Parser function hooked to 'PAGEBANNER' magic word, to expand and load banner. +* Parser function hooked to 'PAGEBANNER' magic word, to define a custom banner and options to +* customize banner such as icons,horizontal TOC,etc. * * @param $parser Parser * @param $bannername Name of custom banner -* @return output +* @return array */ public static function addCustomBanner( $parser, $bannername ) { global $wgBannerNamespaces; @@ -129,6 +134,7 @@ if ( isset( $argumentsFromParserFunction['tooltip'] ) ) { $paramsForBannerTemplate['tooltip'] = $argumentsFromParserFunction['tooltip']; } + // set 'bottomtoc' parameter to allow TOC completely below the banner if ( isset( $argumentsFromParserFunction['bottomtoc'] ) $argumentsFromParserFunction['bottomtoc'] === 'yes' ) { $paramsForBannerTemplate['bottomtoc'] = true; @@ -251,7 +257,7 @@ } /** -* Fetches banner from wikidata for the specified page +* WikidataPageBanner::getWikidataBanner Fetches banner from wikidata for the specified page * * @param Title $title Title of the page * @return String|null file name of the banner from wikitata [description] -- To view, visit https://gerrit.wikimedia.org/r/227254 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8257914b86f07d4bb51ffba4d6ede60055aa3f57 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikidataPageBanner Gerrit-Branch: master Gerrit-Owner: Sumit asthana.sumi...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fixes counting of references - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Fixes counting of references .. Fixes counting of references Fixes counting of references by filtering on class 'wb-reference-new' instead of items with value. Bug: T98593 Change-Id: I7bbcd9142b4e6e64e112f8e9cd67dad0a8714b53 --- M view/resources/jquery/wikibase/jquery.wikibase.statementview.js 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: JanZerebecki: Looks good to me, approved jenkins-bot: Verified diff --git a/view/resources/jquery/wikibase/jquery.wikibase.statementview.js b/view/resources/jquery/wikibase/jquery.wikibase.statementview.js index 30dfca0..ff7e451 100644 --- a/view/resources/jquery/wikibase/jquery.wikibase.statementview.js +++ b/view/resources/jquery/wikibase/jquery.wikibase.statementview.js @@ -626,8 +626,8 @@ numberOfPendingValues = 0; if( this._referencesListview ) { - numberOfValues = this._referencesListview.nonEmptyItems().length; - numberOfPendingValues = this._referencesListview.items().length - numberOfValues; + numberOfPendingValues = this._referencesListview.items().filter( '.wb-reference-new' ).length; + numberOfValues = this._referencesListview.items().length - numberOfPendingValues; } // build a nice counter, displaying fixed and pending values: -- To view, visit https://gerrit.wikimedia.org/r/227230 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7bbcd9142b4e6e64e112f8e9cd67dad0a8714b53 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Jonas Kress (WMDE) jonas.kr...@wikimedia.de Gerrit-Reviewer: Bene benestar.wikime...@gmail.com Gerrit-Reviewer: JanZerebecki jan.wikime...@zerebecki.de Gerrit-Reviewer: Thiemo Mättig (WMDE) thiemo.maet...@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] Undefined variables are not cool. - change (mediawiki...DPLforum)
Jack Phoenix has uploaded a new change for review. https://gerrit.wikimedia.org/r/227236 Change subject: Undefined variables are not cool. .. Undefined variables are not cool. Change-Id: I6b932046f362b35f8dc2e2b4f17bafa5f408a81a --- M DPLforum_body.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DPLforum refs/changes/36/227236/1 diff --git a/DPLforum_body.php b/DPLforum_body.php index e48620d..0bb2721 100644 --- a/DPLforum_body.php +++ b/DPLforum_body.php @@ -499,7 +499,7 @@ $text = substr( $text, strlen( $this-sOmit ) ); } - $props = ''; + $props = $query = ''; if ( is_numeric( $time ) ) { if ( $this-bTimestamp ) { $query = 't=' . $time; -- To view, visit https://gerrit.wikimedia.org/r/227236 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6b932046f362b35f8dc2e2b4f17bafa5f408a81a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DPLforum Gerrit-Branch: master Gerrit-Owner: Jack Phoenix j...@countervandalism.net ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] geolanglist: always use text-lb for primary - change (operations/dns)
BBlack has uploaded a new change for review. https://gerrit.wikimedia.org/r/227243 Change subject: geolanglist: always use text-lb for primary .. geolanglist: always use text-lb for primary This is the case in all usage today, so this is just a simplification before other changes... Change-Id: I2853befffc45b0fba972260c3e1e227254a390bb --- M templates/helpers/langlist.tmpl M templates/wikibooks.org M templates/wikimedia.com M templates/wikimedia.community M templates/wikimedia.ee M templates/wikinews.org M templates/wikipedia.org M templates/wikiquote.org M templates/wikisource.org M templates/wikiversity.org M templates/wikivoyage.org M templates/wiktionary.org 12 files changed, 15 insertions(+), 15 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/dns refs/changes/43/227243/1 diff --git a/templates/helpers/langlist.tmpl b/templates/helpers/langlist.tmpl index c236b61..1630d50 100644 --- a/templates/helpers/langlist.tmpl +++ b/templates/helpers/langlist.tmpl @@ -1,13 +1,13 @@ {% from helpers/langs.tmpl import langs %} -{% macro geolang(lang, dyna) -%} -{{ lang }} 600 IN DYNAgeoip!{{ dyna }} +{% macro geolang(lang) -%} +{{ lang }} 600 IN DYNAgeoip!text-addrs {{ lang }}.m600 IN DYNAgeoip!mobile-addrs {{ lang }}.zero 600 IN DYNAgeoip!mobile-addrs {%- endmacro %} -{% macro geolanglist(dyna) -%} +{% macro geolanglist() -%} {% for lang in langs -%} -{{ geolang(lang, dyna) }} +{{ geolang(lang) }} {% endfor %} {%- endmacro %} diff --git a/templates/wikibooks.org b/templates/wikibooks.org index 390bd68..60e05f4 100644 --- a/templates/wikibooks.org +++ b/templates/wikibooks.org @@ -37,7 +37,7 @@ www 600 IN DYNA geoip!text-addrs ; All languages will automatically be included here -{{ geolanglist('text-addrs') }} +{{ geolanglist() }} ; Mobile m 600 IN DYNA geoip!mobile-addrs diff --git a/templates/wikimedia.com b/templates/wikimedia.com index 37959f2..2ff27ac 100644 --- a/templates/wikimedia.com +++ b/templates/wikimedia.com @@ -34,4 +34,4 @@ www 600 IN DYNA geoip!text-addrs ; All languages will automatically be included here -{{ geolanglist('text-addrs') }} +{{ geolanglist() }} diff --git a/templates/wikimedia.community b/templates/wikimedia.community index 9d2a40f..035993b 100644 --- a/templates/wikimedia.community +++ b/templates/wikimedia.community @@ -37,6 +37,6 @@ www 600 IN DYNA geoip!text-addrs ; All languages will automatically be included here -{{ geolanglist('text-addrs') }} +{{ geolanglist() }} ; Other websites diff --git a/templates/wikimedia.ee b/templates/wikimedia.ee index e814a96..29788ac 100644 --- a/templates/wikimedia.ee +++ b/templates/wikimedia.ee @@ -34,6 +34,6 @@ www 600 IN DYNA geoip!text-addrs ; All languages will automatically be included here -{{ geolanglist('text-addrs') }} +{{ geolanglist() }} ; Other websites diff --git a/templates/wikinews.org b/templates/wikinews.org index 532dc3d..133efed 100644 --- a/templates/wikinews.org +++ b/templates/wikinews.org @@ -37,7 +37,7 @@ www 600 IN DYNA geoip!text-addrs ; All languages will automatically be included here. -{{ geolanglist('text-addrs') }} +{{ geolanglist() }} ; Mobile m 600 IN DYNA geoip!mobile-addrs diff --git a/templates/wikipedia.org b/templates/wikipedia.org index 51517bf..fdcf00c 100644 --- a/templates/wikipedia.org +++ b/templates/wikipedia.org @@ -65,7 +65,7 @@ ; All languages will automatically be included here -{{ geolanglist('text-addrs') }} +{{ geolanglist() }} ; Other websites diff --git a/templates/wikiquote.org b/templates/wikiquote.org index d654433..5a16eb4 100644 --- a/templates/wikiquote.org +++ b/templates/wikiquote.org @@ -37,7 +37,7 @@ www 600 IN DYNA geoip!text-addrs ; All languages will automatically be included here. -{{ geolanglist('text-addrs') }} +{{ geolanglist() }} ; Mobile m 600 IN DYNA geoip!mobile-addrs diff --git a/templates/wikisource.org b/templates/wikisource.org index c97956a..e08a381 100644 --- a/templates/wikisource.org +++ b/templates/wikisource.org @@ -37,7 +37,7 @@ www 600 IN DYNA geoip!text-addrs ; All languages will automatically be included here. -{{ geolanglist('text-addrs') }} +{{ geolanglist() }} ; Mobile m 600 IN DYNA geoip!mobile-addrs diff --git a/templates/wikiversity.org b/templates/wikiversity.org index a73875a..f7583b5 100644 --- a/templates/wikiversity.org +++ b/templates/wikiversity.org @@ -39,7 +39,7 @@ www 600 IN DYNA geoip!text-addrs ; All languages will automatically be included here. -{{ geolanglist('text-addrs') }} +{{ geolanglist() }} ; Mobile m 600 IN DYNA geoip!mobile-addrs diff --git a/templates/wikivoyage.org b/templates/wikivoyage.org index 945c1af..9f38ba6 100644 ---
[MediaWiki-commits] [Gerrit] Added SQL function validation for all parameters - change (mediawiki...Cargo)
Yaron Koren has submitted this change and it was merged. Change subject: Added SQL function validation for all parameters .. Added SQL function validation for all parameters Via the new CargoSQLQuery::getAndValidateSQLFunctions() method. Change-Id: I1e4ac5a712e1cc55d56585615cb9ac3545b51122 --- M CargoSQLQuery.php 1 file changed, 33 insertions(+), 22 deletions(-) Approvals: Yaron Koren: Checked; Looks good to me, approved diff --git a/CargoSQLQuery.php b/CargoSQLQuery.php index 8c1b050..d0238ae 100644 --- a/CargoSQLQuery.php +++ b/CargoSQLQuery.php @@ -136,6 +136,13 @@ throw new MWException( Error: the string \$displayString\ cannot be used within #cargo_query. ); } } + + self::getAndValidateSQLFunctions( $simplifiedWhereStr ); + self::getAndValidateSQLFunctions( $joinOnStr ); + self::getAndValidateSQLFunctions( $groupByStr ); + self::getAndValidateSQLFunctions( $havingStr ); + self::getAndValidateSQLFunctions( $orderByStr ); + self::getAndValidateSQLFunctions( $limitStr ); } /** @@ -332,6 +339,24 @@ } } + static function getAndValidateSQLFunctions( $str ) { + global $wgCargoAllowedSQLFunctions; + + $sqlFunctionMatches = array(); + $sqlFunctionRegex = '/\b(\S*?)\s?\(/'; + preg_match_all( $sqlFunctionRegex, $str, $sqlFunctionMatches ); + $sqlFunctions = array_map( 'strtoupper', $sqlFunctionMatches[1] ); + // Throw an error if any of these functions + // are not in our whitelist of SQL functions. + foreach ( $sqlFunctions as $sqlFunction ) { + if ( !in_array( $sqlFunction, $wgCargoAllowedSQLFunctions ) ) { + throw new MWException( Error: the SQL function \$sqlFunction()\ is not allowed. ); + } + } + + return $sqlFunctions; + } + /** * Attempts to get the field description (type, etc.) of each field * specified in a SELECT call (via a #cargo_query call), using the set @@ -345,12 +370,15 @@ $this-mFieldDescriptions = array(); $this-mFieldTables = array(); - foreach ( $this-mAliasedFieldNames as $alias = $fieldName ) { + foreach ( $this-mAliasedFieldNames as $alias = $origFieldName ) { $tableName = null; - if ( strpos( $fieldName, '.' ) !== false ) { + if ( strpos( $origFieldName, '.' ) !== false ) { // This could probably be done better with // regexps. - list( $tableName, $fieldName ) = explode( '.', $fieldName, 2 ); + list( $tableName, $fieldName ) = explode( '.', $origFieldName, 2 ); + } else { + $fieldName = $origFieldName; + $tableName = null; } $description = new CargoFieldDescription(); // If it's a pre-defined field, we probably know its @@ -359,25 +387,8 @@ $description-mType = 'Integer'; } elseif ( $fieldName == '_pageName' ) { $description-mType = 'Page'; - } elseif ( strpos( $tableName, '(' ) !== false || strpos( $fieldName, '(' ) !== false ) { - $sqlFunctionMatches = array(); - $sqlFunctionRegex = '/\b(\S*?)\s?\(/'; - preg_match_all( $sqlFunctionRegex, $fieldName, $sqlFunctionMatches ); - $sqlFunctions = array_map( 'strtoupper', $sqlFunctionMatches[1] ); - if ( count( $sqlFunctions ) == 0 ) { - // Must be in the table name, then. - preg_match_all( $sqlFunctionRegex, $tableName, $sqlFunctionMatches ); - $sqlFunctions = array_map( 'strtoupper', $sqlFunctionMatches[1] ); - } - - // Throw an error if any of these functions - // are not in our whitelist of SQL functions. - foreach ( $sqlFunctions as $sqlFunction ) { - if ( !in_array( $sqlFunction, $wgCargoAllowedSQLFunctions ) ) { - throw new MWException( Error: the SQL function \$sqlFunction()\ is not allowed. ); -
[MediaWiki-commits] [Gerrit] adding netboot.cfg for logstash1001-3 - change (operations/puppet)
Cmjohnson has uploaded a new change for review. https://gerrit.wikimedia.org/r/227235 Change subject: adding netboot.cfg for logstash1001-3 .. adding netboot.cfg for logstash1001-3 Change-Id: Ia9525b19db73f648fcf43f392663d6bf4f7ae19c --- M modules/install_server/files/autoinstall/netboot.cfg 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/35/227235/1 diff --git a/modules/install_server/files/autoinstall/netboot.cfg b/modules/install_server/files/autoinstall/netboot.cfg index 9343fda..e201fdf 100755 --- a/modules/install_server/files/autoinstall/netboot.cfg +++ b/modules/install_server/files/autoinstall/netboot.cfg @@ -84,7 +84,8 @@ labsdb100[67]) echo partman/raid5-gpt-lvm.cfg ;; \ labsdb[1-3]|labsdb100[1-3]) echo partman/mw.cfg ;; \ labvirt100[1-9]) echo partman/virt-hp.cfg ;; \ - logstash*) echo partman/logstash.cfg ;; \ + logstash100[1-3]) echo partman/raid1-lvm-ext4.cfg ;; \ +logstash100[4-6]) echo partman/logstash.cfg ;; \ lvs[1-6]|lvs[12]00*) echo partman/flat.cfg ;; \ lvs[34]00*) echo partman/raid1-lvm.cfg ;; \ mc[1-9]*) echo partman/mc.cfg ;; \ -- To view, visit https://gerrit.wikimedia.org/r/227235 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia9525b19db73f648fcf43f392663d6bf4f7ae19c Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Cmjohnson cmjohn...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Test Less failure in mediawiki.debug.less - change (mediawiki/core)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/227237 Change subject: Test Less failure in mediawiki.debug.less .. Test Less failure in mediawiki.debug.less Bug: T106780 Change-Id: I036c50fc621f372c42711dcb428c72e9d6708115 --- M resources/src/mediawiki/mediawiki.debug.less 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/37/227237/1 diff --git a/resources/src/mediawiki/mediawiki.debug.less b/resources/src/mediawiki/mediawiki.debug.less index 949c558..0e2ff50 100644 --- a/resources/src/mediawiki/mediawiki.debug.less +++ b/resources/src/mediawiki/mediawiki.debug.less @@ -1,4 +1,4 @@ -.mw-debug { +.mw-debug width: 100%; background-color: #eee; border-top: 1px solid #aaa; -- To view, visit https://gerrit.wikimedia.org/r/227237 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I036c50fc621f372c42711dcb428c72e9d6708115 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Hashar has...@free.fr ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [parserTests] Edits generation shouldn't insert content in f... - change (mediawiki...parsoid)
jenkins-bot has submitted this change and it was merged. Change subject: [parserTests] Edits generation shouldn't insert content in fosterable position .. [parserTests] Edits generation shouldn't insert content in fosterable position * We already try to do this, but aren't getting it done quite right. * Newly failing selser tests are all for tests where lots of other selser tests fail. Seem to be cases where selser is more accurate than wt2wt. * The reason the wrapperName block is entered is because TR and CAPTION are considered isBlockNodeWithVisibleWT. Change-Id: I8578809a2caf90df67de138c9fdf1668d94aa8af --- M tests/parserTests-blacklist.js M tests/parserTests.js 2 files changed, 37 insertions(+), 13 deletions(-) Approvals: Subramanya Sastry: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/parserTests-blacklist.js b/tests/parserTests-blacklist.js index 3c827d6..e74c88b 100644 --- a/tests/parserTests-blacklist.js +++ b/tests/parserTests-blacklist.js @@ -1910,11 +1910,17 @@ add(selser, Unclosed and unmatched quotes [3,0,[2],0,[[2]],3,[3,0],0,4,4,0,0,3,2,0,3,[[4],2,4,0,3,0],2,3,3,[3,3,0]], \nt6n1bkvx9wq7u8fr'Bold italic text ''with italic deactivated'' in between.'\n\n'''mdiwcalkyki6bt9Bold text..'''\n\n'''nowiki/'''\n\n1il337h4ozu84cxr\n\nowkwkmpgu45z5mi\n\n''Italic tag left open\n\n0jlauri2d7gjsjor\n\n!-- Unmatching number of opening, closing tags: --'''xapa2a5a6cdw8kt9'''lc002uv6d1dzpvis election fik23fdz9d89qkt9 beat s.\n\n8ykwjs7kuwg0hpvi\n\ns plain); add(selser, Unclosed and unmatched quotes [2,4,3,0,2,0,1,0,[3],0,[2],0,2,0,0,2,[2,2,4,0,1,0],2,4,3,4], re6gnnkhd1tnjyvi\n\n'Bold italic text '''with bold deactivated''' in between.'\n\nbdwnekfnkxei2j4i\n\nva244jbhttpdgqfr\n\n'''Bold text..\n\n..spanning two paragraphs (should not work).'''\n\nlrd6syi4ygugzaor''Italic tag left open\n\nknfaulivfgca0pb9\n\nNormal text.\n\n!-- Unmatching number of opening, closing tags: --h8w8s0eci66tuik9\n\nu9daa8hfmgm5z5mi'''This year'nowiki/'''s4k3bfthkfq1tt9s election am5ar352e2ltbj4i beat '''last years.\n\nrgsn8f7qx23p7gb9\n\nlhg77py8ot21emi\n\n7h6jcsa4wmzsq0k9\n); add(selser, Unclosed and unmatched quotes [[1],2,4,0,[4],0,[4,0],0,[[2]],3,2,0,2,0,0,2,[0,2,2,0,1,0],0,1,0,2], 'Bold italic text '''with bold deactivated''' in between.'\n\n91y6zy5s4079zfr\n\nmkyoq2vkvt0jatt9\n\n8yeajt4jwaru23xr\n\nn2z6ghxy6lp7gb9'''nowiki/'''\n\n'''9c8lhwf3v6zgp66rBold tag left open'''\n\nootbfqoaxawi2j4i\n\n''Italic tag left open\n\nvv89fig83pst6gvi\n\nNormal text.\n\n!-- Unmatching number of opening, closing tags: --73vckpnoy6s3v7vi\n\n'''This year'nowiki/'''eedgwt17jt9be29s election gqta5jrflissjor''should'' beat '''last years.\n\n''Tom'''s car is bigger than 'nowiki/'''Susan'''s.\n\nz1mgwtgr2xjhh0k9\n\nPlain ''italic'''s plain); +add(selser, A table with captions with non-default spaced attributes and a table row [[3,2,3,[4],4,[2,4]]], {|!--90q42mbx340a4i--\n|+style=\color: red;\|caption2\n|+ style=\color: red;\ |68x5dnp2q5xw29!--msaci0wnxchgds4i--!--fhl1z8tl9txu5wmi--\n|-\n| foo!--z5tecc0c7ynwmi--\n|}); +add(selser, A table with captions with non-default spaced attributes and a table row [[0,2,4,0,3,[4,0]]], {|\n!--8folgr0kquboi529--|+style=\color: red;\|caption2!--9isvnh2z6j2it3xr--\n|+ style=\color: red;\| caption3!--cegg9qdr9hjgu8fr--\n|}); add(selser, A table with captions with non-default spaced attributes and a table row [[2,0,2,3,3,3]], {|!--69d5z7pa8iio1or--\n|+style=\color: red;\|caption2!--1r97810ys18j8aor--\n|}); add(selser, A table with captions with non-default spaced attributes and a table row [2], ogl2d411a038r529\n{|\n|+style=\color: red;\|caption2\n|+ style=\color: red;\| caption3\n|-\n| foo\n|}); add(selser, A table with captions with non-default spaced attributes and a table row [[4,[3],2,0,3,[[3,4],4]]], {|!--glpyv8ws43elv7vi--\n|+ style=\color: red;\ |!--977mpdg7bdg6i529--\n|+ style=\color: red;\| caption3\n|-\n|vnlowwkt14hadcxr!--tw8w8jwmz4p1fw29--\n|}); +add(selser, A table with captions with non-default spaced attributes and a table row [[2,2,0,4,2,[0,4]]], {|!--hq2lymey7xxkcsor--\n!--q20r2b6ga9xry66r--|+style=\color: red;\|caption2\n!--kyojp7sr96v18aor--!--bky3qng4ga2a9k9--\n|-\n| foo!--phpg9eaca86ez5mi--\n|}); add(selser, A table with captions with non-default spaced attributes and a table row [[0,[2],0,0,0,[[0,2],0]]], {|\n|+ style=\color: red;\ |rsk37teyuq22csorcaption2\n|+ style=\color: red;\| caption3\n|-\n|vefem1fh6g1ll3di\n| foo\n|}); +add(selser, A table with captions with non-default spaced attributes and a table row [[2,0,3,[2],0,[2,0]]], {|!--8q7n7m2tbswwb3xr--\n|+style=\color: red;\|caption2\n|+ style=\color: red;\ |lcnpzckjupgphkt9 caption3\n!--px2ept6jeswnrk9--|-\n| foo\n|}); add(selser, A table with captions with non-default spaced attributes and a table row [1], {|
[MediaWiki-commits] [Gerrit] Implement CalendarWidget and DateInputWidget - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Implement CalendarWidget and DateInputWidget .. Implement CalendarWidget and DateInputWidget Example usage: I193fcd3175ebc96297f9d2cdd0f4de428388dd8e Bug: T97425 Change-Id: I6f760f7c32e2e6ed2008e897af72fb9e17dd663b --- M resources/Resources.php A resources/src/mediawiki.widgets/mw.widgets.CalendarWidget.js A resources/src/mediawiki.widgets/mw.widgets.CalendarWidget.less A resources/src/mediawiki.widgets/mw.widgets.DateInputWidget.js A resources/src/mediawiki.widgets/mw.widgets.DateInputWidget.less 5 files changed, 1,245 insertions(+), 0 deletions(-) Approvals: Mooeypoo: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/Resources.php b/resources/Resources.php index 0fc8ade..f7a06f5 100644 --- a/resources/Resources.php +++ b/resources/Resources.php @@ -1755,6 +1755,8 @@ 'mediawiki.widgets' = array( 'scripts' = array( 'resources/src/mediawiki.widgets/mw.widgets.js', + 'resources/src/mediawiki.widgets/mw.widgets.CalendarWidget.js', + 'resources/src/mediawiki.widgets/mw.widgets.DateInputWidget.js', 'resources/src/mediawiki.widgets/mw.widgets.NamespaceInputWidget.js', 'resources/src/mediawiki.widgets/mw.widgets.TitleInputWidget.js', 'resources/src/mediawiki.widgets/mw.widgets.TitleOptionWidget.js', @@ -1762,6 +1764,8 @@ ), 'skinStyles' = array( 'default' = array( + 'resources/src/mediawiki.widgets/mw.widgets.CalendarWidget.less', + 'resources/src/mediawiki.widgets/mw.widgets.DateInputWidget.less', 'resources/src/mediawiki.widgets/mw.widgets.TitleInputWidget.css', ), ), @@ -1770,6 +1774,7 @@ 'jquery.autoEllipsis', 'mediawiki.Title', 'mediawiki.api', + 'moment', 'oojs-ui', ), 'messages' = array( diff --git a/resources/src/mediawiki.widgets/mw.widgets.CalendarWidget.js b/resources/src/mediawiki.widgets/mw.widgets.CalendarWidget.js new file mode 100644 index 000..0d743e4 --- /dev/null +++ b/resources/src/mediawiki.widgets/mw.widgets.CalendarWidget.js @@ -0,0 +1,519 @@ +/*! + * MediaWiki Widgets – CalendarWidget class. + * + * @copyright 2011-2015 MediaWiki Widgets Team and others; see AUTHORS.txt + * @license The MIT License (MIT); see LICENSE.txt + */ +/*global moment */ +/*jshint es3: false */ +( function ( $, mw ) { + + /** +* Creates an mw.widgets.CalendarWidget object. +* +* @class +* @extends OO.ui.Widget +* @mixins OO.ui.mixin.TabIndexedElement +* +* @constructor +* @param {Object} [config] Configuration options +* @cfg {string} [precision='day'] Date precision to use, 'day' or 'month' +* @cfg {string|null} [date=null] Day or month date (depending on `precision`), in the +* format '-MM-DD' or '-MM'. When null, defaults to current date. +*/ + mw.widgets.CalendarWidget = function MWWCalendarWidget( config ) { + // Config initialization + config = config || {}; + + // Parent constructor + mw.widgets.CalendarWidget.parent.call( this, config ); + + // Mixin constructors + OO.ui.mixin.TabIndexedElement.call( this, $.extend( {}, config, { $tabIndexed: this.$element } ) ); + + // Properties + this.precision = config.precision || 'day'; + // Currently selected date (day or month) + this.date = null; + // Current UI state (date and precision we're displaying right now) + this.moment = null; + this.displayLayer = this.getDisplayLayers()[ 0 ]; // 'month', 'year', 'duodecade' + + this.$header = $( 'div' ).addClass( 'mw-widget-calendarWidget-header' ); + this.$bodyOuterWrapper = $( 'div' ).addClass( 'mw-widget-calendarWidget-body-outer-wrapper' ); + this.$bodyWrapper = $( 'div' ).addClass( 'mw-widget-calendarWidget-body-wrapper' ); + this.$body = $( 'div' ).addClass( 'mw-widget-calendarWidget-body' ); + this.labelButton = new OO.ui.ButtonWidget( { + tabIndex: -1, + label: '', + framed: false, + classes: [ 'mw-widget-calendarWidget-labelButton' ] + } ); + this.upButton = new OO.ui.ButtonWidget( { + tabIndex: -1, +
[MediaWiki-commits] [Gerrit] SpecialBlock: Simplify HTMLForm submit callback handling - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: SpecialBlock: Simplify HTMLForm submit callback handling .. SpecialBlock: Simplify HTMLForm submit callback handling We can just use onSubmit() instead of our own custom stuff. The comment stating that we can't is wrong; perhaps it used to be correct, back when it was written. Change-Id: Ib18fb7292a67b471e9ad13cf38038287b9bd2bd2 --- M includes/specials/SpecialBlock.php 1 file changed, 5 insertions(+), 15 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/specials/SpecialBlock.php b/includes/specials/SpecialBlock.php index b4d4220..e0f35c6 100644 --- a/includes/specials/SpecialBlock.php +++ b/includes/specials/SpecialBlock.php @@ -97,7 +97,6 @@ protected function alterForm( HTMLForm $form ) { $form-setWrapperLegendMsg( 'blockip-legend' ); $form-setHeaderText( '' ); - $form-setSubmitCallback( array( __CLASS__, 'processUIForm' ) ); $form-setSubmitDestructive(); $msg = $this-alreadyBlocked ? 'ipb-change-block' : 'ipbsubmit'; @@ -597,17 +596,8 @@ } /** -* Submit callback for an HTMLForm object, will simply pass -* @param array $data -* @param HTMLForm $form -* @return bool|string -*/ - public static function processUIForm( array $data, HTMLForm $form ) { - return self::processForm( $data, $form-getContext() ); - } - - /** -* Given the form data, actually implement a block +* Given the form data, actually implement a block. This is also called from ApiBlock. +* * @param array $data * @param IContextSource $context * @return bool|string @@ -962,11 +952,11 @@ /** * Process the form on POST submission. * @param array $data +* @param HTMLForm $form * @return bool|array True for success, false for didn't-try, array of errors on failure */ - public function onSubmit( array $data ) { - // This isn't used since we need that HTMLForm that's passed in the - // second parameter. See alterForm for the real function + public function onSubmit( array $data, HTMLForm $form = null ) { + return self::processForm( $data, $form-getContext() ); } /** -- To view, visit https://gerrit.wikimedia.org/r/227167 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib18fb7292a67b471e9ad13cf38038287b9bd2bd2 Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Bartosz Dziewoński matma@gmail.com Gerrit-Reviewer: Anomie bjor...@wikimedia.org Gerrit-Reviewer: Bartosz Dziewoński matma@gmail.com Gerrit-Reviewer: Brian Wolff bawolff...@gmail.com Gerrit-Reviewer: Legoktm legoktm.wikipe...@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 the logic in an apihelp message - change (mediawiki/core)
Amire80 has uploaded a new change for review. https://gerrit.wikimedia.org/r/227246 Change subject: Fix the logic in an apihelp message .. Fix the logic in an apihelp message Ending the listing should probably be at, not from. Change-Id: I613a74680367d10ce453a730d476fd79c98ea04d --- M includes/api/i18n/en.json 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/46/227246/1 diff --git a/includes/api/i18n/en.json b/includes/api/i18n/en.json index 6c7ce81..3ff2845 100644 --- a/includes/api/i18n/en.json +++ b/includes/api/i18n/en.json @@ -562,7 +562,7 @@ apihelp-query+categorymembers-param-start: Timestamp to start listing from. Can only be used with kbd$1sort=timestamp/kbd., apihelp-query+categorymembers-param-end: Timestamp to end listing at. Can only be used with kbd$1sort=timestamp/kbd., apihelp-query+categorymembers-param-starthexsortkey: Sortkey to start listing from, as returned by kbd$1prop=sortkey/kbd. Can only be used with kbd$1sort=sortkey/kbd., - apihelp-query+categorymembers-param-endhexsortkey: Sortkey to end listing from, as returned by kbd$1prop=sortkey/kbd. Can only be used with kbd$1sort=sortkey/kbd., + apihelp-query+categorymembers-param-endhexsortkey: Sortkey to end listing at, as returned by kbd$1prop=sortkey/kbd. Can only be used with kbd$1sort=sortkey/kbd., apihelp-query+categorymembers-param-startsortkeyprefix: Sortkey prefix to start listing from. Can only be used with kbd$1sort=sortkey/kbd. Overrides var$1starthexsortkey/var., apihelp-query+categorymembers-param-endsortkeyprefix: Sortkey prefix to end listing BEFORE (not at, if this value occurs it will not be included!). Can only be used with $1sort=sortkey. Overrides $1endhexsortkey., apihelp-query+categorymembers-param-startsortkey: Use $1starthexsortkey instead., -- To view, visit https://gerrit.wikimedia.org/r/227246 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I613a74680367d10ce453a730d476fd79c98ea04d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] populateContentModel: Clear LinkCache occasionally - change (mediawiki/core)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/227249 Change subject: populateContentModel: Clear LinkCache occasionally .. populateContentModel: Clear LinkCache occasionally Work around T106998 for now. Change-Id: If217ca07c865aafa0b8bab24e27e39c7ea601e76 --- M maintenance/populateContentModel.php 1 file changed, 19 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/49/227249/1 diff --git a/maintenance/populateContentModel.php b/maintenance/populateContentModel.php index 3f5d6b6..fd2692a 100644 --- a/maintenance/populateContentModel.php +++ b/maintenance/populateContentModel.php @@ -28,6 +28,13 @@ * populateContentModel.php --ns=1 --table=page */ class PopulateContentModel extends Maintenance { + + /** +* Clear the LinkCache after processing this many rows +* to avoid OOMs (T106998) +*/ + const CLEAR_LINK_CACHE = 500; + public function __construct() { parent::__construct(); $this-mDescription = 'Populate the various content_* fields'; @@ -74,6 +81,7 @@ $toSave = array(); $lastId = 0; $nsCondition = $ns === 'all' ? array() : array( 'page_namespace' = $ns ); + $count = 0; do { $rows = $dbw-select( 'page', @@ -95,6 +103,10 @@ unset( $toSave[$model] ); } $lastId = $row-page_id; + $count++; + if ( $count = self::CLEAR_LINK_CACHE ) { + LinkCache::singleton()-clear(); + } } } while ( $rows-numRows() = $this-mBatchSize ); foreach ( $toSave as $model = $pages ) { @@ -139,6 +151,7 @@ $toSave = array(); $lastId = 0; + $count = 0; do { $rows = $dbw-select( $selectTables, @@ -161,6 +174,7 @@ } $lastId = $row-{$key}; try { + // FIXME this should use ContentHandler::getDefaultModelFor() $handler = ContentHandler::getForTitle( $title ); } catch ( MWException $e ) { $this-error( Invalid content model for $title ); @@ -195,6 +209,11 @@ $this-updateRevisionOrArchiveRows( $dbw, $toSave[$defaultModel], $defaultModel, $table ); unset( $toSave[$defaultModel] ); } + + $count++; + if ( $count self::CLEAR_LINK_CACHE ) { + LinkCache::singleton()-clear(); + } } } while ( $rows-numRows() = $this-mBatchSize ); foreach ( $toSave as $model = $ids ) { -- To view, visit https://gerrit.wikimedia.org/r/227249 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If217ca07c865aafa0b8bab24e27e39c7ea601e76 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Localisation updates from https://translatewiki.net. - change (apps...wikipedia)
jenkins-bot has submitted this change and it was merged. Change subject: Localisation updates from https://translatewiki.net. .. Localisation updates from https://translatewiki.net. Change-Id: I20b51be465af87524c1a0aed2f3f3e78bf89c36a --- M wikipedia/res/values-ca/strings.xml M wikipedia/res/values-eo/strings.xml M wikipedia/res/values-es/strings.xml M wikipedia/res/values-it/strings.xml M wikipedia/res/values-ne/strings.xml M wikipedia/res/values-pl/strings.xml M wikipedia/res/values-pt-rBR/strings.xml M wikipedia/res/values-ru/strings.xml M wikipedia/res/values-uz/strings.xml M wikipedia/res/values-vi/strings.xml 10 files changed, 86 insertions(+), 20 deletions(-) Approvals: BearND: Looks good to me, approved jenkins-bot: Verified diff --git a/wikipedia/res/values-ca/strings.xml b/wikipedia/res/values-ca/strings.xml index 190fcc7..99cc38f 100644 --- a/wikipedia/res/values-ca/strings.xml +++ b/wikipedia/res/values-ca/strings.xml @@ -34,7 +34,7 @@ string name=toast_refresh_saved_pageS\'està actualitzant la pàgina desada…/string string name=delete_selected_saved_pagesEsborra/string string name=toast_saved_page_deletedS\'han esborrat les pàgines desades/string - string name=saved_pages_search_list_hint fuzzy=trueCercar/string + string name=saved_pages_search_list_hintCerca en les pàgines desades/string string name=saved_pages_search_empty_messageNo s\'ha trobat cap pàgina que coincidís amb la vostra consulta./string string name=nav_item_nearbyA prop/string string name=menu_update_nearbyActualitzar els elements que són a prop/string @@ -130,6 +130,7 @@ string name=create_account_nextSegüent/string string name=create_account_buttonCrea un compte/string string name=preferences_general_headingGeneral/string + string name=wikipedia_app_faqPMF de l\'app de la Viquipèdia/string string name=zero_charged_verbiageViquipèdia Zero està desactivada/string string name=zero_charged_verbiage_extendedCarregar altres articles pot implicar despeses per dades./string string name=zero_search_hintCercar a Viquipèdia Zero/string @@ -153,7 +154,7 @@ string name=preference_title_eventlogging_opt_inEnviar informes sobre l\'ús de l\'aplicació/string string name=preference_summary_eventlogging_opt_inPermetre a Viquimedia recollir informació sobre com utilitzeu l\'aplicació, a fi de poder-la millorar/string string name=editing_error_spamblacklistEnllaços a dominis bloquejats (%s) detectats. Esborreu-los i torneu-ho a provar./string - string name=history_search_list_hint fuzzy=trueCercar/string + string name=history_search_list_hintCerca a l\'historial/string string name=history_search_empty_messageNo s’ha trobat cap pàgina que coincideixi amb la consulta./string string name=error_can_not_process_linkNo s\'ha pogut mostrar l\'enllaç/string string name=page_protected_autoconfirmedLa pàgina està semiprotegida./string @@ -243,7 +244,7 @@ string name=preference_summary_show_imagesActivar o desactivar la càrrega d\'imatges a les pàgines. Desactiveu aquest paràmetre si teniu una connexió a Internet lenta o unes dades limitades./string string name=read_more_sectionLlegir més/string string name=read_next_sectionLlegeix el següent/string - string name=menu_gallery_visit_pageAnar a la pàgina del fitxer/string + string name=menu_gallery_visit_pageVés a la pàgina del fitxer/string string name=gallery_error_draw_failedNo s\'ha pogut carregar la imatge./string string name=license_titleText de la llicència per la biblioteca %s/string string name=gallery_menu_shareComparteix/string @@ -264,6 +265,12 @@ string name=gallery_fair_use_licenseFair use (ús raonable)/string string name=gallery_uploader_unknownCarregador no conegut/string string name=edit_save_unknown_errorNo s\'ha pogut desar l\'edició: %s/string + string name=menu_show_tabsMostra les pestanyes/string + string name=menu_new_tabPestanya nova/string + string name=button_close_tabTanca la pestanya/string + string name=menu_open_linkObre l\'enllaç/string + string name=menu_open_in_new_tabObre en una pestanya nova/string + string name=menu_save_page_popupDesa-ho per a després/string string name=tool_tip_select_textMantén premut qualsevol part del text per a ressaltar-lo per copiar i compartir./string string name=tool_tip_shareDesprés de destacar un fet interessant, proveu de compartir-lo en les vostres xarxes preferides!/string string name=page_view_in_browserVisualitza la pàgina en el navegador/string diff --git a/wikipedia/res/values-eo/strings.xml b/wikipedia/res/values-eo/strings.xml index e1b968e..52ef090 100644 --- a/wikipedia/res/values-eo/strings.xml +++ b/wikipedia/res/values-eo/strings.xml @@ -10,7 +10,7 @@ string name=acra_report_dialog_commentKion vi faris kiam okazis la kolapso?/string string name=search_hintSerĉu en Vikipedio/string string
[MediaWiki-commits] [Gerrit] Fix using GLOBALS in database updater - change (mediawiki/core)
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/227238 Change subject: Fix using GLOBALS in database updater .. Fix using GLOBALS in database updater Some extension use GLOBALS. And those that use composer.json this patch fixes it. Change-Id: I460e0e899e2905387b1a3c2c0d00d182144bcbd4 --- M includes/installer/DatabaseUpdater.php 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/38/227238/1 diff --git a/includes/installer/DatabaseUpdater.php b/includes/installer/DatabaseUpdater.php index 702f850..d4c4057 100644 --- a/includes/installer/DatabaseUpdater.php +++ b/includes/installer/DatabaseUpdater.php @@ -148,11 +148,12 @@ if ( !$vars ) { return; // no LocalSettings found } - if ( !isset( $vars['wgHooks'] ) || !isset( $vars['wgHooks']['LoadExtensionSchemaUpdates'] ) ) { + if ( !isset( $vars['wgHooks'] ) || !isset( $vars['wgHooks']['LoadExtensionSchemaUpdates'] ) || $GLOBALS['wgHooks']['LoadExtensionSchemaUpdates'] ) { return; } global $wgHooks, $wgAutoloadClasses; $wgHooks['LoadExtensionSchemaUpdates'] = $vars['wgHooks']['LoadExtensionSchemaUpdates']; + $GLOBALS['wgHooks']['LoadExtensionSchemaUpdates'] = $GLOBALS['wgHooks']['LoadExtensionSchemaUpdates']; $wgAutoloadClasses = $wgAutoloadClasses + $vars['wgAutoloadClasses']; } -- To view, visit https://gerrit.wikimedia.org/r/227238 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I460e0e899e2905387b1a3c2c0d00d182144bcbd4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Paladox thomasmulhall...@yahoo.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Rephrase apihelp-query+logevents-param-action - change (mediawiki/core)
Amire80 has uploaded a new change for review. https://gerrit.wikimedia.org/r/227251 Change subject: Rephrase apihelp-query+logevents-param-action .. Rephrase apihelp-query+logevents-param-action Fixes English grammar and improves readability. Change-Id: I0a5ab8340c5924baf7a4f04f58c0d6c3d705838e --- M includes/api/i18n/en.json 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/51/227251/1 diff --git a/includes/api/i18n/en.json b/includes/api/i18n/en.json index 6c7ce81..bef7f2b 100644 --- a/includes/api/i18n/en.json +++ b/includes/api/i18n/en.json @@ -791,7 +791,7 @@ apihelp-query+logevents-description: Get events from logs., apihelp-query+logevents-param-prop: Which properties to get:\n;ids:Adds the ID of the log event.\n;title:Adds the title of the page for the log event.\n;type:Adds the type of log event.\n;user:Adds the user responsible for the log event.\n;userid:Adds the user ID who was responsible for the log event.\n;timestamp:Adds the timestamp for the event.\n;comment:Adds the comment of the event.\n;parsedcomment:Adds the parsed comment of the event.\n;details:Lists additional details about the event.\n;tags:Lists tags for the event., apihelp-query+logevents-param-type: Filter log entries to only this type., - apihelp-query+logevents-param-action: Filter log actions to only this action. Overrides var$1type/var. Wildcard actions like kbdaction/*/kbd allows to specify any string for the asterisk., + apihelp-query+logevents-param-action: Filter log actions to only this action. Overrides var$1type/var. You can use the asterisk wildcard, for example kbdaction/*/kbd, to specify any string., apihelp-query+logevents-param-start: The timestamp to start enumerating from., apihelp-query+logevents-param-end: The timestamp to end enumerating., apihelp-query+logevents-param-user: Filter entries to those made by the given user., -- To view, visit https://gerrit.wikimedia.org/r/227251 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0a5ab8340c5924baf7a4f04f58c0d6c3d705838e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Generate new order IDs for each NewInvoice call - change (mediawiki...DonationInterface)
Ejegg has uploaded a new change for review. https://gerrit.wikimedia.org/r/227256 Change subject: Generate new order IDs for each NewInvoice call .. Generate new order IDs for each NewInvoice call AstroPay needs a different merchant-side identifier for each NewInvoice call. This commit introduces a 'sequence' key so as not to abuse the numAttempt, which should only be incremented when setting final status for a payment attempt. Bug: T106039 Change-Id: I91b49430aeab43150f63751c51f56bb4c906051e --- M astropay_gateway/astropay.adapter.php M gateway_common/gateway.adapter.php M tests/Adapter/Astropay/AstropayTest.php M tests/Adapter/GatewayAdapterTest.php M tests/Adapter/Worldpay/WorldpayTest.php M worldpay_gateway/worldpay.adapter.php 6 files changed, 70 insertions(+), 13 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface refs/changes/56/227256/1 diff --git a/astropay_gateway/astropay.adapter.php b/astropay_gateway/astropay.adapter.php index 2db25b9..08b0950 100644 --- a/astropay_gateway/astropay.adapter.php +++ b/astropay_gateway/astropay.adapter.php @@ -127,7 +127,7 @@ /** * Sets up the $order_id_meta array. -* For Astropay, we use the ct_id.numAttempt format because we don't get +* For Astropay, we use the ct_id.sequence format because we don't get * a gateway transaction ID until the user has actually paid. If the user * doesn't return to the result switcher, we will need to use the order_id * to find a pending queue message with donor details to flesh out the @@ -422,6 +422,11 @@ } function doPayment() { + // If this is not our first NewInvoice call, get a fresh order ID + if ( $this-session_getData( 'sequence' ) ) { + $this-regenerateOrderID(); + } + $transaction_result = $this-do_transaction( 'NewInvoice' ); $this-runAntifraudHooks(); if ( $this-getValidationAction() !== 'process' ) { @@ -603,6 +608,8 @@ * @param array $response */ protected function processNewInvoiceResponse( $response ) { + // Increment sequence number so next NewInvoice call gets a new order ID + $this-incrementSequenceNumber(); if ( !isset( $response['status'] ) ) { $this-transaction_response-setCommunicationStatus( false ); $this-logger-error( 'Astropay response does not have a status code' ); @@ -627,8 +634,6 @@ // have to parse the description. if ( preg_match( '/invoice already used/i', $response['desc'] ) ) { $this-logger-error( 'Order ID collision! Starting again.' ); - // Increment numAttempt to get a new order ID - $this-incrementNumAttempt(); throw new ResponseProcessingException( 'Order ID collision! Starting again.', ResponseCodes::DUPLICATE_ORDER_ID, diff --git a/gateway_common/gateway.adapter.php b/gateway_common/gateway.adapter.php index d81ffa9..f834c10 100644 --- a/gateway_common/gateway.adapter.php +++ b/gateway_common/gateway.adapter.php @@ -126,7 +126,7 @@ * order IDs, false if we are deferring order_id generation to the * gateway. * 'ct_id' = boolean value. If True, when generating order ID use -* the contribution tracking ID with the attempt number appended +* the contribution tracking ID with the sequence number appended * * Will eventually contain the following keys/values: * 'final'= The value that we have chosen as the valid order ID for @@ -2445,6 +2445,26 @@ $_SESSION['numAttempt'] = $attempts; } + /** +* Some payment gateways require a distinct identifier for each API call +* or for each new payment attempt, even if retrying an attempt that failed +* validation. This is slightly different from numAttempt, which is only +* incremented when setting a final status for a payment attempt. +* It is the child class's responsibility to increment this at the +* appropriate time. +*/ + protected function incrementSequenceNumber() { + self::session_ensure(); + $sequence = self::session_getData( 'sequence' ); //intentionally outside the 'Donor' key. + if ( is_numeric( $sequence ) ) { + $sequence += 1; + } else { + $sequence = 1; + } + + $_SESSION['sequence'] =
[MediaWiki-commits] [Gerrit] install_server: adding netboot.cfg for logstash1001-3 - change (operations/puppet)
Cmjohnson has submitted this change and it was merged. Change subject: install_server: adding netboot.cfg for logstash1001-3 .. install_server: adding netboot.cfg for logstash1001-3 these hosts are don't have elasticsearch data anymore, thus 2x disks vs 4x disks Change-Id: Ia9525b19db73f648fcf43f392663d6bf4f7ae19c --- M modules/install_server/files/autoinstall/netboot.cfg 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Filippo Giunchedi: Looks good to me, but someone else must approve Cmjohnson: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/install_server/files/autoinstall/netboot.cfg b/modules/install_server/files/autoinstall/netboot.cfg index 9343fda..e201fdf 100755 --- a/modules/install_server/files/autoinstall/netboot.cfg +++ b/modules/install_server/files/autoinstall/netboot.cfg @@ -84,7 +84,8 @@ labsdb100[67]) echo partman/raid5-gpt-lvm.cfg ;; \ labsdb[1-3]|labsdb100[1-3]) echo partman/mw.cfg ;; \ labvirt100[1-9]) echo partman/virt-hp.cfg ;; \ - logstash*) echo partman/logstash.cfg ;; \ + logstash100[1-3]) echo partman/raid1-lvm-ext4.cfg ;; \ +logstash100[4-6]) echo partman/logstash.cfg ;; \ lvs[1-6]|lvs[12]00*) echo partman/flat.cfg ;; \ lvs[34]00*) echo partman/raid1-lvm.cfg ;; \ mc[1-9]*) echo partman/mc.cfg ;; \ -- To view, visit https://gerrit.wikimedia.org/r/227235 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia9525b19db73f648fcf43f392663d6bf4f7ae19c Gerrit-PatchSet: 4 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Cmjohnson cmjohn...@wikimedia.org Gerrit-Reviewer: Cmjohnson cmjohn...@wikimedia.org Gerrit-Reviewer: Filippo Giunchedi fgiunch...@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] Failed Appveyor builds - change (pywikibot/core)
VcamX has uploaded a new change for review. https://gerrit.wikimedia.org/r/227239 Change subject: [FIX] Failed Appveyor builds .. [FIX] Failed Appveyor builds The Appveyor builds are failing to build the dependencies needed for requests[security]. Bug: T106512 Change-Id: Ifadcd4973f3cead71151bc3a87f8c43d53fa0073 --- M .appveyor.yml A requests-requirements.txt 2 files changed, 15 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/39/227239/1 diff --git a/.appveyor.yml b/.appveyor.yml index acd7c07..caee506 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -37,9 +37,9 @@ PYTHON_VERSION: 3.3.0 PYTHON_ARCH: 64 -- PYTHON: C:\\Python340-x64 - PYTHON_VERSION: 3.4.0 - PYTHON_ARCH: 64 +#- PYTHON: C:\\Python340-x64 +# PYTHON_VERSION: 3.4.0 +# PYTHON_ARCH: 64 # Appveyor pre-installs these versions onto build machines @@ -82,7 +82,7 @@ # This is needed for Python versions not installed on Appveyor build machines - ps: if (-not(Test-Path($env:PYTHON))) { iex $wc.DownloadString($env:APPVEYOR_PYTHON_URL + 'install.ps1') } - pip install -r dev-requirements.txt - - pip install requests + - pip install -r requests-requirements.txt build: off diff --git a/requests-requirements.txt b/requests-requirements.txt new file mode 100644 index 000..2923433 --- /dev/null +++ b/requests-requirements.txt @@ -0,0 +1,11 @@ +requests + +# Dependency of pyOpenSSL. Use specific version to avoid expected +# DeprecationWarning +cryptography=0.8.2 ; python_version '2.7' + +# requests security extra +# Bug T105767 on Python 2.7 release 9+ +pyOpenSSL ; python_full_version '2.7.9' or python_version = '3' +ndg-httpsclient ; python_full_version '2.7.9' or python_version = '3' +pyasn1 ; python_full_version '2.7.9' or python_version = '3' -- To view, visit https://gerrit.wikimedia.org/r/227239 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifadcd4973f3cead71151bc3a87f8c43d53fa0073 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: VcamX vca...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Added SQL function validation for all parameters - change (mediawiki...Cargo)
Yaron Koren has uploaded a new change for review. https://gerrit.wikimedia.org/r/227241 Change subject: Added SQL function validation for all parameters .. Added SQL function validation for all parameters Via the new CargoSQLQuery::getAndValidateSQLFunctions() method. Change-Id: I1e4ac5a712e1cc55d56585615cb9ac3545b51122 --- M CargoSQLQuery.php 1 file changed, 33 insertions(+), 22 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Cargo refs/changes/41/227241/1 diff --git a/CargoSQLQuery.php b/CargoSQLQuery.php index 8c1b050..d0238ae 100644 --- a/CargoSQLQuery.php +++ b/CargoSQLQuery.php @@ -136,6 +136,13 @@ throw new MWException( Error: the string \$displayString\ cannot be used within #cargo_query. ); } } + + self::getAndValidateSQLFunctions( $simplifiedWhereStr ); + self::getAndValidateSQLFunctions( $joinOnStr ); + self::getAndValidateSQLFunctions( $groupByStr ); + self::getAndValidateSQLFunctions( $havingStr ); + self::getAndValidateSQLFunctions( $orderByStr ); + self::getAndValidateSQLFunctions( $limitStr ); } /** @@ -332,6 +339,24 @@ } } + static function getAndValidateSQLFunctions( $str ) { + global $wgCargoAllowedSQLFunctions; + + $sqlFunctionMatches = array(); + $sqlFunctionRegex = '/\b(\S*?)\s?\(/'; + preg_match_all( $sqlFunctionRegex, $str, $sqlFunctionMatches ); + $sqlFunctions = array_map( 'strtoupper', $sqlFunctionMatches[1] ); + // Throw an error if any of these functions + // are not in our whitelist of SQL functions. + foreach ( $sqlFunctions as $sqlFunction ) { + if ( !in_array( $sqlFunction, $wgCargoAllowedSQLFunctions ) ) { + throw new MWException( Error: the SQL function \$sqlFunction()\ is not allowed. ); + } + } + + return $sqlFunctions; + } + /** * Attempts to get the field description (type, etc.) of each field * specified in a SELECT call (via a #cargo_query call), using the set @@ -345,12 +370,15 @@ $this-mFieldDescriptions = array(); $this-mFieldTables = array(); - foreach ( $this-mAliasedFieldNames as $alias = $fieldName ) { + foreach ( $this-mAliasedFieldNames as $alias = $origFieldName ) { $tableName = null; - if ( strpos( $fieldName, '.' ) !== false ) { + if ( strpos( $origFieldName, '.' ) !== false ) { // This could probably be done better with // regexps. - list( $tableName, $fieldName ) = explode( '.', $fieldName, 2 ); + list( $tableName, $fieldName ) = explode( '.', $origFieldName, 2 ); + } else { + $fieldName = $origFieldName; + $tableName = null; } $description = new CargoFieldDescription(); // If it's a pre-defined field, we probably know its @@ -359,25 +387,8 @@ $description-mType = 'Integer'; } elseif ( $fieldName == '_pageName' ) { $description-mType = 'Page'; - } elseif ( strpos( $tableName, '(' ) !== false || strpos( $fieldName, '(' ) !== false ) { - $sqlFunctionMatches = array(); - $sqlFunctionRegex = '/\b(\S*?)\s?\(/'; - preg_match_all( $sqlFunctionRegex, $fieldName, $sqlFunctionMatches ); - $sqlFunctions = array_map( 'strtoupper', $sqlFunctionMatches[1] ); - if ( count( $sqlFunctions ) == 0 ) { - // Must be in the table name, then. - preg_match_all( $sqlFunctionRegex, $tableName, $sqlFunctionMatches ); - $sqlFunctions = array_map( 'strtoupper', $sqlFunctionMatches[1] ); - } - - // Throw an error if any of these functions - // are not in our whitelist of SQL functions. - foreach ( $sqlFunctions as $sqlFunction ) { - if ( !in_array( $sqlFunction, $wgCargoAllowedSQLFunctions ) ) { - throw new MWException( Error: the SQL function
[MediaWiki-commits] [Gerrit] Localisation updates from https://translatewiki.net. - change (apps...wikipedia)
BearND has uploaded a new change for review. https://gerrit.wikimedia.org/r/227242 Change subject: Localisation updates from https://translatewiki.net. .. Localisation updates from https://translatewiki.net. Change-Id: I20b51be465af87524c1a0aed2f3f3e78bf89c36a --- M wikipedia/res/values-ca/strings.xml M wikipedia/res/values-eo/strings.xml M wikipedia/res/values-es/strings.xml M wikipedia/res/values-it/strings.xml M wikipedia/res/values-ne/strings.xml M wikipedia/res/values-pl/strings.xml M wikipedia/res/values-pt-rBR/strings.xml M wikipedia/res/values-ru/strings.xml M wikipedia/res/values-uz/strings.xml M wikipedia/res/values-vi/strings.xml 10 files changed, 86 insertions(+), 20 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/42/227242/1 diff --git a/wikipedia/res/values-ca/strings.xml b/wikipedia/res/values-ca/strings.xml index 190fcc7..99cc38f 100644 --- a/wikipedia/res/values-ca/strings.xml +++ b/wikipedia/res/values-ca/strings.xml @@ -34,7 +34,7 @@ string name=toast_refresh_saved_pageS\'està actualitzant la pàgina desada…/string string name=delete_selected_saved_pagesEsborra/string string name=toast_saved_page_deletedS\'han esborrat les pàgines desades/string - string name=saved_pages_search_list_hint fuzzy=trueCercar/string + string name=saved_pages_search_list_hintCerca en les pàgines desades/string string name=saved_pages_search_empty_messageNo s\'ha trobat cap pàgina que coincidís amb la vostra consulta./string string name=nav_item_nearbyA prop/string string name=menu_update_nearbyActualitzar els elements que són a prop/string @@ -130,6 +130,7 @@ string name=create_account_nextSegüent/string string name=create_account_buttonCrea un compte/string string name=preferences_general_headingGeneral/string + string name=wikipedia_app_faqPMF de l\'app de la Viquipèdia/string string name=zero_charged_verbiageViquipèdia Zero està desactivada/string string name=zero_charged_verbiage_extendedCarregar altres articles pot implicar despeses per dades./string string name=zero_search_hintCercar a Viquipèdia Zero/string @@ -153,7 +154,7 @@ string name=preference_title_eventlogging_opt_inEnviar informes sobre l\'ús de l\'aplicació/string string name=preference_summary_eventlogging_opt_inPermetre a Viquimedia recollir informació sobre com utilitzeu l\'aplicació, a fi de poder-la millorar/string string name=editing_error_spamblacklistEnllaços a dominis bloquejats (%s) detectats. Esborreu-los i torneu-ho a provar./string - string name=history_search_list_hint fuzzy=trueCercar/string + string name=history_search_list_hintCerca a l\'historial/string string name=history_search_empty_messageNo s’ha trobat cap pàgina que coincideixi amb la consulta./string string name=error_can_not_process_linkNo s\'ha pogut mostrar l\'enllaç/string string name=page_protected_autoconfirmedLa pàgina està semiprotegida./string @@ -243,7 +244,7 @@ string name=preference_summary_show_imagesActivar o desactivar la càrrega d\'imatges a les pàgines. Desactiveu aquest paràmetre si teniu una connexió a Internet lenta o unes dades limitades./string string name=read_more_sectionLlegir més/string string name=read_next_sectionLlegeix el següent/string - string name=menu_gallery_visit_pageAnar a la pàgina del fitxer/string + string name=menu_gallery_visit_pageVés a la pàgina del fitxer/string string name=gallery_error_draw_failedNo s\'ha pogut carregar la imatge./string string name=license_titleText de la llicència per la biblioteca %s/string string name=gallery_menu_shareComparteix/string @@ -264,6 +265,12 @@ string name=gallery_fair_use_licenseFair use (ús raonable)/string string name=gallery_uploader_unknownCarregador no conegut/string string name=edit_save_unknown_errorNo s\'ha pogut desar l\'edició: %s/string + string name=menu_show_tabsMostra les pestanyes/string + string name=menu_new_tabPestanya nova/string + string name=button_close_tabTanca la pestanya/string + string name=menu_open_linkObre l\'enllaç/string + string name=menu_open_in_new_tabObre en una pestanya nova/string + string name=menu_save_page_popupDesa-ho per a després/string string name=tool_tip_select_textMantén premut qualsevol part del text per a ressaltar-lo per copiar i compartir./string string name=tool_tip_shareDesprés de destacar un fet interessant, proveu de compartir-lo en les vostres xarxes preferides!/string string name=page_view_in_browserVisualitza la pàgina en el navegador/string diff --git a/wikipedia/res/values-eo/strings.xml b/wikipedia/res/values-eo/strings.xml index e1b968e..52ef090 100644 --- a/wikipedia/res/values-eo/strings.xml +++ b/wikipedia/res/values-eo/strings.xml @@ -10,7 +10,7 @@ string name=acra_report_dialog_commentKion vi faris kiam okazis la kolapso?/string string name=search_hintSerĉu en
[MediaWiki-commits] [Gerrit] Change spelling in apihelp-emailuser-example-email - change (mediawiki/core)
Amire80 has uploaded a new change for review. https://gerrit.wikimedia.org/r/227247 Change subject: Change spelling in apihelp-emailuser-example-email .. Change spelling in apihelp-emailuser-example-email No reason for capital User here. Change-Id: I78d425e3c2d46a5b40c779d57f9477d26dd91b59 --- M includes/api/i18n/en.json 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/47/227247/1 diff --git a/includes/api/i18n/en.json b/includes/api/i18n/en.json index 6c7ce81..c7cc281 100644 --- a/includes/api/i18n/en.json +++ b/includes/api/i18n/en.json @@ -115,7 +115,7 @@ apihelp-emailuser-param-subject: Subject header., apihelp-emailuser-param-text: Mail body., apihelp-emailuser-param-ccme: Send a copy of this mail to me., - apihelp-emailuser-example-email: Send an email to the User kbdWikiSysop/kbd with the text kbdContent/kbd., + apihelp-emailuser-example-email: Send an email to user kbdWikiSysop/kbd with the text kbdContent/kbd., apihelp-expandtemplates-description: Expands all templates in wikitext., apihelp-expandtemplates-param-title: Title of page., -- To view, visit https://gerrit.wikimedia.org/r/227247 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I78d425e3c2d46a5b40c779d57f9477d26dd91b59 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use Assert in ResultBuilder - change (mediawiki...Wikibase)
Addshore has uploaded a new change for review. https://gerrit.wikimedia.org/r/227250 Change subject: Use Assert in ResultBuilder .. Use Assert in ResultBuilder Change-Id: Id78c9077a7d02c5fe0c7fd4f8d63e7c9782451d9 --- M repo/includes/api/ResultBuilder.php M repo/tests/phpunit/includes/api/ResultBuilderTest.php 2 files changed, 26 insertions(+), 84 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/50/227250/1 diff --git a/repo/includes/api/ResultBuilder.php b/repo/includes/api/ResultBuilder.php index 407214b..dbeba62 100644 --- a/repo/includes/api/ResultBuilder.php +++ b/repo/includes/api/ResultBuilder.php @@ -3,7 +3,6 @@ namespace Wikibase\Repo\Api; use ApiResult; -use InvalidArgumentException; use Revision; use SiteStore; use Status; @@ -21,6 +20,7 @@ use Wikibase\LanguageFallbackChain; use Wikibase\Lib\Serializers\SerializationOptions; use Wikibase\Lib\Store\EntityTitleLookup; +use Wikimedia\Assert\Assert; /** * Builder for Api Results @@ -85,21 +85,15 @@ * @param SiteStore $siteStore * @param PropertyDataTypeLookup $dataTypeLookup * @param bool $isRawMode when special elements such as '_element' are needed by the formatter. -* -* @throws InvalidArgumentException */ public function __construct( - $result, + ApiResult $result, EntityTitleLookup $entityTitleLookup, SerializerFactory $serializerFactory, SiteStore $siteStore, PropertyDataTypeLookup $dataTypeLookup, $isRawMode ) { - if ( !$result instanceof ApiResult ) { - throw new InvalidArgumentException( 'Result builder must be constructed with an ApiResult' ); - } - $this-result = $result; $this-entityTitleLookup = $entityTitleLookup; $this-serializerFactory = $serializerFactory; @@ -114,17 +108,15 @@ * @since 0.5 * * @param $success bool|int|null -* -* @throws InvalidArgumentException */ public function markSuccess( $success = true ) { $value = (int)$success; - if ( $value !== 1 $value !== 0 ) { - throw new InvalidArgumentException( - '$success must evaluate to either 1 or 0 when casted to integer' - ); - } + Assert::parameter( + $value == 1 || $value == 0, + '$success', + '$success must evaluate to either 1 or 0 when casted to integer' + ); $this-result-addValue( null, 'success', $value ); } @@ -146,13 +138,11 @@ * @param $name string * @param $values array * @param string $tag tag name to use for elements of $values -* -* @throws InvalidArgumentException */ public function setList( $path, $name, array $values, $tag ) { $this-checkPathType( $path ); - $this-checkNameIsString( $name ); - $this-checkTagIsString( $tag ); + Assert::parameterType( 'string', $name, '$name' ); + Assert::parameterType( 'string', $tag, '$tag' ); if ( $this-isRawMode ) { // Unset first, so we don't make the tag name an actual value. @@ -180,12 +170,10 @@ * @param $path array|string|null * @param $name string * @param $value mixed -* -* @throws InvalidArgumentException */ public function setValue( $path, $name, $value ) { $this-checkPathType( $path ); - $this-checkNameIsString( $name ); + Assert::parameterType( 'string', $name, '$name' ); $this-checkValueIsNotList( $value ); $this-result-addValue( $path, $name, $value ); @@ -210,14 +198,11 @@ * May be ignored even if given, based on $this-result-getIsRawMode(). * @param $value mixed * @param string $tag tag name to use for $value in indexed mode -* -* @throws InvalidArgumentException */ public function appendValue( $path, $key, $value, $tag ) { $this-checkPathType( $path ); $this-checkKeyType( $key ); - $this-checkTagIsString( $tag ); - + Assert::parameterType( 'string', $tag, '$tag' ); $this-checkValueIsNotList( $value ); if ( $this-isRawMode ) { @@ -230,61 +215,35 @@ /** * @param array|string|null $path -* -* @throws InvalidArgumentException */ private function checkPathType( $path ) { - if (
[MediaWiki-commits] [Gerrit] Add full stop to apihelp-query+revisions+base-param-difftotext - change (mediawiki/core)
Amire80 has uploaded a new change for review. https://gerrit.wikimedia.org/r/227255 Change subject: Add full stop to apihelp-query+revisions+base-param-difftotext .. Add full stop to apihelp-query+revisions+base-param-difftotext Change-Id: Ibe24632434387b56eb47bce16f57f83cdc28a24c --- M includes/api/i18n/en.json 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/55/227255/1 diff --git a/includes/api/i18n/en.json b/includes/api/i18n/en.json index 6c7ce81..33f2811 100644 --- a/includes/api/i18n/en.json +++ b/includes/api/i18n/en.json @@ -906,7 +906,7 @@ apihelp-query+revisions+base-param-parse: Parse revision content (requires $1prop=content). For performance reasons, if this option is used, $1limit is enforced to 1., apihelp-query+revisions+base-param-section: Only retrieve the content of this section number., apihelp-query+revisions+base-param-diffto: Revision ID to diff each revision to. Use kbdprev/kbd, kbdnext/kbd and kbdcur/kbd for the previous, next and current revision respectively., - apihelp-query+revisions+base-param-difftotext: Text to diff each revision to. Only diffs a limited number of revisions. Overrides var$1diffto/var. If var$1section/var is set, only that section will be diffed against this text, + apihelp-query+revisions+base-param-difftotext: Text to diff each revision to. Only diffs a limited number of revisions. Overrides var$1diffto/var. If var$1section/var is set, only that section will be diffed against this text., apihelp-query+revisions+base-param-contentformat: Serialization format used for var$1difftotext/var and expected for output of content., apihelp-query+search-description: Perform a full text search., -- To view, visit https://gerrit.wikimedia.org/r/227255 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibe24632434387b56eb47bce16f57f83cdc28a24c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Only disable single-line in selser where whitelisted - change (mediawiki...parsoid)
jenkins-bot has submitted this change and it was merged. Change subject: Only disable single-line in selser where whitelisted .. Only disable single-line in selser where whitelisted * We should only disable single-line context when reusing content from selser in the same scenarios where it's disabled in normal serialization. * There's an edge case here where nested templates will serialize to a single line where, strictly speaking, they don't need to. Change-Id: I836a4157f03427215c1ed39b529cb2d4ce273f55 --- M lib/mediawiki.WikitextSerializer.js 1 file changed, 11 insertions(+), 4 deletions(-) Approvals: Subramanya Sastry: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/mediawiki.WikitextSerializer.js b/lib/mediawiki.WikitextSerializer.js index d5df07b..3a70fc1 100644 --- a/lib/mediawiki.WikitextSerializer.js +++ b/lib/mediawiki.WikitextSerializer.js @@ -1082,8 +1082,15 @@ // console.warn(USED ORIG); this.trace(ORIG-src with DSR, function() { - return '[' + dp.dsr[0] + ',' + dp.dsr[1] + '] = ' + JSON.stringify(out); - }); + return '[' + dp.dsr[0] + ',' + dp.dsr[1] + '] = ' + JSON.stringify(out); + }); + + // When reusing source, we should only suppress serializing + // to a single line for the cases we've whitelisted in + // normal serialization. + var suppressSLC = DU.isFirstEncapsulationWrapperNode(node) || + ['DL', 'UL', 'OL'].indexOf(node.nodeName) -1; + // Use selser to serialize this text! The original // wikitext is `out`. But first allow // `ConstrainedText.fromSelSer` to figure out the right @@ -1091,11 +1098,11 @@ // `out`, based on the node type. Since we might actually // have to break this wikitext into multiple chunks, // `fromSelSer` returns an array. - state.singleLineContext.disable(); + if (suppressSLC) { state.singleLineContext.disable(); } ConstrainedText.fromSelSer(out, node, dp, state.env).forEach(function(ct) { cb(ct, ct.node); }); - state.singleLineContext.pop(); + if (suppressSLC) { state.singleLineContext.pop(); } // Skip over encapsulated content since it has already been serialized if (DU.isFirstEncapsulationWrapperNode(node)) { -- To view, visit https://gerrit.wikimedia.org/r/226120 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I836a4157f03427215c1ed39b529cb2d4ce273f55 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/services/parsoid Gerrit-Branch: master Gerrit-Owner: Arlolra abrea...@wikimedia.org Gerrit-Reviewer: Cscott canan...@wikimedia.org Gerrit-Reviewer: Subramanya Sastry ssas...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits