User::getBoolOption() is deprecated and should be replaced with UserOptionsLookup::getBoolOption()
Bug: T277600
Change-Id: I562b19ca41a7ef18be940ec398d58d6873b2555b
There's a lot of things going on here, so a quick summary:
* Moved the warning outside sitenotice to avoid reflows and all
kinds of other issues, including those with dismissable notices.
* Placed the warning on the bottom of the page, on all skins, for
consistency and to avoid obstructing vital UI elements such as
site name, user tools, search box.
* Changed the UI to use OOUI for, again, consistency and to avoid
reinventing the wheel with button styling.
* Removed the cookie emoji as it was only taking up valuable space
on mobile and making designing a sensible layout much harder.
* Merged the mobile and desktop RL modules into a single, responsive
one. The warning will work correctly for any skin and screen width.
* The integration tests are truly horrible, I tried to at least
make them work. They deserve a proper rewrite, but that should be
done after the extension switches to the new hook system.
I will post screenshots of this in action in the first of the linked
tasks.
Bug: T271047
Bug: T173335
Change-Id: I6e2a3d7aeccc0d4df1b3238e52c67e72099d27d8
Use an anonymous class to implement QuickTemplate instead of relying on a
specific implementation that no longer exists.
Change-Id: Ifbd47e6fa3aff8c1969e8510edbfd16507025ed2
Making GeoLocation an interface makes it easier to replace the underlying implementation
from the current Http backed method.
Change-Id: I2beb97772fd74ab08b2214c08d82dbc1ebfcdcd2
Also fix tests relying on MessageCache. MessageCache is enabled in setup,
however, as setMwGlobals is resetting services, it gets disabled again.
Instead of setting the configuration to enable the use of database
messages, let's enable the message cache after the last reset of services.
Change-Id: Iff670def50ab15054099f7a1ca3adc119bd877ce
Directly use the UTF-8 encoding of the 'NO-BREAK SPACE' (U+00A0) instead of
the HTML/XML entitiy  .
Also use \u{1F36A} instead of 🍪 for Unicode Character 'COOKIE'
(U+1F36A).
Bug: T154300
Change-Id: I13536589a4c183215785fe3352f4fc081571451b
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
With this change, CookieWarning gets two new ways to limit the warning
bar to users of specific (configurable) regions. Based on the geo location
service (which can be configured, too, defaults to freegeoip.net), the
extension will try to get the region of the user (based on the IP address)
and checks it against the configured regions.
With the configuration variable $wgCookieWarningGeoIPLookup, the wiki sysadmin
can configure, if the lookup should be done with PHP (the timeout for the
request is hardcoded to 2 sedonds max), which will save the paylod sent to
the user, or with JavaScript, which will be asynchronous.
Deactivating this feature is easily done by simply setting the configured regions
to false, instead of an object.
Bug: T145780
Change-Id: I4d9371b8608ef270c11c42bdb3a773675977ab3a
Instead of just the configuration variable $wgCookieWarningMoreUrl,
CookirWarning now allows also to set the link on-wiki using the interface
message MediaWiki:Cookiewarning-more-link. It also "listens" for the
MediaWiki:Cookie-policy-link interface message, which is introduced by
Cookie Policy as a first step for merging these both extensions.
Bug: T145781
Change-Id: I818008b2da6d9acd4295857e2916cd1b4637bee9