| 79 | | $dirs = array( |
|---|
| 80 | | sfConfig::get('sf_symfony_lib_dir').'/task', // symfony tasks |
|---|
| 81 | | sfConfig::get('sf_symfony_lib_dir').'/plugins/*/lib/task', // bundled plugin tasks |
|---|
| 82 | | sfConfig::get('sf_plugins_dir').'/*/lib/task', // plugin tasks |
|---|
| 83 | | sfConfig::get('sf_lib_dir').'/task', // project tasks |
|---|
| 84 | | ); |
|---|
| | 79 | $dirs = array(sfConfig::get('sf_symfony_lib_dir').'/task'); // symfony core tasks |
|---|
| | 80 | |
|---|
| | 81 | // only add bundled plugins that were not overloaded in the project |
|---|
| | 82 | $installedPlugins = sfFinder::type('dir')->maxdepth(0)->relative()->in(sfConfig::get('sf_root_dir').'/plugins'); |
|---|
| | 83 | foreach (new DirectoryIterator(sfConfig::get('sf_symfony_lib_dir').'/plugins') as $bundledPlugin) |
|---|
| | 84 | { |
|---|
| | 85 | if ($bundledPlugin->isDot()) |
|---|
| | 86 | { |
|---|
| | 87 | continue; |
|---|
| | 88 | } |
|---|
| | 89 | |
|---|
| | 90 | $path = $bundledPlugin->getRealpath().'/lib/task'; |
|---|
| | 91 | if (!in_array($bundledPlugin->getFilename(), $installedPlugins) && is_dir($path)) |
|---|
| | 92 | { |
|---|
| | 93 | $dirs[] = $path; |
|---|
| | 94 | } |
|---|
| | 95 | } |
|---|
| | 96 | |
|---|
| | 97 | $dirs = array_merge($dirs, array(sfConfig::get('sf_plugins_dir').'/*/lib/task', // plugin tasks |
|---|
| | 98 | sfConfig::get('sf_lib_dir').'/task', // project tasks |
|---|
| | 99 | )); |
|---|
| | 100 | |
|---|