mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-07-07 00:48:55 +00:00
Heavily refactored, including multiple calendars per user and recurring events. Not in an installable state yet, though
This commit is contained in:
parent
4a5e30ec84
commit
fefee23e90
78 changed files with 8026 additions and 1205 deletions
|
@ -293,7 +293,10 @@ class Sabre_DAV_Locks_Plugin extends Sabre_DAV_ServerPlugin {
|
|||
$this->server->tree->getNodeForPath($uri);
|
||||
|
||||
// We need to call the beforeWriteContent event for RFC3744
|
||||
$this->server->broadcastEvent('beforeWriteContent',array($uri));
|
||||
// Edit: looks like this is not used, and causing problems now.
|
||||
//
|
||||
// See Issue 222
|
||||
// $this->server->broadcastEvent('beforeWriteContent',array($uri));
|
||||
|
||||
} catch (Sabre_DAV_Exception_NotFound $e) {
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
* @author Evert Pot (http://www.rooftopsolutions.nl/)
|
||||
* @license http://code.google.com/p/sabredav/wiki/License Modified BSD License
|
||||
*/
|
||||
abstract class Sabre_DAV_Property {
|
||||
abstract class Sabre_DAV_Property implements Sabre_DAV_PropertyInterface {
|
||||
|
||||
abstract function serialize(Sabre_DAV_Server $server, DOMElement $prop);
|
||||
|
||||
|
|
|
@ -138,7 +138,7 @@ class Sabre_DAV_Property_Response extends Sabre_DAV_Property implements Sabre_DA
|
|||
if (is_scalar($propertyValue)) {
|
||||
$text = $document->createTextNode($propertyValue);
|
||||
$currentProperty->appendChild($text);
|
||||
} elseif ($propertyValue instanceof Sabre_DAV_Property) {
|
||||
} elseif ($propertyValue instanceof Sabre_DAV_PropertyInterface) {
|
||||
$propertyValue->serialize($server,$currentProperty);
|
||||
} elseif (!is_null($propertyValue)) {
|
||||
throw new Sabre_DAV_Exception('Unknown property value type: ' . gettype($propertyValue) . ' for property: ' . $propertyName);
|
||||
|
|
21
dav/SabreDAV/lib/Sabre/DAV/PropertyInterface.php
Normal file
21
dav/SabreDAV/lib/Sabre/DAV/PropertyInterface.php
Normal file
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* PropertyInterface
|
||||
*
|
||||
* Implement this interface to create new complex properties
|
||||
*
|
||||
* @package Sabre
|
||||
* @subpackage DAV
|
||||
* @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
|
||||
*/
|
||||
interface Sabre_DAV_PropertyInterface {
|
||||
|
||||
public function serialize(Sabre_DAV_Server $server, DOMElement $prop);
|
||||
|
||||
static function unserialize(DOMElement $prop);
|
||||
|
||||
}
|
||||
|
|
@ -207,6 +207,10 @@ class Sabre_DAV_Server {
|
|||
|
||||
} catch (Exception $e) {
|
||||
|
||||
try {
|
||||
$this->broadcastEvent('exception', array($e));
|
||||
} catch (Exception $ignore) {
|
||||
}
|
||||
$DOM = new DOMDocument('1.0','utf-8');
|
||||
$DOM->formatOutput = true;
|
||||
|
||||
|
@ -508,7 +512,7 @@ class Sabre_DAV_Server {
|
|||
|
||||
if (!$this->checkPreconditions(true)) return false;
|
||||
|
||||
if (!($node instanceof Sabre_DAV_IFile)) throw new Sabre_DAV_Exception_NotImplemented('GET is only implemented on File objects');
|
||||
if (!$node instanceof Sabre_DAV_IFile) throw new Sabre_DAV_Exception_NotImplemented('GET is only implemented on File objects');
|
||||
$body = $node->get();
|
||||
|
||||
// Converting string into stream, if needed.
|
||||
|
|
|
@ -42,9 +42,9 @@ class Sabre_DAV_Tree_Filesystem extends Sabre_DAV_Tree {
|
|||
$realPath = $this->getRealPath($path);
|
||||
if (!file_exists($realPath)) throw new Sabre_DAV_Exception_NotFound('File at location ' . $realPath . ' not found');
|
||||
if (is_dir($realPath)) {
|
||||
return new Sabre_DAV_FS_Directory($path);
|
||||
return new Sabre_DAV_FS_Directory($realPath);
|
||||
} else {
|
||||
return new Sabre_DAV_FS_File($path);
|
||||
return new Sabre_DAV_FS_File($realPath);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue