ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
This class contains some functions from the old ilDAVServer. More...
Public Member Functions | |
showMountInstructions (&$objDAV, &$options) | |
TODO: Check if needed and refactor Mount instructions method handler for directories. More... | |
toNodePath ($davPath) | |
TODO: Check if needed and refactor Converts a DAV path into a node path. More... | |
getObjectURI ($refId, $ressourceName=null, $parentRefId=null) | |
TODO: Check if needed and refactor Returns an URI for getting a object using WebDAV by its name. More... | |
getFileURI ($refId, $ressourceName=null, $parentRefId=null) | |
TODO: Check if needed and refactor Returns an URI for getting a file object using WebDAV. More... | |
isWebDAVoverHTTPS () | |
TODO: Check if needed and refactor Returns true, if the WebDAV server transfers data over HTTPS. More... | |
isLocalPasswordInstructionRequired () | |
Static Public Member Functions | |
static | _isActionsVisible () |
Static getter. More... | |
static | getFolderURI ($refId, $nodeId=0, $ressourceName=null, $parentRefId=null) |
TODO: Check if needed and refactor Returns an URI for mounting the repository object as a webfolder using Internet Explorer and Firefox with the "openwebfolder" plugin. More... | |
static | getMountURI ($refId, $nodeId=0, $ressourceName=null, $parentRefId=null, $genericURI=false) |
TODO: Check if needed and refactor Returns an URI for mounting the repository object as a webfolder. More... | |
static | _isActive () |
TODO: Check if needed and refactor Static getter. More... | |
static | getInstance () |
Get singleton instance. More... | |
Protected Member Functions | |
checkLock ($path) | |
TODO: Check if needed and refactor checkLock() helper. More... | |
getLogin ($userId) | |
TODO: Check if needed and refactor Returns the login for the specified user id, or null if the user does not exist. More... | |
Static Protected Attributes | |
static | $clientBrowser = "firefox" |
static | $clientOS = "windows" |
static | $clientFlavor = "nichtxp" |
Private Member Functions | |
getObject ($davPath) | |
TODO: Check if needed and refactor Gets a DAV object for the specified path. More... | |
toObjectPath ($davPath) | |
TODO: Check if needed and refactor Converts a DAV path into an array of DAV objects. More... | |
davDeslashify ($path) | |
TODO: Check if needed and refactor davDeslashify - make sure path does not end in a slash. More... | |
davBasename ($path) | |
TODO: Check if needed and refactor Private implementation of PHP basename() function. More... | |
getUploadMaxFilesize () | |
TODO: Check if needed and refactor Gets the maximum permitted upload filesize from php.ini in bytes. More... | |
__construct () | |
Singleton constructor. More... | |
Private Attributes | |
$pwd_instruction = null | |
Static Private Attributes | |
static | $instance = null |
This class contains some functions from the old ilDAVServer.
Sadly I wasn't able to refactor all of it. Some functions are still used in other classes. Will be refactored
TODO: Check for refactoring potential
Definition at line 12 of file class.ilWebDAVUtil.php.
|
private |
|
static |
Static getter.
Returns true, if WebDAV actions are visible for repository items.
Definition at line 23 of file class.ilWebDAVUtil.php.
References $DIC.
|
static |
TODO: Check if needed and refactor Static getter.
Returns true, if the WebDAV server is active.
THe WebDAV Server is active, if the variable file_access::webdav_enabled is set in the client ini file. (Removed wit 08.2016: , and if PEAR Auth_HTTP is installed).
Definition at line 551 of file class.ilWebDAVUtil.php.
References $DIC.
|
protected |
TODO: Check if needed and refactor checkLock() helper.
string | resource path to check for locks |
Definition at line 135 of file class.ilWebDAVUtil.php.
References $DIC, $path, $result, getLogin(), and toObjectPath().
|
private |
TODO: Check if needed and refactor Private implementation of PHP basename() function.
The PHP basename() function does not work properly with filenames that contain international characters. e.g. basename('/x/ö') returns 'x' instead of 'ö'
Definition at line 351 of file class.ilWebDAVUtil.php.
References $path.
|
private |
TODO: Check if needed and refactor davDeslashify - make sure path does not end in a slash.
string | directory path |
Definition at line 334 of file class.ilWebDAVUtil.php.
References $path, and UtfNormal\toNFC().
Referenced by showMountInstructions().
ilWebDAVUtil::getFileURI | ( | $refId, | |
$ressourceName = null , |
|||
$parentRefId = null |
|||
) |
TODO: Check if needed and refactor Returns an URI for getting a file object using WebDAV.
Browsers can use this URI to download a file from ILIAS.
Note: This could be the same URI that is returned by getObjectURI. But we use a different URI, because we want to use the regular ILIAS authentication method, if no session exists, and we want to be able to download a file from the repository, even if the name of the file object is not unique.
refId | of the file object. |
ressourceName | title of the file object (if known), to reduce SQL queries |
parentRefId | refId of parent object (if known), to reduce SQL queries |
Definition at line 498 of file class.ilWebDAVUtil.php.
References $baseUri, $DIC, and isWebDAVoverHTTPS().
|
static |
TODO: Check if needed and refactor Returns an URI for mounting the repository object as a webfolder using Internet Explorer and Firefox with the "openwebfolder" plugin.
The FolderURI is only in effect on Windows. Therefore we don't need to deal with other pecularities.
The URI can be used as the value of a "folder" attribute inside of an HTML anchor tag "<a>".
refId | of the repository object. |
nodeId | of a childnode of the repository object. |
ressourceName | ressource name (if known), to reduce SQL queries |
parentRefId | refId of parent object (if known), to reduce SQL queries |
Definition at line 372 of file class.ilWebDAVUtil.php.
References $baseUri, and $query.
|
static |
Get singleton instance.
Definition at line 600 of file class.ilWebDAVUtil.php.
Referenced by ilObjCategoryAccess\_getCommands(), ilObjFolderAccess\_getCommands(), ilObjGroupAccess\_getCommands(), ilObjCourseAccess\_getCommands(), ilTemplate\fillSideIcons(), ilObjGroupListGUI\getCommandLink(), ilObjFolderListGUI\getCommandLink(), ilObjCategoryListGUI\getCommandLink(), ilObjectListGUI\getCommandLink(), and ilContainerGUI\showPasswordInstructionObject().
|
protected |
TODO: Check if needed and refactor Returns the login for the specified user id, or null if the user does not exist.
Definition at line 199 of file class.ilWebDAVUtil.php.
References $login, and ilObjUser\_lookupLogin().
Referenced by checkLock().
|
static |
TODO: Check if needed and refactor Returns an URI for mounting the repository object as a webfolder.
The URI can be used as the value of a "href" attribute attribute inside of an HTML anchor tag "<a>".
refId | of the repository object. |
nodeId | of a childnode of the repository object. |
ressourceName | ressource name (if known), to reduce SQL queries |
parentRefId | refId of parent object (if known), to reduce SQL queries |
genericURI | boolean Returns a generic mount URI, which works on all platforms which support WebDAV as in the IETF specification. |
Definition at line 413 of file class.ilWebDAVUtil.php.
References $baseUri, and $query.
|
private |
TODO: Check if needed and refactor Gets a DAV object for the specified path.
String | davPath A DAV path expression. |
Definition at line 214 of file class.ilWebDAVUtil.php.
References $DIC, $tree, and toNodePath().
ilWebDAVUtil::getObjectURI | ( | $refId, | |
$ressourceName = null , |
|||
$parentRefId = null |
|||
) |
TODO: Check if needed and refactor Returns an URI for getting a object using WebDAV by its name.
WebDAV clients can use this URI to access the object from ILIAS.
refId | of the object. |
ressourceName | object title (if known), to reduce SQL queries |
parentRefId | refId of parent object (if known), to reduce SQL queries |
Definition at line 454 of file class.ilWebDAVUtil.php.
References $baseUri, $DIC, and isWebDAVoverHTTPS().
|
private |
TODO: Check if needed and refactor Gets the maximum permitted upload filesize from php.ini in bytes.
Definition at line 563 of file class.ilWebDAVUtil.php.
ilWebDAVUtil::isLocalPasswordInstructionRequired | ( | ) |
Definition at line 612 of file class.ilWebDAVUtil.php.
References $DIC, $ilUser, $pwd_instruction, ilAuthUtils\LOCAL_PWV_USER, and ilAuthUtils\supportsLocalPasswordValidation().
ilWebDAVUtil::isWebDAVoverHTTPS | ( | ) |
TODO: Check if needed and refactor Returns true, if the WebDAV server transfers data over HTTPS.
Definition at line 530 of file class.ilWebDAVUtil.php.
References $DIC, $https, and $ilSetting.
Referenced by getFileURI(), getObjectURI(), and showMountInstructions().
ilWebDAVUtil::showMountInstructions | ( | & | $objDAV, |
& | $options | ||
) |
TODO: Check if needed and refactor Mount instructions method handler for directories.
ilObjectDAV | dav object handler |
Definition at line 36 of file class.ilWebDAVUtil.php.
References $DIC, $ilUser, $lng, PHPMailer\PHPMailer\$options, $path, davDeslashify(), exit, isWebDAVoverHTTPS(), and toObjectPath().
ilWebDAVUtil::toNodePath | ( | $davPath | ) |
TODO: Check if needed and refactor Converts a DAV path into a node path.
The returned array is granted to represent an absolute path.
The first component of a DAV Path is the ILIAS client id. The following component either denote an absolute path, or a relative path starting at a ref_id.
String | davPath A DAV path expression. |
Definition at line 286 of file class.ilWebDAVUtil.php.
Referenced by getObject(), and toObjectPath().
|
private |
TODO: Check if needed and refactor Converts a DAV path into an array of DAV objects.
String | davPath A DAV path expression. |
Definition at line 253 of file class.ilWebDAVUtil.php.
References toNodePath().
Referenced by checkLock(), and showMountInstructions().
|
staticprotected |
Definition at line 14 of file class.ilWebDAVUtil.php.
|
staticprotected |
Definition at line 16 of file class.ilWebDAVUtil.php.
|
staticprotected |
Definition at line 15 of file class.ilWebDAVUtil.php.
|
staticprivate |
Definition at line 584 of file class.ilWebDAVUtil.php.
|
private |
Definition at line 586 of file class.ilWebDAVUtil.php.
Referenced by isLocalPasswordInstructionRequired().