Adding support for 3rd party bake tasks

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@3413 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
dho 2006-08-20 08:16:04 +00:00
parent 5db9faa1df
commit d9a8b09653

View file

@ -75,8 +75,14 @@
function executeTask($taskName, $params) { function executeTask($taskName, $params) {
$scriptDir = dirname(__FILE__); $scriptDir = dirname(__FILE__);
$taskPath = 'tasks'.DS.$taskName.'_task.php';
require($scriptDir.DS.'tasks'.DS.'task.php'); require($scriptDir.DS.'tasks'.DS.'task.php');
require($scriptDir.DS.'tasks'.DS.$taskName.'_task.php');
if (file_exists(VENDORS.$taskPath)) {
require(VENDORS.$taskPath);
} else {
require($scriptDir.DS.$taskPath);
}
$className = $taskName.'Task'; $className = $taskName.'Task';
$class = new $className; $class = new $className;