more phpdoc in DirOptions and DirProtections
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -18,6 +18,30 @@
|
||||
class DirOptions extends ApiCommand implements ResourceEntity
|
||||
{
|
||||
|
||||
/**
|
||||
* add options for a given directory
|
||||
*
|
||||
* @param int $customerid
|
||||
* optional, admin-only, the customer-id
|
||||
* @param string $loginname
|
||||
* optional, admin-only, the loginname
|
||||
* @param string $path
|
||||
* path relative to the customer's home-Directory
|
||||
* @param bool $options_indexes
|
||||
* optional, activate directory-listing for this path, default 0 (false)
|
||||
* @param bool $options_cgi
|
||||
* optional, allow Perl/CGI execution, default 0 (false)
|
||||
* @param string $error404path
|
||||
* optional, custom 404 error string/file
|
||||
* @param string $error403path
|
||||
* optional, custom 403 error string/file
|
||||
* @param string $error500path
|
||||
* optional, custom 500 error string/file
|
||||
*
|
||||
* @access admin, customer
|
||||
* @throws Exception
|
||||
* @return array
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
if ($this->isAdmin() == false && Settings::IsInList('panel.customer_hide_options', 'extras')) {
|
||||
@@ -116,12 +140,10 @@ class DirOptions extends ApiCommand implements ResourceEntity
|
||||
}
|
||||
|
||||
/**
|
||||
* return a directory-protection entry by either id or username
|
||||
* return a directory-protection entry by id
|
||||
*
|
||||
* @param int $id
|
||||
* optional, the customer-id
|
||||
* @param string $username
|
||||
* optional, the username
|
||||
* id of dir-protection entry
|
||||
*
|
||||
* @access admin, customer
|
||||
* @throws Exception
|
||||
@@ -178,6 +200,30 @@ class DirOptions extends ApiCommand implements ResourceEntity
|
||||
throw new Exception("Directory option with " . $key . " could not be found", 404);
|
||||
}
|
||||
|
||||
/**
|
||||
* update options for a given directory by id
|
||||
*
|
||||
* @param int $id
|
||||
* id of dir-protection entry
|
||||
* @param int $customerid
|
||||
* optional, admin-only, the customer-id
|
||||
* @param string $loginname
|
||||
* optional, admin-only, the loginname
|
||||
* @param bool $options_indexes
|
||||
* optional, activate directory-listing for this path, default 0 (false)
|
||||
* @param bool $options_cgi
|
||||
* optional, allow Perl/CGI execution, default 0 (false)
|
||||
* @param string $error404path
|
||||
* optional, custom 404 error string/file
|
||||
* @param string $error403path
|
||||
* optional, custom 403 error string/file
|
||||
* @param string $error500path
|
||||
* optional, custom 500 error string/file
|
||||
*
|
||||
* @access admin, customer
|
||||
* @throws Exception
|
||||
* @return array
|
||||
*/
|
||||
public function update()
|
||||
{
|
||||
$id = $this->getParam('id', true, 0);
|
||||
|
||||
@@ -18,6 +18,23 @@
|
||||
class DirProtections extends ApiCommand implements ResourceEntity
|
||||
{
|
||||
|
||||
/**
|
||||
* add htaccess protection to a given directory
|
||||
*
|
||||
* @param int $customerid
|
||||
* optional, admin-only, the customer-id
|
||||
* @param string $loginname
|
||||
* optional, admin-only, the loginname
|
||||
* @param string $path
|
||||
* @param string $username
|
||||
* @param string $directory_password
|
||||
* @param string $directory_authname
|
||||
* optional name/description for the protection
|
||||
*
|
||||
* @access admin, customer
|
||||
* @throws Exception
|
||||
* @return array
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
if ($this->isAdmin() == false && Settings::IsInList('panel.customer_hide_options', 'extras')) {
|
||||
@@ -103,7 +120,7 @@ class DirProtections extends ApiCommand implements ResourceEntity
|
||||
* return a directory-protection entry by either id or username
|
||||
*
|
||||
* @param int $id
|
||||
* optional, the customer-id
|
||||
* optional, the entry-id
|
||||
* @param string $username
|
||||
* optional, the username
|
||||
*
|
||||
@@ -164,6 +181,26 @@ class DirProtections extends ApiCommand implements ResourceEntity
|
||||
throw new Exception("Directory protection with " . $key . " could not be found", 404);
|
||||
}
|
||||
|
||||
/**
|
||||
* update htaccess protection of a given directory
|
||||
*
|
||||
* @param int $id
|
||||
* optional, the entry-id
|
||||
* @param string $username
|
||||
* optional, the username
|
||||
* @param int $customerid
|
||||
* optional, admin-only, the customer-id
|
||||
* @param string $loginname
|
||||
* optional, admin-only, the loginname
|
||||
* @param string $directory_password
|
||||
* optional, leave empty for no change
|
||||
* @param string $directory_authname
|
||||
* optional name/description for the protection
|
||||
*
|
||||
* @access admin, customer
|
||||
* @throws Exception
|
||||
* @return array
|
||||
*/
|
||||
public function update()
|
||||
{
|
||||
$id = $this->getParam('id', true, 0);
|
||||
|
||||
Reference in New Issue
Block a user