plugins onAutoload now only overloads if necessary (extlibs etc.)
lib/plugin.php now has a parent onAutoload function that finds most common files that are used in plugins (actions, dataobjects, forms, libs etc.) if they are put in the standardised directories ('actions', 'classes', 'forms', 'lib' and perhaps some others in the future).
This commit is contained in:
@@ -62,28 +62,6 @@ class ModPlusPlugin extends Plugin
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Autoloader
|
||||
*
|
||||
* Loads our classes if they're requested.
|
||||
*
|
||||
* @param string $cls Class requested
|
||||
*
|
||||
* @return boolean hook return
|
||||
*/
|
||||
function onAutoload($cls)
|
||||
{
|
||||
switch ($cls)
|
||||
{
|
||||
case 'RemoteprofileAction':
|
||||
case 'RemoteProfileAction':
|
||||
require_once dirname(__FILE__) . '/remoteprofileaction.php';
|
||||
return false;
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add ModPlus-related paths to the router table
|
||||
*
|
||||
|
Reference in New Issue
Block a user