summaryrefslogtreecommitdiff
path: root/plugins/Autocomplete/AutocompletePlugin.php
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Autocomplete/AutocompletePlugin.php')
-rw-r--r--plugins/Autocomplete/AutocompletePlugin.php15
1 files changed, 12 insertions, 3 deletions
diff --git a/plugins/Autocomplete/AutocompletePlugin.php b/plugins/Autocomplete/AutocompletePlugin.php
index d586631a4..b2be365dd 100644
--- a/plugins/Autocomplete/AutocompletePlugin.php
+++ b/plugins/Autocomplete/AutocompletePlugin.php
@@ -22,7 +22,8 @@
* @category Plugin
* @package StatusNet
* @author Craig Andrews <candrews@integralblue.com>
- * @copyright 2009 Craig Andrews http://candrews.integralblue.com
+ * @copyright 2010 Free Software Foundation http://fsf.org
+ * @copyright 2009 Free Software Foundation, Inc http://www.fsf.org
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
@@ -31,8 +32,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
exit(1);
}
-require_once(INSTALLDIR.'/plugins/Autocomplete/autocomplete.php');
-
class AutocompletePlugin extends Plugin
{
function __construct()
@@ -40,6 +39,16 @@ class AutocompletePlugin extends Plugin
parent::__construct();
}
+ function onAutoload($cls)
+ {
+ switch ($cls)
+ {
+ case 'AutocompleteAction':
+ require_once(INSTALLDIR.'/plugins/Autocomplete/autocomplete.php');
+ return false;
+ }
+ }
+
function onEndShowScripts($action){
if (common_logged_in()) {
$action->script('plugins/Autocomplete/jquery-autocomplete/jquery.autocomplete.pack.js');