]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/OStatus/OStatusPlugin.php
autoloading of Crypt_AES and Crypt_RSA is easier
[quix0rs-gnu-social.git] / plugins / OStatus / OStatusPlugin.php
index 5b7147ebee661ae79999574e1be4a7c579c5b4c6..d1eea869a7569e56aef96746ea78d38689cc0abe 100644 (file)
@@ -83,6 +83,20 @@ class OStatusPlugin extends Plugin
         return true;
     }
 
+    public function onAutoload($cls)
+    {
+        switch ($cls) {
+        case 'Crypt_AES':
+        case 'Crypt_RSA':
+            // Crypt_AES becomes Crypt/AES.php which is found in extlib/phpseclib/
+            // which has been added to our include_path before
+            require_once str_replace('_', '/', $cls) . '.php';
+            return false;
+        }
+
+        return parent::onAutoload($cls);
+    }
+
     /**
      * Set up queue handlers for outgoing hub pushes
      * @param QueueManager $qm