From: Greg Sabino Mullane Date: Tue, 23 Jan 2007 14:47:12 +0000 (+0000) Subject: Add searchableIPs differentiator X-Git-Tag: 1.31.0-rc.0~54208 X-Git-Url: https://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=934d8c41e40fb4f302f74cfaced8eccfbf924110;p=lhc%2Fweb%2Fwiklou.git Add searchableIPs differentiator --- diff --git a/includes/Database.php b/includes/Database.php index ae16bb2b79..2678e1c9c1 100644 --- a/includes/Database.php +++ b/includes/Database.php @@ -375,6 +375,14 @@ class Database { return true; } + /** + * Returns true if this database can do a native search on IP columns + * e.g. this works as expected: .. WHERE rc_ip = '127.42.12.102/32'; + */ + function searchableIPs() { + return false; + } + /**#@+ * Get function */ diff --git a/includes/DatabasePostgres.php b/includes/DatabasePostgres.php index beabb8879f..44b0a5897b 100644 --- a/includes/DatabasePostgres.php +++ b/includes/DatabasePostgres.php @@ -41,6 +41,10 @@ class DatabasePostgres extends Database { return false; } + function searchableIPs() { + return true; + } + static function newFromParams( $server = false, $user = false, $password = false, $dbName = false, $failFunction = false, $flags = 0) {