summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authorJoffrey Jaffeux <j.jaffeux@gmail.com>2012-06-06 20:14:13 +0200
committerJoffrey Jaffeux <j.jaffeux@gmail.com>2012-06-06 20:14:13 +0200
commit1ab6f6520ebfc016c49cfbe3a4d9d009be5da268 (patch)
tree341443396a38e4e96d7fd08973e3b10bde9c8047 /system
parent70b5d3b4eb74ad27da7eac29ef5d349be944ba15 (diff)
removed ip_version()
Diffstat (limited to 'system')
-rwxr-xr-xsystem/core/Input.php22
1 files changed, 1 insertions, 21 deletions
diff --git a/system/core/Input.php b/system/core/Input.php
index c1f2086c4..b986c4973 100755
--- a/system/core/Input.php
+++ b/system/core/Input.php
@@ -383,27 +383,7 @@ class CI_Input {
*/
public function valid_ip($ip)
{
- if ($this->ip_version($ip) === 4)
- {
- return (bool) filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4);
- }
- else
- {
- return (bool) filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6);
- }
- }
-
- // --------------------------------------------------------------------
-
- /**
- * Return ip version
- *
- * @param string
- * @return int
- */
- public function ip_version($ip)
- {
- return strpos($ip, ":") === FALSE ? 4 : 6;
+ return (bool) filter_var($ip, FILTER_VALIDATE_IP);
}
// --------------------------------------------------------------------