Commit 2a5afb25 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Remove conflict markers

parent fb94a3b1
......@@ -189,73 +189,6 @@ class PluginSearchInternal extends PluginSearch {
OR description ILIKE '%' || ? || '%'
)
",
<<<<<<< master
array($USER->get('id'), $query_string, $query_string)
);
}
// TODO
// else if ( is_mysql() ) {
// }
else {
throw new SQLException('search_group() is not implemented for your database engine (' . get_config('dbtype') . ')');
}
return array(
'count' => $count,
'limit' => $limit,
'offset' => $offset,
'data' => $data,
);
}
/**
* Implement community searching with SQL
*
* @param string The query string
* @param integer How many results to return
* @param integer What result to start at (0 == first result)
* @return array A data structure containing results looking like ...
* $results = array(
* count => integer, // total number of results
* limit => integer, // how many results are returned
* offset => integer, // starting from which result
* data => array( // the result records
* array(
* id => integer,
* username => string,
* institution => string,
* firstname => string,
* lastname => string,
* preferredname => string,
* email => string,
* ),
* array(
* id => integer,
* username => string,
* institution => string,
* firstname => string,
* lastname => string,
* preferredname => string,
* email => string,
* ),
* array(...),
* ),
* );
*/
public static function search_community($query_string, $limit, $offset = 0) {
global $USER;
if ( is_postgres() ) {
$data = get_records_sql_array("
SELECT
id, name, description, jointype, owner, ctime, mtime
FROM
" . get_config('dbprefix') . "community
WHERE
name ILIKE '%' || ? || '%'
OR description ILIKE '%' || ? || '%'
",
array($query_string, $query_string),
=======
array($USER->get('id'), $query_string, $query_string)
);
}
......
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