blob: b5ddca67ddcc972d102d9d8e82042971637e7e3a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
diff -up lib/Sabre/autoload.php.orig lib/Sabre/autoload.php
--- lib/Sabre/autoload.php.orig 2014-05-22 09:19:59.914874236 +0200
+++ lib/Sabre/autoload.php 2014-05-22 09:21:26.300242963 +0200
@@ -15,11 +15,9 @@
* @license http://sabre.io/license/ Modified BSD License
*/
-/**
- * We are assuming that the composer autoloader is just 2 directories up.
- *
- * This is not the case when sabredav is installed as a dependency. But, in
- * those cases it's not expected that people will look for this file anyway.
- */
-
-require __DIR__ . '/../../vendor/autoload.php';
+spl_autoload_register(function ($class) {
+ if (strpos($class,'Sabre\\')===0) {
+ $file = __DIR__ . str_replace('\\', '/', substr($class,5)).'.php';
+ @include $file;
+ }
+});
|