@@ 872-884 (lines=13) @@ | ||
869 | * @throws MWException |
|
870 | * @return string IP in Hex form |
|
871 | */ |
|
872 | public function getRangeStart() { |
|
873 | switch ( $this->type ) { |
|
874 | case self::TYPE_USER: |
|
875 | return ''; |
|
876 | case self::TYPE_IP: |
|
877 | return IP::toHex( $this->target ); |
|
878 | case self::TYPE_RANGE: |
|
879 | list( $start, /*...*/ ) = IP::parseRange( $this->target ); |
|
880 | return $start; |
|
881 | default: |
|
882 | throw new MWException( "Block with invalid type" ); |
|
883 | } |
|
884 | } |
|
885 | ||
886 | /** |
|
887 | * Get the IP address at the end of the range in Hex form |
|
@@ 891-903 (lines=13) @@ | ||
888 | * @throws MWException |
|
889 | * @return string IP in Hex form |
|
890 | */ |
|
891 | public function getRangeEnd() { |
|
892 | switch ( $this->type ) { |
|
893 | case self::TYPE_USER: |
|
894 | return ''; |
|
895 | case self::TYPE_IP: |
|
896 | return IP::toHex( $this->target ); |
|
897 | case self::TYPE_RANGE: |
|
898 | list( /*...*/, $end ) = IP::parseRange( $this->target ); |
|
899 | return $end; |
|
900 | default: |
|
901 | throw new MWException( "Block with invalid type" ); |
|
902 | } |
|
903 | } |
|
904 | ||
905 | /** |
|
906 | * Get the user id of the blocking sysop |