This commit is contained in:
parent
f3867dbf71
commit
6f5ae1c305
@ -33,7 +33,8 @@
|
||||
class Doctrine_Search
|
||||
{
|
||||
protected $_options = array('generateFiles' => false,
|
||||
'className' => '%CLASS%Index');
|
||||
'className' => '%CLASS%Index',
|
||||
'generatePath' => false);
|
||||
|
||||
|
||||
public function __construct(array $options)
|
||||
@ -195,19 +196,19 @@ class Doctrine_Search
|
||||
$builder = new Doctrine_Import_Builder();
|
||||
|
||||
if ($this->_options['generateFiles']) {
|
||||
if (isset($this->_options['generatePath']) && $this->_options['generatePath']) {
|
||||
$builder->setTargetPath($this->_options['generatePath']);
|
||||
if (isset($this->_options['generatePath']) && $this->_options['generatePath']) {
|
||||
$builder->setTargetPath($this->_options['generatePath']);
|
||||
|
||||
$builder->buildRecord($options, $columns, $relations);
|
||||
} else {
|
||||
throw new Doctrine_Search_Exception('If you wish to generate files then you must specify the path to generate the files in.');
|
||||
}
|
||||
$builder->buildRecord($options, $columns, $relations);
|
||||
} else {
|
||||
throw new Doctrine_Search_Exception('If you wish to generate files then you must specify the path to generate the files in.');
|
||||
}
|
||||
} else {
|
||||
$def = $builder->buildDefinition($options, $columns, $relations);
|
||||
$def = $builder->buildDefinition($options, $columns, $relations);
|
||||
|
||||
eval($def);
|
||||
eval($def);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user