htmlform: Use `::isValidRange()` instead of deprecated `::isValidBlock()`
authorDerick Alangi <alangiderick@gmail.com>
Thu, 9 May 2019 14:27:43 +0000 (15:27 +0100)
committerUmherirrender <umherirrender_de.wp@web.de>
Thu, 9 May 2019 16:36:05 +0000 (16:36 +0000)
Only 1 usage of this call in everywhere, see usage below. Once this is merged,
the method can be hard deprecated and later killed.

Usage
=====

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

Change-Id: Ic00f760a0a214faba7a71dd088da1dc25ecb796c

includes/htmlform/fields/HTMLUserTextField.php

index d672314..5b3bc25 100644 (file)
@@ -65,7 +65,7 @@ class HTMLUserTextField extends HTMLTextField {
        protected function isValidIPRange( $value ) {
                $cidrIPRanges = $this->mParams['iprangelimits'];
 
-               if ( !IP::isValidBlock( $value ) ) {
+               if ( !IP::isValidRange( $value ) ) {
                        return false;
                }