autoloading of Crypt_AES and Crypt_RSA is easier
This commit is contained in:
parent
684b9419a0
commit
4238875ebe
@ -41,6 +41,7 @@ class LRDDPlugin extends Plugin
|
|||||||
|
|
||||||
return parent::onAutoload($cls);
|
return parent::onAutoload($cls);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function onStartDiscoveryMethodRegistration(Discovery $disco) {
|
public function onStartDiscoveryMethodRegistration(Discovery $disco) {
|
||||||
$disco->registerMethod('LRDDMethod_WebFinger');
|
$disco->registerMethod('LRDDMethod_WebFinger');
|
||||||
}
|
}
|
||||||
|
@ -83,6 +83,20 @@ class OStatusPlugin extends Plugin
|
|||||||
return true;
|
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
|
* Set up queue handlers for outgoing hub pushes
|
||||||
* @param QueueManager $qm
|
* @param QueueManager $qm
|
||||||
|
Loading…
Reference in New Issue
Block a user