diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2012-10-13 22:29:57 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@statuscode.ch> | 2012-10-13 22:29:57 +0200 |
commit | dcfbbf3db7761b88b8ca801454e90e738a98ec14 (patch) | |
tree | 0bf552446046fd65238f11ed5bd05e04a1d228ba /3rdparty/Sabre/autoload.php | |
parent | 183cc22501b75ab8819971f70b88dbc010026ac1 (diff) | |
download | nextcloud-server-dcfbbf3db7761b88b8ca801454e90e738a98ec14.tar.gz nextcloud-server-dcfbbf3db7761b88b8ca801454e90e738a98ec14.zip |
Revert "Update SabreDAV to 1.7.1"
This reverts commit 183cc22501b75ab8819971f70b88dbc010026ac1.
Diffstat (limited to '3rdparty/Sabre/autoload.php')
-rwxr-xr-x | 3rdparty/Sabre/autoload.php | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/3rdparty/Sabre/autoload.php b/3rdparty/Sabre/autoload.php index 505bd36efb0..c7b537d83d3 100755 --- a/3rdparty/Sabre/autoload.php +++ b/3rdparty/Sabre/autoload.php @@ -1,27 +1,31 @@ <?php /** - * SabreDAV's autoloader + * SabreDAV's PHP autoloader * - * This file is kept for backwards compatibility purposes. - * SabreDAV now uses the composer autoloader. - * - * You should stop including this file, and include 'vendor/autoload.php' - * instead. + * If you love the autoloader, and don't care as much about performance, this + * file register a new autoload function using spl_autoload_register. * * @package Sabre * @subpackage DAV - * @deprecated Will be removed in a future version! * @copyright Copyright (C) 2007-2012 Rooftop Solutions. All rights reserved. * @author Evert Pot (http://www.rooftopsolutions.nl/) * @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. + * @param string $className + * @return void */ +function Sabre_autoload($className) { + + if(strpos($className,'Sabre_')===0) { + + include dirname(__FILE__) . '/' . str_replace('_','/',substr($className,6)) . '.php'; + + } + +} + +spl_autoload_register('Sabre_autoload'); -require __DIR__ . '/../../vendor/autoload.php'; |