[MediaWiki-commits] [Gerrit] Fix order of timestamps in Timestamp formats array - change (mediawiki/core)
Kambiz Darabi has uploaded a new change for review. https://gerrit.wikimedia.org/r/103212 Change subject: Fix order of timestamps in Timestamp formats array .. Fix order of timestamps in Timestamp formats array The order didn't match the array indices defined in GlobalFunctions.php Change-Id: I3c3da72f79d0f4624da64d3df1579f99f51078d7 --- M includes/GlobalFunctions.php M includes/Timestamp.php 2 files changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/12/103212/1 diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index b2a8f5e..ca8f719 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -2428,7 +2428,7 @@ /** * ISO 8601 basic format with no timezone: 19860209T20Z. This is used by ResourceLoader */ -define( 'TS_ISO_8601_BASIC', 9 ); +define( 'TS_ISO_8601_BASIC', 8 ); /** * Get a timestamp string in one of various formats diff --git a/includes/Timestamp.php b/includes/Timestamp.php index c1c6455..eccdc51 100644 --- a/includes/Timestamp.php +++ b/includes/Timestamp.php @@ -36,12 +36,12 @@ TS_UNIX => 'U', TS_MW => 'YmdHis', TS_DB => 'Y-m-d H:i:s', - TS_ISO_8601 => 'Y-m-d\TH:i:s\Z', - TS_ISO_8601_BASIC => 'Ymd\THis\Z', - TS_EXIF => 'Y:m:d H:i:s', // This shouldn't ever be used, but is included for completeness TS_RFC2822 => 'D, d M Y H:i:s', + TS_ISO_8601 => 'Y-m-d\TH:i:s\Z', + TS_EXIF => 'Y:m:d H:i:s', // This shouldn't ever be used, but is included for completeness TS_ORACLE => 'd-m-Y H:i:s.00', // Was 'd-M-y h.i.s A' . ' +00:00' before r51500 TS_POSTGRES => 'Y-m-d H:i:s', + TS_ISO_8601_BASIC => 'Ymd\THis\Z', ); /** -- To view, visit https://gerrit.wikimedia.org/r/103212 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3c3da72f79d0f4624da64d3df1579f99f51078d7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Kambiz Darabi ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Clearer message for range blocks on CreateAccount - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Clearer message for range blocks on CreateAccount .. Clearer message for range blocks on CreateAccount If a user tries to create an account but their IP address is part of a range block, this will be reflected in the error that is displayed via the cantcreateaccount-range-text message. Bug: 35090 Change-Id: I74e912755dea93c2b74e67d7104b7525298051c0 --- M includes/specials/SpecialUserlogin.php M languages/messages/MessagesEn.php M languages/messages/MessagesQqq.php M maintenance/language/messages.inc 4 files changed, 24 insertions(+), 6 deletions(-) Approvals: Brian Wolff: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/specials/SpecialUserlogin.php b/includes/specials/SpecialUserlogin.php index b9a84be..d071e75 100644 --- a/includes/specials/SpecialUserlogin.php +++ b/includes/specials/SpecialUserlogin.php @@ -980,14 +980,23 @@ # haven't bothered to log out before trying to create an account to # evade it, but we'll leave that to their guilty conscience to figure # out. + $errorParams = array( + $block->getTarget(), + $block->mReason ? $block->mReason : $this->msg( 'blockednoreason' )->text(), + $block->getByName() + ); + + if ( $block->getType() === Block::TYPE_RANGE ) { + $errorMessage = 'cantcreateaccount-range-text'; + $errorParams[] = $this->getRequest()->getIP(); + } else { + $errorMessage = 'cantcreateaccount-text'; + } + throw new ErrorPageError( 'cantcreateaccounttitle', - 'cantcreateaccount-text', - array( - $block->getTarget(), - $block->mReason ? $block->mReason : $this->msg( 'blockednoreason' )->text(), - $block->getByName() - ) + $errorMessage, + $errorParams ); } diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index e815995..f645531 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -1615,6 +1615,9 @@ # Account creation failure 'cantcreateaccounttitle' => 'Cannot create account', +'cantcreateaccount-range-text' => "Account creation from IP addresses in the range '''$1''', which includes your IP address ('''$4'''), has been blocked by [[User:$3|$3]]. + +The reason given by $3 is ''$2''", 'cantcreateaccount-text' => "Account creation from this IP address ('''$1''') has been blocked by [[User:$3|$3]]. The reason given by $3 is ''$2''", diff --git a/languages/messages/MessagesQqq.php b/languages/messages/MessagesQqq.php index 4fc329a..803067e 100644 --- a/languages/messages/MessagesQqq.php +++ b/languages/messages/MessagesQqq.php @@ -2266,6 +2266,11 @@ * $1 - target IP address * $2 - reason or {{msg-mw|blockednoreason}} * $3 - username', +'cantcreateaccount-range-text' => "Used as more detailed version of the {{msg-mw|Cantcreateaccount-text}} error message, with the title {{msg-mw|cantcreateaccounttitle}}. +* $1 - target IP range +* $2 - reason or {{msg-mw|blockednoreason}} +* $3 - username +* $4 - current user's IP address", # History pages 'viewpagelogs' => 'Link displayed in history of pages', diff --git a/maintenance/language/messages.inc b/maintenance/language/messages.inc index 662c3d3..5e463b2 100644 --- a/maintenance/language/messages.inc +++ b/maintenance/language/messages.inc @@ -800,6 +800,7 @@ 'cantcreateaccount' => array( 'cantcreateaccounttitle', 'cantcreateaccount-text', + 'cantcreateaccount-range-text', ), 'history' => array( 'viewpagelogs', -- To view, visit https://gerrit.wikimedia.org/r/103204 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I74e912755dea93c2b74e67d7104b7525298051c0 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Theopolisme Gerrit-Reviewer: Aaron Schulz Gerrit-Reviewer: Brian Wolff Gerrit-Reviewer: Parent5446 Gerrit-Reviewer: Qgil Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [PEP8] changes - change (pywikibot/compat)
jenkins-bot has submitted this change and it was merged. Change subject: [PEP8] changes .. [PEP8] changes Change-Id: I45586fd4dd0864c6a210432ad7d619fced942b3b --- M pageimport.py 1 file changed, 7 insertions(+), 7 deletions(-) Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified diff --git a/pageimport.py b/pageimport.py index dce9604..b362c62 100644 --- a/pageimport.py +++ b/pageimport.py @@ -38,7 +38,7 @@ class Importer(pywikibot.Page): - + def __init__(self, site): self.importsite = site pywikibot.Page.__init__(self, site, 'Special:Import', None, 0) @@ -46,18 +46,18 @@ def Import(self, target, project='w', crono='1', namespace='', prompt=True): """Import the page from the wiki. Requires administrator status. If prompt is True, asks the user if he wants to delete the page. - + """ if project == 'w': -site = pywikibot.getSite(fam = 'wikipedia') +site = pywikibot.getSite(fam='wikipedia') elif project == 'b': -site = pywikibot.getSite(fam = 'wikibooks') +site = pywikibot.getSite(fam='wikibooks') elif project == 'wikt': -site = pywikibot.getSite(fam = 'wiktionary') +site = pywikibot.getSite(fam='wiktionary') elif project == 's': -site = pywikibot.getSite(fam = 'wikisource') +site = pywikibot.getSite(fam='wikisource') elif project == 'q': -site = pywikibot.getSite(fam = 'wikiquote') +site = pywikibot.getSite(fam='wikiquote') else: site = pywikibot.getSite() # Fixing the crono value... -- To view, visit https://gerrit.wikimedia.org/r/103209 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I45586fd4dd0864c6a210432ad7d619fced942b3b Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/compat Gerrit-Branch: master Gerrit-Owner: Xqt Gerrit-Reviewer: Ladsgroup Gerrit-Reviewer: Xqt Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [PEP8] changes, do not override standard object identifier - change (pywikibot/compat)
Xqt has uploaded a new change for review. https://gerrit.wikimedia.org/r/103211 Change subject: [PEP8] changes, do not override standard object identifier .. [PEP8] changes, do not override standard object identifier Change-Id: Ie975c1e7d3d18224eb42ad9a4796ab01e6cad8cc --- M saveHTML.py 1 file changed, 60 insertions(+), 46 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/compat refs/changes/11/103211/1 diff --git a/saveHTML.py b/saveHTML.py index eb2b3fc..ef2e99c 100644 --- a/saveHTML.py +++ b/saveHTML.py @@ -23,15 +23,22 @@ """ # (C) 2004 Thomas R. Koll, -# (C) Pywikipedia bot team, 2004-2011 +# (C) Pywikibot team, 2004-2013 # # Distributed under the terms of the MIT license. # __version__ = '$Id$' -import httplib, StringIO, re, sys, md5, os, string -import wikipedia as pywikibot +import httplib +import StringIO +import re +import sys +import md5 +import os +import string +import pywikibot from htmlentitydefs import * + def extractArticle(data): """ takes a string with the complete HTML-file @@ -41,7 +48,8 @@ images = [] s = StringIO.StringIO(data) -rPagestats = re.compile('.*(\.*\<\/span\>).*') +rPagestats = re.compile( +'.*(\.*\<\/span\>).*') rBody = re.compile('.*.*') rFooter = re.compile('.*.*') rDivOpen = re.compile('.*http://upload.wikimedia.org/wikipedia/"; -+mysite.lang + '/' + i['path'] + i['image']) +file = uo.open("http://upload.wikimedia.org/wikipedia/"; + + mysite.lang + '/' + i['path'] + i['image']) content = file.read() -if (len(content) < 500): +if len(content) < 500: uo.close() print "downloading from commons", uo = pywikibot.MyURLopener -file = uo.open( "http://commons.wikimedia.org/upload/"; -+ i['path'] + i['image']) -#print "http://commons.wikimedia.org/upload/";, i['path'] , i['image'], file +file = uo.open("http://commons.wikimedia.org/upload/"; + + i['path'] + i['image']) content = file.read() f = open(output_directory + i['image'], "wb") f.write(content) @@ -220,5 +233,6 @@ print "\t\t", (len(content)/1024), "KB done" conn.close() + if __name__ == "__main__": main() -- To view, visit https://gerrit.wikimedia.org/r/103211 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie975c1e7d3d18224eb42ad9a4796ab01e6cad8cc Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/compat Gerrit-Branch: master Gerrit-Owner: Xqt ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add support from makecat.py - change (translatewiki)
Xqt has uploaded a new change for review. https://gerrit.wikimedia.org/r/103210 Change subject: Add support from makecat.py .. Add support from makecat.py Change-Id: I564c9177e2e6e5caa62859d9e8f2a7dae0562f86 --- M groups/Pywikibot/Pywikibot.yaml 1 file changed, 8 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/10/103210/1 diff --git a/groups/Pywikibot/Pywikibot.yaml b/groups/Pywikibot/Pywikibot.yaml index bfa7827..551654a 100644 --- a/groups/Pywikibot/Pywikibot.yaml +++ b/groups/Pywikibot/Pywikibot.yaml @@ -228,6 +228,14 @@ definitionFile: %GROUPROOT%/pywikibot/isbn.py --- BASIC: + id: out-pywikipedia-makecat + label: Pywikibot Make Cat + +FILES: + sourcePattern: %GROUPROOT%/pywikibot/makecat.py + definitionFile: %GROUPROOT%/pywikibot/makecat.py +--- +BASIC: id: out-pywikipedia-movepages label: Pywikibot Move Pages -- To view, visit https://gerrit.wikimedia.org/r/103210 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I564c9177e2e6e5caa62859d9e8f2a7dae0562f86 Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Xqt ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [PEP8] changes - change (pywikibot/compat)
Xqt has uploaded a new change for review. https://gerrit.wikimedia.org/r/103209 Change subject: [PEP8] changes .. [PEP8] changes Change-Id: I45586fd4dd0864c6a210432ad7d619fced942b3b --- M pageimport.py 1 file changed, 7 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/compat refs/changes/09/103209/1 diff --git a/pageimport.py b/pageimport.py index dce9604..b362c62 100644 --- a/pageimport.py +++ b/pageimport.py @@ -38,7 +38,7 @@ class Importer(pywikibot.Page): - + def __init__(self, site): self.importsite = site pywikibot.Page.__init__(self, site, 'Special:Import', None, 0) @@ -46,18 +46,18 @@ def Import(self, target, project='w', crono='1', namespace='', prompt=True): """Import the page from the wiki. Requires administrator status. If prompt is True, asks the user if he wants to delete the page. - + """ if project == 'w': -site = pywikibot.getSite(fam = 'wikipedia') +site = pywikibot.getSite(fam='wikipedia') elif project == 'b': -site = pywikibot.getSite(fam = 'wikibooks') +site = pywikibot.getSite(fam='wikibooks') elif project == 'wikt': -site = pywikibot.getSite(fam = 'wiktionary') +site = pywikibot.getSite(fam='wiktionary') elif project == 's': -site = pywikibot.getSite(fam = 'wikisource') +site = pywikibot.getSite(fam='wikisource') elif project == 'q': -site = pywikibot.getSite(fam = 'wikiquote') +site = pywikibot.getSite(fam='wikiquote') else: site = pywikibot.getSite() # Fixing the crono value... -- To view, visit https://gerrit.wikimedia.org/r/103209 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I45586fd4dd0864c6a210432ad7d619fced942b3b Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/compat Gerrit-Branch: master Gerrit-Owner: Xqt ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add support from makecat.py - change (translatewiki)
Xqt has uploaded a new change for review. https://gerrit.wikimedia.org/r/103208 Change subject: Add support from makecat.py .. Add support from makecat.py Change-Id: I7383dfc977e5fef7278262c98f28baae02420cce --- M groups/Pywikibot/Pywikibot.yaml 1 file changed, 8 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/08/103208/1 diff --git a/groups/Pywikibot/Pywikibot.yaml b/groups/Pywikibot/Pywikibot.yaml index bfa7827..551654a 100644 --- a/groups/Pywikibot/Pywikibot.yaml +++ b/groups/Pywikibot/Pywikibot.yaml @@ -228,6 +228,14 @@ definitionFile: %GROUPROOT%/pywikibot/isbn.py --- BASIC: + id: out-pywikipedia-makecat + label: Pywikibot Make Cat + +FILES: + sourcePattern: %GROUPROOT%/pywikibot/makecat.py + definitionFile: %GROUPROOT%/pywikibot/makecat.py +--- +BASIC: id: out-pywikipedia-movepages label: Pywikibot Move Pages -- To view, visit https://gerrit.wikimedia.org/r/103208 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7383dfc977e5fef7278262c98f28baae02420cce Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Xqt ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] scripts/lonelypages.py: ported to core - change (pywikibot/core)
Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/103207 Change subject: scripts/lonelypages.py: ported to core .. scripts/lonelypages.py: ported to core Ported lonelypages.py to pywikibot core. Removed some unnecessary inline comments from the code. Change-Id: I6ea13edf73dca8d5e6820eaa792ad33135023446 --- A lonelypages.py (working copy) 1 file changed, 298 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/07/103207/1 diff --git "a/lonelypages.py \050working copy\051" "b/lonelypages.py \050working copy\051" new file mode 100644 index 000..40234d8 --- /dev/null +++ "b/lonelypages.py \050working copy\051" @@ -0,0 +1,298 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +""" +This is a script written to add the template "orphan" to the pages that aren't +linked by other pages. It can give some strange Errors sometime, I hope that +all of them are fixed in this version. + +These command line parameters can be used to specify which pages to work on: + +¶ms; + +-xml Retrieve information from a local XML dump (pages-articles + or pages-meta-current, see http://download.wikimedia.org). + Argument can also be given as "-xml:filename". + +-page Only edit a specific page. + Argument can also be given as "-page:pagetitle". You can + give this parameter multiple times to edit multiple pages. + +Furthermore, the following command line parameters are supported: + +-enable:- Enable or disable the bot via a Wiki Page. + +-disambig: - Set a page where the bot save the name of the disambig + pages found (default: skip the pages) + +-limit: - Set how many pages check. + +-always - Always say yes, won't ask + +--- FixMes --- +* Check that all the code hasn't bugs + +--- Credit and Help --- +This Script has been developed by Pietrodn and Filnik on botwiki. If you want +to help us improving our script archive and pywikipediabot's archive or you +simply need help you can find us here: http://botwiki.sno.cc + +--- Examples --- +python lonelypages.py -enable:User:Bot/CheckBot -always +""" +# +# (C) Pietrodn, it.wiki 2006-2007 +# (C) Filnik, it.wiki 2007 +# (C) Pywikipedia bot team, 2008-2012 +# +# Distributed under the terms of the MIT license. +# +__version__ = '$Id: 3f5675b62cff437bc47eb779768d6514efd0e48e $' +# + +import pywikibot +from pywikibot import i18n +from pywikibot import pagegenerators +from pywikibot import re + +# This is required for the text that is shown when you run this script +# with the parameter -help. +docuReplacements = { +'¶ms;': pagegenerators.parameterHelp, +} + +# +# Here you have to put the config for your Project. # +# + +# * Modify only below! * # + +# Template to add in the orphan pages +Template = { +'ar': u'{{يتيمة|تاريخ={{نسخ:اسم_شهر}} {{نسخ:عام', +'ca': u'{{Orfe|date={{subst:CURRENTMONTHNAME}} {{subst:CURRENTYEAR', +'en': u'{{Orphan|date={{subst:CURRENTMONTHNAME}} {{subst:CURRENTYEAR', +'it': u'{{O||mese={{subst:CURRENTMONTHNAME}} {{subst:CURRENTYEAR', +'ja': u'{{孤立|{{subst:DATE', +'zh': u'{{subst:Orphan/auto}}', +} + +# Comment that the Bot will use to put the template +commento = { +'ar': u'بوت: صفحة يتيمة، إضافة قالب', +'ca': u'Bot:Pàgina orfe, afegint plantilla', +'en': u'Robot: Orphan page, add template', +'it': u'[[Project:Bot|Bot]]: Voce orfana, aggiungo template {{O}}', +'ja': u'ロボットによる: 孤立したページへのテンプレート貼付け', +'zh': u'機器人: 本頁的鏈入頁面太少', +} + +# When you add a disambig to the list of disambig pages +#(if you set disambigPage to None, you can put here nothing) +commenttodisambig = { +'ar': u'بوت: إضافة صفحة توضيح', +'ca': u'Bot; Afegint una desambiguació', +'en': u'Robot: Adding a disambig page', +'it': u'[[Project:Bot|Bot]]: Aggiungo una disambigua', +'ja': u'ロボットによる: 曖昧さ回避の追加', +'zh': u'機器人: 增加消歧義頁面', +} + +# Use regex to prevent to put the same template twice! +# Warning: put always "()" inside the regex, so the bot will find "something" +exception = { +'ar': [ur'\{\{(?:قالب:|)(يتيمة)[\|\}]'], +'ca': [r'\{\{(?:template:|)(orfe)[\|\}]'], +'en': [r'\{\{(?:template:|)(orphan)[\|\}]', + r'\{\{(?:template:|)(wi)[\|\}]'], +'it': [r'\{\{(?:template:|)(o|a)[\|\}]'], +'ja': [ur'\{\{(?:template:|)(孤立)[\|\}]'], +'zh': [r'\{\{(?:template:|)(orphan)[\|\}]'], +} + +# * Modify only above! * # + + +def main(): +# Load the configurations in the function namespace +global commento +global Template +global disambigPage +global commenttodisambig +global exce
[MediaWiki-commits] [Gerrit] Added ULS link in sidebar - change (mediawiki...UniversalLanguageSelector)
Niharika29 has uploaded a new change for review. https://gerrit.wikimedia.org/r/103206 Change subject: Added ULS link in sidebar .. Added ULS link in sidebar Change-Id: I7c55a54753b918a2edfbd36f891a26f9fbddf9e5 --- M resources/js/ext.uls.init.js 1 file changed, 66 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector refs/changes/06/103206/1 diff --git a/resources/js/ext.uls.init.js b/resources/js/ext.uls.init.js index a4a8d83..73e930a 100644 --- a/resources/js/ext.uls.init.js +++ b/resources/js/ext.uls.init.js @@ -16,6 +16,71 @@ * @licence GNU General Public Licence 2.0 or later * @licence MIT License */ +function ModifySidebar( action, section, name ) +{ +try { +if( section == 'languages') +var target = 'p-lang'; + +if ( action == 'add' ) { +var node = document.getElementById( target ).getElementsByTagName( 'div' )[0].getElementsByTagName( 'ul' )[0]; +var aNode = document.createElement( 'a' ); +var liNode = document.createElement( 'li' ); +aNode.appendChild( document.createTextNode( name ) ); +aNode.setAttribute( 'href', '#' ); +aNode.setAttribute( 'class', 'uls-trigger autonym'); +liNode.appendChild( aNode ); +liNode.setAttribute( 'class', 'active'); +liNode.setAttribute( 'id', 'pt-uls'); +node.appendChild( liNode ); +} + +} +catch( e ) {return;} +} + +function AddLanguage( name ) +{ var target = 'p-lang'; +var node = document.getElementById( target ).getElementsByTagName( 'div' )[0].getElementsByTagName( 'ul' )[0]; +var aNode = document.createElement( 'a' ); +var liNode = document.createElement( 'li' ); +aNode.appendChild( document.createTextNode( name ) ); +aNode.setAttribute( 'href', '#' ); +// aNode.setAttribute( 'class', 'interlanguage-link'); +liNode.appendChild( aNode ); +liNode.setAttribute( 'class', 'active'); +liNode.setAttribute( 'id', 'pt-uls'); +node.appendChild( liNode ); +} + +function CustomizeModificationsOfSidebar() +{ +var langName = mw.uls.getBrowserLanguage(); +AddLanguage( mw.uls.getCountryCode() ); +AddLanguage( langName ); +//var commLangs = mw.uls.getFrequentLanguageList( mw.uls.getCountryCode() ); +//Not working!---AddLanguage( $uls.data.getAutonym('en') ); +ModifySidebar( 'add', 'languages', 'More languages' ); +// $(".interlwiki-en").show(); +// $(".interlwiki-ho").show(); +// $(".interlwiki-hi").show(); +// $(".interlanguage-link").hide(); + +//var langarray= document.getElementByClassName('interlanguage-link'); +//$('.interlanguage-link').hide(); + +var elements = document.getElementsByClassName('interlanguage-link'); + + //document.getElementsByClassName('interlanguage-link').style.display ='none'; + +for (var i = elements.length/2; i < elements.length; i++) +elements[i].style.display= 'none'; + +//$('.active').hide(); +//var x = $.uls.data.getLanguagesByScriptGroupInRegion; + + +} ( function ( $, mw, undefined ) { 'use strict'; @@ -262,5 +327,6 @@ $( document ).ready( function () { mw.uls.init(); + CustomizeModificationsOfSidebar(); } ); }( jQuery, mediaWiki ) ); -- To view, visit https://gerrit.wikimedia.org/r/103206 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7c55a54753b918a2edfbd36f891a26f9fbddf9e5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner: Niharika29 ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Learning Gerrit! - change (test...examples)
Niharika29 has uploaded a new change for review. https://gerrit.wikimedia.org/r/103205 Change subject: Learning Gerrit! .. Learning Gerrit! Change-Id: I0ece4ec6f7ddcc203dad9aeba4bac00c486cb909 --- M ErrorPage/NiceErrorPage.php 1 file changed, 0 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/test/mediawiki/extensions/examples refs/changes/05/103205/1 diff --git a/ErrorPage/NiceErrorPage.php b/ErrorPage/NiceErrorPage.php index d289220..b1afa5e 100644 --- a/ErrorPage/NiceErrorPage.php +++ b/ErrorPage/NiceErrorPage.php @@ -11,7 +11,6 @@ // $wgExceptionHooks['DBConnectionErrorRaw'][] = array( 'NiceErrorPage', 'dbConnectionOP' ); $wgExceptionHooks['DBConnectionErrorRaw'][] = array( 'NiceErrorPage', 'dbConnection' ); $wgExceptionHooks['DBQueryErrorRaw'][] = array( 'NiceErrorPage', 'dbQueryError' ); - $wgNiceErrorPagePath = "{$wgServer}{$wgScriptPath}/extensions/examples/ErrorPage"; class NiceErrorPage { @@ -21,7 +20,6 @@ } return self::preprocessPage( 'dbconn', array( 'dberror' => $error->error ) ); } - static function dbQueryError( $error ) { $args = array( 'sql' => $error->getSQL(), @@ -31,7 +29,6 @@ ); return self::preprocessPage( 'dberr', $args ); } - static function preprocessPage( $name, $args = array() ) { $page = file_get_contents( dirname( __FILE__ ) . "/{$name}.html" ); $args = array_merge( self::commonArgs(), $args ); @@ -40,7 +37,6 @@ } return $page; } - static function commonArgs() { global $wgNiceErrorPagePath, $wgLogo, $wgSitename, $wgServer, $wgScriptPath; $a = array( -- To view, visit https://gerrit.wikimedia.org/r/103205 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0ece4ec6f7ddcc203dad9aeba4bac00c486cb909 Gerrit-PatchSet: 1 Gerrit-Project: test/mediawiki/extensions/examples Gerrit-Branch: master Gerrit-Owner: Niharika29 ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Clearer message for range blocks on CreateAccount - change (mediawiki/core)
Theopolisme has uploaded a new change for review. https://gerrit.wikimedia.org/r/103204 Change subject: Clearer message for range blocks on CreateAccount .. Clearer message for range blocks on CreateAccount If a user tries to create an account but their IP address is part of a range block, this will be reflected in the error that is displayed via the cantcreateaccount-range-text message. Bug: 35090 Change-Id: I74e912755dea93c2b74e67d7104b7525298051c0 --- M includes/specials/SpecialUserlogin.php M languages/messages/MessagesEn.php M languages/messages/MessagesQqq.php M maintenance/language/messages.inc 4 files changed, 13 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/04/103204/1 diff --git a/includes/specials/SpecialUserlogin.php b/includes/specials/SpecialUserlogin.php index b9a84be..7748682 100644 --- a/includes/specials/SpecialUserlogin.php +++ b/includes/specials/SpecialUserlogin.php @@ -980,13 +980,15 @@ # haven't bothered to log out before trying to create an account to # evade it, but we'll leave that to their guilty conscience to figure # out. + $isRangeBlock = $block->getType() === Block::TYPE_RANGE; throw new ErrorPageError( 'cantcreateaccounttitle', - 'cantcreateaccount-text', + $isRangeBlock ? 'cantcreateaccount-range-text' : 'cantcreateaccount-text', array( $block->getTarget(), $block->mReason ? $block->mReason : $this->msg( 'blockednoreason' )->text(), - $block->getByName() + $block->getByName(), + $isRangeBlock ? $this->getRequest()->getIP() : false // Only used in cantcreateaccount-range-text ) ); } diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index e815995..fd940e5 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -1615,6 +1615,9 @@ # Account creation failure 'cantcreateaccounttitle' => 'Cannot create account', +'cantcreateaccount-range-text' => "Account creation from the range '''$1''', which includes your IP address ('''$4'''), has been blocked by [[User:$3|$3]]. + +The reason given by $3 is ''$2''", 'cantcreateaccount-text' => "Account creation from this IP address ('''$1''') has been blocked by [[User:$3|$3]]. The reason given by $3 is ''$2''", diff --git a/languages/messages/MessagesQqq.php b/languages/messages/MessagesQqq.php index 4fc329a..803067e 100644 --- a/languages/messages/MessagesQqq.php +++ b/languages/messages/MessagesQqq.php @@ -2266,6 +2266,11 @@ * $1 - target IP address * $2 - reason or {{msg-mw|blockednoreason}} * $3 - username', +'cantcreateaccount-range-text' => "Used as more detailed version of the {{msg-mw|Cantcreateaccount-text}} error message, with the title {{msg-mw|cantcreateaccounttitle}}. +* $1 - target IP range +* $2 - reason or {{msg-mw|blockednoreason}} +* $3 - username +* $4 - current user's IP address", # History pages 'viewpagelogs' => 'Link displayed in history of pages', diff --git a/maintenance/language/messages.inc b/maintenance/language/messages.inc index 662c3d3..5e463b2 100644 --- a/maintenance/language/messages.inc +++ b/maintenance/language/messages.inc @@ -800,6 +800,7 @@ 'cantcreateaccount' => array( 'cantcreateaccounttitle', 'cantcreateaccount-text', + 'cantcreateaccount-range-text', ), 'history' => array( 'viewpagelogs', -- To view, visit https://gerrit.wikimedia.org/r/103204 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I74e912755dea93c2b74e67d7104b7525298051c0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Theopolisme ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update favicon spcom.ico - change (operations/mediawiki-config)
Murfel has uploaded a new change for review. https://gerrit.wikimedia.org/r/103203 Change subject: Update favicon spcom.ico .. Update favicon spcom.ico Added 48x48 and 32x32 versions of the existing 16x16 icon. Bug: 58787 Change-Id: I11843d05b3774b178db011c77d3407c610deeac5 --- M docroot/bits/favicon/spcom.ico 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/03/103203/1 diff --git a/docroot/bits/favicon/spcom.ico b/docroot/bits/favicon/spcom.ico index a7088fb..e471d30 100644 --- a/docroot/bits/favicon/spcom.ico +++ b/docroot/bits/favicon/spcom.ico Binary files differ -- To view, visit https://gerrit.wikimedia.org/r/103203 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I11843d05b3774b178db011c77d3407c610deeac5 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Murfel Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove slow, per-MW, syntax check - change (operations/puppet)
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/103202 Change subject: Remove slow, per-MW, syntax check .. Remove slow, per-MW, syntax check * Jenkins already handles this except for some rare cases of live hacking or merging of security patches. Change-Id: I61b4c912023d17fdd6026b382859580dbc4501c5 --- M files/scap/scap 1 file changed, 1 insertion(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/02/103202/1 diff --git a/files/scap/scap b/files/scap/scap index 4158b80..f10ab18 100755 --- a/files/scap/scap +++ b/files/scap/scap @@ -33,17 +33,10 @@ fi # Perform syntax check -echo -n "Checking syntax..." +echo -n "Checking syntax of wmf-config and multiversion..." if ( ! ( $BINDIR/lint $MW_COMMON_SOURCE/wmf-config && $BINDIR/lint $MW_COMMON_SOURCE/multiversion ) ); then die "Found syntax errors, cannot sync." fi -# Check syntax for all active MediaWiki versions -for i in ${mwVerDbSets[@]}; do - mwVerNum=${i%=*} - if ( ! ( $BINDIR/lint $MW_COMMON_SOURCE/php-$mwVerNum ) ); then - die "Found syntax errors in $mwVerNum, cannot sync." - fi -done echo " done" # Update the current machine so that serialization works. -- To view, visit https://gerrit.wikimedia.org/r/103202 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I61b4c912023d17fdd6026b382859580dbc4501c5 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Aaron Schulz ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Move BitmapHandler::canRotate() call out of Setup.php - change (mediawiki/core)
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/103201 Change subject: Move BitmapHandler::canRotate() call out of Setup.php .. Move BitmapHandler::canRotate() call out of Setup.php * This was wasting 5ms on every request hit on test wiki Change-Id: Ie7a5aa27593ab8e0d52fb00218345d1789da61a1 --- M includes/Setup.php M includes/media/Bitmap.php M includes/media/ExifBitmap.php 3 files changed, 20 insertions(+), 11 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/01/103201/1 diff --git a/includes/Setup.php b/includes/Setup.php index 17d5446..531d1a4 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -248,13 +248,6 @@ } unset( $repo ); // no global pollution; destroy reference -if ( is_null( $wgEnableAutoRotation ) ) { - wfProfileIn( $fname . '-defaults-rotation' ); - // Only enable auto-rotation when the bitmap handler can rotate - $wgEnableAutoRotation = BitmapHandler::canRotate(); - wfProfileOut( $fname . '-defaults-rotation' ); -} - if ( $wgRCFilterByAge ) { # # Trim down $wgRCLinkDays so that it only lists links which are valid # # as determined by $wgRCMaxAge. diff --git a/includes/media/Bitmap.php b/includes/media/Bitmap.php index eeb8078..6712e77 100644 --- a/includes/media/Bitmap.php +++ b/includes/media/Bitmap.php @@ -754,6 +754,24 @@ } /** +* @see $wgEnableAutoRotation +* @return bool Whether auto rotation is enabled +*/ + public static function autoRotateEnabled() { + global $wgEnableAutoRotation; + + static $autoRotate = null; + if ( $autoRotate === null ) { + $autoRotate = $wgEnableAutoRotation; + if ( is_null( $autoRotate ) ) { + // Only enable auto-rotation when the bitmap handler can rotate + $autoRotate = BitmapHandler::canRotate(); + } + } + return $autoRotate; + } + + /** * @param File $file * @param array $params Rotate parameters. * 'rotation' clockwise rotation in degrees, allowed are multiples of 90 diff --git a/includes/media/ExifBitmap.php b/includes/media/ExifBitmap.php index fe037b7..4bbafc1 100644 --- a/includes/media/ExifBitmap.php +++ b/includes/media/ExifBitmap.php @@ -169,12 +169,11 @@ * @return array */ function getImageSize( $image, $path ) { - global $wgEnableAutoRotation; $gis = parent::getImageSize( $image, $path ); // Don't just call $image->getMetadata(); FSFile::getPropsFromPath() calls us with a bogus object. // This may mean we read EXIF data twice on initial upload. - if ( $wgEnableAutoRotation ) { + if ( BitmapHandler::autoRotateEnabled() ) { $meta = $this->getMetadata( $image, $path ); $rotation = $this->getRotationForExif( $meta ); } else { @@ -203,8 +202,7 @@ * @return int 0, 90, 180 or 270 */ public function getRotation( $file ) { - global $wgEnableAutoRotation; - if ( !$wgEnableAutoRotation ) { + if ( !BitmapHandler::autoRotateEnabled() ) { return 0; } -- To view, visit https://gerrit.wikimedia.org/r/103201 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie7a5aa27593ab8e0d52fb00218345d1789da61a1 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] ChangesListSpecialPage and subclasses: Reorder functions - change (mediawiki/core)
Bartosz Dziewoński has uploaded a new change for review. https://gerrit.wikimedia.org/r/103200 Change subject: ChangesListSpecialPage and subclasses: Reorder functions .. ChangesListSpecialPage and subclasses: Reorder functions No functional nor cleanup changes, just reordering. This should make further refactoring (and reviewing it) easier. In ChangesListSpecialPage placed them in "call-graph" order instead of somewhat randomly. In subclasses placed ChangesListSpecialPage functions first in the same order, feed-related things later, and internal functions last. Change-Id: I0cccfdb7c5ecd99a92d09d835211153279d71846 --- M includes/specialpage/ChangesListSpecialPage.php M includes/specials/SpecialRecentchanges.php M includes/specials/SpecialRecentchangeslinked.php M includes/specials/SpecialWatchlist.php 4 files changed, 319 insertions(+), 319 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/00/103200/1 diff --git a/includes/specialpage/ChangesListSpecialPage.php b/includes/specialpage/ChangesListSpecialPage.php index 7814359..d5ec18c 100644 --- a/includes/specialpage/ChangesListSpecialPage.php +++ b/includes/specialpage/ChangesListSpecialPage.php @@ -32,19 +32,28 @@ protected $customFilters; /** -* Get a FormOptions object containing the default options. By default returns some basic options, -* you might not call parent method and discard them. +* Main execution point +* @todo This should totally do things +* +* @param string $subpage +*/ + public function execute( $subpage ) { + $this->rcSubpage = $subpage; + throw new MWException( "Not implemented" ); + } + + /** +* Get the current FormOptions for this request +* @todo Not called by anything, should be called by execute() * * @return FormOptions */ - public function getDefaultOptions() { - $opts = new FormOptions(); + public function getOptions() { + if ( $this->rcOptions === null ) { + $this->rcOptions = $this->setup( $this->rcSubpage ); + } - $opts->add( 'namespace', '', FormOptions::INTNULL ); - $opts->add( 'invert', false ); - $opts->add( 'associated', false ); - - return $opts; + return $this->rcOptions; } /** @@ -73,12 +82,29 @@ } /** -* Validate a FormOptions object generated by getDefaultOptions() with values already populated. +* Get a FormOptions object containing the default options. By default returns some basic options, +* you might not call parent method and discard them. * -* @param FormOptions $opts +* @return FormOptions */ - public function validateOptions( FormOptions $opts ) { - // nothing by default + public function getDefaultOptions() { + $opts = new FormOptions(); + + $opts->add( 'namespace', '', FormOptions::INTNULL ); + $opts->add( 'invert', false ); + $opts->add( 'associated', false ); + + return $opts; + } + + /** +* Get custom show/hide filters +* +* @return array Map of filter URL param names to properties (msg/default) +*/ + protected function getCustomFilters() { + // @todo Fire a Special{$this->getName()}Filters hook here + return array(); } /** @@ -95,16 +121,6 @@ } /** -* Get custom show/hide filters -* -* @return array Map of filter URL param names to properties (msg/default) -*/ - protected function getCustomFilters() { - // @todo Fire a Special{$this->getName()}Filters hook here - return array(); - } - - /** * Process $par and put options found in $opts. Used when including the page. * * @param string $par @@ -115,28 +131,12 @@ } /** -* Get the current FormOptions for this request -* @todo Not called by anything, should be called by execute() +* Validate a FormOptions object generated by getDefaultOptions() with values already populated. * -* @return FormOptions +* @param FormOptions $opts */ - public function getOptions() { - if ( $this->rcOptions === null ) { - $this->rcOptions = $this->setup( $this->rcSubpage ); - } - - return $this->rcOptions; - } - - /** -* Main execution point -* @todo This should totally do things -* -* @param string $subpage -*/ - public function execute( $subpage
[MediaWiki-commits] [Gerrit] Zero: Keep things DRY - removed duplicate IDs - change (operations/puppet)
Yurik has uploaded a new change for review. https://gerrit.wikimedia.org/r/103199 Change subject: Zero: Keep things DRY - removed duplicate IDs .. Zero: Keep things DRY - removed duplicate IDs In order to prevent accidental missmatch of IDs, which could happen when copy/pasting, removed X-CS duplication. This makes it identical to how its done in the general case at the bottom. Change-Id: I78c56e4c0f5307365310dfa1c464c272d4adb34c --- M templates/varnish/zero.inc.vcl.erb 1 file changed, 27 insertions(+), 27 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/99/103199/1 diff --git a/templates/varnish/zero.inc.vcl.erb b/templates/varnish/zero.inc.vcl.erb index 93f68c6..2a49b96 100644 --- a/templates/varnish/zero.inc.vcl.erb +++ b/templates/varnish/zero.inc.vcl.erb @@ -53,130 +53,130 @@ // This is not wikipedia project - skip the rest of X-CS identification } else if (req.http.X-CS2 == "502-13") { if (!req.http.X-Forwarded-By && req.http.X-Subdomain == "ZERO") { - set req.http.X-CS = "502-13"; + set req.http.X-CS = req.http.X-CS2; } } else if (req.http.X-CS2 == "623-03") { if (!req.http.X-Forwarded-By) { if (req.http.host ~ "^((fr|ar|sg|en|es|zh|ha|ln|eo)\.)?m\.") { - set req.http.X-CS = "623-03"; + set req.http.X-CS = req.http.X-CS2; } } } else if (req.http.X-CS2 == "413-02") { if (!req.http.X-Forwarded-By) { if (req.http.host ~ "^((en|ta|si)\.)?zero\.") { - set req.http.X-CS = "413-02"; + set req.http.X-CS = req.http.X-CS2; } } } else if (req.http.X-CS2 == "502-16") { if (req.http.X-Forwarded-By == "Opera" && req.http.X-Subdomain == "ZERO") { - set req.http.X-CS = "502-16"; + set req.http.X-CS = req.http.X-CS2; } } else if (req.http.X-CS2 == "520-18") { if (!req.http.X-Forwarded-By && req.http.X-Subdomain == "ZERO") { - set req.http.X-CS = "520-18"; + set req.http.X-CS = req.http.X-CS2; } } else if (req.http.X-CS2 == "470-01") { if (req.http.X-Forwarded-By == "Opera" && req.http.X-Subdomain == "ZERO") { - set req.http.X-CS = "470-01"; + set req.http.X-CS = req.http.X-CS2; } } else if (req.http.X-CS2 == "470-03") { if (!req.http.X-Forwarded-By) { if (req.http.host ~ "^((en|bn)\.)?(zero|m)\.") { - set req.http.X-CS = "470-03"; + set req.http.X-CS = req.http.X-CS2; } } } else if (req.http.X-CS2 == "416-03") { if (!req.http.X-Forwarded-By) { if (req.http.host ~ "^((en|ar)\.)?(zero|m)\.") { - set req.http.X-CS = "416-03"; + set req.http.X-CS = req.http.X-CS2; } } } else if (req.http.X-CS2 == "456-02") { if (!req.http.X-Forwarded-By && req.http.X-Subdomain == "ZERO") { - set req.http.X-CS = "456-02"; + set req.http.X-CS = req.http.X-CS2; } } else if (req.http.X-CS2 == "652-02") { if ((!req.http.X-Forwarded-By || req.http.X-Forwarded-By == "Opera") && req.http.X-Subdomain == "M") { - set req.http.X-CS = "652-02"; + set req.http.X-CS = req.http.X-CS2; } } else if (req.http.X-CS2 == "624-02") { if (!req.http.X-Forwarded-By) { if (req.http.host ~ "^((fr|en|es|de|zh|ar|ha|ln|yo|eo)\.)?m\.") { - set req.http.X-CS = "624-02"; + set req.http.X-CS = req.http.X-CS2; } } } else if (req.http.X-CS2 == "630-86") { if (!req.http.X-Forwarded-By && req.http.X-Subdomain == "M") { - set req.http.X-CS = "630-86"; + set req.http.X-CS = req.http.X-CS2; } } else if (req.http.X-CS2 == "612-03") { if ((!req.http.X-Forwarded-By || req.http.X-Forwarded-By == "Opera") && req.http.X-Subdomain == "M") { - set req.http.X-CS = "612-03"; + set req.http.X-CS = req.http.X-CS2; } } else if (req.http.X-CS2 == "639-0
[MediaWiki-commits] [Gerrit] Added carrier 436-04 to zero - change (operations/puppet)
Yurik has uploaded a new change for review. https://gerrit.wikimedia.org/r/103198 Change subject: Added carrier 436-04 to zero .. Added carrier 436-04 to zero They support everything + opera, so can't use default case Change-Id: Ifafb9a2b8f70a8b0c79facaf102745cfd5416b0c --- M templates/varnish/zero.inc.vcl.erb 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/98/103198/1 diff --git a/templates/varnish/zero.inc.vcl.erb b/templates/varnish/zero.inc.vcl.erb index 82bbed2..93f68c6 100644 --- a/templates/varnish/zero.inc.vcl.erb +++ b/templates/varnish/zero.inc.vcl.erb @@ -179,6 +179,10 @@ set req.http.X-CS = "436-01"; } } + } else if (req.http.X-CS2 == "436-04") { + if (!req.http.X-Forwarded-By || req.http.X-Forwarded-By == "Opera") { + set req.http.X-CS = req.http.X-CS2; + } } else if (req.http.X-CS2 == "401-01") { if (!req.http.X-Forwarded-By) { if (req.http.host ~ "^((ru|kk|en)\.)?(zero|m)\.") { -- To view, visit https://gerrit.wikimedia.org/r/103198 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifafb9a2b8f70a8b0c79facaf102745cfd5416b0c Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Yurik ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Changes list legend modules cleanup - change (mediawiki/core)
Bartosz Dziewoński has uploaded a new change for review. https://gerrit.wikimedia.org/r/103197 Change subject: Changes list legend modules cleanup .. Changes list legend modules cleanup The legend is not part of the ChangesList itself, but a part of the ChangesListSpecialPage; move around modules and calls appropriately. Followup to I02f2ced4. Change-Id: I2c8922135404aab1960158cee06e2d8d07a1ace7 --- M includes/changes/ChangesList.php M includes/changes/EnhancedChangesList.php M includes/specialpage/ChangesListSpecialPage.php M resources/Resources.php M resources/mediawiki.special/mediawiki.special.changeslist.css A resources/mediawiki.special/mediawiki.special.changeslist.legend.css R resources/mediawiki.special/mediawiki.special.changeslist.legend.js 7 files changed, 44 insertions(+), 36 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/97/103197/1 diff --git a/includes/changes/ChangesList.php b/includes/changes/ChangesList.php index 107e2c4..470b150 100644 --- a/includes/changes/ChangesList.php +++ b/includes/changes/ChangesList.php @@ -161,7 +161,6 @@ $this->lastdate = ''; $this->rclistOpen = false; $this->getOutput()->addModuleStyles( 'mediawiki.special.changeslist' ); - $this->getOutput()->addModules( 'mediawiki.special.changeslist.js' ); return ''; } diff --git a/includes/changes/EnhancedChangesList.php b/includes/changes/EnhancedChangesList.php index 99cf0de..1c3a0fb 100644 --- a/includes/changes/EnhancedChangesList.php +++ b/includes/changes/EnhancedChangesList.php @@ -41,7 +41,6 @@ $this->getOutput()->addModules( array( 'jquery.makeCollapsible', 'mediawiki.icon', - 'mediawiki.special.changeslist.js', ) ); return ''; diff --git a/includes/specialpage/ChangesListSpecialPage.php b/includes/specialpage/ChangesListSpecialPage.php index cedd49c..7814359 100644 --- a/includes/specialpage/ChangesListSpecialPage.php +++ b/includes/specialpage/ChangesListSpecialPage.php @@ -282,9 +282,9 @@ */ protected function addModules() { $out = $this->getOutput(); - // These modules include styles and behavior for the legend box, load them unconditionally - $out->addModuleStyles( 'mediawiki.special.changeslist' ); - $out->addModules( 'mediawiki.special.changeslist.js' ); + // Styles and behavior for the legend box (see makeLegend()) + $out->addModuleStyles( 'mediawiki.special.changeslist.legend' ); + $out->addModules( 'mediawiki.special.changeslist.legend.js' ); } protected function getGroupName() { diff --git a/resources/Resources.php b/resources/Resources.php index bf7fe8d..d1c106a 100644 --- a/resources/Resources.php +++ b/resources/Resources.php @@ -1013,8 +1013,11 @@ 'mediawiki.special.changeslist' => array( 'styles' => 'resources/mediawiki.special/mediawiki.special.changeslist.css', ), - 'mediawiki.special.changeslist.js' => array( - 'scripts' => 'resources/mediawiki.special/mediawiki.special.changeslist.js', + 'mediawiki.special.changeslist.legend' => array( + 'styles' => 'resources/mediawiki.special/mediawiki.special.changeslist.legend.css', + ), + 'mediawiki.special.changeslist.legend.js' => array( + 'scripts' => 'resources/mediawiki.special/mediawiki.special.changeslist.legend.js', 'dependencies' => array( 'jquery.makeCollapsible', 'jquery.cookie', diff --git a/resources/mediawiki.special/mediawiki.special.changeslist.css b/resources/mediawiki.special/mediawiki.special.changeslist.css index b1af745..5e4af7b 100644 --- a/resources/mediawiki.special/mediawiki.special.changeslist.css +++ b/resources/mediawiki.special/mediawiki.special.changeslist.css @@ -5,32 +5,3 @@ .mw-changeslist-line-watched .mw-title { font-weight: bold; } - -.mw-changeslist-legend { - float: right; - margin-left: 1em; - margin-bottom: 0.5em; - clear: right; - font-size: 85%; - line-height: 1.2em; - padding: 0.5em; - border: 1px solid #ddd; -} - -.mw-changeslist-legend dl { - /* Parent element defines sufficient padding */ - margin-bottom: 0; -} - -.mw-changeslist-legend dt { - float: left; -} - -.mw-changeslist-legend dd { - margin-left: 1.5em; - line-height: 1.3em; -} - -.mw-changeslist-legend dd.mw-changeslist-legend-plusminus { - margin-left: 3.5em; -} diff --git a/resources/mediawiki.special/mediawiki.special.changeslist.legend.css b/resources/mediawiki.special/mediawiki.special.changeslist.legend.css new file mode 100644
[MediaWiki-commits] [Gerrit] Refactor RL modules related to Special:Userlogin - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Refactor RL modules related to Special:Userlogin .. Refactor RL modules related to Special:Userlogin * Removed duplicated code * Moved generic styles to mediawiki.ui * Made sure scripts only run when they're needed * Cleaned up formatting * Cleaned up module and file naming Change-Id: I90a2331182d4d66f0584083b30b90ac6471c3aaf --- M includes/specials/SpecialUserlogin.php M resources/Resources.php D resources/mediawiki.special/mediawiki.special.createAccount.css D resources/mediawiki.special/mediawiki.special.createAccount.js D resources/mediawiki.special/mediawiki.special.userLogin.css A resources/mediawiki.special/mediawiki.special.userlogin.common.css A resources/mediawiki.special/mediawiki.special.userlogin.common.js A resources/mediawiki.special/mediawiki.special.userlogin.login.css A resources/mediawiki.special/mediawiki.special.userlogin.signup.css A resources/mediawiki.special/mediawiki.special.userlogin.signup.js D resources/mediawiki.special/mediawiki.special.vforms.css M resources/mediawiki.ui/components/default/forms.less 12 files changed, 322 insertions(+), 360 deletions(-) Approvals: Ori.livneh: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/specials/SpecialUserlogin.php b/includes/specials/SpecialUserlogin.php index 0866aa7..b9a84be 100644 --- a/includes/specials/SpecialUserlogin.php +++ b/includes/specials/SpecialUserlogin.php @@ -1094,37 +1094,44 @@ } } - if ( $this->mType == 'signup' ) { - $template = new UsercreateTemplate(); + // Generic styles and scripts for both login and signup form + $out->addModuleStyles( array( + 'mediawiki.ui', + 'mediawiki.ui.button', + 'mediawiki.special.userlogin.common.styles' + ) ); + $out->addModules( array( + 'mediawiki.special.userlogin.common.js' + ) ); - $out->addModuleStyles( array( - 'mediawiki.ui', - 'mediawiki.ui.button', - 'mediawiki.special.createaccount', - ) ); + if ( $this->mType == 'signup' ) { // XXX hack pending RL or JS parse() support for complex content messages // https://bugzilla.wikimedia.org/show_bug.cgi?id=25349 $out->addJsConfigVars( 'wgCreateacctImgcaptchaHelp', $this->msg( 'createacct-imgcaptcha-help' )->parse() ); + + // Additional styles and scripts for signup form $out->addModules( array( - 'mediawiki.special.createaccount.js' + 'mediawiki.special.userlogin.signup.js' ) ); + $out->addModuleStyles( array( + 'mediawiki.special.userlogin.signup.styles' + ) ); + + $template = new UsercreateTemplate(); + // Must match number of benefits defined in messages $template->set( 'benefitCount', 3 ); $q = 'action=submitlogin&type=signup'; $linkq = 'type=login'; } else { - $template = new UserloginTemplate(); - + // Additional styles for login form $out->addModuleStyles( array( - 'mediawiki.ui', - 'mediawiki.special.userlogin' + 'mediawiki.special.userlogin.login.styles' ) ); - $out->addModules( array( - 'mediawiki.special.createaccount.js' - ) ); + $template = new UserloginTemplate(); $q = 'action=submitlogin&type=login'; $linkq = 'type=signup'; diff --git a/resources/Resources.php b/resources/Resources.php index 6fd1665..d280c75 100644 --- a/resources/Resources.php +++ b/resources/Resources.php @@ -1089,28 +1089,39 @@ 'mediawiki.util', ), ), - 'mediawiki.special.userlogin' => array( + 'mediawiki.special.userlogin.common.styles' => array( 'styles' => array( - 'resources/mediawiki.special/mediawiki.special.vforms.css', - 'resources/mediawiki.special/mediawiki.special.userLogin.css', + 'resources/mediawiki.special/mediawiki.special.userlogin.common.css', ),
[MediaWiki-commits] [Gerrit] vector: Switch around regular and HD content padding - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: vector: Switch around regular and HD content padding .. vector: Switch around regular and HD content padding The HD one was smaller… this must have been accidentally switched around during the LESS rewrite. Change-Id: I2551ab1665cd494b360da2c88a9646035551ed85 --- M skins/vector/screen-hd.less M skins/vector/variables.less 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: Ori.livneh: Looks good to me, approved jenkins-bot: Verified diff --git a/skins/vector/screen-hd.less b/skins/vector/screen-hd.less index 5a1fc05..2683a21 100644 --- a/skins/vector/screen-hd.less +++ b/skins/vector/screen-hd.less @@ -2,7 +2,7 @@ div#content { margin-left: 11em; - padding: 1.25em 1.5em 1.5em 1.5em; + padding: 1.5em 1.5em 1.5em 1.75em; } #p-logo { left: @menu-main-logo-left; diff --git a/skins/vector/variables.less b/skins/vector/variables.less index 691e0fd..f818401 100644 --- a/skins/vector/variables.less +++ b/skins/vector/variables.less @@ -7,7 +7,7 @@ @content-font-color: black; @content-font-size: 0.8em; @content-line-height: 1.5em; -@content-padding: 1.5em 1.5em 1.5em 1.75em; +@content-padding: 1.25em 1.5em 1.5em 1.5em; @content-heading-font-size: 1.6em; @content-heading-font-family: sans-serif; -- To view, visit https://gerrit.wikimedia.org/r/102703 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2551ab1665cd494b360da2c88a9646035551ed85 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Bartosz Dziewoński Gerrit-Reviewer: Daniel Friesen Gerrit-Reviewer: Jack Phoenix Gerrit-Reviewer: Jdlrobson Gerrit-Reviewer: Legoktm Gerrit-Reviewer: Ori.livneh Gerrit-Reviewer: Swalling Gerrit-Reviewer: Waldir 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 comment edited text for comments which have since been d... - change (mediawiki...LiquidThreads)
jenkins-bot has submitted this change and it was merged. Change subject: Fix comment edited text for comments which have since been deleted .. Fix comment edited text for comments which have since been deleted Was showing "Comment text [ edited]". Scenario: * edit a comment in a thread * delete it * view the *thread* history Change-Id: If1c819a61f5f0b5f075c0e705202e899e3e063c1 --- M classes/ThreadHistoryPager.php M i18n/Lqt.i18n.php 2 files changed, 5 insertions(+), 0 deletions(-) Approvals: Nikerabbit: Looks good to me, approved jenkins-bot: Verified diff --git a/classes/ThreadHistoryPager.php b/classes/ThreadHistoryPager.php index 572a8bd..e0e9079 100644 --- a/classes/ThreadHistoryPager.php +++ b/classes/ThreadHistoryPager.php @@ -127,6 +127,9 @@ $args[] = $diffLink; } else { $args[] = ''; + if ( $type == Threads::CHANGE_EDITED_ROOT ) { + $msg = wfMessage( 'lqt_hist_comment_edited_deleted' )->parse(); + } } break; case Threads::CHANGE_REPLY_CREATED: diff --git a/i18n/Lqt.i18n.php b/i18n/Lqt.i18n.php index bd9c47d..2f7f0f3 100644 --- a/i18n/Lqt.i18n.php +++ b/i18n/Lqt.i18n.php @@ -38,6 +38,7 @@ 'lqt-history-title' => 'Thread history', 'lqt_hist_comment_edited' => 'Comment text [$2 edited]', + 'lqt_hist_comment_edited_deleted' => 'Comment text edited (since deleted)', 'lqt_hist_summary_changed' => 'Summary changed', 'lqt_hist_reply_created' => '[[$1|New reply]] created', 'lqt_hist_reply_created_deleted' => 'New reply created (since deleted)', @@ -392,6 +393,7 @@ 'lqt-history-title' => 'Title of thread history page, see [{{canonicalurl:Thread:Support/Payflowpro_gateway-select-dollar-amount|lqt_method=thread_history}} example]', 'lqt_hist_comment_edited' => 'Parameters: * $2 is the URL to the comment', + 'lqt_hist_comment_edited_deleted' => 'Same as {{msg-mw|lqt_hist_comment_edited}} but when the comment has been deleted', 'lqt_hist_summary_changed' => "Summary for 'activity' in thread history, see [{{canonicalurl:Thread:Support/Payflowpro_gateway-select-dollar-amount|lqt_method=thread_history}} example]", 'lqt_hist_reply_created' => "Summary for 'activity' in thread history, see [{{canonicalurl:Thread:Support/Payflowpro_gateway-select-dollar-amount|lqt_method=thread_history}} example] -- To view, visit https://gerrit.wikimedia.org/r/103187 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If1c819a61f5f0b5f075c0e705202e899e3e063c1 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/LiquidThreads Gerrit-Branch: master Gerrit-Owner: Alex Monk Gerrit-Reviewer: Matthias Mullie Gerrit-Reviewer: Nemo bis Gerrit-Reviewer: Nikerabbit Gerrit-Reviewer: Siebrand Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update the statsbar when saving or proofreading - change (mediawiki...Translate)
jenkins-bot has submitted this change and it was merged. Change subject: Update the statsbar when saving or proofreading .. Update the statsbar when saving or proofreading Because of a typo in the code the statsbar at the bottom of the TUX message table was not actually update when saving or proofreading a message. This resolves it. Change-Id: I2b858cbe3a92703da1b6bd280ea17b4077bd --- M resources/js/ext.translate.editor.js M resources/js/ext.translate.proofread.js 2 files changed, 9 insertions(+), 3 deletions(-) Approvals: Nikerabbit: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/js/ext.translate.editor.js b/resources/js/ext.translate.editor.js index 237bb24..abd3a75 100644 --- a/resources/js/ext.translate.editor.js +++ b/resources/js/ext.translate.editor.js @@ -156,7 +156,7 @@ if ( this.message.properties ) { $( '.tux-action-bar .tux-statsbar' ).trigger( 'change', - [ 'translated', this.message.properties.state ] + [ 'translated', this.message.properties.status ] ); // TODO: Update any other statsbar for the same group in the page. } diff --git a/resources/js/ext.translate.proofread.js b/resources/js/ext.translate.proofread.js index 8b1db0d..a496a64 100644 --- a/resources/js/ext.translate.proofread.js +++ b/resources/js/ext.translate.proofread.js @@ -152,7 +152,10 @@ proofread.markSelfTranslation(); // Update stats - to translated state from current state. $( '.tux-action-bar .tux-statsbar' ) - .trigger( 'change', [ 'translated', proofread.message.properties.state ] ); + .trigger( + 'change', + [ 'translated', proofread.message.properties.status ] + ); } } ); @@ -295,7 +298,10 @@ .text( mw.language.convertNumber( reviews + 1 ) ); // Update stats - $( '.tux-action-bar .tux-statsbar' ).trigger( 'change', [ 'proofread', proofread.message.properties.state ] ); + $( '.tux-action-bar .tux-statsbar' ).trigger( + 'change', + [ 'proofread', proofread.message.properties.status ] + ); }, function () { mw.log( 'Error while submitting the message for proofread.' ); } ); -- To view, visit https://gerrit.wikimedia.org/r/103192 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2b858cbe3a92703da1b6bd280ea17b4077bd Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Amire80 Gerrit-Reviewer: Nikerabbit Gerrit-Reviewer: Siebrand Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update nginx mime.types from upstream - change (translatewiki)
Nikerabbit has uploaded a new change for review. https://gerrit.wikimedia.org/r/103196 Change subject: Update nginx mime.types from upstream .. Update nginx mime.types from upstream Change-Id: I4c03316b08e48dea80a372effc7a4e2c76d0cbe2 --- M puppet/modules/nginx/files/mime.types 1 file changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/96/103196/1 diff --git a/puppet/modules/nginx/files/mime.types b/puppet/modules/nginx/files/mime.types index 6d92051..4c006f9 100644 --- a/puppet/modules/nginx/files/mime.types +++ b/puppet/modules/nginx/files/mime.types @@ -1,6 +1,6 @@ # file managed by puppet -# Taken in 2013-07-30 from Github: +# Taken in 2013-12-22 from Github: # https://raw.github.com/h5bp/server-configs-nginx/master/mime.types types { @@ -21,7 +21,7 @@ image/tifftif tiff; image/vnd.wap.wbmpwbmp; image/webpwebp; - image/x-icon ico; + image/x-icon ico cur; image/x-jng jng; # JavaScript @@ -90,6 +90,7 @@ application/x-stuffit sit; application/x-tcl tcl tk; application/x-x509-ca-certder pem crt; + application/x-bittorrent torrent; application/zip zip; application/octet-stream bin exe dll; -- To view, visit https://gerrit.wikimedia.org/r/103196 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4c03316b08e48dea80a372effc7a4e2c76d0cbe2 Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Conditional support for webp main page images - change (translatewiki)
Nikerabbit has uploaded a new change for review. https://gerrit.wikimedia.org/r/103195 Change subject: Conditional support for webp main page images .. Conditional support for webp main page images Webp is currently supported by Chrome and Opera The image are still on the big size, but about half the size: jpg webpfilename 432K344Kaaretal.jpg 424K144Kacueducto.jpg 256K52K alpamayo.jpg 212K44K concert-hall.jpg 164K92K farm-poster.jpg 476K204Kferronor.jpg 304K96K golden-gate.jpg 356K120Kgorges-du-tarn.jpg 416K152Kholzbrucke.jpg 380K136Kkasumi.jpg 476K212Kmabodalen.jpg 112K44K nepean-river.jpg 328K112Kruhrtalbruecke.jpg 312K212Ktaburiente.jpg 784K160Kturtle.jpg 5.4M2.1Mtotal Change-Id: I61ee7037847e587d3d4f08d4e7464e092aca6b72 --- M puppet/modules/nginx/files/translatewiki.net 1 file changed, 9 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/95/103195/1 diff --git a/puppet/modules/nginx/files/translatewiki.net b/puppet/modules/nginx/files/translatewiki.net index 95339f2..66ddc05 100644 --- a/puppet/modules/nginx/files/translatewiki.net +++ b/puppet/modules/nginx/files/translatewiki.net @@ -25,7 +25,7 @@ } location = /sitemap { -rewrite ^ "/w/index.php?title=Special:RecentChanges&translations=&feed=atom"; + rewrite ^ "/w/index.php?title=Special:RecentChanges&translations=&feed=atom"; } @@ -40,8 +40,14 @@ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; } - location ~* \.(png|jpg|jpeg|gif|ico|svg|woff|eot|ttf)$ { - expires 2M; + location ~* ^/static/mainpage/.*\.jpg$ { + if ($http_accept ~ "image/webp") { + add_header Vary Accept; + rewrite ^ $uri.webp; + } } + location ~* \.(png|jpg|jpeg|gif|ico|svg|woff|eot|ttf|webp)$ { + expires 2M; + } } -- To view, visit https://gerrit.wikimedia.org/r/103195 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I61ee7037847e587d3d4f08d4e7464e092aca6b72 Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Release notes for Ia193571a, I56758908, I9fd40bcb - change (mediawiki/core)
Bartosz Dziewoński has uploaded a new change for review. https://gerrit.wikimedia.org/r/103194 Change subject: Release notes for Ia193571a, I56758908, I9fd40bcb .. Release notes for Ia193571a, I56758908, I9fd40bcb Change-Id: I6d7c4ba3592c5dd646180189086fd854ee6516a8 --- M RELEASE-NOTES-1.23 1 file changed, 9 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/94/103194/1 diff --git a/RELEASE-NOTES-1.23 b/RELEASE-NOTES-1.23 index 3e40f7f..02984d5 100644 --- a/RELEASE-NOTES-1.23 +++ b/RELEASE-NOTES-1.23 @@ -111,6 +111,15 @@ * The ExpandTemplates extension has been moved into MediaWiki core. * (bug 52812) Removed "Disable search suggestions" from Preference. * (bug 52809) Removed "Disable browser page caching" from Preference. +* Three new modules intended for use by custom skins were added: + 'skins.common.elements', 'skins.common.content', and 'skins.common.interface', + representing three levels of standard MediaWiki styling. Previously skin + creators wishing to use them had to refer to the file names of appropriate + files directly, which is now discouraged. +* The modules 'skins.vector' and 'skins.monobook' have been renamed to + 'skins.vector.styles' and 'skins.monobook.styles', respectively, + and their definition was changed not to include the common*.css files; + the two skins now load the 'skins.common.interface' module instead. == Compatibility == -- To view, visit https://gerrit.wikimedia.org/r/103194 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6d7c4ba3592c5dd646180189086fd854ee6516a8 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] [WIP] Changing image size in MWMediaEditDialog - change (mediawiki...VisualEditor)
Mooeypoo has uploaded a new change for review. https://gerrit.wikimedia.org/r/103193 Change subject: [WIP] Changing image size in MWMediaEditDialog .. [WIP] Changing image size in MWMediaEditDialog Adding the ability to edit image size in the media edit dialog. Size is kept in aspect ratio at all times. If value is invalid the user will see visual cue through error class, and the size will not be updated. Some remaining issues: * Initial size: Figure out how to preserve the initial size of the image from the beginning of the session, so the user can cancel their edit if needed. * Original size: Figure out if it is possible to get the original size of the image so we can test that the manual size isn't bigger than the original image size. Change-Id: I2946fb21c46ce05583b219f665ef68928188899e --- M VisualEditor.i18n.php M VisualEditor.php M modules/ve-mw/ce/nodes/ve.ce.MWBlockImageNode.js M modules/ve-mw/ui/dialogs/ve.ui.MWMediaEditDialog.js M modules/ve-mw/ui/styles/ve.ui.MWDialog.css 5 files changed, 201 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/93/103193/1 diff --git a/VisualEditor.i18n.php b/VisualEditor.i18n.php index 8e89840..2e0137f 100644 --- a/VisualEditor.i18n.php +++ b/VisualEditor.i18n.php @@ -135,6 +135,10 @@ 'visualeditor-dialog-beta-welcome-content' => 'This is our new, easier way to edit. It\'s still in beta, which means you might find parts of the page you can\'t edit, or encounter issues that need to be fixed. We encourage you to review your changes, and we welcome reports about any issues you might encounter in using VisualEditor (click the "{{int:visualeditor-help-tool}}" button to submit feedback). You can keep using the wikitext editor by clicking the "$1" tab instead – unsaved changes will be lost.', 'visualeditor-dialog-beta-welcome-title' => '{{GENDER:$1|Welcome}} to VisualEditor', 'visualeditor-dialog-media-content-section' => 'Caption', + 'visualeditor-dialog-media-size-section' => 'Image size', + 'visualeditor-dialog-media-size-width' => 'Width', + 'visualeditor-dialog-media-size-height' => 'Height', + 'visualeditor-dialog-media-button-size-default' => 'Set to original size', 'visualeditor-dialog-media-insert-button' => 'Insert media', 'visualeditor-dialog-media-insert-title' => 'Insert media', 'visualeditor-dialog-media-title' => 'Media settings', @@ -456,6 +460,10 @@ * $1 - username or empty string, for GENDER support', 'visualeditor-dialog-media-content-section' => 'Label for the image content sub-section. {{Identical|Caption}}', + 'visualeditor-dialog-media-size-section' => 'Label for the image size sub-section.', + 'visualeditor-dialog-media-size-width' => 'Label for the image width.', + 'visualeditor-dialog-media-size-height' => 'Label for the image height.', + 'visualeditor-dialog-media-button-size-default' => 'Label for the button to reset image size to original values.', 'visualeditor-dialog-media-insert-button' => 'Used as label for the button. {{Identical|Insert media}}', 'visualeditor-dialog-media-insert-title' => 'Media insert dialog title text. diff --git a/VisualEditor.php b/VisualEditor.php index ca2a946..9b1a0b1 100644 --- a/VisualEditor.php +++ b/VisualEditor.php @@ -616,6 +616,10 @@ 'visualeditor-dialog-beta-welcome-content', 'visualeditor-dialog-beta-welcome-title', 'visualeditor-dialog-media-content-section', + 'visualeditor-dialog-media-size-section', + 'visualeditor-dialog-media-size-width', + 'visualeditor-dialog-media-size-height', + 'visualeditor-dialog-media-button-size-default', 'visualeditor-dialog-media-insert-button', 'visualeditor-dialog-media-insert-title', 'visualeditor-dialog-media-title', diff --git a/modules/ve-mw/ce/nodes/ve.ce.MWBlockImageNode.js b/modules/ve-mw/ce/nodes/ve.ce.MWBlockImageNode.js index 78d424e..81ca27a 100644 --- a/modules/ve-mw/ce/nodes/ve.ce.MWBlockImageNode.js +++ b/modules/ve-mw/ce/nodes/ve.ce.MWBlockImageNode.js @@ -253,8 +253,16 @@ this.$image.attr( 'src', this.getResolvedAttribute( 'src' ) ); break; case 'width': + this.updateSize( { + 'width': to, + 'height': this.model.getAttribute( 'height' ) + } ); + break; case 'height': - this.updateSize(); + this.updateSize( { + 'width': this.model.getAttribute( 'widt
[MediaWiki-commits] [Gerrit] Update the statsbar when saving or proofreading - change (mediawiki...Translate)
Amire80 has uploaded a new change for review. https://gerrit.wikimedia.org/r/103192 Change subject: Update the statsbar when saving or proofreading .. Update the statsbar when saving or proofreading Because of a typo in the code the statsbar at the bottom of the TUX message table was not actually update when saving or proofreading a message. This resolves it. Change-Id: I2b858cbe3a92703da1b6bd280ea17b4077bd --- M resources/js/ext.translate.editor.js M resources/js/ext.translate.proofread.js 2 files changed, 9 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/92/103192/1 diff --git a/resources/js/ext.translate.editor.js b/resources/js/ext.translate.editor.js index 237bb24..abd3a75 100644 --- a/resources/js/ext.translate.editor.js +++ b/resources/js/ext.translate.editor.js @@ -156,7 +156,7 @@ if ( this.message.properties ) { $( '.tux-action-bar .tux-statsbar' ).trigger( 'change', - [ 'translated', this.message.properties.state ] + [ 'translated', this.message.properties.status ] ); // TODO: Update any other statsbar for the same group in the page. } diff --git a/resources/js/ext.translate.proofread.js b/resources/js/ext.translate.proofread.js index 8b1db0d..a496a64 100644 --- a/resources/js/ext.translate.proofread.js +++ b/resources/js/ext.translate.proofread.js @@ -152,7 +152,10 @@ proofread.markSelfTranslation(); // Update stats - to translated state from current state. $( '.tux-action-bar .tux-statsbar' ) - .trigger( 'change', [ 'translated', proofread.message.properties.state ] ); + .trigger( + 'change', + [ 'translated', proofread.message.properties.status ] + ); } } ); @@ -295,7 +298,10 @@ .text( mw.language.convertNumber( reviews + 1 ) ); // Update stats - $( '.tux-action-bar .tux-statsbar' ).trigger( 'change', [ 'proofread', proofread.message.properties.state ] ); + $( '.tux-action-bar .tux-statsbar' ).trigger( + 'change', + [ 'proofread', proofread.message.properties.status ] + ); }, function () { mw.log( 'Error while submitting the message for proofread.' ); } ); -- To view, visit https://gerrit.wikimedia.org/r/103192 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2b858cbe3a92703da1b6bd280ea17b4077bd Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Amire80 ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] +add jira to BZ importer - change (pywikibot/sf-export)
Merlijn van Deen has uploaded a new change for review. https://gerrit.wikimedia.org/r/103191 Change subject: +add jira to BZ importer .. +add jira to BZ importer Change-Id: I3fd2f8f734011e373e823aae16aecdbb599adf93 --- A .gitignore A config.py.example A jira.py 3 files changed, 250 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/sf-export refs/changes/91/103191/1 diff --git a/.gitignore b/.gitignore new file mode 100644 index 000..4acd06b --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +config.py diff --git a/config.py.example b/config.py.example new file mode 100644 index 000..fb1a23b --- /dev/null +++ b/config.py.example @@ -0,0 +1 @@ +password="" diff --git a/jira.py b/jira.py new file mode 100644 index 000..1f6b77e --- /dev/null +++ b/jira.py @@ -0,0 +1,248 @@ +import sys +import requests +import textwrap +import json +import bugzilla + +from datetime import datetime, timedelta + +assert(requests.__version__ > "1.0.0") + +# iets met BugZilla nog + +# JIRA config +project = "REPORTS" # SET THIS! +stepsize = 1000 + +# BZ config +bug_defaults = { +'product': 'Tool Labs tools', # SET THIS! +'component': 'tsreports', # SET THIS! +'version': 'unspecified', +'blocked': '', # SET THIS! (to tracking bug or empty for no tracking bug) +'op_sys': 'All', +'rep_platform': 'All', +} + +#base_url = "http://192.168.1.103:8080/xmlrpc.cgi"; +base_url = "https://bugzilla.wikimedia.org/xmlrpc.cgi"; + +username = "wmf.bugconver...@gmail.com" +import config +password = config.password + +print "Logging in to Bugzilla..." + +bz = bugzilla.Bugzilla(url=base_url) +bz.login(username, password) + +def hook(a): +for key in a: +if isinstance(a[key], basestring): +try: +a[key] = datetime.strptime(a[key], "%Y-%m-%dT%H:%M:%S.%f+") +except Exception, e: +pass +return a + +def get(*args, **kwargs): +kwargs['verify'] = False # mitmproxy +return json.loads(requests.get(*args, **kwargs).text, object_hook=hook) + +def reply_format(text, nindent=1): +prefix = '>'*nindent + ' ' +return textwrap.fill(text, initial_indent=prefix, subsequent_indent=prefix, break_long_words=False) + +users = {} + +try: +f = open('user-email-mapping.json', 'r') +users = json.load(f) +except Exception, e: +print e + +def getBZuser(email, name): +global users +if email in users: +return users[email] + +try: +user = bz.getuser(email) +users[email] = email +return email +except bugzilla.xmlrpclib.Fault, e: +if e.faultCode == 51: +pass +else: +raise + +# not found, try heuristics. Search by Full Name! +fusers = bz.searchusers(name) +if not fusers: +users[email] = None +else: +user = fusers[0] +print "Assuming %s <%s> is actually %s <%s>" % (name, email, user.real_name, user.email) +if raw_input("Is this OK? Y/n ").upper().strip() == "Y": +users[email] = user.email +else: +users[email] = None +return users[email] + +print "Retrieving issues from JIRA..." + +issues = get( +'https://jira.toolserver.org/rest/api/2/search', +params={ +'jql': 'project = %s AND status in (Open, "In Progress", Reopened, "In Review", Assigned, "Waiting for customer")' % project, +'fields': 'self', +'maxResults': stepsize +} +)['issues'] + +runAll = False + +maillist = {} +retrIssues = [] +for issue in issues: +issue = get(issue['self']) +retrIssues.append(issue) +fields = issue['fields'] + +if fields['assignee']: +maillist[fields['assignee']['emailAddress']] = fields['assignee']['displayName'] + +maillist[fields['reporter']['emailAddress']] = fields['reporter']['displayName'] + +for c in fields['comment']['comments']: +maillist[c['author']['emailAddress']] = c['author']['displayName'] + +print "Retrieving users from bugzilla..." + +for mail, name in maillist.items(): +bzu = getBZuser(mail, name) +if bzu: +print "%s <%s> => %s" % (name, mail, bzu) +else: +print "%s <%s> not found" % (name, mail) + +f = open('user-email-mapping.json', 'w') +json.dump(users, f) +f.close() + +for issue in retrIssues: +# check if issue is already on BZ +existing_bugs = [bug.bug_id for bug in bz.query({"short_desc": "PYWP-16"})] +if existing_bugs: +print "Skipping " + issue['key'] + " " + fields['summary'] + "; already uploaded? Check bug ID %r" % existing_bugs +continue +fields = issue['fields'] + +cclist = set() +if fields['assignee']: +cclist.add(getBZuser(fields['assignee']['emailAddress'], fields['assignee']['displayName'])) +assignee = "%s <%s>" % (fields['assignee']['displayName'], fields['assignee']['e
[MediaWiki-commits] [Gerrit] Added Job::advisedBackoff() to replace wmf sleep() hack - change (mediawiki/core)
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/103190 Change subject: Added Job::advisedBackoff() to replace wmf sleep() hack .. Added Job::advisedBackoff() to replace wmf sleep() hack * Removed unused USE_PRIORITY constant * A few small cleanups in runJobs.php Change-Id: Ife9370e488fa63dcd1f702ed98f3b7f26057f10c --- M includes/job/Job.php M includes/job/JobQueueGroup.php M includes/job/jobs/HTMLCacheUpdateJob.php M maintenance/runJobs.php 4 files changed, 101 insertions(+), 17 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/90/103190/1 diff --git a/includes/job/Job.php b/includes/job/Job.php index 77652a4..79dbeb5 100644 --- a/includes/job/Job.php +++ b/includes/job/Job.php @@ -198,6 +198,14 @@ } /** +* @return integer Seconds for a runner to avoid another job of this type +* @since 1.23 +*/ + public function advisedBackoff() { + return 0; + } + + /** * Subclasses may need to override this to make duplication detection work. * The resulting map conveys everything that makes the job unique. This is * only checked if ignoreDuplicates() returns true, meaning that duplicate diff --git a/includes/job/JobQueueGroup.php b/includes/job/JobQueueGroup.php index 9d206a3..d71df15 100644 --- a/includes/job/JobQueueGroup.php +++ b/includes/job/JobQueueGroup.php @@ -44,7 +44,6 @@ const TYPE_ANY = 2; // integer; any job const USE_CACHE = 1; // integer; use process or persistent cache - const USE_PRIORITY = 2; // integer; respect deprioritization const PROC_CACHE_TTL = 15; // integer; seconds @@ -149,18 +148,21 @@ * This pops a job off a queue as specified by $wgJobTypeConf and * updates the aggregate job queue information cache as needed. * -* @param int|string $qtype JobQueueGroup::TYPE_DEFAULT or type string +* @param int|string $qtype JobQueueGroup::TYPE_* constant or job type string * @param int $flags Bitfield of JobQueueGroup::USE_* constants +* @param array $blacklist List of job types to ignore * @return Job|bool Returns false on failure */ - public function pop( $qtype = self::TYPE_DEFAULT, $flags = 0 ) { - if ( is_string( $qtype ) ) { // specific job type - $job = $this->get( $qtype )->pop(); - if ( !$job ) { - JobQueueAggregator::singleton()->notifyQueueEmpty( $this->wiki, $qtype ); - } + public function pop( $qtype = self::TYPE_DEFAULT, $flags = 0, array $blacklist = array() ) { + $job = false; - return $job; + if ( is_string( $qtype ) ) { // specific job type + if ( !in_array( $qtype, $blacklist ) ) { + $job = $this->get( $qtype )->pop(); + if ( !$job ) { + JobQueueAggregator::singleton()->notifyQueueEmpty( $this->wiki, $qtype ); + } + } } else { // any job in the "default" jobs types if ( $flags & self::USE_CACHE ) { if ( !$this->cache->has( 'queues-ready', 'list', self::PROC_CACHE_TTL ) ) { @@ -174,20 +176,22 @@ if ( $qtype == self::TYPE_DEFAULT ) { $types = array_intersect( $types, $this->getDefaultQueueTypes() ); } + + $types = array_diff( $types, $blacklist ); // avoid selected types shuffle( $types ); // avoid starvation foreach ( $types as $type ) { // for each queue... $job = $this->get( $type )->pop(); if ( $job ) { // found - return $job; + break; } else { // not found JobQueueAggregator::singleton()->notifyQueueEmpty( $this->wiki, $type ); $this->cache->clear( 'queues-ready' ); } } - - return false; // no jobs found } + + return $job; } /** diff --git a/includes/job/jobs/HTMLCacheUpdateJob.php b/includes/job/jobs/HTMLCacheUpdateJob.php index 833616d..1f2517c 100644 --- a/includes/job/jobs/HTMLCacheUpdateJob.php +++ b/includes/job/jobs/HTMLCacheUpdateJob.php @@ -154,4 +154,17 @@ } } } + + function advisedBackoff() { + // Avoid to
[MediaWiki-commits] [Gerrit] Consistency tweak in preparation for adding extension to tra... - change (mediawiki...Convert2Wiki)
Netbrain has submitted this change and it was merged. Change subject: Consistency tweak in preparation for adding extension to translatewiki.net .. Consistency tweak in preparation for adding extension to translatewiki.net * Remove spaces in $messages array to unbreak translatewiki.net scripts * Add newline at end of file to unbreak translatewiki.net scripts Change-Id: I6e038e8ae31922a8c2360a0e3a01256bb6b19e8f --- M Convert2Wiki.alias.php M Convert2Wiki.i18n.php 2 files changed, 5 insertions(+), 5 deletions(-) Approvals: Netbrain: Verified; Looks good to me, approved diff --git a/Convert2Wiki.alias.php b/Convert2Wiki.alias.php index 5c63683..b52eab5 100644 --- a/Convert2Wiki.alias.php +++ b/Convert2Wiki.alias.php @@ -2,6 +2,6 @@ $specialPageAliases = array(); -$specialPageAliases[ 'en' ] = array( +$specialPageAliases['en'] = array( 'Convert2Wiki' => array( 'Convert2Wiki', 'Convert to Wiki' ), -); \ No newline at end of file +); diff --git a/Convert2Wiki.i18n.php b/Convert2Wiki.i18n.php index d63e53c..51ab66c 100644 --- a/Convert2Wiki.i18n.php +++ b/Convert2Wiki.i18n.php @@ -2,16 +2,16 @@ $messages = array(); -$messages[ 'en' ] = array( +$messages['en'] = array( 'convert2wiki' => "Convert2Wiki", // Important! This is the string that appears on Special:SpecialPages 'convert2wiki-desc' => "Convert2Wiki contains ways to convert external formats to wiki syntax", 'convert2wiki-format-wikitable' => 'WikiTable', 'convert2wiki-format-csv' => 'CSV', ); -$messages[ 'qqq' ] = array( +$messages['qqq'] = array( 'convert2wiki' => "The name of the extension's entry in Special:SpecialPages", 'convert2wiki-desc' => "{{desc}}", 'convert2wiki-format-wikitable' => 'WikiTable format name', 'convert2wiki-format-csv' => 'CSV format name', -); \ No newline at end of file +); -- To view, visit https://gerrit.wikimedia.org/r/103122 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6e038e8ae31922a8c2360a0e3a01256bb6b19e8f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Convert2Wiki Gerrit-Branch: master Gerrit-Owner: Raimond Spekking Gerrit-Reviewer: Netbrain Gerrit-Reviewer: Siebrand ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make Language::fetchLanguageName lowercase its first argument. - change (mediawiki/core)
Brian Wolff has uploaded a new change for review. https://gerrit.wikimedia.org/r/103189 Change subject: Make Language::fetchLanguageName lowercase its first argument. .. Make Language::fetchLanguageName lowercase its first argument. Currently Language::fetchLanguageName( 'en-GB' ) returns false as it expects 'en-gb'. Given that technically speaking, 'en-GB' is the canonical form, I don't think this is a good thing. Changed function to lowercase its argument. There's no Language object handy, so I just used strtolower (since language codes are always ascii, that shouldn't matter) Change-Id: Iba1f581bf2d6d2b26a14f9f80699d8eeb5d724d6 --- M languages/Language.php 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/89/103189/1 diff --git a/languages/Language.php b/languages/Language.php index 0026fdf..23506e9 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -929,6 +929,7 @@ * @since 1.20 */ public static function fetchLanguageName( $code, $inLanguage = null, $include = 'all' ) { + $code = strtolower( $code ); $array = self::fetchLanguageNames( $inLanguage, $include ); return !array_key_exists( $code, $array ) ? '' : $array[$code]; } -- To view, visit https://gerrit.wikimedia.org/r/103189 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iba1f581bf2d6d2b26a14f9f80699d8eeb5d724d6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Brian Wolff ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Removed bottom banner border color from CSS - change (mediawiki...ZeroRatedMobileAccess)
Yurik has uploaded a new change for review. https://gerrit.wikimedia.org/r/103188 Change subject: Removed bottom banner border color from CSS .. Removed bottom banner border color from CSS Change-Id: I6d3800d1c81ddf37fb23f5d74c147f364c6d05c1 --- M modules/banner.css 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ZeroRatedMobileAccess refs/changes/88/103188/1 diff --git a/modules/banner.css b/modules/banner.css index a2c557b..a1a4c06 100644 --- a/modules/banner.css +++ b/modules/banner.css @@ -8,7 +8,6 @@ z-index: 99; background: #F4A83D; display: block; - border-bottom: 1px solid #D6800C; font-weight: bold; padding: 0; text-align: center; -- To view, visit https://gerrit.wikimedia.org/r/103188 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6d3800d1c81ddf37fb23f5d74c147f364c6d05c1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ZeroRatedMobileAccess 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] Fix comment edited text for comments which have since been d... - change (mediawiki...LiquidThreads)
Alex Monk has uploaded a new change for review. https://gerrit.wikimedia.org/r/103187 Change subject: Fix comment edited text for comments which have since been deleted .. Fix comment edited text for comments which have since been deleted Was showing "Comment text [ edited]". Change-Id: If1c819a61f5f0b5f075c0e705202e899e3e063c1 --- M classes/ThreadHistoryPager.php M i18n/Lqt.i18n.php 2 files changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/LiquidThreads refs/changes/87/103187/1 diff --git a/classes/ThreadHistoryPager.php b/classes/ThreadHistoryPager.php index 572a8bd..e0e9079 100644 --- a/classes/ThreadHistoryPager.php +++ b/classes/ThreadHistoryPager.php @@ -127,6 +127,9 @@ $args[] = $diffLink; } else { $args[] = ''; + if ( $type == Threads::CHANGE_EDITED_ROOT ) { + $msg = wfMessage( 'lqt_hist_comment_edited_deleted' )->parse(); + } } break; case Threads::CHANGE_REPLY_CREATED: diff --git a/i18n/Lqt.i18n.php b/i18n/Lqt.i18n.php index bd9c47d..2f7f0f3 100644 --- a/i18n/Lqt.i18n.php +++ b/i18n/Lqt.i18n.php @@ -38,6 +38,7 @@ 'lqt-history-title' => 'Thread history', 'lqt_hist_comment_edited' => 'Comment text [$2 edited]', + 'lqt_hist_comment_edited_deleted' => 'Comment text edited (since deleted)', 'lqt_hist_summary_changed' => 'Summary changed', 'lqt_hist_reply_created' => '[[$1|New reply]] created', 'lqt_hist_reply_created_deleted' => 'New reply created (since deleted)', @@ -392,6 +393,7 @@ 'lqt-history-title' => 'Title of thread history page, see [{{canonicalurl:Thread:Support/Payflowpro_gateway-select-dollar-amount|lqt_method=thread_history}} example]', 'lqt_hist_comment_edited' => 'Parameters: * $2 is the URL to the comment', + 'lqt_hist_comment_edited_deleted' => 'Same as {{msg-mw|lqt_hist_comment_edited}} but when the comment has been deleted', 'lqt_hist_summary_changed' => "Summary for 'activity' in thread history, see [{{canonicalurl:Thread:Support/Payflowpro_gateway-select-dollar-amount|lqt_method=thread_history}} example]", 'lqt_hist_reply_created' => "Summary for 'activity' in thread history, see [{{canonicalurl:Thread:Support/Payflowpro_gateway-select-dollar-amount|lqt_method=thread_history}} example] -- To view, visit https://gerrit.wikimedia.org/r/103187 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If1c819a61f5f0b5f075c0e705202e899e3e063c1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/LiquidThreads 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] Preserve whitespace from original image options. - change (mediawiki...parsoid)
Cscott has uploaded a new change for review. https://gerrit.wikimedia.org/r/103185 Change subject: Preserve whitespace from original image options. .. Preserve whitespace from original image options. Change-Id: I3587c2b9239d48827cfc63b8f4b5d51e9e1c7f9f --- M lib/mediawiki.WikitextSerializer.js M tests/parserTests.txt 2 files changed, 25 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid refs/changes/85/103185/1 diff --git a/lib/mediawiki.WikitextSerializer.js b/lib/mediawiki.WikitextSerializer.js index 554f1ec..8990ec3 100644 --- a/lib/mediawiki.WikitextSerializer.js +++ b/lib/mediawiki.WikitextSerializer.js @@ -1720,15 +1720,27 @@ // ok, sort the new options to match the order given in the old optlist // and try to match up the aliases used - var opts = outerDP.optList || []; + var opts = outerDP.optList || []; // original wikitext options nopts.forEach(function(no) { no.sort = opts.length; var idx = opts.findIndex(function(o) { return o.ck === no.ck; }); if (idx < 0) { no.ak = no.ak[0]; return; /* new option */ } no.sort = idx; // use a matching alias, if there is one - var a = no.ak.find(function(a) { return a===opts[idx].ak; }); - no.ak = a ? a : no.ak[0]; // otherwise, use the first alias given. + var a = no.ak.find(function(a) { + // note the trim() here; that allows us to snarf eccentric + // whitespace from the original option wikitext + if ('v' in no) { a = a.replace( '$1', no.v ); } + return a === String(opts[idx].ak).trim(); + }); + // use the alias (incl whitespace) from the original option wikitext + // if found; otherwise use the first alias given. + if (a && no.ck !== 'caption') { + no.ak = opts[idx].ak; + delete no.v; // prevent double substitution + } else { + no.ak = no.ak[0]; + } }); // sort! nopts.sort(function(a, b) { return a.sort - b.sort; }); diff --git a/tests/parserTests.txt b/tests/parserTests.txt index 49eb91c..25ff8c7 100644 --- a/tests/parserTests.txt +++ b/tests/parserTests.txt @@ -18824,6 +18824,16 @@ !! end !! test +Image: Modifying caption of an image +!! options +parsoid=html2wt +!! input +[[Image:Foobar.jpg|thumb|caption]] +!! result +caption +!!end + +!! test Image: New block level image should have \n before and after !! options parsoid=html2wt -- To view, visit https://gerrit.wikimedia.org/r/103185 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3587c2b9239d48827cfc63b8f4b5d51e9e1c7f9f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/parsoid Gerrit-Branch: master Gerrit-Owner: Cscott ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Support `lang` attribute on images. - change (mediawiki...parsoid)
Cscott has uploaded a new change for review. https://gerrit.wikimedia.org/r/103186 Change subject: Support `lang` attribute on images. .. Support `lang` attribute on images. Includes support for parsertests using the lang option. Change-Id: Iae50f6e4948844b94a66f8437e12e05aa3ec1685 --- M lib/baseconfig/dewiki.json M lib/baseconfig/enwiki.json M lib/ext.core.LinkHandler.js M lib/mediawiki.WikiConfig.js M lib/mediawiki.WikitextSerializer.js M lib/mediawiki.wikitext.constants.js M lib/pegTokenizer.pegjs.txt M tests/mockAPI.js M tests/parserTests.txt 9 files changed, 64 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid refs/changes/86/103186/1 diff --git a/lib/baseconfig/dewiki.json b/lib/baseconfig/dewiki.json index f681710..e87705b 100644 --- a/lib/baseconfig/dewiki.json +++ b/lib/baseconfig/dewiki.json @@ -686,6 +686,14 @@ "case-sensitive": "" }, { +"name": "img_lang", +"aliases": [ + "sprache=$1", + "lang=$1" +], +"case-sensitive": "" + }, + { "name": "img_page", "aliases": [ "seite=$1", diff --git a/lib/baseconfig/enwiki.json b/lib/baseconfig/enwiki.json index c724966..c3fa841 100644 --- a/lib/baseconfig/enwiki.json +++ b/lib/baseconfig/enwiki.json @@ -604,6 +604,13 @@ "case-sensitive": "" }, { +"name": "img_lang", +"aliases": [ + "lang=$1" +], +"case-sensitive": "" + }, + { "name": "img_page", "aliases": [ "page=$1", diff --git a/lib/ext.core.LinkHandler.js b/lib/ext.core.LinkHandler.js index 8ad4ae3..99ce62a 100644 --- a/lib/ext.core.LinkHandler.js +++ b/lib/ext.core.LinkHandler.js @@ -895,6 +895,10 @@ img.addNormalizedAttribute( 'resource', linkTitle.makeLink(), origFilename ); img.addAttribute( 'src', path ); + if ( oHash.lang ) { + img.addNormalizedAttribute( 'lang', oHash.lang, langBackup ); + } + if ( hasImageLink ) { if ( oHash.link && urlParser.tokenizeURL( oHash.link )) { // an external link! @@ -1020,7 +1024,7 @@ // extract options // TODO gwicke: abstract out! var i, l, kv, captionInfo, captionSrc, linkSrc, captionOffset, - altBackup, linkBackup, + altBackup, linkBackup, langBackup, // option hash, both keys and values normalized oHash = { height: null, width: null }, getOption = env.conf.wiki.getMagicPatternMatcher( WikitextConstants.Image.PrefixOptions ); @@ -1081,6 +1085,11 @@ linkBackup = oContent.vsrc; } + if ( optInfo.ck === 'lang' ) { + // Holds the shadow info for the lang option until we can save it + langBackup = oContent.vsrc; + } + if ( optInfo.s === true ) { // Simple image option oHash[optInfo.ck] = optInfo.v; diff --git a/lib/mediawiki.WikiConfig.js b/lib/mediawiki.WikiConfig.js index 115d6e7..2d3df6c 100644 --- a/lib/mediawiki.WikiConfig.js +++ b/lib/mediawiki.WikiConfig.js @@ -476,6 +476,7 @@ } first = false; aliases = this._interpolatedMagicWordAliases[option]; + if (aliases === undefined) { aliases = ['UNKNOWN_'+option]; } regexString += aliases.join( '|' ) .replace( /((?:^|\|)(?:[^\$]|\$[^1])*)($|\|)/g, '$1$$1$2' ) .replace( /\$1/g, '(.*)' ); diff --git a/lib/mediawiki.WikitextSerializer.js b/lib/mediawiki.WikitextSerializer.js index 8990ec3..8ce0a2c 100644 --- a/lib/mediawiki.WikitextSerializer.js +++ b/lib/mediawiki.WikitextSerializer.js @@ -1575,11 +1575,22 @@ } } - // Ok, start assembling options, beginning with link & alt + // Fetch the lang (if any) + var lang = null; + if (imgElt.hasAttribute('lang')) { + lang = this.serializedAttrVal( imgElt, 'lang' ); + if ( lang.modified || !lang.value ) { + lang.value = imgElt.getAttribute( 'lang' ); + lang.fromsrc = false; + } + } + + // Ok, start assembling options, beginning with link & alt & lang var nopts = []; [ { name: 'link', value: link, cond: !(link && link.value === resource.value) }, { name: 'alt', value: alt, cond: !!alt }, + { name: 'lang', value: lang, cond: !!lang }, ].forEach(function(o) { if (!o.cond) { return; } if (o.value && o.value.fromsrc) { @@ -1687,7 +1698,6 @@
[MediaWiki-commits] [Gerrit] Refactor message tools menu item creation - change (mediawiki...Translate)
jenkins-bot has submitted this change and it was merged. Change subject: Refactor message tools menu item creation .. Refactor message tools menu item creation Change-Id: I9f50ba700fb6ddf0c41c8eca618918fe3618f7da --- M resources/js/ext.translate.editor.js 1 file changed, 54 insertions(+), 32 deletions(-) Approvals: Nikerabbit: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/js/ext.translate.editor.js b/resources/js/ext.translate.editor.js index 7823463..237bb24 100644 --- a/resources/js/ext.translate.editor.js +++ b/resources/js/ext.translate.editor.js @@ -286,42 +286,64 @@ } }, - createMessageTools: function () { - var $historyItem, $translationsItem, - wgScript = mw.config.get( 'wgScript' ), - historyUri = new mw.Uri(), - translationsUri = new mw.Uri(); + /** +* Creates a menu element for the message tools. +* +* @param {string} className Used as the element's CSS class +* @param {Object} query Used as the query in the mw.Uri object +* @param {string} message The message of the label of the menu item +* @return {jQuery} The new menu item element +*/ + createMessageToolsItem: function ( className, query, message ) { + var uri = new mw.Uri(); - historyUri.path = wgScript; - historyUri.query = { - title: this.message.title, - action: 'history' - }; - $historyItem = $( '' ) - .addClass( 'message-tools-history' + - ( ( this.message.translation === null ) ? ' hide' : '' ) - ) + uri.path = mw.config.get( 'wgScript' ); + uri.query = query; + + return $( '' ) + .addClass( className ) .append( $( '' ) - .attr( { - href: historyUri.toString(), - target: '_blank' - } ) - .text( mw.msg( 'tux-editor-message-tools-history' ) ) + .attr( { + href: uri.toString(), + target: '_blank' + } ) + .text( mw.msg( message ) ) + ); + }, + + /** +* Creates an element with a dropdown menu including +* tools for the translators. +* +* @return {jQuery} The new message tools menu element +*/ + createMessageTools: function () { + var $historyItem, $translationsItem; + + $historyItem = this.createMessageToolsItem( + 'message-tools-history', + { + title: this.message.title, + action: 'history' + }, + 'tux-editor-message-tools-history' ); - translationsUri.path = wgScript; - translationsUri.query = { - title: 'Special:Translations', - message: this.message.title - }; - $translationsItem = $( '' ) - .addClass( 'message-tools-translations' ) - .append( $( '' ) - .attr( { - href: translationsUri.toString(), - target: '_blank' - } ) - .text( mw.msg( 'tux-editor-message-tools-translations' ) ) + // Hide this link if the translation doesn't actually exist. + // It will be shown when a translation will be created. + if ( this.message.translation === null ) { + $historyItem.addClass( 'hide' ); + } + + // A link to Special:Translations, + // with translations of this message to other languages + $translationsItem = this.createM
[MediaWiki-commits] [Gerrit] Remove invalid wikitext [[|New reply]] - change (mediawiki...LiquidThreads)
Alex Monk has submitted this change and it was merged. Change subject: Remove invalid wikitext [[|New reply]] .. Remove invalid wikitext [[|New reply]] A bit hackish so feedback is welcome. If Title doesn't exist we show a new message 'New reply created (deleted)'. Bug: 47006 Change-Id: I4ba3bf1c10860d4fe331f894f4b3a5de1ee52613 --- M classes/ThreadHistoryPager.php M i18n/Lqt.i18n.php 2 files changed, 7 insertions(+), 0 deletions(-) Approvals: Alex Monk: Verified; Looks good to me, approved diff --git a/classes/ThreadHistoryPager.php b/classes/ThreadHistoryPager.php index 2dd72ce..572a8bd 100644 --- a/classes/ThreadHistoryPager.php +++ b/classes/ThreadHistoryPager.php @@ -129,6 +129,11 @@ $args[] = ''; } break; + case Threads::CHANGE_REPLY_CREATED: + if ( !$changeObject || !$changeObject->title() ) { + $msg = wfMessage( 'lqt_hist_reply_created_deleted' )->parse(); + } + break; } $content = wfMsgReplaceArgs( $msg, $args ); diff --git a/i18n/Lqt.i18n.php b/i18n/Lqt.i18n.php index 202f979..4c87ac8 100644 --- a/i18n/Lqt.i18n.php +++ b/i18n/Lqt.i18n.php @@ -40,6 +40,7 @@ 'lqt_hist_comment_edited' => 'Comment text [$2 edited]', 'lqt_hist_summary_changed' => 'Summary changed', 'lqt_hist_reply_created' => '[[$1|New reply]] created', + 'lqt_hist_reply_created_deleted' => 'New reply created (since deleted)', 'lqt_hist_thread_created' => 'New thread created', 'lqt_hist_deleted' => 'Deleted', 'lqt_hist_undeleted' => 'Undeleted', @@ -396,6 +397,7 @@ Parameters: * $1 is the text for a wiki link to the new reply", 'lqt_hist_thread_created' => "Summary for 'activity' in thread history, see [{{canonicalurl:Thread:Support/Payflowpro_gateway-select-dollar-amount|lqt_method=thread_history}} example]", + 'lqt_hist_reply_created_deleted' => 'Same as {{msg-mw|lqt_hist_reply_created}} but when the reply has been deleted', 'lqt_hist_deleted' => '{{Identical|Deleted}}', 'lqt_hist_moved_talkpage' => '{{Identical|Move}}', 'lqt_hist_listing_subtitle' => "Subtitle for 'thread history' page, see [{{canonicalurl:Thread:Support/Payflowpro_gateway-select-dollar-amount|lqt_method=thread_history}} example]", -- To view, visit https://gerrit.wikimedia.org/r/58096 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4ba3bf1c10860d4fe331f894f4b3a5de1ee52613 Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/extensions/LiquidThreads Gerrit-Branch: master Gerrit-Owner: Nischayn22 Gerrit-Reviewer: Alex Monk Gerrit-Reviewer: Nischayn22 Gerrit-Reviewer: Reedy Gerrit-Reviewer: Siebrand Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use LEFT JOIN for SQLite compatibility - change (mediawiki...LiquidThreads)
Alex Monk has submitted this change and it was merged. Change subject: Use LEFT JOIN for SQLite compatibility .. Use LEFT JOIN for SQLite compatibility SQLite does not implement RIGHT JOIN, but it does implement LEFT JOIN: http://www.sqlite.org/omitted.html Because of this, Special:NewMessages gave an SQL error. This commit swaps the RIGHT JOIN for a LEFT JOIN and joins the other table, so should give the exact same results. Bug: 39064 Change-Id: Iddeb854cfc96e37d4643d0f6ddb72d3f4ea97bd8 --- M classes/NewMessagesController.php 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Alex Monk: Verified; Looks good to me, approved jenkins-bot: Checked diff --git a/classes/NewMessagesController.php b/classes/NewMessagesController.php index 4388d97..d5a07ad 100644 --- a/classes/NewMessagesController.php +++ b/classes/NewMessagesController.php @@ -437,8 +437,8 @@ __METHOD__, array(), array( - 'user_message_state' => - array( 'RIGHT JOIN', $joinClause ) + 'thread' => + array( 'LEFT JOIN', $joinClause ) ) ); -- To view, visit https://gerrit.wikimedia.org/r/101055 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iddeb854cfc96e37d4643d0f6ddb72d3f4ea97bd8 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/LiquidThreads Gerrit-Branch: master Gerrit-Owner: Leaves in Motion <11fallinglea...@gmail.com> Gerrit-Reviewer: Alex Monk Gerrit-Reviewer: Leaves in Motion <11fallinglea...@gmail.com> Gerrit-Reviewer: MaxSem Gerrit-Reviewer: Nemo bis Gerrit-Reviewer: Siebrand Gerrit-Reviewer: Werdna Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use local Wiki.png for Central Kurdish Wikipedia - change (operations/mediawiki-config)
Ebrahim has uploaded a new change for review. https://gerrit.wikimedia.org/r/103184 Change subject: Use local Wiki.png for Central Kurdish Wikipedia .. Use local Wiki.png for Central Kurdish Wikipedia Bug: 58807 Change-Id: I70055c0408e1ce42557ede6a16de8ce9d950deb9 --- M wmf-config/InitialiseSettings.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/84/103184/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 5a4316d..689f8ec 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -414,7 +414,7 @@ 'chwiki' => '//upload.wikimedia.org/wikipedia/commons/b/bc/Wikipedia-logo-v2-ch.png', // bug 40285 'chrwiki' => '//upload.wikimedia.org/wikipedia/commons/9/98/Wikipedia-logo-chr.png', // bug 37327 'chywiki' => '//upload.wikimedia.org/wikipedia/commons/8/8d/Wikipedia-logo-v2-chy.png', // bug 46589 - 'ckbwiki' => '//upload.wikimedia.org/wikipedia/commons/a/a4/Wikipedia-logo-v2-ckb.png', // bug 48397 + 'ckbwiki' => '$stdlogo', 'cowiki' => '//upload.wikimedia.org/wikipedia/commons/6/6f/Wikipedia-logo-v2-co.png', // bug 40285 'crhwiki' => '$stdlogo', 'csbwiki' => '//upload.wikimedia.org/wikipedia/commons/7/71/Wikipedia-logo-v2-csb.png', // bug 40285 -- To view, visit https://gerrit.wikimedia.org/r/103184 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I70055c0408e1ce42557ede6a16de8ce9d950deb9 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Ebrahim ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Port spamremove.py to core - change (pywikibot/core)
Strainu has submitted this change and it was merged. Change subject: Port spamremove.py to core .. Port spamremove.py to core Change-Id: I6c60bc70d5771080168f7df62192151ed16e83a3 --- A scripts/spamremove.py 1 file changed, 130 insertions(+), 0 deletions(-) Approvals: Strainu: Verified; Looks good to me, approved jenkins-bot: Checked diff --git a/scripts/spamremove.py b/scripts/spamremove.py new file mode 100755 index 000..8ee5397 --- /dev/null +++ b/scripts/spamremove.py @@ -0,0 +1,130 @@ +# -*- coding: utf-8 -*- +#!/usr/bin/python + +""" +Script to remove links that are being or have been spammed. +Usage: + +spamremove.py www.spammedsite.com + +It will use Special:Linksearch to find the pages on the wiki that link to +that site, then for each page make a proposed change consisting of removing +all the lines where that url occurs. You can choose to: +* accept the changes as proposed +* edit the page yourself to remove the offending link +* not change the page in question + +Command line options: +-automatic: Do not ask, but remove the lines automatically. Be very careful + in using this option! + +-namespace: Filters the search to a given namespace. If this is specified + multiple times it will search all given namespaces + +""" + +# +# (C) Pywikipedia bot team, 2007-2010 +# +# Distributed under the terms of the MIT license. +# +__version__ = '$Id$' + +# + +import pywikibot +from pywikibot import config +from pywikibot import pagegenerators +import editarticle +import sys + + +def main(): +automatic = False +namespaces = [] +msg = { +'ar': u'إزالة الوصلات إلى موقع سبام %s', +'de': u'Entferne in Spam-Blacklist eingetragenen Weblink auf %s', +'en': u'Removing links to spamming site %s', +'es': u'Removiendo enlaces a sitio publicitario %s', +'fa': u'حذف پیوند به وبگاه هرزنگاری %s', +'he': u'מסיר קישורים לאתר ספאם %s', +'fr': u'Suppression du lien blacklisté %s', +'it': u'Rimuovo link contenuto nella Spam-Blacklist %s', +'ja': u'ロボットによる: 迷惑リンク削除 %s', +'nl': u'Links naar gespamde site: %s verwijderd', +'pt': u'Removendo links de spam do site %s', +'ta': u'எரிதமாக இணைக்கப்பட்ட %s இணையத்தளம் நீக்கப்பட்டது', +'vi': u'xóa các liên kết đến website spam %s', +'zh': u'機器人: 移除廣告黑名單連結 %s', +} +spamSite = '' +for arg in pywikibot.handleArgs(): +if arg.startswith("-automatic"): +automatic = True +elif arg.startswith('-namespace:'): +try: +namespaces.append(int(arg[len('-namespace:'):])) +except ValueError: +namespaces.append(arg[len('-namespace:'):]) +else: +spamSite = arg +if not automatic: +config.put_throttle = 1 +if not spamSite: +pywikibot.showHelp('spamremove') +pywikibot.output(u"No spam site specified.") +sys.exit() +mysite = pywikibot.getSite() +pages = list(set(mysite.exturlusage(spamSite))) +if namespaces: +pages = list(set(pagegenerators.NamespaceFilterPageGenerator(pages, + namespaces))) +if len(pages) == 0: +pywikibot.output('No page found.') +else: +pywikibot.output('%d pages found.' % len(pages)) +for p in pages: +text = p.get() +if not spamSite in text: +continue +# Show the title of the page we're working on. +# Highlight the title in purple. +pywikibot.output(u"\n\n>>> \03{lightpurple}%s\03{default} <<<" + % p.title()) +lines = text.split('\n') +newpage = [] +lastok = "" +for line in lines: +if spamSite in line: +if lastok: +pywikibot.output(lastok) +pywikibot.output('\03{lightred}%s\03{default}' % line) +lastok = None +else: +newpage.append(line) +if line.strip(): +if lastok is None: +pywikibot.output(line) +lastok = line +if automatic: +answer = "y" +else: +answer = pywikibot.inputChoice(u'\nDelete the red lines?', + ['yes', 'no', 'edit'], + ['y', 'N', 'e'], 'n') +if answer == "n": +continue +elif answer == "e": +editor = editarticle.TextEditor() +newtext = editor.edit(text, highlight=spamSite, + jumpIndex=text.find(spamSite)) +else: +newtext
[MediaWiki-commits] [Gerrit] Fix en.wiktionary favicon for GCI 2013 - change (operations/mediawiki-config)
Sn1per has uploaded a new change for review. https://gerrit.wikimedia.org/r/103183 Change subject: Fix en.wiktionary favicon for GCI 2013 .. Fix en.wiktionary favicon for GCI 2013 Bug: 58326 Change-Id: Ifd438bbfab6f7cf164f9be269bcbc864ae228cde --- M docroot/bits/favicon/wiktionary/en.ico 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/83/103183/1 diff --git a/docroot/bits/favicon/wiktionary/en.ico b/docroot/bits/favicon/wiktionary/en.ico index 8907e8a..6f70511 100644 --- a/docroot/bits/favicon/wiktionary/en.ico +++ b/docroot/bits/favicon/wiktionary/en.ico Binary files differ -- To view, visit https://gerrit.wikimedia.org/r/103183 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifd438bbfab6f7cf164f9be269bcbc864ae228cde Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Sn1per ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Consistency tweak in preparation for adding extension to tra... - change (mediawiki...Convert2Wiki)
Raimond Spekking has uploaded a new change for review. https://gerrit.wikimedia.org/r/103122 Change subject: Consistency tweak in preparation for adding extension to translatewiki.net .. Consistency tweak in preparation for adding extension to translatewiki.net * Remove spaces in $messages array to unbreak translatewiki.net scripts * Add newline at end of file to unbreak translatewiki.net scripts Change-Id: I6e038e8ae31922a8c2360a0e3a01256bb6b19e8f --- M Convert2Wiki.alias.php M Convert2Wiki.i18n.php 2 files changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Convert2Wiki refs/changes/22/103122/1 diff --git a/Convert2Wiki.alias.php b/Convert2Wiki.alias.php index 5c63683..b52eab5 100644 --- a/Convert2Wiki.alias.php +++ b/Convert2Wiki.alias.php @@ -2,6 +2,6 @@ $specialPageAliases = array(); -$specialPageAliases[ 'en' ] = array( +$specialPageAliases['en'] = array( 'Convert2Wiki' => array( 'Convert2Wiki', 'Convert to Wiki' ), -); \ No newline at end of file +); diff --git a/Convert2Wiki.i18n.php b/Convert2Wiki.i18n.php index d63e53c..51ab66c 100644 --- a/Convert2Wiki.i18n.php +++ b/Convert2Wiki.i18n.php @@ -2,16 +2,16 @@ $messages = array(); -$messages[ 'en' ] = array( +$messages['en'] = array( 'convert2wiki' => "Convert2Wiki", // Important! This is the string that appears on Special:SpecialPages 'convert2wiki-desc' => "Convert2Wiki contains ways to convert external formats to wiki syntax", 'convert2wiki-format-wikitable' => 'WikiTable', 'convert2wiki-format-csv' => 'CSV', ); -$messages[ 'qqq' ] = array( +$messages['qqq'] = array( 'convert2wiki' => "The name of the extension's entry in Special:SpecialPages", 'convert2wiki-desc' => "{{desc}}", 'convert2wiki-format-wikitable' => 'WikiTable format name', 'convert2wiki-format-csv' => 'CSV format name', -); \ No newline at end of file +); -- To view, visit https://gerrit.wikimedia.org/r/103122 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6e038e8ae31922a8c2360a0e3a01256bb6b19e8f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Convert2Wiki Gerrit-Branch: master Gerrit-Owner: Raimond Spekking ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [TextExtracts] Register extension - change (translatewiki)
Raimond Spekking has submitted this change and it was merged. Change subject: [TextExtracts] Register extension .. [TextExtracts] Register extension Change-Id: I70a3547bd1c3ad937dcc70077e9958bfc89fdc08 --- M groups/MediaWiki/mediawiki-defines.txt 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Raimond Spekking: Verified; Looks good to me, approved diff --git a/groups/MediaWiki/mediawiki-defines.txt b/groups/MediaWiki/mediawiki-defines.txt index be23486..1d3c5cc 100644 --- a/groups/MediaWiki/mediawiki-defines.txt +++ b/groups/MediaWiki/mediawiki-defines.txt @@ -1577,6 +1577,8 @@ aliasfile = TemplateSandbox/TemplateSandbox.alias.php ignored = templatesandbox-editform-text, templatesandbox-editform-helptext +Text Extracts + Thanks Throttle Override -- To view, visit https://gerrit.wikimedia.org/r/103121 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I70a3547bd1c3ad937dcc70077e9958bfc89fdc08 Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Raimond Spekking Gerrit-Reviewer: Raimond Spekking Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [TextExtracts] Register extension - change (translatewiki)
Raimond Spekking has uploaded a new change for review. https://gerrit.wikimedia.org/r/103121 Change subject: [TextExtracts] Register extension .. [TextExtracts] Register extension Change-Id: I70a3547bd1c3ad937dcc70077e9958bfc89fdc08 --- M groups/MediaWiki/mediawiki-defines.txt 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/21/103121/1 diff --git a/groups/MediaWiki/mediawiki-defines.txt b/groups/MediaWiki/mediawiki-defines.txt index be23486..1d3c5cc 100644 --- a/groups/MediaWiki/mediawiki-defines.txt +++ b/groups/MediaWiki/mediawiki-defines.txt @@ -1577,6 +1577,8 @@ aliasfile = TemplateSandbox/TemplateSandbox.alias.php ignored = templatesandbox-editform-text, templatesandbox-editform-helptext +Text Extracts + Thanks Throttle Override -- To view, visit https://gerrit.wikimedia.org/r/103121 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I70a3547bd1c3ad937dcc70077e9958bfc89fdc08 Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Raimond Spekking ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add newline at end of file to unbreak translatewiki.net scripts - change (mediawiki...TextExtracts)
Raimond Spekking has uploaded a new change for review. https://gerrit.wikimedia.org/r/103120 Change subject: Add newline at end of file to unbreak translatewiki.net scripts .. Add newline at end of file to unbreak translatewiki.net scripts Change-Id: I617c511c847761a694a7aebe74e5d66f3f3a4e10 --- M TextExtracts.i18n.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TextExtracts refs/changes/20/103120/1 diff --git a/TextExtracts.i18n.php b/TextExtracts.i18n.php index 3cc9efe..0fad5c8 100644 --- a/TextExtracts.i18n.php +++ b/TextExtracts.i18n.php @@ -17,4 +17,4 @@ */ $messages['qqq'] = array( 'textextracts-desc' => '{{desc}}', -); \ No newline at end of file +); -- To view, visit https://gerrit.wikimedia.org/r/103120 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I617c511c847761a694a7aebe74e5d66f3f3a4e10 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TextExtracts Gerrit-Branch: master Gerrit-Owner: Raimond Spekking ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add newline at end of file to unbreak translatewiki.net scripts - change (mediawiki...TextExtracts)
Raimond Spekking has submitted this change and it was merged. Change subject: Add newline at end of file to unbreak translatewiki.net scripts .. Add newline at end of file to unbreak translatewiki.net scripts Change-Id: I617c511c847761a694a7aebe74e5d66f3f3a4e10 --- M TextExtracts.i18n.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Raimond Spekking: Verified; Looks good to me, approved diff --git a/TextExtracts.i18n.php b/TextExtracts.i18n.php index 3cc9efe..0fad5c8 100644 --- a/TextExtracts.i18n.php +++ b/TextExtracts.i18n.php @@ -17,4 +17,4 @@ */ $messages['qqq'] = array( 'textextracts-desc' => '{{desc}}', -); \ No newline at end of file +); -- To view, visit https://gerrit.wikimedia.org/r/103120 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I617c511c847761a694a7aebe74e5d66f3f3a4e10 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TextExtracts Gerrit-Branch: master Gerrit-Owner: Raimond Spekking Gerrit-Reviewer: Raimond Spekking ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] i18n: Add PLURAL/GENDER support to revreview-reject-summary-* - change (mediawiki...FlaggedRevs)
MegaAlex has uploaded a new change for review. https://gerrit.wikimedia.org/r/103119 Change subject: i18n: Add PLURAL/GENDER support to revreview-reject-summary-* .. i18n: Add PLURAL/GENDER support to revreview-reject-summary-* Spotted by Purodha Change-Id: I0029ffa898120e529d095f8c1651dbcd1b3c9889 --- M frontend/RejectConfirmationFormUI.php M frontend/language/RevisionReview.i18n.php 2 files changed, 33 insertions(+), 15 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/FlaggedRevs refs/changes/19/103119/1 diff --git a/frontend/RejectConfirmationFormUI.php b/frontend/RejectConfirmationFormUI.php index 3e94566..d91e77d 100644 --- a/frontend/RejectConfirmationFormUI.php +++ b/frontend/RejectConfirmationFormUI.php @@ -62,6 +62,8 @@ $rejectAuthors[] = $rev->isDeleted( Revision::DELETED_USER ) ? wfMessage( 'rev-deleted-user' )->text() : "[[{$contribs}/{$rev->getUserText()}|{$rev->getUserText()}]]"; + //Used for GENDER support for revreview-reject-summary-* + $lastRejectAuthor = $rev->getUserText(); } $lastTextId = $rev->getTextId(); } @@ -96,9 +98,13 @@ $comment = $this->form->getComment(); // convenience // Determine the default edit summary... - $oldRevAuthor = $oldRev->isDeleted( Revision::DELETED_USER ) - ? wfMessage( 'rev-deleted-user' )->text() - : $oldRev->getUserText(); + if ( $oldRev->isDeleted( Revision::DELETED_USER ) ) { + $oldRevAuthor = wfMessage( 'rev-deleted-user' )->text(); + $oldRevAuthorUsername = '.'; + } else { + $oldRevAuthor = $oldRev->getUserText(); + $oldRevAuthorUsername = $oldRevAuthor; + } // NOTE: *-cur msg wording not safe for (unlikely) edit auto-merge $msg = $newRev->isCurrent() ? 'revreview-reject-summary-cur' @@ -107,7 +113,10 @@ $wgContLang->formatNum( count( $rejectIds ) ), $wgContLang->listToText( $rejectAuthors ), $oldRev->getId(), - $oldRevAuthor )->inContentLanguage()->text(); + $oldRevAuthor, + count ( $rejectAuthors ) == 1 ? $lastRejectAuthor : '.', + $oldRevAuthorUsername)-> + numParams( count ( $rejectAuthors ) )->inContentLanguage()->text(); // If the message is too big, then fallback to the shorter one $colonSeparator = wfMessage( 'colon-separator' )->text(); $maxLen = 255 - count( $colonSeparator ) - count( $comment ); @@ -118,7 +127,8 @@ $defaultSummary = wfMessage( $msg, $wgContLang->formatNum( count( $rejectIds ) ), $oldRev->getId(), - $oldRevAuthor )->inContentLanguage()->text(); + $oldRevAuthor, + $oldRevAuthorUsername )->inContentLanguage()->text(); } // Append any review comment... if ( $comment != '' ) { diff --git a/frontend/language/RevisionReview.i18n.php b/frontend/language/RevisionReview.i18n.php index 4d258ff..a290acb 100644 --- a/frontend/language/RevisionReview.i18n.php +++ b/frontend/language/RevisionReview.i18n.php @@ -87,10 +87,10 @@ 'revreview-reject-summary' => 'Summary:', 'revreview-reject-confirm' => 'Reject these changes', 'revreview-reject-cancel' => 'Cancel', - 'revreview-reject-summary-cur' => 'Rejected the last {{PLURAL:$1|text change|$1 text changes}} (by $2) and restored revision $3 by $4', - 'revreview-reject-summary-old' => 'Rejected the first {{PLURAL:$1|text change|$1 text changes}} (by $2) that followed revision $3 by $4', - 'revreview-reject-summary-cur-short' => 'Rejected the last {{PLURAL:$1|text change|$1 text changes}} and restored revision $2 by $3', - 'revreview-reject-summary-old-short' => 'Rejected the first {{PLURAL:$1|text change|$1 text changes}} that followed revision $2 by $3', + 'revreview-reject-summary-cur' => 'Rejected the last {{PLURAL:$1|text change|$1 text changes}} ({{PLURAL:$7|{{GENDER:$5|by $2) and restored revision $3 {{GENDER:$6|by}} $4', + 'revreview-reject-summary-old' => 'Rejected the first {{PLURAL:$1|text change|$1 text changes}} ({{PLURAL:$7|{{GENDER:$5|by $2) that followed revision $3 {{GENDER:$6|by}} $4', + 'revreview-reject-summary-cur
[MediaWiki-commits] [Gerrit] Enable $wgImportSources for Hebrew Wikivoyage - change (operations/mediawiki-config)
Odder has uploaded a new change for review. https://gerrit.wikimedia.org/r/103118 Change subject: Enable $wgImportSources for Hebrew Wikivoyage .. Enable $wgImportSources for Hebrew Wikivoyage This patch enables $wgImportSources for the Hebrew Wikivoyage project per request. Although the community did not specify what wikis they'd like to import from, I'm adding all the remaining Hebrew projects as this seems to be their custom, and Commons too. See bug for URL with on-wiki consensus. Bug: 58527 Change-Id: Id9bc2771a4ac4228b2dd86aa4e1c818e16a95fc2 --- M wmf-config/InitialiseSettings.php 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/18/103118/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 5a4316d..6685d5d 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -8744,11 +8744,12 @@ 'hewikiquote' => array( 'w', 'wikt', 'b', 's', 'n' ), 'hewiktionary' => array( 'w', 'q', 'b', 's', 'n' ), 'hewikisource' => array( 'w', 'wikt', 'q', 'b', 'n' ), + 'hewikivoyage' => array( 'w', 'wikt', 'b', 'n', 'q', 's', 'commons' ), // bug 58527 'hiwiki' => array( 'wikt', 'commons', 'meta', 'species', 'de', 'en', 'en:b', 'en:q', 'en:n', 'en:s', 'en:v', 'es', 'fr', 'ml', 'ne', 'nl', 'ro', 'ru', 'pl', 'pt', 'simple', 'ta' ), // bug 41757 'hifwiki' => array( 'incubator' ), 'hsbwiktionary' => array( 'incubator', 'w' ), 'huwikinews' => array( 'incubator' ), - 'idwiki' => array( 'ms' ), # bug 16033 + 'idwiki' => array( 'ms' ), // bug 16033 'idwikibooks' => array( 'w' ), 'idwikiquote' => array( 'w' ), 'idwikisource' => array( 'w' ), -- To view, visit https://gerrit.wikimedia.org/r/103118 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id9bc2771a4ac4228b2dd86aa4e1c818e16a95fc2 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Odder Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Submit a new Apple Touch icon for MediaWiki.org - change (operations/mediawiki-config)
Odder has uploaded a new change for review. https://gerrit.wikimedia.org/r/103117 Change subject: Submit a new Apple Touch icon for MediaWiki.org .. Submit a new Apple Touch icon for MediaWiki.org This patch provides a new Apple Touch icon for MediaWiki.org. It comes as a 152x152 px square to satisfy the needs of iPad devices with the new Retina display. Also, I'm submitting it because MatmaRex said it was ugly as sin. Change-Id: Id41906c9ef01e7076562d9154977fc0ac7a9e081 --- M docroot/bits/apple-touch/mediawiki.png 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/17/103117/1 diff --git a/docroot/bits/apple-touch/mediawiki.png b/docroot/bits/apple-touch/mediawiki.png index baf530d..f001f01 100644 --- a/docroot/bits/apple-touch/mediawiki.png +++ b/docroot/bits/apple-touch/mediawiki.png Binary files differ -- To view, visit https://gerrit.wikimedia.org/r/103117 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id41906c9ef01e7076562d9154977fc0ac7a9e081 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Odder ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix PHP warning that breaks author output in JsonFFS - change (mediawiki...Translate)
jenkins-bot has submitted this change and it was merged. Change subject: Fix PHP warning that breaks author output in JsonFFS .. Fix PHP warning that breaks author output in JsonFFS Bug: 58738 Change-Id: Ifc45dddcec3094a8f061e407fb9f29fa9aab5968 --- M ffs/JsonFFS.php 1 file changed, 4 insertions(+), 1 deletion(-) Approvals: Siebrand: Looks good to me, approved jenkins-bot: Verified diff --git a/ffs/JsonFFS.php b/ffs/JsonFFS.php index dfe86c5..359abcf 100644 --- a/ffs/JsonFFS.php +++ b/ffs/JsonFFS.php @@ -73,7 +73,10 @@ $authors = $collection->getAuthors(); $authors = $this->filterAuthors( $authors, $collection->code ); - $authors = array_unique( array_merge( $template['AUTHORS'], $authors ) ); + if ( isset( $template['AUTHORS'] ) ) { + $authors = array_unique( array_merge( $template['AUTHORS'], $authors ) ); + } + if ( $authors !== array() ) { $messages['@metadata']['authors'] = array_values( $authors ); } -- To view, visit https://gerrit.wikimedia.org/r/103116 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifc45dddcec3094a8f061e407fb9f29fa9aab5968 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Nikerabbit Gerrit-Reviewer: Siebrand Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix PHP warning that breaks author output in JsonFFS - change (mediawiki...Translate)
Nikerabbit has uploaded a new change for review. https://gerrit.wikimedia.org/r/103116 Change subject: Fix PHP warning that breaks author output in JsonFFS .. Fix PHP warning that breaks author output in JsonFFS Bug: 58738 Change-Id: Ifc45dddcec3094a8f061e407fb9f29fa9aab5968 --- M ffs/JsonFFS.php 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/16/103116/1 diff --git a/ffs/JsonFFS.php b/ffs/JsonFFS.php index dfe86c5..359abcf 100644 --- a/ffs/JsonFFS.php +++ b/ffs/JsonFFS.php @@ -73,7 +73,10 @@ $authors = $collection->getAuthors(); $authors = $this->filterAuthors( $authors, $collection->code ); - $authors = array_unique( array_merge( $template['AUTHORS'], $authors ) ); + if ( isset( $template['AUTHORS'] ) ) { + $authors = array_unique( array_merge( $template['AUTHORS'], $authors ) ); + } + if ( $authors !== array() ) { $messages['@metadata']['authors'] = array_values( $authors ); } -- To view, visit https://gerrit.wikimedia.org/r/103116 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifc45dddcec3094a8f061e407fb9f29fa9aab5968 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Nikerabbit Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Port makecat.py to core - change (pywikibot/i18n)
Strainu has submitted this change and it was merged. Change subject: Port makecat.py to core .. Port makecat.py to core Change-Id: I6237bf38b6120e54ba669ebcac39cce561138bfc --- A makecat.py 1 file changed, 42 insertions(+), 0 deletions(-) Approvals: Strainu: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/makecat.py b/makecat.py new file mode 100644 index 000..e4aa37b --- /dev/null +++ b/makecat.py @@ -0,0 +1,42 @@ +# -*- coding: utf-8 -*- +msg = { + 'ar': { + 'makecat-create': u'بوت: إنشاء أو تحديث التصنيف:', + }, + 'en': { + 'makecat-create': u'Robot: Creation or update of category:', + }, + 'es': { + 'makecat-create': u'Bot: Creación o actualiza de la categoría:', + }, + 'fa': { + 'makecat-create': u'ربات: ایجاد یا تصحیح رده:', + }, + 'fr': { + 'makecat-create': u'Robot : Création ou mise à jour de categorie:', + }, + 'he': { + 'makecat-create': u'בוט: יצירה או עדכון של קטגוריה:', + }, + 'ia': { + 'makecat-create': u'Bot: Creation o actualisation de categoria:', + }, + 'it': { + 'makecat-create': u'Bot: La creazione o laggiornamento di categoria:', + }, + 'nl': { + 'makecat-create': u'Robot: Aanmaak of uitbreiding van categorie:', + }, + 'nn': { + 'makecat-create': u'robot: oppretting eller oppdatering av kategori:', + }, + 'no': { + 'makecat-create': u'Robot: opprettelse eller oppdatering av kategori:', + }, + 'pl': { + 'makecat-create': u'Robot: Stworzenie lub aktualizacja kategorii:', + }, + 'pt': { + 'makecat-create': u'Robô: Criando ou atualizando categoria:', + }, +}; -- To view, visit https://gerrit.wikimedia.org/r/102836 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6237bf38b6120e54ba669ebcac39cce561138bfc Gerrit-PatchSet: 2 Gerrit-Project: pywikibot/i18n Gerrit-Branch: master Gerrit-Owner: M4tx Gerrit-Reviewer: M4tx Gerrit-Reviewer: Merlijn van Deen Gerrit-Reviewer: Strainu Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Port makecat.py to core - change (pywikibot/core)
Strainu has submitted this change and it was merged. Change subject: Port makecat.py to core .. Port makecat.py to core Change-Id: Icb7c690bf3e8625ad4a10e0f3e9f7b523f54c059 --- A scripts/makecat.py 1 file changed, 304 insertions(+), 0 deletions(-) Approvals: Strainu: Verified; Looks good to me, approved diff --git a/scripts/makecat.py b/scripts/makecat.py new file mode 100644 index 000..e269620 --- /dev/null +++ b/scripts/makecat.py @@ -0,0 +1,304 @@ +# -*- coding: UTF-8 -*- +""" +This bot takes as its argument (or, if no argument is given, asks for it), the +name of a new or existing category. It will then try to find new articles for +this category (pages linked to and from pages already in the category), asking +the user which pages to include and which not. + +Arguments: + -nodates automatically skip all pages that are years or dates (years + only work AD, dates only for certain languages) + -forward only check pages linked from pages already in the category, + not pages linking to them. Is less precise but quite a bit + faster. + -existonly ask about pages that do actually exist; drop any + titles of non-existing pages silently. If -forward is chosen, + -exist is automatically implied. + -keepparent do not remove parent categories of the category to be + worked on. + -all work on all pages (default: only main namespace) + +When running the bot, you will get one by one a number by pages. You can +choose: +Y(es) - include the page +N(o) - do not include the page or +I(gnore) - do not include the page, but if you meet it again, ask again. +X - add the page, but do not check links to and from it +Other possiblities: +A(dd) - add another page, which may have been one that was included before +C(heck) - check links to and from the page, but do not add the page itself +R(emove) - remove a page that is already in the list +L(ist) - show current list of pages to include or to check +""" + +# (C) Andre Engels, 2004 +# (C) Pywikipedia bot team 2005-2010 +# +# Distributed under the terms of the MIT license. +# +__version__ = '$Id$' +# + +import codecs +import pywikibot +from pywikibot import date, catlib, pagegenerators, i18n + + +def rawtoclean(c): +#Given the 'raw' category, provides the 'clean' category +c2 = c.title().split('|')[0] +return pywikibot.Page(mysite, c2) + + +def isdate(s): +"""returns true iff s is a date or year +""" +dict, val = date.getAutoFormat(pywikibot.getSite().language(), s) +return dict is not None + + +def needcheck(pl): +if main: +if pl.namespace() != 0: +return False +if pl in checked: +return False +if skipdates: +if isdate(pl.title()): +return False +return True + + +def include(pl, checklinks=True, realinclude=True, linkterm=None): +cl = checklinks +if linkterm: +actualworkingcat = catlib.Category(mysite, workingcat.title(), + sortKey=linkterm) +else: +actualworkingcat = workingcat +if realinclude: +try: +text = pl.get() +except pywikibot.NoPage: +pass +except pywikibot.IsRedirectPage: +cl = True +pass +else: +cats = [x for x in pl.categories()] +if not workingcat in cats: +cats = [x for x in pl.categories()] +for c in cats: +if c in parentcats: +if removeparent: +catlib.change_category(pl, c, actualworkingcat) +break +else: +pl.put(pywikibot.replaceCategoryLinks( +text, cats + [actualworkingcat])) +if cl: +if checkforward: +for page2 in pl.linkedPages(): +if needcheck(page2): +tocheck.append(page2) +checked[page2] = page2 +if checkbackward: +for refPage in pl.getReferences(): +if needcheck(refPage): +tocheck.append(refPage) +checked[refPage] = refPage + + +def exclude(pl, real_exclude=True): +if real_exclude: +excludefile.write('%s\n' % pl.title()) + + +def asktoadd(pl): +if pl.site != mysite: +return +if pl.isRedirectPage(): +pl2 = pl.getRedirectTarget() +if needcheck(pl2): +tocheck.append(pl2) +checked[pl2] = pl2 +return +ctoshow = 500 +pywikibot.output(u'') +pywikibot.output(u"==%s==" % pl.title()) +while 1: +answer = raw_input("y(es)/n(o)/i(gnore)/(o)ther options? ") +if answer == 'y': +include(pl) +break +if answer == 'c': +include(pl, realinclude
[MediaWiki-commits] [Gerrit] Add jenkins email template for better email notifications - change (mediawiki/selenium)
Sn1per has uploaded a new change for review. https://gerrit.wikimedia.org/r/103114 Change subject: Add jenkins email template for better email notifications .. Add jenkins email template for better email notifications Change-Id: Id3d536395b5f2809fad547f9599686fb93839916 --- A docs/jenkins-email.template 1 file changed, 89 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/selenium refs/changes/14/103114/1 diff --git a/docs/jenkins-email.template b/docs/jenkins-email.template new file mode 100644 index 000..e55231d --- /dev/null +++ b/docs/jenkins-email.template @@ -0,0 +1,89 @@ + + BODY, TABLE, TD, TH, P { + font-family: Verdana, Helvetica, sans serif; + font-size: 11px; + color: black; + } + h1 { + color: black; + } + h2 { + color: black; + } + h3 { + color: black; + } + TD.bg1 { + font-size: 120% + } + TD.bg2 { + font-size: 110% + } + TD.bg3 { + } + TD.test_passed { + color: blue; + } + TD.test_failed { + color: red; + } + TD.console { + font-family: Courier New; + } + + + + +${build.result}: ${project.name} Build #${build.number} (${it.timestampString}) + + + + + + + <% def junitResultList = it.JUnitTestResult + if (junitResultList.size() > 0) { %> + Test Result + + + ${build.testResultAction.getFailCount()} failed, ${build.testResultAction.getSkipCount()} skipped + + + + + Failed Tests + + + Test NameDurationAge + + <% it.JUnitTestResult.each { junitResult -> + junitResult.getChildren().each { packageResult -> %> + + <% packageResult.getFailedTests().each{ failed_test -> %> + + ${failed_test.getFullName()}${failed_test.getDurationString()}${failed_test.getAge()} + + <% } %> + + <% } + } %> + + All Tests + + + PackageDurationFailSkipTotal + + <% it.JUnitTestResult.each { junitResult -> + junitResult.getChildren().each { packageResult -> %> + + + ${packageResult.getName()}${packageResult.getDurationString()}${packageResult.getFailCount()}${packageResult.getSkipCount()}${packageResult.getTotalCount()} + + + <% } + } %> + + + <% } %> + + -- To view, visit https://gerrit.wikimedia.org/r/103114 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id3d536395b5f2809fad547f9599686fb93839916 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/selenium Gerrit-Branch: master Gerrit-Owner: Sn1per ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Localize global group names on Special:CentralAuth - change (mediawiki...CentralAuth)
jenkins-bot has submitted this change and it was merged. Change subject: Localize global group names on Special:CentralAuth .. Localize global group names on Special:CentralAuth Change-Id: I47c45e576727f391755922534318fb780d8f091e --- M specials/SpecialCentralAuth.php 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Alex Monk: Looks good to me, approved jenkins-bot: Verified diff --git a/specials/SpecialCentralAuth.php b/specials/SpecialCentralAuth.php index ec41532..285f449 100644 --- a/specials/SpecialCentralAuth.php +++ b/specials/SpecialCentralAuth.php @@ -232,6 +232,7 @@ $groups = $globalUser->getGlobalGroups(); if ( $groups ) { + $groups = array_map( 'User::getGroupName', $groups ); $attribs['groups'] = htmlspecialchars( $this->getLanguage()->commaList( $groups ) ); } else { $attribs['groups'] = $this->msg( 'centralauth-admin-info-nogroups' )->escaped(); -- To view, visit https://gerrit.wikimedia.org/r/103110 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I47c45e576727f391755922534318fb780d8f091e Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/CentralAuth Gerrit-Branch: master Gerrit-Owner: Hoo man Gerrit-Reviewer: Alex Monk Gerrit-Reviewer: Hoo man Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Might aswell use the rebased version - change (mediawiki...release)
jenkins-bot has submitted this change and it was merged. Change subject: Might aswell use the rebased version .. Might aswell use the rebased version Change-Id: I4431323c3ccd37491c190f4a77a4911756c580ad --- M make-wmf-branch/default.conf 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Reedy: Looks good to me, approved jenkins-bot: Verified diff --git a/make-wmf-branch/default.conf b/make-wmf-branch/default.conf index c77041e..a69d382 100644 --- a/make-wmf-branch/default.conf +++ b/make-wmf-branch/default.conf @@ -189,7 +189,7 @@ $branchPrefix = 'wmf/'; $patches = array( - 'refs/changes/66/22466/12' => 'core', // The master..wmf-branch patches https://gerrit.wikimedia.org/r/22466 + 'refs/changes/66/22466/13' => 'core', // The master..wmf-branch patches https://gerrit.wikimedia.org/r/22466 ); $dryRun = false; // Don't actually push anything -- To view, visit https://gerrit.wikimedia.org/r/103113 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4431323c3ccd37491c190f4a77a4911756c580ad Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/tools/release Gerrit-Branch: master Gerrit-Owner: Reedy Gerrit-Reviewer: Reedy Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Might aswell use the rebased version - change (mediawiki...release)
Reedy has uploaded a new change for review. https://gerrit.wikimedia.org/r/103113 Change subject: Might aswell use the rebased version .. Might aswell use the rebased version Change-Id: I4431323c3ccd37491c190f4a77a4911756c580ad --- M make-wmf-branch/default.conf 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release refs/changes/13/103113/1 diff --git a/make-wmf-branch/default.conf b/make-wmf-branch/default.conf index c77041e..a69d382 100644 --- a/make-wmf-branch/default.conf +++ b/make-wmf-branch/default.conf @@ -189,7 +189,7 @@ $branchPrefix = 'wmf/'; $patches = array( - 'refs/changes/66/22466/12' => 'core', // The master..wmf-branch patches https://gerrit.wikimedia.org/r/22466 + 'refs/changes/66/22466/13' => 'core', // The master..wmf-branch patches https://gerrit.wikimedia.org/r/22466 ); $dryRun = false; // Don't actually push anything -- To view, visit https://gerrit.wikimedia.org/r/103113 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4431323c3ccd37491c190f4a77a4911756c580ad Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/tools/release Gerrit-Branch: master Gerrit-Owner: Reedy ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] reprepro: import from elasticsearch/logstash apt - change (operations/puppet)
Faidon Liambotis has uploaded a new change for review. https://gerrit.wikimedia.org/r/103112 Change subject: reprepro: import from elasticsearch/logstash apt .. reprepro: import from elasticsearch/logstash apt elasticsearch.org now provides apt repositories, as of our yesterday: http://www.elasticsearch.org/blog/apt-and-yum-repositories/ For Elasticsearch, we use their 0.90 packages anyway, so it's a no-brainer: import future versions from their apt, no functional changes. For logstash, it's a bit more complicated: the packages that we currently have in apt seem of better quality than the ones in Elasticsearch's apt repo. However, it probably makes more sense to use upstream's and file bugs with them so they can improve their official packages instead. Change-Id: I748d45df3b216f0ae38ce84a0adfe761175b3b1d --- M modules/install-server/files/reprepro-distributions M modules/install-server/files/reprepro-updates 2 files changed, 21 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/12/103112/1 diff --git a/modules/install-server/files/reprepro-distributions b/modules/install-server/files/reprepro-distributions index 2896428..73aa533 100644 --- a/modules/install-server/files/reprepro-distributions +++ b/modules/install-server/files/reprepro-distributions @@ -50,7 +50,7 @@ Architectures: source amd64 i386 Components: main universe non-free mariadb UDebComponents: main -Update: ceph jenkins cloudera hwraid cassandra +Update: ceph jenkins cloudera hwraid cassandra elasticsearch logstash Description: Wikimedia specific packages for Ubuntu Precise SignWith: default DebOverride: deb-override diff --git a/modules/install-server/files/reprepro-updates b/modules/install-server/files/reprepro-updates index 7378193..3b50650 100644 --- a/modules/install-server/files/reprepro-updates +++ b/modules/install-server/files/reprepro-updates @@ -46,3 +46,23 @@ Architectures: amd64 source VerifyRelease: 4BD736A82B5C1B00 ListShellHook: grep-dctrl -X -S cassandra || [ $? -eq 1 ] + +Name: elasticsearch +Method: http://packages.elasticsearch.org/elasticsearch/0.90/debian +Components: main>main +UDebComponents: +Suite: stable +GetInRelease: no +Architectures: amd64 +VerifyRelease: D27D666CD88E42B4 +ListShellHook: grep-dctrl -X -S cassandra || [ $? -eq 1 ] + +Name: logstash +Method: http://packages.elasticsearch.org/logstash/1.2/debian +Components: main>main +UDebComponents: +Suite: stable +GetInRelease: no +Architectures: amd64 +VerifyRelease: D27D666CD88E42B4 +ListShellHook: grep-dctrl -X -S logstash || [ $? -eq 1 ] -- To view, visit https://gerrit.wikimedia.org/r/103112 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I748d45df3b216f0ae38ce84a0adfe761175b3b1d Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Faidon Liambotis ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Improvements to KSS CSS documentation generation - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Improvements to KSS CSS documentation generation .. Improvements to KSS CSS documentation generation Avoid npm warnings. Makefile fixes: it's not a bash script, kss is default target, quieter output. Change-Id: Ia7b862b6bef95c7735a42c1b6f70625283e915ab --- M resources/Makefile A resources/README.txt M resources/package.json 3 files changed, 15 insertions(+), 9 deletions(-) Approvals: Jdlrobson: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/Makefile b/resources/Makefile index 36b75ae..4de5c2f 100644 --- a/resources/Makefile +++ b/resources/Makefile @@ -1,12 +1,9 @@ -#!/bin/bash -MW_INSTALL_PATH ?= ../.. +kss: nodecheck +# FIXME: Use more up-to-date Ruby version + @node_modules/.bin/kss-node mediawiki.ui mediawiki.ui/docs -l mediawiki.ui/vector.less -t styleguide-template + @echo Opening the generated style guide... + @command -v xdg-open >/dev/null 2>&1 || { open ${PWD}/mediawiki.ui/docs/index.html; exit 1; } + @xdg-open ${PWD}/mediawiki.ui/docs/index.html nodecheck: @scripts/nodecheck.sh - -kss: nodecheck - # FIXME: Use more up to date Ruby version - kss-node mediawiki.ui mediawiki.ui/docs -l mediawiki.ui/vector.less -t styleguide-template - # Open the resulting style guide (try using xdg-open or open): - command -v xdg-open >/dev/null 2>&1 || { open ${PWD}/mediawiki.ui/docs/index.html; exit 1; } - xdg-open ${PWD}/mediawiki.ui/docs/index.html diff --git a/resources/README.txt b/resources/README.txt new file mode 100644 index 000..d91bf2a --- /dev/null +++ b/resources/README.txt @@ -0,0 +1,4 @@ +The Makefile, package.json, scripts, styleguide-template, and +mediawiki.ui/styleguide.md files and directories in here support the automatic +generation of CSS documentation from the source LESS files using kss for +node.js, https://github.com/kneath/kss diff --git a/resources/package.json b/resources/package.json index c34ff4f..a1722b5 100644 --- a/resources/package.json +++ b/resources/package.json @@ -4,5 +4,10 @@ "version": "0.0.1", "dependencies": { "kss": ">=0.3.6" + }, + "repository" : { + "type" : "git", + "url" : "https://gerrit.wikimedia.org/r/p/mediawiki/core.git"; } + } -- To view, visit https://gerrit.wikimedia.org/r/103094 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia7b862b6bef95c7735a42c1b6f70625283e915ab Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Spage Gerrit-Reviewer: Bartosz Dziewoński Gerrit-Reviewer: JGonera Gerrit-Reviewer: Jack Phoenix Gerrit-Reviewer: Jdlrobson Gerrit-Reviewer: Krinkle Gerrit-Reviewer: Spage 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 support for API parameter euprotocol which enables searc... - change (pywikibot/compat)
Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/103111 Change subject: add support for API parameter euprotocol which enables searching http, https and other protocols the default is just http. .. add support for API parameter euprotocol which enables searching http, https and other protocols the default is just http. Change-Id: I2311bf92a468840a23c49f9f1f436220c19d5970 --- M pagegenerators.py M wikipedia.py 2 files changed, 5 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/compat refs/changes/11/103111/1 diff --git a/pagegenerators.py b/pagegenerators.py index 2629068..47f369e 100644 --- a/pagegenerators.py +++ b/pagegenerators.py @@ -831,13 +831,13 @@ yield pywikibot.Page(site, title) -def LinksearchPageGenerator(link, step=500, site=None): +ddef LinksearchPageGenerator(link, step=500, site=None,euprotocol=None): """Yields all pages that include a specified link, according to [[Special:Linksearch]]. """ if site is None: site = pywikibot.getSite() -for page in site.linksearch(link, limit=step): +for page in site.linksearch(link, limit=step,euprotocol=euprotocol): yield page diff --git a/wikipedia.py b/wikipedia.py index eed2049..3da7cb1 100644 --- a/wikipedia.py +++ b/wikipedia.py @@ -8684,7 +8684,7 @@ else: break -def linksearch(self, siteurl, limit=500): +def linksearch(self, siteurl, limit=500,euprotocol=None): """Yield Pages from results of Special:Linksearch for 'siteurl'.""" cache = [] R = re.compile('title ?=\"([^<>]*?)\">[^<>]*') @@ -8701,6 +8701,8 @@ 'eulimit': limit, 'euquery': url, } +if euprotocol: + params['euprotocol']=euprotocol count = 0 while True: data = query.GetData(params, self) -- To view, visit https://gerrit.wikimedia.org/r/103111 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2311bf92a468840a23c49f9f1f436220c19d5970 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/compat Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader Gerrit-Reviewer: Betacommand ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Don't load confidence if we've already made 20, 000 requests - change (mediawiki...StopForumSpam)
Skizzerz has submitted this change and it was merged. Change subject: Don't load confidence if we've already made 20,000 requests .. Don't load confidence if we've already made 20,000 requests Change-Id: I281b2101b640ffaaa864e873a56754bf65a0840b --- M StopForumSpam.body.php 1 file changed, 17 insertions(+), 2 deletions(-) Approvals: Skizzerz: Looks good to me, approved diff --git a/StopForumSpam.body.php b/StopForumSpam.body.php index ad7291a..fddf041 100644 --- a/StopForumSpam.body.php +++ b/StopForumSpam.body.php @@ -199,8 +199,23 @@ $key = 'sfs:conf:' . md5( serialize( $params ) ); $conf = $wgMemc->get( $key ); if ( $conf === false ) { - $conf = self::getConfidenceInternal( $params ); - $wgMemc->set( $key, $conf, self::CACHE_DURATION ); + // Check that we haven't gone over our 20,000/day limit + $limitKey = 'sfs:confidence:limit:' . date( 'mDY' ); + if ( $wgMemc->get( $limitKey ) === false ) { + $limit = 1; + $wgMemc->set( $limitKey, 1, 86400 ); + } else { + $limit = $wgMemc->incr( $limitKey ); + } + if ( $limit > 2 ) { + // We're over, so return 0 to be safe, but don't cache this failure + wfDebugLog( 'StopForumSpam', "Skipped fetching confidence for {$user->getName()}, already over over 20k limit"); + $conf = 0.0; + } else { + $conf = self::getConfidenceInternal( $params ); + $wgMemc->set( $key, $conf, self::CACHE_DURATION ); + } + } return $conf; -- To view, visit https://gerrit.wikimedia.org/r/102018 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I281b2101b640ffaaa864e873a56754bf65a0840b Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/StopForumSpam Gerrit-Branch: master Gerrit-Owner: Legoktm Gerrit-Reviewer: Legoktm Gerrit-Reviewer: Skizzerz 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 support from revertbot.py - change (translatewiki)
jenkins-bot has submitted this change and it was merged. Change subject: Add support from revertbot.py .. Add support from revertbot.py Change-Id: Ibf54715a8f2013cab349cfbf78ad8e9c39b8f781 --- M groups/Pywikibot/Pywikibot.yaml 1 file changed, 8 insertions(+), 0 deletions(-) Approvals: Siebrand: Looks good to me, approved jenkins-bot: Verified diff --git a/groups/Pywikibot/Pywikibot.yaml b/groups/Pywikibot/Pywikibot.yaml index 644c1a6..bfa7827 100644 --- a/groups/Pywikibot/Pywikibot.yaml +++ b/groups/Pywikibot/Pywikibot.yaml @@ -284,6 +284,14 @@ definitionFile: %GROUPROOT%/pywikibot/replace.py --- BASIC: + id: out-pywikipedia-revert + label: Pywikibot Revert + +FILES: + sourcePattern: %GROUPROOT%/pywikibot/revertbot.py + definitionFile: %GROUPROOT%/pywikibot/revertbot.py +--- +BASIC: id: out-pywikipedia-solvedisambiguation label: Pywikibot Solve Disambiguation -- To view, visit https://gerrit.wikimedia.org/r/103044 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibf54715a8f2013cab349cfbf78ad8e9c39b8f781 Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Xqt Gerrit-Reviewer: Siebrand Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Localize global group names on Special:CentralAuth - change (mediawiki...CentralAuth)
Hoo man has uploaded a new change for review. https://gerrit.wikimedia.org/r/103110 Change subject: Localize global group names on Special:CentralAuth .. Localize global group names on Special:CentralAuth Change-Id: I47c45e576727f391755922534318fb780d8f091e --- M specials/SpecialCentralAuth.php M specials/SpecialGlobalUsers.php 2 files changed, 2 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth refs/changes/10/103110/1 diff --git a/specials/SpecialCentralAuth.php b/specials/SpecialCentralAuth.php index ec41532..285f449 100644 --- a/specials/SpecialCentralAuth.php +++ b/specials/SpecialCentralAuth.php @@ -232,6 +232,7 @@ $groups = $globalUser->getGlobalGroups(); if ( $groups ) { + $groups = array_map( 'User::getGroupName', $groups ); $attribs['groups'] = htmlspecialchars( $this->getLanguage()->commaList( $groups ) ); } else { $attribs['groups'] = $this->msg( 'centralauth-admin-info-nogroups' )->escaped(); diff --git a/specials/SpecialGlobalUsers.php b/specials/SpecialGlobalUsers.php index 45d5fc8..4f81bd5 100644 --- a/specials/SpecialGlobalUsers.php +++ b/specials/SpecialGlobalUsers.php @@ -219,10 +219,6 @@ * @return array */ public function getAllGroups() { - $result = array(); - foreach ( CentralAuthUser::availableGlobalGroups() as $group ) { - $result[$group] = User::getGroupName( $group ); - } - return $result; + return array_map( 'User::getGroupName', CentralAuthUser::availableGlobalGroups() ); } } -- To view, visit https://gerrit.wikimedia.org/r/103110 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I47c45e576727f391755922534318fb780d8f091e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CentralAuth Gerrit-Branch: master Gerrit-Owner: Hoo man ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] AbuseFilter integration - change (mediawiki...Flow)
Matthias Mullie has uploaded a new change for review. https://gerrit.wikimedia.org/r/103109 Change subject: AbuseFilter integration .. AbuseFilter integration Change-Id: If6f68f889c6be81ce9728c5e0224eb24764a1ad6 --- M Flow.php A includes/AbuseFilterUtils.php M includes/Block/Header.php M includes/ParsoidUtils.php 4 files changed, 107 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/09/103109/1 diff --git a/Flow.php b/Flow.php index 95e02b0..168b38c 100755 --- a/Flow.php +++ b/Flow.php @@ -60,6 +60,7 @@ $wgAutoloadClasses['Flow\Container'] = $dir . 'includes/Container.php'; $wgAutoloadClasses['Flow\DbFactory'] = $dir . 'includes/DbFactory.php'; $wgAutoloadClasses['Flow\ParsoidUtils'] = $dir . 'includes/ParsoidUtils.php'; +$wgAutoloadClasses['Flow\AbuseFilterUtils'] = $dir . 'includes/AbuseFilterUtils.php'; $wgAutoloadClasses['Flow\Templating'] = $dir . 'includes/Templating.php'; $wgAutoloadClasses['Flow\UrlGenerator'] = $dir . 'includes/UrlGenerator.php'; $wgAutoloadClasses['Flow\View'] = $dir . 'includes/View.php'; @@ -305,3 +306,11 @@ // the last 3 days. $wgFlowCacheTime = 60 * 60 * 24 * 3; +// Custom group name for AbuseFilter +$wgFlowAbuseFilterGroup = 'flow'; +$wgAbuseFilterValidGroups[] = $wgFlowAbuseFilterGroup; + +// AbuseFilter emergency disable values for Flow +$wgAbuseFilterEmergencyDisableThreshold[$wgFlowAbuseFilterGroup] = 0.10; +$wgAbuseFilterEmergencyDisableCount[$wgFlowAbuseFilterGroup] = 50; +$wgAbuseFilterEmergencyDisableAge[$wgFlowAbuseFilterGroup] = 86400; // One day. diff --git a/includes/AbuseFilterUtils.php b/includes/AbuseFilterUtils.php new file mode 100644 index 000..8c893d2 --- /dev/null +++ b/includes/AbuseFilterUtils.php @@ -0,0 +1,73 @@ +addHolders( \AbuseFilter::generateUserVars( $wgUser ), \AbuseFilter::generateTitleVars( $title , 'ARTICLE' ) ); + $vars->setVar( 'ACTION', $newRevision->getChangeType() ); + + /** +* This should not roundtrip to Parsoid; AbuseFilter checks will be +* performed upon submitting new content, and content is always +* submitted in wikitext. It will only be transformed once it's being +* saved to DB. +*/ + $vars->setVar( 'new_wikitext', $newRevision->getContent( 'wikitext' ) ); + $vars->setLazyLoadVar( 'new_size', 'length', array( 'length-var' => 'new_wikitext' ) ); + + // @todo: this may roundtrip to Parsoid (if stored in HTML) - not implementing for now +// $vars->setVar( 'old_wikitext', $oldRevision ? $oldRevision->getContent( 'wikitext' ) : '' ); +// $vars->setLazyLoadVar( 'old_size', 'length', array( 'length-var' => 'old_wikitext' ) ); + + return \AbuseFilter::filterAction( $vars, $title, $wgFlowAbuseFilterGroup ); + } + + /** +* Checks if AbuseFilter is installed. +* +* @return bool +*/ + public static function enabled() { + return class_exists( 'AbuseFilter' ); + } +} diff --git a/includes/Block/Header.php b/includes/Block/Header.php index 4dec609..9b7054f 100644 --- a/includes/Block/Header.php +++ b/includes/Block/Header.php @@ -12,6 +12,7 @@ use Flow\Model\Header; use Flow\Repository\HeaderRepository; use Flow\Templating; +use Flow\AbuseFilterUtils; use User; use Flow\Exception\InvalidActionException; use Flow\Exception\InvalidDataException; @@ -60,7 +61,7 @@ if ( $this->header ) { if ( !$this->permissions->isAllowed( $this->header, 'edit-header' ) ) { - $this->errors['permissions'] = wfMessage( 'flow-error-not-allowed' ); + $this->addError( 'permissions', wfMessage( 'flow-error-not-allowed' ) ); return; } @@ -77,11 +78,23 @@ wfMessage( 'flow-error-prev-revision-mismatch' )->params( $this->submitted['prev_revision'], $this->header->getRevisionId()->getHex() ) ); } + // this isnt really part of validate, but we want the error-rendering template to see the users edited header + $oldHeader = $this->header; $this->header = $this->header->newNextRevision( $this->user, $this->submitted['content'], 'edit-header' ); + + // run through AbuseFilter + $status = AbuseFilterUtils::validate( $this->header, $oldHeader ); + if ( !$status->isOK() ) { + foreach ( $status->getErrorsArray() as $message ) { + $this->addError( 'abusefilter', wfMessage( array_shift( $message ), $
[MediaWiki-commits] [Gerrit] dding messages for the cc-by-4.0 and cc-by-sa-4.0 licenses. - change (mediawiki...WikimediaMessages)
jenkins-bot has submitted this change and it was merged. Change subject: dding messages for the cc-by-4.0 and cc-by-sa-4.0 licenses. .. dding messages for the cc-by-4.0 and cc-by-sa-4.0 licenses. Change-Id: If93c5e27c4a38a5229ede5694b36715d02ef6ede --- M WikimediaCCLicenseTexts.i18n.php 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Siebrand: Looks good to me, approved jenkins-bot: Verified diff --git a/WikimediaCCLicenseTexts.i18n.php b/WikimediaCCLicenseTexts.i18n.php index 5dcebcf..c94dadb 100644 --- a/WikimediaCCLicenseTexts.i18n.php +++ b/WikimediaCCLicenseTexts.i18n.php @@ -104,6 +104,7 @@ 'wm-license-cc-by-3.0-ug-text' => 'This file is licensed under the [[{{int:wm-license-cc-wiki-link}}|Creative Commons]] [//creativecommons.org/licenses/by/3.0/ug/deed.en Attribution 3.0 Uganda] license.', 'wm-license-cc-by-3.0-us-text' => 'This file is licensed under the [[{{int:wm-license-cc-wiki-link}}|Creative Commons]] [//creativecommons.org/licenses/by/3.0/us/deed.en Attribution 3.0 United States] license.', 'wm-license-cc-by-3.0-vn-text' => 'This file is licensed under the [[{{int:wm-license-cc-wiki-link}}|Creative Commons]] [//creativecommons.org/licenses/by/3.0/vn/deed.en Attribution 3.0 Vietnam] license.', + 'wm-license-cc-by-4.0-text' => 'This file is licensed under the [[{{int:wm-license-cc-wiki-link}}|Creative Commons]] [//creativecommons.org/licenses/by/4.0/deed.en Attribution 4.0 International] license.', 'wm-license-cc-by-sa-1.0-text' => 'This file is licensed under the [[{{int:wm-license-cc-wiki-link}}|Creative Commons]] [//creativecommons.org/licenses/by-sa/1.0/deed.en Attribution-Share Alike 1.0 Generic] license.', 'wm-license-cc-by-sa-1.0-fi-text' => 'This file is licensed under the [[{{int:wm-license-cc-wiki-link}}|Creative Commons]] [//creativecommons.org/licenses/by-sa/1.0/fi/deed.en Attribution-Share Alike 1.0 Finland] license.', 'wm-license-cc-by-sa-1.0-il-text' => 'This file is licensed under the [[{{int:wm-license-cc-wiki-link}}|Creative Commons]] [//creativecommons.org/licenses/by-sa/1.0/il/deed.en Attribution-Share Alike 1.0 Israel] license.', @@ -198,6 +199,7 @@ 'wm-license-cc-by-sa-3.0-ug-text' => 'This file is licensed under the [[{{int:wm-license-cc-wiki-link}}|Creative Commons]] [//creativecommons.org/licenses/by-sa/3.0/ug/deed.en Attribution-ShareAlike 3.0 Uganda] license.', 'wm-license-cc-by-sa-3.0-us-text' => 'This file is licensed under the [[{{int:wm-license-cc-wiki-link}}|Creative Commons]] [//creativecommons.org/licenses/by-sa/3.0/us/deed.en Attribution-Share Alike 3.0 United States] license.', 'wm-license-cc-by-sa-3.0-vn-text' => 'This file is licensed under the [[{{int:wm-license-cc-wiki-link}}|Creative Commons]] [//creativecommons.org/licenses/by-sa/3.0/vn/deed.en Attribution-ShareAlike 3.0 Vietnam] license.', + 'wm-license-cc-by-sa-4.0-text' => 'This file is licensed under the [[{{int:wm-license-cc-wiki-link}}|Creative Commons]] [//creativecommons.org/licenses/by-sa/4.0/deed.en Attribution-Share Alike 4.0 International] license.', 'wm-license-cc-sa-1.0-text' => 'This file is licensed under the [[{{int:wm-license-cc-wiki-link}}|Creative Commons]] [//creativecommons.org/licenses/sa/1.0/deed.en Share Alike 1.0 Generic] license.', 'wm-license-cc-sa-1.0-fi-text' => 'This file is licensed under the [[{{int:wm-license-cc-wiki-link}}|Creative Commons]] [//creativecommons.org/licenses/sa/1.0/fi/deed.en Share Alike 1.0 Finland] license.', 'wm-license-cc-sa-1.0-nl-text' => 'This file is licensed under the [[{{int:wm-license-cc-wiki-link}}|Creative Commons]] [//creativecommons.org/licenses/sa/1.0/nl/deed.en Share Alike 1.0 Netherlands] license.', -- To view, visit https://gerrit.wikimedia.org/r/103098 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If93c5e27c4a38a5229ede5694b36715d02ef6ede Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/WikimediaMessages Gerrit-Branch: master Gerrit-Owner: Multichill Gerrit-Reviewer: Siebrand Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Resized Text area in ReplaceText extension - change (mediawiki...ReplaceText)
jenkins-bot has submitted this change and it was merged. Change subject: Resized Text area in ReplaceText extension .. Resized Text area in ReplaceText extension Given these fields 100% width and, say, 25 or more rows for easy editing of text. This is important due to the risk of overlooking mistakes if all the text is not visible. patch courtsey: Pranav Ravichandran Bug: 32894 Change-Id: I08f36d5c581ea4b0429f88899830ea0868407435 --- M SpecialReplaceText.php 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Siebrand: Looks good to me, approved jenkins-bot: Verified diff --git a/SpecialReplaceText.php b/SpecialReplaceText.php index 70939a8..b61e32b 100644 --- a/SpecialReplaceText.php +++ b/SpecialReplaceText.php @@ -275,11 +275,11 @@ // 'width: auto' style is needed to override MediaWiki's // normal 'width: 100%', which causes the textarea to get // zero width in IE - $out->addHTML( Xml::textarea( 'target', $this->target, 50, 2, array( 'style' => 'width: auto;' ) ) ); + $out->addHTML( Xml::textarea( 'target', $this->target, 125, 25, array( 'style' => 'width: auto;' ) ) ); $out->addHTML( '' ); $out->addWikiMsg( 'replacetext_replacementtext' ); $out->addHTML( '' ); - $out->addHTML( Xml::textarea( 'replacement', $this->replacement, 50, 2, array( 'style' => 'width: auto;' ) ) ); + $out->addHTML( Xml::textarea( 'replacement', $this->replacement, 125, 25, array( 'style' => 'width: auto;' ) ) ); $out->addHTML( '' ); $out->addHTML( Xml::tags( 'p', null, Xml::checkLabel( -- To view, visit https://gerrit.wikimedia.org/r/103101 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I08f36d5c581ea4b0429f88899830ea0868407435 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ReplaceText Gerrit-Branch: master Gerrit-Owner: 01tonythomas <01tonytho...@gmail.com> Gerrit-Reviewer: MarkAHershberger Gerrit-Reviewer: Nikerabbit Gerrit-Reviewer: Siebrand Gerrit-Reviewer: Yaron Koren Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Support for NS 118 & 119 on enwiki - change (pywikibot/compat)
jenkins-bot has submitted this change and it was merged. Change subject: Support for NS 118 & 119 on enwiki .. Support for NS 118 & 119 on enwiki Change-Id: I8f81332070ba9a1573866ce871d144242e249805 --- M families/wikipedia_family.py 1 file changed, 6 insertions(+), 0 deletions(-) Approvals: Merlijn van Deen: Looks good to me, approved jenkins-bot: Verified diff --git a/families/wikipedia_family.py b/families/wikipedia_family.py index 1e5bc85..39a4f10 100644 --- a/families/wikipedia_family.py +++ b/families/wikipedia_family.py @@ -1020,6 +1020,12 @@ 'bar': u'Nochricht Dischkrian', 'pfl': u'Nochricht Dischbediere', } +self.namespaces[118] = { +'en': u'Draft', +} +self.namespaces[119] = { +'en': u'Draft talk', +} self.namespaces[446] = { 'cs': u'Education Program', -- To view, visit https://gerrit.wikimedia.org/r/103108 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8f81332070ba9a1573866ce871d144242e249805 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/compat Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader Gerrit-Reviewer: Betacommand Gerrit-Reviewer: Gerrit Patch Uploader Gerrit-Reviewer: Ladsgroup Gerrit-Reviewer: Merlijn van Deen Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Support for NS 118 & 119 on enwiki - change (pywikibot/compat)
Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/103108 Change subject: Support for NS 118 & 119 on enwiki .. Support for NS 118 & 119 on enwiki Change-Id: I8f81332070ba9a1573866ce871d144242e249805 --- M families/wikipedia_family.py 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/compat refs/changes/08/103108/1 diff --git a/families/wikipedia_family.py b/families/wikipedia_family.py index 1e5bc85..39a4f10 100644 --- a/families/wikipedia_family.py +++ b/families/wikipedia_family.py @@ -1020,6 +1020,12 @@ 'bar': u'Nochricht Dischkrian', 'pfl': u'Nochricht Dischbediere', } +self.namespaces[118] = { +'en': u'Draft', +} +self.namespaces[119] = { +'en': u'Draft talk', +} self.namespaces[446] = { 'cs': u'Education Program', -- To view, visit https://gerrit.wikimedia.org/r/103108 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8f81332070ba9a1573866ce871d144242e249805 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/compat Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader Gerrit-Reviewer: Betacommand ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Added more resolutions to commons.ico - change (operations/mediawiki-config)
Yatinmaan has uploaded a new change for review. https://gerrit.wikimedia.org/r/103107 Change subject: Added more resolutions to commons.ico .. Added more resolutions to commons.ico Change-Id: I2087148e523071caaecb56e59809c52a0c37eb69 --- A commons.ico 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/07/103107/1 diff --git a/commons.ico b/commons.ico new file mode 100644 index 000..e69de29 --- /dev/null +++ b/commons.ico -- To view, visit https://gerrit.wikimedia.org/r/103107 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2087148e523071caaecb56e59809c52a0c37eb69 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Yatinmaan ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Whitespace and comment cleanup - change (mediawiki...Translate)
jenkins-bot has submitted this change and it was merged. Change subject: Whitespace and comment cleanup .. Whitespace and comment cleanup Change-Id: Icfa1484e1e522686689976780498dfa8e322b9de --- M resources/js/ext.translate.editor.js M resources/js/ext.translate.storage.js 2 files changed, 9 insertions(+), 6 deletions(-) Approvals: Nikerabbit: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/js/ext.translate.editor.js b/resources/js/ext.translate.editor.js index 5b6ab83..7823463 100644 --- a/resources/js/ext.translate.editor.js +++ b/resources/js/ext.translate.editor.js @@ -150,10 +150,14 @@ this.$messageItem .addClass( 'translated' ) .removeClass( 'untranslated' ); + this.dirty = false; if ( this.message.properties ) { - $( '.tux-action-bar .tux-statsbar' ).trigger( 'change', [ 'translated', this.message.properties.state ] ); + $( '.tux-action-bar .tux-statsbar' ).trigger( + 'change', + [ 'translated', this.message.properties.state ] + ); // TODO: Update any other statsbar for the same group in the page. } }, @@ -162,8 +166,8 @@ * Save the translation */ save: function () { - var translateEditor = this, - translation; + var translation, + translateEditor = this; mw.translateHooks.run( 'beforeSubmit', translateEditor.$editor ); translation = translateEditor.$editor.find( '.editcolumn textarea' ).val(); @@ -257,7 +261,7 @@ next: function () { var $next = this.$editTrigger.next( '.tux-message' ); - // skip if the message is hidden. For eg: in a filter result. + // Skip if the message is hidden. For example in a filter result. if ( $next.length && $next.hasClass( 'hide' ) ) { this.$editTrigger = $next; return this.next(); diff --git a/resources/js/ext.translate.storage.js b/resources/js/ext.translate.storage.js index ba7169e..41a5f85 100644 --- a/resources/js/ext.translate.storage.js +++ b/resources/js/ext.translate.storage.js @@ -4,7 +4,7 @@ mw.translate = mw.translate || {}; /** -* This class can save translation into MediaWiki pages using the +* This class can save a translation into MediaWiki pages using the * MediaWiki edit WebApi. * @since 2013.10 */ @@ -32,5 +32,4 @@ }; mw.translate.TranslationApiStorage = TranslationApiStorage; - }( mediaWiki ) ); -- To view, visit https://gerrit.wikimedia.org/r/103103 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icfa1484e1e522686689976780498dfa8e322b9de Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Amire80 Gerrit-Reviewer: KartikMistry Gerrit-Reviewer: Nikerabbit Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Simplify jQuery calls for readability - change (mediawiki...Translate)
jenkins-bot has submitted this change and it was merged. Change subject: Simplify jQuery calls for readability .. Simplify jQuery calls for readability Change-Id: Ib66b862879d84be00e907604db864d7f59d9a247 --- M resources/js/ext.translate.editor.js 1 file changed, 5 insertions(+), 5 deletions(-) Approvals: Nikerabbit: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/js/ext.translate.editor.js b/resources/js/ext.translate.editor.js index 1953e16..5b6ab83 100644 --- a/resources/js/ext.translate.editor.js +++ b/resources/js/ext.translate.editor.js @@ -110,11 +110,11 @@ * Mark the message as no longer unsaved */ markUnunsaved: function () { - this.$editTrigger.find( '.tux-list-status' ) - .find( '.tux-status-unsaved' ) - .remove() - .end() - .children().removeClass( 'hide' ); + var $tuxListStatus = this.$editTrigger.find( '.tux-list-status' ); + + $tuxListStatus.find( '.tux-status-unsaved' ).remove(); + $tuxListStatus.children().removeClass( 'hide' ); + this.dirty = false; mw.translate.dirty = false; }, -- To view, visit https://gerrit.wikimedia.org/r/103105 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib66b862879d84be00e907604db864d7f59d9a247 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Amire80 Gerrit-Reviewer: Nikerabbit Gerrit-Reviewer: Santhosh Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] lonelypages.py: ported to core - change (pywikibot/core)
Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/103106 Change subject: lonelypages.py: ported to core .. lonelypages.py: ported to core Ported lonelypages.py to pywikibot core. Removed some unnecessary inline comments from the code. Change-Id: Ic83ec22c90842388ab78c2220af15a567802 --- A lonelypages.py 1 file changed, 296 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/06/103106/1 diff --git a/lonelypages.py b/lonelypages.py new file mode 100644 index 000..db7ea0d --- /dev/null +++ b/lonelypages.py @@ -0,0 +1,296 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +""" +This is a script written to add the template "orphan" to the pages that aren't +linked by other pages. It can give some strange Errors sometime, I hope that +all of them are fixed in this version. + +These command line parameters can be used to specify which pages to work on: + +¶ms; + +-xml Retrieve information from a local XML dump (pages-articles + or pages-meta-current, see http://download.wikimedia.org). + Argument can also be given as "-xml:filename". + +-page Only edit a specific page. + Argument can also be given as "-page:pagetitle". You can + give this parameter multiple times to edit multiple pages. + +Furthermore, the following command line parameters are supported: + +-enable:- Enable or disable the bot via a Wiki Page. + +-disambig: - Set a page where the bot save the name of the disambig + pages found (default: skip the pages) + +-limit: - Set how many pages check. + +-always - Always say yes, won't ask + +--- FixMes --- +* Check that all the code hasn't bugs + +--- Credit and Help --- +This Script has been developed by Pietrodn and Filnik on botwiki. If you want +to help us improving our script archive and pywikipediabot's archive or you +simply need help you can find us here: http://botwiki.sno.cc + +--- Examples --- +python lonelypages.py -enable:User:Bot/CheckBot -always +""" +# +# (C) Pietrodn, it.wiki 2006-2007 +# (C) Filnik, it.wiki 2007 +# (C) Pywikipedia bot team, 2008-2012 +# +# Distributed under the terms of the MIT license. +# +__version__ = '$Id$' +# + +import pywikibot +from pywikibot import i18n +from pywikibot import pagegenerators +from pywikibot import re + +# This is required for the text that is shown when you run this script +# with the parameter -help. +docuReplacements = { +'¶ms;': pagegenerators.parameterHelp, +} + +# +# Here you have to put the config for your Project. # +# + +# * Modify only below! * # + +# Template to add in the orphan pages +Template = { +'ar': u'{{يتيمة|تاريخ={{نسخ:اسم_شهر}} {{نسخ:عام', +'ca': u'{{Orfe|date={{subst:CURRENTMONTHNAME}} {{subst:CURRENTYEAR', +'en': u'{{Orphan|date={{subst:CURRENTMONTHNAME}} {{subst:CURRENTYEAR', +'it': u'{{O||mese={{subst:CURRENTMONTHNAME}} {{subst:CURRENTYEAR', +'ja': u'{{孤立|{{subst:DATE', +'zh': u'{{subst:Orphan/auto}}', +} + +# Comment that the Bot will use to put the template +commento = { +'ar': u'بوت: صفحة يتيمة، إضافة قالب', +'ca': u'Bot:Pàgina orfe, afegint plantilla', +'en': u'Robot: Orphan page, add template', +'it': u'[[Project:Bot|Bot]]: Voce orfana, aggiungo template {{O}}', +'ja': u'ロボットによる: 孤立したページへのテンプレート貼付け', +'zh': u'機器人: 本頁的鏈入頁面太少', +} + +# When you add a disambig to the list of disambig pages +#(if you set disambigPage to None, you can put here nothing) +commenttodisambig = { +'ar': u'بوت: إضافة صفحة توضيح', +'ca': u'Bot; Afegint una desambiguació', +'en': u'Robot: Adding a disambig page', +'it': u'[[Project:Bot|Bot]]: Aggiungo una disambigua', +'ja': u'ロボットによる: 曖昧さ回避の追加', +'zh': u'機器人: 增加消歧義頁面', +} + +# Use regex to prevent to put the same template twice! +# Warning: put always "()" inside the regex, so the bot will find "something" +exception = { +'ar': [ur'\{\{(?:قالب:|)(يتيمة)[\|\}]'], +'ca': [r'\{\{(?:template:|)(orfe)[\|\}]'], +'en': [r'\{\{(?:template:|)(orphan)[\|\}]', + r'\{\{(?:template:|)(wi)[\|\}]'], +'it': [r'\{\{(?:template:|)(o|a)[\|\}]'], +'ja': [ur'\{\{(?:template:|)(孤立)[\|\}]'], +'zh': [r'\{\{(?:template:|)(orphan)[\|\}]'], +} + +# * Modify only above! * # + +def main(): +# Load the configurations in the function namespace +global commento +global Template +global disambigPage +global commenttodisambig +global exception + +enablePage = None # Check if someone set an enablePage or not +limit = 5 # I hope that there aren't so many lonely pages in a project +g
[MediaWiki-commits] [Gerrit] Simplify jQuery calls for readability - change (mediawiki...Translate)
Amire80 has uploaded a new change for review. https://gerrit.wikimedia.org/r/103105 Change subject: Simplify jQuery calls for readability .. Simplify jQuery calls for readability Change-Id: Ib66b862879d84be00e907604db864d7f59d9a247 --- M resources/js/ext.translate.editor.js 1 file changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/05/103105/1 diff --git a/resources/js/ext.translate.editor.js b/resources/js/ext.translate.editor.js index 1953e16..5b6ab83 100644 --- a/resources/js/ext.translate.editor.js +++ b/resources/js/ext.translate.editor.js @@ -110,11 +110,11 @@ * Mark the message as no longer unsaved */ markUnunsaved: function () { - this.$editTrigger.find( '.tux-list-status' ) - .find( '.tux-status-unsaved' ) - .remove() - .end() - .children().removeClass( 'hide' ); + var $tuxListStatus = this.$editTrigger.find( '.tux-list-status' ); + + $tuxListStatus.find( '.tux-status-unsaved' ).remove(); + $tuxListStatus.children().removeClass( 'hide' ); + this.dirty = false; mw.translate.dirty = false; }, -- To view, visit https://gerrit.wikimedia.org/r/103105 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib66b862879d84be00e907604db864d7f59d9a247 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Amire80 ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Move lighttpd_config into mail.pp and rename. - change (operations/puppet)
Andrew Bogott has uploaded a new change for review. https://gerrit.wikimedia.org/r/103104 Change subject: Move lighttpd_config into mail.pp and rename. .. Move lighttpd_config into mail.pp and rename. This was only used by mailman. Moving it here will discourage other future uses of lighttpd (as nginx is now preferred.) Change-Id: Iddb60003334e05c9bd334450f3a9f83fa52b2add --- M manifests/generic-definitions.pp M manifests/mail.pp 2 files changed, 34 insertions(+), 34 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/04/103104/1 diff --git a/manifests/generic-definitions.pp b/manifests/generic-definitions.pp index a732169..7fc25c4 100644 --- a/manifests/generic-definitions.pp +++ b/manifests/generic-definitions.pp @@ -42,35 +42,3 @@ } } } - - -# Enables a certain Lighttpd config -# -# TODO: ensure => false removes symlink. ensure => purged removes available file. -define lighttpd_config($install="false") { - # Reload lighttpd if the site config file changes. - # This subscribes to both the real file and the symlink. - exec { "lighttpd_reload_${title}": - command => "/usr/sbin/service service lighttpd reload", - refreshonly => true, - } - - if $install == "true" { - file { "/etc/lighttpd/conf-available/${title}.conf": - source => "puppet:///files/lighttpd/${title}.conf", - owner => root, - group => www-data, - mode => 0444, - before => File["/etc/lighttpd/conf-enabled/${title}.conf"], - notify => Exec["lighttpd_reload_${title}"], - } - } - - # Create a symlink to the available config file - # in the conf-enabled directory. Notify - file { "/etc/lighttpd/conf-enabled/${title}.conf": - ensure => "/etc/lighttpd/conf-available/${title}.conf", - notify => Exec["lighttpd_reload_${title}"], - } - -} diff --git a/manifests/mail.pp b/manifests/mail.pp index c699d2a..49d40c2 100644 --- a/manifests/mail.pp +++ b/manifests/mail.pp @@ -416,10 +416,10 @@ } # Enable CGI module - lighttpd_config { "10-cgi": require => Class["webserver::static"] } + mailman_lighttpd_config { "10-cgi": require => Class["webserver::static"] } # Install Mailman specific Lighttpd config file - lighttpd_config { "50-mailman": + mailman_lighttpd_config { "50-mailman": require => [ Class["webserver::static"], File["/etc/lighttpd/htdigest"] ], install => "true" } @@ -441,3 +441,35 @@ include listserve, web-ui } + + +# Enables a certain Lighttpd config +# +# TODO: ensure => false removes symlink. ensure => purged removes available file. +define mailman_lighttpd_config($install="false") { + # Reload lighttpd if the site config file changes. + # This subscribes to both the real file and the symlink. + exec { "lighttpd_reload_${title}": + command => "/usr/sbin/service service lighttpd reload", + refreshonly => true, + } + + if $install == "true" { + file { "/etc/lighttpd/conf-available/${title}.conf": + source => "puppet:///files/lighttpd/${title}.conf", + owner => root, + group => www-data, + mode => 0444, + before => File["/etc/lighttpd/conf-enabled/${title}.conf"], + notify => Exec["lighttpd_reload_${title}"], + } + } + + # Create a symlink to the available config file + # in the conf-enabled directory. Notify + file { "/etc/lighttpd/conf-enabled/${title}.conf": + ensure => "/etc/lighttpd/conf-available/${title}.conf", + notify => Exec["lighttpd_reload_${title}"], + } + +} -- To view, visit https://gerrit.wikimedia.org/r/103104 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iddb60003334e05c9bd334450f3a9f83fa52b2add Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Andrew Bogott ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Whitespace and comment cleanup - change (mediawiki...Translate)
Amire80 has uploaded a new change for review. https://gerrit.wikimedia.org/r/103103 Change subject: Whitespace and comment cleanup .. Whitespace and comment cleanup Change-Id: Icfa1484e1e522686689976780498dfa8e322b9de --- M resources/js/ext.translate.editor.js M resources/js/ext.translate.storage.js 2 files changed, 6 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/03/103103/1 diff --git a/resources/js/ext.translate.editor.js b/resources/js/ext.translate.editor.js index 1953e16..23ceb6f 100644 --- a/resources/js/ext.translate.editor.js +++ b/resources/js/ext.translate.editor.js @@ -115,6 +115,7 @@ .remove() .end() .children().removeClass( 'hide' ); + this.dirty = false; mw.translate.dirty = false; }, @@ -150,6 +151,7 @@ this.$messageItem .addClass( 'translated' ) .removeClass( 'untranslated' ); + this.dirty = false; if ( this.message.properties ) { @@ -162,8 +164,8 @@ * Save the translation */ save: function () { - var translateEditor = this, - translation; + var translation, + translateEditor = this; mw.translateHooks.run( 'beforeSubmit', translateEditor.$editor ); translation = translateEditor.$editor.find( '.editcolumn textarea' ).val(); @@ -257,7 +259,7 @@ next: function () { var $next = this.$editTrigger.next( '.tux-message' ); - // skip if the message is hidden. For eg: in a filter result. + // Skip if the message is hidden. For example in a filter result. if ( $next.length && $next.hasClass( 'hide' ) ) { this.$editTrigger = $next; return this.next(); diff --git a/resources/js/ext.translate.storage.js b/resources/js/ext.translate.storage.js index ba7169e..41a5f85 100644 --- a/resources/js/ext.translate.storage.js +++ b/resources/js/ext.translate.storage.js @@ -4,7 +4,7 @@ mw.translate = mw.translate || {}; /** -* This class can save translation into MediaWiki pages using the +* This class can save a translation into MediaWiki pages using the * MediaWiki edit WebApi. * @since 2013.10 */ @@ -32,5 +32,4 @@ }; mw.translate.TranslationApiStorage = TranslationApiStorage; - }( mediaWiki ) ); -- To view, visit https://gerrit.wikimedia.org/r/103103 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icfa1484e1e522686689976780498dfa8e322b9de Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Amire80 ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Refactor message tools menu item creation - change (mediawiki...Translate)
Amire80 has uploaded a new change for review. https://gerrit.wikimedia.org/r/103102 Change subject: Refactor message tools menu item creation .. Refactor message tools menu item creation Change-Id: I9f50ba700fb6ddf0c41c8eca618918fe3618f7da --- M resources/js/ext.translate.editor.js 1 file changed, 54 insertions(+), 32 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/02/103102/1 diff --git a/resources/js/ext.translate.editor.js b/resources/js/ext.translate.editor.js index 1953e16..23e0a47 100644 --- a/resources/js/ext.translate.editor.js +++ b/resources/js/ext.translate.editor.js @@ -282,42 +282,64 @@ } }, - createMessageTools: function () { - var $historyItem, $translationsItem, - wgScript = mw.config.get( 'wgScript' ), - historyUri = new mw.Uri(), - translationsUri = new mw.Uri(); + /** +* Creates a menu element for the message tools. +* +* @param {String} className Used as the element's CSS class +* @param {object} query Used as the query in the mw.Uri object +* @param {String} message The message of the label of the menu item +* @return {jQuery} The new menu item element +*/ + createMessageToolsItem: function ( className, query, message ) { + var uri = new mw.Uri(); - historyUri.path = wgScript; - historyUri.query = { - title: this.message.title, - action: 'history' - }; - $historyItem = $( '' ) - .addClass( 'message-tools-history' + - ( ( this.message.translation === null ) ? ' hide' : '' ) - ) + uri.path = mw.config.get( 'wgScript' ); + uri.query = query; + + return $( '' ) + .addClass( className ) .append( $( '' ) - .attr( { - href: historyUri.toString(), - target: '_blank' - } ) - .text( mw.msg( 'tux-editor-message-tools-history' ) ) + .attr( { + href: uri.toString(), + target: '_blank' + } ) + .text( mw.msg( message ) ) + ); + }, + + /** +* Creates an element with a dropdown menu including +* tools for the translators. +* +* @return {jQuery} The new message tools menu element +*/ + createMessageTools: function () { + var $historyItem, $translationsItem; + + $historyItem = this.createMessageToolsItem( + 'message-tools-history', + { + title: this.message.title, + action: 'history' + }, + 'tux-editor-message-tools-history' ); - translationsUri.path = wgScript; - translationsUri.query = { - title: 'Special:Translations', - message: this.message.title - }; - $translationsItem = $( '' ) - .addClass( 'message-tools-translations' ) - .append( $( '' ) - .attr( { - href: translationsUri.toString(), - target: '_blank' - } ) - .text( mw.msg( 'tux-editor-message-tools-translations' ) ) + // Hide this link if the translation doesn't actually exist. + // It will be shown when a translation will be created. + if ( this.message.translation === null ) { + $historyItem.addClass( 'hide' ); + } + + // A link to Special:Translations, + // with translations of this message to other languages +
[MediaWiki-commits] [Gerrit] Resized Text area in ReplaceText extension - change (mediawiki...ReplaceText)
01tonythomas has uploaded a new change for review. https://gerrit.wikimedia.org/r/103101 Change subject: Resized Text area in ReplaceText extension .. Resized Text area in ReplaceText extension Given these fields 100% width and, say, 25 or more rows for easy editing of text. This is important due to the risk of overlooking mistakes if all the text is not visible. patch courtsey: Pranav Ravichandran Bug: 32894 Change-Id: I08f36d5c581ea4b0429f88899830ea0868407435 --- M SpecialReplaceText.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ReplaceText refs/changes/01/103101/1 diff --git a/SpecialReplaceText.php b/SpecialReplaceText.php index 70939a8..b61e32b 100644 --- a/SpecialReplaceText.php +++ b/SpecialReplaceText.php @@ -275,11 +275,11 @@ // 'width: auto' style is needed to override MediaWiki's // normal 'width: 100%', which causes the textarea to get // zero width in IE - $out->addHTML( Xml::textarea( 'target', $this->target, 50, 2, array( 'style' => 'width: auto;' ) ) ); + $out->addHTML( Xml::textarea( 'target', $this->target, 125, 25, array( 'style' => 'width: auto;' ) ) ); $out->addHTML( '' ); $out->addWikiMsg( 'replacetext_replacementtext' ); $out->addHTML( '' ); - $out->addHTML( Xml::textarea( 'replacement', $this->replacement, 50, 2, array( 'style' => 'width: auto;' ) ) ); + $out->addHTML( Xml::textarea( 'replacement', $this->replacement, 125, 25, array( 'style' => 'width: auto;' ) ) ); $out->addHTML( '' ); $out->addHTML( Xml::tags( 'p', null, Xml::checkLabel( -- To view, visit https://gerrit.wikimedia.org/r/103101 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I08f36d5c581ea4b0429f88899830ea0868407435 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ReplaceText Gerrit-Branch: master Gerrit-Owner: 01tonythomas <01tonytho...@gmail.com> Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Don't show the overlay if the badge is not near the top of t... - change (mediawiki...Echo)
Bartosz Dziewoński has uploaded a new change for review. https://gerrit.wikimedia.org/r/103100 Change subject: Don't show the overlay if the badge is not near the top of the window .. Don't show the overlay if the badge is not near the top of the window Bug: 58728 Change-Id: Ia714425078c277d65af99389c95014d87e138e8c --- M modules/overlay/ext.echo.overlay.js 1 file changed, 8 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo refs/changes/00/103100/1 diff --git a/modules/overlay/ext.echo.overlay.js b/modules/overlay/ext.echo.overlay.js index 0f24c0c..73e211f 100644 --- a/modules/overlay/ext.echo.overlay.js +++ b/modules/overlay/ext.echo.overlay.js @@ -272,11 +272,17 @@ $link.click( function ( e ) { var $target; - e.preventDefault(); - // log the badge click mw.echo.logInteraction( 'ui-badge-link-click' ); + // If the link is not near the top of the window, showing the overlay below it + // will likely look very silly, so let's not do this and just go the special page + if ( $link.offset().top > 0.2 * $( window ).height() ) { + return; + } + + e.preventDefault(); + $target = $( e.target ); // If the user clicked on the overlay or any child, ignore the click if ( $target.hasClass( 'mw-echo-overlay' ) || $target.is( '.mw-echo-overlay *' ) ) { -- To view, visit https://gerrit.wikimedia.org/r/103100 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia714425078c277d65af99389c95014d87e138e8c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Echo 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] Make sure the overlay is visible, even if the badge is near ... - change (mediawiki...Echo)
Bartosz Dziewoński has uploaded a new change for review. https://gerrit.wikimedia.org/r/103099 Change subject: Make sure the overlay is visible, even if the badge is near the edge .. Make sure the overlay is visible, even if the badge is near the edge We just shift it a bit to fit it on the screen. Bug: 58728 Change-Id: I61847ed7b9f08ce6618a903bb4f5e0d6afb07e9b --- M modules/overlay/ext.echo.overlay.js 1 file changed, 13 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo refs/changes/99/103099/1 diff --git a/modules/overlay/ext.echo.overlay.js b/modules/overlay/ext.echo.overlay.js index 6b46223..0f24c0c 100644 --- a/modules/overlay/ext.echo.overlay.js +++ b/modules/overlay/ext.echo.overlay.js @@ -301,6 +301,19 @@ // Show the notifications overlay $overlay.show(); + + // Make sure the overlay is visible, even if the badge is near the edge of browser window. + // 10 is an arbitrarily chosen "close enough" number. + // We are careful not to slide out from below the pokey (which is 21px wide). + var + offset = $overlay.offset(), + width = $overlay.width(), + windowWidth = $( window ).width(); + if ( offset.left < 10 ) { + $overlay.css( 'left', '+=' + Math.min( 189, 10 - offset.left ) ); + } else if ( offset.left + width > windowWidth - 10 ) { + $overlay.css( 'left', '-=' + Math.min( 189, ( offset.left + width ) - ( windowWidth - 10 ) ) ); + } } ); } ); -- To view, visit https://gerrit.wikimedia.org/r/103099 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I61847ed7b9f08ce6618a903bb4f5e0d6afb07e9b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: Bartosz Dziewoński 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 messages for the cc-by-4.0 and cc-by-sa-4.0 licenses. - change (mediawiki...WikimediaMessages)
Multichill has uploaded a new change for review. https://gerrit.wikimedia.org/r/103098 Change subject: Adding messages for the cc-by-4.0 and cc-by-sa-4.0 licenses. .. Adding messages for the cc-by-4.0 and cc-by-sa-4.0 licenses. Change-Id: If93c5e27c4a38a5229ede5694b36715d02ef6ede --- M WikimediaCCLicenseTexts.i18n.php 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikimediaMessages refs/changes/98/103098/1 diff --git a/WikimediaCCLicenseTexts.i18n.php b/WikimediaCCLicenseTexts.i18n.php index da35bbd..2f58812 100644 --- a/WikimediaCCLicenseTexts.i18n.php +++ b/WikimediaCCLicenseTexts.i18n.php @@ -96,6 +96,7 @@ 'wm-license-cc-by-3.0-th-text' => 'This file is licensed under the [[{{int:wm-license-cc-wiki-link}}|Creative Commons]] [//creativecommons.org/licenses/by/3.0/th/deed.en Attribution 3.0 Thailand] license.', 'wm-license-cc-by-3.0-tw-text' => 'This file is licensed under the [[{{int:wm-license-cc-wiki-link}}|Creative Commons]] [//creativecommons.org/licenses/by/3.0/tw/deed.en Attribution 3.0 Taiwan] license.', 'wm-license-cc-by-3.0-us-text' => 'This file is licensed under the [[{{int:wm-license-cc-wiki-link}}|Creative Commons]] [//creativecommons.org/licenses/by/3.0/us/deed.en Attribution 3.0 United States] license.', + 'wm-license-cc-by-4.0-text' => 'This file is licensed under the [[{{int:wm-license-cc-wiki-link}}|Creative Commons]] [//creativecommons.org/licenses/by/4.0/deed.en Attribution 4.0 International] license.', 'wm-license-cc-by-sa-1.0-text' => 'This file is licensed under the [[{{int:wm-license-cc-wiki-link}}|Creative Commons]] [//creativecommons.org/licenses/by-sa/1.0/deed.en Attribution-Share Alike 1.0 Generic] license.', 'wm-license-cc-by-sa-1.0-fi-text' => 'This file is licensed under the [[{{int:wm-license-cc-wiki-link}}|Creative Commons]] [//creativecommons.org/licenses/by-sa/1.0/fi/deed.en Attribution-Share Alike 1.0 Finland] license.', 'wm-license-cc-by-sa-1.0-il-text' => 'This file is licensed under the [[{{int:wm-license-cc-wiki-link}}|Creative Commons]] [//creativecommons.org/licenses/by-sa/1.0/il/deed.en Attribution-Share Alike 1.0 Israel] license.', @@ -182,6 +183,7 @@ 'wm-license-cc-by-sa-3.0-th-text' => 'This file is licensed under the [[{{int:wm-license-cc-wiki-link}}|Creative Commons]] [//creativecommons.org/licenses/by-sa/3.0/th/deed.en Attribution-Share Alike 3.0 Thailand] license.', 'wm-license-cc-by-sa-3.0-tw-text' => 'This file is licensed under the [[{{int:wm-license-cc-wiki-link}}|Creative Commons]] [//creativecommons.org/licenses/by-sa/3.0/tw/deed.en Attribution-Share Alike 3.0 Taiwan] license.', 'wm-license-cc-by-sa-3.0-us-text' => 'This file is licensed under the [[{{int:wm-license-cc-wiki-link}}|Creative Commons]] [//creativecommons.org/licenses/by-sa/3.0/us/deed.en Attribution-Share Alike 3.0 United States] license.', + 'wm-license-cc-by-sa-4.0-text' => 'This file is licensed under the [[{{int:wm-license-cc-wiki-link}}|Creative Commons]] [//creativecommons.org/licenses/by-sa/4.0/deed.en Attribution-Share Alike 4.0 International] license.', 'wm-license-cc-sa-1.0-text' => 'This file is licensed under the [[{{int:wm-license-cc-wiki-link}}|Creative Commons]] [//creativecommons.org/licenses/sa/1.0/deed.en Share Alike 1.0 Generic] license.', 'wm-license-cc-sa-1.0-fi-text' => 'This file is licensed under the [[{{int:wm-license-cc-wiki-link}}|Creative Commons]] [//creativecommons.org/licenses/sa/1.0/fi/deed.en Share Alike 1.0 Finland] license.', 'wm-license-cc-sa-1.0-nl-text' => 'This file is licensed under the [[{{int:wm-license-cc-wiki-link}}|Creative Commons]] [//creativecommons.org/licenses/sa/1.0/nl/deed.en Share Alike 1.0 Netherlands] license.', -- To view, visit https://gerrit.wikimedia.org/r/103098 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If93c5e27c4a38a5229ede5694b36715d02ef6ede Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikimediaMessages Gerrit-Branch: master Gerrit-Owner: Multichill ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add logging - change (mediawiki...WikiForum)
UltrasonicNXT has uploaded a new change for review. https://gerrit.wikimedia.org/r/103097 Change subject: Add logging .. Add logging Log events (category, forum, thread, and reply creations) to Special:Log/forum, and optionally to the recent changes via $wgWikiForumLogInRC Change-Id: Idfca0a8f1898b1238ade6a031e08d0e923ecb9ed --- M WikiForum.i18n.php M WikiForum.php M WikiForumClass.php 3 files changed, 79 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikiForum refs/changes/97/103097/1 diff --git a/WikiForum.i18n.php b/WikiForum.i18n.php index 77ad9b2..270e0c3 100644 --- a/WikiForum.i18n.php +++ b/WikiForum.i18n.php @@ -116,6 +116,15 @@ 'group-forumadmin.css' => '/* CSS placed here will affect forum administrators only */', # only translate this message to other languages if you have to change it 'group-forumadmin.js' => '/* JS placed here will affect forum administrators only */', # only translate this message to other languages if you have to change it + + // Logging messages + 'log-name-forum' => 'Forum log', + 'log-description-forum' => 'Logs [[Special:WikiForum|WikiForum]] events', + + 'logentry-forum-add-category' => '$1 {{GENDER:$1|created}} a new category, $4', + 'logentry-forum-add-forum' => '$1 {{GENDER:$1|created}} a new forum, $4', + 'logentry-forum-add-thread' => '$1 {{GENDER:$1|created}} a new thread, $4', + 'logentry-forum-add-reply' => '$1 {{GENDER:$1|replied}} on the thread $4', ); /** Message documentation (Message documentation) @@ -281,6 +290,14 @@ 'grouppage-forumadmin' => '{{doc-group|forumadmin|page}}', 'group-forumadmin.css' => '{{doc-group|forumadmin|css}}', 'group-forumadmin.js' => '{{doc-group|forumadmin|js}}', + + 'log-name-forum' => 'Title for the forum log', + 'log-description-forum' => 'Description of the forum log to be shown on Special:Log/forum', + + 'logentry-forum-add-category' => 'Shown when the user $1 created a new category, $4', + 'logentry-forum-add-forum' => 'Shown when the user $1 created a new forum, $4', + 'logentry-forum-add-thread' => 'Shown when the user $1 created a new thread, $4', + 'logentry-forum-add-reply' => 'Shown when the user $1 replied on the thread $4', ); /** Afrikaans (Afrikaans) @@ -2593,7 +2610,7 @@ 'wikiforum-announcement-only-description' => 'Aankondigingenforum (alleen forummoderatoren kunnen nieuwe berichten plaatsen)', 'wikiforum-by' => '$1door {{GENDER:$3|$2}}', 'wikiforum-description' => 'Beschrijving:', - 'wikiforum-forum-is-empty' => 'Dit forum is op het moment leeg. + 'wikiforum-forum-is-empty' => 'Dit forum is op het moment leeg. Neem contact op met een forumbeheerder om categorieën en forums toe te voegen.', 'wikiforum-forum-name' => 'Forum $1', 'wikiforum-name' => 'Naam:', diff --git a/WikiForum.php b/WikiForum.php index 173e33a..e1331c8 100644 --- a/WikiForum.php +++ b/WikiForum.php @@ -81,6 +81,9 @@ */ ); +// Show the forum log in RecentChanges? +$wgWikiForumLogInRC = true; + // ResourceLoader support for MediaWiki 1.17+ $wgResourceModules['ext.wikiForum'] = array( 'styles' => 'styles.css', @@ -93,4 +96,8 @@ $wgHooks['SkinTemplateBuildNavUrlsNav_urlsAfterPermalink'][] = 'WikiForumHooks::addNavigationLink'; $wgHooks['SkinTemplateToolboxEnd'][] = 'WikiForumHooks::addNavigationLinkToToolbox'; $wgHooks['BeforePageDisplay'][] = 'WikiForumHooks::addStyles'; -$wgHooks['LoadExtensionSchemaUpdates'][] = 'WikiForumHooks::addTables'; \ No newline at end of file +$wgHooks['LoadExtensionSchemaUpdates'][] = 'WikiForumHooks::addTables'; + +// Logging +$wgLogTypes[] = 'forum'; +$wgLogActionsHandlers['forum/*'] = 'LogFormatter'; \ No newline at end of file diff --git a/WikiForumClass.php b/WikiForumClass.php index 6cdad4c..72c4a8e 100644 --- a/WikiForumClass.php +++ b/WikiForumClass.php @@ -532,7 +532,7 @@ } function addThread( $forumId, $title, $text ) { - global $wgRequest, $wgUser, $wgWikiForumAllowAnonymous; + global $wgRequest, $wgUser, $wgWikiForumAllowAnonymous, $wgWikiForumLogInRC, $wgLang; if ( $wgWikiForumAllowAnonymous || $wgUser->isLoggedIn() ) { if ( @@ -604,6 +604,18 @@ array( 'wff_forum' => $forumId ), __METHOD__ ); + $logEntry = new ManualLogEntry( 'forum', 'add-thread' ); + $logEntry->setPerformer( $wgUser ); +
[MediaWiki-commits] [Gerrit] Make SpecialContributionsBeforeMainOutput hook more useful - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Make SpecialContributionsBeforeMainOutput hook more useful .. Make SpecialContributionsBeforeMainOutput hook more useful The current id number is useless for IP addresses, so it now passes a proper User object. For context, the SpecialPage instance is also provided. Change-Id: Ie196611d504b3969bcdfb5c589716af2f3c54e14 --- M docs/hooks.txt M includes/specials/SpecialContributions.php 2 files changed, 4 insertions(+), 2 deletions(-) Approvals: Bartosz Dziewoński: Looks good to me, approved jenkins-bot: Verified diff --git a/docs/hooks.txt b/docs/hooks.txt index 53382f4..ebc412b 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -2208,7 +2208,9 @@ &$fields: Current HTMLForm fields 'SpecialContributionsBeforeMainOutput': Before the form on Special:Contributions -$id: User identifier +$id: User id number, only provided for backwards-compatability +$user: User object representing user contributions are being fetched for +$sp: SpecialPage instance, providing context 'SpecialListusersDefaultQuery': Called right before the end of UsersPager::getDefaultQuery(). diff --git a/includes/specials/SpecialContributions.php b/includes/specials/SpecialContributions.php index af6a35b..551b972 100644 --- a/includes/specials/SpecialContributions.php +++ b/includes/specials/SpecialContributions.php @@ -168,7 +168,7 @@ // Add RSS/atom links $this->addFeedLinks( array( 'action' => 'feedcontributions', 'user' => $target ) ); - if ( wfRunHooks( 'SpecialContributionsBeforeMainOutput', array( $id ) ) ) { + if ( wfRunHooks( 'SpecialContributionsBeforeMainOutput', array( $id, $userObj, $this ) ) ) { $out->addHTML( $this->getForm() ); $pager = new ContribsPager( $this->getContext(), array( -- To view, visit https://gerrit.wikimedia.org/r/103090 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie196611d504b3969bcdfb5c589716af2f3c54e14 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Legoktm Gerrit-Reviewer: Bartosz Dziewoński Gerrit-Reviewer: Hoo man Gerrit-Reviewer: Legoktm Gerrit-Reviewer: Nikerabbit Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Simple tests for IP blacklisting - change (mediawiki...StopForumSpam)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/103096 Change subject: Simple tests for IP blacklisting .. Simple tests for IP blacklisting Tests both simple blacklisting and threshold based. Change-Id: I086aad6c72a629369b636001a6272f56effb9fbe --- A tests/StopForumSpamTest.php A tests/sample_blacklist.txt A tests/sample_blacklist_all.txt 3 files changed, 61 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/StopForumSpam refs/changes/96/103096/1 diff --git a/tests/StopForumSpamTest.php b/tests/StopForumSpamTest.php new file mode 100644 index 000..f67761a --- /dev/null +++ b/tests/StopForumSpamTest.php @@ -0,0 +1,48 @@ +setMwGlobals( 'wgMemc', new HashBagOStuff() ); + } + + protected function loadBlacklist( $list ) { + $this->setMwGlobals( 'wgSFSIPListLocation', __DIR__ . '/' . $list ); + $upd = new BlacklistUpdate(); + $upd->doUpdate(); + } + + public static function provideSimpleBlacklisting() { + return array( + array( '112.111.191.178', true ), + array( '127.0.0.1', false ), + array( 'not an IP address', false, 'Non-IP addresses' ), + array( '2001:0db8::::ff00:0042:8329', false, 'Long IPv6 address' ), + array( '2001:db8::ff00:42:8329', false, 'Shorter IPv6 address' ), + ); + } + /** +* @dataProvider provideSimpleBlacklisting +*/ + public function testSimpleBlacklisting( $ip, $res ) { + $this->loadBlacklist( 'sample_blacklist.txt' ); + $this->assertEquals( StopForumSpam::isBlacklisted( $ip ), $res ); + } + public static function provideThresholdBlacklisting() { + return array( + array( '99.7.75.101', false, 'IP with 1 hit' ), + array( '99.8.132.217', true, 'IP with 6 hits' ), + array( '127.0.0.1', false, 'IP address not on blacklist' ), + ); + } + /** +* @dataProvider provideThresholdBlacklisting +*/ + public function testThresholdBlacklisting( $ip, $res ) { + $this->setMwGlobals( 'wgSFSIPThreshold', 5 ); + $this->loadBlacklist( 'sample_blacklist_all.txt' ); + $this->assertEquals( StopForumSpam::isBlacklisted( $ip ), $res ); + } +} diff --git a/tests/sample_blacklist.txt b/tests/sample_blacklist.txt new file mode 100644 index 000..5534679 --- /dev/null +++ b/tests/sample_blacklist.txt @@ -0,0 +1,5 @@ +117.25.14.188 +112.111.191.178 +36.250.180.191 +112.101.64.53 + diff --git a/tests/sample_blacklist_all.txt b/tests/sample_blacklist_all.txt new file mode 100644 index 000..60ea1a9 --- /dev/null +++ b/tests/sample_blacklist_all.txt @@ -0,0 +1,8 @@ +"99.7.75.101","1","2013-12-03 14:07:00" +"99.74.37.6","1","2013-11-25 13:27:00" +"99.8.132.217","6","2013-12-05 13:36:00" +"99.9.204.229","1","2013-12-04 13:15:00" +"99.90.58.190","1","2013-12-09 22:47:38" +"99.92.114.209","1","2013-11-27 01:44:00" +"99.96.3.1","1","2013-11-22 11:50:35" +"99.98.171.15","1","2013-11-26 17:19:00" -- To view, visit https://gerrit.wikimedia.org/r/103096 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I086aad6c72a629369b636001a6272f56effb9fbe Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/StopForumSpam Gerrit-Branch: master Gerrit-Owner: Legoktm ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add integration/kss to deployment repo config - change (operations/puppet)
Spage has uploaded a new change for review. https://gerrit.wikimedia.org/r/103095 Change subject: Add integration/kss to deployment repo config .. Add integration/kss to deployment repo config Bug: 58620 Change-Id: Ia28a52420e0245f0d63018ce711b3be29097aeb8 --- M manifests/role/deployment.pp 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/95/103095/1 diff --git a/manifests/role/deployment.pp b/manifests/role/deployment.pp index a395341..6d32a44 100644 --- a/manifests/role/deployment.pp +++ b/manifests/role/deployment.pp @@ -11,6 +11,10 @@ class role::deployment::config { $repo_config = { +'integration/kss' => { +'grain' => 'contint-production-slaves', +'upstream' => 'https://gerrit.wikimedia.org/r/integration/kss', +}, 'integration/mediawiki-tools-codesniffer' => { 'grain' => 'contint-production-slaves', 'upstream' => 'https://gerrit.wikimedia.org/r/mediawiki/tools/codesniffer', -- To view, visit https://gerrit.wikimedia.org/r/103095 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia28a52420e0245f0d63018ce711b3be29097aeb8 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Spage ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add logging for "Invalid message parameter" - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Add logging for "Invalid message parameter" .. Add logging for "Invalid message parameter" Records a full stacktrace for this warning Bug: 58676 Change-Id: I234b525b04168eee6085d44fbf0e0d8ac3d0af91 --- M includes/Message.php 1 file changed, 6 insertions(+), 5 deletions(-) Approvals: Yurik: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Message.php b/includes/Message.php index 6ac87b3..dd22844 100644 --- a/includes/Message.php +++ b/includes/Message.php @@ -817,11 +817,12 @@ } elseif ( isset( $param['bitrate'] ) ) { return array( 'before', $this->language->formatBitrate( $param['bitrate'] ) ); } else { - trigger_error( - 'Invalid parameter for message "' . $this->getKey() . '": ' . - htmlspecialchars( serialize( $param ) ), - E_USER_WARNING - ); + $warning = 'Invalid parameter for message "' . $this->getKey() . '": ' . + htmlspecialchars( serialize( $param ) ); + trigger_error( $warning, E_USER_WARNING ); + $e = new Exception; + wfDebugLog( 'Bug58676', $warning . "\n" . $e->getTraceAsString() ); + return array( 'before', '[INVALID]' ); } } elseif ( $param instanceof Message ) { -- To view, visit https://gerrit.wikimedia.org/r/102604 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I234b525b04168eee6085d44fbf0e0d8ac3d0af91 Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Yurik Gerrit-Reviewer: Anomie Gerrit-Reviewer: Brion VIBBER Gerrit-Reviewer: MaxSem Gerrit-Reviewer: Nikerabbit Gerrit-Reviewer: Tim Starling Gerrit-Reviewer: Yurik Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix InfoActionHookHandlerTest - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Fix InfoActionHookHandlerTest .. Fix InfoActionHookHandlerTest Change-Id: I32b225d3a6741c2b6f24a210b2281fddc278 --- M client/tests/phpunit/includes/hooks/InfoActionHookHandlerTest.php 1 file changed, 7 insertions(+), 7 deletions(-) Approvals: Aude: Looks good to me, approved jenkins-bot: Verified diff --git a/client/tests/phpunit/includes/hooks/InfoActionHookHandlerTest.php b/client/tests/phpunit/includes/hooks/InfoActionHookHandlerTest.php index e78909a..ff671e3 100644 --- a/client/tests/phpunit/includes/hooks/InfoActionHookHandlerTest.php +++ b/client/tests/phpunit/includes/hooks/InfoActionHookHandlerTest.php @@ -2,13 +2,9 @@ namespace Wikibase\Test; -use Language; use RequestContext; use Wikibase\Client\Hooks\InfoActionHookHandler; use Wikibase\DataModel\Entity\ItemId; -use Wikibase\NamespaceChecker; -use Wikibase\RepoLinker; -use Wikibase\SiteLinkTable; /** * @covers Wikibase\Client\Hooks\InfoActionHookHandler @@ -48,12 +44,16 @@ ) ) ), - $context, array(), true, new ItemId( 'Q4' ), + $context, array( 'header-basic' => array() ), true, new ItemId( 'Q4' ), 'item id link' ); $cases[] = array( - array(), $context, array(), false, new ItemId( 'Q4' ), + array( 'header-basic' => array() ), + $context, + array( 'header-basic' => array() ), + false, + new ItemId( 'Q4' ), 'namespace does not have wikibase enabled' ); @@ -66,7 +66,7 @@ ) ) ), - $context, array(), true, false, + $context, array( 'header-basic' => array() ), true, false, 'page is not connected to an item' ); -- To view, visit https://gerrit.wikimedia.org/r/103086 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I32b225d3a6741c2b6f24a210b2281fddc278 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Hoo man Gerrit-Reviewer: Aude Gerrit-Reviewer: Jeroen De Dauw Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] i18n: consistency tweaks - change (mediawiki...PageSchemas)
Siebrand has submitted this change and it was merged. Change subject: i18n: consistency tweaks .. i18n: consistency tweaks * use "int:" in "right-generatepages" * make lowercase in "ps-createpage-invalidtitle" Change-Id: I99b71b2388756f352f76437d06637d643ee268b2 --- M PageSchemas.i18n.php 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Siebrand: Verified; Looks good to me, approved diff --git a/PageSchemas.i18n.php b/PageSchemas.i18n.php index 6386be2..f9b6820 100644 --- a/PageSchemas.i18n.php +++ b/PageSchemas.i18n.php @@ -40,8 +40,8 @@ 'ps-optional-name' => 'Name (leave blank to set to field name):', 'editschema' => 'Edit schema', 'createschema' => 'Create schema', - 'right-generatepages' => 'View "Generate pages" tab and page', - 'action-generatepages' => 'view the "{{int:Generatepages}}" tab and page', + 'right-generatepages' => 'View "{{int:generatepages}}" tab and page', + 'action-generatepages' => 'view the "{{int:generatepages}}" tab and page', 'ps-add-section' => 'Add section', 'ps-removepagesection' => 'Remove section', 'ps-sectionname' => 'Section name:', @@ -50,7 +50,7 @@ 'ps-level' => 'Level', 'ps-otherparams' => 'Other parameters', 'ps-createpage-irregulartext' => 'Wiki page "$1" does not hold regular wikitext.', - 'ps-createpage-invalidtitle' => 'Invalid Title', + 'ps-createpage-invalidtitle' => 'Invalid title', 'ps-createpage-notfound' => 'Article not found', 'ps-field-display-always' => 'Display this field always', 'ps-field-display-notempty' => 'Display if not empty', -- To view, visit https://gerrit.wikimedia.org/r/103091 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I99b71b2388756f352f76437d06637d643ee268b2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/PageSchemas Gerrit-Branch: master Gerrit-Owner: Shirayuki Gerrit-Reviewer: Siebrand ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Improvements to KSS CSS documentation generation - change (mediawiki/core)
Spage has uploaded a new change for review. https://gerrit.wikimedia.org/r/103094 Change subject: Improvements to KSS CSS documentation generation .. Improvements to KSS CSS documentation generation Avoid npm warnings. Makefile fixes: it's not a bash script, kss is default target, quieter output. Change-Id: Ia7b862b6bef95c7735a42c1b6f70625283e915ab --- M resources/Makefile A resources/README.txt M resources/package.json 3 files changed, 15 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/94/103094/1 diff --git a/resources/Makefile b/resources/Makefile index 36b75ae..4de5c2f 100644 --- a/resources/Makefile +++ b/resources/Makefile @@ -1,12 +1,9 @@ -#!/bin/bash -MW_INSTALL_PATH ?= ../.. +kss: nodecheck +# FIXME: Use more up-to-date Ruby version + @node_modules/.bin/kss-node mediawiki.ui mediawiki.ui/docs -l mediawiki.ui/vector.less -t styleguide-template + @echo Opening the generated style guide... + @command -v xdg-open >/dev/null 2>&1 || { open ${PWD}/mediawiki.ui/docs/index.html; exit 1; } + @xdg-open ${PWD}/mediawiki.ui/docs/index.html nodecheck: @scripts/nodecheck.sh - -kss: nodecheck - # FIXME: Use more up to date Ruby version - kss-node mediawiki.ui mediawiki.ui/docs -l mediawiki.ui/vector.less -t styleguide-template - # Open the resulting style guide (try using xdg-open or open): - command -v xdg-open >/dev/null 2>&1 || { open ${PWD}/mediawiki.ui/docs/index.html; exit 1; } - xdg-open ${PWD}/mediawiki.ui/docs/index.html diff --git a/resources/README.txt b/resources/README.txt new file mode 100644 index 000..d91bf2a --- /dev/null +++ b/resources/README.txt @@ -0,0 +1,4 @@ +The Makefile, package.json, scripts, styleguide-template, and +mediawiki.ui/styleguide.md files and directories in here support the automatic +generation of CSS documentation from the source LESS files using kss for +node.js, https://github.com/kneath/kss diff --git a/resources/package.json b/resources/package.json index c34ff4f..a1722b5 100644 --- a/resources/package.json +++ b/resources/package.json @@ -4,5 +4,10 @@ "version": "0.0.1", "dependencies": { "kss": ">=0.3.6" + }, + "repository" : { + "type" : "git", + "url" : "https://gerrit.wikimedia.org/r/p/mediawiki/core.git"; } + } -- To view, visit https://gerrit.wikimedia.org/r/103094 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia7b862b6bef95c7735a42c1b6f70625283e915ab Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Spage ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [TimedMediaHandler] Make 2 messages optional - change (translatewiki)
Raimond Spekking has uploaded a new change for review. https://gerrit.wikimedia.org/r/103093 Change subject: [TimedMediaHandler] Make 2 messages optional .. [TimedMediaHandler] Make 2 messages optional https://gerrit.wikimedia.org/r/#/c/103060/1/TimedMediaHandler.i18n.php,unified Change-Id: Ie9ac005a446f70830dd0e05c081b664c096257bb --- M groups/MediaWiki/mediawiki-defines.txt 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/93/103093/1 diff --git a/groups/MediaWiki/mediawiki-defines.txt b/groups/MediaWiki/mediawiki-defines.txt index 7150ba8..be23486 100644 --- a/groups/MediaWiki/mediawiki-defines.txt +++ b/groups/MediaWiki/mediawiki-defines.txt @@ -1589,6 +1589,7 @@ #magicfile = TimedMediaHandler/TimedMediaHandler.i18n.magic.php aliasfile = TimedMediaHandler/TimedMediaHandler.i18n.alias.php optional = timedmedia-ogg, timedmedia-webm +optional = timedmedia-mp4, timedmedia-flac optional = timedmedia-derivative-160p.ogv, timedmedia-derivative-360p.ogv optional = timedmedia-derivative-480p.ogv, timedmedia-derivative-720p.ogv optional = timedmedia-derivative-480p.webm, timedmedia-derivative-720p.webm -- To view, visit https://gerrit.wikimedia.org/r/103093 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie9ac005a446f70830dd0e05c081b664c096257bb Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Raimond Spekking ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [TimedMediaHandler] Make 2 messages optional - change (translatewiki)
Raimond Spekking has submitted this change and it was merged. Change subject: [TimedMediaHandler] Make 2 messages optional .. [TimedMediaHandler] Make 2 messages optional https://gerrit.wikimedia.org/r/#/c/103060/1/TimedMediaHandler.i18n.php,unified Change-Id: Ie9ac005a446f70830dd0e05c081b664c096257bb --- M groups/MediaWiki/mediawiki-defines.txt 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Raimond Spekking: Verified; Looks good to me, approved diff --git a/groups/MediaWiki/mediawiki-defines.txt b/groups/MediaWiki/mediawiki-defines.txt index 7150ba8..be23486 100644 --- a/groups/MediaWiki/mediawiki-defines.txt +++ b/groups/MediaWiki/mediawiki-defines.txt @@ -1589,6 +1589,7 @@ #magicfile = TimedMediaHandler/TimedMediaHandler.i18n.magic.php aliasfile = TimedMediaHandler/TimedMediaHandler.i18n.alias.php optional = timedmedia-ogg, timedmedia-webm +optional = timedmedia-mp4, timedmedia-flac optional = timedmedia-derivative-160p.ogv, timedmedia-derivative-360p.ogv optional = timedmedia-derivative-480p.ogv, timedmedia-derivative-720p.ogv optional = timedmedia-derivative-480p.webm, timedmedia-derivative-720p.webm -- To view, visit https://gerrit.wikimedia.org/r/103093 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie9ac005a446f70830dd0e05c081b664c096257bb Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Raimond Spekking Gerrit-Reviewer: Raimond Spekking Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Porting revertbot.py from compat to core - change (pywikibot/core)
Strainu has submitted this change and it was merged. Change subject: Porting revertbot.py from compat to core .. Porting revertbot.py from compat to core For Google Code-In Replaced imports and deprecated query.GetData calls Change-Id: If77ba53e6905b3f1cc2b4dba75af492fd2bb5d18 --- A scripts/revertbot.py 1 file changed, 118 insertions(+), 0 deletions(-) Approvals: Strainu: Verified; Looks good to me, approved diff --git a/scripts/revertbot.py b/scripts/revertbot.py new file mode 100644 index 000..21d3de5 --- /dev/null +++ b/scripts/revertbot.py @@ -0,0 +1,118 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +""" +""" +# +# (C) Bryan Tong Minh, 2008 +# (C) Pywikipedia bot team, 2008-2013 +# +# Ported by Geoffrey "GEOFBOT" Mon - User:Sn1per +# for Google Code-In 2013 +# +# Distributed under the terms of the MIT license. +# +__version__ = '$Id$' +# + +import re +import pywikibot +from pywikibot import i18n +import query + + +class BaseRevertBot(object): +""" Base revert bot + +Subclass this bot and override callback to get it to do something useful. + +""" +def __init__(self, site, comment=None): +self.site = site +self.comment = comment + +def get_contributions(self, max=500, ns=None): +count = 0 +iterator = iter(xrange(0)) +never_continue = False +while count != max or never_continue: +try: +item = iterator.next() +except StopIteration: +self.log(u'Fetching new batch of contributions') +data = list(pywikibot.getSite().usercontribs(user=self.site.username(), namespaces=ns, total=max)) +never_continue = True +iterator = iter(data) +else: +count += 1 +yield item + +def revert_contribs(self, callback=None): +self.site.forceLogin() + +if callback is None: +callback = self.callback + +contribs = self.get_contributions() +for item in contribs: +try: +if callback(item): +result = self.revert(item) +if result: +self.log(u'%s: %s' % (item['title'], result)) +else: +self.log(u'Skipped %s' % item['title']) +else: +self.log(u'Skipped %s by callback' % item['title']) +except StopIteration: +return + +def callback(self, item): +return 'top' in item + +def revert(self, item): +if len(pywikibot.Page(pywikibot.getSite(), item['title']).fullVersionHistory()) > 1: +rev = pywikibot.Page(pywikibot.getSite(), item['title']).fullVersionHistory()[1] +else: +return False + +comment = i18n.twtranslate(pywikibot.getSite(), 'revertbot-revert', {'revid': rev[0], 'author': rev[2], 'timestamp': rev[1]}) + +if self.comment: +comment += ': ' + self.comment + +page = pywikibot.Page(self.site, item['title']) +pywikibot.output(u"\n\n>>> \03{lightpurple}%s\03{default} <<<" + % page.title(asLink=True, forceInterwiki=True, + textlink=True)) +old = page.get() +new = rev[3] +pywikibot.showDiff(old, new) +page.put(new, comment) +return comment + +def log(self, msg): +pywikibot.output(msg) + + +class myRevertBot(BaseRevertBot): + +def callback(self, item): +if 'top' in item: +page = pywikibot.Page(self.site, item['title']) +text = page.get() +pattern = re.compile(u'\[\[.+?:.+?\..+?\]\]', re.UNICODE) +return pattern.search(text) >= 0 +return False + + +def main(): +for arg in pywikibot.handleArgs(): +continue +bot = myRevertBot(site=pywikibot.getSite()) +bot.revert_contribs() + +if __name__ == "__main__": +try: +main() +finally: +pywikibot.stopme() -- To view, visit https://gerrit.wikimedia.org/r/102867 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If77ba53e6905b3f1cc2b4dba75af492fd2bb5d18 Gerrit-PatchSet: 5 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Sn1per Gerrit-Reviewer: Ladsgroup Gerrit-Reviewer: Merlijn van Deen Gerrit-Reviewer: Strainu Gerrit-Reviewer: Xqt Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Port weblinkchecker.py from pywikibot/compat - change (pywikibot/core)
Strainu has submitted this change and it was merged. Change subject: Port weblinkchecker.py from pywikibot/compat .. Port weblinkchecker.py from pywikibot/compat Change-Id: I6df31a11e31e570128a6a16397395fc9b95729bc --- A scripts/weblinkchecker.py 1 file changed, 870 insertions(+), 0 deletions(-) Approvals: Strainu: Verified; Looks good to me, approved diff --git a/scripts/weblinkchecker.py b/scripts/weblinkchecker.py new file mode 100644 index 000..fe138c7 --- /dev/null +++ b/scripts/weblinkchecker.py @@ -0,0 +1,870 @@ +# -*- coding: utf-8 -*- +""" +This bot is used for checking external links found at the wiki. It checks +several pages at once, with a limit set by the config variable +max_external_links, which defaults to 50. + +The bot won't change any wiki pages, it will only report dead links such that +people can fix or remove the links themselves. + +The bot will store all links found dead in a .dat file in the deadlinks +subdirectory. To avoid the removing of links which are only temporarily +unavailable, the bot ONLY reports links which were reported dead at least +two times, with a time lag of at least one week. Such links will be logged to a +.txt file in the deadlinks subdirectory. + +After running the bot and waiting for at least one week, you can re-check those +pages where dead links were found, using the -repeat parameter. + +In addition to the logging step, it is possible to automatically report dead +links to the talk page of the article where the link was found. To use this +feature, set report_dead_links_on_talk = True in your user-config.py, or +specify "-talk" on the command line. Adding "-notalk" switches this off +irrespective of the configuration variable. + +When a link is found alive, it will be removed from the .dat file. + +These command line parameters can be used to specify which pages to work on: + +¶ms; + +-repeat Work on all pages were dead links were found before. This is + useful to confirm that the links are dead after some time (at + least one week), which is required before the script will report + the problem. + +-namespace Only process templates in the namespace with the given number or + name. This parameter may be used multiple times. + +-ignore HTTP return codes to ignore. Can be provided several times : +-ignore:401 -ignore:500 + +Furthermore, the following command line parameters are supported: + +-talkOverrides the report_dead_links_on_talk config variable, enabling + the feature. + +-notalk Overrides the report_dead_links_on_talk config variable, disabling + the feature. +-day the first time found dead link longer than x day ago, it should + probably be fixed or removed. if no set, default is 7 day. + +All other parameters will be regarded as part of the title of a single page, +and the bot will only work on that single page. + +The following config variables are supported: + +max_external_links- The maximum number of web pages that should be +loaded simultaneously. You should change this +according to your Internet connection speed. +Be careful: if it is set too high, the script +might get socket errors because your network +is congested, and will then think that the page +is offline. + +report_dead_links_on_talk - If set to true, causes the script to report dead +links on the article's talk page if (and ONLY if) +the linked page has been unavailable at least two +times during a timespan of at least one week. + +Syntax examples: +python weblinkchecker.py -start:! +Loads all wiki pages in alphabetical order using the Special:Allpages +feature. + +python weblinkchecker.py -start:Example_page +Loads all wiki pages using the Special:Allpages feature, starting at +"Example page" + +python weblinkchecker.py -weblink:www.example.org +Loads all wiki pages that link to www.example.org + +python weblinkchecker.py Example page +Only checks links found in the wiki page "Example page" + +python weblinkchecker.py -repeat +Loads all wiki pages where dead links were found during a prior run +""" + +# +# (C) Daniel Herding, 2005 +# (C) Pywikibot team, 2005-2013 +# +# Distributed under the terms of the MIT license. +# +__version__ = '$Id$' + +import sys +import re +import codecs +import pickle +import httplib +import socket +import urlparse +import urllib +import urllib2 +import threading +import time +import gzip +import StringIO + +import pywikibot +from pywikibot import i18n +from pywikibot import config +from pywikibot import pageg
[MediaWiki-commits] [Gerrit] Return consistent type, even when DOM node is missing parsoi... - change (mediawiki...parsoid)
Cscott has uploaded a new change for review. https://gerrit.wikimedia.org/r/103092 Change subject: Return consistent type, even when DOM node is missing parsoid attributes. .. Return consistent type, even when DOM node is missing parsoid attributes. We shouldn't return a string sometimes and an object other times. That's just asking for trouble. Change-Id: I9bc00eb8c2951c23d495c6d7a99b04ecc6620db4 --- M lib/mediawiki.DOMUtils.js M lib/mediawiki.WikitextSerializer.js 2 files changed, 10 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid refs/changes/92/103092/1 diff --git a/lib/mediawiki.DOMUtils.js b/lib/mediawiki.DOMUtils.js index 2123807..e016c99 100644 --- a/lib/mediawiki.DOMUtils.js +++ b/lib/mediawiki.DOMUtils.js @@ -302,7 +302,11 @@ getAttributeShadowInfo: function ( node, name ) { this.getDataParsoid( node ); if ( !this.isElt(node) || !node.data || !node.data.parsoid ) { - return node.getAttribute( name ); + return { + value: node.getAttribute( name ), + modified: false, + fromsrc: true + }; } var curVal = node.getAttribute(name), dp = node.data.parsoid; diff --git a/lib/mediawiki.WikitextSerializer.js b/lib/mediawiki.WikitextSerializer.js index 5429216..31c4e01 100644 --- a/lib/mediawiki.WikitextSerializer.js +++ b/lib/mediawiki.WikitextSerializer.js @@ -812,7 +812,11 @@ WSP.serializedAttrVal = function(node, name) { DU.getDataParsoid( node ); if ( !DU.isElt(node) || !node.data || !node.data.parsoid ) { - return node.getAttribute( name ); + return { + value: node.getAttribute( name ), + modified: false, + fromsrc: true + }; } var v = this.getAttributeValue(node, name, null); -- To view, visit https://gerrit.wikimedia.org/r/103092 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9bc00eb8c2951c23d495c6d7a99b04ecc6620db4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/parsoid Gerrit-Branch: master Gerrit-Owner: Cscott ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits