diff options
author | Remi Collet <fedora@famillecollet.com> | 2016-02-18 14:59:24 +0100 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2016-02-18 14:59:24 +0100 |
commit | f55cf6a669e207527486ef20fdae1980e6708348 (patch) | |
tree | 153316fd972b0994f54125f090bff466b015a69a /glpi-0.90-autoload.patch | |
parent | 847869a9a007626fcb259aca84c91bc07155fc7e (diff) |
glpi: fix autoloader
Diffstat (limited to 'glpi-0.90-autoload.patch')
-rw-r--r-- | glpi-0.90-autoload.patch | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/glpi-0.90-autoload.patch b/glpi-0.90-autoload.patch new file mode 100644 index 0000000..6af92b7 --- /dev/null +++ b/glpi-0.90-autoload.patch @@ -0,0 +1,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 +@@ -328,10 +328,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')); |