|
@@ 1867-1870 (lines=4) @@
|
| 1864 |
|
if ( isset( $limits['ip-all'] ) ) { |
| 1865 |
|
$ip = $this->getRequest()->getIP(); |
| 1866 |
|
// ignore if user limit is more permissive |
| 1867 |
|
if ( $isNewbie || $userLimit === false |
| 1868 |
|
|| $limits['ip-all'][0] / $limits['ip-all'][1] > $userLimit[0] / $userLimit[1] ) { |
| 1869 |
|
$keys["mediawiki:limiter:$action:ip-all:$ip"] = $limits['ip-all']; |
| 1870 |
|
} |
| 1871 |
|
} |
| 1872 |
|
|
| 1873 |
|
// subnet-based limits for all ping-limitable users |
|
@@ 1877-1884 (lines=8) @@
|
| 1874 |
|
if ( isset( $limits['subnet-all'] ) ) { |
| 1875 |
|
$ip = $this->getRequest()->getIP(); |
| 1876 |
|
$subnet = IP::getSubnet( $ip ); |
| 1877 |
|
if ( $subnet !== false ) { |
| 1878 |
|
// ignore if user limit is more permissive |
| 1879 |
|
if ( $isNewbie || $userLimit === false |
| 1880 |
|
|| $limits['ip-all'][0] / $limits['ip-all'][1] |
| 1881 |
|
> $userLimit[0] / $userLimit[1] ) { |
| 1882 |
|
$keys["mediawiki:limiter:$action:subnet-all:$subnet"] = $limits['subnet-all']; |
| 1883 |
|
} |
| 1884 |
|
} |
| 1885 |
|
} |
| 1886 |
|
|
| 1887 |
|
$cache = ObjectCache::getLocalClusterInstance(); |