summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Autocomplete/AutocompletePlugin.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/plugins/Autocomplete/AutocompletePlugin.php b/plugins/Autocomplete/AutocompletePlugin.php
index d586631a4..b2b18bf27 100644
--- a/plugins/Autocomplete/AutocompletePlugin.php
+++ b/plugins/Autocomplete/AutocompletePlugin.php
@@ -31,8 +31,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
exit(1);
}
-require_once(INSTALLDIR.'/plugins/Autocomplete/autocomplete.php');
-
class AutocompletePlugin extends Plugin
{
function __construct()
@@ -40,6 +38,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');