39 include_once
"./Services/Object/classes/class.ilObject.php";
84 public function __construct($a_id = 0, $a_call_by_reference =
true)
87 parent::__construct($a_id, $a_call_by_reference);
100 $this->webdavEnabled = $newValue;
124 $this->webdavActionsVisible = $newValue;
152 $this->customWebfolderInstructions = $newValue;
163 if (strlen($this->customWebfolderInstructions) == 0) {
164 $this->customWebfolderInstructions = self::_getDefaultWebfolderInstructions();
179 return self::_getDefaultWebfolderInstructions();
203 $this->customWebfolderInstructionsEnabled = $newValue;
216 $this->inlineFileExtensions = $newValue;
240 $this->downloadWithUploadedFilename = $newValue;
289 $ilClientIniFile = $DIC[
'ilClientIniFile'];
292 $ilClientIniFile->error(null);
294 if (!$ilClientIniFile->groupExists(
'file_access')) {
295 $ilClientIniFile->addGroup(
'file_access');
297 $ilClientIniFile->setVariable(
'file_access',
'webdav_enabled', $this->webdavEnabled ?
'1' :
'0');
298 $ilClientIniFile->setVariable(
'file_access',
'webdav_actions_visible', $this->webdavActionsVisible ?
'1' :
'0');
299 $ilClientIniFile->setVariable(
'file_access',
'download_with_uploaded_filename', $this->downloadWithUploadedFilename ?
'1' :
'0');
300 $ilClientIniFile->write();
302 if ($ilClientIniFile->getError()) {
305 $ilErr->raiseError($ilClientIniFile->getError(),
$ilErr->WARNING);
308 require_once
'Services/Administration/classes/class.ilSetting.php';
309 $settings =
new ilSetting(
'file_access');
310 $settings->set(
'inline_file_extensions', $this->inlineFileExtensions);
311 $settings->set(
'custom_webfolder_instructions_enabled', $this->customWebfolderInstructionsEnabled ?
'1' :
'0');
312 $settings->set(
'custom_webfolder_instructions', $this->customWebfolderInstructions);
324 $ilClientIniFile = $DIC[
'ilClientIniFile'];
325 $this->webdavEnabled = $ilClientIniFile->readVariable(
'file_access',
'webdav_enabled') ==
'1';
326 $this->webdavActionsVisible = $ilClientIniFile->readVariable(
'file_access',
'webdav_actions_visible') ==
'1';
327 $this->downloadWithUploadedFilename = $ilClientIniFile->readVariable(
'file_access',
'download_with_uploaded_filename') ==
'1';
328 $ilClientIniFile->ERROR =
false;
330 require_once
'Services/Administration/classes/class.ilSetting.php';
331 $settings =
new ilSetting(
'file_access');
332 $this->inlineFileExtensions = $settings->get(
'inline_file_extensions',
'');
333 $this->customWebfolderInstructionsEnabled = $settings->get(
'custom_webfolder_instructions_enabled',
'0') ==
'1';
335 $this->customWebfolderInstructions = $settings->get(
'custom_webfolder_instructions',
'');
354 return $lng->txt(
'webfolder_instructions_text');
367 $val = ini_get(
'upload_max_filesize');
370 $last = strtolower($val[strlen($val) - 1]);
setDownloadWithUploadedFilename($newValue)
Sets the downloadWithUploadedFilename property.
setInlineFileExtensions($newValue)
Sets the inlineFileExtensions property.
$webdavEnabled
Boolean property.
setCustomWebfolderInstructions($newValue)
Sets the customWebfolderInstructions property.
$downloadWithUploadedFilename
Boolean property.
$customWebfolderInstructionsEnabled
Boolean property.
$customWebfolderInstructions
String property.
setCustomWebfolderInstructionsEnabled($newValue)
Sets the customWebfolderInstructionsEnabled property.
$webdavActionsVisible
Boolean property.
getDefaultWebfolderInstructions()
Gets the defaultWebfolderInstructions property.
getUploadMaxFilesize()
TODO: Check if needed and refactor.
static _getDefaultWebfolderInstructions()
TODO: Check if needed and refactor.
isWebdavEnabled()
Gets the webdavEnabled property.
setWebdavEnabled($newValue)
Sets the webdavEnabled property.
update()
update object in db
setWebdavActionsVisible($newValue)
Sets the webdavActionsVisible property.
isCustomWebfolderInstructionsEnabled()
Gets the customWebfolderInstructionsEnabled property.
getInlineFileExtensions()
Gets the inlineFileExtensions property.
getCustomWebfolderInstructions()
Gets the customWebfolderInstructions property.
$inlineFileExtensions
String property.
isWebdavActionsVisible()
Gets the webdavActionsVisible property.
update($pash, $contents, Config $config)
__construct($a_id=0, $a_call_by_reference=true)
Constructor.
write()
write object data into db
isDownloadWithUploadedFilename()
Gets the downloadWithUploadedFilename property.
read()
read object data from db into object