[MediaWiki-commits] [Gerrit] Enable base::firewall on tungsten - change (operations/puppet)
Muehlenhoff has submitted this change and it was merged. Change subject: Enable base::firewall on tungsten .. Enable base::firewall on tungsten port 80 is granted via ferm service xhgui_http port 27017 is granted via ferm service xhgui_mongodb (port 28017 provides the web status page, which isn't needed. It could still be access from localhost) The other services are covered by the base rules in base::firewall (like sshd, ntpd) or unwanted (like rpc.statd) Change-Id: Ic4d60cda9eefda349cbcb6f41485b3f6454e97d2 --- M manifests/site.pp 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Muehlenhoff: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/site.pp b/manifests/site.pp index 5f118f2..98a7d84 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -2616,6 +2616,7 @@ # test system for performance team (T117888) node 'tungsten.eqiad.wmnet' { role testsystem, xhgui +include base::firewall } node 'uranium.wikimedia.org' { -- To view, visit https://gerrit.wikimedia.org/r/283441 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic4d60cda9eefda349cbcb6f41485b3f6454e97d2 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Muehlenhoff Gerrit-Reviewer: Muehlenhoff 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] Update jquery.i18n - change (mediawiki...UniversalLanguageSelector)
Nikerabbit has uploaded a new change for review. https://gerrit.wikimedia.org/r/283599 Change subject: Update jquery.i18n .. Update jquery.i18n Whitespace changes only Change-Id: I150b69b5015440215573f2f40e7ac56bacea6c90 --- M lib/jquery.i18n/jquery.i18n.emitter.bidi.js M lib/jquery.i18n/jquery.i18n.emitter.js M lib/jquery.i18n/jquery.i18n.js M lib/jquery.i18n/jquery.i18n.language.js M lib/jquery.i18n/jquery.i18n.messagestore.js M lib/jquery.i18n/jquery.i18n.parser.js M lib/jquery.i18n/languages/bs.js M lib/jquery.i18n/languages/dsb.js M lib/jquery.i18n/languages/fi.js M lib/jquery.i18n/languages/ga.js M lib/jquery.i18n/languages/he.js M lib/jquery.i18n/languages/hsb.js M lib/jquery.i18n/languages/hu.js M lib/jquery.i18n/languages/hy.js M lib/jquery.i18n/languages/la.js M lib/jquery.i18n/languages/ml.js M lib/jquery.i18n/languages/os.js M lib/jquery.i18n/languages/ru.js M lib/jquery.i18n/languages/sl.js M lib/jquery.i18n/languages/uk.js 20 files changed, 75 insertions(+), 75 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector refs/changes/99/283599/1 diff --git a/lib/jquery.i18n/jquery.i18n.emitter.bidi.js b/lib/jquery.i18n/jquery.i18n.emitter.bidi.js index 3a5b625..51ce01a 100644 --- a/lib/jquery.i18n/jquery.i18n.emitter.bidi.js +++ b/lib/jquery.i18n/jquery.i18n.emitter.bidi.js @@ -51,7 +51,7 @@ if ( !m ) { return null; } - if ( m[2] === undefined ) { + if ( m[ 2 ] === undefined ) { return 'ltr'; } return 'rtl'; @@ -72,17 +72,17 @@ * direction inference). The latter is cleaner but still not widely supported. */ bidi: function ( nodes ) { - var dir = strongDirFromContent( nodes[0] ); + var dir = strongDirFromContent( nodes[ 0 ] ); if ( dir === 'ltr' ) { // Wrap in LEFT-TO-RIGHT EMBEDDING ... POP DIRECTIONAL FORMATTING - return '\u202A' + nodes[0] + '\u202C'; + return '\u202A' + nodes[ 0 ] + '\u202C'; } if ( dir === 'rtl' ) { // Wrap in RIGHT-TO-LEFT EMBEDDING ... POP DIRECTIONAL FORMATTING - return '\u202B' + nodes[0] + '\u202C'; + return '\u202B' + nodes[ 0 ] + '\u202C'; } // No strong directionality: do not wrap - return nodes[0]; + return nodes[ 0 ]; } } ); }( jQuery ) ); diff --git a/lib/jquery.i18n/jquery.i18n.emitter.js b/lib/jquery.i18n/jquery.i18n.emitter.js index b26f147..628222b 100644 --- a/lib/jquery.i18n/jquery.i18n.emitter.js +++ b/lib/jquery.i18n/jquery.i18n.emitter.js @@ -17,7 +17,7 @@ 'use strict'; var MessageParserEmitter = function () { - this.language = $.i18n.languages[String.locale] || $.i18n.languages['default']; + this.language = $.i18n.languages[ String.locale ] || $.i18n.languages[ 'default' ]; }; MessageParserEmitter.prototype = { @@ -48,10 +48,10 @@ return messageParserEmitter.emit( n, replacements ); } ); - operation = node[0].toLowerCase(); + operation = node[ 0 ].toLowerCase(); - if ( typeof messageParserEmitter[operation] === 'function' ) { - ret = messageParserEmitter[operation]( subnodes, replacements ); + if ( typeof messageParserEmitter[ operation ] === 'function' ) { + ret = messageParserEmitter[ operation ]( subnodes, replacements ); } else { throw new Error( 'unknown operation "' + operation + '"' ); } @@ -106,11 +106,11 @@ * @return {string} replacement */ replace: function ( nodes, replacements ) { - var index = parseInt( nodes[0], 10 ); + var index = parseInt( nodes[ 0 ], 10 ); if ( index < replacements.length ) { // replacement is not a string, don't touch! - return replacements[index]; + return replacements[ index ]; } else { // index not found, fallback to displaying variable return '$' + ( index +
[MediaWiki-commits] [Gerrit] Update jquery.uls from upstream to 19e67015 - change (mediawiki...UniversalLanguageSelector)
Nikerabbit has uploaded a new change for review. https://gerrit.wikimedia.org/r/283598 Change subject: Update jquery.uls from upstream to 19e67015 .. Update jquery.uls from upstream to 19e67015 Add kbp Change-Id: Iacc845c1b186f5a5f93cb5b071c0d628c3212ce3 --- M lib/jquery.uls/src/jquery.uls.data.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector refs/changes/98/283598/1 diff --git a/lib/jquery.uls/src/jquery.uls.data.js b/lib/jquery.uls/src/jquery.uls.data.js index 3fb5bdf..8b81025 100644 --- a/lib/jquery.uls/src/jquery.uls.data.js +++ b/lib/jquery.uls/src/jquery.uls.data.js @@ -3,5 +3,5 @@ 'use strict'; $.uls = $.uls || {}; //noinspection JSHint - $.uls.data = {"languages":{"aa":["Latn",["AF"],"Qafár af"],"ab":["Cyrl",["EU"],"Аҧсшәа"],"abs":["Latn",["AS"],"Bahasa Ambon"],"ace":["Latn",["AS","PA"],"Acèh"],"acf":["Latn",["AM"],"kwéyòl"],"ady":["Cyrl",["EU","ME"],"Адыгабзэ"],"ady-cyrl":["ady"],"ady-latn":["Latn",["EU","ME"],"Adygabze"],"aeb":["aeb-arab"],"aeb-arab":["Arab",["AF"],"تونسي"],"aeb-latn":["Latn",["AF"],"Tûnsî"],"af":["Latn",["AF"],"Afrikaans"],"ahr":["Deva",["AS"],"अहिराणी"],"ak":["Latn",["AF"],"Akan"],"akz":["Latn",["AM"],"Albaamo innaaɬiilka"],"aln":["Latn",["EU"],"Gegë"],"am":["Ethi",["AF"],"አማርኛ"],"an":["Latn",["EU"],"aragonés"],"ang":["Latn",["EU"],"Ænglisc"],"anp":["Deva",["AS"],"अङ्गिका"],"ar":["Arab",["ME"],"العربية"],"arc":["Syrc",["ME"],"ܐܪܡܝܐ"],"arn":["Latn",["AM"],"mapudungun"],"aro":["Latn",["AM"],"Araona"],"arq":["Arab",["AF"],"جازايرية"],"ary":["Latn",["ME"],"Maġribi"],"arz":["Arab",["ME"],"مصرى"],"as":["Beng",["AS"],"অসমীয়া"],"ase":["Sgnw",["AM"],"American sign language"],"ast":["Latn",["EU"],"asturianu"],"av":["Cyrl",["EU"],"авар"],"avk":["Latn",["WW"],"Kotava"],"ay":["Latn",["AM"],"Aymar aru"],"az":["az-latn"],"az-arab":["Arab",["AS","ME"],"تۆرکجه"],"az-latn":["Latn",["EU","ME"],"azərbaycanca"],"az-cyrl":["Cyrl",["EU","ME"],"азәрбајҹанҹа"],"azb":["az-arab"],"azj":["az-latn"],"ba":["Cyrl",["EU"],"башҡортса"],"ban":["Bali",["AS"],"ᬩᬲᬩᬮᬶ"],"bar":["Latn",["EU"],"Boarisch"],"bat-smg":["sgs"],"bbc-latn":["Latn",["AS"],"Batak Toba"],"bbc-batk":["Batk",["AS"],"Batak Toba"],"bbc":["Latn",["AS"],"Batak Toba"],"bcc":["Arab",["AS","ME"],"جهلسری بلوچی"],"bcl":["Latn",["AS"],"Bikol Central"],"be-tarask":["Cyrl",["EU"],"беларуская (тарашкевіца)"],"be-x-old":["be-tarask"],"be":["Cyrl",["EU"],"беларуская"],"bew":["Latn",["AS"],"Bahasa Betawi"],"bfa":["Latn",["AF"],"Bari"],"bfq":["Taml",["AS"],"படகா"],"bg":["Cyrl",["EU"],"български"],"bgn":["Arab",["AS","ME"],"روچ کپتین بلوچی"],"bh":["Deva",["AS"],"भोजपुरी"],"bho":["Deva",["AS"],"भोजपुरी"],"bi":["Latn",["PA"],"Bislama"],"bjn":["Latn",["AS"],"Bahasa Banjar"],"bm":["Latn",["AF"],"bamanankan"],"bn":["Beng",["AS"],"বাংলা"],"bo":["Tibt",["AS"],"བོད་ཡིག"],"bpy":["Beng",["AS"],"বিষ্ণুপ্রিয়া মণিপুরী"],"bqi":["Arab",["AS","ME"],"بختیاری"],"br":["Latn",["EU"],"brezhoneg"],"brh":["Latn",["ME","AS"],"Bráhuí"],"brx":["Deva",["AS"],"बड़ो"],"bs":["Latn",["EU"],"bosanski"],"bto":["Latn",["AS"],"Iriga Bicolano"],"bug":["Bugi",["AS"],"ᨅᨔ ᨕᨘᨁᨗ"],"bxr":["Cyrl",["AS"],"буряад"],"ca":["Latn",["EU"],"català"],"cbk-zam":["Latn",["AS"],"Chavacano de Zamboanga"],"cdo":["Latn",["AS"],"Mìng-dĕ̤ng-ngṳ̄"],"ce":["Cyrl",["EU"],"нохчийн"],"ceb":["Latn",["AS"],"Cebuano"],"ch":["Latn",["PA"],"Chamoru"],"cho":["Latn",["AM"],"Choctaw"],"chr":["Cher",["AM"],"ᏣᎳᎩ"],"chy":["Latn",["AM"],"Tsetsêhestâhese"],"ciw":["Latn",["AM"],"Ojibwemowin"],"cjy":["cjy-hant"],"cjy-hans":["Hans",["AS"],"晋语(简化字)"],"cjy-hant":["Hant",["AS"],"晉語"],"ckb":["Arab",["ME"],"کوردیی ناوەندی"],"cnh":["Latn",["AS"],"Lai holh"],"co":["Latn",["EU"],"corsu"],"cps":["Latn",["AS"],"Capiceño"],"cr":["Cans",["AM"],"ᓀᐦᐃᔭᐍᐏᐣ"],"cr-cans":["cr"],"cr-latn":["Latn",["AM"],"Nēhiyawēwin"],"crh":["Latn",["EU"],"qırımtatarca"],"crh-cyrl":["Cyrl",["EU"],"къырымтатарджа"],"crh-latn":["crh"],"cs":["Latn",["EU"],"čeština"],"csb":["Latn",["EU"],"kaszëbsczi"],"cu":["Cyrl",["EU"],"словѣньскъ \/ ⰔⰎⰑⰂⰡⰐⰠⰔⰍⰟ"],"cv":["Cyrl",["EU"],"Чӑвашла"],"cy":["Latn",["EU"],"Cymraeg"],"da":["Latn",["EU"],"dansk"],"de-at":["Latn",["EU"],"Österreichisches Deutsch"],"de-ch":["Latn",["EU"],"Schweizer Hochdeutsch"],"de-formal":["Latn",["EU"],"Deutsch (Sie-Form)"],"de":["Latn",["EU"],"Deutsch"],"din":["Latn",["AF"],"Thuɔŋjäŋ"],"diq":["Latn",["EU","AS"],"Zazaki"],"dsb":["Latn",["EU"],"dolnoserbski"],"dtp":["Latn",["AS"],"Dusun Bundu-liwan"],"dty":["Deva",["AS"],"डोटेली"],"dv":["Thaa",["AS"],"ދިވެހިބަސް"],"dz":["Tibt",["AS"],"ཇོང་ཁ"],"ee":["Latn",["AF"],"eʋegbe"],"egl":["Latn",["EU"],"Emiliàn"],"el":["Grek",["EU"],"Ελληνικά"],"eml":["Latn",["EU"],"emiliàn e rumagnòl"],"en-ca":["Latn",["AM"],"Canadian English"],"en-gb":["Latn",["EU","AS","PA"],"British English"],"en":["Latn",["EU","AM","AF","ME","AS","PA","WW"],"English"],"eo":["La
[MediaWiki-commits] [Gerrit] Update upstream update scripts - change (mediawiki...UniversalLanguageSelector)
Nikerabbit has uploaded a new change for review. https://gerrit.wikimedia.org/r/283597 Change subject: Update upstream update scripts .. Update upstream update scripts * Allow to run any directory * Leaving stuff on /tmp was not nice * Git pull was run on wrong directory Change-Id: Ia7f82de55c9bd446c29afc0684660ed00b6585bf --- M scripts/update-jquery-i18n.sh M scripts/update-jquery-ime.sh M scripts/update-jquery-uls.sh M scripts/update-jquery-webfonts.sh 4 files changed, 55 insertions(+), 38 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector refs/changes/97/283597/1 diff --git a/scripts/update-jquery-i18n.sh b/scripts/update-jquery-i18n.sh index 537164b..4471cf7 100755 --- a/scripts/update-jquery-i18n.sh +++ b/scripts/update-jquery-i18n.sh @@ -1,17 +1,21 @@ #!/bin/bash -DEST="../lib/jquery.i18n"; -CLONEDIR="/tmp/jquery.i18n"; -HERE=$(pwd); -UPSTREAM="https://github.com/wikimedia/jquery.i18n.git";; +BASEDIR="`dirname \"$0\"`/.." +BASEDIR="`( cd \"$DIRSCRIPT\" && pwd )`" -echo -e "Getting latest jquery.i18n from $UPSTREAM\n"; +DEST="$BASEDIR/lib/jquery.i18n"; +CLONEDIR="$BASEDIR/vendor/jquery.i18n"; + +UPSTREAM="https://github.com/wikimedia/jquery.i18n.git"; + +echo "Getting latest jquery.i18n from $UPSTREAM" if [ -d $CLONEDIR ]; then -git pull; + cd $CLONEDIR +git pull else -git clone $UPSTREAM $CLONEDIR; +git clone $UPSTREAM $CLONEDIR fi -cd "$HERE"; -cp -rf $CLONEDIR/src/* $DEST +rm -rf "$DEST/*" +cp -r $CLONEDIR/src/* $DEST diff --git a/scripts/update-jquery-ime.sh b/scripts/update-jquery-ime.sh index bb5e8b2..aef40ef 100755 --- a/scripts/update-jquery-ime.sh +++ b/scripts/update-jquery-ime.sh @@ -1,20 +1,25 @@ #!/bin/bash -DEST="../lib/jquery.ime"; -CLONEDIR="/tmp/jquery.ime"; -HERE=$(pwd); -UPSTREAM="https://github.com/wikimedia/jquery.ime.git";; +BASEDIR="`dirname \"$0\"`/.." +BASEDIR="`( cd \"$DIRSCRIPT\" && pwd )`" -echo -e "Getting latest jquery.ime from $UPSTREAM\n"; +DEST="$BASEDIR/lib/jquery.ime"; +CLONEDIR="$BASEDIR/vendor/jquery.ime"; + +UPSTREAM="https://github.com/wikimedia/jquery.ime.git"; + +echo "Getting latest jquery.ime from $UPSTREAM" if [ -d $CLONEDIR ]; then -git pull; + cd $CLONEDIR +git pull else -git clone $UPSTREAM $CLONEDIR; +git clone $UPSTREAM $CLONEDIR fi -cd $CLONEDIR; -npm install; -grunt copy concat; -cd "$HERE"; -cp -rf $CLONEDIR/dist/jquery.ime/{images,css,rules,jquery.ime.js} $DEST; +cd $CLONEDIR +npm install +$CLONEDIR/node_modules/.bin/grunt copy concat + +rm -rf "$DEST/*" +cp -rf $CLONEDIR/dist/jquery.ime/{images,css,rules,jquery.ime.js} $DEST diff --git a/scripts/update-jquery-uls.sh b/scripts/update-jquery-uls.sh index 8797d66..014bee3 100755 --- a/scripts/update-jquery-uls.sh +++ b/scripts/update-jquery-uls.sh @@ -1,17 +1,21 @@ #!/bin/bash -DEST="../lib/jquery.uls"; -CLONEDIR="/tmp/jquery.uls"; -HERE=$(pwd); -UPSTREAM="https://github.com/wikimedia/jquery.uls.git";; +BASEDIR="`dirname \"$0\"`/.." +BASEDIR="`( cd \"$DIRSCRIPT\" && pwd )`" -echo -e "Getting latest jquery.uls from $UPSTREAM\n"; +DEST="$BASEDIR/lib/jquery.uls"; +CLONEDIR="$BASEDIR/vendor/jquery.uls"; -if [ -d $CLONEDIR ]; then -git pull; +UPSTREAM="https://github.com/wikimedia/jquery.uls.git"; + +echo "Getting latest jquery.uls from $UPSTREAM" + +if [ -d $CLONEDIR ]; then + cd $CLONEDIR +git pull else -git clone $UPSTREAM $CLONEDIR; +git clone $UPSTREAM $CLONEDIR fi -cd "$HERE"; +rm -rf "$DEST/*" cp -rf $CLONEDIR/{images,css,src,i18n} $DEST diff --git a/scripts/update-jquery-webfonts.sh b/scripts/update-jquery-webfonts.sh index f2ff811..d64d3d7 100755 --- a/scripts/update-jquery-webfonts.sh +++ b/scripts/update-jquery-webfonts.sh @@ -1,17 +1,21 @@ #!/bin/bash -DEST="../lib/"; -CLONEDIR="/tmp/jquery.webfonts"; -HERE=$(pwd); -UPSTREAM="https://github.com/wikimedia/jquery.webfonts.git";; +BASEDIR="`dirname \"$0\"`/.." +BASEDIR="`( cd \"$DIRSCRIPT\" && pwd )`" -echo -e "Getting latest jquery.webfonts from $UPSTREAM\n"; +DEST="$BASEDIR/lib/"; +CLONEDIR="$BASEDIR/vendor/jquery.wefonts"; + +UPSTREAM="https://github.com/wikimedia/jquery.webfonts.git"; + +echo "Getting latest jquery.wefonts from $UPSTREAM" if [ -d $CLONEDIR ]; then -git pull; + cd $CLONEDIR +git pull else -git clone $UPSTREAM $CLONEDIR; +git clone $UPSTREAM $CLONEDIR fi -cd "$HERE"; +rm -rf "$DEST/*" cp -rf $CLONEDIR/src/* $DEST -- To view, visit https://gerrit.wikimedia.org/r/283597 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia7f82de55c9bd446c29afc0684660ed00b6585bf Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.or
[MediaWiki-commits] [Gerrit] Fix cxserver on deployment-cxserver03 returning 404s - change (operations/puppet)
KartikMistry has uploaded a new change for review. https://gerrit.wikimedia.org/r/283596 Change subject: Fix cxserver on deployment-cxserver03 returning 404s .. Fix cxserver on deployment-cxserver03 returning 404s Bug: T132733 Change-Id: I7d24f26e559a603ea0107c50d819f3a35bfb5d56 --- M modules/beta/files/shinken.cfg 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/96/283596/1 diff --git a/modules/beta/files/shinken.cfg b/modules/beta/files/shinken.cfg index 1b5c6a3..861f915 100644 --- a/modules/beta/files/shinken.cfg +++ b/modules/beta/files/shinken.cfg @@ -52,7 +52,7 @@ service_description Content Translation Server hostgroup_name role::cxserver use generic-service -check_command check_http_on_port!8080 +check_command check_http_on_port!8080!/_info } define service { -- To view, visit https://gerrit.wikimedia.org/r/283596 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7d24f26e559a603ea0107c50d819f3a35bfb5d56 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: KartikMistry ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki.special.upload.js: Use formatversion=2 for API req... - change (mediawiki/core)
Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/283595 Change subject: mediawiki.special.upload.js: Use formatversion=2 for API requests .. mediawiki.special.upload.js: Use formatversion=2 for API requests This simplifies the processing of the response. Change-Id: I2073ec2c017e4d5c5c7f786b45118516feea1aac --- M resources/src/mediawiki.special/mediawiki.special.upload.js 1 file changed, 7 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/95/283595/1 diff --git a/resources/src/mediawiki.special/mediawiki.special.upload.js b/resources/src/mediawiki.special/mediawiki.special.upload.js index 8c89ed9..e912bd7 100644 --- a/resources/src/mediawiki.special/mediawiki.special.upload.js +++ b/resources/src/mediawiki.special/mediawiki.special.upload.js @@ -64,15 +64,15 @@ $spinnerDestCheck = $.createSpinner().insertAfter( '#wpDestFile' ); ( new mw.Api() ).get( { + formatversion: 2, action: 'query', titles: ( new mw.Title( this.nameToCheck, mw.config.get( 'wgNamespaceIds' ).file ) ).getPrefixedText(), prop: 'imageinfo', - iiprop: 'uploadwarning', - indexpageids: true + iiprop: 'uploadwarning' } ).done( function ( result ) { var resultOut = ''; if ( result.query ) { - resultOut = result.query.pages[ result.query.pageids[ 0 ] ].imageinfo[ 0 ]; + resultOut = result.query.pages[ 0 ].imageinfo[ 0 ].html; } $spinnerDestCheck.remove(); uploadWarning.processResult( resultOut, uploadWarning.nameToCheck ); @@ -80,8 +80,8 @@ }, processResult: function ( result, fileName ) { - this.setWarning( result.html ); - this.responseCache[ fileName ] = result.html; + this.setWarning( result ); + this.responseCache[ fileName ] = result; }, setWarning: function ( warning ) { @@ -117,6 +117,7 @@ $spinnerLicense = $.createSpinner().insertAfter( '#wpLicense' ); ( new mw.Api() ).get( { + formatversion: 2, action: 'parse', text: '{{' + license + '}}', title: $( '#wpDestFile' ).val() || 'File:Sample.jpg', @@ -129,7 +130,7 @@ }, processResult: function ( result, license ) { - this.responseCache[ license ] = result.parse.text[ '*' ]; + this.responseCache[ license ] = result.parse.text; this.showPreview( this.responseCache[ license ] ); }, -- To view, visit https://gerrit.wikimedia.org/r/283595 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2073ec2c017e4d5c5c7f786b45118516feea1aac Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki.special.upload.js: Remove spinner in .always() ins... - change (mediawiki/core)
Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/283594 Change subject: mediawiki.special.upload.js: Remove spinner in .always() instead of .done() .. mediawiki.special.upload.js: Remove spinner in .always() instead of .done() This removes the spinner even when the API request fails. Change-Id: Ic0f08312b9a1137772f5b6734256e7bd48d20fcf --- M resources/src/mediawiki.special/mediawiki.special.upload.js 1 file changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/94/283594/1 diff --git a/resources/src/mediawiki.special/mediawiki.special.upload.js b/resources/src/mediawiki.special/mediawiki.special.upload.js index 8c89ed9..945bfb0 100644 --- a/resources/src/mediawiki.special/mediawiki.special.upload.js +++ b/resources/src/mediawiki.special/mediawiki.special.upload.js @@ -74,8 +74,9 @@ if ( result.query ) { resultOut = result.query.pages[ result.query.pageids[ 0 ] ].imageinfo[ 0 ]; } - $spinnerDestCheck.remove(); uploadWarning.processResult( resultOut, uploadWarning.nameToCheck ); + } ).always( function () { + $spinnerDestCheck.remove(); } ); }, @@ -123,8 +124,9 @@ prop: 'text', pst: true } ).done( function ( result ) { - $spinnerLicense.remove(); uploadLicense.processResult( result, license ); + } ).always( function () { + $spinnerLicense.remove(); } ); }, -- To view, visit https://gerrit.wikimedia.org/r/283594 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic0f08312b9a1137772f5b6734256e7bd48d20fcf Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Validate the editable GeoJSON against the sanitize-mapdata a... - change (mediawiki...Kartographer)
JGirault has uploaded a new change for review. https://gerrit.wikimedia.org/r/283592 Change subject: Validate the editable GeoJSON against the sanitize-mapdata api before applying it. .. Validate the editable GeoJSON against the sanitize-mapdata api before applying it. Change-Id: I7dae1a52ad720bfc1ccd7935920df89bcdf48a53 --- M modules/kartographer.js M modules/ve-maps/ve.ce.MWMapsNode.js M modules/ve-maps/ve.ui.MWMapsDialog.js 3 files changed, 46 insertions(+), 21 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Kartographer refs/changes/92/283592/1 diff --git a/modules/kartographer.js b/modules/kartographer.js index 40f2f18..7d12cac 100644 --- a/modules/kartographer.js +++ b/modules/kartographer.js @@ -157,31 +157,50 @@ }; /** -* Update "editable" geojson layer from a string +* Updates "editable" GeoJSON layer from a string. +* +* Validates the GeoJSON against the `sanitize-mapdata` api +* before executing it. +* +* The deferred object will be resolved with a `boolean` flag +* indicating whether the GeoJSON was valid and was applied. * * @param {L.mapbox.Map} map Map to set the GeoJSON for * @param {string} geoJsonString GeoJSON data, empty string to clear -* @return {boolean} The GeoJSON string provided was valid as was applied +* @return {jQuery.Promise} */ mw.kartographer.updateKartographerLayer = function ( map, geoJsonString ) { - var geoJson, layer, isValid = true; + return $.Deferred( function ( deferred ) { + var isValid = true; - if ( geoJsonString ) { - try { - geoJson = JSON.parse( geoJsonString ); - } catch ( e ) { - // Invalid JSON, clear it - isValid = false; + if ( geoJsonString === '' ) { + deferred.resolve( isValid ); } - } - try { - layer = mw.kartographer.getKartographerLayer( map ); - layer.setGeoJSON( !isValid || geoJson === undefined ? [] : geoJson ); - return isValid; - } catch ( e ) { - return false; - } + new mw.Api().post( { + action: 'sanitize-mapdata', + text: geoJsonString + } ).done( function ( resp ) { + var data = resp[ 'sanitize-mapdata' ], + geoJson, + layer; + + geoJsonString = data.sanitized; + isValid = !!( geoJsonString && !data.error ); + + if ( isValid ) { + try { + geoJson = JSON.parse( geoJsonString ); + layer = mw.kartographer.getKartographerLayer( map ); + layer.setGeoJSON( geoJson ); + } catch ( e ) { + isValid = false; + } + } + deferred.resolve( isValid ); + } ); + + } ).promise(); }; function getWindowManager() { diff --git a/modules/ve-maps/ve.ce.MWMapsNode.js b/modules/ve-maps/ve.ce.MWMapsNode.js index 441605d..612af79 100644 --- a/modules/ve-maps/ve.ce.MWMapsNode.js +++ b/modules/ve-maps/ve.ce.MWMapsNode.js @@ -27,6 +27,8 @@ this.$imageLoader = null; this.geoJson = null; + this.updateGeoJson = $.debounce( 300, $.proxy( this.updateGeoJson, this ) ); + // Events this.model.connect( this, { attributeChange: 'onAttributeChange' } ); this.connect( this, { focus: 'onMapFocus' } ); diff --git a/modules/ve-maps/ve.ui.MWMapsDialog.js b/modules/ve-maps/ve.ui.MWMapsDialog.js index 9357b76..612ae44 100644 --- a/modules/ve-maps/ve.ui.MWMapsDialog.js +++ b/modules/ve-maps/ve.ui.MWMapsDialog.js @@ -17,6 +17,8 @@ ve.ui.MWMapsDialog = function VeUiMWMapsDialog() { // Parent constructor ve.ui.MWMapsDialog.super.apply( this, arguments ); + + this.updateGeoJson = $.debounce( 300, $.proxy( this.updateGeoJson, this ) ); }; /* Inheritance */ @@ -321,15 +323,17 @@ * Update the GeoJSON layer from the current input state */ ve.ui.MWMapsDialog.prototype.updateGeoJson = function () { - var isValid; + var self = this;
[MediaWiki-commits] [Gerrit] Add a hidden link with accesskey=v in SET prefer-wt mode - change (mediawiki...VisualEditor)
Alex Monk has uploaded a new change for review. https://gerrit.wikimedia.org/r/283591 Change subject: Add a hidden link with accesskey=v in SET prefer-wt mode .. Add a hidden link with accesskey=v in SET prefer-wt mode Try to tidy up a bit of code in DAT.init.js as well Bug: T116406 Change-Id: Iad1713e14ea1f982886ba06e0b722c554ab2b892 --- M modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js 1 file changed, 60 insertions(+), 46 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/91/283591/1 diff --git a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js index 26d940b..423206e 100644 --- a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js +++ b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js @@ -22,7 +22,8 @@ ( function () { var conf, tabMessages, uri, pageExists, viewUri, veEditUri, isViewPage, isEditPage, pageCanLoadVE, init, targetPromise, enable, tempdisable, autodisable, - tabPreference, userPrefEnabled, initialWikitext, oldid, multipleSectionEditLinks, + tabPreference, userPrefEnabled, userPrefPreferShow, initialWikitext, oldid, + multipleSectionEditLinks, active = false, progressStep = 0, progressSteps = [ @@ -429,7 +430,7 @@ } // If the edit tab is hidden, remove it. - if ( !( init.isAvailable && userPrefEnabled ) ) { + if ( !( init.isAvailable && userPrefPreferShow ) ) { $caVeEdit.remove(); } else if ( pageCanLoadVE ) { // Allow instant switching to edit mode, without refresh @@ -625,7 +626,10 @@ // User has 'visualeditor-enable' preference enabled (for alpha opt-in) // User has 'visualeditor-betatempdisable' preference disabled // User has 'visualeditor-autodisable' preference disabled - enable && !tempdisable && !autodisable && + enable && !tempdisable && !autodisable + ); + userPrefPreferShow = ( + userPrefEnabled && // If in two-edit-tab mode, or the user doesn't prefer wikitext always ( !conf.singleEditTab || tabPreference !== 'prefer-wt' ) @@ -672,7 +676,7 @@ // on this page. See above for why it may be false. mw.libs.ve = $.extend( mw.libs.ve || {}, init ); - if ( init.isAvailable && userPrefEnabled ) { + if ( init.isAvailable && userPrefPreferShow ) { $( 'html' ).addClass( 've-available' ); } else { $( 'html' ).addClass( 've-not-available' ); @@ -688,7 +692,17 @@ if ( init.isAvailable ) { // Load the editor … if ( - ( + uri.query.undo === undefined && + uri.query.undoafter === undefined && + uri.query.editintro === undefined && + uri.query.preload === undefined && + uri.query.preloadtitle === undefined && + uri.query.preloadparams === undefined && + uri.query.veswitched === undefined + // Known-good parameters: edit, veaction, section, vesection + // TODO: other params too? See identical list in VisualEditor.hooks.php) + ) { + if ( // … if on a ?veaction=edit page ( isViewPage && uri.query.veaction === 'edit' ) || // … or if on ?action=edit in single edit mode and the user wants it @@ -698,7 +712,7 @@ uri.query.wteswitched === '1' || ( tabPreference !== 'multi-tab' && - userPrefEnabled && + userPrefPreferShow && // If it's a view-source situation, we don't want to show VE on-load !$( '#ca-viewsource' ).length && ( @@ -714,22 +728,26 @@ )
[MediaWiki-commits] [Gerrit] storeDataParsoid is an env variable, not a Parsoid config - change (mediawiki...parsoid)
Arlolra has uploaded a new change for review. https://gerrit.wikimedia.org/r/283590 Change subject: storeDataParsoid is an env variable, not a Parsoid config .. storeDataParsoid is an env variable, not a Parsoid config Change-Id: I23efe102dc99695456377c5c59073e0ddfba1030 --- M bin/parse.js M lib/config/MWParserEnvironment.js M lib/config/ParsoidConfig.js M lib/utils/Util.js 4 files changed, 12 insertions(+), 16 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid refs/changes/90/283590/1 diff --git a/bin/parse.js b/bin/parse.js index 6aee795..85dc674 100755 --- a/bin/parse.js +++ b/bin/parse.js @@ -102,6 +102,11 @@ 'boolean': false, 'default': false, }, + 'dp': { + description: 'Output data-parsoid JSON', + 'boolean': true, + 'default': false, + }, 'dpinfile': { description: 'Input data-parsoid JSON file', 'boolean': false, @@ -215,6 +220,10 @@ // Enable wikitext scrubbing env.scrubWikitext = argv.scrubWikitext; + // Sets ids on nodes and stores data-parsoid attributes + // in a JSON blob in the head. + env.storeDataParsoid = argv.dp; + if (!argv.wt2html) { if (argv.oldtextfile) { argv.oldtext = fs.readFileSync(argv.oldtextfile, 'utf8'); diff --git a/lib/config/MWParserEnvironment.js b/lib/config/MWParserEnvironment.js index 7f3d550..2b3796a 100644 --- a/lib/config/MWParserEnvironment.js +++ b/lib/config/MWParserEnvironment.js @@ -74,9 +74,9 @@ console.assert(parsoidConfig.mwApiMap.has(options.prefix)); this.conf.wiki = new WikiConfig(this, null, options.prefix); - // Store this in the environment to manipulate it on each request, - // if necessary. Avoids having to clone the config. - this.storeDataParsoid = parsoidConfig.storeDataParsoid; + // Sets ids on nodes and stores data-parsoid attributes + // in a JSON blob in the head. + this.storeDataParsoid = false; this.linter = new Linter(this); this.configureLogging(); diff --git a/lib/config/ParsoidConfig.js b/lib/config/ParsoidConfig.js index 1d47ae1..36ba1f1 100644 --- a/lib/config/ParsoidConfig.js +++ b/lib/config/ParsoidConfig.js @@ -271,11 +271,6 @@ ParsoidConfig.prototype.DATA_PARSOID_VERSION = '0.0.2'; /** - * @property {boolean} storeDataParsoid - */ -ParsoidConfig.prototype.storeDataParsoid = false; - -/** * @property {boolean} addHTMLTemplateParameters * When processing template parameters, parse them to HTML and add it to the * template parameters data. diff --git a/lib/utils/Util.js b/lib/utils/Util.js index cb2677a..a25ecc1 100644 --- a/lib/utils/Util.js +++ b/lib/utils/Util.js @@ -212,9 +212,6 @@ parsoidConfig.maxDepth = typeof (opts.maxdepth) === 'number' ? opts.maxdepth : parsoidConfig.maxDepth; } - if (opts.dp !== undefined) { - parsoidConfig.storeDataParsoid = Util.booleanOption(opts.dp); - } if (opts.apiURL) { parsoidConfig.setMwApi({ prefix: 'customwiki', uri: opts.apiURL }); } @@ -340,11 +337,6 @@ }, 'rtTestMode': { description: 'Test in rt test mode (changes some parse & serialization strategies)', - 'boolean': true, - 'default': false, - }, - 'dp': { - description: 'Output data-parsoid JSON', 'boolean': true, 'default': false, }, -- To view, visit https://gerrit.wikimedia.org/r/283590 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I23efe102dc99695456377c5c59073e0ddfba1030 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/parsoid Gerrit-Branch: master Gerrit-Owner: Arlolra ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Don't select edit tab when VE is opened while user has prefe... - change (mediawiki...VisualEditor)
Alex Monk has uploaded a new change for review. https://gerrit.wikimedia.org/r/283589 Change subject: Don't select edit tab when VE is opened while user has prefer-wt pref .. Don't select edit tab when VE is opened while user has prefer-wt pref You can still open VE with prefer-wt mode by going to veaction=edit, and T116406 proposes making it accessible with a keyboard shortcut as well. Change-Id: Ifc25b5147a96a200ac3a7de465d5cdf67e2e255b --- M modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/89/283589/1 diff --git a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js index 6ddbec7..c19437d 100644 --- a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js +++ b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js @@ -1096,7 +1096,8 @@ $( '#ca-ve-edit' ).addClass( 'selected' ); if ( mw.config.get( 'wgVisualEditorConfig' ).singleEditTab && - mw.user.options.get( 'visualeditor-tabs' ) !== 'multi-tab' + mw.user.options.get( 'visualeditor-tabs' ) !== 'multi-tab' && + mw.user.options.get( 'visualeditor-tabs' ) !== 'prefer-wt' ) { $( '#ca-edit' ).addClass( 'selected' ); } -- To view, visit https://gerrit.wikimedia.org/r/283589 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifc25b5147a96a200ac3a7de465d5cdf67e2e255b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Alex Monk ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Only style originalContent when VE is active - change (mediawiki...VisualEditor)
Alex Monk has uploaded a new change for review. https://gerrit.wikimedia.org/r/283588 Change subject: Only style originalContent when VE is active .. Only style originalContent when VE is active Otherwise there is a white block above the resulting content after save Change-Id: If9239556ed5b1038aa86e4ba161da2abfd9e6bf2 --- M modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget-monobook.css M modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget-vector.css 2 files changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/88/283588/1 diff --git a/modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget-monobook.css b/modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget-monobook.css index cdb6a57..cda0b90 100644 --- a/modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget-monobook.css +++ b/modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget-monobook.css @@ -28,7 +28,7 @@ margin-bottom: 0; } -.ve-init-mw-desktopArticleTarget-originalContent { +.ve-active .ve-init-mw-desktopArticleTarget-originalContent { padding-top: 0.9921875em; } diff --git a/modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget-vector.css b/modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget-vector.css index e40d5eb..8dc8434 100644 --- a/modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget-vector.css +++ b/modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget-vector.css @@ -24,11 +24,11 @@ padding-bottom: 1.25em; } -.ve-init-mw-desktopArticleTarget-originalContent { +.ve-active .ve-init-mw-desktopArticleTarget-originalContent { padding-top: 1.25em; } -.ve-init-mw-target-surface .ve-init-mw-desktopArticleTarget-originalContent { +.ve-active .ve-init-mw-target-surface .ve-init-mw-desktopArticleTarget-originalContent { padding-left: 1.25em; padding-right: 1.25em; } @@ -103,11 +103,11 @@ padding-bottom: 1.875em; } - .ve-init-mw-desktopArticleTarget-originalContent { + .ve-active .ve-init-mw-desktopArticleTarget-originalContent { padding-top: 1.875em; } - .ve-init-mw-target-surface .ve-init-mw-desktopArticleTarget-originalContent { + .ve-active .ve-init-mw-target-surface .ve-init-mw-desktopArticleTarget-originalContent { padding-left: 1.875em; padding-right: 1.875em; } -- To view, visit https://gerrit.wikimedia.org/r/283588 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If9239556ed5b1038aa86e4ba161da2abfd9e6bf2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Alex Monk ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] v0.1.8 user vega ver2 by default - change (mediawiki...graphoid)
Yurik has uploaded a new change for review. https://gerrit.wikimedia.org/r/283587 Change subject: v0.1.8 user vega ver2 by default .. v0.1.8 user vega ver2 by default Change-Id: Iabc862cc7b5d0beb5542597d5581dc63cfc0d46e --- M lib/vega.js M package.json 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/graphoid refs/changes/87/283587/1 diff --git a/lib/vega.js b/lib/vega.js index 2d0cac2..3b4c83c 100644 --- a/lib/vega.js +++ b/lib/vega.js @@ -39,7 +39,7 @@ spec = JSON.parse(spec); } // the spec may contain vega version -var version = _.has(spec, 'version') ? spec.version : 1; +var version = _.has(spec, 'version') ? spec.version : 2; resultVersion = 'v' + version; switch (version) { diff --git a/package.json b/package.json index 4596987..5bec36f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "graphoid", - "version": "0.1.7", + "version": "0.1.8", "description": "Renders vega graphs from mediawiki pages", "main": "./app.js", "scripts": { -- To view, visit https://gerrit.wikimedia.org/r/283587 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iabc862cc7b5d0beb5542597d5581dc63cfc0d46e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/graphoid Gerrit-Branch: master Gerrit-Owner: Yurik ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Implement missing setMaxNgramsExtracted method - change (mediawiki...CirrusSearch)
jenkins-bot has submitted this change and it was merged. Change subject: Implement missing setMaxNgramsExtracted method .. Implement missing setMaxNgramsExtracted method Bug: T132625 Change-Id: I8b217b73383365a62f4b46eea7d9f2b57f3b6b7e --- M includes/Extra/Filter/SourceRegex.php M includes/Searcher.php 2 files changed, 11 insertions(+), 2 deletions(-) Approvals: MaxSem: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Extra/Filter/SourceRegex.php b/includes/Extra/Filter/SourceRegex.php index a748d0c..15dd1f6 100644 --- a/includes/Extra/Filter/SourceRegex.php +++ b/includes/Extra/Filter/SourceRegex.php @@ -139,4 +139,13 @@ public function setLocale( $locale ) { return $this->setParam( 'locale', $locale ); } + + /** +* @param int $maxNgrams The maximum number of ngrams to extracted from the +* regex. If more could be extracted from the regex tey are ignored. +* @return $this +*/ + public function setMaxNgramsExtracted( $maxNgrams ) { + return $this->setParam( 'max_ngrams_extracted', $maxNgrams ); + } } diff --git a/includes/Searcher.php b/includes/Searcher.php index f92ccd3..67bb481 100644 --- a/includes/Searcher.php +++ b/includes/Searcher.php @@ -450,8 +450,8 @@ $filter->setMaxInspect( 1 ); } $filter->setMaxDeterminizedStates( $this->config->get( 'CirrusSearchRegexMaxDeterminizedStates' ) ); - if ( isset( $regex[ 'max_ngrams_extracted' ] ) ) { - $filter->setMaxNgramExtracted( $regex[ 'max_ngrams_extracted' ] ); + if ( isset( $regex['max_ngrams_extracted'] ) ) { + $filter->setMaxNgramsExtracted( $regex['max_ngrams_extracted'] ); } $filter->setCaseSensitive( !$insensitive ); $filter->setLocale( $this->config->get( 'LanguageCode' ) ); -- To view, visit https://gerrit.wikimedia.org/r/283356 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8b217b73383365a62f4b46eea7d9f2b57f3b6b7e Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/extensions/CirrusSearch Gerrit-Branch: master Gerrit-Owner: EBernhardson Gerrit-Reviewer: Cindy-the-browser-test-bot Gerrit-Reviewer: DCausse Gerrit-Reviewer: Gehel Gerrit-Reviewer: Manybubbles Gerrit-Reviewer: MaxSem Gerrit-Reviewer: Smalyshev Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Cut off lead replication for a bit. SSH is busted - change (operations/puppet)
BBlack has submitted this change and it was merged. Change subject: Cut off lead replication for a bit. SSH is busted .. Cut off lead replication for a bit. SSH is busted Change-Id: I622179c60a6aafcd43c906cfd8c1c5ba4ac07367 --- M modules/role/manifests/gerrit/production.pp 1 file changed, 7 insertions(+), 7 deletions(-) Approvals: BBlack: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/role/manifests/gerrit/production.pp b/modules/role/manifests/gerrit/production.pp index a83746a..fe34494 100644 --- a/modules/role/manifests/gerrit/production.pp +++ b/modules/role/manifests/gerrit/production.pp @@ -66,18 +66,18 @@ 'push' => '+refs/*:refs/*', 'mirror'=> true, }, -'lead'=> { +#'lead'=> { # Note: This is in single quotes on purpose. ${name} is not # expected to be expanded by puppet but rather by gerrit # # lint:ignore:single_quote_string_with_variables -'url' => 'gerritsl...@lead.wikimedia.org:/srv/gerrit/git/${name}.git', +#'url' => 'gerritsl...@lead.wikimedia.org:/srv/gerrit/git/${name}.git', # lint:endignore -'threads' => '4', -'authGroup' => 'mediawiki-replication', -'push' => '+refs/*:refs/*', -'mirror'=> true, -}, +#'threads' => '4', +#'authGroup' => 'mediawiki-replication', +#'push' => '+refs/*:refs/*', +#'mirror'=> true, +#}, 'github' => { # Note: This is in single quotes on purpose. ${name} is not # expected to be expanded by puppet but rather by gerrit -- To view, visit https://gerrit.wikimedia.org/r/283585 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I622179c60a6aafcd43c906cfd8c1c5ba4ac07367 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Chad Gerrit-Reviewer: BBlack Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add temporary code to investigate why we receive unknown tit... - change (mediawiki...CirrusSearch)
jenkins-bot has submitted this change and it was merged. Change subject: Add temporary code to investigate why we receive unknown titles from SearchEngine .. Add temporary code to investigate why we receive unknown titles from SearchEngine This is bugging me, I can't reproduce the issue locally and apparently it happens on more than 300qps (according to logstash). We should understand what's going on here because 300qps can have a significant impact on all analysis using CirrusSearchResultSet. Hopefully with the help of the new queryString payload we will be able to identify the cause? Change-Id: I873b5e7bf76faefcf2e6e3f42de9b75e6e68fac5 --- M includes/ElasticsearchIntermediary.php 1 file changed, 16 insertions(+), 0 deletions(-) Approvals: EBernhardson: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/ElasticsearchIntermediary.php b/includes/ElasticsearchIntermediary.php index 8549e9f..c602526 100644 --- a/includes/ElasticsearchIntermediary.php +++ b/includes/ElasticsearchIntermediary.php @@ -231,7 +231,15 @@ $allHitsByTitle[$hit['title']] = $hit; } $resultHits = array(); + // FIXME: temporary hack to investigate why SpecialSearch can display results + // that do not come from cirrus. + $bogusResult = null; foreach ( self::$resultTitleStrings as $titleString ) { + // Track only the first missing title. + if ( $bogusResult === null && !isset( $allHitsByTitle[$titleString] ) ) { + $bogusResult = $titleString; + } + $hit = isset( $allHitsByTitle[$titleString] ) ? $allHitsByTitle[$titleString] : array(); // Apply defaults to ensure all properties are accounted for. $resultHits[] = $hit + array( @@ -264,6 +272,14 @@ 'requests' => $requests, ); + if ( $bogusResult !== null ) { + if ( is_string( $bogusResult ) ) { + $requestSet['payload']['bogusResult'] = $bogusResult; + } else { + $requestSet['payload']['bogusResult'] = 'NOT_A_STRING?: ' . gettype( $bogusResult ); + } + } + if ( $allCached ) { $requestSet['payload']['cached'] = 'true'; } -- To view, visit https://gerrit.wikimedia.org/r/283434 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I873b5e7bf76faefcf2e6e3f42de9b75e6e68fac5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CirrusSearch Gerrit-Branch: master Gerrit-Owner: DCausse Gerrit-Reviewer: EBernhardson Gerrit-Reviewer: Gehel Gerrit-Reviewer: Manybubbles Gerrit-Reviewer: Smalyshev Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix reference handling - change (mediawiki...CirrusSearch)
jenkins-bot has submitted this change and it was merged. Change subject: Fix reference handling .. Fix reference handling Bug: T132710 Change-Id: Ife2a9a2bfc7e4811e54baeda19e4de13eee1d1ca --- M includes/BuildDocument/PageDataBuilder.php 1 file changed, 6 insertions(+), 2 deletions(-) Approvals: Cindy-the-browser-test-bot: Looks good to me, but someone else must approve EBernhardson: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/BuildDocument/PageDataBuilder.php b/includes/BuildDocument/PageDataBuilder.php index c8de1d1..1574450 100644 --- a/includes/BuildDocument/PageDataBuilder.php +++ b/includes/BuildDocument/PageDataBuilder.php @@ -103,12 +103,16 @@ // we don't remove the whole tag. We also don't want to strip the tag and remove // everything that looks like [2] because, I dunno, maybe there is a band named Word [2] Foo // or something. Whatever. So we only strip things that look like tags wrapping a - // refence. And we do it with regexes because HtmlFormatter doesn't support css selectors. + // reference. And since the data looks like: + // Reference in heading [1][2] + // we can not really use HtmlFormatter as we have no suitable selector. // Some wikis wrap the brackets in a span: // http://en.wikipedia.org/wiki/MediaWiki:Cite_reference_link $heading = preg_replace( '/<\/?span>/', '', $heading ); - $heading = preg_replace( '/\s*\[\s*\d+\s*\]\s*<\/sup>/', '', $heading ); + // Normalize [] so the following regexp would work. + $heading = preg_replace( [ '/[/', '/]/' ], [ '[', ']' ], $heading ); + $heading = preg_replace( '/\s*\[\s*\d+\s*\]\s*<\/sup>/is', '', $heading ); // Strip tags from the heading or else we'll display them (escaped) in search results $heading = trim( Sanitizer::stripAllTags( $heading ) ); -- To view, visit https://gerrit.wikimedia.org/r/283495 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ife2a9a2bfc7e4811e54baeda19e4de13eee1d1ca Gerrit-PatchSet: 5 Gerrit-Project: mediawiki/extensions/CirrusSearch Gerrit-Branch: master Gerrit-Owner: Smalyshev Gerrit-Reviewer: Cindy-the-browser-test-bot Gerrit-Reviewer: DCausse Gerrit-Reviewer: EBernhardson Gerrit-Reviewer: Gehel Gerrit-Reviewer: Manybubbles Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Cleanup annotations and signatures in CirrusSearch\LanguageD... - change (mediawiki...CirrusSearch)
jenkins-bot has submitted this change and it was merged. Change subject: Cleanup annotations and signatures in CirrusSearch\LanguageDetect .. Cleanup annotations and signatures in CirrusSearch\LanguageDetect Bug: T132625 Change-Id: I4a45e151a364be59c375afd8f55f48560920b11b --- M includes/LanguageDetector/ElasticSearch.php M includes/LanguageDetector/HttpAccept.php M includes/LanguageDetector/TextCat.php 3 files changed, 16 insertions(+), 8 deletions(-) Approvals: MaxSem: Looks good to me, approved DCausse: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/includes/LanguageDetector/ElasticSearch.php b/includes/LanguageDetector/ElasticSearch.php index e4c5e27..7d3759f 100644 --- a/includes/LanguageDetector/ElasticSearch.php +++ b/includes/LanguageDetector/ElasticSearch.php @@ -11,8 +11,11 @@ * See: https://github.com/jprante/elasticsearch-langdetect */ class ElasticSearch implements Detector { - /* (non-PHPdoc) -* @see \CirrusSearch\LanguageDetector\Detector::detect() + /** +* Detect language +* @param CirrusSearch $cirrus Searching class +* @param string $text Text to detect language +* @return string|null Preferred language, or null if none found */ public function detect( CirrusSearch $cirrus, $text ) { $client = $cirrus->getConnection()->getClient(); diff --git a/includes/LanguageDetector/HttpAccept.php b/includes/LanguageDetector/HttpAccept.php index 22a4358..ad4dbc2 100644 --- a/includes/LanguageDetector/HttpAccept.php +++ b/includes/LanguageDetector/HttpAccept.php @@ -21,14 +21,16 @@ */ protected $httpLang; - public function __construct() - { + public function __construct() { $this->wikiLang = $GLOBALS['wgContLang']->getCode(); $this->httpLang = array_keys( $GLOBALS['wgRequest']->getAcceptLang() ); } - /* (non-PHPdoc) -* @see \CirrusSearch\LanguageDetector\Detector::detect() + /** +* Detect language +* @param CirrusSearch $cirrus Searching class +* @param string $text Text to detect language +* @return string|null Preferred language, or null if none found */ public function detect( CirrusSearch $cirrus, $text ) { foreach ( $this->httpLang as $lang ) { diff --git a/includes/LanguageDetector/TextCat.php b/includes/LanguageDetector/TextCat.php index 2772382..7dc4e99 100644 --- a/includes/LanguageDetector/TextCat.php +++ b/includes/LanguageDetector/TextCat.php @@ -8,8 +8,11 @@ * Try to detect language with TextCat text categorizer */ class TextCat implements Detector { - /* (non-PHPdoc) -* @see \CirrusSearch\LanguageDetector\Detector::detect() + /** +* Detect language +* @param CirrusSearch $cirrus Searching class +* @param string $text Text to detect language +* @return string|null Preferred language, or null if none found */ public function detect( CirrusSearch $cirrus, $text ) { $config = $cirrus->getConfig(); -- To view, visit https://gerrit.wikimedia.org/r/283355 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4a45e151a364be59c375afd8f55f48560920b11b Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/extensions/CirrusSearch Gerrit-Branch: master Gerrit-Owner: EBernhardson Gerrit-Reviewer: DCausse Gerrit-Reviewer: Gehel Gerrit-Reviewer: Manybubbles Gerrit-Reviewer: MaxSem Gerrit-Reviewer: Smalyshev Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Cleanup annotations and signatures in CirrusSearch\BuildDocu... - change (mediawiki...CirrusSearch)
jenkins-bot has submitted this change and it was merged. Change subject: Cleanup annotations and signatures in CirrusSearch\BuildDocument .. Cleanup annotations and signatures in CirrusSearch\BuildDocument Bug: T132625 Change-Id: I60a99979a4daa734eba00963c81d7b6e961540b9 --- M includes/BuildDocument/RedirectsAndIncomingLinks.php M includes/BuildDocument/SuggestBuilder.php M includes/BuildDocument/SuggestScoring.php 3 files changed, 44 insertions(+), 23 deletions(-) Approvals: MaxSem: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/BuildDocument/RedirectsAndIncomingLinks.php b/includes/BuildDocument/RedirectsAndIncomingLinks.php index fb51505..60c45c4 100644 --- a/includes/BuildDocument/RedirectsAndIncomingLinks.php +++ b/includes/BuildDocument/RedirectsAndIncomingLinks.php @@ -5,7 +5,6 @@ use CirrusSearch\Connection; use CirrusSearch\ElasticsearchIntermediary; use Elastica\Filter\Terms; -use Elastica\Search; use Elastica\Query\Filtered; use Elastica\Query\MatchAll; use MediaWiki\Logger\LoggerFactory; @@ -32,12 +31,19 @@ */ class RedirectsAndIncomingLinks extends ElasticsearchIntermediary { /** -* @var static copy of this class kept during batches +* @var SplObjectStorage|null copy of this class kept during batches */ private static $externalLinks = null; - private $linkCountMultiSearch = null; - private $linkCountClosures = null; + /** +* @var \Elastica\Multi\Search +*/ + private $linkCountMultiSearch; + + /** +* @var callable[] +*/ + private $linkCountClosures = array(); public static function buildDocument( $doc, $title, Connection $conn ) { if ( self::$externalLinks === null ) { @@ -65,7 +71,6 @@ protected function __construct( Connection $conn ) { parent::__construct( $conn, null, null ); $this->linkCountMultiSearch = new \Elastica\Multi\Search( $conn->getClient() ); - $this->linkCountClosures = array(); } private function realBuildDocument( $doc, $title ) { @@ -135,17 +140,20 @@ /** * Build a Search that will count all pages that link to $titles. -* @param string $titles title in prefixedDBKey form -* @return Search that counts all pages that link to $titles +* @param string[] $titles title in prefixedDBKey form +* @return \Elastica\Search that counts all pages that link to $titles */ - private function buildCount( $titles ) { + private function buildCount( array $titles ) { $filter = new Terms( 'outgoing_link', $titles ); $filter->setCached( false ); // We're not going to be redoing this any time soon. $type = $this->connection->getPageType( wfWikiId() ); - $search = new Search( $type->getIndex()->getClient() ); + $search = new \Elastica\Search( $type->getIndex()->getClient() ); $search->addIndex( $type->getIndex() ); $search->addType( $type ); - $search->setOption( Search::OPTION_SEARCH_TYPE, Search::OPTION_SEARCH_TYPE_COUNT ); + $search->setOption( + \Elastica\Search::OPTION_SEARCH_TYPE, + \Elastica\Search::OPTION_SEARCH_TYPE_COUNT + ); $matchAll = new MatchAll(); $search->setQuery( new Filtered( $matchAll, $filter ) ); $search->getQuery()->addParam( 'stats', 'link_count' ); diff --git a/includes/BuildDocument/SuggestBuilder.php b/includes/BuildDocument/SuggestBuilder.php index 9588610..5179628 100644 --- a/includes/BuildDocument/SuggestBuilder.php +++ b/includes/BuildDocument/SuggestBuilder.php @@ -222,7 +222,7 @@ * Inspects the 'coordinates' index and return the first coordinates flagged as 'primary' * or the first coordinates if no primaries are found. * @param array $inputDoc the input doc -* @return array with 'lat' and 'lon' or null +* @return array|null with 'lat' and 'lon' or null */ public function findPrimaryCoordinates( $inputDoc ) { if ( !isset( $inputDoc['coordinates'] ) || !is_array( $inputDoc['coordinates'] ) ) { @@ -252,7 +252,7 @@ * @param array $title the title in 'text' and an array of similar redirects in 'variants' * @param array $location the geo coordinates or null if unavailable * @param int $score the weight of the suggestion -* @return array the suggestion document +* @return \Elastica\Document the suggestion document */ private function buildTitleSuggestion( $id, $title, $location, $score ) { $inputs = array( $this->prepareInput( $title['text'] ) ); @@ -260,7 +260,13 @@
[MediaWiki-commits] [Gerrit] Avoid DBPerformance log warnings in SpecialPreferences - change (mediawiki/core)
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/283586 Change subject: Avoid DBPerformance log warnings in SpecialPreferences .. Avoid DBPerformance log warnings in SpecialPreferences Preference views do not need the master DB. Change-Id: Id0c3fc6d453b6af0eca8450107da6d554c822347 --- M includes/specials/SpecialPreferences.php 1 file changed, 5 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/86/283586/1 diff --git a/includes/specials/SpecialPreferences.php b/includes/specials/SpecialPreferences.php index 7f257e6..2e7b4cd 100644 --- a/includes/specials/SpecialPreferences.php +++ b/includes/specials/SpecialPreferences.php @@ -74,7 +74,11 @@ $this->addHelpLink( 'Help:Preferences' ); // Load the user from the master to reduce CAS errors on double post (T95839) - $user = $this->getUser()->getInstanceForUpdate() ?: $this->getUser(); + if ( $this->getRequest()->wasPosted() ) { + $user = $this->getUser()->getInstanceForUpdate() ?: $this->getUser(); + } else { + $user = $this->getUser(); + } $htmlForm = Preferences::getFormObject( $user, $this->getContext() ); $htmlForm->setSubmitCallback( [ 'Preferences', 'tryUISubmit' ] ); -- To view, visit https://gerrit.wikimedia.org/r/283586 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id0c3fc6d453b6af0eca8450107da6d554c822347 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Cut off lead replication for a bit. SSH is busted - change (operations/puppet)
Chad has uploaded a new change for review. https://gerrit.wikimedia.org/r/283585 Change subject: Cut off lead replication for a bit. SSH is busted .. Cut off lead replication for a bit. SSH is busted Change-Id: I622179c60a6aafcd43c906cfd8c1c5ba4ac07367 --- M modules/role/manifests/gerrit/production.pp 1 file changed, 6 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/85/283585/1 diff --git a/modules/role/manifests/gerrit/production.pp b/modules/role/manifests/gerrit/production.pp index a83746a..b0112d8 100644 --- a/modules/role/manifests/gerrit/production.pp +++ b/modules/role/manifests/gerrit/production.pp @@ -66,17 +66,17 @@ 'push' => '+refs/*:refs/*', 'mirror'=> true, }, -'lead'=> { +#'lead'=> { # Note: This is in single quotes on purpose. ${name} is not # expected to be expanded by puppet but rather by gerrit # # lint:ignore:single_quote_string_with_variables -'url' => 'gerritsl...@lead.wikimedia.org:/srv/gerrit/git/${name}.git', +#'url' => 'gerritsl...@lead.wikimedia.org:/srv/gerrit/git/${name}.git', # lint:endignore -'threads' => '4', -'authGroup' => 'mediawiki-replication', -'push' => '+refs/*:refs/*', -'mirror'=> true, +#'threads' => '4', +#'authGroup' => 'mediawiki-replication', +#'push' => '+refs/*:refs/*', +#'mirror'=> true, }, 'github' => { # Note: This is in single quotes on purpose. ${name} is not -- To view, visit https://gerrit.wikimedia.org/r/283585 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I622179c60a6aafcd43c906cfd8c1c5ba4ac07367 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Chad ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add images.unsplash.com to $wgCopyUploadsDomains - change (operations/mediawiki-config)
Chad has submitted this change and it was merged. Change subject: Add images.unsplash.com to $wgCopyUploadsDomains .. Add images.unsplash.com to $wgCopyUploadsDomains Unsplash is a project by Crew, to provide images licensed under CC-0. Bug: T132701 Change-Id: Ib099c799a40b16cef115ba2a25b19ce9a7bdc6bb --- M wmf-config/InitialiseSettings.php 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Chad: Verified; Looks good to me, approved diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index e072564..c6d6fff 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -12131,6 +12131,7 @@ '*.museumvictoria.com.au', // Victoria State (AU) Museum, requested in T125387 'bio.acousti.ca', // Natural History Museum - T132140 'museumcommons.wikimedia.nl', // Museum Catharijneconvent - T131841 + 'images.unsplash.com', // Unsplash - T132701 ), ), -- To view, visit https://gerrit.wikimedia.org/r/283497 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib099c799a40b16cef115ba2a25b19ce9a7bdc6bb Gerrit-PatchSet: 2 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Dereckson Gerrit-Reviewer: Chad Gerrit-Reviewer: Florianschmidtwelzow Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Refactor code in DisambiguatorHooks to avoid redundancy - change (mediawiki...Disambiguator)
Kaldari has uploaded a new change for review. https://gerrit.wikimedia.org/r/283584 Change subject: Refactor code in DisambiguatorHooks to avoid redundancy .. Refactor code in DisambiguatorHooks to avoid redundancy Change-Id: I42f90ff3e8673e663a0d1e533f0a7fafd8f9692b --- M Disambiguator.hooks.php 1 file changed, 19 insertions(+), 18 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Disambiguator refs/changes/84/283584/1 diff --git a/Disambiguator.hooks.php b/Disambiguator.hooks.php index 137cedb..60c3e79 100644 --- a/Disambiguator.hooks.php +++ b/Disambiguator.hooks.php @@ -29,6 +29,22 @@ } /** +* Modify query parameters to ignore disambiguation pages +* @param array &$tables +* @param array &$conds +* @param array &$joinConds +* @return bool +*/ + private static function excludeDisambiguationPages( &$tables, &$conds, &$joinConds ) { + $tables[] = 'page_props'; + $conds['pp_page'] = null; + $joinConds['page_props'] = array( + 'LEFT JOIN', array( 'page_id = pp_page', 'pp_propname' => 'disambiguation' ) + ); + return true; + } + + /** * Modify the Special:LonelyPages query to ignore disambiguation pages * @param array &$tables * @param array &$conds @@ -36,12 +52,7 @@ * @return bool */ public static function onLonelyPagesQuery( &$tables, &$conds, &$joinConds ) { - $tables[] = 'page_props'; - $conds['pp_page'] = null; - $joinConds['page_props'] = array( - 'LEFT JOIN', array( 'page_id = pp_page', 'pp_propname' => 'disambiguation' ) - ); - return true; + return self::excludeDisambiguationPages( $tables, $conds, $joinConds ); } /** @@ -53,12 +64,7 @@ * @return bool */ public static function onShortPagesQuery( &$tables, &$conds, &$joinConds, &$options ) { - $tables[] = 'page_props'; - $conds['pp_page'] = null; - $joinConds['page_props'] = array( - 'LEFT JOIN', array( 'page_id = pp_page', 'pp_propname' => 'disambiguation' ) - ); - return true; + return self::excludeDisambiguationPages( $tables, $conds, $joinConds ); } /** @@ -69,12 +75,7 @@ * @return bool */ public static function onRandomPageQuery( &$tables, &$conds, &$joinConds ) { - $tables[] = 'page_props'; - $conds['pp_page'] = null; - $joinConds['page_props'] = array( - 'LEFT JOIN', array( 'page_id = pp_page', 'pp_propname' => 'disambiguation' ) - ); - return true; + return self::excludeDisambiguationPages( $tables, $conds, $joinConds ); } /** -- To view, visit https://gerrit.wikimedia.org/r/283584 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I42f90ff3e8673e663a0d1e533f0a7fafd8f9692b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Disambiguator Gerrit-Branch: master Gerrit-Owner: Kaldari ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Updating portals to master. removing top-links A/B test - change (operations/mediawiki-config)
Chad has submitted this change and it was merged. Change subject: Updating portals to master. removing top-links A/B test .. Updating portals to master. removing top-links A/B test Bug: T124116 Change-Id: I73adb87a5e7e96e205e6c72bad0a26a119730328 --- M portals 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Chad: Verified; Looks good to me, approved diff --git a/portals b/portals index fea6166..0955b29 16 --- a/portals +++ b/portals -Subproject commit fea61663388801c03abc9115988bb7579aba523b +Subproject commit 0955b2914a277f2402f64df09a8bde898498b35b -- To view, visit https://gerrit.wikimedia.org/r/283481 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I73adb87a5e7e96e205e6c72bad0a26a119730328 Gerrit-PatchSet: 3 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Jdrewniak Gerrit-Reviewer: Chad Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Very minor cleanups to CirrusSearch\Job namespace - change (mediawiki...CirrusSearch)
EBernhardson has uploaded a new change for review. https://gerrit.wikimedia.org/r/283581 Change subject: Very minor cleanups to CirrusSearch\Job namespace .. Very minor cleanups to CirrusSearch\Job namespace Bug: T132625 Change-Id: I773c3a54ac584c0664547aef712786418c3a3bc1 --- M includes/Job/ElasticaWrite.php M includes/Job/Job.php M includes/Job/LinksUpdate.php M includes/Job/MassIndex.php M includes/Job/OtherIndex.php 5 files changed, 21 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch refs/changes/81/283581/1 diff --git a/includes/Job/ElasticaWrite.php b/includes/Job/ElasticaWrite.php index 17a3ad4..dd0f944 100644 --- a/includes/Job/ElasticaWrite.php +++ b/includes/Job/ElasticaWrite.php @@ -4,6 +4,7 @@ use CirrusSearch\Connection; use CirrusSearch\DataSender; +use CirrusSearch\SearchConfig; use JobQueueGroup; use MediaWiki\Logger\LoggerFactory; use MediaWiki\MediaWikiServices; @@ -105,7 +106,12 @@ return $connections; } - private function canWriteToCluster( $config, $cluster ) { + /** +* @param SearchConfig $config +* @param string $cluster +* @return bool True is cluster is writable +*/ + private function canWriteToCluster( SearchConfig $config, $cluster ) { if ( $config->getElement( 'CirrusSearchClusters', $cluster ) === null ) { // No definition for the cluster return false; diff --git a/includes/Job/Job.php b/includes/Job/Job.php index da3d252..5dd524d 100644 --- a/includes/Job/Job.php +++ b/includes/Job/Job.php @@ -34,12 +34,13 @@ protected $connection; /** -* @var boolean should we retry if this job failed +* @var bool should we retry if this job failed */ private $allowRetries = true; /** * Job constructor. +* * @param Title $title * @param array $params */ @@ -104,6 +105,7 @@ * after it has expired. By default it only checks every five minutes or so. * Note yet again that if another delay has been set that is longer then this one * then the _longer_ delay stays. +* * @param int $delay seconds to delay this job if possible */ public function setDelay( $delay ) { diff --git a/includes/Job/LinksUpdate.php b/includes/Job/LinksUpdate.php index d4ddaa1..4c80554 100644 --- a/includes/Job/LinksUpdate.php +++ b/includes/Job/LinksUpdate.php @@ -1,8 +1,9 @@ = 0; } + /** +* @return int +*/ public function workItemCount() { return count( $this->params[ 'pageDBKeys' ] ); } diff --git a/includes/Job/OtherIndex.php b/includes/Job/OtherIndex.php index 8f36f22..f891312 100644 --- a/includes/Job/OtherIndex.php +++ b/includes/Job/OtherIndex.php @@ -1,9 +1,10 @@ https://gerrit.wikimedia.org/r/283581 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I773c3a54ac584c0664547aef712786418c3a3bc1 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] Expand annotations in Elasticsearch\Maintenance namespace - change (mediawiki...CirrusSearch)
EBernhardson has uploaded a new change for review. https://gerrit.wikimedia.org/r/283583 Change subject: Expand annotations in Elasticsearch\Maintenance namespace .. Expand annotations in Elasticsearch\Maintenance namespace Bug: T132625 Change-Id: I22b72ce1646aeb951cb2ebd8aaa1a10d84ee9b5d --- M includes/Maintenance/AnalysisConfigBuilder.php M includes/Maintenance/ChunkBuilder.php M includes/Maintenance/ConfigUtils.php M includes/Maintenance/Maintenance.php M includes/Maintenance/MappingConfigBuilder.php M includes/Maintenance/OrderedStreamingForkController.php M includes/Maintenance/Reindexer.php M includes/Maintenance/SuggesterAnalysisConfigBuilder.php M includes/Maintenance/SuggesterMappingConfigBuilder.php M includes/Maintenance/Validators/CacheWarmersValidator.php M includes/Maintenance/Validators/IndexAliasValidator.php M includes/Maintenance/Validators/IndexAllAliasValidator.php M includes/Maintenance/Validators/MappingValidator.php M includes/Maintenance/Validators/ShardAllocationValidator.php M includes/Maintenance/Validators/SpecificAliasValidator.php M includes/Maintenance/Validators/Validator.php 16 files changed, 158 insertions(+), 38 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch refs/changes/83/283583/1 diff --git a/includes/Maintenance/AnalysisConfigBuilder.php b/includes/Maintenance/AnalysisConfigBuilder.php index 14edb40..b34bacf 100644 --- a/includes/Maintenance/AnalysisConfigBuilder.php +++ b/includes/Maintenance/AnalysisConfigBuilder.php @@ -36,8 +36,7 @@ const VERSION = '0.10'; /** -* Language code we're building analysis for -* @var string +* @var string Language code we're building analysis for */ private $language; @@ -46,6 +45,9 @@ */ private $icu; + /** +* @var array Similarity algo (tf/idf, bm25, etc) configuration +*/ private $similarity; /** @@ -54,12 +56,11 @@ protected $config; /** -* Constructor * @param string $langCode The language code to build config for -* @param array(string) $plugins list of plugins installed in Elasticsearch +* @param string[] $plugins list of plugins installed in Elasticsearch * @param SearchConfig $config */ - public function __construct( $langCode, $plugins, $config = null ) { + public function __construct( $langCode, array $plugins, SearchConfig $config = null ) { $this->language = $langCode; foreach ( $this->elasticsearchLanguageAnalyzersFromPlugins as $plugin => $extra ) { if ( in_array( $plugin, $plugins ) ) { @@ -78,6 +79,7 @@ /** * Build the analysis config. +* * @return array the analysis config */ public function buildConfig() { @@ -88,16 +90,20 @@ /** * Build the similarity config -* @return array the similarity config +* +* @return array|null the similarity config */ public function buildSimilarityConfig() { if ( $this->similarity != null && isset ( $this->similarity['similarity'] ) ) { return $this->similarity['similarity']; } + return null; } /** * Build an analysis config with sane defaults. +* +* @return array */ private function defaults() { $defaults = array( @@ -266,6 +272,9 @@ /** * Customize the default config for the language. +* +* @param array $config +* @return array */ private function customize( $config ) { switch ( $this->getDefaultTextAnalyzerType() ) { @@ -406,6 +415,7 @@ * Pick the appropriate default analyzer based on the language. Rather than think of * this as per language customization you should think of this as an effort to pick a * reasonably default in case CirrusSearch isn't customized for the language. +* * @return string the analyzer type */ public function getDefaultTextAnalyzerType() { @@ -437,6 +447,8 @@ * other languages default to the default analyzer which isn't too good. Note * that this array is sorted alphabetically by value and sourced from * http://www.elasticsearch.org/guide/reference/index-modules/analysis/lang-analyzer/ +* +* @var string[] */ private $elasticsearchLanguageAnalyzers = array( 'ar' => 'arabic', @@ -478,6 +490,10 @@ 'th' => 'thai', ); + + /** +* @var array[] +*/ private $elasticsearchLanguageAnalyzersFromPlugins = array( 'analysis-stempel' => array( 'pl' => 'polish
[MediaWiki-commits] [Gerrit] Trivial whitespace changes to Elastica\LanguageDetector - change (mediawiki...CirrusSearch)
EBernhardson has uploaded a new change for review. https://gerrit.wikimedia.org/r/283582 Change subject: Trivial whitespace changes to Elastica\LanguageDetector .. Trivial whitespace changes to Elastica\LanguageDetector Normalizes whitespace in docblocks and namespace/use statements to be more consistent with php standards used elsewhere in CirrusSearch. Bug: T132625 Change-Id: I412da90528ce9291aca5892b6c4cb1dd762020cf --- M includes/LanguageDetector/Detector.php M includes/LanguageDetector/ElasticSearch.php M includes/LanguageDetector/HttpAccept.php M includes/LanguageDetector/TextCat.php 4 files changed, 8 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch refs/changes/82/283582/1 diff --git a/includes/LanguageDetector/Detector.php b/includes/LanguageDetector/Detector.php index 3215792..2493578 100644 --- a/includes/LanguageDetector/Detector.php +++ b/includes/LanguageDetector/Detector.php @@ -1,5 +1,6 @@ https://gerrit.wikimedia.org/r/283582 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I412da90528ce9291aca5892b6c4cb1dd762020cf 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] Add annotations to Api, Elastica, and Extra sub-namespaces - change (mediawiki...CirrusSearch)
EBernhardson has uploaded a new change for review. https://gerrit.wikimedia.org/r/283580 Change subject: Add annotations to Api, Elastica, and Extra sub-namespaces .. Add annotations to Api, Elastica, and Extra sub-namespaces Bug: T132625 Change-Id: I7c181b77a315710242a9f2f0c2dfb75d84ba1315 --- M includes/Api/ApiBase.php M includes/Elastica/PooledHttp.php M includes/Extra/Filter/SourceRegex.php M includes/Util.php 4 files changed, 45 insertions(+), 34 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch refs/changes/80/283580/1 diff --git a/includes/Api/ApiBase.php b/includes/Api/ApiBase.php index d094824..0857b9e 100644 --- a/includes/Api/ApiBase.php +++ b/includes/Api/ApiBase.php @@ -7,8 +7,12 @@ use MediaWiki\MediaWikiServices; abstract class ApiBase extends CoreApiBase { + /** @var Connection */ private $connection; + /** +* @return Connection +*/ public function getCirrusConnection() { if ($this->connection === null) { $config = MediaWikiServices::getInstance() diff --git a/includes/Elastica/PooledHttp.php b/includes/Elastica/PooledHttp.php index 8ffd02c..e7ea693 100644 --- a/includes/Elastica/PooledHttp.php +++ b/includes/Elastica/PooledHttp.php @@ -38,11 +38,6 @@ class PooledHttp extends Http { /** -* Map from pool name to active connection -*/ - private $_curlPoolConnections = array(); - - /** * @param bool $persistent * @return resource Curl handle */ diff --git a/includes/Extra/Filter/SourceRegex.php b/includes/Extra/Filter/SourceRegex.php index a748d0c..c808ca8 100644 --- a/includes/Extra/Filter/SourceRegex.php +++ b/includes/Extra/Filter/SourceRegex.php @@ -46,7 +46,7 @@ /** * @param string $regex regex to match against field - * @return \CirrusSearch\Extra\Filter\SourceRegex this for chaining + * @return $this */ public function setRegex( $regex ) { return $this->setParam( 'regex', $regex ); @@ -54,7 +54,7 @@ /** * @param string $field field who's source to check with the regex - * @return \CirrusSearch\Extra\Filter\SourceRegex this for chaining + * @return $this */ public function setField( $field ) { return $this->setParam( 'field', $field ); @@ -62,8 +62,8 @@ /** * @param string $ngramField field that is indexed with ngrams to - * accelerate regex matching - * @return \CirrusSearch\Extra\Filter\SourceRegex this for chaining + * accelerate regex matching + * @return $this */ public function setNGramField( $ngramField ) { return $this->setParam( 'ngram_field', $ngramField ); @@ -71,9 +71,9 @@ /** * @param int $gramSize size of the ngrams extracted for acccelerating - * the regex. Defaults to 3 if not set. That gram size must have been - * produced by analyzing the ngramField. - * @return \CirrusSearch\Extra\Filter\SourceRegex this for chaining + * the regex. Defaults to 3 if not set. That gram size must have been + * produced by analyzing the ngramField. + * @return $this */ public function setGramSize( $gramSize ) { return $this->setParam( 'gram_size', $gramSize ); @@ -81,10 +81,10 @@ /** * @param int $maxExpand maximum range before outgoing automaton arcs are - * ignored. Roughly corresponds to the maximum number of characters in a - * character class ([abcd]) before it is treated as . for purposes of - * acceleration. Defaults to 4. - * @return \CirrusSearch\Extra\Filter\SourceRegex this for chaining + * ignored. Roughly corresponds to the maximum number of characters in a + * character class ([abcd]) before it is treated as . for purposes of + * acceleration. Defaults to 4. + * @return $this */ public function setMaxExpand( $maxExpand ) { return $this->setParam( 'max_expand', $maxExpand ); @@ -92,10 +92,10 @@ /** * @param int $maxStatesTraced maximum number of automaton states that can - * be traced before the algorithm gives up and assumes the regex is too - * complex and throws an error back to the user. Defaults to 1 which - * handily covers all regexes I cared to test. - * @return \CirrusSearch\Extra\Filter\SourceRegex this for chaining + * be traced before the algorithm gives up and assumes the regex is too + * complex and throws an error back to the user. Defaults to 1 which + * handily covers all regexes I cared to test. + * @return $this */ public function setMaxStatesTraced( $maxStatesTraced ) { return $this->setParam( 'max_states_traced', $maxStatesTraced ); @@ -103,11 +103,11 @@ /** * @param int $maxInspect maximum number of source field to run the regex - * ag
[MediaWiki-commits] [Gerrit] Add more type annotations to CirrusSearch\Search namespace - change (mediawiki...CirrusSearch)
EBernhardson has uploaded a new change for review. https://gerrit.wikimedia.org/r/283578 Change subject: Add more type annotations to CirrusSearch\Search namespace .. Add more type annotations to CirrusSearch\Search namespace This should cover pretty much everything in the Search namespace. Bug: T132625 Change-Id: I1e5f3a1f2a4fe71c8957f0a74c481d654c687ee2 --- M includes/Search/Escaper.php M includes/Search/Filters.php M includes/Search/RescoreBuilders.php M includes/Search/Result.php M includes/Search/ResultSet.php M includes/Search/ResultsType.php M includes/Search/SearchContext.php M includes/Search/SearchTextQueryBuilders.php 8 files changed, 245 insertions(+), 50 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch refs/changes/78/283578/1 diff --git a/includes/Search/Escaper.php b/includes/Search/Escaper.php index 1c51f7b..fcf3e78 100644 --- a/includes/Search/Escaper.php +++ b/includes/Search/Escaper.php @@ -22,6 +22,9 @@ */ class Escaper { + /** +* @var string MediaWiki language code +*/ private $language; /** @@ -30,11 +33,19 @@ */ private $allowLeadingWildcard; + /** +* @param string $language MediaWiki language code +* @param bool $allowLeadingWildcard +*/ public function __construct( $language, $allowLeadingWildcard = true ) { $this->language = $language; $this->allowLeadingWildcard = $allowLeadingWildcard; } + /** +* @param string $text +* @return string +*/ public function escapeQuotes( $text ) { if ( $this->language === 'he' ) { // Hebrew uses the double quote (") character as a standin for quotation marks (“”) @@ -59,6 +70,9 @@ * extra index for. * ": Perform a phrase search for the quoted term. If the "s aren't balanced we insert one * at the end of the term to make sure elasticsearch doesn't barf at us. +* +* @param string $string +* @return string */ public function fixupQueryStringPart( $string ) { // Escape characters that can be escaped with \\ @@ -84,6 +98,7 @@ * Make sure that all operators and lucene syntax is used correctly in the query string * and store if this is a fuzzy query. * If it isn't then the syntax escaped so it becomes part of the query text. +* * @param string $string * @return array(string, boolean) (fixedup query string, is this a fuzzy query?) */ @@ -150,14 +165,26 @@ return array( $string, $fuzzyQuery ); } + /** +* @param string[] $matches +* @return string +*/ private static function escapeBadSyntax( $matches ) { return "\\" . implode( "\\", str_split( $matches[ 0 ] ) ); } + /** +* @param string[] $matches +* @return string +*/ private static function lowercaseMatched( $matches ) { return strtolower( $matches[ 0 ] ); } + /** +* @param string $text +* @return string +*/ public function balanceQuotes( $text ) { $inQuote = false; $inEscape = false; @@ -183,6 +210,8 @@ /** * Is leading wildcard allowed? +* +* @return bool */ public function getAllowLeadingWildcard() { return $this->allowLeadingWildcard; diff --git a/includes/Search/Filters.php b/includes/Search/Filters.php index dfeb9ba..9c7c3a4 100644 --- a/includes/Search/Filters.php +++ b/includes/Search/Filters.php @@ -27,6 +27,7 @@ /** * Merges lists of include/exclude filters into a single filter that * Elasticsearch will execute efficiently. +* * @param AbstractFilter[] $mustFilters filters that must match all returned documents * @param AbstractFilter[] $mustNotFilters filters that must not match all returned documents * @return null|AbstractFilter null if there are no filters or one that will execute @@ -78,6 +79,7 @@ /** * Unify non-script filters into a single filter. +* * @param AbstractFilter[] $mustFilters filters that must be found * @param AbstractFilter[] $mustNotFilters filters that must not be found * @return null|AbstractFilter null if there are no filters or one that will execute @@ -109,12 +111,13 @@ * Create a filter for insource: queries. This was extracted from the big * switch block in Searcher.php. This function is pure, deferring state * changes to the reference-updating return function. +* * @param Escaper $escaper * @param SearchContext $context
[MediaWiki-commits] [Gerrit] Add more type annotations to CirrusSearch\BuildDocument name... - change (mediawiki...CirrusSearch)
EBernhardson has uploaded a new change for review. https://gerrit.wikimedia.org/r/283579 Change subject: Add more type annotations to CirrusSearch\BuildDocument namespace .. Add more type annotations to CirrusSearch\BuildDocument namespace Bug: T132625 Change-Id: Ic34079892ce36a29a44b9607a3d70369a5bb3205 --- M includes/BuildDocument/Builder.php M includes/BuildDocument/FileDataBuilder.php M includes/BuildDocument/PageDataBuilder.php M includes/BuildDocument/PageTextBuilder.php M includes/BuildDocument/RedirectsAndIncomingLinks.php M includes/BuildDocument/SuggestBuilder.php M includes/BuildDocument/SuggestScoring.php 7 files changed, 98 insertions(+), 41 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch refs/changes/79/283579/1 diff --git a/includes/BuildDocument/Builder.php b/includes/BuildDocument/Builder.php index fbdf035..0a60e84 100644 --- a/includes/BuildDocument/Builder.php +++ b/includes/BuildDocument/Builder.php @@ -1,9 +1,10 @@ doc = $doc; $this->title = $title; } /** * Build a document +* * @return \Elastica\Document */ abstract public function build(); @@ -71,12 +74,13 @@ /** * Constructor +* * @param \Elastica\Document $doc The document we will be building on * @param Title $title The title to build a document for * @param Content $content The page content to build a document from * @param ParserOutput $parserOutput The parser output to build a document from */ - public function __construct( $doc, $title, $content, $parserOutput ) { + public function __construct( \Elastica\Document $doc, Title $title, Content $content, ParserOutput $parserOutput ) { parent::__construct( $doc, $title ); $this->content = $content; $this->parserOutput = $parserOutput; diff --git a/includes/BuildDocument/FileDataBuilder.php b/includes/BuildDocument/FileDataBuilder.php index 7f65414..5db95a3 100644 --- a/includes/BuildDocument/FileDataBuilder.php +++ b/includes/BuildDocument/FileDataBuilder.php @@ -1,6 +1,7 @@ file = wfLocalFile( $this->title ); if ( $this->file && $this->file->exists() ) { diff --git a/includes/BuildDocument/PageDataBuilder.php b/includes/BuildDocument/PageDataBuilder.php index c8de1d1..fcf78d9 100644 --- a/includes/BuildDocument/PageDataBuilder.php +++ b/includes/BuildDocument/PageDataBuilder.php @@ -1,9 +1,10 @@ content->getModel() ) { case CONTENT_MODEL_CSS: @@ -122,6 +126,9 @@ $this->doc->set( 'heading', $headings ); } + /** +* @return string[] +*/ private function getIgnoredHeadings() { static $ignoredHeadings = null; if ( $ignoredHeadings === null ) { diff --git a/includes/BuildDocument/PageTextBuilder.php b/includes/BuildDocument/PageTextBuilder.php index 35de492..ff98627 100644 --- a/includes/BuildDocument/PageTextBuilder.php +++ b/includes/BuildDocument/PageTextBuilder.php @@ -2,6 +2,7 @@ namespace CirrusSearch\BuildDocument; +use Content; use HtmlFormatter\HtmlFormatter; use MediaWiki\Logger\LoggerFactory; use ParserOutput; @@ -27,7 +28,7 @@ */ class PageTextBuilder extends ParseBuilder { /** -* @var array selectors to elements that are excluded entirely from search +* @var string[] selectors to elements that are excluded entirely from search */ private $excludedElementSelectors = array( 'audio', 'video', // "it looks like you don't have javascript enabled..." do not need to index @@ -38,7 +39,7 @@ '.autocollapse',// Collapsed fields are hidden by default so we don't want them showing up. ); /** -* @var array selectors to elements that are considered auxiliary to article text for search +* @var string[] selectors to elements that are considered auxiliary to article text for search */ private $auxiliaryElementSelectors = array( '.thumbcaption',// Thumbnail captions aren't really part of the text proper @@ -48,10 +49,18 @@ '.searchaux', // New class users can use to mark stuff as auxiliary to searches. ); - public function __construct( $doc, $content, $parserOutput ) { + /** +* @param \Elastica\Document +* @param Content +* @param ParserOutput +*/ + public function __construct( \Elastica\Document $doc, Content $content, ParserOutput $parserOutput ) { parent::__construct( $doc, null, $content, $parserOutput ); } + /** +* @return \Elastica\Document +*/ public function build() { list( $text, $opening, $
[MediaWiki-commits] [Gerrit] Move varnish errorpage.html into its module - change (operations/puppet)
Chad has uploaded a new change for review. https://gerrit.wikimedia.org/r/283577 Change subject: Move varnish errorpage.html into its module .. Move varnish errorpage.html into its module Change-Id: I533a47e9212d5759f3b6e3f8e5d879bded69e6dc --- R modules/varnish/files/errorpage.html M modules/varnish/manifests/common/vcl.pp 2 files changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/77/283577/1 diff --git a/files/varnish/errorpage.html b/modules/varnish/files/errorpage.html similarity index 100% rename from files/varnish/errorpage.html rename to modules/varnish/files/errorpage.html diff --git a/modules/varnish/manifests/common/vcl.pp b/modules/varnish/manifests/common/vcl.pp index 9b6a9b0..dc821bc 100644 --- a/modules/varnish/manifests/common/vcl.pp +++ b/modules/varnish/manifests/common/vcl.pp @@ -21,7 +21,7 @@ owner => 'root', group => 'root', mode => '0444', -source => 'puppet:///files/varnish/errorpage.html', +source => 'puppet:///modules/varnish/errorpage.html', } # VCL unit tests -- To view, visit https://gerrit.wikimedia.org/r/283577 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I533a47e9212d5759f3b6e3f8e5d879bded69e6dc Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Chad ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Move misc memcached files into their module - change (operations/puppet)
Chad has uploaded a new change for review. https://gerrit.wikimedia.org/r/283576 Change subject: Move misc memcached files into their module .. Move misc memcached files into their module Change-Id: I84f595c66079ac3023ccf97957ff98179fff7727 --- M manifests/role/memcached.pp R modules/memcached/files/memkeys-snapshot R modules/memcached/files/memkeys.logrotate 3 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/76/283576/1 diff --git a/manifests/role/memcached.pp b/manifests/role/memcached.pp index 3fbfe8f..ef43197 100644 --- a/manifests/role/memcached.pp +++ b/manifests/role/memcached.pp @@ -47,7 +47,7 @@ } file { '/etc/logrotate.d/memkeys': -source => 'puppet:///files/memcached/memkeys.logrotate', +source => 'puppet:///modules/memcached/memkeys.logrotate', owner => 'root', group => 'root', mode=> '0444', @@ -56,7 +56,7 @@ } file { '/usr/local/sbin/memkeys-snapshot': -source => 'puppet:///files/memcached/memkeys-snapshot', +source => 'puppet:///modules/memcached/memkeys-snapshot', owner => 'root', group => 'root', mode => '0555', diff --git a/files/memcached/memkeys-snapshot b/modules/memcached/files/memkeys-snapshot similarity index 100% rename from files/memcached/memkeys-snapshot rename to modules/memcached/files/memkeys-snapshot diff --git a/files/memcached/memkeys.logrotate b/modules/memcached/files/memkeys.logrotate similarity index 100% rename from files/memcached/memkeys.logrotate rename to modules/memcached/files/memkeys.logrotate -- To view, visit https://gerrit.wikimedia.org/r/283576 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I84f595c66079ac3023ccf97957ff98179fff7727 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Chad ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Cleanup annotations/signatures in CirrusSearch\\Sanity - change (mediawiki...CirrusSearch)
jenkins-bot has submitted this change and it was merged. Change subject: Cleanup annotations/signatures in CirrusSearch\\Sanity .. Cleanup annotations/signatures in CirrusSearch\\Sanity Bug: T132625 Change-Id: I07bcd4cf7a4dbed9a667c9a581a5988e0d1b4d1f --- M includes/Sanity/QueueingRemediator.php M includes/Sanity/Remediator.php 2 files changed, 65 insertions(+), 24 deletions(-) Approvals: MaxSem: Looks good to me, approved DCausse: Looks good to me, but someone else must approve jenkins-bot: Verified Objections: Cindy-the-browser-test-bot: There's a problem with this change, please improve diff --git a/includes/Sanity/QueueingRemediator.php b/includes/Sanity/QueueingRemediator.php index 2c125f4..50d018f 100644 --- a/includes/Sanity/QueueingRemediator.php +++ b/includes/Sanity/QueueingRemediator.php @@ -1,10 +1,11 @@ cluster = $cluster; } - public function redirectInIndex( $page ) { + public function redirectInIndex( WikiPage $page ) { $this->pushLinksUpdateJob( $page ); } - public function pageNotInIndex( $page ) { + public function pageNotInIndex( WikiPage $page ) { $this->pushLinksUpdateJob( $page ); } - public function ghostPageInIndex( $pageId, $title ) { + + /** +* @param int $pageId +* @param Title $title +*/ + public function ghostPageInIndex( $pageId, Title $title ) { JobQueueGroup::singleton()->push( new DeletePages( $title, array( 'id' => $pageId, @@ -49,7 +55,12 @@ ) ) ); } - public function pageInWrongIndex( $page, $wrongIndex ) { + + /** +* @param WikiPage $page +* @param string $wrongIndex +*/ + public function pageInWrongIndex( WikiPage $page, $wrongIndex ) { JobQueueGroup::singleton()->push( new DeletePages( $page->getTitle(), array( 'indexType' => $wrongIndex, @@ -60,7 +71,7 @@ $this->pushLinksUpdateJob( $page ); } - private function pushLinksUpdateJob( $page ) { + private function pushLinksUpdateJob( WikiPage $page ) { JobQueueGroup::singleton()->push( new LinksUpdate( $page->getTitle(), array( 'addedLinks' => array(), diff --git a/includes/Sanity/Remediator.php b/includes/Sanity/Remediator.php index b4a3321..695caa4 100644 --- a/includes/Sanity/Remediator.php +++ b/includes/Sanity/Remediator.php @@ -1,8 +1,8 @@ next = $next; } - public function redirectInIndex( $page ) { + public function redirectInIndex( WikiPage $page ) { $this->log( $page->getId(), $page->getTitle(), 'Redirect in index' ); $this->next->redirectInIndex( $page ); } - public function pageNotInIndex( $page ) { + + public function pageNotInIndex( WikiPage $page ) { $this->log( $page->getId(), $page->getTitle(), 'Page not in index' ); $this->next->pageNotInIndex( $page ); } - public function ghostPageInIndex( $pageId, $title ) { + + /** +* @param int $pageId +* @param Title $title +*/ + public function ghostPageInIndex( $pageId, Title $title ) { $this->log( $pageId, $title, 'Deleted page in index' ); $this->next->ghostPageInIndex( $pageId, $title ); } - public function pageInWrongIndex( $page, $indexType ) { + + /** +* @param WikiPage $page +* @param string $indexType +*/ + public function pageInWrongIndex( WikiPage $page, $indexType ) { $this->log( $page->getId(), $page->getTitle(), "Page in wrong index: $indexType" ); $this->next->pageInWrongIndex( $page, $indexType ); } + + /** +* @param int $pageId +* @param Title $title +* @param string $message +*/ private function log( $pageId, $title, $message ) { printf("%30s %10d %s\n", $message, $pageId, $title ); } -- To view, visit https://gerrit.wikimedia.org/r/283353 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I07bcd4cf7a4dbed9a667c9a581a5988e0d1b4d1f Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/CirrusSearch Gerrit-Branch: master Gerrit-Owner: EBernhardson Gerrit-Reviewer: Cindy-the-browser-test-bot Gerrit-Reviewer: DCausse Gerrit-Reviewer: Gehel Gerrit-Reviewer: Manybubbles Gerrit-Reviewer: MaxSem Gerrit-Reviewer: Smalyshev Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailma
[MediaWiki-commits] [Gerrit] Minor static analysis cleanups - change (mediawiki...CirrusSearch)
jenkins-bot has submitted this change and it was merged. Change subject: Minor static analysis cleanups .. Minor static analysis cleanups Adds some missing properties, fixes a couple annotations, and forces some things into ints that should always be ints. Bug: T132625 Change-Id: Ie112987f0068e0b1f06e48e2bfc79f99824d9b72 --- M includes/BuildDocument/FileDataBuilder.php M includes/DataSender.php M includes/ElasticsearchIntermediary.php M includes/Hooks.php M includes/Util.php 5 files changed, 18 insertions(+), 12 deletions(-) Approvals: MaxSem: Looks good to me, approved jenkins-bot: Verified Objections: Cindy-the-browser-test-bot: There's a problem with this change, please improve diff --git a/includes/BuildDocument/FileDataBuilder.php b/includes/BuildDocument/FileDataBuilder.php index 8ca0be6..7f65414 100644 --- a/includes/BuildDocument/FileDataBuilder.php +++ b/includes/BuildDocument/FileDataBuilder.php @@ -41,7 +41,7 @@ if ( $this->file->getHandler() ) { $fileText = $this->file->getHandler()->getEntireText( $this->file ); if ( $fileText ) { - $this->doc->add( 'file_text', $fileText ); + $this->doc->set( 'file_text', $fileText ); } } } diff --git a/includes/DataSender.php b/includes/DataSender.php index ad344d3..a358012 100644 --- a/includes/DataSender.php +++ b/includes/DataSender.php @@ -29,6 +29,12 @@ class DataSender extends ElasticsearchIntermediary { const ALL_INDEXES_FROZEN_NAME = 'freeze_everything'; + /** @var \Psr\Log\LoggerInterface */ + private $log; + + /** @var \Psr\Log\LoggerInterface */ + private $failedLog; + /** * @var Connection */ diff --git a/includes/ElasticsearchIntermediary.php b/includes/ElasticsearchIntermediary.php index db0f3ad..3541cef 100644 --- a/includes/ElasticsearchIntermediary.php +++ b/includes/ElasticsearchIntermediary.php @@ -103,7 +103,7 @@ $user = RequestContext::getMain()->getUser(); } $this->user = $user; - $this->slowMillis = round( 1000 * $slowSeconds ); + $this->slowMillis = (int) ( 1000 * $slowSeconds ); $this->ut = UserTesting::getInstance(); } @@ -112,7 +112,7 @@ * request, or multiple jobs run in the same executor. An execution id * is valid over a brief timespan, perhaps a minute or two for some jobs. * -* @return integer unique identifier +* @return string unique identifier */ private static function getExecutionId() { if ( self::$executionId === null ) { @@ -321,7 +321,7 @@ $hex = substr( $uuid, 0, 8 ) . substr( $uuid, 9, 4 ) . substr( $uuid, 14, 4 ) . substr( $uuid, 19, 4) . substr( $uuid, 24 ); - $token = wfBaseConvert( $hex, 16, 36 ); + $token = \Wikimedia\base_convert( $hex, 16, 36 ); } return $token; } @@ -543,7 +543,7 @@ * @return boolean is this a parse error? */ protected function isParseError( $status ) { - foreach ( $status->getErrorsArray() as $errorMessage ) { + foreach ( $status->getStatusArray( 'error' ) as $errorMessage ) { if ( $errorMessage[ 0 ] === 'cirrussearch-parse-error' ) { return true; } @@ -565,7 +565,7 @@ return null; } $endTime = microtime( true ); - $took = round( ( $endTime - $this->requestStart ) * 1000 ); + $took = (int) ( ( $endTime - $this->requestStart ) * 1000 ); $clusterName = $this->connection->getClusterName(); RequestContext::getMain()->getStats()->timing( "CirrusSearch.$clusterName.requestTime", $took ); $this->searchMetrics['wgCirrusStartTime'] = $this->requestStart; diff --git a/includes/Hooks.php b/includes/Hooks.php index 69de080..933f811 100644 --- a/includes/Hooks.php +++ b/includes/Hooks.php @@ -172,7 +172,7 @@ $wgCirrusSearchMoreLikeThisMaxQueryTermsLimit, $wgCirrusSearchMoreLikeThisFields; - $cache = \ObjectCache::newAccelerator( CACHE_NONE ); + $cache = \ObjectCache::getLocalServerInstance(); $lines = $cache->getWithSetCallback( $cache->makeKey( 'cirrussearch-morelikethis-settings' ), 600, diff --git a/includes/Util.php b/includes/Util.php index abe1887..4ad6c4e 100644 --- a/includes/Util.php +++ b/includes/Util.php @@ -173,7 +1
[MediaWiki-commits] [Gerrit] delete gitweb_config.perl - change (operations/puppet)
Dzahn has submitted this change and it was merged. Change subject: delete gitweb_config.perl .. delete gitweb_config.perl Unused since ages now Change-Id: I25e6ec5e4b9cd086b43d15794f3516cdab134caa --- D files/gerrit/gitweb_config.perl 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: Dzahn: Verified; Looks good to me, approved diff --git a/files/gerrit/gitweb_config.perl b/files/gerrit/gitweb_config.perl deleted file mode 100644 index af43210..000 --- a/files/gerrit/gitweb_config.perl +++ /dev/null @@ -1 +0,0 @@ -$feature{'blame'}{'default'} = [1]; -- To view, visit https://gerrit.wikimedia.org/r/280481 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I25e6ec5e4b9cd086b43d15794f3516cdab134caa Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Chad Gerrit-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] scap: add configuration for phabricator - change (operations/puppet)
Dzahn has submitted this change and it was merged. Change subject: scap: add configuration for phabricator .. scap: add configuration for phabricator Add deploy-phabricator on deployment servers. This group is needed for keyholder ssh access to phabricator deployment targets (iridium) Bug: T114363 Change-Id: Iab5cad2e2a5881cede2e1e6eab0bdd3660080cd0 --- M hieradata/common/scap/server.yaml M hieradata/labs/deployment-prep/common.yaml M hieradata/role/common/deployment/server.yaml M modules/admin/data/data.yaml M modules/phabricator/files/phab-deploy-key.labs 5 files changed, 13 insertions(+), 1 deletion(-) Approvals: 20after4: Looks good to me, but someone else must approve jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/hieradata/common/scap/server.yaml b/hieradata/common/scap/server.yaml index 7da43cd..90ee963 100644 --- a/hieradata/common/scap/server.yaml +++ b/hieradata/common/scap/server.yaml @@ -36,6 +36,9 @@ # will be cloned on the scap deploy server. sources: + phabricator/deployment: +repository: phabricator/deployment + # Source code for taking XML dumps and snapshots of Mediawiki. dumps/dumps: repository: operations/dumps diff --git a/hieradata/labs/deployment-prep/common.yaml b/hieradata/labs/deployment-prep/common.yaml index f3969f9..bede0b3 100644 --- a/hieradata/labs/deployment-prep/common.yaml +++ b/hieradata/labs/deployment-prep/common.yaml @@ -247,6 +247,9 @@ # will be cloned on the scap deploy server. scap::server::sources: + phabricator/deployment: +repository: phabricator/deployment + # eventbus runs eventlogging-service. # See: https://wikitech.wikimedia.org/wiki/EventBus eventlogging/eventbus: diff --git a/hieradata/role/common/deployment/server.yaml b/hieradata/role/common/deployment/server.yaml index a1c3efe..fd07c23 100644 --- a/hieradata/role/common/deployment/server.yaml +++ b/hieradata/role/common/deployment/server.yaml @@ -6,6 +6,8 @@ - wdqs-admins - eventlogging-admins - aqs-admins + - deploy-phabricator + debdeploy::grains: debdeploy-deployment: value: standard diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml index 2c82135..60cedb6 100644 --- a/modules/admin/data/data.yaml +++ b/modules/admin/data/data.yaml @@ -498,6 +498,10 @@ description: users who have root on swift servers members: [gilles] privileges: ['ALL = (ALL) NOPASSWD: ALL'] + deploy-phabricator: +gid: 778 +description: Group of phabricator deployers +members: [twentyafterfour, demon, rush, thcipriani] users: rush: diff --git a/modules/phabricator/files/phab-deploy-key.labs b/modules/phabricator/files/phab-deploy-key.labs index 17bc88e..38641cd 100644 --- a/modules/phabricator/files/phab-deploy-key.labs +++ b/modules/phabricator/files/phab-deploy-key.labs @@ -1 +1 @@ -ssh-rsa B3NzaC1yc2EDAQABAAABAQC5385VUpvkzTd2XPgpi5DppbuIBZyUQvXVpSSV3AG8/Pvx/x3U8lH3Tif2wKC/eXbH4tJmeRf8j16XaLaNorlhsRrG9HZSvjX/LFYj4FBInzxheXQkVSGasNWv17BDfsTSExBRTUOdAhoLfnbe9HfyEVvFHvxx6zfoGcrsiFeEjg2S41cnzn7cgkdUa6r2FKdurmmhZmGp9LhlGpq2wbb5z5GQbfs1d3Qd66dg/ktP1S+RdL5eyAQewzCTjqo4u4tpps2In9b0ZBLQ2H2C03kkWBG9Q4o0Fs4Z0/8vZ2mp0U30tWYYwqRB8htf8PdSknZjcVgFdjf5m3lJphJpfxr1 phab-deploy@deploy +ssh-rsa B3NzaC1yc2EDAQABAAABAQDYNkbiYqQ9/UU3X5AKxhXOLkjCNofnmUDR/uGgRXAICAu0SZoso18zARNqVlwUWo8jsioBKg7OTKz3EIyp0WSXSbdgbiBTSNURdH6UVatWpFRbUCqlIysWZvf+QdPvpRlOufecz3/wi5QoyfNdmGI5QUZt6fHJW6p/JD+AYYnwWvuoy4jBB3gkFeGqgWrVMrB3RMsxlGYPc3DavycxCtp2jWu4DX1Q7wpMAvg2RujCSw8hB7lJGizvTYI+feRqtkHmjOGuUAPvPEBl2/sVO7WjQ3T2bQw4q0Y8S0hlYFNUJwpOTWPJUHNyXpkipbuGTTWf7lapVQZAtYjAdzTlAaXl root@deploy -- To view, visit https://gerrit.wikimedia.org/r/283494 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iab5cad2e2a5881cede2e1e6eab0bdd3660080cd0 Gerrit-PatchSet: 3 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: 20after4 Gerrit-Reviewer: 20after4 Gerrit-Reviewer: Alex Monk Gerrit-Reviewer: Dzahn Gerrit-Reviewer: Ottomata Gerrit-Reviewer: Thcipriani Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Insert ToC placeholder only when `MinervaTOC` output page pr... - change (mediawiki...MobileFrontend)
Bmansurov has uploaded a new change for review. https://gerrit.wikimedia.org/r/283575 Change subject: Insert ToC placeholder only when `MinervaTOC` output page property is `true` .. Insert ToC placeholder only when `MinervaTOC` output page property is `true` We rely on the `wgMinervaTocEnabled` config variable in the front-end while deciding whether to show the ToC or not. The config variable is the same as `MinervaTOC` output page property in the back-end. Use this page property to correctly insert the ToC placeholder to the page. Bug: T126836 Change-Id: I67c2b601e2f7a6102978d236323c1f986eaf0c2a --- M includes/MobileFormatter.php 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/75/283575/1 diff --git a/includes/MobileFormatter.php b/includes/MobileFormatter.php index 6b67695..582236d 100644 --- a/includes/MobileFormatter.php +++ b/includes/MobileFormatter.php @@ -397,7 +397,9 @@ // Insert the previous section body and reset it for the new section $body->insertBefore( $sectionBody, $node ); - if ( $sectionNumber === 0 ) { + if ( $sectionNumber === 0 && + MobileContext::singleton()->getOutput()->getProperty( 'MinervaTOC' ) + ) { // Insert table of content placeholder which will be progressively enhanced via JS $toc = $doc->createElement( 'div' ); $toc->setAttribute( 'id', 'toc' ); -- To view, visit https://gerrit.wikimedia.org/r/283575 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I67c2b601e2f7a6102978d236323c1f986eaf0c2a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Bmansurov ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] revised yaml instance descriptor format - change (operations/puppet)
Eevans has uploaded a new change for review. https://gerrit.wikimedia.org/r/283574 Change subject: revised yaml instance descriptor format .. revised yaml instance descriptor format It is probably redundant to hang everything off of a top-level instance attribute, (each descriptor is instance-specific). Change-Id: I9ffabcdfe956c23ac58dfe0db702fe9fa509cf2d --- M modules/cassandra/templates/instance.yaml.erb 1 file changed, 6 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/74/283574/1 diff --git a/modules/cassandra/templates/instance.yaml.erb b/modules/cassandra/templates/instance.yaml.erb index 04fd19e..979f43d 100644 --- a/modules/cassandra/templates/instance.yaml.erb +++ b/modules/cassandra/templates/instance.yaml.erb @@ -1,7 +1,6 @@ -instance: - name: <%= @instance_name %> - jmx_port: <%= @jmx_port %> - listen_address: <%= @listen_address %> - service_name: <%= @service_name %> - config_directory: <%= @config_directory %> - data_file_directories: [<%= Array(@data_file_directories).join(',') %>] +name: <%= @instance_name %> +jmx_port: <%= @jmx_port %> +listen_address: <%= @listen_address %> +service_name: <%= @service_name %> +config_directory: <%= @config_directory %> +data_file_directories: [<%= Array(@data_file_directories).join(',') %>] -- To view, visit https://gerrit.wikimedia.org/r/283574 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9ffabcdfe956c23ac58dfe0db702fe9fa509cf2d Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Eevans ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Allow viewing all ref type commits - change (phabricator/phabricator)
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/283573 Change subject: Allow viewing all ref type commits .. Allow viewing all ref type commits This allows us to view ref types such as refs/changes and refs/meta since we use gerrit where we have the repo's but we carn't currently view all commit since some are open and stored in refs/changes which phabricator dosen't view yet, with this patch it lets us view those commits. Change-Id: I4391793467dbbdd0d4f889970477203bd628ee18 --- M src/applications/diffusion/query/lowlevel/DiffusionLowLevelGitRefQuery.php M src/applications/repository/engine/PhabricatorRepositoryPullEngine.php 2 files changed, 69 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/phabricator/phabricator refs/changes/73/283573/1 diff --git a/src/applications/diffusion/query/lowlevel/DiffusionLowLevelGitRefQuery.php b/src/applications/diffusion/query/lowlevel/DiffusionLowLevelGitRefQuery.php index 1f17f5f..7cc14df 100644 --- a/src/applications/diffusion/query/lowlevel/DiffusionLowLevelGitRefQuery.php +++ b/src/applications/diffusion/query/lowlevel/DiffusionLowLevelGitRefQuery.php @@ -43,6 +43,10 @@ $prefixes[] = 'refs/tags/'; } +if (!$this->isTag) { + $prefixes[] = 'refs/meta/'; +} + $order = '-creatordate'; $futures = array(); @@ -55,6 +59,7 @@ } // Resolve all the futures first. We want to iterate over them in prefix + // order, not resolution order. foreach (new FutureIterator($futures) as $prefix => $future) { $future->resolvex(); @@ -63,7 +68,6 @@ $results = array(); foreach ($futures as $prefix => $future) { list($stdout) = $future->resolvex(); - $stdout = rtrim($stdout); if (!strlen($stdout)) { continue; @@ -102,8 +106,70 @@ $results[] = $ref; } } +$prefixes_custom = array(); -return $results; +if (!$this->isTag) { + $prefixes_custom[] = 'refs/changes/'; +} + +$futures_custom = array(); +foreach ($prefixes_custom as $prefix_custom) { + $futures_custom['refs/'] = $repository->getLocalCommandFuture( +'for-each-ref --sort=%s --format=%s %s', +$order, +$this->getFormatString(), +$prefix_custom); +} + +// Resolve all the futures first. We want to iterate over them in prefix +// order, not resolution order. +foreach (new FutureIterator($futures_custom) as $prefix_custom => $future_custom) { + $future_custom->resolvex(); +} + +foreach ($futures_custom as $prefix_custom => $future_custom) { + list($stdout) = $future_custom->resolvex(); + + $stdout = rtrim($stdout); + if (!strlen($stdout)) { +continue; + } + + // NOTE: Although git supports --count, we can't apply any offset or + // limit logic until the very end because we may encounter a HEAD which + // we want to discard. + + $lines = explode("\n", $stdout); + // $lines = array_filter($lines); + foreach ($lines as $line) { +$fields = $this->extractFields($line); + +$creator = $fields['creator']; +$matches = null; +if (preg_match('/^(.*) ([0-9]+) ([0-9+-]+)$/', $creator, $matches)) { + $fields['author'] = $matches[1]; + $fields['epoch'] = (int)$matches[2]; +} else { + $fields['author'] = null; + $fields['epoch'] = null; +} + +$commit = nonempty($fields['*objectname'], $fields['objectname']); + +$short = substr($fields['refname'], strlen($prefix_custom)); +if ($short == 'HEAD') { + continue; +} + +$ref = id(new DiffusionRepositoryRef()) + ->setShortName($short) + ->setCommitIdentifier($commit) + ->setRawFields($fields); + +$results[] = $ref; + } +} + return $results; } /** diff --git a/src/applications/repository/engine/PhabricatorRepositoryPullEngine.php b/src/applications/repository/engine/PhabricatorRepositoryPullEngine.php index 690f942..3fbbd53 100644 --- a/src/applications/repository/engine/PhabricatorRepositoryPullEngine.php +++ b/src/applications/repository/engine/PhabricatorRepositoryPullEngine.php @@ -314,7 +314,7 @@ // For bare working copies, we need this magic incantation. $future = $repository->getRemoteCommandFuture( 'fetch origin %s --prune', - '+refs/heads/*:refs/heads/*'); + '+refs/*:refs/*'); } else { $future = $repository->getRemoteCommandFuture( 'fetch --all --prune'); -- To view, visit https://gerrit.wikimedia.org/r/283573 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4391793467dbbdd0d4f889970477203bd628ee18 Gerrit-PatchSet: 1 Gerrit-Project: phabricator/phabricator Gerrit-Branch: master
[MediaWiki-commits] [Gerrit] Follow-up Idb1202579: Add special-characters-group-greekexte... - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Follow-up Idb1202579: Add special-characters-group-greekextended to RL module .. Follow-up Idb1202579: Add special-characters-group-greekextended to RL module Bug: T130535 Change-Id: I3e26d08a34283eaafe129dbef0944ea10c086162 --- M includes/resourceloader/ResourceLoaderSpecialCharacterDataModule.php 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Esanders: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/resourceloader/ResourceLoaderSpecialCharacterDataModule.php b/includes/resourceloader/ResourceLoaderSpecialCharacterDataModule.php index 222135c..44371bb 100644 --- a/includes/resourceloader/ResourceLoaderSpecialCharacterDataModule.php +++ b/includes/resourceloader/ResourceLoaderSpecialCharacterDataModule.php @@ -78,6 +78,7 @@ 'special-characters-group-ipa', 'special-characters-group-symbols', 'special-characters-group-greek', + 'special-characters-group-greekextended', 'special-characters-group-cyrillic', 'special-characters-group-arabic', 'special-characters-group-arabicextended', -- To view, visit https://gerrit.wikimedia.org/r/283506 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3e26d08a34283eaafe129dbef0944ea10c086162 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.27.0-wmf.21 Gerrit-Owner: Alex Monk Gerrit-Reviewer: Esanders Gerrit-Reviewer: Krinkle Gerrit-Reviewer: Legoktm Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add swift-roots to swift storage and proxy boxes - change (operations/puppet)
Andrew Bogott has submitted this change and it was merged. Change subject: Add swift-roots to swift storage and proxy boxes .. Add swift-roots to swift storage and proxy boxes Bug: T130910 Change-Id: Ifadcef0f76517dc4a69d7e0966602bb2783ea1b9 --- M hieradata/role/codfw/swift/proxy.yaml M hieradata/role/codfw/swift/storage.yaml M hieradata/role/eqiad/swift/proxy.yaml M hieradata/role/eqiad/swift/storage.yaml M hieradata/role/esams/swift/proxy.yaml M hieradata/role/esams/swift/storage.yaml 6 files changed, 12 insertions(+), 0 deletions(-) Approvals: Andrew Bogott: Looks good to me, approved jenkins-bot: Verified Dzahn: Looks good to me, but someone else must approve diff --git a/hieradata/role/codfw/swift/proxy.yaml b/hieradata/role/codfw/swift/proxy.yaml index 28d5b3b..bcbf3e6 100644 --- a/hieradata/role/codfw/swift/proxy.yaml +++ b/hieradata/role/codfw/swift/proxy.yaml @@ -5,3 +5,5 @@ debdeploy::grains: debdeploy-swift-fe-codfw: value: standard +admin::groups: + - swift-roots diff --git a/hieradata/role/codfw/swift/storage.yaml b/hieradata/role/codfw/swift/storage.yaml index 2f720b7..33248db 100644 --- a/hieradata/role/codfw/swift/storage.yaml +++ b/hieradata/role/codfw/swift/storage.yaml @@ -1,3 +1,5 @@ debdeploy::grains: debdeploy-swift-be-codfw: value: standard +admin::groups: + - swift-roots diff --git a/hieradata/role/eqiad/swift/proxy.yaml b/hieradata/role/eqiad/swift/proxy.yaml index 915fed6..2437115 100644 --- a/hieradata/role/eqiad/swift/proxy.yaml +++ b/hieradata/role/eqiad/swift/proxy.yaml @@ -5,3 +5,5 @@ debdeploy::grains: debdeploy-swift-fe-eqiad: value: standard +admin::groups: + - swift-roots diff --git a/hieradata/role/eqiad/swift/storage.yaml b/hieradata/role/eqiad/swift/storage.yaml index e901dcd..a665583 100644 --- a/hieradata/role/eqiad/swift/storage.yaml +++ b/hieradata/role/eqiad/swift/storage.yaml @@ -1,3 +1,5 @@ debdeploy::grains: debdeploy-swift-be-eqiad: value: standard +admin::groups: + - swift-roots diff --git a/hieradata/role/esams/swift/proxy.yaml b/hieradata/role/esams/swift/proxy.yaml index ab28264..52add8d 100644 --- a/hieradata/role/esams/swift/proxy.yaml +++ b/hieradata/role/esams/swift/proxy.yaml @@ -3,3 +3,5 @@ debdeploy::grains: debdeploy-swift-fe-esams: value: standard +admin::groups: + - swift-roots diff --git a/hieradata/role/esams/swift/storage.yaml b/hieradata/role/esams/swift/storage.yaml index e820db2..0d01593 100644 --- a/hieradata/role/esams/swift/storage.yaml +++ b/hieradata/role/esams/swift/storage.yaml @@ -1,3 +1,5 @@ debdeploy::grains: debdeploy-swift-be-esams: value: standard +admin::groups: + - swift-roots -- To view, visit https://gerrit.wikimedia.org/r/283471 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifadcef0f76517dc4a69d7e0966602bb2783ea1b9 Gerrit-PatchSet: 3 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Andrew Bogott Gerrit-Reviewer: Andrew Bogott Gerrit-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] Enable europeana2802016 campaign - change (mediawiki...ContentTranslation)
jenkins-bot has submitted this change and it was merged. Change subject: Enable europeana2802016 campaign .. Enable europeana2802016 campaign Bug: T125626 Change-Id: Ieb28dac5a4fa6323bfc185ecb95850ae2e670f54 --- M ContentTranslation.hooks.php M extension.json 2 files changed, 3 insertions(+), 1 deletion(-) Approvals: BryanDavis: Looks good to me, approved jenkins-bot: Verified diff --git a/ContentTranslation.hooks.php b/ContentTranslation.hooks.php index 191cf6c..21329f8 100644 --- a/ContentTranslation.hooks.php +++ b/ContentTranslation.hooks.php @@ -196,6 +196,7 @@ if ( !$wgContentTranslationCampaigns['newarticle'] || + !$wgContentTranslationCampaigns['europeana2802016'] || $out->getRequest()->getCookie( 'cx_campaign_newarticle_hide', '' ) || $newPage->mTitle->exists() || !$newPage->mTitle->inNamespace( NS_MAIN ) || diff --git a/extension.json b/extension.json index f4eaae6..7dcd870 100644 --- a/extension.json +++ b/extension.json @@ -137,7 +137,8 @@ "ContentTranslationCampaigns": { "cxstats": true, "specialcx": true, - "newarticle": true + "newarticle": true, + "europeana2802016": true }, "ContentTranslationBrowserBlacklist": { "msie": [ [ "<", 10 ] ] -- To view, visit https://gerrit.wikimedia.org/r/283570 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ieb28dac5a4fa6323bfc185ecb95850ae2e670f54 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: wmf/1.27.0-wmf.21 Gerrit-Owner: BryanDavis Gerrit-Reviewer: BryanDavis Gerrit-Reviewer: KartikMistry Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Enable europeana2802016 campaign - change (mediawiki...ContentTranslation)
jenkins-bot has submitted this change and it was merged. Change subject: Enable europeana2802016 campaign .. Enable europeana2802016 campaign Bug: T125626 Change-Id: Ieb28dac5a4fa6323bfc185ecb95850ae2e670f54 --- M ContentTranslation.hooks.php M extension.json 2 files changed, 3 insertions(+), 1 deletion(-) Approvals: BryanDavis: Looks good to me, approved Amire80: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/ContentTranslation.hooks.php b/ContentTranslation.hooks.php index 191cf6c..21329f8 100644 --- a/ContentTranslation.hooks.php +++ b/ContentTranslation.hooks.php @@ -196,6 +196,7 @@ if ( !$wgContentTranslationCampaigns['newarticle'] || + !$wgContentTranslationCampaigns['europeana2802016'] || $out->getRequest()->getCookie( 'cx_campaign_newarticle_hide', '' ) || $newPage->mTitle->exists() || !$newPage->mTitle->inNamespace( NS_MAIN ) || diff --git a/extension.json b/extension.json index f4eaae6..7dcd870 100644 --- a/extension.json +++ b/extension.json @@ -137,7 +137,8 @@ "ContentTranslationCampaigns": { "cxstats": true, "specialcx": true, - "newarticle": true + "newarticle": true, + "europeana2802016": true }, "ContentTranslationBrowserBlacklist": { "msie": [ [ "<", 10 ] ] -- To view, visit https://gerrit.wikimedia.org/r/283438 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ieb28dac5a4fa6323bfc185ecb95850ae2e670f54 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: KartikMistry Gerrit-Reviewer: Amire80 Gerrit-Reviewer: BryanDavis Gerrit-Reviewer: Multichill Gerrit-Reviewer: TheDJ Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Prune another dead hiera setting - change (operations/puppet)
Andrew Bogott has submitted this change and it was merged. Change subject: Prune another dead hiera setting .. Prune another dead hiera setting Change-Id: I216ce8eb3c161e58d63c9b7a0fb274cc508fe578 --- D hieradata/role/common/swift.yaml 1 file changed, 0 insertions(+), 2 deletions(-) Approvals: Andrew Bogott: Looks good to me, approved jenkins-bot: Verified Dzahn: Looks good to me, but someone else must approve diff --git a/hieradata/role/common/swift.yaml b/hieradata/role/common/swift.yaml deleted file mode 100644 index 5b3dfbc..000 --- a/hieradata/role/common/swift.yaml +++ /dev/null @@ -1,2 +0,0 @@ -admin::groups: - - swift-roots -- To view, visit https://gerrit.wikimedia.org/r/283476 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I216ce8eb3c161e58d63c9b7a0fb274cc508fe578 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Andrew Bogott Gerrit-Reviewer: Andrew Bogott Gerrit-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] etherpad: fix path to moved file - change (operations/puppet)
Dzahn has submitted this change and it was merged. Change subject: etherpad: fix path to moved file .. etherpad: fix path to moved file follow-up fix to Ided587afd6ba90 Change-Id: I7645819c35de8efa468f514b923e575db4f78619 --- M manifests/role/etherpad.pp 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/manifests/role/etherpad.pp b/manifests/role/etherpad.pp index eead1cf..3c7b2c0 100644 --- a/manifests/role/etherpad.pp +++ b/manifests/role/etherpad.pp @@ -31,6 +31,6 @@ } diamond::collector { 'EtherpadStatus': -source => 'puppet:///modules/etherpad/files/etherpad.py', +source => 'puppet:///modules/etherpad/etherpad.py', } } -- To view, visit https://gerrit.wikimedia.org/r/283572 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7645819c35de8efa468f514b923e575db4f78619 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn Gerrit-Reviewer: Chad Gerrit-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] etherpad: fix path to moved file - change (operations/puppet)
Dzahn has uploaded a new change for review. https://gerrit.wikimedia.org/r/283572 Change subject: etherpad: fix path to moved file .. etherpad: fix path to moved file follow-up fix to Ided587afd6ba90 Change-Id: I7645819c35de8efa468f514b923e575db4f78619 --- M manifests/role/etherpad.pp 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/72/283572/1 diff --git a/manifests/role/etherpad.pp b/manifests/role/etherpad.pp index eead1cf..3c7b2c0 100644 --- a/manifests/role/etherpad.pp +++ b/manifests/role/etherpad.pp @@ -31,6 +31,6 @@ } diamond::collector { 'EtherpadStatus': -source => 'puppet:///modules/etherpad/files/etherpad.py', +source => 'puppet:///modules/etherpad/etherpad.py', } } -- To view, visit https://gerrit.wikimedia.org/r/283572 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7645819c35de8efa468f514b923e575db4f78619 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] shared.css: Adjust mw-plusminus and autocomment colors for a... - change (mediawiki/core)
Krinkle has uploaded a new change for review. https://gerrit.wikimedia.org/r/283571 Change subject: shared.css: Adjust mw-plusminus and autocomment colors for accessibility and usability .. shared.css: Adjust mw-plusminus and autocomment colors for accessibility and usability * The red and green colors were quite dark. They faded away into big wall of text that ChangesList produces on history pages and recent changes etc. * It's a different red than we use elsewhere for running text. * The gray was too light compared to the surrounding text. In fact, "gray" (#808080) on white has a contrast of 3.95:1, which fails both the WCAG AA guidelines for normal and larger text. Change: * Lighten the red to match the middle-dark red we use for 'a.new' red links. * Lighten the green to match the tone of the this red. * Darken the gray to pass WCAG AA and match tone of the green and red. All three colors were picked to not be too light either, and still pass WCAG AA. Over the years, many Wikimedia wikis have changed their mw-plusminus colors via Common.css. (In some cases they even predate MediaWiki's defaults). While they differ slightly from eachother, they all agree in that they brighten the tones. Change-Id: I3f3b418de705ac4228c911838804a0c1bd60facc --- M resources/src/mediawiki.legacy/shared.css 1 file changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/71/283571/1 diff --git a/resources/src/mediawiki.legacy/shared.css b/resources/src/mediawiki.legacy/shared.css index daebac1..e31d287 100644 --- a/resources/src/mediawiki.legacy/shared.css +++ b/resources/src/mediawiki.legacy/shared.css @@ -91,17 +91,17 @@ } } -/* Colored watchlist and recent changes numbers */ +/* Colored change size numbers in change lists (recent changes, history, etc.) */ .mw-plusminus-pos { - color: #006400; /* dark green */ + color: #007900; /* green */ } .mw-plusminus-neg { - color: #8b; /* dark red */ + color: #ba; /* red */ } .mw-plusminus-null { - color: #aaa; /* gray */ + color: #757575; /* gray */ } /* @@ -287,7 +287,7 @@ /* The auto-generated edit comments */ .autocomment { - color: gray; + color: #757575; } #pagehistory .history-user { -- To view, visit https://gerrit.wikimedia.org/r/283571 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3f3b418de705ac4228c911838804a0c1bd60facc Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core 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] Enable europeana2802016 campaign - change (mediawiki...ContentTranslation)
BryanDavis has uploaded a new change for review. https://gerrit.wikimedia.org/r/283570 Change subject: Enable europeana2802016 campaign .. Enable europeana2802016 campaign Bug: T125626 Change-Id: Ieb28dac5a4fa6323bfc185ecb95850ae2e670f54 --- M ContentTranslation.hooks.php M extension.json 2 files changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/70/283570/1 diff --git a/ContentTranslation.hooks.php b/ContentTranslation.hooks.php index 191cf6c..21329f8 100644 --- a/ContentTranslation.hooks.php +++ b/ContentTranslation.hooks.php @@ -196,6 +196,7 @@ if ( !$wgContentTranslationCampaigns['newarticle'] || + !$wgContentTranslationCampaigns['europeana2802016'] || $out->getRequest()->getCookie( 'cx_campaign_newarticle_hide', '' ) || $newPage->mTitle->exists() || !$newPage->mTitle->inNamespace( NS_MAIN ) || diff --git a/extension.json b/extension.json index f4eaae6..7dcd870 100644 --- a/extension.json +++ b/extension.json @@ -137,7 +137,8 @@ "ContentTranslationCampaigns": { "cxstats": true, "specialcx": true, - "newarticle": true + "newarticle": true, + "europeana2802016": true }, "ContentTranslationBrowserBlacklist": { "msie": [ [ "<", 10 ] ] -- To view, visit https://gerrit.wikimedia.org/r/283570 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ieb28dac5a4fa6323bfc185ecb95850ae2e670f54 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: wmf/1.27.0-wmf.21 Gerrit-Owner: BryanDavis Gerrit-Reviewer: KartikMistry ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Enable Ex:OATHAuth in beta, disabled for all users - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: Enable Ex:OATHAuth in beta, disabled for all users .. Enable Ex:OATHAuth in beta, disabled for all users Enable OATHAuth in beta, but disable it for all users. For testing, we'll give the user right to the global Staff group. Trying this again, with the DB table correctly created this time. Bug: T131420 Change-Id: Id13a8b8aa11b91ccc770fafbdec28834c9cc2afc --- M wmf-config/CommonSettings-labs.php M wmf-config/InitialiseSettings-labs.php M wmf-config/extension-list-labs 3 files changed, 12 insertions(+), 0 deletions(-) Approvals: CSteipp: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/CommonSettings-labs.php b/wmf-config/CommonSettings-labs.php index c1625fb..2cfec24 100644 --- a/wmf-config/CommonSettings-labs.php +++ b/wmf-config/CommonSettings-labs.php @@ -342,6 +342,13 @@ wfLoadExtension( 'Newsletter' ); } +if ( $wmgUseOATHAuth && $wmgUseCentralAuth ) { + wfLoadExtension( 'OATHAuth' ); + $wgOATHAuthDatabase = 'centralauth'; + // Roll this feature out to specific groups initially + $wgGroupPermissions['*']['oathauth-enable'] = false; +} + // Experimental $wgGadgetsCaching = false; diff --git a/wmf-config/InitialiseSettings-labs.php b/wmf-config/InitialiseSettings-labs.php index 738730e..592b3de 100644 --- a/wmf-config/InitialiseSettings-labs.php +++ b/wmf-config/InitialiseSettings-labs.php @@ -643,5 +643,9 @@ 'wmgUseNewsletter' => array( 'default' => true, // T127297 ), + // Test enabling OATH for 2FA + 'wmgUseOATHAuth' => array( + 'default' => true, + ), ); } # wmflLabsSettings() diff --git a/wmf-config/extension-list-labs b/wmf-config/extension-list-labs index f195f2e..9d93b1b 100644 --- a/wmf-config/extension-list-labs +++ b/wmf-config/extension-list-labs @@ -5,3 +5,4 @@ $IP/extensions/Kartographer/extension.json $IP/extensions/ORES/extension.json $IP/extensions/Newsletter/extension.json +$IP/extensions/OATHAuth/extension.json -- To view, visit https://gerrit.wikimedia.org/r/283569 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id13a8b8aa11b91ccc770fafbdec28834c9cc2afc Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: CSteipp Gerrit-Reviewer: CSteipp Gerrit-Reviewer: Florianschmidtwelzow Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Move etherpad diamond collector script to module - change (operations/puppet)
Dzahn has submitted this change and it was merged. Change subject: Move etherpad diamond collector script to module .. Move etherpad diamond collector script to module Change-Id: Ided587afd6ba90e5584599819a63d60d1da3add9 --- M manifests/role/etherpad.pp R modules/etherpad/files/etherpad.py 2 files changed, 1 insertion(+), 1 deletion(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/manifests/role/etherpad.pp b/manifests/role/etherpad.pp index c5603d7..eead1cf 100644 --- a/manifests/role/etherpad.pp +++ b/manifests/role/etherpad.pp @@ -31,6 +31,6 @@ } diamond::collector { 'EtherpadStatus': -source => 'puppet:///files/etherpad/etherpad.py', +source => 'puppet:///modules/etherpad/files/etherpad.py', } } diff --git a/files/etherpad/etherpad.py b/modules/etherpad/files/etherpad.py similarity index 100% rename from files/etherpad/etherpad.py rename to modules/etherpad/files/etherpad.py -- To view, visit https://gerrit.wikimedia.org/r/283512 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ided587afd6ba90e5584599819a63d60d1da3add9 Gerrit-PatchSet: 3 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Chad Gerrit-Reviewer: Chad Gerrit-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] Enable Ex:OATHAuth in beta, disabled for all users - change (operations/mediawiki-config)
CSteipp has uploaded a new change for review. https://gerrit.wikimedia.org/r/283569 Change subject: Enable Ex:OATHAuth in beta, disabled for all users .. Enable Ex:OATHAuth in beta, disabled for all users Enable OATHAuth in beta, but disable it for all users. For testing, we'll give the user right to the global Staff group. Trying this again, with the DB table correctly created this time. Bug: T131420 Change-Id: Id13a8b8aa11b91ccc770fafbdec28834c9cc2afc --- M wmf-config/CommonSettings-labs.php M wmf-config/InitialiseSettings-labs.php M wmf-config/extension-list-labs 3 files changed, 12 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/69/283569/1 diff --git a/wmf-config/CommonSettings-labs.php b/wmf-config/CommonSettings-labs.php index c1625fb..2cfec24 100644 --- a/wmf-config/CommonSettings-labs.php +++ b/wmf-config/CommonSettings-labs.php @@ -342,6 +342,13 @@ wfLoadExtension( 'Newsletter' ); } +if ( $wmgUseOATHAuth && $wmgUseCentralAuth ) { + wfLoadExtension( 'OATHAuth' ); + $wgOATHAuthDatabase = 'centralauth'; + // Roll this feature out to specific groups initially + $wgGroupPermissions['*']['oathauth-enable'] = false; +} + // Experimental $wgGadgetsCaching = false; diff --git a/wmf-config/InitialiseSettings-labs.php b/wmf-config/InitialiseSettings-labs.php index 738730e..592b3de 100644 --- a/wmf-config/InitialiseSettings-labs.php +++ b/wmf-config/InitialiseSettings-labs.php @@ -643,5 +643,9 @@ 'wmgUseNewsletter' => array( 'default' => true, // T127297 ), + // Test enabling OATH for 2FA + 'wmgUseOATHAuth' => array( + 'default' => true, + ), ); } # wmflLabsSettings() diff --git a/wmf-config/extension-list-labs b/wmf-config/extension-list-labs index f195f2e..9d93b1b 100644 --- a/wmf-config/extension-list-labs +++ b/wmf-config/extension-list-labs @@ -5,3 +5,4 @@ $IP/extensions/Kartographer/extension.json $IP/extensions/ORES/extension.json $IP/extensions/Newsletter/extension.json +$IP/extensions/OATHAuth/extension.json -- To view, visit https://gerrit.wikimedia.org/r/283569 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id13a8b8aa11b91ccc770fafbdec28834c9cc2afc Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: CSteipp ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Create Popups jenkins job - change (integration/config)
Bmansurov has uploaded a new change for review. https://gerrit.wikimedia.org/r/283568 Change subject: Create Popups jenkins job .. Create Popups jenkins job We'd like to run some browser tests. Bug: T67103 Change-Id: Ie94fa399512be041f12b2f7cada20d4206ddaf82 --- M jjb/browsertests.yaml 1 file changed, 16 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/68/283568/1 diff --git a/jjb/browsertests.yaml b/jjb/browsertests.yaml index 0889910..ffd7522 100644 --- a/jjb/browsertests.yaml +++ b/jjb/browsertests.yaml @@ -181,6 +181,22 @@ - 'browsertests-{name}-{mediawiki_url}-{platform}-{browser}-sauce': browser: firefox +# Popups +- project: +name: Popups +defaults: browsertests +folder: tests +headless: 'false' +mediawiki_credentials_id: Selenium_user-at-beta.wmflabs.org +mediawiki_url: en.wikipedia.beta.wmflabs.org +platform: linux +recipients: *emails-qa +repository: mediawiki/extensions/Popups + +jobs: + - 'browsertests-{name}-{mediawiki_url}-{platform}-{browser}-sauce': +browser: chrome + # QuickSurveys - project: name: QuickSurveys -- To view, visit https://gerrit.wikimedia.org/r/283568 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie94fa399512be041f12b2f7cada20d4206ddaf82 Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Bmansurov ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki.special.upload: Don't fail when trying to thumbnai... - change (mediawiki/core)
Bartosz Dziewoński has uploaded a new change for review. https://gerrit.wikimedia.org/r/283567 Change subject: mediawiki.special.upload: Don't fail when trying to thumbnail invalid file .. mediawiki.special.upload: Don't fail when trying to thumbnail invalid file The thumbnail spinner would spin forever if we never got a 'load' even on the image. Bug: T132242 Change-Id: I1c68ed185b58950c3648f56e07144bb29a8bed56 --- M resources/src/mediawiki.special/mediawiki.special.upload.js 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/67/283567/1 diff --git a/resources/src/mediawiki.special/mediawiki.special.upload.js b/resources/src/mediawiki.special/mediawiki.special.upload.js index 6bbe32d..377b1f7 100644 --- a/resources/src/mediawiki.special/mediawiki.special.upload.js +++ b/resources/src/mediawiki.special/mediawiki.special.upload.js @@ -407,6 +407,10 @@ $( '#mw-upload-thumbnail .fileinfo' ).text( info ); }; + img.onerror = function () { + // Can happen for example for invalid SVG files + clearPreview(); + }; img.src = dataURL; }, mw.config.get( 'wgFileCanRotate' ) ? function ( data ) { try { -- To view, visit https://gerrit.wikimedia.org/r/283567 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1c68ed185b58950c3648f56e07144bb29a8bed56 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Bartosz Dziewoński ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add basic browser tests - change (mediawiki...Popups)
Bmansurov has uploaded a new change for review. https://gerrit.wikimedia.org/r/283566 Change subject: Add basic browser tests .. Add basic browser tests Bug: T67103 Change-Id: Idf39e7e2a3b343babd6d0538225b4ef9002e8ac1 --- A Gemfile A tests/browser/README.mediawiki A tests/browser/environments.yml A tests/browser/features/popups_core.feature A tests/browser/features/support/env.rb A tests/browser/features/support/hooks.rb A tests/browser/features/support/pages/article_page.rb A tests/browser/features/support/pages/special_preferences_page.rb A tests/browser/features/support/permissions.sqlite A tests/browser/features/support/step_definitions/common_steps.rb A tests/browser/features/support/step_definitions/popups_core.rb A tests/browser/samples/links.wikitext 12 files changed, 194 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Popups refs/changes/66/283566/1 diff --git a/Gemfile b/Gemfile new file mode 100644 index 000..53577ea --- /dev/null +++ b/Gemfile @@ -0,0 +1,7 @@ +source 'https://rubygems.org' + +gem 'chunky_png', '~> 1.3.4' +gem 'jsduck', '~> 5.3.4' +gem 'mediawiki_selenium', '~> 1.6.5' +gem 'rake', '~> 10.4', '>= 10.4.2' +gem 'rubocop', '~> 0.29.1', require: false diff --git a/tests/browser/README.mediawiki b/tests/browser/README.mediawiki new file mode 100644 index 000..e3c2a6d --- /dev/null +++ b/tests/browser/README.mediawiki @@ -0,0 +1,51 @@ +To run the Selenium tests you will have to install Ruby (for the exact +version see Gemfile), the latest versions of RubyGems and Firefox. + +The easiest way to install Ruby on *nix is RVM (https://rvm.io/) and on +Windows RubyInstaller (http://rubyinstaller.org/). + +Open terminal in tests/browser. Update RubyGems and install required +gems with: + + gem update --system + gem install bundler # on Mac OS X Yosemite append ` --user-install -n~/bin`, + # where ~/bin is the install folder + bundle install + +Environment variables MEDIAWIKI_USER and MEDIAWIKI_PASSWORD are required for +tests that require a logged in user. For local testing, create a test user on your local wiki +and export the user and password as the values for those variables. +For example: + + export MEDIAWIKI_USER= # Linux/Unix/Mac + set MEDIAWIKI_USER= # Windows + + export MEDIAWIKI_PASSWORD= # Linux/Unix/Mac + set MEDIAWIKI_PASSWORD= # Windows + +In addition to this create another user which will be reserved for new uploads +"Selenium_newuser". The password for this user should be the same as +MEDIAWIKI_PASSWORD + +Tests that use the "Given I create a random page using the API" step need to set +the MEDIAWIKI_API_URL environment variable, e.g. +export MEDIAWIKI_API_URL=http://en.wikipedia.beta.wmflabs.org/w/api.php + +Run the tests from the Popups directory with: + + make cucumber + +If you want to run a single set of tests, go to the tests/browser directory and +call 'bundle exec cucumber' with the path to the test file. For example, to run +only the watchlist tests: + + bundle exec cucumber features/watchstar.feature + +XML report (for Jenkins) is created at tests/browser/reports/junit. + +Jenkins is hosted at https://wmf.ci.cloudbees.com/ and it drives +browsers at http://saucelabs.com/ + +For more information about running Selenium tests please see +https://github.com/wikimedia/mediawiki-selenium + diff --git a/tests/browser/environments.yml b/tests/browser/environments.yml new file mode 100644 index 000..120c9ff --- /dev/null +++ b/tests/browser/environments.yml @@ -0,0 +1,45 @@ +# Customize this configuration as necessary to provide defaults for various +# test environments. +# +# The set of defaults to use is determined by the MEDIAWIKI_ENVIRONMENT +# environment variable. +# +# export MEDIAWIKI_ENVIRONMENT=mw-vagrant-host +# bundle exec cucumber +# +# Additional variables set by the environment will override the corresponding +# defaults defined here. +# +# export MEDIAWIKI_ENVIRONMENT=mw-vagrant-host +# export MEDIAWIKI_USER=Selenium_user2 +# bundle exec cucumber +# +mw-vagrant-host: &default + mediawiki_url: http://127.0.0.1:8080/wiki/ + user_factory: true + +barry: + browser: phantomjs + user_factory: false + # mediawiki_url: Will be set manually + +mw-vagrant-guest: + mediawiki_url: http://127.0.0.1/wiki/ + user_factory: true + +beta: + mediawiki_url: http://en.m.wikipedia.beta.wmflabs.org/wiki/ + mediawiki_user: Selenium_user + # mediawiki_password: SET THIS IN THE ENVIRONMENT! + +test2: + mediawiki_url: http://test2.wikipedia.org/wiki/ + mediawiki_user: Selenium_user + # mediawiki_password: SET THIS IN THE ENVIRONMENT! + +integration: + browser: chrome + user_factory: true + # mediawiki_url: THIS WILL BE SET BY JENKINS + +default: *default diff --git a/tests/browser/features/popups_core.feature b/tests/browser/features/popups_core.feature new file mode 100644
[MediaWiki-commits] [Gerrit] Add betacluster-alert list to relevant jobs - change (integration/config)
jenkins-bot has submitted this change and it was merged. Change subject: Add betacluster-alert list to relevant jobs .. Add betacluster-alert list to relevant jobs Bug: T1125 Change-Id: I6c1ff7ea699614b77ba8574bd973e5ec00c49ed9 --- M jjb/beta.yaml 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/jjb/beta.yaml b/jjb/beta.yaml index 47e74f8..cb461fc 100644 --- a/jjb/beta.yaml +++ b/jjb/beta.yaml @@ -90,7 +90,7 @@ publishers: - beta-irc - email-ext: - recipients: qa-ale...@lists.wikimedia.org + recipients: qa-ale...@lists.wikimedia.org betacluster-ale...@lists.wikimedia.org attach-build-log: true first-failure: true aborted: true @@ -128,7 +128,7 @@ - global-teardown - beta-irc - email-ext: - recipients: qa-ale...@lists.wikimedia.org + recipients: qa-ale...@lists.wikimedia.org betacluster-ale...@lists.wikimedia.org attach-build-log: false first-failure: true aborted: true @@ -161,7 +161,7 @@ publishers: - beta-irc - email-ext: - recipients: qa-ale...@lists.wikimedia.org + recipients: qa-ale...@lists.wikimedia.org betacluster-ale...@lists.wikimedia.org content-type: 'html' attach-build-log: false aborted: true -- To view, visit https://gerrit.wikimedia.org/r/282811 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6c1ff7ea699614b77ba8574bd973e5ec00c49ed9 Gerrit-PatchSet: 2 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Alex Monk Gerrit-Reviewer: Hashar Gerrit-Reviewer: JanZerebecki 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] Add scripts to copy in OOjs or OOjs UI from your local direc... - change (mediawiki/core)
Mattflaschen has uploaded a new change for review. https://gerrit.wikimedia.org/r/283565 Change subject: Add scripts to copy in OOjs or OOjs UI from your local directories .. Add scripts to copy in OOjs or OOjs UI from your local directories maintenance/resources/copy-in-oojs.sh /my/copy/oojs maintenance/resources/copy-in-oojs-ui.sh /my/copy/oojs-ui These are also reused to do the actual OOjs and OOjs UI bumps. Change-Id: I80851d6a5d1d138642fa9407707512423fa8af08 --- A maintenance/resources/copy-in-oojs-ui.sh A maintenance/resources/copy-in-oojs.sh M maintenance/resources/update-oojs-ui.sh M maintenance/resources/update-oojs.sh 4 files changed, 146 insertions(+), 70 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/65/283565/1 diff --git a/maintenance/resources/copy-in-oojs-ui.sh b/maintenance/resources/copy-in-oojs-ui.sh new file mode 100755 index 000..0704bf5 --- /dev/null +++ b/maintenance/resources/copy-in-oojs-ui.sh @@ -0,0 +1,80 @@ +#!/bin/bash -eu + +# This copies OOjs UI into the MW source tree, either from a published +# version or from a local directory +# If --published is passed, it outputs the OOjs version. Otherwise, +# it builds the dist directory. + +if [ -n "${3:-}" ] +then + # Too many parameters + echo >&2 "Usage: $0 [--published] " + exit 1 +fi + +PUBLISHED=0 +if [ "$1" = "--published" ] +then + PUBLISHED=1 + shift +fi + +REPO_DIR=$(cd "$(dirname $0)/../.."; pwd) # Root dir of the git repo working tree +TARGET_DIR="resources/lib/oojs-ui" # Destination relative to the root of the repo +NPM_DIR=$(mktemp -d 2>/dev/null || mktemp -d -t 'update-oojs-ui') # e.g. /tmp/update-oojs.rI0I5Vir + +# Prepare working tree +cd "$REPO_DIR" +git reset -q composer.json +git checkout composer.json +git reset -q -- $TARGET_DIR +git checkout -- $TARGET_DIR +git fetch origin + +# Fetch upstream version +cd $NPM_DIR +if [ "$PUBLISHED" -eq 0 ] +then + pushd "$1" + npm install + grunt build + popd +fi +npm install "$1" &>/dev/null + +OOJSUI_VERSION=$(node -e 'console.log(require("./node_modules/oojs-ui/package.json").version);') +if [ "$OOJSUI_VERSION" == "" ] +then + echo 'Could not find OOjs UI version' + exit 1 +fi + +# Copy files, picking the necessary ones from source and distribution +rm -r "$REPO_DIR/$TARGET_DIR" +mkdir -p "$REPO_DIR/$TARGET_DIR/i18n" +mkdir -p "$REPO_DIR/$TARGET_DIR/images" +mkdir -p "$REPO_DIR/$TARGET_DIR/themes/mediawiki/images" +mkdir -p "$REPO_DIR/$TARGET_DIR/themes/apex/images" +cp ./node_modules/oojs-ui/dist/oojs-ui-core.js "$REPO_DIR/$TARGET_DIR" +cp ./node_modules/oojs-ui/dist/oojs-ui-core-{mediawiki,apex}.css "$REPO_DIR/$TARGET_DIR" +cp ./node_modules/oojs-ui/dist/oojs-ui-widgets.js "$REPO_DIR/$TARGET_DIR" +cp ./node_modules/oojs-ui/dist/oojs-ui-widgets-{mediawiki,apex}.css "$REPO_DIR/$TARGET_DIR" +cp ./node_modules/oojs-ui/dist/oojs-ui-toolbars.js "$REPO_DIR/$TARGET_DIR" +cp ./node_modules/oojs-ui/dist/oojs-ui-toolbars-{mediawiki,apex}.css "$REPO_DIR/$TARGET_DIR" +cp ./node_modules/oojs-ui/dist/oojs-ui-windows.js "$REPO_DIR/$TARGET_DIR" +cp ./node_modules/oojs-ui/dist/oojs-ui-windows-{mediawiki,apex}.css "$REPO_DIR/$TARGET_DIR" +cp ./node_modules/oojs-ui/dist/oojs-ui-{mediawiki,apex}.js "$REPO_DIR/$TARGET_DIR" +cp -R ./node_modules/oojs-ui/dist/i18n "$REPO_DIR/$TARGET_DIR" +cp -R ./node_modules/oojs-ui/dist/images "$REPO_DIR/$TARGET_DIR" +cp -R ./node_modules/oojs-ui/dist/themes/mediawiki/images "$REPO_DIR/$TARGET_DIR/themes/mediawiki" +cp ./node_modules/oojs-ui/src/themes/mediawiki/*.json "$REPO_DIR/$TARGET_DIR/themes/mediawiki" +cp -R ./node_modules/oojs-ui/dist/themes/apex/images "$REPO_DIR/$TARGET_DIR/themes/apex" +cp ./node_modules/oojs-ui/src/themes/apex/*.json "$REPO_DIR/$TARGET_DIR/themes/apex" + +if [ "$PUBLISHED" -eq 1 ] +then + echo "$OOJSUI_VERSION" +fi + +# Clean up temporary area +rm -rf "$NPM_DIR" diff --git a/maintenance/resources/copy-in-oojs.sh b/maintenance/resources/copy-in-oojs.sh new file mode 100755 index 000..b473f06 --- /dev/null +++ b/maintenance/resources/copy-in-oojs.sh @@ -0,0 +1,60 @@ +#!/bin/bash -eu +set +x + +# This copies OOjs into the MW source tree, either from a published +# version or from a local directory +# If --published is passed, it outputs the OOjs version. Otherwise, +# it builds the dist directory. + +if [ -n "${3:-}" ] +then + # Too many parameters + echo >&2 "Usage: $0 [--published] " + exit 1 +fi + +PUBLISHED=0 +if [ "$1" = "--published" ] +then + PUBLISHED=1 + shift +fi + +REPO_DIR=$(cd "$(dirname $0)/../.."; pwd) # Root dir of the git repo working tree +TARGET_DIR="resources/lib/oojs" # Destination relative to the root of the repo +NPM_DIR=$(mktemp -d 2>/dev/null || mktemp -d -t 'update-oojs') # e.g. /tmp/update-oojs.rI0I5Vir + +# Prepare working tree +cd "$REPO_DIR" +git reset -q -- $T
[MediaWiki-commits] [Gerrit] SpecialRunJobs: delegate error handling to MWExceptionHandler - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: SpecialRunJobs: delegate error handling to MWExceptionHandler .. SpecialRunJobs: delegate error handling to MWExceptionHandler Make the custom error handler that is installed to suppress Cookie header errors delegate unhandled errors to the default MediaWiki error handler. This will preserve fatal error logging for errors raised by jobs. Bug: T89169 Change-Id: I52ef544fa18351bf310b04b17ab4e0239020fe20 --- M includes/specials/SpecialRunJobs.php 1 file changed, 5 insertions(+), 2 deletions(-) Approvals: JanZerebecki: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/specials/SpecialRunJobs.php b/includes/specials/SpecialRunJobs.php index 2312f76..ce5533f 100644 --- a/includes/specials/SpecialRunJobs.php +++ b/includes/specials/SpecialRunJobs.php @@ -94,8 +94,11 @@ if ( strpos( $errstr, 'Cannot modify header information' ) !== false ) { return true; // bug T115413 } - // Delegate unhandled errors to the default handlers - return false; + // Delegate unhandled errors to the default MediaWiki handler + // so that fatal errors get proper logging (T89169) + return call_user_func_array( + 'MWExceptionHandler::handleError', func_get_args() + ); } ); } -- To view, visit https://gerrit.wikimedia.org/r/283511 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I52ef544fa18351bf310b04b17ab4e0239020fe20 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: BryanDavis Gerrit-Reviewer: Aaron Schulz Gerrit-Reviewer: BryanDavis Gerrit-Reviewer: Florianschmidtwelzow Gerrit-Reviewer: Hoo man Gerrit-Reviewer: JanZerebecki 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] Only call getData() if the right type of Action is used - change (mediawiki...CirrusSearch)
EBernhardson has uploaded a new change for review. https://gerrit.wikimedia.org/r/283561 Change subject: Only call getData() if the right type of Action is used .. Only call getData() if the right type of Action is used Bug: T132625 Change-Id: I0b46e315d9c92df29cf395751d7281c67f1e293c --- M includes/DataSender.php 1 file changed, 5 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch refs/changes/61/283561/1 diff --git a/includes/DataSender.php b/includes/DataSender.php index a358012..49a0457 100644 --- a/includes/DataSender.php +++ b/includes/DataSender.php @@ -355,7 +355,11 @@ } elseif ( $logCallback ) { // This is generally not an error but we should // log it to see how many we get - $id = $bulkResponse->getAction()->getData()->getId(); + $action = $bulkResponse->getAction(); + $id = 'missing'; + if ( $action instanceof \Elastica\Bulk\Action\AbstractDocument ) { + $id = $$action->getData()->getId(); + } call_user_func( $logCallback, $id ); } } -- To view, visit https://gerrit.wikimedia.org/r/283561 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0b46e315d9c92df29cf395751d7281c67f1e293c 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] Add script to run etsy/phan from in vagrant - change (mediawiki...CirrusSearch)
EBernhardson has uploaded a new change for review. https://gerrit.wikimedia.org/r/283560 Change subject: Add script to run etsy/phan from in vagrant .. Add script to run etsy/phan from in vagrant Bug: T132625 Change-Id: Ibc09ec10b97ac8447875ec6036690db13b61fe5c --- A scripts/phan.stubs.php A scripts/run-phan.sh 2 files changed, 83 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch refs/changes/60/283560/1 diff --git a/scripts/phan.stubs.php b/scripts/phan.stubs.php new file mode 100644 index 000..8088c1d --- /dev/null +++ b/scripts/phan.stubs.php @@ -0,0 +1,14 @@ + /dev/null; then + echo "Didn't find php7.0, installing..." + # Install the base php7.0 + if [ ! -f /etc/apt/sources.list.d/ondrej-php-trusty.list]; then + sudo add-apt-repository ppa:ondrej/php + fi + sudo apt-get update + sudo apt-get install php7.0-cli php7.0-bz2 php7.0-dev php7.0-json php7.0-mbstring \ + php7.0-sqlite3 php7.0-xml php7.0-zip + # Install the php-ast extension + git clone https://github.com/nikic/php-ast.git /tmp/php-ast.$$ + pushd /tmp/php-ast.$$ + phpize7.0 + make install + sudo cp modules/ast.so /usr/lib/php/20151012/ + echo "extension=ast.so" | sudo tee /etc/php/7.0/cli/conf.d/20-ast.ini > /dev/null + popd + rm -rf /tmp/php-ast.$$ +fi + +if [ ! -d $PHAN_DIR ]; then + echo "Didn't find phan, installing..." + git clone https://github.com/etsy/phan.git $PHAN_DIR + pushd $PHAN_DIR + php7.0 $(which composer) install + popd +fi + +echo "Collecting files to run phan against..." +ALL_DIRS="" +EXCLUDE="" +for i in $CIRRUS; do + ALL_DIRS="$ALL_DIRS $MW_PREFIX/$i" +done +for i in $DEPS; do + EXCLUDE="$EXCLUDE,$MW_PREFIX/$i" + ALL_DIRS="$ALL_DIRS $MW_PREFIX/$i" +done +# Strip leading comma +EXCLUDE=${EXCLUDE:1} + +# Build list of files +echo "Sourcing files from: $ALL_DIRS" +PHAN_IN=/tmp/phan.in.$$ +find $ALL_DIRS -iname '*.php' > $PHAN_IN +echo "/vagrant/mediawiki/extensions/CirrusSearch/scripts/phan.stubs.php" >> $PHAN_IN +# Run phan +echo "Running phan..." +echo "Parsing but not analyzing: $EXCLUDE" +echo "Number of files to handle: " $(wc -l < $PHAN_IN) +php7.0 $PHAN_DIR/phan -f $PHAN_IN -3 $EXCLUDE -o /tmp/phan.out -p +rm $PHAN_IN +echo +echo "Done. Results are in /tmp/phan.out" + -- To view, visit https://gerrit.wikimedia.org/r/283560 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibc09ec10b97ac8447875ec6036690db13b61fe5c 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] Make sure the Config instance really has a getElement method - change (mediawiki...CirrusSearch)
EBernhardson has uploaded a new change for review. https://gerrit.wikimedia.org/r/283562 Change subject: Make sure the Config instance really has a getElement method .. Make sure the Config instance really has a getElement method Bug: T132625 Change-Id: I3a1afd2488f34365681d2a7d826332b6bd55762f --- M includes/Maintenance/Maintenance.php 1 file changed, 9 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch refs/changes/62/283562/1 diff --git a/includes/Maintenance/Maintenance.php b/includes/Maintenance/Maintenance.php index a245782..b6040a2 100644 --- a/includes/Maintenance/Maintenance.php +++ b/includes/Maintenance/Maintenance.php @@ -43,10 +43,16 @@ $config = MediaWikiServices::getInstance() ->getConfigFactory() ->makeConfig( 'CirrusSearch' ); - if (!$config->getElement( 'CirrusSearchClusters', $cluster ) ) { - $this->error( 'Unknown cluster.', 1 ); + if ( $config instanceof SearchConfig ) { + if (!$config->getElement( 'CirrusSearchClusters', $cluster ) ) { + $this->error( 'Unknown cluster.', 1 ); + } + return Connection::getPool( $config, $cluster ); + } else { + // We shouldn't ever get here ... but the makeConfig type signature returns the parent class of SearchConfig + // so just being extra careful... + throw new \RuntimeException( 'Expected instanceof CirrusSearch\SearchConfig, but received ' . get_class( $config ) ); } - return Connection::getPool( $config, $cluster ); } if ( $this->connection === null ) { $config = MediaWikiServices::getInstance() -- To view, visit https://gerrit.wikimedia.org/r/283562 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3a1afd2488f34365681d2a7d826332b6bd55762f 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] Add @suppress annotations for unfixable static analysis - change (mediawiki...CirrusSearch)
EBernhardson has uploaded a new change for review. https://gerrit.wikimedia.org/r/283563 Change subject: Add @suppress annotations for unfixable static analysis .. Add @suppress annotations for unfixable static analysis Some bits of the static anlaysis arn't fixable either due to the annotations set in vendor libraries, or due to the lack of generic ways to type the return value based on a value passed in. Change-Id: Ib8777c246ba158265ef383f90723bf4585bc390e --- M includes/ElasticsearchIntermediary.php M includes/LanguageDetector/ElasticSearch.php M includes/Maintenance/Maintenance.php M includes/Search/SearchTextQueryBuilders.php M includes/Searcher.php M includes/UserTesting.php M maintenance/updateOneSearchIndexConfig.php M maintenance/updateSearchIndexConfig.php M maintenance/updateSuggesterIndex.php 9 files changed, 69 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch refs/changes/63/283563/1 diff --git a/includes/ElasticsearchIntermediary.php b/includes/ElasticsearchIntermediary.php index 12deda7..b798911 100644 --- a/includes/ElasticsearchIntermediary.php +++ b/includes/ElasticsearchIntermediary.php @@ -521,6 +521,8 @@ * Extract an error message from an exception thrown by Elastica. * @param \Elastica\Exception\ExceptionInterface $exception exception from which to extract a message * @return string message from the exception +* @suppress PhanUndeclaredMethod ExceptionInterface doesn't delcare any methods, +* so we have to suppress those warnings. */ public static function extractMessage( \Elastica\Exception\ExceptionInterface $exception ) { if ( !( $exception instanceof ResponseException ) ) { diff --git a/includes/LanguageDetector/ElasticSearch.php b/includes/LanguageDetector/ElasticSearch.php index 7d3759f..196b4f2 100644 --- a/includes/LanguageDetector/ElasticSearch.php +++ b/includes/LanguageDetector/ElasticSearch.php @@ -18,9 +18,8 @@ * @return string|null Preferred language, or null if none found */ public function detect( CirrusSearch $cirrus, $text ) { - $client = $cirrus->getConnection()->getClient(); try { - $response = $client->request( "_langdetect", Request::POST, $text ); + $response = $this->request( $text ); } catch ( ResponseException $e ) { // This happens when language detection is not configured LoggerFactory::getInstance( 'CirrusSearch' )->warning( @@ -48,4 +47,15 @@ } return null; } + + /** +* @param string $text +* @return \Elastica\Response +* @suppress PhanTypeMismatchArgument The third parameter is typically +* an array, but langdetect is special and takes a string instead. +*/ + private function request( $text ) { + $client = $cirrus->getConnection()->getClient(); + return $client->request( "_langdetect", Request::POST, $text ); + } } diff --git a/includes/Maintenance/Maintenance.php b/includes/Maintenance/Maintenance.php index b6040a2..ee82fef 100644 --- a/includes/Maintenance/Maintenance.php +++ b/includes/Maintenance/Maintenance.php @@ -120,4 +120,16 @@ public function error( $err, $die = 0 ) { parent::error( $err, $die ); } + + /** +* Tiny method to restrict phan suppression to this method call. +* +* @param \Elastica\Exception\ExceptionInterface $e +* @return string +* @suppress PhanUndeclaredMethod ExceptionInterface has no methods +*/ + protected function getExceptionTraceAsString( \Elastica\Exception\ExceptionInterface $e ) { + return $e->getTraceAsString(); + } + } diff --git a/includes/Search/SearchTextQueryBuilders.php b/includes/Search/SearchTextQueryBuilders.php index 4edbb4a..f620d8e 100644 --- a/includes/Search/SearchTextQueryBuilders.php +++ b/includes/Search/SearchTextQueryBuilders.php @@ -393,6 +393,9 @@ * @param string $queryString the query * @param array $profile the profile used by the common terms query * @return \Elastica\Query\Common the common terms query. +* @suppress PhanTypeMismatchArgument minimum_should_match can be applied +* for low and high frequency terms, but the type signature hasn't been +* updated to match */ private function buildOneCommonTermsClause( array $boostedField, $queryString, array $profile ) { $common = new \Elastica\Query\Common( $boostedField['field'], $queryString, $profile['cutoff_freq'] ); diff --git a/includes/Searcher.php b/includes/Searcher.php index b20bbeb..502ebe7 100644 --- a/includes/Searcher.php +++ b/
[MediaWiki-commits] [Gerrit] Annotate SearchResult and related classes - change (mediawiki...CirrusSearch)
EBernhardson has uploaded a new change for review. https://gerrit.wikimedia.org/r/283558 Change subject: Annotate SearchResult and related classes .. Annotate SearchResult and related classes Bug: T132625 Change-Id: Ifcf08869717ce9b9bb169ea2e52bb99938565e5b --- M includes/Search/Result.php M includes/Search/ResultSet.php M includes/Search/ResultsType.php 3 files changed, 157 insertions(+), 34 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch refs/changes/58/283558/1 diff --git a/includes/Search/Result.php b/includes/Search/Result.php index 4908f5b..5f586f4 100644 --- a/includes/Search/Result.php +++ b/includes/Search/Result.php @@ -29,17 +29,37 @@ * http://www.gnu.org/copyleft/gpl.html */ class Result extends SearchResult { + /** @var string */ private $titleSnippet = ''; - private $redirectTitle = null, $redirectSnipppet = ''; - private $sectionTitle = null, $sectionSnippet = ''; + /** @var Title|null */ + private $redirectTitle = null; + /** @var string */ + private $redirectSnipppet = ''; + /** @var Title|null */ + private $sectionTitle = null; + /** @var string */ + private $sectionSnippet = ''; + /** @var string */ private $categorySnippet = ''; - private $textSnippet = '', $isFileMatch = false; - private $interwiki = '', $interwikiNamespace = ''; + /** @var string */ + private $textSnippet = ''; + /** @var bool */ + private $isFileMatch = false; + /* @var string */ + private $interwiki = ''; + /** @var string */ + private $interwikiNamespace = ''; + /** @var int */ private $wordCount; + /** @var int */ private $byteSize; + /** @var string */ private $timestamp; + /** @varstring */ private $docId; + /** @var float */ private $score; + /** @var array */ private $explanation; /** @@ -47,7 +67,7 @@ * @param \Elastica\ResultSet $results containing all search results * @param \Elastica\Result $result containing the given search result * @param string $interwiki Interwiki prefix, if any -* @param \Elastic\Result $result containing information about the result this class should represent +* @param \Elastica\Result $result containing information about the result this class should represent */ public function __construct( $results, $result, $interwiki = '' ) { if ( $interwiki ) { @@ -178,8 +198,8 @@ /** * Build the redirect title from the highlighted redirect snippet. * @param string $snippet Highlighted redirect snippet -* @param array[] $redirects Array of redirects stored as arrays with 'title' and 'namespace' keys -* @return Title object representing the redirect +* @param array[]|null $redirects Array of redirects stored as arrays with 'title' and 'namespace' keys +* @return Title|null object representing the redirect */ private function findRedirectTitle( $snippet, $redirects ) { $title = $this->stripHighlighting( $snippet ); @@ -261,9 +281,10 @@ } /** +* @param array * @return Title|null */ - public function getTextSnippet( $terms ) { + public function getTextSnippet( array $terms ) { return $this->textSnippet; } @@ -331,7 +352,7 @@ } /** -* @return int +* @return string */ public function getDocId() { return $this->docId; diff --git a/includes/Search/ResultSet.php b/includes/Search/ResultSet.php index d0b5880..533d929 100644 --- a/includes/Search/ResultSet.php +++ b/includes/Search/ResultSet.php @@ -28,13 +28,65 @@ * @var \Elastica\ResultSet */ private $result; - private $hits, $totalHits, $suggestionQuery, $suggestionSnippet; + + /** +* @var int +*/ + private $hits; + + /** +* @var int +*/ + private $totalHits; + + /** +* @var string|null +*/ + private $suggestionQuery; + + /** +* @var string +*/ + private $suggestionSnippet; + + /** +* @var bool +*/ private $searchContainedSyntax; - private $interwikiPrefix,$interwikiResults; + + /** +* @var string +*/ + private $interwikiPrefix; + + /** +* @var array +*/ + private $interwikiResults; + + /** +* @var string|null +*/ private $rewrittenQuery; + + /** +* @var string|null +*/ + private $rewrittenQuerySnippet; + + /** +* @var \Iterator|null +*/ private $swappedResul
[MediaWiki-commits] [Gerrit] Fix missing variable in RescoreBuilder - change (mediawiki...CirrusSearch)
EBernhardson has uploaded a new change for review. https://gerrit.wikimedia.org/r/283559 Change subject: Fix missing variable in RescoreBuilder .. Fix missing variable in RescoreBuilder Also adds/cleans up a couple annotations. Bug: T132625 Change-Id: I722091f26f286b59e6dc069ff4b6d82027314e2c --- M includes/Search/RescoreBuilders.php 1 file changed, 12 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch refs/changes/59/283559/1 diff --git a/includes/Search/RescoreBuilders.php b/includes/Search/RescoreBuilders.php index 5ef4643..fc1af89 100644 --- a/includes/Search/RescoreBuilders.php +++ b/includes/Search/RescoreBuilders.php @@ -86,7 +86,7 @@ /** * builds the 'query' attribute by reading type -* @return array the rescore query +* @return FunctionScore|null the rescore query */ private function buildRescoreQuery( $rescoreDef ) { switch( $rescoreDef['type'] ) { @@ -284,6 +284,13 @@ private $size = 0; + /** +* @param string $functionType +* @param array|float $functionParams +* @param AbstractFilter|null $filter +* @param float|null $weight +* @return $this +*/ public function addFunction( $functionType, $functionParams, AbstractFilter $filter = null, $weight = null ) { $this->size++; return parent::addFunction( $functionType, $functionParams, $filter, $weight ); @@ -621,6 +628,9 @@ if( $this->impact == 0 ) { return; } + // @TODO Is this correct? + $formula = $this->getScript(); + $functionScore->addScriptScoreFunction( new \Elastica\Script( $formula, null, 'expression' ), null, $this->weight ); } @@ -790,7 +800,7 @@ * Build a weighted geometric mean using a logarithmic arithmetic mean. * exp(w1*ln(value1)+w2*ln(value2) / (w1+w2)) * NOTE: We need to use an epsilon value in case value is 0. -* @return the script +* @return string|null the script */ public function getScript() { $formula = "pow("; -- To view, visit https://gerrit.wikimedia.org/r/283559 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I722091f26f286b59e6dc069ff4b6d82027314e2c 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] Standardize on catching/passing Elasticas ExceptionInterface - change (mediawiki...CirrusSearch)
EBernhardson has uploaded a new change for review. https://gerrit.wikimedia.org/r/283557 Change subject: Standardize on catching/passing Elasticas ExceptionInterface .. Standardize on catching/passing Elasticas ExceptionInterface We catch elastica exceptions in various places and pass them around, but were not consistent on if we typed on Exception or ExceptionInterface. This standardizes to ExceptionInterface. There is one downside of this patch ... Elastica's ExceptionInterface does not implement any methods. This means we can't type check any method calls against the objects...Sadly the newest versions of elastica don't rectify this situation. Bug: T132625 Change-Id: I0399bb8919d08c5b5fb7a15e3e62a35156ff74f3 --- M includes/ElasticsearchIntermediary.php M includes/Maintenance/Reindexer.php 2 files changed, 6 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch refs/changes/57/283557/1 diff --git a/includes/ElasticsearchIntermediary.php b/includes/ElasticsearchIntermediary.php index 3541cef..12deda7 100644 --- a/includes/ElasticsearchIntermediary.php +++ b/includes/ElasticsearchIntermediary.php @@ -451,7 +451,7 @@ * @param \Elastica\Exception\ExceptionInterface|null $exception if the request failed * @return Status representing a backend failure */ - public function failure( $exception = null ) { + public function failure( \Elastica\Exception\ExceptionInterface $exception = null ) { $context = $this->logContext; $context['took'] = $this->finishRequest(); list( $status, $message ) = $this->extractMessageAndStatus( $exception ); @@ -519,10 +519,10 @@ /** * Extract an error message from an exception thrown by Elastica. -* @param Exception $exception exception from which to extract a message +* @param \Elastica\Exception\ExceptionInterface $exception exception from which to extract a message * @return string message from the exception */ - public static function extractMessage( \Exception $exception ) { + public static function extractMessage( \Elastica\Exception\ExceptionInterface $exception ) { if ( !( $exception instanceof ResponseException ) ) { return $exception->getMessage(); } @@ -748,10 +748,10 @@ } /** -* @param \Exception $exception +* @param \Elastica\Exception\ExceptionInterface|null $exception * @return array Two elements, first is Status object, second is string. */ - private function extractMessageAndStatus( \Exception $exception ) { + private function extractMessageAndStatus( \Elastica\Exception\ExceptionInterface $exception ) { if ( !$exception ) { return array( Status::newFatal( 'cirrussearch-backend-error' ), '' ); } diff --git a/includes/Maintenance/Reindexer.php b/includes/Maintenance/Reindexer.php index 0d1e023..353c9f5 100644 --- a/includes/Maintenance/Reindexer.php +++ b/includes/Maintenance/Reindexer.php @@ -401,7 +401,7 @@ * @param string $messagePrefix * @param string $description */ - private function sleepOnRetry(\Exception $e, $errors, $messagePrefix, $description ) { + private function sleepOnRetry( ExceptionInterface $e, $errors, $messagePrefix, $description ) { $type = get_class( $e ); $seconds = Util::backoffDelay( $errors ); $message = ElasticsearchIntermediary::extractMessage( $e ); -- To view, visit https://gerrit.wikimedia.org/r/283557 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0399bb8919d08c5b5fb7a15e3e62a35156ff74f3 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] Add/update a variety of annotations to be correct - change (mediawiki...CirrusSearch)
EBernhardson has uploaded a new change for review. https://gerrit.wikimedia.org/r/283556 Change subject: Add/update a variety of annotations to be correct .. Add/update a variety of annotations to be correct Phan identified a variety of type signatures / annotations that were either incorrect or under-specified. Patch contains no code changes (except one method made static that was only called statically), just changes annotations. Bug: T132625 Change-Id: I508bccd70c24fc1ef3865c227f6abefbc1439690 --- M includes/CirrusSearch.php M includes/InterwikiSearcher.php M includes/Maintenance/ChunkBuilder.php M includes/Maintenance/Maintenance.php M includes/Maintenance/OrderedStreamingForkController.php M includes/Maintenance/Reindexer.php M includes/Maintenance/Validators/ReplicaRangeValidator.php M includes/Search/SearchContext.php M includes/Search/SearchTextQueryBuilders.php M includes/SearchConfig.php M maintenance/forceSearchIndex.php 11 files changed, 65 insertions(+), 25 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch refs/changes/56/283556/1 diff --git a/includes/CirrusSearch.php b/includes/CirrusSearch.php index 2c65a43..9870fc2 100644 --- a/includes/CirrusSearch.php +++ b/includes/CirrusSearch.php @@ -158,7 +158,7 @@ /** * Check whether we want to try another language. * @param string $term Search term -* @return array|null Array of (interwiki, dbname) for another wiki to try, or null +* @return string[]|null Array of (interwiki, dbname) for another wiki to try, or null */ private function hasSecondaryLanguage( $term ) { if ( empty( $GLOBALS['wgCirrusSearchLanguageToWikiMap'] ) || @@ -223,9 +223,9 @@ /** * @param string $lang Language code to find wiki for -* @return string|null The wiki related to specified language code +* @return string[]|null Array of (interwiki, dbname) for wiki related to specified language code */ - private function wikiForLanguage( $lang ) { + private static function wikiForLanguage( $lang ) { if ( empty( $GLOBALS['wgCirrusSearchLanguageToWikiMap'][$lang] ) ) { return null; } @@ -615,6 +615,8 @@ * Override variants function because we always do variants * in the backend. * @see SearchEngine::completionSearchWithVariants() +* @param string $search +* @return SearchSuggestionSet */ public function completionSearchWithVariants( $search ) { return $this->completionSearch( $search ); diff --git a/includes/InterwikiSearcher.php b/includes/InterwikiSearcher.php index b01bcf8..e2094bc 100644 --- a/includes/InterwikiSearcher.php +++ b/includes/InterwikiSearcher.php @@ -56,7 +56,7 @@ /** * Fetch search results, from caches, if there's any * @param string $term Search term to look for -* @return Result +* @return Result|null */ public function getInterwikiResults( $term ) { @@ -92,7 +92,7 @@ /** * Get the index basename for a given interwiki prefix, if one is defined. * @param string $interwiki -* @return string +* @return string|null */ public static function getIndexForInterwiki( $interwiki ) { // These settings should be common for all wikis, so globals diff --git a/includes/Maintenance/ChunkBuilder.php b/includes/Maintenance/ChunkBuilder.php index d24df34..f25600e 100644 --- a/includes/Maintenance/ChunkBuilder.php +++ b/includes/Maintenance/ChunkBuilder.php @@ -25,7 +25,10 @@ /** * @param string $self Name of maintenance script * @param array $options -* @param int $buildChunks +* @param string|int $buildChunks If specified as a number then chunks no +* larger than that size are spat out. If specified as a number followed +* by the word "total" without a space between them then that many chunks +* will be spat out sized to cover the entire wiki. * @param int $from * @param int $to */ diff --git a/includes/Maintenance/Maintenance.php b/includes/Maintenance/Maintenance.php index aa8562c..a245782 100644 --- a/includes/Maintenance/Maintenance.php +++ b/includes/Maintenance/Maintenance.php @@ -95,6 +95,10 @@ Maintenance::$indent = substr( Maintenance::$indent, 1 ); } + /** +* @param string $message +* @param string|null $channel +*/ public function output( $message, $channel = null ) { parent::output( $message ); } @@ -103,6 +107,10 @@ $this->output( Maintenance::$indent . $message ); } + /** +* @param string $err +* @param int $die +
[MediaWiki-commits] [Gerrit] SpecialRunJobs: delegate error handling to MWExceptionHandler - change (mediawiki/core)
JanZerebecki has uploaded a new change for review. https://gerrit.wikimedia.org/r/283555 Change subject: SpecialRunJobs: delegate error handling to MWExceptionHandler .. SpecialRunJobs: delegate error handling to MWExceptionHandler Make the custom error handler that is installed to suppress Cookie header errors delegate unhandled errors to the default MediaWiki error handler. This will preserve fatal error logging for errors raised by jobs. Bug: T89169 Change-Id: I52ef544fa18351bf310b04b17ab4e0239020fe20 --- M includes/specials/SpecialRunJobs.php 1 file changed, 5 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/55/283555/1 diff --git a/includes/specials/SpecialRunJobs.php b/includes/specials/SpecialRunJobs.php index 2312f76..ce5533f 100644 --- a/includes/specials/SpecialRunJobs.php +++ b/includes/specials/SpecialRunJobs.php @@ -94,8 +94,11 @@ if ( strpos( $errstr, 'Cannot modify header information' ) !== false ) { return true; // bug T115413 } - // Delegate unhandled errors to the default handlers - return false; + // Delegate unhandled errors to the default MediaWiki handler + // so that fatal errors get proper logging (T89169) + return call_user_func_array( + 'MWExceptionHandler::handleError', func_get_args() + ); } ); } -- To view, visit https://gerrit.wikimedia.org/r/283555 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I52ef544fa18351bf310b04b17ab4e0239020fe20 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.27.0-wmf.21 Gerrit-Owner: JanZerebecki Gerrit-Reviewer: BryanDavis ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] lead: set ssh::server::disable_nist_kex: false - change (operations/puppet)
Dzahn has submitted this change and it was merged. Change subject: lead: set ssh::server::disable_nist_kex: false .. lead: set ssh::server::disable_nist_kex: false We think this is causing the problems with jgit trying to replicate git repos over here. We are getting "Algorithm negotiation fail". Change-Id: I0fd6579d9c4e0563f388fedf8f0cacc89c0ebd1c --- M hieradata/hosts/lead.yaml 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/hieradata/hosts/lead.yaml b/hieradata/hosts/lead.yaml index 7df9494..6f3da22 100644 --- a/hieradata/hosts/lead.yaml +++ b/hieradata/hosts/lead.yaml @@ -1,2 +1,3 @@ admin::groups: - gerrit-root +ssh::server::disable_nist_kex: false -- To view, visit https://gerrit.wikimedia.org/r/283554 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0fd6579d9c4e0563f388fedf8f0cacc89c0ebd1c Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn Gerrit-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] lead: set ssh::server::disable_nist_kex: false - change (operations/puppet)
Dzahn has uploaded a new change for review. https://gerrit.wikimedia.org/r/283554 Change subject: lead: set ssh::server::disable_nist_kex: false .. lead: set ssh::server::disable_nist_kex: false We think this is causing us problems with jgit trying to replicating git repos over here. We are getting "Algorithm negotiation fail". Change-Id: I0fd6579d9c4e0563f388fedf8f0cacc89c0ebd1c --- M hieradata/hosts/lead.yaml 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/54/283554/1 diff --git a/hieradata/hosts/lead.yaml b/hieradata/hosts/lead.yaml index 7df9494..6f3da22 100644 --- a/hieradata/hosts/lead.yaml +++ b/hieradata/hosts/lead.yaml @@ -1,2 +1,3 @@ admin::groups: - gerrit-root +ssh::server::disable_nist_kex: false -- To view, visit https://gerrit.wikimedia.org/r/283554 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0fd6579d9c4e0563f388fedf8f0cacc89c0ebd1c 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] Testing links to exercise secret amounts - change (mediawiki/vagrant)
Awight has uploaded a new change for review. https://gerrit.wikimedia.org/r/283553 Change subject: Testing links to exercise secret amounts .. Testing links to exercise secret amounts These amounts will trigger various responses from the iDEAL endpoint simulator for API calls to the test environment. Bug: T131904 Change-Id: I537553f818c1f76b449cad08e91cc102e425355b --- M puppet/modules/payments/files/Main_Page.wiki 1 file changed, 9 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant refs/changes/53/283553/1 diff --git a/puppet/modules/payments/files/Main_Page.wiki b/puppet/modules/payments/files/Main_Page.wiki index 5c69ed4..718c2f8 100644 --- a/puppet/modules/payments/files/Main_Page.wiki +++ b/puppet/modules/payments/files/Main_Page.wiki @@ -51,7 +51,7 @@ ** [{{fullurl:Special:AstropayGateway|appeal=JimmyQuote&payment_method=cash&recurring=&uselang=es&language=es¤cy_code=COP&amount=5000&country=CO&ffname=astropay-co}} Cash in CO, Spanish, COP] ** [{{fullurl:Special:AstropayGateway|appeal=JimmyQuote&payment_method=cash&recurring=&uselang=es&language=es¤cy_code=UYU&amount=5000&country=UY&ffname=astropay-uy}} Cash in UY, Spanish, UYU] -* GlobalCollect +* Ingenico ** [{{fullurl:Special:GlobalCollectGateway|appeal=JimmyQuote&ffname=cc-vmad&payment_method=cc&recurring=&uselang=en&language=en¤cy_code=USD&amount=10&country=US}} Credit card in US, English, USD] ** [{{fullurl:Special:GlobalCollectGateway|appeal=JimmyQuote&ffname=cc-vmad&payment_method=cc&recurring=&uselang=en&language=en¤cy_code=GBP&country=GB&amount=2.01}} Credit card in GB, English, GBP] ** [{{fullurl:Special:GlobalCollectGateway|appeal=JimmyQuote&ffname=rcc-vmad&payment_method=cc&recurring=1&uselang=en&language=en¤cy_code=EUR&country=US&amount=2.01}} Recurring credit card in US, English, EUR] @@ -59,9 +59,16 @@ ** [{{fullurl:Special:GlobalCollectGateway|appeal=JimmyQuote&ffname=cc-vmad&payment_method=cc&recurring=&uselang=he&language=he¤cy_code=ILS&country=IL&amount=20.01}} Credit card in IL, Hebrew, ILS] ** [{{fullurl:Special:GlobalCollectGateway|appeal=JimmyQuote&recurring=&payment_method=obt&utm_medium=Waystogive&utm_campaign=C11_Waystogive&utm_key=&language=en&country=AU&returnto=Thank_You%2Fen&amountGiven=¤cy_code=AUD&frequency=onetime&amount=3&uselang=en}} Online bank transfer in AU, English, AUD] ** [{{fullurl:Special:GlobalCollectGateway|country=CN&amount=30¤cy_code=CNY&ffname=ew-alipay}} Alipay e-wallet in CN, English, CNY] -** [{{fullurl:Special:GlobalCollectGateway|appeal=JimmyQuote&ffname=rtbt-ideal-noadd&recurring=&payment_method=rtbt&payment_submethod=rtbt_ideal&utm_source=Waystogive.default%7Edefault%7Edefault%7Edefault%7Econtrol.rtbt.rtbt_ideal&utm_medium=Waystogive&utm_campaign=C11_Waystogive&utm_key=&language=en&country=NL&returnto=Thank_You%2Fen&amountGiven=¤cy_code=EUR&frequency=onetime&amount=3&uselang=en}} Real-time bank transfer (IDEAL) in NL, English, EUR] ** [{{fullurl:Special:GlobalCollectGateway|appeal=JimmyQuote&recurring=&payment_method=bt&utm_medium=Waystogive&utm_campaign=C11_Waystogive&utm_key=&language=en&country=NL&returnto=Thank_You%2Fen&amountGiven=¤cy_code=EUR&frequency=onetime&amount=3&uselang=en}} Bank Transfer in NL, English, EUR] +* Ingenico - iDEAL +** [{{fullurl:Special:GlobalCollectGateway|appeal=JimmyQuote&ffname=rtbt-ideal-noadd&recurring=&payment_method=rtbt&payment_submethod=rtbt_ideal&utm_source=Waystogive.default%7Edefault%7Edefault%7Edefault%7Econtrol.rtbt.rtbt_ideal&utm_medium=Waystogive&utm_campaign=C11_Waystogive&utm_key=&language=en&country=NL&returnto=Thank_You%2Fen&amountGiven=¤cy_code=EUR&frequency=onetime&amount=1&uselang=en}} Real-time bank transfer (IDEAL) in NL, English, EUR, success] +** [{{fullurl:Special:GlobalCollectGateway|appeal=JimmyQuote&ffname=rtbt-ideal-noadd&recurring=&payment_method=rtbt&payment_submethod=rtbt_ideal&utm_source=Waystogive.default%7Edefault%7Edefault%7Edefault%7Econtrol.rtbt.rtbt_ideal&utm_medium=Waystogive&utm_campaign=C11_Waystogive&utm_key=&language=en&country=NL&returnto=Thank_You%2Fen&amountGiven=¤cy_code=EUR&frequency=onetime&amount=2&uselang=en}} Real-time bank transfer (IDEAL) in NL, English, EUR, cancelled] +** [{{fullurl:Special:GlobalCollectGateway|appeal=JimmyQuote&ffname=rtbt-ideal-noadd&recurring=&payment_method=rtbt&payment_submethod=rtbt_ideal&utm_source=Waystogive.default%7Edefault%7Edefault%7Edefault%7Econtrol.rtbt.rtbt_ideal&utm_medium=Waystogive&utm_campaign=C11_Waystogive&utm_key=&language=en&country=NL&returnto=Thank_You%2Fen&amountGiven=¤cy_code=EUR&frequency=onetime&amount=3&uselang=en}} Real-time bank transfer (IDEAL) in NL, English, EUR, expired] +** [{{fullurl:Special:GlobalCollectGateway|appeal=JimmyQuote&ffname=rtbt-ideal-noadd&recurring=&payment_method=rtbt&payment_submethod=rtbt_ideal&utm_source=Waystogive.default%7Edefault%7Edefault%7Edefault%7Econtrol.rtbt.rtbt_ideal
[MediaWiki-commits] [Gerrit] CRM-18193 do not pass log_date_id to detail report if the lo... - change (wikimedia...civicrm)
jenkins-bot has submitted this change and it was merged. Change subject: CRM-18193 do not pass log_date_id to detail report if the log_conn_id is sufficient .. CRM-18193 do not pass log_date_id to detail report if the log_conn_id is sufficient Prior to CRM-18193 the connection was estimated using the a log_date_range + log_conn_id. After CRM-18193 the connection_id is unique and the log_date is not required (and could make the result less accurate Change-Id: I72c8cf254720654003154702b45e7f0a0b8aabe5 --- M CRM/Logging/Differ.php M CRM/Report/Form/Contact/LoggingSummary.php 2 files changed, 33 insertions(+), 14 deletions(-) Approvals: Ejegg: Looks good to me, approved jenkins-bot: Verified diff --git a/CRM/Logging/Differ.php b/CRM/Logging/Differ.php index b6f32f8..13b7227 100644 --- a/CRM/Logging/Differ.php +++ b/CRM/Logging/Differ.php @@ -190,7 +190,7 @@ $changedDAO = CRM_Core_DAO::executeQuery($changedSQL, $params); while ($changedDAO->fetch()) { - if (empty($this->log_date) && !$this->checkLogCanBeUsedWithNoLogDate($changedDAO->log_date)) { + if (empty($this->log_date) && !self::checkLogCanBeUsedWithNoLogDate($changedDAO->log_date)) { throw new CRM_Core_Exception('The connection date must be passed in to disambiguate this logging entry per CRM-18193'); } $changed = $changedDAO->toArray(); @@ -459,7 +459,8 @@ * @return bool * @throws \CiviCRM_API3_Exception */ - protected function checkLogCanBeUsedWithNoLogDate($change_date) { + public static function checkLogCanBeUsedWithNoLogDate($change_date) { + if (civicrm_api3('Setting', 'getvalue', array('name' => 'logging_all_tables_uniquid', 'group' => 'CiviCRM Preferences'))) { return TRUE; }; diff --git a/CRM/Report/Form/Contact/LoggingSummary.php b/CRM/Report/Form/Contact/LoggingSummary.php index baa454a..2001ecf 100644 --- a/CRM/Report/Form/Contact/LoggingSummary.php +++ b/CRM/Report/Form/Contact/LoggingSummary.php @@ -175,6 +175,13 @@ $newRows = array(); foreach ($rows as $key => &$row) { + $baseQueryCriteria = "reset=1&log_conn_id={$row['log_civicrm_entity_log_conn_id']}"; + if (!CRM_Logging_Differ::checkLogCanBeUsedWithNoLogDate($row['log_civicrm_entity_log_date'])) { +$baseQueryCriteria .= '&log_date=' . CRM_Utils_Date::isoToMysql($row['log_civicrm_entity_log_date']); + } + if ($this->cid) { +$baseQueryCriteria .= '&cid=' . $this->cid; + } if (!isset($isDeleted[$row['log_civicrm_entity_altered_contact_id']])) { $isDeleted[$row['log_civicrm_entity_altered_contact_id']] = CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_Contact', $row['log_civicrm_entity_altered_contact_id'], 'is_deleted') !== '0'; @@ -199,7 +206,7 @@ } if ('Contact' == CRM_Utils_Array::value('log_type', $this->_logTables[$row['log_civicrm_entity_log_type']]) && -CRM_Utils_Array::value('log_civicrm_entity_log_action', $row) == 'Insert' +CRM_Utils_Array::value('log_civicrm_entity_log_action', $row) == ts('Insert') ) { $row['log_civicrm_entity_log_action'] = ts('Update'); } @@ -217,17 +224,7 @@ $date = CRM_Utils_Date::isoToMysql($row['log_civicrm_entity_log_date']); if ('Update' == CRM_Utils_Array::value('log_civicrm_entity_log_action', $row)) { -$q = "reset=1&log_conn_id={$row['log_civicrm_entity_log_conn_id']}&log_date=" . $date; -if ($this->cid) { - $q .= '&cid=' . $this->cid; -} -$q .= (!empty($row['log_civicrm_entity_altered_contact'])) ? '&alteredName=' . $row['log_civicrm_entity_altered_contact'] : ''; -$q .= (!empty($row['altered_by_contact_display_name'])) ? '&alteredBy=' . $row['altered_by_contact_display_name'] : ''; -$q .= (!empty($row['log_civicrm_entity_log_user_id'])) ? '&alteredById=' . $row['log_civicrm_entity_log_user_id'] : ''; - -$url1 = CRM_Report_Utils_Report::getNextUrl('logging/contact/detail', "{$q}&snippet=4§ion=2&layout=overlay", FALSE, TRUE); -$url2 = CRM_Report_Utils_Report::getNextUrl('logging/contact/detail', "{$q}§ion=2", FALSE, TRUE); -$row['log_civicrm_entity_log_action'] = " " . ts('Update') . ''; +$row = $this->addDetailReportLinksToRow($baseQueryCriteria, $row); } $key = $date . '_' . @@ -276,4 +273,25 @@ ON (entity_log_civireport.log_user_id = altered_by_contact_civireport.id)"; } + /** + * Add links & hovers to the detailed report. + * + * @param $baseQueryCriteria + * @param $row + * + * @return mixed + */ + protected function addDetailReportLinksToRow($baseQueryCriteria, $row) { +$q = $baseQueryCriteria; +$q .= (!empty($row['log_civicrm_entity_altered_contact'])) ? '&alteredName=' . $row['log_civicrm_entity_altered_contact'] : ''; +$q .= (!empty($row['altered_by_contact_display_name'])
[MediaWiki-commits] [Gerrit] [Hackathon] "Edit here" context button. - change (apps...wikipedia)
jenkins-bot has submitted this change and it was merged. Change subject: [Hackathon] "Edit here" context button. .. [Hackathon] "Edit here" context button. Bug: T119887 Change-Id: I54a2c68741851d81f4aa5ac25f7f91d4be309c31 --- M app/src/main/assets/bundle.js M app/src/main/java/org/wikipedia/editing/EditHandler.java M app/src/main/java/org/wikipedia/editing/EditSectionActivity.java M app/src/main/java/org/wikipedia/page/PageFragment.java M app/src/main/java/org/wikipedia/page/snippet/ShareHandler.java A app/src/main/res/drawable-hdpi/ic_mode_edit_white_24dp.png A app/src/main/res/drawable-mdpi/ic_mode_edit_white_24dp.png A app/src/main/res/drawable-xhdpi/ic_mode_edit_white_24dp.png A app/src/main/res/drawable-xxhdpi/ic_mode_edit_white_24dp.png A app/src/main/res/drawable-xxxhdpi/ic_mode_edit_white_24dp.png M app/src/main/res/layout/activity_edit_section.xml M app/src/main/res/menu/menu_text_select.xml M app/src/main/res/values-qq/strings.xml M app/src/main/res/values/strings.xml M www/js/sections.js 15 files changed, 101 insertions(+), 14 deletions(-) Approvals: Niedzielski: Looks good to me, approved jenkins-bot: Verified diff --git a/app/src/main/assets/bundle.js b/app/src/main/assets/bundle.js index 357e66e..cf0440a 100644 --- a/app/src/main/assets/bundle.js +++ b/app/src/main/assets/bundle.js @@ -422,7 +422,13 @@ if (text.length > 250) { text = text.substring(0, 249); } -bridge.sendMessage( "onGetTextSelection", { "purpose" : payload.purpose, "text" : text } ); +if (payload.purpose === "edit_here") { +var range = window.getSelection().getRangeAt(0); +var newRangeStart = Math.max(0, range.startOffset - 20); +range.setStart(range.startContainer, newRangeStart); +text = range.toString(); +} +bridge.sendMessage( "onGetTextSelection", { "purpose" : payload.purpose, "text" : text, "sectionID" : getCurrentSection() } ); }); bridge.registerListener( "displayLeadSection", function( payload ) { diff --git a/app/src/main/java/org/wikipedia/editing/EditHandler.java b/app/src/main/java/org/wikipedia/editing/EditHandler.java index e93dab0..9282265 100644 --- a/app/src/main/java/org/wikipedia/editing/EditHandler.java +++ b/app/src/main/java/org/wikipedia/editing/EditHandler.java @@ -2,6 +2,7 @@ import android.content.DialogInterface; import android.content.Intent; +import android.support.annotation.Nullable; import android.support.v7.app.AlertDialog; import org.json.JSONObject; import org.wikipedia.R; @@ -30,6 +31,18 @@ public void setPage(Page page) { this.currentPage = page; this.funnel = new ProtectedEditAttemptFunnel(WikipediaApp.getInstance(), page.getTitle().getSite()); +} + +public void startEditingSection(int sectionID, @Nullable String highlightText) { +Section section = currentPage.getSections().get(sectionID); +Intent intent = new Intent(fragment.getActivity(), EditSectionActivity.class); +intent.setAction(EditSectionActivity.ACTION_EDIT_SECTION); +intent.putExtra(EditSectionActivity.EXTRA_SECTION_ID, section.getId()); +intent.putExtra(EditSectionActivity.EXTRA_SECTION_HEADING, section.getHeading()); +intent.putExtra(EditSectionActivity.EXTRA_TITLE, currentPage.getTitle()); +intent.putExtra(EditSectionActivity.EXTRA_PAGE_PROPS, currentPage.getPageProperties()); +intent.putExtra(EditSectionActivity.EXTRA_HIGHLIGHT_TEXT, highlightText); +fragment.startActivityForResult(intent, PageActivity.ACTIVITY_REQUEST_EDIT_SECTION); } private void showUneditableDialog() { @@ -85,15 +98,7 @@ showUneditableDialog(); return; } -int id = messagePayload.optInt("sectionID"); -Section section = currentPage.getSections().get(id); -Intent intent = new Intent(fragment.getActivity(), EditSectionActivity.class); -intent.setAction(EditSectionActivity.ACTION_EDIT_SECTION); -intent.putExtra(EditSectionActivity.EXTRA_SECTION_ID, section.getId()); -intent.putExtra(EditSectionActivity.EXTRA_SECTION_HEADING, section.getHeading()); -intent.putExtra(EditSectionActivity.EXTRA_TITLE, currentPage.getTitle()); -intent.putExtra(EditSectionActivity.EXTRA_PAGE_PROPS, currentPage.getPageProperties()); -fragment.startActivityForResult(intent, PageActivity.ACTIVITY_REQUEST_EDIT_SECTION); +startEditingSection(messagePayload.optInt("sectionID"), null); if (wasRefreshed) { savedPagesFunnel.logEditAfterRefresh(); } diff --git a/app/src/main/java/org/wikipedia/editing/EditSectionActivity.java b/app/src/main/java/org/wikipedia/editing/EditSectionActivity.java index f5291c5..a6520ac 100644 --- a/app/src/main/java/org/wikipedia/editing/EditSectionActivity.java +++ b/
[MediaWiki-commits] [Gerrit] Fix UID test and make debugging easier - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Fix UID test and make debugging easier .. Fix UID test and make debugging easier This should fix the test and make the test failures (if any) more informative. The issue was that it was trying to extract a 46-bit segment (the timestamp). But because the whole thing wasn't 0-padded first, the timestamp might be shorter. So it would extract part of the next segment too. That meant it was testing a 46-bit segment with no guaranteed properties, with arbitrary results. Bug: T131549 Change-Id: I11c9e86951cc1d6b186710cda6e42ee58c920db8 --- M tests/phpunit/includes/utils/UIDGeneratorTest.php 1 file changed, 19 insertions(+), 10 deletions(-) Approvals: Sbisson: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/phpunit/includes/utils/UIDGeneratorTest.php b/tests/phpunit/includes/utils/UIDGeneratorTest.php index d746ea1..60d4e99 100644 --- a/tests/phpunit/includes/utils/UIDGeneratorTest.php +++ b/tests/phpunit/includes/utils/UIDGeneratorTest.php @@ -9,9 +9,8 @@ } /** -* Flaky test (T131549). +* Test that generated UIDs have the expected properties * -* @group Broken * @dataProvider provider_testTimestampedUID * @covers UIDGenerator::newTimestampedUID128 * @covers UIDGenerator::newTimestampedUID88 @@ -34,19 +33,29 @@ $this->assertSame( array_unique( $ids ), $ids, "All generated IDs are unique." ); foreach ( $ids as $id ) { - $id_bin = Wikimedia\base_convert( $id, 10, 2 ); - $lastId_bin = Wikimedia\base_convert( $lastId, 10, 2 ); + // Convert string to binary and pad to full length so we can + // extract segments + $id_bin = Wikimedia\base_convert( $id, 10, 2, $bits ); + $lastId_bin = Wikimedia\base_convert( $lastId, 10, 2, $bits ); + + $timestamp_bin = substr( $id_bin, 0, $tbits ); + $last_timestamp_bin = substr( $lastId_bin, 0, $tbits ); $this->assertGreaterThanOrEqual( - substr( $lastId_bin, 0, $tbits ), - substr( $id_bin, 0, $tbits ), - "New ID timestamp ($id_bin) >= prior one ($lastId_bin)." ); + $last_timestamp_bin, + $timestamp_bin, + "timestamp ($timestamp_bin) of current ID ($id_bin) >= timestamp ($last_timestamp_bin) " . + "of prior one ($lastId_bin)" ); + + $hostbits_bin = substr( $id_bin, -$hostbits ); + $last_hostbits_bin = substr( $lastId_bin, -$hostbits ); if ( $hostbits ) { $this->assertEquals( - substr( $id_bin, -$hostbits ), - substr( $lastId_bin, -$hostbits ), - "Host ID of ($id_bin) is same as prior one ($lastId_bin)." ); + $hostbits_bin, + $last_hostbits_bin, + "Host ID ($hostbits_bin) of current ID ($id_bin) is same as host ID ($last_hostbits_bin) " . + "of prior one ($lastId_bin)." ); } $lastId = $id; -- To view, visit https://gerrit.wikimedia.org/r/281578 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I11c9e86951cc1d6b186710cda6e42ee58c920db8 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Mattflaschen Gerrit-Reviewer: Mattflaschen Gerrit-Reviewer: Ori.livneh Gerrit-Reviewer: Sbisson Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] add base::firewall to lead - change (operations/puppet)
Dzahn has submitted this change and it was merged. Change subject: add base::firewall to lead .. add base::firewall to lead Change-Id: I570e6d2a8bf77f56c4ee3e87adc9ffcdb01f3a22 --- M manifests/site.pp 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/manifests/site.pp b/manifests/site.pp index fbe24ba..5f118f2 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -1448,6 +1448,7 @@ # Note: whenever moving Gerrit out of ytterbium, you will need # to update the role::zuul::configuration variable 'gerrit_server' include standard +include base::firewall role gerrit::production::replicationdest } -- To view, visit https://gerrit.wikimedia.org/r/283537 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I570e6d2a8bf77f56c4ee3e87adc9ffcdb01f3a22 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn Gerrit-Reviewer: Chad Gerrit-Reviewer: Dzahn Gerrit-Reviewer: Muehlenhoff Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] add base::firewall to lead - change (operations/puppet)
Dzahn has uploaded a new change for review. https://gerrit.wikimedia.org/r/283537 Change subject: add base::firewall to lead .. add base::firewall to lead Change-Id: I570e6d2a8bf77f56c4ee3e87adc9ffcdb01f3a22 --- M manifests/site.pp 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/37/283537/1 diff --git a/manifests/site.pp b/manifests/site.pp index fbe24ba..5f118f2 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -1448,6 +1448,7 @@ # Note: whenever moving Gerrit out of ytterbium, you will need # to update the role::zuul::configuration variable 'gerrit_server' include standard +include base::firewall role gerrit::production::replicationdest } -- To view, visit https://gerrit.wikimedia.org/r/283537 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I570e6d2a8bf77f56c4ee3e87adc9ffcdb01f3a22 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] Hygiene: remove unused code - change (apps...wikipedia)
jenkins-bot has submitted this change and it was merged. Change subject: Hygiene: remove unused code .. Hygiene: remove unused code This integration is too big. Remove nice to have but unnecessary code so that we can focus on only what's functionally needed. Change-Id: I83efd7783306636acbe44ce94039b286a81d5255 --- M app/src/main/java/org/wikipedia/readinglist/AddToReadingListDialog.java M app/src/main/java/org/wikipedia/readinglist/ReadingListData.java M app/src/main/java/org/wikipedia/readinglist/ReadingListFakeData.java M app/src/main/java/org/wikipedia/readinglist/ReadingListsFragment.java 4 files changed, 5 insertions(+), 22 deletions(-) Approvals: BearND: Looks good to me, approved Dbrant: Looks good to me, approved jenkins-bot: Verified diff --git a/app/src/main/java/org/wikipedia/readinglist/AddToReadingListDialog.java b/app/src/main/java/org/wikipedia/readinglist/AddToReadingListDialog.java index 2c19556..941b19d 100644 --- a/app/src/main/java/org/wikipedia/readinglist/AddToReadingListDialog.java +++ b/app/src/main/java/org/wikipedia/readinglist/AddToReadingListDialog.java @@ -103,7 +103,7 @@ } private void updateLists() { -readingLists = ReadingList.DAO.queryLists(ReadingListData.SORT_BY_RECENT); +readingLists = ReadingList.DAO.queryMruLists(); adapter.notifyDataSetChanged(); } diff --git a/app/src/main/java/org/wikipedia/readinglist/ReadingListData.java b/app/src/main/java/org/wikipedia/readinglist/ReadingListData.java index 521ba96..2ba0e2a 100644 --- a/app/src/main/java/org/wikipedia/readinglist/ReadingListData.java +++ b/app/src/main/java/org/wikipedia/readinglist/ReadingListData.java @@ -6,11 +6,8 @@ @SuppressWarnings("checkstyle:interfaceistype") public interface ReadingListData { -int SORT_BY_RECENT = 0; -int SORT_BY_NAME = 1; - interface List { -@NonNull java.util.List queryLists(int sortType); +@NonNull java.util.List queryMruLists(); void addList(ReadingList list); void removeList(ReadingList list); void makeListMostRecent(ReadingList list); @@ -22,7 +19,6 @@ void removeTitleFromList(ReadingList list, PageTitle title); boolean listContainsTitle(ReadingList list, PageTitle title); boolean anyListContainsTitle(PageTitle title); -@NonNull java.util.List getTitlesForSavingOffline(); } interface ReadingListDao extends List, Page {} diff --git a/app/src/main/java/org/wikipedia/readinglist/ReadingListFakeData.java b/app/src/main/java/org/wikipedia/readinglist/ReadingListFakeData.java index e473b4b..e72f6ac 100644 --- a/app/src/main/java/org/wikipedia/readinglist/ReadingListFakeData.java +++ b/app/src/main/java/org/wikipedia/readinglist/ReadingListFakeData.java @@ -13,7 +13,7 @@ @Override @NonNull -public List queryLists(int sortType) { +public List queryMruLists() { return LISTS; } @@ -67,17 +67,4 @@ } return false; } - -@Override -@NonNull -public List getTitlesForSavingOffline() { -List titles = new ArrayList<>(); -for (ReadingList list : LISTS) { -if (list.getSaveOffline()) { -titles.addAll(list.getPages()); -} -} -return titles; -} - -} +} \ No newline at end of file diff --git a/app/src/main/java/org/wikipedia/readinglist/ReadingListsFragment.java b/app/src/main/java/org/wikipedia/readinglist/ReadingListsFragment.java index 25d9475..4ddf304 100644 --- a/app/src/main/java/org/wikipedia/readinglist/ReadingListsFragment.java +++ b/app/src/main/java/org/wikipedia/readinglist/ReadingListsFragment.java @@ -86,7 +86,7 @@ } private void updateLists() { -readingLists = ReadingList.DAO.queryLists(ReadingListData.SORT_BY_RECENT); +readingLists = ReadingList.DAO.queryMruLists(); adapter.notifyDataSetChanged(); updateEmptyMessage(); } -- To view, visit https://gerrit.wikimedia.org/r/283098 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I83efd7783306636acbe44ce94039b286a81d5255 Gerrit-PatchSet: 4 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Niedzielski Gerrit-Reviewer: BearND Gerrit-Reviewer: Brion VIBBER Gerrit-Reviewer: Dbrant Gerrit-Reviewer: Mholloway Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] More efficient old custom value lookup - change (wikimedia...civicrm)
Ejegg has uploaded a new change for review. https://gerrit.wikimedia.org/r/283513 Change subject: More efficient old custom value lookup .. More efficient old custom value lookup titlesAndValuesForCustomDataTable needs to get the column definitions and values for a custom data table at a certain date in the past. It currently does this by looking at all entries before the given date in ascending order, and overwriting old entries with newer ones. This patch reverses the order and skips value lookups for all but the most recent. Change-Id: I149bc0eb08e57d1a75e6193d652e23bf9f3e44f5 --- M CRM/Logging/Differ.php 1 file changed, 10 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/civicrm refs/changes/13/283513/1 diff --git a/CRM/Logging/Differ.php b/CRM/Logging/Differ.php index b6f32f8..a0b6f25 100644 --- a/CRM/Logging/Differ.php +++ b/CRM/Logging/Differ.php @@ -380,11 +380,15 @@ FROM `{$this->db}`.log_civicrm_custom_field WHERE log_date <= %2 ANDcustom_group_id = %3 -ORDER BY log_date +ORDER BY log_date DESC "; $cfDao = CRM_Core_DAO::executeQuery($sql, $params); while ($cfDao->fetch()) { + // We only need the most recent value for each column + if (isset($titles[$cfDao->column_name])) { +continue; + } $titles[$cfDao->column_name] = "{$cgDao->title}: {$cfDao->label}"; switch ($cfDao->data_type) { @@ -401,11 +405,14 @@ FROM `{$this->db}`.log_civicrm_option_value WHERElog_date <= %2 AND option_group_id = %3 -ORDER BY log_date +ORDER BY log_date DESC "; $ovDao = CRM_Core_DAO::executeQuery($sql, $params); while ($ovDao->fetch()) { - $values[$cfDao->column_name][$ovDao->value] = $ovDao->label; + // Again, only need the last label for each value + if (!array_key_exists('$ovDao->value', $values[$cfDao->column_name])) { +$values[$cfDao->column_name][$ovDao->value] = $ovDao->label; + } } } break; -- To view, visit https://gerrit.wikimedia.org/r/283513 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I149bc0eb08e57d1a75e6193d652e23bf9f3e44f5 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm/civicrm Gerrit-Branch: master Gerrit-Owner: Ejegg ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Gerrit: replicate git repositories to new home - change (operations/puppet)
Dzahn has submitted this change and it was merged. Change subject: Gerrit: replicate git repositories to new home .. Gerrit: replicate git repositories to new home Change-Id: I62d88da005438aa429b3e21b880e0c6332ac82e8 --- M manifests/role/gitblit.pp M manifests/site.pp M modules/gerrit/manifests/replicationdest.pp M modules/role/manifests/gerrit/production.pp 4 files changed, 21 insertions(+), 5 deletions(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/manifests/role/gitblit.pp b/manifests/role/gitblit.pp index 329e344..2226fd7 100644 --- a/manifests/role/gitblit.pp +++ b/manifests/role/gitblit.pp @@ -18,9 +18,4 @@ description => 'gitblit process', nrpe_command => "/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1:1 --ereg-argument-array '^/usr/bin/java .*-jar gitblit.jar'" } - -# Add ytterbium to ssh exceptions for git replication -ferm::rule { 'ytterbium_ssh_git': -rule => 'proto tcp dport ssh { saddr (208.80.154.80 208.80.154.81 2620:0:861:3:92b1:1cff:fe2a:e60 2620:0:861:3:208:80:154:80 2620:0:861:3:208:80:154:81) ACCEPT; }' -} } diff --git a/manifests/site.pp b/manifests/site.pp index 03dc8b1..fbe24ba 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -1448,6 +1448,8 @@ # Note: whenever moving Gerrit out of ytterbium, you will need # to update the role::zuul::configuration variable 'gerrit_server' include standard + +role gerrit::production::replicationdest } node 'lithium.eqiad.wmnet' { diff --git a/modules/gerrit/manifests/replicationdest.pp b/modules/gerrit/manifests/replicationdest.pp index 9612b94..c282d60 100644 --- a/modules/gerrit/manifests/replicationdest.pp +++ b/modules/gerrit/manifests/replicationdest.pp @@ -19,4 +19,11 @@ ensure => present, content => $ssh_key, } + +# Add ytterbium to ssh exceptions for git replication +ferm::service { 'ytterbium_ssh_git': +proto => 'tcp', +port => '22', +srange => '@resolve((ytterbium.wikimedia.org gerrit.wikimedia.org))', +} } diff --git a/modules/role/manifests/gerrit/production.pp b/modules/role/manifests/gerrit/production.pp index 61ba381..a83746a 100644 --- a/modules/role/manifests/gerrit/production.pp +++ b/modules/role/manifests/gerrit/production.pp @@ -66,6 +66,18 @@ 'push' => '+refs/*:refs/*', 'mirror'=> true, }, +'lead'=> { +# Note: This is in single quotes on purpose. ${name} is not +# expected to be expanded by puppet but rather by gerrit +# +# lint:ignore:single_quote_string_with_variables +'url' => 'gerritsl...@lead.wikimedia.org:/srv/gerrit/git/${name}.git', +# lint:endignore +'threads' => '4', +'authGroup' => 'mediawiki-replication', +'push' => '+refs/*:refs/*', +'mirror'=> true, +}, 'github' => { # Note: This is in single quotes on purpose. ${name} is not # expected to be expanded by puppet but rather by gerrit -- To view, visit https://gerrit.wikimedia.org/r/282761 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I62d88da005438aa429b3e21b880e0c6332ac82e8 Gerrit-PatchSet: 5 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Chad Gerrit-Reviewer: Chad Gerrit-Reviewer: Dzahn Gerrit-Reviewer: Muehlenhoff Gerrit-Reviewer: Rush Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Hygiene: fix a couple overrides - change (apps...wikipedia)
jenkins-bot has submitted this change and it was merged. Change subject: Hygiene: fix a couple overrides .. Hygiene: fix a couple overrides Change-Id: Idda75ce8edfe003156242a9c566bd9dbe4669752 --- M app/src/main/java/org/wikipedia/readinglist/ReadingListsFragment.java 1 file changed, 1 insertion(+), 5 deletions(-) Approvals: BearND: Looks good to me, approved Dbrant: Looks good to me, approved jenkins-bot: Verified diff --git a/app/src/main/java/org/wikipedia/readinglist/ReadingListsFragment.java b/app/src/main/java/org/wikipedia/readinglist/ReadingListsFragment.java index 96ad20f..25d9475 100644 --- a/app/src/main/java/org/wikipedia/readinglist/ReadingListsFragment.java +++ b/app/src/main/java/org/wikipedia/readinglist/ReadingListsFragment.java @@ -71,11 +71,6 @@ } @Override -public void onActivityCreated(Bundle savedInstanceState) { -super.onActivityCreated(savedInstanceState); -} - -@Override public void onDestroyView() { readingListView.setAdapter(null); super.onDestroyView(); @@ -116,6 +111,7 @@ } class ReadingListPagerAdapter extends PagerAdapter { +@Override public Object instantiateItem(ViewGroup collection, int position) { int resId = 0; switch (position) { -- To view, visit https://gerrit.wikimedia.org/r/283097 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idda75ce8edfe003156242a9c566bd9dbe4669752 Gerrit-PatchSet: 4 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Niedzielski Gerrit-Reviewer: BearND Gerrit-Reviewer: Brion VIBBER Gerrit-Reviewer: Dbrant Gerrit-Reviewer: Mholloway Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Replace deprecated ConfigFactory::getDefaultInstance() - change (mediawiki...CirrusSearch)
jenkins-bot has submitted this change and it was merged. Change subject: Replace deprecated ConfigFactory::getDefaultInstance() .. Replace deprecated ConfigFactory::getDefaultInstance() Bug: T132625 Change-Id: I7af07b7f77107a72e4597933c051ea032a13a671 --- M includes/Api/ApiBase.php M includes/CirrusSearch.php M includes/CompletionSuggester.php M includes/Dump.php M includes/Hooks.php M includes/Job/ElasticaWrite.php M includes/Job/Job.php M includes/Maintenance/AnalysisConfigBuilder.php M includes/Maintenance/Maintenance.php M includes/Maintenance/MappingConfigBuilder.php M includes/Searcher.php M maintenance/copySearchIndex.php 12 files changed, 57 insertions(+), 30 deletions(-) Approvals: Smalyshev: Looks good to me, approved DCausse: Looks good to me, but someone else must approve jenkins-bot: Verified Objections: Cindy-the-browser-test-bot: There's a problem with this change, please improve diff --git a/includes/Api/ApiBase.php b/includes/Api/ApiBase.php index 14422d6..d094824 100644 --- a/includes/Api/ApiBase.php +++ b/includes/Api/ApiBase.php @@ -4,14 +4,16 @@ use ApiBase as CoreApiBase; use CirrusSearch\Connection; -use ConfigFactory; +use MediaWiki\MediaWikiServices; abstract class ApiBase extends CoreApiBase { private $connection; public function getCirrusConnection() { if ($this->connection === null) { - $config = ConfigFactory::getDefaultInstance()->makeConfig( 'CirrusSearch' ); + $config = MediaWikiServices::getInstance() + ->getConfigFactory() + ->makeConfig( 'CirrusSearch' ); $this->connection = new Connection( $config ); } return $this->connection; diff --git a/includes/CirrusSearch.php b/includes/CirrusSearch.php index bd279e6..2c65a43 100644 --- a/includes/CirrusSearch.php +++ b/includes/CirrusSearch.php @@ -11,6 +11,7 @@ use CirrusSearch\Search\FancyTitleResultsType; use CirrusSearch\Search\TitleResultsType; use MediaWiki\Logger\LoggerFactory; +use MediaWiki\MediaWikiServices; /** * SearchEngine implementation for CirrusSearch. Delegates to @@ -73,7 +74,9 @@ public function __construct( $baseName = null ) { $this->indexBaseName = $baseName === null ? wfWikiId() : $baseName; - $this->config = ConfigFactory::getDefaultInstance()->makeConfig( 'CirrusSearch' ); + $this->config = MediaWikiServices::getInstance() + ->getConfigFactory() + ->makeConfig( 'CirrusSearch' ); $this->connection = new Connection( $this->config ); $this->request = RequestContext::getMain()->getRequest(); } diff --git a/includes/CompletionSuggester.php b/includes/CompletionSuggester.php index 35d9126..f6e6d07 100644 --- a/includes/CompletionSuggester.php +++ b/includes/CompletionSuggester.php @@ -7,7 +7,7 @@ use CirrusSearch; use CirrusSearch\BuildDocument\SuggestBuilder; use CirrusSearch\Search\SearchContext; -use ConfigFactory; +use MediaWiki\MediaWikiServices; use MediaWiki\Logger\LoggerFactory; use SearchSuggestion; use SearchSuggestionSet; @@ -148,7 +148,9 @@ if ( is_null( $config ) ) { // @todo connection has an embeded config ... reuse that? somehow should // at least ensure they are the same. - $config = ConfigFactory::getDefaultInstance()->makeConfig( 'CirrusSearch' ); + $config = MediaWikiServices::getInstance() + ->getConfigFactory() + ->makeConfig( 'CirrusSearch' ); } parent::__construct( $conn, $user, $config->get( 'CirrusSearchSlowSearch' ) ); diff --git a/includes/Dump.php b/includes/Dump.php index 2c78ae5..6828dc1 100644 --- a/includes/Dump.php +++ b/includes/Dump.php @@ -2,7 +2,7 @@ namespace CirrusSearch; -use ConfigFactory; +use MediaWiki\MediaWikiServices; use FormlessAction; /** @@ -32,7 +32,9 @@ $response = $this->getRequest()->response(); $response->header( 'Content-type: application/json; charset=UTF-8' ); - $config = ConfigFactory::getDefaultInstance()->makeConfig( 'CirrusSearch' ); + $config = MediaWikiServices::getInstance() + ->getConfigFactory() + ->makeConfig( 'CirrusSearch' ); $conn = new Connection( $config ); $searcher = new Searcher( $conn, 0, 0, null, array(), $this->getUser() ); diff --git a/includes/Hooks.php b/includes/Hooks.php index 7b0377f..69de080 100644 --- a/includes/Hooks.php +++ b/includes/Hooks.php @@ -6,11 +6,11 @@ use ApiOpenSearch; use CirrusSearch; use CirrusSearch\Sear
[MediaWiki-commits] [Gerrit] Move etherpad diamond collector script to module - change (operations/puppet)
Chad has uploaded a new change for review. https://gerrit.wikimedia.org/r/283512 Change subject: Move etherpad diamond collector script to module .. Move etherpad diamond collector script to module Change-Id: Ided587afd6ba90e5584599819a63d60d1da3add9 --- M manifests/role/etherpad.pp R modules/etherpad/files/etherpad.py 2 files changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/12/283512/1 diff --git a/manifests/role/etherpad.pp b/manifests/role/etherpad.pp index c5603d7..eead1cf 100644 --- a/manifests/role/etherpad.pp +++ b/manifests/role/etherpad.pp @@ -31,6 +31,6 @@ } diamond::collector { 'EtherpadStatus': -source => 'puppet:///files/etherpad/etherpad.py', +source => 'puppet:///modules/etherpad/files/etherpad.py', } } diff --git a/files/etherpad/etherpad.py b/modules/etherpad/files/etherpad.py similarity index 100% rename from files/etherpad/etherpad.py rename to modules/etherpad/files/etherpad.py -- To view, visit https://gerrit.wikimedia.org/r/283512 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ided587afd6ba90e5584599819a63d60d1da3add9 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Chad ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] SpecialRunJobs: delegate error handling to MWExceptionHandler - change (mediawiki/core)
BryanDavis has uploaded a new change for review. https://gerrit.wikimedia.org/r/283511 Change subject: SpecialRunJobs: delegate error handling to MWExceptionHandler .. SpecialRunJobs: delegate error handling to MWExceptionHandler Make the custom error handler that is installed to suppress Cookie header errors delegate unhandled errors to the default MediaWiki error handler. This will preserve fatal error logging for errors raised by jobs. Bug: T89169 Change-Id: I52ef544fa18351bf310b04b17ab4e0239020fe20 --- M includes/specials/SpecialRunJobs.php 1 file changed, 5 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/11/283511/1 diff --git a/includes/specials/SpecialRunJobs.php b/includes/specials/SpecialRunJobs.php index 2312f76..ce5533f 100644 --- a/includes/specials/SpecialRunJobs.php +++ b/includes/specials/SpecialRunJobs.php @@ -94,8 +94,11 @@ if ( strpos( $errstr, 'Cannot modify header information' ) !== false ) { return true; // bug T115413 } - // Delegate unhandled errors to the default handlers - return false; + // Delegate unhandled errors to the default MediaWiki handler + // so that fatal errors get proper logging (T89169) + return call_user_func_array( + 'MWExceptionHandler::handleError', func_get_args() + ); } ); } -- To view, visit https://gerrit.wikimedia.org/r/283511 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I52ef544fa18351bf310b04b17ab4e0239020fe20 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: BryanDavis ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update gems to latest - change (mediawiki...MultimediaViewer)
jenkins-bot has submitted this change and it was merged. Change subject: Update gems to latest .. Update gems to latest The existing locked version of the selenium drivers stopped working with the latest version of Firefox Change-Id: Iff28cb1e3afe1966f8fd5ac0fda58d5a9718cb1b --- M Gemfile.lock 1 file changed, 12 insertions(+), 16 deletions(-) Approvals: Gilles: Looks good to me, approved jenkins-bot: Verified diff --git a/Gemfile.lock b/Gemfile.lock index c26b10b..bc63746 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ GEM remote: https://rubygems.org/ specs: -ast (2.1.0) +ast (2.2.0) astrolabe (1.3.1) parser (~> 2.2) builder (3.2.2) @@ -17,9 +17,9 @@ faker (>= 1.1.2) yml_reader (>= 0.6) diff-lcs (1.2.5) -domain_name (0.5.25) +domain_name (0.5.20160310) unf (>= 0.0.5, < 1.0.0) -faker (1.6.1) +faker (1.6.3) i18n (~> 0.5) faraday (0.9.2) multipart-post (>= 1.2, < 3) @@ -29,7 +29,7 @@ ffi (1.9.10) gherkin (2.12.2) multi_json (~> 1.3) -headless (2.2.0) +headless (2.2.3) http-cookie (1.0.2) domain_name (~> 0.5) i18n (0.7.0) @@ -48,7 +48,7 @@ rspec-expectations (~> 2.14, >= 2.14.4) syntax (~> 1.2, >= 1.2.0) thor (~> 0.19, >= 0.19.1) -mime-types (2.99) +mime-types (2.99.1) multi_json (1.11.2) multi_test (0.1.2) multipart-post (2.0.0) @@ -59,10 +59,10 @@ watir-webdriver (>= 0.6.11) page_navigation (0.9) data_magic (>= 0.14) -parser (2.2.3.0) - ast (>= 1.1, < 3.0) +parser (2.3.0.7) + ast (~> 2.2) powerpack (0.1.1) -rainbow (2.0.0) +rainbow (2.1.0) rest-client (1.8.0) http-cookie (>= 1.0.2, < 2.0) mime-types (>= 1.16, < 3.0) @@ -78,10 +78,9 @@ ruby-progressbar (~> 1.7) tins (<= 1.6.0) ruby-progressbar (1.7.5) -rubyzip (1.1.7) -selenium-webdriver (2.49.0) +rubyzip (1.2.0) +selenium-webdriver (2.53.0) childprocess (~> 0.5) - multi_json (~> 1.0) rubyzip (~> 1.0) websocket (~> 1.0) syntax (1.2.0) @@ -89,10 +88,10 @@ tins (1.6.0) unf (0.1.4) unf_ext -unf_ext (0.0.7.1) +unf_ext (0.0.7.2) watir-webdriver (0.9.1) selenium-webdriver (>= 2.46.2) -websocket (1.2.2) +websocket (1.2.3) yml_reader (0.7) PLATFORMS @@ -101,6 +100,3 @@ DEPENDENCIES mediawiki_selenium (~> 1.6.4) rubocop (~> 0.35.1) - -BUNDLED WITH - 1.10.6 -- To view, visit https://gerrit.wikimedia.org/r/283508 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iff28cb1e3afe1966f8fd5ac0fda58d5a9718cb1b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MultimediaViewer Gerrit-Branch: master Gerrit-Owner: Gilles Gerrit-Reviewer: Gilles Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] ext.thanks.revthank: Prevent double clicks while API request... - change (mediawiki...Thanks)
jenkins-bot has submitted this change and it was merged. Change subject: ext.thanks.revthank: Prevent double clicks while API request is in progress .. ext.thanks.revthank: Prevent double clicks while API request is in progress Bug: T53303 Change-Id: Ie886a8093469904f327bba8a0b30048fc6d6b638 --- M modules/ext.thanks.revthank.js 1 file changed, 9 insertions(+), 0 deletions(-) Approvals: Florianschmidtwelzow: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ext.thanks.revthank.js b/modules/ext.thanks.revthank.js index 63f413a..3bc5069 100644 --- a/modules/ext.thanks.revthank.js +++ b/modules/ext.thanks.revthank.js @@ -15,6 +15,13 @@ // $thankElement is the element to be removed on success function sendThanks( $thankLink, $thankElement ) { var source; + + if ( $thankLink.data( 'clickDisabled' ) ) { + // Prevent double clicks while we haven't received a response from API request + return false; + } + $thankLink.data( 'clickDisabled', true ); + if ( mw.config.get( 'wgAction' ) === 'history' ) { source = 'history'; } else { @@ -37,6 +44,8 @@ }, // Fail function ( errorCode, details ) { + // If error occured, enable attempting to thank again + $thankLink.data( 'clickDisabled', false ); // TODO: use something besides alert for the error messages switch ( errorCode ) { case 'invalidrevision': -- To view, visit https://gerrit.wikimedia.org/r/283375 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie886a8093469904f327bba8a0b30048fc6d6b638 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Thanks Gerrit-Branch: master Gerrit-Owner: Glaisher Gerrit-Reviewer: Catrope Gerrit-Reviewer: Florianschmidtwelzow 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] Separate Reading List "list" and "page" interfaces - change (apps...wikipedia)
jenkins-bot has submitted this change and it was merged. Change subject: Separate Reading List "list" and "page" interfaces .. Separate Reading List "list" and "page" interfaces Change-Id: I53790674dc421682f121c8c264c68aa4d33adee4 --- M app/src/main/java/org/wikipedia/readinglist/ReadingList.java M app/src/main/java/org/wikipedia/readinglist/ReadingListData.java M app/src/main/java/org/wikipedia/readinglist/ReadingListFakeData.java 3 files changed, 19 insertions(+), 16 deletions(-) Approvals: BearND: Looks good to me, approved Dbrant: Looks good to me, approved jenkins-bot: Verified diff --git a/app/src/main/java/org/wikipedia/readinglist/ReadingList.java b/app/src/main/java/org/wikipedia/readinglist/ReadingList.java index 862be3c..0b45427 100644 --- a/app/src/main/java/org/wikipedia/readinglist/ReadingList.java +++ b/app/src/main/java/org/wikipedia/readinglist/ReadingList.java @@ -6,7 +6,7 @@ import java.util.List; public class ReadingList { -public static final ReadingListData DAO = new ReadingListFakeData(); +public static final ReadingListData.ReadingListDao DAO = new ReadingListFakeData(); private String title; private String description; diff --git a/app/src/main/java/org/wikipedia/readinglist/ReadingListData.java b/app/src/main/java/org/wikipedia/readinglist/ReadingListData.java index 82ce4c1..521ba96 100644 --- a/app/src/main/java/org/wikipedia/readinglist/ReadingListData.java +++ b/app/src/main/java/org/wikipedia/readinglist/ReadingListData.java @@ -4,23 +4,26 @@ import org.wikipedia.page.PageTitle; -import java.util.List; - +@SuppressWarnings("checkstyle:interfaceistype") public interface ReadingListData { int SORT_BY_RECENT = 0; int SORT_BY_NAME = 1; -@NonNull List queryLists(int sortType); +interface List { +@NonNull java.util.List queryLists(int sortType); +void addList(ReadingList list); +void removeList(ReadingList list); +void makeListMostRecent(ReadingList list); +void saveListInfo(ReadingList list); +} -void addList(ReadingList list); -void removeList(ReadingList list); -void makeListMostRecent(ReadingList list); -void saveListInfo(ReadingList list); +interface Page { +void addTitleToList(ReadingList list, PageTitle title); +void removeTitleFromList(ReadingList list, PageTitle title); +boolean listContainsTitle(ReadingList list, PageTitle title); +boolean anyListContainsTitle(PageTitle title); +@NonNull java.util.List getTitlesForSavingOffline(); +} -void addTitleToList(ReadingList list, PageTitle title); -void removeTitleFromList(ReadingList list, PageTitle title); -boolean listContainsTitle(ReadingList list, PageTitle title); -boolean anyListContainsTitle(PageTitle title); - -@NonNull List getTitlesForSavingOffline(); -} +interface ReadingListDao extends List, Page {} +} \ No newline at end of file diff --git a/app/src/main/java/org/wikipedia/readinglist/ReadingListFakeData.java b/app/src/main/java/org/wikipedia/readinglist/ReadingListFakeData.java index 11a6ea6..e473b4b 100644 --- a/app/src/main/java/org/wikipedia/readinglist/ReadingListFakeData.java +++ b/app/src/main/java/org/wikipedia/readinglist/ReadingListFakeData.java @@ -7,7 +7,7 @@ import java.util.ArrayList; import java.util.List; -public final class ReadingListFakeData implements ReadingListData { +public final class ReadingListFakeData implements ReadingListData.ReadingListDao { private static final List LISTS = new ArrayList<>(); -- To view, visit https://gerrit.wikimedia.org/r/283096 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I53790674dc421682f121c8c264c68aa4d33adee4 Gerrit-PatchSet: 4 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Niedzielski Gerrit-Reviewer: BearND Gerrit-Reviewer: Brion VIBBER Gerrit-Reviewer: Dbrant Gerrit-Reviewer: Mholloway Gerrit-Reviewer: Niedzielski Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] README: Update with new build process - change (oojs/ui)
jenkins-bot has submitted this change and it was merged. Change subject: README: Update with new build process .. README: Update with new build process Change-Id: I0cdc2ccf0ba57d53b206cdb9f60326468dcc5f6f --- M README.md 1 file changed, 3 insertions(+), 1 deletion(-) Approvals: Bartosz Dziewoński: Looks good to me, approved jenkins-bot: Verified diff --git a/README.md b/README.md index 10a05bf..fc41aaf 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,9 @@ 1. Install [composer](https://getcomposer.org/download/) and make sure running `composer` will execute it (*e.g.* add it to `$PATH` in POSIX environments). -1. Install dev dependencies and build the distribution files:`$ npm install` +1. Install dev dependencies:`$ npm install` + +1. Build the library (you can alternatively use `grunt quick-build` if you don't need to rebuild the PNGs):`$ grunt build` 1. You can now copy the distribution files from the dist directory into your project. -- To view, visit https://gerrit.wikimedia.org/r/283503 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0cdc2ccf0ba57d53b206cdb9f60326468dcc5f6f Gerrit-PatchSet: 2 Gerrit-Project: oojs/ui Gerrit-Branch: master Gerrit-Owner: Mattflaschen Gerrit-Reviewer: Bartosz Dziewoński 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] Adding param documentation for Parser::internalParse() - change (mediawiki/core)
Kaldari has uploaded a new change for review. https://gerrit.wikimedia.org/r/283510 Change subject: Adding param documentation for Parser::internalParse() .. Adding param documentation for Parser::internalParse() Change-Id: Id0adeff2c2fa940205f4b7692d27b45e3466be79 --- M includes/parser/Parser.php 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/10/283510/1 diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index 5ee0c5a..a6048e6 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -1213,9 +1213,9 @@ * * @private * -* @param string $text -* @param bool $isMain -* @param PPFrame|bool $frame +* @param string $text The text to parse +* @param bool $isMain Whether this is being called from the main parse() function +* @param PPFrame|bool $frame A pre-processor frame * * @return string */ -- To view, visit https://gerrit.wikimedia.org/r/283510 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id0adeff2c2fa940205f4b7692d27b45e3466be79 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Kaldari ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update gems to latest - change (mediawiki...MultimediaViewer)
Gilles has uploaded a new change for review. https://gerrit.wikimedia.org/r/283508 Change subject: Update gems to latest .. Update gems to latest The existing locked version of the selenium drivers stopped working with the latest version of Firefox Change-Id: Iff28cb1e3afe1966f8fd5ac0fda58d5a9718cb1b --- M Gemfile.lock 1 file changed, 12 insertions(+), 16 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MultimediaViewer refs/changes/08/283508/1 diff --git a/Gemfile.lock b/Gemfile.lock index c26b10b..bc63746 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ GEM remote: https://rubygems.org/ specs: -ast (2.1.0) +ast (2.2.0) astrolabe (1.3.1) parser (~> 2.2) builder (3.2.2) @@ -17,9 +17,9 @@ faker (>= 1.1.2) yml_reader (>= 0.6) diff-lcs (1.2.5) -domain_name (0.5.25) +domain_name (0.5.20160310) unf (>= 0.0.5, < 1.0.0) -faker (1.6.1) +faker (1.6.3) i18n (~> 0.5) faraday (0.9.2) multipart-post (>= 1.2, < 3) @@ -29,7 +29,7 @@ ffi (1.9.10) gherkin (2.12.2) multi_json (~> 1.3) -headless (2.2.0) +headless (2.2.3) http-cookie (1.0.2) domain_name (~> 0.5) i18n (0.7.0) @@ -48,7 +48,7 @@ rspec-expectations (~> 2.14, >= 2.14.4) syntax (~> 1.2, >= 1.2.0) thor (~> 0.19, >= 0.19.1) -mime-types (2.99) +mime-types (2.99.1) multi_json (1.11.2) multi_test (0.1.2) multipart-post (2.0.0) @@ -59,10 +59,10 @@ watir-webdriver (>= 0.6.11) page_navigation (0.9) data_magic (>= 0.14) -parser (2.2.3.0) - ast (>= 1.1, < 3.0) +parser (2.3.0.7) + ast (~> 2.2) powerpack (0.1.1) -rainbow (2.0.0) +rainbow (2.1.0) rest-client (1.8.0) http-cookie (>= 1.0.2, < 2.0) mime-types (>= 1.16, < 3.0) @@ -78,10 +78,9 @@ ruby-progressbar (~> 1.7) tins (<= 1.6.0) ruby-progressbar (1.7.5) -rubyzip (1.1.7) -selenium-webdriver (2.49.0) +rubyzip (1.2.0) +selenium-webdriver (2.53.0) childprocess (~> 0.5) - multi_json (~> 1.0) rubyzip (~> 1.0) websocket (~> 1.0) syntax (1.2.0) @@ -89,10 +88,10 @@ tins (1.6.0) unf (0.1.4) unf_ext -unf_ext (0.0.7.1) +unf_ext (0.0.7.2) watir-webdriver (0.9.1) selenium-webdriver (>= 2.46.2) -websocket (1.2.2) +websocket (1.2.3) yml_reader (0.7) PLATFORMS @@ -101,6 +100,3 @@ DEPENDENCIES mediawiki_selenium (~> 1.6.4) rubocop (~> 0.35.1) - -BUNDLED WITH - 1.10.6 -- To view, visit https://gerrit.wikimedia.org/r/283508 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iff28cb1e3afe1966f8fd5ac0fda58d5a9718cb1b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MultimediaViewer Gerrit-Branch: master Gerrit-Owner: Gilles ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add MW gallery styles - change (apps...wikipedia)
jenkins-bot has submitted this change and it was merged. Change subject: Add MW gallery styles .. Add MW gallery styles This adds a gallery stylesheet module that improves presentation of in-article image galleries, and removes some special-case CSS in MobileApp that the gallery styles from MediaWiki render unnecessary. To see the difference compare the images in the article 'Picasso's Blue Period' before and after. Depends-On: Ibbcd5abb94ce58b9a45113d3b488facac3efe2fa Change-Id: Id043c42d8191ec8a548e2e353b3cf728321dac32 --- M app/src/main/assets/preview.css M app/src/main/assets/styles.css M scripts/make-css-assets.bash 3 files changed, 391 insertions(+), 133 deletions(-) Approvals: Niedzielski: Looks good to me, approved jenkins-bot: Verified diff --git a/app/src/main/assets/preview.css b/app/src/main/assets/preview.css index 84e0395..fff424f 100644 --- a/app/src/main/assets/preview.css +++ b/app/src/main/assets/preview.css @@ -549,6 +549,141 @@ * generation by selecting for ::after pseudo-element.*/ x-thereisnoelementwiththisname[rel="mw:referencedBy"]::before, span.mw-linkback-text { display: none; +}@media print { + li.gallerybox { + vertical-align: top; + display: inline-block; + } + + ul.gallery, li.gallerybox { + zoom: 1; + *display: inline; + } + + ul.gallery { + margin: 2px; + padding: 2px; + display: block; + } + + li.gallerycaption { + font-weight: bold; + text-align: center; + display: block; + word-wrap: break-word; + } + + li.gallerybox div.thumb { + text-align: center; + border: 1px solid #ccc; + margin: 2px; + } + + div.gallerytext { + overflow: hidden; + font-size: 94%; + padding: 2px 4px; + word-wrap: break-word; + }}/* Galleries */ +/* These display attributes look nonsensical, but are needed to support IE and FF2 */ +/* Don't forget to update gallery-print.css */ +li.gallerybox { + vertical-align: top; + display: -moz-inline-box; + display: inline-block; +} + +ul.gallery, +li.gallerybox { + zoom: 1; + *display: inline; +} + +ul.gallery { + margin: 2px; + padding: 2px; + display: block; +} + +li.gallerycaption { + font-weight: bold; + text-align: center; + display: block; + word-wrap: break-word; +} + +li.gallerybox div.thumb { + text-align: center; + border: 1px solid #ccc; + background-color: #f9f9f9; + margin: 2px; +} + +li.gallerybox div.thumb img { + display: block; + margin: 0 auto; +} + +div.gallerytext { + overflow: hidden; + font-size: 94%; + padding: 2px 4px; + word-wrap: break-word; +} + +/* new gallery stuff */ +ul.mw-gallery-nolines li.gallerybox div.thumb { + background-color: transparent; + border: none; +} + +ul.mw-gallery-nolines li.gallerybox div.gallerytext { + text-align: center; +} + +/* height constrained gallery */ + +ul.mw-gallery-packed li.gallerybox div.thumb, +ul.mw-gallery-packed-overlay li.gallerybox div.thumb, +ul.mw-gallery-packed-hover li.gallerybox div.thumb { + background-color: transparent; + border: none; +} + +ul.mw-gallery-packed li.gallerybox div.thumb img, +ul.mw-gallery-packed-overlay li.gallerybox div.thumb img, +ul.mw-gallery-packed-hover li.gallerybox div.thumb img { + margin: 0 auto; +} + +ul.mw-gallery-packed-hover li.gallerybox, +ul.mw-gallery-packed-overlay li.gallerybox { + position: relative; +} + +ul.mw-gallery-packed-hover div.gallerytextwrapper { + overflow: hidden; + height: 0; +} + +ul.mw-gallery-packed-hover li.gallerybox:hover div.gallerytextwrapper, +ul.mw-gallery-packed-overlay li.gallerybox div.gallerytextwrapper, +ul.mw-gallery-packed-hover li.gallerybox.mw-gallery-focused div.gallerytextwrapper { + position: absolute; + background: white; + background: rgba(255, 255, 255, 0.8); + padding: 5px 10px; + bottom: 0; + left: 0; /* Needed for IE */ + height: auto; + font-weight: bold; + margin: 2px; /* correspond to style on div.thumb */ +} + +ul.mw-gallery-packed-hover, +ul.mw-gallery-packed-overlay, +ul.mw-gallery-packed { + text-align: center; }/* Hide the stupid editlink */ .edit-page { display: none; diff --git a/app/src/main/assets/styles.css b/app/src/main/assets/styles.css index e29697a..a943f19 100644 --- a/app/src/main/assets/styles.css +++ b/app/src/main/assets/styles.css @@ -549,26 +549,151 @@ * generation by selecting for ::after pseudo-element.*/ x-thereisnoelementwiththisname[rel="mw:referencedBy"]::before, span.mw-linkba
[MediaWiki-commits] [Gerrit] Onboarding for Reading Lists. - change (apps...wikipedia)
jenkins-bot has submitted this change and it was merged. Change subject: Onboarding for Reading Lists. .. Onboarding for Reading Lists. Bug: T129606 Change-Id: Ia492483e69ef47b79e6372f05f53d5fca158dfaf --- M app/src/main/java/org/wikipedia/onboarding/OnboardingStateMachine.java M app/src/main/java/org/wikipedia/onboarding/PrefsOnboardingStateMachine.java M app/src/main/java/org/wikipedia/page/NavDrawerHelper.java M app/src/main/java/org/wikipedia/page/PageActivity.java M app/src/main/java/org/wikipedia/readinglist/AddToReadingListDialog.java M app/src/main/java/org/wikipedia/settings/Prefs.java M app/src/main/res/layout/dialog_add_to_reading_list.xml M app/src/main/res/values-qq/strings.xml M app/src/main/res/values/preference_keys.xml M app/src/main/res/values/strings.xml M app/src/main/res/xml/developer_preferences.xml 11 files changed, 228 insertions(+), 96 deletions(-) Approvals: Niedzielski: Looks good to me, approved jenkins-bot: Verified diff --git a/app/src/main/java/org/wikipedia/onboarding/OnboardingStateMachine.java b/app/src/main/java/org/wikipedia/onboarding/OnboardingStateMachine.java index 4568a38..b755f1f 100644 --- a/app/src/main/java/org/wikipedia/onboarding/OnboardingStateMachine.java +++ b/app/src/main/java/org/wikipedia/onboarding/OnboardingStateMachine.java @@ -7,4 +7,6 @@ void setSelectTextTutorial(); boolean isShareTutorialEnabled(); void setShareTutorial(); +boolean isReadingListTutorialEnabled(); +void setReadingListTutorial(); } \ No newline at end of file diff --git a/app/src/main/java/org/wikipedia/onboarding/PrefsOnboardingStateMachine.java b/app/src/main/java/org/wikipedia/onboarding/PrefsOnboardingStateMachine.java index 27b6b50..6f020d4 100644 --- a/app/src/main/java/org/wikipedia/onboarding/PrefsOnboardingStateMachine.java +++ b/app/src/main/java/org/wikipedia/onboarding/PrefsOnboardingStateMachine.java @@ -53,6 +53,16 @@ updateTimeSinceLastTutorial(); } +@Override +public boolean isReadingListTutorialEnabled() { +return Prefs.isReadingListTutorialEnabled(); +} + +@Override +public void setReadingListTutorial() { +Prefs.setReadingListTutorialEnabled(false); +} + private void updateTimeSinceLastTutorial() { millisSinceLastTutorial = System.currentTimeMillis(); } diff --git a/app/src/main/java/org/wikipedia/page/NavDrawerHelper.java b/app/src/main/java/org/wikipedia/page/NavDrawerHelper.java index 0e187a1..72a0b36 100644 --- a/app/src/main/java/org/wikipedia/page/NavDrawerHelper.java +++ b/app/src/main/java/org/wikipedia/page/NavDrawerHelper.java @@ -38,6 +38,7 @@ private TextView accountNameView; private ImageView accountNameArrow; private boolean accountToggle; +private boolean isTempExplicitHighlight; public NavDrawerHelper(@NonNull PageActivity activity, View navDrawerHeader) { this.funnel = new NavMenuFunnel(); @@ -136,11 +137,23 @@ }); } -public void updateItemSelection(Fragment fragment) { -@IdRes Integer id = fragmentToMenuId(fragment); +public void updateItemSelection(@Nullable Fragment fragment) { +@IdRes Integer id = fragment == null ? null : fragmentToMenuId(fragment.getClass()); +if (id != null && !isTempExplicitHighlight) { +setMenuItemSelection(id); +} +} + +public void setTempExplicitHighlight(Class fragmentClass) { +@IdRes Integer id = fragmentToMenuId(fragmentClass); if (id != null) { setMenuItemSelection(id); } +isTempExplicitHighlight = true; +} + +public void clearTempExplicitHighlight() { +isTempExplicitHighlight = false; } private void setMenuItemSelection(@IdRes int id) { @@ -187,14 +200,16 @@ && activity.getCurPageFragment().getPage().isMainPage(); } -@Nullable @IdRes private Integer fragmentToMenuId(Fragment fragment) { -if (fragment instanceof PageFragment) { +@Nullable @IdRes private Integer fragmentToMenuId(Class fragment) { +if (fragment == PageFragment.class) { return R.id.nav_item_today; -} else if (fragment instanceof HistoryFragment) { +} else if (fragment == HistoryFragment.class) { return R.id.nav_item_history; -} else if (fragment instanceof ReadingListsFragment) { +} else if (fragment == SavedPagesFragment.class) { +return R.id.nav_item_saved_pages; +} else if (fragment == ReadingListsFragment.class) { return R.id.nav_item_reading_lists; -} else if (fragment instanceof NearbyFragment) { +} else if (fragment == NearbyFragment.class) { return R.id.nav_item_nearby; } return null; diff --git a/app/src/main/java/org/wikipedia/page/PageActivity.java b/app/src/main/java/org/wikipedia/p
[MediaWiki-commits] [Gerrit] Reorganize styles and eliminate special-casing for in-articl... - change (mediawiki...MobileApp)
Sniedzielski has submitted this change and it was merged. Change subject: Reorganize styles and eliminate special-casing for in-article galleries .. Reorganize styles and eliminate special-casing for in-article galleries Move Android-specific less files to new /android subdirectory. Eliminate some special styles no longer needed when the gallery module from MediaWiki is included. The removed style directives are reflected in the app-side patch at https://gerrit.wikimedia.org/r/#/c/282437/ . Change-Id: Ibbcd5abb94ce58b9a45113d3b488facac3efe2fa --- M extension.json R styles/android/ipa.less R styles/android/loading.less R styles/android/parsoid.less R styles/android/tables.less R styles/android/widenImages.less 6 files changed, 13 insertions(+), 26 deletions(-) Approvals: BearND: Looks good to me, but someone else must approve Sniedzielski: Verified; Looks good to me, approved Niedzielski: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/extension.json b/extension.json index e0d5697..9fc0b78 100644 --- a/extension.json +++ b/extension.json @@ -22,15 +22,15 @@ }, "mobile.app.pagestyles.android": { "styles": [ - "styles/android.less", - "styles/editlinks.less", - "styles/issues.less", "styles/disambig.less", - "styles/tables.less", - "styles/ipa.less", + "styles/editlinks.less", "styles/enwiki.less", - "styles/parsoid.less", - "styles/widenImages.less" + "styles/issues.less", + "styles/android/loading.less", + "styles/android/ipa.less", + "styles/android/parsoid.less", + "styles/android/tables.less", + "styles/android/widenImages.less" ] }, "mobile.app.pagestyles.android.night": { @@ -40,10 +40,10 @@ }, "mobile.app.pagestyles.ios": { "styles": [ + "styles/disambig.less", "styles/editlinks.less", "styles/enwiki.less", - "styles/issues.less", - "styles/disambig.less" + "styles/issues.less" ] }, "mobile.app.preview": { diff --git a/styles/ipa.less b/styles/android/ipa.less similarity index 74% rename from styles/ipa.less rename to styles/android/ipa.less index 1ca3d7e..5490986 100644 --- a/styles/ipa.less +++ b/styles/android/ipa.less @@ -2,7 +2,7 @@ display: inline-block; margin-bottom: -3px; /* @embed */ -background-image: url( '../images/ipa.png' ); +background-image: url( '../../images/ipa.png' ); background-size: 28px 16px; height: 16px; width: 28px; diff --git a/styles/android.less b/styles/android/loading.less similarity index 100% rename from styles/android.less rename to styles/android/loading.less diff --git a/styles/parsoid.less b/styles/android/parsoid.less similarity index 83% rename from styles/parsoid.less rename to styles/android/parsoid.less index 16aaa68..5873707 100644 --- a/styles/parsoid.less +++ b/styles/android/parsoid.less @@ -1,5 +1,5 @@ // Copied some styles from minerva with different selectors since Parsoid uses different elements for thumbnails -// see ../../MobileFrontEnd/resources/skins.minerva.content.styles/thumbnails.less +// see ../../MobileFrontend/resources/skins.minerva.content.styles/thumbnails.less .content figcaption { margin: .5em 0 0; font-size: .8em; diff --git a/styles/tables.less b/styles/android/tables.less similarity index 90% rename from styles/tables.less rename to styles/android/tables.less index 3e8f7bf..5e1be09 100644 --- a/styles/tables.less +++ b/styles/android/tables.less @@ -30,7 +30,7 @@ .app_table_collapsed_open { border-radius: 2px; /* @embed */ -background-image: url( '../images/table_expand.png' ); +background-image: url( '../../images/table_expand.png' ); } .app_table_collapse_close { @@ -39,7 +39,7 @@ .app_table_collapse_icon { /* @embed */ -background-image: url( '../images/table_collapse.png' ); +background-image: url( '../../images/table_collapse.png' ); } .app_span_collapse_text { diff --git a/styles/widenImages.less b/styles/android/widenImages.less similarity index 73% rename from styles/widenImages.less rename to styles/android/widenImages.less index 6a896b2.
[MediaWiki-commits] [Gerrit] varnish: switch upload eqiad from 'direct' to 'codfw' - change (operations/puppet)
Filippo Giunchedi has submitted this change and it was merged. Change subject: varnish: switch upload eqiad from 'direct' to 'codfw' .. varnish: switch upload eqiad from 'direct' to 'codfw' Bug: T129089 Change-Id: I0972918c2add9589c9b4145f8b4311d0eb3896a6 --- M hieradata/role/common/cache/upload.yaml 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Filippo Giunchedi: Verified; Looks good to me, approved diff --git a/hieradata/role/common/cache/upload.yaml b/hieradata/role/common/cache/upload.yaml index 3e87281..5147e3c 100644 --- a/hieradata/role/common/cache/upload.yaml +++ b/hieradata/role/common/cache/upload.yaml @@ -21,7 +21,7 @@ #multiple values could cause a race-condition of intermediate states. # cache::route_table: - eqiad: 'direct' + eqiad: 'codfw' codfw: 'direct' ulsfo: 'codfw' esams: 'codfw' -- To view, visit https://gerrit.wikimedia.org/r/282892 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0972918c2add9589c9b4145f8b4311d0eb3896a6 Gerrit-PatchSet: 3 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Filippo Giunchedi Gerrit-Reviewer: BBlack Gerrit-Reviewer: Ema Gerrit-Reviewer: Faidon Liambotis Gerrit-Reviewer: Filippo Giunchedi Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] CRM-18193 do not require log_date - change (wikimedia...civicrm)
jenkins-bot has submitted this change and it was merged. Change subject: CRM-18193 do not require log_date .. CRM-18193 do not require log_date Log_date should be an optional report parameter reflecting the changes in CRM-18193 to make the connection_id unique Change-Id: I998ad45b44e37ec0607481270dba7f201230d792 --- M CRM/Logging/Differ.php M CRM/Logging/ReportDetail.php 2 files changed, 16 insertions(+), 8 deletions(-) Approvals: Ejegg: Looks good to me, approved jenkins-bot: Verified diff --git a/CRM/Logging/Differ.php b/CRM/Logging/Differ.php index 5ed8dff..b6f32f8 100644 --- a/CRM/Logging/Differ.php +++ b/CRM/Logging/Differ.php @@ -269,11 +269,16 @@ } /** - * @param $table + * Get the titles & metadata option values for the table. + * + * For custom fields the titles may change so we use the ones as at the reference date. + * + * @param string $table + * @param string $referenceDate * * @return array */ - public function titlesAndValuesForTable($table) { + public function titlesAndValuesForTable($table, $referenceDate) { // static caches for subsequent calls with the same $table static $titles = array(); static $values = array(); @@ -325,7 +330,7 @@ } } elseif (substr($table, 0, 14) == 'civicrm_value_') { -list($titles[$table], $values[$table]) = $this->titlesAndValuesForCustomDataTable($table); +list($titles[$table], $values[$table]) = $this->titlesAndValuesForCustomDataTable($table, $referenceDate); } else { $titles[$table] = $values[$table] = array(); @@ -348,17 +353,20 @@ } /** - * @param $table + * Get the field titles & option group values for the custom table as at the reference date. + * + * @param string $table + * @param string $referenceDate * * @return array */ - private function titlesAndValuesForCustomDataTable($table) { + private function titlesAndValuesForCustomDataTable($table, $referenceDate) { $titles = array(); $values = array(); $params = array( 1 => array($this->log_conn_id, 'String'), - 2 => array($this->log_date, 'String'), + 2 => array($referenceDate, 'String'), 3 => array($table, 'String'), ); diff --git a/CRM/Logging/ReportDetail.php b/CRM/Logging/ReportDetail.php index edd24f1..f5c32f6 100644 --- a/CRM/Logging/ReportDetail.php +++ b/CRM/Logging/ReportDetail.php @@ -127,7 +127,7 @@ */ public function buildRows($sql, &$rows) { // safeguard for when there aren’t any log entries yet -if (!$this->log_conn_id or !$this->log_date) { +if (!$this->log_conn_id && !$this->log_date) { return; } $this->getDiffs(); @@ -177,7 +177,7 @@ foreach ($this->diffs as $diff) { $table = $diff['table']; if (empty($metadata[$table])) { -list($metadata[$table]['titles'], $metadata[$table]['values']) = $this->differ->titlesAndValuesForTable($table); +list($metadata[$table]['titles'], $metadata[$table]['values']) = $this->differ->titlesAndValuesForTable($table, $diff['log_date']); } $values = CRM_Utils_Array::value('values', $metadata[$diff['table']], array()); $titles = $metadata[$diff['table']]['titles']; -- To view, visit https://gerrit.wikimedia.org/r/282092 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I998ad45b44e37ec0607481270dba7f201230d792 Gerrit-PatchSet: 2 Gerrit-Project: wikimedia/fundraising/crm/civicrm Gerrit-Branch: master Gerrit-Owner: Eileen Gerrit-Reviewer: Awight Gerrit-Reviewer: Ejegg Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] User experience for Reading Lists, part 2. - change (apps...wikipedia)
jenkins-bot has submitted this change and it was merged. Change subject: User experience for Reading Lists, part 2. .. User experience for Reading Lists, part 2. - Integrate "add to list" into context menus and link preview menu. The menu items still coexist with the existing "Save Page" items. These will be removed in the final patch that seals the fate of saved pages. Change-Id: I04147d3b3f5939d7fb4d4b02a0a8d1899f23b98f --- M app/src/main/java/org/wikipedia/page/PageActivity.java M app/src/main/java/org/wikipedia/page/PageActivityLongPressHandler.java M app/src/main/java/org/wikipedia/page/PageFragment.java M app/src/main/java/org/wikipedia/page/PageInfoDialog.java M app/src/main/java/org/wikipedia/page/PageLongPressHandler.java M app/src/main/java/org/wikipedia/page/leadimages/LeadImagesHandler.java M app/src/main/java/org/wikipedia/page/linkpreview/LinkPreviewDialog.java M app/src/main/java/org/wikipedia/readinglist/AddToReadingListDialog.java M app/src/main/java/org/wikipedia/readinglist/ReadingListDetailView.java M app/src/main/res/menu/menu_link_preview.xml M app/src/main/res/menu/menu_page_long_press.xml M app/src/main/res/values-qq/strings.xml M app/src/main/res/values/strings.xml M app/src/main/res/values/strings_no_translate.xml 14 files changed, 80 insertions(+), 5 deletions(-) Approvals: Niedzielski: Looks good to me, approved jenkins-bot: Verified diff --git a/app/src/main/java/org/wikipedia/page/PageActivity.java b/app/src/main/java/org/wikipedia/page/PageActivity.java index 83413fa..aa92e68 100644 --- a/app/src/main/java/org/wikipedia/page/PageActivity.java +++ b/app/src/main/java/org/wikipedia/page/PageActivity.java @@ -19,6 +19,7 @@ import org.wikipedia.page.linkpreview.LinkPreviewDialog; import org.wikipedia.page.snippet.CompatActionMode; import org.wikipedia.random.RandomHandler; +import org.wikipedia.readinglist.AddToReadingListDialog; import org.wikipedia.readinglist.ReadingListsFragment; import org.wikipedia.recurring.RecurringTasksExecutor; import org.wikipedia.search.SearchArticlesFragment; @@ -698,6 +699,19 @@ bottomSheetPresenter.show(dialog); } +public void showAddToListDialog(PageTitle title) { +AddToReadingListDialog dialog = AddToReadingListDialog.newInstance(title); +dialog.setOnDismissListener(new DialogInterface.OnDismissListener() { +@Override +public void onDismiss(DialogInterface dialog) { +if (getCurPageFragment() != null) { +getCurPageFragment().updateBookmark(); +} +} +}); +bottomSheetPresenter.show(dialog); +} + public void showReadingListAddedSnackbar(String message) { Snackbar snackbar = FeedbackUtil.makeSnackbar(fragmentContainerView, message, FeedbackUtil.LENGTH_DEFAULT); diff --git a/app/src/main/java/org/wikipedia/page/PageActivityLongPressHandler.java b/app/src/main/java/org/wikipedia/page/PageActivityLongPressHandler.java index 32d0093..11c5dbe 100644 --- a/app/src/main/java/org/wikipedia/page/PageActivityLongPressHandler.java +++ b/app/src/main/java/org/wikipedia/page/PageActivityLongPressHandler.java @@ -5,15 +5,16 @@ import org.wikipedia.R; import org.wikipedia.WikipediaApp; import org.wikipedia.history.HistoryEntry; +import org.wikipedia.savedpages.SaveOtherPageCallback; import org.wikipedia.server.PageService; import org.wikipedia.server.PageServiceFactory; -import org.wikipedia.savedpages.SaveOtherPageCallback; import org.wikipedia.util.ClipboardUtil; import org.wikipedia.util.FeedbackUtil; import org.wikipedia.util.ShareUtil; public abstract class PageActivityLongPressHandler implements PageLongPressHandler.ContextMenuListener { -@NonNull private final PageActivity activity; +@NonNull +private final PageActivity activity; public PageActivityLongPressHandler(@NonNull PageActivity activity) { this.activity = activity; @@ -45,6 +46,11 @@ saveOtherPage(title); } +@Override +public void onAddToList(PageTitle title) { +activity.showAddToListDialog(title); +} + private void copyLink(String url) { ClipboardUtil.setPlainText(activity, null, url); } diff --git a/app/src/main/java/org/wikipedia/page/PageFragment.java b/app/src/main/java/org/wikipedia/page/PageFragment.java index 719f57d..b46f49b 100755 --- a/app/src/main/java/org/wikipedia/page/PageFragment.java +++ b/app/src/main/java/org/wikipedia/page/PageFragment.java @@ -595,6 +595,10 @@ leadImagesHandler.updateBookmark(pageSaved); } +public void updateBookmark() { +leadImagesHandler.updateBookmark(); +} + public void onActionModeShown(CompatActionMode mode) { // make sure we have a page loaded, since shareHandler makes references to it. if (model.getPage() != null) { diff --git a/app/src/main/j
[MediaWiki-commits] [Gerrit] varnish: switch esams from 'eqiad' to 'codfw' - change (operations/puppet)
Filippo Giunchedi has submitted this change and it was merged. Change subject: varnish: switch esams from 'eqiad' to 'codfw' .. varnish: switch esams from 'eqiad' to 'codfw' Bug: T129089 Change-Id: I51bef4b410b35b187fb38b2f708d7f08921d5b9a --- M hieradata/role/common/cache/upload.yaml 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Filippo Giunchedi: Verified; Looks good to me, approved diff --git a/hieradata/role/common/cache/upload.yaml b/hieradata/role/common/cache/upload.yaml index ce54492..3e87281 100644 --- a/hieradata/role/common/cache/upload.yaml +++ b/hieradata/role/common/cache/upload.yaml @@ -24,4 +24,4 @@ eqiad: 'direct' codfw: 'direct' ulsfo: 'codfw' - esams: 'eqiad' + esams: 'codfw' -- To view, visit https://gerrit.wikimedia.org/r/283418 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I51bef4b410b35b187fb38b2f708d7f08921d5b9a Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Filippo Giunchedi Gerrit-Reviewer: BBlack Gerrit-Reviewer: Faidon Liambotis Gerrit-Reviewer: Filippo Giunchedi Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] User experience for Reading Lists, part 1. - change (apps...wikipedia)
jenkins-bot has submitted this change and it was merged. Change subject: User experience for Reading Lists, part 1. .. User experience for Reading Lists, part 1. - Implements the UI for viewing and managing Reading Lists, accessible from the Nav menu. - Implements the UI for adding an article to a reading list, by pressing the "bookmark" icon below the lead image. The business logic of dealing with the actual collection of reading lists is handled by an interface called ReadingListData. In this patch, the interface is implemented by a static hard-coded list. In the final implementation, it should be handled by actual DB interactions. Additionally, in the final implementation, certain elements will probably need to be converted to asynchronous operation. Note: the "Reading Lists" nav menu item will coexist with the "Saved Pages" item, and is feature-flagged for non-production builds. Saved Pages will be completely removed when reading lists are fully implemented. Bug: T127711 Bug: T129590 Change-Id: I1d8d2fd59c944522781c3bd606bacc7b49ecd820 --- M app/build.gradle M app/src/main/java/org/wikipedia/history/HistoryEntry.java M app/src/main/java/org/wikipedia/page/NavDrawerHelper.java M app/src/main/java/org/wikipedia/page/PageActivity.java M app/src/main/java/org/wikipedia/page/leadimages/ArticleMenuBarView.java M app/src/main/java/org/wikipedia/page/leadimages/LeadImagesHandler.java A app/src/main/java/org/wikipedia/readinglist/AddToReadingListDialog.java A app/src/main/java/org/wikipedia/readinglist/NoSwipeViewPager.java A app/src/main/java/org/wikipedia/readinglist/ReadingList.java A app/src/main/java/org/wikipedia/readinglist/ReadingListData.java A app/src/main/java/org/wikipedia/readinglist/ReadingListDetailView.java A app/src/main/java/org/wikipedia/readinglist/ReadingListDialogs.java A app/src/main/java/org/wikipedia/readinglist/ReadingListFakeData.java A app/src/main/java/org/wikipedia/readinglist/ReadingListImageFetcher.java A app/src/main/java/org/wikipedia/readinglist/ReadingListItemView.java A app/src/main/java/org/wikipedia/readinglist/ReadingListsFragment.java A app/src/main/res/drawable-hdpi/ic_mode_edit_white_24dp.png A app/src/main/res/drawable-hdpi/ic_sort_white_24dp.png A app/src/main/res/drawable-mdpi/ic_mode_edit_white_24dp.png A app/src/main/res/drawable-mdpi/ic_sort_white_24dp.png A app/src/main/res/drawable-xhdpi/ic_mode_edit_white_24dp.png A app/src/main/res/drawable-xhdpi/ic_sort_white_24dp.png A app/src/main/res/drawable-xxhdpi/ic_mode_edit_white_24dp.png A app/src/main/res/drawable-xxhdpi/ic_sort_white_24dp.png A app/src/main/res/drawable-xxxhdpi/ic_mode_edit_white_24dp.png A app/src/main/res/drawable-xxxhdpi/ic_sort_white_24dp.png A app/src/main/res/layout/dialog_add_to_reading_list.xml A app/src/main/res/layout/dialog_reading_list_edit.xml A app/src/main/res/layout/fragment_reading_lists.xml M app/src/main/res/layout/item_page_list_entry.xml A app/src/main/res/layout/item_reading_list.xml A app/src/main/res/layout/item_reading_list_detail.xml M app/src/main/res/menu/menu_nav_drawer.xml M app/src/main/res/values-qq/strings.xml M app/src/main/res/values/attrs.xml M app/src/main/res/values/colors.xml M app/src/main/res/values/dimens.xml M app/src/main/res/values/strings.xml M app/src/main/res/values/styles_dark.xml M app/src/main/res/values/styles_light.xml 40 files changed, 1,808 insertions(+), 7 deletions(-) Approvals: Niedzielski: Looks good to me, approved jenkins-bot: Verified diff --git a/app/build.gradle b/app/build.gradle index 32a2fce..47d2108 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -164,6 +164,7 @@ String espressoVersion = '2.2.1' compile "com.android.support:appcompat-v7:$supportVersion" // includes support-v4 +compile "com.android.support:cardview-v7:$supportVersion" compile "com.android.support:design:$supportVersion" compile "com.android.support:recyclerview-v7:$supportVersion" compile "com.android.support:percent:$supportVersion" diff --git a/app/src/main/java/org/wikipedia/history/HistoryEntry.java b/app/src/main/java/org/wikipedia/history/HistoryEntry.java index d2544ef..9ba7313 100644 --- a/app/src/main/java/org/wikipedia/history/HistoryEntry.java +++ b/app/src/main/java/org/wikipedia/history/HistoryEntry.java @@ -19,6 +19,7 @@ public static final int SOURCE_MAIN_PAGE = 8; public static final int SOURCE_NEARBY = 9; public static final int SOURCE_DISAMBIG = 10; +public static final int SOURCE_READING_LIST = 11; private final PageTitle title; private final Date timestamp; diff --git a/app/src/main/java/org/wikipedia/page/NavDrawerHelper.java b/app/src/main/java/org/wikipedia/page/NavDrawerHelper.java index ca84d79..0e187a1 100644 --- a/app/src/main/java/org/wikipedia/page/NavDrawerHelper.java +++ b/app/src/main/java/org/wikipedia/page/NavDrawerHelper.java @@ -23,9 +23,11 @@ import org.wikipedia.login.Logi
[MediaWiki-commits] [Gerrit] Use proper mdash in 'mwe-upwiz-license-none-head' message - change (mediawiki...UploadWizard)
Bartosz Dziewoński has uploaded a new change for review. https://gerrit.wikimedia.org/r/283507 Change subject: Use proper mdash in 'mwe-upwiz-license-none-head' message .. Use proper mdash in 'mwe-upwiz-license-none-head' message Change-Id: I5ba392e0f4d9b5ee1360a88e8a27297cd485e47e --- M i18n/en.json 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UploadWizard refs/changes/07/283507/1 diff --git a/i18n/en.json b/i18n/en.json index 7c5aa6b..fcc697d 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -285,7 +285,7 @@ "mwe-upwiz-license-misc": "Miscellaneous reasons", "mwe-upwiz-license-custom-head": "Another reason not mentioned above", "mwe-upwiz-license-custom-preview": "Preview", - "mwe-upwiz-license-none-head": "I found it on the Internet -- I'm not sure", + "mwe-upwiz-license-none-head": "I found it on the Internet — I'm not sure", "mwe-upwiz-license-none": "I believe {{PLURAL:$1|this work is|these works are}} freely licensed or legally in the public domain. I understand that if I do not add the necessary licensing information in a timely fashion, the {{PLURAL:$1|file|files}} may be deleted.", "mwe-upwiz-license-confirm-remove": "Are you sure you want to remove {{PLURAL:$1|this upload|these uploads}}?", "mwe-upwiz-license-confirm-remove-title": "Confirm remove", -- To view, visit https://gerrit.wikimedia.org/r/283507 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5ba392e0f4d9b5ee1360a88e8a27297cd485e47e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UploadWizard Gerrit-Branch: master Gerrit-Owner: Bartosz Dziewoński ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Follow-up Idb1202579: Add special-characters-group-greekexte... - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Follow-up Idb1202579: Add special-characters-group-greekextended to RL module .. Follow-up Idb1202579: Add special-characters-group-greekextended to RL module Bug: T130535 Change-Id: I3e26d08a34283eaafe129dbef0944ea10c086162 --- M includes/resourceloader/ResourceLoaderSpecialCharacterDataModule.php 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Alex Monk: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/resourceloader/ResourceLoaderSpecialCharacterDataModule.php b/includes/resourceloader/ResourceLoaderSpecialCharacterDataModule.php index 222135c..44371bb 100644 --- a/includes/resourceloader/ResourceLoaderSpecialCharacterDataModule.php +++ b/includes/resourceloader/ResourceLoaderSpecialCharacterDataModule.php @@ -78,6 +78,7 @@ 'special-characters-group-ipa', 'special-characters-group-symbols', 'special-characters-group-greek', + 'special-characters-group-greekextended', 'special-characters-group-cyrillic', 'special-characters-group-arabic', 'special-characters-group-arabicextended', -- To view, visit https://gerrit.wikimedia.org/r/283500 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3e26d08a34283eaafe129dbef0944ea10c086162 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Esanders Gerrit-Reviewer: Alex Monk Gerrit-Reviewer: Esanders Gerrit-Reviewer: Jforrester Gerrit-Reviewer: Krinkle Gerrit-Reviewer: Legoktm Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] CRM-18366 Fix contact logging detail to show all related cha... - change (wikimedia...civicrm)
jenkins-bot has submitted this change and it was merged. Change subject: CRM-18366 Fix contact logging detail to show all related changes & revert all related changes .. CRM-18366 Fix contact logging detail to show all related changes & revert all related changes This report switches from a hard-coded list of contact related tables to considering all tables with an FK to civicrm_contact, including entity_tag group_subscription, batch, financial_item etc. The revert makes the same switch. Note that with this change a full subset may still not be retrieved - in order to get that you need to enable the changes from CRM-18193 & apply all patches related to that issue (one will build on this) Change-Id: I587b9140c188b23dfa8df8ebb70a43bff82cf874 --- M CRM/Logging/Differ.php M CRM/Logging/ReportDetail.php M CRM/Report/Form/Contact/LoggingDetail.php 3 files changed, 108 insertions(+), 35 deletions(-) Approvals: Ejegg: Looks good to me, approved jenkins-bot: Verified diff --git a/CRM/Logging/Differ.php b/CRM/Logging/Differ.php index 6dca866..5ed8dff 100644 --- a/CRM/Logging/Differ.php +++ b/CRM/Logging/Differ.php @@ -169,6 +169,7 @@ * @param int $id * * @return array + * @throws \CRM_Core_Exception */ private function diffsInTableForId($table, $id) { $diffs = array(); diff --git a/CRM/Logging/ReportDetail.php b/CRM/Logging/ReportDetail.php index 974b7ca..edd24f1 100644 --- a/CRM/Logging/ReportDetail.php +++ b/CRM/Logging/ReportDetail.php @@ -48,6 +48,20 @@ protected $summary; /** + * Instance of Differ. + * + * @var CRM_Logging_Differ + */ + protected $differ; + + /** + * Array of changes made. + * + * @var array + */ + protected $diffs = array(); + + /** * Don't display the Add these contacts to Group button. * * @var bool @@ -98,6 +112,10 @@ } /** + * Build query for report. + * + * We override this to be empty & calculate the rows in the buildRows function. + * * @param bool $applyLimit */ public function buildQuery($applyLimit = TRUE) { @@ -112,16 +130,25 @@ if (!$this->log_conn_id or !$this->log_date) { return; } +$this->getDiffs(); +$rows = $this->convertDiffsToRows(); + } -if (empty($rows)) { - - $rows = array(); - + /** + * Get the diffs for the report, calculating them if not already done. + * + * Note that contact details report now uses a more comprehensive method but + * the contribution logging details report still uses this. + * + * @return array + */ + protected function getDiffs() { +if (empty($this->diffs)) { + foreach ($this->tables as $table) { +$this->diffs = array_merge($this->diffs, $this->diffsInTable($table)); + } } - -foreach ($this->tables as $table) { - $rows = array_merge($rows, $this->diffsInTable($table)); -} +return $this->diffs; } /** @@ -130,21 +157,30 @@ * @return array */ protected function diffsInTable($table) { -$rows = array(); +$this->setDiffer(); +return $this->differ->diffsInTable($table, $this->cid); + } -$differ = new CRM_Logging_Differ($this->log_conn_id, $this->log_date, $this->interval); -$diffs = $differ->diffsInTable($table, $this->cid); - + /** + * Convert the diffs to row format. + * + * @return array + */ + protected function convertDiffsToRows() { // return early if nothing found -if (empty($diffs)) { - return $rows; +if (empty($this->diffs)) { + return array(); } -list($titles, $values) = $differ->titlesAndValuesForTable($table); - // populate $rows with only the differences between $changed and $original (skipping certain columns and NULL ↔ empty changes unless raw requested) -$skipped = array('contact_id', 'entity_id', 'id'); -foreach ($diffs as $diff) { +$skipped = array('id'); +foreach ($this->diffs as $diff) { + $table = $diff['table']; + if (empty($metadata[$table])) { +list($metadata[$table]['titles'], $metadata[$table]['values']) = $this->differ->titlesAndValuesForTable($table); + } + $values = CRM_Utils_Array::value('values', $metadata[$diff['table']], array()); + $titles = $metadata[$diff['table']]['titles']; $field = $diff['field']; $from = $diff['from']; $to = $diff['to']; @@ -239,6 +275,55 @@ } /** + * Calculate all the contact related diffs for the change. + * + * @return array + */ + protected function calculateContactDiffs(){ +$this->diffs = $this->getAllContactChangesForConnection(); + } + + + /** + * Get an array of changes made in the mysql connection. + * + * @return mixed + */ + public function getAllContactChangesForConnection() { +if (empty($this->log_conn_id)) { + return array(); +} +$this->setDiffer(); +try { + return $this->differ->getAllChangesF
[MediaWiki-commits] [Gerrit] depool upload/eqiad for codfw switchover - change (operations/dns)
Filippo Giunchedi has submitted this change and it was merged. Change subject: depool upload/eqiad for codfw switchover .. depool upload/eqiad for codfw switchover Change-Id: Ia19656255bfd0f9ba182fc3cabed7ee6e8dec3aa --- M admin_state 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Filippo Giunchedi: Verified; Looks good to me, approved BBlack: Looks good to me, but someone else must approve diff --git a/admin_state b/admin_state index 7295eeb..84bf0dd 100644 --- a/admin_state +++ b/admin_state @@ -69,3 +69,4 @@ # geoip/text-*/ulsfo => UP # ... this overrides the line above completely # ## +geoip/upload-addrs/eqiad => DOWN -- To view, visit https://gerrit.wikimedia.org/r/283416 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia19656255bfd0f9ba182fc3cabed7ee6e8dec3aa Gerrit-PatchSet: 2 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: Filippo Giunchedi Gerrit-Reviewer: BBlack Gerrit-Reviewer: Filippo Giunchedi Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Follow-up Idb1202579: Add special-characters-group-greekexte... - change (mediawiki/core)
Alex Monk has uploaded a new change for review. https://gerrit.wikimedia.org/r/283506 Change subject: Follow-up Idb1202579: Add special-characters-group-greekextended to RL module .. Follow-up Idb1202579: Add special-characters-group-greekextended to RL module Bug: T130535 Change-Id: I3e26d08a34283eaafe129dbef0944ea10c086162 --- M includes/resourceloader/ResourceLoaderSpecialCharacterDataModule.php 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/06/283506/1 diff --git a/includes/resourceloader/ResourceLoaderSpecialCharacterDataModule.php b/includes/resourceloader/ResourceLoaderSpecialCharacterDataModule.php index 222135c..44371bb 100644 --- a/includes/resourceloader/ResourceLoaderSpecialCharacterDataModule.php +++ b/includes/resourceloader/ResourceLoaderSpecialCharacterDataModule.php @@ -78,6 +78,7 @@ 'special-characters-group-ipa', 'special-characters-group-symbols', 'special-characters-group-greek', + 'special-characters-group-greekextended', 'special-characters-group-cyrillic', 'special-characters-group-arabic', 'special-characters-group-arabicextended', -- To view, visit https://gerrit.wikimedia.org/r/283506 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3e26d08a34283eaafe129dbef0944ea10c086162 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.27.0-wmf.21 Gerrit-Owner: Alex Monk Gerrit-Reviewer: Esanders ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits