summaryrefslogtreecommitdiffstats
path: root/sabre-dav-autoload.patch
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2013-12-31 18:21:41 +0100
committerRemi Collet <fedora@famillecollet.com>2013-12-31 18:21:41 +0100
commit096587426c1f6194f2fa909a191d35af513e5b92 (patch)
treeb12d570ff1f4e9433c76b042cc7b04b316c945ec /sabre-dav-autoload.patch
php-sabre-dav: 1.8.7 - new package
Diffstat (limited to 'sabre-dav-autoload.patch')
-rw-r--r--sabre-dav-autoload.patch20
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;
++ }
++});