Commit graph

14 commits

Author SHA1 Message Date
Thalia
9f23090c65 Document that IP::toHex should not be used for IP ranges
This is worth documenting because the method confusingly works for
IPv6 ranges, but returns false for IPv4 ranges.

Change-Id: I99b5b7fd43c51564f73e4daec230f59877e203be
2019-10-28 15:19:08 +00:00
Derick Alangi
0bffecb8ff IP: Remove unused deprecated ::isValidBlock() method
This method was deprecated in 1.30 and no longer used in our code
bases.

Usage
=====

https://codesearch.wmflabs.org/search/?q=%5CbisValidBlock%5Cb&i=nope&files=&repos=

Change-Id: I26e11c0d88fe7c82c052c1cf8e0bbc33bd99de70
2019-05-17 20:43:32 +01:00
Derick Alangi
b623cc318d IP: Hard deprecate IP::isValidBlock() in favor of ::isValidRange()
`IP::isValidRange()` replaces deprecated `IP::isValidBlock()` and after
Ic00f760a0a214f is landed, no usage will remain so hard deprecating it
in preparation for removal in after the 1.34 cut.

Depends-On: Ic00f760a0a214faba7a71dd088da1dc25ecb796c
Change-Id: I6943e45c06dbb954e2156dc4e796ddf3553b7a76
2019-05-09 18:53:04 +01:00
Kunal Mehta
8c98f51778 Fix PhanUnextractableAnnotation* errors (#7)
Change-Id: I8194a7b9c9abce951002590030913706e9bd743e
2019-04-05 23:20:07 -07:00
Bartosz Dziewoński
4fd27f006f Use PHP 5.6 '**' operator instead of 'pow()' function
Change-Id: Ieb22e1dbfcffaa4e7b3dcfabbcc999e5dd59a4bf
2018-05-30 18:05:19 -07:00
Brad Jorsch
57445f0425 IP: Fix sanitization of IPv4 ranges
'000.000.000.000/24' should sanitize to '0.0.0.0/24', not
'0.0.0.000/24'.

Change-Id: I9364cb268dcc9b9b24aa1c627a87482978c4cf34
2018-05-23 10:34:20 -04:00
Reedy
86d7bd86fa Update IPSet use statements
Bug: T182273
Change-Id: I73fb52678dc56a542eccd209441557610b562d4b
2018-01-21 04:37:26 +00:00
Umherirrender
f739a8f368 Improve some parameter docs
Add missing @return and @param to function docs and fixed some @param

Change-Id: I810727961057cfdcc274428b239af5975c57468d
2017-09-10 20:32:31 +02:00
MusikAnimal
a23183010e Rename IP::isValidBlock to isValidRange, deprecating the former
This is to remove confusion with the MediaWiki Block class.

All instances of isValidBlock within MediaWiki core have been updated.

Usage of this function will be more widespread with this patch:
https://gerrit.wikimedia.org/r/#/c/349457/

Change-Id: Ice1bdae3d16cf365da14c6df0e8d91d2b914e067
2017-08-29 18:26:12 +00:00
Kunal Mehta
2534fa4db0 IP: Remove unused static member $proxyIpSet
Change-Id: Ia48ec2eb1281d955bc28f5c78a1501f3d46826c0
2017-08-21 21:32:08 -07:00
Kunal Mehta
d1cf48a397 build: Update mediawiki/mediawiki-codesniffer to 0.10.1
And auto-fix all errors.

The `<exclude-pattern>` stanzas are now included in the default ruleset
and don't need to be repeated.

Change-Id: I928af549dc88ac2c6cb82058f64c7c7f3111598a
2017-07-22 18:24:09 -07:00
Aaron Schulz
82e2c924e4 Remove "@author Aaron Schulz" annotations
Bug: T139301
Change-Id: Ib5248e8e27d60611c7373bce4b29dd5e85aa3489
2017-06-27 15:24:14 -07:00
James D. Forrester
b715f432f4 includes/libs: Replace implicit Bugzilla bug numbers with Phab ones
It's unreasonable to expect newbies to know that "bug 12345" means "Task T14345"
except where it doesn't, so let's just standardise on the real numbers.

Skipping jsminplus.php as those bug numbers aren't Wikimedia's, nor obviously
someone else's.

Change-Id: I9a2210e17852ee56f11282b980ac66d8c7a95671
2017-02-21 18:13:08 +00:00
Kunal Mehta
04dfd9b6bc Move IP class to libs/
Also fix some misplaced parenthesis in IPTest.

Change-Id: I84d6120c49f733ec45e7e0005259871808b7568b
2016-09-21 20:18:08 -07:00
Renamed from includes/utils/IP.php (Browse further)