Index: zend.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/zend/zend.module,v retrieving revision 1.1.2.1.2.10 diff -u -r1.1.2.1.2.10 zend.module --- zend.module 1 Jun 2008 18:01:21 -0000 1.1.2.1.2.10 +++ zend.module 22 Oct 2009 16:19:47 -0000 @@ -7,10 +7,21 @@ */ /** - * Determines whether or not the Zend Framework include path has been - * manually set yet. + * Implementation of hook_init() */ -global $_ZEND_INCLUDE_PATH_SET; +function zend_init() { + spl_autoload_register('zend_autoload'); +} + +/** + * Autoload implementation + */ +function zend_autoload($class) {dsm($class); + // Just for classes starting with 'Zend' + if (strpos($class, 'Zend_') === 0) { + zend_initialize($class); + } +} /** * Implementation of hook_help(). @@ -118,9 +129,10 @@ * Set the include path to include the Zend Framework. */ function zend_set_include_path() { - global $_ZEND_INCLUDE_PATH_SET; - if ($_ZEND_INCLUDE_PATH_SET === TRUE) { - return TRUE; + static $_ZEND_INCLUDE_PATH_SET; + + if (isset($_ZEND_INCLUDE_PATH_SET)) { + return $_ZEND_INCLUDE_PATH_SET; } $path = zend_get_path(); $include_path = get_include_path() . PATH_SEPARATOR . realpath($path);