Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
c64fb9bd
Commit
c64fb9bd
authored
Feb 07, 2007
by
Martyn Smith
Committed by
Martyn Smith
Feb 07, 2007
Browse files
Move search functions to base class, fix comments
parent
66ab651f
Changes
2
Hide whitespace changes
Inline
Side-by-side
htdocs/search/internal/lib.php
View file @
c64fb9bd
...
...
@@ -171,22 +171,20 @@ class PluginSearchInternal extends PluginSearch {
* 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,
* id => integer,
* name => string,
* owner => integer,
* description => string,
* ctime => string,
* mtime => string,
* ),
* array(
* id => integer,
* username => string,
* institution => string,
* firstname => string,
* lastname => string,
* preferredname => string,
* email => string,
* id => integer,
* name => string,
* owner => integer,
* description => string,
* ctime => string,
* mtime => string,
* ),
* array(...),
* ),
...
...
@@ -256,21 +254,21 @@ class PluginSearchInternal extends PluginSearch {
* data => array( // the result records
* array(
* id => integer,
*
user
name => string,
*
institu
tion => string,
*
firstname
=> string,
*
lastname
=> string,
*
preferredname
=> string,
*
email
=> string,
* name
=> string,
*
descrip
tion => string,
*
jointype
=> string,
*
owner
=> string,
*
ctime
=> string,
*
mtime
=> string,
* ),
* array(
* id => integer,
*
user
name => string,
*
institu
tion => string,
*
firstname
=> string,
*
lastname
=> string,
*
preferredname
=> string,
*
email
=> string,
* name
=> string,
*
descrip
tion => string,
*
jointype
=> string,
*
owner
=> string,
*
ctime
=> string,
*
mtime
=> string,
* ),
* array(...),
* ),
...
...
htdocs/search/lib.php
View file @
c64fb9bd
...
...
@@ -70,6 +70,81 @@ abstract class PluginSearch extends Plugin {
* );
*/
public
static
abstract
function
search_user
(
$query_string
,
$limit
,
$offset
=
0
);
/**
* Given a query string and limits, return an array of matching groups
*
* @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
abstract
function
search_group
(
$query_string
,
$limit
,
$offset
=
0
);
/**
* 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)
* @param boolean Return all matching communities, or just ones this user
* is a member of?
* @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,
* name => string,
* description => string,
* jointype => string,
* owner => string,
* ctime => string,
* mtime => string,
* ),
* array(
* id => integer,
* name => string,
* description => string,
* jointype => string,
* owner => string,
* ctime => string,
* mtime => string,
* ),
* array(...),
* ),
* );
*/
public
static
abstract
function
search_community
(
$query_string
,
$limit
,
$offset
=
0
,
$all
=
false
);
}
?>
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment