Commit graph

7 commits

Author SHA1 Message Date
Umherirrender 88aa29cb72 Replace deprecated Http::get
Bug: T305813
Change-Id: Ief91d92c556244c36dfcec23f770319bd2f2c537
2022-12-11 14:18:17 +01:00
libraryupgrader 66ba87913d build: Updating composer dependencies
* mediawiki/mediawiki-codesniffer: 35.0.0 → 36.0.0
* php-parallel-lint/php-parallel-lint: 1.2.0 → 1.3.0

Change-Id: I11808cfb01de67037062e03f0db4268418e65b49
2021-05-04 03:05:13 +00:00
ZabeMath 7e23848ac9 Avoid using User::getBoolOption()
User::getBoolOption() is deprecated and should be replaced with UserOptionsLookup::getBoolOption()

Bug: T277600
Change-Id: I562b19ca41a7ef18be940ec398d58d6873b2555b
2021-03-30 20:31:57 +00:00
Florian Schmidt 6634e8c829 Enable GeoLocation service being replaced by other providers
Making GeoLocation an interface makes it easier to replace the underlying implementation
from the current Http backed method.

Change-Id: I2beb97772fd74ab08b2214c08d82dbc1ebfcdcd2
2019-11-21 17:31:23 +01:00
Florian Schmidt 90d2e58096 Move classes into CookieWarning namespace
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
2018-07-19 12:57:52 +02:00
Florian Schmidt 6f519c9618 Add caching functionality for IP lookup
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
2018-07-18 16:03:29 +02:00
Florian Schmidt fed15fd7a5 Refactor Hooks code and move it to separate services
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
2018-07-18 12:59:17 +02:00