Changeset 5815
- Timestamp:
- 11/02/07 16:53:31 (10 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lib/plugins/sfPropelPlugin/lib/propel/builder/SfObjectBuilder.php
r5767 r5815 177 177 if (is_null($culture)) 178 178 { 179 if (is_null($this->culture)) 180 { 181 throw new PropelException(sprintf(\'No culture is set for this "%s" object.\', get_class($this))); 182 } 183 184 $culture = $this->culture; 179 $culture = is_null($this->culture) ? sfPropel::getDefaultCulture() : $this->culture; 185 180 } 186 181 trunk/lib/plugins/sfPropelPlugin/lib/propel/sfPropelAutoload.php
r5093 r5815 17 17 require_once 'propel/Propel.php'; 18 18 19 $dispatcher = sfContext::getInstance()->getEventDispatcher(); 20 19 21 if (sfConfig::get('sf_debug') && sfConfig::get('sf_logging_enabled')) 20 22 { … … 25 27 // register our logger 26 28 require_once(sfConfig::get('sf_symfony_lib_dir').'/plugins/sfPropelPlugin/lib/creole/drivers/sfDebugConnection.php'); 27 sfDebugConnection::setDispatcher( sfContext::getInstance()->getEventDispatcher());29 sfDebugConnection::setDispatcher($dispatcher); 28 30 } 29 31 … … 31 33 Propel::setConfiguration(sfPropelDatabase::getConfiguration()); 32 34 Propel::initialize(); 35 36 sfPropel::initialize($dispatcher, sfContext::getInstance()->getUser()->getCulture());