Development

#2880: sfSymfonyCommandApplication.class.php.patch

You must first sign up to be able to contribute.

Ticket #2880: sfSymfonyCommandApplication.class.php.patch

File sfSymfonyCommandApplication.class.php.patch, 1.3 kB (added by Carl.Vondrick, 9 months ago)

updated patch for r8574

  • lib/command/sfSymfonyCommandApplication.class.php

    old new  
    7878  { 
    7979    $dirs = array( 
    8080      sfConfig::get('sf_symfony_lib_dir').'/task',               // symfony tasks 
    81       sfConfig::get('sf_symfony_lib_dir').'/plugins/*/lib/task', // bundled plugin tasks 
    8281      sfConfig::get('sf_plugins_dir').'/*/lib/task',             // plugin tasks 
    8382      sfConfig::get('sf_lib_dir').'/task',                       // project tasks 
    8483    ); 
     84 
     85    // only add bundled plugins that were not overloaded in the project 
     86    $installedPlugins = sfFinder::type('dir')->maxdepth(0)->relative()->in(sfConfig::get('sf_root_dir').'/plugins'); 
     87    foreach (new DirectoryIterator(sfConfig::get('sf_symfony_lib_dir').'/plugins') as $bundledPlugin) 
     88    { 
     89      if ($bundledPlugin->isDot()) 
     90      { 
     91        continue; 
     92      } 
     93       
     94      $path = $bundledPlugin->getRealpath().'/lib/task'; 
     95      if (!in_array($bundledPlugin->getFilename(), $installedPlugins) && is_dir($path)) 
     96      { 
     97        $dirs[] = $path; 
     98      } 
     99    } 
     100 
    85101    $finder = sfFinder::type('file')->name('*Task.class.php'); 
    86102 
    87103    foreach ($dirs as $globDir)