Skip to content
Permalink
Browse files Browse the repository at this point in the history
[FIX] 0027430
  • Loading branch information
chfsx committed May 18, 2020
1 parent 65c03bf commit 94d9b16
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 12 deletions.
13 changes: 3 additions & 10 deletions Modules/File/classes/class.ilObjFileGUI.php
Expand Up @@ -36,6 +36,7 @@ public function __construct($a_id = 0, $a_id_type = self::REPOSITORY_NODE_ID, $a
{
$this->log = ilLoggerFactory::getLogger('file');
parent::__construct($a_id, $a_id_type, $a_parent_node_id);
$this->lng->loadLanguageModule('file');
}


Expand Down Expand Up @@ -187,7 +188,6 @@ protected function initCreationForms($a_new_type)

if ($this->id_type == self::WORKSPACE_NODE_ID) {
if (!ilDiskQuotaHandler::isUploadPossible()) {
$this->lng->loadLanguageModule("file");
ilUtil::sendFailure($this->lng->txt("personal_workspace_quota_exceeded_warning"), true);
$this->ctrl->redirect($this, "cancel");
}
Expand Down Expand Up @@ -564,8 +564,6 @@ public function edit()
*/
protected function initPropertiesForm($mode = "create")
{
$this->lng->loadLanguageModule('file');

$form = new ilPropertyFormGUI();
$form->setFormAction($this->ctrl->getFormAction($this, 'update'));
$form->setTitle($this->lng->txt('file_edit'));
Expand Down Expand Up @@ -706,9 +704,6 @@ public function infoScreenForward()
$info = new ilInfoScreenGUI($this);

if ($this->checkPermissionBool("read", "sendfile")) {
// #9876
$this->lng->loadLanguageModule("file");

// #14378
include_once "Services/UIComponent/Button/classes/class.ilLinkButton.php";
$button = ilLinkButton::getInstance();
Expand Down Expand Up @@ -763,7 +758,6 @@ public function infoScreenForward()
$uploader = array_shift($uploader);
$uploader = $uploader["user_id"];

$this->lng->loadLanguageModule("file");
include_once "Services/User/classes/class.ilUserUtil.php";
$info->addProperty($this->lng->txt("file_uploaded_by"), ilUserUtil::getNamePresentation($uploader));

Expand Down Expand Up @@ -1008,7 +1002,7 @@ public function uploadFiles()
}
}
} catch (Exception $ex) {
$response->error = $ex->getMessage();
$response->error = $this->lng->txt('general_upload_error_occured');
}
} else {
$dnd_input = $dnd_form_gui->getItemByPostVar("upload_files");
Expand All @@ -1031,7 +1025,6 @@ public function uploadFiles()
if ($DIC->upload()->hasBeenProcessed()) {
foreach ($DIC->upload()->getResults() as $result) {
if (!ilFileUtils::hasValidExtension($result->getName())) {
$this->lng->loadLanguageModule('file');
ilUtil::sendInfo(
$this->lng->txt('file_upload_info_file_with_critical_unknown_extension_later_renamed_when_downloading'),
true
Expand Down Expand Up @@ -1155,7 +1148,7 @@ protected function handleFileUpload($file_upload)
} catch (ilFileUtilsException $e) {
$response->error = $e->getMessage();
} catch (Exception $ex) {
$response->error = $ex->getMessage();
$response->error = $this->lng->txt('general_upload_error_occured');
}

ilUtil::delDir($newDir);
Expand Down
2 changes: 1 addition & 1 deletion Services/Utilities/classes/class.ilFileUtils.php
Expand Up @@ -882,7 +882,7 @@ public static function rename($a_source, $a_target)
$pi = pathinfo($a_target);
if (!in_array(strtolower($pi["extension"]), self::getValidExtensions())) {
include_once("./Services/Utilities/classes/class.ilFileUtilsException.php");
throw new ilFileUtilsException("Invalid target file " . $pi["basename"] . ".");
throw new ilFileUtilsException("Invalid target file");
}

return rename($a_source, $a_target);
Expand Down
3 changes: 2 additions & 1 deletion lang/ilias_de.lang
Expand Up @@ -8530,7 +8530,8 @@ feed#:#feed_no_valid_url#:#Die URL des Webfeeds ist nicht gültig.
feed#:#feed_nr_pd_feeds#:#Anzahl externer Webfeeds auf dem Persönlichen Schreibtisch
feed#:#feed_nr_pd_feeds_info#:#Bestimmt die maximale Anzahl externer Webfeeds, die ein Benutzer auf seinen Persönlichen Schreibtisch legen kann.
feed#:#feed_open_source_page#:#Gehe zur externen Nachricht
feed#:#feed_settings#:#Externe Webfeeds
feed#:#feed_settings#:#Externe Webfeeds^
file#:#general_upload_error_occured#:#Beim Verarbeiten der Datei ist ein unerwartetet Fehler aufgetreten.
file#:#enable_personal_workspace_disk_quota#:#Disk-Quota für den Persönlichen Arbeitsraum aktivieren
file#:#enable_personal_workspace_disk_quota_info#:#Erlaubt die Begrenzung des verfügbaren Plattenplatzes für jedes Benutzerkonto und jede globale Rolle. Dies betrifft nur Dateien im persönlichen Arbeitsraum und in Portfolios. Sobald ein Benutzer die definierte Disk-Quota erreicht, kann dieser keine weiteren Dateien mehr hochladen.
file#:#file_copy#:#Datei kopieren
Expand Down
1 change: 1 addition & 0 deletions lang/ilias_en.lang
Expand Up @@ -10969,6 +10969,7 @@ crs#:#event_list_registered_only#:#Only Registered
didactic#:#didactic_default_type#:#Default
pd#:#pd_info_delete_sure_remove#:#Are you sure you want to remove the following objects from your Personal Desktop?
pd#:#pd_info_delete_sure_unsubscribe#:#Are you sure you want to unsubscribe from the following objects?
file#:#general_upload_error_occured#:#An unexpected error occured during upload.
file#:#enable_personal_workspace_disk_quota#:#Activate Hard Quota for Personal Workspace
file#:#enable_personal_workspace_disk_quota_info#:#Allows definition of a hard disk quota for each user account and each global role. This quota only affects files in the personal workspace and in portfolios. As soon as a user exceeds the defined quota, ILIAS will prohibit the user to upload more files until the used disk space is again under quota.
file#:#personal_workspace_disk_quota#:#Hard Disk Quota for Personal Workspace
Expand Down

0 comments on commit 94d9b16

Please sign in to comment.