[MediaWiki-commits] [Gerrit] labs/icinga2[master]: Remove uneeded hosts
Gerrit Patch Uploader has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/405201 ) Change subject: Remove uneeded hosts .. Remove uneeded hosts Change-Id: Ife329890058b276a4b7b93a6ae2d66adb220cf75 --- M templates/hosts.conf.erb 1 file changed, 0 insertions(+), 17 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/labs/icinga2 refs/changes/01/405201/1 diff --git a/templates/hosts.conf.erb b/templates/hosts.conf.erb index a64b798..99fb101 100644 --- a/templates/hosts.conf.erb +++ b/templates/hosts.conf.erb @@ -72,23 +72,6 @@ } } -object Host "puppetdb-phabricator1.phabricator.eqiad.wmflabs" { -import "generic-host" -address = "puppetdb-phabricator1.phabricator.eqiad.wmflabs" -vars.host_name = "puppetdb-phabricator1.phabricator.eqiad.wmflabs" -vars.os = "Linux OS" -vars.sla = "24x7" -vars.external_host = true -vars.check_user = true -vars.check_puppet = true -vars.check_disk = true - -vars.notification["mail"] = { - /* The UserGroup `icingaadmins` is defined in `users.conf`. */ - groups = [ "icingaadmins" ] -} -} - object Host "phab-tin.phabricator.eqiad.wmflabs" { import "generic-host" address = "phab-tin.phabricator.eqiad.wmflabs" -- To view, visit https://gerrit.wikimedia.org/r/405201 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ife329890058b276a4b7b93a6ae2d66adb220cf75 Gerrit-PatchSet: 1 Gerrit-Project: labs/icinga2 Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader Gerrit-Reviewer: Zppix ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] labs/icinga2[master]: Migrate wikimedia-ai hosts and remove some
Gerrit Patch Uploader has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/404879 ) Change subject: Migrate wikimedia-ai hosts and remove some .. Migrate wikimedia-ai hosts and remove some Change-Id: I6c5c1b9d912116de913bb95b42f6798ae1afd3ba --- M templates/hosts.conf.erb 1 file changed, 92 insertions(+), 115 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/labs/icinga2 refs/changes/79/404879/1 diff --git a/templates/hosts.conf.erb b/templates/hosts.conf.erb index 772fe1a..a64b798 100644 --- a/templates/hosts.conf.erb +++ b/templates/hosts.conf.erb @@ -269,6 +269,46 @@ } } +object Host "ORES-web02.Experimental" { +import "generic-host" + +display_name = "ORES-web-02.Experimental" +address = "ores-web-02.ores.eqiad.wmflabs" +vars.os = "Linux OS" +vars.sla = "24x7" +vars.address = "ores-web-02.ores.eqiad.wmflabs" +vars.check_user = true +vars.check_disk = true +vars.host = "ores-web-02.ores.eqiad.wmflabs" +vars.notification.ores = true +vars.check_puppet = true + +vars.notification["mail"] = { + /* The UserGroup `icingaadmins` is defined in `users.conf`. */ + groups = [ "icingaadmins" ] +} +} + +object Host "ORES-web01.Experimental" { +import "generic-host" + +display_name = "ORES-web01.Experimental" +address = "ores-web-01.ores.eqiad.wmflabs" +vars.os = "Linux OS" +vars.sla = "24x7" +vars.address = "ores-web-01.ores.eqiad.wmflabs" +vars.check_user = true +vars.check_disk = true +vars.host = "ores-web-01.ores.eqiad.wmflabs" +vars.notification.ores = true +vars.check_puppet = true + +vars.notification["mail"] = { + /* The UserGroup `icingaadmins` is defined in `users.conf`. */ + groups = [ "icingaadmins" ] +} +} + object Host "ORES-lb02.Experimental" { import "generic-host" @@ -283,27 +323,6 @@ vars.notification.ores = true vars.check_puppet = true -vars.notification["mail"] = { - /* The UserGroup `icingaadmins` is defined in `users.conf`. */ - groups = [ "icingaadmins" ] -} -} - -object Host "ORES-redis01.experimental" { -import "generic-host" - -display_name = "ORES-redis01.experimental" -address = "ores-redis-01.ores.eqiad.wmflabs" -vars.os = "Linux OS" -vars.sla = "24x7" -vars.check_user = true -vars.address = "ores-redis-01.ores.eqiad.wmflabs" -vars.check_disk = true -vars.host = "ores-redis-01.ores.eqiad.wmflabs" -vars.notification.ores = true -vars.check_puppet = true - -/* Define notification mail attributes for notification apply rules in `notifications.conf`. */ vars.notification["mail"] = { /* The UserGroup `icingaadmins` is defined in `users.conf`. */ groups = [ "icingaadmins" ] @@ -331,17 +350,17 @@ } } -object Host "ORES-web03.experimental" { +object Host "ORES-worker01.experimental" { import "generic-host" -display_name = "ORES-web03.experimental" -address = "ores-web-03.ores.eqiad.wmflabs" +display_name = "ORES-worker01.experimental" +address = "ores-worker-01.ores.eqiad.wmflabs" vars.os = "Linux OS" vars.sla = "24x7" +vars.address = "ores-worker-01.ores.eqiad.wmflabs" vars.check_user = true -vars.address = "ores-web-03.ores.eqiad.wmflabs" vars.check_disk = true -vars.host = "ores-web-03.ores.eqiad.wmflabs" +vars.host = "ores-worker-01.ores.eqiad.wmflabs" vars.notification.ores = true vars.check_puppet = true @@ -352,17 +371,59 @@ } } -object Host "ORES-web05.experimental" { +object Host "ORES-worker02.experimental" { import "generic-host" -display_name = "ORES-web05.experimental" -address = "ores-web-05.ores.eqiad.wmflabs" +display_name = "ORES-worker02.experimental" +address = "ores-worker-02.ores.eqiad.wmflabs" vars.os = "Linux OS" vars.sla = "24x7" +vars.address = "ores-worker-02.ores.eqiad.wmflabs" vars.check_user = true -vars.address = "ores-web-05.ores.eqiad.wmflabs" vars.check_disk = true -vars.host = "ores-web-05.ores.eqiad.wmflabs" +vars.host = "ores-worker-02.ores.eqiad.wmflabs" +vars.notification.ores = true +vars.check_puppet = true + +/* Define notification mail attributes for notification apply rules in `notifications.conf`. */ +vars.notification["mail"] = { + /* The UserGroup `icingaadmins` is defined in `users.conf`. */ + groups = [ "icingaadmins" ] +} +} + +object Host "ORES-worker03.experimental" { +import "generic-host" + +display_name = "ORES-worker03.experimental" +address = "ores-worker-03.ores.eqiad.wmflabs" +vars.os = "Linux OS" +vars.sla = "24x7" +vars.address = "ores-worker-03.ores.eqiad.wmflabs" +vars.check_user = true +vars.check_disk = true +vars.host = "ores-worker-03.ores.eqiad.wmflabs" +vars.notification.ores = tru
[MediaWiki-commits] [Gerrit] mediawiki...LdapAuthentication[master]: Allow full username as LDAP Authenticator instead of modifi...
Gerrit Patch Uploader has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/404450 ) Change subject: Allow full username as LDAP Authenticator instead of modified one .. Allow full username as LDAP Authenticator instead of modified one Change-Id: I5b4ef5effba86304c24e2b7b973014e1b72d8d42 --- M LdapAuthentication.php M LdapAuthenticationPlugin.php 2 files changed, 13 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/LdapAuthentication refs/changes/50/404450/1 diff --git a/LdapAuthentication.php b/LdapAuthentication.php index df10cbc..ab8ddeb 100644 --- a/LdapAuthentication.php +++ b/LdapAuthentication.php @@ -77,6 +77,7 @@ $wgLDAPAutoAuthDomain = ""; $wgPasswordResetRoutes['domain'] = true; $wgLDAPActiveDirectory = []; +$wgLDAPRealPostUsername = false; define( "LDAPAUTHVERSION", "2.1.0" ); diff --git a/LdapAuthenticationPlugin.php b/LdapAuthenticationPlugin.php index 29ab697..23ca5b5 100644 --- a/LdapAuthenticationPlugin.php +++ b/LdapAuthenticationPlugin.php @@ -404,6 +404,9 @@ // Default set to true for backwards compatibility with // versions < 2.0a return self::setOrDefault( $wgLDAPLowerCaseUsername, $domain, true ); + case 'RealPostUsername': + global $wgLDAPRealPostUsername; + return isset($wgLDAPRealPostUsername) ? $wgLDAPRealPostUsername : false; case 'GroupUseRetrievedUsername': global $wgLDAPGroupUseRetrievedUsername; return self::setOrDefault( $wgLDAPGroupUseRetrievedUsername, $domain, false ); @@ -647,6 +650,15 @@ $username = strtolower( $username ); } + // Mediawiki munges the username before authenticate is called, + // this can mess with authentication, group pulling/restriction, + // preference pulling, etc. This is required to allow the user to + // have special characters like _ and @ in his / her name. + if ( $this->getConf( 'RealPostUsername' ) ) { + $username = $_POST['wpName']; + $username = preg_replace('#[^a-zA-Z0-9_\-@\.]#', '', $username); + } + // If the user is using auto authentication, we need to ensure // that he/she isn't trying to fool us by sending a username other // than the one the web server got from the auto-authentication method. -- To view, visit https://gerrit.wikimedia.org/r/404450 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5b4ef5effba86304c24e2b7b973014e1b72d8d42 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/LdapAuthentication Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader Gerrit-Reviewer: Bbringenberg ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Timeless[master]: Add some missing "noflip" directives for thumbs
Gerrit Patch Uploader has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/400699 ) Change subject: Add some missing "noflip" directives for thumbs .. Add some missing "noflip" directives for thumbs Bug: T183783 Change-Id: I9722a155bf75b47ac8d18e844a7255a1e057a77c --- M resources/screen-common.less 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Timeless refs/changes/99/400699/1 diff --git a/resources/screen-common.less b/resources/screen-common.less index a4b76c1..8a7cac9 100644 --- a/resources/screen-common.less +++ b/resources/screen-common.less @@ -406,10 +406,12 @@ } /* Thumbnails */ +/* @noflip */ .tright { margin: 0 0 0.5em 0.5em; padding: 0 0 1em 1.5em; } +/* @noflip */ .tleft { margin: 0 0.5em 0.5em 0; padding: 0 1.5em 1em 0; -- To view, visit https://gerrit.wikimedia.org/r/400699 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9722a155bf75b47ac8d18e844a7255a1e057a77c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/Timeless Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader Gerrit-Reviewer: Vlakoff ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...MinervaNeue[master]: Add missing styles for "a.mw-selflink" links
Gerrit Patch Uploader has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395173 ) Change subject: Add missing styles for "a.mw-selflink" links .. Add missing styles for "a.mw-selflink" links Taken from MediaWiki core: /resources/src/mediawiki.legacy/shared.css Bug: T181472 Change-Id: I963604bf6bf74a115622f7abb46f762e32b53506 --- M resources/skins.minerva.content.styles/links.less 1 file changed, 16 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/MinervaNeue refs/changes/73/395173/1 diff --git a/resources/skins.minerva.content.styles/links.less b/resources/skins.minerva.content.styles/links.less index db3860c..3d8cd65 100644 --- a/resources/skins.minerva.content.styles/links.less +++ b/resources/skins.minerva.content.styles/links.less @@ -35,6 +35,22 @@ background-position: center right; padding-right: 13px; } + + &.mw-selflink { + color: inherit; + font-weight: bold; + text-decoration: inherit; + } + + &.mw-selflink:hover { + cursor: inherit; + text-decoration: inherit; + } + + &.mw-selflink:active, + &.mw-selflink:visited { + color: inherit; + } } // Generic class name needed -- To view, visit https://gerrit.wikimedia.org/r/395173 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I963604bf6bf74a115622f7abb46f762e32b53506 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/MinervaNeue Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader Gerrit-Reviewer: Vlakoff ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Make wfEscapeWikiText() escape "!" at beginning of line
Gerrit Patch Uploader has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/392475 ) Change subject: Make wfEscapeWikiText() escape "!" at beginning of line .. Make wfEscapeWikiText() escape "!" at beginning of line Exclamation point "!" is part of the table syntax. Bug: T168763 Change-Id: I1d6ff50bd6178f36d4f29256aeb3040d3f636217 --- M includes/GlobalFunctions.php 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/75/392475/1 diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index bb1951d..0427436 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -1746,7 +1746,10 @@ } $repl2 = $repl2 ? '/\b(' . implode( '|', $repl2 ) . '):/i' : '/^(?!)/'; } - $text = substr( strtr( "\n$text", $repl ), 1 ); + $text = "\n$text"; + $text = strtr( $text, $repl ); + $text = preg_replace( '/([\r\n][ \t]*)!/', '$1!', $text ); + $text = substr( $text, 1 ); $text = preg_replace( $repl2, '$1:', $text ); return $text; } -- To view, visit https://gerrit.wikimedia.org/r/392475 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1d6ff50bd6178f36d4f29256aeb3040d3f636217 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader Gerrit-Reviewer: Vlakoff ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Scribunto[master]: Make mw.text.nowiki() escape "!" at beginning of line
Gerrit Patch Uploader has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/392419 ) Change subject: Make mw.text.nowiki() escape "!" at beginning of line .. Make mw.text.nowiki() escape "!" at beginning of line Exclamation point "!" is part of the table syntax. Bug: T168763 Change-Id: I6c9dcfdbbb2c6eff9414e24d3f2693ebe576505a --- M engines/LuaCommon/lualib/mw.text.lua M tests/phpunit/engines/LuaCommon/TextLibraryTests.lua 2 files changed, 4 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Scribunto refs/changes/19/392419/1 diff --git a/engines/LuaCommon/lualib/mw.text.lua b/engines/LuaCommon/lualib/mw.text.lua index 0439966..f84bc79 100644 --- a/engines/LuaCommon/lualib/mw.text.lua +++ b/engines/LuaCommon/lualib/mw.text.lua @@ -101,6 +101,7 @@ } local nowikiRepl2 = { + ["\n!"] = "\n!", ["\r!"] = "\r!", ["\n#"] = "\n#", ["\r#"] = "\r#", ["\n*"] = "\n*", ["\r*"] = "\r*", ["\n:"] = "\n:", ["\r:"] = "\r:", @@ -128,7 +129,7 @@ -- string.gsub is safe here, because we're only caring about ASCII chars s = string.gsub( s, '["&\'<=>%[%]{|}]', nowikiRepl1 ) s = '\n' .. s - s = string.gsub( s, '[\r\n][#*:; \n\r\t]', nowikiRepl2 ) + s = string.gsub( s, '[\r\n][!#*:; \n\r\t]', nowikiRepl2 ) s = string.gsub( s, '([\r\n])%-%-%-%-', '%1' ) s = string.sub( s, 2 ) s = string.gsub( s, '__', '__' ) diff --git a/tests/phpunit/engines/LuaCommon/TextLibraryTests.lua b/tests/phpunit/engines/LuaCommon/TextLibraryTests.lua index 85dd9e3..20fd6ff 100644 --- a/tests/phpunit/engines/LuaCommon/TextLibraryTests.lua +++ b/tests/phpunit/engines/LuaCommon/TextLibraryTests.lua @@ -80,10 +80,10 @@ { name = 'nowiki', func = mw.text.nowiki, - args = { '*"&\'<=>[]{|}#*:;\n*\n#\n:\n;\nhttp://example.com:80/\nRFC 123, ISBN 456' }, + args = { '*"&\'<=>[]{|}#*:;\n!\n#\n*\n:\n;\nhttp://example.com:80/\nRFC 123, ISBN 456' }, expect = { '*"&'<=>[]{|}#*:;' .. - '\n*\n#\n:\n;\nhttp://example.com:80/' .. + '\n!\n#\n*\n:\n;\nhttp://example.com:80/' .. '\nRFC 123, ISBN 456' } }, -- To view, visit https://gerrit.wikimedia.org/r/392419 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6c9dcfdbbb2c6eff9414e24d3f2693ebe576505a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Scribunto Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader Gerrit-Reviewer: Vlakoff ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Scribunto[master]: Add a property "talkNsText" to mw.title objects
Gerrit Patch Uploader has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/392309 ) Change subject: Add a property "talkNsText" to mw.title objects .. Add a property "talkNsText" to mw.title objects Bug:T180911 Change-Id: I847ac4b7587b98be06b25fe14765e9efdc7b774d --- M engines/LuaCommon/lualib/mw.title.lua 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Scribunto refs/changes/09/392309/1 diff --git a/engines/LuaCommon/lualib/mw.title.lua b/engines/LuaCommon/lualib/mw.title.lua index 5cd72ab..9f4ea53 100644 --- a/engines/LuaCommon/lualib/mw.title.lua +++ b/engines/LuaCommon/lualib/mw.title.lua @@ -63,6 +63,10 @@ data.subjectNsText = ns.subject.name data.canTalk = ns.talk ~= nil + if ns.talk ~= nil then + data.talkNsText = ns.talk.name + end + data.prefixedText = data.text if data.nsText ~= '' then data.prefixedText = string.gsub( data.nsText .. ':' .. data.prefixedText, '_', ' ' ) -- To view, visit https://gerrit.wikimedia.org/r/392309 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I847ac4b7587b98be06b25fe14765e9efdc7b774d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Scribunto Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader Gerrit-Reviewer: Gerrit Patch Uploader Gerrit-Reviewer: Vlakoff ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] pywikibot/core[master]: reflinks handle FatalServerError & Server504Error [T180308]
Gerrit Patch Uploader has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/391077 ) Change subject: reflinks handle FatalServerError & Server504Error [T180308] .. reflinks handle FatalServerError & Server504Error [T180308] reflinks.py crashes when FatalServerError & Server504Error occurs. this patch add error handling to ignore both of them while checking for reference link title Change-Id: Ief433c2ab46376f430b01a51bc1820186bb61077 --- M scripts/reflinks.py 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/77/391077/1 diff --git a/scripts/reflinks.py b/scripts/reflinks.py index 6553876..e9c0243 100755 --- a/scripts/reflinks.py +++ b/scripts/reflinks.py @@ -599,7 +599,9 @@ except (URLError, socket.error, IOError, -httplib.error) as e: +httplib.error, +pywikibot.FatalServerError, +pywikibot.Server504Error) as e: pywikibot.output(u'Can\'t retrieve page %s : %s' % (ref.url, e)) continue -- To view, visit https://gerrit.wikimedia.org/r/391077 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ief433c2ab46376f430b01a51bc1820186bb61077 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader Gerrit-Reviewer: Gerrit Patch Uploader ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: git.wikimedia.org -> phab
Gerrit Patch Uploader has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/385315 ) Change subject: git.wikimedia.org -> phab .. git.wikimedia.org -> phab Bug: T139089 Change-Id: Ic1f49fdf3f34235fa18964d34da778d96ab4b85b --- M README.md 1 file changed, 1 insertion(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/mathoid/deploy refs/changes/15/385315/1 diff --git a/README.md b/README.md index e91b3e4..cd08327 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,2 @@ Deploy repository for -https://git.wikimedia.org/summary/?r=mediawiki/services/mathoid.git - +https://phabricator.wikimedia.org/diffusion/GMAT/ \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/385315 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic1f49fdf3f34235fa18964d34da778d96ab4b85b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/mathoid/deploy Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader Gerrit-Reviewer: TerraCodes ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...SoundManager2Button[master]: Update to soundmanagerv297a-20170601
Gerrit Patch Uploader has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/384086 ) Change subject: Update to soundmanagerv297a-20170601 .. Update to soundmanagerv297a-20170601 Change-Id: I9bd313a9f4a1b7ee1a6d8040d82e934702b6d35b --- M SoundManager2Button.php M css/mp3-player-button.css A image/arrow-right-black-2x.png A image/arrow-right-white-2x.png M script/mp3-player-button.js M script/soundmanager2-jsmin.js M script/soundmanager2-nodebug-jsmin.js M script/soundmanager2-nodebug.js M script/soundmanager2.js M swf/soundmanager2.swf M swf/soundmanager2_debug.swf M swf/soundmanager2_flash9.swf M swf/soundmanager2_flash9_debug.swf 13 files changed, 1,742 insertions(+), 1,395 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SoundManager2Button refs/changes/86/384086/1 -- To view, visit https://gerrit.wikimedia.org/r/384086 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9bd313a9f4a1b7ee1a6d8040d82e934702b6d35b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SoundManager2Button Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader Gerrit-Reviewer: kroocsiogsi ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...QuickGV[master]: Fix for windows system to find php.exe
Gerrit Patch Uploader has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/383509 ) Change subject: Fix for windows system to find php.exe .. Fix for windows system to find php.exe Change-Id: Ia7fbe335e571b93f321aa989cd7294d4f2088482 --- M QuickGV.body.php 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/QuickGV refs/changes/09/383509/1 diff --git a/QuickGV.body.php b/QuickGV.body.php index 1058711..b004015 100644 --- a/QuickGV.body.php +++ b/QuickGV.body.php @@ -70,7 +70,10 @@ if ($dotcmd=='') return self::showError(); // PHP 環境檢查 - $phpcmd = self::findExecutable('php', self::PHP_PATH); + if (PHP_OS=='WINNT') +$phpcmd = dirname(PHP_BINARY) . "\php.exe"; //php-cgi.exe might be used but we want php.exe + else $phpcmd = self::findExecutable('php', self::PHP_PATH); + if ($phpcmd=='') return self::showError(); // $in 上限管制 -- To view, visit https://gerrit.wikimedia.org/r/383509 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia7fbe335e571b93f321aa989cd7294d4f2088482 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/QuickGV Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Test
Gerrit Patch Uploader has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/381704 ) Change subject: Test .. Test Change-Id: Ie0941204cf58d6ecf2ec8892187afbc7e51a1a20 --- M wmf-config/CommonSettings-labs.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/04/381704/1 diff --git a/wmf-config/CommonSettings-labs.php b/wmf-config/CommonSettings-labs.php index 8278b7d..ec0d1f3 100644 --- a/wmf-config/CommonSettings-labs.php +++ b/wmf-config/CommonSettings-labs.php @@ -1,7 +1,7 @@ https://gerrit.wikimedia.org/r/381704 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie0941204cf58d6ecf2ec8892187afbc7e51a1a20 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader Gerrit-Reviewer: Zoranzoki21 ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: T163646 HHVM 3.19 incompability: TypeError: Argument 1 passe...
Gerrit Patch Uploader has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/381617 ) Change subject: T163646 HHVM 3.19 incompability: TypeError: Argument 1 passed to mysql_real_escape_string() must be an instance of string, int given .. T163646 HHVM 3.19 incompability: TypeError: Argument 1 passed to mysql_real_escape_string() must be an instance of string, int given Under some conditions (Semantic MediaWiki, Gadgets), an integer is passed to DatabaseMysqli::mysqlRealEscapeString (). This integer is, in turn, passed to mysqli::real_escape_string (), which needs a string. Under HHVM 3.19.1 (at least) this type mismatch causes an exception. A typecast should prevent it. I repeated the patch in other DB drivers where I could find a function that escaped strings for SQL. Change-Id: I1b7820bc064dc79498cf9f17747f745990c526b7 --- M includes/libs/rdbms/database/DatabaseMssql.php M includes/libs/rdbms/database/DatabaseMysql.php M includes/libs/rdbms/database/DatabaseMysqli.php M includes/libs/rdbms/database/DatabasePostgres.php M includes/libs/rdbms/database/DatabaseSqlite.php 5 files changed, 8 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/17/381617/1 diff --git a/includes/libs/rdbms/database/DatabaseMssql.php b/includes/libs/rdbms/database/DatabaseMssql.php index 4ebc623..9527070 100644 --- a/includes/libs/rdbms/database/DatabaseMssql.php +++ b/includes/libs/rdbms/database/DatabaseMssql.php @@ -1066,7 +1066,7 @@ public function strencode( $s ) { // Should not be called by us - return str_replace( "'", "''", $s ); + return str_replace( "'", "''", (string) $s ); } /** diff --git a/includes/libs/rdbms/database/DatabaseMysql.php b/includes/libs/rdbms/database/DatabaseMysql.php index d81d909..197bf51 100644 --- a/includes/libs/rdbms/database/DatabaseMysql.php +++ b/includes/libs/rdbms/database/DatabaseMysql.php @@ -203,7 +203,7 @@ protected function mysqlRealEscapeString( $s ) { $conn = $this->getBindingHandle(); - return mysql_real_escape_string( $s, $conn ); + return mysql_real_escape_string( (string) $s, $conn ); } } diff --git a/includes/libs/rdbms/database/DatabaseMysqli.php b/includes/libs/rdbms/database/DatabaseMysqli.php index 4c3cbdd..5b4f554 100644 --- a/includes/libs/rdbms/database/DatabaseMysqli.php +++ b/includes/libs/rdbms/database/DatabaseMysqli.php @@ -316,7 +316,7 @@ protected function mysqlRealEscapeString( $s ) { $conn = $this->getBindingHandle(); - return $conn->real_escape_string( $s ); + return $conn->real_escape_string( (string) $s ); } /** diff --git a/includes/libs/rdbms/database/DatabasePostgres.php b/includes/libs/rdbms/database/DatabasePostgres.php index 5719a1f..a69d4eb 100644 --- a/includes/libs/rdbms/database/DatabasePostgres.php +++ b/includes/libs/rdbms/database/DatabasePostgres.php @@ -1175,7 +1175,7 @@ public function strencode( $s ) { // Should not be called by us - return pg_escape_string( $this->getBindingHandle(), $s ); + return pg_escape_string( $this->getBindingHandle(), (string) $s ); } public function addQuotes( $s ) { @@ -1196,7 +1196,7 @@ return 'DEFAULT'; } - return "'" . pg_escape_string( $conn, $s ) . "'"; + return "'" . pg_escape_string( $conn, (string) $s ) . "'"; } /** diff --git a/includes/libs/rdbms/database/DatabaseSqlite.php b/includes/libs/rdbms/database/DatabaseSqlite.php index 870fc3e..20be591 100644 --- a/includes/libs/rdbms/database/DatabaseSqlite.php +++ b/includes/libs/rdbms/database/DatabaseSqlite.php @@ -790,7 +790,7 @@ return "x'" . bin2hex( $s->fetch() ) . "'"; } elseif ( is_bool( $s ) ) { return (int)$s; - } elseif ( strpos( $s, "\0" ) !== false ) { + } elseif ( strpos( (string) $s, "\0" ) !== false ) { // SQLite doesn't support \0 in strings, so use the hex representation as a workaround. // This is a known limitation of SQLite's mprintf function which PDO // should work around, but doesn't. I have reported this to php.net as bug #63419: @@ -806,9 +806,9 @@ 'For consistency all binary data should have been ' . 'first processed with self::encodeBlob()' ); - return "x'" . bin2hex( $s ) . "'"; + return "x'" . bin2hex( (string) $s ) . "'"; } else { - return $this->mConn->quote( $s ); +
[MediaWiki-commits] [Gerrit] mediawiki...Cite[master]: T177134: Nulls passed to preg_match in Cite
Gerrit Patch Uploader has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/381616 ) Change subject: T177134: Nulls passed to preg_match in Cite .. T177134: Nulls passed to preg_match in Cite Line 334 of Cite/includes/Cite.php contains two preg_match () calls. The subject lines for them are produced by Cite::refArgs () and are set to null or false when no name or follow attribute is provided in the tag. However, preg_match () is supposed to accept only strings as its subject, and the nowhere in the documentation it is said that it is nullable. At least, in HHVM 3.12 this causes an exception. The enclosed patch add simple checks making sure that preg_match () is not called when $key or $follow are null or false. Change-Id: I3e00d31d6bf216271ace7e851d88c68c4fd5ed00 --- M includes/Cite.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Cite refs/changes/16/381616/1 diff --git a/includes/Cite.php b/includes/Cite.php index 69a0f99..237b9cc 100644 --- a/includes/Cite.php +++ b/includes/Cite.php @@ -331,7 +331,7 @@ return $this->error( 'cite_error_ref_no_key' ); } - if ( preg_match( '/^[0-9]+$/', $key ) || preg_match( '/^[0-9]+$/', $follow ) ) { + if ( $key && preg_match( '/^[0-9]+$/', $key ) || $follow && preg_match( '/^[0-9]+$/', $follow ) ) { # Numeric names mess up the resulting id's, potentially produ- # cing duplicate id's in the XHTML. The Right Thing To Do # would be to mangle them, but it's not really high-priority -- To view, visit https://gerrit.wikimedia.org/r/381616 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3e00d31d6bf216271ace7e851d88c68c4fd5ed00 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Cite Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader Gerrit-Reviewer: Alexander I. Mashin ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/debian[master]: git.wikimedia.org -> phab
Gerrit Patch Uploader has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/380998 ) Change subject: git.wikimedia.org -> phab .. git.wikimedia.org -> phab Bug: T139089 Change-Id: Id6e753375132a9d146abfeebba505cf01482be0b --- M extensions/PdfHandler/tests/browser/features/step_definitions/pdf_steps.rb M extensions/PdfHandler/tests/browser/features/support/pages/random_page.rb 2 files changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/debian refs/changes/98/380998/1 diff --git a/extensions/PdfHandler/tests/browser/features/step_definitions/pdf_steps.rb b/extensions/PdfHandler/tests/browser/features/step_definitions/pdf_steps.rb index 25cf8ef..ba6e9ac 100644 --- a/extensions/PdfHandler/tests/browser/features/step_definitions/pdf_steps.rb +++ b/extensions/PdfHandler/tests/browser/features/step_definitions/pdf_steps.rb @@ -1,13 +1,13 @@ # # This file is subject to the license terms in the LICENSE file found in the # qa-browsertests top-level directory and at -# https://git.wikimedia.org/blob/qa%2Fbrowsertests/HEAD/LICENSE. No part of +# https://phabricator.wikimedia.org/diffusion/MSEL/browse/master/LICENSE.md. No part of # qa-browsertests, including this file, may be copied, modified, propagated, or # distributed except according to the terms contained in the LICENSE file. # # Copyright 2012-2014 by the Mediawiki developers. See the CREDITS file in the # qa-browsertests top-level directory and at -# https://git.wikimedia.org/blob/qa%2Fbrowsertests/HEAD/CREDITS +# https://phabricator.wikimedia.org/diffusion/MSEL/browse/master/CREDITShttps://git.wikimedia.org/blob/qa%2Fbrowsertests/HEAD/CREDITS # Then(/^Download as PDF should be present$/) do on(PdfPage).download_as_pdf_element.should exist diff --git a/extensions/PdfHandler/tests/browser/features/support/pages/random_page.rb b/extensions/PdfHandler/tests/browser/features/support/pages/random_page.rb index 8dc4e90..49cba6e 100644 --- a/extensions/PdfHandler/tests/browser/features/support/pages/random_page.rb +++ b/extensions/PdfHandler/tests/browser/features/support/pages/random_page.rb @@ -1,13 +1,13 @@ # # This file is subject to the license terms in the LICENSE file found in the # qa-browsertests top-level directory and at -# https://git.wikimedia.org/blob/qa%2Fbrowsertests/HEAD/LICENSE. No part of +# https://phabricator.wikimedia.org/diffusion/MSEL/browse/master/LICENSE.md. No part of # qa-browsertests, including this file, may be copied, modified, propagated, or # distributed except according to the terms contained in the LICENSE file. # # Copyright 2012-2014 by the Mediawiki developers. See the CREDITS file in the # qa-browsertests top-level directory and at -# https://git.wikimedia.org/blob/qa%2Fbrowsertests/HEAD/CREDITS +# https://phabricator.wikimedia.org/diffusion/MSEL/browse/master/CREDITS # class PdfPage include PageObject -- To view, visit https://gerrit.wikimedia.org/r/380998 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id6e753375132a9d146abfeebba505cf01482be0b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/debian Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader Gerrit-Reviewer: TerraCodes ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Set X-Frame-Options: SAMEORIGIN if UploadWizard enabled
Gerrit Patch Uploader has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/372789 ) Change subject: Set X-Frame-Options: SAMEORIGIN if UploadWizard enabled .. Set X-Frame-Options: SAMEORIGIN if UploadWizard enabled Bug: T173631 Change-Id: I0e91c78fcf8efb94c4e254cd55215adfebda9087 --- M wmf-config/InitialiseSettings.php 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/89/372789/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index aa4287b..58cf121 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -13340,6 +13340,7 @@ 'wgApiFrameOptions' => [ 'default' => 'DENY', 'enwiki' => 'SAMEORIGIN', // T41877 + 'zhwiki' => 'SAMEORIGIN', // T173631 ], 'wmgAltUploadForm' => [ // T35513 -- To view, visit https://gerrit.wikimedia.org/r/372789 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0e91c78fcf8efb94c4e254cd55215adfebda9087 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: search: Hyphen to dash for range in results message Change-I...
Gerrit Patch Uploader has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/372453 ) Change subject: search: Hyphen to dash for range in results message Change-Id: I0ace65b08a21b4024f7c9825173dc17b7f408d3d .. search: Hyphen to dash for range in results message Change-Id: I0ace65b08a21b4024f7c9825173dc17b7f408d3d --- M languages/i18n/en.json 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/53/372453/1 diff --git a/languages/i18n/en.json b/languages/i18n/en.json index 3497d80..5c7075e 100644 --- a/languages/i18n/en.json +++ b/languages/i18n/en.json @@ -987,7 +987,7 @@ "searchall": "all", "showingresults": "Showing below up to {{PLURAL:$1|1 result|$1 results}} starting with #$2.", "showingresultsinrange": "Showing below up to {{PLURAL:$1|1 result|$1 results}} in range #$2 to #$3.", - "search-showingresults": "{{PLURAL:$4|Result $1 of $3|Results $1 - $2 of $3}}", + "search-showingresults": "{{PLURAL:$4|Result $1 of $3|Results $1 – $2 of $3}}", "search-nonefound": "There were no results matching the query.", "search-nonefound-thiswiki": "There were no results matching the query in this site.", "powersearch-legend": "Advanced search", -- To view, visit https://gerrit.wikimedia.org/r/372453 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0ace65b08a21b4024f7c9825173dc17b7f408d3d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...WikimediaMaintenance[master]: Add Wikispecies
Gerrit Patch Uploader has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/371923 ) Change subject: Add Wikispecies .. Add Wikispecies Bug: T173295 Change-Id: I014e9033e98cc9e97e92a921847b74b5e2caac31 --- M addWiki.php 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikimediaMaintenance refs/changes/23/371923/1 diff --git a/addWiki.php b/addWiki.php index 360a5a8..86f9a2c 100644 --- a/addWiki.php +++ b/addWiki.php @@ -305,6 +305,7 @@ [//www.wikisource.org Wikisource] | [//www.wikiversity.org Wikiversity] | [//www.wikivoyage.org Wikivoyage] | +[//species.wikimedia.org Wikispecies] | [//www.wikidata.org Wikidata] | [//commons.wikimedia.org Commons] -- To view, visit https://gerrit.wikimedia.org/r/371923 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I014e9033e98cc9e97e92a921847b74b5e2caac31 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikimediaMaintenance Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...WikimediaMessages[master]: Add messages for propertycreator group
Gerrit Patch Uploader has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/371796 ) Change subject: Add messages for propertycreator group .. Add messages for propertycreator group Property creator is a user group in Wikidata. The group names are currently managed locally (https://www.wikidata.org/w/index.php?title=Special%3APrefixIndex&prefix=group&namespace=8) which causes the group name to show literally on beta labs (https://wikidata.beta.wmflabs.org/wiki/Special:ListUsers?username=&group=propertycreator&wpsubmit=&wpFormIdentifier=mw-listusers-form&limit=50). Bug: T139246 Change-Id: I67fa64ac3f41ec7f03b9d489201c7bb5510ae24d --- M i18n/wikimedia/en.json M i18n/wikimedia/qqq.json 2 files changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikimediaMessages refs/changes/96/371796/1 diff --git a/i18n/wikimedia/en.json b/i18n/wikimedia/en.json index 7f225a5..c6a6234 100644 --- a/i18n/wikimedia/en.json +++ b/i18n/wikimedia/en.json @@ -103,6 +103,9 @@ "group-patroller": "Patrollers", "group-patroller-member": "{{GENDER:$1|patroller}}", "grouppage-patroller": "{{ns:project}}:Patrollers", + "group-propertycreator": "Property creators", + "group-propertycreator-member": "{{GENDER:$1|property creator}}", + "grouppage-propertycreator": "{{ns:project}}:Property creators", "group-researcher": "Researchers", "group-researcher-member": "{{GENDER:$1|researcher}}", "grouppage-researcher": "{{ns:project}}:Researchers", diff --git a/i18n/wikimedia/qqq.json b/i18n/wikimedia/qqq.json index 729dac7..2d29038 100644 --- a/i18n/wikimedia/qqq.json +++ b/i18n/wikimedia/qqq.json @@ -132,6 +132,9 @@ "group-patroller": "{{doc-group|patroller|prefix=wmf-}}", "group-patroller-member": "{{doc-group|patroller|member|prefix=wmf-}}", "grouppage-patroller": "{{doc-group|patroller|page|prefix=wmf-}}", + "group-propertycreator": "{{doc-group|propertycreator}}", + "group-propertycreator-member": "{{doc-group|propertycreator|member}}", + "grouppage-propertycreator": "{{doc-group|propertycreator|page}}", "group-researcher": "{{doc-group|researcher}}\nFrom [[wikipedia:Wikipedia:Researcher#Researcher]]\nThe 'researcher' group was created in April 2010 to allow individuals explicitly approved by the Wikimedia Foundation to search deleted pages and view deleted history entries without their associated text.", "group-researcher-member": "{{doc-group|researcher|member}}\nFrom [[wikipedia:Wikipedia:Researcher#Researcher]]\nThe 'researcher' group was created in April 2010 to allow individuals explicitly approved by the Wikimedia Foundation to search deleted pages and view deleted history entries without their associated text.", "grouppage-researcher": "{{doc-group|researcher|page}}\nFrom [[wikipedia:Wikipedia:Researcher#Researcher]]\nThe 'researcher' group was created in April 2010 to allow individuals explicitly approved by the Wikimedia Foundation to search deleted pages and view deleted history entries without their associated text.", -- To view, visit https://gerrit.wikimedia.org/r/371796 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I67fa64ac3f41ec7f03b9d489201c7bb5510ae24d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikimediaMessages Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: RC Filters: Revise newcomer description
Gerrit Patch Uploader has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/356046 ) Change subject: RC Filters: Revise newcomer description .. RC Filters: Revise newcomer description Currently both conditions (fewer than 10 edits and fewer than 4 days of activity) don't have to be met. The filter also disjunctively shows edits for users that have made less than 10 edits, but have not been active for less than 4 days, and the other way around. So the description should say 'or' instead of 'and'. Change-Id: Ifdbc32f95ae1cc9194e59d6080a033ce727a4fe8 --- M languages/i18n/en.json 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/46/356046/1 diff --git a/languages/i18n/en.json b/languages/i18n/en.json index 22f2745..ed3ac11 100644 --- a/languages/i18n/en.json +++ b/languages/i18n/en.json @@ -1407,7 +1407,7 @@ "rcfilters-filtergroup-user-experience-level-conflicts-unregistered": "Experience filters find only registered users, so this filter conflicts with the “Unregistered” filter.", "rcfilters-filtergroup-user-experience-level-conflicts-unregistered-global": "The \"Unregistered\" filter conflicts with one or more Experience filters, which find registered users only. The conflicting filters are marked in the Active Filters area, above.", "rcfilters-filter-user-experience-level-newcomer-label": "Newcomers", - "rcfilters-filter-user-experience-level-newcomer-description": "Fewer than 10 edits and 4 days of activity.", + "rcfilters-filter-user-experience-level-newcomer-description": "Fewer than 10 edits or 4 days of activity.", "rcfilters-filter-user-experience-level-learner-label": "Learners", "rcfilters-filter-user-experience-level-learner-description": "More experience than \"Newcomers\" but less than \"Experienced users\".", "rcfilters-filter-user-experience-level-experienced-label": "Experienced users", -- To view, visit https://gerrit.wikimedia.org/r/356046 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifdbc32f95ae1cc9194e59d6080a033ce727a4fe8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader Gerrit-Reviewer: Gerrit Patch Uploader ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...cldr[master]: Add LocalNames for Estonian
Gerrit Patch Uploader has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/355250 ) Change subject: Add LocalNames for Estonian .. Add LocalNames for Estonian Languages that are not in CLDR (or use different code), but Wikipedia language version exists. Change-Id: I00943d3dba64f8a9cb0645722175f33e3f59354d --- A LocalNames/LocalNamesEt.php 1 file changed, 31 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/cldr refs/changes/50/355250/1 diff --git a/LocalNames/LocalNamesEt.php b/LocalNames/LocalNamesEt.php new file mode 100644 index 000..23544d6 --- /dev/null +++ b/LocalNames/LocalNamesEt.php @@ -0,0 +1,31 @@ + 'alemanni', + 'azb' => 'lõunaaserbaidžaani', + 'bat-smg' => 'žemaidi', + 'be-x-old' => 'valgevene (taraškievitsa)', + 'bh' => 'bihaari', + 'bxr' => 'burjaadi', + 'cbk-zam' => 'Zamboanga tšavakano', + 'cdo' => 'idamini', + 'diq' => 'dõmli', + 'eml' => 'emiilia-romanja', + 'fiu-vro' => 'võru', + 'lbe' => 'laki', + 'mhr' => 'niidumari', + 'mo' => 'moldova', + 'nah' => 'nahua', + 'nrm' => 'Normandia', + 'olo' => 'livviko', + 'pih' => 'norfuki', + 'pnb' => 'lahnda', + 'rmy' => 'Valahhia mustlaskeel', + 'roa-rup' => 'aromuuni', + 'simple' => 'lihtsustatud inglise', + 'zh-classical' => 'klassikaline hiina', + 'zh-min-nan' => 'lõunamini', + 'zh-yue' => 'kantoni', +]; \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/355250 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I00943d3dba64f8a9cb0645722175f33e3f59354d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/cldr Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...PageForms[master]: git.wikimedia.org -> phab
Gerrit Patch Uploader has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/348670 ) Change subject: git.wikimedia.org -> phab .. git.wikimedia.org -> phab Bug: T139089 Change-Id: I55f9fe65c138a926861bd3d65a61382561d9fb41 --- M languages/PF_Messages.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PageForms refs/changes/70/348670/1 diff --git a/languages/PF_Messages.php b/languages/PF_Messages.php index fc65d35..85420f1 100644 --- a/languages/PF_Messages.php +++ b/languages/PF_Messages.php @@ -1,7 +1,7 @@ https://git.wikimedia.org/blob/mediawiki%2Fcore.git/HEAD/maintenance%2FgenerateJsonI18n.php + * https://phabricator.wikimedia.org/source/mediawiki/browse/master/maintenance/generateJsonI18n.php * * Beginning with MediaWiki 1.23, translation strings are stored in json files, * and the EXTENSION.i18n.php file only exists to provide compatibility with -- To view, visit https://gerrit.wikimedia.org/r/348670 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I55f9fe65c138a926861bd3d65a61382561d9fb41 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/PageForms Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader Gerrit-Reviewer: TerraCodes ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] pywikibot/core[master]: upload.py: remove "Do you want to change this description?" ...
Gerrit Patch Uploader has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/348485 ) Change subject: upload.py: remove "Do you want to change this description?" when it's empty .. upload.py: remove "Do you want to change this description?" when it's empty Bug: T163108 Change-Id: Iec43845e293721aee70d8f1129b323d7fbceb8b8 --- M pywikibot/specialbots.py 1 file changed, 10 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/85/348485/1 diff --git a/pywikibot/specialbots.py b/pywikibot/specialbots.py index 72e079c..2e43e0f 100644 --- a/pywikibot/specialbots.py +++ b/pywikibot/specialbots.py @@ -332,22 +332,25 @@ # A proper description for the submission. # Empty descriptions are not accepted. -pywikibot.output(u'The suggested description is:\n%s' - % self.description) + + # Description must be set and verified -if not self.description: +if self.description: +pywikibot.output(u'The suggested description is:\n%s' + % self.description) +else: +pywikibot.output(u'No description was given.') self.verifyDescription = True while not self.description or self.verifyDescription: if not self.description: pywikibot.output(color_format( -'{lightred}It is not possible to upload a file ' -'without a summary/description.{default}')) - +'It is not possible to upload a file without a description. ' +'Please enter a description in the window.')) assert not always # if no description, default is 'yes' -if pywikibot.input_yn( +if not self.description or pywikibot.input_yn( u'Do you want to change this description?', default=not self.description): from pywikibot import editor as editarticle -- To view, visit https://gerrit.wikimedia.org/r/348485 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iec43845e293721aee70d8f1129b323d7fbceb8b8 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader Gerrit-Reviewer: Framawiki Gerrit-Reviewer: Gerrit Patch Uploader ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] pywikibot/core[master]: upload.py + specialbots.py: Authorize the use of an edit sum...
Gerrit Patch Uploader has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/348448 ) Change subject: upload.py + specialbots.py: Authorize the use of an edit summary .. upload.py + specialbots.py: Authorize the use of an edit summary Adds an option to enter a specific upload summary (edit summary for the upload action). It uses the "comment" argument of site.upload() instead of using page.text. I added a "summary" argument for UploadRobot of specialbots to do this. Bug: T162527 Change-Id: Ifc3fc7cb853f81735d98e9fceef341f0df87d39e --- M pywikibot/specialbots.py M scripts/upload.py 2 files changed, 15 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/48/348448/1 diff --git a/pywikibot/specialbots.py b/pywikibot/specialbots.py index 4694857..c914e2f 100644 --- a/pywikibot/specialbots.py +++ b/pywikibot/specialbots.py @@ -40,7 +40,7 @@ """Upload bot.""" def __init__(self, url, urlEncoding=None, description=u'', - useFilename=None, keepFilename=False, + useFilename=None, keepFilename=False, summary=None, verifyDescription=True, ignoreWarning=False, targetSite=None, uploadByUrl=False, aborts=[], chunk_size=0, **kwargs): @@ -60,6 +60,8 @@ @param keepFilename: Set to True to keep original names of urls and files, otherwise it will ask to enter a name for each file. @type keepFilename: bool +@param summary: Summary of the upload +@type summary: string @param verifyDescription: Set to False to not proofread the description. @type verifyDescription: bool @param ignoreWarning: Set this to True to upload even if another file @@ -91,7 +93,7 @@ raise ValueError('When always is set to True, either ignoreWarning ' 'or aborts must be set to True.') if always and not description: -raise ValueError('When always is set to True the description must ' +raise ValueError('When always is set to True, the description must ' 'be set.') self.url = url if isinstance(self.url, basestring): @@ -105,6 +107,7 @@ self.ignoreWarning = ignoreWarning self.aborts = aborts self.chunk_size = chunk_size +self.summary = summary if config.upload_to_commons: self.targetSite = targetSite or pywikibot.Site('commons', 'commons') @@ -395,6 +398,7 @@ site = self.targetSite imagepage = pywikibot.FilePage(site, filename) # normalizes filename imagepage.text = self.description +if not self.summary: self.summary = self.description pywikibot.output(u'Uploading file to %s via API...' % site) @@ -407,7 +411,8 @@ if self.uploadByUrl: success = site.upload(imagepage, source_url=file_url, ignore_warnings=apiIgnoreWarnings, - _file_key=_file_key, _offset=_offset) + _file_key=_file_key, _offset=_offset, + comment=self.summary) else: if "://" in file_url: temp = self.read_file_content(file_url) @@ -416,7 +421,8 @@ success = site.upload(imagepage, source_filename=temp, ignore_warnings=apiIgnoreWarnings, chunk_size=self.chunk_size, - _file_key=_file_key, _offset=_offset) + _file_key=_file_key, _offset=_offset, + comment=self.summary) except pywikibot.data.api.APIError as error: if error.code == u'uploaddisabled': diff --git a/scripts/upload.py b/scripts/upload.py index 0eee51d..26fc5e0 100755 --- a/scripts/upload.py +++ b/scripts/upload.py @@ -29,6 +29,7 @@ the 'exists' warning. -recursiveWhen the filename is a directory it also uploads the files from the subdirectories. + -summary Pick a custom edit summary for the bot. It is possible to combine -abortonwarn and -ignorewarn so that if the specific warning is given it won't apply the general one but more specific one. So if it @@ -75,6 +76,7 @@ """ url = u'' description = [] +summary = None keepFilename = False always = False useFilename = None @@ -100,6 +102,8 @@ keepFilename = True elif arg.startswith('-filename:'): useFilename = arg[10:] +elif arg.startswith('-summary'): +summary = arg[9:] elif
[MediaWiki-commits] [Gerrit] pywikibot/core[master]: category.py : add link in the default summary
Gerrit Patch Uploader has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/348445 ) Change subject: category.py : add link in the default summary .. category.py : add link in the default summary Bug: T151109 Change-Id: Ie8e0cee269e3e4d5f21bc2c31b426f2a740feb44 --- M scripts/category.py 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/45/348445/1 diff --git a/scripts/category.py b/scripts/category.py index 7e7bd69..ffdd13c 100755 --- a/scripts/category.py +++ b/scripts/category.py @@ -488,7 +488,7 @@ template_vars = {'oldcat': self.oldcat.title(withNamespace=False)} if self.newcat: template_vars.update({ -'newcat': self.newcat.title(withNamespace=False), +'newcat': self.newcat.title(withNamespace=False, asLink=True), 'title': self.newcat.title(withNamespace=False)}) # Set edit summary for changed pages. if comment: -- To view, visit https://gerrit.wikimedia.org/r/348445 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie8e0cee269e3e4d5f21bc2c31b426f2a740feb44 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader Gerrit-Reviewer: Framawiki ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] pywikibot/core[master]: config2: Fix UnicodeDecodeError
Gerrit Patch Uploader has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/348444 ) Change subject: config2: Fix UnicodeDecodeError .. config2: Fix UnicodeDecodeError Windows users may have broken function _win32_extension_command when: - Python 2 is used, - no program is configured to open .py files So windows generates a non-ascii error message This intercept all calls to pywikibot, such pwb.py or generate_user_files.py. As proposed by XZise, use {1!r} instead of {1} miraculously solve the problem. Bug: T120222 Change-Id: I47e2756259ecbc1279e1124c076622177b3fc1d6 --- M pywikibot/config2.py 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/44/348444/1 diff --git a/pywikibot/config2.py b/pywikibot/config2.py index 90877ba..e0bac1e 100644 --- a/pywikibot/config2.py +++ b/pywikibot/config2.py @@ -942,7 +942,7 @@ return cmd[:-1].strip() except WindowsError as e: # Catch any key lookup errors -output('Unable to detect program for file extension "{0}": {1}'.format( +output('Unable to detect program for file extension "{0}": {1!r}'.format( extension, e)) -- To view, visit https://gerrit.wikimedia.org/r/348444 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I47e2756259ecbc1279e1124c076622177b3fc1d6 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader Gerrit-Reviewer: Framawiki ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...WikiLove[master]: git.wikimedia.org -> phab
Gerrit Patch Uploader has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/348405 ) Change subject: git.wikimedia.org -> phab .. git.wikimedia.org -> phab Bug: T139089 Change-Id: I23ad8df4b09b88ebf1bedf55e97c2dfdc01aef97 --- M tests/browser/features/support/pages/wikilove_page.rb 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikiLove refs/changes/05/348405/1 diff --git a/tests/browser/features/support/pages/wikilove_page.rb b/tests/browser/features/support/pages/wikilove_page.rb index 297bc8a..1de9574 100644 --- a/tests/browser/features/support/pages/wikilove_page.rb +++ b/tests/browser/features/support/pages/wikilove_page.rb @@ -1,13 +1,13 @@ # # This file is subject to the license terms in the COPYING file found in the # WikiLove top-level directory and at -# https://git.wikimedia.org/blob/mediawiki%2Fextensions%2FWikiLove/HEAD/COPYING. No part of +# https://phabricator.wikimedia.org/diffusion/EWLO/browse/master/COPYING. No part of # WikiLove, including this file, may be copied, modified, propagated, or # distributed except according to the terms contained in the COPYING file. # # Copyright 2012-2014 by the Mediawiki developers. See the CREDITS file in the # WikiLove top-level directory and at -# https://git.wikimedia.org/blob/mediawiki%2Fextensions%2FWikiLove/HEAD/CREDITS +# https://phabricator.wikimedia.org/diffusion/EWLO/browse/master/CREDITS # require 'page-object' -- To view, visit https://gerrit.wikimedia.org/r/348405 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I23ad8df4b09b88ebf1bedf55e97c2dfdc01aef97 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikiLove Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader Gerrit-Reviewer: TerraCodes ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...PdfHandler[master]: git.wikimedia.org -> phab
Gerrit Patch Uploader has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/348319 ) Change subject: git.wikimedia.org -> phab .. git.wikimedia.org -> phab Bug: T139089 Change-Id: I87e1156b54b7c9ab8101652e36cb1bd02d3e89c7 --- M tests/browser/features/step_definitions/pdf_steps.rb 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PdfHandler refs/changes/19/348319/1 diff --git a/tests/browser/features/step_definitions/pdf_steps.rb b/tests/browser/features/step_definitions/pdf_steps.rb index 25cf8ef..812136b 100644 --- a/tests/browser/features/step_definitions/pdf_steps.rb +++ b/tests/browser/features/step_definitions/pdf_steps.rb @@ -1,13 +1,13 @@ # # This file is subject to the license terms in the LICENSE file found in the # qa-browsertests top-level directory and at -# https://git.wikimedia.org/blob/qa%2Fbrowsertests/HEAD/LICENSE. No part of +# https://phabricator.wikimedia.org/diffusion/MSEL/browse/master/LICENSE. No part of # qa-browsertests, including this file, may be copied, modified, propagated, or # distributed except according to the terms contained in the LICENSE file. # # Copyright 2012-2014 by the Mediawiki developers. See the CREDITS file in the # qa-browsertests top-level directory and at -# https://git.wikimedia.org/blob/qa%2Fbrowsertests/HEAD/CREDITS +# https://phabricator.wikimedia.org/diffusion/MSEL/browse/master/CREDITS # Then(/^Download as PDF should be present$/) do on(PdfPage).download_as_pdf_element.should exist -- To view, visit https://gerrit.wikimedia.org/r/348319 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I87e1156b54b7c9ab8101652e36cb1bd02d3e89c7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/PdfHandler Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader Gerrit-Reviewer: TerraCodes ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...PageImages[master]: Make PageImagesLeadSectionOnly default to true
Gerrit Patch Uploader has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/348315 ) Change subject: Make PageImagesLeadSectionOnly default to true .. Make PageImagesLeadSectionOnly default to true Bug: T162203 Change-Id: Ic7b4d5ab42f71f6b4cf24cb5e808341a09e8 --- M extension.json 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PageImages refs/changes/15/348315/1 diff --git a/extension.json b/extension.json index 9017a9a..87ddf34 100644 --- a/extension.json +++ b/extension.json @@ -87,7 +87,7 @@ "PageImagesLeadSectionOnly": { "@doc": "Temporary feature flag - Whether page images should be restricted to those in section id 0.", "@fixme": "Please remove a month after it has defaulted to true on the cluster (T152115)", - "value": false + "value": true } }, "manifest_version": 2 -- To view, visit https://gerrit.wikimedia.org/r/348315 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic7b4d5ab42f71f6b4cf24cb5e808341a09e8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/PageImages Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader Gerrit-Reviewer: TerraCodes ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Change File namespace name
Gerrit Patch Uploader has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/347807 ) Change subject: Change File namespace name .. Change File namespace name Set File namespace name for Estonian to literal translation "Fail" ('file') and set previous name "Pilt" ('image') as a namespace alias. T162744 Change-Id: Id9616825f8335f512ccfeca167ddeef42d0220c3 --- M languages/messages/MessagesEt.php 1 file changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/07/347807/1 diff --git a/languages/messages/MessagesEt.php b/languages/messages/MessagesEt.php index 28c69df..fcc12c9 100644 --- a/languages/messages/MessagesEt.php +++ b/languages/messages/MessagesEt.php @@ -15,8 +15,8 @@ NS_USER => 'Kasutaja', NS_USER_TALK=> 'Kasutaja_arutelu', NS_PROJECT_TALK => '{{GRAMMAR:genitive|$1}}_arutelu', - NS_FILE => 'Pilt', - NS_FILE_TALK=> 'Pildi_arutelu', + NS_FILE => 'Fail', + NS_FILE_TALK=> 'Faili_arutelu', NS_MEDIAWIKI=> 'MediaWiki', NS_MEDIAWIKI_TALK => 'MediaWiki_arutelu', NS_TEMPLATE => 'Mall', @@ -29,6 +29,8 @@ $namespaceAliases = [ '$1_arutelu' => NS_PROJECT_TALK, + 'Pilt' => NS_FILE, + 'Pildi_arutelu' => NS_FILE_TALK, ]; $specialPageAliases = [ -- To view, visit https://gerrit.wikimedia.org/r/347807 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id9616825f8335f512ccfeca167ddeef42d0220c3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...TextExtracts[master]: Remove broken plaintext section markers
Gerrit Patch Uploader has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/344791 ) Change subject: Remove broken plaintext section markers .. Remove broken plaintext section markers The heading tags from getExtract is useful even in plaintext output mode. These tags, scrambled to a special format by ExtractFormatter, are used by doSection(), which looks for such markers and reformat them as specified by sectionformat. When truncated, incomplete markers will become U+FFFD characters in the API output (see bug below). This patch: * Adds a public method ExtractFormatter::tidySectionMarkers( $text ) to search for and eliminate broken markers at the end. * Adds a private helper method to construct a regex for the above method. * Modifies ApiQueryExtracts::tidy( $text ) to call the first method for plaintext. Bug: T92628 Change-Id: Ib91fab62601087c891fba0e7fadea7d249c7f18b Change-Id: I010a79b8dbfe35facc2450b7d148aa7a85716019 --- M includes/ApiQueryExtracts.php M includes/ExtractFormatter.php M tests/phpunit/ExtractFormatterTest.php 3 files changed, 91 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TextExtracts refs/changes/91/344791/1 diff --git a/includes/ApiQueryExtracts.php b/includes/ApiQueryExtracts.php index f80b90b..af24aa1 100644 --- a/includes/ApiQueryExtracts.php +++ b/includes/ApiQueryExtracts.php @@ -318,12 +318,14 @@ } /** -* A simple wrapper around tidy +* Cleans up the text. Wraps tidy for HTML, trims out broken section markers for plaintext * @param string $text * @return string */ private function tidy( $text ) { - if ( $this->getConfig()->get( 'UseTidy' ) && !$this->params['plaintext'] ) { + if ( $this->params['plaintext'] ) { + $text = ExtractFormatter::tidySectionMarkers( $text ); + } elseif ( $this->getConfig()->get( 'UseTidy' ) ) { $text = trim( MWTidy::tidy( $text ) ); } return $text; diff --git a/includes/ExtractFormatter.php b/includes/ExtractFormatter.php index 4dd7e92..877cbfd 100644 --- a/includes/ExtractFormatter.php +++ b/includes/ExtractFormatter.php @@ -151,4 +151,49 @@ return $removed; } + + /** +* Trims out broken section markers that would lead to U+FFFD in API response. +* +* @param string $text +* @return string +*/ + public static function tidySectionMarkers( $text ) { + static $regexp = false; + if ( $regexp === false ) { + // Prepare a structure for making partial regexes + $split_atoms = array_merge( + str_split(self::SECTION_MARKER_START), + ['\d'], + // A complete marker not followed by text is useless, trim it too + // (Still no guarantee for partial heading text) + str_split(self::SECTION_MARKER_END) + ); + // Look for truncated section markers at the very end + // (That's where truncation happens) + $regexp = '/\n\n' . self::makeTruncatedRegex( $split_atoms ) . "$/D"; + } + + return preg_replace( $regexp, "", $text ); + } + + /** +* Constructs a regexp fragment for matching partial substrings from a list of atoms. +* +* @param array $atoms +* @return string +*/ + private static function makeTruncatedRegex( $atoms ) { + $open = "(?:"; // open a non-capture group + $close = ")?"; // end an optional group + + // Maybe use a join() with a hardcoded "?" next time + $regexp = ''; + foreach ( $atom as $atom ) { + $regexp .= $open . $atom; + } + $regexp .= str_repeat( $close, count( $atoms ) ); + + return $regexp; + } } diff --git a/tests/phpunit/ExtractFormatterTest.php b/tests/phpunit/ExtractFormatterTest.php index 064871d..5c869bc 100644 --- a/tests/phpunit/ExtractFormatterTest.php +++ b/tests/phpunit/ExtractFormatterTest.php @@ -181,4 +181,46 @@ [ $longText, 65536, $longTextExpected ], ]; } + + /** +* @dataProvider provideTidySectionMarkers +* @param $text +* @param $expected +*/ + public function testTidySectionMarkers( $text, $expected ) { + $this->assertEquals( $expected, ExtractFormatter::tidySectionMarkers( $text ) ); + } + + public function provideTidySectionMarkers() { + $start = Extrac
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Perform a permission check on the title when changing the pa...
Gerrit Patch Uploader has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/34 ) Change subject: Perform a permission check on the title when changing the page language .. Perform a permission check on the title when changing the page language Performing this check will prevent users without the edituserjs/css to change the page language for protected user js/css subpages, similar to Special:Editcontentmodel. Bug: T160783 Change-Id: I2b106861ea0a488308cda92baf7ebf697844ffd7 --- M includes/specials/SpecialPageLanguage.php 1 file changed, 12 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/33/34/1 diff --git a/includes/specials/SpecialPageLanguage.php b/includes/specials/SpecialPageLanguage.php index db05ebe..03be214 100644 --- a/includes/specials/SpecialPageLanguage.php +++ b/includes/specials/SpecialPageLanguage.php @@ -135,6 +135,18 @@ return Status::newFatal( $ex->getMessageObject() ); } + // Check permissions and make sure the user has permission to: + $errors = wfMergeErrorArrays( + // change the page language of the page + $title->getUserPermissionsErrors( 'pagelang', $this->getUser() ) + ); + if ( $errors ) { + $out = $this->getOutput(); + $wikitext = $out->formatPermissionsErrorMessage( $errors ); + // Hack to get our wikitext parsed + return Status::newFatal( new RawMessage( '$1', [ $wikitext ] ) ); + } + // Url to redirect to after the operation $this->goToUrl = $title->getFullURL( $title->isRedirect() ? [ 'redirect' => 'no' ] : [] -- To view, visit https://gerrit.wikimedia.org/r/34 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2b106861ea0a488308cda92baf7ebf697844ffd7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader Gerrit-Reviewer: Mainframe98 ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...TextExtracts[master]: Remove broken plaintext section markers
Gerrit Patch Uploader has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/343245 ) Change subject: Remove broken plaintext section markers .. Remove broken plaintext section markers The heading tags from getExtract is useful even in plaintext output mode. These tags, scrambled to a special format by ExtractFormatter, are used by doSection(), which looks for such markers and reformat them as specified by sectionformat. When truncated, incomplete markers will become U+FFFD characters in the API output (see bug below). This patch modifies ApiQueryExtracts::tidy( $text ) to search for and eliminate broken markers at the end. Change-Id: If0bd35035e179282e126600068583094b7a9f683 --- M includes/ApiQueryExtracts.php 1 file changed, 37 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TextExtracts refs/changes/45/343245/1 diff --git a/includes/ApiQueryExtracts.php b/includes/ApiQueryExtracts.php index f80b90b..d6ba615 100644 --- a/includes/ApiQueryExtracts.php +++ b/includes/ApiQueryExtracts.php @@ -318,17 +318,52 @@ } /** -* A simple wrapper around tidy +* Cleans up the text. Wraps tidy for HTML, trims out broken section markers for plaintext * @param string $text * @return string */ private function tidy( $text ) { - if ( $this->getConfig()->get( 'UseTidy' ) && !$this->params['plaintext'] ) { + static $regexp = false; + if ( $this->params['plaintext'] ) { + if ( $regexp === false ) { + // Prepare a structure for making partial regexes + $split_atoms = array_merge( + str_split(ExtractFormatter::SECTION_MARKER_START), + array('\d'), + // A complete marker not followed by text is useless, trim it too + // (Still no guarantee for partial heading text) + str_split(ExtractFormatter::SECTION_MARKER_END) + ); + // Look for truncated section markers at the very end + // (That's where truncation happens) + $regexp = $this->makeTruncatedRegex( $split_atoms ) . '$/D'; + } + + $text = preg_replace( $regexp, "", $text ); + } elseif ( $this->getConfig()->get( 'UseTidy' ) ) { $text = trim( MWTidy::tidy( $text ) ); } return $text; } + /* Constructs a regular expression for matching partial substrings from a list of atoms. +* @param array $atoms +* @return string +*/ + private function makeTruncatedRegex( $atoms ) { + $open = "(?:"; // open a non-capture group + $close = ")?"; // end an optional group + + // Maybe use a join() with a hardcoded "?" next time + $regexp = '/'; + foreach ( array_expression as $atom ) { + $regexp .= $open . $atom; + } + $regexp .= str_repeat( $close, count( $atoms ) ) . '/'; + + return $regexp; + } + private function doSections( $text ) { $text = preg_replace_callback( "/" . ExtractFormatter::SECTION_MARKER_START . '(\d)'. ExtractFormatter::SECTION_MARKER_END . "(.*?)$/m", -- To view, visit https://gerrit.wikimedia.org/r/343245 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If0bd35035e179282e126600068583094b7a9f683 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TextExtracts Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader Gerrit-Reviewer: Artoria2e5 ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...TextExtracts[master]: Remove broken plaintext section markers
Gerrit Patch Uploader has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/343243 ) Change subject: Remove broken plaintext section markers .. Remove broken plaintext section markers The heading tags from getExtract is useful even in plaintext output mode. These tags, scrambled to a special format by ExtractFormatter, are used by doSection(), which looks for such markers and reformat them as specified by sectionformat. When truncated, incomplete markers will become U+FFFD characters in the API output (see bug below). This patch modifies ApiQueryExtracts::tidy( $text ) to search for and eliminate broken markers at the end. Change-Id: I7f88ad8179f3837a2db57abbb4352963e51544db --- M includes/ApiQueryExtracts.php 1 file changed, 37 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TextExtracts refs/changes/43/343243/1 diff --git a/includes/ApiQueryExtracts.php b/includes/ApiQueryExtracts.php index f80b90b..f0b7682 100644 --- a/includes/ApiQueryExtracts.php +++ b/includes/ApiQueryExtracts.php @@ -318,17 +318,52 @@ } /** -* A simple wrapper around tidy +* Cleans up the text. Wraps tidy for HTML, trims out broken section markers for plaintext * @param string $text * @return string */ private function tidy( $text ) { - if ( $this->getConfig()->get( 'UseTidy' ) && !$this->params['plaintext'] ) { + static $regexp = false; + if ( $this->params['plaintext'] ) { + if ( $regexp === false ) { + // Prepare a structure for making partial regexes + $split_atoms = array_merge( + str_split(ExtractFormatter::SECTION_MARKER_START), + array('\d'), + // A complete marker not followed by text is useless, trim it too + // (Still no guarantee for partial heading text) + str_split(ExtractFormatter::SECTION_MARKER_END) + ); + // Look for truncated section markers at the very end + // (That's where truncation happens) + $regexp = $this->makeTruncatedRegex( $split_atoms ) . '$/D'; + } + + $text = preg_replace( $regexp, "", $text ); + } elseif ( $this->getConfig()->get( 'UseTidy' ) ) { $text = trim( MWTidy::tidy( $text ) ); } return $text; } + /* Constructs a regular expression for matching partial substrings from a list of atoms. +* @param array $atoms +* @return string +*/ + private function makeTruncatedRegex( $atoms ) { + const OPEN = "(?:"; // open a non-capture group + const CLOSE = ")?"; // end an optional group + + // Maybe use a join() with a hardcoded "?" next time + $regexp = '/'; + foreach ( array_expression as $atom ) { + $regexp .= OPEN . $atom; + } + $regexp .= str_repeat( CLOSE, count( $atoms ) ) . '/'; + + return $regexp; + } + private function doSections( $text ) { $text = preg_replace_callback( "/" . ExtractFormatter::SECTION_MARKER_START . '(\d)'. ExtractFormatter::SECTION_MARKER_END . "(.*?)$/m", -- To view, visit https://gerrit.wikimedia.org/r/343243 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7f88ad8179f3837a2db57abbb4352963e51544db Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TextExtracts Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader Gerrit-Reviewer: Artoria2e5 Gerrit-Reviewer: Gerrit Patch Uploader ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...TextExtracts[master]: Complete plaintext section markers
Gerrit Patch Uploader has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/343216 ) Change subject: Complete plaintext section markers .. Complete plaintext section markers The heading tags from getExtract is useful even in plaintext output mode. These tags, scrambled to a special format by ExtractFormatter, are used by doSection(), which looks for such tags and reformat them into the format specified by sectionformat. When truncated incorrectly, these markers will stay in the text and get converted to U+FFFD characters, as noted in the bug below. Bug: T92628 Change-Id: Ib91fab62601087c891fba0e7fadea7d249c7f18b --- M includes/ApiQueryExtracts.php 1 file changed, 14 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TextExtracts refs/changes/16/343216/1 diff --git a/includes/ApiQueryExtracts.php b/includes/ApiQueryExtracts.php index f80b90b..ecedf27 100644 --- a/includes/ApiQueryExtracts.php +++ b/includes/ApiQueryExtracts.php @@ -318,13 +318,24 @@ } /** -* A simple wrapper around tidy +* Runs tidy for HTML, completes section markers otherwise * @param string $text * @return string */ private function tidy( $text ) { - if ( $this->getConfig()->get( 'UseTidy' ) && !$this->params['plaintext'] ) { - $text = trim( MWTidy::tidy( $text ) ); + if ( $this->getConfig()->get( 'UseTidy' ) ) { + if ( $this->params['plaintext'] ) { + // Find and complete truncated sections markers at the very end + $text = preg_replace( + // XXX: Assuming length of SECTION_MARKER_END stays at 2 + // (don't want to write nested group generation [e.g. (a(b(c)?)?)?] for now) + "/\n\n" . ExtractFormatter::SECTION_MARKER_START . '(\d)' . ExtractFormatter::SECTION_MARKER_END[0] . "?$/D", + "\n\n" . self::SECTION_MARKER_START . '$1' . self::SECTION_MARKER_END, + $text + ); + } else { + $text = trim( MWTidy::tidy( $text ) ); + } } return $text; } -- To view, visit https://gerrit.wikimedia.org/r/343216 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib91fab62601087c891fba0e7fadea7d249c7f18b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TextExtracts Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader Gerrit-Reviewer: Artoria2e5 ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] pywikibot/core[master]: fix relogin issue with admin account
Gerrit Patch Uploader has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/341699 ) Change subject: fix relogin issue with admin account .. fix relogin issue with admin account Patch for T114807, T152375 while using bot Bot and sysop account scripts keep reloging to bot account with 'Forcing re-login.' error. page.py APISite.login already handles user/sysop relogging Change-Id: Ia9364220e6c71a37a0308e57a413f4fc1c59c7df --- M pywikibot/data/api.py 1 file changed, 1 insertion(+), 16 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/99/341699/1 diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py index 4b251eb..36cced5 100644 --- a/pywikibot/data/api.py +++ b/pywikibot/data/api.py @@ -2012,22 +2012,7 @@ % type(result), data=result) -if self.action == 'query' and 'userinfo' in result.get('query', ()): -# if we get passed userinfo in the query result, we can confirm -# that we are logged in as the correct user. If this is not the -# case, force a re-login. -username = result['query']['userinfo']['name'] -if self.site.user() is not None and self.site.user() != username: -pywikibot.error( -"Logged in as '{actual}' instead of '{expected}'. " -"Forcing re-login.".format( -actual=username, -expected=self.site.user() -) -) -self.site._relogin() -continue - + self._handle_warnings(result) if "error" not in result: -- To view, visit https://gerrit.wikimedia.org/r/341699 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia9364220e6c71a37a0308e57a413f4fc1c59c7df Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader Gerrit-Reviewer: Gerrit Patch Uploader Gerrit-Reviewer: Masti ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add spacing before the mw-collapsible-toggle links
Gerrit Patch Uploader has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/338045 ) Change subject: Add spacing before the mw-collapsible-toggle links .. Add spacing before the mw-collapsible-toggle links Bug: T155347 Change-Id: I2f0fcfbb4095e8f7e8955ceda613685ea0f6bef9 --- M resources/src/jquery/jquery.makeCollapsible.js 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/45/338045/1 diff --git a/resources/src/jquery/jquery.makeCollapsible.js b/resources/src/jquery/jquery.makeCollapsible.js index eef3846..3b2deaa 100644 --- a/resources/src/jquery/jquery.makeCollapsible.js +++ b/resources/src/jquery/jquery.makeCollapsible.js @@ -278,6 +278,7 @@ .text( collapseText ) .wrap( '' ) .parent() + .css( 'margin-left', '0.3em' ) .prepend( '[' ) .append( ']' ) .on( 'click.mw-collapsible keypress.mw-collapsible', actionHandler ); -- To view, visit https://gerrit.wikimedia.org/r/338045 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2f0fcfbb4095e8f7e8955ceda613685ea0f6bef9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Fix issues related to sharing a session between multiple med...
Gerrit Patch Uploader has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/337803 ) Change subject: Fix issues related to sharing a session between multiple mediawiki instances with $wgCookieDomain .. Fix issues related to sharing a session between multiple mediawiki instances with $wgCookieDomain Change-Id: I109ec6ac8f4001f9e56dee70243168d9c4e63505 --- M includes/session/SessionBackend.php M includes/session/SessionManager.php M tests/phpunit/includes/session/SessionBackendTest.php M tests/phpunit/includes/session/TestBagOStuff.php 4 files changed, 13 insertions(+), 13 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/03/337803/1 diff --git a/includes/session/SessionBackend.php b/includes/session/SessionBackend.php index 8633715..455289f 100644 --- a/includes/session/SessionBackend.php +++ b/includes/session/SessionBackend.php @@ -132,7 +132,7 @@ $this->forceHTTPS = $info->forceHTTPS(); $this->providerMetadata = $info->getProviderMetadata(); - $blob = $store->get( wfMemcKey( 'MWSession', (string)$this->id ) ); + $blob = $store->get( wfGlobalCacheKey( 'MWSession', (string)$this->id ) ); if ( !is_array( $blob ) || !isset( $blob['metadata'] ) || !is_array( $blob['metadata'] ) || !isset( $blob['data'] ) || !is_array( $blob['data'] ) @@ -249,7 +249,7 @@ $this->autosave(); // Delete the data for the old session ID now - $this->store->delete( wfMemcKey( 'MWSession', $oldId ) ); + $this->store->delete( wfGlobalCacheKey( 'MWSession', $oldId ) ); } } @@ -317,7 +317,7 @@ // Delete the session data, so the local cache-only write in // self::save() doesn't get things out of sync with the backend. - $this->store->delete( wfMemcKey( 'MWSession', (string)$this->id ) ); + $this->store->delete( wfGlobalCacheKey( 'MWSession', (string)$this->id ) ); $this->autosave(); } @@ -729,7 +729,7 @@ $flags = $this->persist ? 0 : CachedBagOStuff::WRITE_CACHE_ONLY; $flags |= CachedBagOStuff::WRITE_SYNC; // write to all datacenters $this->store->set( - wfMemcKey( 'MWSession', (string)$this->id ), + wfGlobalCacheKey( 'MWSession', (string)$this->id ), [ 'data' => $this->data, 'metadata' => $metadata, diff --git a/includes/session/SessionManager.php b/includes/session/SessionManager.php index 0041450..5e818bf 100644 --- a/includes/session/SessionManager.php +++ b/includes/session/SessionManager.php @@ -214,7 +214,7 @@ } // Test if the session is in storage, and if so try to load it. - $key = wfMemcKey( 'MWSession', $id ); + $key = wfGlobalCacheKey( 'MWSession', $id ); if ( is_array( $this->store->get( $key ) ) ) { $create = false; // If loading fails, don't bother creating because it probably will fail too. if ( $this->loadSessionInfoFromStore( $info, $request ) ) { @@ -255,7 +255,7 @@ throw new \InvalidArgumentException( 'Invalid session ID' ); } - $key = wfMemcKey( 'MWSession', $id ); + $key = wfGlobalCacheKey( 'MWSession', $id ); if ( is_array( $this->store->get( $key ) ) ) { throw new \InvalidArgumentException( 'Session ID already exists' ); } @@ -545,7 +545,7 @@ * @return bool Whether the session info matches the stored data (if any) */ private function loadSessionInfoFromStore( SessionInfo &$info, WebRequest $request ) { - $key = wfMemcKey( 'MWSession', $info->getId() ); + $key = wfGlobalCacheKey( 'MWSession', $info->getId() ); $blob = $this->store->get( $key ); // If we got data from the store and the SessionInfo says to force use, @@ -933,7 +933,7 @@ public function generateSessionId() { do { $id = \Wikimedia\base_convert( \MWCryptRand::generateHex( 40 ), 16, 32, 32 ); - $key = wfMemcKey( 'MWSession', $id ); + $key = wfGlobalCacheKey( 'MWSession', $id ); } while ( isset( $this->allSessionIds[$id] ) || is_array( $this->store->get( $key ) ) ); return $id; } diff --git a/tests/phpunit/includes/session/SessionBackendTe
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add release note for Iae5edf99
Gerrit Patch Uploader has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/337229 ) Change subject: Add release note for Iae5edf99 .. Add release note for Iae5edf99 mediawiki.Uri: Don't ignore options param when using default uri Bug: T157035 Change-Id: I291bc7b2b7c8c672faf904e0b83490bfd7b7e25e --- M RELEASE-NOTES-1.29 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/29/337229/1 diff --git a/RELEASE-NOTES-1.29 b/RELEASE-NOTES-1.29 index ebd967e..146bef3 100644 --- a/RELEASE-NOTES-1.29 +++ b/RELEASE-NOTES-1.29 @@ -69,6 +69,7 @@ to the page content language, not wiki content language. * (T27187) Search suggestions based on jquery.suggestions will now correctly only highlight prefix matches in the results. +* (T157035) mediawiki.Uri: Don't ignore options param when using default uri === Action API changes in 1.29 === * Submitting sensitive authentication request parameters to action=clientlogin, -- To view, visit https://gerrit.wikimedia.org/r/337229 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I291bc7b2b7c8c672faf904e0b83490bfd7b7e25e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader Gerrit-Reviewer: Gerrit Patch Uploader ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Fix ignored options when using "new mw.Uri()" with first arg...
Gerrit Patch Uploader has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/336443 ) Change subject: Fix ignored options when using "new mw.Uri()" with first argument empty .. Fix ignored options when using "new mw.Uri()" with first argument empty Phabricator: T157035 Change-Id: Iae5edf996e4cd6d1dfbbffd6a915ee55d28409d3 --- M resources/src/mediawiki/mediawiki.Uri.js 1 file changed, 7 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/43/336443/1 diff --git a/resources/src/mediawiki/mediawiki.Uri.js b/resources/src/mediawiki/mediawiki.Uri.js index 0c47dbe..15d0172 100644 --- a/resources/src/mediawiki/mediawiki.Uri.js +++ b/resources/src/mediawiki/mediawiki.Uri.js @@ -179,7 +179,8 @@ * override each other (`true`) or automagically convert them to an array (`false`). */ function Uri( uri, options ) { - var prop, + var prop, hrefCur, + hasOptions = ( options !== undefined ) defaultUri = getDefaultUri(); options = typeof options === 'object' ? options : { strictMode: !!options }; @@ -208,8 +209,12 @@ this.query = {}; } } + } else if ( hasOptions ) { + // We didn't get a URI in the constructor, but we got options. + hrefCur = typeof documentLocation === 'string' ? documentLocation : documentLocation(); + this.parse( hrefCur, options ); } else { - // If we didn't get a URI in the constructor, use the default one. + // We didn't get a URI or options in the constructor, use the default instance. return defaultUri.clone(); } -- To view, visit https://gerrit.wikimedia.org/r/336443 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iae5edf996e4cd6d1dfbbffd6a915ee55d28409d3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader Gerrit-Reviewer: Gerrit Patch Uploader ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Amend name for Goan Konkani
Gerrit Patch Uploader has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/335036 ) Change subject: Amend name for Goan Konkani .. Amend name for Goan Konkani Bug: T126148 Change-Id: I29a9b115a0c5dd04b03e3f70a8e05dcb31f88499 --- M app/src/main/res/values/languages_list.xml 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/36/335036/1 diff --git a/app/src/main/res/values/languages_list.xml b/app/src/main/res/values/languages_list.xml index e75d1bd..a129e56 100644 --- a/app/src/main/res/values/languages_list.xml +++ b/app/src/main/res/values/languages_list.xml @@ -505,7 +505,7 @@ Mirandés Lingala Gagauz -गोवा कोंकणी +गोंयची कोंकणी chiShona Arpitan Pangasinan @@ -804,7 +804,7 @@ Mirandese Lingala Gagauz -Gova Konknni +Gõychi Konknni Shona Franco-Provençal/Arpitan Pangasinan -- To view, visit https://gerrit.wikimedia.org/r/335036 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I29a9b115a0c5dd04b03e3f70a8e05dcb31f88499 Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader Gerrit-Reviewer: The Discoverer ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Amend name for Goan Konkani
Gerrit Patch Uploader has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/335032 ) Change subject: Amend name for Goan Konkani .. Amend name for Goan Konkani All the names in the list are the English names for the languages, hence putting the English name for gom Bug: T126148 Change-Id: I91b7897a320d40867f944915b482566308a13b3d --- M static/languages_list.json 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/mobileapps refs/changes/32/335032/1 diff --git a/static/languages_list.json b/static/languages_list.json index 7e8a6f8..0a8019a 100644 --- a/static/languages_list.json +++ b/static/languages_list.json @@ -290,6 +290,6 @@ "Esperanto": "eo", "Kirundi": "rn", "Ossetian": "os", - "Gova Konknni": "gom", + "Goan Konkani": "gom", "Chinese": "zh" } -- To view, visit https://gerrit.wikimedia.org/r/335032 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I91b7897a320d40867f944915b482566308a13b3d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/mobileapps Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader Gerrit-Reviewer: The Discoverer ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] analytics/wikipagestats[master]: Amend name for Goan Konkani
Gerrit Patch Uploader has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/335030 ) Change subject: Amend name for Goan Konkani .. Amend name for Goan Konkani Bug: T126148 Change-Id: I59f635a34df73b9f4ffd975b07e6d534ee8832eb --- M assets/projects.json 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/wikipagestats refs/changes/30/335030/1 diff --git a/assets/projects.json b/assets/projects.json index 429bb83..7bd7a8f 100644 --- a/assets/projects.json +++ b/assets/projects.json @@ -840,7 +840,7 @@ "wiki": "av" }, { "name": "Goan Konkani", - "local": "गोवा कोंकणी / Gova Konknni", + "local": "गोंयची कोंकणी / Gõychi Konknni", "wiki": "gom" }, { "name": "Lingala", -- To view, visit https://gerrit.wikimedia.org/r/335030 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I59f635a34df73b9f4ffd975b07e6d534ee8832eb Gerrit-PatchSet: 1 Gerrit-Project: analytics/wikipagestats Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader Gerrit-Reviewer: The Discoverer ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Widgets[master]: Amend name for Goan Konkani
Gerrit Patch Uploader has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/335028 ) Change subject: Amend name for Goan Konkani .. Amend name for Goan Konkani Bug: T126148 Change-Id: I47e39b38c9ea9cecafb7ab483b0ae7b239fef51a --- M Widgets.i18n.magic.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Widgets refs/changes/28/335028/1 diff --git a/Widgets.i18n.magic.php b/Widgets.i18n.magic.php index a146991..0fb1129 100644 --- a/Widgets.i18n.magic.php +++ b/Widgets.i18n.magic.php @@ -65,7 +65,7 @@ 'widget' => array( 0, 'widget' ), ); -/** Goan Konkani (Devanagari script) (गोवा कोंकणी) */ +/** Goan Konkani (Devanagari script) (गोंयची कोंकणी) */ $magicWords['gom-deva'] = array( 'widget' => array( 0, 'विसाधन' ), ); -- To view, visit https://gerrit.wikimedia.org/r/335028 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I47e39b38c9ea9cecafb7ab483b0ae7b239fef51a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Widgets Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader Gerrit-Reviewer: The Discoverer ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] translatewiki[master]: [TimedMediaHandler] Re-register module TimedText Attempt to ...
Gerrit Patch Uploader has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/334504 ) Change subject: [TimedMediaHandler] Re-register module TimedText Attempt to re-register TimedText as it was done in rGTWNe4f8e180cbd1 with EmbedPlayer. See: https://translatewiki.net/wiki/Thread:Support/TimedMediaHandler_-_missing_groups Change-Id: I31e55ffe872ed91f4c844 .. [TimedMediaHandler] Re-register module TimedText Attempt to re-register TimedText as it was done in rGTWNe4f8e180cbd1 with EmbedPlayer. See: https://translatewiki.net/wiki/Thread:Support/TimedMediaHandler_-_missing_groups Change-Id: I31e55ffe872ed91f4c8445b4271818e3af5253a7 --- M groups/MediaWiki/mediawiki-extensions.txt 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/04/334504/1 diff --git a/groups/MediaWiki/mediawiki-extensions.txt b/groups/MediaWiki/mediawiki-extensions.txt index f847936..12913c9 100644 --- a/groups/MediaWiki/mediawiki-extensions.txt +++ b/groups/MediaWiki/mediawiki-extensions.txt @@ -2414,6 +2414,9 @@ Timed Media Handler - Embed Player file = TimedMediaHandler/MwEmbedModules/EmbedPlayer/i18n/%CODE%.json +Timed Media Handler - Timed Text +file = TimedMediaHandler/MwEmbedModules/TimedText/i18n/%CODE%.json + Timeline file = timeline/i18n/%CODE%.json -- To view, visit https://gerrit.wikimedia.org/r/334504 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I31e55ffe872ed91f4c8445b4271818e3af5253a7 Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Add French template in category.py
Gerrit Patch Uploader has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/333076 ) Change subject: Add French template in category.py .. Add French template in category.py +uniform lower case Change-Id: I86868a4822bc556aa7dbacb7c3a1ac87dd8eb2c9 --- M scripts/category.py 1 file changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/76/333076/1 diff --git a/scripts/category.py b/scripts/category.py index 698ae75..0becf81 100755 --- a/scripts/category.py +++ b/scripts/category.py @@ -151,11 +151,12 @@ 'en': [u'cfd', u'cfr', u'cfru', u'cfr-speedy', u'cfm', u'cfdu'], 'fi': [u'roskaa', u'poistettava', u'korjattava/nimi', u'yhdistettäväLuokka'], +'fr': u'renommage de catégorie demandé', 'he': [u'הצבעת מחיקה', u'למחוק'], 'nl': [u'categorieweg', u'catweg', u'wegcat', u'weg2'], -'cs': ['Přejmenovat kategorii', 'Přesunout kategorii', 'Přejmenování kategorie'], +'cs': ['přejmenovat kategorii', 'přesunout kategorii', 'přejmenování kategorie'], # For testing purposes -'test': [u'delete'] +'test': u'delete' }, 'commons': { 'commons': [u'cfd', u'move'] -- To view, visit https://gerrit.wikimedia.org/r/333076 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I86868a4822bc556aa7dbacb7c3a1ac87dd8eb2c9 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader Gerrit-Reviewer: Framawiki ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] pywikibot/core[master]: [bugfix] Menage temporary readonly error
Gerrit Patch Uploader has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/333033 ) Change subject: [bugfix] Menage temporary readonly error .. [bugfix] Menage temporary readonly error It's look like the API error named internal_api_error_ReadOnlyError was renamed to readonly. So, code.startswith(u'internal_api_error_') is not enabled. I've edited the code to accept readonly as an error that need edit retry. Need investigation to verify if internal_api_error_ReadOnlyError is still enabled, and if others error codes are impacted. Bug: T154011 Change-Id: I9cc80c77532db3d9b71db5c33f91b8a699f41d6c --- M pywikibot/data/api.py 1 file changed, 8 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/33/333033/1 diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py index 4b251eb..decfbfe 100644 --- a/pywikibot/data/api.py +++ b/pywikibot/data/api.py @@ -2089,15 +2089,20 @@ pywikibot.warning('API error %s: %s' % (code, info)) -if code.startswith(u'internal_api_error_'): -class_name = code[len(u'internal_api_error_'):] +if code.startswith(u'internal_api_error_') or code == 'readonly': +if code == 'readonly': # T154011 +class_name = code +else: +class_name = code[len(u'internal_api_error_'):] del error['code'] # is added via class_name e = APIMWException(class_name, **error) +# If the error key is in this table, it is probably a temporary problem, so whe will retry the edit retry = class_name in ['DBConnectionError', # T64974 'DBQueryError', # T60158 - 'ReadOnlyError' # T61227 + 'ReadOnlyError', # T61227 #TODO: seems replaced by 'readonly' # T154011 + 'readonly' # T154011 ] pywikibot.error("Detected MediaWiki API exception %s%s" -- To view, visit https://gerrit.wikimedia.org/r/333033 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9cc80c77532db3d9b71db5c33f91b8a699f41d6c Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader Gerrit-Reviewer: Framawiki ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Fixing: Grammar and spelling in comments
Gerrit Patch Uploader has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/332922 ) Change subject: Fixing: Grammar and spelling in comments .. Fixing: Grammar and spelling in comments Change-Id: Iac80f6668be17c0e35908fc8fdacbae0201f2d7f --- M includes/db/DatabaseMssql.php 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/22/332922/1 diff --git a/includes/db/DatabaseMssql.php b/includes/db/DatabaseMssql.php index 7c4bb3b..6971037 100644 --- a/includes/db/DatabaseMssql.php +++ b/includes/db/DatabaseMssql.php @@ -156,7 +156,7 @@ // LIMIT clause and pass $sql through $this->LimitToTopN() which parses // the limit clause and passes the result to $this->limitResult(); if ( preg_match( '/\bLIMIT\s*/i', $sql ) ) { - // massage LIMIT -> TopN + // message LIMIT -> TopN $sql = $this->LimitToTopN( $sql ); } @@ -187,7 +187,7 @@ $success = (bool)$stmt; } - // make a copy so that anything we add below does not get reflected in future queries + // make a copy to prevent anything we add below does not get reflected in future queries $ignoreErrors = $this->mIgnoreErrors; if ( $this->mIgnoreDupKeyErrors ) { @@ -520,7 +520,7 @@ public function indexInfo( $table, $index, $fname = __METHOD__ ) { # This does not return the same info as MYSQL would, but that's OK # because MediaWiki never uses the returned value except to check for - # the existance of indexes. + # the existence of indexes. $sql = "sp_helpindex '" . $this->tableName( $table ) . "'"; $res = $this->query( $sql, $fname ); @@ -609,7 +609,7 @@ foreach ( $arrToInsert as $a ) { // start out with empty identity column, this is so we can return - // it as a result of the insert logic + // it as a result of the INSERT logic $sqlPre = ''; $sqlPost = ''; $identityClause = ''; -- To view, visit https://gerrit.wikimedia.org/r/332922 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iac80f6668be17c0e35908fc8fdacbae0201f2d7f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader Gerrit-Reviewer: Zppix ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] translatewiki[master]: Restore Commons Android app for translation on translatewiki...
Gerrit Patch Uploader has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/325895 ) Change subject: Restore Commons Android app for translation on translatewiki.net .. Restore Commons Android app for translation on translatewiki.net The app is now community maintained at: https://github.com/commons-app/apps-android-commons This is the follow-up to the removal in 2014: https://gerrit.wikimedia.org/r/#/c/160831/9 Change-Id: I7809337557064f6ef6f2c27ba720ac922e690a8d Change-Id: I23a3e351e60d0c7016b7c425576a2a58ecfe6b1c --- M TranslateSettings.php M bin/EXTERNAL-PROJECTS M bin/REPONG-PROJECTS A groups/Wikimedia/CommonsAndroid.yaml M repoconfig.commit.json M repoconfig.json 6 files changed, 85 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/95/325895/1 diff --git a/TranslateSettings.php b/TranslateSettings.php index 7707e4b..8f2156c 100644 --- a/TranslateSettings.php +++ b/TranslateSettings.php @@ -237,6 +237,7 @@ wfAddNamespace( 1206, 'Wikimedia' ); $wgTranslateGroupFiles[] = "$GROUPS/wikidata/wikidata.yaml"; $wgTranslateGroupFiles[] = "$GROUPS/Wikimedia/CitationHunt.yaml"; +$wgTranslateGroupFiles[] = "$GROUPS/Wikimedia/CommonsAndroid.yaml"; $wgTranslateGroupFiles[] = "$GROUPS/Wikimedia/CopyPatrol.yaml"; $wgTranslateGroupFiles[] = "$GROUPS/Wikimedia/crosswatch.yaml"; $wgTranslateGroupFiles[] = "$GROUPS/Wikimedia/GapFinder.yaml"; diff --git a/bin/EXTERNAL-PROJECTS b/bin/EXTERNAL-PROJECTS index b05678a..b2b58da 100644 --- a/bin/EXTERNAL-PROJECTS +++ b/bin/EXTERNAL-PROJECTS @@ -1,6 +1,7 @@ blockly citationhunt codev +commons-android copypatrol crosswatch entryscape diff --git a/bin/REPONG-PROJECTS b/bin/REPONG-PROJECTS index 94f779b..a59687e 100644 --- a/bin/REPONG-PROJECTS +++ b/bin/REPONG-PROJECTS @@ -1,6 +1,7 @@ blockly citationhunt codev +commons-android copypatrol crosswatch int-dcatap diff --git a/groups/Wikimedia/CommonsAndroid.yaml b/groups/Wikimedia/CommonsAndroid.yaml new file mode 100644 index 000..6aba106 --- /dev/null +++ b/groups/Wikimedia/CommonsAndroid.yaml @@ -0,0 +1,64 @@ +TEMPLATE: + BASIC: +description: "{{int:translate-group-desc-wikimedia-mobile-commons}}" +icon: wiki://Commons-icon.svg +namespace: NS_WIKIMEDIA +class: FileBasedMessageGroup + + FILES: +class: AndroidXmlFFS +codeMap: + be-tarask: b+be+tarask + he: iw + id: in + kk-cyrl: b+kk+Cyrl + ku-latn: ku + pt-br: pt-rBR + qqq: qq + sr-ec: sr + tg-cyrl: b+tg+Cyrl + yi: ji + zh-hans: zh + zh-hant: zh-rTW + + MANGLER: +class: StringMatcher +patterns: + - "*" +--- +BASIC: + id: out-wikimedia-commons-android-0-all + label: Commons Android App + meta: yes + class: AggregateMessageGroup + +GROUPS: + - out-wikimedia-mobile-commons-* + +--- +BASIC: + id: out-wikimedia-commons-android-strings + label: Commons Android App (main) + +MANGLER: + prefix: commons-android-strings- + +FILES: + sourcePattern: "%GROUPROOT%/commons-android/app/src/main/res/values-%CODE%/strings.xml" + definitionFile: "%GROUPROOT%/commons-android/app/src/main/res/values/strings.xml" + +TAGS: + optional: +- commons-android-strings-hello_world + +--- +BASIC: + id: out-wikimedia-commons-android-errors + label: Commons Android App (errors) + +MANGLER: + prefix: commons-android-error- + +FILES: + sourcePattern: "%GROUPROOT%/commons-android/app/src/main/res/values-%CODE%/error.xml" + definitionFile: "%GROUPROOT%/commons-android/app/src/main/res/values/error.xml" diff --git a/repoconfig.commit.json b/repoconfig.commit.json index 8563a79..5dcbbe3 100644 --- a/repoconfig.commit.json +++ b/repoconfig.commit.json @@ -33,6 +33,15 @@ } } }, + "commons-android": { + "group": "commons-android", + "repos": { + "commons-android": { + "type": "git", + "url": "g...@github.com:commons-app/apps-android-commons.git" + } + } + }, "copypatrol": { "group": "copypatrol", "repos": { diff --git a/repoconfig.json b/repoconfig.json index 597685c..c539904 100644 --- a/repoconfig.json +++ b/repoconfig.json @@ -33,6 +33,15 @@ } } }, + "commons-android": { + "group": "commons-android", + "repos": { + "codev": { + "type": "git", + "url": "https://github.com/commons-app/apps-android-commons.git"; + } + } + }, "copypatrol": { "group": "copypatrol", "repos": { -- To view, visit https://gerrit.wikimedia.org/r/325895 To unsubscribe, visi
[MediaWiki-commits] [Gerrit] mediawiki...Translate[master]: Remove redundant RubyYamlFFS class and test
Gerrit Patch Uploader has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/325893 ) Change subject: Remove redundant RubyYamlFFS class and test .. Remove redundant RubyYamlFFS class and test Change-Id: Ied49f8e6591159b7c16aceadc043cb345be38cca --- M Autoload.php D ffs/RubyYamlFFS.php D tests/phpunit/ffs/RubyYamlFFSTest.php 3 files changed, 0 insertions(+), 406 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/93/325893/1 diff --git a/Autoload.php b/Autoload.php index fc83c98..11b6106 100644 --- a/Autoload.php +++ b/Autoload.php @@ -191,7 +191,6 @@ $al['JavaScriptFFS'] = "$dir/ffs/JavaScriptFFS.php"; $al['JsonFFS'] = "$dir/ffs/JsonFFS.php"; $al['MediaWikiExtensionFFS'] = "$dir/ffs/MediaWikiExtensionFFS.php"; -$al['RubyYamlFFS'] = "$dir/ffs/RubyYamlFFS.php"; $al['ShapadoJsFFS'] = "$dir/ffs/JavaScriptFFS.php"; $al['SimpleFFS'] = "$dir/ffs/SimpleFFS.php"; $al['XliffFFS'] = "$dir/ffs/XliffFFS.php"; diff --git a/ffs/RubyYamlFFS.php b/ffs/RubyYamlFFS.php deleted file mode 100644 index 92d65c6..000 --- a/ffs/RubyYamlFFS.php +++ /dev/null @@ -1,280 +0,0 @@ - 1, - 'one' => 1, - 'many' => 1, - 'few' => 1, - 'other' => 1, - 'two' => 1 - ); - - public function getFileExtensions() { - return array( '.yml', '.yaml' ); - } - - protected function getFlattener() { - return $this; - } - - /** -* Flattens multidimensional array by using the path to the value as key -* with each individual key separated by a dot. -* -* @param $messages array -* -* @return array -*/ - protected function flatten( $messages ) { - $flat = true; - - foreach ( $messages as $v ) { - if ( !is_array( $v ) ) { - continue; - } - - $flat = false; - break; - } - - if ( $flat ) { - return $messages; - } - - $array = array(); - foreach ( $messages as $key => $value ) { - if ( !is_array( $value ) ) { - $array[$key] = $value; - } else { - $plural = $this->flattenPlural( $value ); - if ( $plural ) { - $array[$key] = $plural; - } else { - $newArray = array(); - foreach ( $value as $newKey => $newValue ) { - $newArray["$key.$newKey"] = $newValue; - } - $array += $this->flatten( $newArray ); - } - } - - /** -* Can as well keep only one copy around. -*/ - unset( $messages[$key] ); - } - - return $array; - } - - /** -* Performs the reverse operation of flatten. Each dot in the key starts a -* new subarray in the final array. -* -* @param $messages array -* -* @return array -*/ - protected function unflatten( $messages ) { - $array = array(); - foreach ( $messages as $key => $value ) { - $plurals = $this->unflattenPlural( $key, $value ); - - if ( $plurals === false ) { - continue; - } - - foreach ( $plurals as $keyPlural => $valuePlural ) { - $path = explode( '.', $keyPlural ); - if ( count( $path ) === 1 ) { - $array[$keyPlural] = $valuePlural; - continue; - } - - $pointer = &$array; - do { - /** -* Extract the level and make sure it exists. -*/ - $level = array_shift( $path ); - if ( !isset( $pointer[$level] ) ) { - $pointer[$level] = array(); - } - - /** -* Update the pointer to the new reference. -
[MediaWiki-commits] [Gerrit] operations/puppet[production]: puppet_compiler: include puppet-enc
Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/325053 Change subject: puppet_compiler: include puppet-enc .. puppet_compiler: include puppet-enc The Labs classifier was switched from ldap to puppet-enc, and puppet-enc therefore needs to be included in puppet_compiler as well. Change-Id: I719791a50ee41e5eeb999763d055ec92784d0020 --- M modules/puppet_compiler/manifests/packages.pp 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/53/325053/1 diff --git a/modules/puppet_compiler/manifests/packages.pp b/modules/puppet_compiler/manifests/packages.pp index 75f2b23..1fd740a 100644 --- a/modules/puppet_compiler/manifests/packages.pp +++ b/modules/puppet_compiler/manifests/packages.pp @@ -2,6 +2,7 @@ # # Installs all the needed packages class puppet_compiler::packages { +include puppet::enc require_package('python-yaml', 'python-requests', 'python-jinja2', 'nginx', 'ruby-httpclient', 'ruby-ldap') -- To view, visit https://gerrit.wikimedia.org/r/325053 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I719791a50ee41e5eeb999763d055ec92784d0020 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Gerrit Patch Uploader Gerrit-Reviewer: Merlijn van Deen ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations...puppet-compiler[master]: Fix up puppet-compiler for labs usage
Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/325042 Change subject: Fix up puppet-compiler for labs usage .. Fix up puppet-compiler for labs usage - switch from ldap to puppet-enc (needs to be provisioned seperately, TBD) - add missing self.realm parameter to ManageCode instantiation Change-Id: I62a4cd2b61673f34548c01d4e1010a5b1f7700a0 --- M puppet_compiler/controller.py M puppet_compiler/prepare.py 2 files changed, 5 insertions(+), 13 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/software/puppet-compiler refs/changes/42/325042/1 diff --git a/puppet_compiler/controller.py b/puppet_compiler/controller.py index ef3132d..fe5fe77 100644 --- a/puppet_compiler/controller.py +++ b/puppet_compiler/controller.py @@ -50,7 +50,7 @@ self.count = 0 self.pick_hosts(host_list) -self.m = prepare.ManageCode(self.config, job_id, change_id) +self.m = prepare.ManageCode(self.config, job_id, change_id, self.realm) self.outdir = os.path.join(self.config['base'], 'output', str(job_id)) # State of all nodes self.state = {'noop': set(), 'diff': set(), diff --git a/puppet_compiler/prepare.py b/puppet_compiler/prepare.py index b3b9de9..26d47e1 100644 --- a/puppet_compiler/prepare.py +++ b/puppet_compiler/prepare.py @@ -131,21 +131,13 @@ template = """# This file has been generated by puppet-compiler. [master] -node_terminus = ldap -ldapbase = ou=hosts,dc=wikimedia,dc=org -ldapstring = (&(objectclass=puppetClient)(associatedDomain=%s)) -ldaptls = true -ldappassword = {password} -ldapuser = {user} -ldapserver = {servers[0]} +node_terminus = exec +external_nodes = /usr/local/bin/puppet-enc """ -with open(LDAP_YAML_PATH) as f: -config = yaml.safe_load(f) - with open('puppet.conf', 'w') as f: -f.write(template.format(**config)) -_log.debug('Wrote puppet.conf with ldap settings') +f.write(template) +_log.debug('Wrote puppet.conf with puppet-enc settings') def _fetch_change(self): """get changes from the change directly""" -- To view, visit https://gerrit.wikimedia.org/r/325042 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I62a4cd2b61673f34548c01d4e1010a5b1f7700a0 Gerrit-PatchSet: 1 Gerrit-Project: operations/software/puppet-compiler Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader Gerrit-Reviewer: Merlijn van Deen ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] pywikibot/core[master]: T150521: Don't crash on queries with optional values
Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/322648 Change subject: T150521: Don't crash on queries with optional values .. T150521: Don't crash on queries with optional values The current implementation assumes variables are always set. When using sparql OPTIONAL sometimes values are not set. In that case, set it to None Change-Id: I4af22d4faf42ca1e20581c9dd094237cf3467f71 --- M pywikibot/data/sparql.py 1 file changed, 9 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/48/322648/1 diff --git a/pywikibot/data/sparql.py b/pywikibot/data/sparql.py index 70c6563..5a47851 100644 --- a/pywikibot/data/sparql.py +++ b/pywikibot/data/sparql.py @@ -65,13 +65,16 @@ for row in data['results']['bindings']: values = {} for var in qvars: -if full_data: -if row[var]['type'] not in VALUE_TYPES: -raise ValueError('Unknown type: %s' % row[var]['type']) -valtype = VALUE_TYPES[row[var]['type']] -values[var] = valtype(row[var], entity_url=self.entity_url) +if row.get(var): +if full_data: +if row[var]['type'] not in VALUE_TYPES: +raise ValueError('Unknown type: %s' % row[var]['type']) +valtype = VALUE_TYPES[row[var]['type']] +values[var] = valtype(row[var], entity_url=self.entity_url) +else: +values[var] = row[var]['value'] else: -values[var] = row[var]['value'] +values[var] = None result.append(values) return result else: -- To view, visit https://gerrit.wikimedia.org/r/322648 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4af22d4faf42ca1e20581c9dd094237cf3467f71 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader Gerrit-Reviewer: Multichill ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...jouncebot[master]: Adding nick change functionality automatically
Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/322037 Change subject: Adding nick change functionality automatically .. Adding nick change functionality automatically Bug:T150916 Change-Id: I826b8e1b6d981e1a79d08be77d5461a7ea986bb0 --- M jouncebot.py 1 file changed, 6 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/bots/jouncebot refs/changes/37/322037/1 diff --git a/jouncebot.py b/jouncebot.py index 77761f7..fa59b11 100755 --- a/jouncebot.py +++ b/jouncebot.py @@ -67,11 +67,15 @@ "Requested nickname %s already in use, appending _" % conn.get_nickname()) conn.nick(conn.get_nickname() + "_") - + conn.execute_delayed(30, self.do_reclaim_nick) +def do_reclaim_nick(self): +nick = self.connection.get_nickname() +if nick != self.config['irc']['nick']: +self.connection.nick(self.config['irc']['nick']) + self.logger.info("Nickname changed to default.") def on_welcome(self, conn, event): self.logger.info("Connected to server") self.do_identify() - self.logger.info( "Getting information about the wiki and starting event handler") self.deploy_page.start(self.on_deployment_event) -- To view, visit https://gerrit.wikimedia.org/r/322037 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I826b8e1b6d981e1a79d08be77d5461a7ea986bb0 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/bots/jouncebot Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader Gerrit-Reviewer: Zppix ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Special:block: toggle hideuser checkbox based on expiry time
Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/318690 Change subject: Special:block: toggle hideuser checkbox based on expiry time .. Special:block: toggle hideuser checkbox based on expiry time This checkbox should be hidden for fixed time periods. This feature is only available when it's a indefinite block Bug: T133036 Change-Id: I5222cd8c1f3ed778ea38a423a87719545ea4238d --- M resources/src/mediawiki.special/mediawiki.special.block.js 1 file changed, 13 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/90/318690/1 diff --git a/resources/src/mediawiki.special/mediawiki.special.block.js b/resources/src/mediawiki.special/mediawiki.special.block.js index aca335e..0853317 100644 --- a/resources/src/mediawiki.special/mediawiki.special.block.js +++ b/resources/src/mediawiki.special/mediawiki.special.block.js @@ -7,19 +7,27 @@ $anonOnlyRow = $( '#mw-input-wpHardBlock' ).closest( 'tr' ), $enableAutoblockRow = $( '#mw-input-wpAutoBlock' ).closest( 'tr' ), $hideUser = $( '#mw-input-wpHideUser' ).closest( 'tr' ), - $watchUser = $( '#mw-input-wpWatch' ).closest( 'tr' ); + $watchUser = $( '#mw-input-wpWatch' ).closest( 'tr' ), + $expiry = $( '#mw-input-wpExpiry' ); function updateBlockOptions( instant ) { var blocktarget = $.trim( $blockTarget.val() ), isEmpty = blocktarget === '', isIp = mw.util.isIPAddress( blocktarget, true ), - isIpRange = isIp && blocktarget.match( /\/\d+$/ ); + isIpRange = isIp && blocktarget.match( /\/\d+$/ ), + expiryValue = $expiry.val(), + isCustomExpiry = expiryValue === 'other', + isIndefinite = expiryValue === 'infinite', + isNonEmptyIp = isIp && !isEmpty; - if ( isIp && !isEmpty ) { + if ( isNonEmptyIp ) { $enableAutoblockRow.goOut( instant ); - $hideUser.goOut( instant ); } else { $enableAutoblockRow.goIn( instant ); + } + if ( isNonEmptyIp || !( isIndefinite || isCustomExpiry ) ) { + $hideUser.goOut( instant ); + } else { $hideUser.goIn( instant ); } if ( !isIp && !isEmpty ) { @@ -37,6 +45,7 @@ if ( $blockTarget.length ) { // Bind functions so they're checked whenever stuff changes $blockTarget.keyup( updateBlockOptions ); + $expiry.change( updateBlockOptions ); // Call them now to set initial state (ie. Special:Block/Foobar?wpBlockExpiry=2+hours) updateBlockOptions( /* instant= */ true ); -- To view, visit https://gerrit.wikimedia.org/r/318690 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5222cd8c1f3ed778ea38a423a87719545ea4238d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader Gerrit-Reviewer: Gerrit Patch Uploader Gerrit-Reviewer: Margott ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] pywikibot/compat[master]: Match 'score' in textlib
Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/308606 Change subject: Match 'score' in textlib .. Match 'score' in textlib Change-Id: Ic69777f3db3c235380eabd778a5052403b0f8ce6 --- M pywikibot/textlib.py 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/compat refs/changes/06/308606/1 diff --git a/pywikibot/textlib.py b/pywikibot/textlib.py index 41c61ab..2631a53 100644 --- a/pywikibot/textlib.py +++ b/pywikibot/textlib.py @@ -7,7 +7,7 @@ """ # -# (C) Pywikibot team, 2004-2013 +# (C) Pywikibot team, 2004-2016 # # Distributed under the terms of the MIT license. # @@ -69,6 +69,7 @@ # preformatted text 'pre': re.compile(r'(?ism).*?'), 'source': re.compile(r'(?is)'), +'score':re.compile(r'(?is)'), # inline references 'ref': re.compile(r'(?ism)].*?'), # lines that start with a space are shown in a monospace font and -- To view, visit https://gerrit.wikimedia.org/r/308606 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic69777f3db3c235380eabd778a5052403b0f8ce6 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/compat Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader Gerrit-Reviewer: Bináris Gerrit-Reviewer: Gerrit Patch Uploader ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] pywikibot/compat[master]: Update ar namespace aliases
Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/307061 Change subject: Update ar namespace aliases .. Update ar namespace aliases Change-Id: I23adc866c6bbc676414846ab5dceb8523768050f --- M families/wikipedia_family.py 1 file changed, 6 insertions(+), 11 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/compat refs/changes/61/307061/1 diff --git a/families/wikipedia_family.py b/families/wikipedia_family.py index e4f06d3..5e877a9 100644 --- a/families/wikipedia_family.py +++ b/families/wikipedia_family.py @@ -973,7 +973,6 @@ self.namespaces[104] = { 'als': u'Wort', -'ar': u'ملحق', 'bar': u'Woat', 'es': u'Anexo', 'fi': u'Kirja', @@ -987,7 +986,6 @@ self.namespaces[105] = { 'als': u'Wort Diskussion', -'ar': u'نقاش الملحق', 'bar': u'Woat Dischkrian', 'es': u'Anexo Discusión', 'fi': u'Keskustelu kirjasta', @@ -1119,21 +1117,26 @@ self.namespaces[2300] = { 'hu': u'Gadget', +'ar': u'إضافة', } self.namespaces[2301] = { 'hu': u'Gadget talk', +'ar': u'نقاش الإضافة', } self.namespaces[2302] = { 'hu': u'Gadget definition', +'ar': u'تعريف الإضافة', } self.namespaces[2303] = { 'hu': u'Gadget definition talk', +'ar': u'نقاش تعريف الإضافة', } self.namespaces[2600] = { +'ar': u'موضوع', 'ca': u'Topic', 'en': u'Topic', 'fr': u'Sujet', @@ -1262,7 +1265,7 @@ 'als': u'Begriffsklärung', 'ang': u'Scīrung', 'ast': u'Dixebra', -'ar': u'صفحات توضيح', +'ar': u'توضيح', 'be': u'Disambig', 'be-x-old': u'Вікіпэдыя:Неадназначнасьці', 'bg': u'Пояснителни страници', @@ -1586,11 +1589,6 @@ 'pt': [0, 102], 'hr': [0, 102], }, -'ar': { -'_default': [0, 100], -'hr': [0, 102], -'pt': [0, 102], -}, 'es': { '_default': [0], 'pt': [0, 102], @@ -1612,9 +1610,6 @@ '_default': [1], 'pt': [0, 103], 'hr': [0, 103], -}, -'ar': { -'_default': [1, 101], }, 'es': { '_default': [1], -- To view, visit https://gerrit.wikimedia.org/r/307061 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I23adc866c6bbc676414846ab5dceb8523768050f Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/compat Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader Gerrit-Reviewer: Gerrit Patch Uploader Gerrit-Reviewer: Zaher kadour ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...MonoBook[master]: Restore position of the notification area after moving the e...
Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/306911 Change subject: Restore position of the notification area after moving the element in the DOM .. Restore position of the notification area after moving the element in the DOM The value font-size: 127% is duplicated from div#globalWrapper. The value top: 2.8em is duplicated from .mw-body. Depends-On: I8cddb27bd9cdabd782ad4b722d24eee683801b7c Change-Id: I5c248f1634db95575211d2c93ff7f07f04bf027d --- M main.css 1 file changed, 8 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/MonoBook refs/changes/11/306911/1 diff --git a/main.css b/main.css index e2e801e..f05a414 100644 --- a/main.css +++ b/main.css @@ -712,6 +712,14 @@ } /* mediawiki.notification */ +.mw-notification-area { + font-size: 127%; +} + +.skin-monobook .mw-notification-area-layout { + top: 2.8em; +} + .skin-monobook .mw-notification { box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.125); } -- To view, visit https://gerrit.wikimedia.org/r/306911 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5c248f1634db95575211d2c93ff7f07f04bf027d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/MonoBook Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: OutputPage.php: Reuse existing variable $user
Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/306156 Change subject: OutputPage.php: Reuse existing variable $user .. OutputPage.php: Reuse existing variable $user Follows-up to 81c291f2 Change-Id: Id32daf74549c8af886a46119b30ff29ab2a6ac94 --- M includes/OutputPage.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/56/306156/1 diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 852a4ed..c7499b1 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -3096,7 +3096,7 @@ $user = $this->getUser(); - if ( !$this->getUser()->isLoggedIn() ) { + if ( !$user->isLoggedIn() ) { // Anons have predictable edit tokens return false; } -- To view, visit https://gerrit.wikimedia.org/r/306156 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id32daf74549c8af886a46119b30ff29ab2a6ac94 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: watch.js: Preload module 'mediawiki.notification' after exit...
Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/304979 Change subject: watch.js: Preload module 'mediawiki.notification' after exit paths .. watch.js: Preload module 'mediawiki.notification' after exit paths mw.notify is not called on the exit paths. A preload is not necessary. Change-Id: I2b14a269afd78649eda86a40b33e22412e645e31 --- M resources/src/mediawiki/page/watch.js 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/79/304979/1 diff --git a/resources/src/mediawiki/page/watch.js b/resources/src/mediawiki/page/watch.js index c59f5ba..b860dbd 100644 --- a/resources/src/mediawiki/page/watch.js +++ b/resources/src/mediawiki/page/watch.js @@ -108,9 +108,6 @@ $links.click( function ( e ) { var action, api, $link; - // Preload the notification module for mw.notify - mw.loader.load( 'mediawiki.notification' ); - action = mwUriGetAction( this.href ); if ( action !== 'watch' && action !== 'unwatch' ) { @@ -128,6 +125,9 @@ updateWatchLink( $link, action, 'loading' ); + // Preload the notification module for mw.notify + mw.loader.load( 'mediawiki.notification' ); + api = new mw.Api(); api[ action ]( title ) -- To view, visit https://gerrit.wikimedia.org/r/304979 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2b14a269afd78649eda86a40b33e22412e645e31 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader Gerrit-Reviewer: Gerrit Patch Uploader ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Always load style module 'mediawiki.page.patrol' on ChangesList
Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/304335 Change subject: Always load style module 'mediawiki.page.patrol' on ChangesList .. Always load style module 'mediawiki.page.patrol' on ChangesList Since e9f896d6 the style for the unpatrolled symbol on watchlist and recent changes is missing. Follows-up to e9f896d6. Bug: T142750 Change-Id: Ia3894cb3dc60422c760f15b3b411ba8290b6037c --- M includes/changes/ChangesList.php M includes/changes/EnhancedChangesList.php 2 files changed, 6 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/35/304335/1 diff --git a/includes/changes/ChangesList.php b/includes/changes/ChangesList.php index 77038ed..7b86367 100644 --- a/includes/changes/ChangesList.php +++ b/includes/changes/ChangesList.php @@ -222,7 +222,11 @@ $this->rcCacheIndex = 0; $this->lastdate = ''; $this->rclistOpen = false; - $this->getOutput()->addModuleStyles( 'mediawiki.special.changeslist' ); + $this->getOutput()->addModuleStyles( [ + 'mediawiki.special.changeslist', + 'mediawiki.page.patrol', + + ] ); return ''; } diff --git a/includes/changes/EnhancedChangesList.php b/includes/changes/EnhancedChangesList.php index d3a414b..881b476 100644 --- a/includes/changes/EnhancedChangesList.php +++ b/includes/changes/EnhancedChangesList.php @@ -72,6 +72,7 @@ $this->getOutput()->addModuleStyles( [ 'mediawiki.special.changeslist', 'mediawiki.special.changeslist.enhanced', + 'mediawiki.page.patrol', ] ); $this->getOutput()->addModules( [ 'jquery.makeCollapsible', -- To view, visit https://gerrit.wikimedia.org/r/304335 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia3894cb3dc60422c760f15b3b411ba8290b6037c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Move style for #wikiPreview to mediawiki.action.edit.styles.css
Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/303364 Change subject: Move style for #wikiPreview to mediawiki.action.edit.styles.css .. Move style for #wikiPreview to mediawiki.action.edit.styles.css The style module 'mediawiki.action.edit.styles' gets loaded in EditPage.php. Bug: T89981 Change-Id: Ie691df4e926be8f094e4117c836334d01d935868 --- M resources/src/mediawiki.action/mediawiki.action.edit.styles.css M resources/src/mediawiki.legacy/shared.css 2 files changed, 8 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/64/303364/1 diff --git a/resources/src/mediawiki.action/mediawiki.action.edit.styles.css b/resources/src/mediawiki.action/mediawiki.action.edit.styles.css index 4209aa1..0956c65 100644 --- a/resources/src/mediawiki.action/mediawiki.action.edit.styles.css +++ b/resources/src/mediawiki.action/mediawiki.action.edit.styles.css @@ -34,3 +34,11 @@ .editButtons input:first-child { margin-left: .1em; } + +/** + * Add a bit of margin space between the preview and the toolbar. + * This replaces the ugly we used to insert into the page source + */ +#wikiPreview.ontop { + margin-bottom: 1em; +} diff --git a/resources/src/mediawiki.legacy/shared.css b/resources/src/mediawiki.legacy/shared.css index 8fcc667..de442e9 100644 --- a/resources/src/mediawiki.legacy/shared.css +++ b/resources/src/mediawiki.legacy/shared.css @@ -98,14 +98,6 @@ unicode-bidi: isolate; } -/** - * Add a bit of margin space between the preview and the toolbar. - * This replaces the ugly we used to insert into the page source - */ -#wikiPreview.ontop { - margin-bottom: 1em; -} - /* Stop floats from intruding into edit area in previews */ #editform, #toolbar, -- To view, visit https://gerrit.wikimedia.org/r/303364 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie691df4e926be8f094e4117c836334d01d935868 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader Gerrit-Reviewer: Gerrit Patch Uploader ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Move CSS for patrol from mediawiki.legacy to new module medi...
Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/303353 Change subject: Move CSS for patrol from mediawiki.legacy to new module mediawiki.page.patrol .. Move CSS for patrol from mediawiki.legacy to new module mediawiki.page.patrol Bug: T89981 Change-Id: Ib79d17fab61b1a7b940b2acff6d19a58a3fe0bc9 --- M includes/diff/DifferenceEngine.php M includes/page/Article.php M includes/specials/SpecialNewpages.php M resources/Resources.php M resources/src/mediawiki.legacy/commonPrint.css M resources/src/mediawiki.legacy/oldshared.css M resources/src/mediawiki.legacy/shared.css A resources/src/mediawiki/page/mediawiki.page.patrol.css A resources/src/mediawiki/page/mediawiki.page.patrol.print.css 9 files changed, 30 insertions(+), 23 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/53/303353/1 diff --git a/includes/diff/DifferenceEngine.php b/includes/diff/DifferenceEngine.php index 33955b2..89d2389 100644 --- a/includes/diff/DifferenceEngine.php +++ b/includes/diff/DifferenceEngine.php @@ -533,6 +533,7 @@ // Build the link if ( $rcid ) { $this->getOutput()->preventClickjacking(); + $this->getOutput()->addModuleStyles( 'mediawiki.page.patrol' ); if ( $wgEnableAPI && $wgEnableWriteAPI && $user->isAllowed( 'writeapi' ) ) { diff --git a/includes/page/Article.php b/includes/page/Article.php index 6396aaa..f5a860e 100644 --- a/includes/page/Article.php +++ b/includes/page/Article.php @@ -1196,6 +1196,7 @@ $token = $user->getEditToken( $rcid ); $outputPage->preventClickjacking(); + $outputPage->addModuleStyles( 'mediawiki.page.patrol' ); if ( $wgEnableAPI && $wgEnableWriteAPI && $user->isAllowed( 'writeapi' ) ) { $outputPage->addModules( 'mediawiki.page.patrol.ajax' ); } diff --git a/includes/specials/SpecialNewpages.php b/includes/specials/SpecialNewpages.php index 718a6dc..d2513ed 100644 --- a/includes/specials/SpecialNewpages.php +++ b/includes/specials/SpecialNewpages.php @@ -349,6 +349,7 @@ if ( $this->patrollable( $result ) ) { $classes[] = 'not-patrolled'; + $this->getOutput()->addModuleStyles( 'mediawiki.page.patrol' ); } # Add a class for zero byte pages diff --git a/resources/Resources.php b/resources/Resources.php index 5c60201..0d8d39f 100644 --- a/resources/Resources.php +++ b/resources/Resources.php @@ -1706,6 +1706,14 @@ 'position' => 'top', 'targets' => [ 'desktop', 'mobile' ], ], + 'mediawiki.page.patrol' => [ + 'position' => 'top', + 'styles' => [ + 'resources/src/mediawiki/page/mediawiki.page.patrol.css', + 'resources/src/mediawiki/page/mediawiki.page.patrol.print.css' + => [ 'media' => 'print' ], + ] + ], 'mediawiki.page.patrol.ajax' => [ 'scripts' => 'resources/src/mediawiki/page/patrol.ajax.js', 'dependencies' => [ diff --git a/resources/src/mediawiki.legacy/commonPrint.css b/resources/src/mediawiki.legacy/commonPrint.css index d387a2d..6a7c76a 100644 --- a/resources/src/mediawiki.legacy/commonPrint.css +++ b/resources/src/mediawiki.legacy/commonPrint.css @@ -19,7 +19,6 @@ #footer-places, .mw-hidden-catlinks, .usermessage, -.patrollink, .ns-0 .mw-redirectedfrom, div.magnify, #mw-navigation, diff --git a/resources/src/mediawiki.legacy/oldshared.css b/resources/src/mediawiki.legacy/oldshared.css index 7ccf59e..786f53d 100644 --- a/resources/src/mediawiki.legacy/oldshared.css +++ b/resources/src/mediawiki.legacy/oldshared.css @@ -289,11 +289,6 @@ font-style: italic; } -span.unpatrolled { - font-weight: bold; - color: #f00; -} - div.gallerybox { width: 150px; } diff --git a/resources/src/mediawiki.legacy/shared.css b/resources/src/mediawiki.legacy/shared.css index 8fcc667..e9cbbcb 100644 --- a/resources/src/mediawiki.legacy/shared.css +++ b/resources/src/mediawiki.legacy/shared.css @@ -124,23 +124,6 @@ } /** - * Patrol stuff - */ -.not-patrolled { - background-color: #ffa; -} - -.unpatrolled { - font-weight: bold; - color: #f00; -} - -div.patrollink { - font-size: 75%; - text-align: right; -} - -/** * Forms */ td.mw-label { diff --git a/resources/src/mediawiki/page/mediawiki.page.patrol.css b/resources/src/mediawiki/page/mediawiki.page.patrol.css new file mode 100644 index 000..8b54172 --- /dev/null +++ b/resources/src/mediawiki/page/mediawiki.page.pat
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Remove curid from diff and history links on watch list and r...
Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/303165 Change subject: Remove curid from diff and history links on watch list and recent changes .. Remove curid from diff and history links on watch list and recent changes The curid parameter is not necessary because it is redundant to the title parameter or not relevant when an oldid or diff parameter is present. Bug: T140915 Bug: T140916 Change-Id: If7bd749b867a435cab7c2ac255e17fb2c6fcf77b --- M includes/changes/ChangesList.php M includes/changes/EnhancedChangesList.php M includes/changes/RCCacheEntryFactory.php 3 files changed, 0 insertions(+), 15 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/65/303165/1 diff --git a/includes/changes/ChangesList.php b/includes/changes/ChangesList.php index 77038ed..2211ea6 100644 --- a/includes/changes/ChangesList.php +++ b/includes/changes/ChangesList.php @@ -371,7 +371,6 @@ $diffLink = $this->message['diff']; } else { $query = [ - 'curid' => $rc->mAttribs['rc_cur_id'], 'diff' => $rc->mAttribs['rc_this_oldid'], 'oldid' => $rc->mAttribs['rc_last_oldid'] ]; @@ -393,7 +392,6 @@ new HtmlArmor( $this->message['hist'] ), [], [ - 'curid' => $rc->mAttribs['rc_cur_id'], 'action' => 'history' ] ); diff --git a/includes/changes/EnhancedChangesList.php b/includes/changes/EnhancedChangesList.php index d3a414b..91bf040 100644 --- a/includes/changes/EnhancedChangesList.php +++ b/includes/changes/EnhancedChangesList.php @@ -183,8 +183,6 @@ # Collate list of users $userlinks = []; - # Other properties - $curId = 0; # Some catalyst variables... $namehidden = true; $allLogs = true; @@ -219,11 +217,6 @@ if ( $rcObj->mAttribs['rc_type'] != RC_LOG ) { $allLogs = false; } - # Get the latest entry with a page_id and oldid - # since logs may not have these. - if ( !$curId && $rcObj->mAttribs['rc_cur_id'] ) { - $curId = $rcObj->mAttribs['rc_cur_id']; - } $userlinks[$u]++; } @@ -253,8 +246,6 @@ } else { $articleLink = $this->getArticleLink( $block[0], $block[0]->unpatrolled, $block[0]->watched ); } - - $queryParams['curid'] = $curId; # Sub-entries $lines = []; @@ -588,8 +579,6 @@ */ protected function recentChangesBlockLine( $rcObj ) { $data = []; - - $query['curid'] = $rcObj->mAttribs['rc_cur_id']; $type = $rcObj->mAttribs['rc_type']; $logType = $rcObj->mAttribs['rc_log_type']; diff --git a/includes/changes/RCCacheEntryFactory.php b/includes/changes/RCCacheEntryFactory.php index 2c5c8b1..3c30b05 100644 --- a/includes/changes/RCCacheEntryFactory.php +++ b/includes/changes/RCCacheEntryFactory.php @@ -164,7 +164,6 @@ */ private function buildCurQueryParams( RecentChange $recentChange ) { return [ - 'curid' => $recentChange->mAttribs['rc_cur_id'], 'diff' => 0, 'oldid' => $recentChange->mAttribs['rc_this_oldid'] ]; @@ -199,7 +198,6 @@ */ private function buildDiffQueryParams( RecentChange $recentChange ) { return [ - 'curid' => $recentChange->mAttribs['rc_cur_id'], 'diff' => $recentChange->mAttribs['rc_this_oldid'], 'oldid' => $recentChange->mAttribs['rc_last_oldid'] ]; -- To view, visit https://gerrit.wikimedia.org/r/303165 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If7bd749b867a435cab7c2ac255e17fb2c6fcf77b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader Gerrit-Reviewer: Gerrit Patch Uploader ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add dependency to 'jquery.textSelection' for 'mediawiki.tool...
Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/303149 Change subject: Add dependency to 'jquery.textSelection' for 'mediawiki.toolbar' .. Add dependency to 'jquery.textSelection' for 'mediawiki.toolbar' Change-Id: Ie3b001551802364b488ba84588a028c44c73e755 --- M resources/Resources.php 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/49/303149/1 diff --git a/resources/Resources.php b/resources/Resources.php index 1558ee6..5c60201 100644 --- a/resources/Resources.php +++ b/resources/Resources.php @@ -1412,6 +1412,7 @@ 'class' => 'ResourceLoaderEditToolbarModule', 'scripts' => 'resources/src/mediawiki.toolbar/toolbar.js', 'styles' => 'resources/src/mediawiki.toolbar/toolbar.less', + 'dependencies' => 'jquery.textSelection', 'position' => 'top', ], 'mediawiki.experiments' => [ -- To view, visit https://gerrit.wikimedia.org/r/303149 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie3b001551802364b488ba84588a028c44c73e755 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader Gerrit-Reviewer: Gerrit Patch Uploader ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Rename filenames with spaces - change (mediawiki/core)
Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/299507 Change subject: Rename filenames with spaces .. Rename filenames with spaces Change-Id: I94dd6f9ae9cf855d058955b30bde866e70c94901 --- R resources/src/mediawiki.skinning/images/external-link-icons.svg 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/07/299507/1 diff --git a/resources/src/mediawiki.skinning/images/external link icons.svg b/resources/src/mediawiki.skinning/images/external-link-icons.svg similarity index 100% rename from resources/src/mediawiki.skinning/images/external link icons.svg rename to resources/src/mediawiki.skinning/images/external-link-icons.svg -- To view, visit https://gerrit.wikimedia.org/r/299507 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I94dd6f9ae9cf855d058955b30bde866e70c94901 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] MessagesGom_deva: Correct syntax in namespace alias - change (mediawiki/core)
Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/297123 Change subject: MessagesGom_deva: Correct syntax in namespace alias .. MessagesGom_deva: Correct syntax in namespace alias The alias for NS_USER_TALK (last line of code) had a space in it. The alias names should have underscores instead of spaces. The space has been replaced by an underscore. https://www.mediawiki.org/wiki/Manual:$wgNamespaceAliases Change-Id: Iee25a1f596c5c64cfd898f97baedc8ad35740860 --- M languages/messages/MessagesGom_deva.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/23/297123/1 diff --git a/languages/messages/MessagesGom_deva.php b/languages/messages/MessagesGom_deva.php index 1cf80ce..d7a7cc8 100644 --- a/languages/messages/MessagesGom_deva.php +++ b/languages/messages/MessagesGom_deva.php @@ -38,5 +38,5 @@ 'श्रेणी_चर्चा' => NS_CATEGORY_TALK, 'मिडिया' => NS_MEDIA, 'उपेगकर्तो' => NS_USER, - 'उपेगकर्तो चर्चा' => NS_USER_TALK + 'उपेगकर्तो_चर्चा' => NS_USER_TALK ]; -- To view, visit https://gerrit.wikimedia.org/r/297123 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iee25a1f596c5c64cfd898f97baedc8ad35740860 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader Gerrit-Reviewer: The Discoverer ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Reorder definition functions to reduce forward declarations - change (mediawiki...FlaggedRevs)
Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/296183 Change subject: Reorder definition functions to reduce forward declarations .. Reorder definition functions to reduce forward declarations Change-Id: I13cdf676cf7cb468966dd1a6ceca248c3e46d6ad --- M frontend/modules/ext.flaggedRevs.advanced.js M frontend/modules/ext.flaggedRevs.review.js 2 files changed, 208 insertions(+), 208 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/FlaggedRevs refs/changes/83/296183/1 diff --git a/frontend/modules/ext.flaggedRevs.advanced.js b/frontend/modules/ext.flaggedRevs.advanced.js index d941800..98796f5 100644 --- a/frontend/modules/ext.flaggedRevs.advanced.js +++ b/frontend/modules/ext.flaggedRevs.advanced.js @@ -10,43 +10,6 @@ /* Dropdown collapse timer */ boxCollapseTimer: null, - /* Startup function */ - init: function () { - // Enables rating detail box - var toggle = $( '#mw-fr-revisiontoggle' ); - - if ( toggle.length ) { - toggle.css( 'display', 'inline' ); // show toggle control - fr.hideBoxDetails(); // hide the initially displayed ratings - } - - // Bar UI: Toggle the box when the toggle is clicked - $( '.fr-toggle-symbol#mw-fr-revisiontoggle' ).click( fr.toggleBoxDetails ); - - // Simple UI: Show the box on mouseOver - $( '.fr-toggle-arrow#mw-fr-revisiontoggle' ).mouseover( fr.onBoxMouseOver ); - $( '.flaggedrevs_short#mw-fr-revisiontag' ).mouseout( fr.onBoxMouseOut ); - - // Enables diff detail box and toggle - toggle = $( '#mw-fr-difftoggle' ); - if ( toggle.length ) { - toggle.css( 'display', 'inline' ); // show toggle control - $( '#mw-fr-stablediff' ).hide(); - } - toggle.children( 'a' ).click( fr.toggleDiff ); - - // Enables log detail box and toggle - toggle = $( '#mw-fr-logtoggle' ); - if ( toggle.length ) { - toggle.css( 'display', 'inline' ); // show toggle control - $( '#mw-fr-logexcerpt' ).hide(); - } - toggle.children( 'a' ).click( fr.toggleLog ); - - // Enables changing of save button when "review this" checkbox changes - $( '#wpReviewEdit' ).click( fr.updateSaveButton ); - }, - /* Expands flag info box details */ showBoxDetails: function () { $( '#mw-fr-revisiondetails' ).css( 'display', 'block' ); @@ -80,6 +43,29 @@ }, /** +* Checks if mouseOut event is for a child of parentId +* @param e {jQuery.Event} +* @param parentId {String} +* @return {Boolean} True if given event object originated from a (direct or indirect) +* child element of an element with an id of parentId. +*/ + isMouseOutBubble: function ( e, parentId ) { + var toNode = e.relatedTarget; + + if ( toNode ) { + var nextParent = toNode.parentNode; + while ( nextParent ) { + if ( nextParent.id === parentId ) { + return true; + } + // next up + nextParent = nextParent.parentNode; + } + } + return false; + }, + + /** * Expands flag info box details on mouseOver * @context {jQuery} * @param e {jQuery.Event} @@ -101,29 +87,6 @@ /*global window*/ fr.boxCollapseTimer = window.setTimeout( fr.hideBoxDetails, 150 ); } - }, - - /** -* Checks if mouseOut event is for a child of parentId -* @param e {jQuery.Event} -* @param parentId {String} -* @return {Boolean} True if given event object originated from a (direct or indirect) -* child element of an element with an id of parentId. -*/ - isMouseOutBubble: function ( e, parentId ) { - var toNode = e.relatedTarget; - - if ( toNode ) { - var nextParent = toNode.parentNode; - while ( nextParent ) { - if ( nextParent.id === parentId ) { - return true; - } - // next up - nextParent = nextParent.parentNode; - } - } - return false; }, /** @@ -203,6 +166,43
[MediaWiki-commits] [Gerrit] Fix jQuery selector in edit stash - change (mediawiki/core)
Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/295984 Change subject: Fix jQuery selector in edit stash .. Fix jQuery selector in edit stash Follow-up to: ebe7205c Change-Id: I4d72948ba62cb5c1cc29277f30363c29e42fa25b --- M resources/src/mediawiki.action/mediawiki.action.edit.stash.js 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/84/295984/1 diff --git a/resources/src/mediawiki.action/mediawiki.action.edit.stash.js b/resources/src/mediawiki.action/mediawiki.action.edit.stash.js index 2ae05dd..da27d20 100644 --- a/resources/src/mediawiki.action/mediawiki.action.edit.stash.js +++ b/resources/src/mediawiki.action/mediawiki.action.edit.stash.js @@ -13,10 +13,10 @@ $form = $( '#editform' ), $text = $form.find( '#wpTextbox1' ), $summary = $form.find( '#wpSummary' ), - section = $form.find( '#wpSection' ).val(), - model = $form.find( '#model' ).val(), - format = $form.find( '#format' ).val(), - revId = $form.find( '#parentRevId' ).val(), + section = $form.find( '[name=wpSection]' ).val(), + model = $form.find( '[name=model]' ).val(), + format = $form.find( '[name=format]' ).val(), + revId = $form.find( '[name=parentRevId]' ).val(), lastText = $text.textSelection( 'getContents' ), timer = null; -- To view, visit https://gerrit.wikimedia.org/r/295984 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4d72948ba62cb5c1cc29277f30363c29e42fa25b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Edit stash: Support CodeEditor - change (mediawiki/core)
Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/295658 Change subject: Edit stash: Support CodeEditor .. Edit stash: Support CodeEditor Use .textSelection( 'getContents' ) instead of .val() for '#wpTextbox1' and '#wpSummary'. The the normalization of the line endings and the dependency to 'jquery.getAttrs' is not necessary. Bug: T137861 Change-Id: I26f7021a2a02cf719c9e5f44787b95cfc3239959 --- M resources/Resources.php M resources/src/mediawiki.action/mediawiki.action.edit.stash.js 2 files changed, 14 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/58/295658/1 diff --git a/resources/Resources.php b/resources/Resources.php index 90510fc..e31e77e 100644 --- a/resources/Resources.php +++ b/resources/Resources.php @@ -1417,7 +1417,6 @@ 'mediawiki.action.edit.styles', 'jquery.textSelection', 'jquery.byteLimit', - 'jquery.getAttrs', 'mediawiki.api', ], 'position' => 'top', diff --git a/resources/src/mediawiki.action/mediawiki.action.edit.stash.js b/resources/src/mediawiki.action/mediawiki.action.edit.stash.js index 2069ac5..2ae05dd 100644 --- a/resources/src/mediawiki.action/mediawiki.action.edit.stash.js +++ b/resources/src/mediawiki.action/mediawiki.action.edit.stash.js @@ -13,7 +13,11 @@ $form = $( '#editform' ), $text = $form.find( '#wpTextbox1' ), $summary = $form.find( '#wpSummary' ), - data = {}, + section = $form.find( '#wpSection' ).val(), + model = $form.find( '#model' ).val(), + format = $form.find( '#format' ).val(), + revId = $form.find( '#parentRevId' ).val(), + lastText = $text.textSelection( 'getContents' ), timer = null; // Send a request to stash the edit to the API. @@ -25,19 +29,19 @@ } api.getToken( 'csrf' ).then( function ( token ) { - data = $form.serializeObject(); + lastText = $text.textSelection( 'getContents' ); pending = api.post( { action: 'stashedit', token: token, title: mw.config.get( 'wgPageName' ), - section: data.wpSection, + section: section, sectiontitle: '', - text: data.wpTextbox1, - summary: data.wpSummary, - contentmodel: data.model, - contentformat: data.format, - baserevid: data.parentRevId + text: lastText, + summary: $summary.textSelection( 'getContents' ), + contentmodel: model, + contentformat: format, + baserevid: revId } ); } ); } @@ -45,9 +49,8 @@ // Check if edit body text changed since the last stashEdit() call or if no edit // stash calls have yet been made function isChanged() { - // Normalize line endings to CRLF, like $.fn.serializeObject does. - var newText = $text.val().replace( /\r?\n/g, '\r\n' ); - return newText !== data.wpTextbox1; + var newText = $text.textSelection( 'getContents' ); + return newText !== lastText; } function onEditorIdle() { -- To view, visit https://gerrit.wikimedia.org/r/295658 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I26f7021a2a02cf719c9e5f44787b95cfc3239959 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki.action.edit.stash: Restore dependency to 'jquery.g... - change (mediawiki/core)
Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/295330 Change subject: mediawiki.action.edit.stash: Restore dependency to 'jquery.getAttrs' .. mediawiki.action.edit.stash: Restore dependency to 'jquery.getAttrs' mediawiki.action.edit.stash.js uses .serializeObject(). jQuery.fn.serializeObject is defined in module 'jquery.getAttrs'. The dependency to 'jquery.getAttrs' was removed in 9bec479f. * Follow-up 9bec479f. Change-Id: I73bf1a29d76ab97a690b729a7e658048b011c680 --- M resources/Resources.php 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/30/295330/1 diff --git a/resources/Resources.php b/resources/Resources.php index e31e77e..90510fc 100644 --- a/resources/Resources.php +++ b/resources/Resources.php @@ -1417,6 +1417,7 @@ 'mediawiki.action.edit.styles', 'jquery.textSelection', 'jquery.byteLimit', + 'jquery.getAttrs', 'mediawiki.api', ], 'position' => 'top', -- To view, visit https://gerrit.wikimedia.org/r/295330 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I73bf1a29d76ab97a690b729a7e658048b011c680 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] SpecialPageLanguage: Redirect to redirect by adding redirect=no - change (mediawiki/core)
Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/292778 Change subject: SpecialPageLanguage: Redirect to redirect by adding redirect=no .. SpecialPageLanguage: Redirect to redirect by adding redirect=no Change-Id: Ifcdfcc2073141d7f2b6742f173ccebdacf9b03b0 --- M includes/specials/SpecialPageLanguage.php 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/78/292778/1 diff --git a/includes/specials/SpecialPageLanguage.php b/includes/specials/SpecialPageLanguage.php index 5322a04..9ac2a4f 100644 --- a/includes/specials/SpecialPageLanguage.php +++ b/includes/specials/SpecialPageLanguage.php @@ -141,7 +141,9 @@ ); // Url to redirect to after the operation - $this->goToUrl = $title->getFullURL(); + $this->goToUrl = $title->getFullURL( + $title->isRedirect() ? [ 'redirect' => 'no' ] : [] + ); // Check if user wants to use default language if ( $data['selectoptions'] == 1 ) { -- To view, visit https://gerrit.wikimedia.org/r/292778 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifcdfcc2073141d7f2b6742f173ccebdacf9b03b0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update namespaces in Konkani gom-deva - change (mediawiki/core)
Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/292777 Change subject: Update namespaces in Konkani gom-deva .. Update namespaces in Konkani gom-deva Replaces 7 namespace names Bug: T129315 Change-Id: Ia51b9bb7eb9c0cfc241bb9b71dba4e6c99842684 --- M languages/messages/MessagesGom_deva.php 1 file changed, 8 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/77/292777/1 diff --git a/languages/messages/MessagesGom_deva.php b/languages/messages/MessagesGom_deva.php index fc65e58..fb7eeb3 100644 --- a/languages/messages/MessagesGom_deva.php +++ b/languages/messages/MessagesGom_deva.php @@ -7,16 +7,17 @@ * @file * * @author Darshan kandolkar + * @author The Discoverer */ $fallback = 'hi'; $namespaceNames = [ - NS_MEDIA=> 'मिडिया', + NS_MEDIA=> 'माध्यम', NS_SPECIAL => 'विशेश', NS_TALK => 'चर्चा', - NS_USER => 'उपेगकर्तो', - NS_USER_TALK=> 'उपेगकर्तो_चर्चा', + NS_USER => 'वापरपी', + NS_USER_TALK=> 'वापरपी_चर्चा', NS_PROJECT_TALK => '$1_चर्चा', NS_FILE => 'फायल', NS_FILE_TALK=> 'फायल_चर्चा', @@ -24,8 +25,8 @@ NS_MEDIAWIKI_TALK => 'मिडियाविकी_चर्चा', NS_TEMPLATE => 'प्रारूप', NS_TEMPLATE_TALK=> 'प्रारूप_चर्चा', - NS_HELP => 'मजत', - NS_HELP_TALK=> 'मजत_चर्चा', - NS_CATEGORY => 'श्रेणी', - NS_CATEGORY_TALK=> 'श्रेणी_चर्चा', + NS_HELP => 'आदार', + NS_HELP_TALK=> 'आदार_चर्चा', + NS_CATEGORY => 'वर्ग', + NS_CATEGORY_TALK=> 'वर्ग_चर्चा', ]; -- To view, visit https://gerrit.wikimedia.org/r/292777 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia51b9bb7eb9c0cfc241bb9b71dba4e6c99842684 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader Gerrit-Reviewer: The Discoverer ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Skin: Avoid redirect=no for links to non-redirects - change (mediawiki/core)
Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/292148 Change subject: Skin: Avoid redirect=no for links to non-redirects .. Skin: Avoid redirect=no for links to non-redirects Follows-up to rMWecf64cb9bfcab6e81006f8ffaea00a24b120cec4 (T6974). Change-Id: Ib838722a06a9d14294507f543db101d21444233b --- M includes/skins/Skin.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/48/292148/1 diff --git a/includes/skins/Skin.php b/includes/skins/Skin.php index d70a6b9..2df78c4 100644 --- a/includes/skins/Skin.php +++ b/includes/skins/Skin.php @@ -1366,7 +1366,7 @@ $uTalkTitle, $this->msg( 'newmessageslinkplural' )->params( $plural )->escaped(), [], - [ 'redirect' => 'no' ] + $uTalkTitle->isRedirect() ? [ 'redirect' => 'no' ] : [] ); $newMessagesDiffLink = Linker::linkKnown( -- To view, visit https://gerrit.wikimedia.org/r/292148 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib838722a06a9d14294507f543db101d21444233b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] SpecialUnusedtemplates: Avoid redirect=no for links to non-r... - change (mediawiki/core)
Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/292108 Change subject: SpecialUnusedtemplates: Avoid redirect=no for links to non-redirects .. SpecialUnusedtemplates: Avoid redirect=no for links to non-redirects Change-Id: Ie8cfada5eec68b7066b986d0b99dfa6ce873f2af --- M includes/specials/SpecialUnusedtemplates.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/08/292108/1 diff --git a/includes/specials/SpecialUnusedtemplates.php b/includes/specials/SpecialUnusedtemplates.php index b0a2579..6a48e87 100644 --- a/includes/specials/SpecialUnusedtemplates.php +++ b/includes/specials/SpecialUnusedtemplates.php @@ -76,7 +76,7 @@ $title, null, [], - [ 'redirect' => 'no' ] + $title->isRedirect() : [ 'redirect' => 'no' ] : [] ); $wlhLink = Linker::linkKnown( SpecialPage::getTitleFor( 'Whatlinkshere', $title->getPrefixedText() ), -- To view, visit https://gerrit.wikimedia.org/r/292108 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie8cfada5eec68b7066b986d0b99dfa6ce873f2af Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] EditPage: Do not resolve redirect on cancel button - change (mediawiki/core)
Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/291528 Change subject: EditPage: Do not resolve redirect on cancel button .. EditPage: Do not resolve redirect on cancel button Change-Id: I9343c7e97cee7fa6550b186e6a6ffbf3438060a4 --- M includes/EditPage.php 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/28/291528/1 diff --git a/includes/EditPage.php b/includes/EditPage.php index 8acd036..78adfd9 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -3503,6 +3503,9 @@ $cancelParams['oldid'] = $this->oldid; } $attrs = [ 'id' => 'mw-editform-cancel' ]; + if ( $this->getContextTitle()->isRedirect() ) { + $attrs['redirect'] = 'no'; + } return Linker::linkKnown( $this->getContextTitle(), -- To view, visit https://gerrit.wikimedia.org/r/291528 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9343c7e97cee7fa6550b186e6a6ffbf3438060a4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Do not resolve redirects on reject - change (mediawiki...FlaggedRevs)
Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/291499 Change subject: Do not resolve redirects on reject .. Do not resolve redirects on reject Bug: T136473 Change-Id: I77d2d055b7c562d7a2a3e32c4e193683c6006f7d --- M frontend/specialpages/actions/RevisionReview_body.php 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/FlaggedRevs refs/changes/99/291499/1 diff --git a/frontend/specialpages/actions/RevisionReview_body.php b/frontend/specialpages/actions/RevisionReview_body.php index 1e157e5..1233d27 100644 --- a/frontend/specialpages/actions/RevisionReview_body.php +++ b/frontend/specialpages/actions/RevisionReview_body.php @@ -116,7 +116,8 @@ } elseif ( $form->getAction() === 'unapprove' ) { $out->addHTML( $this->deapprovalSuccessHTML( true ) ); } elseif ( $form->getAction() === 'reject' ) { - $out->redirect( $this->page->getFullUrl() ); + $query = $this->page->isRedirect() ? [ 'redirect' => 'no' ] : []; + $out->redirect( $this->page->getFullUrl( $query ) ); } // Failure... } else { -- To view, visit https://gerrit.wikimedia.org/r/291499 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I77d2d055b7c562d7a2a3e32c4e193683c6006f7d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/FlaggedRevs Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Task parsing code: always split by the /last/ : - change (labs...forrestbot)
Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/290424 Change subject: Task parsing code: always split by the /last/ : .. Task parsing code: always split by the /last/ : Bug: T136041 Change-Id: Ief6756a60f298b0e20a1e561e169e96154f60b78 --- M forrestbot.py 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/labs/tools/forrestbot refs/changes/24/290424/1 diff --git a/forrestbot.py b/forrestbot.py index 64e6784..90562de 100644 --- a/forrestbot.py +++ b/forrestbot.py @@ -158,6 +158,7 @@ mail.get('Closes', '') or mail.get('Task', '') ) +task = task.split(':')[-1].strip() if not task: raise KeyError('No Task ID (Bug, Closes or Task)') except KeyError as e: -- To view, visit https://gerrit.wikimedia.org/r/290424 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ief6756a60f298b0e20a1e561e169e96154f60b78 Gerrit-PatchSet: 1 Gerrit-Project: labs/tools/forrestbot Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader Gerrit-Reviewer: Merlijn van Deen ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Revert zopflipng for type-sad-dull.png - change (mediawiki...MoodBar)
Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/287173 Change subject: Revert zopflipng for type-sad-dull.png .. Revert zopflipng for type-sad-dull.png This reverts I9c0dd65563c7835bc477bf06868c59a036e3dbfd for this image. Change-Id: Iada3f0a3363f3534f7a7d703cc5c650829367db7 --- M modules/ext.moodBar/images/type-sad-dull.png 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MoodBar refs/changes/73/287173/1 diff --git a/modules/ext.moodBar/images/type-sad-dull.png b/modules/ext.moodBar/images/type-sad-dull.png index 9b93c9c..dbb97a8 100644 --- a/modules/ext.moodBar/images/type-sad-dull.png +++ b/modules/ext.moodBar/images/type-sad-dull.png Binary files differ -- To view, visit https://gerrit.wikimedia.org/r/287173 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iada3f0a3363f3534f7a7d703cc5c650829367db7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MoodBar Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Rename language codes sr-ec and sr-el to sr-cyrl and sr-latn - change (mediawiki...Wikibase)
Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/287141 Change subject: Rename language codes sr-ec and sr-el to sr-cyrl and sr-latn .. Rename language codes sr-ec and sr-el to sr-cyrl and sr-latn This change requires I75da0af35a2066e7963e50c56c99daf1e07c55e6 in core. Bug: T117845 Change-Id: I7eaee0170a8d4938c94d1024f9e6f58c94db9c3d --- R client/i18n/sr-cyrl.json R client/i18n/sr-latn.json R lib/i18n/sr-cyrl.json R lib/i18n/sr-latn.json M lib/includes/LanguageFallbackChainFactory.php M lib/tests/phpunit/LanguageFallbackChainFactoryTest.php M lib/tests/phpunit/LanguageFallbackChainTest.php M lib/tests/phpunit/LanguageWithConversionTest.php R repo/i18n/sr-cyrl.json R repo/i18n/sr-latn.json 10 files changed, 6 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/41/287141/1 diff --git a/client/i18n/sr-ec.json b/client/i18n/sr-cyrl.json similarity index 100% rename from client/i18n/sr-ec.json rename to client/i18n/sr-cyrl.json diff --git a/client/i18n/sr-el.json b/client/i18n/sr-latn.json similarity index 100% rename from client/i18n/sr-el.json rename to client/i18n/sr-latn.json diff --git a/lib/i18n/sr-ec.json b/lib/i18n/sr-cyrl.json similarity index 100% rename from lib/i18n/sr-ec.json rename to lib/i18n/sr-cyrl.json diff --git a/lib/i18n/sr-el.json b/lib/i18n/sr-latn.json similarity index 100% rename from lib/i18n/sr-el.json rename to lib/i18n/sr-latn.json diff --git a/lib/includes/LanguageFallbackChainFactory.php b/lib/includes/LanguageFallbackChainFactory.php index 5b056d8..18e12fb 100644 --- a/lib/includes/LanguageFallbackChainFactory.php +++ b/lib/includes/LanguageFallbackChainFactory.php @@ -32,7 +32,7 @@ /** * Other compatible languages that can be translated into the requested language -* (and translation is automatically done), e.g. 'sr', 'sr-ec' and 'sr-el' for 'sr'. +* (and translation is automatically done), e.g. 'sr', 'sr-cyrl' and 'sr-latn' for 'sr'. */ const FALLBACK_VARIANTS = 2; diff --git a/lib/tests/phpunit/LanguageFallbackChainFactoryTest.php b/lib/tests/phpunit/LanguageFallbackChainFactoryTest.php index f56b748..a30d83b 100644 --- a/lib/tests/phpunit/LanguageFallbackChainFactoryTest.php +++ b/lib/tests/phpunit/LanguageFallbackChainFactoryTest.php @@ -188,8 +188,8 @@ array( 'sr', LanguageFallbackChainFactory::FALLBACK_SELF | LanguageFallbackChainFactory::FALLBACK_VARIANTS, array( 'sr', - array( 'sr', 'sr-ec' ), - array( 'sr', 'sr-el' ), + array( 'sr', 'sr-cyrl' ), + array( 'sr', 'sr-latn' ), ) ), ); } diff --git a/lib/tests/phpunit/LanguageFallbackChainTest.php b/lib/tests/phpunit/LanguageFallbackChainTest.php index 8c1a7bf..6447454 100644 --- a/lib/tests/phpunit/LanguageFallbackChainTest.php +++ b/lib/tests/phpunit/LanguageFallbackChainTest.php @@ -94,12 +94,12 @@ ), ), array( - 'sr-ec', + 'sr-cyrl', LanguageFallbackChainFactory::FALLBACK_SELF | LanguageFallbackChainFactory::FALLBACK_VARIANTS, $data, null, ), - array( 'sr-ec', LanguageFallbackChainFactory::FALLBACK_ALL, $data, array( + array( 'sr-cyrl', LanguageFallbackChainFactory::FALLBACK_ALL, $data, array( // Shouldn't be converted to Cyrillic ('фоо') as this specific // value ('foo') is taken from the English label. 'value' => 'foo', diff --git a/lib/tests/phpunit/LanguageWithConversionTest.php b/lib/tests/phpunit/LanguageWithConversionTest.php index e51c19c..445c52c 100644 --- a/lib/tests/phpunit/LanguageWithConversionTest.php +++ b/lib/tests/phpunit/LanguageWithConversionTest.php @@ -109,7 +109,7 @@ array( 'zh-cn', 'zh-classical' ), array( 'zh', 'sr' ), array( 'zh-cn', 'en-gb' ), - array( 'zh-tw', 'sr-ec' ), + array( 'zh-tw', 'sr-cyrl' ), ); } diff --git a/repo/i18n/sr-ec.json b/repo/i18n/sr-cyrl.json similarity index 100% rename from repo/i18n/sr-ec.json rename to repo/i18n/sr-cyrl.json diff --git a/repo/i18n/sr-el.json b/repo/i18n/sr-latn.json similarity index 100% rename from repo/i18n/sr-el.json rename to repo/i18n/sr-latn.json -- To view, visit https://gerrit.wikimedia.org/r/287141 To unsubscribe, visit https://gerrit.wiki
[MediaWiki-commits] [Gerrit] Minify JS in jquery.makeCollapsible - change (mediawiki/core)
Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/286430 Change subject: Minify JS in jquery.makeCollapsible .. Minify JS in jquery.makeCollapsible Instead of using if checks, use a piping system (like in the first function) Change-Id: Ib96f9db9c56965c336ac85d9bdcf21bdbb4e9cce --- M resources/src/jquery/jquery.makeCollapsible.js 1 file changed, 2 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/30/286430/1 diff --git a/resources/src/jquery/jquery.makeCollapsible.js b/resources/src/jquery/jquery.makeCollapsible.js index 79e8731..bdb5ce8 100644 --- a/resources/src/jquery/jquery.makeCollapsible.js +++ b/resources/src/jquery/jquery.makeCollapsible.js @@ -153,10 +153,7 @@ */ function togglingHandler( $toggle, $collapsible, e, options ) { var wasCollapsed, $textContainer, collapseText, expandText; - - if ( options === undefined ) { - options = {}; - } + options = options || {}; if ( e ) { if ( @@ -241,9 +238,7 @@ * @chainable */ $.fn.makeCollapsible = function ( options ) { - if ( options === undefined ) { - options = {}; - } + options = options || {}; this.each( function () { var $collapsible, collapseText, expandText, $caption, $toggle, actionHandler, buildDefaultToggleLink, -- To view, visit https://gerrit.wikimedia.org/r/286430 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib96f9db9c56965c336ac85d9bdcf21bdbb4e9cce Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader Gerrit-Reviewer: Cblair91 ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] API: Avoid duplicate IDs in API documentation - change (mediawiki/core)
Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/286398 Change subject: API: Avoid duplicate IDs in API documentation .. API: Avoid duplicate IDs in API documentation With $wgExperimentalHtmlIds = true Sanitizer::escapeId( 'main/credits' ) is equal to 'main/credits'. This generate a duplicate ID. This change generates the additional only with $wgExperimentalHtmlIds = false. Bug: T134155 Change-Id: Ie5d692b7b166030b2bc5c426b44608d981274cd0 --- M includes/api/ApiMain.php 1 file changed, 13 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/98/286398/1 diff --git a/includes/api/ApiMain.php b/includes/api/ApiMain.php index 07642c4..9c35292 100644 --- a/includes/api/ApiMain.php +++ b/includes/api/ApiMain.php @@ -1626,13 +1626,20 @@ // Fill 'datatypes' and 'credits', if applicable if ( empty( $options['nolead'] ) ) { + global $wgExperimentalHtmlIds; + $level = $options['headerlevel']; $tocnumber = &$options['tocnumber']; $header = $this->msg( 'api-help-datatypes-header' )->parse(); + + // Add an additional span with sanitized ID + if ( !$wgExperimentalHtmlIds ) { + $header = Html::element( 'span', [ 'id' => Sanitizer::escapeId( 'main/datatypes' ) ] ) . + $header; + } $help['datatypes'] .= Html::rawElement( 'h' . min( 6, $level ), [ 'id' => 'main/datatypes', 'class' => 'apihelp-header' ], - Html::element( 'span', [ 'id' => Sanitizer::escapeId( 'main/datatypes' ) ] ) . $header ); $help['datatypes'] .= $this->msg( 'api-help-datatypes' )->parseAsBlock(); @@ -1648,10 +1655,14 @@ ]; } + // Add an additional span with sanitized ID + if ( !$wgExperimentalHtmlIds ) { + $header = Html::element( 'span', [ 'id' => Sanitizer::escapeId( 'main/credits' ) ] ) . + $header; + } $header = $this->msg( 'api-credits-header' )->parse(); $help['credits'] .= Html::rawElement( 'h' . min( 6, $level ), [ 'id' => 'main/credits', 'class' => 'apihelp-header' ], - Html::element( 'span', [ 'id' => Sanitizer::escapeId( 'main/credits' ) ] ) . $header ); $help['credits'] .= $this->msg( 'api-credits' )->useDatabase( false )->parseAsBlock(); -- To view, visit https://gerrit.wikimedia.org/r/286398 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie5d692b7b166030b2bc5c426b44608d981274cd0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Do not double decode HTML entities for IDs - change (mediawiki/core)
Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/286385 Change subject: Do not double decode HTML entities for IDs .. Do not double decode HTML entities for IDs * in links (T103714) * in indicators (T104196) This change removes the automatic Sanitizer::decodeCharReferences from Sanitizer::escapeId. Where decoding of HTML entities are wanted an explicite call to Sanitizer::decodeCharReferences is added. Also add 'noninitial' where the first character is always a letter. Explicit decode HTML entities in non local autocomments. (T104311) Bug: T103714 Bug: T104196 Bug: T104311 Change-Id: I88e8e2077e6f5eec2b232391f7818370894a62dc --- M includes/Linker.php M includes/Sanitizer.php M includes/api/ApiMain.php M includes/parser/Parser.php M includes/skins/BaseTemplate.php M includes/specials/SpecialListgrouprights.php M includes/specials/SpecialVersion.php M includes/specials/pagers/AllMessagesTablePager.php 8 files changed, 15 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/85/286385/1 diff --git a/includes/Linker.php b/includes/Linker.php index 071f95e..7228f89 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -1357,7 +1357,7 @@ $sectionTitle = Title::newFromText( '#' . $section ); } else { $sectionTitle = Title::makeTitleSafe( $title->getNamespace(), - $title->getDBkey(), $section ); + $title->getDBkey(), Sanitizer::decodeCharReferences( $section ) ); } if ( $sectionTitle ) { $link = Linker::makeCommentLink( $sectionTitle, $wgLang->getArrow(), $wikiId, 'noclasses' ); diff --git a/includes/Sanitizer.php b/includes/Sanitizer.php index d321e9f..a80b683 100644 --- a/includes/Sanitizer.php +++ b/includes/Sanitizer.php @@ -1132,8 +1132,6 @@ global $wgExperimentalHtmlIds; $options = (array)$options; - $id = Sanitizer::decodeCharReferences( $id ); - if ( $wgExperimentalHtmlIds && !in_array( 'legacy', $options ) ) { $id = preg_replace( '/[ \t\n\r\f_\'"%]+/', '_', $id ); $id = trim( $id, '_' ); diff --git a/includes/api/ApiMain.php b/includes/api/ApiMain.php index 07642c4..a3c8ec0 100644 --- a/includes/api/ApiMain.php +++ b/includes/api/ApiMain.php @@ -1632,7 +1632,7 @@ $header = $this->msg( 'api-help-datatypes-header' )->parse(); $help['datatypes'] .= Html::rawElement( 'h' . min( 6, $level ), [ 'id' => 'main/datatypes', 'class' => 'apihelp-header' ], - Html::element( 'span', [ 'id' => Sanitizer::escapeId( 'main/datatypes' ) ] ) . + Html::element( 'span', [ 'id' => Sanitizer::escapeId( 'main/datatypes', 'noninitial' ) ] ) . $header ); $help['datatypes'] .= $this->msg( 'api-help-datatypes' )->parseAsBlock(); @@ -1651,7 +1651,7 @@ $header = $this->msg( 'api-credits-header' )->parse(); $help['credits'] .= Html::rawElement( 'h' . min( 6, $level ), [ 'id' => 'main/credits', 'class' => 'apihelp-header' ], - Html::element( 'span', [ 'id' => Sanitizer::escapeId( 'main/credits' ) ] ) . + Html::element( 'span', [ 'id' => Sanitizer::escapeId( 'main/credits', 'noninitial' ) ] ) . $header ); $help['credits'] .= $this->msg( 'api-credits' )->useDatabase( false )->parseAsBlock(); diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index a1d62e5..4ee519b 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -4596,6 +4596,9 @@ # Save headline for section edit hint before it's escaped $headlineHint = $safeHeadline; + # Decode HTML entities + $safeHeadline = Sanitizer::decodeCharReferences( $safeHeadline ); + if ( $wgExperimentalHtmlIds ) { # For reverse compatibility, provide an id that's # HTML4-compatible, like we used to. @@ -6149,6 +6152,7 @@ # Strip out wikitext links(they break the anchor) $text = $this->stri
[MediaWiki-commits] [Gerrit] Better JavaScript handling for return method - change (mediawiki/core)
Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/286272 Change subject: Better JavaScript handling for return method .. Better JavaScript handling for return method The length selector can be reduced to just find the child of $tbody, as it will check to see if both $tbody and the child .collapsible exist. Change-Id: If927a5ca79d12f4654a1af9bad97c9274cb501e9 --- M resources/src/mediawiki.action/mediawiki.action.view.metadata.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/72/286272/1 diff --git a/resources/src/mediawiki.action/mediawiki.action.view.metadata.js b/resources/src/mediawiki.action/mediawiki.action.view.metadata.js index b1a63b0..4c75e33 100644 --- a/resources/src/mediawiki.action/mediawiki.action.view.metadata.js +++ b/resources/src/mediawiki.action/mediawiki.action.view.metadata.js @@ -14,7 +14,7 @@ $table = $( '#mw_metadata' ), $tbody = $table.find( 'tbody' ); - if ( !$tbody.length || !$tbody.find( '.collapsable' ).length ) { + if ( !$tbody.find( '.collapsable' ).length ) { return; } -- To view, visit https://gerrit.wikimedia.org/r/286272 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If927a5ca79d12f4654a1af9bad97c9274cb501e9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader Gerrit-Reviewer: Cblair91 ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] jquery.uls.core.js: Simplify by using Object.keys - change (mediawiki...UniversalLanguageSelector)
Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/285580 Change subject: jquery.uls.core.js: Simplify by using Object.keys .. jquery.uls.core.js: Simplify by using Object.keys Object.keys is guaranteed by es5-shim. Change-Id: I4bd070468526e26f069175334ef477fa8f9e9de7 --- M extension.json M lib/jquery.uls/src/jquery.uls.core.js 2 files changed, 3 insertions(+), 26 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector refs/changes/80/285580/1 diff --git a/extension.json b/extension.json index b953977..f483d76 100644 --- a/extension.json +++ b/extension.json @@ -315,6 +315,7 @@ "jquery.uls/css/jquery.uls.lcd.css" ], "dependencies": [ + "es5-shim", "jquery.i18n", "jquery.uls.data", "jquery.uls.grid" diff --git a/lib/jquery.uls/src/jquery.uls.core.js b/lib/jquery.uls/src/jquery.uls.core.js index f1d7354..bb510d6 100644 --- a/lib/jquery.uls/src/jquery.uls.core.js +++ b/lib/jquery.uls/src/jquery.uls.core.js @@ -52,30 +52,6 @@ /*jshint multistr:false */ /** -* Count the number of keys in an object. -* Works in a cross-browser way. -* @param {Object} The object. -*/ - function objectLength ( obj ) { - var count, key; - - // Some old browsers don't support Object.keys - if ( Object.keys ) { - return Object.keys( obj ).length; - } - - count = 0; - - for ( key in obj ) { - if ( Object.prototype.hasOwnProperty.call( obj, key ) ) { - count++; - } - } - - return count; - } - - /** * ULS Public class definition */ ULS = function ( element, options ) { @@ -254,7 +230,7 @@ this.$menu.on( 'keydown', $.proxy( this.keypress, this ) ); } - languagesCount = objectLength( this.options.languages ); + languagesCount = Object.keys( this.options.languages ).length; lcd = this.$resultsView.lcd( { languages: this.languages, columns: columnsOptions[ this.getMenuWidth() ], @@ -382,7 +358,7 @@ return this.options.menuWidth; } - languagesCount = objectLength( this.options.languages ); + languagesCount = Object.keys( this.options.languages ).length; if ( languagesCount < 12 ) { return 'narrow'; -- To view, visit https://gerrit.wikimedia.org/r/285580 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4bd070468526e26f069175334ef477fa8f9e9de7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Names.php: Replace remaining tabs and double spaces - change (mediawiki/core)
Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/284885 Change subject: Names.php: Replace remaining tabs and double spaces .. Names.php: Replace remaining tabs and double spaces Follow-up to a3552004 Change-Id: I6a76de73fcfc21516fab7415057260e27e924696 --- M languages/data/Names.php 1 file changed, 6 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/85/284885/1 diff --git a/languages/data/Names.php b/languages/data/Names.php index 994eb09..a7de1f9 100644 --- a/languages/data/Names.php +++ b/languages/data/Names.php @@ -84,7 +84,7 @@ 'bbc-latn' => 'Batak Toba', # Batak Toba 'bcc' => 'جهلسری بلوچی', # Southern Balochi 'bcl' => 'Bikol Central', # Bikol: Central Bicolano language - 'be' => 'беларуская', # Belarusian normative + 'be' => 'беларуская', # Belarusian normative 'be-tarask' => "беларуская (тарашкевіца)\xE2\x80\x8E", # Belarusian in Taraskievica orthography 'be-x-old' => "беларуская (тарашкевіца)\xE2\x80\x8E", # (be-tarask compat) 'bg' => 'български', # Bulgarian @@ -384,8 +384,8 @@ 'so' => 'Soomaaliga', # Somali 'sq' => 'shqip', # Albanian 'sr' => 'српски / srpski', # Serbian (multiple scripts - defaults to Cyrillic) - 'sr-ec' => "српски (ћирилица)\xE2\x80\x8E", # Serbian Cyrillic ekavian - 'sr-el' => "srpski (latinica)\xE2\x80\x8E", # Serbian Latin ekavian + 'sr-ec' => "српски (ћирилица)\xE2\x80\x8E", # Serbian Cyrillic ekavian + 'sr-el' => "srpski (latinica)\xE2\x80\x8E", # Serbian Latin ekavian 'srn' => 'Sranantongo', # Sranan Tongo 'ss' => 'SiSwati', # Swati 'st' => 'Sesotho', # Southern Sotho @@ -427,9 +427,9 @@ 'ug-latn' => 'Uyghurche', # Uyghur (Latin script) 'uk' => 'українська', # Ukrainian 'ur' => 'اردو', # Urdu - 'uz' => 'oʻzbekcha/ўзбекча',# Uzbek (multiple scripts - defaults to Latin) - 'uz-cyrl' => 'ўзбекча', # Uzbek Cyrillic - 'uz-latn' => 'oʻzbekcha', # Uzbek Latin (default) + 'uz' => 'oʻzbekcha/ўзбекча', # Uzbek (multiple scripts - defaults to Latin) + 'uz-cyrl' => 'ўзбекча', # Uzbek Cyrillic + 'uz-latn' => 'oʻzbekcha', # Uzbek Latin (default) 've' => 'Tshivenda', # Venda 'vec' => 'vèneto', # Venetian 'vep' => 'vepsän kel’', # Veps -- To view, visit https://gerrit.wikimedia.org/r/284885 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6a76de73fcfc21516fab7415057260e27e924696 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Special:Upload: Use user interface language for error message - change (mediawiki/core)
Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/284220 Change subject: Special:Upload: Use user interface language for error message .. Special:Upload: Use user interface language for error message This change also changes the error messages on exceptions in API calls from English to the content language when no uselang parameter is present. Bug: T133059 Change-Id: I75b3c9537a8805367d36a4e51453a9f9219c9555 --- M includes/title/MalformedTitleException.php M resources/src/mediawiki.special/mediawiki.special.upload.js 2 files changed, 5 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/20/284220/1 diff --git a/includes/title/MalformedTitleException.php b/includes/title/MalformedTitleException.php index 799961a..59b010c 100644 --- a/includes/title/MalformedTitleException.php +++ b/includes/title/MalformedTitleException.php @@ -44,9 +44,9 @@ $this->errorMessageParameters = $errorMessageParameters; // Supply something useful for Exception::getMessage() to return. - $enMsg = wfMessage( $errorMessage, $errorMessageParameters ); - $enMsg->inLanguage( 'en' )->useDatabase( false ); - parent::__construct( $enMsg->text() ); + $Msg = wfMessage( $errorMessage, $errorMessageParameters ); + $Msg->useDatabase( false ); + parent::__construct( $Msg->text() ); } /** diff --git a/resources/src/mediawiki.special/mediawiki.special.upload.js b/resources/src/mediawiki.special/mediawiki.special.upload.js index 49af809..4369e5d 100644 --- a/resources/src/mediawiki.special/mediawiki.special.upload.js +++ b/resources/src/mediawiki.special/mediawiki.special.upload.js @@ -70,7 +70,8 @@ // If title is empty, user input is invalid, the API call will produce details about why titles: title ? title.getPrefixedText() : this.nameToCheck, prop: 'imageinfo', - iiprop: 'uploadwarning' + iiprop: 'uploadwarning', + uselang: mw.config.get( 'wgUserLanguage' ) } ).done( function ( result ) { var resultOut = '', -- To view, visit https://gerrit.wikimedia.org/r/284220 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I75b3c9537a8805367d36a4e51453a9f9219c9555 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki.special.upload.js: Use formatversion=2 for API req... - change (mediawiki/core)
Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/283595 Change subject: mediawiki.special.upload.js: Use formatversion=2 for API requests .. mediawiki.special.upload.js: Use formatversion=2 for API requests This simplifies the processing of the response. Change-Id: I2073ec2c017e4d5c5c7f786b45118516feea1aac --- M resources/src/mediawiki.special/mediawiki.special.upload.js 1 file changed, 7 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/95/283595/1 diff --git a/resources/src/mediawiki.special/mediawiki.special.upload.js b/resources/src/mediawiki.special/mediawiki.special.upload.js index 8c89ed9..e912bd7 100644 --- a/resources/src/mediawiki.special/mediawiki.special.upload.js +++ b/resources/src/mediawiki.special/mediawiki.special.upload.js @@ -64,15 +64,15 @@ $spinnerDestCheck = $.createSpinner().insertAfter( '#wpDestFile' ); ( new mw.Api() ).get( { + formatversion: 2, action: 'query', titles: ( new mw.Title( this.nameToCheck, mw.config.get( 'wgNamespaceIds' ).file ) ).getPrefixedText(), prop: 'imageinfo', - iiprop: 'uploadwarning', - indexpageids: true + iiprop: 'uploadwarning' } ).done( function ( result ) { var resultOut = ''; if ( result.query ) { - resultOut = result.query.pages[ result.query.pageids[ 0 ] ].imageinfo[ 0 ]; + resultOut = result.query.pages[ 0 ].imageinfo[ 0 ].html; } $spinnerDestCheck.remove(); uploadWarning.processResult( resultOut, uploadWarning.nameToCheck ); @@ -80,8 +80,8 @@ }, processResult: function ( result, fileName ) { - this.setWarning( result.html ); - this.responseCache[ fileName ] = result.html; + this.setWarning( result ); + this.responseCache[ fileName ] = result; }, setWarning: function ( warning ) { @@ -117,6 +117,7 @@ $spinnerLicense = $.createSpinner().insertAfter( '#wpLicense' ); ( new mw.Api() ).get( { + formatversion: 2, action: 'parse', text: '{{' + license + '}}', title: $( '#wpDestFile' ).val() || 'File:Sample.jpg', @@ -129,7 +130,7 @@ }, processResult: function ( result, license ) { - this.responseCache[ license ] = result.parse.text[ '*' ]; + this.responseCache[ license ] = result.parse.text; this.showPreview( this.responseCache[ license ] ); }, -- To view, visit https://gerrit.wikimedia.org/r/283595 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2073ec2c017e4d5c5c7f786b45118516feea1aac Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki.special.upload.js: Remove spinner in .always() ins... - change (mediawiki/core)
Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/283594 Change subject: mediawiki.special.upload.js: Remove spinner in .always() instead of .done() .. mediawiki.special.upload.js: Remove spinner in .always() instead of .done() This removes the spinner even when the API request fails. Change-Id: Ic0f08312b9a1137772f5b6734256e7bd48d20fcf --- M resources/src/mediawiki.special/mediawiki.special.upload.js 1 file changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/94/283594/1 diff --git a/resources/src/mediawiki.special/mediawiki.special.upload.js b/resources/src/mediawiki.special/mediawiki.special.upload.js index 8c89ed9..945bfb0 100644 --- a/resources/src/mediawiki.special/mediawiki.special.upload.js +++ b/resources/src/mediawiki.special/mediawiki.special.upload.js @@ -74,8 +74,9 @@ if ( result.query ) { resultOut = result.query.pages[ result.query.pageids[ 0 ] ].imageinfo[ 0 ]; } - $spinnerDestCheck.remove(); uploadWarning.processResult( resultOut, uploadWarning.nameToCheck ); + } ).always( function () { + $spinnerDestCheck.remove(); } ); }, @@ -123,8 +124,9 @@ prop: 'text', pst: true } ).done( function ( result ) { - $spinnerLicense.remove(); uploadLicense.processResult( result, license ); + } ).always( function () { + $spinnerLicense.remove(); } ); }, -- To view, visit https://gerrit.wikimedia.org/r/283594 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic0f08312b9a1137772f5b6734256e7bd48d20fcf Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mw.Api: Replace deprecated token names by 'csrf' - change (mediawiki/core)
Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/283473 Change subject: mw.Api: Replace deprecated token names by 'csrf' .. mw.Api: Replace deprecated token names by 'csrf' Since 65077ede the deprecated token names like 'edit' or 'options' generate a warning. Change-Id: I1587f66bd9e5cdb8cc24cf68eced1d28ae22f44e --- M resources/src/mediawiki.action/mediawiki.action.edit.stash.js M resources/src/mediawiki/api.js M resources/src/mediawiki/api/edit.js M resources/src/mediawiki/api/options.js M resources/src/mediawiki/api/upload.js M tests/qunit/suites/resources/mediawiki.api/mediawiki.api.test.js 6 files changed, 11 insertions(+), 11 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/73/283473/1 diff --git a/resources/src/mediawiki.action/mediawiki.action.edit.stash.js b/resources/src/mediawiki.action/mediawiki.action.edit.stash.js index abe912d..20bfa0e 100644 --- a/resources/src/mediawiki.action/mediawiki.action.edit.stash.js +++ b/resources/src/mediawiki.action/mediawiki.action.edit.stash.js @@ -44,7 +44,7 @@ pending.abort(); } - api.getToken( 'edit' ).then( stashEdit ); + api.getToken( 'csrf' ).then( stashEdit ); } function onKeyPress( e ) { diff --git a/resources/src/mediawiki/api.js b/resources/src/mediawiki/api.js index 3bc0ad3..cc61fa2 100644 --- a/resources/src/mediawiki/api.js +++ b/resources/src/mediawiki/api.js @@ -274,7 +274,7 @@ * If we have a cached token try using that, and if it fails, blank out the * cached token and start over. For example to change an user option you could do: * -* new mw.Api().postWithToken( 'options', { +* new mw.Api().postWithToken( 'csrf', { * action: 'options', * optionname: 'gender', * optionvalue: 'female' diff --git a/resources/src/mediawiki/api/edit.js b/resources/src/mediawiki/api/edit.js index 22affb1..10ae626 100644 --- a/resources/src/mediawiki/api/edit.js +++ b/resources/src/mediawiki/api/edit.js @@ -15,7 +15,7 @@ * @return {jQuery.Promise} See #post */ postWithEditToken: function ( params, ajaxOptions ) { - return this.postWithToken( 'edit', params, ajaxOptions ); + return this.postWithToken( 'csrf', params, ajaxOptions ); }, /** @@ -26,7 +26,7 @@ * @return {string} return.done.token Received token. */ getEditToken: function () { - return this.getToken( 'edit' ); + return this.getToken( 'csrf' ); }, /** diff --git a/resources/src/mediawiki/api/options.js b/resources/src/mediawiki/api/options.js index bd6fa06..0af2a75 100644 --- a/resources/src/mediawiki/api/options.js +++ b/resources/src/mediawiki/api/options.js @@ -54,7 +54,7 @@ } } else { if ( value !== null ) { - deferreds.push( this.postWithToken( 'options', { + deferreds.push( this.postWithToken( 'csrf', { formatversion: 2, action: 'options', optionname: name, @@ -62,7 +62,7 @@ } ) ); } else { // Omitting value resets the option - deferreds.push( this.postWithToken( 'options', { + deferreds.push( this.postWithToken( 'csrf', { formatversion: 2, action: 'options', optionname: name @@ -72,7 +72,7 @@ } if ( grouped.length ) { - deferreds.push( this.postWithToken( 'options', { + deferreds.push( this.postWithToken( 'csrf', { formatversion: 2, action: 'options', change: grouped diff --git a/resources/src/mediawiki/api/upload.js b/resources/src/mediawiki/api/upload.js index a6a0d8c..3c8b3f6 100644 --- a/resources/src/medi
[MediaWiki-commits] [Gerrit] Simplify by using mw.util.getUrl() - change (mediawiki...Translate)
Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/283245 Change subject: Simplify by using mw.util.getUrl() .. Simplify by using mw.util.getUrl() Change-Id: I88d7e5f1dcda5506624d09d15db136d78b742e23 --- M Resources.php M resources/js/ext.translate.editor.helpers.js M resources/js/ext.translate.editor.js M resources/js/ext.translate.messagetable.js M resources/js/ext.translate.pagetranslation.uls.js M resources/js/ext.translate.quickedit.js 6 files changed, 18 insertions(+), 30 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/45/283245/1 diff --git a/Resources.php b/Resources.php index 301b85c..cde5140 100644 --- a/Resources.php +++ b/Resources.php @@ -236,7 +236,6 @@ 'scripts' => 'resources/js/ext.translate.pagetranslation.uls.js', 'dependencies' => array( 'ext.uls.mediawiki', - 'mediawiki.Uri', 'mediawiki.util', ), ) + $resourcePaths; diff --git a/resources/js/ext.translate.editor.helpers.js b/resources/js/ext.translate.editor.helpers.js index 55f5672..28762ac 100644 --- a/resources/js/ext.translate.editor.helpers.js +++ b/resources/js/ext.translate.editor.helpers.js @@ -534,15 +534,10 @@ * @return {string} URL for editing the documentation */ getDocumentationEditURL: function ( title ) { - var descUri = new mw.Uri( window.location.href ); - - descUri.path = mw.config.get( 'wgScript' ); - descUri.query = { - action: 'edit', - title: title + '/' + mw.config.get( 'wgTranslateDocumentationLanguageCode' ) - }; - - return descUri.toString(); + return mw.util.getUrl( + title + '/' + mw.config.get( 'wgTranslateDocumentationLanguageCode' ), + { action: 'edit' } + ); } } ); diff --git a/resources/js/ext.translate.editor.js b/resources/js/ext.translate.editor.js index 139365d..47038ec 100644 --- a/resources/js/ext.translate.editor.js +++ b/resources/js/ext.translate.editor.js @@ -823,18 +823,17 @@ */ validateTranslation: function () { var translateEditor = this, - url = new mw.Uri( mw.config.get( 'wgScript' ) ), + url, $textarea = translateEditor.$editor.find( '.tux-textarea-translation' ); // TODO: We need a better API for this - url.extend( { - title: 'Special:Translate/editpage', + url = mw.util.getUrl( 'Special:Translate/editpage', { suggestions: 'checks', page: translateEditor.message.title, loadgroup: translateEditor.message.group } ); - $.post( url.toString(), { + $.post( url, { translation: $textarea.val() }, function ( data ) { var warningIndex, diff --git a/resources/js/ext.translate.messagetable.js b/resources/js/ext.translate.messagetable.js index 4d4dac3..0623d65 100644 --- a/resources/js/ext.translate.messagetable.js +++ b/resources/js/ext.translate.messagetable.js @@ -259,8 +259,7 @@ $( '' ) .attr( { title: mw.msg( 'translate-edit-title', message.key ), - href: ( new mw.Uri( mw.util.getUrl( message.title ) ) ) - .extend( { action: 'edit' } ) + href: mw.util.getUrl( message.title, { action: 'edit' } ) } ) .text( mw.msg( 'tux-edit' ) ) ) @@ -378,8 +377,7 @@ .find( '.advanced-search' ) .text( mw.msg( 'tux-message-filter-result', resultCount, query ) ); $result.find( 'button' ).on( 'click', function () { - window.location.href = new mw.Uri( mw.util.getUrl( 'Special:SearchTranslations' ) ) -
[MediaWiki-commits] [Gerrit] SkinTemplate.php: Add missing @param documentation to wrapHTML - change (mediawiki/core)
Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/282210 Change subject: SkinTemplate.php: Add missing @param documentation to wrapHTML .. SkinTemplate.php: Add missing @param documentation to wrapHTML Follows-up to: cab0275c7 Change-Id: Ie40229e92c0ce93628811ed7da4224ea7c15e72a --- M includes/skins/SkinTemplate.php 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/10/282210/1 diff --git a/includes/skins/SkinTemplate.php b/includes/skins/SkinTemplate.php index 2d1679d..e5dc59f 100644 --- a/includes/skins/SkinTemplate.php +++ b/includes/skins/SkinTemplate.php @@ -260,6 +260,7 @@ * Wrap the body text with language information and identifiable element * * @param Title $title +* @param string $html body text * @return string html */ protected function wrapHTML( $title, $html ) { -- To view, visit https://gerrit.wikimedia.org/r/282210 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie40229e92c0ce93628811ed7da4224ea7c15e72a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use getUrl from mw.Title to generate the URL - change (mediawiki...ArticlePlaceholder)
Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/282204 Change subject: Use getUrl from mw.Title to generate the URL .. Use getUrl from mw.Title to generate the URL This allows to create articles with dot in the name like [[Node.js]]. Change-Id: Icb6bca4928c0c60c719dd3172972f544c3673d3b --- M extension.json M modules/ext.articleplaceholder.createArticle.js 2 files changed, 3 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ArticlePlaceholder refs/changes/04/282204/1 diff --git a/extension.json b/extension.json index 9987456..cc20541 100644 --- a/extension.json +++ b/extension.json @@ -34,8 +34,7 @@ "dependencies": [ "oojs-ui", "mediawiki.api", - "mediawiki.Title", - "mediawiki.util" + "mediawiki.Title" ], "messages": [ "articleplaceholder-abouttopic-create-article", diff --git a/modules/ext.articleplaceholder.createArticle.js b/modules/ext.articleplaceholder.createArticle.js index 68c77c9..9f3d1a4 100644 --- a/modules/ext.articleplaceholder.createArticle.js +++ b/modules/ext.articleplaceholder.createArticle.js @@ -23,8 +23,7 @@ titles: titleRaw } ).done( function ( data ) { var query = data.query, - title, - link; + title; if ( query && query.hasOwnProperty( 'pages' ) ) { if ( titleRaw !== titleInput.getValue() ) { @@ -33,9 +32,7 @@ if ( query.pages[ 0 ].missing ) { title = mw.Title.newFromUserInput( titleRaw, 0 ); - link = '?title=' + encodeURIComponent( title.getNameText() ) + '&action=edit'; - link = mw.util.wikiScript() + link; - document.location.href = link; + document.location.href = title.getUrl( { action: 'edit' } ); } else { deferred.reject( new OO.ui.Error( mw.msg( 'articleplaceholder-abouttopic-article-exists-error' ) -- To view, visit https://gerrit.wikimedia.org/r/282204 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icb6bca4928c0c60c719dd3172972f544c3673d3b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ArticlePlaceholder Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use formatversion=2 for API request - change (mediawiki...ArticlePlaceholder)
Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/281880 Change subject: Use formatversion=2 for API request .. Use formatversion=2 for API request This allows easier to check for a missing article. Change-Id: I7fbd47ef06fd2708897d424e587045664e2181f9 --- M modules/ext.articleplaceholder.createArticle.js 1 file changed, 6 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ArticlePlaceholder refs/changes/80/281880/1 diff --git a/modules/ext.articleplaceholder.createArticle.js b/modules/ext.articleplaceholder.createArticle.js index 161958e..68c77c9 100644 --- a/modules/ext.articleplaceholder.createArticle.js +++ b/modules/ext.articleplaceholder.createArticle.js @@ -17,19 +17,21 @@ mw.msg( 'articleplaceholder-abouttopic-create-article-mandatory' ) ) ); } else { - api.get( { action: 'query', titles: titleRaw } ).done( function ( data ) { + api.get( { + formatversion: 2, + action: 'query', + titles: titleRaw + } ).done( function ( data ) { var query = data.query, - pageKeys, title, link; if ( query && query.hasOwnProperty( 'pages' ) ) { - pageKeys = Object.keys( query.pages ); if ( titleRaw !== titleInput.getValue() ) { return; } - if ( pageKeys[ 0 ] === '-1' ) { + if ( query.pages[ 0 ].missing ) { title = mw.Title.newFromUserInput( titleRaw, 0 ); link = '?title=' + encodeURIComponent( title.getNameText() ) + '&action=edit'; link = mw.util.wikiScript() + link; -- To view, visit https://gerrit.wikimedia.org/r/281880 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7fbd47ef06fd2708897d424e587045664e2181f9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ArticlePlaceholder Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki.title: Reuse local variable fragment - change (mediawiki/core)
Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/281878 Change subject: mediawiki.title: Reuse local variable fragment .. mediawiki.title: Reuse local variable fragment Change-Id: Ifc1153ef3246a387d2343e68e5b5f3837dd809cd --- M resources/src/mediawiki/mediawiki.Title.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/78/281878/1 diff --git a/resources/src/mediawiki/mediawiki.Title.js b/resources/src/mediawiki/mediawiki.Title.js index c438d05..6859592 100644 --- a/resources/src/mediawiki/mediawiki.Title.js +++ b/resources/src/mediawiki/mediawiki.Title.js @@ -960,7 +960,7 @@ getUrl: function ( params ) { var fragment = this.getFragment(); if ( fragment ) { - return mw.util.getUrl( this.toString() + '#' + this.getFragment(), params ); + return mw.util.getUrl( this.toString() + '#' + fragment, params ); } else { return mw.util.getUrl( this.toString(), params ); } -- To view, visit https://gerrit.wikimedia.org/r/281878 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifc1153ef3246a387d2343e68e5b5f3837dd809cd Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Simplify by using mw.util.getUrl() instead of mw.util.wikiSc... - change (mediawiki/core)
Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/281649 Change subject: Simplify by using mw.util.getUrl() instead of mw.util.wikiScript() .. Simplify by using mw.util.getUrl() instead of mw.util.wikiScript() Change-Id: Ie10a5ee79846a4f1465fea7ce1b47da13b0787b7 --- M resources/Resources.php M resources/src/mediawiki/page/image-pagination.js M resources/src/mediawiki/page/watch.js 3 files changed, 4 insertions(+), 11 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/49/281649/1 diff --git a/resources/Resources.php b/resources/Resources.php index 6992de1..b206ba3 100644 --- a/resources/Resources.php +++ b/resources/Resources.php @@ -1680,7 +1680,6 @@ 'mediawiki.page.image.pagination' => [ 'scripts' => 'resources/src/mediawiki/page/image-pagination.js', 'dependencies' => [ - 'mediawiki.Uri', 'mediawiki.util', 'jquery.spinner', ], diff --git a/resources/src/mediawiki/page/image-pagination.js b/resources/src/mediawiki/page/image-pagination.js index a097b17..02bc1de 100644 --- a/resources/src/mediawiki/page/image-pagination.js +++ b/resources/src/mediawiki/page/image-pagination.js @@ -99,16 +99,14 @@ function bindPageNavigation( $container ) { $container.find( '.multipageimagenavbox' ).one( 'click', 'a', function ( e ) { - var page, uri; + var page, url; // Generate the same URL on client side as the one generated in ImagePage::openShowImage. // We avoid using the URL in the link directly since it could have been manipulated (bug 66608) page = Number( mw.util.getParamValue( 'page', this.href ) ); - uri = new mw.Uri( mw.util.wikiScript() ) - .extend( { title: mw.config.get( 'wgPageName' ), page: page } ) - .toString(); + url = mw.util.getUrl( mw.config.get( 'wgPageName' ), { page: page } ); - switchPage( uri ); + switchPage( url ); e.preventDefault(); } ); diff --git a/resources/src/mediawiki/page/watch.js b/resources/src/mediawiki/page/watch.js index 578c846..a57d5c7 100644 --- a/resources/src/mediawiki/page/watch.js +++ b/resources/src/mediawiki/page/watch.js @@ -46,11 +46,7 @@ .text( mw.msg( msgKey ) ) .attr( 'title', mw.msg( 'tooltip-ca-' + action ) ) .updateTooltipAccessKeys() - .attr( 'href', mw.util.wikiScript() + '?' + $.param( { - title: title, - action: action - } ) - ); + .attr( 'href', mw.util.getUrl( title, { action: action } ) ); // Most common ID style if ( $li.prop( 'id' ) === 'ca-' + otherAction ) { -- To view, visit https://gerrit.wikimedia.org/r/281649 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie10a5ee79846a4f1465fea7ce1b47da13b0787b7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Simplify autocomplete attribute in HTMLForm - change (mediawiki/core)
Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/280938 Change subject: Simplify autocomplete attribute in HTMLForm .. Simplify autocomplete attribute in HTMLForm Just use the boolean values instead of boolean and string values. Follows-up 7489a3e8 Change-Id: Ifb17c88e39df7031054b3bee83772172c64d0a6b --- M includes/Preferences.php M includes/htmlform/HTMLForm.php 2 files changed, 11 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/38/280938/1 diff --git a/includes/Preferences.php b/includes/Preferences.php index 66a8152..dccea3e 100644 --- a/includes/Preferences.php +++ b/includes/Preferences.php @@ -1301,7 +1301,7 @@ $htmlForm->setModifiedUser( $user ); $htmlForm->setId( 'mw-prefs-form' ); - $htmlForm->setAutocomplete( 'off' ); + $htmlForm->setAutocomplete( false ); $htmlForm->setSubmitText( $context->msg( 'saveprefs' )->text() ); # Used message keys: 'accesskey-preferences-save', 'tooltip-preferences-save' $htmlForm->setSubmitTooltip( 'preferences-save' ); diff --git a/includes/htmlform/HTMLForm.php b/includes/htmlform/HTMLForm.php index 25e7f8c..da6d584 100644 --- a/includes/htmlform/HTMLForm.php +++ b/includes/htmlform/HTMLForm.php @@ -200,11 +200,13 @@ protected $mAction = false; /** -* Form attribute autocomplete. false does not set the attribute +* Form attribute autocomplete. +* true does not set the attribute, because this is the HTML5 default +* false set the attribute to autocomplete="off" * @since 1.27 -* @var bool|string +* @var bool */ - protected $mAutocomplete = false; + protected $mAutocomplete = true; protected $mUseMultipart = false; protected $mHiddenFields = []; @@ -1004,8 +1006,8 @@ if ( !empty( $this->mId ) ) { $attribs['id'] = $this->mId; } - if ( !empty( $this->mAutocomplete ) ) { - $attribs['autocomplete'] = $this->mAutocomplete; + if ( $this->mAutocomplete === false ) { + $attribs['autocomplete'] = 'off'; } if ( !empty ( $this->mName ) ) { $attribs['name'] = $this->mName; @@ -1704,11 +1706,12 @@ /** * Set the value for the autocomplete attribute of the form. -* When set to false (which is the default state), the attribute get not set. +* When set to true (which is the default state), the attribute get not set. +* When set to false the attribute autocomplete="off" get set. * * @since 1.27 * -* @param string|bool $autocomplete +* @param bool $autocomplete * * @return HTMLForm $this for chaining calls */ -- To view, visit https://gerrit.wikimedia.org/r/280938 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifb17c88e39df7031054b3bee83772172c64d0a6b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove since MW 1.25 deprecated functions - change (mediawiki...UniversalLanguageSelector)
Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/280387 Change subject: Remove since MW 1.25 deprecated functions .. Remove since MW 1.25 deprecated functions In class ApiBase the methods * getParamDescription() * getDescription() * getExamples() are deprecated since MediaWiki 1.25. This change requires MediaWiki 1.25+. Change-Id: Ice6b310b8dea3a223f45317aa803a743b5daa680 --- M api/ApiLanguageSearch.php M api/ApiULSLocalization.php 2 files changed, 0 insertions(+), 54 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector refs/changes/87/280387/1 diff --git a/api/ApiLanguageSearch.php b/api/ApiLanguageSearch.php index d77aa26..7c30441 100644 --- a/api/ApiLanguageSearch.php +++ b/api/ApiLanguageSearch.php @@ -46,34 +46,6 @@ } /** -* @deprecated since MediaWiki core 1.25 -*/ - public function getParamDescription() { - return array( - 'search' => 'Search string', - 'typos' => 'Number of spelling mistakes allowed in the search string', - ); - } - - /** -* @deprecated since MediaWiki core 1.25 -*/ - public function getDescription() { - return 'Search for language names in any script'; - } - - /** -* @deprecated since MediaWiki core 1.25 -*/ - public function getExamples() { - return array( - 'api.php?action=languagesearch&search=Te', - 'api.php?action=languagesearch&search=ഫി', - 'api.php?action=languagesearch&search=ഫി&typos=1', - ); - } - - /** * @see ApiBase::getExamplesMessages() */ protected function getExamplesMessages() { diff --git a/api/ApiULSLocalization.php b/api/ApiULSLocalization.php index 8bcbe3e..fe011e0 100644 --- a/api/ApiULSLocalization.php +++ b/api/ApiULSLocalization.php @@ -55,32 +55,6 @@ } /** -* @deprecated since MediaWiki core 1.25 -*/ - public function getParamDescription() { - return array( - 'language' => 'Language string', - ); - } - - /** -* @deprecated since MediaWiki core 1.25 -*/ - public function getDescription() { - return 'Get the localization of ULS in given language'; - } - - /** -* @deprecated since MediaWiki core 1.25 -*/ - public function getExamples() { - return array( - 'api.php?action=ulslocalization&language=ta', - 'api.php?action=ulslocalization&language=hi', - ); - } - - /** * @see ApiBase::getExamplesMessages() */ protected function getExamplesMessages() { -- To view, visit https://gerrit.wikimedia.org/r/280387 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ice6b310b8dea3a223f45317aa803a743b5daa680 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader Gerrit-Reviewer: Gerrit Patch Uploader 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] Preferences: Add autocomplete="off" to preferences form - change (mediawiki/core)
Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/280154 Change subject: Preferences: Add autocomplete="off" to preferences form .. Preferences: Add autocomplete="off" to preferences form This change adds a new method setAutocomplete to the class HTMLForm. This method allows to set the HTML attribute autocomplete for the form. This change uses this method to set autocomplete="off" for the preferences form. Without autocomplete="off" the selections in the preferences get cached in the browser. This can lead to wrong selected options when the settings get changed on an other way, for example via API. Bug: T131047 Change-Id: I2920383b5b8cfca3f1d546315f202985edf417d8 --- M includes/Preferences.php M includes/htmlform/HTMLForm.php 2 files changed, 27 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/54/280154/1 diff --git a/includes/Preferences.php b/includes/Preferences.php index 54176a6..66a8152 100644 --- a/includes/Preferences.php +++ b/includes/Preferences.php @@ -1301,6 +1301,7 @@ $htmlForm->setModifiedUser( $user ); $htmlForm->setId( 'mw-prefs-form' ); + $htmlForm->setAutocomplete( 'off' ); $htmlForm->setSubmitText( $context->msg( 'saveprefs' )->text() ); # Used message keys: 'accesskey-preferences-save', 'tooltip-preferences-save' $htmlForm->setSubmitTooltip( 'preferences-save' ); diff --git a/includes/htmlform/HTMLForm.php b/includes/htmlform/HTMLForm.php index ba43244..bf46e55 100644 --- a/includes/htmlform/HTMLForm.php +++ b/includes/htmlform/HTMLForm.php @@ -198,6 +198,13 @@ */ protected $mAction = false; + /** +* Form attribute autocomplete. false does not set the attribute +* @since 1.27 +* @var bool|string +*/ + protected $mAutocomplete = false; + protected $mUseMultipart = false; protected $mHiddenFields = []; protected $mButtons = []; @@ -996,6 +1003,9 @@ if ( !empty( $this->mId ) ) { $attribs['id'] = $this->mId; } + if ( !empty( $this->mAutocomplete ) ) { + $attribs['autocomplete'] = $this->mAutocomplete; + } return $attribs; } @@ -1677,4 +1687,20 @@ return $this->getTitle()->getLocalURL(); } + + /** +* Set the value for the autocomplete attribute of the form. +* When set to false (which is the default state), the attribute get not set. +* +* @since 1.27 +* +* @param string|bool $autocomplete +* +* @return HTMLForm $this for chaining calls +*/ + public function setAutocomplete( $autocomplete ) { + $this->mAutocomplete = $autocomplete; + + return $this; + } } -- To view, visit https://gerrit.wikimedia.org/r/280154 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2920383b5b8cfca3f1d546315f202985edf417d8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits