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:
Mikael Nordfeldth
2013-08-28 15:54:26 +02:00
parent b6cfcfbcaa
commit de55d8f83b
282 changed files with 227 additions and 1423 deletions

View File

@@ -74,29 +74,6 @@ class MapstractionPlugin extends Plugin
return true;
}
/**
* Hook for autoloading classes
*
* This makes sure our classes get autoloaded from our directory
*
* @param string $cls name of class being used
*
* @return boolean event handler return
*/
function onAutoload($cls)
{
switch ($cls)
{
case 'AllmapAction':
case 'UsermapAction':
case 'MapAction':
include_once INSTALLDIR.'/plugins/Mapstraction/' . strtolower(mb_substr($cls, 0, -6)) . '.php';
return false;
default:
return true;
}
}
/**
* Hook for adding extra JavaScript
*