Provides a DAV frontend for the webbrowser.
More...
Provides a DAV frontend for the webbrowser.
RedBrowser is a SabreDAV server-plugin to provide a view to the DAV storage for the webbrowser.
http://opensource.org/licenses/mit-license.php The MIT License (MIT)
RedMatrix\RedDAV\RedBrowser::__construct |
( |
& |
$auth | ) |
|
Constructor for RedBrowser class.
$enablePost will be activated through set_writeable() in a later stage. At the moment the write_storage permission is only valid for the whole folder. No file specific permissions yet.
- Todo:
- disable enablePost by default and only activate if permissions grant edit rights.
Disable assets with $enableAssets = false. Should get some thumbnail views anyway.
- Parameters
-
RedMatrix\RedDAV\RedBrowser::findAttachHash |
( |
|
$owner, |
|
|
|
$parentHash, |
|
|
|
$attachName |
|
) |
| |
|
protected |
Return the hash of an attachment.
Given the owner, the parent folder and and attach name get the attachment hash.
- Parameters
-
int | $owner | The owner_id |
string | $hash | The parent's folder hash |
string | $attachName | The name of the attachment |
- Returns
- string
Referenced by RedMatrix\RedDAV\RedBrowser\generateDirectoryIndex().
RedMatrix\RedDAV\RedBrowser::findAttachIdByHash |
( |
|
$attachHash | ) |
|
|
protected |
RedMatrix\RedDAV\RedBrowser::generateDirectoryIndex |
( |
|
$path | ) |
|
Creates the directory listing for the given path.
- Parameters
-
string | $path | which should be displayed |
RedMatrix\RedDAV\RedBrowser::getAssetUrl |
( |
|
$assetName | ) |
|
|
protected |
RedMatrix\RedDAV\RedBrowser::getIconFromType |
( |
|
$type | ) |
|
|
protected |
RedMatrix\RedDAV\RedBrowser::htmlActionsPanel |
( |
DAV\INode |
$node, |
|
|
& |
$output |
|
) |
| |
Creates a form to add new folders and upload files.
- Parameters
-
\Sabre\DAV\INode | $node | |
string | &$output | |
RedMatrix\RedDAV\RedBrowser::set_writeable |
( |
| ) |
|
The DAV browser is instantiated after the auth module and directory classes but before we know the current directory and who the owner and observer are. So we add a pointer to the browser into the auth module and vice versa. Then when we've figured out what directory is actually being accessed, we call the following function to decide whether or not to show web elements which include writeable objects.
It only disable/enable the visible parts. Not the POST handler which handels the actual requests when uploading files or creating folders.
- Todo:
- Maybe this whole way of doing this can be solved with some $server->subscribeEvent().
RedMatrix\RedDAV\RedBrowser::userReadableSize |
( |
|
$size | ) |
|
RedMatrix\RedDAV\RedBrowser::$auth |
|
private |
The documentation for this class was generated from the following file: