[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Revert "db-codfw.php: Depool db2034, db2055 and db2062"
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/382115 ) Change subject: Revert "db-codfw.php: Depool db2034, db2055 and db2062" .. Revert "db-codfw.php: Depool db2034, db2055 and db2062" This reverts commit 33c7c2e279ca4d8fbbd2461d58502f6923d410cf. Change-Id: I175dd4d6304d14d8e48fca091f1b7e7c6b27ca5c --- M wmf-config/db-codfw.php 1 file changed, 13 insertions(+), 13 deletions(-) Approvals: Marostegui: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/db-codfw.php b/wmf-config/db-codfw.php index 15b592e..0a1f0af 100644 --- a/wmf-config/db-codfw.php +++ b/wmf-config/db-codfw.php @@ -103,11 +103,11 @@ 's1' => [ 'db2048' => 0, # C6 2.9TB 160GB, master # 'db2016' => 0, # B6 2.9TB 96GB, old master - # 'db2034' => 50, # A5 2.9TB 160GB, rc, log #T174509 + 'db2034' => 50, # A5 2.9TB 160GB, rc, log 'db2042' => 50, # C6 2.9TB 160GB, rc, log - # 'db2055' => 50, # D6 3.3TB 160GB, dump (inactive), vslow, api #T174509 - # 'db2062' => 50, # B5 3.3TB 160GB, api # mariadb 10.1 #T174509 - 'db2069' => 50, # D6 3.3TB 160GB, api #temporary vslow #T174509 + 'db2055' => 50, # D6 3.3TB 160GB, dump (inactive), vslow, api + 'db2062' => 50, # B5 3.3TB 160GB, api # mariadb 10.1 + 'db2069' => 50, # D6 3.3TB 160GB, api 'db2070' => 400, # C5 3.3TB 160GB 'db2071' => 50, # A6 3.6TB 512GB, api 'db2072' => 500, # B6 3.6TB 512GB, # mariadb 10.1 @@ -240,34 +240,34 @@ 'groupLoadsBySection' => [ 's1' => [ 'watchlist' => [ - # 'db2034' => 1, + 'db2034' => 1, 'db2042' => 1, ], 'recentchanges' => [ - # 'db2034' => 1, + 'db2034' => 1, 'db2042' => 1, ], 'recentchangeslinked' => [ - # 'db2034' => 1, + 'db2034' => 1, 'db2042' => 1, ], 'contributions' => [ - # 'db2034' => 1, + 'db2034' => 1, 'db2042' => 1, ], 'logpager' => [ - # 'db2034' => 1, + 'db2034' => 1, 'db2042' => 1, ], 'dump' => [ - 'db2069' => 1, + 'db2055' => 1, ], 'vslow' => [ - 'db2069' => 1, + 'db2055' => 1, ], 'api' => [ - # 'db2055' => 1, - # 'db2062' => 1, + 'db2055' => 1, + 'db2062' => 1, 'db2069' => 1, 'db2071' => 5, ], -- To view, visit https://gerrit.wikimedia.org/r/382115 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I175dd4d6304d14d8e48fca091f1b7e7c6b27ca5c Gerrit-PatchSet: 2 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: MarosteguiGerrit-Reviewer: Jcrespo Gerrit-Reviewer: Marostegui Gerrit-Reviewer: Urbanecm Gerrit-Reviewer: Zoranzoki21 Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Revert "db-codfw.php: Depool db2034, db2055 and db2062"
Hello Urbanecm, jenkins-bot, Jcrespo, I'd like you to do a code review. Please visit https://gerrit.wikimedia.org/r/382115 to review the following change. Change subject: Revert "db-codfw.php: Depool db2034, db2055 and db2062" .. Revert "db-codfw.php: Depool db2034, db2055 and db2062" This reverts commit 33c7c2e279ca4d8fbbd2461d58502f6923d410cf. Change-Id: I175dd4d6304d14d8e48fca091f1b7e7c6b27ca5c --- M wmf-config/db-codfw.php 1 file changed, 13 insertions(+), 13 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/15/382115/1 diff --git a/wmf-config/db-codfw.php b/wmf-config/db-codfw.php index 48be022..990dc83 100644 --- a/wmf-config/db-codfw.php +++ b/wmf-config/db-codfw.php @@ -103,11 +103,11 @@ 's1' => [ 'db2048' => 0, # C6 2.9TB 160GB, master # 'db2016' => 0, # B6 2.9TB 96GB, old master - # 'db2034' => 50, # A5 2.9TB 160GB, rc, log #T174509 + 'db2034' => 50, # A5 2.9TB 160GB, rc, log 'db2042' => 50, # C6 2.9TB 160GB, rc, log - # 'db2055' => 50, # D6 3.3TB 160GB, dump (inactive), vslow, api #T174509 - # 'db2062' => 50, # B5 3.3TB 160GB, api # mariadb 10.1 #T174509 - 'db2069' => 50, # D6 3.3TB 160GB, api #temporary vslow #T174509 + 'db2055' => 50, # D6 3.3TB 160GB, dump (inactive), vslow, api + 'db2062' => 50, # B5 3.3TB 160GB, api # mariadb 10.1 + 'db2069' => 50, # D6 3.3TB 160GB, api 'db2070' => 400, # C5 3.3TB 160GB 'db2071' => 50, # A6 3.6TB 512GB, api 'db2072' => 500, # B6 3.6TB 512GB, # mariadb 10.1 @@ -240,34 +240,34 @@ 'groupLoadsBySection' => [ 's1' => [ 'watchlist' => [ - # 'db2034' => 1, + 'db2034' => 1, 'db2042' => 1, ], 'recentchanges' => [ - # 'db2034' => 1, + 'db2034' => 1, 'db2042' => 1, ], 'recentchangeslinked' => [ - # 'db2034' => 1, + 'db2034' => 1, 'db2042' => 1, ], 'contributions' => [ - # 'db2034' => 1, + 'db2034' => 1, 'db2042' => 1, ], 'logpager' => [ - # 'db2034' => 1, + 'db2034' => 1, 'db2042' => 1, ], 'dump' => [ - 'db2069' => 1, + 'db2055' => 1, ], 'vslow' => [ - 'db2069' => 1, + 'db2055' => 1, ], 'api' => [ - # 'db2055' => 1, - # 'db2062' => 1, + 'db2055' => 1, + 'db2062' => 1, 'db2069' => 1, 'db2071' => 5, ], -- To view, visit https://gerrit.wikimedia.org/r/382115 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I175dd4d6304d14d8e48fca091f1b7e7c6b27ca5c Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: MarosteguiGerrit-Reviewer: Jcrespo Gerrit-Reviewer: Urbanecm Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_30]: Inject dependencies into Shell\Command
Legoktm has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/382114 ) Change subject: Inject dependencies into Shell\Command .. Inject dependencies into Shell\Command This slightly changes how execution time limits fall back on each other. Change-Id: I7754a9e6be9638eebe90cb953adb8e2a6ee97cef (cherry picked from commit 1bb9a223d268518cedc16cfe4d67a293989d7aa5) --- M RELEASE-NOTES-1.30 M includes/shell/Command.php M includes/shell/Shell.php 3 files changed, 67 insertions(+), 25 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/14/382114/1 diff --git a/RELEASE-NOTES-1.30 b/RELEASE-NOTES-1.30 index 2090ce9..bec7b86 100644 --- a/RELEASE-NOTES-1.30 +++ b/RELEASE-NOTES-1.30 @@ -233,7 +233,10 @@ * DB_SLAVE is deprecated. DB_REPLICA should be used instead. * wfUsePHP() is deprecated. * wfFixSessionID() was removed. -* wfShellExec() and related functions are deprecated, use Shell::command(). +* wfShellExec() and related functions are deprecated, use Shell::command(). This also + slightly changes the behavior of how execution time limits are calculated when only + some of defaults are overridden per-call. When in doubt, always override both wall + clock and CPU time. * (T138166) SpecialEmailUser::getTarget() now requires a second argument, the sending user object. Using the method without the second argument is deprecated. * (T67297) Browsers that don't support Unicode will have their edits rejected. diff --git a/includes/shell/Command.php b/includes/shell/Command.php index 864e69a..fd8f6a0 100644 --- a/includes/shell/Command.php +++ b/includes/shell/Command.php @@ -24,6 +24,8 @@ use MediaWiki\ProcOpenError; use MediaWiki\ShellDisabledError; use Profiler; +use Psr\Log\LoggerAwareTrait; +use Psr\Log\NullLogger; /** * Class used for executing shell commands @@ -31,11 +33,22 @@ * @since 1.30 */ class Command { + use LoggerAwareTrait; + /** @var string */ private $command = ''; /** @var array */ - private $limits = []; + private $limits = [ + // seconds + 'time' => 180, + // seconds + 'walltime' => 180, + // KB + 'memory' => 307200, + // KB + 'filesize' => 102400, + ]; /** @var string[] */ private $env = []; @@ -49,13 +62,20 @@ /** @var bool */ private $everExecuted = false; + /** @var string|false */ + private $cGroup = false; + /** * Constructor. Don't call directly, instead use Shell::command() +* +* @throws ShellDisabledError */ public function __construct() { if ( Shell::isDisabled() ) { throw new ShellDisabledError(); } + + $this->setLogger( new NullLogger() ); } /** @@ -112,11 +132,10 @@ * Sets execution limits * * @param array $limits Optional array with limits(filesize, memory, time, walltime). -* This overrides the global wgMaxShell* limits. * @return $this */ public function limits( array $limits ) { - $this->limits = $limits; + $this->limits = $limits + $this->limits; return $this; } @@ -159,6 +178,18 @@ } /** +* Sets cgroup for this command +* +* @param string|false $cgroup +* @return $this +*/ + public function cgroup( $cgroup ) { + $this->cGroup = $cgroup; + + return $this; + } + + /** * Executes command. Afterwards, getExitCode() and getOutput() can be used to access execution * results. * @@ -168,8 +199,7 @@ * @throws ShellDisabledError */ public function execute() { - global $IP, $wgMaxShellMemory, $wgMaxShellFileSize, $wgMaxShellTime, - $wgMaxShellWallClockTime, $wgShellCgroup; + global $IP; $this->everExecuted = true; @@ -197,18 +227,12 @@ $useLogPipe = false; if ( is_executable( '/bin/bash' ) ) { - $time = intval( isset( $this->limits['time'] ) ? $this->limits['time'] : $wgMaxShellTime ); - if ( isset( $this->limits['walltime'] ) ) { - $wallTime = intval( $this->limits['walltime'] ); - } elseif ( isset( $this->limits['time'] ) ) { - $wallTime = $time; - } else { - $wallTime = intval( $wgMaxShellWallClockTime ); - } - $mem = intval( isset( $this->limits['memory'] ) ? $this->limits['memory'] :
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Inject dependencies into Shell\Command
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/376874 ) Change subject: Inject dependencies into Shell\Command .. Inject dependencies into Shell\Command This slightly changes how execution time limits fall back on each other. Change-Id: I7754a9e6be9638eebe90cb953adb8e2a6ee97cef --- M RELEASE-NOTES-1.30 M includes/shell/Command.php M includes/shell/Shell.php 3 files changed, 67 insertions(+), 25 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/RELEASE-NOTES-1.30 b/RELEASE-NOTES-1.30 index 2090ce9..bec7b86 100644 --- a/RELEASE-NOTES-1.30 +++ b/RELEASE-NOTES-1.30 @@ -233,7 +233,10 @@ * DB_SLAVE is deprecated. DB_REPLICA should be used instead. * wfUsePHP() is deprecated. * wfFixSessionID() was removed. -* wfShellExec() and related functions are deprecated, use Shell::command(). +* wfShellExec() and related functions are deprecated, use Shell::command(). This also + slightly changes the behavior of how execution time limits are calculated when only + some of defaults are overridden per-call. When in doubt, always override both wall + clock and CPU time. * (T138166) SpecialEmailUser::getTarget() now requires a second argument, the sending user object. Using the method without the second argument is deprecated. * (T67297) Browsers that don't support Unicode will have their edits rejected. diff --git a/includes/shell/Command.php b/includes/shell/Command.php index 864e69a..fd8f6a0 100644 --- a/includes/shell/Command.php +++ b/includes/shell/Command.php @@ -24,6 +24,8 @@ use MediaWiki\ProcOpenError; use MediaWiki\ShellDisabledError; use Profiler; +use Psr\Log\LoggerAwareTrait; +use Psr\Log\NullLogger; /** * Class used for executing shell commands @@ -31,11 +33,22 @@ * @since 1.30 */ class Command { + use LoggerAwareTrait; + /** @var string */ private $command = ''; /** @var array */ - private $limits = []; + private $limits = [ + // seconds + 'time' => 180, + // seconds + 'walltime' => 180, + // KB + 'memory' => 307200, + // KB + 'filesize' => 102400, + ]; /** @var string[] */ private $env = []; @@ -49,13 +62,20 @@ /** @var bool */ private $everExecuted = false; + /** @var string|false */ + private $cGroup = false; + /** * Constructor. Don't call directly, instead use Shell::command() +* +* @throws ShellDisabledError */ public function __construct() { if ( Shell::isDisabled() ) { throw new ShellDisabledError(); } + + $this->setLogger( new NullLogger() ); } /** @@ -112,11 +132,10 @@ * Sets execution limits * * @param array $limits Optional array with limits(filesize, memory, time, walltime). -* This overrides the global wgMaxShell* limits. * @return $this */ public function limits( array $limits ) { - $this->limits = $limits; + $this->limits = $limits + $this->limits; return $this; } @@ -159,6 +178,18 @@ } /** +* Sets cgroup for this command +* +* @param string|false $cgroup +* @return $this +*/ + public function cgroup( $cgroup ) { + $this->cGroup = $cgroup; + + return $this; + } + + /** * Executes command. Afterwards, getExitCode() and getOutput() can be used to access execution * results. * @@ -168,8 +199,7 @@ * @throws ShellDisabledError */ public function execute() { - global $IP, $wgMaxShellMemory, $wgMaxShellFileSize, $wgMaxShellTime, - $wgMaxShellWallClockTime, $wgShellCgroup; + global $IP; $this->everExecuted = true; @@ -197,18 +227,12 @@ $useLogPipe = false; if ( is_executable( '/bin/bash' ) ) { - $time = intval( isset( $this->limits['time'] ) ? $this->limits['time'] : $wgMaxShellTime ); - if ( isset( $this->limits['walltime'] ) ) { - $wallTime = intval( $this->limits['walltime'] ); - } elseif ( isset( $this->limits['time'] ) ) { - $wallTime = $time; - } else { - $wallTime = intval( $wgMaxShellWallClockTime ); - } - $mem = intval( isset( $this->limits['memory'] ) ? $this->limits['memory'] : $wgMaxShellMemory ); - $filesize = intval( isset(
[MediaWiki-commits] [Gerrit] mediawiki...cxserver[master]: Make bin/apertium-xhtml a generic mt testing utility
Santhosh has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/382113 ) Change subject: Make bin/apertium-xhtml a generic mt testing utility .. Make bin/apertium-xhtml a generic mt testing utility Moved it to bin/mt and accepts MT service name. Helps testing mt services easily. Change-Id: Ic214822132e339208b2e7c158510c7d8779ed18f --- D bin/apertium-xhtml A bin/mt 2 files changed, 56 insertions(+), 55 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/cxserver refs/changes/13/382113/1 diff --git a/bin/apertium-xhtml b/bin/apertium-xhtml deleted file mode 100755 index 61cde1a..000 --- a/bin/apertium-xhtml +++ /dev/null @@ -1,55 +0,0 @@ -#!/usr/bin/env node -var sourceLang, targetLang, sourceHtml, script, args, config, cxConfig, - fs = require( 'fs' ), - yaml = require( 'js-yaml' ), - Apertium = require( __dirname + '/../lib/mt/Apertium.js' ); - -config = yaml.load( fs.readFileSync( 'config.yaml' ) ); -if ( !config ) { - console.error( 'Failed to load config' ); - process.exit( 1 ); -} -cxConfig = config.services && Array.isArray( config.services ) && - config.services.filter( function ( item ) { - return item && item.name === 'cxserver'; - } )[ 0 ]; -if ( !cxConfig ) { - console.error( 'Cannot find cxserver config' ); - process.exit( 1 ); -} - -script = process.argv[ 1 ]; -args = process.argv.slice( 2 ); -if ( args.length !== 2 ) { - process.stderr.write( - 'Usage: node ' + script + ' < xhtmlSource\n\n' + - 'xhtml must be wrapped in a block element such as ... or ...\n' + - 'Example:\n\techo "A red box." | node ' + script + ' en es\n\n' - ); - process.exit( 1 ); -} - -sourceLang = args[ 0 ]; -targetLang = args[ 1 ]; - -sourceHtml = []; - -process.stdin.on( 'data', function ( data ) { - sourceHtml.push( data ); -} ); -process.stdin.on( 'end', function () { - new Apertium( cxConfig ).translate( - sourceLang, - targetLang, - sourceHtml.join( '' ) - ).then( function ( targetHtml ) { - process.stdout.write( targetHtml + '\n' ); - } ).catch( function ( error ) { - if ( error.stack ) { - console.error( 'error', error.stack ); - } else { - console.error( 'error', error ); - } - process.exit( 2 ); - } ); -} ); diff --git a/bin/mt b/bin/mt new file mode 100755 index 000..6d0c5c0 --- /dev/null +++ b/bin/mt @@ -0,0 +1,56 @@ +#!/usr/bin/env node +const fs = require( 'fs' ), + yaml = require( 'js-yaml' ), + MTClients = require( __dirname + '/../lib/mt/' ); + +const config = yaml.load( fs.readFileSync( 'config.yaml' ) ); +if ( !config ) { + console.error( 'Failed to load config' ); + process.exit( 1 ); +} +const cxConfig = config.services && Array.isArray( config.services ) && + config.services.filter( function ( item ) { + return item && item.name === 'cxserver'; + } )[ 0 ]; +if ( !cxConfig ) { + console.error( 'Cannot find cxserver config' ); + process.exit( 1 ); +} + +const script = process.argv[ 1 ]; +const args = process.argv.slice( 2 ); +const mtService = args[ 0 ]; +const sourceLang = args[ 1 ]; +const targetLang = args[ 2 ]; + +let sourceHtml = fs.readFileSync( '/dev/stdin', 'utf8' ); +if ( sourceHtml.trim() === '' || args.length !== 3 ) { + process.stderr.write( + 'Usage: node ' + script + ' < xhtmlSource\n\n' + + 'Example:\n\techo "A red box." | node ' + script + ' Apertium en es\n\n' + ); + process.exit( 1 ); + +} + +if ( !MTClients[ mtService ] ) { + console.error( `Cannot find MT service: ${mtService}` ); + process.exit( 1 ); +} + +let mt = new MTClients[ mtService ]( cxConfig ); + +return mt.translate( + sourceLang, + targetLang, + sourceHtml +).then( ( targetHtml ) => { + process.stdout.write( targetHtml + '\n' ); +} ).catch( ( error ) => { + if ( error.stack ) { + console.error( 'error', error.stack ); + } else { + console.error( 'error', error ); + } + process.exit( 2 ); +} ); -- To view, visit https://gerrit.wikimedia.org/r/382113 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic214822132e339208b2e7c158510c7d8779ed18f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/cxserver Gerrit-Branch: master Gerrit-Owner: Santhosh___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Numbers are not people
Eileen has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/382112 ) Change subject: Numbers are not people .. Numbers are not people Bug: T175747 Change-Id: Ia7642c08af3bb977b5542fbb9f696b46f35b4891 --- M sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php M sites/all/modules/wmf_civicrm/wmf_civicrm.module 2 files changed, 61 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/12/382112/1 diff --git a/sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php b/sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php index b751200..442ab18 100644 --- a/sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php +++ b/sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php @@ -526,6 +526,20 @@ } /** + * Test that we ignore numbers as names. + * + * Bug T175747 + */ + public function testBatchMergeResolvableConflictNumbersAreNotPeople() { +$this->breedDuck(array('id' => $this->contactID, 'first_name' => 'alter. ego')); +$this->breedDuck(array('id' => $this->contactID2, 'first_name' => '1')); +$result = $this->callAPISuccess('Job', 'process_batch_merge', array('mode' => 'safe')); +$this->assertEquals(1, count($result['values']['merged'])); +$contact = $this->callAPISuccessGetSingle('Contact', array('email' => 'the_...@duckland.com')); +$this->assertEquals('alter. ego', $contact['first_name']); + } + + /** * Test that a conflict on casing in first names is handled. * * We do a best effort on this to get the more correct on assuming that 1 capital letter in a diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.module b/sites/all/modules/wmf_civicrm/wmf_civicrm.module index a475b04..bd4dc51 100644 --- a/sites/all/modules/wmf_civicrm/wmf_civicrm.module +++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.module @@ -2471,6 +2471,15 @@ return; } + if (_wmf_civicrm_merge_resolve_inappropriate_data_conflict( +$dbFieldName, +$refs['migration_info'][$moveField], +$refs['migration_info']['rows'][$moveField]['other'], +$refs['migration_info']['rows'][$moveField]['main'])) { +unset($refs['fields_in_conflict'][$moveField]); +return; + } + if (substr($moveField, 0, 13) === 'move_location') { if (!isset($refs['is_major_gift'])) { $refs['is_major_gift'] = _wmf_civicrm_is_merged_contact_major_donor($mainId, $otherId); @@ -2671,6 +2680,44 @@ } /** + * Resolve conflicts whether the data is not appropriate to the field. + * + * A numeric name is not valid so if we have a non-numeric alternative we + * should take it. + * + * @param string $fieldName + * @param string $moveFieldValue + * @param string $valueToKeep + * @param string $valueToOverwrite + * + * @return bool + */ +function _wmf_civicrm_merge_resolve_inappropriate_data_conflict($fieldName, &$moveFieldValue, &$valueToKeep, &$valueToOverwrite) { + $fieldsToResolve = array('last_name', 'first_name'); + if (!in_array(str_replace('move_', '', $fieldName), $fieldsToResolve)) { +return FALSE; + } + // Let's get rid of any preceding or trailing spaces. + $valueToKeep = trim($valueToKeep); + $valueToOverwrite = trim($valueToOverwrite); + $moveFieldValue = trim($moveFieldValue); + + if (!is_numeric($valueToKeep) && !is_numeric($valueToOverwrite)) { +return FALSE; + } + + if (is_numeric($valueToOverwrite)) { +// We are already overwriting the number so individualism is winning. +return TRUE; + } + // We have a conflict to resolve and we are going to resolve it by keeping + //the value that was to be overwritten. + $moveFieldValue = $valueToOverwrite; + $valueToKeep = $valueToOverwrite; + return TRUE; +} + +/** * Check for special characters (none latin) in the string. * * @param string $string -- To view, visit https://gerrit.wikimedia.org/r/382112 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia7642c08af3bb977b5542fbb9f696b46f35b4891 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: Eileen___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...cxserver[master]: Matxin MT: Use an API key to access the service
Santhosh has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/382111 ) Change subject: Matxin MT: Use an API key to access the service .. Matxin MT: Use an API key to access the service As Matchin maintainers suggested, the API is adding a key to control the usage of service. Change-Id: Ib5c40b907ffdc251f0e7af1de9b8b95f2201257a --- M lib/mt/Matxin.js 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/cxserver refs/changes/11/382111/1 diff --git a/lib/mt/Matxin.js b/lib/mt/Matxin.js index c48959d..6b9546f 100644 --- a/lib/mt/Matxin.js +++ b/lib/mt/Matxin.js @@ -23,11 +23,16 @@ return preq.post( { uri: this.conf.mt.Matxin.api, body: { + key: this.conf.mt.Matxin.key, direction: sourceLang + '-' + targetLang, text: sourceText } } ).then( ( response ) => response.body.translation.replace( /\. ॥ ॥\. /g, '.॥॥.' ) ); } + + requiresAuthorization() { + return true; + } } module.exports = Matxin; -- To view, visit https://gerrit.wikimedia.org/r/382111 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib5c40b907ffdc251f0e7af1de9b8b95f2201257a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/cxserver Gerrit-Branch: master Gerrit-Owner: Santhosh___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Function extraction
Eileen has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/382110 ) Change subject: Function extraction .. Function extraction This stuff is pretty nasty. A bigger clean up is planned for later on but this is at least a small improvement. Bug: T175748 Change-Id: I80a2456eb2611ae5f5bd284296e74eec6fac4fa8 --- M sites/all/modules/wmf_civicrm/wmf_civicrm.module 1 file changed, 84 insertions(+), 69 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/10/382110/1 diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.module b/sites/all/modules/wmf_civicrm/wmf_civicrm.module index 4d2c72a..3907125 100644 --- a/sites/all/modules/wmf_civicrm/wmf_civicrm.module +++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.module @@ -2394,75 +2394,7 @@ // default settings for opt out fields. if ($type === 'batch') { foreach (array_keys($refs['fields_in_conflict']) as $moveField) { - if (_wmf_civicrm_merge_is_communication_boolean($moveField)) { -unset($refs['fields_in_conflict'][$moveField]); -$refs['migration_info'][$moveField] = 1; -$refs['migration_info']['rows'][$moveField]['other'] = ts('Yes'); -continue; - } - - if ($moveField == 'move_contact_source') { -unset($refs['fields_in_conflict'][$moveField]); -continue; - } - - if (_wmf_civicrm_merge_resolve_preferred_language_conflict( -str_replace('move_', '', $moveField), -$refs['migration_info'][$moveField], -$refs['migration_info']['rows'][$moveField]['other'], -$refs['migration_info']['rows'][$moveField]['main'], -$mainId, -$otherId - )) { -unset($refs['fields_in_conflict'][$moveField]); -continue; - } - - if (_wmf_civicrm_merge_resolve_casing_conflict( -str_replace('move_', '', $moveField), -$refs['migration_info'][$moveField], -$refs['migration_info']['rows'][$moveField]['other'], -$refs['migration_info']['rows'][$moveField]['main'])) { - unset($refs['fields_in_conflict'][$moveField]); - continue; - } - - if (_wmf_civicrm_merge_resolve_diacritic_conflict( -str_replace('move_', '', $moveField), -$refs['migration_info'][$moveField], -$refs['migration_info']['rows'][$moveField]['other'], -$refs['migration_info']['rows'][$moveField]['main'])) { -unset($refs['fields_in_conflict'][$moveField]); -continue; - } - - if (_wmf_civicrm_merge_resolve_uninformative_characters_conflict( -str_replace('move_', '', $moveField), -$refs['migration_info'][$moveField], -$refs['migration_info']['rows'][$moveField]['other'], -$refs['migration_info']['rows'][$moveField]['main'])) { -unset($refs['fields_in_conflict'][$moveField]); -continue; - } - - if (substr($moveField, 0, 13) === 'move_location') { -if (!isset($refs['is_major_gift'])) { - $refs['is_major_gift'] = _wmf_civicrm_is_merged_contact_major_donor($mainId, $otherId); -} -if (!$refs['is_major_gift']) { - $fieldParts = explode('_', $moveField); - if ($fieldParts[2] == 'email') { -$mainIsOnHold = $refs['migration_info']['main_details']['location_blocks']['email'][$fieldParts[3]]['on_hold']; -$otherIsOnHold = $refs['migration_info']['other_details']['location_blocks']['email'][$fieldParts[3]]['on_hold']; -if ($mainIsOnHold + $otherIsOnHold === 1) { - // One is one hold & the other isn't - conflict. - continue; -} - } - unset($refs['fields_in_conflict'][$moveField]); -} - - } + _wmf_civicrm_merge_resolve_field_conflict($refs, $moveField, $mainId, $otherId); } } } @@ -2477,6 +2409,89 @@ } /** + * Resolve any resolvable field conflicts. + * + * @param array $refs + * @param string $moveField + * @param int $mainId + * Id of the main contact (the one to keep) + * @param int $otherId + * Id of the other contact (the one to delete) + */ +function _wmf_civicrm_merge_resolve_field_conflict(&$refs, $moveField, $mainId, $otherId) { + $dbFieldName = str_replace('move_', '', $moveField); + + if (_wmf_civicrm_merge_is_communication_boolean($moveField)) { +
[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Resolve conflicts on asymetrical whitespace when merging
Eileen has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/382109 ) Change subject: Resolve conflicts on asymetrical whitespace when merging .. Resolve conflicts on asymetrical whitespace when merging Bug: T175748 Change-Id: I73f6daf4649595f51a7c856356fdba7a788f7de6 --- M sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php M sites/all/modules/wmf_civicrm/wmf_civicrm.module 2 files changed, 21 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/09/382109/1 diff --git a/sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php b/sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php index 053beed..b751200 100644 --- a/sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php +++ b/sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php @@ -512,6 +512,20 @@ } /** + * Test that punctuation conflicts are ignored. + * + * Bug T175748 + */ + public function testBatchMergeResolvableConflictPunctuation() { +$this->breedDuck(array('id' => $this->contactID, 'first_name' => 'alter. ego')); +$this->breedDuck(array('id' => $this->contactID2, 'first_name' => 'alterego')); +$result = $this->callAPISuccess('Job', 'process_batch_merge', array('mode' => 'safe')); +$this->assertEquals(1, count($result['values']['merged'])); +$contact = $this->callAPISuccessGetSingle('Contact', array('email' => 'the_...@duckland.com')); +$this->assertEquals('alter. ego', $contact['first_name']); + } + + /** * Test that a conflict on casing in first names is handled. * * We do a best effort on this to get the more correct on assuming that 1 capital letter in a diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.module b/sites/all/modules/wmf_civicrm/wmf_civicrm.module index 303dc78..4d2c72a 100644 --- a/sites/all/modules/wmf_civicrm/wmf_civicrm.module +++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.module @@ -2632,9 +2632,14 @@ "\xE3\x80\x80", // Hex nbsp '/\xC2\xA0/', - ); - if (strtoupper(str_replace($whitespaceChars, '', $valueToKeep)) != strtoupper(str_replace($whitespaceChars, '', ($valueToOverwrite { + + // http://grammar.yourdictionary.com/punctuation/what/Fourteen-Punctuation-Marks.html + // but elipsis? really? + $punctuationChars = array('.', ':', ',', '&', ';', "'", '-', '_', '?', '(', ')', '!', '"'); + + $ignoreChars = array_merge($whitespaceChars, $punctuationChars); + if (strtoupper(str_replace($ignoreChars, '', $valueToKeep)) != strtoupper(str_replace($ignoreChars, '', ($valueToOverwrite { return FALSE; } -- To view, visit https://gerrit.wikimedia.org/r/382109 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I73f6daf4649595f51a7c856356fdba7a788f7de6 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: Eileen___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Resolve conflicts on asymetrical whitespace when merging
Eileen has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/382108 ) Change subject: Resolve conflicts on asymetrical whitespace when merging .. Resolve conflicts on asymetrical whitespace when merging Bug: T175746 Change-Id: I8b3711b0a5dfc2d477309e1d1b53faa8f2daac6c --- M sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php M sites/all/modules/wmf_civicrm/wmf_civicrm.module 2 files changed, 84 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/08/382108/1 diff --git a/sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php b/sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php index ee97a7e..a65b5c4 100644 --- a/sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php +++ b/sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php @@ -498,6 +498,22 @@ } /** + * Test that source conflicts are ignored. + * + * We don't care enough about source it seems to do much with it. + * + * Bug T146946 + */ + public function testBatchMergeResolvableConflictWhiteSpace() { +$this->breedDuck(array('id' => $this->contactID, 'first_name' => 'alter ego')); +$this->breedDuck(array('id' => $this->contactID2, 'first_name' => 'alterego')); +$result = $this->callAPISuccess('Job', 'process_batch_merge', array('mode' => 'safe')); +$this->assertEquals(1, count($result['values']['merged'])); +$contact = $this->callAPISuccessGetSingle('Contact', array('email' => 'the_...@duckland.com')); +$this->assertEquals('alter ego', $contact['first_name']); + } + + /** * Test that a conflict on casing in first names is handled. * * We do a best effort on this to get the more correct on assuming that 1 capital letter in a diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.module b/sites/all/modules/wmf_civicrm/wmf_civicrm.module index 3e121cf..303dc78 100644 --- a/sites/all/modules/wmf_civicrm/wmf_civicrm.module +++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.module @@ -2436,6 +2436,15 @@ continue; } + if (_wmf_civicrm_merge_resolve_uninformative_characters_conflict( +str_replace('move_', '', $moveField), +$refs['migration_info'][$moveField], +$refs['migration_info']['rows'][$moveField]['other'], +$refs['migration_info']['rows'][$moveField]['main'])) { +unset($refs['fields_in_conflict'][$moveField]); +continue; + } + if (substr($moveField, 0, 13) === 'move_location') { if (!isset($refs['is_major_gift'])) { $refs['is_major_gift'] = _wmf_civicrm_is_merged_contact_major_donor($mainId, $otherId); @@ -2583,6 +2592,65 @@ } /** + * Resolve conflicts that are only about diacritic vs english characters casing. + * + * If we have a conflict of 'Jose' vs 'José' chose the one with a diacritic character. + * + * If we find a match we need to alter the $moveFieldValue & $valueToKeep vars. + * That is not hugely logical but unfortunately the hook interaction has been organic + * and until we started using batch merge was not actually tested in core. + * + * @param string $fieldName + * @param string $moveFieldValue + * @param string $valueToKeep + * @param string $valueToOverwrite + * + * @return bool + */ +function _wmf_civicrm_merge_resolve_uninformative_characters_conflict($fieldName, &$moveFieldValue, &$valueToKeep, &$valueToOverwrite) { + $fieldsToResolve = array('last_name', 'first_name'); + if (!in_array(str_replace('move_', '', $fieldName), $fieldsToResolve)) { +return FALSE; + } + // Let's get rid of any preceding or trailing spaces. + $valueToKeep = trim($valueToKeep); + $valueToOverwrite = trim($valueToOverwrite); + $moveFieldValue = trim($moveFieldValue); + $whitespaceChars = array( +// Taken from trim spec +" ", +"\t", +"\n", +"\r", +"\0", +"\x0B", +// And lets add a couple more we are too familiar with +// We probably removed these from the name fields already but if we extend +// this to other fields they may not be clean. +"", +// ideographic space. +"\xE3\x80\x80", +// Hex nbsp +'/\xC2\xA0/', + + ); + if (strtoupper(str_replace($whitespaceChars, '', $valueToKeep)) != strtoupper(str_replace($whitespaceChars, '', ($valueToOverwrite { +return FALSE; + } + + if (strlen($valueToKeep) > strlen($valueToOverwrite)) { +// keep the one with more white space. +// hopefully we have cleaned up double whitespace so the extra space is helpful... +return TRUE; + } + // We have a conflict to resolve and we are going to resolve it by keeping + //the value that was to be overwritten. + $moveFieldValue = $valueToOverwrite; + $valueToKeep = $valueToOverwrite; + return TRUE; +} + +/** * Check for special
[MediaWiki-commits] [Gerrit] mediawiki...Cargo[master]: Slight ix for ea673c4fff3a
Yaron Koren has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/382107 ) Change subject: Slight ix for ea673c4fff3a .. Slight ix for ea673c4fff3a Change-Id: I722b3d2cd9a8694eae3ac7f467248ee63efc3227 --- M composer.json 1 file changed, 1 insertion(+), 2 deletions(-) Approvals: Yaron Koren: Looks good to me, approved jenkins-bot: Verified diff --git a/composer.json b/composer.json index 32f6e5e..4938a82 100644 --- a/composer.json +++ b/composer.json @@ -6,8 +6,7 @@ "homepage": "https://www.mediawiki.org/wiki/Extension:Cargo;, "license": "GPL-2.0+", "authors": [ - { "name": "Yaron Koren" }, - { "name": "paladox" } + { "name": "Yaron Koren" } ], "support": { "issues": "https://phabricator.wikimedia.org/tag/mediawiki-extensions-cargo/;, -- To view, visit https://gerrit.wikimedia.org/r/382107 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I722b3d2cd9a8694eae3ac7f467248ee63efc3227 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Cargo Gerrit-Branch: master Gerrit-Owner: Yaron KorenGerrit-Reviewer: Yaron Koren Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Cargo[master]: Slight ix for ea673c4fff3a
Yaron Koren has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/382107 ) Change subject: Slight ix for ea673c4fff3a .. Slight ix for ea673c4fff3a Change-Id: I722b3d2cd9a8694eae3ac7f467248ee63efc3227 --- M composer.json 1 file changed, 1 insertion(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Cargo refs/changes/07/382107/2 diff --git a/composer.json b/composer.json index 32f6e5e..4938a82 100644 --- a/composer.json +++ b/composer.json @@ -6,8 +6,7 @@ "homepage": "https://www.mediawiki.org/wiki/Extension:Cargo;, "license": "GPL-2.0+", "authors": [ - { "name": "Yaron Koren" }, - { "name": "paladox" } + { "name": "Yaron Koren" } ], "support": { "issues": "https://phabricator.wikimedia.org/tag/mediawiki-extensions-cargo/;, -- To view, visit https://gerrit.wikimedia.org/r/382107 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I722b3d2cd9a8694eae3ac7f467248ee63efc3227 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Cargo Gerrit-Branch: master Gerrit-Owner: Yaron Koren___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Remove attempt to set sort_name & display_name.
Eileen has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/382106 ) Change subject: Remove attempt to set sort_name & display_name. .. Remove attempt to set sort_name & display_name. On testing I found that what we were setting was being ignored (otherwise the cleanups would not have flowed through). I have done an upstream PR to address length handling in core https://github.com/civicrm/civicrm-core/pull/11063 I don't think it's pressing for us to address long_name handling (ie. we can suck that PR in now or wait for the next update) but removing these 2 lines gets rid of the misleading impression that they have an effect Change-Id: I0be0a8883e19378019adf29f9b4cb76add4e812e --- M sites/all/modules/wmf_civicrm/wmf_civicrm.module 1 file changed, 0 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/06/382106/1 diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.module b/sites/all/modules/wmf_civicrm/wmf_civicrm.module index cf79855..3e121cf 100644 --- a/sites/all/modules/wmf_civicrm/wmf_civicrm.module +++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.module @@ -1079,9 +1079,6 @@ $contact[$name] = wmf_civicrm_string_clean($msg[$name], 64); } } - // @todo this may not be needed as core may handle, but unsure how it handles over-long strings. - $contact['sort_name'] = substr(trim($msg['last_name'] . ', ' . $msg['first_name'], ' ,'), 0, 128); - $contact['display_name'] = substr($msg['first_name'] . ' ' . $msg['last_name'], 0, 128 ); } if ( strtolower( $msg['contact_type'] ) == "organization" ){ // @todo probably can remove handling for sort name and display name now. -- To view, visit https://gerrit.wikimedia.org/r/382106 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0be0a8883e19378019adf29f9b4cb76add4e812e Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: Eileen___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Merge "Support uploads with UTF-8 names on Windows"
MaxSem has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/382105 ) Change subject: Merge "Support uploads with UTF-8 names on Windows" .. Merge "Support uploads with UTF-8 names on Windows" Change-Id: I9754ae960d84eb34c5228913b13bd15ae25337dc --- M RELEASE-NOTES-1.30 M includes/shell/Command.php M includes/shell/Shell.php 3 files changed, 64 insertions(+), 25 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/05/382105/1 diff --git a/RELEASE-NOTES-1.30 b/RELEASE-NOTES-1.30 index 2090ce9..bec7b86 100644 --- a/RELEASE-NOTES-1.30 +++ b/RELEASE-NOTES-1.30 @@ -233,7 +233,10 @@ * DB_SLAVE is deprecated. DB_REPLICA should be used instead. * wfUsePHP() is deprecated. * wfFixSessionID() was removed. -* wfShellExec() and related functions are deprecated, use Shell::command(). +* wfShellExec() and related functions are deprecated, use Shell::command(). This also + slightly changes the behavior of how execution time limits are calculated when only + some of defaults are overridden per-call. When in doubt, always override both wall + clock and CPU time. * (T138166) SpecialEmailUser::getTarget() now requires a second argument, the sending user object. Using the method without the second argument is deprecated. * (T67297) Browsers that don't support Unicode will have their edits rejected. diff --git a/includes/shell/Command.php b/includes/shell/Command.php index 864e69a..fd8f6a0 100644 --- a/includes/shell/Command.php +++ b/includes/shell/Command.php @@ -24,6 +24,8 @@ use MediaWiki\ProcOpenError; use MediaWiki\ShellDisabledError; use Profiler; +use Psr\Log\LoggerAwareTrait; +use Psr\Log\NullLogger; /** * Class used for executing shell commands @@ -31,11 +33,22 @@ * @since 1.30 */ class Command { + use LoggerAwareTrait; + /** @var string */ private $command = ''; /** @var array */ - private $limits = []; + private $limits = [ + // seconds + 'time' => 180, + // seconds + 'walltime' => 180, + // KB + 'memory' => 307200, + // KB + 'filesize' => 102400, + ]; /** @var string[] */ private $env = []; @@ -49,13 +62,20 @@ /** @var bool */ private $everExecuted = false; + /** @var string|false */ + private $cGroup = false; + /** * Constructor. Don't call directly, instead use Shell::command() +* +* @throws ShellDisabledError */ public function __construct() { if ( Shell::isDisabled() ) { throw new ShellDisabledError(); } + + $this->setLogger( new NullLogger() ); } /** @@ -112,11 +132,10 @@ * Sets execution limits * * @param array $limits Optional array with limits(filesize, memory, time, walltime). -* This overrides the global wgMaxShell* limits. * @return $this */ public function limits( array $limits ) { - $this->limits = $limits; + $this->limits = $limits + $this->limits; return $this; } @@ -159,6 +178,18 @@ } /** +* Sets cgroup for this command +* +* @param string|false $cgroup +* @return $this +*/ + public function cgroup( $cgroup ) { + $this->cGroup = $cgroup; + + return $this; + } + + /** * Executes command. Afterwards, getExitCode() and getOutput() can be used to access execution * results. * @@ -168,8 +199,7 @@ * @throws ShellDisabledError */ public function execute() { - global $IP, $wgMaxShellMemory, $wgMaxShellFileSize, $wgMaxShellTime, - $wgMaxShellWallClockTime, $wgShellCgroup; + global $IP; $this->everExecuted = true; @@ -197,18 +227,12 @@ $useLogPipe = false; if ( is_executable( '/bin/bash' ) ) { - $time = intval( isset( $this->limits['time'] ) ? $this->limits['time'] : $wgMaxShellTime ); - if ( isset( $this->limits['walltime'] ) ) { - $wallTime = intval( $this->limits['walltime'] ); - } elseif ( isset( $this->limits['time'] ) ) { - $wallTime = $time; - } else { - $wallTime = intval( $wgMaxShellWallClockTime ); - } - $mem = intval( isset( $this->limits['memory'] ) ? $this->limits['memory'] : $wgMaxShellMemory ); - $filesize = intval( isset( $this->limits['filesize'] ) - ?
[MediaWiki-commits] [Gerrit] pywikibot/core[master]: [bugfix] Bugfixes for the conversion scripts/maintenance/com...
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/381961 ) Change subject: [bugfix] Bugfixes for the conversion scripts/maintenance/compat2core.py .. [bugfix] Bugfixes for the conversion scripts/maintenance/compat2core.py - remove complete version line - escape dot Change-Id: I49eabe00fd43461dbbb2297f7c6a88c624ef41ff --- M scripts/maintenance/compat2core.py 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Huji: Looks good to me, approved jenkins-bot: Verified Zoranzoki21: Looks good to me, but someone else must approve diff --git a/scripts/maintenance/compat2core.py b/scripts/maintenance/compat2core.py index 161baee..854d224 100755 --- a/scripts/maintenance/compat2core.py +++ b/scripts/maintenance/compat2core.py @@ -42,7 +42,7 @@ # be careful with replacement order! replacements = ( # doc strings -('#\r?\n__version__', +('#\r?\n__version__.*\r?\n', '#\n' '# Automatically ported from compat branch by compat2core.py script\n'), ('Pywikipedia bot team', 'Pywikibot team'), @@ -60,7 +60,7 @@ # site instance call (r'pywikibot\.getSite\s*\(\s*', 'pywikibot.Site('), # lang is different from code. We should use code in core -(r'([Ss])ite.lang(?:uage\(\))?', r'\1ite.code'), +(r'([Ss])ite\.lang(?:uage\(\))?', r'\1ite.code'), # change compat library classes to pywikibot intrinsic classes (r'catlib\.Category\s*\(\s*', 'pywikibot.Category('), (r'catlib\.change_category\s*\((\s*)(?P.+?),\s*(?P.+?),', -- To view, visit https://gerrit.wikimedia.org/r/381961 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I49eabe00fd43461dbbb2297f7c6a88c624ef41ff Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: XqtGerrit-Reviewer: Huji Gerrit-Reviewer: John Vandenberg Gerrit-Reviewer: Magul Gerrit-Reviewer: Zoranzoki21 Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Update OOjs UI to v0.23.3
VolkerE has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/382103 ) Change subject: Update OOjs UI to v0.23.3 .. Update OOjs UI to v0.23.3 Release notes: https://phabricator.wikimedia.org/diffusion/GOJU/browse/master/History.md;v0.23.3 Depends-on: Ica85dce164ab0ff269ca26ac078ea245219ad4c1 Change-Id: Ied8d6d6dfa9965912c17e0573fec33d2b67a5027 --- M composer.json M resources/lib/oojs-ui/i18n/fi.json M resources/lib/oojs-ui/i18n/hi.json M resources/lib/oojs-ui/i18n/sv.json M resources/lib/oojs-ui/oojs-ui-apex.js M resources/lib/oojs-ui/oojs-ui-core-apex.css M resources/lib/oojs-ui/oojs-ui-core-wikimediaui.css M resources/lib/oojs-ui/oojs-ui-core.js M resources/lib/oojs-ui/oojs-ui-core.js.map M resources/lib/oojs-ui/oojs-ui-toolbars-apex.css M resources/lib/oojs-ui/oojs-ui-toolbars-wikimediaui.css M resources/lib/oojs-ui/oojs-ui-toolbars.js M resources/lib/oojs-ui/oojs-ui-toolbars.js.map M resources/lib/oojs-ui/oojs-ui-widgets-apex.css M resources/lib/oojs-ui/oojs-ui-widgets-wikimediaui.css M resources/lib/oojs-ui/oojs-ui-widgets.js M resources/lib/oojs-ui/oojs-ui-widgets.js.map M resources/lib/oojs-ui/oojs-ui-wikimediaui.js M resources/lib/oojs-ui/oojs-ui-windows-apex.css M resources/lib/oojs-ui/oojs-ui-windows-wikimediaui.css M resources/lib/oojs-ui/oojs-ui-windows.js 21 files changed, 223 insertions(+), 248 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/03/382103/1 -- To view, visit https://gerrit.wikimedia.org/r/382103 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ied8d6d6dfa9965912c17e0573fec33d2b67a5027 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: VolkerE___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/vendor[master]: Update OOjs UI to v0.23.3
VolkerE has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/382102 ) Change subject: Update OOjs UI to v0.23.3 .. Update OOjs UI to v0.23.3 Release notes: https://phabricator.wikimedia.org/diffusion/GOJU/browse/master/History.md;v0.23.3 Change-Id: Ica85dce164ab0ff269ca26ac078ea245219ad4c1 --- M composer.json M composer.lock M composer/installed.json M oojs/oojs-ui/History.md M oojs/oojs-ui/demos/pages/toolbars.js M oojs/oojs-ui/demos/pages/widgets.js M oojs/oojs-ui/demos/pages/widgets.php M oojs/oojs-ui/i18n/fi.json M oojs/oojs-ui/i18n/hi.json M oojs/oojs-ui/i18n/sv.json M oojs/oojs-ui/package.json 11 files changed, 156 insertions(+), 124 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vendor refs/changes/02/382102/1 diff --git a/composer.json b/composer.json index f58e0f0..bbd968a 100644 --- a/composer.json +++ b/composer.json @@ -70,7 +70,7 @@ "monolog/monolog": "1.22.1", "mustangostang/spyc": "0.6.2", "nmred/kafka-php": "0.1.5", - "oojs/oojs-ui": "0.23.2", + "oojs/oojs-ui": "0.23.3", "oyejorge/less.php": "1.7.0.14", "pear/console_getopt": "1.4.1", "pear/mail": "1.4.1", diff --git a/composer.lock b/composer.lock index 8ea0339..c2d2989 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file;, "This file is @generated automatically" ], -"content-hash": "fe806e2069de5bc90c03b881702b01c5", +"content-hash": "0c594f60d3795a4d41a93290ac37015c", "packages": [ { "name": "composer/semver", @@ -540,16 +540,16 @@ }, { "name": "oojs/oojs-ui", -"version": "v0.23.2", +"version": "v0.23.3", "source": { "type": "git", "url": "https://github.com/wikimedia/oojs-ui.git;, -"reference": "60ea6e39e200f732448ecceb88c9922e69974dd4" +"reference": "072606c2676ba903b8b2439a03d4dae3e5fa2e01" }, "dist": { "type": "zip", -"url": "https://api.github.com/repos/wikimedia/oojs-ui/zipball/60ea6e39e200f732448ecceb88c9922e69974dd4;, -"reference": "60ea6e39e200f732448ecceb88c9922e69974dd4", +"url": "https://api.github.com/repos/wikimedia/oojs-ui/zipball/072606c2676ba903b8b2439a03d4dae3e5fa2e01;, +"reference": "072606c2676ba903b8b2439a03d4dae3e5fa2e01", "shasum": "" }, "require": { @@ -615,7 +615,7 @@ ], "description": "Provides library of common widgets, layouts, and windows.", "homepage": "https://www.mediawiki.org/wiki/OOjs_UI;, -"time": "2017-09-26T19:49:41+00:00" +"time": "2017-10-04T01:07:16+00:00" }, { "name": "oyejorge/less.php", diff --git a/composer/installed.json b/composer/installed.json index 859c5c9..7352bbd 100644 --- a/composer/installed.json +++ b/composer/installed.json @@ -2266,18 +2266,71 @@ "homepage": "https://www.mediawiki.org/wiki/RelPath; }, { -"name": "oojs/oojs-ui", -"version": "v0.23.2", -"version_normalized": "0.23.2.0", +"name": "ruflin/elastica", +"version": "5.3.0", +"version_normalized": "5.3.0.0", "source": { "type": "git", -"url": "https://github.com/wikimedia/oojs-ui.git;, -"reference": "60ea6e39e200f732448ecceb88c9922e69974dd4" +"url": "https://github.com/ruflin/Elastica.git;, +"reference": "tags/5.3.0" }, "dist": { "type": "zip", -"url": "https://api.github.com/repos/wikimedia/oojs-ui/zipball/60ea6e39e200f732448ecceb88c9922e69974dd4;, -"reference": "60ea6e39e200f732448ecceb88c9922e69974dd4", +"url": "https://github.com/ruflin/Elastica/archive/5.3.0.zip;, +"reference": "tags/5.3.0", +"shasum": null +}, +"require": { +"elasticsearch/elasticsearch": "5.3.0", +"php": ">=5.5.0" +}, +"type": "library", +"installation-source": "dist", +"autoload": { +"psr-4": { +"Elastica\\": "lib/Elastica/" +} +} +}, +{ +"name": "elasticsearch/elasticsearch", +"version": "5.3.0", +"version_normalized": "5.3.0.0", +"source": { +"type": "git", +"url": "https://github.com/elastic/elasticsearch-php.git;, +"reference": "tags/v5.3.0" +}, +"dist": { +"type": "zip", +"url":
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Update OOjs UI to v0.23.3
VolkerE has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/382101 ) Change subject: Update OOjs UI to v0.23.3 .. Update OOjs UI to v0.23.3 Release notes: https://phabricator.wikimedia.org/diffusion/GOJU/browse/master/History.md;v0.23.3 Change-Id: I117036a45fac006e5b872f9d308f2cc2e989e738 --- M lib/oojs-ui/i18n/fi.json M lib/oojs-ui/i18n/hi.json M lib/oojs-ui/i18n/sv.json M lib/oojs-ui/oojs-ui-apex-icons-accessibility.css M lib/oojs-ui/oojs-ui-apex-icons-accessibility.rtl.css M lib/oojs-ui/oojs-ui-apex-icons-alerts.css M lib/oojs-ui/oojs-ui-apex-icons-alerts.rtl.css M lib/oojs-ui/oojs-ui-apex-icons-content.css M lib/oojs-ui/oojs-ui-apex-icons-content.rtl.css M lib/oojs-ui/oojs-ui-apex-icons-editing-advanced.css M lib/oojs-ui/oojs-ui-apex-icons-editing-advanced.rtl.css M lib/oojs-ui/oojs-ui-apex-icons-editing-core.css M lib/oojs-ui/oojs-ui-apex-icons-editing-core.rtl.css M lib/oojs-ui/oojs-ui-apex-icons-editing-list.css M lib/oojs-ui/oojs-ui-apex-icons-editing-list.rtl.css M lib/oojs-ui/oojs-ui-apex-icons-editing-styling.css M lib/oojs-ui/oojs-ui-apex-icons-editing-styling.rtl.css M lib/oojs-ui/oojs-ui-apex-icons-interactions.css M lib/oojs-ui/oojs-ui-apex-icons-interactions.rtl.css M lib/oojs-ui/oojs-ui-apex-icons-layout.css M lib/oojs-ui/oojs-ui-apex-icons-layout.rtl.css M lib/oojs-ui/oojs-ui-apex-icons-media.css M lib/oojs-ui/oojs-ui-apex-icons-media.rtl.css M lib/oojs-ui/oojs-ui-apex-icons-moderation.css M lib/oojs-ui/oojs-ui-apex-icons-moderation.rtl.css M lib/oojs-ui/oojs-ui-apex-icons-movement.css M lib/oojs-ui/oojs-ui-apex-icons-movement.rtl.css M lib/oojs-ui/oojs-ui-apex-icons-user.css M lib/oojs-ui/oojs-ui-apex-icons-user.rtl.css M lib/oojs-ui/oojs-ui-apex.css M lib/oojs-ui/oojs-ui-apex.js M lib/oojs-ui/oojs-ui-apex.rtl.css M lib/oojs-ui/oojs-ui-core-apex.css M lib/oojs-ui/oojs-ui-core-apex.rtl.css M lib/oojs-ui/oojs-ui-core-mediawiki.css M lib/oojs-ui/oojs-ui-core-mediawiki.rtl.css M lib/oojs-ui/oojs-ui-core-wikimediaui.css M lib/oojs-ui/oojs-ui-core-wikimediaui.rtl.css M lib/oojs-ui/oojs-ui-core.js M lib/oojs-ui/oojs-ui-core.js.map M lib/oojs-ui/oojs-ui-images-apex.css M lib/oojs-ui/oojs-ui-images-apex.rtl.css M lib/oojs-ui/oojs-ui-images-wikimediaui.css M lib/oojs-ui/oojs-ui-images-wikimediaui.rtl.css M lib/oojs-ui/oojs-ui-mediawiki-icons-location.css M lib/oojs-ui/oojs-ui-mediawiki-icons-location.rtl.css M lib/oojs-ui/oojs-ui-mediawiki-icons-wikimedia.css M lib/oojs-ui/oojs-ui-mediawiki-icons-wikimedia.rtl.css M lib/oojs-ui/oojs-ui-mediawiki.css M lib/oojs-ui/oojs-ui-mediawiki.js M lib/oojs-ui/oojs-ui-mediawiki.rtl.css M lib/oojs-ui/oojs-ui-toolbars-apex.css M lib/oojs-ui/oojs-ui-toolbars-apex.rtl.css M lib/oojs-ui/oojs-ui-toolbars-mediawiki.css M lib/oojs-ui/oojs-ui-toolbars-mediawiki.rtl.css M lib/oojs-ui/oojs-ui-toolbars-wikimediaui.css M lib/oojs-ui/oojs-ui-toolbars-wikimediaui.rtl.css M lib/oojs-ui/oojs-ui-toolbars.js M lib/oojs-ui/oojs-ui-toolbars.js.map M lib/oojs-ui/oojs-ui-widgets-apex.css M lib/oojs-ui/oojs-ui-widgets-apex.rtl.css M lib/oojs-ui/oojs-ui-widgets-mediawiki.css M lib/oojs-ui/oojs-ui-widgets-mediawiki.rtl.css M lib/oojs-ui/oojs-ui-widgets-wikimediaui.css M lib/oojs-ui/oojs-ui-widgets-wikimediaui.rtl.css M lib/oojs-ui/oojs-ui-widgets.js M lib/oojs-ui/oojs-ui-widgets.js.map M lib/oojs-ui/oojs-ui-wikimediaui-icons-accessibility.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-accessibility.rtl.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-alerts.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-alerts.rtl.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-content.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-content.rtl.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-editing-advanced.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-editing-advanced.rtl.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-editing-core.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-editing-core.rtl.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-editing-list.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-editing-list.rtl.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-editing-styling.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-editing-styling.rtl.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-interactions.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-interactions.rtl.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-layout.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-layout.rtl.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-location.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-location.rtl.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-media.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-media.rtl.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-moderation.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-moderation.rtl.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-movement.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-movement.rtl.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-user.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-user.rtl.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-wikimedia.css
[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: Remove unstub logic
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/382082 ) Change subject: Remove unstub logic .. Remove unstub logic User objects haven't been stubbed in awhile, and language objects aren't being stubbed anymore. While we're here, swap a few MWException -> InvalidArgumentException since they're more accurate :) Change-Id: I7e2f2aa135b024fb653c3ec13181d7015383ff2f --- M includes/DiscussionParser.php M includes/model/Event.php M includes/model/Notification.php 3 files changed, 8 insertions(+), 14 deletions(-) Approvals: MaxSem: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/DiscussionParser.php b/includes/DiscussionParser.php index 3bc4826..2bc5e9d 100644 --- a/includes/DiscussionParser.php +++ b/includes/DiscussionParser.php @@ -105,11 +105,8 @@ * @param Title $title */ public static function detectSectionTitleAndText( array $interpretation, Title $title = null ) { - global $wgLang; $header = $snippet = ''; $found = false; - - StubObject::unstub( $wgLang ); foreach ( $interpretation as $action ) { switch ( $action['type'] ) { @@ -117,7 +114,7 @@ $header = self::extractHeader( $action['full-section'] ); $snippet = self::getTextSnippet( self::stripSignature( self::stripHeader( $action['content'] ), $title ), - $wgLang, + RequestContext::getMain()->getLanguage(), 150, $title ); break; @@ -125,7 +122,7 @@ $header = self::extractHeader( $action['content'] ); $snippet = self::getTextSnippet( self::stripSignature( self::stripHeader( $action['content'] ), $title ), - $wgLang, + RequestContext::getMain()->getLanguage(), 150, $title ); break; diff --git a/includes/model/Event.php b/includes/model/Event.php index ecc0941..a13ba25 100644 --- a/includes/model/Event.php +++ b/includes/model/Event.php @@ -145,16 +145,13 @@ if ( $obj->title ) { if ( !$obj->title instanceof Title ) { - throw new MWException( 'Invalid title parameter' ); + throw new InvalidArgumentException( 'Invalid title parameter' ); } $obj->setTitle( $obj->title ); } - if ( $obj->agent && ! - ( $obj->agent instanceof User || - $obj->agent instanceof StubObject ) - ) { - throw new MWException( "Invalid user parameter" ); + if ( $obj->agent && ! $obj->agent instanceof User ) { + throw new InvalidArgumentException( "Invalid user parameter" ); } if ( !Hooks::run( 'BeforeEchoEventInsert', [ $obj ] ) ) { diff --git a/includes/model/Notification.php b/includes/model/Notification.php index 4c5f338..02dee92 100644 --- a/includes/model/Notification.php +++ b/includes/model/Notification.php @@ -80,12 +80,12 @@ } } - if ( !$obj->user instanceof User && !$obj->user instanceof StubObject ) { - throw new MWException( 'Invalid user parameter, expected: User/StubObject object' ); + if ( !$obj->user instanceof User ) { + throw new InvalidArgumentException( 'Invalid user parameter, expected: User object' ); } if ( !$obj->event instanceof EchoEvent ) { - throw new MWException( 'Invalid event parameter, expected: EchoEvent object' ); + throw new InvalidArgumentException( 'Invalid event parameter, expected: EchoEvent object' ); } // Notification timestamp should be the same as event timestamp -- To view, visit https://gerrit.wikimedia.org/r/382082 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7e2f2aa135b024fb653c3ec13181d7015383ff2f Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: ChadGerrit-Reviewer:
[MediaWiki-commits] [Gerrit] oojs/ui[master]: Tag v0.23.3
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/382100 ) Change subject: Tag v0.23.3 .. Tag v0.23.3 Change-Id: Idcee29933835b2e30d821cdcbf285cde3c5ec2bf --- M History.md M package.json 2 files changed, 22 insertions(+), 1 deletion(-) Approvals: jenkins-bot: Verified Jforrester: Looks good to me, approved diff --git a/History.md b/History.md index cc89b95..b573add 100644 --- a/History.md +++ b/History.md @@ -1,4 +1,25 @@ # OOjs UI Release History +## v0.23.3 / 2017-10-03 +### Styles +* PopupToolGroup: Move accelerator keys `padding` to themes (Volker E.) +* WikimediaUI theme: Align PopupToolGroup header styles (Volker E.) +* WikimediaUI theme: Fix border on narrow bottom toolbars (Volker E.) +* WikimediaUI theme: Fix flagged elements' icon `opacity` (Volker E.) +* WikimediaUI theme: Improve PopupToolGroup's indicator vertical alignment (Volker E.) +* WikimediaUI theme: Make toolbar active element highlights visually equal (Volker E.) +* WikimediaUI theme: Remove `box-shadow` not in design (Volker E.) +* WikimediaUI theme: Replace BookletLayout menu `border-color` (Volker E.) +* WikimediaUI theme: Unify positioning and sizing of tools, toolgroups and menus (Volker E.) +* WindowManager: Remove `overflow: hidden` to enhance styling flexibility (Volker E.) + +### Code +* Follow-up I576f3175: highlightQuery: Handle case when query is not found (Ed Sanders) +* IndexLayout, BookletLayout: Don't scroll panels if not scrollable (Bartosz Dziewoński) +* LabelElement: Add tests for setHighlightedQuery (Ed Sanders) +* SelectWidget: Allow focussing things inside OptionWidget labels (Bartosz Dziewoński) +* WikimediaUI theme: Simplify action toolbar buttons selectors (Volker E.) +* demos: Remove unnecessary button demo widgets (Volker E.) + ## v0.23.2 / 2017-09-26 ### Deprecations * [DEPRECATING CHANGE]: Apex theme: Begin killing `constructive` flag (James D. Forrester) diff --git a/package.json b/package.json index 02dbb25..ecf2413 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "oojs-ui", - "version": "0.23.2", + "version": "0.23.3", "description": "User interface classes built on the OOjs framework.", "keywords": [ "oojs-plugin", -- To view, visit https://gerrit.wikimedia.org/r/382100 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idcee29933835b2e30d821cdcbf285cde3c5ec2bf Gerrit-PatchSet: 1 Gerrit-Project: oojs/ui Gerrit-Branch: master Gerrit-Owner: VolkerEGerrit-Reviewer: Jforrester Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] oojs/ui[master]: Tag v0.23.3
VolkerE has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/382100 ) Change subject: Tag v0.23.3 .. Tag v0.23.3 Change-Id: Idcee29933835b2e30d821cdcbf285cde3c5ec2bf --- M History.md M package.json 2 files changed, 22 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/00/382100/1 diff --git a/History.md b/History.md index cc89b95..b573add 100644 --- a/History.md +++ b/History.md @@ -1,4 +1,25 @@ # OOjs UI Release History +## v0.23.3 / 2017-10-03 +### Styles +* PopupToolGroup: Move accelerator keys `padding` to themes (Volker E.) +* WikimediaUI theme: Align PopupToolGroup header styles (Volker E.) +* WikimediaUI theme: Fix border on narrow bottom toolbars (Volker E.) +* WikimediaUI theme: Fix flagged elements' icon `opacity` (Volker E.) +* WikimediaUI theme: Improve PopupToolGroup's indicator vertical alignment (Volker E.) +* WikimediaUI theme: Make toolbar active element highlights visually equal (Volker E.) +* WikimediaUI theme: Remove `box-shadow` not in design (Volker E.) +* WikimediaUI theme: Replace BookletLayout menu `border-color` (Volker E.) +* WikimediaUI theme: Unify positioning and sizing of tools, toolgroups and menus (Volker E.) +* WindowManager: Remove `overflow: hidden` to enhance styling flexibility (Volker E.) + +### Code +* Follow-up I576f3175: highlightQuery: Handle case when query is not found (Ed Sanders) +* IndexLayout, BookletLayout: Don't scroll panels if not scrollable (Bartosz Dziewoński) +* LabelElement: Add tests for setHighlightedQuery (Ed Sanders) +* SelectWidget: Allow focussing things inside OptionWidget labels (Bartosz Dziewoński) +* WikimediaUI theme: Simplify action toolbar buttons selectors (Volker E.) +* demos: Remove unnecessary button demo widgets (Volker E.) + ## v0.23.2 / 2017-09-26 ### Deprecations * [DEPRECATING CHANGE]: Apex theme: Begin killing `constructive` flag (James D. Forrester) diff --git a/package.json b/package.json index 02dbb25..ecf2413 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "oojs-ui", - "version": "0.23.2", + "version": "0.23.3", "description": "User interface classes built on the OOjs framework.", "keywords": [ "oojs-plugin", -- To view, visit https://gerrit.wikimedia.org/r/382100 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idcee29933835b2e30d821cdcbf285cde3c5ec2bf Gerrit-PatchSet: 1 Gerrit-Project: oojs/ui Gerrit-Branch: master Gerrit-Owner: VolkerE___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] oojs/ui[master]: WikimediaUI theme: Improve PopupToolGroup's indicator vertic...
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/382099 ) Change subject: WikimediaUI theme: Improve PopupToolGroup's indicator vertical alignment .. WikimediaUI theme: Improve PopupToolGroup's indicator vertical alignment Inserting a magic number as we need to touch `background-position` over icon in SVG canvas for consistency elsewhere. `52%` is pushing it one pixel down in Chrome and IE, but just subpixels in Firefox resulting in best cross-browser vertical alignment. Change-Id: Ic586b840dc525c85407edd7b5e2f0aed02b85861 --- M src/themes/wikimediaui/tools.less 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: jenkins-bot: Verified Jforrester: Looks good to me, approved diff --git a/src/themes/wikimediaui/tools.less b/src/themes/wikimediaui/tools.less index ad8bd23..3480665 100644 --- a/src/themes/wikimediaui/tools.less +++ b/src/themes/wikimediaui/tools.less @@ -296,6 +296,8 @@ } .oo-ui-indicatorElement-indicator { + // HACK: Magic number for cross-browser positioning closer to label baseline + background-position: center 52%; right: @start-tool-icon-indicator; .oo-ui-toolbar-narrow & { -- To view, visit https://gerrit.wikimedia.org/r/382099 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic586b840dc525c85407edd7b5e2f0aed02b85861 Gerrit-PatchSet: 1 Gerrit-Project: oojs/ui Gerrit-Branch: master Gerrit-Owner: VolkerEGerrit-Reviewer: Jforrester Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] oojs/ui[master]: WikimediaUI theme: Improve PopupToolGroup's indicator vertic...
VolkerE has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/382099 ) Change subject: WikimediaUI theme: Improve PopupToolGroup's indicator vertical alignment .. WikimediaUI theme: Improve PopupToolGroup's indicator vertical alignment Inserting a magic number as we need to touch `background-position` over icon in SVG canvas for consistency elsewhere. `52%` is pushing it one pixel down in Chrome and IE, but just subpixels in Firefox resulting in best cross-browser vertical alignment. Change-Id: Ic586b840dc525c85407edd7b5e2f0aed02b85861 --- M src/themes/wikimediaui/tools.less 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/99/382099/1 diff --git a/src/themes/wikimediaui/tools.less b/src/themes/wikimediaui/tools.less index ad8bd23..3480665 100644 --- a/src/themes/wikimediaui/tools.less +++ b/src/themes/wikimediaui/tools.less @@ -296,6 +296,8 @@ } .oo-ui-indicatorElement-indicator { + // HACK: Magic number for cross-browser positioning closer to label baseline + background-position: center 52%; right: @start-tool-icon-indicator; .oo-ui-toolbar-narrow & { -- To view, visit https://gerrit.wikimedia.org/r/382099 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic586b840dc525c85407edd7b5e2f0aed02b85861 Gerrit-PatchSet: 1 Gerrit-Project: oojs/ui Gerrit-Branch: master Gerrit-Owner: VolkerE___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...civicrm[master]: CRM-21224 get LIMIT out of the where string.
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/381922 ) Change subject: CRM-21224 get LIMIT out of the where string. .. CRM-21224 get LIMIT out of the where string. This one is just a clean up. It's also in https://github.com/civicrm/civicrm-core/pull/11030/commits and we could justify leaving it for now. However, it might make sense to keep in sync Change-Id: Ic9436ba59dfd95948e1edba35221c386c1599086 --- M CRM/Dedupe/Merger.php 1 file changed, 16 insertions(+), 18 deletions(-) Approvals: Mepps: Looks good to me, approved jenkins-bot: Verified diff --git a/CRM/Dedupe/Merger.php b/CRM/Dedupe/Merger.php index 13d37bc..c249e28 100644 --- a/CRM/Dedupe/Merger.php +++ b/CRM/Dedupe/Merger.php @@ -602,6 +602,7 @@ */ public static function batchMerge($rgid, $gid = NULL, $mode = 'safe', $batchLimit = 1, $isSelected = 2, $criteria = array(), $checkPermissions = TRUE) { $redirectForPerformance = ($batchLimit > 1) ? TRUE : FALSE; +$isProcessUntilAllProcessed = !$redirectForPerformance; $reloadCacheIfEmpty = (!$redirectForPerformance && $isSelected == 2); $dupePairs = self::getDuplicatePairs($rgid, $gid, $reloadCacheIfEmpty, $batchLimit, $isSelected, '', ($mode == 'aggressive'), $criteria, $checkPermissions); @@ -610,9 +611,9 @@ // @todo stop passing these parameters in & instead calculate them in the merge function based // on the 'real' params like $isRespectExclusions $batchLimit and $isSelected. 'join' => self::getJoinOnDedupeTable(), - 'where' => self::getWhereString($batchLimit, $isSelected), + 'where' => self::getWhereString($isSelected), ); -return CRM_Dedupe_Merger::merge($dupePairs, $cacheParams, $mode, $redirectForPerformance, $checkPermissions); +return CRM_Dedupe_Merger::merge($dupePairs, $cacheParams, $mode, $isProcessUntilAllProcessed, $checkPermissions, $batchLimit); } /** @@ -633,20 +634,14 @@ /** * Get where string for dedupe join. * - * @param int $batchLimit * @param bool $isSelected * * @return string */ - protected static function getWhereString($batchLimit, $isSelected) { + protected static function getWhereString($isSelected) { $where = "de.id IS NULL"; if ($isSelected === 0 || $isSelected === 1) { $where .= " AND pn.is_selected = {$isSelected}"; -} -// else consider all dupe pairs -// @todo Adding limit to Where??!! -if ($batchLimit) { - $where .= " LIMIT {$batchLimit}"; } return $where; } @@ -749,16 +744,19 @@ * A 'safe' value skips the merge if there are any un-resolved conflicts. * Does a force merge otherwise (aggressive mode). * - * @param bool $redirectForPerformance - * Redirect to a url for batch processing. + * @param bool $isProcessUntilAllProcessed + * Iterate through the cache until all matches for the cache string are processed? * * @param bool $checkPermissions * Respect logged in user permissions. * + * @param int $batchLimit + * Number of rows to merge in each batch. One or more will be processed depending on + * $isProcessUntilAllProcessed + * * @return array|bool */ - public static function merge($dupePairs = array(), $cacheParams = array(), $mode = 'safe', - $redirectForPerformance = FALSE, $checkPermissions = TRUE + public static function merge($dupePairs = array(), $cacheParams = array(), $mode = 'safe', $isProcessUntilAllProcessed = TRUE, $checkPermissions = TRUE, $batchLimit = 0 ) { $cacheKeyString = CRM_Utils_Array::value('cache_key_string', $cacheParams); $resultStats = array('merged' => array(), 'skipped' => array()); @@ -792,14 +790,14 @@ self::dedupePair($rowsElementsAndInfo['migration_info'], $resultStats, $deletedContacts, $mode, $checkPermissions, $mainId, $otherId, $cacheKeyString); } - if ($cacheKeyString && !$redirectForPerformance) { + if ($cacheKeyString && $isProcessUntilAllProcessed) { // retrieve next pair of dupes // @todo call getDuplicatePairs. $dupePairs = CRM_Core_BAO_PrevNextCache::retrieve($cacheKeyString, $cacheParams['join'], $cacheParams['where'], 0, - 0, + $batchLimit, array(), '', FALSE @@ -1895,16 +1893,16 @@ *Array of matches meeting the criteria. */ public static function getDuplicatePairs($rule_group_id, $group_id, $reloadCacheIfEmpty, $batchLimit, $isSelected, $orderByClause = '', $includeConflicts = TRUE, $criteria = array(), $checkPermissions = TRUE, $searchLimit = 0) { -$where = self::getWhereString($batchLimit, $isSelected); +$where = self::getWhereString($isSelected); $cacheKeyString = self::getMergeCacheKeyString($rule_group_id,
[MediaWiki-commits] [Gerrit] wikimedia...civicrm[master]: CRM--21248 Fix merge screen conflict listing
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/381921 ) Change subject: CRM--21248 Fix merge screen conflict listing .. CRM--21248 Fix merge screen conflict listing Bug: T176256 (a bit tangental but experienced while investigating). Adding to https://github.com/civicrm/civicrm-core/pull/11030 Change-Id: If606536337746fd12e16a9a38ca16275e6757f9c --- M CRM/Contact/Page/DedupeFind.php M CRM/Contact/Page/DedupeMerge.php 2 files changed, 5 insertions(+), 7 deletions(-) Approvals: Mepps: Looks good to me, approved jenkins-bot: Verified diff --git a/CRM/Contact/Page/DedupeFind.php b/CRM/Contact/Page/DedupeFind.php index 41fa2ea..db1d263 100644 --- a/CRM/Contact/Page/DedupeFind.php +++ b/CRM/Contact/Page/DedupeFind.php @@ -64,6 +64,7 @@ $rgid = CRM_Utils_Request::retrieve('rgid', 'Positive', $this); $cid = CRM_Utils_Request::retrieve('cid', 'Positive', $this, FALSE, 0); $criteria = CRM_Utils_Request::retrieve('criteria', 'String', $this, FALSE, '{}'); +$isSelected = CRM_Utils_Request::retrieve('is_selected', 'Int', $this, FALSE, 2); $this->assign('criteria', $criteria); $isConflictMode = ($context == 'conflicts'); @@ -141,9 +142,6 @@ $this->action = CRM_Core_Action::UPDATE; $urlQry['snippet'] = 4; - if ($isConflictMode) { -$urlQry['selected'] = 1; - } $this->assign('sourceUrl', CRM_Utils_System::url('civicrm/ajax/dedupefind', $urlQry, FALSE, NULL, FALSE)); @@ -157,7 +155,7 @@ CRM_Dedupe_Merger::resetMergeStats($cacheKeyString); } - $this->_mainContacts = CRM_Dedupe_Merger::getDuplicatePairs($rgid, $gid, !$isConflictMode, 0, $isConflictMode, '', $isConflictMode, $criteria, TRUE, $limit); + $this->_mainContacts = CRM_Dedupe_Merger::getDuplicatePairs($rgid, $gid, !$isConflictMode, 0, $isSelected, '', $isConflictMode, $criteria, TRUE, $limit); if (empty($this->_mainContacts)) { if ($isConflictMode) { diff --git a/CRM/Contact/Page/DedupeMerge.php b/CRM/Contact/Page/DedupeMerge.php index da12d9b..4d26b1d 100644 --- a/CRM/Contact/Page/DedupeMerge.php +++ b/CRM/Contact/Page/DedupeMerge.php @@ -88,11 +88,11 @@ $where = NULL; if ($action == CRM_Core_Action::MAP) { $where = "pn.is_selected = 1"; - $isSelected = 1; + $urlQry['is_selected'] = 1; } else { // else merge all (2) - $isSelected = 2; + $urlQry['is_selected'] = 2; } $total = CRM_Core_BAO_PrevNextCache::getCount($cacheKeyString, NULL, $where); @@ -107,7 +107,7 @@ for ($i = 1; $i <= ceil($total / self::BATCHLIMIT); $i++) { $task = new CRM_Queue_Task( array('CRM_Contact_Page_DedupeMerge', 'callBatchMerge'), -array($rgid, $gid, $mode, self::BATCHLIMIT, $isSelected), +array($rgid, $gid, $mode, self::BATCHLIMIT, $urlQry['is_selected']), "Processed " . $i * self::BATCHLIMIT . " pair of duplicates out of " . $total ); -- To view, visit https://gerrit.wikimedia.org/r/381921 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If606536337746fd12e16a9a38ca16275e6757f9c Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm/civicrm Gerrit-Branch: master Gerrit-Owner: EileenGerrit-Reviewer: Ejegg Gerrit-Reviewer: Mepps Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...civicrm[master]: CRM-21202, set retrieve = true so that its not reinitialized...
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/381912 ) Change subject: CRM-21202, set retrieve = true so that its not reinitialized again and just want the DataTable instance to be returned .. CRM-21202, set retrieve = true so that its not reinitialized again and just want the DataTable instance to be returned Pulled from upstream, observed when working on dedupe bug: Bug: T176256 * CRM-21202: DataTables warning: table id=dupePairs https://issues.civicrm.org/jira/browse/CRM-21202 Change-Id: I84dcc2c839f909a94fc9f2ae007390e0189ae872 --- M templates/CRM/Contact/Page/DedupeFind.tpl 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Mepps: Looks good to me, approved jenkins-bot: Verified diff --git a/templates/CRM/Contact/Page/DedupeFind.tpl b/templates/CRM/Contact/Page/DedupeFind.tpl index f518420..df90aa0 100644 --- a/templates/CRM/Contact/Page/DedupeFind.tpl +++ b/templates/CRM/Contact/Page/DedupeFind.tpl @@ -180,6 +180,7 @@ "ajax": { "url": {/literal}'{$sourceUrl}'{literal} }, + "retrieve": true, rowCallback: function (row, data) { // Set the checked state of the checkbox in the table $('input.crm-dedupe-select', row).prop('checked', data.is_selected == 1); -- To view, visit https://gerrit.wikimedia.org/r/381912 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I84dcc2c839f909a94fc9f2ae007390e0189ae872 Gerrit-PatchSet: 2 Gerrit-Project: wikimedia/fundraising/crm/civicrm Gerrit-Branch: master Gerrit-Owner: EileenGerrit-Reviewer: Ejegg Gerrit-Reviewer: Mepps Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...civicrm[master]: Fix UI batch merge mishandling context paramter.
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/381920 ) Change subject: Fix UI batch merge mishandling context paramter. .. Fix UI batch merge mishandling context paramter. This has been added to upstream pr https://github.com/civicrm/civicrm-core/pull/11030/files#diff-55c4322ff620a36ba6af19fb5757721cR110 Bug: T176256 Change-Id: I9ef92d9fd2d2de84cb58abf5bcf561838dce818a --- M CRM/Contact/Page/DedupeMerge.php 1 file changed, 2 insertions(+), 3 deletions(-) Approvals: Mepps: Looks good to me, approved jenkins-bot: Verified diff --git a/CRM/Contact/Page/DedupeMerge.php b/CRM/Contact/Page/DedupeMerge.php index 1c95481..da12d9b 100644 --- a/CRM/Contact/Page/DedupeMerge.php +++ b/CRM/Contact/Page/DedupeMerge.php @@ -72,8 +72,7 @@ 'criteria' => $criteria, ); -$criteria = json_decode($criteria, TRUE); -$cacheKeyString = CRM_Dedupe_Merger::getMergeCacheKeyString($rgid, $gid, $criteria); +$cacheKeyString = CRM_Dedupe_Merger::getMergeCacheKeyString($rgid, $gid, json_decode($criteria, TRUE)); if ($mode == 'aggressive' && !CRM_Core_Permission::check('force merge duplicate contacts')) { CRM_Core_Session::setStatus(ts('You do not have permission to force merge duplicate contact records'), ts('Permission Denied'), 'error'); @@ -117,7 +116,7 @@ } // Setup the Runner -$urlQry .= "=conflicts"; +$urlQry['context'] = "conflicts"; $runner = new CRM_Queue_Runner(array( 'title' => ts('Merging Duplicates..'), 'queue' => $queue, -- To view, visit https://gerrit.wikimedia.org/r/381920 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9ef92d9fd2d2de84cb58abf5bcf561838dce818a Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm/civicrm Gerrit-Branch: master Gerrit-Owner: EileenGerrit-Reviewer: Eileen Gerrit-Reviewer: Ejegg Gerrit-Reviewer: Mepps Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] oojs/ui[master]: WikimediaUI theme: Fix flagged elements' icon `opacity`
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/382077 ) Change subject: WikimediaUI theme: Fix flagged elements' icon `opacity` .. WikimediaUI theme: Fix flagged elements' icon `opacity` Flagged elements' icon `opacity` should remain `1` to be aligned to label color. Change-Id: Idd650b52ebe4ff8f322c2b0935542b9e875542df --- M src/themes/wikimediaui/tools.less 1 file changed, 23 insertions(+), 8 deletions(-) Approvals: jenkins-bot: Verified Jforrester: Looks good to me, approved diff --git a/src/themes/wikimediaui/tools.less b/src/themes/wikimediaui/tools.less index b0ddfff..8791af1 100644 --- a/src/themes/wikimediaui/tools.less +++ b/src/themes/wikimediaui/tools.less @@ -120,6 +120,12 @@ opacity: @opacity-base; } } + + &[class*='oo-ui-flaggedElement'] { + .oo-ui-iconElement-icon { + opacity: @opacity-base; + } + } } &.oo-ui-widget-disabled .oo-ui-iconElement-icon { @@ -388,14 +394,6 @@ box-shadow @transition-ease-quick ); - // We don't generalize this further, as only PopupToolGroup carries them, - // all other ToolGroups own Tools, which come with their own icon rules - .oo-ui-iconElement-icon, - .oo-ui-indicatorElement-indicator { - opacity: @opacity-icon-base; - .oo-ui-transition( opacity @transition-ease-quick ); - } - &:hover { background-color: @background-color-tool--hover; } @@ -404,6 +402,14 @@ background-color: @background-color-tool--active; } + // We don't generalize this further, as only PopupToolGroup carries them, + // all other ToolGroups own Tools, which come with their own icon rules + .oo-ui-iconElement-icon, + .oo-ui-indicatorElement-indicator { + opacity: @opacity-icon-base; + .oo-ui-transition( opacity @transition-ease-quick ); + } + &:hover, &:active { .oo-ui-iconElement-icon, @@ -412,6 +418,15 @@ } } } + + &[class*='oo-ui-flaggedElement'] > .oo-ui-popupToolGroup-handle { + &, + &:hover { + .oo-ui-iconElement-icon { + opacity: @opacity-icon-base--selected; + } + } + } } &.oo-ui-popupToolGroup-active { -- To view, visit https://gerrit.wikimedia.org/r/382077 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idd650b52ebe4ff8f322c2b0935542b9e875542df Gerrit-PatchSet: 1 Gerrit-Project: oojs/ui Gerrit-Branch: master Gerrit-Owner: VolkerEGerrit-Reviewer: Bartosz Dziewoński Gerrit-Reviewer: Esanders Gerrit-Reviewer: Jforrester Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] oojs/ui[master]: PopupToolGroup: Move accelerator keys `padding` to themes
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/382090 ) Change subject: PopupToolGroup: Move accelerator keys `padding` to themes .. PopupToolGroup: Move accelerator keys `padding` to themes Moving accelerator keys `padding` rule to themes and slightly minimize in WikimediaUI theme. Change-Id: I7967180f974a33a66a2bf2d87ef9d0b8363008b5 --- M src/styles/toolgroups/PopupToolGroup.less M src/themes/apex/tools.less M src/themes/wikimediaui/tools.less 3 files changed, 11 insertions(+), 5 deletions(-) Approvals: jenkins-bot: Verified Jforrester: Looks good to me, approved diff --git a/src/styles/toolgroups/PopupToolGroup.less b/src/styles/toolgroups/PopupToolGroup.less index 0cd6563..50b094e 100644 --- a/src/styles/toolgroups/PopupToolGroup.less +++ b/src/styles/toolgroups/PopupToolGroup.less @@ -56,11 +56,6 @@ .oo-ui-tool-accel { text-align: right; } - - .oo-ui-tool-accel:not( :empty ) { - // Push away from tool's title - padding-left: 3em; - } } .theme-oo-ui-popupToolGroup(); diff --git a/src/themes/apex/tools.less b/src/themes/apex/tools.less index c61581b..312165b 100644 --- a/src/themes/apex/tools.less +++ b/src/themes/apex/tools.less @@ -507,6 +507,12 @@ .oo-ui-tool-accel { color: @color-base--subtle; + + &:not( :empty ) { + // Push away from tool's title + padding-left: 3em; + } } + } } diff --git a/src/themes/wikimediaui/tools.less b/src/themes/wikimediaui/tools.less index 980a941..13ba4bd 100644 --- a/src/themes/wikimediaui/tools.less +++ b/src/themes/wikimediaui/tools.less @@ -378,6 +378,11 @@ .oo-ui-tool-accel { color: @color-base--subtle; line-height: @line-height-widget-singleline; + + &:not( :empty ) { + // Push away from tool's title + padding-left: @padding-horizontal-base * 1.5; + } } } -- To view, visit https://gerrit.wikimedia.org/r/382090 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7967180f974a33a66a2bf2d87ef9d0b8363008b5 Gerrit-PatchSet: 1 Gerrit-Project: oojs/ui Gerrit-Branch: master Gerrit-Owner: VolkerEGerrit-Reviewer: Esanders Gerrit-Reviewer: Jforrester Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] oojs/ui[master]: WikimediaUI theme: Make toolbar active element highlights vi...
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/381946 ) Change subject: WikimediaUI theme: Make toolbar active element highlights visually equal .. WikimediaUI theme: Make toolbar active element highlights visually equal Highlighting active Tool and ToolGroup elements visually equal – same `background-color` and flagged icon. Also removing unnecessary flagged button mixins, as they are misplaced and have never been in use with PopupToolGroup, reducing significant amount of output CSS. Bug: T177278 Change-Id: I3b84cae5f865a03b23446e8f35871c4d592a8846 --- M src/themes/wikimediaui/tools.less M src/toolgroups/PopupToolGroup.js 2 files changed, 15 insertions(+), 16 deletions(-) Approvals: jenkins-bot: Verified Jforrester: Looks good to me, approved diff --git a/src/themes/wikimediaui/tools.less b/src/themes/wikimediaui/tools.less index 980a941..b0ddfff 100644 --- a/src/themes/wikimediaui/tools.less +++ b/src/themes/wikimediaui/tools.less @@ -157,7 +157,7 @@ } &.oo-ui-widget-enabled { - > .oo-ui-toolGroup-tools > .oo-ui-tool { + > .oo-ui-toolGroup-tools > .oo-ui-tool:not( .oo-ui-toolGroupTool ) { &.oo-ui-widget-enabled { &:hover { background-color: @background-color-tool--hover; @@ -169,7 +169,7 @@ } } - &.oo-ui-widget-enabled.oo-ui-tool-active { + &.oo-ui-tool-active { background-color: @background-color-tool--active; &:hover { @@ -382,14 +382,6 @@ } &.oo-ui-widget-enabled { - &.oo-ui-popupToolGroup-active { - background-color: @background-color-tool--hover; - - .oo-ui-tool-active.oo-ui-widget-enabled .oo-ui-tool-link .oo-ui-tool-title { - color: @color-progressive; - } - } - > .oo-ui-popupToolGroup-handle { .oo-ui-transition( background-color @transition-ease-quick, @@ -422,14 +414,19 @@ } } - &.oo-ui-flaggedElement { - &-progressive, - &-constructive { // `constructive` got deprecated in 0.16.1, see T110555 - .mw-framed-primary-button-colored( ~'.oo-ui-popupToolGroup-handle', @color-progressive, @color-progressive--hover, @color-progressive--active, @color-progressive--focus ); + &.oo-ui-popupToolGroup-active { + > .oo-ui-popupToolGroup-handle { + background-color: @background-color-tool--active; + color: @color-tool--active; + + &:hover { + background-color: @background-color-tool--active-hover; + color: @color-tool--active; + } } - &-destructive { - .mw-framed-primary-button-colored( ~'.oo-ui-popupToolGroup-handle', @color-destructive, @color-destructive--hover, @color-destructive--active, @color-destructive--focus ); + .oo-ui-tool-active.oo-ui-widget-enabled .oo-ui-tool-link .oo-ui-tool-title { + color: @color-tool--active; } } } diff --git a/src/toolgroups/PopupToolGroup.js b/src/toolgroups/PopupToolGroup.js index 6691dc5..50abd2f 100644 --- a/src/toolgroups/PopupToolGroup.js +++ b/src/toolgroups/PopupToolGroup.js @@ -182,6 +182,7 @@ this.$clippable.css( 'left', '' ); // Try anchoring the popup to the left first this.$element.addClass( 'oo-ui-popupToolGroup-active oo-ui-popupToolGroup-left' ); + this.setFlags( { progressive: true } ); this.toggleClipping( true ); if ( this.isClippedHorizontally() ) { // Anchoring to the left caused the popup to clip, so anchor it to the right instead @@ -210,6 +211,7 @@ this.$element.removeClass( 'oo-ui-popupToolGroup-active oo-ui-popupToolGroup-left oo-ui-popupToolGroup-right' ); + this.setFlags( { progressive: false } ); this.toggleClipping( false ); } } -- To view, visit https://gerrit.wikimedia.org/r/381946 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3b84cae5f865a03b23446e8f35871c4d592a8846 Gerrit-PatchSet: 1 Gerrit-Project: oojs/ui Gerrit-Branch: master Gerrit-Owner:
[MediaWiki-commits] [Gerrit] operations/puppet[production]: releases: remove proxy_jenkins class, simplify
Dzahn has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/382098 ) Change subject: releases: remove proxy_jenkins class, simplify .. releases: remove proxy_jenkins class, simplify Now the proxy_jenkins class has been reduced to a single file definition (/etc/apache2/conf.d/ doesn't exist anymore in the first place) and the comments. Move the comments to the template where http and port variables are used. Add the parameters to the main releases class instead (currently they won't be available in template used by apache::site so setup doesn't work yet). Simplify code by not having that separate class for no reason anymore. Bug; T164030 Change-Id: Ie924774a62e728cbce2f491faec8b7ebe949ec82 --- M modules/profile/manifests/releases/mediawiki.pp M modules/releases/manifests/init.pp D modules/releases/manifests/proxy_jenkins.pp M modules/releases/templates/apache-jenkins.conf.erb 4 files changed, 16 insertions(+), 30 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/98/382098/1 diff --git a/modules/profile/manifests/releases/mediawiki.pp b/modules/profile/manifests/releases/mediawiki.pp index d5ae29c..9315841 100644 --- a/modules/profile/manifests/releases/mediawiki.pp +++ b/modules/profile/manifests/releases/mediawiki.pp @@ -11,21 +11,17 @@ umask => '0002', } -class { '::releases::proxy_jenkins': -http_port => '8080', -prefix=> '/', -} - class { '::releases': sitename => 'releases.wikimedia.org', sitename_jenkins => 'releases-jenkins.wikimedia.org', +http_port => '8080', +prefix=> '/', } monitoring::service { 'http': description => 'HTTP', check_command => 'check_http', } - ferm::service { 'releases_http': proto => 'tcp', diff --git a/modules/releases/manifests/init.pp b/modules/releases/manifests/init.pp index 59e1200..77d29fe 100644 --- a/modules/releases/manifests/init.pp +++ b/modules/releases/manifests/init.pp @@ -16,7 +16,9 @@ # # - the apache site config # - the /srv/org/wikimedia/ subdir docroot -# +# - a Jenkins instance for automated MW releases +# - another separate apache site for jenkins UI +# # Because this service is intended to live behind a # caching cluster which would handle ssl/tls, it does not # install certs or configure apache for ssl/tls @@ -25,6 +27,8 @@ $sitename = undef, $sitename_jenkins = undef, $server_admin = 'n...@wikimedia.org', +$prefix = '/', +$http_port = '8080', ) { ensure_resource('file', '/srv/org', {'ensure' => 'directory' }) diff --git a/modules/releases/manifests/proxy_jenkins.pp b/modules/releases/manifests/proxy_jenkins.pp deleted file mode 100644 index b78f123..000 --- a/modules/releases/manifests/proxy_jenkins.pp +++ /dev/null @@ -1,23 +0,0 @@ -# == Class releases::proxy_jenkins -# -# A http proxy in front of Jenkins -# -# [*http_port*] -# HTTP port for a Jenkins instance webservice. Example: 8080 -# -# [*prefix*] -# The HTTP path used to reach the Jenkins instance. Must have a leading slash. -# Example: /ci -class releases::proxy_jenkins ( -$http_port, -$prefix, -) { - - # run jenkins behind Apache and have pretty URLs / proxy port 80 - # https://wiki.jenkins-ci.org/display/JENKINS/Running+Jenkins+behind+Apache - - file { -'/etc/apache2/conf.d/jenkins_proxy': - ensure => absent, - } -} diff --git a/modules/releases/templates/apache-jenkins.conf.erb b/modules/releases/templates/apache-jenkins.conf.erb index a4f6857..c056599 100644 --- a/modules/releases/templates/apache-jenkins.conf.erb +++ b/modules/releases/templates/apache-jenkins.conf.erb @@ -1,3 +1,12 @@ +# run jenkins behind Apache and have pretty URLs / proxy port 80 +# https://wiki.jenkins-ci.org/display/JENKINS/Running+Jenkins+behind+Apache +# +# [*http_port*] +# HTTP port for a Jenkins instance webservice. Example: 8080 +# +# [*prefix*] +# The HTTP path used to reach the Jenkins instance. Must have a leading slash. +# Example: /ci ServerName <%= @sitename_jenkins %> ServerAdmin <%= @server_admin %> -- To view, visit https://gerrit.wikimedia.org/r/382098 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie924774a62e728cbce2f491faec8b7ebe949ec82 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Making multi-column lists visually similar to single-column ...
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/381375 ) Change subject: Making multi-column lists visually similar to single-column lists. .. Making multi-column lists visually similar to single-column lists. Change-Id: Ifccd5f2a7ee091bd9fa4a794f7ace51309facf13 --- M modules/ext.CollaborationKit.list.styles.less 1 file changed, 4 insertions(+), 88 deletions(-) Approvals: Brian Wolff: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ext.CollaborationKit.list.styles.less b/modules/ext.CollaborationKit.list.styles.less index bf1da1f..01345b8 100644 --- a/modules/ext.CollaborationKit.list.styles.less +++ b/modules/ext.CollaborationKit.list.styles.less @@ -7,8 +7,10 @@ } .mw-ck-list-image { + .grey(); float: left; overflow: hidden; + padding: 1px; } .mw-ck-list-noimageplaceholder { width: 64px; @@ -41,7 +43,6 @@ margin: 0 -0.5em; .mw-ck-list-column { - .grey-box(); float: left; // IE9 workaround, maybe .flex(); margin: 0.5em; @@ -59,9 +60,6 @@ } .mw-ck-list-column-header { padding: 1.25em 1.5em 0.35em; - - // YOU ARE AN IDIOT AND YOU SUCK, SELF - // Can anyone else explain how this voodoo works? because now I can't figure it out margin: -1.6em -1.6em 1em; border-radius: 3px 3px 0 0; } @@ -69,88 +67,6 @@ margin-top: 0; padding-top: 0; } -} -.column-theme-header( #ddd ); - -// Theme colours mixin and application - -.column-theme-header( @color ) { - .mw-ck-multilist { - .mw-ck-list-column { - border-color: fadeout( @color, 25% ); - } - .mw-ck-list-column-header { - border: solid 1px @color; - border-bottom-width: 3px; - background: fadeout( @color, 75% ); - } - } -} -.mw-ck-theme-darkred { - .column-theme-header( @darkred ); -} -.mw-ck-theme-red { - .column-theme-header( @red ); -} -.mw-ck-theme-darkgrey { - .column-theme-header( @darkgrey ); -} -.mw-ck-theme-lightgrey { - .column-theme-header( @lightgrey ); -} -.mw-ck-theme-skyblue { - .column-theme-header( @skyblue ); -} -.mw-ck-theme-blue { - .column-theme-header( @blue ); -} -.mw-ck-theme-bluegrey { - .column-theme-header( @bluegrey ); -} -.mw-ck-theme-navyblue { - .column-theme-header( @navyblue ); -} -.mw-ck-theme-darkblue { - .column-theme-header( @darkblue ); -} -.mw-ck-theme-aquamarine { - .column-theme-header( @aquamarine ); -} -.mw-ck-theme-violet { - .column-theme-header( @violet ); -} -.mw-ck-theme-purple { - .column-theme-header( @purple ); -} -.mw-ck-theme-mauve { - .column-theme-header( @mauve ); -} -.mw-ck-theme-lightmauve { - .column-theme-header( @lightmauve ); -} -.mw-ck-theme-salmon { - .column-theme-header( @salmon ); -} -.mw-ck-theme-orange { - .column-theme-header( @orange ); -} -.mw-ck-theme-yellow { - .column-theme-header( @yellow ); -} -.mw-ck-theme-gold { - .column-theme-header( @gold ); -} -.mw-ck-theme-pastelyellow { - .column-theme-header( @pastelyellow ); -} -.mw-ck-theme-forestgreen { - .column-theme-header( @forestgreen ); -} -.mw-ck-theme-brightgreen { - .column-theme-header( @brightgreen ); -} -.mw-ck-theme-khaki { - .column-theme-header( @khaki ); } /* @todo, should maybe replace styling from toccolours with this class */ @@ -200,8 +116,8 @@ } .mw-ck-list-dragplaceholder { - border: #000 thin dashed; - width: 25%; + background: #eee; + width: 100%; } .mw-ck-list-title .jquery-confirmable-text, -- To view, visit https://gerrit.wikimedia.org/r/381375 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifccd5f2a7ee091bd9fa4a794f7ace51309facf13 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CollaborationKit Gerrit-Branch: master Gerrit-Owner: HarejGerrit-Reviewer: Brian Wolff Gerrit-Reviewer: Isarra Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] oojs/ui[master]: WikimediaUI theme: Replace BookletLayout menu `border-color`
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/382096 ) Change subject: WikimediaUI theme: Replace BookletLayout menu `border-color` .. WikimediaUI theme: Replace BookletLayout menu `border-color` Replacing static `border-color` of WikimediaUI theme's BookletLayout menu by LESS variable. Change-Id: I8fcb9120fd8a0a44c3ae7e4cd71c80fd76b03597 --- M src/themes/wikimediaui/layouts.less 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: jenkins-bot: Verified Jforrester: Looks good to me, approved diff --git a/src/themes/wikimediaui/layouts.less b/src/themes/wikimediaui/layouts.less index 6ca060f..9529b57 100644 --- a/src/themes/wikimediaui/layouts.less +++ b/src/themes/wikimediaui/layouts.less @@ -16,7 +16,7 @@ } > .oo-ui-menuLayout-menu { - border-right: 1px solid #ddd; + border-right: @border-dialog-bar; } } -- To view, visit https://gerrit.wikimedia.org/r/382096 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8fcb9120fd8a0a44c3ae7e4cd71c80fd76b03597 Gerrit-PatchSet: 1 Gerrit-Project: oojs/ui Gerrit-Branch: master Gerrit-Owner: VolkerEGerrit-Reviewer: Jforrester Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: releases-jenkins: remove now unused jenkins_proxy file
Dzahn has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/382097 ) Change subject: releases-jenkins: remove now unused jenkins_proxy file .. releases-jenkins: remove now unused jenkins_proxy file After releases-jenkins became its own virtual host, the contents of this file have been merged with the rest of the related Apache config in I5b829e5fc22bd8d94a. So jenkins_proxy doesn't exist anymore and needs to be removed here too. Bug: T164030 Change-Id: I6e274730927fb0c22ac1dbfd15cfc347968587c5 --- M modules/releases/manifests/proxy_jenkins.pp 1 file changed, 0 insertions(+), 9 deletions(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/modules/releases/manifests/proxy_jenkins.pp b/modules/releases/manifests/proxy_jenkins.pp index 5296846..b78f123 100644 --- a/modules/releases/manifests/proxy_jenkins.pp +++ b/modules/releases/manifests/proxy_jenkins.pp @@ -20,13 +20,4 @@ '/etc/apache2/conf.d/jenkins_proxy': ensure => absent, } - - file { -'/etc/apache2/jenkins_proxy': - owner => 'root', - group => 'root', - mode=> '0444', - content => template('releases/proxy_jenkins.erb'), - } - } -- To view, visit https://gerrit.wikimedia.org/r/382097 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6e274730927fb0c22ac1dbfd15cfc347968587c5 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: DzahnGerrit-Reviewer: Dzahn Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: releases-jenkins: remove now unused jenkins_proxy file
Dzahn has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/382097 ) Change subject: releases-jenkins: remove now unused jenkins_proxy file .. releases-jenkins: remove now unused jenkins_proxy file After releases-jenkins became its own virtual host, the contents of this file have been merged with the rest of the related Apache config in I5b829e5fc22bd8d94a. So jenkins_proxy doesn't exist anymore and needs to be removed here too. Bug: T164030 Change-Id: I6e274730927fb0c22ac1dbfd15cfc347968587c5 --- M modules/releases/manifests/proxy_jenkins.pp 1 file changed, 0 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/97/382097/1 diff --git a/modules/releases/manifests/proxy_jenkins.pp b/modules/releases/manifests/proxy_jenkins.pp index 5296846..b78f123 100644 --- a/modules/releases/manifests/proxy_jenkins.pp +++ b/modules/releases/manifests/proxy_jenkins.pp @@ -20,13 +20,4 @@ '/etc/apache2/conf.d/jenkins_proxy': ensure => absent, } - - file { -'/etc/apache2/jenkins_proxy': - owner => 'root', - group => 'root', - mode=> '0444', - content => template('releases/proxy_jenkins.erb'), - } - } -- To view, visit https://gerrit.wikimedia.org/r/382097 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6e274730927fb0c22ac1dbfd15cfc347968587c5 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...SocialProfile[master]: Convert UserActivity to use extension registration
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/381933 ) Change subject: Convert UserActivity to use extension registration .. Convert UserActivity to use extension registration Bug: T152865 Change-Id: I9eaace8a4432bd67219b6799154ec0662265ec31 --- M SocialProfile.php D UserActivity/UserActivity.php A UserActivity/extension.json M UserActivity/i18n/en.json M UserActivity/i18n/qqq.json 5 files changed, 45 insertions(+), 44 deletions(-) Approvals: Jack Phoenix: Looks good to me, approved jenkins-bot: Verified diff --git a/SocialProfile.php b/SocialProfile.php index d1a9805..15f5a28 100644 --- a/SocialProfile.php +++ b/SocialProfile.php @@ -162,7 +162,7 @@ require_once( "$IP/extensions/SocialProfile/UserProfile/UserProfile.php" ); // Profile page configuration loader file require_once( "$IP/extensions/SocialProfile/UserGifts/Gifts.php" ); // UserGifts (user-to-user gifting functionality) loader file require_once( "$IP/extensions/SocialProfile/SystemGifts/SystemGifts.php" ); // SystemGifts (awards functionality) loader file -require_once( "$IP/extensions/SocialProfile/UserActivity/UserActivity.php" ); // UserActivity - recent social changes +wfLoadExtension( 'SocialProfile/UserActivity' ); // UserActivity - recent social changes $wgHooks['BeforePageDisplay'][] = 'SocialProfileHooks::onBeforePageDisplay'; $wgHooks['CanonicalNamespaces'][] = 'SocialProfileHooks::onCanonicalNamespaces'; diff --git a/UserActivity/UserActivity.php b/UserActivity/UserActivity.php deleted file mode 100644 index a717a16..000 --- a/UserActivity/UserActivity.php +++ /dev/null @@ -1,42 +0,0 @@ - - * @author David Pean- * @author Jack Phoenix - * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later - */ - -// Extension credits that will show up on Special:Version -$wgExtensionCredits['specialpage'][] = array( - 'name' => 'UserActivity', - 'version' => '1.3', - 'author' => array( 'Aaron Wright', 'David Pean', 'Jack Phoenix' ), - 'description' => "Shows users' social activity", - 'url' => 'https://www.mediawiki.org/wiki/Extension:SocialProfile' -); - -// Set up the new special page -$wgMessagesDirs['UserActivity'] = __DIR__ . '/i18n'; -$wgExtensionMessagesFiles['UserActivityAlias'] = __DIR__ . '/UserActivity.alias.php'; - -$wgAutoloadClasses['SiteActivityHook'] = __DIR__ . '/SiteActivityHook.php'; -$wgAutoloadClasses['UserActivity'] = __DIR__ . '/UserActivityClass.php'; -$wgAutoloadClasses['UserHome'] = __DIR__ . '/UserActivity.body.php'; - -$wgSpecialPages['UserActivity'] = 'UserHome'; - -// Register the CSS with ResourceLoader -$wgResourceModules['ext.socialprofile.useractivity.css'] = array( - 'styles' => 'UserActivity.css', - 'localBasePath' => __DIR__, - 'remoteExtPath' => 'SocialProfile/UserActivity', - 'position' => 'top' -); - -// Set up the parser hook -$wgHooks['ParserFirstCallInit'][] = 'SiteActivityHook::onParserFirstCallInit'; \ No newline at end of file diff --git a/UserActivity/extension.json b/UserActivity/extension.json new file mode 100644 index 000..2df8cfc --- /dev/null +++ b/UserActivity/extension.json @@ -0,0 +1,41 @@ +{ + "name": "UserActivity", + "author": [ + "Aaron Wright", + "David Pean", + "Jack Phoenix" + ], + "license-name": "GPL-2.0+", + "descriptionmsg": "useractivity-desc", + "type": "other", + "MessagesDirs": { + "UserActivity": [ + "i18n" + ] + }, + "ExtensionMessagesFiles": { + "UserActivityAlias": "UserActivity.alias.php" + }, + "AutoloadClasses": { + "SiteActivityHook": "SiteActivityHook.php", + "UserActivity": "UserActivityClass.php", + "UserHome": "UserActivity.body.php" + }, + "Hooks": { + "ParserFirstCallInit": "SiteActivityHook::onParserFirstCallInit" + }, + "SpecialPages": { + "UserActivity": "UserHome" + }, + "ResourceModules": { + "ext.socialprofile.useractivity.css": { + "styles": "UserActivity.css", + "position": "top" + } + }, + "ResourceFileModulePaths": { + "localBasePath": "", + "remoteExtPath": "SocialProfile/UserActivity" + }, + "manifest_version": 1 +} \ No newline at end of file diff --git a/UserActivity/i18n/en.json b/UserActivity/i18n/en.json index c29810a..448e9ce 100644 --- a/UserActivity/i18n/en.json +++ b/UserActivity/i18n/en.json @@ -6,6 +6,7 @@ ] }, "useractivity": "Friends' activity", + "useractivity-desc": "Shows users' social activity",
[MediaWiki-commits] [Gerrit] operations/puppet[production]: releases: drop /ci/ suffix for jenkins-proxy, unify templates
Dzahn has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/382038 ) Change subject: releases: drop /ci/ suffix for jenkins-proxy, unify templates .. releases: drop /ci/ suffix for jenkins-proxy, unify templates Don't have 2 separate config file snippets for Jenkins Proxy setup, put it all into one template. Drop the "/ci/" suffix, now that this has a separate virtual host we can use /. Also fixes monitoring alert for / being forbidden currently. Bug: T164030 Change-Id: I5b829e5fc22bd8d94a65ba92a7395b7f88c1208a --- M modules/profile/manifests/releases/mediawiki.pp M modules/releases/templates/apache-jenkins.conf.erb D modules/releases/templates/proxy_jenkins.erb 3 files changed, 43 insertions(+), 51 deletions(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/modules/profile/manifests/releases/mediawiki.pp b/modules/profile/manifests/releases/mediawiki.pp index 16d8921..d5ae29c 100644 --- a/modules/profile/manifests/releases/mediawiki.pp +++ b/modules/profile/manifests/releases/mediawiki.pp @@ -7,13 +7,13 @@ class { '::jenkins': access_log => true, http_port => '8080', -prefix => '/ci', +prefix => '/', umask => '0002', } class { '::releases::proxy_jenkins': http_port => '8080', -prefix=> '/ci', +prefix=> '/', } class { '::releases': diff --git a/modules/releases/templates/apache-jenkins.conf.erb b/modules/releases/templates/apache-jenkins.conf.erb index 31d4348..a4f6857 100644 --- a/modules/releases/templates/apache-jenkins.conf.erb +++ b/modules/releases/templates/apache-jenkins.conf.erb @@ -7,8 +7,8 @@ ProxyRequests Off ProxyVia Off ProxyPreserveHost On -ProxyPass /ci/ http://127.0.0.1:8080/ci/ retry=0 nocanon -ProxyPassReverse /ci http://localhost:8080/ci +ProxyPass <%= @prefix -%> http://127.0.0.1:<%= @http_port -%><%= @prefix -%>/ retry=0 nocanon +ProxyPassReverse /ci http://localhost:<%= @http_port -%><%= @prefix -%> ErrorLog /var/log/apache2/<%= @sitename_jenkins %>.error.log @@ -16,4 +16,43 @@ CustomLog /var/log/apache2/<%= @sitename_jenkins %>.access.log wmf ServerSignature On + +# Local reverse proxy authorization override +# Most unix distribution deny proxy by default (ie /etc/apache2/mods-enabled/proxy.conf in Debian) + +http://localhost:<%= @http_port -%><%= @prefix -%>*> + +# user agent blacklisting for Jenkins +SetEnvIf User-Agent 80legs bad_browser +SetEnvIf User-Agent bingbot bad_browser +SetEnvIf User-Agent Baiduspider bad_browser +SetEnvIf User-Agent JikeSpider bad_browser +SetEnvIf User-Agent SISTRIX bad_browser +SetEnvIf User-Agent Sogou bad_browser +SetEnvIf User-Agent Sosospider bad_browser +SetEnvIf User-Agent TweetmemeBot bad_browser +SetEnvIf User-Agent ZumBot bad_browser + +Order deny,allow +deny from env=bad_browser + +# Jenkins is behind the misc varnish, the API calls lacks cache headers +# and their 4xx errors ends up being cached which causes troubles when +# +# Jenkins job builder creates a job (it check whether a job exists by +# hitting the API, which cache a 404, then checks whether the job got +# successfullyy created and fails beacuse it is server the cached 404). +SetEnvIf Request_URI .*/api/json.* NO_CACHE +Header set Cache-Control "no-cache,must-revalidate" env=NO_CACHE + +# Prevent access to certain URLs - T63964 +SetEnvIf Request_URI <%= @prefix -%>/computer/.*/builds DENY_BUILDS_ACCESS +SetEnvIf Request_URI <%= @prefix -%>/user/.*/builds DENY_BUILDS_ACCESS +SetEnvIf Request_URI <%= @prefix -%>/view/.*/builds DENY_BUILDS_ACCESS +# Blacklist RSS feeds entirely +SetEnvIf Request_URI <%= @prefix -%>/.*/rss(All|Failed|Latest) DENY_BUILDS_ACCESS +Order deny,allow +deny from env=DENY_BUILDS_ACCESS + + diff --git a/modules/releases/templates/proxy_jenkins.erb b/modules/releases/templates/proxy_jenkins.erb deleted file mode 100644 index 2c51715..000 --- a/modules/releases/templates/proxy_jenkins.erb +++ /dev/null @@ -1,47 +0,0 @@ -# -### THIS FILE IS MANAGED BY PUPPET -### puppet:///modules/contint/apache/proxy_jenkins -# -# vim: filetype=apache - -ProxyPass <%= @prefix -%> http://localhost:<%= @http_port -%><%= @prefix %> nocanon -ProxyPassReverse<%= @prefix -%> http://localhost:<%= @http_port -%><%= @prefix %> -ProxyRequests Off - -# Local reverse proxy authorization override -# Most unix distribution deny proxy by default (ie
[MediaWiki-commits] [Gerrit] oojs/ui[master]: WikimediaUI theme: Replace BookletLayout menu `border-color`
VolkerE has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/382096 ) Change subject: WikimediaUI theme: Replace BookletLayout menu `border-color` .. WikimediaUI theme: Replace BookletLayout menu `border-color` Replacing static `border-color` of WikimediaUI theme's BookletLayout menu by LESS variable. Change-Id: I8fcb9120fd8a0a44c3ae7e4cd71c80fd76b03597 --- M src/themes/wikimediaui/layouts.less 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/96/382096/1 diff --git a/src/themes/wikimediaui/layouts.less b/src/themes/wikimediaui/layouts.less index 6ca060f..9529b57 100644 --- a/src/themes/wikimediaui/layouts.less +++ b/src/themes/wikimediaui/layouts.less @@ -16,7 +16,7 @@ } > .oo-ui-menuLayout-menu { - border-right: 1px solid #ddd; + border-right: @border-dialog-bar; } } -- To view, visit https://gerrit.wikimedia.org/r/382096 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8fcb9120fd8a0a44c3ae7e4cd71c80fd76b03597 Gerrit-PatchSet: 1 Gerrit-Project: oojs/ui Gerrit-Branch: master Gerrit-Owner: VolkerE___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Avoid messing with native skin styles in actual content
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/354887 ) Change subject: Avoid messing with native skin styles in actual content .. Avoid messing with native skin styles in actual content (Pretend to) inherit whatever header styles are normal, minimizing use of (extra) horizontal lines by separating sections with whitespace, using icons as visual anchors Style ToC as special and use extra whitespace before jumping into 'regular' content Change-Id: I3019069213a183ff441c15482a24813431c21b44 --- M includes/content/CollaborationHubContent.php M modules/ext.CollaborationKit.hub.styles.less M modules/ext.CollaborationKit.mixins.less M tests/phpunit/CollaborationHubContentTest.php 4 files changed, 110 insertions(+), 68 deletions(-) Approvals: Brian Wolff: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/content/CollaborationHubContent.php b/includes/content/CollaborationHubContent.php index 08f4cc7..e976a2e 100644 --- a/includes/content/CollaborationHubContent.php +++ b/includes/content/CollaborationHubContent.php @@ -541,17 +541,14 @@ wfMessage( 'edit' )->inContentLanguage()->text(), 'edit' ); - $announcementsEditButton->setAttributes( [ 'style' => 'display:block;' ] ); $announcementsHeader = Html::rawElement( 'h3', [], - $announcementsSubpageName + $announcementsSubpageName . $announcementsEditButton ); - return $announcementsHeader - . $announcementsEditButton - . $announcementsText; + return $announcementsHeader . $announcementsText; } } @@ -758,6 +755,18 @@ $spPage = $spTitle->getSubpageText(); } + // Get icon + $image = isset( $contentItem['image'] ) ? $contentItem['image'] : null; + $imageHtml = CollaborationKitImage::makeImage( + $image, + 35, + [ + 'link' => $spTitle->getText(), + 'fallback' => $spPage, + 'classes' => [ 'mw-ck-section-image' ] + ] + ); + // Generate an id for the section for anchors // Make sure this matches the ToC anchor generation $spPageLink = Sanitizer::escapeId( htmlspecialchars( $spPage ) ); @@ -795,6 +804,15 @@ ); } + $sectionButtons = ''; + if ( $sectionLinksText !== '' ) { + $sectionButtons = Html::rawElement( + 'div', + [ 'class' => 'mw-ck-hub-section-buttons' ], + $sectionLinksText + ); + } + // Assemble header // Open general section here since we have the id here $html = Html::openElement( @@ -805,21 +823,21 @@ ] ); $html .= Html::rawElement( - 'h2', - [], - Html::element( - 'span', - [ 'class' => 'mw-headline' ], - $spPage + 'div', + [ + 'class' => 'mw-ck-hub-section-header' + ], + Html::rawElement( + 'h2', + [], + $imageHtml . + Html::element( + 'span', + [ 'class' => 'mw-headline' ], + $spPage + ) . $sectionButtons ) ); - if ( $sectionLinksText !== '' ) { - $html .= Html::rawElement( - 'div', - [ 'class' => 'mw-ck-hub-section-buttons' ], - $sectionLinksText - ); - } OutputPage::setupOOUI(); return $html; @@ -837,12 +855,13 @@ */ protected function makeEditSectionLink( $link, $message, $icon ) { return new OOUI\ButtonWidget( [ - 'classes' => [
[MediaWiki-commits] [Gerrit] mediawiki...Translate[master]: Revert "Use Language type hint in hooks"
Hello Fomafix, jenkins-bot, Nikerabbit, I'd like you to do a code review. Please visit https://gerrit.wikimedia.org/r/382093 to review the following change. Change subject: Revert "Use Language type hint in hooks" .. Revert "Use Language type hint in hooks" This reverts commit d8572921ee11e0c483b3637f600872b6eb09. Bug: T177352 Change-Id: I3ac248e6e2152b4b3032def56c433b12aceb798c --- M TranslateHooks.php M tag/PageTranslationHooks.php 2 files changed, 4 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/93/382093/1 diff --git a/TranslateHooks.php b/TranslateHooks.php index 788c30c..7e6d04e 100644 --- a/TranslateHooks.php +++ b/TranslateHooks.php @@ -438,9 +438,9 @@ * Set the correct page content language for translation units. * * @param Title $title -* @param Language &$pageLang +* @param string &$pageLang */ - public static function onPageContentLanguage( Title $title, Language &$pageLang ) { + public static function onPageContentLanguage( Title $title, &$pageLang ) { $handle = new MessageHandle( $title ); if ( $handle->isMessageNamespace() ) { $pageLang = $handle->getEffectiveLanguage(); diff --git a/tag/PageTranslationHooks.php b/tag/PageTranslationHooks.php index 614ceae..f97df48 100644 --- a/tag/PageTranslationHooks.php +++ b/tag/PageTranslationHooks.php @@ -72,16 +72,13 @@ /** * Set the right page content language for translated pages ("Page/xx"). * Hook: PageContentLanguage -* -* @param Title $title -* @param Language &$pageLang */ - public static function onPageContentLanguage( Title $title, Language &$pageLang ) { + public static function onPageContentLanguage( Title $title, /*string*/&$pageLang ) { // For translation pages, parse plural, grammar etc with correct language, // and set the right direction if ( TranslatablePage::isTranslationPage( $title ) ) { list( , $code ) = TranslateUtils::figureMessage( $title->getText() ); - $pageLang = Language::factory( $code ); + $pageLang = $code; } return true; -- To view, visit https://gerrit.wikimedia.org/r/382093 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3ac248e6e2152b4b3032def56c433b12aceb798c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: KrinkleGerrit-Reviewer: Fomafix 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] wikimedia...analytics[master]: [WIP] First draft of tracking 'go' feature clickthroughs
EBernhardson has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/382094 ) Change subject: [WIP] First draft of tracking 'go' feature clickthroughs .. [WIP] First draft of tracking 'go' feature clickthroughs Basic tracking of web requests that were submitted to search and redirected the user directly to an article page. This is the first step in taking a slightly more holistic look at search, grouping together clickthroughs for the same query from both autocomplete and full text search. This is particularly helpful because a query with particularly abysmal clickthrough rates in fulltext is sometimes because autocomplete has siphoned of 90% of searches to send them right where they want, and full text are people looking for somewhat related things (maybe? unknown the actual desire of people skipping 'go' and looking at results). Change-Id: Ia45d9b62ed8df00e30ab886ea50d4f86af8c604d --- A hive/go_clicks/create_go_clicks.hql A oozie/go_clicks/go_clicks.hql 2 files changed, 95 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/analytics refs/changes/94/382094/1 diff --git a/hive/go_clicks/create_go_clicks.hql b/hive/go_clicks/create_go_clicks.hql new file mode 100644 index 000..b6f879f --- /dev/null +++ b/hive/go_clicks/create_go_clicks.hql @@ -0,0 +1,20 @@ +CREATE TABLE `discovery.go_clicks`( + `wikiid` string, + `project` string, + `query` string, + `identity` string, + `referer` string, + `uri_query` string, + `timestamp` bigint, + `maybe_bot` boolean + +) +PARTITIONED BY ( + `year` int, + `month` int, + `day` int +) +STORED AS PARQUET +LOCATION 'hdfs://analytics-hadoop/wmf/data/discovery/go_clicks' +; + diff --git a/oozie/go_clicks/go_clicks.hql b/oozie/go_clicks/go_clicks.hql new file mode 100644 index 000..a5e8039 --- /dev/null +++ b/oozie/go_clicks/go_clicks.hql @@ -0,0 +1,75 @@ +-- Parameters: +-- source_namespace_map_table +-- -- Fully qualified table name to source the map from +-- webrequest projects to cirrus dbname. +-- source_namespace_map_snapshot_id +-- -- Id of the snapshot (partition) of the source_namespace_map_table +-- to query +-- destination_table +-- -- Fully qualified table name to store the computed +-- click data in +-- year +-- -- year of partition to compute +-- month +-- -- month of partition to compute +-- day +-- -- day of partition to compute +-- +-- +-- +-- Usage: +-- hive -f go_clicks.hql +-- -d source_namespace_map_table=wmf_raw.mediawiki_project_namespace_map +-- -d source_namespace_map_snapshot_id=2017-06 +-- -d destination_table=discovery.go_clicks +-- -d year=2017 +-- -d month=9 +-- -d day=1 + +--ADD JAR ${analytics_artifacts_directory}/org/wikimedia/analytics/refinery/refinery-hive-${refinery_jar_version}.jar; +ADD JAR hdfs://analytics-hadoop/user/ebernhardson/refinery-hive-0.0.39-SNAPSHOT.jar; +CREATE TEMPORARY FUNCTION get_pageview_info AS 'org.wikimedia.analytics.refinery.hive.GetPageviewInfoUDF'; +CREATE TEMPORARY FUNCTION get_main_search_request AS 'org.wikimedia.analytics.refinery.hive.GetMainSearchRequestUDF'; + +WITH namespace_map AS ( +SELECT DISTINCT +dbname, +get_pageview_info(hostname, '', '')['project'] as project +FROM +${source_namespace_map_table} +WHERE +snapshot = "${source_namespace_map_snapshot_id}" +) + +INSERT OVERWRITE TABLE +${destination_table} +PARTITION(year=${year}, month=${month}, day=${day}) + +SELECT +namespace_map.dbname AS wikiid, +namespace_map.project AS project, +reflect('java.net.URLDecoder', 'decode', str_to_map(substr(uri_query, 2), '&', '=')['search'], 'UTF-8') AS query, +md5(concat(client_ip, user_agent)) AS identity, +referer, +uri_query, +UNIX_TIMESTAMP(webrequest.dt, "-MM-dd'T'hh:mm:ss") AS timestamp, +( +-- Try and limit to only requests made by our own sites. A filter on referer +-- is a bit too limiting, but our autocomplete always sends the 'go' parameter +str_to_map(substr(uri_query, 2), '&', '=')['go'] IS NULL +) OR ( +x_analytics_map['nocookie'] is not null +) AS maybe_bot +FROM +wmf.webrequest +JOIN +namespace_map +ON +namespace_map.project = webrequest.pageview_info['project'] +WHERE +webrequest_source = 'text' +AND year= ${year} AND month=${month} AND day=${day} +AND http_status = "302" +-- Providing this string to any wiki page triggers search, for historical reasons +AND str_to_map(substr(uri_query, 2), '&', '=')['search'] IS NOT NULL +; -- To view, visit https://gerrit.wikimedia.org/r/382094 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia45d9b62ed8df00e30ab886ea50d4f86af8c604d Gerrit-PatchSet: 1 Gerrit-Project:
[MediaWiki-commits] [Gerrit] mediawiki...Translate[wmf/1.31.0-wmf.2]: Revert "Use Language type hint in hooks"
Krinkle has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/382095 ) Change subject: Revert "Use Language type hint in hooks" .. Revert "Use Language type hint in hooks" This reverts commit d8572921ee11e0c483b3637f600872b6eb09. Bug: T177352 Change-Id: I3ac248e6e2152b4b3032def56c433b12aceb798c --- M TranslateHooks.php M tag/PageTranslationHooks.php 2 files changed, 4 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/95/382095/1 diff --git a/TranslateHooks.php b/TranslateHooks.php index 1a7613f..bcd2b94 100644 --- a/TranslateHooks.php +++ b/TranslateHooks.php @@ -438,9 +438,9 @@ * Set the correct page content language for translation units. * * @param Title $title -* @param Language &$pageLang +* @param string &$pageLang */ - public static function onPageContentLanguage( Title $title, Language &$pageLang ) { + public static function onPageContentLanguage( Title $title, &$pageLang ) { $handle = new MessageHandle( $title ); if ( $handle->isMessageNamespace() ) { $pageLang = $handle->getEffectiveLanguage(); diff --git a/tag/PageTranslationHooks.php b/tag/PageTranslationHooks.php index 614ceae..f97df48 100644 --- a/tag/PageTranslationHooks.php +++ b/tag/PageTranslationHooks.php @@ -72,16 +72,13 @@ /** * Set the right page content language for translated pages ("Page/xx"). * Hook: PageContentLanguage -* -* @param Title $title -* @param Language &$pageLang */ - public static function onPageContentLanguage( Title $title, Language &$pageLang ) { + public static function onPageContentLanguage( Title $title, /*string*/&$pageLang ) { // For translation pages, parse plural, grammar etc with correct language, // and set the right direction if ( TranslatablePage::isTranslationPage( $title ) ) { list( , $code ) = TranslateUtils::figureMessage( $title->getText() ); - $pageLang = Language::factory( $code ); + $pageLang = $code; } return true; -- To view, visit https://gerrit.wikimedia.org/r/382095 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3ac248e6e2152b4b3032def56c433b12aceb798c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: wmf/1.31.0-wmf.2 Gerrit-Owner: Krinkle___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[master]: Fix jQuery.fn.bind() call in mw.MediaWikiPlayer.loader.js
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/382087 ) Change subject: Fix jQuery.fn.bind() call in mw.MediaWikiPlayer.loader.js .. Fix jQuery.fn.bind() call in mw.MediaWikiPlayer.loader.js This is the most common one, and on almost every page view. I somehow missed it in 48298d38ae2e4fb. Bug: T169385 Bug: T175506 Change-Id: I5354f5ff5ce7d5506ced2797ff08f007aa7760e2 --- M resources/mw.MediaWikiPlayer.loader.js 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: jenkins-bot: Verified Jforrester: Looks good to me, approved diff --git a/resources/mw.MediaWikiPlayer.loader.js b/resources/mw.MediaWikiPlayer.loader.js index b012704..6db46de 100644 --- a/resources/mw.MediaWikiPlayer.loader.js +++ b/resources/mw.MediaWikiPlayer.loader.js @@ -1,6 +1,6 @@ ( function ( mw, $ ) { // Add MediaWikiSupportPlayer dependency on players with a mediaWiki title - $( mw ).bind( 'EmbedPlayerUpdateDependencies', function ( event, embedPlayer, dependencySet ) { + $( mw ).on( 'EmbedPlayerUpdateDependencies', function ( event, embedPlayer, dependencySet ) { if ( $( embedPlayer ).attr( 'data-mwtitle' ) ) { $.merge( dependencySet, [ 'mw.MediaWikiPlayerSupport' ] ); } -- To view, visit https://gerrit.wikimedia.org/r/382087 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5354f5ff5ce7d5506ced2797ff08f007aa7760e2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TimedMediaHandler Gerrit-Branch: master Gerrit-Owner: KrinkleGerrit-Reviewer: Jforrester Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Support uploads with UTF-8 names on Windows
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/382074 ) Change subject: Support uploads with UTF-8 names on Windows .. Support uploads with UTF-8 names on Windows On PHP 7.1 and later, filesystem functions on Windows use the Unicode system functions, which makes our file handling work for non-ASCII file names. Previously this was blacklisted for Windows on all PHP versions. Versions before 7.1 will still reject Unicode filenames with non-ASCII chars. Bug: T3780 Change-Id: I94377faa5185f133be2dfb7b9b6aeacbd582834f --- M includes/libs/filebackend/FSFileBackend.php 1 file changed, 7 insertions(+), 1 deletion(-) Approvals: Aaron Schulz: Looks good to me, approved Brion VIBBER: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/includes/libs/filebackend/FSFileBackend.php b/includes/libs/filebackend/FSFileBackend.php index 30548ef..b257e27 100644 --- a/includes/libs/filebackend/FSFileBackend.php +++ b/includes/libs/filebackend/FSFileBackend.php @@ -99,7 +99,13 @@ } public function getFeatures() { - return !$this->isWindows ? FileBackend::ATTR_UNICODE_PATHS : 0; + if ( $this->isWindows && version_compare( PHP_VERSION, '7.1', 'lt' ) ) { + // PHP before 7.1 used 8-bit code page for filesystem paths on Windows; + // See http://php.net/manual/en/migration71.windows-support.php + return 0; + } else { + return FileBackend::ATTR_UNICODE_PATHS; + } } protected function resolveContainerPath( $container, $relStoragePath ) { -- To view, visit https://gerrit.wikimedia.org/r/382074 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I94377faa5185f133be2dfb7b9b6aeacbd582834f Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Brion VIBBERGerrit-Reviewer: Aaron Schulz Gerrit-Reviewer: Brion VIBBER Gerrit-Reviewer: Zoranzoki21 Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Remove some remaining mentions of unstubbing from core
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/382083 ) Change subject: Remove some remaining mentions of unstubbing from core .. Remove some remaining mentions of unstubbing from core Change-Id: Ife34335db7afd9bd4f0936cb90be227d7c4c9651 --- M includes/OutputPage.php M includes/api/ApiBase.php M includes/cache/MessageCache.php M includes/parser/ParserOptions.php 4 files changed, 6 insertions(+), 9 deletions(-) Approvals: Krinkle: Looks good to me, but someone else must approve MaxSem: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 5d9006a..785641d 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -1596,7 +1596,7 @@ if ( !$this->mParserOptions ) { if ( !$this->getContext()->getUser()->isSafeToLoad() ) { - // $wgUser isn't unstubbable yet, so don't try to get a + // $wgUser isn't loaded yet, so don't try to get a // ParserOptions for it. And don't cache this ParserOptions // either. $po = ParserOptions::newFromAnon(); diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php index 80aeff5..9dd670a 100644 --- a/includes/api/ApiBase.php +++ b/includes/api/ApiBase.php @@ -1385,7 +1385,7 @@ $limit2 = $limit2 ?: self::LIMIT_SML2; // This is a bit awkward, but we want to avoid calling canApiHighLimits() - // because it unstubs $wgUser + // because it loads the user object $valuesList = $this->explodeMultiValue( $value, $limit2 + 1 ); $sizeLimit = count( $valuesList ) > $limit1 && $this->mMainModule->canApiHighLimits() ? $limit2 diff --git a/includes/cache/MessageCache.php b/includes/cache/MessageCache.php index 768f980..20cf64c 100644 --- a/includes/cache/MessageCache.php +++ b/includes/cache/MessageCache.php @@ -187,7 +187,7 @@ if ( !$this->mParserOptions ) { if ( !$wgUser->isSafeToLoad() ) { - // $wgUser isn't unstubbable yet, so don't try to get a + // $wgUser isn't loaded yet, so don't try to get a // ParserOptions for it. And don't cache this ParserOptions // either. $po = ParserOptions::newFromAnon(); @@ -874,7 +874,7 @@ * the site language. * * @see MessageCache::get -* @param Language|StubObject $lang Preferred language +* @param Language $lang Preferred language * @param string $lckey Lowercase key for the message (as for localisation cache) * @param bool $useDB Whether to include messages from the wiki database * @return string|bool The message, or false if not found @@ -899,7 +899,7 @@ * Given a language, try and fetch messages from that language and its fallbacks. * * @see MessageCache::get -* @param Language|StubObject $lang Preferred language +* @param Language $lang Preferred language * @param string $lckey Lowercase key for the message (as for localisation cache) * @param bool $useDB Whether to include messages from the wiki database * @param bool[] $alreadyTried Contains true for each language that has been tried already diff --git a/includes/parser/ParserOptions.php b/includes/parser/ParserOptions.php index c7146a1..ee0da2a 100644 --- a/includes/parser/ParserOptions.php +++ b/includes/parser/ParserOptions.php @@ -944,9 +944,6 @@ } if ( $lang === null ) { global $wgLang; - if ( !StubObject::isRealObject( $wgLang ) ) { - $wgLang->_unstub(); - } $lang = $wgLang; } $this->initialiseFromUser( $user, $lang ); @@ -1014,7 +1011,7 @@ * * @since 1.30 * @param User|null $user -* @param Language|StubObject|null $lang +* @param Language|null $lang * @return ParserOptions */ public static function newCanonical( User $user = null, $lang = null ) { -- To view, visit https://gerrit.wikimedia.org/r/382083 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ife34335db7afd9bd4f0936cb90be227d7c4c9651 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: ChadGerrit-Reviewer: Aaron Schulz Gerrit-Reviewer: Anomie Gerrit-Reviewer: C.
[MediaWiki-commits] [Gerrit] mediawiki...Flow[master]: Remove mentions of StubObject, just for typehinting
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/382085 ) Change subject: Remove mentions of StubObject, just for typehinting .. Remove mentions of StubObject, just for typehinting StubObject & friends just simply aren't in style these days. They're not Agile. Change-Id: If19f1a8559ac9a9a6d8debfb16fe53288803d523 --- M includes/Import/Wikitext/ConversionStrategy.php M includes/Import/Wikitext/ImportSource.php 2 files changed, 3 insertions(+), 5 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Import/Wikitext/ConversionStrategy.php b/includes/Import/Wikitext/ConversionStrategy.php index 76719e3..70bc7f9 100644 --- a/includes/Import/Wikitext/ConversionStrategy.php +++ b/includes/Import/Wikitext/ConversionStrategy.php @@ -10,7 +10,6 @@ use LinkBatch; use Parser; use Psr\Log\LoggerInterface; -use StubObject; use Title; use User; use WikitextContent; @@ -41,7 +40,7 @@ protected $sourceStore; /** -* @var Parser|StubObject +* @var Parser */ protected $parser; @@ -63,7 +62,7 @@ protected $user; /** -* @param Parser|StubObject $parser +* @param Parser $parser * @param ImportSourceStore $sourceStore * @param LoggerInterface $logger * @param User $user User to take conversion actions are (applicable for actions diff --git a/includes/Import/Wikitext/ImportSource.php b/includes/Import/Wikitext/ImportSource.php index 7b3d75e..b6ad14a 100644 --- a/includes/Import/Wikitext/ImportSource.php +++ b/includes/Import/Wikitext/ImportSource.php @@ -12,7 +12,6 @@ use Parser; use ParserOptions; use Revision; -use StubObject; use Title; use User; @@ -30,7 +29,7 @@ /** * @param Title $title -* @param Parser|StubObject $parser +* @param Parser $parser * @param User $user User to take actions as * @param string $headerSuffix * @throws ImportException When $title is an external title -- To view, visit https://gerrit.wikimedia.org/r/382085 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If19f1a8559ac9a9a6d8debfb16fe53288803d523 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: ChadGerrit-Reviewer: Krinkle Gerrit-Reviewer: MaxSem Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: [wip] RCFilters: Move parameter operations to ViewModel
Mooeypoo has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/382092 ) Change subject: [wip] RCFilters: Move parameter operations to ViewModel .. [wip] RCFilters: Move parameter operations to ViewModel Change-Id: Icec513c94630314e7873f9ffe27779cd39150713 --- M resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FiltersViewModel.js M resources/src/mediawiki.rcfilters/mw.rcfilters.UriProcessor.js 2 files changed, 115 insertions(+), 107 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/92/382092/1 diff --git a/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FiltersViewModel.js b/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FiltersViewModel.js index 62627e6..f9b6bfa 100644 --- a/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FiltersViewModel.js +++ b/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FiltersViewModel.js @@ -18,6 +18,7 @@ this.highlightEnabled = false; this.invertedNamespaces = false; this.parameterMap = {}; + this.emptyParameterState = null; this.views = {}; this.currentView = 'default'; @@ -415,6 +416,95 @@ }; /** +* Update filter view model state based on a parameter object +* +* @param {Object} params Parameters object +*/ + mw.rcfilters.dm.FiltersViewModel.prototype.updateStateFromParams = function ( params ) { + // For arbitrary numeric single_option values, check the uri and see if it's beyond the limit + $.each( this.filtersModel.getFilterGroups(), function ( groupName, groupModel ) { + if ( + groupModel.getType() === 'single_option' && + groupModel.isAllowArbitrary() + ) { + if ( + groupModel.getMaxValue() !== null && + params[ groupName ] > groupModel.getMaxValue() + ) { + // Change the value to the actual max value + uriQuery[ groupName ] = String( groupModel.getMaxValue() ); + } else if ( + groupModel.getMinValue() !== null && + params[ groupName ] < groupModel.getMinValue() + ) { + // Change the value to the actual min value + params[ groupName ] = String( groupModel.getMinValue() ); + } + } + } ); + + // Update filter states + this.filtersModel.toggleFiltersSelected( + this.filtersModel.getFiltersFromParameters( + parameters + ) + ); + + this.filtersModel.toggleInvertedNamespaces( !!Number( parameters.invert ) ); + + // Update highlight state + this.filtersModel.getItems().forEach( function ( filterItem ) { + var color = parameters[ filterItem.getName() + '_color' ]; + if ( color ) { + filterItem.setHighlightColor( color ); + } else { + filterItem.clearHighlightColor(); + } + } ); + this.filtersModel.toggleHighlight( !!Number( parameters.highlight ) ); + + // Check all filter interactions + this.filtersModel.reassessFilterInteractions(); + }; + + /** +* Get a representation of an empty (falsey) parameter state +* +* @return {Object} Empty parameter state +*/ + mw.rcfilters.UriProcessor.prototype.getEmptyParameterState = function () { + if ( !this.emptyParameterState ) { + this.emptyParameterState = $.extend( + true, + {}, + this.getParametersFromFilters( {} ), + this.getHighlightParameters(), + { highlight: '0', invert: '0' } + ); + } + + return this.emptyParameterState; + }; + + /** +* Get a parameter representation of the current state of the model +* +* @return {Object} Parameter representation of the current state of the model +*/ + mw.rcfilters.UriProcessor.prototype.getCurrentParameterState = function () { + return $.extend( +
[MediaWiki-commits] [Gerrit] labs/icinga2[master]: Up time for apt check to 10 mins
Paladox has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/382091 ) Change subject: Up time for apt check to 10 mins .. Up time for apt check to 10 mins Change-Id: Iefaf30ceda69eb30672da3d47f6bf58b68acf002 --- M templates/services.conf.erb 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Paladox: Verified; Looks good to me, approved diff --git a/templates/services.conf.erb b/templates/services.conf.erb index 139414d..87f9c46 100644 --- a/templates/services.conf.erb +++ b/templates/services.conf.erb @@ -172,8 +172,8 @@ check_command = "nrpe-check-1arg" vars.host = host.address vars.check = "check_apt" - check_interval = 7m - retry_interval = 4m + check_interval = 10m + retry_interval = 5m assign where host.vars.external_host } -- To view, visit https://gerrit.wikimedia.org/r/382091 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iefaf30ceda69eb30672da3d47f6bf58b68acf002 Gerrit-PatchSet: 2 Gerrit-Project: labs/icinga2 Gerrit-Branch: master Gerrit-Owner: PaladoxGerrit-Reviewer: Paladox ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Enable RemexHTML on wikitech and eswikiversity
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/379966 ) Change subject: Enable RemexHTML on wikitech and eswikiversity .. Enable RemexHTML on wikitech and eswikiversity Bug: T175971 Bug: T176088 Change-Id: I389d01e57cda5b719c418063bb53c897df2cdc36 --- M wmf-config/InitialiseSettings.php 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Subramanya Sastry: Looks good to me, but someone else must approve EBernhardson: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 4c6f633..e60ac6f 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -19075,6 +19075,9 @@ 'default' => null, 'mediawikiwiki' => [ 'driver' => 'RemexHtml' ], 'testwiki' => [ 'driver' => 'RemexHtml' ], + 'eswikiversity' => [ 'driver' => 'RemexHtml' ], + 'wikitech' => [ 'driver' => 'RemexHtml' ], + ], // Cache ResourceLoader modules in localStorage -- To view, visit https://gerrit.wikimedia.org/r/379966 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I389d01e57cda5b719c418063bb53c897df2cdc36 Gerrit-PatchSet: 15 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Zoranzoki21Gerrit-Reviewer: Catrope Gerrit-Reviewer: EBernhardson Gerrit-Reviewer: Jforrester Gerrit-Reviewer: Subramanya Sastry Gerrit-Reviewer: Tim Starling Gerrit-Reviewer: Zoranzoki21 Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] labs/icinga2[master]: Up time for apt check to 10 mins
Paladox has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/382091 ) Change subject: Up time for apt check to 10 mins .. Up time for apt check to 10 mins Change-Id: Iefaf30ceda69eb30672da3d47f6bf58b68acf002 --- 0 files changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/labs/icinga2 refs/changes/91/382091/1 -- To view, visit https://gerrit.wikimedia.org/r/382091 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iefaf30ceda69eb30672da3d47f6bf58b68acf002 Gerrit-PatchSet: 1 Gerrit-Project: labs/icinga2 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] mediawiki...Wigo3[master]: Remove ancient PARSERFIRSTCALLINIT support
Krinkle has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/382075 ) Change subject: Remove ancient PARSERFIRSTCALLINIT support .. Remove ancient PARSERFIRSTCALLINIT support Some whitespace removal too because I used wrong editor settings Change-Id: I11f7ded27031ae63d16e4c58917e05fb06736234 --- M checkbox.php M multi.php M slider.php 3 files changed, 41 insertions(+), 64 deletions(-) Approvals: Krinkle: Verified MaxSem: Looks good to me, approved diff --git a/checkbox.php b/checkbox.php index 94f5896..787f707 100644 --- a/checkbox.php +++ b/checkbox.php @@ -9,18 +9,10 @@ 'description' => 'Checkbox voting. Requires the wigo and slider extensions' ); -//Avoid unstubbing $wgParser on setHook() too early on modern (1.12+) MW versions, as per r35980 -if ( defined( 'MW_SUPPORTS_PARSERFIRSTCALLINIT' ) ) { - $wgHooks['ParserFirstCallInit'][] = 'checkboxinit'; -} else { // Otherwise do things the old fashioned way - $wgExtensionFunctions[] = 'checkboxinit'; -} - -function checkboxinit() { - global $wgParser; - $wgParser->setHook('checkbox','checkboxrender'); - $wgParser->setHook('checkboxes','checkboxesrender'); - return true; +$wgHooks['ParserFirstCallInit'][] = function( $parser ) { + $parser->setHook('checkbox','checkboxrender'); + $parser->setHook('checkboxes','checkboxesrender'); + return true; } function checkboxesrender($input, $args, $parser) @@ -37,10 +29,10 @@ $output = $parser->recursiveTagParse($input); return "{$err} {$output}"; } - + #avoid conflicts - checkbox will add check prefix $voteid = "set" . $voteid; - + $set = $args['set']; if (!$set) { @@ -55,12 +47,12 @@ if (array_key_exists('embedded',$args) && strcasecmp($args['embedded'],"yes") === 0) { $embedded = true; } - + //Get the checkbox set $list = wfMsg("checkboxes/{$set}"); $list = preg_replace("/\*/","",$list); $options = split("\n",$list); - + $output = ''; $ids = array(); $jshacka = array(); @@ -85,7 +77,7 @@ $votebutton = "" . (($closed || $embedded) ? "" : " " . wfMsg("slider-votebutton") . "") . ""; - + //get all the votes in one request $ids_l = implode(",",$ids); $myvotesscript = "" . @@ -101,7 +93,7 @@ "}" . "}" . "});" . ""; - + return $parser->recursiveTagParse($output) . $votebutton . $myvotesscript; } @@ -120,11 +112,11 @@ $output = $parser->recursiveTagParse($input); return "{$err} {$output}"; } - + //inject js global $wgJsMimeType, $wgScriptPath; $parser->mOutput->addHeadItem("",'wigo3js'); - + if (array_key_exists('bulkmode',$args) && strcasecmp($args['bulkmode'],"yes") === 0) { $bulkmode = true; } else { @@ -179,7 +171,7 @@ "}" . "});" . ""; } - + wfLoadExtensionMessages('slider'); if (array_key_exists('closed',$args) && strcasecmp($args['closed'],"yes") === 0) { return " " . diff --git a/multi.php b/multi.php index 5005c38..37e911f 100644 --- a/multi.php +++ b/multi.php @@ -10,18 +10,10 @@ 'version' => '3.5' ); -//Avoid unstubbing $wgParser on setHook() too early on modern (1.12+) MW versions, as per r35980 -if ( defined( 'MW_SUPPORTS_PARSERFIRSTCALLINIT' ) ) { - $wgHooks['ParserFirstCallInit'][] = 'multiinit'; -} else { // Otherwise do things the old fashioned way - $wgExtensionFunctions[] = 'multiinit'; -} -function multiinit() { - global $wgParser; - wfLoadExtensionMessages('multi'); - $wgParser->setHook('multi','multirender'); - return true; +$wgHooks['ParserFirstCallInit'][] = function( $parser ) { + $parser->setHook('multi','multirender'); + return true; } global $wgUseAjax; @@ -184,7 +176,7 @@ } $output .= "" . -"" . +"" . $line . "" . "" . @@ -193,7 +185,7 @@ "" . "" . "" . - "" . + "" . "" . ""; } @@ -209,19 +201,19 @@ } $output .= "" . -"" . +"" . $line . "" . "" . $resultstr[$i] . "" . -"" . +"" . "" . wfMsg("multi-votebutton") . "" . "" . "" . "" . "" . - "" . + "" . "" . ""; } diff --git a/slider.php b/slider.php index ad16dc0..22814a5 100644 --- a/slider.php +++ b/slider.php @@ -9,12 +9,12 @@ 'description' => 'Creates a slider for voting. Requires the wigo extension' ); -//Avoid unstubbing $wgParser on setHook() too early on modern (1.12+) MW versions, as per r35980 if ( defined(
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: [cirrus] Force native script for super noop
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/376027 ) Change subject: [cirrus] Force native script for super noop .. [cirrus] Force native script for super noop Force usage of super_detect_noop native script from cirrus. Only needed if Ia3e5b50 is merged before elastic 5.5.2 is deployed. Bug: T174652 Change-Id: I6c6594a70e5f8feed28d0c48df22f2db17d8f9f2 --- M wmf-config/CirrusSearch-common.php 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: EBernhardson: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/CirrusSearch-common.php b/wmf-config/CirrusSearch-common.php index e28af70..0be45cf 100644 --- a/wmf-config/CirrusSearch-common.php +++ b/wmf-config/CirrusSearch-common.php @@ -81,6 +81,8 @@ 'use_extra_timeout', // More accurate timeout (T152895) ], 'super_detect_noop' => true, + // TODO: remove once elastic 5.5.2 is deployed on all search clusters + 'super_detect_noop_enable_native' => true, 'id_hash_mod_filter' => true, 'documentVersion' => true, 'token_count_router' => true, -- To view, visit https://gerrit.wikimedia.org/r/376027 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6c6594a70e5f8feed28d0c48df22f2db17d8f9f2 Gerrit-PatchSet: 3 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: DCausseGerrit-Reviewer: DCausse Gerrit-Reviewer: EBernhardson Gerrit-Reviewer: Urbanecm Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[wmf/1.31.0-wmf.2]: Fix jQuery.fn.bind() call in mw.MediaWikiPlayer.loader.js
Krinkle has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/382089 ) Change subject: Fix jQuery.fn.bind() call in mw.MediaWikiPlayer.loader.js .. Fix jQuery.fn.bind() call in mw.MediaWikiPlayer.loader.js This is the most common one, and on almost every page view. I somehow missed it in 48298d38ae2e4fb. Bug: T169385 Bug: T175506 Change-Id: I5354f5ff5ce7d5506ced2797ff08f007aa7760e2 --- M resources/mw.MediaWikiPlayer.loader.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler refs/changes/89/382089/1 diff --git a/resources/mw.MediaWikiPlayer.loader.js b/resources/mw.MediaWikiPlayer.loader.js index b012704..6db46de 100644 --- a/resources/mw.MediaWikiPlayer.loader.js +++ b/resources/mw.MediaWikiPlayer.loader.js @@ -1,6 +1,6 @@ ( function ( mw, $ ) { // Add MediaWikiSupportPlayer dependency on players with a mediaWiki title - $( mw ).bind( 'EmbedPlayerUpdateDependencies', function ( event, embedPlayer, dependencySet ) { + $( mw ).on( 'EmbedPlayerUpdateDependencies', function ( event, embedPlayer, dependencySet ) { if ( $( embedPlayer ).attr( 'data-mwtitle' ) ) { $.merge( dependencySet, [ 'mw.MediaWikiPlayerSupport' ] ); } -- To view, visit https://gerrit.wikimedia.org/r/382089 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5354f5ff5ce7d5506ced2797ff08f007aa7760e2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TimedMediaHandler Gerrit-Branch: wmf/1.31.0-wmf.2 Gerrit-Owner: Krinkle___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[wmf/1.30.0-wmf.19]: Fix jQuery.fn.bind() call in mw.MediaWikiPlayer.loader.js
Krinkle has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/382088 ) Change subject: Fix jQuery.fn.bind() call in mw.MediaWikiPlayer.loader.js .. Fix jQuery.fn.bind() call in mw.MediaWikiPlayer.loader.js This is the most common one, and on almost every page view. I somehow missed it in 48298d38ae2e4fb. Bug: T169385 Bug: T175506 Change-Id: I5354f5ff5ce7d5506ced2797ff08f007aa7760e2 --- M resources/mw.MediaWikiPlayer.loader.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler refs/changes/88/382088/1 diff --git a/resources/mw.MediaWikiPlayer.loader.js b/resources/mw.MediaWikiPlayer.loader.js index b012704..6db46de 100644 --- a/resources/mw.MediaWikiPlayer.loader.js +++ b/resources/mw.MediaWikiPlayer.loader.js @@ -1,6 +1,6 @@ ( function ( mw, $ ) { // Add MediaWikiSupportPlayer dependency on players with a mediaWiki title - $( mw ).bind( 'EmbedPlayerUpdateDependencies', function ( event, embedPlayer, dependencySet ) { + $( mw ).on( 'EmbedPlayerUpdateDependencies', function ( event, embedPlayer, dependencySet ) { if ( $( embedPlayer ).attr( 'data-mwtitle' ) ) { $.merge( dependencySet, [ 'mw.MediaWikiPlayerSupport' ] ); } -- To view, visit https://gerrit.wikimedia.org/r/382088 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5354f5ff5ce7d5506ced2797ff08f007aa7760e2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TimedMediaHandler Gerrit-Branch: wmf/1.30.0-wmf.19 Gerrit-Owner: Krinkle___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[master]: Fix jQuery.fn.bind() call in mw.MediaWikiPlayer.loader.js
Krinkle has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/382087 ) Change subject: Fix jQuery.fn.bind() call in mw.MediaWikiPlayer.loader.js .. Fix jQuery.fn.bind() call in mw.MediaWikiPlayer.loader.js This is the most common one, and on almost every page view. I somehow missed it in 48298d38ae2e4fb. Bug: T169385 Bug: T175506 Change-Id: I5354f5ff5ce7d5506ced2797ff08f007aa7760e2 --- M resources/mw.MediaWikiPlayer.loader.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler refs/changes/87/382087/1 diff --git a/resources/mw.MediaWikiPlayer.loader.js b/resources/mw.MediaWikiPlayer.loader.js index b012704..6db46de 100644 --- a/resources/mw.MediaWikiPlayer.loader.js +++ b/resources/mw.MediaWikiPlayer.loader.js @@ -1,6 +1,6 @@ ( function ( mw, $ ) { // Add MediaWikiSupportPlayer dependency on players with a mediaWiki title - $( mw ).bind( 'EmbedPlayerUpdateDependencies', function ( event, embedPlayer, dependencySet ) { + $( mw ).on( 'EmbedPlayerUpdateDependencies', function ( event, embedPlayer, dependencySet ) { if ( $( embedPlayer ).attr( 'data-mwtitle' ) ) { $.merge( dependencySet, [ 'mw.MediaWikiPlayerSupport' ] ); } -- To view, visit https://gerrit.wikimedia.org/r/382087 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5354f5ff5ce7d5506ced2797ff08f007aa7760e2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TimedMediaHandler Gerrit-Branch: master Gerrit-Owner: Krinkle___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] oojs/ui[master]: PopupToolGroup: Move accelerator keys `padding` to themes
VolkerE has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/382090 ) Change subject: PopupToolGroup: Move accelerator keys `padding` to themes .. PopupToolGroup: Move accelerator keys `padding` to themes Moving accelerator keys `padding` rule to themes and slightly minimize in WikimediaUI theme. Change-Id: I7967180f974a33a66a2bf2d87ef9d0b8363008b5 --- M src/styles/toolgroups/PopupToolGroup.less M src/themes/apex/tools.less M src/themes/wikimediaui/tools.less 3 files changed, 11 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/90/382090/1 diff --git a/src/styles/toolgroups/PopupToolGroup.less b/src/styles/toolgroups/PopupToolGroup.less index 0cd6563..50b094e 100644 --- a/src/styles/toolgroups/PopupToolGroup.less +++ b/src/styles/toolgroups/PopupToolGroup.less @@ -56,11 +56,6 @@ .oo-ui-tool-accel { text-align: right; } - - .oo-ui-tool-accel:not( :empty ) { - // Push away from tool's title - padding-left: 3em; - } } .theme-oo-ui-popupToolGroup(); diff --git a/src/themes/apex/tools.less b/src/themes/apex/tools.less index c61581b..312165b 100644 --- a/src/themes/apex/tools.less +++ b/src/themes/apex/tools.less @@ -507,6 +507,12 @@ .oo-ui-tool-accel { color: @color-base--subtle; + + &:not( :empty ) { + // Push away from tool's title + padding-left: 3em; + } } + } } diff --git a/src/themes/wikimediaui/tools.less b/src/themes/wikimediaui/tools.less index 980a941..13ba4bd 100644 --- a/src/themes/wikimediaui/tools.less +++ b/src/themes/wikimediaui/tools.less @@ -378,6 +378,11 @@ .oo-ui-tool-accel { color: @color-base--subtle; line-height: @line-height-widget-singleline; + + &:not( :empty ) { + // Push away from tool's title + padding-left: @padding-horizontal-base * 1.5; + } } } -- To view, visit https://gerrit.wikimedia.org/r/382090 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7967180f974a33a66a2bf2d87ef9d0b8363008b5 Gerrit-PatchSet: 1 Gerrit-Project: oojs/ui Gerrit-Branch: master Gerrit-Owner: VolkerE___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...ParserFunctions[master]: Language objects aren't stubbed anymore
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/382078 ) Change subject: Language objects aren't stubbed anymore .. Language objects aren't stubbed anymore Change-Id: I3fc2130a5f5a0e3c2df5a0c5fea63dab6f8a8549 --- M ParserFunctions_body.php 1 file changed, 0 insertions(+), 2 deletions(-) Approvals: jenkins-bot: Verified Jforrester: Looks good to me, approved diff --git a/ParserFunctions_body.php b/ParserFunctions_body.php index a28604b..ead04dd 100644 --- a/ParserFunctions_body.php +++ b/ParserFunctions_body.php @@ -480,8 +480,6 @@ } else { // use wiki's content language $langObject = $parser->getFunctionLang(); - // $ttl is passed by reference, which doesn't work right on stub objects - StubObject::unstub( $langObject ); } $result = $langObject->sprintfDate( $format, $ts, $tz, $ttl ); } else { -- To view, visit https://gerrit.wikimedia.org/r/382078 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3fc2130a5f5a0e3c2df5a0c5fea63dab6f8a8549 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ParserFunctions Gerrit-Branch: master Gerrit-Owner: ChadGerrit-Reviewer: Jackmcbarn Gerrit-Reviewer: Jforrester Gerrit-Reviewer: Krinkle Gerrit-Reviewer: MaxSem Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Fix: Unable to submit Wikidata description in Traditional Ch...
Cooltey has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/382086 ) Change subject: Fix: Unable to submit Wikidata description in Traditional Chinese articles .. Fix: Unable to submit Wikidata description in Traditional Chinese articles In this update: - Add a method to send the language code to from "zh-hant" or "zh-hans" to "zh" when submitting the wikidata description. It seems to be a proper way to handle this issue, otherwise the zh-hant users will not see the updated description after submitting it. The only concern will be all the zh variants users will use the same "Chinese" slot in the Wikidata TODO: Remove this method when MCS can handle zhwiki variants. Bug: T177342 Change-Id: I4b665abe0f6ed5000f0881d2b15bad80d553cc55 --- M app/src/main/java/org/wikipedia/descriptions/DescriptionEditClient.java M app/src/main/java/org/wikipedia/util/L10nUtil.java 2 files changed, 12 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/86/382086/1 diff --git a/app/src/main/java/org/wikipedia/descriptions/DescriptionEditClient.java b/app/src/main/java/org/wikipedia/descriptions/DescriptionEditClient.java index 51bf924..8a64ada 100644 --- a/app/src/main/java/org/wikipedia/descriptions/DescriptionEditClient.java +++ b/app/src/main/java/org/wikipedia/descriptions/DescriptionEditClient.java @@ -17,6 +17,7 @@ import org.wikipedia.page.Page; import org.wikipedia.page.PageProperties; import org.wikipedia.page.PageTitle; +import org.wikipedia.util.L10nUtil; import org.wikipedia.util.ReleaseUtil; import java.util.Arrays; @@ -94,8 +95,8 @@ boolean loggedIn, @NonNull final Callback cb) { -Call call = service.edit(pageTitle.getWikiSite().languageCode(), -pageTitle.getWikiSite().languageCode(), pageTitle.getWikiSite().dbName(), +Call call = service.edit(L10nUtil.handleDescriptionLanguageCode(pageTitle), +L10nUtil.handleDescriptionLanguageCode(pageTitle), pageTitle.getWikiSite().dbName(), pageTitle.getPrefixedText(), description, editToken, loggedIn ? "user" : null); call.enqueue(new retrofit2.Callback() { diff --git a/app/src/main/java/org/wikipedia/util/L10nUtil.java b/app/src/main/java/org/wikipedia/util/L10nUtil.java index 445cb3e..463711f 100644 --- a/app/src/main/java/org/wikipedia/util/L10nUtil.java +++ b/app/src/main/java/org/wikipedia/util/L10nUtil.java @@ -229,6 +229,15 @@ } } +public static String handleDescriptionLanguageCode(PageTitle pageTitle) { +// TODO: remove this when the MCS can handle zhwiki variants +if (!pageTitle.getWikiSite().languageCode().startsWith(CHINESE_LANGUAGE_CODE)) { +return pageTitle.getWikiSite().languageCode(); +} else { +return CHINESE_LANGUAGE_CODE; +} +} + private L10nUtil() { } } -- To view, visit https://gerrit.wikimedia.org/r/382086 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4b665abe0f6ed5000f0881d2b15bad80d553cc55 Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Cooltey___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: Reclassify jobs as cli in request logging
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/382041 ) Change subject: Reclassify jobs as cli in request logging .. Reclassify jobs as cli in request logging Because job runners, at least in wmf prod, as run via a webrequest to a local hhvm instance they get classified as 'web'. Lets mark them as cli instead. Still a bit of a lie, but seems "more" accurate. Change-Id: Ia71e60c1ee10bbf0202affa39d7c6e012d9fe497 --- M includes/Util.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Smalyshev: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Util.php b/includes/Util.php index 5a429a0..b41993d 100644 --- a/includes/Util.php +++ b/includes/Util.php @@ -430,7 +430,7 @@ * @return string The context the request is in. Either cli, api or web. */ public static function getExecutionContext() { - if ( PHP_SAPI === 'cli' ) { + if ( PHP_SAPI === 'cli' || defined( 'MEDIAWIKI_JOB_RUNNER' ) ) { return 'cli'; } elseif ( defined( 'MW_API' ) ) { return 'api'; -- To view, visit https://gerrit.wikimedia.org/r/382041 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia71e60c1ee10bbf0202affa39d7c6e012d9fe497 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CirrusSearch Gerrit-Branch: master Gerrit-Owner: EBernhardsonGerrit-Reviewer: DCausse Gerrit-Reviewer: Gehel Gerrit-Reviewer: Krinkle Gerrit-Reviewer: Smalyshev Gerrit-Reviewer: Tjones Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: Allow controllig min_should_match in the filter clause
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/381964 ) Change subject: Allow controllig min_should_match in the filter clause .. Allow controllig min_should_match in the filter clause Should permit to evaluate if relaxing the default AND can produce better results. Bug: T177302 Change-Id: I67289c07bf98560e6fd1f31d6e9022d7ee9b635d --- M includes/Query/FullTextSimpleMatchQueryBuilder.php M profiles/FullTextQueryBuilderProfiles.config.php 2 files changed, 14 insertions(+), 5 deletions(-) Approvals: Smalyshev: Looks good to me, approved Tjones: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/includes/Query/FullTextSimpleMatchQueryBuilder.php b/includes/Query/FullTextSimpleMatchQueryBuilder.php index 2b0f441..9ffd90a 100644 --- a/includes/Query/FullTextSimpleMatchQueryBuilder.php +++ b/includes/Query/FullTextSimpleMatchQueryBuilder.php @@ -272,7 +272,7 @@ switch ( $type ) { case 'default': - $filter = $this->buildSimpleAllFilter( $query ); + $filter = $this->buildSimpleAllFilter( $filterDef, $query ); break; case 'constrain_title': $filter = $this->buildTitleFilter( $filterDef, $query ); @@ -287,10 +287,11 @@ /** * Builds a simple filter on all and all.plain when all terms must match * +* @param array[] $options array containing filter options * @param string $query * @return \Elastica\Query\AbstractQuery */ - private function buildSimpleAllFilter( $query ) { + private function buildSimpleAllFilter( $options, $query ) { $filter = new \Elastica\Query\BoolQuery(); // FIXME: We can't use solely the stem field here // - Depending on languages it may lack stopwords, @@ -298,7 +299,15 @@ foreach ( [ 'all', 'all.plain' ] as $field ) { $m = new \Elastica\Query\Match(); $m->setFieldQuery( $field, $query ); - $m->setFieldOperator( $field, 'AND' ); + $minShouldMatch = '100%'; + if ( isset( $options['settings'][$field]['minimum_should_match'] ) ) { + $minShouldMatch = $options['settings'][$field]['minimum_should_match']; + } + if ( $minShouldMatch === '100%' ) { + $m->setFieldOperator( $field, 'AND' ); + } else { + $m->setFieldMinimumShouldMatch( $field, $minShouldMatch ); + } $filter->addShould( $m ); } return $filter; @@ -318,7 +327,7 @@ */ private function buildTitleFilter( $options, $query ) { $filter = new \Elastica\Query\BoolQuery(); - $filter->addMust( $this->buildSimpleAllFilter( $query ) ); + $filter->addMust( $this->buildSimpleAllFilter( $options, $query ) ); $minShouldMatch = '3<80%'; if ( isset( $options['settings']['minimum_should_match'] ) ) { $minShouldMatch = $options['settings']['minimum_should_match']; diff --git a/profiles/FullTextQueryBuilderProfiles.config.php b/profiles/FullTextQueryBuilderProfiles.config.php index ff9261f..5e7cfa3 100644 --- a/profiles/FullTextQueryBuilderProfiles.config.php +++ b/profiles/FullTextQueryBuilderProfiles.config.php @@ -147,7 +147,7 @@ // which can be relaxed with minimum_should_match (defaults // to 3<80%) 'type' => 'constrain_title', - 'params' => [ + 'settings' => [ 'minimum_should_match' => '3<80%' ], ], -- To view, visit https://gerrit.wikimedia.org/r/381964 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I67289c07bf98560e6fd1f31d6e9022d7ee9b635d Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/extensions/CirrusSearch Gerrit-Branch: master Gerrit-Owner: DCausseGerrit-Reviewer: Cindy-the-browser-test-bot Gerrit-Reviewer: EBernhardson Gerrit-Reviewer: Gehel Gerrit-Reviewer: Smalyshev Gerrit-Reviewer: Tjones Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org
[MediaWiki-commits] [Gerrit] mediawiki...Flow[master]: Remove mentions of StubObject, just for typehinting
Hello Krinkle, I'd like you to do a code review. Please visit https://gerrit.wikimedia.org/r/382085 to review the following change. Change subject: Remove mentions of StubObject, just for typehinting .. Remove mentions of StubObject, just for typehinting StubObject & friends just simply aren't in style these days. They're not Agile. Change-Id: If19f1a8559ac9a9a6d8debfb16fe53288803d523 --- M includes/Import/Wikitext/ConversionStrategy.php M includes/Import/Wikitext/ImportSource.php 2 files changed, 3 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/85/382085/1 diff --git a/includes/Import/Wikitext/ConversionStrategy.php b/includes/Import/Wikitext/ConversionStrategy.php index 76719e3..70bc7f9 100644 --- a/includes/Import/Wikitext/ConversionStrategy.php +++ b/includes/Import/Wikitext/ConversionStrategy.php @@ -10,7 +10,6 @@ use LinkBatch; use Parser; use Psr\Log\LoggerInterface; -use StubObject; use Title; use User; use WikitextContent; @@ -41,7 +40,7 @@ protected $sourceStore; /** -* @var Parser|StubObject +* @var Parser */ protected $parser; @@ -63,7 +62,7 @@ protected $user; /** -* @param Parser|StubObject $parser +* @param Parser $parser * @param ImportSourceStore $sourceStore * @param LoggerInterface $logger * @param User $user User to take conversion actions are (applicable for actions diff --git a/includes/Import/Wikitext/ImportSource.php b/includes/Import/Wikitext/ImportSource.php index 7b3d75e..b6ad14a 100644 --- a/includes/Import/Wikitext/ImportSource.php +++ b/includes/Import/Wikitext/ImportSource.php @@ -12,7 +12,6 @@ use Parser; use ParserOptions; use Revision; -use StubObject; use Title; use User; @@ -30,7 +29,7 @@ /** * @param Title $title -* @param Parser|StubObject $parser +* @param Parser $parser * @param User $user User to take actions as * @param string $headerSuffix * @throws ImportException When $title is an external title -- To view, visit https://gerrit.wikimedia.org/r/382085 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If19f1a8559ac9a9a6d8debfb16fe53288803d523 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: ChadGerrit-Reviewer: Krinkle ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: Add referer information to search logs
EBernhardson has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/382084 ) Change subject: Add referer information to search logs .. Add referer information to search logs Our search logs contain a bunch of information, but figuring out what part of it is explicitly tied to usage on our sites vs external usages is difficult at best. Try and help out a little by including information on what referred the search request. Change-Id: If58ed7f9a89f9604873358564a530b90f3a8aac7 --- M includes/RequestLogger.php 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch refs/changes/84/382084/1 diff --git a/includes/RequestLogger.php b/includes/RequestLogger.php index b0baf96..5f4d536 100644 --- a/includes/RequestLogger.php +++ b/includes/RequestLogger.php @@ -262,6 +262,8 @@ // When tracking down performance issues it is useful to know if they are localized // to a particular set of instances 'host' => gethostname(), + // Referer can be helpful when trying to figure out what requests were made by bots. + 'referer' => (string) $wgRequest->getHeader( 'Referer' ) ?: '', ], 'requests' => $requests, ]; -- To view, visit https://gerrit.wikimedia.org/r/382084 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If58ed7f9a89f9604873358564a530b90f3a8aac7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CirrusSearch Gerrit-Branch: master Gerrit-Owner: EBernhardson___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Remove some remaining mentions of unstubbing from core
Hello Krinkle, I'd like you to do a code review. Please visit https://gerrit.wikimedia.org/r/382083 to review the following change. Change subject: Remove some remaining mentions of unstubbing from core .. Remove some remaining mentions of unstubbing from core Change-Id: Ife34335db7afd9bd4f0936cb90be227d7c4c9651 --- M includes/OutputPage.php M includes/api/ApiBase.php M includes/cache/MessageCache.php M includes/parser/ParserOptions.php 4 files changed, 3 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/83/382083/1 diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 5d9006a..785641d 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -1596,7 +1596,7 @@ if ( !$this->mParserOptions ) { if ( !$this->getContext()->getUser()->isSafeToLoad() ) { - // $wgUser isn't unstubbable yet, so don't try to get a + // $wgUser isn't loaded yet, so don't try to get a // ParserOptions for it. And don't cache this ParserOptions // either. $po = ParserOptions::newFromAnon(); diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php index 80aeff5..9dd670a 100644 --- a/includes/api/ApiBase.php +++ b/includes/api/ApiBase.php @@ -1385,7 +1385,7 @@ $limit2 = $limit2 ?: self::LIMIT_SML2; // This is a bit awkward, but we want to avoid calling canApiHighLimits() - // because it unstubs $wgUser + // because it loads the user object $valuesList = $this->explodeMultiValue( $value, $limit2 + 1 ); $sizeLimit = count( $valuesList ) > $limit1 && $this->mMainModule->canApiHighLimits() ? $limit2 diff --git a/includes/cache/MessageCache.php b/includes/cache/MessageCache.php index 768f980..62af6b1 100644 --- a/includes/cache/MessageCache.php +++ b/includes/cache/MessageCache.php @@ -187,7 +187,7 @@ if ( !$this->mParserOptions ) { if ( !$wgUser->isSafeToLoad() ) { - // $wgUser isn't unstubbable yet, so don't try to get a + // $wgUser isn't loaded yet, so don't try to get a // ParserOptions for it. And don't cache this ParserOptions // either. $po = ParserOptions::newFromAnon(); diff --git a/includes/parser/ParserOptions.php b/includes/parser/ParserOptions.php index c7146a1..b6cc835 100644 --- a/includes/parser/ParserOptions.php +++ b/includes/parser/ParserOptions.php @@ -944,9 +944,6 @@ } if ( $lang === null ) { global $wgLang; - if ( !StubObject::isRealObject( $wgLang ) ) { - $wgLang->_unstub(); - } $lang = $wgLang; } $this->initialiseFromUser( $user, $lang ); -- To view, visit https://gerrit.wikimedia.org/r/382083 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ife34335db7afd9bd4f0936cb90be227d7c4c9651 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: ChadGerrit-Reviewer: Krinkle ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: Remove unstub logic
Chad has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/382082 ) Change subject: Remove unstub logic .. Remove unstub logic User objects haven't been stubbed in awhile, and language objects aren't being stubbed anymore. While we're here, swap a few MWException -> InvalidArgumentException since they're more accurate :) Change-Id: I7e2f2aa135b024fb653c3ec13181d7015383ff2f --- M includes/DiscussionParser.php M includes/model/Event.php M includes/model/Notification.php 3 files changed, 9 insertions(+), 14 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo refs/changes/82/382082/1 diff --git a/includes/DiscussionParser.php b/includes/DiscussionParser.php index 3bc4826..3672bf6 100644 --- a/includes/DiscussionParser.php +++ b/includes/DiscussionParser.php @@ -1,5 +1,6 @@ getLanguage(), 150, $title ); break; @@ -125,7 +123,7 @@ $header = self::extractHeader( $action['content'] ); $snippet = self::getTextSnippet( self::stripSignature( self::stripHeader( $action['content'] ), $title ), - $wgLang, + RequestContext::getMain()->getLanguage(), 150, $title ); break; diff --git a/includes/model/Event.php b/includes/model/Event.php index ecc0941..a13ba25 100644 --- a/includes/model/Event.php +++ b/includes/model/Event.php @@ -145,16 +145,13 @@ if ( $obj->title ) { if ( !$obj->title instanceof Title ) { - throw new MWException( 'Invalid title parameter' ); + throw new InvalidArgumentException( 'Invalid title parameter' ); } $obj->setTitle( $obj->title ); } - if ( $obj->agent && ! - ( $obj->agent instanceof User || - $obj->agent instanceof StubObject ) - ) { - throw new MWException( "Invalid user parameter" ); + if ( $obj->agent && ! $obj->agent instanceof User ) { + throw new InvalidArgumentException( "Invalid user parameter" ); } if ( !Hooks::run( 'BeforeEchoEventInsert', [ $obj ] ) ) { diff --git a/includes/model/Notification.php b/includes/model/Notification.php index 4c5f338..02dee92 100644 --- a/includes/model/Notification.php +++ b/includes/model/Notification.php @@ -80,12 +80,12 @@ } } - if ( !$obj->user instanceof User && !$obj->user instanceof StubObject ) { - throw new MWException( 'Invalid user parameter, expected: User/StubObject object' ); + if ( !$obj->user instanceof User ) { + throw new InvalidArgumentException( 'Invalid user parameter, expected: User object' ); } if ( !$obj->event instanceof EchoEvent ) { - throw new MWException( 'Invalid event parameter, expected: EchoEvent object' ); + throw new InvalidArgumentException( 'Invalid event parameter, expected: EchoEvent object' ); } // Notification timestamp should be the same as event timestamp -- To view, visit https://gerrit.wikimedia.org/r/382082 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7e2f2aa135b024fb653c3ec13181d7015383ff2f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: Chad___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: yet another fix after a hurried role to profile move
Andrew Bogott has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/382081 ) Change subject: yet another fix after a hurried role to profile move .. yet another fix after a hurried role to profile move Change-Id: Ieff5004ad157971b579c038f405552ad68f17469 --- R modules/profile/files/labs/downloadserver.nginx 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Andrew Bogott: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/profile/manifests/labs/downloadserver.nginx b/modules/profile/files/labs/downloadserver.nginx similarity index 100% rename from modules/profile/manifests/labs/downloadserver.nginx rename to modules/profile/files/labs/downloadserver.nginx -- To view, visit https://gerrit.wikimedia.org/r/382081 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ieff5004ad157971b579c038f405552ad68f17469 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Andrew BogottGerrit-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] operations/puppet[production]: yet another fix after a hurried role to profile move
Andrew Bogott has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/382081 ) Change subject: yet another fix after a hurried role to profile move .. yet another fix after a hurried role to profile move Change-Id: Ieff5004ad157971b579c038f405552ad68f17469 --- R modules/profile/files/labs/downloadserver.nginx 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/81/382081/1 diff --git a/modules/profile/manifests/labs/downloadserver.nginx b/modules/profile/files/labs/downloadserver.nginx similarity index 100% rename from modules/profile/manifests/labs/downloadserver.nginx rename to modules/profile/files/labs/downloadserver.nginx -- To view, visit https://gerrit.wikimedia.org/r/382081 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ieff5004ad157971b579c038f405552ad68f17469 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] operations/mediawiki-config[master]: Enable AbuseFilter runtime profile on Portuguese Wikipedia
Dmaza has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/382080 ) Change subject: Enable AbuseFilter runtime profile on Portuguese Wikipedia .. Enable AbuseFilter runtime profile on Portuguese Wikipedia Bug: T177336 Change-Id: Ie0056fe3b24c9de7cedf461df0bd28374ed1ad72 --- M wmf-config/InitialiseSettings.php 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/80/382080/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 4c6f633..e29cbc0 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -13002,6 +13002,7 @@ 'enwiki' => true, 'mediawikiwiki' => true, 'metawiki' => true, + 'ptwiki' => true, 'testwiki' => true, 'wikidatawiki' => true, ], -- To view, visit https://gerrit.wikimedia.org/r/382080 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie0056fe3b24c9de7cedf461df0bd28374ed1ad72 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Dmaza___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: downloadserver: fix path to nginx config
Andrew Bogott has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/382079 ) Change subject: downloadserver: fix path to nginx config .. downloadserver: fix path to nginx config Change-Id: I2635570da9e9115fa55e93cd0cbec4963a6538d8 --- M modules/profile/manifests/labs/downloadserver.pp 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Andrew Bogott: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/profile/manifests/labs/downloadserver.pp b/modules/profile/manifests/labs/downloadserver.pp index 1a8c106..ef9a6d9 100644 --- a/modules/profile/manifests/labs/downloadserver.pp +++ b/modules/profile/manifests/labs/downloadserver.pp @@ -15,7 +15,7 @@ } nginx::site { 'downloadserver': -source => 'puppet:///modules/role/labs/downloadserver.nginx', +source => 'puppet:///modules/profile/labs/downloadserver.nginx', require => Labs_lvm::Volume['srv'], } } -- To view, visit https://gerrit.wikimedia.org/r/382079 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2635570da9e9115fa55e93cd0cbec4963a6538d8 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Andrew BogottGerrit-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] operations/puppet[production]: downloadserver: fix path to nginx config
Andrew Bogott has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/382079 ) Change subject: downloadserver: fix path to nginx config .. downloadserver: fix path to nginx config Change-Id: I2635570da9e9115fa55e93cd0cbec4963a6538d8 --- M modules/profile/manifests/labs/downloadserver.pp 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/79/382079/1 diff --git a/modules/profile/manifests/labs/downloadserver.pp b/modules/profile/manifests/labs/downloadserver.pp index 1a8c106..ef9a6d9 100644 --- a/modules/profile/manifests/labs/downloadserver.pp +++ b/modules/profile/manifests/labs/downloadserver.pp @@ -15,7 +15,7 @@ } nginx::site { 'downloadserver': -source => 'puppet:///modules/role/labs/downloadserver.nginx', +source => 'puppet:///modules/profile/labs/downloadserver.nginx', require => Labs_lvm::Volume['srv'], } } -- To view, visit https://gerrit.wikimedia.org/r/382079 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2635570da9e9115fa55e93cd0cbec4963a6538d8 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] operations/puppet[production]: Add a profile for a trivial file download server
Andrew Bogott has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/382069 ) Change subject: Add a profile for a trivial file download server .. Add a profile for a trivial file download server Bug: T177293 Change-Id: I42e593cb9048162826cc6c07ac77a69189996039 --- A modules/profile/manifests/labs/downloadserver.nginx A modules/profile/manifests/labs/downloadserver.pp 2 files changed, 29 insertions(+), 0 deletions(-) Approvals: Andrew Bogott: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/profile/manifests/labs/downloadserver.nginx b/modules/profile/manifests/labs/downloadserver.nginx new file mode 100644 index 000..406a226 --- /dev/null +++ b/modules/profile/manifests/labs/downloadserver.nginx @@ -0,0 +1,8 @@ +# THIS FILE IS MANAGED BY PUPPET +server { +root /srv/public_files; + +location / { +autoindex on; +} +} diff --git a/modules/profile/manifests/labs/downloadserver.pp b/modules/profile/manifests/labs/downloadserver.pp new file mode 100644 index 000..1a8c106 --- /dev/null +++ b/modules/profile/manifests/labs/downloadserver.pp @@ -0,0 +1,21 @@ +# Simple file server for the 'download' project +# +# filtertags: labs-project-download +class profile::labs::downloadserver { +labs_lvm::volume { 'srv': +mountat => '/srv', +} + +file { '/srv/public_files': +ensure => directory, +owner => 'root', +group => 'root', +mode=> '0555', +require => Labs_lvm::Volume['srv'], +} + +nginx::site { 'downloadserver': +source => 'puppet:///modules/role/labs/downloadserver.nginx', +require => Labs_lvm::Volume['srv'], +} +} -- To view, visit https://gerrit.wikimedia.org/r/382069 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I42e593cb9048162826cc6c07ac77a69189996039 Gerrit-PatchSet: 6 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Andrew BogottGerrit-Reviewer: Andrew Bogott 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] mediawiki...ParserFunctions[master]: Language objects aren't stubbed anymore
Hello Krinkle, I'd like you to do a code review. Please visit https://gerrit.wikimedia.org/r/382078 to review the following change. Change subject: Language objects aren't stubbed anymore .. Language objects aren't stubbed anymore Change-Id: I3fc2130a5f5a0e3c2df5a0c5fea63dab6f8a8549 --- M ParserFunctions_body.php 1 file changed, 0 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ParserFunctions refs/changes/78/382078/1 diff --git a/ParserFunctions_body.php b/ParserFunctions_body.php index a28604b..ead04dd 100644 --- a/ParserFunctions_body.php +++ b/ParserFunctions_body.php @@ -480,8 +480,6 @@ } else { // use wiki's content language $langObject = $parser->getFunctionLang(); - // $ttl is passed by reference, which doesn't work right on stub objects - StubObject::unstub( $langObject ); } $result = $langObject->sprintfDate( $format, $ts, $tz, $ttl ); } else { -- To view, visit https://gerrit.wikimedia.org/r/382078 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3fc2130a5f5a0e3c2df5a0c5fea63dab6f8a8549 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ParserFunctions Gerrit-Branch: master Gerrit-Owner: ChadGerrit-Reviewer: Krinkle ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] oojs/ui[master]: WikimediaUI theme: Fix flagged elements' icon `opacity`
VolkerE has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/382077 ) Change subject: WikimediaUI theme: Fix flagged elements' icon `opacity` .. WikimediaUI theme: Fix flagged elements' icon `opacity` Flagged elements' icon `opacity` should remain `1` to be aligned to label color. Change-Id: Idd650b52ebe4ff8f322c2b0935542b9e875542df --- M src/themes/wikimediaui/tools.less 1 file changed, 23 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/77/382077/1 diff --git a/src/themes/wikimediaui/tools.less b/src/themes/wikimediaui/tools.less index b0ddfff..8791af1 100644 --- a/src/themes/wikimediaui/tools.less +++ b/src/themes/wikimediaui/tools.less @@ -120,6 +120,12 @@ opacity: @opacity-base; } } + + &[class*='oo-ui-flaggedElement'] { + .oo-ui-iconElement-icon { + opacity: @opacity-base; + } + } } &.oo-ui-widget-disabled .oo-ui-iconElement-icon { @@ -388,14 +394,6 @@ box-shadow @transition-ease-quick ); - // We don't generalize this further, as only PopupToolGroup carries them, - // all other ToolGroups own Tools, which come with their own icon rules - .oo-ui-iconElement-icon, - .oo-ui-indicatorElement-indicator { - opacity: @opacity-icon-base; - .oo-ui-transition( opacity @transition-ease-quick ); - } - &:hover { background-color: @background-color-tool--hover; } @@ -404,6 +402,14 @@ background-color: @background-color-tool--active; } + // We don't generalize this further, as only PopupToolGroup carries them, + // all other ToolGroups own Tools, which come with their own icon rules + .oo-ui-iconElement-icon, + .oo-ui-indicatorElement-indicator { + opacity: @opacity-icon-base; + .oo-ui-transition( opacity @transition-ease-quick ); + } + &:hover, &:active { .oo-ui-iconElement-icon, @@ -412,6 +418,15 @@ } } } + + &[class*='oo-ui-flaggedElement'] > .oo-ui-popupToolGroup-handle { + &, + &:hover { + .oo-ui-iconElement-icon { + opacity: @opacity-icon-base--selected; + } + } + } } &.oo-ui-popupToolGroup-active { -- To view, visit https://gerrit.wikimedia.org/r/382077 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idd650b52ebe4ff8f322c2b0935542b9e875542df Gerrit-PatchSet: 1 Gerrit-Project: oojs/ui Gerrit-Branch: master Gerrit-Owner: VolkerE___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: Rakefile: return empty list if no files were linted
Volans has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/382076 ) Change subject: Rakefile: return empty list if no files were linted .. Rakefile: return empty list if no files were linted Change-Id: I7392369bed7f29ab27251ee7d5894e9d5701ce70 --- M Rakefile 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Andrew Bogott: Looks good to me, but someone else must approve jenkins-bot: Verified Volans: Looks good to me, approved diff --git a/Rakefile b/Rakefile index e582aca..b6479da 100644 --- a/Rakefile +++ b/Rakefile @@ -204,7 +204,7 @@ linter.file = puppet_file linter.run end - linter.problems + linter.problems || [] end def setup_wmf_lint_check @@ -278,7 +278,7 @@ if @git.detached_head? sha1 = @git.revparse('HEAD') @git.reset_hard('HEAD^') - old_problems = linter_problems changed [:old] + old_problems = linter_problems changed[:old] @git.checkout(sha1) else @git.branch(random_branch_name).in_branch do -- To view, visit https://gerrit.wikimedia.org/r/382076 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7392369bed7f29ab27251ee7d5894e9d5701ce70 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: VolansGerrit-Reviewer: Andrew Bogott Gerrit-Reviewer: Giuseppe Lavagetto Gerrit-Reviewer: Volans Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: Rakefile: return empty list if no files were linted
Volans has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/382076 ) Change subject: Rakefile: return empty list if no files were linted .. Rakefile: return empty list if no files were linted Change-Id: I7392369bed7f29ab27251ee7d5894e9d5701ce70 --- M Rakefile 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/76/382076/1 diff --git a/Rakefile b/Rakefile index e582aca..b6479da 100644 --- a/Rakefile +++ b/Rakefile @@ -204,7 +204,7 @@ linter.file = puppet_file linter.run end - linter.problems + linter.problems || [] end def setup_wmf_lint_check @@ -278,7 +278,7 @@ if @git.detached_head? sha1 = @git.revparse('HEAD') @git.reset_hard('HEAD^') - old_problems = linter_problems changed [:old] + old_problems = linter_problems changed[:old] @git.checkout(sha1) else @git.branch(random_branch_name).in_branch do -- To view, visit https://gerrit.wikimedia.org/r/382076 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7392369bed7f29ab27251ee7d5894e9d5701ce70 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Volans___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Cite[master]: Use HTML5 id attributes; remove use of deprecated Sanitizer:...
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/378774 ) Change subject: Use HTML5 id attributes; remove use of deprecated Sanitizer::escapeId() .. Use HTML5 id attributes; remove use of deprecated Sanitizer::escapeId() When using HTML5 ids, we need to take greater care to properly escape the id (or derived strings) before passing them back through Parser::recursiveTagParse(). Bug: T176170 Change-Id: I89a4f8ba24b867f2d5ccdc2bf9a4312ab9b385a9 --- M extension.json M includes/Cite.php M tests/parser/citeParserTests.txt 3 files changed, 72 insertions(+), 24 deletions(-) Approvals: MaxSem: Looks good to me, approved jenkins-bot: Verified diff --git a/extension.json b/extension.json index 28a9229..3be2002 100644 --- a/extension.json +++ b/extension.json @@ -14,6 +14,9 @@ "descriptionmsg": "cite-desc", "license-name": "GPL-2.0+", "type": "parserhook", + "requires": { + "MediaWiki": ">= 1.30.0" + }, "MessagesDirs": { "cite": "i18n", "ve-cite": "modules/ve-cite/i18n" diff --git a/includes/Cite.php b/includes/Cite.php index 69a0f99..1568f78 100644 --- a/includes/Cite.php +++ b/includes/Cite.php @@ -269,12 +269,18 @@ if ( $group != $this->mReferencesGroup ) { # and have conflicting group attributes. $this->mReferencesErrors[] = - $this->error( 'cite_error_references_group_mismatch', htmlspecialchars( $group ) ); + $this->error( + 'cite_error_references_group_mismatch', + Sanitizer::safeEncodeAttribute( $group ) + ); } elseif ( $str !== '' ) { if ( !$isSectionPreview && !isset( $this->mRefs[$group] ) ) { # Called with group attribute not defined in text. $this->mReferencesErrors[] = - $this->error( 'cite_error_references_missing_group', htmlspecialchars( $group ) ); + $this->error( + 'cite_error_references_missing_group', + Sanitizer::safeEncodeAttribute( $group ) + ); } elseif ( $key === null || $key === '' ) { # calls inside must be named $this->mReferencesErrors[] = @@ -282,7 +288,7 @@ } elseif ( !$isSectionPreview && !isset( $this->mRefs[$group][$key] ) ) { # Called with name attribute not defined in text. $this->mReferencesErrors[] = - $this->error( 'cite_error_references_missing_key', $key ); + $this->error( 'cite_error_references_missing_key', Sanitizer::safeEncodeAttribute( $key ) ); } else { if ( isset( $this->mRefs[$group][$key]['text'] ) && @@ -301,7 +307,7 @@ } else { # called in has no content. $this->mReferencesErrors[] = - $this->error( 'cite_error_empty_references_define', $key ); + $this->error( 'cite_error_empty_references_define', Sanitizer::safeEncodeAttribute( $key ) ); } return ''; } @@ -403,13 +409,13 @@ } if ( isset( $argv['name'] ) ) { // Key given. - $key = Sanitizer::escapeId( $argv['name'], 'noninitial' ); + $key = Sanitizer::escapeIdForAttribute( $argv['name'] ); unset( $argv['name'] ); --$cnt; } if ( isset( $argv['follow'] ) ) { // Follow given. - $follow = Sanitizer::escapeId( $argv['follow'], 'noninitial' ); + $follow = Sanitizer::escapeIdForAttribute( $argv['follow'] ); unset( $argv['follow'] ); --$cnt; } @@
[MediaWiki-commits] [Gerrit] mediawiki...Wigo3[master]: Remove ancient PARSERFIRSTCALLINIT support
Chad has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/382075 ) Change subject: Remove ancient PARSERFIRSTCALLINIT support .. Remove ancient PARSERFIRSTCALLINIT support Some whitespace removal too because I used wrong editor settings Change-Id: I11f7ded27031ae63d16e4c58917e05fb06736234 --- M checkbox.php M multi.php M slider.php 3 files changed, 41 insertions(+), 64 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wigo3 refs/changes/75/382075/1 diff --git a/checkbox.php b/checkbox.php index 94f5896..787f707 100644 --- a/checkbox.php +++ b/checkbox.php @@ -9,18 +9,10 @@ 'description' => 'Checkbox voting. Requires the wigo and slider extensions' ); -//Avoid unstubbing $wgParser on setHook() too early on modern (1.12+) MW versions, as per r35980 -if ( defined( 'MW_SUPPORTS_PARSERFIRSTCALLINIT' ) ) { - $wgHooks['ParserFirstCallInit'][] = 'checkboxinit'; -} else { // Otherwise do things the old fashioned way - $wgExtensionFunctions[] = 'checkboxinit'; -} - -function checkboxinit() { - global $wgParser; - $wgParser->setHook('checkbox','checkboxrender'); - $wgParser->setHook('checkboxes','checkboxesrender'); - return true; +$wgHooks['ParserFirstCallInit'][] = function( $parser ) { + $parser->setHook('checkbox','checkboxrender'); + $parser->setHook('checkboxes','checkboxesrender'); + return true; } function checkboxesrender($input, $args, $parser) @@ -37,10 +29,10 @@ $output = $parser->recursiveTagParse($input); return "{$err} {$output}"; } - + #avoid conflicts - checkbox will add check prefix $voteid = "set" . $voteid; - + $set = $args['set']; if (!$set) { @@ -55,12 +47,12 @@ if (array_key_exists('embedded',$args) && strcasecmp($args['embedded'],"yes") === 0) { $embedded = true; } - + //Get the checkbox set $list = wfMsg("checkboxes/{$set}"); $list = preg_replace("/\*/","",$list); $options = split("\n",$list); - + $output = ''; $ids = array(); $jshacka = array(); @@ -85,7 +77,7 @@ $votebutton = "" . (($closed || $embedded) ? "" : " " . wfMsg("slider-votebutton") . "") . ""; - + //get all the votes in one request $ids_l = implode(",",$ids); $myvotesscript = "" . @@ -101,7 +93,7 @@ "}" . "}" . "});" . ""; - + return $parser->recursiveTagParse($output) . $votebutton . $myvotesscript; } @@ -120,11 +112,11 @@ $output = $parser->recursiveTagParse($input); return "{$err} {$output}"; } - + //inject js global $wgJsMimeType, $wgScriptPath; $parser->mOutput->addHeadItem("",'wigo3js'); - + if (array_key_exists('bulkmode',$args) && strcasecmp($args['bulkmode'],"yes") === 0) { $bulkmode = true; } else { @@ -179,7 +171,7 @@ "}" . "});" . ""; } - + wfLoadExtensionMessages('slider'); if (array_key_exists('closed',$args) && strcasecmp($args['closed'],"yes") === 0) { return " " . diff --git a/multi.php b/multi.php index 5005c38..37e911f 100644 --- a/multi.php +++ b/multi.php @@ -10,18 +10,10 @@ 'version' => '3.5' ); -//Avoid unstubbing $wgParser on setHook() too early on modern (1.12+) MW versions, as per r35980 -if ( defined( 'MW_SUPPORTS_PARSERFIRSTCALLINIT' ) ) { - $wgHooks['ParserFirstCallInit'][] = 'multiinit'; -} else { // Otherwise do things the old fashioned way - $wgExtensionFunctions[] = 'multiinit'; -} -function multiinit() { - global $wgParser; - wfLoadExtensionMessages('multi'); - $wgParser->setHook('multi','multirender'); - return true; +$wgHooks['ParserFirstCallInit'][] = function( $parser ) { + $parser->setHook('multi','multirender'); + return true; } global $wgUseAjax; @@ -184,7 +176,7 @@ } $output .= "" . -"" . +"" . $line . "" . "" . @@ -193,7 +185,7 @@ "" . "" . "" . - "" . + "" . "" . ""; } @@ -209,19 +201,19 @@ } $output .= "" . -"" . +"" . $line . "" . "" . $resultstr[$i] . "" . -"" . +"" . "" . wfMsg("multi-votebutton") . "" . "" . "" . "" . "" . - "" . + "" . "" . ""; } diff --git a/slider.php b/slider.php index ad16dc0..22814a5 100644 --- a/slider.php +++ b/slider.php @@ -9,12 +9,12 @@ 'description' => 'Creates a slider for voting. Requires the wigo extension' ); -//Avoid unstubbing $wgParser on setHook() too early on modern (1.12+) MW versions, as per r35980 if (
[MediaWiki-commits] [Gerrit] mediawiki...SemanticPageMaker[master]: Remove MediaWiki 1.11 compat
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/382071 ) Change subject: Remove MediaWiki 1.11 compat .. Remove MediaWiki 1.11 compat ParserFirstCallInit added in 1.12 (10 years ago) Change-Id: I668380072f34267408d7cfb6997d0a34302e600f --- M includes/widgets/SPM_WidgetInitialize.php 1 file changed, 1 insertion(+), 8 deletions(-) Approvals: Chad: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/widgets/SPM_WidgetInitialize.php b/includes/widgets/SPM_WidgetInitialize.php index a2e4977..058fdb1 100644 --- a/includes/widgets/SPM_WidgetInitialize.php +++ b/includes/widgets/SPM_WidgetInitialize.php @@ -77,14 +77,7 @@ $wgHooks['smwInitDatatypes'][] = 'SPMWidgetUtils::smwInitDatatypes'; $wgHooks['smwInitDatatypes'][] = 'SPMWidgetDataTypeUtils::smwInitDatatypes'; global $wgParser; -if ( defined( 'MW_SUPPORTS_PARSERFIRSTCALLINIT' ) ) { - $wgHooks['ParserFirstCallInit'][] = 'SPMWidgetParserFunctions::registerFunctions'; -} else { - if ( class_exists( 'StubObject' ) && !StubObject::isRealObject( $wgParser ) ) { - $wgParser->_unstub(); - } - SPMWidgetParserFunctions::registerFunctions( $wgParser ); -} + $wgHooks['ParserFirstCallInit'][] = 'SPMWidgetParserFunctions::registerFunctions'; // WOM api output $wgAutoloadClasses['SPMWidgetApiUtils'] = $wgSPMIP . '/includes/widgets/SPM_WidgetApiUtils.php'; -- To view, visit https://gerrit.wikimedia.org/r/382071 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I668380072f34267408d7cfb6997d0a34302e600f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SemanticPageMaker Gerrit-Branch: master Gerrit-Owner: KrinkleGerrit-Reviewer: Aaron Schulz Gerrit-Reviewer: Chad Gerrit-Reviewer: MaxSem Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Support uploads with UTF-8 names on Windows
Brion VIBBER has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/382074 ) Change subject: Support uploads with UTF-8 names on Windows .. Support uploads with UTF-8 names on Windows On PHP 7.1 and later, filesystem functions on Windows use the Unicode system functions, which makes our file handling work for non-ASCII file names. Previously this was blacklisted for Windows on all PHP versions. Versions before 7.1 will still reject Unicode filenames with non-ASCII chars. Bug: T3780 Change-Id: I94377faa5185f133be2dfb7b9b6aeacbd582834f --- M includes/libs/filebackend/FSFileBackend.php 1 file changed, 6 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/74/382074/1 diff --git a/includes/libs/filebackend/FSFileBackend.php b/includes/libs/filebackend/FSFileBackend.php index 30548ef..3b373db 100644 --- a/includes/libs/filebackend/FSFileBackend.php +++ b/includes/libs/filebackend/FSFileBackend.php @@ -99,7 +99,12 @@ } public function getFeatures() { - return !$this->isWindows ? FileBackend::ATTR_UNICODE_PATHS : 0; + if ( $this->isWindows && version_compare( PHP_VERSION, '7.1', 'lt' ) ) { + // PHP before 7.1 used 8-bit code page for filesystem paths on Windows + return 0; + } else { + return FileBackend::ATTR_UNICODE_PATHS; + } } protected function resolveContainerPath( $container, $relStoragePath ) { -- To view, visit https://gerrit.wikimedia.org/r/382074 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I94377faa5185f133be2dfb7b9b6aeacbd582834f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Brion VIBBER___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Update mobileapps to 5dc0c02
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/382073 ) Change subject: Update mobileapps to 5dc0c02 .. Update mobileapps to 5dc0c02 List of changes: 7139e27 Add featured feed In the news entry for scowiki 949e7a5 Hygiene: update diff tests 43eb4e7 Don't try to get userinfo for subpages 4f80049 Strip any .reference elements be6d9c7 Hygiene: Break out removeAttributes transformation a4f603b Remove data-mw attributes before parsing summary 3dcc319 Fix definition of lead introduction f492d7d Redirects return 204 inside MCS 41709cd Add multi-lang.js script af6e6de Make top-pages script take language command line parameter d6c03af More top-pages script improvements 26376f9 Add more top-pages lists 5e5056c Add compare script for old and new extracts 4ec0f04 Update express to 4.16.0 d76c3d9 Add test cases for summary endpoint 5c32b64 Add fundraising test via announcement cards in France 3bb95e8 Fix removeNestedParentheticals parenthetical handling xxx Update node module dependencies Change-Id: I4f77ba4519fc2d9dc0e7998f82615334fa6589a9 --- M node_modules/accepts/package.json M node_modules/ajv/dist/ajv.min.js M node_modules/ajv/package.json M node_modules/body-parser/lib/read.js M node_modules/body-parser/package.json M node_modules/bytes/package.json M node_modules/compressible/package.json D node_modules/compression/node_modules/bytes/LICENSE D node_modules/compression/node_modules/bytes/index.js D node_modules/compression/node_modules/bytes/package.json M node_modules/compression/package.json M node_modules/debug/component.json M node_modules/debug/package.json A node_modules/debug/src/inspector-log.js M node_modules/debug/src/node.js M node_modules/etag/package.json M node_modules/express/lib/application.js M node_modules/express/lib/express.js M node_modules/express/lib/response.js M node_modules/express/lib/router/index.js M node_modules/express/lib/router/route.js M node_modules/express/lib/utils.js M node_modules/express/lib/view.js D node_modules/express/node_modules/qs/.editorconfig D node_modules/express/node_modules/qs/.eslintignore D node_modules/express/node_modules/qs/.eslintrc D node_modules/express/node_modules/qs/LICENSE D node_modules/express/node_modules/qs/dist/qs.js D node_modules/express/node_modules/qs/lib/formats.js D node_modules/express/node_modules/qs/lib/index.js D node_modules/express/node_modules/qs/lib/parse.js D node_modules/express/node_modules/qs/lib/stringify.js D node_modules/express/node_modules/qs/lib/utils.js D node_modules/express/node_modules/qs/package.json D node_modules/express/node_modules/qs/test/.eslintrc D node_modules/express/node_modules/qs/test/index.js D node_modules/express/node_modules/qs/test/parse.js D node_modules/express/node_modules/qs/test/stringify.js D node_modules/express/node_modules/qs/test/utils.js A node_modules/express/node_modules/setprototypeof/LICENSE A node_modules/express/node_modules/setprototypeof/index.d.ts A node_modules/express/node_modules/setprototypeof/index.js A node_modules/express/node_modules/setprototypeof/package.json M node_modules/express/package.json M node_modules/finalhandler/index.js M node_modules/finalhandler/package.json M node_modules/forwarded/package.json M node_modules/fresh/index.js M node_modules/fresh/package.json M node_modules/hot-shots/package.json D node_modules/hot-shots/types.d.ts M node_modules/ipaddr.js/LICENSE M node_modules/ipaddr.js/bower.json M node_modules/ipaddr.js/ipaddr.min.js M node_modules/ipaddr.js/lib/ipaddr.js M node_modules/ipaddr.js/package.json M node_modules/ipaddr.js/src/ipaddr.coffee M node_modules/ipaddr.js/test/ipaddr.test.coffee M node_modules/kad/package.json D node_modules/mime/.npmignore M node_modules/mime/LICENSE M node_modules/mime/build/test.js M node_modules/mime/mime.js M node_modules/mime/package.json M node_modules/mime/types.json M node_modules/parseurl/package.json M node_modules/proxy-addr/index.js M node_modules/proxy-addr/package.json M node_modules/qs/package.json M node_modules/request/package.json M node_modules/safe-buffer/package.json M node_modules/send/index.js M node_modules/send/package.json M node_modules/serve-static/index.js M node_modules/serve-static/package.json M node_modules/setprototypeof/package.json M node_modules/tough-cookie/lib/cookie.js M node_modules/tough-cookie/lib/pubsuffix.js M node_modules/tough-cookie/package.json A node_modules/utils-merge/.npmignore D node_modules/utils-merge/.travis.yml M node_modules/utils-merge/LICENSE M node_modules/utils-merge/package.json M node_modules/vary/index.js M node_modules/vary/package.json M src 86 files changed, 1,386 insertions(+), 3,688 deletions(-) Approvals: BearND: Looks good to me, approved jenkins-bot: Verified -- To view, visit https://gerrit.wikimedia.org/r/382073 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged
[MediaWiki-commits] [Gerrit] mediawiki...WikiObjectModel[master]: Remove MediaWiki 1.11 compat
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/382070 ) Change subject: Remove MediaWiki 1.11 compat .. Remove MediaWiki 1.11 compat ParserFirstCallInit added in 1.12 (10 years ago) Change-Id: I668380072f34267408d7cfb6997d0a34302e600f --- M includes/apis/WOM_OutputProcessor.php 1 file changed, 1 insertion(+), 8 deletions(-) Approvals: Chad: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/apis/WOM_OutputProcessor.php b/includes/apis/WOM_OutputProcessor.php index 648221b..cd070a3 100644 --- a/includes/apis/WOM_OutputProcessor.php +++ b/includes/apis/WOM_OutputProcessor.php @@ -2,14 +2,7 @@ if ( !defined( 'MEDIAWIKI' ) ) die; global $wgHooks, $wgParser; -if ( defined( 'MW_SUPPORTS_PARSERFIRSTCALLINIT' ) ) { - $wgHooks['ParserFirstCallInit'][] = 'WOMOutputProcessor::smwgWTregisterParserFunctions'; -} else { - if ( class_exists( 'StubObject' ) && !StubObject::isRealObject( $wgParser ) ) { - $wgParser->_unstub(); - } - WOMOutputProcessor::smwgWTregisterParserFunctions( $wgParser ); -} +$wgHooks['ParserFirstCallInit'][] = 'WOMOutputProcessor::smwgWTregisterParserFunctions'; global $wgOMOutputHookedParserFunctions; $wgOMOutputHookedParserFunctions = array( -- To view, visit https://gerrit.wikimedia.org/r/382070 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I668380072f34267408d7cfb6997d0a34302e600f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikiObjectModel Gerrit-Branch: master Gerrit-Owner: KrinkleGerrit-Reviewer: Aaron Schulz Gerrit-Reviewer: Chad Gerrit-Reviewer: MaxSem Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: RCFilters: Init highlight button based on model state
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/382009 ) Change subject: RCFilters: Init highlight button based on model state .. RCFilters: Init highlight button based on model state Bug: T177028 Change-Id: Idea7e09152e3176084f0634d24615a79364d77bb --- M resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterItemHighlightButton.js M resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.HighlightColorPickerWidget.js 2 files changed, 9 insertions(+), 6 deletions(-) Approvals: jenkins-bot: Verified Mooeypoo: Looks good to me, approved diff --git a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterItemHighlightButton.js b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterItemHighlightButton.js index 7426123..c840d7c 100644 --- a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterItemHighlightButton.js +++ b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterItemHighlightButton.js @@ -33,12 +33,14 @@ this.model = model; // Event - this.model.connect( this, { update: 'onModelUpdate' } ); + this.model.connect( this, { update: 'updateUiBasedOnModel' } ); this.colorPickerWidget.connect( this, { chooseColor: 'onChooseColor' } ); // This lives inside a MenuOptionWidget, which intercepts mousedown // to select the item. We want to prevent that when we click the highlight // button this.$element.on( 'mousedown', function ( e ) { e.stopPropagation(); } ); + + this.updateUiBasedOnModel(); this.$element .addClass( 'mw-rcfilters-ui-filterItemHighlightButton' ); @@ -60,7 +62,7 @@ /** * Respond to item model update event */ - mw.rcfilters.ui.FilterItemHighlightButton.prototype.onModelUpdate = function () { + mw.rcfilters.ui.FilterItemHighlightButton.prototype.updateUiBasedOnModel = function () { var currentColor = this.model.getHighlightColor(), widget = this; diff --git a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.HighlightColorPickerWidget.js b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.HighlightColorPickerWidget.js index 570647e..ad3b304 100644 --- a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.HighlightColorPickerWidget.js +++ b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.HighlightColorPickerWidget.js @@ -24,7 +24,7 @@ this.controller = controller; this.model = model; - this.currentSelection = ''; + this.currentSelection = 'none'; this.buttonSelect = new OO.ui.ButtonSelectWidget( { items: colors.map( function ( color ) { return new OO.ui.ButtonOptionWidget( { @@ -39,11 +39,12 @@ } ), classes: 'mw-rcfilters-ui-highlightColorPickerWidget-buttonSelect' } ); - this.selectColor( 'none' ); // Event - this.model.connect( this, { update: 'onModelUpdate' } ); + this.model.connect( this, { update: 'updateUiBasedOnModel' } ); this.buttonSelect.connect( this, { choose: 'onChooseColor' } ); + + this.updateUiBasedOnModel(); this.$element .addClass( 'mw-rcfilters-ui-highlightColorPickerWidget' ) @@ -73,7 +74,7 @@ /** * Respond to item model update event */ - mw.rcfilters.ui.HighlightColorPickerWidget.prototype.onModelUpdate = function () { + mw.rcfilters.ui.HighlightColorPickerWidget.prototype.updateUiBasedOnModel = function () { this.selectColor( this.model.getHighlightColor() || 'none' ); }; -- To view, visit https://gerrit.wikimedia.org/r/382009 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idea7e09152e3176084f0634d24615a79364d77bb Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: SbissonGerrit-Reviewer: Jack Phoenix Gerrit-Reviewer: Mooeypoo Gerrit-Reviewer: Zoranzoki21 Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Update mobileapps to 5dc0c02
BearND has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/382073 ) Change subject: Update mobileapps to 5dc0c02 .. Update mobileapps to 5dc0c02 List of changes: 7139e27 Add featured feed In the news entry for scowiki 949e7a5 Hygiene: update diff tests 43eb4e7 Don't try to get userinfo for subpages 4f80049 Strip any .reference elements be6d9c7 Hygiene: Break out removeAttributes transformation a4f603b Remove data-mw attributes before parsing summary 3dcc319 Fix definition of lead introduction f492d7d Redirects return 204 inside MCS 41709cd Add multi-lang.js script af6e6de Make top-pages script take language command line parameter d6c03af More top-pages script improvements 26376f9 Add more top-pages lists 5e5056c Add compare script for old and new extracts 4ec0f04 Update express to 4.16.0 d76c3d9 Add test cases for summary endpoint 5c32b64 Add fundraising test via announcement cards in France 3bb95e8 Fix removeNestedParentheticals parenthetical handling xxx Update node module dependencies Change-Id: I4f77ba4519fc2d9dc0e7998f82615334fa6589a9 --- M node_modules/accepts/package.json M node_modules/ajv/dist/ajv.min.js M node_modules/ajv/package.json M node_modules/body-parser/lib/read.js M node_modules/body-parser/package.json M node_modules/bytes/package.json M node_modules/compressible/package.json D node_modules/compression/node_modules/bytes/LICENSE D node_modules/compression/node_modules/bytes/index.js D node_modules/compression/node_modules/bytes/package.json M node_modules/compression/package.json M node_modules/debug/component.json M node_modules/debug/package.json A node_modules/debug/src/inspector-log.js M node_modules/debug/src/node.js M node_modules/etag/package.json M node_modules/express/lib/application.js M node_modules/express/lib/express.js M node_modules/express/lib/response.js M node_modules/express/lib/router/index.js M node_modules/express/lib/router/route.js M node_modules/express/lib/utils.js M node_modules/express/lib/view.js D node_modules/express/node_modules/qs/.editorconfig D node_modules/express/node_modules/qs/.eslintignore D node_modules/express/node_modules/qs/.eslintrc D node_modules/express/node_modules/qs/LICENSE D node_modules/express/node_modules/qs/dist/qs.js D node_modules/express/node_modules/qs/lib/formats.js D node_modules/express/node_modules/qs/lib/index.js D node_modules/express/node_modules/qs/lib/parse.js D node_modules/express/node_modules/qs/lib/stringify.js D node_modules/express/node_modules/qs/lib/utils.js D node_modules/express/node_modules/qs/package.json D node_modules/express/node_modules/qs/test/.eslintrc D node_modules/express/node_modules/qs/test/index.js D node_modules/express/node_modules/qs/test/parse.js D node_modules/express/node_modules/qs/test/stringify.js D node_modules/express/node_modules/qs/test/utils.js A node_modules/express/node_modules/setprototypeof/LICENSE A node_modules/express/node_modules/setprototypeof/index.d.ts A node_modules/express/node_modules/setprototypeof/index.js A node_modules/express/node_modules/setprototypeof/package.json M node_modules/express/package.json M node_modules/finalhandler/index.js M node_modules/finalhandler/package.json M node_modules/forwarded/package.json M node_modules/fresh/index.js M node_modules/fresh/package.json M node_modules/hot-shots/package.json D node_modules/hot-shots/types.d.ts M node_modules/ipaddr.js/LICENSE M node_modules/ipaddr.js/bower.json M node_modules/ipaddr.js/ipaddr.min.js M node_modules/ipaddr.js/lib/ipaddr.js M node_modules/ipaddr.js/package.json M node_modules/ipaddr.js/src/ipaddr.coffee M node_modules/ipaddr.js/test/ipaddr.test.coffee M node_modules/kad/package.json D node_modules/mime/.npmignore M node_modules/mime/LICENSE M node_modules/mime/build/test.js M node_modules/mime/mime.js M node_modules/mime/package.json M node_modules/mime/types.json M node_modules/parseurl/package.json M node_modules/proxy-addr/index.js M node_modules/proxy-addr/package.json M node_modules/qs/package.json M node_modules/request/package.json M node_modules/safe-buffer/package.json M node_modules/send/index.js M node_modules/send/package.json M node_modules/serve-static/index.js M node_modules/serve-static/package.json M node_modules/setprototypeof/package.json M node_modules/tough-cookie/lib/cookie.js M node_modules/tough-cookie/lib/pubsuffix.js M node_modules/tough-cookie/package.json A node_modules/utils-merge/.npmignore D node_modules/utils-merge/.travis.yml M node_modules/utils-merge/LICENSE M node_modules/utils-merge/package.json M node_modules/vary/index.js M node_modules/vary/package.json M src 86 files changed, 1,386 insertions(+), 3,688 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/mobileapps/deploy refs/changes/73/382073/1 -- To view, visit https://gerrit.wikimedia.org/r/382073 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Remove unstubbing from Wikibase broadly
Chad has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/382072 ) Change subject: Remove unstubbing from Wikibase broadly .. Remove unstubbing from Wikibase broadly Unstubbing of objects is largely going away from MediaWiki core in the near future. All of the instances of content language here are already pointless as $wgContLang hasn't been stubbed in awhile. Using RequestContext's instance of these objects is functionally identical, without the complexity and overhead of attempting to unstub a likely-already unstubbed object. Change-Id: I0aa2442d4758a76c4e497f825f10743ea95677ec --- M client/WikibaseClient.hooks.php M client/includes/Hooks/ParserOutputUpdateHookHandlers.php M client/includes/WikibaseClient.php M repo/Wikibase.hooks.php M repo/includes/WikibaseRepo.php 5 files changed, 10 insertions(+), 81 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/72/382072/1 diff --git a/client/WikibaseClient.hooks.php b/client/WikibaseClient.hooks.php index 19835cd..e563012 100644 --- a/client/WikibaseClient.hooks.php +++ b/client/WikibaseClient.hooks.php @@ -8,8 +8,8 @@ use EditPage; use OutputPage; use Parser; +use RequestContext; use Skin; -use StubObject; use Title; use User; use Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseEntityLibrary; @@ -92,8 +92,6 @@ * @return bool */ public static function onFormat( &$comment, $pre, $auto, $post, $title, $local, $wikiId = null ) { - global $wgContLang; - $wikibaseClient = WikibaseClient::getDefaultInstance(); $repoId = $wikibaseClient->getSettings()->getSetting( 'repoSiteId' ); @@ -105,9 +103,9 @@ return; } - StubObject::unstub( $wgContLang ); + $contLang = RequestContext::getMain()->getContentLanguage(); - $formatter = new AutoCommentFormatter( $wgContLang, [ 'wikibase-entity' ] ); + $formatter = new AutoCommentFormatter( $contLang, [ 'wikibase-entity' ] ); $formattedComment = $formatter->formatAutoComment( $auto ); if ( is_string( $formattedComment ) ) { diff --git a/client/includes/Hooks/ParserOutputUpdateHookHandlers.php b/client/includes/Hooks/ParserOutputUpdateHookHandlers.php index 4b7ed9e..c130d3c 100644 --- a/client/includes/Hooks/ParserOutputUpdateHookHandlers.php +++ b/client/includes/Hooks/ParserOutputUpdateHookHandlers.php @@ -4,7 +4,6 @@ use Content; use ParserOutput; -use StubUserLang; use Title; use Wikibase\Client\ParserOutput\ClientParserOutputDataUpdater; use Wikibase\Client\WikibaseClient; @@ -35,9 +34,6 @@ * @return self */ public static function newFromGlobalState() { - global $wgLang; - - StubUserLang::unstub( $wgLang ); $wikibaseClient = WikibaseClient::getDefaultInstance(); return new self( diff --git a/client/includes/WikibaseClient.php b/client/includes/WikibaseClient.php index 0a6e2dc..18e153d 100644 --- a/client/includes/WikibaseClient.php +++ b/client/includes/WikibaseClient.php @@ -25,7 +25,6 @@ use Serializers\Serializer; use Site; use SiteLookup; -use StubObject; use Title; use Wikibase\Client\Changes\AffectedPagesFinder; use Wikibase\Client\Changes\ChangeHandler; @@ -584,43 +583,17 @@ } /** -* @throws MWException when called to early * @return Language */ public function getContentLanguage() { - global $wgContLang; - - // TODO: define a LanguageProvider service instead of using a global directly. - // NOTE: we cannot inject $wgContLang in the constructor, because it may still be null - // when WikibaseClient is initialized. In particular, the language object may not yet - // be there when the SetupAfterCache hook is run during bootstrapping. - - if ( !$wgContLang ) { - throw new MWException( 'Premature access: $wgContLang is not yet initialized!' ); - } - - StubObject::unstub( $wgContLang ); - return $wgContLang; + return RequestContext::getMain()->getContentLanguage(); } /** -* @throws MWException when called to early * @return Language */ private function getUserLanguage() { - global $wgLang; - - // TODO: define a LanguageProvider service instead of using a global directly. - // NOTE: we cannot inject $wgLang in the constructor, because it may still be null - // when WikibaseClient is initialized. In particular, the language object may not yet - // be there when the SetupAfterCache hook is run during bootstrapping. - -
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Stop stubbing StubUserLang
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/382067 ) Change subject: Stop stubbing StubUserLang .. Stop stubbing StubUserLang Stub objects are confusing as heck and are a performance optimization that really aren't fit for the modern era. They were designed to avoid loading the actual code from the disk back in the days when bytecode caching wasn't always gonna be there. It's 2017. If you're using HHVM, you've got a bytecode cache. If you're using any reasonably recent version of PHP then you've got the opcode caching enabled by default in basically every distro-related build. Nothing actually relies on this object being a stub (that'd be silly), so only references are basically things force unstubbing (also kind of silly) the object. Once remaining code referencing this in extensions are all cleaned up then we can remove the class itself. Change-Id: I15df24aeeb729e8e764792daa933377f35042fab --- M includes/Message.php M includes/Setup.php M includes/Status.php M includes/parser/CoreParserFunctions.php 4 files changed, 4 insertions(+), 9 deletions(-) Approvals: MaxSem: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Message.php b/includes/Message.php index 0240fa7..d119940 100644 --- a/includes/Message.php +++ b/includes/Message.php @@ -732,8 +732,6 @@ if ( !$this->language instanceof Language || $this->language->getCode() != $lang ) { $this->language = Language::factory( $lang ); } - } elseif ( $lang instanceof StubUserLang ) { - $this->language = false; } else { $type = gettype( $lang ); throw new MWException( __METHOD__ . " must be " diff --git a/includes/Setup.php b/includes/Setup.php index 68e3d96..0be5c6e 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -811,7 +811,7 @@ /** * @var Language $wgLang */ -$wgLang = new StubUserLang; +$wgLang = RequestContext::getMain()->getLanguage(); // BackCompat /** * @var OutputPage $wgOut diff --git a/includes/Status.php b/includes/Status.php index a35af6e..5456ed0 100644 --- a/includes/Status.php +++ b/includes/Status.php @@ -153,12 +153,9 @@ * @return Language */ protected function languageFromParam( $lang ) { - global $wgLang; - if ( $lang === null ) { - // @todo: Use RequestContext::getMain()->getLanguage() instead - return $wgLang; - } elseif ( $lang instanceof Language || $lang instanceof StubUserLang ) { + return RequestContext::getMain()->getLanguage(); + } elseif ( $lang instanceof Language ) { return $lang; } else { return Language::factory( $lang ); diff --git a/includes/parser/CoreParserFunctions.php b/includes/parser/CoreParserFunctions.php index 3d26262..bebf3f8 100644 --- a/includes/parser/CoreParserFunctions.php +++ b/includes/parser/CoreParserFunctions.php @@ -493,7 +493,7 @@ * * @param int|float $num * @param string $raw -* @param Language|StubUserLang $language +* @param Language $language * @return string */ public static function formatRaw( $num, $raw, $language ) { -- To view, visit https://gerrit.wikimedia.org/r/382067 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I15df24aeeb729e8e764792daa933377f35042fab Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: ChadGerrit-Reviewer: C. Scott Ananian Gerrit-Reviewer: Jackmcbarn Gerrit-Reviewer: Krinkle Gerrit-Reviewer: MaxSem Gerrit-Reviewer: Zoranzoki21 Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...SemanticPageMaker[master]: Remove MediaWiki 1.11 compat
Krinkle has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/382071 ) Change subject: Remove MediaWiki 1.11 compat .. Remove MediaWiki 1.11 compat ParserFirstCallInit added in 1.12 (10 years ago) Change-Id: I668380072f34267408d7cfb6997d0a34302e600f --- M includes/widgets/SPM_WidgetInitialize.php 1 file changed, 1 insertion(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SemanticPageMaker refs/changes/71/382071/1 diff --git a/includes/widgets/SPM_WidgetInitialize.php b/includes/widgets/SPM_WidgetInitialize.php index a2e4977..058fdb1 100644 --- a/includes/widgets/SPM_WidgetInitialize.php +++ b/includes/widgets/SPM_WidgetInitialize.php @@ -77,14 +77,7 @@ $wgHooks['smwInitDatatypes'][] = 'SPMWidgetUtils::smwInitDatatypes'; $wgHooks['smwInitDatatypes'][] = 'SPMWidgetDataTypeUtils::smwInitDatatypes'; global $wgParser; -if ( defined( 'MW_SUPPORTS_PARSERFIRSTCALLINIT' ) ) { - $wgHooks['ParserFirstCallInit'][] = 'SPMWidgetParserFunctions::registerFunctions'; -} else { - if ( class_exists( 'StubObject' ) && !StubObject::isRealObject( $wgParser ) ) { - $wgParser->_unstub(); - } - SPMWidgetParserFunctions::registerFunctions( $wgParser ); -} + $wgHooks['ParserFirstCallInit'][] = 'SPMWidgetParserFunctions::registerFunctions'; // WOM api output $wgAutoloadClasses['SPMWidgetApiUtils'] = $wgSPMIP . '/includes/widgets/SPM_WidgetApiUtils.php'; -- To view, visit https://gerrit.wikimedia.org/r/382071 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I668380072f34267408d7cfb6997d0a34302e600f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SemanticPageMaker Gerrit-Branch: master Gerrit-Owner: Krinkle___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...WikiObjectModel[master]: Remove MediaWiki 1.11 compat
Krinkle has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/382070 ) Change subject: Remove MediaWiki 1.11 compat .. Remove MediaWiki 1.11 compat ParserFirstCallInit added in 1.12 (10 years ago) Change-Id: I668380072f34267408d7cfb6997d0a34302e600f --- M includes/apis/WOM_OutputProcessor.php 1 file changed, 1 insertion(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikiObjectModel refs/changes/70/382070/1 diff --git a/includes/apis/WOM_OutputProcessor.php b/includes/apis/WOM_OutputProcessor.php index 648221b..cd070a3 100644 --- a/includes/apis/WOM_OutputProcessor.php +++ b/includes/apis/WOM_OutputProcessor.php @@ -2,14 +2,7 @@ if ( !defined( 'MEDIAWIKI' ) ) die; global $wgHooks, $wgParser; -if ( defined( 'MW_SUPPORTS_PARSERFIRSTCALLINIT' ) ) { - $wgHooks['ParserFirstCallInit'][] = 'WOMOutputProcessor::smwgWTregisterParserFunctions'; -} else { - if ( class_exists( 'StubObject' ) && !StubObject::isRealObject( $wgParser ) ) { - $wgParser->_unstub(); - } - WOMOutputProcessor::smwgWTregisterParserFunctions( $wgParser ); -} +$wgHooks['ParserFirstCallInit'][] = 'WOMOutputProcessor::smwgWTregisterParserFunctions'; global $wgOMOutputHookedParserFunctions; $wgOMOutputHookedParserFunctions = array( -- To view, visit https://gerrit.wikimedia.org/r/382070 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I668380072f34267408d7cfb6997d0a34302e600f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikiObjectModel Gerrit-Branch: master Gerrit-Owner: Krinkle___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: Add a role for a trivial file download server
Andrew Bogott has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/382069 ) Change subject: Add a role for a trivial file download server .. Add a role for a trivial file download server Bug: T177293 Change-Id: I42e593cb9048162826cc6c07ac77a69189996039 --- A modules/role/files/labs/downloadserver.nginx A modules/role/manifests/labs/downloadserver.pp 2 files changed, 29 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/69/382069/1 diff --git a/modules/role/files/labs/downloadserver.nginx b/modules/role/files/labs/downloadserver.nginx new file mode 100644 index 000..406a226 --- /dev/null +++ b/modules/role/files/labs/downloadserver.nginx @@ -0,0 +1,8 @@ +# THIS FILE IS MANAGED BY PUPPET +server { +root /srv/public_files; + +location / { +autoindex on; +} +} diff --git a/modules/role/manifests/labs/downloadserver.pp b/modules/role/manifests/labs/downloadserver.pp new file mode 100644 index 000..5360ce9 --- /dev/null +++ b/modules/role/manifests/labs/downloadserver.pp @@ -0,0 +1,21 @@ +# Simple file server for the 'download' project +# +# filtertags: labs-project-download +class role::labs::downloadserver { +labs_lvm::volume { 'srv': +mountat => '/srv', +} + +file { '/srv/public_files': +ensure => directory, +owner => 'root', +group => 'root', +mode => '0555', +require => Labs_lvm::Volume['srv'], +} + +nginx::site { 'downloadserver': +source => 'puppet:///modules/role/labs/downloadserver.nginx', +require => Labs_lvm::Volume['srv'], +} +} -- To view, visit https://gerrit.wikimedia.org/r/382069 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I42e593cb9048162826cc6c07ac77a69189996039 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] mediawiki...Echo[master]: Use User Ids instead of User Names for Echo Mute
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/374871 ) Change subject: Use User Ids instead of User Names for Echo Mute .. Use User Ids instead of User Names for Echo Mute The echo mute list uses user names which are not stable. User ids should be used instead. Bug: T173475 Change-Id: I947bcf37a8f85aaa105776d368dbd0ab76823aeb --- M Hooks.php M extension.json M includes/ContainmentSet.php A maintenance/updatePerUserBlacklist.php 4 files changed, 131 insertions(+), 5 deletions(-) Approvals: Dmaza: Looks good to me, but someone else must approve EBernhardson: Looks good to me, approved jenkins-bot: Verified diff --git a/Hooks.php b/Hooks.php index 8e3db35..4a7c06a 100644 --- a/Hooks.php +++ b/Hooks.php @@ -490,10 +490,15 @@ } if ( $wgEchoPerUserBlacklist ) { + $lookup = CentralIdLookup::factory(); + $ids = $user->getOption( 'echo-notifications-blacklist', [] ); + $names = $ids ? $lookup->namesFromCentralIds( $ids, $user ) : []; + $preferences['echo-notifications-blacklist'] = [ 'type' => 'usersmultiselect', 'label-message' => 'echo-pref-notifications-blacklist', 'section' => 'echo/blocknotificationslist', + 'default' => implode( "\n", $names ) ]; } @@ -1252,6 +1257,10 @@ $options['echo-subscriptions-email-edit-user-talk'] = $options['enotifusertalkpages']; } + if ( isset( $options['echo-notifications-blacklist'] ) ) { + $options['echo-notifications-blacklist'] = array_map( 'intval', explode( "\n", $options['echo-notifications-blacklist'] ) ); + } + return true; } @@ -1270,6 +1279,28 @@ unset( $options['echo-subscriptions-email-edit-user-talk'] ); } + // Convert usernames to ids. + if ( isset( $options['echo-notifications-blacklist'] ) ) { + if ( $options['echo-notifications-blacklist'] ) { + $value = $options['echo-notifications-blacklist']; + // Notification Blacklist may be an array of ids or a string of new line + // delimnated user names. + if ( is_array( $value ) ) { + $ids = array_filter( $value, 'is_numeric' ); + } else { + $lookup = CentralIdLookup::factory(); + $names = explode( "\n", $value ); + $ids = $lookup->centralIdsFromNames( $names, $user ); + } + + $user->setOption( 'echo-notifications-blacklist', $ids ); + $options['echo-notifications-blacklist'] = implode( "\n", $user->getOption( 'echo-notifications-blacklist' ) ); + } else { + // If the blacklist is empty, set it to null rather than an empty string. + $options['echo-notifications-blacklist'] = null; + } + } + return true; } diff --git a/extension.json b/extension.json index 39606db..dc21551 100644 --- a/extension.json +++ b/extension.json @@ -1019,6 +1019,7 @@ "SpecialNotificationsMarkRead": "includes/special/SpecialNotificationsMarkRead.php", "SuppressionMaintenanceTest": "tests/phpunit/maintenance/SupressionMaintenanceTest.php", "TestDiscussionParser": "maintenance/testDiscussionParser.php", - "UpdateEchoSchemaForSuppression": "maintenance/updateEchoSchemaForSuppression.php" + "UpdateEchoSchemaForSuppression": "maintenance/updateEchoSchemaForSuppression.php", + "EchoUpdatePerUserBlacklist": "maintenance/updatePerUserBlacklist.php" } } diff --git a/includes/ContainmentSet.php b/includes/ContainmentSet.php index 4b6ce1f..d5cfff5 100644 --- a/includes/ContainmentSet.php +++ b/includes/ContainmentSet.php @@ -71,12 +71,12 @@ * @param string $preferenceName */ public function addFromUserOption( $preferenceName ) { - $preference = $this->recipient->getOption( $preferenceName ); + $preference = $this->recipient->getOption( $preferenceName, [] ); if ( $preference ) { - $items = explode( "\n", $preference ); - - $this->addArray( $items ); + $lookup =
[MediaWiki-commits] [Gerrit] mediawiki...ExtTab[master]: Remove MediaWiki 1.11 compat
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/382068 ) Change subject: Remove MediaWiki 1.11 compat .. Remove MediaWiki 1.11 compat ParserFirstCallInit added in 1.12 (10 years ago) Change-Id: I668380072f34267408d7cfb6997d0a34302e600f --- M includes/ET_Initialize.php 1 file changed, 1 insertion(+), 8 deletions(-) Approvals: Aaron Schulz: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/ET_Initialize.php b/includes/ET_Initialize.php index 0da3a39..fd2f637 100644 --- a/includes/ET_Initialize.php +++ b/includes/ET_Initialize.php @@ -37,14 +37,7 @@ global $wgParser, $wgHooks, $wgAutoloadClasses; // register hooks - if ( defined( 'MW_SETPORTS_PARSERFIRSTCALLINIT' ) ) { - $wgHooks['ParserFirstCallInit'][] = 'ETParserFunctions::registerFunctions'; - } else { - if ( class_exists( 'StubObject' ) && !StubObject::isRealObject( $wgParser ) ) { - $wgParser->_unstub(); - } - ETParserFunctions::registerFunctions( $wgParser ); - } + $wgHooks['ParserFirstCallInit'][] = 'ETParserFunctions::registerFunctions'; global $wgRequest; -- To view, visit https://gerrit.wikimedia.org/r/382068 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I668380072f34267408d7cfb6997d0a34302e600f Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/ExtTab Gerrit-Branch: master Gerrit-Owner: KrinkleGerrit-Reviewer: Aaron Schulz Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...EventLogging[master]: build: Remove unsupported --use-mirrors from pip command
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/382039 ) Change subject: build: Remove unsupported --use-mirrors from pip command .. build: Remove unsupported --use-mirrors from pip command Travis build is continuously failing: > no such option: --use-mirrors Travis' caching has improved much since this was added so probably not needed anymore. Change-Id: Ia2bf3fd5c93a27b146babc2e0a32c651aa8987b5 --- M .travis.yml 1 file changed, 2 insertions(+), 3 deletions(-) Approvals: jenkins-bot: Verified Nuria: Looks good to me, approved diff --git a/.travis.yml b/.travis.yml index 9c1beb5..6f335fa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,13 +4,12 @@ - "2.7" - "3.4" install: -- pip install -q pyzmq --install-option="--zmq=bundled" --use-mirrors -- pip install -q server/ --use-mirrors +- pip install -q pyzmq --install-option="--zmq=bundled" +- pip install -q server/ script: - cd server - python setup.py test notifications: -email: o...@wikimedia.org irc: "irc.freenode.org#wikimedia-analytics" on_success: change on_failure: change -- To view, visit https://gerrit.wikimedia.org/r/382039 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia2bf3fd5c93a27b146babc2e0a32c651aa8987b5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/EventLogging Gerrit-Branch: master Gerrit-Owner: KrinkleGerrit-Reviewer: Nuria 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] mediawiki...mobileapps[master]: Add fundraising test via announcement cards in France
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/381507 ) Change subject: Add fundraising test via announcement cards in France .. Add fundraising test via announcement cards in France * Changed wiki project check from enwiki to frwiki. * Also due to the domain change I had to modify the OpenAPI spec to use a hard-coded path instead of the {domain} parameter which defaults to enwiki. * Added small refactoring in unit test to pull out the URIs into constants. == QA notes == To test ahead of time: temporarily change start_time to be earlier. On client make sure that geoip country code is faked to be "FR". MCS directly: http://0.0.0.0:6927/fr.wikipedia.org/v1/feed/announcements MCS through RESTBase: http://0.0.0.0:7231/fr.wikipedia.org/v1/feed/announcements Bug: T177001 Change-Id: Ib549ea139bc5c68b9583e4423003f82339aa885e --- M lib/mobile-util.js M routes/announcements.js M spec.yaml M test/features/announcements/announcements.js 4 files changed, 75 insertions(+), 83 deletions(-) Approvals: Mhurd: Looks good to me, approved jenkins-bot: Verified Mholloway: Looks good to me, but someone else must approve diff --git a/lib/mobile-util.js b/lib/mobile-util.js index ac49997..80564c6 100644 --- a/lib/mobile-util.js +++ b/lib/mobile-util.js @@ -116,6 +116,10 @@ return (domain === 'en.wikipedia.org' || domain === 'en.wikipedia.beta.wmflabs.org'); }; +mUtil.isFrenchWikipedia = function(domain) { +return (domain === 'fr.wikipedia.org'); +}; + mUtil.removeFragment = function(href) { if (href.indexOf('#') > -1) { return href.substring(0, href.indexOf('#')); diff --git a/routes/announcements.js b/routes/announcements.js index 003d3c0..7007029 100644 --- a/routes/announcements.js +++ b/routes/announcements.js @@ -8,62 +8,53 @@ */ const router = sUtil.router(); -/* eslint-disable max-len */ -function getEnwikiAnnouncements() { +function getFrwikiAnnouncements() { // Notes: for iOS 'text' and 'action.title': HTML is not supported. // iOS uses image_url instead of the image Android uses. +// iOS caption_HTML should be wrapped in tag. + +// image_url: "https://upload.wikimedia.org/wikipedia/commons/8/8f/Reading_list_survey_-_iOS.png;, +// image: "https://upload.wikimedia.org/wikipedia/commons/5/52/Reading_list_survey.png;, + return [ -// { -// id: "EN0517SURVEYIOS", -// type: "survey", -// start_time: "2017-05-26T00:00:00Z", -// end_time: "2017-05-29T00:00:00Z", -// platforms: [ -// "iOSApp", -// ], -// text: "Hi iOS readers,\n\nHave you been using save for later? Help us learn more about how you are using this saved articles feature by taking a short survey, so that we can continue making reading lists even better.", // eslint-disable-line max-len -// image_url: "https://upload.wikimedia.org/wikipedia/commons/8/8f/Reading_list_survey_-_iOS.png;, -// action: { -// title: "Take survey", -// url: "https://docs.google.com/a/wikimedia.org/forms/d/e/1FAIpQLScYphlKSI5DCZAkdgC3QfzqZbpj3q3ohuvF8zptO-p5j-xDRA/viewform; -// }, -// caption_HTML: "Hosted by a third-party service. See the https://m.wikimediafoundation.org/wiki/Mobile_User_Testing_Recruitment_Survey_Privacy_Statement\;>privacy statement for information on data handling.", -// countries: [ -// "US", -// "CA", -// "GB", -// "IE", -// "AU", -// "NZ" -// ] -// }, -// { -// id: "EN0517SURVEYANDROID", -// type: "survey", -// start_time: "2017-05-26T00:00:00Z", -// end_time: "2017-05-29T00:00:00Z", -// platforms: [ -// "AndroidApp" -// ], -// text: "Hi Android readers,Have you been using reading lists? Help us learn more about how you are using them by taking a short survey, so that we can continue making reading lists even better.", // eslint-disable-line max-len -// image: "https://upload.wikimedia.org/wikipedia/commons/5/52/Reading_list_survey.png;, -// action: { -// title: "Take survey", -// url: "https://docs.google.com/a/wikimedia.org/forms/d/e/1FAIpQLSeAbWTd9G4GTzAHJtV55HmC6I-LC3as0zWTCneGuLyj3Z6gMw/viewform; -// }, -// caption_HTML: "Survey powered by 3rd-party service. See https://m.wikimediafoundation.org/wiki/Mobile_User_Testing_Recruitment_Survey_Privacy_Statement\;>privacy statement.", -// countries: [ -// "US", -// "CA", -// "GB", -// "IE", -// "AU", -// "NZ" -
[MediaWiki-commits] [Gerrit] mediawiki...LiquidThreads[master]: Remove call to non-existant $wgOut->_unstub()
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/382066 ) Change subject: Remove call to non-existant $wgOut->_unstub() .. Remove call to non-existant $wgOut->_unstub() This hasn't been a stub for a while, and calling it directly would've been broken for a while. This script isn't used (obviously) but removing this to remove a false-positive search result. Change-Id: I55716ac0a390867b9655b9a47fd16593e70cd5f0 --- M import/import-parsed-discussions.php 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: MaxSem: Looks good to me, approved jenkins-bot: Verified diff --git a/import/import-parsed-discussions.php b/import/import-parsed-discussions.php index edb4e29..cd465ec 100644 --- a/import/import-parsed-discussions.php +++ b/import/import-parsed-discussions.php @@ -11,7 +11,6 @@ $article = new Article( Title::newFromText( $argv[1] ), 0 ); -$wgOut->_unstub(); $wgOut->setTitle( $article->getTitle() ); $subject = ''; -- To view, visit https://gerrit.wikimedia.org/r/382066 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I55716ac0a390867b9655b9a47fd16593e70cd5f0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/LiquidThreads Gerrit-Branch: master Gerrit-Owner: KrinkleGerrit-Reviewer: Chad Gerrit-Reviewer: MaxSem Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...ExtTab[master]: Remove redundant $wgParser->_unstub() call
Krinkle has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/382068 ) Change subject: Remove redundant $wgParser->_unstub() call .. Remove redundant $wgParser->_unstub() call It will unstub by itself (if it hasn't already) when registerFunctions() calls methods on it. And either way, the method call is proxied through the sub. Change-Id: I668380072f34267408d7cfb6997d0a34302e600f --- M includes/ET_Initialize.php 1 file changed, 0 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ExtTab refs/changes/68/382068/1 diff --git a/includes/ET_Initialize.php b/includes/ET_Initialize.php index 0da3a39..b8a7220 100644 --- a/includes/ET_Initialize.php +++ b/includes/ET_Initialize.php @@ -40,9 +40,6 @@ if ( defined( 'MW_SETPORTS_PARSERFIRSTCALLINIT' ) ) { $wgHooks['ParserFirstCallInit'][] = 'ETParserFunctions::registerFunctions'; } else { - if ( class_exists( 'StubObject' ) && !StubObject::isRealObject( $wgParser ) ) { - $wgParser->_unstub(); - } ETParserFunctions::registerFunctions( $wgParser ); } -- To view, visit https://gerrit.wikimedia.org/r/382068 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I668380072f34267408d7cfb6997d0a34302e600f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ExtTab Gerrit-Branch: master Gerrit-Owner: Krinkle___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: Add support for Elastica 5.3.0
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/376541 ) Change subject: Add support for Elastica 5.3.0 .. Add support for Elastica 5.3.0 - Remove backports - Fix Reindexer test Bug: T174654 Change-Id: Ia232947de7e3434e3d7fa34dd4a2aa62bb204c94 Depends-On: I46edfa8462a7e8db691f5eb8b931fce1f8eef7e2 Depends-On: Ia8552a06a035d7d423e236b2f92c726fa08e34b2 --- M autoload.php D includes/Elastica/MatchNone.php M includes/Query/FullTextQueryStringQueryBuilder.php D tests/unit/Elastica/MatchNoneTest.php M tests/unit/Elastica/ReindexTaskTest.php 5 files changed, 12 insertions(+), 41 deletions(-) Approvals: Tjones: Looks good to me, but someone else must approve Cindy-the-browser-test-bot: Looks good to me, but someone else must approve EBernhardson: Looks good to me, approved jenkins-bot: Verified diff --git a/autoload.php b/autoload.php index a061bb7..5dc51da 100644 --- a/autoload.php +++ b/autoload.php @@ -39,7 +39,6 @@ 'CirrusSearch\\Dump' => __DIR__ . '/includes/Dump.php', 'CirrusSearch\\ElasticaErrorHandler' => __DIR__ . '/includes/ElasticaErrorHandler.php', 'CirrusSearch\\Elastica\\LtrQuery' => __DIR__ . '/includes/Elastica/LtrQuery.php', - 'CirrusSearch\\Elastica\\MatchNone' => __DIR__ . '/includes/Elastica/MatchNone.php', 'CirrusSearch\\Elastica\\MultiSearch' => __DIR__ . '/includes/Elastica/MultiSearch.php', 'CirrusSearch\\Elastica\\PooledHttp' => __DIR__ . '/includes/Elastica/PooledHttp.php', 'CirrusSearch\\Elastica\\PooledHttps' => __DIR__ . '/includes/Elastica/PooledHttps.php', diff --git a/includes/Elastica/MatchNone.php b/includes/Elastica/MatchNone.php deleted file mode 100644 index 10492bb..000 --- a/includes/Elastica/MatchNone.php +++ /dev/null @@ -1,18 +0,0 @@ -https://github.com/ruflin/Elastica/pull/1276 - * - * @link https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-match-all-query.html - */ -class MatchNone extends \Elastica\Query\AbstractQuery { - /** -* Creates match none query. -*/ - public function __construct() { - /** @suppress PhanTypeMismatchProperty (done like that in Elastica) */ - $this->_params = new \stdClass(); - } -} diff --git a/includes/Query/FullTextQueryStringQueryBuilder.php b/includes/Query/FullTextQueryStringQueryBuilder.php index a27caa0..6f3d0e7 100644 --- a/includes/Query/FullTextQueryStringQueryBuilder.php +++ b/includes/Query/FullTextQueryStringQueryBuilder.php @@ -663,7 +663,7 @@ // text $queryText, // fallack - new \CirrusSearch\Elastica\MatchNone(), + new \Elastica\Query\MatchNone(), // field null, // analyzer @@ -674,7 +674,7 @@ $tokCount->addCondition( TokenCountRouter::GT, $maxTokens, - new \CirrusSearch\Elastica\MatchNone() + new \Elastica\Query\MatchNone() ); } $tokCount->addCondition( diff --git a/tests/unit/Elastica/MatchNoneTest.php b/tests/unit/Elastica/MatchNoneTest.php deleted file mode 100644 index f3ccfba..000 --- a/tests/unit/Elastica/MatchNoneTest.php +++ /dev/null @@ -1,18 +0,0 @@ - new \stdClass() ]; - $this->assertEquals( $expectedArray, $query->toArray() ); - } - - public function testBackPorts() { - $this->assertFalse( - class_exists( \Elastica\Query\MatchNone::class ), - "MatchNone is now in elastica please remove this backport" - ); - } -} diff --git a/tests/unit/Elastica/ReindexTaskTest.php b/tests/unit/Elastica/ReindexTaskTest.php index abd726c..7f1e76e 100644 --- a/tests/unit/Elastica/ReindexTaskTest.php +++ b/tests/unit/Elastica/ReindexTaskTest.php @@ -132,13 +132,21 @@ ->method( 'request' ) ->will( $this->returnValueMap( [ [ - '_tasks/abc:123', Request::GET, [], [], + '_tasks/abc:123', + Request::GET, + [], + [], + \Elastica\Request::DEFAULT_CONTENT_TYPE, new Response( json_encode( $this->inProgressWithSlicesTaskResponse
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Remove StubUserLang
Hello Krinkle, MaxSem, I'd like you to do a code review. Please visit https://gerrit.wikimedia.org/r/382067 to review the following change. Change subject: Remove StubUserLang .. Remove StubUserLang Stub objects are confusing as heck and are a performance optimization that really aren't fit for the modern era. They were designed to avoid loading the actual code from the disk back in the days when bytecode caching wasn't always gonna be there. It's 2017. If you're using HHVM, you've got a bytecode cache. If you're using any reasonably recent version of PHP then you've got the opcode caching enabled by default in basically every distro-related build. Change-Id: I15df24aeeb729e8e764792daa933377f35042fab --- M autoload.php M includes/Message.php M includes/Setup.php M includes/Status.php M includes/StubObject.php M includes/parser/CoreParserFunctions.php 6 files changed, 4 insertions(+), 45 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/67/382067/1 diff --git a/autoload.php b/autoload.php index 4dd5f12..186572b 100644 --- a/autoload.php +++ b/autoload.php @@ -1455,7 +1455,6 @@ 'StringUtils' => __DIR__ . '/includes/libs/StringUtils.php', 'StripState' => __DIR__ . '/includes/parser/StripState.php', 'StubObject' => __DIR__ . '/includes/StubObject.php', - 'StubUserLang' => __DIR__ . '/includes/StubObject.php', 'SubmitAction' => __DIR__ . '/includes/actions/SubmitAction.php', 'SubpageImportTitleFactory' => __DIR__ . '/includes/title/SubpageImportTitleFactory.php', 'SvgHandler' => __DIR__ . '/includes/media/SVG.php', diff --git a/includes/Message.php b/includes/Message.php index 0240fa7..d119940 100644 --- a/includes/Message.php +++ b/includes/Message.php @@ -732,8 +732,6 @@ if ( !$this->language instanceof Language || $this->language->getCode() != $lang ) { $this->language = Language::factory( $lang ); } - } elseif ( $lang instanceof StubUserLang ) { - $this->language = false; } else { $type = gettype( $lang ); throw new MWException( __METHOD__ . " must be " diff --git a/includes/Setup.php b/includes/Setup.php index 68e3d96..202efa5 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -811,7 +811,7 @@ /** * @var Language $wgLang */ -$wgLang = new StubUserLang; +$wgLang = RequestContext::getMain()->getUser(); // BackCompat /** * @var OutputPage $wgOut diff --git a/includes/Status.php b/includes/Status.php index a35af6e..1a10bdd 100644 --- a/includes/Status.php +++ b/includes/Status.php @@ -153,12 +153,9 @@ * @return Language */ protected function languageFromParam( $lang ) { - global $wgLang; - if ( $lang === null ) { - // @todo: Use RequestContext::getMain()->getLanguage() instead - return $wgLang; - } elseif ( $lang instanceof Language || $lang instanceof StubUserLang ) { + return RequestContext::getMain()->getLanguage() + } elseif ( $lang instanceof Language ) { return $lang; } else { return Language::factory( $lang ); diff --git a/includes/StubObject.php b/includes/StubObject.php index baf5109..1bcac29 100644 --- a/includes/StubObject.php +++ b/includes/StubObject.php @@ -170,38 +170,3 @@ } } } - -/** - * Stub object for the user language. Assigned to the $wgLang global. - */ -class StubUserLang extends StubObject { - - public function __construct() { - parent::__construct( 'wgLang' ); - } - - /** -* Call Language::findVariantLink after unstubbing $wgLang. -* -* This method is implemented with a full signature rather than relying on -* __call so that the pass-by-reference signature of the proxied method is -* honored. -* -* @param string &$link The name of the link -* @param Title &$nt The title object of the link -* @param bool $ignoreOtherCond To disable other conditions when -* we need to transclude a template or update a category's link -*/ - public function findVariantLink( &$link, &$nt, $ignoreOtherCond = false ) { - global $wgLang; - $this->_unstub( 'findVariantLink', 3 ); - $wgLang->findVariantLink( $link, $nt, $ignoreOtherCond ); - } - - /** -* @return Language -*/ - public function _newObject() { - return RequestContext::getMain()->getLanguage(); - } -} diff --git a/includes/parser/CoreParserFunctions.php b/includes/parser/CoreParserFunctions.php index 3d26262..bebf3f8
[MediaWiki-commits] [Gerrit] search/extra[master]: Stop maintaining FuzzyLikeThis
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/381762 ) Change subject: Stop maintaining FuzzyLikeThis .. Stop maintaining FuzzyLikeThis An alternitive is currently being tested in the translate extension. See Id06e5d2 If everything is ok with the new alternative then we should no longer maintain this query. Change-Id: I51122a94a5552106c1ae09b196a60089c9f41897 --- M src/main/java/org/wikimedia/search/extra/ExtraPlugin.java D src/main/java/org/wikimedia/search/extra/fuzzylike/FuzzyLikeThisQuery.java D src/main/java/org/wikimedia/search/extra/fuzzylike/FuzzyLikeThisQueryBuilder.java D src/main/java/org/wikimedia/search/extra/fuzzylike/package-info.java D src/test/java/org/wikimedia/search/extra/fuzzylike/FuzzyLikeThisIntegrationTest.java 5 files changed, 0 insertions(+), 731 deletions(-) Approvals: EBernhardson: Looks good to me, approved jenkins-bot: Verified Gehel: Looks good to me, but someone else must approve diff --git a/src/main/java/org/wikimedia/search/extra/ExtraPlugin.java b/src/main/java/org/wikimedia/search/extra/ExtraPlugin.java index 40e31ec..ab4113b 100644 --- a/src/main/java/org/wikimedia/search/extra/ExtraPlugin.java +++ b/src/main/java/org/wikimedia/search/extra/ExtraPlugin.java @@ -28,7 +28,6 @@ import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.watcher.ResourceWatcherService; import org.wikimedia.search.extra.analysis.filters.PreserveOriginalFilterFactory; -import org.wikimedia.search.extra.fuzzylike.FuzzyLikeThisQueryBuilder; import org.wikimedia.search.extra.latency.LatencyStatsAction; import org.wikimedia.search.extra.latency.RestGetLatencyStats; import org.wikimedia.search.extra.latency.SearchLatencyListener; @@ -101,7 +100,6 @@ public ListgetQueries() { return asList( new QuerySpec<>(SourceRegexQueryBuilder.NAME, SourceRegexQueryBuilder::new, SourceRegexQueryBuilder::fromXContent), -new QuerySpec<>(FuzzyLikeThisQueryBuilder.NAME, FuzzyLikeThisQueryBuilder::new, FuzzyLikeThisQueryBuilder::fromXContent), new QuerySpec<>(TokenCountRouterQueryBuilder.NAME, TokenCountRouterQueryBuilder::new, TokenCountRouterQueryBuilder::fromXContent), new QuerySpec<>(DegradedRouterQueryBuilder.NAME, (in) -> new DegradedRouterQueryBuilder(in, loadStats), (pc) -> DegradedRouterQueryBuilder.fromXContent(pc, loadStats)), new QuerySpec<>(SimSwitcherQueryBuilder.NAME, SimSwitcherQueryBuilder::new, SimSwitcherQueryBuilder::fromXContent) diff --git a/src/main/java/org/wikimedia/search/extra/fuzzylike/FuzzyLikeThisQuery.java b/src/main/java/org/wikimedia/search/extra/fuzzylike/FuzzyLikeThisQuery.java deleted file mode 100644 index b244d01..000 --- a/src/main/java/org/wikimedia/search/extra/fuzzylike/FuzzyLikeThisQuery.java +++ /dev/null @@ -1,298 +0,0 @@ -package org.wikimedia.search.extra.fuzzylike; - -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; -import lombok.EqualsAndHashCode; -import org.apache.lucene.analysis.Analyzer; -import org.apache.lucene.analysis.TokenStream; -import org.apache.lucene.analysis.tokenattributes.CharTermAttribute; -import org.apache.lucene.index.IndexReader; -import org.apache.lucene.index.MultiFields; -import org.apache.lucene.index.Term; -import org.apache.lucene.index.Terms; -import org.apache.lucene.search.BooleanClause; -import org.apache.lucene.search.BooleanQuery; -import org.apache.lucene.search.BoostAttribute; -import org.apache.lucene.search.BoostQuery; -import org.apache.lucene.search.ConstantScoreQuery; -import org.apache.lucene.search.FuzzyTermsEnum; -import org.apache.lucene.search.MatchNoDocsQuery; -import org.apache.lucene.search.MaxNonCompetitiveBoostAttribute; -import org.apache.lucene.search.Query; -import org.apache.lucene.search.TermQuery; -import org.apache.lucene.search.similarities.ClassicSimilarity; -import org.apache.lucene.search.similarities.TFIDFSimilarity; -import org.apache.lucene.util.AttributeSource; -import org.apache.lucene.util.BytesRef; -import
[MediaWiki-commits] [Gerrit] mediawiki...LiquidThreads[master]: Remove call to non-existant $wgOut->_unstub()
Krinkle has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/382066 ) Change subject: Remove call to non-existant $wgOut->_unstub() .. Remove call to non-existant $wgOut->_unstub() This hasn't been a stub for a while, and calling it directly would've been broken for a while. This script isn't used (obviously) but removing this to remove a false-positive search result. Change-Id: I55716ac0a390867b9655b9a47fd16593e70cd5f0 --- M import/import-parsed-discussions.php 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/LiquidThreads refs/changes/66/382066/1 diff --git a/import/import-parsed-discussions.php b/import/import-parsed-discussions.php index edb4e29..cd465ec 100644 --- a/import/import-parsed-discussions.php +++ b/import/import-parsed-discussions.php @@ -11,7 +11,6 @@ $article = new Article( Title::newFromText( $argv[1] ), 0 ); -$wgOut->_unstub(); $wgOut->setTitle( $article->getTitle() ); $subject = ''; -- To view, visit https://gerrit.wikimedia.org/r/382066 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I55716ac0a390867b9655b9a47fd16593e70cd5f0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/LiquidThreads Gerrit-Branch: master Gerrit-Owner: Krinkle___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Fix removeNestedParentheticals parenthetical handling
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/379930 ) Change subject: Fix removeNestedParentheticals parenthetical handling .. Fix removeNestedParentheticals parenthetical handling New test case shows current logic is flawed. New regex replacement is actually recursive and retains any string matched outside the capture. Bug: T176525 Change-Id: I145ebd61bc6615e1cd848226f70df96b53a94deb --- M lib/transformations/summarize.js M test/lib/transformations/summarize.js 2 files changed, 27 insertions(+), 3 deletions(-) Approvals: BearND: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/transformations/summarize.js b/lib/transformations/summarize.js index bf9e205..4204d94 100644 --- a/lib/transformations/summarize.js +++ b/lib/transformations/summarize.js @@ -12,11 +12,11 @@ */ function removeNestedParentheticals(html) { // Remove any nested parentheticals -const regex = /\([^(]+(\([^()]*)\)[^)(]*\)/g; -const newHtml = html.replace(regex, ' '); +const regex = /(\([^()]+)(\([^()]+\))/g; +const newHtml = html.replace(regex, '$1 '); if (newHtml.match(regex)) { -return removeNestedParentheticals(html); +return removeNestedParentheticals(newHtml); } else { return newHtml; } diff --git a/test/lib/transformations/summarize.js b/test/lib/transformations/summarize.js index a76110e..b9f6777 100644 --- a/test/lib/transformations/summarize.js +++ b/test/lib/transformations/summarize.js @@ -43,6 +43,30 @@ 'The Planck–Einstein relation connects the particulate photon energy E with its associated wave frequency f:\n\nhttp://www.w3.org/1998/Math/MathML\;>\n \n \n \nE\n=\n h\nf\n \n\n{\\displaystyle E=hf}\n \nhttps://wikimedia.org/api/rest_v1/media/math/render/svg/f39fac3593bb1e2dec0282c112c4dff7a99007f6\; class=\"mwe-math-fallback-image-inline\" aria-hidden=\"true\" style=\"vertical-align: -0.671ex; width:7.533ex; height:2.509ex;\">', 'The Planck–Einstein relation connects the particulate photon energy E with its associated wave frequency f:\n\nhttps://wikimedia.org/api/rest_v1/media/math/render/svg/f39fac3593bb1e2dec0282c112c4dff7a99007f6\; class=\"mwe-math-fallback-image-inline\" aria-hidden=\"true\" style=\"vertical-align: -0.671ex; width:7.533ex; height:2.509ex;\">' ], +// Parentheticals will be stripped +[ +'Hello world (this is in brackets and will be stripped) and goodnight.', +'Hello world and goodnight.', +], +// Multiple parentheticals will be stripped +[ +'Hello world (this is in brackets and will be stripped) and (I will also be stripped) goodnight.', +'Hello world and goodnight.', +], +// Parentheticals without spaces will not be stripped +[ +'Hello world (HW) and goodnight.', +'Hello world (HW) and goodnight.', +], +// ... but Nested parentheticals without spaces will be stripped. +[ +'Hello world (this is in brackets and will be stripped (HW) it will all go (trust me)) and goodnight.', +'Hello world and goodnight.', +], +[ +'Azerbaijan (æ(listen) AZ; Azerbaijani: Azərbaycan, officially the Republic of Azerbaijan (Azerbaijani: Azərbaycan Respublikası)), is a country.', +'Azerbaijan, is a country.' +], // Any parentheticals inside a data-mw attribute are ignored. [ 'Shakira Isabel Mebarak Ripoll (pronounced[(t)ʃaˈkiɾa isaˈβel meβaˈɾak riˈpol]; English: /ʃəˈkiːrə/; born 2 February 1977) is a Colombian singer, songwriter, dancer.', -- To view, visit https://gerrit.wikimedia.org/r/379930 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I145ebd61bc6615e1cd848226f70df96b53a94deb Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/services/mobileapps Gerrit-Branch: master Gerrit-Owner: JdlrobsonGerrit-Reviewer: BearND Gerrit-Reviewer: Dbrant Gerrit-Reviewer: Fjalapeno Gerrit-Reviewer: GWicke Gerrit-Reviewer: Jdlrobson Gerrit-Reviewer: Mholloway Gerrit-Reviewer: Mhurd Gerrit-Reviewer: Mobrovac Gerrit-Reviewer: Ppchelko Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Elastica[master]: Revert "Revert "Upgrade to Elastica 5.3.0""
EBernhardson has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/379216 ) Change subject: Revert "Revert "Upgrade to Elastica 5.3.0"" .. Revert "Revert "Upgrade to Elastica 5.3.0"" This reverts commit 889d85dfe9b0bd2782afe66eaa657072036fb9fd. Change-Id: I46edfa8462a7e8db691f5eb8b931fce1f8eef7e2 --- M composer.json 1 file changed, 29 insertions(+), 4 deletions(-) Approvals: EBernhardson: Looks good to me, approved jenkins-bot: Verified diff --git a/composer.json b/composer.json index f2df57e..7c5ba7b 100644 --- a/composer.json +++ b/composer.json @@ -16,15 +16,15 @@ "type": "package", "package": { "name": "ruflin/elastica", - "version": "5.1.0", + "version": "5.3.0", "dist": { - "url": "https://github.com/ruflin/Elastica/archive/5.1.0.zip;, + "url": "https://github.com/ruflin/Elastica/archive/5.3.0.zip;, "type": "zip" }, "source": { "url": "https://github.com/ruflin/Elastica.git;, "type": "git", - "reference": "tags/5.1.0" + "reference": "tags/5.3.0" }, "autoload": { "psr-4": { @@ -32,14 +32,39 @@ } }, "require": { + "php": ">=5.5.0", + "elasticsearch/elasticsearch": "5.3.0" + } + } + }, + { + "type": "package", + "package": { + "name": "elasticsearch/elasticsearch", + "version": "5.3.0", + "dist": { + "url": "https://api.github.com/repos/elastic/elasticsearch-php/zipball/50e5b1c63db68839b8acc1f4766769570a27a448;, + "type": "zip" + }, + "source": { + "url": "https://github.com/elastic/elasticsearch-php.git;, + "type": "git", + "reference": "tags/v5.3.0" + }, + "require": { "php": ">=5.5.0" + }, + "autoload": { + "psr-4": { + "Elasticsearch\\": "src/Elasticsearch/" + } } } } ], "require": { "php": ">=5.5.9", - "ruflin/elastica": "5.1.0" + "ruflin/elastica": "5.3.0" }, "require-dev": { "jakub-onderka/php-parallel-lint": "0.9.2", -- To view, visit https://gerrit.wikimedia.org/r/379216 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I46edfa8462a7e8db691f5eb8b931fce1f8eef7e2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Elastica Gerrit-Branch: master Gerrit-Owner: DCausseGerrit-Reviewer: DCausse Gerrit-Reviewer: EBernhardson Gerrit-Reviewer: Legoktm Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Flow[master]: Remove references to StubUserLang, it's going away
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/382061 ) Change subject: Remove references to StubUserLang, it's going away .. Remove references to StubUserLang, it's going away Change-Id: I136949db3c5429ec84a1db3795aee90b6bb2031b --- M maintenance/FlowUpdateWorkflowPageId.php 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: MaxSem: Looks good to me, approved jenkins-bot: Verified diff --git a/maintenance/FlowUpdateWorkflowPageId.php b/maintenance/FlowUpdateWorkflowPageId.php index a7aad9a..be6f550 100644 --- a/maintenance/FlowUpdateWorkflowPageId.php +++ b/maintenance/FlowUpdateWorkflowPageId.php @@ -68,7 +68,7 @@ */ class WorkflowPageIdUpdateGenerator implements RowUpdateGenerator { /** -* @var Language|StubUserLang +* @var Language */ protected $lang; protected $fixedCount = 0; @@ -76,7 +76,7 @@ protected $warnings = []; /** -* @param Language|StubUserLang $lang +* @param Language $lang */ public function __construct( $lang ) { $this->lang = $lang; -- To view, visit https://gerrit.wikimedia.org/r/382061 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I136949db3c5429ec84a1db3795aee90b6bb2031b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: ChadGerrit-Reviewer: MaxSem Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits