Commit c797fe15 authored by Penny Leach's avatar Penny Leach
Browse files

mahara now considers search to be a grown up plugin and installs it

(also fixed some phpdoc comment in search)
parent 00ad2e08
...@@ -208,6 +208,59 @@ ...@@ -208,6 +208,59 @@
<KEY NAME="subscruk" TYPE="unique" FIELDS="plugin,event,callfunction" /> <KEY NAME="subscruk" TYPE="unique" FIELDS="plugin,event,callfunction" />
</KEYS> </KEYS>
</TABLE> </TABLE>
<!-- search plugin tables -->
<TABLE NAME="search_installed">
<FIELDS>
<FIELD NAME="name" TYPE="char" LENGTH="255" NOTNULL="true" />
<FIELD NAME="version" TYPE="int" LENGTH="10" NOTNULL="true" />
<FIELD NAME="release" TYPE="text" LENGTH="small" NOTNULL="true" />
<FIELD NAME="active" TYPE="int" LENGTH="1" NOTNULL="true" DEFAULT="1" />
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="name" />
</KEYS>
</TABLE>
<TABLE NAME="search_config">
<FIELDS>
<FIELD NAME="plugin" TYPE="char" LENGTH="100" NOTNULL="true" />
<FIELD NAME="field" TYPE="char" LENGTH="100" NOTNULL="true" />
<FIELD NAME="value" TYPE="text" LENGTH="small" NOTNULL="true" />
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="plugin,field" />
<KEY NAME="pluginfk" TYPE="foreign" FIELDS="plugin" REFTABLE="search_installed" REFFIELDS="name" />
</KEYS>
</TABLE>
<TABLE NAME="search_cron">
<FIELDS>
<FIELD NAME="plugin" TYPE="char" LENGTH="255" NOTNULL="true" />
<FIELD NAME="callfunction" TYPE="char" LENGTH="255" NOTNULL="true" />
<FIELD NAME="nextrun" TYPE="datetime" NOTNULL="false" />
<FIELD NAME="minute" TYPE="char" LENGTH="25" NOTNULL="true" DEFAULT="*" />
<FIELD NAME="hour" TYPE="char" LENGTH="25" NOTNULL="true" DEFAULT="*" />
<FIELD NAME="day" TYPE="char" LENGTH="25" NOTNULL="true" DEFAULT="*" />
<FIELD NAME="month" TYPE="char" LENGTH="25" NOTNULL="true" DEFAULT="*" />
<FIELD NAME="dayofweek" TYPE="char" LENGTH="25" NOTNULL="true" DEFAULT="*" />
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="plugin,callfunction" />
<KEY NAME="pluginfk" TYPE="foreign" FIELDS="plugin" REFTABLE="search_installed" REFFIELDS="name" />
</KEYS>
</TABLE>
<TABLE NAME="search_event_subscription">
<FIELDS>
<FIELD NAME="id" TYPE="int" LENGTH="10" SEQUENCE="true" NOTNULL="true" />
<FIELD NAME="plugin" TYPE="char" LENGTH="255" NOTNULL="true" />
<FIELD NAME="event" TYPE="char" LENGTH="50" NOTNULL="true" />
<FIELD NAME="callfunction" TYPE="char" LENGTH="255" NOTNULL="true" />
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id" />
<KEY NAME="pluginfk" TYPE="foreign" FIELDS="plugin" REFTABLE="search_installed" REFFIELDS="name" />
<KEY NAME="eventfk" TYPE="foreign" FIELDS="event" REFTABLE="event_type" REFFIELDS="name" />
<KEY NAME="subscruk" TYPE="unique" FIELDS="plugin,event,callfunction" />
</KEYS>
</TABLE>
<!-- artefact plugin tables --> <!-- artefact plugin tables -->
<TABLE NAME="artefact_installed"> <TABLE NAME="artefact_installed">
<FIELDS> <FIELDS>
......
...@@ -642,7 +642,7 @@ function get_site_page_content($pagename) { ...@@ -642,7 +642,7 @@ function get_site_page_content($pagename) {
function plugin_types() { function plugin_types() {
static $pluginstocheck; static $pluginstocheck;
if (empty($pluginstocheck)) { if (empty($pluginstocheck)) {
$pluginstocheck = array('artefact', 'auth', 'notification'); $pluginstocheck = array('artefact', 'auth', 'notification', 'search');
} }
return $pluginstocheck; return $pluginstocheck;
} }
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
defined('INTERNAL') || die(); defined('INTERNAL') || die();
/** /**
* The internal authentication method, which authenticates users against the * The internal search plugin which searches against the
* Mahara database. * Mahara database.
*/ */
class PluginSearchInternal extends PluginSearch { class PluginSearchInternal extends PluginSearch {
......
<?php
/**
* This program is part of Mahara
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
* @package mahara
* @subpackage search-internal
* @author Martyn Smith <martyn@catalyst.net.nz>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL
* @copyright (C) 2006,2007 Catalyst IT Ltd http://catalyst.net.nz
*
*/
defined('INTERNAL') || die();
$config->version = 2006111600;
$config->release = '0.1';
?>
\ No newline at end of file
...@@ -30,7 +30,7 @@ defined('INTERNAL') || die(); ...@@ -30,7 +30,7 @@ defined('INTERNAL') || die();
* Base search class. Provides a common interface with which searches can be * Base search class. Provides a common interface with which searches can be
* carried out. * carried out.
*/ */
abstract class PluginSearch { abstract class PluginSearch extends Plugin {
/** /**
* Given a query string and limits, return an array of matching users * Given a query string and limits, return an array of matching users
......
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