1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
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_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 @@
}
}
-require_once (GLPI_ROOT . '/lib/Zend/Loader/ClassMapAutoloader.php');
-$loader = new Zend\Loader\ClassMapAutoloader();
-// Register the class map:
-$loader->registerAutoloadMap(GLPI_ROOT . '/lib/Zend/autoload_classmap.php');
-// Register with spl_autoload:
+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
|