From 6f5ae1c305a9d354740b819b08d3524e627bf3b6 Mon Sep 17 00:00:00 2001 From: zYne Date: Sat, 13 Oct 2007 08:39:26 +0000 Subject: [PATCH] --- lib/Doctrine/Search.php | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/lib/Doctrine/Search.php b/lib/Doctrine/Search.php index 5028603e8..7023214b9 100644 --- a/lib/Doctrine/Search.php +++ b/lib/Doctrine/Search.php @@ -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; } -} \ No newline at end of file +}