Ticket #5140: sfModelGenerator2.patch
| File sfModelGenerator2.patch, 1.3 kB (added by DigitalBase, 1 year ago) |
|---|
-
lib/generator/sfModelGenerator.class.php
old new 167 167 return implode(".'&", $params); 168 168 } 169 169 170 /** 170 /** 171 171 * Configures this generator. 172 172 */ 173 173 abstract protected function configure(); … … 392 392 393 393 require_once $this->getGeneratorManager()->getBasePath().'/'.$basePath; 394 394 395 $confclass = ucfirst($this->getModuleName()).'GeneratorConfiguration'; 396 $class = 'Base' . $confclass; 397 395 398 $moduleDirs = array_keys($config->getControllerDirs($this->getModuleName())); 396 if (is_file($moduleDirs[0].'/../lib/configuration.php')) 397 { 398 require_once $moduleDirs[0].'/../lib/configuration.php'; 399 $class = $this->getModuleName().'GeneratorConfiguration'; 399 foreach ($moduleDirs as $moduleDir) { 400 if (is_file($moduleDir.'/../lib/' . $confclass. ".class.php")) 401 { 402 require_once $moduleDir.'/../lib/' . $confclass . ".class.php"; 403 $class = $confclass; 404 break; 405 } 400 406 } 401 else402 {403 $class = 'Base'.ucfirst($this->getModuleName()).'GeneratorConfiguration';404 }405 407 406 408 // validate configuration 407 409 foreach ($this->config as $context => $value)

