summaryrefslogtreecommitdiffstats
path: root/php-horde-Horde-Autoloader-Sabre.patch
blob: a6c5cd16f6fbbab19a6d1a492258850aa0ba411b (plain)
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
diff -up Horde_Autoloader-2.1.0/lib/Horde/Autoloader/Default.php.fedora Horde_Autoloader-2.1.0/lib/Horde/Autoloader/Default.php
--- Horde_Autoloader-2.1.0/lib/Horde/Autoloader/Default.php.fedora	2014-03-04 07:18:14.580352294 +0100
+++ Horde_Autoloader-2.1.0/lib/Horde/Autoloader/Default.php	2014-03-04 07:20:42.591840198 +0100
@@ -14,6 +14,7 @@
 require_once 'Horde/Autoloader.php';
 require_once 'Horde/Autoloader/ClassPathMapper.php';
 require_once 'Horde/Autoloader/ClassPathMapper/Default.php';
+require_once 'Horde/Autoloader/ClassPathMapper/Prefix.php';
 
 /**
  * Default autoloader definition that uses the include path with default
@@ -45,6 +46,14 @@ class Horde_Autoloader_Default extends H
                 new Horde_Autoloader_ClassPathMapper_Default($path)
             );
         }
+        /* Allow Class Path overload */
+        foreach(glob('/usr/share/pear/Horde/*/rpmclassmap.php') as $inc) {
+            $tab = include($inc);
+            foreach ($tab as $regex => $path) {
+                $this->addClassPathMapper(new Horde_Autoloader_ClassPathMapper_Prefix($regex, $path));
+            }
+        }
+        unset($tab, $inc);
     }
 
 }