Fix function names

develop
Steve Allison 2013-02-20 21:05:21 +00:00
parent 70055d4d76
commit d4168396ba
1 changed files with 2 additions and 2 deletions

View File

@ -39,7 +39,7 @@ class defense extends rcube_plugin {
* @param array ip/cidr addresses to match against * @param array ip/cidr addresses to match against
* @return bool * @return bool
*/ */
private isIPinArray($ip, $array) { private function isIPinArray($ip, $array) {
foreach ($array as $value) { foreach ($array as $value) {
if (strpos($value, '/') === false) && ($ip == $value) { return true; } if (strpos($value, '/') === false) && ($ip == $value) { return true; }
if (isIPinCIDR($ip, $value)) { return true; } if (isIPinCIDR($ip, $value)) { return true; }
@ -53,7 +53,7 @@ class defense extends rcube_plugin {
* @param string cidr address * @param string cidr address
* @return bool * @return bool
*/ */
private isIPinCIDR($ip, $cidr) { private function isIPinCIDR($ip, $cidr) {
list($subnet, $mask) = explode('/', $cidr); list($subnet, $mask) = explode('/', $cidr);
return ((ip2long($ip) & ~((1 << (32 - $mask)) - 1) ) == ip2long($subnet)); return ((ip2long($ip) & ~((1 << (32 - $mask)) - 1) ) == ip2long($subnet));
} }