Commit 285244d0 authored by Geoff Cant's avatar Geoff Cant Committed by Geoff Cant
Browse files

Factoring out the postgres specific bits of search_user into a separate function.

parent 9edab31c
......@@ -76,6 +76,13 @@ class PluginSearchInternal extends PluginSearch {
}
$prefix = get_config('dbprefix');
if ( is_postgres() ) {
return search_user_pg($query_string, $limit, $offset, $prefix, $publicfields);
} else {
throw new SQLException('search_user() is not implemented for your database engine (' . get_config('dbtype') . ')');
}
}
public static function search_user_pg($query_string, $limit, $offset, $prefix, $publicfields) {
$fieldlist = "('" . join("','", $publicfields) . "')";
$count = get_field_sql('
......@@ -136,13 +143,6 @@ class PluginSearchInternal extends PluginSearch {
else {
$data = false;
}
}
// TODO
// else if ( is_mysql() ) {
// }
else {
throw new SQLException('search_user() is not implemented for your database engine (' . get_config('dbtype') . ')');
}
return array(
'count' => $count,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment