The change 4649d2110f requires 1.32+
because it depends on I0afdc8ab50bc1354bb5099bf39923c07eab0b665 from
core included in 1.32.
Change-Id: Ia2582b6598024dd229df615df50b7d1a9eb9116b
If any error occured during locating the IP address, the extension should
assume, that the user is in a configured region and show the cookie warning,
if not already dismissed.
Bug: T200077
Change-Id: Ib7f0dd0a135071924281a576ab24887d5e226435
This should make the code a bit more structured and easier to navigate
through. It also removes some lines from extension.json as the autoload
classes list is replaced by an autoload namespaces property.
This also changes the minimum requirement of MediaWiki to 1.31 for this
extension to work.
Change-Id: I249ccc3035297c99202a5f83fcc8d3fda68b682c
Instead of always looking up a single IP address, even for multiple
requests, cache the result of the first lookup. IP addresses usually
doesn't move that fast, caching the result should therefore be
reasonably ok.
Change-Id: Ice78ec08ff886e77c542a75086610498eaa6c6b4
This cleans up the hook file a lot and movesthe logic to seperate services
provided by MediaWikiServices. This also removes some setters and passed-
around variables and stuff. Also fixes the unit tests by not querying
external services anymore.
Change-Id: I0c3c0b7f2f5bd68aaad624e8e2dcad9bdcf97770
* Instead of repeating CSS already in Minerva instead use an element
"banner-container" already in use by CentralNotice (given this is also a banner)
This removes the need for positioning styles at Minerva is delegated to handle that.
* Rewrite existing rules using mediawiki ui variables to make clearer line-height
relates to iconography
Bug: T140807
Change-Id: I1bd3fb164bbb7866e5d32367c66afae5c1933bcb
If geolocation is done at client-side, it was displaying the warning without
checking the dismissed cookie. Now the main module will remove it if the cookie
exists, and the geolocation service won't display it again.
The idea of doing geolocation at client side rather than server side is to
allow more pages cached at varnish/squid, but it still required to let the
dismissed cookie break the cache. With this change, the dismissed cookie can
be blocked at the varnish/squid level, all pages will contain the cookie
warning notice, but it will be left hidden by the client-side script instead
of displaying it.
In addition, the click handler for .mw-cookiewarning-dismiss has been put
inside a DOMready handler to prevent this code fire before the element becomes
available.
Bug: T183657
Change-Id: I5f7505dbd650867155485d17fff58fb92800581b
The following sniffs now pass and were enabled:
* MediaWiki.Commenting.FunctionComment.MissingParamComment
Change-Id: I1d87621329f7721ad8c9dbff4b84a10fcbef92a2
The following sniffs are failing and were disabled:
* Generic.Files.OneObjectStructurePerFile.MultipleFound
The following sniffs now pass and were enabled:
* MediaWiki.Files.OneClassPerFile.MultipleFound
Change-Id: I117b86a89a7d5a85f0d20bc7daa261ca438ca6e9