Development

Changeset 13929

You must first sign up to be able to contribute.

Changeset 13929

Show
Ignore:
Timestamp:
12/10/08 23:06:40 (1 year ago)
Author:
FabianLange
Message:

[1.2] publish-assets now works correctly for all active plugins, even when they set the plugin path to a different directory. fixes #5163. refs #4926

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.2/lib/config/sfProjectConfiguration.class.php

    r13547 r13929  
    449449   * @return array 
    450450   */ 
    451   protected function getAllPluginPaths() 
     451  public function getAllPluginPaths() 
    452452  { 
    453453    $pluginPaths = array(); 
  • branches/1.2/lib/task/plugin/sfPluginPublishAssetsTask.class.php

    r13092 r13929  
    5252  protected function execute($arguments = array(), $options = array()) 
    5353  { 
    54     foreach ($this->configuration->getPluginPaths() as $path) 
     54    $plugins = $this->configuration->getPlugins(); 
     55 
     56    foreach ($this->configuration->getAllPluginPaths() as $pluginName => $pluginPath) 
    5557    { 
    56       if ($options['core-only'] && dirname($path) != $this->configuration->getSymfonyLibDir().'/plugins'
     58      if (!in_array($pluginName, $plugins) || ($options['core-only'] && dirname($pluginPath) != $this->configuration->getSymfonyLibDir().'/plugins')
    5759      { 
    5860        continue; 
    5961      } 
    6062 
    61       $this->logSection('plugin', 'Configuring plugin - '.basename($path)); 
    62       $this->installPluginAssets(basename($path), dirname($path)); 
     63      $this->logSection('plugin', 'Configuring plugin - '.$pluginName); 
     64      $this->installPluginAssets($pluginName, $pluginPath); 
    6365    } 
    6466  } 
     
    7274  protected function installPluginAssets($plugin, $dir) 
    7375  { 
    74     $webDir = $dir.DIRECTORY_SEPARATOR.$plugin.DIRECTORY_SEPARATOR.'web'; 
     76    $webDir = $dir.DIRECTORY_SEPARATOR.'web'; 
     77 
    7578    if (is_dir($webDir)) 
    7679    { 

The Sensio Labs Network

Since 1998, Sensio Labs has been promoting the Open-Source software movement by providing quality web application development, training, consulting.
Sensio Labs also supports several large Open-Source projects.