summaryrefslogtreecommitdiffstats
path: root/glpi-0.90-autoload.patch
blob: 898b286f15bd821cfbcf80073753919ae2b1d715 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
diff -up inc/autoload.function.php.old inc/autoload.function.php
--- inc/autoload.function.php.old	2016-02-18 14:45:41.167015090 +0100
+++ inc/autoload.function.php	2016-02-18 14:47:19.277404208 +0100
@@ -332,10 +332,14 @@ function glpi_autoload($classname) {
 // Use spl autoload to allow stackable autoload.
 spl_autoload_register('glpi_autoload');
 
+if (file_exists(GLPI_ZEND_PATH . '/autoload.php')) {
+  require_once (GLPI_ZEND_PATH . '/autoload.php');
+} else {
 require_once (GLPI_ZEND_PATH . '/Loader/StandardAutoloader.php');
 $option = array(Zend\Loader\StandardAutoloader::LOAD_NS => array('Zend' => GLPI_ZEND_PATH));
 $loader = new Zend\Loader\StandardAutoloader($option);
 $loader->register();
+}
 
 // SimplePie autoloader
 spl_autoload_register(array(new SimplePie_Autoloader(), 'autoload'));