diff options
author | Remi Collet <fedora@famillecollet.com> | 2013-10-02 10:30:48 +0200 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2013-10-02 10:30:48 +0200 |
commit | e9dad8e262831c057955487e078e97c8bb8c1530 (patch) | |
tree | 8a0871664f41e0fa96c43fd98b01123ba8a6d519 /glpi-0.84-zend.patch | |
parent | ce129625274030609afb4c4d8d48cf10eb604c18 (diff) |
glpi: upstream patch for ZF2
Diffstat (limited to 'glpi-0.84-zend.patch')
-rw-r--r-- | glpi-0.84-zend.patch | 63 |
1 files changed, 42 insertions, 21 deletions
diff --git a/glpi-0.84-zend.patch b/glpi-0.84-zend.patch index c79fb94..f8de812 100644 --- a/glpi-0.84-zend.patch +++ b/glpi-0.84-zend.patch @@ -1,23 +1,44 @@ -diff -up config/based_config.php.orig config/based_config.php ---- config/based_config.php.orig 2013-09-29 17:26:58.940921006 +0200 -+++ config/based_config.php 2013-09-29 17:27:03.507928854 +0200 -@@ -176,4 +176,12 @@ if (!defined('GLPI_HTMLAWED')) { - # if htmLawed available in system, use (in config_path.php) - # define('GLPI_HTMLAWED', '/usr/share/htmlawed/htmLawed.php'); - } -+ -+// Default patch to Zend Framework 2 -+if (!defined('GLPI_ZEND')) { -+ define('GLPI_ZEND', GLPI_ROOT.'/lib/Zend'); -+ +Index: branches/0.84-bugfixes/config/based_config.php +=================================================================== +--- branches/0.84-bugfixes/config/based_config.php (revision 21914) ++++ branches/0.84-bugfixes/config/based_config.php (revision 21915) +@@ -138,11 +138,10 @@ + + // Default Zend_Loader path + if (!defined("GLPI_ZEND_PATH")) { +- define("GLPI_ZEND_PATH", GLPI_ROOT."/lib"); ++ define("GLPI_ZEND_PATH", GLPI_ROOT."/lib/Zend"); + +- # if Zend installed, use (in config_path.php) +- # define("GLPI_ZEND_PATH", "/usr/share/php/"); // if not in standard include_path +- # define("GLPI_ZEND_PATH", ""); // if already in include_path + # if Zend Framework 2 available in system, use (in config_path.php) -+ # define('GLPI_ZEND', '/usr/share/php/Zend'); -+} - ?> -diff -up inc/autoload.function.php.orig inc/autoload.function.php ---- inc/autoload.function.php.orig 2013-09-12 21:17:15.000000000 +0200 -+++ inc/autoload.function.php 2013-09-29 17:22:33.420537657 +0200 -@@ -323,11 +323,9 @@ function glpi_autoload($classname) { ++ # define('GLPI_ZEND_PATH', '/usr/share/php/Zend'); + } + + // Default SimplePie path +Index: branches/0.84-bugfixes/inc/autoload.function.php +=================================================================== +--- branches/0.84-bugfixes/inc/autoload.function.php (revision 21914) ++++ branches/0.84-bugfixes/inc/autoload.function.php (revision 21915) +@@ -289,16 +289,6 @@ + ezcBase::autoload($classname); + return true; + } +- // Is Zend class ? +-// if (preg_match('/^Zend/',$classname,$matches)) { +-// if (GLPI_ZEND_PATH) { +-// set_include_path(GLPI_ZEND_PATH . PATH_SEPARATOR . get_include_path()); +-// } +-// require_once("Zend/Loader.php"); +-// +-// Zend_Loader::loadClass($classname); +-// return true; +-// } + + // Do not try to load phpcas using GLPI autoload + if (preg_match('/^CAS_.*/', $classname)) { +@@ -323,11 +313,9 @@ } } @@ -26,8 +47,8 @@ diff -up inc/autoload.function.php.orig inc/autoload.function.php -// Register the class map: -$loader->registerAutoloadMap(GLPI_ROOT . '/lib/Zend/autoload_classmap.php'); -// Register with spl_autoload: -+require_once (GLPI_ZEND . '/Loader/StandardAutoloader.php'); -+$option = array(Zend\Loader\StandardAutoloader::LOAD_NS => array('Zend' => GLPI_ZEND)); ++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(); |