Commit Graph

3087 Commits

Author SHA1 Message Date
libraryupgrader
6131e48cf7 build: Updating mediawiki/phan-taint-check-plugin to 1.5.0
Change-Id: I2d9a3bb9148ded333008cc198e155dfd0a8fd294
2018-09-08 06:30:27 +00:00
Fomafix
971e4c742d Simplify by using native JavaScript instead of jQuery
Still use $.each for iterating over an Object because there is no
adequate function in ES5.

Change-Id: Idbec13c471e75a9cd5d67204d54bededdbd5582b
2018-09-07 22:35:13 +00:00
Niklas Laxström
1857627c2f Drop support for discontinued freegeoip.net
There is a new service called ipstack, but their free option does
not support https, so by default there will not be any geoip service.

Bug: T199106
Change-Id: I9f4e59d736b50760f50c6214e2d191e72406d0d9
2018-09-07 19:45:21 +00:00
Timo Tijhof
4e067715dc Remove redundant closure aliases
'mw' are '$' are globals, always have been, and aren't going
anywhere. They're every bit as real as their longer versions.
If anything, the longer ones are less "real" or 'stable" because
they're not used internally by RL and easier to accidentally
replace or override. For anecdotes and history, see 91f950d6b0.

Change-Id: I526fb8c961d9477992d88f2780a0ff4cbdc51923
2018-09-07 19:23:17 +00:00
Timo Tijhof
e58be7c411 ext.uls.eventlogger: Remove unused $.Callbacks() indirection
It is created, unconditionally fired only once (right after creation),
and then used only with add(), which becomes a synchronous
self-call.

I've searched in Wikimedia Git and Codesearch, and found no uses
of `logEventQueue` or `mw.uls.eventlogger` outside this file.

Change-Id: I3832bcb409fc919c2078e583d50e20413dede163
2018-09-07 19:23:03 +00:00
Amire80
635cada69b Revert "Simplify by using native JavaScript instead of jQuery"
This reverts commit 0fbdbc2c41.

Bug: T203750
Change-Id: I1bca27b2087f6fc1bfad153f17f4650c52786a7f
2018-09-07 08:57:16 +00:00
Alangi Derick
445087e5fe Add recent pattern for ESLinting to repo
Use of all: '.' in Gruntfile.js for eslint config and
eslintIgnore in package.json to ignore linting the "vendor/"
etc directory.

Bug: T203648
Change-Id: I65756ab3b6f413021cedeb22c7933c6cffa2cb78
2018-09-06 18:05:42 +00:00
Translation updater bot
aec177a2a6 Localisation updates from https://translatewiki.net.
Change-Id: Idaaa67fae847507016b0049032aca7c886c42acf
2018-09-06 09:02:26 +02:00
Niklas Laxström
51d86ad5bb Move now static ext.uls.compactlinks to extension.json
Change-Id: Ie074918ca58de4c62a6ba44caa48d429e561bb6b
2018-09-06 05:43:53 +00:00
Kunal Mehta
8ee09f0ba1 Allow $wgULSLanguageDetection to work if $wgULSAnonCanChangeLanguage is false
$wgULSAnonCanChangeLanguage is documented as just affecting setting of
language for anonymous users via cookies and &setlang=. But currently it also
affects the fallback to Accept-Language if $wgULSLanguageDetection is enabled.

With this, $wgULSAnonCanChangeLanguage will now only control whether cookies
and &setlang= can be used for anonymous users, and keeps
$wgULSLanguageDetection independent.

Bug: T203179
Change-Id: I6c664ad11dc18b66190dc0644352b91adf87c9e5
2018-09-06 02:28:30 +00:00
Kunal Mehta
aa23d555a3 Vary caching on Accept-Language header if it is used
If we use the Accept-Language header to determine the interface language,
we need to vary caching on it so that a user with a different Accept-Language
header won't get the wrong language out of the cache.

Note that for optimal cache hitrates, you might want to implement parsing of
the header in your cache itself.

Bug: T203179
Change-Id: I976696cf20a5da5b2767c87e0d754a901b711a46
2018-09-05 01:53:44 +00:00
Translation updater bot
32416b09c3 Localisation updates from https://translatewiki.net.
Change-Id: I60ff82aec215d4551c90825a6e8c0f4d78cd4caf
2018-09-04 22:19:52 +02:00
Fomafix
931982d728 Fix module loading on MediaWiki 1.31 and earlier
368fe37a1a is broken when used on MediaWiki 1.31 and earlier because
it tries to add

  $modules['ext.uls.displaysettings']['dependencies'][]

although $modules['ext.uls.displaysettings'] does not exist.

The whole module definition must moved from extension.json to
UniversalLanguageSelector.hooks.php.

Change-Id: Ie8f7f084c965e6dee33fef03448004d5d8805f2c
2018-09-04 07:04:49 +00:00
Fomafix
0fbdbc2c41 Simplify by using native JavaScript instead of jQuery
Change-Id: I2ca5fbb21ac473f482579a944e5ab68c9374191c
2018-09-04 00:32:12 +00:00
Translation updater bot
295527552f Localisation updates from https://translatewiki.net.
Change-Id: I34451c701bc52c58f3d3e493d513fd8a26005244
2018-09-03 22:15:43 +02:00
Amir Aharoni
2e0eaca6de Update jquery.uls from upstream
Updating to https://github.com/wikimedia/jquery.uls/commit/248e43a7
* Localization update for nap, tly, zgh
* Update language-data

Change-Id: I877298d03394d3dea21235a67a311538a1fe849b
2018-09-03 11:13:20 +00:00
Fomafix
368fe37a1a Remove dependencies on deprecated modules 'mediawiki.api.*'
In core, modules 'mediawiki.api.*' got merged into 'mediawiki.api'
and deprecated in I0afdc8ab50bc1354bb5099bf39923c07eab0b665 included
in MediaWiki 1.32.

This change does not increase the version requirement in extension.json
to "MediaWiki": ">= 1.32.0" because it adds the removed dependencies
for earlier versions of MediaWiki in a hook.

Bug: T196802
Bug: T200168
Change-Id: I27dd62fae7a470549dd533f16c145cb023b16181
2018-09-02 20:02:19 +00:00
Translation updater bot
de08026454 Localisation updates from https://translatewiki.net.
Change-Id: Idaae491cb70a9c8c9f4fa64c02603e03d1c670a2
2018-09-01 22:33:47 +02:00
libraryupgrader
fe11e256b6 build: Updating mediawiki/phan-taint-check-plugin to 1.4.0
Change-Id: I2331f466c2ddfc2c8e78e9cd7a95b3b72c87205e
2018-09-01 15:12:32 +00:00
Fomafix
72fb42cdba Remove support for MediaWiki 1.29 and earlier
extension.json already requires "MediaWiki": ">= 1.30.0".

Change-Id: Ic460e6364967cd7b0367e66f613077c424bd8f19
2018-08-31 21:41:42 +00:00
Translation updater bot
137fb70a75 Localisation updates from https://translatewiki.net.
Change-Id: Idead0b486d767870c2b78cdc2283f19fdc6cb7c0
2018-08-31 22:17:29 +02:00
petarpetkovic
3f93207d04 Use 1.30 as minimum required version
Change-Id: I1a77c933efbcc4cfedd84ee361fc8b1c175fd38f
2018-08-31 14:35:24 +00:00
Niklas Laxström
fa9cea4627 Support UI language change when global preferences are present
Notable changes:
* First query global preferences to detect if global language setting
  is in use. If there is no global language setting, or if GlobalPreferences
  extension is not installed, it will fall back to changing the language
  as usual. If global language setting is found, it will add an override
  instead.
* If a local override is added, the undo tooltip is different and links to
  the global preferences page. The task design shows mw.notify style popup
  located on a bottom right corner (LTR). I deviate from the design and
  re-use the old undo tooltip with a different message instead, for
  consistency. The message is chosen depending on whether local storage
  value `uls-gp` is set to '1' (set in mw.uls.changeLanguage).
* I removed one use of deprecated mediawiki.api.options module. One other
  use still remains.
* I changed tooltip text generation from html acrobatics to use
  mw.message.parseDom. Because of that I also had to move the click handler
  to avoid buildup of click handlers.
* In message documentation fixed acronym -> autonym.

Bug: T198206
Change-Id: Ie2ed792e222be919522bd1cdea98042515a0619d
2018-08-30 22:40:17 +00:00
Translation updater bot
2e5e57d92c Localisation updates from https://translatewiki.net.
Change-Id: Ie984e9584577b6fe228944d00da8c09144f9d188
2018-08-27 22:17:52 +02:00
Translation updater bot
2ca8ed7905 Localisation updates from https://translatewiki.net.
Change-Id: I25416619294fcda3aeb6226a824a9cee03bc8fa0
2018-08-26 22:32:59 +02:00
petarpetkovic
5a1da4dbaa Remove jQuery.inArray usages
Replace jQuery.inArray with JS native Array.prototype.indexOf

Change-Id: I0031f0385e440a34846334d158425182542a9ac9
2018-08-24 20:18:53 +00:00
petarpetkovic
54a3313e1a Remove jQuery.grep usages
Replace jQuery.grep with native JS Array.prototype.filter method.

Change-Id: Idbf88a516061ff46211f72e8b93e11f5fa838e88
2018-08-24 20:43:33 +02:00
petarpetkovic
6ce67b8dda Use JS native methods for array manipulations
* In mw.uls.addPreviousLanguage, jQuery.map was used for what is
essentially filtering, not mapping. Filtering was used to remove
one element from array. Use Array.prototype.splice instead.
* In mw.uls.getFrequentLanguageList, replace:
- jQuery.each with Array.prototype.forEach
- jQuery.inArray with Array.prototype.indexOf
- jQuery.grep with Array.prototype.filter

Change-Id: Id2208b3c89e982f91f49981d18e588ae8ce3b130
2018-08-24 20:07:49 +02:00
Fomafix
cd32adcb37 Remove deprecated PHP entry point
Directly use

	wfLoadExtension( 'UniversalLanguageSelector' );

in LocalSettings.php instead.

Change-Id: I4739cabd03c106ba527c06d85fea01c7513e9d3c
2018-08-24 06:25:48 +02:00
Translation updater bot
c020c26c93 Localisation updates from https://translatewiki.net.
Change-Id: I3acfe249b80dfc435ce5161d01b363b05ba327d5
2018-08-21 23:38:57 +02:00
Translation updater bot
337d0995b8 Localisation updates from https://translatewiki.net.
Change-Id: I2eeadce89c255ed81c2275a8b8c097951c10ce7a
2018-08-20 22:21:08 +02:00
Translation updater bot
bb782e8f7c Localisation updates from https://translatewiki.net.
Change-Id: I2483eb39fd2e4322055194ae2039c222bd8663b1
2018-08-19 22:39:11 +02:00
libraryupgrader
addd8d4b60 build: Updating mediawiki/phan-taint-check-plugin to 1.3.0
And updating CoC link to use Special:MyLanguage (T202047).

Change-Id: I0a142b4fa06f279ff1321625da2f92337b6c9b01
2018-08-19 17:30:24 +00:00
Zoranzoki21
04da95c3da Fix 'accross' typo
Bug: T201491
Change-Id: I428769d2d95c64413184d92596e23077bd3c01d7
2018-08-19 09:39:17 +00:00
Translation updater bot
a66ef9bca2 Localisation updates from https://translatewiki.net.
Change-Id: I1eb4578f6b11ddb8465a2fd766378ac5ef36d191
2018-08-17 23:36:54 +02:00
Translation updater bot
3eed7cf879 Localisation updates from https://translatewiki.net.
Change-Id: I682860d46df2ad3d55f39bb7797acbfff9b22cb1
2018-08-16 22:28:56 +02:00
Niklas Laxström
677ec1fe01 Update jquery.ime to 4b92dee
Bug: T188767
Change-Id: I4308f8fc4f03122225f71db991d15f36c4d19f6f
2018-08-15 15:54:38 +02:00
Translation updater bot
eda80d8334 Localisation updates from https://translatewiki.net.
Change-Id: I20d702ca571083e2f033cfcc77c7d3dd564b356a
2018-08-11 22:18:34 +02:00
Thiemo Kreuz
f2e2e640c6 Avoid counting where not necessary
Change-Id: Iaae939780df26066de40e1584492865cb0ac80a7
2018-08-10 14:42:41 +00:00
Thiemo Kreuz
6d714e1fc7 Update @covers tags of LanguageSearchTest
That second class (which is generated by the LanguageNameIndexer script)
is an integral part of the class under test.

Change-Id: I7d8dc66b4d1e86684e0de3e585d9e0a544640159
2018-08-09 19:46:14 +02:00
Translation updater bot
ba5c2a605d Localisation updates from https://translatewiki.net.
Change-Id: Ie7ff759f16d7c649cc26ba4634d7d54dc918b91d
2018-08-08 22:14:22 +02:00
petarpetkovic
134c9b134f Remove duplicated usage of article "the"
Bug: T201491
Change-Id: Id6ee7ace11e7fbadd0323642c06021f89362e9f2
2018-08-08 14:36:33 +02:00
Translation updater bot
bd25960e31 Localisation updates from https://translatewiki.net.
Change-Id: I7e8e2c062d6337b760f39ea3542a62be5785a35d
2018-08-07 22:32:18 +02:00
jhsoby
fb01a543ef Update jquery.uls from upstream
* Localisation update for gcr, my
* Add Bunun (bnn)
* Add Fang (fan)
* Add Garhwali (gbm)

Updating to
c4323800df

Change-Id: Ib798aeaa3982a86f106aa03f2d9eaf5ddc2ed23c
2018-08-07 14:21:38 +02:00
Kunal Mehta
aed02d61b4 Configure phan-taint-check-plugin
The plugin checks and flags potential security issues (XSS, SQLi, etc.)
using static analysis.

See <https://www.mediawiki.org/wiki/Phan-taint-check-plugin> for more
details.

Bug: T201219
Change-Id: Ib603ba19787c7f08e4d088ed6698eca87b60532b
2018-08-03 21:31:55 -07:00
Translation updater bot
de3ce09738 Localisation updates from https://translatewiki.net.
Change-Id: Ie639bba66fe0bee1b62181fcf88c49948093ffb1
2018-08-01 22:10:53 +02:00
Translation updater bot
9ef371af12 Localisation updates from https://translatewiki.net.
Change-Id: I233b16587d36aaeeb47d0ba2b28c07b3f9f3584a
2018-07-31 22:33:22 +02:00
Translation updater bot
8f6e9b6ede Localisation updates from https://translatewiki.net.
Change-Id: Ie86d818346179dab0fe82e7d3c37e1d3c8706fac
2018-07-29 22:21:27 +02:00
Translation updater bot
ae661715cf Localisation updates from https://translatewiki.net.
Change-Id: Ib8d410fcf51a29e99962ce10fc45e51b082a0311
2018-07-28 22:30:14 +02:00
Translation updater bot
233463f0ed Localisation updates from https://translatewiki.net.
Change-Id: I6d3c46b76563fb3233e6660cbac5c7c29fa9a55d
2018-07-27 22:18:18 +02:00