Commit 7ace5f30 authored by Penny Leach's avatar Penny Leach
Browse files

renamed prefname -> preferredname in search

parent e56aab83
......@@ -50,7 +50,7 @@ class PluginSearchInternal extends PluginSearch {
* institution => string,
* firstname => string,
* lastname => string,
* prefname => string,
* preferredname => string,
* email => string,
* ),
* array(
......@@ -59,7 +59,7 @@ class PluginSearchInternal extends PluginSearch {
* institution => string,
* firstname => string,
* lastname => string,
* prefname => string,
* preferredname => string,
* email => string,
* ),
* array(...),
......@@ -70,13 +70,13 @@ class PluginSearchInternal extends PluginSearch {
if ( is_postgres() ) {
$data = get_rows_sql("
SELECT
id, username, institution, firstname, lastname, prefname, email
id, username, institution, firstname, lastname, preferredname, email
FROM
" . get_config('dbprefix') . "usr u
WHERE
firstname ILIKE '%' || ? || '%'
OR lastname ILIKE '%' || ? || '%'
OR prefname ILIKE '%' || ? || '%'
OR preferredname ILIKE '%' || ? || '%'
OR email ILIKE '%' || ? || '%'
",
array($query_string, $query_string, $query_string, $query_string),
......@@ -92,7 +92,7 @@ class PluginSearchInternal extends PluginSearch {
WHERE
firstname ILIKE '%' || ? || '%'
OR lastname ILIKE '%' || ? || '%'
OR prefname ILIKE '%' || ? || '%'
OR preferredname ILIKE '%' || ? || '%'
OR email ILIKE '%' || ? || '%'
",
array($query_string, $query_string, $query_string, $query_string),
......
......@@ -44,13 +44,14 @@ abstract class PluginSearch {
* limit => integer, // how many results are returned
* offset => integer, // starting from which result
* results => array( // the result records
* array(
* id => integer,
* username => string,
* institution => string,
* firstname => string,
* lastname => string,
* prefname => string,
* preferredname => string,
* email => string,
* ),
* array(
......@@ -59,7 +60,7 @@ abstract class PluginSearch {
* institution => string,
* firstname => string,
* lastname => string,
* prefname => string,
* preferredname => string,
* email => string,
* ),
* array(...),
......
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