]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
OpenIDPlugin autoloads class files
authorEvan Prodromou <evan@controlyourself.ca>
Tue, 4 Aug 2009 11:40:41 +0000 (07:40 -0400)
committerEvan Prodromou <evan@controlyourself.ca>
Tue, 4 Aug 2009 17:01:23 +0000 (13:01 -0400)
plugins/OpenID/OpenIDPlugin.php

index f76fe1e3c01b65b9db8104107d95724ae1aecf60..5d600159bf9c3c6908907da2c56663604edc6191 100644 (file)
@@ -99,4 +99,24 @@ class OpenIDPlugin extends Plugin
 
         return true;
     }
+
+    function onAutoload($cls)
+    {
+        switch ($cls)
+        {
+         case 'OpenidloginAction':
+         case 'FinishopenidloginAction':
+         case 'FinishaddopenidAction':
+         case 'XrdsAction':
+         case 'PublicxrdsAction':
+         case 'OpenidsettingsAction':
+            require_once(INSTALLDIR.'/plugins/OpenID/' . strtolower(mb_substr($cls, 0, -6)) . '.php');
+            return false;
+         case 'User_openid':
+            require_once(INSTALLDIR.'/plugins/OpenID/User_openid.php');
+            return false;
+         default:
+            return true;
+        }
+    }
 }
\ No newline at end of file