diff options
Diffstat (limited to 'sabre-dav-autoload.patch')
-rw-r--r-- | sabre-dav-autoload.patch | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/sabre-dav-autoload.patch b/sabre-dav-autoload.patch new file mode 100644 index 0000000..1aa22db --- /dev/null +++ b/sabre-dav-autoload.patch @@ -0,0 +1,20 @@ +--- lib/Sabre/autoload.php.old 2013-12-31 17:54:12.000000000 +0100 ++++ lib/Sabre/autoload.php 2013-12-31 17:58:28.000000000 +0100 +@@ -15,11 +15,9 @@ + * @license http://code.google.com/p/sabredav/wiki/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; ++ } ++}); |