mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-07-09 18:08:49 +00:00
WebDav Storage backend
This commit is contained in:
parent
020a1245fd
commit
15d77952ac
4 changed files with 517 additions and 0 deletions
28
webdav_storage/webdav_storage.php
Normal file
28
webdav_storage/webdav_storage.php
Normal file
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
/*
|
||||
* Name: WebDAV Storage
|
||||
* Description: Adds the possibility to use WebDAV as a selectable storage backend
|
||||
* Version: 1.0
|
||||
* Author: Philipp Holzer
|
||||
*/
|
||||
|
||||
use Friendica\Addon\webdav_storage\src\WebDav;
|
||||
use Friendica\App;
|
||||
use Friendica\Core\Hook;
|
||||
use Friendica\DI;
|
||||
|
||||
function webdav_storage_install($a)
|
||||
{
|
||||
Hook::register('storage_instance' , __FILE__, 'webdav_storage_instance');
|
||||
DI::storageManager()->register(WebDav::class);
|
||||
}
|
||||
|
||||
function webdav_storage_uninstall()
|
||||
{
|
||||
DI::storageManager()->unregister(WebDav::getName());
|
||||
}
|
||||
|
||||
function webdav_storage_instance(App $a, array &$data)
|
||||
{
|
||||
$data['storage'] = new WebDav(DI::l10n(), DI::config(), DI::httpClient(), DI::logger());
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue