[MediaWiki-commits] [Gerrit] Add tmpreaper module - change (operations/puppet)
Ori.livneh has submitted this change and it was merged. Change subject: Add tmpreaper module .. Add tmpreaper module Adds a tmpreaper module with two custom resource types: * tmpreaper::dir adds a directory to the set of directories which are 'reaped' by tmpreaper during its daily cron run. It does so by appending the directory to TMPREAPER_DIRS in /etc/tmpreaper.conf. * tmpreaper::reap allows a path to be reaped by Puppet, like Puppet's native 'tidy' resource, except not insanely broken. This may be used when the age setting or other settings in /etc/tmpreaper.conf (which are applied to all directories) are not optimal for the given path. Change-Id: Ibc013bbf58340664213273bbb97954e5a1e08f9c --- A modules/tmpreaper/manifests/dir.pp A modules/tmpreaper/manifests/init.pp A modules/tmpreaper/manifests/reap.pp A modules/tmpreaper/templates/args.erb 4 files changed, 125 insertions(+), 0 deletions(-) Approvals: Ori.livneh: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/tmpreaper/manifests/dir.pp b/modules/tmpreaper/manifests/dir.pp new file mode 100644 index 000..9e66174 --- /dev/null +++ b/modules/tmpreaper/manifests/dir.pp @@ -0,0 +1,39 @@ +# == Define: tmpreaper::dir +# +# Add a directory to the set of directories purged by tmpreaper's +# daily cron script. +# +# === Parameters +# +# [*ensure*] +# 'present' means that the directory will be managed by tmpreaper; +# 'absent' means it will not be. The value of this parameter does +#not create or destroy the directory on disk. +# +# [*path*] +# Path to tidy. Defaults to the resource name. +# +# === Example +# +# tmpreaper::dir { '/tmp': +#ensure => present, +# } +# +define tmpreaper::dir( +$ensure = present, +$path = $name, +) { +include ::tmpreaper + +validate_absolute_path($path) + +$safe_name = regsubst($title, '\W', '-', 'G') +$safe_path = regsubst($path, '/?$', '/') + +file_line { "tmpreaper_dir_${safe_name}": +ensure => $ensure, +line=> "TMPREAPER_DIRS=\"\${TMPREAPER_DIRS} ${safe_path}.\"", +path=> '/etc/tmpreaper.conf', +require => Package['tmpreaper'], +} +} diff --git a/modules/tmpreaper/manifests/init.pp b/modules/tmpreaper/manifests/init.pp new file mode 100644 index 000..511b945 --- /dev/null +++ b/modules/tmpreaper/manifests/init.pp @@ -0,0 +1,24 @@ +# == Class: tmpreaper +# +# This module provides a simple custom resource type for using +# tmpreaper. tmpreaper recursively searches for and removes files +# and empty directories which haven't been accessed for a period +# time. +# +class tmpreaper { +package { 'tmpreaper': +ensure => present, +} + +# tmpreaper's cron.daily script declines to run unless the line +# below is removed from its config file, indicating that the user +# understands the security implications of having tmpreaper run +# automatically. See /usr/share/doc/tmpreaper/README.security.gz . + +file_line { 'load_env_enabled': +ensure => absent, +line=> 'SHOWWARNING=true', +path=> '/etc/tmpreaper.conf', +require => Package['tmpreaper'], +} +} diff --git a/modules/tmpreaper/manifests/reap.pp b/modules/tmpreaper/manifests/reap.pp new file mode 100644 index 000..f92bc57 --- /dev/null +++ b/modules/tmpreaper/manifests/reap.pp @@ -0,0 +1,55 @@ +# == Define: tmpreaper::reap +# +# Purge a directory hierarchy of files that have not been accessed in +# a given period of time. Like `puppet::tidy`, but fast and secure. +# +# === Parameters +# +# [*path*] +# Path to tidy. Defaults to the resource name. +# +# [*age*] +# Defines the age threshold for removing files. If the file has not been +# accessed for <$age>, it becomes eligible for removal. The value should +# be a number suffixed by one character: 'd' for days, 'h' for hours, 'm' +# for minutes, or 's' for seconds. Defaults to '7d'. +# +# [*include_symlinks*] +# If true, remove symlinks too, not just regular files and directories. +# False by default. +# +# [*include_all*] +# If true, remove all file types, not just regular files, symlinks, and +# directories. Defaults to false. +# +# [*protect*] +# An optional array of shell patterns specifying files that should be +# protected from deletion. +# +# === Example +# +# tmpreaper::reap { '/tmp': +# age => '1d', +# protect => ['*.log'], +# include_symlinks => true, +# } +# +define tmpreaper::reap( +$path = $name, +$age = '7d', +$protect = [], +$include_symlinks = false, +$include_all = false, +) { +include ::tmpreaper + +validate_re($age, '^\d+[smhd]$') +validate_absolute_path($path) + +$args = template('tmpreaper/args.erb') + +exec { "/usr/sbin/tmpreaper ${args}": +onlyif => "/usr/sbin/tmpreaper --test
[MediaWiki-commits] [Gerrit] confd::file: correct the regsubst arguments - change (operations/puppet)
Giuseppe Lavagetto has submitted this change and it was merged. Change subject: confd::file: correct the regsubst arguments .. confd::file: correct the regsubst arguments Change-Id: I1f0ddebaefabf0ec4268e7778b7aefac667104b5 --- M modules/confd/manifests/file.pp 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Giuseppe Lavagetto: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/confd/manifests/file.pp b/modules/confd/manifests/file.pp index 94d8090..c4ff2d7 100644 --- a/modules/confd/manifests/file.pp +++ b/modules/confd/manifests/file.pp @@ -13,7 +13,7 @@ $source = undef, $content = undef, ) { -$safe_name = regsubst('\/', '_', $title) +$safe_name = regsubst($title, '\/', '_') unless ($source or $content) { fail('We either need a source file or a content for the config file') -- To view, visit https://gerrit.wikimedia.org/r/218293 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1f0ddebaefabf0ec4268e7778b7aefac667104b5 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Giuseppe Lavagetto Gerrit-Reviewer: Giuseppe Lavagetto Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] confd::file: correct the regsubst arguments - change (operations/puppet)
Giuseppe Lavagetto has uploaded a new change for review. https://gerrit.wikimedia.org/r/218293 Change subject: confd::file: correct the regsubst arguments .. confd::file: correct the regsubst arguments Change-Id: I1f0ddebaefabf0ec4268e7778b7aefac667104b5 --- M modules/confd/manifests/file.pp 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/93/218293/1 diff --git a/modules/confd/manifests/file.pp b/modules/confd/manifests/file.pp index 94d8090..c4ff2d7 100644 --- a/modules/confd/manifests/file.pp +++ b/modules/confd/manifests/file.pp @@ -13,7 +13,7 @@ $source = undef, $content = undef, ) { -$safe_name = regsubst('\/', '_', $title) +$safe_name = regsubst($title, '\/', '_') unless ($source or $content) { fail('We either need a source file or a content for the config file') -- To view, visit https://gerrit.wikimedia.org/r/218293 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1f0ddebaefabf0ec4268e7778b7aefac667104b5 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Giuseppe Lavagetto ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update mediawiki/mediawiki-codesniffer dependency to 0.2.0 - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Update mediawiki/mediawiki-codesniffer dependency to 0.2.0 .. Update mediawiki/mediawiki-codesniffer dependency to 0.2.0 Change-Id: If6887ce9d445fd6b7dc036f68e803f4c5d86dce7 --- M composer.json 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/composer.json b/composer.json index 3642c90..ad6399c 100644 --- a/composer.json +++ b/composer.json @@ -34,7 +34,7 @@ "jakub-onderka/php-parallel-lint": "~0.8", "justinrainbow/json-schema": "~1.3", "phpunit/phpunit": "3.7.37", - "mediawiki/mediawiki-codesniffer": "0.1.0" + "mediawiki/mediawiki-codesniffer": "0.2.0" }, "suggest": { "ext-fileinfo": "*", -- To view, visit https://gerrit.wikimedia.org/r/218107 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If6887ce9d445fd6b7dc036f68e803f4c5d86dce7 Gerrit-PatchSet: 6 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Paladox Gerrit-Reviewer: Daniel Friesen Gerrit-Reviewer: Florianschmidtwelzow Gerrit-Reviewer: Jdlrobson Gerrit-Reviewer: Krinkle Gerrit-Reviewer: Legoktm Gerrit-Reviewer: Mattflaschen Gerrit-Reviewer: Yurik 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 for invalid file upload - change (mediawiki...NSFileRepo)
Robert Vogel has submitted this change and it was merged. Change subject: Fix for invalid file upload .. Fix for invalid file upload If a user selects a file that is not allowed by $wgFileExtensions and tries to upload it (without noticing the message) $uploadForm->mDesiredDestName is an empty string. In this case NSFileRepo causes a fatal error. Jenkins breaks on this commit [1] because of the extensions dependency to "Lockdown". Therefor I'll do a manual verification. [1] https://integration.wikimedia.org/ci/job/mwext-NSFileRepo-testextension-zend/3/console Change-Id: Iada71324a867d9794dee3ce707236e2aca03132f --- M NSFileRepo.php 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Robert Vogel: Verified; Looks good to me, approved jenkins-bot: Checked diff --git a/NSFileRepo.php b/NSFileRepo.php index 56e7f9c..8b8da9c 100644 --- a/NSFileRepo.php +++ b/NSFileRepo.php @@ -80,6 +80,9 @@ */ function NSFileRepoNSCheck( $uploadForm ) { $title = Title::newFromText($uploadForm->mDesiredDestName); + if( $title === null ) { + return true; + } if ( $title->getNamespace() < 100 ) { $uploadForm->mDesiredDestName = preg_replace( "/:/", '-', $uploadForm->mDesiredDestName ); } else { -- To view, visit https://gerrit.wikimedia.org/r/192303 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iada71324a867d9794dee3ce707236e2aca03132f Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/NSFileRepo Gerrit-Branch: master Gerrit-Owner: Robert Vogel Gerrit-Reviewer: Jpond Gerrit-Reviewer: Robert Vogel Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] SpaceyParenthesesSniff: Modify sniff to search for extra/unn... - change (mediawiki...codesniffer)
jenkins-bot has submitted this change and it was merged. Change subject: SpaceyParenthesesSniff: Modify sniff to search for extra/unnecessary space .. SpaceyParenthesesSniff: Modify sniff to search for extra/unnecessary space Disallow `wfFoo( )` as well as `wfFoo( $param )`. Bug: T101760 Change-Id: I02159d20867bee0190bbd0655ae80a6c0253dd20 --- M MediaWiki/Sniffs/WhiteSpace/SpaceyParenthesisSniff.php M MediaWiki/Tests/files/WhiteSpace/spacey_parenthesis_fail.php 2 files changed, 58 insertions(+), 14 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/MediaWiki/Sniffs/WhiteSpace/SpaceyParenthesisSniff.php b/MediaWiki/Sniffs/WhiteSpace/SpaceyParenthesisSniff.php index 0e90024..c7b783b 100644 --- a/MediaWiki/Sniffs/WhiteSpace/SpaceyParenthesisSniff.php +++ b/MediaWiki/Sniffs/WhiteSpace/SpaceyParenthesisSniff.php @@ -5,6 +5,8 @@ * wfFoo( $arg, $arg2 ); * * But, wfFoo() is ok. + * + * Also disallow wfFoo( ) and wfFoo( $param ) */ // @codingStandardsIgnoreStart class MediaWiki_Sniffs_WhiteSpace_SpaceyParenthesisSniff @@ -19,6 +21,7 @@ public function process( PHP_CodeSniffer_File $phpcsFile, $stackPtr ) { $tokens = $phpcsFile->getTokens(); + $currentToken = $tokens[$stackPtr]; if ( $currentToken['code'] === T_OPEN_PARENTHESIS @@ -34,6 +37,25 @@ ); } + // Check for space between parentheses without any arguments + if ( $currentToken['code'] === T_OPEN_PARENTHESIS + && $tokens[$stackPtr + 1]['code'] === T_WHITESPACE + && $tokens[$stackPtr + 2]['code'] === T_CLOSE_PARENTHESIS ) { + $phpcsFile->addWarning( + 'Unnecessary space found within parentheses', + $stackPtr + 1, + 'UnnecessarySpaceBetweenParentheses' + ); + return; + } + + // Same check as above, but ignore since it was already processed + if ( $currentToken['code'] === T_CLOSE_PARENTHESIS + && $tokens[$stackPtr - 1]['code'] === T_WHITESPACE + && $tokens[$stackPtr - 2]['code'] === T_OPEN_PARENTHESIS ) { + return; + } + if ( $currentToken['code'] === T_OPEN_PARENTHESIS ) { $this->processOpenParenthesis( $phpcsFile, $tokens, $stackPtr ); } else { @@ -44,31 +66,51 @@ protected function processOpenParenthesis( PHP_CodeSniffer_File $phpcsFile, $tokens, $stackPtr ) { $nextToken = $tokens[$stackPtr + 1]; - if ( $nextToken['code'] === T_CLOSE_PARENTHESIS || $nextToken['code'] === T_WHITESPACE ) { - return; + // No space or not single space + if ( ( $nextToken['code'] === T_WHITESPACE && + strpos( $nextToken['content'], "\n" ) === false + && $nextToken['content'] != ' ' ) + || ( $nextToken['code'] !== T_CLOSE_PARENTHESIS && $nextToken['code'] !== T_WHITESPACE ) ) { + $phpcsFile->addWarning( + 'Single space expected after opening parenthesis', + $stackPtr + 1, + 'SingleSpaceAfterOpenParenthesis' + ); } - - $phpcsFile->addWarning( - 'No space after parenthesis', - $stackPtr + 1, - 'Open' - ); } protected function processCloseParenthesis( PHP_CodeSniffer_File $phpcsFile, $tokens, $stackPtr ) { $previousToken = $tokens[$stackPtr - 1]; + if ( $previousToken['code'] === T_OPEN_PARENTHESIS - || $previousToken['code'] === T_WHITESPACE + || ( $previousToken['code'] === T_WHITESPACE + && $previousToken['content'] === ' ' ) || ( $previousToken['code'] === T_COMMENT - && substr( $previousToken['content'], -1, 1 ) === "\n" ) ) { + && substr( $previousToken['content'], -1, 1 ) === "\n" ) ) { + // If previous token was + // '(' or ' ' or a comment ending with a newline + return; + } + + // If any of the whitespace tokens immediately before this token have a newline + $ptr = $stackPtr - 1; + while ( $tokens[$ptr]['code'] === T_WHITESPACE ) { + if ( strpos( $tokens[$ptr]['content'], "\n" ) !==
[MediaWiki-commits] [Gerrit] Use FormSpecialPage in SpecialGlobalBlockStatus - change (mediawiki...GlobalBlocking)
jenkins-bot has submitted this change and it was merged. Change subject: Use FormSpecialPage in SpecialGlobalBlockStatus .. Use FormSpecialPage in SpecialGlobalBlockStatus Other changes: * Some minor code style changes * Replaced successub message with buildSubtitleLinks() * Removed redundant "return to list" from two messages Change-Id: Ia6f90df41f2acfff47dcbfce30d7694238da5e56 --- M i18n/en.json M includes/specials/SpecialGlobalBlockStatus.php 2 files changed, 68 insertions(+), 116 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/i18n/en.json b/i18n/en.json index ef3c07e..5f748bb 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -73,10 +73,8 @@ "globalblocking-whitelist-submit": "Change local status", "globalblocking-whitelist-whitelisted": "You have successfully disabled the global block #$2 on the IP address '''$1''' on {{SITENAME}}.", "globalblocking-whitelist-dewhitelisted": "You have successfully re-enabled the global block #$2 on the IP address '''$1''' on {{SITENAME}}.", - "globalblocking-whitelist-successsub": "Local status successfully changed.", - "globalblocking-whitelist-nochange": "You made no change to the local status of this block.\n[[Special:GlobalBlockList|Return to the global block list]].", - "globalblocking-whitelist-errors": "Your change to the local status of a global block was unsuccessful, for the following {{PLURAL:$1|reason|reasons}}:", - "globalblocking-whitelist-intro": "You can use this form to edit the local status of a global block.\nIf a global block is disabled on this wiki, users on the affected IP address will be able to edit normally.\n[[Special:GlobalBlockList|Return to the global block list]].", + "globalblocking-whitelist-nochange": "You made no change to the local status of this block.", + "globalblocking-whitelist-intro": "You can use this form to edit the local status of a global block.\nIf a global block is disabled on this wiki, users on the affected IP address will be able to edit normally.", "globalblocking-ipblocked": "'''Your IP address has been blocked on all wikis.'''\n\nThe block was made by $1 ($2).\nThe reason given is ''$3''.\n\n* Start of block: $4\n* Expiry of block: $5\n\nYou can contact $1 to discuss the block.\nYou cannot use the \"{{int:emailuser}}\" feature unless a valid email address is specified in your [[Special:Preferences|account preferences]] and you have not been blocked from using it.\nYour current IP address is $6.\nPlease include all above details in any queries you make.", "globalblocking-ipblocked-xff": "'''One or more proxy servers used by your request is globally blocked'''\n\nThe block was made by $1 ($2).\nThe reason given is ''$3''.\n\n* Start of block: $4\n* Expiry of block: $5\n\nYou can contact $1 to discuss the block.\nYou cannot use the \"{{int:emailuser}}\" feature unless a valid email address is specified in your [[Special:Preferences|account preferences]] and you have not been blocked from using it.\nThe blocked proxy address was $6.\nPlease include all above details in any queries you make.", "globalblocking-blocked-nopassreset": "You cannot reset user's passwords because you are blocked globally.", diff --git a/includes/specials/SpecialGlobalBlockStatus.php b/includes/specials/SpecialGlobalBlockStatus.php index 9a3abdd..a673237 100644 --- a/includes/specials/SpecialGlobalBlockStatus.php +++ b/includes/specials/SpecialGlobalBlockStatus.php @@ -1,83 +1,41 @@ setHeaders(); - - $this->loadParameters(); + $this->checkExecutePermissions( $this->getUser() ); $out = $this->getOutput(); + $out->enableClientCache( false ); $out->setPageTitle( $this->msg( 'globalblocking-whitelist' ) ); $out->setSubtitle( GlobalBlocking::buildSubtitleLinks( $this ) ); - $out->setRobotPolicy( "noindex,nofollow" ); - $out->setArticleRelated( false ); - $out->enableClientCache( false ); - if ( !$this->userCanExecute( $this->getUser() ) ) { - $this->displayRestrictionError(); - return; - } - - global $wgApplyGlobalBlocks; if ( !$wgApplyGlobalBlocks ) { $out->addWikiMsg( 'globalblocking-whitelist-notapplied' ); return; } - - $errors = ''; - - $request = $this->getRequest(); - if ( $request->wasPosted() && $this->getUser()->matchEditToken( $request->getVal( 'wpEditToken' ) ) ) { - // They want to submit. Let's have a look. - $errors = $this->trySubmit(); - if ( !$errors ) { - // Su
[MediaWiki-commits] [Gerrit] Remove everything but a note - change (mediawiki...PrefSwitch)
jenkins-bot has submitted this change and it was merged. Change subject: Remove everything but a note .. Remove everything but a note This is no longer maintained. Some extensions from the UsabilityInitiative are generic and re-uable. But this was just an internal utility that no longer surves any purpose. Older branches remain available. Current code should not be branched into release branches. Change-Id: I3dd7c2f774e21024d24f6afc0a66bbb39cfa55af --- D .gitignore D PrefSwitch.alias.php D PrefSwitch.classes.php D PrefSwitch.hooks.php D PrefSwitch.i18n.php M PrefSwitch.php M README D SpecialPrefSwitch.php D i18n/af.json D i18n/aln.json D i18n/an.json D i18n/ar.json D i18n/arc.json D i18n/ba.json D i18n/bar.json D i18n/be-tarask.json D i18n/be.json D i18n/bg.json D i18n/bjn.json D i18n/bn.json D i18n/bpy.json D i18n/br.json D i18n/bs.json D i18n/ca.json D i18n/ce.json D i18n/ckb.json D i18n/cs.json D i18n/cu.json D i18n/cv.json D i18n/cy.json D i18n/da.json D i18n/de-formal.json D i18n/de.json D i18n/diq.json D i18n/dsb.json D i18n/ee.json D i18n/el.json D i18n/en.json D i18n/eo.json D i18n/es.json D i18n/et.json D i18n/eu.json D i18n/fa.json D i18n/fi.json D i18n/fr.json D i18n/frp.json D i18n/gd.json D i18n/gl.json D i18n/gsw.json D i18n/gv.json D i18n/ha.json D i18n/he.json D i18n/hr.json D i18n/hsb.json D i18n/hu.json D i18n/ia.json D i18n/id.json D i18n/ig.json D i18n/io.json D i18n/it.json D i18n/ja.json D i18n/jbo.json D i18n/ka.json D i18n/km.json D i18n/kn.json D i18n/ko.json D i18n/krc.json D i18n/ksh.json D i18n/ku-latn.json D i18n/lb.json D i18n/li.json D i18n/lt.json D i18n/lv.json D i18n/min.json D i18n/mk.json D i18n/ml.json D i18n/mn.json D i18n/mr.json D i18n/ms.json D i18n/mt.json D i18n/myv.json D i18n/nah.json D i18n/nb.json D i18n/nds-nl.json D i18n/nl.json D i18n/nn.json D i18n/nso.json D i18n/oc.json D i18n/pdc.json D i18n/pl.json D i18n/pms.json D i18n/ps.json D i18n/pt-br.json D i18n/pt.json D i18n/qqq.json D i18n/qu.json D i18n/ro.json D i18n/roa-tara.json D i18n/ru.json D i18n/rue.json D i18n/sah.json D i18n/sc.json D i18n/scn.json D i18n/si.json D i18n/sk.json D i18n/sl.json D i18n/sr-ec.json D i18n/sr-el.json D i18n/su.json D i18n/sv.json D i18n/sw.json D i18n/ta.json D i18n/te.json D i18n/th.json D i18n/tk.json D i18n/tl.json D i18n/tr.json D i18n/tt-cyrl.json D i18n/tt-latn.json D i18n/tt.json D i18n/ug-arab.json D i18n/uk.json D i18n/vec.json D i18n/vi.json D i18n/vo.json D i18n/wa.json D i18n/yi.json D i18n/yo.json D i18n/yue.json D i18n/zh-hans.json D i18n/zh-hant.json D modules/ext.prefSwitch.css D modules/ext.prefSwitch.js D patches/PrefSwitch-addusertext.sql D patches/PrefSwitch.sql 135 files changed, 4 insertions(+), 6,900 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified -- To view, visit https://gerrit.wikimedia.org/r/218110 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3dd7c2f774e21024d24f6afc0a66bbb39cfa55af Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/PrefSwitch Gerrit-Branch: master Gerrit-Owner: Krinkle Gerrit-Reviewer: Bartosz Dziewoński Gerrit-Reviewer: Legoktm Gerrit-Reviewer: Siebrand Gerrit-Reviewer: Springle Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove everything but a note - change (mediawiki...SimpleSurvey)
jenkins-bot has submitted this change and it was merged. Change subject: Remove everything but a note .. Remove everything but a note This is no longer maintained and not compatible with current MediaWiki releases. The mass-replace updates are not useful and the release branches confusing as they don't actually work. While other extensions from the UsabilityInitiative were generic and re-uable the survey component was not. Change-Id: I3dd7c2f774e21024d24f6afc0a66bbb39cfa55af --- D .gitignore M README D SimpleSurvey.classes.php D SimpleSurvey.i18n.php M SimpleSurvey.php D SpecialSimpleSurvey.php D Surveys.php D i18n/en.json 8 files changed, 5 insertions(+), 541 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 98b092a..000 --- a/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -.svn -*~ -*.kate-swp -.*.swp diff --git a/README b/README index 7e26513..47051bb 100644 --- a/README +++ b/README @@ -1,6 +1,3 @@ -# -# THIS EXTENSION DEPENDS ON CODE THAT HAS BEEN MOVED TO A BRANCH, AND NO LONGER EXISTS IN TRUNK! -# -# TO SATISTFY THE DEPENDENCIES OF THIS CODE, YOU MUST GET THE UsabilityInitiative EXTENSION FROM ONE OF THE FOLLOWING: -# /branches/REL1_16/extensions/UsabilityInitiative/ -- official release version -# /branches/usability-initiative-1_16/ -- intermediate version with more recent patches, should be merged soon \ No newline at end of file +The SimpleSurvey extension has been discontinued. + +See: https://www.mediawiki.org/wiki/Extension:SimpleSurvey diff --git a/SimpleSurvey.classes.php b/SimpleSurvey.classes.php deleted file mode 100644 index 385bb0c..000 --- a/SimpleSurvey.classes.php +++ /dev/null @@ -1,107 +0,0 @@ -addExtensionUpdate( array( 'addTable', 'prefswitch_survey', - dirname( dirname( __FILE__ ) ) . "/PrefSwitch/patches/PrefSwitch.sql", true ) ); - } - return true; - } - - /** -* creates a random token -* @return a random token -*/ - public static function generateRandomCookieID() { - return MWCryptRand::generateHex( 32 ); - } - - - /** -* Render the HTML for a survey. -* @param $name string Survey name -* @param $questions array Array containing question data -* @param $loadFromDB bool Load previous survey data from the database -* @return string HTML -*/ - public static function render( $name, $questions, $loadFromDB = false ) { - $html = Xml::openElement( 'dl' ); - foreach ( $questions as $field => $config ) { - $answer = null; - $answerData = null; - $invisible = false; - if ( isset( $config['visibility'] ) && $config['visibility'] == 'hidden' ) { - $invisible = true; - } - if ( $invisible ) { - $html .= Xml::openElement( 'div', array( "style" => "display:none;" ) ); - } - $html .= call_user_func( array( self::$fieldTypes[$config['type']], 'render' ), - $field, $config, $answer, $answerData - ); - if ( $invisible ) { - $html .= Xml::closeElement( 'div' ); - } - } - $html .= Xml::closeElement( 'dl' ); - return $html; - } - - /** -* Save a survey to the database -* @param $name string Survey name -* @param $survey array Survey configuration data -*/ - public static function save( $name, $survey ) { - global $wgRequest, $wgUser; - $dbw = wfGetDb( DB_MASTER ); - $now = $dbw->timestamp(); - /*$cookieID = $wgRequest->getCookie( "vitals-survey" ); - if ( $cookieID == null ) { - $cookieID = self::generateRandomCookieID(); - $wgRequest->response()->setcookie( "vitals-survey", $cookieID ); - }*/ - - foreach ( $survey['questions'] as $question => $config ) { - $dbw->insert( - 'prefswitch_survey', - array_merge( - array( - 'pss_user' => $wgUser->getId(), - 'pss_user_text' => $wgUser->getName(), - 'pss_timestamp' => $now, - 'pss_name' => $name, - 'pss_question' => $q
[MediaWiki-commits] [Gerrit] Set hhvm.hack.lang.iconv_ignore_correct for //IGNORE behavior - change (operations/puppet)
Ori.livneh has submitted this change and it was merged. Change subject: Set hhvm.hack.lang.iconv_ignore_correct for //IGNORE behavior .. Set hhvm.hack.lang.iconv_ignore_correct for //IGNORE behavior Enable the HHVM specific setting to work around glibc 2.14+ iconv handling for '//IGNORE'. Bug: T98882 Change-Id: I197d2437a5553997eaf435db310107a02b6e40f0 --- M modules/hhvm/manifests/init.pp 1 file changed, 5 insertions(+), 0 deletions(-) Approvals: Ori.livneh: Verified; Looks good to me, approved diff --git a/modules/hhvm/manifests/init.pp b/modules/hhvm/manifests/init.pp index a2165ad..e9beb0f 100644 --- a/modules/hhvm/manifests/init.pp +++ b/modules/hhvm/manifests/init.pp @@ -132,6 +132,11 @@ light_process_count => 5, light_process_file_prefix => '/var/tmp/hhvm', }, +hack => { +lang => { +iconv_ignore_correct => true, +}, +}, }, } -- To view, visit https://gerrit.wikimedia.org/r/218271 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I197d2437a5553997eaf435db310107a02b6e40f0 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BryanDavis Gerrit-Reviewer: BryanDavis Gerrit-Reviewer: Giuseppe Lavagetto Gerrit-Reviewer: Hashar Gerrit-Reviewer: Ori.livneh Gerrit-Reviewer: Smalyshev Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] jobqueue: use more sensible metric key names - change (mediawiki/core)
Ori.livneh has uploaded a new change for review. https://gerrit.wikimedia.org/r/218292 Change subject: jobqueue: use more sensible metric key names .. jobqueue: use more sensible metric key names * Since JobQueue metrics are qualified with 'jobqueue.', don't add a 'job-' prefix to each metric. * Separate the key from the job type with a dot rather than a dash. * To avoid having a Graphite node that is both a "directory" and a metric, use '.all' as a suffix for aggregates. Change-Id: I2ac604d3c042dbfb0b3a27759800f435ec22041e --- M includes/jobqueue/JobQueue.php M includes/jobqueue/JobQueueDB.php M includes/jobqueue/JobQueueRedis.php M includes/jobqueue/JobRunner.php 4 files changed, 15 insertions(+), 16 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/92/218292/1 diff --git a/includes/jobqueue/JobQueue.php b/includes/jobqueue/JobQueue.php index 1cf1b4b..b4a2184 100644 --- a/includes/jobqueue/JobQueue.php +++ b/includes/jobqueue/JobQueue.php @@ -365,7 +365,7 @@ // Flag this job as an old duplicate based on its "root" job... try { if ( $job && $this->isRootJobOldDuplicate( $job ) ) { - JobQueue::incrStats( 'job-pop-duplicate', $this->type ); + JobQueue::incrStats( 'dupe_pops', $this->type ); $job = DuplicateJob::newFromJob( $job ); // convert to a no-op } } catch ( Exception $e ) { @@ -687,7 +687,7 @@ if ( !$stats ) { $stats = RequestContext::getMain()->getStats(); } - $stats->updateCount( "jobqueue.{$key}", $delta ); + $stats->updateCount( "jobqueue.{$key}.all", $delta ); $stats->updateCount( "jobqueue.{$key}.{$type}", $delta ); } diff --git a/includes/jobqueue/JobQueueDB.php b/includes/jobqueue/JobQueueDB.php index 3dc36bd..d1e4a13 100644 --- a/includes/jobqueue/JobQueueDB.php +++ b/includes/jobqueue/JobQueueDB.php @@ -245,10 +245,8 @@ foreach ( array_chunk( $rows, 50 ) as $rowBatch ) { $dbw->insert( 'job', $rowBatch, $method ); } - JobQueue::incrStats( 'job-insert', $this->type, count( $rows ) ); - JobQueue::incrStats( - 'job-insert-duplicate', - $this->type, + JobQueue::incrStats( 'inserts', $this->type, count( $rows ) ); + JobQueue::incrStats( 'dupe_inserts', $this->type, count( $rowSet ) + count( $rowList ) - count( $rows ) ); } catch ( DBError $e ) { @@ -293,7 +291,7 @@ if ( !$row ) { break; // nothing to do } - JobQueue::incrStats( 'job-pop', $this->type ); + JobQueue::incrStats( 'pops', $this->type ); // Get the job object from the row... $title = Title::makeTitle( $row->job_namespace, $row->job_title ); $job = Job::factory( $row->job_cmd, $title, @@ -479,7 +477,7 @@ $dbw->delete( 'job', array( 'job_cmd' => $this->type, 'job_id' => $job->metadata['id'] ), __METHOD__ ); - JobQueue::incrStats( 'job-ack', $this->type ); + JobQueue::incrStats( 'acks', $this->type ); } catch ( DBError $e ) { $this->throwDBException( $e ); } @@ -679,7 +677,7 @@ ); $affected = $dbw->affectedRows(); $count += $affected; - JobQueue::incrStats( 'job-recycle', $this->type, $affected ); + JobQueue::incrStats( 'recycles', $this->type, $affected ); $this->aggr->notifyQueueNonEmpty( $this->wiki, $this->type ); } } @@ -706,7 +704,7 @@ $dbw->delete( 'job', array( 'job_id' => $ids ), __METHOD__ ); $affected = $dbw->affectedRows(); $count += $affected; - JobQueue::incrStats( 'job-abandon', $this->type, $affected ); + JobQueue::incrStats( 'abandons', $this->type, $affected ); } $dbw->unlock( "jobqueue-recycle-{$this->type}
[MediaWiki-commits] [Gerrit] Vagrant role for convenient enabling of PSR-3 logging - change (mediawiki/vagrant)
Gergő Tisza has uploaded a new change for review. https://gerrit.wikimedia.org/r/218291 Change subject: Vagrant role for convenient enabling of PSR-3 logging .. Vagrant role for convenient enabling of PSR-3 logging Change-Id: I5b11aa4747b9daa8184e0bef76d2a06110facca7 --- A puppet/modules/role/files/psr3/settings.php.erb A puppet/modules/role/manifests/psr3.pp 2 files changed, 77 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant refs/changes/91/218291/1 diff --git a/puppet/modules/role/files/psr3/settings.php.erb b/puppet/modules/role/files/psr3/settings.php.erb new file mode 100644 index 000..80e4583 --- /dev/null +++ b/puppet/modules/role/files/psr3/settings.php.erb @@ -0,0 +1,68 @@ +// copied from the phpdoc in includes/debug/logger/MonologSpi.php +$wgMWLoggerDefaultSpi = array( + 'class' => '\\MediaWiki\\Logger\\MonologSpi', + 'args' => array( array( + 'loggers' => array( + '@default' => array( + 'processors' => array( 'wiki', 'psr', 'pid', 'uid', 'web' ), + 'handlers' => array( 'stream' ), + ), + 'runJobs' => array( + 'processors' => array( 'wiki', 'psr', 'pid' ), + 'handlers' => array( 'stream' ), + ) + ), + 'processors' => array( + 'wiki' => array( + 'class' => '\\MediaWiki\\Logger\\Monolog\\WikiProcessor', + ), + 'psr' => array( + 'class' => '\\Monolog\\Processor\\PsrLogMessageProcessor', + ), + 'pid' => array( + 'class' => '\\Monolog\\Processor\\ProcessIdProcessor', + ), + 'uid' => array( + 'class' => '\\Monolog\\Processor\\UidProcessor', + ), + 'web' => array( + 'class' => '\\Monolog\\Processor\\WebProcessor', + ), + ), + 'handlers' => array( + 'stream' => array( + 'class' => '\\Monolog\\Handler\\StreamHandler', + 'args' => array( 'path/to/your.log' ), + 'formatter' => 'line', + ), + 'redis' => array( + 'class' => '\\Monolog\\Handler\\RedisHandler', + 'args' => array( function() { + $redis = new Redis(); + $redis->connect( '127.0.0.1', 6379 ); + return $redis; + }, + 'logstash' + ), + 'formatter' => 'logstash', + ), + 'udp2log' => array( + 'class' => '\\MediaWiki\\Logger\\Monolog\\LegacyHandler', + 'args' => array( + 'udp://127.0.0.1:8420/mediawiki + ), + 'formatter' => 'line', + ), + ), + 'formatters' => array( + 'line' => array( + 'class' => '\\Monolog\\Formatter\\LineFormatter', +), +'logstash' => array( +'class' => '\\Monolog\\Formatter\\LogstashFormatter', +'args' => array( 'mediawiki', php_uname( 'n' ), null, '', 1 ), +), + ), + ) ), + ); + diff --git a/puppet/modules/role/manifests/psr3.pp b/puppet/modules/role/manifests/psr3.pp new file mode 100644 index 000..6710c9e --- /dev/null +++ b/puppet/modules/role/manifests/psr3.pp @@ -0,0 +1,9 @@ +# == Class: role::psr +# Sets up PSR-3 structured logging (the way it is done on Wikimedia wikis) +# +class role::psr () { +mediawiki::settings { 'psr3': +priority => 1, +value=> template('role/psr/settings.php.erb'), +} +} -- To view, visit https://gerrit.wikimedia.org/r/218291 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5b11aa4747b9daa8184e0bef76d2a06110facca7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: Gergő Tisza ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] depool db1057, take #2 - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: depool db1057, take #2 .. depool db1057, take #2 Change-Id: I35fef5a3b9898ba2af9525812b43c8af1960a630 --- M wmf-config/db-eqiad.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Springle: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php index 4b4c0f3..d5a26cf 100755 --- a/wmf-config/db-eqiad.php +++ b/wmf-config/db-eqiad.php @@ -92,7 +92,7 @@ 'db1051' => 0, # 2.8TB 96GB, vslow, dump 'db1055' => 0, # 2.8TB 96GB, watchlist, recentchanges, contributions, logpager 'db1053' => 200, # 2.8TB 96GB - 'db1057' => 200, # 2.8TB 96GB + # maintenance 'db1057' => 200, # 2.8TB 96GB 'db1065' => 100, # 2.8TB 160GB, api 'db1066' => 100, # 2.8TB 160GB, api 'db1072' => 500, # 2.8TB 160GB -- To view, visit https://gerrit.wikimedia.org/r/218290 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I35fef5a3b9898ba2af9525812b43c8af1960a630 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Springle Gerrit-Reviewer: Springle Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] depool db1057, take #2 - change (operations/mediawiki-config)
Springle has uploaded a new change for review. https://gerrit.wikimedia.org/r/218290 Change subject: depool db1057, take #2 .. depool db1057, take #2 Change-Id: I35fef5a3b9898ba2af9525812b43c8af1960a630 --- 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/90/218290/1 diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php index 4b4c0f3..d5a26cf 100755 --- a/wmf-config/db-eqiad.php +++ b/wmf-config/db-eqiad.php @@ -92,7 +92,7 @@ 'db1051' => 0, # 2.8TB 96GB, vslow, dump 'db1055' => 0, # 2.8TB 96GB, watchlist, recentchanges, contributions, logpager 'db1053' => 200, # 2.8TB 96GB - 'db1057' => 200, # 2.8TB 96GB + # maintenance 'db1057' => 200, # 2.8TB 96GB 'db1065' => 100, # 2.8TB 160GB, api 'db1066' => 100, # 2.8TB 160GB, api 'db1072' => 500, # 2.8TB 160GB -- To view, visit https://gerrit.wikimedia.org/r/218290 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I35fef5a3b9898ba2af9525812b43c8af1960a630 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Springle ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix class name oversight in that last commit - change (mediawiki...intersection)
jenkins-bot has submitted this change and it was merged. Change subject: Fix class name oversight in that last commit .. Fix class name oversight in that last commit Whoops. Change-Id: If9d0b6f37636ffd9b129cfd0d87b4faaa044a722 --- M DynamicPageList.hooks.php 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Alex Monk: Looks good to me, approved jenkins-bot: Verified diff --git a/DynamicPageList.hooks.php b/DynamicPageList.hooks.php index 839aeb6..f2aada0 100644 --- a/DynamicPageList.hooks.php +++ b/DynamicPageList.hooks.php @@ -8,7 +8,7 @@ * @return boolean true */ public static function onParserFirstCallInit( &$parser ) { - $parser->setHook( 'DynamicPageList', 'renderDynamicPageList' ); + $parser->setHook( 'DynamicPageList', 'DynamicPageListHooks::renderDynamicPageList' ); return true; } @@ -607,4 +607,4 @@ return $output; } -} \ No newline at end of file +} -- To view, visit https://gerrit.wikimedia.org/r/218288 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If9d0b6f37636ffd9b129cfd0d87b4faaa044a722 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/intersection Gerrit-Branch: master Gerrit-Owner: Alex Monk Gerrit-Reviewer: Alex Monk Gerrit-Reviewer: Paladox Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix class name oversight in that last commit - change (mediawiki...intersection)
Alex Monk has uploaded a new change for review. https://gerrit.wikimedia.org/r/218288 Change subject: Fix class name oversight in that last commit .. Fix class name oversight in that last commit Whoops. Change-Id: If9d0b6f37636ffd9b129cfd0d87b4faaa044a722 --- M DynamicPageList.hooks.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/intersection refs/changes/88/218288/1 diff --git a/DynamicPageList.hooks.php b/DynamicPageList.hooks.php index 839aeb6..dcd5468 100644 --- a/DynamicPageList.hooks.php +++ b/DynamicPageList.hooks.php @@ -8,7 +8,7 @@ * @return boolean true */ public static function onParserFirstCallInit( &$parser ) { - $parser->setHook( 'DynamicPageList', 'renderDynamicPageList' ); + $parser->setHook( 'DynamicPageListHooks', 'renderDynamicPageList' ); return true; } @@ -607,4 +607,4 @@ return $output; } -} \ No newline at end of file +} -- To view, visit https://gerrit.wikimedia.org/r/218288 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If9d0b6f37636ffd9b129cfd0d87b4faaa044a722 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/intersection Gerrit-Branch: master Gerrit-Owner: Alex Monk ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Move global functions into static class in separate file - change (mediawiki...intersection)
jenkins-bot has submitted this change and it was merged. Change subject: Move global functions into static class in separate file .. Move global functions into static class in separate file In preparation for extension.json Change-Id: I77b03140a4f143c4d514fe58fca9a8b578db1352 --- A DynamicPageList.hooks.php M DynamicPageList.php 2 files changed, 613 insertions(+), 605 deletions(-) Approvals: Alex Monk: Looks good to me, approved jenkins-bot: Verified diff --git a/DynamicPageList.hooks.php b/DynamicPageList.hooks.php new file mode 100644 index 000..839aeb6 --- /dev/null +++ b/DynamicPageList.hooks.php @@ -0,0 +1,610 @@ + tag. +* @param Parser &$parser +* @return boolean true +*/ + public static function onParserFirstCallInit( &$parser ) { + $parser->setHook( 'DynamicPageList', 'renderDynamicPageList' ); + return true; + } + + /** +* The callback function for converting the input text to HTML output +*/ + public static function renderDynamicPageList( $input, $args, $mwParser ) { + global $wgContLang; + global $wgDisableCounters; // to determine if to allow sorting by #hits. + global $wgDLPmaxCategories, $wgDLPMaxResultCount, $wgDLPMaxCacheTime; + global $wgDLPAllowUnlimitedResults, $wgDLPAllowUnlimitedCategories; + + if ( $wgDLPMaxCacheTime !== false ) { + $mwParser->getOutput()->updateCacheExpiry( $wgDLPMaxCacheTime ); + } + + $countSet = false; + + $startList = ''; + $endList = ''; + $startItem = ''; + $endItem = ''; + $inlineMode = false; + + $useGallery = false; + $galleryFileSize = false; + $galleryFileName = true; + $galleryImageHeight = 0; + $galleryImageWidth = 0; + $galleryNumbRows = 0; + $galleryCaption = ''; + $gallery = null; + + $orderMethod = 'categoryadd'; + $order = 'descending'; + $redirects = 'exclude'; + $stable = $quality = 'include'; + $flaggedRevs = false; + + $namespaceFiltering = false; + $namespaceIndex = 0; + + $offset = 0; + + $googleHack = false; + + $suppressErrors = false; + $showNamespace = true; + $addFirstCategoryDate = false; + $dateFormat = ''; + $stripYear = false; + + $linkOptions = array(); + $categories = array(); + $excludeCategories = array(); + + $parameters = explode( "\n", $input ); + + $parser = new Parser; + $poptions = new ParserOptions; + + foreach ( $parameters as $parameter ) { + $paramField = explode( '=', $parameter, 2 ); + if( count( $paramField ) < 2 ) { + continue; + } + $type = trim( $paramField[0] ); + $arg = trim( $paramField[1] ); + switch ( $type ) { + case 'category': + $title = Title::makeTitleSafe( + NS_CATEGORY, + $parser->transformMsg( $arg, $poptions ) + ); + if( is_null( $title ) ) { + continue; + } + $categories[] = $title; + break; + case 'notcategory': + $title = Title::makeTitleSafe( + NS_CATEGORY, + $parser->transformMsg( $arg, $poptions ) + ); + if( is_null( $title ) ) { + continue; + } + $excludeCategories[] = $title; + break; + case 'namespace': + $ns = $wgContLang->getNsIndex( $arg ); + if ( $ns != null ) { + $namespaceIndex = $ns; + $namespaceFiltering = true; + } else { +
[MediaWiki-commits] [Gerrit] Only show 'patrol' link if there is an RC entry - change (mediawiki...Flow)
jenkins-bot has submitted this change and it was merged. Change subject: Only show 'patrol' link if there is an RC entry .. Only show 'patrol' link if there is an RC entry RecentChangesListener deliberately does not generate RC entries for imports. This avoids an error if there is no RC entry. Change-Id: I0c3b3262c42ce28f21acf7d864b462a1c5a3b1cd --- M includes/Formatter/RevisionViewFormatter.php 1 file changed, 10 insertions(+), 8 deletions(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Formatter/RevisionViewFormatter.php b/includes/Formatter/RevisionViewFormatter.php index 72c5f2f..9945a60 100644 --- a/includes/Formatter/RevisionViewFormatter.php +++ b/includes/Formatter/RevisionViewFormatter.php @@ -124,14 +124,16 @@ } $recentChange = $row->revision->getRecentChange(); - $user = $ctx->getUser(); - if ( ChangesList::isUnpatrolled( $recentChange, $user ) ) { - $links['markPatrolled'] = $this->urlGenerator->markRevisionPatrolledAction( - $title, - $workflowId, - $recentChange, - $user->getEditToken( $recentChange->getAttribute( 'rc_id' ) ) - ); + if ( $recentChange !== null ) { + $user = $ctx->getUser(); + if ( ChangesList::isUnpatrolled( $recentChange, $user ) ) { + $links['markPatrolled'] = $this->urlGenerator->markRevisionPatrolledAction( + $title, + $workflowId, + $recentChange, + $user->getEditToken( $recentChange->getAttribute( 'rc_id' ) ) + ); + } } return $links; -- To view, visit https://gerrit.wikimedia.org/r/217981 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0c3b3262c42ce28f21acf7d864b462a1c5a3b1cd Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Mattflaschen Gerrit-Reviewer: Catrope Gerrit-Reviewer: Sbisson Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] HTTPS: Remove 302 support - change (operations/puppet)
BBlack has uploaded a new change for review. https://gerrit.wikimedia.org/r/218287 Change subject: HTTPS: Remove 302 support .. HTTPS: Remove 302 support Our original over-conservative plans involved using a 302 initially and then switching to 301, on the theory that the 302 might make it easier to revert a bad traffic pattern quickly. In practice, there doesn't seem to be any real benefit from the 302-first strategy, so we're skipping that step going forward and don't need this block anymore. Change-Id: I0cf27312399b6d9f5f4af7dd9a37914366546311 --- M modules/varnish/templates/vcl/wikimedia.vcl.erb 1 file changed, 1 insertion(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/87/218287/1 diff --git a/modules/varnish/templates/vcl/wikimedia.vcl.erb b/modules/varnish/templates/vcl/wikimedia.vcl.erb index 86328e9..a88bf8f 100644 --- a/modules/varnish/templates/vcl/wikimedia.vcl.erb +++ b/modules/varnish/templates/vcl/wikimedia.vcl.erb @@ -179,14 +179,8 @@ } } -// *** HTTPS error code - implements 301/302 response for recv code +// *** HTTPS error code - implements 301 response for recv code sub https_error_redirect { - if (obj.status == 752) { - set obj.http.Location = req.http.Location; - set obj.status = 302; - set obj.http.Content-Length = "0"; // T64245 - return(deliver); - } if (obj.status == 751) { set obj.http.Location = req.http.Location; set obj.status = 301; -- To view, visit https://gerrit.wikimedia.org/r/218287 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0cf27312399b6d9f5f4af7dd9a37914366546311 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BBlack ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] HTTPS: no explicit proxy support - change (operations/puppet)
BBlack has uploaded a new change for review. https://gerrit.wikimedia.org/r/218286 Change subject: HTTPS: no explicit proxy support .. HTTPS: no explicit proxy support Change-Id: I48cdea76b3df1dfcf59df28c739a16a5494086ae --- M modules/varnish/templates/vcl/wikimedia.vcl.erb 1 file changed, 7 insertions(+), 25 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/86/218286/1 diff --git a/modules/varnish/templates/vcl/wikimedia.vcl.erb b/modules/varnish/templates/vcl/wikimedia.vcl.erb index 6734342..86328e9 100644 --- a/modules/varnish/templates/vcl/wikimedia.vcl.erb +++ b/modules/varnish/templates/vcl/wikimedia.vcl.erb @@ -171,17 +171,9 @@ sub https_recv_redirect { if (req.request == "GET" || req.request == "HEAD") { if (req.http.X-Forwarded-Proto != "https") { - if (req.url ~ "(?i)^https?:") { - if (req.url ~ "(?i)^https?://(ca|el|en|he|it|ru|ug|zh)\.") { - set req.http.Location = regsub(req.url, "(?i)^http:", "https:"); - error 751 "TLS Redirect"; - } - } - else { - if (req.http.Host ~ "(?i)^(ca|el|en|he|it|ru|ug|zh)\.") { - set req.http.Location = "https://"; + req.http.Host + req.url; - error 751 "TLS Redirect"; - } + if (req.http.Host ~ "(?i)^(ca|el|en|he|it|ru|ug|zh)\.") { + set req.http.Location = "https://"; + req.http.Host + req.url; + error 751 "TLS Redirect"; } } } @@ -206,21 +198,11 @@ // *** HTTPS deliver code - domain-based HSTS headers sub https_deliver_hsts { if (req.http.X-Forwarded-Proto == "https") { - if (req.url ~ "(?i)^https?:") { - if (req.url ~ "(?i)^https?://ru\.") { - set resp.http.Strict-Transport-Security = "max-age=15768000"; - } - else if (req.url ~ "(?i)^https?://(ca|el|en|he|it|ug|zh)\.") { - set resp.http.Strict-Transport-Security = "max-age=86400"; - } + if (req.http.Host ~ "(?i)^ru\.") { + set resp.http.Strict-Transport-Security = "max-age=15768000"; } - else { - if (req.http.Host ~ "(?i)^ru\.") { - set resp.http.Strict-Transport-Security = "max-age=15768000"; - } - else if (req.http.Host ~ "(?i)^(ca|el|en|he|it|ug|zh)\.") { - set resp.http.Strict-Transport-Security = "max-age=86400"; - } + else if (req.http.Host ~ "(?i)^(ca|el|en|he|it|ug|zh)\.") { + set resp.http.Strict-Transport-Security = "max-age=86400"; } } } -- To view, visit https://gerrit.wikimedia.org/r/218286 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I48cdea76b3df1dfcf59df28c739a16a5494086ae Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BBlack ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove usage of $wgRedactedFunctionArguments - change (mediawiki...LdapAuthentication)
jenkins-bot has submitted this change and it was merged. Change subject: Remove usage of $wgRedactedFunctionArguments .. Remove usage of $wgRedactedFunctionArguments Change-Id: If20ac745e22fe5efce00a374210b540610720522 --- M LdapAuthentication.php 1 file changed, 0 insertions(+), 6 deletions(-) Approvals: Alex Monk: Looks good to me, approved jenkins-bot: Verified diff --git a/LdapAuthentication.php b/LdapAuthentication.php index 5b258fc..e603a5b 100644 --- a/LdapAuthentication.php +++ b/LdapAuthentication.php @@ -95,12 +95,6 @@ # Schema changes $wgHooks['LoadExtensionSchemaUpdates'][] = 'efLdapAuthenticationSchemaUpdates'; -$wgRedactedFunctionArguments['LdapAuthenticationPlugin::ldap_bind'] = 2; -$wgRedactedFunctionArguments['LdapAuthenticationPlugin::authenticate'] = 2; -$wgRedactedFunctionArguments['LdapAuthenticationPlugin::getPasswordHash'] = 0; -$wgRedactedFunctionArguments['LdapAuthenticationPlugin::bindAs'] = 1; -$wgRedactedFunctionArguments['LdapAuthenticationPlugin::setOrDefaultPrivate'] = 0; - /** * @param $updater DatabaseUpdater * @return bool -- To view, visit https://gerrit.wikimedia.org/r/187411 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If20ac745e22fe5efce00a374210b540610720522 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/LdapAuthentication Gerrit-Branch: master Gerrit-Owner: Legoktm Gerrit-Reviewer: Alex Monk Gerrit-Reviewer: Ryan Lane Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] remove clicktracking-session= VCL hacks - change (operations/puppet)
BBlack has submitted this change and it was merged. Change subject: remove clicktracking-session= VCL hacks .. remove clicktracking-session= VCL hacks When sampling varnish logs, the bulk of these have been wiped out at this point, so removed the unsetter and the session-cookie workaround for them. Change-Id: I466b49bebd77f93a9819dcc074d39e1c14aa9da6 --- M templates/varnish/text-common.inc.vcl.erb M templates/varnish/text-frontend.inc.vcl.erb 2 files changed, 1 insertion(+), 14 deletions(-) Approvals: Ori.livneh: Looks good to me, but someone else must approve Faidon Liambotis: Looks good to me, but someone else must approve BBlack: Verified; Looks good to me, approved diff --git a/templates/varnish/text-common.inc.vcl.erb b/templates/varnish/text-common.inc.vcl.erb index b3bf9cb..a620f07 100644 --- a/templates/varnish/text-common.inc.vcl.erb +++ b/templates/varnish/text-common.inc.vcl.erb @@ -29,12 +29,7 @@ // the temporary live deployment on large wikis of: // https://gerrit.wikimedia.org/r/#/c/176948 // Can be removed when most matching cookies have gone away... - // I've added another temporary exception here for the - // clicktracking-session= cookie I've been observing in our traffic - // lately. I think we haven't set this in a long time, but it's still - // out there in browsers, possibly due to lack of expiry. We may need - // to explicitly send out some cookie-deletes for it to fix - if (req.http.Cookie ~ "((? - // Delete old/stale clicktracking-session cookies. - // We supposedly stopped setting these back in Apr-2013, but they were originally - // set with no expiry (permanent), and we're still seeing a fair number of them in the wild, - // and they accidentally match our global session-cookie regex. - if (req.http.Cookie ~ "clicktracking-session=" || req.http.Orig-Cookie ~ "clicktracking-session=") { - header.append(resp.http.Set-Cookie, "clicktracking-session=x; path=/; expires=Thu, 01 Jan 1970 00:00:00 GMT"); - } - // Assemble X-Analytics header // Some of the headers used for X-Analytics are not varied on, so add them after the backend processing // Note that vcl_deliver in other files may also modify X-Analytics. -- To view, visit https://gerrit.wikimedia.org/r/217676 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I466b49bebd77f93a9819dcc074d39e1c14aa9da6 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BBlack Gerrit-Reviewer: BBlack Gerrit-Reviewer: Faidon Liambotis Gerrit-Reviewer: Ori.livneh 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 s/en/de/ for LVS monitoring; switch ProxyFetch to TLS - change (operations/puppet)
BBlack has uploaded a new change for review. https://gerrit.wikimedia.org/r/218285 Change subject: Revert s/en/de/ for LVS monitoring; switch ProxyFetch to TLS .. Revert s/en/de/ for LVS monitoring; switch ProxyFetch to TLS First, this reverts the change of the primary monitoring URLs (back to enwiki URLs). Also, for all of the public text/mobile/bits/upload endpoints the monitors are rearranged as follows: OLD: foo_80 (HTTP): IdleConn,ProxyFetch->http://bar foo_443 (HTTPS): IdleConn NEW: foo_80 (HTTP): IdleConn foo_443 (HTTPS): IdleConn,ProxyFetch->https://bar This gets us monitoring fetches over HTTPS (which is more important now), and skips over the issues of HTTP ProxyFetch failing on the (soon to be very very common) case of a 301 direct for HTTPS. Revert "Switch LVS monitoring to dewiki (mobile, too)" This reverts commit cd343f9c039cee7f89922871459c198082cd64d0. Revert "Switch LVS monitoring to dewiki" This reverts commit 89c1673c8a2fd7a0fe45b3c3bc044a46652bbc6a. Bug: T102393 Change-Id: Ic1ece34976962637e77a9a85bbd2fa7b4752999f --- M modules/lvs/manifests/configuration.pp 1 file changed, 7 insertions(+), 21 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/85/218285/1 diff --git a/modules/lvs/manifests/configuration.pp b/modules/lvs/manifests/configuration.pp index fc607bb..624b739 100644 --- a/modules/lvs/manifests/configuration.pp +++ b/modules/lvs/manifests/configuration.pp @@ -356,9 +356,6 @@ 'bgp' => 'yes', 'depool-threshold' => '.5', 'monitors' => { -'ProxyFetch' => { -'url' => [ 'http://de.wikipedia.org/wiki/Wikipedia:Hauptseite' ], -}, 'IdleConnection' => $idleconnection_monitor_options }, }, @@ -372,6 +369,7 @@ 'bgp' => 'no', 'depool-threshold' => '.5', 'monitors' => { +'ProxyFetch' => { 'url' => [ 'https://en.wikipedia.org/wiki/Main_Page' ] }, 'IdleConnection' => $idleconnection_monitor_options }, }, @@ -382,12 +380,7 @@ 'ip' => $service_ips['bits'][$::site], 'bgp' => "yes", 'depool-threshold' => ".5", -'monitors' => { -'ProxyFetch' => { -'url' => [ 'http://bits.wikimedia.org/pybal-test-file' ], -}, -'IdleConnection' => $idleconnection_monitor_options -}, +'monitors' => { 'IdleConnection' => $idleconnection_monitor_options }, }, "bits-https" => { 'description' => "Site assets (CSS/JS) LVS service, bits.${::site}.wikimedia.org", @@ -399,6 +392,7 @@ 'bgp' => 'no', 'depool-threshold' => '.5', 'monitors' => { +'ProxyFetch' => { 'url' => [ 'https://bits.wikimedia.org/pybal-test-file' ], }, 'IdleConnection' => $idleconnection_monitor_options }, }, @@ -409,12 +403,7 @@ 'ip' => $service_ips['upload'][$::site], 'bgp' => "yes", 'depool-threshold' => ".5", -'monitors' => { -'ProxyFetch' => { -'url' => [ 'http://upload.wikimedia.org/monitoring/backend' ], -}, -'IdleConnection' => $idleconnection_monitor_options -}, +'monitors' => { 'IdleConnection' => $idleconnection_monitor_options }, }, "upload-https" => { 'description' => "Images and other media, upload.${::site}.wikimedia.org", @@ -426,6 +415,7 @@ 'bgp' => "no", 'depool-threshold' => ".5", 'monitors' => { +'ProxyFetch' => { 'url' => [ 'https://upload.wikimedia.org/monitoring/backend' ], }, 'IdleConnection' => $idleconnection_monitor_options }, }, @@ -436,12 +426,7 @@ 'ip' => $service_ips['mobile'][$::site], 'bgp' => "yes", 'depool-threshold' => ".6", -'monitors' => { -'ProxyFetch' => { -'url' => [ 'http://de.m.wikipedia.org/wiki/Angelsberg' ], -}, -'IdleConnection' => $idleconnection_monitor_options -}, +'monitors' => { 'IdleConnection' => $idleconnection_monitor_options }, }, "mobile-https" => { 'description' => "MediaWiki based mobile site", @@ -453,6 +438,7 @@ 'bgp' => "no", 'depool-threshold' => ".6", 'monitors' => { +'ProxyFetch' => { 'url' => [ 'https://en.m.wikipedia.org/wiki/Angelsberg' ], }, 'IdleConnection' => $idleconnection_monitor_options }, }, -- To view, visit https://gerrit.wikim
[MediaWiki-commits] [Gerrit] Add missing use statements - change (mediawiki...Flow)
jenkins-bot has submitted this change and it was merged. Change subject: Add missing use statements .. Add missing use statements Change-Id: Iebbcaf75d919e9f57f9029df17244a61bb176871 --- M includes/Block/TopicSummary.php 1 file changed, 3 insertions(+), 1 deletion(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Block/TopicSummary.php b/includes/Block/TopicSummary.php index 127bcee..d71e794 100644 --- a/includes/Block/TopicSummary.php +++ b/includes/Block/TopicSummary.php @@ -4,6 +4,7 @@ use Flow\Container; use Flow\Exception\FailCommitException; +use Flow\Exception\FlowException; use Flow\Exception\InvalidActionException; use Flow\Exception\InvalidDataException; use Flow\Exception\InvalidInputException; @@ -11,6 +12,7 @@ use Flow\Formatter\PostSummaryViewQuery; use Flow\Formatter\PostSummaryQuery; use Flow\Formatter\RevisionViewFormatter; +use Flow\Formatter\RevisionViewQuery; use Flow\Model\PostRevision; use Flow\Model\PostSummary; use Flow\Model\UUID; @@ -342,7 +344,7 @@ protected function renderUndoApi( array $options ) { if ( $this->workflow->isNew() ) { - throw new FlowException( 'No header exists to undo' ); + throw new FlowException( 'No topic exists to undo' ); } if ( !isset( $options['startId'], $options['endId'] ) ) { -- To view, visit https://gerrit.wikimedia.org/r/218023 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iebbcaf75d919e9f57f9029df17244a61bb176871 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Matthias Mullie Gerrit-Reviewer: Catrope Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] RadioSelectInputWidget: Unbreak form submission in JS version - change (oojs/ui)
Bartosz Dziewoński has uploaded a new change for review. https://gerrit.wikimedia.org/r/218284 Change subject: RadioSelectInputWidget: Unbreak form submission in JS version .. RadioSelectInputWidget: Unbreak form submission in JS version I honestly have no idea what I was thinking when I put this .empty() call here. It removes this.$input from DOM, which means this widget's value would not be submitted with forms. Change-Id: If68f04a2fa20e7c03763898ab80cf39b5e6cb182 --- M src/widgets/RadioSelectInputWidget.js 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/84/218284/1 diff --git a/src/widgets/RadioSelectInputWidget.js b/src/widgets/RadioSelectInputWidget.js index 1c33455..d400370 100644 --- a/src/widgets/RadioSelectInputWidget.js +++ b/src/widgets/RadioSelectInputWidget.js @@ -43,7 +43,6 @@ this.setOptions( config.options || [] ); this.$element .addClass( 'oo-ui-radioSelectInputWidget' ) - .empty() .append( this.radioSelectWidget.$element ); }; -- To view, visit https://gerrit.wikimedia.org/r/218284 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If68f04a2fa20e7c03763898ab80cf39b5e6cb182 Gerrit-PatchSet: 1 Gerrit-Project: oojs/ui Gerrit-Branch: master Gerrit-Owner: Bartosz Dziewoński ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] fixup! SpecialResetTokens - change (mediawiki/core)
Bartosz Dziewoński has uploaded a new change for review. https://gerrit.wikimedia.org/r/218280 Change subject: fixup! SpecialResetTokens .. fixup! SpecialResetTokens Change-Id: I643e4d8538b512fb29f114037562ad21b0013533 --- M includes/specials/SpecialResetTokens.php 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/80/218280/1 diff --git a/includes/specials/SpecialResetTokens.php b/includes/specials/SpecialResetTokens.php index e7c3965..27a3a69 100644 --- a/includes/specials/SpecialResetTokens.php +++ b/includes/specials/SpecialResetTokens.php @@ -123,6 +123,10 @@ } } + protected function getDisplayFormat() { + return 'ooui'; + } + public function onSubmit( array $formData ) { if ( $formData['tokens'] ) { $user = $this->getUser(); @@ -135,10 +139,6 @@ } return false; - } - - protected function getDisplayFormat() { - return 'ooui'; } protected function getGroupName() { -- To view, visit https://gerrit.wikimedia.org/r/218280 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I643e4d8538b512fb29f114037562ad21b0013533 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Bartosz Dziewoński ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] SpecialResetTokens: Switch to OOUI form - change (mediawiki/core)
Bartosz Dziewoński has uploaded a new change for review. https://gerrit.wikimedia.org/r/218278 Change subject: SpecialResetTokens: Switch to OOUI form .. SpecialResetTokens: Switch to OOUI form Pretty! Change-Id: I30d401cc7c827b21eb2fb116558d0d9e764ec1f3 --- M includes/specials/SpecialResetTokens.php 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/78/218278/1 diff --git a/includes/specials/SpecialResetTokens.php b/includes/specials/SpecialResetTokens.php index ba2b9a5..e7c3965 100644 --- a/includes/specials/SpecialResetTokens.php +++ b/includes/specials/SpecialResetTokens.php @@ -137,6 +137,10 @@ return false; } + protected function getDisplayFormat() { + return 'ooui'; + } + protected function getGroupName() { return 'users'; } -- To view, visit https://gerrit.wikimedia.org/r/218278 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I30d401cc7c827b21eb2fb116558d0d9e764ec1f3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Bartosz Dziewoński ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] SpecialBlock: Switch to OOUI form - change (mediawiki/core)
Bartosz Dziewoński has uploaded a new change for review. https://gerrit.wikimedia.org/r/218281 Change subject: SpecialBlock: Switch to OOUI form .. SpecialBlock: Switch to OOUI form Change-Id: Ib8f7e03388073450ecff28ad2c0d3f9161f259d8 --- M includes/specials/SpecialBlock.php 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/81/218281/1 diff --git a/includes/specials/SpecialBlock.php b/includes/specials/SpecialBlock.php index 752edc3..da52784 100644 --- a/includes/specials/SpecialBlock.php +++ b/includes/specials/SpecialBlock.php @@ -118,6 +118,10 @@ } } + protected function getDisplayFormat() { + return 'ooui'; + } + /** * Get the HTMLForm descriptor array for the block form * @return array -- To view, visit https://gerrit.wikimedia.org/r/218281 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib8f7e03388073450ecff28ad2c0d3f9161f259d8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Bartosz Dziewoński ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] fixup! OOUIHTMLForm: Implement HTMLMultiSelectField - change (mediawiki/core)
Bartosz Dziewoński has uploaded a new change for review. https://gerrit.wikimedia.org/r/218279 Change subject: fixup! OOUIHTMLForm: Implement HTMLMultiSelectField .. fixup! OOUIHTMLForm: Implement HTMLMultiSelectField Change-Id: I9bb8d1fbb684720fe3e34d07ce4ef14572602726 --- M includes/htmlform/HTMLCheckMatrix.php M includes/htmlform/HTMLMultiSelectField.php 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/79/218279/1 diff --git a/includes/htmlform/HTMLCheckMatrix.php b/includes/htmlform/HTMLCheckMatrix.php index ce83499..a0566a0 100644 --- a/includes/htmlform/HTMLCheckMatrix.php +++ b/includes/htmlform/HTMLCheckMatrix.php @@ -156,7 +156,7 @@ return new OOUI\CheckboxInputWidget( array( 'name' => "{$this->mName}[]", 'selected' => $checked, - 'value' => '1', + 'value' => $attribs['value'], ) + $attribs ); } else { $checkbox = Xml::check( "{$this->mName}[]", $checked, $attribs ); diff --git a/includes/htmlform/HTMLMultiSelectField.php b/includes/htmlform/HTMLMultiSelectField.php index d2acc2f..523f045 100644 --- a/includes/htmlform/HTMLMultiSelectField.php +++ b/includes/htmlform/HTMLMultiSelectField.php @@ -72,7 +72,7 @@ new OOUI\CheckboxInputWidget( array( 'name' => "{$this->mName}[]", 'selected' => $checked, - 'value' => '1', + 'value' => $attribs['value'], ) + $attribs ), array( 'label' => $label, -- To view, visit https://gerrit.wikimedia.org/r/218279 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9bb8d1fbb684720fe3e34d07ce4ef14572602726 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Bartosz Dziewoński ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] test - change (mediawiki/core)
Bartosz Dziewoński has uploaded a new change for review. https://gerrit.wikimedia.org/r/218282 Change subject: test .. test Change-Id: I8945318ab4d1e4cee5cf97c779a37547507f26f6 --- M includes/htmlform/HTMLSelectField.php M includes/specials/SpecialBlock.php 2 files changed, 5 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/82/218282/1 diff --git a/includes/htmlform/HTMLSelectField.php b/includes/htmlform/HTMLSelectField.php index 6ba6966..4f5c4d0 100644 --- a/includes/htmlform/HTMLSelectField.php +++ b/includes/htmlform/HTMLSelectField.php @@ -54,6 +54,8 @@ if ( !empty( $this->mParams['disabled'] ) ) { $disabled = true; } + + var_dump($value); return new OOUI\DropdownInputWidget( array( 'name' => $this->mName, diff --git a/includes/specials/SpecialBlock.php b/includes/specials/SpecialBlock.php index da52784..5f668d1 100644 --- a/includes/specials/SpecialBlock.php +++ b/includes/specials/SpecialBlock.php @@ -118,9 +118,9 @@ } } - protected function getDisplayFormat() { - return 'ooui'; - } + // protected function getDisplayFormat() { + // return 'ooui'; + // } /** * Get the HTMLForm descriptor array for the block form -- To view, visit https://gerrit.wikimedia.org/r/218282 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8945318ab4d1e4cee5cf97c779a37547507f26f6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Bartosz Dziewoński ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] test - change (mediawiki/core)
Bartosz Dziewoński has uploaded a new change for review. https://gerrit.wikimedia.org/r/218283 Change subject: test .. test Change-Id: I8ddc93da1a4b4100618d8cd15ca56fe18c2ff1e5 --- M resources/lib/oojs-ui/oojs-ui.js 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/83/218283/1 diff --git a/resources/lib/oojs-ui/oojs-ui.js b/resources/lib/oojs-ui/oojs-ui.js index e824a8f..aec222f 100644 --- a/resources/lib/oojs-ui/oojs-ui.js +++ b/resources/lib/oojs-ui/oojs-ui.js @@ -13724,7 +13724,6 @@ this.setOptions( config.options || [] ); this.$element .addClass( 'oo-ui-radioSelectInputWidget' ) - .empty() .append( this.radioSelectWidget.$element ); }; -- To view, visit https://gerrit.wikimedia.org/r/218283 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8ddc93da1a4b4100618d8cd15ca56fe18c2ff1e5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Bartosz Dziewoński ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Version 3.2 for MW 1.25: skin.json file added - change (mediawiki...Nimbus)
jenkins-bot has submitted this change and it was merged. Change subject: Version 3.2 for MW 1.25: skin.json file added .. Version 3.2 for MW 1.25: skin.json file added Also added the NimbusTemplate class to the autoloader, copied author info etc. from the current main PHP entry point to the main skin file and whatnot. Change-Id: Ibd69dc33a85e6f1c31658151faab83cf453f8fcb --- M Nimbus.php M Nimbus.skin.php A skin.json 3 files changed, 51 insertions(+), 10 deletions(-) Approvals: Jack Phoenix: Looks good to me, approved jenkins-bot: Verified diff --git a/Nimbus.php b/Nimbus.php index 37f0f6e..98439e1 100644 --- a/Nimbus.php +++ b/Nimbus.php @@ -8,18 +8,10 @@ * @author David Pean * @author Inez Korczyński * @author Jack Phoenix - * @copyright Copyright © 2008-2014 Aaron Wright, David Pean, Inez Korczyński, Jack Phoenix + * @copyright Copyright © 2008-2015 Aaron Wright, David Pean, Inez Korczyński, Jack Phoenix * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later - * @date 30 November 2014 - * - * To install place the Nimbus folder (the folder containing this file!) into - * skins/ and add this line to your wiki's LocalSettings.php: - * require_once("$IP/skins/Nimbus/Nimbus.php"); + * @date 15 June 2015 */ - -if( !defined( 'MEDIAWIKI' ) ) { - die( 'Not a valid entry point.' ); -} // Skin credits that will show up on Special:Version $wgExtensionCredits['skin'][] = array( @@ -39,6 +31,8 @@ // Autoload the skin class, set up i18n, set up CSS & JS (via ResourceLoader) $wgAutoloadClasses['SkinNimbus'] = __DIR__ . '/Nimbus.skin.php'; +$wgAutoloadClasses['NimbusTemplate'] = __DIR__ . '/Nimbus.skin.php'; + $wgMessagesDirs['SkinNimbus'] = __DIR__ . '/i18n'; $wgResourceModules['skins.nimbus'] = array( diff --git a/Nimbus.skin.php b/Nimbus.skin.php index e7fb098..861d64f 100644 --- a/Nimbus.skin.php +++ b/Nimbus.skin.php @@ -9,6 +9,12 @@ * it's in a really crappy state currently, but better than nothing. * * @file + * @author Aaron Wright + * @author David Pean + * @author Inez Korczyński + * @author Jack Phoenix + * @copyright Copyright © 2008-2015 Aaron Wright, David Pean, Inez Korczyński, Jack Phoenix + * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later */ if ( !defined( 'MEDIAWIKI' ) ) { die( -1 ); diff --git a/skin.json b/skin.json new file mode 100644 index 000..764b0a6 --- /dev/null +++ b/skin.json @@ -0,0 +1,41 @@ +{ + "name": "Nimbus", + "version": "3.2", + "author": [ + "Aaron Wright", + "David Pean", + "Inez Korczyński", + "Jack Phoenix" + ], + "url": "https://www.mediawiki.org/wiki/Skin:Nimbus";, + "license-name": "GPL-2.0+", + "descriptionmsg": "nimbus-desc", + "type": "skin", + "ValidSkinNames": { + "nimbus": "Nimbus" + }, + "MessagesDirs": { + "SkinNimbus": [ + "i18n" + ] + }, + "AutoloadClasses": { + "NimbusTemplate": "Nimbus.skin.php", + "SkinNimbus": "Nimbus.skin.php" + }, + "ResourceModules": { + "skins.nimbus": { + "styles": { + "skins/Nimbus/nimbus/Nimbus.css": { + "media": "screen" + } + }, + "scripts": [ + "skins/Nimbus/nimbus/Menu.js" + ], + "position": "top" + } + }, + "manifest_version": 1 +} + -- To view, visit https://gerrit.wikimedia.org/r/218277 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibd69dc33a85e6f1c31658151faab83cf453f8fcb Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/Nimbus Gerrit-Branch: master Gerrit-Owner: Jack Phoenix Gerrit-Reviewer: Jack Phoenix Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Version 3.2 for MW 1.25: skin.json file added - change (mediawiki...Nimbus)
Jack Phoenix has uploaded a new change for review. https://gerrit.wikimedia.org/r/218277 Change subject: Version 3.2 for MW 1.25: skin.json file added .. Version 3.2 for MW 1.25: skin.json file added Also added the NimbusTemplate class to the autoloader, copied author info etc. from the current main PHP entry point to the main skin file and whatnot. Change-Id: Ibd69dc33a85e6f1c31658151faab83cf453f8fcb --- M Nimbus.php M Nimbus.skin.php A skin.json 3 files changed, 51 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Nimbus refs/changes/77/218277/1 diff --git a/Nimbus.php b/Nimbus.php index 37f0f6e..98439e1 100644 --- a/Nimbus.php +++ b/Nimbus.php @@ -8,18 +8,10 @@ * @author David Pean * @author Inez Korczyński * @author Jack Phoenix - * @copyright Copyright © 2008-2014 Aaron Wright, David Pean, Inez Korczyński, Jack Phoenix + * @copyright Copyright © 2008-2015 Aaron Wright, David Pean, Inez Korczyński, Jack Phoenix * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later - * @date 30 November 2014 - * - * To install place the Nimbus folder (the folder containing this file!) into - * skins/ and add this line to your wiki's LocalSettings.php: - * require_once("$IP/skins/Nimbus/Nimbus.php"); + * @date 15 June 2015 */ - -if( !defined( 'MEDIAWIKI' ) ) { - die( 'Not a valid entry point.' ); -} // Skin credits that will show up on Special:Version $wgExtensionCredits['skin'][] = array( @@ -39,6 +31,8 @@ // Autoload the skin class, set up i18n, set up CSS & JS (via ResourceLoader) $wgAutoloadClasses['SkinNimbus'] = __DIR__ . '/Nimbus.skin.php'; +$wgAutoloadClasses['NimbusTemplate'] = __DIR__ . '/Nimbus.skin.php'; + $wgMessagesDirs['SkinNimbus'] = __DIR__ . '/i18n'; $wgResourceModules['skins.nimbus'] = array( diff --git a/Nimbus.skin.php b/Nimbus.skin.php index e7fb098..861d64f 100644 --- a/Nimbus.skin.php +++ b/Nimbus.skin.php @@ -9,6 +9,12 @@ * it's in a really crappy state currently, but better than nothing. * * @file + * @author Aaron Wright + * @author David Pean + * @author Inez Korczyński + * @author Jack Phoenix + * @copyright Copyright © 2008-2015 Aaron Wright, David Pean, Inez Korczyński, Jack Phoenix + * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later */ if ( !defined( 'MEDIAWIKI' ) ) { die( -1 ); diff --git a/skin.json b/skin.json new file mode 100644 index 000..764b0a6 --- /dev/null +++ b/skin.json @@ -0,0 +1,41 @@ +{ + "name": "Nimbus", + "version": "3.2", + "author": [ + "Aaron Wright", + "David Pean", + "Inez Korczyński", + "Jack Phoenix" + ], + "url": "https://www.mediawiki.org/wiki/Skin:Nimbus";, + "license-name": "GPL-2.0+", + "descriptionmsg": "nimbus-desc", + "type": "skin", + "ValidSkinNames": { + "nimbus": "Nimbus" + }, + "MessagesDirs": { + "SkinNimbus": [ + "i18n" + ] + }, + "AutoloadClasses": { + "NimbusTemplate": "Nimbus.skin.php", + "SkinNimbus": "Nimbus.skin.php" + }, + "ResourceModules": { + "skins.nimbus": { + "styles": { + "skins/Nimbus/nimbus/Nimbus.css": { + "media": "screen" + } + }, + "scripts": [ + "skins/Nimbus/nimbus/Menu.js" + ], + "position": "top" + } + }, + "manifest_version": 1 +} + -- To view, visit https://gerrit.wikimedia.org/r/218277 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibd69dc33a85e6f1c31658151faab83cf453f8fcb Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/Nimbus Gerrit-Branch: master Gerrit-Owner: Jack Phoenix ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Disable the nova_ldap plugin - change (operations/puppet)
Andrew Bogott has submitted this change and it was merged. Change subject: Disable the nova_ldap plugin .. Disable the nova_ldap plugin This has been creating test entries... we need this turned off temporarily while moving all new ldap entries to the new schema used by this plugin. Change-Id: I5aee5ee6933dda7b6221fc802f40efaf67e17fc4 --- M modules/openstack/templates/icehouse/designate/designate.conf.erb 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Andrew Bogott: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/openstack/templates/icehouse/designate/designate.conf.erb b/modules/openstack/templates/icehouse/designate/designate.conf.erb index b28ea1b..6aac6bf 100644 --- a/modules/openstack/templates/icehouse/designate/designate.conf.erb +++ b/modules/openstack/templates/icehouse/designate/designate.conf.erb @@ -121,7 +121,7 @@ # List of notification handlers to enable, configuration of these needs to # correspond to a [handler:my_driver] section below or else in the config # Can be one or more of : nova_fixed, neutron_floatingip -enabled_notification_handlers = nova_fixed_multi, nova_ldap +enabled_notification_handlers = nova_fixed_multi #--- # mDNS Service -- To view, visit https://gerrit.wikimedia.org/r/218276 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5aee5ee6933dda7b6221fc802f40efaf67e17fc4 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Andrew Bogott Gerrit-Reviewer: Andrew Bogott Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Disable the nova_ldap plugin - change (operations/puppet)
Andrew Bogott has uploaded a new change for review. https://gerrit.wikimedia.org/r/218276 Change subject: Disable the nova_ldap plugin .. Disable the nova_ldap plugin This has been creating test entries... we need this turned off temporarily while moving all new ldap entries to the new schema used by this plugin. Change-Id: I5aee5ee6933dda7b6221fc802f40efaf67e17fc4 --- M modules/openstack/templates/icehouse/designate/designate.conf.erb 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/76/218276/1 diff --git a/modules/openstack/templates/icehouse/designate/designate.conf.erb b/modules/openstack/templates/icehouse/designate/designate.conf.erb index b28ea1b..6aac6bf 100644 --- a/modules/openstack/templates/icehouse/designate/designate.conf.erb +++ b/modules/openstack/templates/icehouse/designate/designate.conf.erb @@ -121,7 +121,7 @@ # List of notification handlers to enable, configuration of these needs to # correspond to a [handler:my_driver] section below or else in the config # Can be one or more of : nova_fixed, neutron_floatingip -enabled_notification_handlers = nova_fixed_multi, nova_ldap +enabled_notification_handlers = nova_fixed_multi #--- # mDNS Service -- To view, visit https://gerrit.wikimedia.org/r/218276 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5aee5ee6933dda7b6221fc802f40efaf67e17fc4 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Andrew Bogott ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add a wikipage.diff hook - change (mediawiki/core)
TheDJ has uploaded a new change for review. https://gerrit.wikimedia.org/r/218275 Change subject: Add a wikipage.diff hook .. Add a wikipage.diff hook Bug: T53583 Change-Id: Iba54f26537e0a7ffaaf9465e2f44de2e4367abdb --- M includes/diff/DifferenceEngine.php M resources/Resources.php A resources/src/mediawiki.action/mediawiki.action.diff.js M resources/src/mediawiki.action/mediawiki.action.edit.preview.js 4 files changed, 27 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/75/218275/1 diff --git a/includes/diff/DifferenceEngine.php b/includes/diff/DifferenceEngine.php index 07a0522..e7cc7a1 100644 --- a/includes/diff/DifferenceEngine.php +++ b/includes/diff/DifferenceEngine.php @@ -647,6 +647,7 @@ */ public function showDiffStyle() { $this->getOutput()->addModuleStyles( 'mediawiki.action.history.diff' ); + $this->getOutput()->addModules( 'mediawiki.action.diff' ); } /** diff --git a/resources/Resources.php b/resources/Resources.php index 6c27735..1472838 100644 --- a/resources/Resources.php +++ b/resources/Resources.php @@ -1104,6 +1104,9 @@ /* MediaWiki Action */ + 'mediawiki.action.diff' => array( + 'scripts' => 'resources/src/mediawiki.action/mediawiki.action.diff.js', + ), 'mediawiki.action.edit' => array( 'scripts' => 'resources/src/mediawiki.action/mediawiki.action.edit.js', 'styles' => 'resources/src/mediawiki.action/mediawiki.action.edit.css', diff --git a/resources/src/mediawiki.action/mediawiki.action.diff.js b/resources/src/mediawiki.action/mediawiki.action.diff.js new file mode 100644 index 000..0fc5be1 --- /dev/null +++ b/resources/src/mediawiki.action/mediawiki.action.diff.js @@ -0,0 +1,22 @@ +/*! + * Scripts for diff pages at ready + */ +( function ( mw, $ ) { + 'use strict'; + + /** +* Fired when the diff is added to a page containing a diff +* +* Similar to the {@link mw.hook#event-wikipage_content wikipage.content hook} +* $diff can still be detached when this hook is fired. +* +* @event wikipage_diff +* @member mw.hook +* @param {jQuery} $diff The most appropriate element containing the +* diff, usually .diff. +*/ + + $( function () { + mw.hook( 'wikipage.diff' ).fire( $( '.diff' ) ); + } ); +}( mediaWiki, jQuery ) ); diff --git a/resources/src/mediawiki.action/mediawiki.action.edit.preview.js b/resources/src/mediawiki.action/mediawiki.action.edit.preview.js index 6026a8c..51dff52 100644 --- a/resources/src/mediawiki.action/mediawiki.action.edit.preview.js +++ b/resources/src/mediawiki.action/mediawiki.action.edit.preview.js @@ -113,6 +113,7 @@ // "result.blah is undefined" error, ignore mw.log.warn( e ); } + mw.hook( 'wikipage.diff' ).fire( $wikiDiff.find( '.diff' ) ); $wikiDiff.show(); } ); } ); -- To view, visit https://gerrit.wikimedia.org/r/218275 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iba54f26537e0a7ffaaf9465e2f44de2e4367abdb Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: TheDJ ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add role for SimpleSkins - change (mediawiki/vagrant)
BryanDavis has uploaded a new change for review. https://gerrit.wikimedia.org/r/218274 Change subject: Add role for SimpleSkins .. Add role for SimpleSkins Change-Id: I9b1f95ed3f0703480b20ac75f7c82160ac8deb3c --- M puppet/modules/mediawiki/manifests/skin.pp A puppet/modules/role/manifests/simpleskins.pp 2 files changed, 14 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant refs/changes/74/218274/1 diff --git a/puppet/modules/mediawiki/manifests/skin.pp b/puppet/modules/mediawiki/manifests/skin.pp index f82dbeb..f0861be 100644 --- a/puppet/modules/mediawiki/manifests/skin.pp +++ b/puppet/modules/mediawiki/manifests/skin.pp @@ -40,6 +40,10 @@ # Whether this skin has dependencies that need to be installed via Composer. # Default: false. # +# [*remote*] +# Remote URL for the repository. Passed to git::clone if set. See +# git::deploy docs for more details. +# # === Examples # # The following example configures the Vector skin and @@ -59,6 +63,7 @@ $branch = undef, $settings = {}, $composer = false, +$remote = undef, ) { include ::mediawiki @@ -69,6 +74,7 @@ git::clone { $skin_repo: directory => $skin_dir, branch=> $branch, +remote=> $remote, require => Git::Clone['mediawiki/core'], } } diff --git a/puppet/modules/role/manifests/simpleskins.pp b/puppet/modules/role/manifests/simpleskins.pp new file mode 100644 index 000..6d61b27 --- /dev/null +++ b/puppet/modules/role/manifests/simpleskins.pp @@ -0,0 +1,8 @@ +# == Class: role::simpleskins +# Configures SimpleSkins, a MediaWiki skin experiment, as an option. +# https://github.com/jdlrobson/SimpleSkins +class role::simpleskins { +mediawiki::skin { 'SimpleSkins': +remote => 'https://github.com/jdlrobson/SimpleSkins.git', +} +} -- To view, visit https://gerrit.wikimedia.org/r/218274 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9b1f95ed3f0703480b20ac75f7c82160ac8deb3c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: BryanDavis ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update mustache.js from 0.8.2 to 1.2.0 - change (mediawiki/core)
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/218273 Change subject: Update mustache.js from 0.8.2 to 1.2.0 .. Update mustache.js from 0.8.2 to 1.2.0 Project link * https://github.com/janl/mustache.js File link * https://github.com/janl/mustache.js/blob/v1.2.0/mustache.js CHANGELOG link * https://github.com/janl/mustache.js/blob/v1.2.0/CHANGELOG.md 1.2.0 * Added -v option to CLI, by @phillipj. * Bugfix for rendering Number when it serves as the Context, by @phillipj. * Specified files in package.json for a cleaner install, by @phillipj. 1.1.0 * Refactor Writer.renderTokens() for better readability, by @phillipj. * Cleanup tests section in readme, by @phillipj. * Added JSHint to tests/CI, by @phillipj. * Added node v0.12 on travis, by @phillipj. * Created command line tool, by @phillipj. * Added *falsy* to Inverted Sections description in README, by * @kristijanmatic. 1.0.0 * Inline tag compilation, by @mjackson. * Fixed AMD registration, volo package.json entry, by @jrburke. * Added spm support, by @afc163. * Only access properties of objects on Context.lookup, by @cmbuckley. Upgrade from 0.8.2 to 1.2.0 Change-Id: If717bf0c40ff6426a6c09ce03f345cd7f1847636 --- M resources/lib/mustache/mustache.js 1 file changed, 79 insertions(+), 72 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/73/218273/1 diff --git a/resources/lib/mustache/mustache.js b/resources/lib/mustache/mustache.js index dbc9823..97394c4 100644 --- a/resources/lib/mustache/mustache.js +++ b/resources/lib/mustache/mustache.js @@ -444,88 +444,95 @@ Writer.prototype.renderTokens = function (tokens, context, partials, originalTemplate) { var buffer = ''; -// This function is used to render an arbitrary template -// in the current context by higher-order sections. -var self = this; -function subRender(template) { - return self.render(template, context, partials); -} - -var token, value; +var token, symbol, value; for (var i = 0, numTokens = tokens.length; i < numTokens; ++i) { + value = undefined; token = tokens[i]; + symbol = token[0]; - switch (token[0]) { - case '#': -value = context.lookup(token[1]); + if (symbol === '#') value = this._renderSection(token, context, partials, originalTemplate); + else if (symbol === '^') value = this._renderInverted(token, context, partials, originalTemplate); + else if (symbol === '>') value = this._renderPartial(token, context, partials, originalTemplate); + else if (symbol === '&') value = this._unescapedValue(token, context); + else if (symbol === 'name') value = this._escapedValue(token, context); + else if (symbol === 'text') value = this._rawValue(token); -if (!value) - continue; - -if (isArray(value)) { - for (var j = 0, valueLength = value.length; j < valueLength; ++j) { -buffer += this.renderTokens(token[4], context.push(value[j]), partials, originalTemplate); - } -} else if (typeof value === 'object' || typeof value === 'string') { - buffer += this.renderTokens(token[4], context.push(value), partials, originalTemplate); -} else if (isFunction(value)) { - if (typeof originalTemplate !== 'string') -throw new Error('Cannot use higher-order sections without the original template'); - - // Extract the portion of the original template that the section contains. - value = value.call(context.view, originalTemplate.slice(token[3], token[5]), subRender); - - if (value != null) -buffer += value; -} else { - buffer += this.renderTokens(token[4], context, partials, originalTemplate); -} - -break; - case '^': -value = context.lookup(token[1]); - -// Use JavaScript's definition of falsy. Include empty arrays. -// See https://github.com/janl/mustache.js/issues/186 -if (!value || (isArray(value) && value.length === 0)) - buffer += this.renderTokens(token[4], context, partials, originalTemplate); - -break; - case '>': -if (!partials) - continue; - -value = isFunction(partials) ? partials(token[1]) : partials[token[1]]; - -if (value != null) - buffer += this.renderTokens(this.parse(value), context, partials, value); - -break; - case '&': -value = context.lookup(token[1]); - -if (value != null) - buffer += value; - -break; - case 'name': -value = context.lookup(token[1]); - -if (value != null) - buffer += mustache.escape(value); - -break; - case 'text': -buffer += token[1]; -break; - } + if (value !== undefined) +buffer += value; } return b
[MediaWiki-commits] [Gerrit] Improve MultiStringReplacer performance - change (AhoCorasick)
jenkins-bot has submitted this change and it was merged. Change subject: Improve MultiStringReplacer performance .. Improve MultiStringReplacer performance Don't call MultiStringMatcher::searchIn, because that way we end up having to walk the results array again to construct the replacement matches array. Instead, perform the search in MultiStringReplacer itself. Change-Id: I2101f9764c4ddb8f4f7d2b2d90368a9ca04c6862 --- M .gitignore M bench/bench.php M src/MultiStringReplacer.php 3 files changed, 14 insertions(+), 9 deletions(-) Approvals: Ori.livneh: Looks good to me, approved jenkins-bot: Verified diff --git a/.gitignore b/.gitignore index f6f384e..4f51d1a 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ /doc/html vendor/ composer.lock +bench/23835-0.txt +bench/ZhConversion.php diff --git a/bench/bench.php b/bench/bench.php index 7562be1..b537025 100644 --- a/bench/bench.php +++ b/bench/bench.php @@ -6,11 +6,12 @@ use AhoCorasick\MultiStringMatcher; if ( !file_exists( __DIR__ . '/23835-0.txt' ) ) { - die( 'Please download http://www.gutenberg.org/files/23835/23835-0.txt' ); + die( "Please download http://www.gutenberg.org/files/23835/23835-0.txt\n"; ); } if ( !file_exists( __DIR__ . '/ZhConversion.php' ) ) { - die( 'You need ZhConversion.php, from http://git.io/vIMst' ); + die( "You need ZhConversion.php, from " . + "https://github.com/wikimedia/mediawiki/blob/master/includes/ZhConversion.php\n"; ); } require_once __DIR__ . '/ZhConversion.php'; diff --git a/src/MultiStringReplacer.php b/src/MultiStringReplacer.php index ee1ace0..ab3ebc4 100644 --- a/src/MultiStringReplacer.php +++ b/src/MultiStringReplacer.php @@ -72,14 +72,16 @@ * @endcode */ public function searchAndReplace( $text ) { - if ( !$this->searchKeywords || $text === '' ) { - return $text; - } - + $state = 0; + $length = strlen( $text ); $matches = array(); - foreach ( $this->searchIn( $text ) as $result ) { - list( $offset, $match ) = $result; - $matches[$offset] = $match; + for ( $i = 0; $i < $length; $i++ ) { + $ch = $text[$i]; + $state = $this->nextState( $state, $ch ); + foreach ( $this->outputs[$state] as $match ) { + $offset = $i - $this->searchKeywords[$match] + 1; + $matches[$offset] = $match; + } } ksort( $matches ); -- To view, visit https://gerrit.wikimedia.org/r/218121 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2101f9764c4ddb8f4f7d2b2d90368a9ca04c6862 Gerrit-PatchSet: 2 Gerrit-Project: AhoCorasick Gerrit-Branch: master Gerrit-Owner: Ori.livneh Gerrit-Reviewer: Ori.livneh Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Disable Preferences save button before setting change - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Disable Preferences save button before setting change .. Disable Preferences save button before setting change Disable the Special:Preferences 'Save' button if no settings have been changed (uses keydown and mousedown events as an alternative to change event, so is not perfect) This prevents unnecessary saving when you can't remember if you saved the settings or not. Bug: T89457 Change-Id: I7c2e11302099280c561e435425b23afb9fb760b5 --- M resources/src/mediawiki.special/mediawiki.special.preferences.js 1 file changed, 6 insertions(+), 0 deletions(-) Approvals: TheDJ: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/src/mediawiki.special/mediawiki.special.preferences.js b/resources/src/mediawiki.special/mediawiki.special.preferences.js index fa9e452..a385ad3 100644 --- a/resources/src/mediawiki.special/mediawiki.special.preferences.js +++ b/resources/src/mediawiki.special/mediawiki.special.preferences.js @@ -110,6 +110,12 @@ $preftoc.append( $li ); } ); + // Disable the button to save preferences unless preferences have changed + $( '#prefcontrol' ).prop( 'disabled', true ); + $( '.prefsection' ).one( 'change keydown mousedown', function () { + $( '#prefcontrol' ).prop( 'disabled', false); + } ); + // Enable keyboard users to use left and right keys to switch tabs $preftoc.on( 'keydown', function ( event ) { var keyLeft = 37, -- To view, visit https://gerrit.wikimedia.org/r/190569 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7c2e11302099280c561e435425b23afb9fb760b5 Gerrit-PatchSet: 10 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Sn1per Gerrit-Reviewer: Florianschmidtwelzow Gerrit-Reviewer: He7d3r Gerrit-Reviewer: Hoo man Gerrit-Reviewer: Jaredzimmerman Gerrit-Reviewer: Legoktm Gerrit-Reviewer: TheDJ Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix deployers access to imagescaler boxes - change (operations/puppet)
BBlack has submitted this change and it was merged. Change subject: Fix deployers access to imagescaler boxes .. Fix deployers access to imagescaler boxes Bug: T102382 Change-Id: Ic10af3f841013b7e8eb6fbc97ff0da683cf1113e --- M hieradata/role/common/mediawiki/imagescaler.yaml 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: John F. Lewis: Looks good to me, but someone else must approve BBlack: Looks good to me, approved jenkins-bot: Verified diff --git a/hieradata/role/common/mediawiki/imagescaler.yaml b/hieradata/role/common/mediawiki/imagescaler.yaml index 17d3089..24e436c 100644 --- a/hieradata/role/common/mediawiki/imagescaler.yaml +++ b/hieradata/role/common/mediawiki/imagescaler.yaml @@ -1,4 +1,6 @@ cluster: imagescaler +admin::groups: + - deployment role::mediawiki::webserver::pool: rendering mediawiki::web::mpm_config::workers_limit: 30 mediawiki::users::web: www-data -- To view, visit https://gerrit.wikimedia.org/r/218135 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic10af3f841013b7e8eb6fbc97ff0da683cf1113e Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Alex Monk Gerrit-Reviewer: BBlack Gerrit-Reviewer: John F. Lewis Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Replace "site link" with "sitelink" for consistency - change (mediawiki...Wikibase)
Amire80 has uploaded a new change for review. https://gerrit.wikimedia.org/r/218272 Change subject: Replace "site link" with "sitelink" for consistency .. Replace "site link" with "sitelink" for consistency "Sitelink" without space is used in the majority of messages and in the Wikidata glossary. Change-Id: Ia32c42e8c9323ff7bc46d10b014e42be6c54edc8 --- M repo/i18n/en.json 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/72/218272/1 diff --git a/repo/i18n/en.json b/repo/i18n/en.json index 8a8067eb..7bdd3d7 100644 --- a/repo/i18n/en.json +++ b/repo/i18n/en.json @@ -59,8 +59,8 @@ "wikibase-entitytermsforlanguageview-input-help-message": "Enter the label of this entity, a short description and aliases in $1.", "wikibase-statements": "Statements", "wikibase-terms": "In other languages", - "wikibase-sitelinks": "Site links", - "wikibase-sitelinkgroupview-input-help-message": "Add a site link by specifying a site and a page of that site, edit or remove existing site links.", + "wikibase-sitelinks": "Sitelinks", + "wikibase-sitelinkgroupview-input-help-message": "Add a sitelink by specifying a site and a page of that site, edit or remove existing sitelinks.", "wikibase-sitelinks-empty": "No page is linked to this item.", "wikibase-sitelinks-input-help-message": "Set a link to a page related to this item.", "wikibase-sitelinks-special": "Other sites", @@ -193,7 +193,7 @@ "wikibase-setsitelink-intro": "This form allows you to set the sitelink of an item. You need to provide the id of the item (e.g. Q23), a site id (e.g. \"enwiki\") and the sitelink to set to.", "wikibase-setsitelink-intro-badges": "Additionally you can set various badges for this sitelink which are listed below.", "wikibase-setsitelink-site": "Site id:", - "wikibase-setsitelink-label": "Site link:", + "wikibase-setsitelink-label": "Sitelink:", "wikibase-setsitelink-badges": "Badges:", "wikibase-setsitelink-submit": "Set the sitelink", "wikibase-setsitelink-invalid-site": "The site id \"$1\" is unknown. Please use an existing site id, such as \"enwiki\".", -- To view, visit https://gerrit.wikimedia.org/r/218272 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia32c42e8c9323ff7bc46d10b014e42be6c54edc8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Amire80 ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix missing bracket in logrotate.d-mediawiki-Flow - change (mediawiki/vagrant)
jenkins-bot has submitted this change and it was merged. Change subject: Fix missing bracket in logrotate.d-mediawiki-Flow .. Fix missing bracket in logrotate.d-mediawiki-Flow While fixing another role's usage of logrotate noticed that this file has been ignored for some time due to a syntax error. Change-Id: Ie4569a270ea8cf73bc59eacc822730c510aedc2e --- M puppet/modules/role/files/flow/logrotate.d-mediawiki-Flow 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: BryanDavis: Looks good to me, approved jenkins-bot: Verified diff --git a/puppet/modules/role/files/flow/logrotate.d-mediawiki-Flow b/puppet/modules/role/files/flow/logrotate.d-mediawiki-Flow index e572415..8fc92c0 100644 --- a/puppet/modules/role/files/flow/logrotate.d-mediawiki-Flow +++ b/puppet/modules/role/files/flow/logrotate.d-mediawiki-Flow @@ -1,6 +1,6 @@ # This file is managed by Puppet -/vagrant/logs/mediawiki-Flow.log +/vagrant/logs/mediawiki-Flow.log { daily missingok rotate 7 -- To view, visit https://gerrit.wikimedia.org/r/217969 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie4569a270ea8cf73bc59eacc822730c510aedc2e Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: EBernhardson Gerrit-Reviewer: BryanDavis Gerrit-Reviewer: Dduvall Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Avoid muliple cache calls to explicitly defined tags - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Avoid muliple cache calls to explicitly defined tags .. Avoid muliple cache calls to explicitly defined tags This avoids muliple cache calls to explicitly defined tags by calling the showTagEditUI of ChangeTags only once in logs and histories. Change-Id: I2e36dbd96d3fcca06de0bf418bc6dc294d8d18d3 --- M includes/actions/HistoryAction.php M includes/logging/LogEventsList.php 2 files changed, 14 insertions(+), 5 deletions(-) Approvals: Aaron Schulz: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/actions/HistoryAction.php b/includes/actions/HistoryAction.php index f4f2a2a..a81adf9 100644 --- a/includes/actions/HistoryAction.php +++ b/includes/actions/HistoryAction.php @@ -368,6 +368,9 @@ */ protected $parentLens; + /** @var bool Whether to show the tag editing UI */ + protected $showTagEditUI; + /** * @param HistoryAction $historyPage * @param string $year @@ -381,6 +384,7 @@ $this->tagFilter = $tagFilter; $this->getDateCond( $year, $month ); $this->conds = $conds; + $this->showTagEditUI = ChangeTags::showTagEditingUI( $this->getUser() ); } // For hook compatibility... @@ -504,7 +508,7 @@ if ( $user->isAllowed( 'deleterevision' ) ) { $actionButtons .= $this->getRevisionButton( 'revisiondelete', 'showhideselectedversions' ); } - if ( ChangeTags::showTagEditingUI( $user ) ) { + if ( $this->showTagEditUI ) { $actionButtons .= $this->getRevisionButton( 'editchangetags', 'history-edit-tags' ); } if ( $actionButtons ) { @@ -631,14 +635,13 @@ $del = ''; $user = $this->getUser(); $canRevDelete = $user->isAllowed( 'deleterevision' ); - $showTagEditUI = ChangeTags::showTagEditingUI( $user ); // Show checkboxes for each revision, to allow for revision deletion and // change tags - if ( $canRevDelete || $showTagEditUI ) { + if ( $canRevDelete || $this->showTagEditUI ) { $this->preventClickjacking(); // If revision was hidden from sysops and we don't need the checkbox // for anything else, disable it - if ( !$showTagEditUI && !$rev->userCan( Revision::DELETED_RESTRICTED, $user ) ) { + if ( !$this->showTagEditUI && !$rev->userCan( Revision::DELETED_RESTRICTED, $user ) ) { $del = Xml::check( 'deleterevisions', false, array( 'disabled' => 'disabled' ) ); // Otherwise, enable the checkbox... } else { diff --git a/includes/logging/LogEventsList.php b/includes/logging/LogEventsList.php index dfe3136..1b56584 100644 --- a/includes/logging/LogEventsList.php +++ b/includes/logging/LogEventsList.php @@ -36,6 +36,11 @@ protected $mDefaultQuery; /** +* @var bool +*/ + protected $showTagEditUI; + + /** * Constructor. * The first two parameters used to be $skin and $out, but now only a context * is needed, that's why there's a second unused parameter. @@ -55,6 +60,7 @@ } $this->flags = $flags; + $this->showTagEditUI = ChangeTags::showTagEditingUI( $this->getUser() ); } /** @@ -348,7 +354,7 @@ $user = $this->getUser(); // If change tag editing is available to this user, return the checkbox - if ( $this->flags & self::USE_CHECKBOXES && ChangeTags::showTagEditingUI( $user ) ) { + if ( $this->flags & self::USE_CHECKBOXES && $this->showTagEditUI ) { return Xml::check( 'showhiderevisions', false, -- To view, visit https://gerrit.wikimedia.org/r/218146 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2e36dbd96d3fcca06de0bf418bc6dc294d8d18d3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Cenarium Gerrit-Reviewer: Aaron Schulz Gerrit-Reviewer: TTO 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 hhvm.hack.lang.iconv_ignore_correct for //IGNORE behavior - change (operations/puppet)
BryanDavis has uploaded a new change for review. https://gerrit.wikimedia.org/r/218271 Change subject: Set hhvm.hack.lang.iconv_ignore_correct for //IGNORE behavior .. Set hhvm.hack.lang.iconv_ignore_correct for //IGNORE behavior Enable the HHVM specific setting to work around glibc 2.14+ iconv handling for '//IGNORE'. Bug: T98882 Change-Id: I197d2437a5553997eaf435db310107a02b6e40f0 --- M modules/hhvm/manifests/init.pp 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/71/218271/1 diff --git a/modules/hhvm/manifests/init.pp b/modules/hhvm/manifests/init.pp index a2165ad..e9beb0f 100644 --- a/modules/hhvm/manifests/init.pp +++ b/modules/hhvm/manifests/init.pp @@ -132,6 +132,11 @@ light_process_count => 5, light_process_file_prefix => '/var/tmp/hhvm', }, +hack => { +lang => { +iconv_ignore_correct => true, +}, +}, }, } -- To view, visit https://gerrit.wikimedia.org/r/218271 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I197d2437a5553997eaf435db310107a02b6e40f0 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BryanDavis ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Pass extra params to addTags function - change (mediawiki...AbuseFilter)
Cenarium has uploaded a new change for review. https://gerrit.wikimedia.org/r/218270 Change subject: Pass extra params to addTags function .. Pass extra params to addTags function To allow deferral by FlaggedRevs. Change-Id: Id3f656456d2d20324c3791201ec4cd0522a294fb --- M AbuseFilter.hooks.php 1 file changed, 6 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AbuseFilter refs/changes/70/218270/1 diff --git a/AbuseFilter.hooks.php b/AbuseFilter.hooks.php index bf21e45..9ef563c 100644 --- a/AbuseFilter.hooks.php +++ b/AbuseFilter.hooks.php @@ -414,9 +414,10 @@ /** * @param $recentChange RecentChange +* @param $user User * @return bool */ - public static function onRecentChangeSave( $recentChange ) { + public static function onRecentChangeSave( $recentChange, $user = null ) { $title = Title::makeTitle( $recentChange->getAttribute( 'rc_namespace' ), $recentChange->getAttribute( 'rc_title' ) @@ -434,7 +435,10 @@ $tags, $recentChange->mAttribs['rc_id'], $recentChange->mAttribs['rc_this_oldid'], - $recentChange->mAttribs['rc_logid'] + $recentChange->mAttribs['rc_logid'], + null, + $user, + $recentChange ); } -- To view, visit https://gerrit.wikimedia.org/r/218270 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id3f656456d2d20324c3791201ec4cd0522a294fb Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/AbuseFilter Gerrit-Branch: master Gerrit-Owner: Cenarium ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Set hhvm.hack.lang.iconv_ignore_correct for //IGNORE behavior - change (mediawiki/vagrant)
BryanDavis has uploaded a new change for review. https://gerrit.wikimedia.org/r/218269 Change subject: Set hhvm.hack.lang.iconv_ignore_correct for //IGNORE behavior .. Set hhvm.hack.lang.iconv_ignore_correct for //IGNORE behavior Enable the HHVM specific setting to work around glibc 2.14+ iconv handling for '//IGNORE'. Bug: T98882 Change-Id: Ie7fac8a128b7e6e8f85f58c367f597fb9b09cb50 --- M puppet/hieradata/common.yaml 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant refs/changes/69/218269/1 diff --git a/puppet/hieradata/common.yaml b/puppet/hieradata/common.yaml index b50a992..784156a 100644 --- a/puppet/hieradata/common.yaml +++ b/puppet/hieradata/common.yaml @@ -95,6 +95,9 @@ socket_default_timeout: 300 http: slow_query_threshold: 30 +hack: + lang: +iconv_ignore_correct: true hhvm::fcgi_settings: max_execution_time: 180 -- To view, visit https://gerrit.wikimedia.org/r/218269 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie7fac8a128b7e6e8f85f58c367f597fb9b09cb50 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: BryanDavis ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add author and preview text to table in special page - change (mediawiki...SmiteSpam)
Polybuildr has uploaded a new change for review. https://gerrit.wikimedia.org/r/218268 Change subject: Add author and preview text to table in special page .. Add author and preview text to table in special page Special:SmiteSpam now also displays the author of the latest revision (linked to user's contributions) as well as a 50 character preview of the page's content. Change-Id: I073cc7104cda98ad0955af058b6400ba1af6e6a0 --- M SpecialSmiteSpam.php M i18n/en.json M i18n/qqq.json 3 files changed, 28 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SmiteSpam refs/changes/68/218268/1 diff --git a/SpecialSmiteSpam.php b/SpecialSmiteSpam.php index fe7b115..185aaa1 100644 --- a/SpecialSmiteSpam.php +++ b/SpecialSmiteSpam.php @@ -51,14 +51,19 @@ ) ) ); - $out->addHTML( Html::openElement( 'table' ) ); + $out->addHTML( Html::openElement( 'table', array( 'class' => 'wikitable' ) ) ); $out->addHTML( '' . $this->msg( 'smitespam-page' )->text() . '' . $this->msg( 'smitespam-probability' )->text() . '' + . $this->msg( 'smitespam-last-edited-by' )->text() + . '' + . $this->msg( 'smitespam-preview-text' )->text() + . '' . $this->msg( 'smitespam-delete' )->text() - . '' ); + . '' + ); foreach ( $spamPages as $page ) { $title = $page->getTitle(); $out->addHTML( '' ); @@ -90,6 +95,23 @@ } $out->addHTML( '' ); $out->addHTML( '' ); + $author = $page->getRevision()->getUserText( Revision::RAW ); + $out->addHTML( + Linker::link( + SpecialPage::getTitleFor( 'Contributions', $author ), + Sanitizer::escapeHtmlAllowEntities( $author ), + array( 'target' => '_blank' ) + ) + ); + $out->addHTML( '' ); + $out->addHTML( '' ); + $previewText = substr( $page->getMetadata( 'content' ), 0, 50 ); + $out->addHTML( Sanitizer::escapeHtmlAllowEntities( $previewText ) ); + if ( strlen( $page->getMetadata( 'content' ) ) > 50 ) { + $out->addHTML( '...' ); + } + $out->addHTML( '' ); + $out->addHTML( '' ); $out->addHTML( Html::check( 'delete[]', false, array( 'value' => $page->getID(), diff --git a/i18n/en.json b/i18n/en.json index d5b53ba..4f06708 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -12,6 +12,8 @@ "smitespam-page": "Page", "smitespam-delete": "Delete", "smitespam-probability": "Probability", + "smitespam-last-edited-by": "Last edited by", + "smitespam-preview-text": "Preview text", "smitespam-delete-selected": "Delete selected", "smitespam-deleted-reason": "Identified as spam by Extension:SmiteSpam.", "action-smitespam": "smite spam" diff --git a/i18n/qqq.json b/i18n/qqq.json index 3b8b4be..752bd31 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -12,6 +12,8 @@ "smitespam-page": "A wiki page", "smitespam-delete": "The verb 'delete'.", "smitespam-probability": "The word for 'probability'.", + "smitespam-last-edited-by": "The author of the last revision of a page.", + "smitespam-preview-text": "Preview text of a page's content.", "smitespam-delete-selected": "The phrase for 'delete selected'", "smitespam-deleted-reason": "Reason to give for deletion of a page", "action-smitespam": "Action for work done by Extesions:SmiteSpam" -- To view, visit https://gerrit.wikimedia.org/r/218268 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I073cc7104cda98ad0955af058b6400ba1af6e6a0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SmiteSpam Gerrit-Branch: master Gerrit-Owner: Polybuildr ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] composer.json: Set classmap-authoritative: true - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: composer.json: Set classmap-authoritative: true .. composer.json: Set classmap-authoritative: true For developers with older versions of composer the setting will just be ignored. Bug: T85182 Change-Id: I66d4eace301eb4319e4c0137c8f3ee6f35fe4e51 --- M composer.json 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: BryanDavis: Looks good to me, approved jenkins-bot: Verified diff --git a/composer.json b/composer.json index fba1a82..3642c90 100644 --- a/composer.json +++ b/composer.json @@ -60,6 +60,7 @@ "pre-install-cmd": "ComposerHookHandler::onPreInstall" }, "config": { + "classmap-authoritative": true, "prepend-autoloader": false, "optimize-autoloader": true }, -- To view, visit https://gerrit.wikimedia.org/r/187181 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I66d4eace301eb4319e4c0137c8f3ee6f35fe4e51 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Legoktm Gerrit-Reviewer: BryanDavis Gerrit-Reviewer: Daniel Friesen Gerrit-Reviewer: Legoktm Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Overhaul caching of tag usage statistics - change (mediawiki/core)
Cenarium has uploaded a new change for review. https://gerrit.wikimedia.org/r/218265 Change subject: Overhaul caching of tag usage statistics .. Overhaul caching of tag usage statistics Caching is overhauled so that we can have a cached list of tags applied at least once for T27909. A short term, reactive cache is used for the statistics displayed at Special:Tags, which is purged every time tags are updated, unless the tag has more hits than a number specified in config (so that tags like mobile edit don't cause cache purges every few second). A longer term, stable cache is introduced for drop down menus, which is purged only when a tag is added for the first time or when deleting tags. Change-Id: I1b6838b975917fadc2c60998cce26ab490f22a31 --- M includes/DefaultSettings.php M includes/changetags/ChangeTags.php M includes/changetags/ChangeTagsContext.php 3 files changed, 96 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/65/218265/1 diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 24c910f..8cbe4c7 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -6162,6 +6162,13 @@ $wgTagUsageCacheDuration = 60*60*24; /** + * Set this to a positive integer and tags with more than this many hits + * will not trigger a cache purge when applied. This means they won't be + * updated, but also less db queries and faster loading of Special:Tags. + */ +$wgTagMaxHitcountUpdate = 0; + +/** * Expiry to use for the caching of tags registered by extensions * 24 hours by default */ diff --git a/includes/changetags/ChangeTags.php b/includes/changetags/ChangeTags.php index e5b7e14..271600e 100644 --- a/includes/changetags/ChangeTags.php +++ b/includes/changetags/ChangeTags.php @@ -238,7 +238,7 @@ $dbw->delete( 'change_tag', $conds, __METHOD__ ); } } - ChangeTagsContext::purgeTagUsageCache(); + ChangeTagsContext::clearCachesAfterUpdate( $tagsToAdd, $tagsToRemove ); return array( $tagsToAdd, $tagsToRemove, $prevTags ); } @@ -631,7 +631,7 @@ ) { global $wgUseTagFilter; - $tagList = ChangeTagsContext::tagStats(); + $tagList = ChangeTagsContext::cachedTagStats(); // check config and if the list of tags is not empty if ( !$wgUseTagFilter || !count( $tagList ) ) { return $fullForm ? '' : array(); diff --git a/includes/changetags/ChangeTagsContext.php b/includes/changetags/ChangeTagsContext.php index d5c8ee3..5d5c898 100644 --- a/includes/changetags/ChangeTagsContext.php +++ b/includes/changetags/ChangeTagsContext.php @@ -215,7 +215,9 @@ * Does not include tags defined somewhere but not applied * * The result is cached, and the cache is invalidated every time an -* operation on change_tag is performed. +* operation on change_tag is performed unless $wgMaxTagHitcountUpdate +* is > 0. In that case, tags with a greater hitcount do not trigger +* a cache purge and therefore are not updated. * The cache expires after 24 hours by default ($wgTagUsageCacheDuration). * * @return array Array of tags mapped to their hitcount @@ -246,15 +248,92 @@ return $changeTags; }; - $key = wfMemcKey( 'ChangeTags', 'tag-stats' ); + $keyReactive = wfMemcKey( 'ChangeTags', 'tag-stats-reactive' ); return ObjectCache::getMainWANInstance()->getWithSetCallback( - $key, + $keyReactive, $callBack, $wgTagUsageCacheDuration, - array( $key ), + array( $keyReactive, $keyStable ), array( 'lockTSE' => INF ) ); + } + + /** +* Returns a map of any tags used on the wiki to number of edits +* tagged with them, ordered descending by the hitcount as of the +* latest caching. +* Does not include tags defined somewhere but not applied +* +* This cache is invalidated only for first hits of a tag. +* Updates may be delayed by up to 48 hours by default +* (twice $wgTagUsageCacheDuration). +* +* @return array Array of tags mapped to their hitcount +* @since 1.26 +*/ + public static function cachedTagStats() { + global $wgTagUsageCacheDuration; + $keyStable = wfMemcKey( 'ChangeTags', 'tag-stats-stable' ); + + $callBack = function () { + return self::tagStats(); + }; + + return ObjectCache::getMainWANInstance()->get
[MediaWiki-commits] [Gerrit] Add user param to recentchange_save hook - change (mediawiki/core)
Cenarium has uploaded a new change for review. https://gerrit.wikimedia.org/r/218267 Change subject: Add user param to recentchange_save hook .. Add user param to recentchange_save hook So that extensions don't need to retrieve the user from the recent change, which is inefficient. Change-Id: Ib64c1aa1030e6935c0191d0b189f5f6314878391 --- M docs/hooks.txt M includes/changes/RecentChange.php 2 files changed, 7 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/67/218267/1 diff --git a/docs/hooks.txt b/docs/hooks.txt index 8710bdb..aaa2dde 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -2427,6 +2427,7 @@ 'RecentChange_save': Called at the end of RecentChange::save(). $recentChange: RecentChange object +$user: User saving the recent change (not always provided) 'RedirectSpecialArticleRedirectParams': Lets you alter the set of parameter names such as "oldid" that are preserved when using redirecting special pages diff --git a/includes/changes/RecentChange.php b/includes/changes/RecentChange.php index e6189a6..a0823ca 100644 --- a/includes/changes/RecentChange.php +++ b/includes/changes/RecentChange.php @@ -269,8 +269,9 @@ /** * Writes the data in this object to the database * @param bool $noudp +* @param User $user user performing the change (optional) */ - public function save( $noudp = false ) { + public function save( $noudp = false, User $user = null ) { global $wgPutIPinRC, $wgUseEnotif, $wgShowUpdatedMarker, $wgContLang; $dbw = wfGetDB( DB_MASTER ); @@ -309,7 +310,7 @@ $this->mAttribs['rc_id'] = $dbw->insertId(); # Notify extensions - Hooks::run( 'RecentChange_save', array( &$this ) ); + Hooks::run( 'RecentChange_save', array( &$this, $user ) ); # Notify external application via UDP if ( !$noudp ) { @@ -562,7 +563,7 @@ ); DeferredUpdates::addCallableUpdate( function() use ( $rc, $autoTags, $user ) { - $rc->save(); + $rc->save( false, $user ); // Apply autotags if any if ( count( $autoTags ) ) { ChangeTags::addTags( $autoTags, $rc->mAttribs['rc_id'], @@ -637,7 +638,7 @@ ); DeferredUpdates::addCallableUpdate( function() use ( $rc, $autoTags, $user ) { - $rc->save(); + $rc->save( false, $user ); // Apply autotags if any if ( count( $autoTags ) ) { ChangeTags::addTags( $autoTags, $rc->mAttribs['rc_id'], @@ -678,7 +679,7 @@ } $rc = self::newLogEntry( $timestamp, $title, $user, $actionComment, $ip, $type, $action, $target, $logComment, $params, $newId, $actionCommentIRC ); - $rc->save(); + $rc->save( false, $user ); return true; } -- To view, visit https://gerrit.wikimedia.org/r/218267 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib64c1aa1030e6935c0191d0b189f5f6314878391 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Cenarium ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Create ChangeTagsUpdate hook and flags describing update method - change (mediawiki/core)
Cenarium has uploaded a new change for review. https://gerrit.wikimedia.org/r/218266 Change subject: Create ChangeTagsUpdate hook and flags describing update method .. Create ChangeTagsUpdate hook and flags describing update method This creates a hook triggered when updating change tags, so that extensions can take actions when tags are updated. It can take as arguments flags that describe the method used to update. These are defined in ChangeTags. Change-Id: Ifb0cdc43252c4185e4f216d23b8a21fb31595a37 --- M docs/hooks.txt M includes/MovePage.php M includes/changes/RecentChange.php M includes/changetags/ChangeTags.php 4 files changed, 39 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/66/218266/1 diff --git a/docs/hooks.txt b/docs/hooks.txt index c7dcb99..8710bdb 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -996,6 +996,18 @@ If you allow users to define tags, it is advised to check that the name is legit with the ChangeTag::canCreate function. +'ChangeTagsAfterUpdateTags': Called immediately after tags have been updated with the +ChangeTags::updateTags function. Params: +$addedTags: tags effectively added in the update +$removedTags: tags effectively removed in the update +$prevTags: tags that were present prior to the update +$rc_id: recentchanges table id +$rev_id: revision table id +$log_id: logging table id +$params: tag params +$user: User who performed the tagging, or tagged user if it was automatic +$flags: bit mask representing the source of the tagging, if done in core, see ChangeTags class + 'Collation::factory': Called if $wgCategoryCollation is an unknown collation. $collationName: Name of the collation in question &$collationObject: Null. Replace with a subclass of the Collation class that diff --git a/includes/MovePage.php b/includes/MovePage.php index 1a21811..ec78ecb 100644 --- a/includes/MovePage.php +++ b/includes/MovePage.php @@ -529,7 +529,8 @@ if ( $wgUseAutoTagging ) { $autoTags = ChangeTagsCore::getAutotagsForMove( $this->oldTitle, $nt, $user ); if ( $autoTags ) { - ChangeTags::addTags( $autoTags, $rc->mAttribs['rc_id'], $nullRevision->getId(), $logid, null ); + ChangeTags::addTags( $autoTags, $rc->mAttribs['rc_id'], $nullRevision->getId(), $logid, + null, $user, $rc, ChangeTags::UPDATE_CORE_MOVE ); } } } diff --git a/includes/changes/RecentChange.php b/includes/changes/RecentChange.php index 1562751..e6189a6 100644 --- a/includes/changes/RecentChange.php +++ b/includes/changes/RecentChange.php @@ -561,12 +561,13 @@ 'pageStatus' => 'changed' ); - DeferredUpdates::addCallableUpdate( function() use ( $rc, $autoTags ) { + DeferredUpdates::addCallableUpdate( function() use ( $rc, $autoTags, $user ) { $rc->save(); // Apply autotags if any if ( count( $autoTags ) ) { ChangeTags::addTags( $autoTags, $rc->mAttribs['rc_id'], - $rc->mAttribs['rc_this_oldid'], null, null ); + $rc->mAttribs['rc_this_oldid'], null, null, + $user, $rc, ChangeTags::UPDATE_CORE_EDITUPDATE ); } if ( $rc->mAttribs['rc_patrolled'] ) { PatrolLog::record( $rc, true, $rc->getPerformer() ); @@ -635,12 +636,13 @@ 'pageStatus' => 'created' ); - DeferredUpdates::addCallableUpdate( function() use ( $rc, $autoTags ) { + DeferredUpdates::addCallableUpdate( function() use ( $rc, $autoTags, $user ) { $rc->save(); // Apply autotags if any if ( count( $autoTags ) ) { ChangeTags::addTags( $autoTags, $rc->mAttribs['rc_id'], - $rc->mAttribs['rc_this_oldid'], null, null ); + $rc->mAttribs['rc_this_oldid'], null, null, + $user, $rc, ChangeTags::UPDATE_CORE_EDITNEW ); } if ( $rc->mAttribs['rc_patrolled'] ) { PatrolLog::record( $rc, true, $rc->getPerformer() ); diff --git a/includes/changetags/ChangeTags.php b/includes/changetags/ChangeTags.php index 95be0eb..19f4d4a 100644 --- a/includes/changetags/ChangeTags.php +++ b/includes/changetags/ChangeTags.php @@ -23,6 +23,17 @@ class ChangeTags { + /* Represents a tag manually applied along an edit by the u
[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: e4fdfd4..3c5ae91 - change (mediawiki/extensions)
Jenkins-mwext-sync has uploaded a new change for review. https://gerrit.wikimedia.org/r/218264 Change subject: Syncronize VisualEditor: e4fdfd4..3c5ae91 .. Syncronize VisualEditor: e4fdfd4..3c5ae91 Change-Id: I2b5dbd9c666c724f1216a8f53aee9e86e6df46fb --- M VisualEditor 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions refs/changes/64/218264/1 diff --git a/VisualEditor b/VisualEditor index e4fdfd4..3c5ae91 16 --- a/VisualEditor +++ b/VisualEditor -Subproject commit e4fdfd49517df67b136dfc3bec0e09088a4b00d3 +Subproject commit 3c5ae914903e8d5f2aff8bfc963c515fce8f0f5c -- To view, visit https://gerrit.wikimedia.org/r/218264 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2b5dbd9c666c724f1216a8f53aee9e86e6df46fb Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions Gerrit-Branch: master Gerrit-Owner: Jenkins-mwext-sync ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: e4fdfd4..3c5ae91 - change (mediawiki/extensions)
Jenkins-mwext-sync has submitted this change and it was merged. Change subject: Syncronize VisualEditor: e4fdfd4..3c5ae91 .. Syncronize VisualEditor: e4fdfd4..3c5ae91 Change-Id: I2b5dbd9c666c724f1216a8f53aee9e86e6df46fb --- M VisualEditor 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Jenkins-mwext-sync: Verified; Looks good to me, approved diff --git a/VisualEditor b/VisualEditor index e4fdfd4..3c5ae91 16 --- a/VisualEditor +++ b/VisualEditor -Subproject commit e4fdfd49517df67b136dfc3bec0e09088a4b00d3 +Subproject commit 3c5ae914903e8d5f2aff8bfc963c515fce8f0f5c -- To view, visit https://gerrit.wikimedia.org/r/218264 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2b5dbd9c666c724f1216a8f53aee9e86e6df46fb Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions Gerrit-Branch: master Gerrit-Owner: Jenkins-mwext-sync Gerrit-Reviewer: Jenkins-mwext-sync ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove dup. initialization of LeadImagesHandler displayDensity - change (apps...wikipedia)
jenkins-bot has submitted this change and it was merged. Change subject: Remove dup. initialization of LeadImagesHandler displayDensity .. Remove dup. initialization of LeadImagesHandler displayDensity looks unnecessary to me to have it twice. Change-Id: I278cb934e8a105daf995c84fb45e106d6eb64596 --- M wikipedia/src/main/java/org/wikipedia/page/leadimages/LeadImagesHandler.java 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: Dbrant: Looks good to me, approved Niedzielski: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/wikipedia/src/main/java/org/wikipedia/page/leadimages/LeadImagesHandler.java b/wikipedia/src/main/java/org/wikipedia/page/leadimages/LeadImagesHandler.java index f63c5b3..a898e8c 100755 --- a/wikipedia/src/main/java/org/wikipedia/page/leadimages/LeadImagesHandler.java +++ b/wikipedia/src/main/java/org/wikipedia/page/leadimages/LeadImagesHandler.java @@ -116,7 +116,6 @@ this.imageContainer = hidingView; this.bridge = bridge; this.webView = webview; -displayDensity = context.getResources().getDisplayMetrics().density; imagePlaceholder = (ImageView)imageContainer.findViewById(R.id.page_image_placeholder); image1 = (ImageViewWithFace)imageContainer.findViewById(R.id.page_image_1); -- To view, visit https://gerrit.wikimedia.org/r/218133 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I278cb934e8a105daf995c84fb45e106d6eb64596 Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Aude Gerrit-Reviewer: BearND Gerrit-Reviewer: Brion VIBBER Gerrit-Reviewer: Dbrant Gerrit-Reviewer: Mholloway Gerrit-Reviewer: Niedzielski Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix the autonym of Northern Luri and change Central to Northern - change (mediawiki/core)
Mjbmr has uploaded a new change for review. https://gerrit.wikimedia.org/r/218194 Change subject: Fix the autonym of Northern Luri and change Central to Northern .. Fix the autonym of Northern Luri and change Central to Northern Change-Id: Ie60524ec5735fce03f0b8add635cf7c17798b0ab --- M languages/Names.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/94/218194/1 diff --git a/languages/Names.php b/languages/Names.php index ddd40f1..d667b18 100644 --- a/languages/Names.php +++ b/languages/Names.php @@ -249,7 +249,7 @@ 'lmo' => 'lumbaart',# Lombard 'ln' => 'lingála', # Lingala 'lo' => 'ລາວ', # Laotian - 'lrc' => 'لوری مینجایی',# Northern Luri + 'lrc' => 'لۊری شومالی', # Northern Luri 'loz' => 'Silozi', # Lozi 'lt' => 'lietuvių', # Lithuanian 'ltg' => 'latgaļu', # Latgalian -- To view, visit https://gerrit.wikimedia.org/r/218194 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie60524ec5735fce03f0b8add635cf7c17798b0ab Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.26wmf8 Gerrit-Owner: Mjbmr ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix the autonym of Northern Luri and change Central to Northern - change (mediawiki/core)
Mjbmr has uploaded a new change for review. https://gerrit.wikimedia.org/r/218190 Change subject: Fix the autonym of Northern Luri and change Central to Northern .. Fix the autonym of Northern Luri and change Central to Northern Change-Id: Ie60524ec5735fce03f0b8add635cf7c17798b0ab --- M languages/Names.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/90/218190/1 diff --git a/languages/Names.php b/languages/Names.php index ddd40f1..d667b18 100644 --- a/languages/Names.php +++ b/languages/Names.php @@ -249,7 +249,7 @@ 'lmo' => 'lumbaart',# Lombard 'ln' => 'lingála', # Lingala 'lo' => 'ລາວ', # Laotian - 'lrc' => 'لوری مینجایی',# Northern Luri + 'lrc' => 'لۊری شومالی', # Northern Luri 'loz' => 'Silozi', # Lozi 'lt' => 'lietuvių', # Lithuanian 'ltg' => 'latgaļu', # Latgalian -- To view, visit https://gerrit.wikimedia.org/r/218190 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie60524ec5735fce03f0b8add635cf7c17798b0ab Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.26wmf9 Gerrit-Owner: Mjbmr ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Establish the project's name, once and for all - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: Establish the project's name, once and for all .. Establish the project's name, once and for all Change-Id: Ib8d24777ce91e5f5ded21324a784147e92b4804d --- M pywikibot/cosmetic_changes.py M scripts/weblinkchecker.py M setup.py M tests/interwiki_link_tests.py M tests/link_tests.py 5 files changed, 5 insertions(+), 5 deletions(-) Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified diff --git a/pywikibot/cosmetic_changes.py b/pywikibot/cosmetic_changes.py index 4e6cf84..c85548c 100755 --- a/pywikibot/cosmetic_changes.py +++ b/pywikibot/cosmetic_changes.py @@ -350,7 +350,7 @@ interwikiLinks = None allstars = [] -# The PyWikipediaBot is no longer allowed to touch categories on the +# Pywikibot is no longer allowed to touch categories on the # German Wikipedia. See # https://de.wikipedia.org/wiki/Hilfe_Diskussion:Personendaten/Archiv/1#Position_der_Personendaten_am_.22Artikelende.22 # ignoring nn-wiki of cause of the comment line above iw section diff --git a/scripts/weblinkchecker.py b/scripts/weblinkchecker.py index 175b8a2..e3c8caf 100755 --- a/scripts/weblinkchecker.py +++ b/scripts/weblinkchecker.py @@ -275,7 +275,7 @@ # 'User-agent': pywikibot.useragent, # we fake being Firefox because some webservers block unknown # clients, e.g. https://images.google.de/images?q=Albit gives a 403 -# when using the PyWikipediaBot user agent. +# when using the Pywikibot user agent. 'User-agent': 'Mozilla/5.0 (X11; U; Linux i686; de; rv:1.8) Gecko/20051128 SUSE/1.5-0.1 Firefox/1.5', 'Accept': 'text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5', 'Accept-Language': 'de-de,de;q=0.8,en-us;q=0.5,en;q=0.3', diff --git a/setup.py b/setup.py index ee5bab7..972c985 100644 --- a/setup.py +++ b/setup.py @@ -147,7 +147,7 @@ description='Python MediaWiki Bot Framework', long_description=open('README.rst').read(), maintainer='The Pywikibot team', -maintainer_email='pywikipedi...@lists.wikimedia.org', +maintainer_email='pywiki...@lists.wikimedia.org', license='MIT License', packages=['pywikibot'] + [package for package in find_packages() diff --git a/tests/interwiki_link_tests.py b/tests/interwiki_link_tests.py index 0ddee67..8b07ead 100644 --- a/tests/interwiki_link_tests.py +++ b/tests/interwiki_link_tests.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- """Test Interwiki Link functionality.""" # -# (C) Pywikipedia bot team, 2014 +# (C) Pywikibot team, 2014 # # Distributed under the terms of the MIT license. # diff --git a/tests/link_tests.py b/tests/link_tests.py index 29d216f..253da43 100644 --- a/tests/link_tests.py +++ b/tests/link_tests.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- """Test Link functionality.""" # -# (C) Pywikipedia bot team, 2014 +# (C) Pywikibot team, 2014 # # Distributed under the terms of the MIT license. # -- To view, visit https://gerrit.wikimedia.org/r/218153 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib8d24777ce91e5f5ded21324a784147e92b4804d Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Ricordisamoa Gerrit-Reviewer: John Vandenberg Gerrit-Reviewer: Ladsgroup Gerrit-Reviewer: Merlijn van Deen Gerrit-Reviewer: Ricordisamoa Gerrit-Reviewer: XZise Gerrit-Reviewer: Xqt Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make it optional for Google AdSense - change (translatewiki)
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/218154 Change subject: Make it optional for Google AdSense .. Make it optional for Google AdSense Requires first https://gerrit.wikimedia.org/r/#/c/218152/ be approved. Change-Id: I5b6715adefec32708137621a6a4f712a4d3d1950 --- M groups/EntryScape/Checker.php M groups/EntryScape/Suggester.php M groups/MediaWiki/mediawiki-extensions.txt 3 files changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/54/218154/1 diff --git a/groups/EntryScape/Checker.php b/groups/EntryScape/Checker.php index f48d5f4..c1fc23a 100644 --- a/groups/EntryScape/Checker.php +++ b/groups/EntryScape/Checker.php @@ -7,6 +7,6 @@ class EntryScapeMessageChecker extends MessageChecker { protected function EntryScapeVariablesCheck( $messages, $code, &$warnings ) { - return parent::parameterCheck( $messages, $code, $warnings, '/\$?{[^}]+}|%s/' ); + return parent::parameterCheck( $messages, $code, $warnings, '/\$?{[a-z]+}|%s/' ); } } diff --git a/groups/EntryScape/Suggester.php b/groups/EntryScape/Suggester.php index 684c987..d44a007 100644 --- a/groups/EntryScape/Suggester.php +++ b/groups/EntryScape/Suggester.php @@ -5,13 +5,13 @@ * @license GPL-2.0+ */ -class EntyScapeInsertablesSuggester { +class EntryScapeInsertablesSuggester { public function getInsertables( $text ) { $insertables = array(); - // ${app}, {user}, %s + // ${app}, {user}, %s, NOT {{PLURAL}} $matches = array(); - preg_match_all( '/\$?{[^}]+}|%s/', $text, $matches, PREG_SET_ORDER ); + preg_match_all( '/\$?{[a-z]+}|%s/', $text, $matches, PREG_SET_ORDER ); $new = array_map( function( $match ) { return new Insertable( $match[0], $match[0] ); }, $matches ); diff --git a/groups/MediaWiki/mediawiki-extensions.txt b/groups/MediaWiki/mediawiki-extensions.txt index ad39556..6ccdd33 100644 --- a/groups/MediaWiki/mediawiki-extensions.txt +++ b/groups/MediaWiki/mediawiki-extensions.txt @@ -1073,7 +1073,7 @@ #Go To Shell Google AdSense -ignored = googleadsense +optional = googleadsense google Analytics -- To view, visit https://gerrit.wikimedia.org/r/218154 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5b6715adefec32708137621a6a4f712a4d3d1950 Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Paladox ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Establish the project's name, once and for all - change (pywikibot/core)
Ricordisamoa has uploaded a new change for review. https://gerrit.wikimedia.org/r/218153 Change subject: Establish the project's name, once and for all .. Establish the project's name, once and for all Change-Id: Ib8d24777ce91e5f5ded21324a784147e92b4804d --- M pywikibot/cosmetic_changes.py M scripts/weblinkchecker.py M setup.py M tests/interwiki_link_tests.py M tests/link_tests.py 5 files changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/53/218153/1 diff --git a/pywikibot/cosmetic_changes.py b/pywikibot/cosmetic_changes.py index 4e6cf84..c85548c 100755 --- a/pywikibot/cosmetic_changes.py +++ b/pywikibot/cosmetic_changes.py @@ -350,7 +350,7 @@ interwikiLinks = None allstars = [] -# The PyWikipediaBot is no longer allowed to touch categories on the +# Pywikibot is no longer allowed to touch categories on the # German Wikipedia. See # https://de.wikipedia.org/wiki/Hilfe_Diskussion:Personendaten/Archiv/1#Position_der_Personendaten_am_.22Artikelende.22 # ignoring nn-wiki of cause of the comment line above iw section diff --git a/scripts/weblinkchecker.py b/scripts/weblinkchecker.py index 175b8a2..e3c8caf 100755 --- a/scripts/weblinkchecker.py +++ b/scripts/weblinkchecker.py @@ -275,7 +275,7 @@ # 'User-agent': pywikibot.useragent, # we fake being Firefox because some webservers block unknown # clients, e.g. https://images.google.de/images?q=Albit gives a 403 -# when using the PyWikipediaBot user agent. +# when using the Pywikibot user agent. 'User-agent': 'Mozilla/5.0 (X11; U; Linux i686; de; rv:1.8) Gecko/20051128 SUSE/1.5-0.1 Firefox/1.5', 'Accept': 'text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5', 'Accept-Language': 'de-de,de;q=0.8,en-us;q=0.5,en;q=0.3', diff --git a/setup.py b/setup.py index ee5bab7..972c985 100644 --- a/setup.py +++ b/setup.py @@ -147,7 +147,7 @@ description='Python MediaWiki Bot Framework', long_description=open('README.rst').read(), maintainer='The Pywikibot team', -maintainer_email='pywikipedi...@lists.wikimedia.org', +maintainer_email='pywiki...@lists.wikimedia.org', license='MIT License', packages=['pywikibot'] + [package for package in find_packages() diff --git a/tests/interwiki_link_tests.py b/tests/interwiki_link_tests.py index 0ddee67..8b07ead 100644 --- a/tests/interwiki_link_tests.py +++ b/tests/interwiki_link_tests.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- """Test Interwiki Link functionality.""" # -# (C) Pywikipedia bot team, 2014 +# (C) Pywikibot team, 2014 # # Distributed under the terms of the MIT license. # diff --git a/tests/link_tests.py b/tests/link_tests.py index 29d216f..253da43 100644 --- a/tests/link_tests.py +++ b/tests/link_tests.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- """Test Link functionality.""" # -# (C) Pywikipedia bot team, 2014 +# (C) Pywikibot team, 2014 # # Distributed under the terms of the MIT license. # -- To view, visit https://gerrit.wikimedia.org/r/218153 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib8d24777ce91e5f5ded21324a784147e92b4804d Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Ricordisamoa ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add license to Main php file - change (mediawiki...GoogleAdSense)
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/218152 Change subject: Add license to Main php file .. Add license to Main php file * Also add namemsg because the text is in en.json with the name. * Update license to include MIT name above file. Change-Id: Ice7dbe30dfdabf18329927f513e1d548653d4fd2 --- M GoogleAdSense.php M LICENSE M i18n/qqq.json 3 files changed, 22 insertions(+), 21 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GoogleAdSense refs/changes/52/218152/1 diff --git a/GoogleAdSense.php b/GoogleAdSense.php index 0541142..8ceace0 100644 --- a/GoogleAdSense.php +++ b/GoogleAdSense.php @@ -41,10 +41,12 @@ $wgExtensionCredits['other'][] = array( 'path' => __FILE__, 'name' => 'Google AdSense', + 'namemsg' => 'googleadsense', 'version'=> '2.2.0', 'author' => 'Siebrand Mazeland', 'descriptionmsg' => 'googleadsense-desc', - 'url'=> 'https://www.mediawiki.org/wiki/Extension:Google_AdSense_2', + 'url'=> 'https://www.mediawiki.org/wiki/Extension:Google_AdSense', + 'license-name' => 'MIT', ); // Register class and localisations diff --git a/LICENSE b/LICENSE index 1772b96..33db107 100644 --- a/LICENSE +++ b/LICENSE @@ -1,22 +1,21 @@ +The MIT License (MIT) + Copyright (c) 2008 Siebrand Mazeland -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/i18n/qqq.json b/i18n/qqq.json index 533f168..9a57835 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -7,6 +7,6 @@ "Umherirrender" ] }, - "googleadsense": "{{notranslate}}", - "googleadsense-desc": "{{desc|name=Google AdSense|url=http://www.mediawiki.org/wiki/Extension:GoogleAdSense}}"; + "googleadsense": "{{optional}}", + "googleadsense-desc": "{{desc|name=Google AdSense|url=https://www.mediawiki.org/wiki/Extension:GoogleAdSense}}"; } -- To view, visit https://gerrit.wikimedia.org/r/218152 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ice7dbe30dfdabf18329927f513e1d548653d4fd2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/GoogleAdSense Gerrit-Branch: master Gerrit-Owner: Paladox ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] OOUIHTMLForm: Implement HTMLRadioField - change (mediawiki/core)
Bartosz Dziewoński has uploaded a new change for review. https://gerrit.wikimedia.org/r/218151 Change subject: OOUIHTMLForm: Implement HTMLRadioField .. OOUIHTMLForm: Implement HTMLRadioField Trivial now that we have RadioSelectInputWidget in OOUI (added in fd2815e372f6a4beb4f4e5f2a7d9cbf785d40851). Bug: 98855 Change-Id: I224e591e58534c07af62eebb9ae4b185225edc33 --- M includes/htmlform/HTMLRadioField.php 1 file changed, 17 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/51/218151/1 diff --git a/includes/htmlform/HTMLRadioField.php b/includes/htmlform/HTMLRadioField.php index 0f00540..077b539 100644 --- a/includes/htmlform/HTMLRadioField.php +++ b/includes/htmlform/HTMLRadioField.php @@ -38,6 +38,23 @@ return $html; } + function getInputOOUI( $value ) { + $options = array(); + foreach ( $this->getOptions() as $label => $value ) { + $options[] = array( + 'data' => $value, + 'label' => $this->mOptionsLabelsNotFromMessage ? new OOUI\HtmlSnippet( $label ) : $label, + ); + } + + $attribs = $this->getAttributes( array( 'disabled', 'tabindex' ), array( 'tabindex' => 'tabIndex' ) ) ); + return new OOUI\RadioSelectInputWidget( array( + 'value' => $value, + 'options' => $options, + 'classes' => 'mw-htmlform-flatlist-item', + ) + $attribs ); + } + function formatOptions( $options, $value ) { $html = ''; -- To view, visit https://gerrit.wikimedia.org/r/218151 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I224e591e58534c07af62eebb9ae4b185225edc33 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Bartosz Dziewoński ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] OOUIHTMLForm: Correctly handle mSubmitModifierClass - change (mediawiki/core)
Bartosz Dziewoński has uploaded a new change for review. https://gerrit.wikimedia.org/r/218149 Change subject: OOUIHTMLForm: Correctly handle mSubmitModifierClass .. OOUIHTMLForm: Correctly handle mSubmitModifierClass That's what we get for hard-coding implementation details early on... Bug: T98903 Change-Id: Icc20453c999c761b87e19a71ccd43d93b9c1bfa7 --- M includes/htmlform/OOUIHTMLForm.php 1 file changed, 3 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/49/218149/1 diff --git a/includes/htmlform/OOUIHTMLForm.php b/includes/htmlform/OOUIHTMLForm.php index 6c9952a..4d5294c 100644 --- a/includes/htmlform/OOUIHTMLForm.php +++ b/includes/htmlform/OOUIHTMLForm.php @@ -68,15 +68,12 @@ $attribs += Linker::tooltipAndAccesskeyAttribs( $this->mSubmitTooltip ); } - $attribs['classes'] = array( - 'mw-htmlform-submit', - $this->mSubmitModifierClass, - ); - + $attribs['classes'] = array( 'mw-htmlform-submit' ); $attribs['type'] = 'submit'; $attribs['label'] = $this->getSubmitText(); $attribs['value'] = $this->getSubmitText(); - $attribs['flags'] = array( 'primary', 'constructive' ); + // That's what we get for hard-coding implementation details early on... + $attribs['flags'] = array( 'primary', str_replace( 'mw-ui-', '', $this->mSubmitModifierClass ) ); $buttons .= new OOUI\ButtonInputWidget( $attribs ); } -- To view, visit https://gerrit.wikimedia.org/r/218149 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icc20453c999c761b87e19a71ccd43d93b9c1bfa7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Bartosz Dziewoński ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] OOUIHTMLForm: Implement HTMLMultiSelectField - change (mediawiki/core)
Bartosz Dziewoński has uploaded a new change for review. https://gerrit.wikimedia.org/r/218150 Change subject: OOUIHTMLForm: Implement HTMLMultiSelectField .. OOUIHTMLForm: Implement HTMLMultiSelectField Following the template set by HTMLCheckMatrix, which for some reason was implemented first. Also removed unfulfillable @todo comment. Also corrected HTMLCheckMatrix code not to wrap OOUI widgets in MediaWiki UI wrappers even when 'UseMediaWikiUIEverywhere' is set to true. Bug: 100955 Change-Id: Ib5d000ca9a08abc8086ee05b5122116b086242ad --- M includes/htmlform/HTMLCheckMatrix.php M includes/htmlform/HTMLMultiSelectField.php 2 files changed, 53 insertions(+), 32 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/50/218150/1 diff --git a/includes/htmlform/HTMLCheckMatrix.php b/includes/htmlform/HTMLCheckMatrix.php index 7ccb60e..ce83499 100644 --- a/includes/htmlform/HTMLCheckMatrix.php +++ b/includes/htmlform/HTMLCheckMatrix.php @@ -119,9 +119,8 @@ foreach ( $columns as $columnTag ) { $thisTag = "$columnTag-$rowTag"; // Construct the checkbox - $thisId = "{$this->mID}-$thisTag"; $thisAttribs = array( - 'id' => $thisId, + 'id' => "{$this->mID}-$thisTag", 'value' => $thisTag, ); $checked = in_array( $thisTag, (array)$value, true ); @@ -132,18 +131,13 @@ $checked = true; $thisAttribs['disabled'] = 1; } - $chkBox = $this->getOneCheckbox( $checked, $attribs + $thisAttribs ); - if ( $this->mParent->getConfig()->get( 'UseMediaWikiUIEverywhere' ) ) { - $chkBox = Html::openElement( 'div', array( 'class' => 'mw-ui-checkbox' ) ) . - $chkBox . - Html::element( 'label', array( 'for' => $thisId ) ) . - Html::closeElement( 'div' ); - } + $checkbox = $this->getOneCheckbox( $checked, $attribs + $thisAttribs ); + $rowContents .= Html::rawElement( 'td', array(), - $chkBox + $checkbox ); } $tableContents .= Html::rawElement( 'tr', array(), "\n$rowContents\n" ); @@ -164,9 +158,16 @@ 'selected' => $checked, 'value' => '1', ) + $attribs ); + } else { + $checkbox = Xml::check( "{$this->mName}[]", $checked, $attribs ); + if ( $this->mParent->getConfig()->get( 'UseMediaWikiUIEverywhere' ) ) { + $checkbox = Html::openElement( 'div', array( 'class' => 'mw-ui-checkbox' ) ) . + $checkbox . + Html::element( 'label', array( 'for' => $attribs['id'] ) ) . + Html::closeElement( 'div' ); + } + return $checkbox; } - - return Xml::check( "{$this->mName}[]", $checked, $attribs ); } protected function isTagForcedOff( $tag ) { diff --git a/includes/htmlform/HTMLMultiSelectField.php b/includes/htmlform/HTMLMultiSelectField.php index 8d28b59..d2acc2f 100644 --- a/includes/htmlform/HTMLMultiSelectField.php +++ b/includes/htmlform/HTMLMultiSelectField.php @@ -38,34 +38,19 @@ $html = ''; $attribs = $this->getAttributes( array( 'disabled', 'tabindex' ) ); - $elementFunc = array( 'Html', $this->mOptionsLabelsNotFromMessage ? 'rawElement' : 'element' ); foreach ( $options as $label => $info ) { if ( is_array( $info ) ) { $html .= Html::rawElement( 'h1', array(), $label ) . "\n"; $html .= $this->formatOptions( $info, $value ); } else { - $thisAttribs = array( 'id' => "{$this->mID}-$info", 'value' => $info ); - - // @todo: Make this use checkLabel for consistency purposes - $checkbox = Xml::check( -
[MediaWiki-commits] [Gerrit] Remove i18n shim - change (mediawiki...GoogleAdSense)
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/218148 Change subject: Remove i18n shim .. Remove i18n shim Change-Id: I320d13e6cdbaba974f2c7d4f43b0e421c389f57c --- D GoogleAdSense.i18n.php M GoogleAdSense.php M i18n/qqq.json 3 files changed, 3 insertions(+), 40 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GoogleAdSense refs/changes/48/218148/1 diff --git a/GoogleAdSense.i18n.php b/GoogleAdSense.i18n.php deleted file mode 100644 index 936c301..000 --- a/GoogleAdSense.i18n.php +++ /dev/null @@ -1,35 +0,0 @@ -https://git.wikimedia.org/blob/mediawiki%2Fcore.git/HEAD/maintenance%2FgenerateJsonI18n.php - * - * Beginning with MediaWiki 1.23, translation strings are stored in json files, - * and the EXTENSION.i18n.php file only exists to provide compatibility with - * older releases of MediaWiki. For more information about this migration, see: - * https://www.mediawiki.org/wiki/Requests_for_comment/Localisation_format - * - * This shim maintains compatibility back to MediaWiki 1.17. - */ -$messages = array(); -if ( !function_exists( 'wfJsonI18nShim46815c17c8ce10ed' ) ) { - function wfJsonI18nShim46815c17c8ce10ed( $cache, $code, &$cachedData ) { - $codeSequence = array_merge( array( $code ), $cachedData['fallbackSequence'] ); - foreach ( $codeSequence as $csCode ) { - $fileName = dirname( __FILE__ ) . "/i18n/$csCode.json"; - if ( is_readable( $fileName ) ) { - $data = FormatJson::decode( file_get_contents( $fileName ), true ); - foreach ( array_keys( $data ) as $key ) { - if ( $key === '' || $key[0] === '@' ) { - unset( $data[$key] ); - } - } - $cachedData['messages'] = array_merge( $data, $cachedData['messages'] ); - } - - $cachedData['deps'][] = new FileDependency( $fileName ); - } - return true; - } - - $GLOBALS['wgHooks']['LocalisationCacheRecache'][] = 'wfJsonI18nShim46815c17c8ce10ed'; -} diff --git a/GoogleAdSense.php b/GoogleAdSense.php index 0541142..0b467db 100644 --- a/GoogleAdSense.php +++ b/GoogleAdSense.php @@ -48,10 +48,8 @@ ); // Register class and localisations -$dir = dirname( __FILE__ ) . '/'; -$wgAutoloadClasses['GoogleAdSense'] = $dir . 'GoogleAdSense.class.php'; +$wgAutoloadClasses['GoogleAdSense'] = __DIR__ . '/GoogleAdSense.class.php'; $wgMessagesDirs['GoogleAdSense'] = __DIR__ . '/i18n'; -$wgExtensionMessagesFiles['GoogleAdSense'] = $dir . 'GoogleAdSense.i18n.php'; // Hook to modify the sidebar $wgHooks['SkinBuildSidebar'][] = 'GoogleAdSense::GoogleAdSenseInSidebar'; @@ -59,6 +57,6 @@ // Client-side resource modules $wgResourceModules['ext.googleadsense'] = array( 'styles' => 'resources/ext.googleadsense.css', - 'localBasePath' => $dir, + 'localBasePath' => __DIR__, 'remoteExtPath' => 'GoogleAdSense' ); diff --git a/i18n/qqq.json b/i18n/qqq.json index 533f168..deabd25 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -8,5 +8,5 @@ ] }, "googleadsense": "{{notranslate}}", - "googleadsense-desc": "{{desc|name=Google AdSense|url=http://www.mediawiki.org/wiki/Extension:GoogleAdSense}}"; + "googleadsense-desc": "{{desc|name=Google AdSense|url=https://www.mediawiki.org/wiki/Extension:GoogleAdSense}}"; } -- To view, visit https://gerrit.wikimedia.org/r/218148 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I320d13e6cdbaba974f2c7d4f43b0e421c389f57c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/GoogleAdSense Gerrit-Branch: master Gerrit-Owner: Paladox ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Improved variable checks for EntryScape - change (translatewiki)
jenkins-bot has submitted this change and it was merged. Change subject: Improved variable checks for EntryScape .. Improved variable checks for EntryScape Change-Id: I1a9874417bd510fd4d420a4258b2e1a8bd71c0b2 --- M groups/EntryScape/Checker.php M groups/EntryScape/Suggester.php 2 files changed, 4 insertions(+), 4 deletions(-) Approvals: Nikerabbit: Looks good to me, approved jenkins-bot: Verified diff --git a/groups/EntryScape/Checker.php b/groups/EntryScape/Checker.php index f48d5f4..c1fc23a 100644 --- a/groups/EntryScape/Checker.php +++ b/groups/EntryScape/Checker.php @@ -7,6 +7,6 @@ class EntryScapeMessageChecker extends MessageChecker { protected function EntryScapeVariablesCheck( $messages, $code, &$warnings ) { - return parent::parameterCheck( $messages, $code, $warnings, '/\$?{[^}]+}|%s/' ); + return parent::parameterCheck( $messages, $code, $warnings, '/\$?{[a-z]+}|%s/' ); } } diff --git a/groups/EntryScape/Suggester.php b/groups/EntryScape/Suggester.php index 684c987..d44a007 100644 --- a/groups/EntryScape/Suggester.php +++ b/groups/EntryScape/Suggester.php @@ -5,13 +5,13 @@ * @license GPL-2.0+ */ -class EntyScapeInsertablesSuggester { +class EntryScapeInsertablesSuggester { public function getInsertables( $text ) { $insertables = array(); - // ${app}, {user}, %s + // ${app}, {user}, %s, NOT {{PLURAL}} $matches = array(); - preg_match_all( '/\$?{[^}]+}|%s/', $text, $matches, PREG_SET_ORDER ); + preg_match_all( '/\$?{[a-z]+}|%s/', $text, $matches, PREG_SET_ORDER ); $new = array_map( function( $match ) { return new Insertable( $match[0], $match[0] ); }, $matches ); -- To view, visit https://gerrit.wikimedia.org/r/218145 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1a9874417bd510fd4d420a4258b2e1a8bd71c0b2 Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Nikerabbit Gerrit-Reviewer: Nikerabbit Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [BUGFIX] Merge commit 7c920d54dad37d801a060219ea0586bb3e8c53... - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: [BUGFIX] Merge commit 7c920d54dad37d801a060219ea0586bb3e8c53cb into 2.0 .. [BUGFIX] Merge commit 7c920d54dad37d801a060219ea0586bb3e8c53cb into 2.0 backport this change to 2.0 branch because replace.py is broken. Change-Id: I3e338bed1f443e77e1b62411a221f72632f52c08 --- M scripts/replace.py 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Ricordisamoa: Looks good to me, approved jenkins-bot: Verified diff --git a/scripts/replace.py b/scripts/replace.py index cf131da..f5eeeb6 100755 --- a/scripts/replace.py +++ b/scripts/replace.py @@ -409,7 +409,7 @@ @deprecated_args(acceptall='always') def __init__(self, generator, replacements, exceptions={}, always=False, allowoverlap=False, recursive=False, - addedCat=None, sleep=None, summary='', **kwargs): + addedCat=None, sleep=None, summary='', site=None, **kwargs): """ Constructor. @@ -450,6 +450,7 @@ """ super(ReplaceRobot, self).__init__(generator=generator, always=always, + site=site, **kwargs) for i, replacement in enumerate(replacements): -- To view, visit https://gerrit.wikimedia.org/r/218130 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3e338bed1f443e77e1b62411a221f72632f52c08 Gerrit-PatchSet: 2 Gerrit-Project: pywikibot/core Gerrit-Branch: 2.0 Gerrit-Owner: Xqt Gerrit-Reviewer: John Vandenberg Gerrit-Reviewer: Ladsgroup Gerrit-Reviewer: Merlijn van Deen Gerrit-Reviewer: Ricordisamoa Gerrit-Reviewer: XZise Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Change default branch for REL1_25 from master to REL1_25 - change (mediawiki...GoogleAdSense)
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/218147 Change subject: Change default branch for REL1_25 from master to REL1_25 .. Change default branch for REL1_25 from master to REL1_25 Change-Id: Iade5212ee22efd23c7977575e5e1e74047091ffb --- M .gitreview M i18n/qqq.json 2 files changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GoogleAdSense refs/changes/47/218147/1 diff --git a/.gitreview b/.gitreview index 0e0b2da..b37054c 100644 --- a/.gitreview +++ b/.gitreview @@ -1,6 +1,6 @@ [gerrit] host=gerrit.wikimedia.org port=29418 -project=mediawiki/extensions/GoogleAdSense -defaultbranch=master +project=mediawiki/extensions/GoogleAdSense.git +defaultbranch=REL1_25 defaultrebase=0 \ No newline at end of file diff --git a/i18n/qqq.json b/i18n/qqq.json index 533f168..deabd25 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -8,5 +8,5 @@ ] }, "googleadsense": "{{notranslate}}", - "googleadsense-desc": "{{desc|name=Google AdSense|url=http://www.mediawiki.org/wiki/Extension:GoogleAdSense}}"; + "googleadsense-desc": "{{desc|name=Google AdSense|url=https://www.mediawiki.org/wiki/Extension:GoogleAdSense}}"; } -- To view, visit https://gerrit.wikimedia.org/r/218147 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iade5212ee22efd23c7977575e5e1e74047091ffb Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/GoogleAdSense Gerrit-Branch: REL1_25 Gerrit-Owner: Paladox ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Avoid muliple cache calls to explicitly defined tags - change (mediawiki/core)
Cenarium has uploaded a new change for review. https://gerrit.wikimedia.org/r/218146 Change subject: Avoid muliple cache calls to explicitly defined tags .. Avoid muliple cache calls to explicitly defined tags This avoids muliple cache calls to explicitly defined tags by calling the showTagEditUI of ChangeTags only once in logs and histories. Change-Id: I2e36dbd96d3fcca06de0bf418bc6dc294d8d18d3 --- M includes/actions/HistoryAction.php M includes/logging/LogEventsList.php 2 files changed, 14 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/46/218146/1 diff --git a/includes/actions/HistoryAction.php b/includes/actions/HistoryAction.php index f4f2a2a..a81adf9 100644 --- a/includes/actions/HistoryAction.php +++ b/includes/actions/HistoryAction.php @@ -368,6 +368,9 @@ */ protected $parentLens; + /** @var bool Whether to show the tag editing UI */ + protected $showTagEditUI; + /** * @param HistoryAction $historyPage * @param string $year @@ -381,6 +384,7 @@ $this->tagFilter = $tagFilter; $this->getDateCond( $year, $month ); $this->conds = $conds; + $this->showTagEditUI = ChangeTags::showTagEditingUI( $this->getUser() ); } // For hook compatibility... @@ -504,7 +508,7 @@ if ( $user->isAllowed( 'deleterevision' ) ) { $actionButtons .= $this->getRevisionButton( 'revisiondelete', 'showhideselectedversions' ); } - if ( ChangeTags::showTagEditingUI( $user ) ) { + if ( $this->showTagEditUI ) { $actionButtons .= $this->getRevisionButton( 'editchangetags', 'history-edit-tags' ); } if ( $actionButtons ) { @@ -631,14 +635,13 @@ $del = ''; $user = $this->getUser(); $canRevDelete = $user->isAllowed( 'deleterevision' ); - $showTagEditUI = ChangeTags::showTagEditingUI( $user ); // Show checkboxes for each revision, to allow for revision deletion and // change tags - if ( $canRevDelete || $showTagEditUI ) { + if ( $canRevDelete || $this->showTagEditUI ) { $this->preventClickjacking(); // If revision was hidden from sysops and we don't need the checkbox // for anything else, disable it - if ( !$showTagEditUI && !$rev->userCan( Revision::DELETED_RESTRICTED, $user ) ) { + if ( !$this->showTagEditUI && !$rev->userCan( Revision::DELETED_RESTRICTED, $user ) ) { $del = Xml::check( 'deleterevisions', false, array( 'disabled' => 'disabled' ) ); // Otherwise, enable the checkbox... } else { diff --git a/includes/logging/LogEventsList.php b/includes/logging/LogEventsList.php index dfe3136..1b56584 100644 --- a/includes/logging/LogEventsList.php +++ b/includes/logging/LogEventsList.php @@ -36,6 +36,11 @@ protected $mDefaultQuery; /** +* @var bool +*/ + protected $showTagEditUI; + + /** * Constructor. * The first two parameters used to be $skin and $out, but now only a context * is needed, that's why there's a second unused parameter. @@ -55,6 +60,7 @@ } $this->flags = $flags; + $this->showTagEditUI = ChangeTags::showTagEditingUI( $this->getUser() ); } /** @@ -348,7 +354,7 @@ $user = $this->getUser(); // If change tag editing is available to this user, return the checkbox - if ( $this->flags & self::USE_CHECKBOXES && ChangeTags::showTagEditingUI( $user ) ) { + if ( $this->flags & self::USE_CHECKBOXES && $this->showTagEditUI ) { return Xml::check( 'showhiderevisions', false, -- To view, visit https://gerrit.wikimedia.org/r/218146 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2e36dbd96d3fcca06de0bf418bc6dc294d8d18d3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Cenarium ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Improved variable checks for EntryScape - change (translatewiki)
Nikerabbit has uploaded a new change for review. https://gerrit.wikimedia.org/r/218145 Change subject: Improved variable checks for EntryScape .. Improved variable checks for EntryScape Change-Id: I1a9874417bd510fd4d420a4258b2e1a8bd71c0b2 --- M groups/EntryScape/Checker.php M groups/EntryScape/Suggester.php 2 files changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/45/218145/1 diff --git a/groups/EntryScape/Checker.php b/groups/EntryScape/Checker.php index f48d5f4..c1fc23a 100644 --- a/groups/EntryScape/Checker.php +++ b/groups/EntryScape/Checker.php @@ -7,6 +7,6 @@ class EntryScapeMessageChecker extends MessageChecker { protected function EntryScapeVariablesCheck( $messages, $code, &$warnings ) { - return parent::parameterCheck( $messages, $code, $warnings, '/\$?{[^}]+}|%s/' ); + return parent::parameterCheck( $messages, $code, $warnings, '/\$?{[a-z]+}|%s/' ); } } diff --git a/groups/EntryScape/Suggester.php b/groups/EntryScape/Suggester.php index 684c987..d44a007 100644 --- a/groups/EntryScape/Suggester.php +++ b/groups/EntryScape/Suggester.php @@ -5,13 +5,13 @@ * @license GPL-2.0+ */ -class EntyScapeInsertablesSuggester { +class EntryScapeInsertablesSuggester { public function getInsertables( $text ) { $insertables = array(); - // ${app}, {user}, %s + // ${app}, {user}, %s, NOT {{PLURAL}} $matches = array(); - preg_match_all( '/\$?{[^}]+}|%s/', $text, $matches, PREG_SET_ORDER ); + preg_match_all( '/\$?{[a-z]+}|%s/', $text, $matches, PREG_SET_ORDER ); $new = array_map( function( $match ) { return new Insertable( $match[0], $match[0] ); }, $matches ); -- To view, visit https://gerrit.wikimedia.org/r/218145 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1a9874417bd510fd4d420a4258b2e1a8bd71c0b2 Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update .gitreview - change (mediawiki...GoogleAdSense)
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/218144 Change subject: Update .gitreview .. Update .gitreview * Add .git at end of project. This might be the reason it isent showing on translatewiki any more. Change-Id: I6133ff80e3cb6fee4b3c1e8e989d62e204edb4a9 --- M .gitreview M i18n/qqq.json 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GoogleAdSense refs/changes/44/218144/1 diff --git a/.gitreview b/.gitreview index 0e0b2da..457f0be 100644 --- a/.gitreview +++ b/.gitreview @@ -1,6 +1,6 @@ [gerrit] host=gerrit.wikimedia.org port=29418 -project=mediawiki/extensions/GoogleAdSense +project=mediawiki/extensions/GoogleAdSense.git defaultbranch=master defaultrebase=0 \ No newline at end of file diff --git a/i18n/qqq.json b/i18n/qqq.json index 533f168..deabd25 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -8,5 +8,5 @@ ] }, "googleadsense": "{{notranslate}}", - "googleadsense-desc": "{{desc|name=Google AdSense|url=http://www.mediawiki.org/wiki/Extension:GoogleAdSense}}"; + "googleadsense-desc": "{{desc|name=Google AdSense|url=https://www.mediawiki.org/wiki/Extension:GoogleAdSense}}"; } -- To view, visit https://gerrit.wikimedia.org/r/218144 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6133ff80e3cb6fee4b3c1e8e989d62e204edb4a9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/GoogleAdSense Gerrit-Branch: master Gerrit-Owner: Paladox ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add Goan Konkani Language - change (mediawiki/core)
Mjbmr has uploaded a new change for review. https://gerrit.wikimedia.org/r/218143 Change subject: Add Goan Konkani Language .. Add Goan Konkani Language Bug: T96468 Change-Id: I12857c36baa2b931f2db86f6be9a50e5e3057967 --- M languages/Names.php A languages/messages/MessagesGom.php A languages/messages/MessagesGom_deva.php 3 files changed, 45 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/43/218143/1 diff --git a/languages/Names.php b/languages/Names.php index ddd40f1..ab8ec44 100644 --- a/languages/Names.php +++ b/languages/Names.php @@ -158,7 +158,9 @@ 'gl' => 'galego', # Galician 'glk' => 'گیلکی', # Gilaki 'gn' => 'Avañe\'ẽ', # Guaraní, Paraguayan - 'gom-latn' => 'Konknni',# Goan Konkani (Latin script) + 'gom' => 'गोवा कोंकणी / Gova Konknni', # Goan Konkani + 'gom-deva' => 'गोवा कोंकणी',# Goan Konkani (Devanagari script) + 'gom-latn' => 'Gova Konknni', # Goan Konkani (Latin script) 'got' => '𐌲𐌿𐍄𐌹𐍃𐌺', # Gothic 'grc' => 'Ἀρχαία ἑλληνικὴ', # Ancient Greek 'gsw' => 'Alemannisch', # Alemannic diff --git a/languages/messages/MessagesGom.php b/languages/messages/MessagesGom.php new file mode 100644 index 000..d684ed5 --- /dev/null +++ b/languages/messages/MessagesGom.php @@ -0,0 +1,11 @@ +https://translatewiki.net + * + * @ingroup Language + * @file + * + */ + +$fallback = 'gom-deva'; \ No newline at end of file diff --git a/languages/messages/MessagesGom_deva.php b/languages/messages/MessagesGom_deva.php new file mode 100644 index 000..58fc505 --- /dev/null +++ b/languages/messages/MessagesGom_deva.php @@ -0,0 +1,31 @@ +https://translatewiki.net + * + * @ingroup Language + * @file + * + * @author Darshan kandolkar + */ + +$fallback = 'hi'; + +$namespaceNames = array( + NS_MEDIA=> 'मिडिया', + NS_SPECIAL => 'विशेश', + NS_TALK => 'चर्चा', + NS_USER => 'उपेगकर्तो', + NS_USER_TALK=> 'उपेगकर्तो_चर्चा', + NS_PROJECT_TALK => '$1_चर्चा', + NS_FILE => 'फायल', + NS_FILE_TALK=> 'फायल_चर्चा', + NS_MEDIAWIKI=> 'मिडियाविकी', + NS_MEDIAWIKI_TALK => 'मिडियाविकी_चर्चा', + NS_TEMPLATE => 'प्रारूप', + NS_TEMPLATE_TALK=> 'प्रारूप_चर्चा', + NS_HELP => 'मजत', + NS_HELP_TALK=> 'मजत_चर्चा', + NS_CATEGORY => 'श्रेणी', + NS_CATEGORY_TALK=> 'श्रेणी_चर्चा', +); \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/218143 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I12857c36baa2b931f2db86f6be9a50e5e3057967 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.26wmf8 Gerrit-Owner: Mjbmr ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add Goan Konkani Language - change (mediawiki/core)
Mjbmr has uploaded a new change for review. https://gerrit.wikimedia.org/r/218142 Change subject: Add Goan Konkani Language .. Add Goan Konkani Language Bug: T96468 Change-Id: I12857c36baa2b931f2db86f6be9a50e5e3057967 --- M languages/Names.php A languages/messages/MessagesGom.php A languages/messages/MessagesGom_deva.php 3 files changed, 45 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/42/218142/1 diff --git a/languages/Names.php b/languages/Names.php index ddd40f1..ab8ec44 100644 --- a/languages/Names.php +++ b/languages/Names.php @@ -158,7 +158,9 @@ 'gl' => 'galego', # Galician 'glk' => 'گیلکی', # Gilaki 'gn' => 'Avañe\'ẽ', # Guaraní, Paraguayan - 'gom-latn' => 'Konknni',# Goan Konkani (Latin script) + 'gom' => 'गोवा कोंकणी / Gova Konknni', # Goan Konkani + 'gom-deva' => 'गोवा कोंकणी',# Goan Konkani (Devanagari script) + 'gom-latn' => 'Gova Konknni', # Goan Konkani (Latin script) 'got' => '𐌲𐌿𐍄𐌹𐍃𐌺', # Gothic 'grc' => 'Ἀρχαία ἑλληνικὴ', # Ancient Greek 'gsw' => 'Alemannisch', # Alemannic diff --git a/languages/messages/MessagesGom.php b/languages/messages/MessagesGom.php new file mode 100644 index 000..d684ed5 --- /dev/null +++ b/languages/messages/MessagesGom.php @@ -0,0 +1,11 @@ +https://translatewiki.net + * + * @ingroup Language + * @file + * + */ + +$fallback = 'gom-deva'; \ No newline at end of file diff --git a/languages/messages/MessagesGom_deva.php b/languages/messages/MessagesGom_deva.php new file mode 100644 index 000..58fc505 --- /dev/null +++ b/languages/messages/MessagesGom_deva.php @@ -0,0 +1,31 @@ +https://translatewiki.net + * + * @ingroup Language + * @file + * + * @author Darshan kandolkar + */ + +$fallback = 'hi'; + +$namespaceNames = array( + NS_MEDIA=> 'मिडिया', + NS_SPECIAL => 'विशेश', + NS_TALK => 'चर्चा', + NS_USER => 'उपेगकर्तो', + NS_USER_TALK=> 'उपेगकर्तो_चर्चा', + NS_PROJECT_TALK => '$1_चर्चा', + NS_FILE => 'फायल', + NS_FILE_TALK=> 'फायल_चर्चा', + NS_MEDIAWIKI=> 'मिडियाविकी', + NS_MEDIAWIKI_TALK => 'मिडियाविकी_चर्चा', + NS_TEMPLATE => 'प्रारूप', + NS_TEMPLATE_TALK=> 'प्रारूप_चर्चा', + NS_HELP => 'मजत', + NS_HELP_TALK=> 'मजत_चर्चा', + NS_CATEGORY => 'श्रेणी', + NS_CATEGORY_TALK=> 'श्रेणी_चर्चा', +); \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/218142 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I12857c36baa2b931f2db86f6be9a50e5e3057967 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.26wmf9 Gerrit-Owner: Mjbmr ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add missing PHP file for WikiEduDashboard suggester - change (translatewiki)
jenkins-bot has submitted this change and it was merged. Change subject: Add missing PHP file for WikiEduDashboard suggester .. Add missing PHP file for WikiEduDashboard suggester Change-Id: I907af5317b1c4d67f927b203cf10968a46673d07 --- A groups/Wikimedia/WikiEduDashboardSuggester.php 1 file changed, 30 insertions(+), 0 deletions(-) Approvals: Nikerabbit: Looks good to me, approved jenkins-bot: Verified diff --git a/groups/Wikimedia/WikiEduDashboardSuggester.php b/groups/Wikimedia/WikiEduDashboardSuggester.php new file mode 100644 index 000..619f43d --- /dev/null +++ b/groups/Wikimedia/WikiEduDashboardSuggester.php @@ -0,0 +1,30 @@ +https://gerrit.wikimedia.org/r/218141 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I907af5317b1c4d67f927b203cf10968a46673d07 Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Nikerabbit Gerrit-Reviewer: Nikerabbit Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add missing PHP file for WikiEduDashboard suggester - change (translatewiki)
Nikerabbit has uploaded a new change for review. https://gerrit.wikimedia.org/r/218141 Change subject: Add missing PHP file for WikiEduDashboard suggester .. Add missing PHP file for WikiEduDashboard suggester Change-Id: I907af5317b1c4d67f927b203cf10968a46673d07 --- A groups/Wikimedia/WikiEduDashboardSuggester.php 1 file changed, 30 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/41/218141/1 diff --git a/groups/Wikimedia/WikiEduDashboardSuggester.php b/groups/Wikimedia/WikiEduDashboardSuggester.php new file mode 100644 index 000..619f43d --- /dev/null +++ b/groups/Wikimedia/WikiEduDashboardSuggester.php @@ -0,0 +1,30 @@ +https://gerrit.wikimedia.org/r/218141 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I907af5317b1c4d67f927b203cf10968a46673d07 Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] WikiLove message enhancements - change (mediawiki...WikiLove)
Purodha has uploaded a new change for review. https://gerrit.wikimedia.org/r/218140 Change subject: WikiLove message enhancements .. WikiLove message enhancements See also: https://translatewiki.net/wiki/Thread:Support/About_MediaWiki:Apihelp-wikilove-param-type/ksh https://translatewiki.net/wiki/Thread:Support/About_MediaWiki:Apihelp-wikilove-param-type/ksh_(2) Change-Id: I1963718205b3ed277a5df42211aee3f46c7d403c --- M i18n/en.json 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikiLove refs/changes/40/218140/1 diff --git a/i18n/en.json b/i18n/en.json index d020899..df6f7ae 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -189,7 +189,7 @@ "apihelp-wikilove-param-text": "Raw wikitext to add in the new section.", "apihelp-wikilove-param-message": "Actual message the user has entered, for logging purposes.", "apihelp-wikilove-param-subject": "Subject header of the new section.", - "apihelp-wikilove-param-type": "Type of WikiLove (for statistics); this corresponds with a type selected in the left menu, and optionally a subtype after that (e.g. \"barnstar-normal\" or \"kitten\").", - "apihelp-wikilove-param-email": "Content of the optional email message to send to the user. A warning will be returned if the user cannot be emailed. WikiLove will be sent to user talk page either way.", - "apihelp-wikilove-example-1": "Send WikiLove to [[User:Dummy]]" + "apihelp-wikilove-param-type": "Type of WikiLove (for statistics); this corresponds with a type selected in the menu, and optionally a subtype after that (e.g. as in \"{{int:wikilove-barnstar-original-title}}\" or \"{{int:wikilove-kittens-header}}\").", + "apihelp-wikilove-param-email": "Content of the optional email message to send to the user. A warning will be returned if the user cannot be emailed. WikiLove will be sent to the users talk page either way.", + "apihelp-wikilove-example-1": "Send WikiLove to \"[[User:Dummy]]\"" } -- To view, visit https://gerrit.wikimedia.org/r/218140 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1963718205b3ed277a5df42211aee3f46c7d403c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikiLove Gerrit-Branch: master Gerrit-Owner: Purodha ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] implements some of Daniels hints - change (mediawiki...WikidataQualityConstraints)
Jonaskeutel has uploaded a new change for review. https://gerrit.wikimedia.org/r/218138 Change subject: implements some of Daniels hints .. implements some of Daniels hints done for: * EvaluateConstraintReportJobService.php * TypeCheckerHelper.php * ValueCountCheckerHelper.php Change-Id: I5d1b11d0269a515ada443da560d354fbb76ef7c6 --- M includes/ConstraintCheck/Checker/MultiValueChecker.php M includes/ConstraintCheck/Checker/SingleValueChecker.php M includes/ConstraintCheck/Checker/TypeChecker.php M includes/ConstraintCheck/Checker/ValueTypeChecker.php M includes/ConstraintCheck/Helper/TypeCheckerHelper.php M includes/ConstraintCheck/Helper/ValueCountCheckerHelper.php M includes/EvaluateConstraintReportJobService.php M tests/phpunit/Checker/TypeChecker/TypeCheckerHelperTest.php M tests/phpunit/Checker/TypeChecker/TypeCheckerTest.php M tests/phpunit/Checker/ValueCountChecker/ValueCountCheckerHelperTest.php 10 files changed, 116 insertions(+), 65 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikidataQualityConstraints refs/changes/38/218138/1 diff --git a/includes/ConstraintCheck/Checker/MultiValueChecker.php b/includes/ConstraintCheck/Checker/MultiValueChecker.php index adb753e..0937a02 100755 --- a/includes/ConstraintCheck/Checker/MultiValueChecker.php +++ b/includes/ConstraintCheck/Checker/MultiValueChecker.php @@ -44,8 +44,8 @@ $propertyCountArray = $this->valueCountCheckerHelper->getPropertyCount( $entity->getStatements() ); - if ( $propertyCountArray[ $propertyId->getNumericId() ] <= 1 ) { - $message = 'This property must have a multiple values, that is there must be more than one claim using this property.'; + if ( $propertyCountArray[ $propertyId->getSerialization() ] <= 1 ) { + $message = wfMessage( "wbqc-violation-message-multi-value" )->escaped(); $status = CheckResult::STATUS_VIOLATION; } else { $message = ''; diff --git a/includes/ConstraintCheck/Checker/SingleValueChecker.php b/includes/ConstraintCheck/Checker/SingleValueChecker.php index 8718772..b829d3d 100755 --- a/includes/ConstraintCheck/Checker/SingleValueChecker.php +++ b/includes/ConstraintCheck/Checker/SingleValueChecker.php @@ -44,8 +44,8 @@ $propertyCountArray = $this->valueCountCheckerHelper->getPropertyCount( $entity->getStatements() ); - if ( $propertyCountArray[ $propertyId->getNumericId() ] > 1 ) { - $message = 'This property must only have a single value, that is there must only be one claim using this property.'; + if ( $propertyCountArray[$propertyId->getSerialization()] > 1 ) { + $message = wfMessage( "wbqc-violation-message-single-value" )->escaped(); $status = CheckResult::STATUS_VIOLATION; } else { $message = ''; diff --git a/includes/ConstraintCheck/Checker/TypeChecker.php b/includes/ConstraintCheck/Checker/TypeChecker.php index 4b02e40..cf7b60d 100755 --- a/includes/ConstraintCheck/Checker/TypeChecker.php +++ b/includes/ConstraintCheck/Checker/TypeChecker.php @@ -39,8 +39,8 @@ */ private $typeCheckerHelper; - const instanceId = 31; - const subclassId = 279; + const instanceId = 'P31'; + const subclassId = 'P279'; /** * @param EntityLookup $lookup diff --git a/includes/ConstraintCheck/Checker/ValueTypeChecker.php b/includes/ConstraintCheck/Checker/ValueTypeChecker.php index fe6c007..9381bb2 100755 --- a/includes/ConstraintCheck/Checker/ValueTypeChecker.php +++ b/includes/ConstraintCheck/Checker/ValueTypeChecker.php @@ -40,8 +40,8 @@ */ private $typeCheckerHelper; - const instanceId = 31; - const subclassId = 279; + const instanceId = 'P31'; + const subclassId = 'P279'; /** * @param EntityLookup $lookup diff --git a/includes/ConstraintCheck/Helper/TypeCheckerHelper.php b/includes/ConstraintCheck/Helper/TypeCheckerHelper.php index cb62bc0..360edbd 100755 --- a/includes/ConstraintCheck/Helper/TypeCheckerHelper.php +++ b/includes/ConstraintCheck/Helper/TypeCheckerHelper.php @@ -2,6 +2,8 @@ namespace WikibaseQuality\ConstraintReport\ConstraintCheck\Helper; +use Wikibase\DataModel\Entity\PropertyId; +use Wikibase\DataModel\Statement\StatementList; use Wikibase\Lib\Store\EntityLookup; @@ -15,8 +17,8 @@ class TypeCheckerHelper { const MAX_DEPTH = 20; - const instanceId = 31; - const subclassId = 279; + const instanceId = 'P31'; + const subclassId = 'P279'; /** * @var EntityLookup $entityLookup @@ -27,6 +29,18 @@ $this->entityLookup = $lookup; } + /** +* Checks, if one of the ite
[MediaWiki-commits] [Gerrit] Move labs-ns0 to 208.80.154.94. - change (operations/dns)
Andrew Bogott has uploaded a new change for review. https://gerrit.wikimedia.org/r/218139 Change subject: Move labs-ns0 to 208.80.154.94. .. Move labs-ns0 to 208.80.154.94. This gets it into the same subnet as labnet1001 which is where the new dns service will live. We will have to move this again when we make designate/pdns the canonical labs dns server :( Change-Id: I2907b4c63f343f13965f713ab7b1b0d0d04f2d53 --- M templates/154.80.208.in-addr.arpa M templates/wikimedia.org 2 files changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/dns refs/changes/39/218139/1 diff --git a/templates/154.80.208.in-addr.arpa b/templates/154.80.208.in-addr.arpa index 17a99e2..f45eb17 100644 --- a/templates/154.80.208.in-addr.arpa +++ b/templates/154.80.208.in-addr.arpa @@ -31,7 +31,7 @@ 16 1H IN PTR ms1001.wikimedia.org. 17 1H IN PTR nitrogen.wikimedia.org. 18 1H IN PTR virt1000.wikimedia.org. -19 1H IN PTR labs-ns0.wikimedia.org. + 20 1H IN PTR labs-recursor0.wikimedia.org. 39 1H IN PTR radium.wikimedia.org. 40 1H IN PTR rubidium.wikimedia.org. @@ -70,6 +70,7 @@ 91 1H IN PTR wiki-mail-eqiad.wikimedia.org. 92 1H IN PTR labcontrol1001.wikimedia.org. 93 1H IN PTR radon.wikimedia.org. +94 1H IN PTR labs-ns0.wikimedia.org. ; 208.80.154.128/26 (public1-b-eqiad) (.128 - .191) diff --git a/templates/wikimedia.org b/templates/wikimedia.org index 5126b8b..4217a15 100644 --- a/templates/wikimedia.org +++ b/templates/wikimedia.org @@ -623,7 +623,7 @@ tendril 1H IN CNAMEneon jobs 600 IN DYNA geoip!text-addrs labs 600 IN DYNA geoip!text-addrs -labs-ns0 1H IN A208.80.154.19 +labs-ns0 1H IN A208.80.154.94 labs-ns1 1H IN A208.80.153.15 labs-ns2 1H IN A208.80.154.12 labs-recursor0 1H IN A208.80.154.20 -- To view, visit https://gerrit.wikimedia.org/r/218139 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2907b4c63f343f13965f713ab7b1b0d0d04f2d53 Gerrit-PatchSet: 1 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: Andrew Bogott ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] implements some of Daniels hints - change (mediawiki...WikidataQualityConstraints)
Jonaskeutel has uploaded a new change for review. https://gerrit.wikimedia.org/r/218137 Change subject: implements some of Daniels hints .. implements some of Daniels hints done for: * EvaluateConstraintReportJobService.php * TypeCheckerHelper.php * ValueCountCheckerHelper.php Change-Id: I5d1b11d0269a515ada443da560d354fbb76ef7c6 --- M includes/ConstraintCheck/Checker/MultiValueChecker.php M includes/ConstraintCheck/Checker/SingleValueChecker.php M includes/ConstraintCheck/Checker/TypeChecker.php M includes/ConstraintCheck/Checker/ValueTypeChecker.php M includes/ConstraintCheck/Helper/TypeCheckerHelper.php M includes/ConstraintCheck/Helper/ValueCountCheckerHelper.php M includes/EvaluateConstraintReportJobService.php M tests/phpunit/Checker/TypeChecker/TypeCheckerHelperTest.php M tests/phpunit/Checker/TypeChecker/TypeCheckerTest.php M tests/phpunit/Checker/ValueCountChecker/ValueCountCheckerHelperTest.php 10 files changed, 113 insertions(+), 62 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikidataQualityConstraints refs/changes/37/218137/1 diff --git a/includes/ConstraintCheck/Checker/MultiValueChecker.php b/includes/ConstraintCheck/Checker/MultiValueChecker.php index e2c6744..3cb1324 100644 --- a/includes/ConstraintCheck/Checker/MultiValueChecker.php +++ b/includes/ConstraintCheck/Checker/MultiValueChecker.php @@ -54,7 +54,7 @@ $propertyCountArray = $this->valueCountCheckerHelper->getPropertyCount( $entity->getStatements() ); - if ( $propertyCountArray[ $propertyId->getNumericId() ] <= 1 ) { + if ( $propertyCountArray[ $propertyId->getSerialization() ] <= 1 ) { $message = wfMessage( "wbqc-violation-message-multi-value" )->escaped(); $status = CheckResult::STATUS_VIOLATION; } else { diff --git a/includes/ConstraintCheck/Checker/SingleValueChecker.php b/includes/ConstraintCheck/Checker/SingleValueChecker.php index 37895fc..8f19c9b 100644 --- a/includes/ConstraintCheck/Checker/SingleValueChecker.php +++ b/includes/ConstraintCheck/Checker/SingleValueChecker.php @@ -54,7 +54,7 @@ $propertyCountArray = $this->valueCountCheckerHelper->getPropertyCount( $entity->getStatements() ); - if ( $propertyCountArray[$propertyId->getNumericId()] > 1 ) { + if ( $propertyCountArray[$propertyId->getSerialization()] > 1 ) { $message = wfMessage( "wbqc-violation-message-single-value" )->escaped(); $status = CheckResult::STATUS_VIOLATION; } else { diff --git a/includes/ConstraintCheck/Checker/TypeChecker.php b/includes/ConstraintCheck/Checker/TypeChecker.php index a6bce3f..f17d91b 100644 --- a/includes/ConstraintCheck/Checker/TypeChecker.php +++ b/includes/ConstraintCheck/Checker/TypeChecker.php @@ -34,8 +34,8 @@ */ private $typeCheckerHelper; - const instanceId = 31; - const subclassId = 279; + const instanceId = 'P31'; + const subclassId = 'P279'; /** * @param EntityLookup $lookup diff --git a/includes/ConstraintCheck/Checker/ValueTypeChecker.php b/includes/ConstraintCheck/Checker/ValueTypeChecker.php index d7dfffd..33ce151 100644 --- a/includes/ConstraintCheck/Checker/ValueTypeChecker.php +++ b/includes/ConstraintCheck/Checker/ValueTypeChecker.php @@ -35,8 +35,8 @@ */ private $typeCheckerHelper; - const instanceId = 31; - const subclassId = 279; + const instanceId = 'P31'; + const subclassId = 'P279'; /** * @param EntityLookup $lookup diff --git a/includes/ConstraintCheck/Helper/TypeCheckerHelper.php b/includes/ConstraintCheck/Helper/TypeCheckerHelper.php index cb62bc0..360edbd 100644 --- a/includes/ConstraintCheck/Helper/TypeCheckerHelper.php +++ b/includes/ConstraintCheck/Helper/TypeCheckerHelper.php @@ -2,6 +2,8 @@ namespace WikibaseQuality\ConstraintReport\ConstraintCheck\Helper; +use Wikibase\DataModel\Entity\PropertyId; +use Wikibase\DataModel\Statement\StatementList; use Wikibase\Lib\Store\EntityLookup; @@ -15,8 +17,8 @@ class TypeCheckerHelper { const MAX_DEPTH = 20; - const instanceId = 31; - const subclassId = 279; + const instanceId = 'P31'; + const subclassId = 'P279'; /** * @var EntityLookup $entityLookup @@ -27,6 +29,18 @@ $this->entityLookup = $lookup; } + /** +* Checks, if one of the itemId serializations in $classesToCheck +* is subclass of $comparativeClass +* Due to cyclic dependencies, the checks stops after a certain +* depth is reached +* +* @param EntityId $comparativeClass +* @param array $classesToCheck +* @param int $depth +* +* @return bool +*/ publi
[MediaWiki-commits] [Gerrit] Add Goan Konkani Language - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Add Goan Konkani Language .. Add Goan Konkani Language Bug: T96468 Change-Id: I12857c36baa2b931f2db86f6be9a50e5e3057967 --- M languages/Names.php A languages/messages/MessagesGom.php A languages/messages/MessagesGom_deva.php 3 files changed, 45 insertions(+), 1 deletion(-) Approvals: Amire80: Looks good to me, but someone else must approve Siebrand: Looks good to me, approved jenkins-bot: Verified diff --git a/languages/Names.php b/languages/Names.php index d667b18..a2a0ee6 100644 --- a/languages/Names.php +++ b/languages/Names.php @@ -158,7 +158,9 @@ 'gl' => 'galego', # Galician 'glk' => 'گیلکی', # Gilaki 'gn' => 'Avañe\'ẽ', # Guaraní, Paraguayan - 'gom-latn' => 'Konknni',# Goan Konkani (Latin script) + 'gom' => 'गोवा कोंकणी / Gova Konknni', # Goan Konkani + 'gom-deva' => 'गोवा कोंकणी',# Goan Konkani (Devanagari script) + 'gom-latn' => 'Gova Konknni', # Goan Konkani (Latin script) 'got' => '𐌲𐌿𐍄𐌹𐍃𐌺', # Gothic 'grc' => 'Ἀρχαία ἑλληνικὴ', # Ancient Greek 'gsw' => 'Alemannisch', # Alemannic diff --git a/languages/messages/MessagesGom.php b/languages/messages/MessagesGom.php new file mode 100644 index 000..d684ed5 --- /dev/null +++ b/languages/messages/MessagesGom.php @@ -0,0 +1,11 @@ +https://translatewiki.net + * + * @ingroup Language + * @file + * + */ + +$fallback = 'gom-deva'; \ No newline at end of file diff --git a/languages/messages/MessagesGom_deva.php b/languages/messages/MessagesGom_deva.php new file mode 100644 index 000..58fc505 --- /dev/null +++ b/languages/messages/MessagesGom_deva.php @@ -0,0 +1,31 @@ +https://translatewiki.net + * + * @ingroup Language + * @file + * + * @author Darshan kandolkar + */ + +$fallback = 'hi'; + +$namespaceNames = array( + NS_MEDIA=> 'मिडिया', + NS_SPECIAL => 'विशेश', + NS_TALK => 'चर्चा', + NS_USER => 'उपेगकर्तो', + NS_USER_TALK=> 'उपेगकर्तो_चर्चा', + NS_PROJECT_TALK => '$1_चर्चा', + NS_FILE => 'फायल', + NS_FILE_TALK=> 'फायल_चर्चा', + NS_MEDIAWIKI=> 'मिडियाविकी', + NS_MEDIAWIKI_TALK => 'मिडियाविकी_चर्चा', + NS_TEMPLATE => 'प्रारूप', + NS_TEMPLATE_TALK=> 'प्रारूप_चर्चा', + NS_HELP => 'मजत', + NS_HELP_TALK=> 'मजत_चर्चा', + NS_CATEGORY => 'श्रेणी', + NS_CATEGORY_TALK=> 'श्रेणी_चर्चा', +); \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/206083 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I12857c36baa2b931f2db86f6be9a50e5e3057967 Gerrit-PatchSet: 11 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Mjbmr Gerrit-Reviewer: Amire80 Gerrit-Reviewer: KartikMistry Gerrit-Reviewer: Mjbmr Gerrit-Reviewer: Nemo bis Gerrit-Reviewer: Nikerabbit Gerrit-Reviewer: Siebrand Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Move displayHeight code to separate private method - change (apps...wikipedia)
Aude has uploaded a new change for review. https://gerrit.wikimedia.org/r/218136 Change subject: Move displayHeight code to separate private method .. Move displayHeight code to separate private method For editing descriptions, we need to put a little bit of new code in the constructor. To help avoid making the constructor overly complex, some of the code should be split up, such as the code that sets displayHeight. Change-Id: Id750f98ee58103f51f0f47a9c31a2d18b6946830 --- M wikipedia/src/main/java/org/wikipedia/page/leadimages/LeadImagesHandler.java 1 file changed, 17 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/36/218136/1 diff --git a/wikipedia/src/main/java/org/wikipedia/page/leadimages/LeadImagesHandler.java b/wikipedia/src/main/java/org/wikipedia/page/leadimages/LeadImagesHandler.java index a898e8c..3b06d8c 100755 --- a/wikipedia/src/main/java/org/wikipedia/page/leadimages/LeadImagesHandler.java +++ b/wikipedia/src/main/java/org/wikipedia/page/leadimages/LeadImagesHandler.java @@ -122,20 +122,10 @@ pageTitleContainer = imageContainer.findViewById(R.id.page_title_container); pageTitleText = (TextView)imageContainer.findViewById(R.id.page_title_text); pageDescriptionText = (TextView)imageContainer.findViewById(R.id.page_description_text); + webview.addOnScrollChangeListener(this); -// preload the display density, since it will be used in a lot of places -displayDensity = context.getResources().getDisplayMetrics().density; - -// get the screen height, using correct methods for different API versions -if (ApiUtil.hasHoneyCombMr2()) { -Point size = new Point(); - parentFragment.getActivity().getWindowManager().getDefaultDisplay().getSize(size); -displayHeight = (int)(size.y / displayDensity); -} else { -displayHeight = (int)(parentFragment.getActivity() -.getWindowManager().getDefaultDisplay().getHeight() / displayDensity); -} +setDisplayHeight(); webview.addOnClickListener(new ObservableWebView.OnClickListener() { @Override @@ -165,6 +155,21 @@ image1.setOnImageLoadListener(this); } +private void setDisplayHeight() { +// preload the display density, since it will be used in a lot of places +displayDensity = context.getResources().getDisplayMetrics().density; + +// get the screen height, using correct methods for different API versions +if (ApiUtil.hasHoneyCombMr2()) { +Point size = new Point(); + parentFragment.getActivity().getWindowManager().getDefaultDisplay().getSize(size); +displayHeight = (int)(size.y / displayDensity); +} else { +displayHeight = (int)(parentFragment.getActivity() +.getWindowManager().getDefaultDisplay().getHeight() / displayDensity); +} +} + @Override public void onScrollChanged(int oldScrollY, int scrollY) { LinearLayout.LayoutParams contParams = (LinearLayout.LayoutParams) imageContainer -- To view, visit https://gerrit.wikimedia.org/r/218136 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id750f98ee58103f51f0f47a9c31a2d18b6946830 Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Aude ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix deployers access to imagescaler boxes - change (operations/puppet)
Alex Monk has uploaded a new change for review. https://gerrit.wikimedia.org/r/218135 Change subject: Fix deployers access to imagescaler boxes .. Fix deployers access to imagescaler boxes Bug: T102382 Change-Id: Ic10af3f841013b7e8eb6fbc97ff0da683cf1113e --- M hieradata/role/common/mediawiki/imagescaler.yaml 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/35/218135/1 diff --git a/hieradata/role/common/mediawiki/imagescaler.yaml b/hieradata/role/common/mediawiki/imagescaler.yaml index 17d3089..24e436c 100644 --- a/hieradata/role/common/mediawiki/imagescaler.yaml +++ b/hieradata/role/common/mediawiki/imagescaler.yaml @@ -1,4 +1,6 @@ cluster: imagescaler +admin::groups: + - deployment role::mediawiki::webserver::pool: rendering mediawiki::web::mpm_config::workers_limit: 30 mediawiki::users::web: www-data -- To view, visit https://gerrit.wikimedia.org/r/218135 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic10af3f841013b7e8eb6fbc97ff0da683cf1113e Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Alex Monk ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove duplicate x button in search bar - change (mediawiki...MobileFrontend)
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/218134 Change subject: Remove duplicate x button in search bar .. Remove duplicate x button in search bar * There is a duplicate x button one that is nicly styled and one that just * a plan black small x button next to each other. With this patch it removes the plain small black x button from search bar and leaves the nicly styled x button they both do the same thing. The x button to the left is unchanged since it does something else. Change-Id: Ibabe194489e34188fb67a9c061e95d1386fb3ff1 --- M i18n/ar.json M i18n/ca.json M i18n/de.json M i18n/es.json M i18n/fr.json M i18n/gl.json M i18n/he.json M i18n/hil.json M i18n/lrc.json M i18n/ne.json M i18n/nl.json M i18n/pl.json M i18n/qqq.json M i18n/qu.json M i18n/ro.json M i18n/tr.json M i18n/zh-hans.json M resources/mobile.search/SearchOverlay.less 18 files changed, 61 insertions(+), 13 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/34/218134/1 diff --git a/i18n/ar.json b/i18n/ar.json index 20fc26b..ed32796 100644 --- a/i18n/ar.json +++ b/i18n/ar.json @@ -75,6 +75,7 @@ "mobile-frontend-editor-captcha-try-again": "لقد قمت بإدخال رموز خاطئة، الرجاء المحاولة مرة أخرى", "mobile-frontend-editor-continue": "استمر", "mobile-frontend-editor-cta": "ساعد في تحسين هذه الصفحة!", + "mobile-frontend-editor-disabled": "هذه الصفحة محمية لمنع التخريب.", "mobile-frontend-editor-edit": "عدل", "mobile-frontend-editor-editing": "قيد التحرير", "mobile-frontend-editor-editing-page": "تعديل $1", diff --git a/i18n/ca.json b/i18n/ca.json index a416ef4..1380506 100644 --- a/i18n/ca.json +++ b/i18n/ca.json @@ -82,10 +82,10 @@ "mobile-frontend-editor-tutorial-confirm": "Comença a editar", "mobile-frontend-editor-tutorial-summary": "Ajudeu a millorar la pàgina $1.No tingueu por de la sintaxi wiki.", "mobile-frontend-editor-unavailable": "L'edició mòbil no està disponible actualment en el teu navegador. Si us plau prova amb un navegador diferent.", - "mobile-frontend-editor-unavailable-header": "Editor no disponible", "mobile-frontend-editor-viewing-source-page": "Codi font de $1", "mobile-frontend-editor-visual-editor": "Modifica", "mobile-frontend-editor-wait": "Desant l'edició, espereu si us plau.", + "mobile-frontend-editor-redlink-leave": "No, gràcies.", "mobile-frontend-enable-images": "Habilita les imatges al lloc web mòbil", "mobile-frontend-errorreport-button-label": "Informa d'un error", "mobile-frontend-errorreport-feedback": "Gràcies pels comentaris!", diff --git a/i18n/de.json b/i18n/de.json index 28c6467..1c61d75 100644 --- a/i18n/de.json +++ b/i18n/de.json @@ -78,6 +78,7 @@ "mobile-frontend-editor-captcha-try-again": "Falscher Code. Versuche es erneut.", "mobile-frontend-editor-continue": "Nächste", "mobile-frontend-editor-cta": "Hilf, diese Seite zu verbessern!", + "mobile-frontend-editor-disabled": "Diese Seite ist geschützt, um Vandalismus vorzubeugen.", "mobile-frontend-editor-edit": "Bearbeiten", "mobile-frontend-editor-editing": "Bearbeiten", "mobile-frontend-editor-editing-page": "Bearbeiten von $1", @@ -117,7 +118,6 @@ "mobile-frontend-editor-redlink-leave": "Nein danke.", "mobile-frontend-editor-redlink-explain": "Diese Seite wurde auf {{SITENAME}} noch nicht erstellt.", "mobile-frontend-editor-redlink-create": "Seite erstellen", - "mobile-frontend-editor-showhistory": "Versionsgeschichte anzeigen", "mobile-frontend-enable-images": "Bilder in der mobilen Ansicht aktivieren", "mobile-frontend-errorreport-button-label": "Einen Fehler berichten", "mobile-frontend-errorreport-error": "Fehler: Die Rückmeldung konnte nicht gespeichert werden.", diff --git a/i18n/es.json b/i18n/es.json index fb25e83..ac21c1e 100644 --- a/i18n/es.json +++ b/i18n/es.json @@ -94,6 +94,7 @@ "mobile-frontend-editor-captcha-try-again": "Código incorrecto, inténtalo de nuevo.", "mobile-frontend-editor-continue": "Siguiente", "mobile-frontend-editor-cta": "¡Ayúdanos a mejorar esta página!", + "mobile-frontend-editor-disabled": "Esta página está protegida para evitar el vandalismo.", "mobile-frontend-editor-edit": "Editar", "mobile-frontend-editor-editing": "Editando", "mobile-frontend-editor-editing-page": "Ediciónde «$1»", diff --git a/i18n/fr.json b/i18n/fr.json index 77003fe..cf49c86 100644 --- a/i18n/fr.json +++ b/i18n/fr.json @@ -139,6 +139,8 @@ "mobile-frontend-editor-viewing-source-page": "Affichage de la source de $1", "mobile-frontend-editor-visual-editor": "Éditeur", "mobile-frontend-editor-wait": "Enregistrement de la modification, veuillez
[MediaWiki-commits] [Gerrit] Remove dup. initialization of LeadImagesHandler displayDensity - change (apps...wikipedia)
Aude has uploaded a new change for review. https://gerrit.wikimedia.org/r/218133 Change subject: Remove dup. initialization of LeadImagesHandler displayDensity .. Remove dup. initialization of LeadImagesHandler displayDensity looks unnecessary to me to have it twice. Change-Id: I278cb934e8a105daf995c84fb45e106d6eb64596 --- M wikipedia/src/main/java/org/wikipedia/page/leadimages/LeadImagesHandler.java 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/33/218133/1 diff --git a/wikipedia/src/main/java/org/wikipedia/page/leadimages/LeadImagesHandler.java b/wikipedia/src/main/java/org/wikipedia/page/leadimages/LeadImagesHandler.java index f63c5b3..a898e8c 100755 --- a/wikipedia/src/main/java/org/wikipedia/page/leadimages/LeadImagesHandler.java +++ b/wikipedia/src/main/java/org/wikipedia/page/leadimages/LeadImagesHandler.java @@ -116,7 +116,6 @@ this.imageContainer = hidingView; this.bridge = bridge; this.webView = webview; -displayDensity = context.getResources().getDisplayMetrics().density; imagePlaceholder = (ImageView)imageContainer.findViewById(R.id.page_image_placeholder); image1 = (ImageViewWithFace)imageContainer.findViewById(R.id.page_image_1); -- To view, visit https://gerrit.wikimedia.org/r/218133 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I278cb934e8a105daf995c84fb45e106d6eb64596 Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Aude ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Patch for CVE-2015-4024 - change (operations...hhvm)
Giuseppe Lavagetto has uploaded a new change for review. https://gerrit.wikimedia.org/r/218132 Change subject: Patch for CVE-2015-4024 .. Patch for CVE-2015-4024 --- M debian/changelog A debian/patches/CVE-2015-4024.patch M debian/patches/series 3 files changed, 67 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/debs/hhvm refs/changes/32/218132/1 diff --git a/debian/changelog b/debian/changelog index 425ec0c..da263e8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,12 @@ +hhvm (3.6.1+dfsg1-1+wm3) trusty-wikimedia; urgency=high + + * Patch for CVE-2015-4024 + + -- Giuseppe Lavagetto Thu, 04 Jun 2015 06:54:47 + + hhvm (3.6.1+dfsg1-1+wm2) trusty-wikimedia; urgency=medium - * Patch for CVE-2015-3413 + * Patch for CVE-2015-3413 -- Giuseppe Lavagetto Thu, 04 Jun 2015 08:35:46 +0200 @@ -8,7 +14,7 @@ [ Giuseppe Lavagetto ] * New upstream release (3.6.1) - * Added WMF patch to support streaming output in FastCGI + * Added WMF patch to support streaming output in FastCGI * Added patches to build correctly [ Alexandros Kosiaris ] diff --git a/debian/patches/CVE-2015-4024.patch b/debian/patches/CVE-2015-4024.patch new file mode 100644 index 000..ae9ec0e --- /dev/null +++ b/debian/patches/CVE-2015-4024.patch @@ -0,0 +1,58 @@ +diff --git a/hphp/runtime/server/upload.cpp b/hphp/runtime/server/upload.cpp +--- a/hphp/runtime/server/upload.cpp b/hphp/runtime/server/upload.cpp +@@ -424,7 +424,8 @@ + static int multipart_buffer_headers(multipart_buffer *self, + header_list &header) { + char *line; +- std::pair prev_entry; ++ std::string key; ++ std::string buf_value; + std::pair entry; + + /* didn't find boundary, abort */ +@@ -437,29 +438,35 @@ + while( (line = get_line(self)) && strlen(line) > 0 ) + { + /* add header to table */ +- +-char *key = line; + char *value = nullptr; + + /* space in the beginning means same header */ + if (!isspace(line[0])) { + value = strchr(line, ':'); + } + + if (value) { +- *value = 0; ++ if (!buf_value.empty() && !key.empty() ) { ++entry = std::make_pair(key, buf_value); ++header.push_back(entry); ++buf_value.erase(); ++key.erase(); ++ } ++ *value = '\0'; + do { value++; } while(isspace(*value)); +- entry = std::make_pair(key, value); +-} else if (!header.empty()) { ++ key.assign(line); ++ buf_value.append(value); ++} else if (!buf_value.empty() ) { + /* If no ':' on the line, add to previous line */ +- entry = std::make_pair(prev_entry.first, prev_entry.second + line); +- header.pop_back(); ++ buf_value.append(line); + } else { + continue; + } ++ } + ++ if (!buf_value.empty() && !key.empty()) { ++entry = std::make_pair(key, buf_value); + header.push_back(entry); +-prev_entry = entry; + } + + return 1; + diff --git a/debian/patches/series b/debian/patches/series index e03f16a..561b95a 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -5,6 +5,7 @@ fix-webscalesql.patch fix-mysql-libraries.patch CVE-2015-3413.patch +CVE-2015-4024.patch # WMF specific patches go here add-jemalloc-prof-status.patch -- To view, visit https://gerrit.wikimedia.org/r/218132 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iaa5c6380afc28cf3f1b9f4bd8cc1233cee103937 Gerrit-PatchSet: 1 Gerrit-Project: operations/debs/hhvm Gerrit-Branch: master Gerrit-Owner: Giuseppe Lavagetto ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] New Wikidata Build - 2015-06-14T10:00:02+0000 - change (mediawiki...Wikidata)
jenkins-bot has submitted this change and it was merged. Change subject: New Wikidata Build - 2015-06-14T10:00:02+ .. New Wikidata Build - 2015-06-14T10:00:02+ Change-Id: I30e3f829a0e0d3086462aa90fccf59bb52ea8397 --- M composer.lock A extensions/Wikibase/client/i18n/hil.json M extensions/Wikibase/client/i18n/ne.json M extensions/Wikibase/client/i18n/qu.json M extensions/Wikibase/lib/i18n/pl.json M extensions/Wikibase/lib/i18n/qqq.json M extensions/Wikibase/lib/i18n/qu.json M extensions/Wikibase/repo/i18n/es.json M extensions/Wikibase/repo/i18n/he.json A extensions/Wikibase/repo/i18n/hil.json M extensions/Wikibase/repo/i18n/pt.json M extensions/Wikibase/repo/i18n/qu.json A extensions/Wikibase/repo/i18n/tg-cyrl.json M extensions/Wikibase/repo/i18n/zh-hans.json M extensions/Wikibase/repo/i18n/zh-hant.json M vendor/composer/installed.json 16 files changed, 57 insertions(+), 17 deletions(-) Approvals: JanZerebecki: Looks good to me, approved jenkins-bot: Verified diff --git a/composer.lock b/composer.lock index 5cc2ca4..b31a035 100644 --- a/composer.lock +++ b/composer.lock @@ -1213,12 +1213,12 @@ "source": { "type": "git", "url": "https://github.com/wikimedia/mediawiki-extensions-Wikibase.git";, -"reference": "34dfdaf1df419b8ef58c7d082d0d0ff39ee7da08" +"reference": "899eb93f4bbec4acb285b04495eeed2a406495fb" }, "dist": { "type": "zip", -"url": "https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/34dfdaf1df419b8ef58c7d082d0d0ff39ee7da08";, -"reference": "34dfdaf1df419b8ef58c7d082d0d0ff39ee7da08", +"url": "https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/899eb93f4bbec4acb285b04495eeed2a406495fb";, +"reference": "899eb93f4bbec4acb285b04495eeed2a406495fb", "shasum": "" }, "require": { @@ -1286,7 +1286,7 @@ "wikibaserepo", "wikidata" ], -"time": "2015-06-12 19:56:55" +"time": "2015-06-13 20:34:28" }, { "name": "wikibase/wikimedia-badges", diff --git a/extensions/Wikibase/client/i18n/hil.json b/extensions/Wikibase/client/i18n/hil.json new file mode 100644 index 000..147637b --- /dev/null +++ b/extensions/Wikibase/client/i18n/hil.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Redhotchili23" + ] + }, + "wikibase-rc-hide-wikidata-show": "Ipakita" +} diff --git a/extensions/Wikibase/client/i18n/ne.json b/extensions/Wikibase/client/i18n/ne.json index 1f9bf44..0a58f1a 100644 --- a/extensions/Wikibase/client/i18n/ne.json +++ b/extensions/Wikibase/client/i18n/ne.json @@ -1,7 +1,8 @@ { "@metadata": { "authors": [ - "बिप्लब आनन्द" + "बिप्लब आनन्द", + "राम प्रसाद जोशी" ] }, "wikibase-client-desc": "विकिबेस वृद्दिको लागि क्लाइन्ट", @@ -15,7 +16,7 @@ "wikibase-comment-sitelink-add": "भाषा लिङ्क जोडियो: $1", "wikibase-comment-sitelink-change": "भाषा लिङ्क $1 देखि $2 मा परिवर्तन भयो", "wikibase-comment-sitelink-remove": "भाषा लिङ्क मेटियो: $1", - "wikibase-comment-multi": "$1 {{PLURAL:$1|परिवर्तन|परिवर्तनहरु}}", + "wikibase-comment-multi": "$1 {{PLURAL:$1|परिवर्तन|परिवर्तनहरू}}", "wikibase-dataitem": "{{WBREPONAME}} आइटम", "wikibase-editlinks": "लिङ्क सम्पादन गर्नुहोस्", "wikibase-editlinkstitle": "अन्तरभाषिक लिङ्क सम्पादन गर्नुहोस्", diff --git a/extensions/Wikibase/client/i18n/qu.json b/extensions/Wikibase/client/i18n/qu.json index 27030d3..dc56ad6 100644 --- a/extensions/Wikibase/client/i18n/qu.json +++ b/extensions/Wikibase/client/i18n/qu.json @@ -7,6 +7,7 @@ "tooltip-t-wikibase": "T'inkinakusqa taqi qallawawan t'inki", "wikibase-after-page-move": "T'inkisqa {{WBREPONAME}} qallawatapas [$1 musuqchaytam] atinki astasqa p'anqapi rimay t'inkikunata hat'allinaykipaq.", "wikibase-after-page-move-queued": "Kay p'anqawan t'inkisqa [$1 {{WBREPONAME}} qallawaqa] utqaylla musuqchasqam kanqa.", + "wikibase-comment-update": "{{WBREPONAME}} qallawa hukchasqa", "wikibase-dataitem": "{{WBREPONAME}} willa qallawa", "wikibase-editlinks": "T'inkikunata llamk'apuy", "wikibase-editlinkstitle": "Wikipura t'inkikunata llamk'apuy", @@ -22,6 +23,7 @@ "wikibase-linkitem-not-loggedin-title": "Yaykunaykim tiyan", "wikibase-linkitem-not-loggedin": "Kay wikipi [$1 chawpi willa hallch'apipas] yaykunaykim tiyan kayta ruranaykipaq.", "wikibase-linkitem-success-link": "P'anqakunaqa aypalla t'inkinakusqañam. T'inkikunayuq kaq qallawata [$1 chawpi wi
[MediaWiki-commits] [Gerrit] WikiEduDashboard - change (translatewiki)
jenkins-bot has submitted this change and it was merged. Change subject: WikiEduDashboard .. WikiEduDashboard Bug: T88934 Change-Id: If885b5a70f099dd73060b3e4d654a5dbe8750813 --- M REPOCONF M TranslateSettings.php M bin/repocommit M bin/repoexport M bin/repoupdate A groups/Wikimedia/WikiEduDashboard.yaml 6 files changed, 54 insertions(+), 6 deletions(-) Approvals: Nikerabbit: Looks good to me, approved jenkins-bot: Verified diff --git a/REPOCONF b/REPOCONF index cb3a43a..3fa5185 100644 --- a/REPOCONF +++ b/REPOCONF @@ -39,6 +39,7 @@ REPO_WIKIA=git://github.com/Wikia/app.git REPO_WIKIA_BRANCH="dev" REPO_WIKIBLAME=git://github.com/FlominatorTM/wikiblame.git +REPO_WIKIEDUDASHBOARD=git://github.com/WikiEducationFoundation/WikiEduDashboard.git REPO_WIKIMANIA=https://gerrit.wikimedia.org/r/wikimedia/wikimania-scholarships REPO_WIKIPEDIAANDROID=https://gerrit.wikimedia.org/r/apps/android/wikipedia REPO_WIKIPEDIAIOS=https://gerrit.wikimedia.org/r/apps/ios/wikipedia diff --git a/TranslateSettings.php b/TranslateSettings.php index 9c10a20..0daba19 100644 --- a/TranslateSettings.php +++ b/TranslateSettings.php @@ -227,6 +227,7 @@ wfAddNamespace( 1206, 'Wikimedia' ); $wgTranslateGroupFiles[] = "$GROUPS/Wikimedia/jquery.uls.yaml"; $wgTranslateGroupFiles[] = "$GROUPS/Wikimedia/WikiBlame.yaml"; +$wgTranslateGroupFiles[] = "$GROUPS/Wikimedia/WikiEduDashboard.yaml"; # Reactivate translations for Wikimania 2015 cycle. $wgTranslateGroupFiles[] = "$GROUPS/Wikimedia/Wikimania.yaml"; diff --git a/bin/repocommit b/bin/repocommit index bb4982e..bb19c71 100755 --- a/bin/repocommit +++ b/bin/repocommit @@ -54,6 +54,7 @@ vicuna \ waymarked-trails-site \ wikiblame \ +wikiedudashboard \ WikisourceMobile \ WiktionaryMobile" diff --git a/bin/repoexport b/bin/repoexport index 5f2c5ec..4afc177 100755 --- a/bin/repoexport +++ b/bin/repoexport @@ -166,6 +166,10 @@ then php "$EXPORTER" --target . --group=out-wikiblame --lang='*' --skip en --threshold 1 +elif [ "$PROJECT" = "wikiedudashboard" ] +then + php "$EXPORTER" --target . --group=wikiedudashboard --lang='*' --skip en + elif [ "$PROJECT" = "wikimania" ] then php "$EXPORTER" --target . --group=out-wikimania-scholarships-app --lang='*' --skip en,qqq $THRESHOLD diff --git a/bin/repoupdate b/bin/repoupdate index 0948e95..891cdd5 100755 --- a/bin/repoupdate +++ b/bin/repoupdate @@ -75,16 +75,24 @@ fi done +GITCLUPDATE="\ +entryscape \ +wikiedudashboard" + +for i in $GITCLUPDATE; do + if [ "$i" = "$PROJECT" ] + then + VAR="REPO_${PROJECT^^}" + checkVar "$VAR" + "$CLUPDATE" "${!VAR}" "$DIR/$PROJECT" + exit 0 + fi +done + if [ "$PROJECT" = "blockly" ] then gitupdate "$PROJECT" gitupdate "blockly-games" - -elif [ "$PROJECT" = "entryscape" ] -then - VAR="REPO_${PROJECT^^}" - checkVar "$VAR" - "$CLUPDATE" "${!VAR}" "$DIR/$PROJECT" elif [ "$PROJECT" = "etherpad-lite" ] then diff --git a/groups/Wikimedia/WikiEduDashboard.yaml b/groups/Wikimedia/WikiEduDashboard.yaml new file mode 100644 index 000..2d75fc8 --- /dev/null +++ b/groups/Wikimedia/WikiEduDashboard.yaml @@ -0,0 +1,33 @@ +BASIC: + id: wikiedudashboard + label: Wiki Ed Dashboard + icon: wiki://Wikipedia_Education_Program_logo_square.png + description: "{{Special:MyLanguage/Translations:Group descriptions/wikiedudashboard/en}}" + namespace: NS_WIKIMEDIA + class: FileBasedMessageGroup + +FILES: + class: RubyYamlFFS + sourcePattern: "%GROUPROOT%/wikiedudashboard/config/locales/%CODE%.yml" + codeAsRoot: true + +MANGLER: + class: StringMatcher + prefix: wikiedudashboard- + patterns: +- "*" + +CHECKER: + class: MessageChecker + checks: +- rubyVariableCheck + +INSERTABLES: + class: WikiEduDashboardInsertablesSuggester + +AUTOLOAD: + WikiEduDashboardInsertablesSuggester: WikiEduDashboardSuggester.php + +TAGS: + ignored: +- wikiedudashboard-number.* -- To view, visit https://gerrit.wikimedia.org/r/189784 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If885b5a70f099dd73060b3e4d654a5dbe8750813 Gerrit-PatchSet: 5 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Nikerabbit Gerrit-Reviewer: Awight Gerrit-Reviewer: Nemo bis Gerrit-Reviewer: Nikerabbit Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update compiled javascript template for previous patch - change (analytics...web)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/218131 Change subject: Update compiled javascript template for previous patch .. Update compiled javascript template for previous patch Change-Id: Ie4ab05086bb4ad9143b1d8c7ccc6a336e1856208 --- M quarry/web/static/templates/compiled.js 1 file changed, 14 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/quarry/web refs/changes/31/218131/1 diff --git a/quarry/web/static/templates/compiled.js b/quarry/web/static/templates/compiled.js index 0b04167..57a3fa5 100644 --- a/quarry/web/static/templates/compiled.js +++ b/quarry/web/static/templates/compiled.js @@ -10,25 +10,29 @@ } else { output += "\nResultset "; -output += runtime.suppressValue(runtime.contextOrFrameLookup(context, frame, "resultset_number"), env.autoesc); +output += runtime.suppressValue(runtime.contextOrFrameLookup(context, frame, "resultset_number"), env.opts.autoescape); output += "\n"; ; } output += "\n("; -output += runtime.suppressValue(runtime.contextOrFrameLookup(context, frame, "rowcount"), env.autoesc); +output += runtime.suppressValue(runtime.contextOrFrameLookup(context, frame, "rowcount"), env.opts.autoescape); output += " rows)\n\n\n \n\n Download data \n \n\n TSV\nJSON\nCSV\n\n \n\n\n\n\n"; +output += runtime.suppressValue(runtime.contextOrFrameLookup(context, frame, "resultset_id"), env.opts.autoescape); +output += "/csv?download=true\">CSV\nExcel (UTF-16 CSV)\n \n\n\n\n\n\n"; cb(null, output); ; } catch (e) { @@ -47,7 +51,7 @@ try { if(runtime.contextOrFrameLookup(context, frame, "status") == "failed") { output += "\nError\n"; -output += runtime.suppressValue(runtime.memberLookup((runtime.contextOrFrameLookup(context, frame, "extra")),"error", env.autoesc), env.autoesc); +output += runtime.suppressValue(runtime.memberLookup((runtime.contextOrFrameLookup(context, frame, "extra")),"error", env.opts.autoescape), env.opts.autoescape); output += "\n"; ; } -- To view, visit https://gerrit.wikimedia.org/r/218131 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie4ab05086bb4ad9143b1d8c7ccc6a336e1856208 Gerrit-PatchSet: 1 Gerrit-Project: analytics/quarry/web Gerrit-Branch: master Gerrit-Owner: Yuvipanda ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] getTargetLanguage() should return a Language object - change (mediawiki...Translate)
jenkins-bot has submitted this change and it was merged. Change subject: getTargetLanguage() should return a Language object .. getTargetLanguage() should return a Language object Bug: T102407 Change-Id: Ie8c05f9ea292b7ca23bda2645904e966c7a3611e --- M specials/SpecialTranslationStash.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Nikerabbit: Looks good to me, approved jenkins-bot: Verified diff --git a/specials/SpecialTranslationStash.php b/specials/SpecialTranslationStash.php index 7298ecb..dee5a61 100644 --- a/specials/SpecialTranslationStash.php +++ b/specials/SpecialTranslationStash.php @@ -201,6 +201,6 @@ } // User has not chosen any valid language. Pick the source. - return $source->getCode(); + return Language::factory( $source->getCode() ); } } -- To view, visit https://gerrit.wikimedia.org/r/218129 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie8c05f9ea292b7ca23bda2645904e966c7a3611e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Nemo bis Gerrit-Reviewer: Nikerabbit Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [BUGFIX] Merge commit 7c920d54dad37d801a060219ea0586bb3e8c53... - change (pywikibot/core)
Xqt has uploaded a new change for review. https://gerrit.wikimedia.org/r/218130 Change subject: [BUGFIX] Merge commit 7c920d54dad37d801a060219ea0586bb3e8c53cb into 2.0 .. [BUGFIX] Merge commit 7c920d54dad37d801a060219ea0586bb3e8c53cb into 2.0 backport this change to 2.0 branch because replace.py is broken. See https://www.mediawiki.org/w/index.php?title=Manual_talk:Pywikibot&limit=20#ERROR:_.22CRITICAL:_Waiting_for_1_network_thread.28s.29_to_finish..22_57385 Change-Id: I3e338bed1f443e77e1b62411a221f72632f52c08 --- M scripts/replace.py 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/30/218130/1 diff --git a/scripts/replace.py b/scripts/replace.py index cf131da..f5eeeb6 100755 --- a/scripts/replace.py +++ b/scripts/replace.py @@ -409,7 +409,7 @@ @deprecated_args(acceptall='always') def __init__(self, generator, replacements, exceptions={}, always=False, allowoverlap=False, recursive=False, - addedCat=None, sleep=None, summary='', **kwargs): + addedCat=None, sleep=None, summary='', site=None, **kwargs): """ Constructor. @@ -450,6 +450,7 @@ """ super(ReplaceRobot, self).__init__(generator=generator, always=always, + site=site, **kwargs) for i, replacement in enumerate(replacements): -- To view, visit https://gerrit.wikimedia.org/r/218130 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3e338bed1f443e77e1b62411a221f72632f52c08 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: 2.0 Gerrit-Owner: Xqt ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] getTargetLanguage() should return a Language object - change (mediawiki...Translate)
Nemo bis has uploaded a new change for review. https://gerrit.wikimedia.org/r/218129 Change subject: getTargetLanguage() should return a Language object .. getTargetLanguage() should return a Language object Bug: T102407 Change-Id: Ie8c05f9ea292b7ca23bda2645904e966c7a3611e --- M specials/SpecialTranslationStash.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/29/218129/1 diff --git a/specials/SpecialTranslationStash.php b/specials/SpecialTranslationStash.php index 7298ecb..dee5a61 100644 --- a/specials/SpecialTranslationStash.php +++ b/specials/SpecialTranslationStash.php @@ -201,6 +201,6 @@ } // User has not chosen any valid language. Pick the source. - return $source->getCode(); + return Language::factory( $source->getCode() ); } } -- To view, visit https://gerrit.wikimedia.org/r/218129 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie8c05f9ea292b7ca23bda2645904e966c7a3611e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Nemo bis ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [BUGFIX] Merge commit '7c920d54dad37d801a060219ea0586bb3e8c5... - change (pywikibot/core)
Xqt has uploaded a new change for review. https://gerrit.wikimedia.org/r/218128 Change subject: [BUGFIX] Merge commit '7c920d54dad37d801a060219ea0586bb3e8c53cb' into 2.0 .. [BUGFIX] Merge commit '7c920d54dad37d801a060219ea0586bb3e8c53cb' into 2.0 backport this change to 2.0 branch because replace.py is broken. See https://www.mediawiki.org/w/index.php?title=Manual_talk:Pywikibot&limit=20#ERROR:_.22CRITICAL:_Waiting_for_1_network_thread.28s.29_to_finish..22_57385 Change-Id: Idadebf0988b1f8baa5d0b7a30b76d18c7bea02d3 --- 0 files changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/28/218128/1 -- To view, visit https://gerrit.wikimedia.org/r/218128 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idadebf0988b1f8baa5d0b7a30b76d18c7bea02d3 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: 2.0 Gerrit-Owner: Xqt ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add support for EntryScape - change (translatewiki)
jenkins-bot has submitted this change and it was merged. Change subject: Add support for EntryScape .. Add support for EntryScape This deviates a bit from existing practices, taking first steps to a streamlined process: * Drop "out-" prefix from group ids * Drop "-0-all" suffix from aggre group * Skip repocreate, repoupdate now clones if missing * Make message keys full case sensitive in page names Bug: T95284 Change-Id: I31921d83c4cafcb4854119908ed48557a0645a64 --- M REPOCONF M TranslateSettings.php M bin/repocommit M bin/repoexport M bin/repoupdate A groups/EntryScape/Checker.php A groups/EntryScape/EntryScape.yaml A groups/EntryScape/Suggester.php 8 files changed, 268 insertions(+), 3 deletions(-) Approvals: Nikerabbit: Looks good to me, approved Nemo bis: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/REPOCONF b/REPOCONF index 9d3917b..cb3a43a 100644 --- a/REPOCONF +++ b/REPOCONF @@ -8,6 +8,7 @@ REPO_BLOCKLY=git://github.com/google/blockly.git REPO_BLOCKLYGAMES=git://github.com/google/blockly-games.git +REPO_ENTRYSCAPE=https://bitbucket.org/metasolutions/entryscape.git REPO_EOL=git://github.com/EOL/eol.git REPO_ETHERPADLITE=git://github.com/ether/etherpad-lite.git REPO_ETHERPADLITE_BRANCH="develop" diff --git a/TranslateSettings.php b/TranslateSettings.php index 5155f69..9c10a20 100644 --- a/TranslateSettings.php +++ b/TranslateSettings.php @@ -328,3 +328,8 @@ wfAddNamespace( 1262, 'iNaturalist' ); $wgTranslateGroupFiles[] = "$GROUPS/iNaturalist/iNaturalist.yaml"; + +wfAddNamespace( 1264, 'EntryScape' ); +$wgCapitalLinkOverrides[NS_ENTRYSCAPE] = false; +$wgCapitalLinkOverrides[NS_ENTRYSCAPE_TALK] = false; +$wgTranslateGroupFiles[] = "$GROUPS/EntryScape/EntryScape.yaml"; diff --git a/bin/repocommit b/bin/repocommit index 4ddec10..bb4982e 100755 --- a/bin/repocommit +++ b/bin/repocommit @@ -38,6 +38,7 @@ # TODO: Move to separate file? GITPROJECTS="\ blockly \ +entryscape \ eol \ europeana \ freecol \ diff --git a/bin/repoexport b/bin/repoexport index 6691d09..5f2c5ec 100755 --- a/bin/repoexport +++ b/bin/repoexport @@ -24,6 +24,10 @@ then php "$EXPORTER" --target . --group=out-blockly* --lang='*' --skip en $THRESHOLD +elif [ "$PROJECT" = "entryscape" ] +then + php "$EXPORTER" --target . --group=entryscape-* --lang='*' --skip en $THRESHOLD + elif [ "$PROJECT" = "eol" ] then php "$EXPORTER" --target . --group=out-eol* --lang='*' --skip en $THRESHOLD diff --git a/bin/repoupdate b/bin/repoupdate index 2d59e05..0948e95 100755 --- a/bin/repoupdate +++ b/bin/repoupdate @@ -1,5 +1,6 @@ #!/bin/bash set -e +set -u DIRSCRIPT="`dirname \"$0\"`" DIRSCRIPT="`( cd \"$DIRSCRIPT\" && pwd )`" @@ -7,15 +8,20 @@ PROJECT=$1 WIKI=/srv/mediawiki/targets/production -DIR=$2 -: ${DIR:=`pwd`} +DIR="${2:-`pwd`}" source $DIRSCRIPT/findexportroot cd "$DIR" echo "$(date --rfc-3339=seconds --utc) [$(whoami) at $DIR] $0 $@" >> $DIRLOG +checkVar() { + if [ -z "${!1:-}" ] + then echo "Add ${1} to REPOCONF"; exit 1 + fi +} + gitupdate() { - "$DIRSCRIPT/update-reset-repo" "$DIR" "$1" "$2" + "$DIRSCRIPT/update-reset-repo" "$DIR" "$1" "${2:-master}" } processGroups() { @@ -34,6 +40,7 @@ sort } +CLUPDATE="$DIRSCRIPT/clupdate-git-repo"; if [ "${REPO_RW:-no}" = "yes" ] then CLUPDATE_GERRIT="$DIRSCRIPT/clupdate-gerrit-repo"; else CLUPDATE_GERRIT="$DIRSCRIPT/clupdate-git-repo"; @@ -73,6 +80,12 @@ gitupdate "$PROJECT" gitupdate "blockly-games" +elif [ "$PROJECT" = "entryscape" ] +then + VAR="REPO_${PROJECT^^}" + checkVar "$VAR" + "$CLUPDATE" "${!VAR}" "$DIR/$PROJECT" + elif [ "$PROJECT" = "etherpad-lite" ] then gitupdate "$PROJECT" $REPO_ETHERPADLITE_BRANCH diff --git a/groups/EntryScape/Checker.php b/groups/EntryScape/Checker.php new file mode 100644 index 000..f48d5f4 --- /dev/null +++ b/groups/EntryScape/Checker.php @@ -0,0 +1,12 @@ +https://gerrit.wikimedia.org/r/213513 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I31921d83c4cafcb4854119908ed48557a0645a64 Gerrit-PatchSet: 8 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Nikerabbit Gerrit-Reviewer: Nemo bis Gerrit-Reviewer: Nikerabbit Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove __main__ for doctests from library - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: Remove __main__ for doctests from library .. Remove __main__ for doctests from library These are run by jenkins and the same code paths are covered by tests in the test suite. Change-Id: I08f854bea80b407b5949fe92080034d3c674554a --- M pywikibot/data/api.py M pywikibot/tools/__init__.py 2 files changed, 0 insertions(+), 23 deletions(-) Approvals: XZise: Looks good to me, approved jenkins-bot: Verified diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py index fbdb02d..be9665c 100644 --- a/pywikibot/data/api.py +++ b/pywikibot/data/api.py @@ -2838,19 +2838,3 @@ if "flowinfo" in pagedict: page._flowinfo = pagedict['flowinfo']['flow'] - - -if __name__ == "__main__": -import logging -from pywikibot import Site -logging.getLogger("pywiki.data.api").setLevel(logging.DEBUG) -mysite = Site("en", "wikipedia") -pywikibot.output(u"starting test") - -def _test(): -import doctest -doctest.testmod() -try: -_test() -finally: -pywikibot.stopme() diff --git a/pywikibot/tools/__init__.py b/pywikibot/tools/__init__.py index 3a836db..d3f531d 100644 --- a/pywikibot/tools/__init__.py +++ b/pywikibot/tools/__init__.py @@ -1351,10 +1351,3 @@ if self._deprecated[attr][1]: return self._deprecated[attr][1] return getattr(self._module, attr) - - -if __name__ == "__main__": -def _test(): -import doctest -doctest.testmod() -_test() -- To view, visit https://gerrit.wikimedia.org/r/218126 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I08f854bea80b407b5949fe92080034d3c674554a Gerrit-PatchSet: 2 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: John Vandenberg Gerrit-Reviewer: Ladsgroup Gerrit-Reviewer: Merlijn van Deen Gerrit-Reviewer: XZise Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add UTF-16 CSV output option - change (analytics...web)
jenkins-bot has submitted this change and it was merged. Change subject: Add UTF-16 CSV output option .. Add UTF-16 CSV output option Bug: T76126 Change-Id: I60ef05329c314d749d6171a60ea62304c0df3a0e --- M quarry/web/app.py M quarry/web/static/templates/query-resultset.html 2 files changed, 2 insertions(+), 0 deletions(-) Approvals: Yuvipanda: Looks good to me, approved jenkins-bot: Verified diff --git a/quarry/web/app.py b/quarry/web/app.py index 9830f56..28f82c5 100644 --- a/quarry/web/app.py +++ b/quarry/web/app.py @@ -352,6 +352,7 @@ qrun = g.conn.session.query(QueryRun).get(qrun_id) reader = SQLiteResultReader(qrun, app.config['OUTPUT_PATH_TEMPLATE']) response = output.get_formatted_response(format, qrun, reader, resultset_id) +response.encoding = request.args.get('encoding', 'utf-8') if request.args.get('download', 'false') == 'true': # Download this! if qrun.rev.query.title: diff --git a/quarry/web/static/templates/query-resultset.html b/quarry/web/static/templates/query-resultset.html index 1f0bd5e..57ceb7a 100644 --- a/quarry/web/static/templates/query-resultset.html +++ b/quarry/web/static/templates/query-resultset.html @@ -17,6 +17,7 @@ TSV JSON CSV +Excel (UTF-16 CSV) -- To view, visit https://gerrit.wikimedia.org/r/217962 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I60ef05329c314d749d6171a60ea62304c0df3a0e Gerrit-PatchSet: 1 Gerrit-Project: analytics/quarry/web Gerrit-Branch: master Gerrit-Owner: Merlijn van Deen Gerrit-Reviewer: Yuvipanda Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Introduce 'editallhiera' permission - change (mediawiki...OpenStackManager)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/218127 Change subject: Introduce 'editallhiera' permission .. Introduce 'editallhiera' permission People with this permission can edit all Hiera pages Bug: T102389 Change-Id: If8e58eaabbd6fb8d64e83b93ab2b0a2a1bf920b2 (cherry picked from commit a7ec39bfff2865107fab467671b7c798b452df2a) --- M OpenStackManager.php M OpenStackManagerHooks.php M i18n/en.json M i18n/qqq.json 4 files changed, 6 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OpenStackManager refs/changes/27/218127/1 diff --git a/OpenStackManager.php b/OpenStackManager.php index 405b0db..e2abd65 100644 --- a/OpenStackManager.php +++ b/OpenStackManager.php @@ -52,6 +52,7 @@ $wgAvailableRights[] = 'manageglobalpuppet'; $wgAvailableRights[] = 'loginviashell'; $wgAvailableRights[] = 'accessrestrictedregions'; +$wgAvailableRights[] = 'editallhiera'; $wgHooks['UserRights'][] = 'OpenStackNovaUser::manageShellAccess'; $wgHooks['getUserPermissionsErrors'][] = 'OpenStackManagerHooks::getUserPermissionsErrors'; diff --git a/OpenStackManagerHooks.php b/OpenStackManagerHooks.php index 114e900..93b4a75 100644 --- a/OpenStackManagerHooks.php +++ b/OpenStackManagerHooks.php @@ -24,7 +24,7 @@ $result = array( 'openstackmanager-nonovacred-admincreate' ); } $project = $title->getText(); - if ( !$userLDAP->inRole( 'projectadmin', $project ) ) { + if ( !$userLDAP->inRole( 'projectadmin', $project ) && !$this->getUser()->isAllowed( 'editallhiera' ) ) { $result = array( 'openstackmanager-hiera-noadmin', $project ); return false; } diff --git a/i18n/en.json b/i18n/en.json index 3b94263..60efb6a 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -12,6 +12,7 @@ "openstackmanager-badresourcename": "Bad resource name provided.\nResource names start with a-z, and can only contain a-z, 0-9, and - characters.", "action-listall": "display all resource information", "right-listall": "Display all resource information", + "right-editallhiera": "Edit all Hiera: pages", "action-managednsdomain": "manage DNS domains", "action-manageglobalpuppet": "manage global Puppet information", "specialpages-group-nova": "OpenStack Nova", @@ -405,7 +406,7 @@ "openstackmanager-email-body": "The following instance has been created, and is ready to be logged into:", "openstackmanager-twofactorrequired": "Two-factor authentication required", "openstackmanager-twofactorrequired2": "Two-factor authentication is required. Please enable it and try again.", - "openstackmanager-hiera-noadmin": "Only project admins for project $1 can edit this page", + "openstackmanager-hiera-noadmin": "Only global cloudadmins and project admins for project $1 can edit this page", "right-manageproject": "Manage OpenStack projects and roles", "action-manageproject": "manage OpenStack projects and roles", "right-loginviashell": "Login via shell", diff --git a/i18n/qqq.json b/i18n/qqq.json index 71ac6da..d973711 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -26,6 +26,7 @@ "openstackmanager-badresourcename": "Used as error message in Special:NovaAddress, Special:NovaInstance, SpecialNova:Project, Special:NovaPuppetGroup and Special:NovaVolume.\n\nThis error is the result of the form validation about the following elements: host name, instance name, project name, puppet group name and volume name.\n\n\"Resource name(s)\" in this message probably refers the above-mentioned \"*name\" elements.", "action-listall": "{{doc-action|listall}}", "right-listall": "{{doc-right|listall}}", + "right-listall": "{{doc-right|editallhiera}}", "action-managednsdomain": "{{doc-action|managednsdomain}}", "action-manageglobalpuppet": "{{doc-action|manageglobalpuppet}}", "specialpages-group-nova": "{{doc-special-group|that=are related to OpenStack Nova|like=[[Special:NovaInstance]], [[Special:NovaKey]], [[Special:NovaProject]], [[Special:NovaDomain]], [[Special:NovaAddress]], [[Special:NovaSecurityGroup]], [[Special:NovaServiceGroup]],[[Special:NovaRole]], [[Special:NovaVolume]], [[Special:NovaSudoer]], [[Special:NovaPuppetGroup]]}}\nThe following special pages are listed as members of this group:\n* {{msg-mw|Novaaddress}}\n* {{msg-mw|Novadomain}}\n* {{msg-mw|Novainstance}}\n* {{msg-mw|Novakey}}\n* {{msg-mw|Novaproject}}\n* {{msg-mw|Novasecuritygroup}}\n* {{msg-mw|Novaservicegroup}}\n* {{msg-mw|Novarole}}\n* {{msg-mw|Novavolume}}\n* {{msg-mw|Novasudoer}}\n* {{msg-mw|Novapuppetgroup}}", @@ -406,7 +407,7 @@ "openstackmanager-email-body"
[MediaWiki-commits] [Gerrit] Remove doctests from library - change (pywikibot/core)
John Vandenberg has uploaded a new change for review. https://gerrit.wikimedia.org/r/218126 Change subject: Remove doctests from library .. Remove doctests from library These are run by jenkins and the same code paths are covered by tests in the test suite. Change-Id: I08f854bea80b407b5949fe92080034d3c674554a --- M pywikibot/data/api.py M pywikibot/tools/__init__.py 2 files changed, 0 insertions(+), 23 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/26/218126/1 diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py index fbdb02d..be9665c 100644 --- a/pywikibot/data/api.py +++ b/pywikibot/data/api.py @@ -2838,19 +2838,3 @@ if "flowinfo" in pagedict: page._flowinfo = pagedict['flowinfo']['flow'] - - -if __name__ == "__main__": -import logging -from pywikibot import Site -logging.getLogger("pywiki.data.api").setLevel(logging.DEBUG) -mysite = Site("en", "wikipedia") -pywikibot.output(u"starting test") - -def _test(): -import doctest -doctest.testmod() -try: -_test() -finally: -pywikibot.stopme() diff --git a/pywikibot/tools/__init__.py b/pywikibot/tools/__init__.py index 3a836db..d3f531d 100644 --- a/pywikibot/tools/__init__.py +++ b/pywikibot/tools/__init__.py @@ -1351,10 +1351,3 @@ if self._deprecated[attr][1]: return self._deprecated[attr][1] return getattr(self._module, attr) - - -if __name__ == "__main__": -def _test(): -import doctest -doctest.testmod() -_test() -- To view, visit https://gerrit.wikimedia.org/r/218126 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I08f854bea80b407b5949fe92080034d3c674554a Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: John Vandenberg ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use canonical class name for FormatJson - change (mediawiki...Translate)
Nikerabbit has uploaded a new change for review. https://gerrit.wikimedia.org/r/218125 Change subject: Use canonical class name for FormatJson .. Use canonical class name for FormatJson Change-Id: I52ac65fddc70be9cc4888ffc68c28b40a85f9f7d --- M ffs/AmdFFS.php M ffs/JsonFFS.php 2 files changed, 6 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/25/218125/1 diff --git a/ffs/AmdFFS.php b/ffs/AmdFFS.php index d6caa9f..d057971 100644 --- a/ffs/AmdFFS.php +++ b/ffs/AmdFFS.php @@ -52,7 +52,7 @@ */ public static function isValid( $data ) { $data = AmdFFS::extractMessagePart( $data ); - return is_array( FormatJSON::decode( $data, /*as array*/true ) ); + return is_array( FormatJson::decode( $data, /*as array*/true ) ); } public function getFileExtensions() { @@ -66,7 +66,7 @@ public function readFromVariable( $data ) { $authors = AmdFFS::extractAuthors( $data ); $data = AmdFFS::extractMessagePart( $data ); - $messages = (array) FormatJSON::decode( $data, /*as array*/true ); + $messages = (array) FormatJson::decode( $data, /*as array*/true ); $metadata = array(); // Take care of regular language bundles, as well as the root bundle. @@ -113,7 +113,7 @@ return ''; } $header = $this->header( $collection->code, $collection->getAuthors() ); - return $header . FormatJSON::encode( $messages, "\t", FormatJson::UTF8_OK ) . ");\n"; + return $header . FormatJson::encode( $messages, "\t", FormatJson::UTF8_OK ) . ");\n"; } /** diff --git a/ffs/JsonFFS.php b/ffs/JsonFFS.php index 7534582..e9758a5 100644 --- a/ffs/JsonFFS.php +++ b/ffs/JsonFFS.php @@ -22,7 +22,7 @@ * @return bool */ public static function isValid( $data ) { - return is_array( FormatJSON::decode( $data, /*as array*/true ) ); + return is_array( FormatJson::decode( $data, /*as array*/true ) ); } public function getFileExtensions() { @@ -34,7 +34,7 @@ * @return array Parsed data. */ public function readFromVariable( $data ) { - $messages = (array) FormatJSON::decode( $data, /*as array*/true ); + $messages = (array) FormatJson::decode( $data, /*as array*/true ); $authors = array(); $metadata = array(); @@ -105,6 +105,6 @@ return ''; } - return FormatJSON::encode( $messages, "\t", FormatJson::ALL_OK ) . "\n"; + return FormatJson::encode( $messages, "\t", FormatJson::ALL_OK ) . "\n"; } } -- To view, visit https://gerrit.wikimedia.org/r/218125 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I52ac65fddc70be9cc4888ffc68c28b40a85f9f7d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] proofreadpage.py: save page with format application/json - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: proofreadpage.py: save page with format application/json .. proofreadpage.py: save page with format application/json This is the preferred format to save ProofreadPage as it avoids to reconstruct the wikitext given header, body and footer. Change-Id: If4ec33d61b43b242b0061a3696d2c2ad1012570d --- M pywikibot/proofreadpage.py M tests/proofreadpage_tests.py 2 files changed, 87 insertions(+), 25 deletions(-) Approvals: John Vandenberg: Looks good to me, approved jenkins-bot: Verified diff --git a/pywikibot/proofreadpage.py b/pywikibot/proofreadpage.py index 2acb362..234dee2 100644 --- a/pywikibot/proofreadpage.py +++ b/pywikibot/proofreadpage.py @@ -1,6 +1,8 @@ # -*- coding: utf-8 -*- """ -Objects representing objects used with ProofreadPage Extensions. +Objects representing objects used with ProofreadPage Extension. + +The extension is supported by MW 1.21+. This module includes objects: * ProofreadPage(Page) @@ -18,6 +20,7 @@ # import re +import json import pywikibot @@ -36,9 +39,9 @@ def __init__(self, text=None): """Constructor.""" -self.text = text or '' +self._text = text or '' -m = self.p_header.search(self.text) +m = self.p_header.search(self._text) if m: self.ql = int(m.group('ql')) self.user = m.group('user') @@ -165,6 +168,7 @@ return self._full_header.header @header.setter +@decompose def header(self, value): """Set editable part of Page header.""" self._full_header.header = value @@ -198,6 +202,7 @@ self._full_header = FullHeader() self._body = '' self._footer = '' +self.user = self.site.username() # Fill user field in empty header. self._compose_page() @property @@ -211,17 +216,20 @@ if hasattr(self, '_text'): return self._text # If page does not exist, preload it -if not self.exists(): +if self.exists(): +# If page exists, load it +super(ProofreadPage, self).text +else: self._text = self.preloadText() -# If page exists, load it -super(ProofreadPage, self).text +self.user = self.site.username() # Fill user field in empty header. return self._text @text.setter def text(self, value): -"""Update the current text. +"""Update current text. Mainly for use within the class, called by other methods. +Use self.header, self.body and self.footer to set page content, @param value: New value or None @param value: basestring @@ -231,12 +239,14 @@ extension. """ self._text = value -self._decompose_page() -if not self._text: +if self._text: +self._decompose_page() +else: self._create_empty_page() @text.deleter def text(self): +"""Delete current text.""" if hasattr(self, '_text'): del self._text @@ -247,12 +257,12 @@ exception Error: the page is not formatted according to ProofreadPage extension. """ -if not self.text: +if not self.text: # Property force page text loading. self._create_empty_page() return -open_queue = list(self.p_open.finditer(self.text)) -close_queue = list(self.p_close.finditer(self.text)) +open_queue = list(self.p_open.finditer(self._text)) +close_queue = list(self.p_close.finditer(self._text)) len_oq = len(open_queue) len_cq = len(close_queue) @@ -261,27 +271,48 @@ % self.title(asLink=True)) f_open, f_close = open_queue[0], close_queue[0] -self._full_header = FullHeader(self.text[f_open.end():f_close.start()]) +self._full_header = FullHeader(self._text[f_open.end():f_close.start()]) l_open, l_close = open_queue[-1], close_queue[-1] -self._footer = self.text[l_open.end():l_close.start()] +self._footer = self._text[l_open.end():l_close.start()] -self._body = self.text[f_close.end():l_open.start()] +self._body = self._text[f_close.end():l_open.start()] def _compose_page(self): """Compose Proofread Page text from header, body and footer.""" fmt = ('{0.open_tag}{0._full_header}{0.close_tag}' '{0._body}' '{0.open_tag}{0._footer}{0.close_tag}') -self.text = fmt.format(self) -return self.text +self._text = fmt.format(self) +return self._text + +def _page_to_json(self): +"""Convert page text to json format. + +This is the format accepted by action=edit specifying
[MediaWiki-commits] [Gerrit] New Wikidata Build - 2015-06-14T10:00:02+0000 - change (mediawiki...Wikidata)
WikidataBuilder has uploaded a new change for review. https://gerrit.wikimedia.org/r/218124 Change subject: New Wikidata Build - 2015-06-14T10:00:02+ .. New Wikidata Build - 2015-06-14T10:00:02+ Change-Id: I30e3f829a0e0d3086462aa90fccf59bb52ea8397 --- M composer.lock A extensions/Wikibase/client/i18n/hil.json M extensions/Wikibase/client/i18n/ne.json M extensions/Wikibase/client/i18n/qu.json M extensions/Wikibase/lib/i18n/pl.json M extensions/Wikibase/lib/i18n/qqq.json M extensions/Wikibase/lib/i18n/qu.json M extensions/Wikibase/repo/i18n/es.json M extensions/Wikibase/repo/i18n/he.json A extensions/Wikibase/repo/i18n/hil.json M extensions/Wikibase/repo/i18n/pt.json M extensions/Wikibase/repo/i18n/qu.json A extensions/Wikibase/repo/i18n/tg-cyrl.json M extensions/Wikibase/repo/i18n/zh-hans.json M extensions/Wikibase/repo/i18n/zh-hant.json M vendor/composer/installed.json 16 files changed, 57 insertions(+), 17 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikidata refs/changes/24/218124/1 diff --git a/composer.lock b/composer.lock index 5cc2ca4..b31a035 100644 --- a/composer.lock +++ b/composer.lock @@ -1213,12 +1213,12 @@ "source": { "type": "git", "url": "https://github.com/wikimedia/mediawiki-extensions-Wikibase.git";, -"reference": "34dfdaf1df419b8ef58c7d082d0d0ff39ee7da08" +"reference": "899eb93f4bbec4acb285b04495eeed2a406495fb" }, "dist": { "type": "zip", -"url": "https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/34dfdaf1df419b8ef58c7d082d0d0ff39ee7da08";, -"reference": "34dfdaf1df419b8ef58c7d082d0d0ff39ee7da08", +"url": "https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/899eb93f4bbec4acb285b04495eeed2a406495fb";, +"reference": "899eb93f4bbec4acb285b04495eeed2a406495fb", "shasum": "" }, "require": { @@ -1286,7 +1286,7 @@ "wikibaserepo", "wikidata" ], -"time": "2015-06-12 19:56:55" +"time": "2015-06-13 20:34:28" }, { "name": "wikibase/wikimedia-badges", diff --git a/extensions/Wikibase/client/i18n/hil.json b/extensions/Wikibase/client/i18n/hil.json new file mode 100644 index 000..147637b --- /dev/null +++ b/extensions/Wikibase/client/i18n/hil.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Redhotchili23" + ] + }, + "wikibase-rc-hide-wikidata-show": "Ipakita" +} diff --git a/extensions/Wikibase/client/i18n/ne.json b/extensions/Wikibase/client/i18n/ne.json index 1f9bf44..0a58f1a 100644 --- a/extensions/Wikibase/client/i18n/ne.json +++ b/extensions/Wikibase/client/i18n/ne.json @@ -1,7 +1,8 @@ { "@metadata": { "authors": [ - "बिप्लब आनन्द" + "बिप्लब आनन्द", + "राम प्रसाद जोशी" ] }, "wikibase-client-desc": "विकिबेस वृद्दिको लागि क्लाइन्ट", @@ -15,7 +16,7 @@ "wikibase-comment-sitelink-add": "भाषा लिङ्क जोडियो: $1", "wikibase-comment-sitelink-change": "भाषा लिङ्क $1 देखि $2 मा परिवर्तन भयो", "wikibase-comment-sitelink-remove": "भाषा लिङ्क मेटियो: $1", - "wikibase-comment-multi": "$1 {{PLURAL:$1|परिवर्तन|परिवर्तनहरु}}", + "wikibase-comment-multi": "$1 {{PLURAL:$1|परिवर्तन|परिवर्तनहरू}}", "wikibase-dataitem": "{{WBREPONAME}} आइटम", "wikibase-editlinks": "लिङ्क सम्पादन गर्नुहोस्", "wikibase-editlinkstitle": "अन्तरभाषिक लिङ्क सम्पादन गर्नुहोस्", diff --git a/extensions/Wikibase/client/i18n/qu.json b/extensions/Wikibase/client/i18n/qu.json index 27030d3..dc56ad6 100644 --- a/extensions/Wikibase/client/i18n/qu.json +++ b/extensions/Wikibase/client/i18n/qu.json @@ -7,6 +7,7 @@ "tooltip-t-wikibase": "T'inkinakusqa taqi qallawawan t'inki", "wikibase-after-page-move": "T'inkisqa {{WBREPONAME}} qallawatapas [$1 musuqchaytam] atinki astasqa p'anqapi rimay t'inkikunata hat'allinaykipaq.", "wikibase-after-page-move-queued": "Kay p'anqawan t'inkisqa [$1 {{WBREPONAME}} qallawaqa] utqaylla musuqchasqam kanqa.", + "wikibase-comment-update": "{{WBREPONAME}} qallawa hukchasqa", "wikibase-dataitem": "{{WBREPONAME}} willa qallawa", "wikibase-editlinks": "T'inkikunata llamk'apuy", "wikibase-editlinkstitle": "Wikipura t'inkikunata llamk'apuy", @@ -22,6 +23,7 @@ "wikibase-linkitem-not-loggedin-title": "Yaykunaykim tiyan", "wikibase-linkitem-not-loggedin": "Kay wikipi [$1 chawpi willa hallch'apipas] yaykunaykim tiyan kayta ruranaykipaq.", "wikibase-linkitem-success-link": "P'anqakunaqa aypalla t