]> git.pld-linux.org Git - packages/php-pear-Net_IPv6.git/blob - Net_IPv6-static.patch
- drop obsolete and outdated manual inclusion of rpm macros
[packages/php-pear-Net_IPv6.git] / Net_IPv6-static.patch
1 diff -urN Net_IPv6-1.2.1.org/Net/IPv6.php Net_IPv6-1.2.1/Net/IPv6.php
2 --- Net_IPv6-1.2.1.org/Net/IPv6.php     2011-02-07 22:41:59.000000000 +0100
3 +++ Net_IPv6-1.2.1/Net/IPv6.php 2017-12-08 11:59:42.918728932 +0100
4 @@ -146,7 +146,7 @@
5       * @access public
6       * @static     
7       */
8 -    function separate($ip) 
9 +    public static function separate($ip) 
10      {
11          
12          $addr = $ip;
13 @@ -184,7 +184,7 @@
14       * @access public
15       * @static
16       */
17 -    function removeNetmaskSpec($ip)
18 +    public static function removeNetmaskSpec($ip)
19      {
20  
21          $elements = Net_IPv6::separate($ip);
22 @@ -210,7 +210,7 @@
23       * @see removeNetmaskSpec()
24       * @deprecated
25       */
26 -    function removePrefixLength($ip)
27 +    public static function removePrefixLength($ip)
28      {
29          $pos = strrpos($ip, '/');
30  
31 @@ -236,7 +236,7 @@
32       * @access public
33       * @static
34       */
35 -    function getNetmaskSpec($ip) 
36 +    public static function getNetmaskSpec($ip) 
37      {
38  
39          $elements = Net_IPv6::separate($ip);
40 @@ -262,7 +262,7 @@
41       * @static
42       * @deprecated
43       */
44 -    function getPrefixLength($ip) 
45 +    public static function getPrefixLength($ip) 
46      {
47          if (preg_match("/^([0-9a-fA-F:]{2,39})\/(\d{1,3})*$/", 
48                          $ip, $matches)) {
49 @@ -292,7 +292,7 @@
50       * @access public
51       * @static
52       */
53 -    function getNetmask($ip, $bits = null)
54 +    public static function getNetmask($ip, $bits = null)
55      {
56          if (null==$bits) {
57  
58 @@ -342,7 +342,7 @@
59       * @access public
60       * @static
61       */
62 -    function isInNetmask($ip, $netmask, $bits=null)
63 +    public static function isInNetmask($ip, $netmask, $bits=null)
64      {
65          // try to get the bit count
66  
67 @@ -425,7 +425,7 @@
68       * @see    NET_IPV6_LOOPBACK  
69       * @see    NET_IPV6_UNKNOWN_TYPE
70       */
71 -    function getAddressType($ip) 
72 +    public static function getAddressType($ip) 
73      {
74          $ip    = Net_IPv6::removeNetmaskSpec($ip);
75          $binip = Net_IPv6::_ip2Bin($ip);
76 @@ -508,7 +508,7 @@
77       * Uncompresses an IPv6 adress
78       *
79       * RFC 2373 allows you to compress zeros in an adress to '::'. This
80 -     * function expects an valid IPv6 adress and expands the '::' to
81 +     * public static function expects an valid IPv6 adress and expands the '::' to
82       * the required zeros.
83       *
84       * Example:  FF01::101  ->  FF01:0:0:0:0:0:0:101
85 @@ -526,7 +526,7 @@
86       * @static
87       * @author Pascal Uhlmann
88       */
89 -    function uncompress($ip, $leadingZeros = false)
90 +    public static function uncompress($ip, $leadingZeros = false)
91      {
92  
93          $prefix = Net_IPv6::getPrefixLength($ip);
94 @@ -648,7 +648,7 @@
95       * Compresses an IPv6 adress
96       *
97       * RFC 2373 allows you to compress zeros in an adress to '::'. This
98 -     * function expects an valid IPv6 adress and compresses successive zeros
99 +     * public static function expects an valid IPv6 adress and compresses successive zeros
100       * to '::'
101       *
102       * Example:  FF01:0:0:0:0:0:0:101   -> FF01::101
103 @@ -672,7 +672,7 @@
104       * @static
105       * @author elfrink at introweb dot nl
106       */
107 -    function compress($ip, $force = false)  
108 +    public static function compress($ip, $force = false)  
109      {
110          
111          if(false !== strpos($ip, '::')) { // its already compressed
112 @@ -762,7 +762,7 @@
113       * @static
114       * @author Manuel Schmitt
115       */
116 -    function isCompressible($ip) 
117 +    public static function isCompressible($ip) 
118      {
119  
120          return (bool)($ip != Net_IPv6::compress($address));
121 @@ -790,7 +790,7 @@
122       * @access public
123       * @static
124       */
125 -    function SplitV64($ip, $uncompress = true)
126 +    public static function SplitV64($ip, $uncompress = true)
127      {
128          $ip = Net_IPv6::removeNetmaskSpec($ip);
129  
130 @@ -829,7 +829,7 @@
131       * @access public
132       * @static
133       */
134 -    function checkIPv6($ip)
135 +    public static function checkIPv6($ip)
136      {
137          $ip = Net_IPv6::removePrefixLength($ip);
138          $ip = Net_IPv6::removeNetmaskSpec($ip);
139 @@ -926,7 +926,7 @@
140       * @author Nicholas Williams
141       */
142  
143 -    function parseAddress($ipToParse, $bits = null)
144 +    public static function parseAddress($ipToParse, $bits = null)
145      {
146  
147          $ip      = null;
148 @@ -982,7 +982,7 @@
149       * @access private
150       @ @since 1.1.0
151       */
152 -    function _ip2Bin($ip) 
153 +    protected static function _ip2Bin($ip) 
154      {
155          $binstr = '';
156  
157 @@ -1013,7 +1013,7 @@
158       * @access private
159       @ @since 1.1.0
160       */
161 -    function _bin2Ip($bin)
162 +    protected static function _bin2Ip($bin)
163      {
164          $ip = "";
165  
This page took 0.11282 seconds and 3 git commands to generate.