1414 * @package symfony
1515 * @subpackage doctrine
1616 * @author Jonathan H. Wage <jonwage@gmail.com>
17- * @version SVN: $Id: sfDoctrinePluginConfiguration.class.php 29156 2010-04-14 22:22:41Z bschussek $
17+ * @version SVN: $Id: sfDoctrinePluginConfiguration.class.php 30445 2010-07-28 04:37:32Z Kris.Wallsmith $
1818 */
1919class sfDoctrinePluginConfiguration extends sfPluginConfiguration
2020{
@@ -37,15 +37,18 @@ public function initialize()
3737 $ this ->dispatcher ->connect ('debug.web.load_panels ' , array ('sfWebDebugPanelDoctrine ' , 'listenToAddPanelEvent ' ));
3838 }
3939
40- require_once sfConfig::get ('sf_doctrine_dir ' , realpath (dirname (__FILE__ ).'/../lib/vendor/doctrine ' )).'/Doctrine.php ' ;
41- spl_autoload_register (array ('Doctrine ' , 'autoload ' ));
40+ if (!class_exists ('Doctrine_Core ' , false ))
41+ {
42+ require_once sfConfig::get ('sf_doctrine_dir ' , realpath (dirname (__FILE__ ).'/../lib/vendor/doctrine ' )).'/Doctrine/Core.php ' ;
43+ }
44+ spl_autoload_register (array ('Doctrine_Core ' , 'autoload ' ));
4245
4346 $ manager = Doctrine_Manager::getInstance ();
44- $ manager ->setAttribute (Doctrine ::ATTR_EXPORT , Doctrine ::EXPORT_ALL );
45- $ manager ->setAttribute (Doctrine ::ATTR_VALIDATE , Doctrine ::VALIDATE_NONE );
46- $ manager ->setAttribute (Doctrine ::ATTR_RECURSIVE_MERGE_FIXTURES , true );
47- $ manager ->setAttribute (Doctrine ::ATTR_AUTO_ACCESSOR_OVERRIDE , true );
48- $ manager ->setAttribute (Doctrine ::ATTR_AUTOLOAD_TABLE_CLASSES , true );
47+ $ manager ->setAttribute (Doctrine_Core ::ATTR_EXPORT , Doctrine_Core ::EXPORT_ALL );
48+ $ manager ->setAttribute (Doctrine_Core ::ATTR_VALIDATE , Doctrine_Core ::VALIDATE_NONE );
49+ $ manager ->setAttribute (Doctrine_Core ::ATTR_RECURSIVE_MERGE_FIXTURES , true );
50+ $ manager ->setAttribute (Doctrine_Core ::ATTR_AUTO_ACCESSOR_OVERRIDE , true );
51+ $ manager ->setAttribute (Doctrine_Core ::ATTR_AUTOLOAD_TABLE_CLASSES , true );
4952
5053 // apply default attributes
5154 $ manager ->setDefaultAttributes ();
0 commit comments