mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 19:38:26 +00:00
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:
parent
5db9faa1df
commit
d9a8b09653
1 changed files with 7 additions and 1 deletions
|
@ -75,8 +75,14 @@
|
|||
|
||||
function executeTask($taskName, $params) {
|
||||
$scriptDir = dirname(__FILE__);
|
||||
$taskPath = 'tasks'.DS.$taskName.'_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';
|
||||
$class = new $className;
|
||||
|
|
Loading…
Reference in a new issue