changed all boolean parameters to getBoolParam-function
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -58,8 +58,8 @@ class DirOptions extends ApiCommand implements ResourceEntity
|
||||
$path = $this->getParam('path');
|
||||
|
||||
// parameters
|
||||
$options_indexes = $this->getParam('options_indexes', true, 0);
|
||||
$options_cgi = $this->getParam('options_cgi', true, 0);
|
||||
$options_indexes = $this->getBoolParam('options_indexes', true, 0);
|
||||
$options_cgi = $this->getBoolParam('options_cgi', true, 0);
|
||||
$error404path = $this->getParam('error404path', true, '');
|
||||
$error403path = $this->getParam('error403path', true, '');
|
||||
$error500path = $this->getParam('error500path', true, '');
|
||||
@@ -69,18 +69,6 @@ class DirOptions extends ApiCommand implements ResourceEntity
|
||||
$userpath = $path;
|
||||
$path = makeCorrectDir($customer['documentroot'] . '/' . $path);
|
||||
|
||||
if ($options_indexes != 0) {
|
||||
$options_indexes = '1';
|
||||
} else {
|
||||
$options_indexes = '0';
|
||||
}
|
||||
|
||||
if ($options_cgi != 0) {
|
||||
$options_cgi = '1';
|
||||
} else {
|
||||
$options_cgi = '0';
|
||||
}
|
||||
|
||||
if (! empty($error404path)) {
|
||||
$error404path = correctErrorDocument($error404path, true);
|
||||
}
|
||||
@@ -237,24 +225,12 @@ class DirOptions extends ApiCommand implements ResourceEntity
|
||||
$customer = $this->getCustomerData();
|
||||
|
||||
// parameters
|
||||
$options_indexes = $this->getParam('options_indexes', true, $result['options_indexes']);
|
||||
$options_cgi = $this->getParam('options_cgi', true, $result['options_cgi']);
|
||||
$options_indexes = $this->getBoolParam('options_indexes', true, $result['options_indexes']);
|
||||
$options_cgi = $this->getBoolParam('options_cgi', true, $result['options_cgi']);
|
||||
$error404path = $this->getParam('error404path', true, $result['error404path']);
|
||||
$error403path = $this->getParam('error403path', true, $result['error403path']);
|
||||
$error500path = $this->getParam('error500path', true, $result['error500path']);
|
||||
|
||||
if ($options_indexes != 0) {
|
||||
$options_indexes = '1';
|
||||
} else {
|
||||
$options_indexes = '0';
|
||||
}
|
||||
|
||||
if ($options_cgi != 0) {
|
||||
$options_cgi = '1';
|
||||
} else {
|
||||
$options_cgi = '0';
|
||||
}
|
||||
|
||||
if (! empty($error404path)) {
|
||||
$error404path = correctErrorDocument($error404path, true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user