mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-07-09 18:08:49 +00:00
Initial Release of the calendar plugin
This commit is contained in:
parent
45cc9885fc
commit
7115197a33
561 changed files with 189494 additions and 0 deletions
60
dav/SabreDAV/examples/fileserver.php
Normal file
60
dav/SabreDAV/examples/fileserver.php
Normal file
|
@ -0,0 +1,60 @@
|
|||
<?php
|
||||
|
||||
// !!!! Make sure the Sabre directory is in the include_path !!!
|
||||
// example:
|
||||
set_include_path('lib/' . PATH_SEPARATOR . get_include_path());
|
||||
|
||||
/*
|
||||
|
||||
This is the best starting point if you're just interested in setting up a fileserver.
|
||||
|
||||
Make sure that the 'public' and 'tmpdata' exists, with write permissions
|
||||
for your server.
|
||||
|
||||
*/
|
||||
|
||||
// settings
|
||||
date_default_timezone_set('Canada/Eastern');
|
||||
$publicDir = 'public';
|
||||
$tmpDir = 'tmpdata';
|
||||
|
||||
// If you want to run the SabreDAV server in a custom location (using mod_rewrite for instance)
|
||||
// You can override the baseUri here.
|
||||
// $baseUri = '/';
|
||||
|
||||
|
||||
// Files we need
|
||||
require_once 'Sabre/autoload.php';
|
||||
|
||||
// Create the root node
|
||||
$root = new Sabre_DAV_FS_Directory($publicDir);
|
||||
|
||||
// The rootnode needs in turn to be passed to the server class
|
||||
$server = new Sabre_DAV_Server($root);
|
||||
|
||||
if (isset($baseUri))
|
||||
$server->setBaseUri($baseUri);
|
||||
|
||||
// Support for LOCK and UNLOCK
|
||||
$lockBackend = new Sabre_DAV_Locks_Backend_File($tmpDir . '/locksdb');
|
||||
$lockPlugin = new Sabre_DAV_Locks_Plugin($lockBackend);
|
||||
$server->addPlugin($lockPlugin);
|
||||
|
||||
// Support for html frontend
|
||||
$browser = new Sabre_DAV_Browser_Plugin();
|
||||
$server->addPlugin($browser);
|
||||
|
||||
// Automatically guess (some) contenttypes, based on extesion
|
||||
$server->addPlugin(new Sabre_DAV_Browser_GuessContentType());
|
||||
|
||||
// Authentication backend
|
||||
$authBackend = new Sabre_DAV_Auth_Backend_File('.htdigest');
|
||||
$auth = new Sabre_DAV_Auth_Plugin($authBackend,'SabreDAV');
|
||||
$server->addPlugin($auth);
|
||||
|
||||
// Temporary file filter
|
||||
$tempFF = new Sabre_DAV_TemporaryFileFilterPlugin($tmpDir);
|
||||
$server->addPlugin($tempFF);
|
||||
|
||||
// And off we go!
|
||||
$server->exec();
|
Loading…
Add table
Add a link
Reference in a new issue