]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/Autocomplete/AutocompletePlugin.php
change the location and title of the feeds section
[quix0rs-gnu-social.git] / plugins / Autocomplete / AutocompletePlugin.php
index d586631a4a09dd4542784c1c7c0c2b239c9b137c..b2be365dd64547d69a58da0ca25214362f574b2f 100644 (file)
@@ -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');