From dccc2abf1fc51f2f2c22f7dea91007abaef91eb2 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 20 Mar 2018 11:30:30 +0100 Subject: Delete old unused lang files --- lang/de/messages-hardcoded.json | 24 ------------------------ lang/de/messages.json | 14 -------------- lang/en/messages-hardcoded.json | 35 ----------------------------------- lang/en/messages.json | 14 -------------- lang/pt/messages-hardcoded.json | 26 -------------------------- lang/pt/messages.json | 11 ----------- 6 files changed, 124 deletions(-) delete mode 100644 lang/de/messages-hardcoded.json delete mode 100644 lang/de/messages.json delete mode 100644 lang/en/messages-hardcoded.json delete mode 100644 lang/en/messages.json delete mode 100644 lang/pt/messages-hardcoded.json delete mode 100644 lang/pt/messages.json (limited to 'lang') diff --git a/lang/de/messages-hardcoded.json b/lang/de/messages-hardcoded.json deleted file mode 100644 index 692bc9bc..00000000 --- a/lang/de/messages-hardcoded.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "lang_clientSshConfig": "SSH-Konfiguration", - "lang_configurationCompilation": "Konfiguration zusammenstellen", - "lang_contentOf": "Inhalt von", - "lang_createUser": "Benutzer anlegen", - "lang_days": "Tag(e)", - "lang_eventLog": "Server Log", - "lang_hours": "Stunde(n)", - "lang_location": "Lokalisierung", - "lang_login": "Anmelden", - "lang_moduleAdd": "Modul hinzuf\u00fcgen", - "lang_noModuleFromThisGroup": "(Kein Modul dieser Gruppe)", - "lang_serverConfiguration": "Serverseitige Konfiguration", - "lang_serverStatus": "Server Status", - "lang_status": "Status", - "lang_titleBackup": "Sichern und Wiederherstellen", - "lang_titleClientStatistics": "Client-Statistiken", - "lang_titleEventLog": "Ereignisprotokoll", - "lang_titleWebinterface": "Webschnittstelle", - "lang_unknwonTaskManager": "Unbekannter Taskmanager-Fehler", - "today": "Heute", - "unused": "Ungenutzt", - "yesterday": "Gestern" -} \ No newline at end of file diff --git a/lang/de/messages.json b/lang/de/messages.json deleted file mode 100644 index a7e81351..00000000 --- a/lang/de/messages.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "ad-config-failed": "Wiederherstellen der Active Directory Konfiguration fehlgeschlagen", - "db-update-done": "Datenbank wurde aktualisiert", - "deleted-tag": "Tag wurde entfernt", - "empty-archive": "Das Archiv enth\u00e4lt keine Dateien oder Verzeichnisse", - "error-archive": "Korruptes Archiv oder nicht unterst\u00fctztes Format", - "error-extract": "Konnte Archiv nicht nach {{0}} entpacken - {{1}}", - "error-nodir": "Das Verzeichnis {{0}} existiert nicht.", - "error-rename": "Konnte {{0}} nicht in {{1}} umbenennen", - "invalid-file": "Die Datei {{0}} existiert nicht!", - "invalid-path": "Ung\u00fcltiger Pfad.", - "remote-parse-failed": "Parsen der empfangenen Daten fehlgeschlagen ({{0}})", - "upload-complete": "Upload von {{0}} war erfolgreich" -} \ No newline at end of file diff --git a/lang/en/messages-hardcoded.json b/lang/en/messages-hardcoded.json deleted file mode 100644 index 55ac6a50..00000000 --- a/lang/en/messages-hardcoded.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "lang_administration": "Translations", - "lang_cities": "Cities", - "lang_clientLog": "Client Log", - "lang_clientSshConfig": "SSH configuration", - "lang_configurationCompilation": "Compile configuration", - "lang_content": "Content", - "lang_contentOf": "Content of \"", - "lang_createUser": "Create User", - "lang_days": "Day(s)", - "lang_eventLog": "Server Log", - "lang_hours": "Hour(s)", - "lang_login": "Login", - "lang_modules": "Modules", - "lang_moduleAdd": "Add Module", - "lang_noModuleFromThisGroup": "(No module from this group)", - "lang_server": "iPXE \/ Boot Menu", - "lang_serverConfiguration": "Server-side Configuration", - "lang_serverStatus": "Server", - "lang_settings": "Settings", - "lang_status": "Status", - "lang_titleBackup": "Save and Restore", - "lang_titleClientStatistics": "Client statistics", - "lang_titleEventLog": "Event log", - "lang_user": "Users", - "lang_userManagement": "Management", - "lang_users": "Users", - "lang_variables": "Variables", - "lang_vmLocation": "Virtual Machine", - "lang_titleWebinterface": "Web Interface", - "lang_unknwonTaskManager": "Unknown Task Manager error", - "today": "Today", - "unused": "Unused", - "yesterday": "Yesterday" -} \ No newline at end of file diff --git a/lang/en/messages.json b/lang/en/messages.json deleted file mode 100644 index edf07a85..00000000 --- a/lang/en/messages.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "ad-config-failed": "Rebuilding the Active Directory configuration failed", - "db-update-done": "Database successfully updated", - "deleted-tag": "Tag was successfully removed", - "empty-archive": "The archive contains no files or directories", - "error-archive": "Corrupted archive or unsupported format", - "error-extract": "Could not unpack archive {{0}} to {{1}}", - "error-nodir": "The directory {{0}} does not exist.", - "error-rename": "Could not rename {{0}} into {{1}}", - "invalid-file": "The file {{0}} does not exist!", - "invalid-path": "Invalid path.", - "remote-parse-failed": "Parsing the received data failed ({{0}})", - "upload-complete": "Upload of {{0}} was successful" -} \ No newline at end of file diff --git a/lang/pt/messages-hardcoded.json b/lang/pt/messages-hardcoded.json deleted file mode 100644 index 0f500e07..00000000 --- a/lang/pt/messages-hardcoded.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "lang_administration": "Tradu\u00e7\u00f5es", - "lang_cities": "Cidades", - "lang_clientLog": "Log dos Clientes", - "lang_content": "Conte\u00fado", - "lang_createUser": "Criar Usu\u00e1rio", - "lang_days": "Dia(s)", - "lang_eventLog": "Log dos Servidores", - "lang_hours": "Hora(s)", - "lang_login": "Entrar", - "lang_modules": "M\u00f3dulos", - "lang_server": "iPXE \/ Boot Menu", - "lang_serverConfiguration": "Configura\u00e7\u00e3o do servidor", - "lang_serverStatus": "Servidor", - "lang_settings": "Configura\u00e7\u00f5es", - "lang_status": "Status", - "lang_titleBackup": "Salvar e Recuperar", - "lang_titleEventLog": "Log de Eventos", - "lang_user": "Usu\u00e1rios", - "lang_userManagement": "Gerenciamento", - "lang_users": "Usu\u00e1rios", - "lang_variables": "Vari\u00e1veis", - "lang_vmLocation": "M\u00e1quina Virtual", - "today": "Hoje", - "yesterday": "Ontem" -} \ No newline at end of file diff --git a/lang/pt/messages.json b/lang/pt/messages.json deleted file mode 100644 index 8738840f..00000000 --- a/lang/pt/messages.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "deleted-tag": "Tag foi removida com sucesso", - "empty-archive": "O arquivo n\u00e3o cont\u00e9m arquivos ou diret\u00f3rios", - "error-archive": "Arquivo corrompido ou formato n\u00e3o suportado", - "error-extract": "N\u00e3o foi poss\u00edvel descompactar arquivo {{0}} para {{1}}", - "error-nodir": "O diret\u00f3rio {{0}} n\u00e3o existe.", - "error-rename": "N\u00e3o foi poss\u00edvel renomear {{0}} em {{1}}", - "invalid-file": "O arquivo {{0}} n\u00e3o existe!", - "remote-parse-failed": "An\u00e1lise dos dados recebidos falhou ({{0}})", - "upload-complete": "Envio de {{0}} foi bem sucedido" -} \ No newline at end of file -- cgit v1.2.3-55-g7522 From cd092274b88599449902f480f35291768be6e99e Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 7 Aug 2018 16:54:01 +0200 Subject: [inc/User] Fix access to Page if class is not loaded --- inc/user.inc.php | 11 ++++- lang/pt/flag.png | Bin 1115 -> 0 bytes lang/pt/name.txt | 1 - modules-available/exams/lang/de/template-tags.json | 2 +- modules-available/exams/lang/en/template-tags.json | 2 +- .../coursebackend/coursebackend_hisinone.inc.php | 48 +++++++++++++-------- .../locationinfo/lang/de/template-tags.json | 2 +- .../locationinfo/lang/en/template-tags.json | 2 +- 8 files changed, 43 insertions(+), 25 deletions(-) delete mode 100644 lang/pt/flag.png delete mode 100644 lang/pt/name.txt (limited to 'lang') diff --git a/inc/user.inc.php b/inc/user.inc.php index 2571c61c..20e8cd3d 100644 --- a/inc/user.inc.php +++ b/inc/user.inc.php @@ -34,8 +34,15 @@ class User if ($permission{0} === '.') { $permission = substr($permission, 1); } else { - $module = Page::getModule(); - $permission = $module ? $module->getIdentifier() . "." . $permission : $permission; + if (class_exists('Page')) { + $module = Page::getModule(); + if ($module !== false) { + $module = $module->getIdentifier(); + } + } else { + $module = strtolower(Request::any('do')); + } + $permission = $module ? $module . "." . $permission : $permission; } return PermissionUtil::userHasPermission(self::$user['userid'], $permission, $locationid); } diff --git a/lang/pt/flag.png b/lang/pt/flag.png deleted file mode 100644 index 78c57dea..00000000 Binary files a/lang/pt/flag.png and /dev/null differ diff --git a/lang/pt/name.txt b/lang/pt/name.txt deleted file mode 100644 index 811b10b4..00000000 --- a/lang/pt/name.txt +++ /dev/null @@ -1 +0,0 @@ -Português \ No newline at end of file diff --git a/modules-available/exams/lang/de/template-tags.json b/modules-available/exams/lang/de/template-tags.json index 8bf37143..1dd51374 100644 --- a/modules-available/exams/lang/de/template-tags.json +++ b/modules-available/exams/lang/de/template-tags.json @@ -29,7 +29,7 @@ "lang_headingMain": "bwLehrpool Pr\u00fcfungsmodus", "lang_id": "ID", "lang_lectureName": "Veranstaltungsname", - "lang_lectureOutOfRange": "Achtung: Start- bzw. Endzeitpunkt der Veranstaltung liegen au\u00dferhalb des oben angegebenen Zeitraums", + "lang_lectureOutOfRange": "Achtung: Der oben angegebene Zeitraum ist k\u00fcrzer als die Dauer der Veranstaltung", "lang_location": "Raum\/Ort", "lang_locationInfo": "W\u00e4hlen Sie hier die R\u00e4ume und Orte aus, die w\u00e4hrend des unten ausgew\u00e4hlten Zeitraums in den Pr\u00fcfungsmodus versetzt werden. Wenn sie hier keine Auswahl treffen, werden alle R\u00e4ume in den Pr\u00fcfungsmodus versetzt.", "lang_locations": "R\u00e4ume\/Orte", diff --git a/modules-available/exams/lang/en/template-tags.json b/modules-available/exams/lang/en/template-tags.json index af87bb01..23266154 100644 --- a/modules-available/exams/lang/en/template-tags.json +++ b/modules-available/exams/lang/en/template-tags.json @@ -29,7 +29,7 @@ "lang_headingMain": "bwLehrpool Exam Mode", "lang_id": "ID", "lang_lectureName": "Lecture name", - "lang_lectureOutOfRange": "Hint: Start or end date of given lecture lies outside of exam period given above", + "lang_lectureOutOfRange": "Hint: The exam period given above is shorter than the duration of the given lecture", "lang_location": "Room\/Location", "lang_locationInfo": "Select the rooms and locations you want to enable the exam mode in. Selecting nothing at all means that all clients will boot into exam mode during the given time period.", "lang_locations": "Rooms\/Locations", diff --git a/modules-available/locationinfo/inc/coursebackend/coursebackend_hisinone.inc.php b/modules-available/locationinfo/inc/coursebackend/coursebackend_hisinone.inc.php index 558f5cd0..3b26e625 100644 --- a/modules-available/locationinfo/inc/coursebackend/coursebackend_hisinone.inc.php +++ b/modules-available/locationinfo/inc/coursebackend/coursebackend_hisinone.inc.php @@ -274,8 +274,7 @@ class CourseBackend_HisInOne extends CourseBackend foreach ($eventDetails as $event) { foreach (array('/hisdefaulttext', '/hisshorttext', - '/hisshortcomment', - '/hisplanelements/hisplanelement/hisdefaulttext') as $path) { + '/hisshortcomment') as $path) { $name = $this->getArrayPath($event, $path); if (!empty($name) && !empty($name[0])) break; @@ -284,25 +283,38 @@ class CourseBackend_HisInOne extends CourseBackend if ($name === false) { $name = ['???']; } - $unitPlannedDates = $this->getArrayPath($event, - '/hisplanelements/hisplanelement/hisplannedDates/hisplannedDate/hisindividualDates/hisindividualDate'); - if ($unitPlannedDates === false) { - $this->error = 'Cannot find ./hisplanelements/hisplanelement/hisplannedDates/hisplannedDate/hisindividualDates/hisindividualDate'; - error_log('Cannot find ./hisplanelements/hisplanelement/hisplannedDates/hisplannedDate/hisindividualDates/hisindividualDate'); + $planElements = $this->getArrayPath($event, '/hisplanelements/hisplanelement'); + if ($planElements === false) { + $this->error = 'Cannot find ./hisplanelements/hisplanelement'; + error_log('Cannot find ./hisplanelements/hisplanelement'); error_log(print_r($event, true)); continue; } - foreach ($unitPlannedDates as $plannedDate) { - $eventRoomId = $this->getArrayPath($plannedDate, '/hisroomId')[0]; - $eventDate = $this->getArrayPath($plannedDate, '/hisexecutiondate')[0]; - if (in_array($eventRoomId, $requestedRoomIds) && in_array($eventDate, $currentWeek)) { - $startTime = $this->getArrayPath($plannedDate, '/hisstarttime')[0]; - $endTime = $this->getArrayPath($plannedDate, '/hisendtime')[0]; - $tTables[$eventRoomId][] = array( - 'title' => $name[0], - 'start' => $eventDate . "T" . $startTime, - 'end' => $eventDate . "T" . $endTime - ); + foreach ($planElements as $planElement) { + $unitPlannedDates = $this->getArrayPath($planElement, + '/hisplannedDates/hisplannedDate/hisindividualDates/hisindividualDate'); + if ($unitPlannedDates === false) { + $this->error = 'Cannot find ./hisplannedDates/hisplannedDate/hisindividualDates/hisindividualDate'; + error_log('Cannot find ./hisplannedDates/hisplannedDate/hisindividualDates/hisindividualDate'); + error_log(print_r($planElement, true)); + continue; + } + $localName = $this->getArrayPath($planElement, '/hisdefaulttext'); + if ($localName === false || empty($localName[0])) { + $localName = $name; + } + foreach ($unitPlannedDates as $plannedDate) { + $eventRoomId = $this->getArrayPath($plannedDate, '/hisroomId')[0]; + $eventDate = $this->getArrayPath($plannedDate, '/hisexecutiondate')[0]; + if (in_array($eventRoomId, $requestedRoomIds) && in_array($eventDate, $currentWeek)) { + $startTime = $this->getArrayPath($plannedDate, '/hisstarttime')[0]; + $endTime = $this->getArrayPath($plannedDate, '/hisendtime')[0]; + $tTables[$eventRoomId][] = array( + 'title' => $localName[0], + 'start' => $eventDate . "T" . $startTime, + 'end' => $eventDate . "T" . $endTime + ); + } } } } diff --git a/modules-available/locationinfo/lang/de/template-tags.json b/modules-available/locationinfo/lang/de/template-tags.json index bcdf7148..b51c420b 100644 --- a/modules-available/locationinfo/lang/de/template-tags.json +++ b/modules-available/locationinfo/lang/de/template-tags.json @@ -76,7 +76,7 @@ "lang_remoteSchedule": "Abruf Belegungsplan", "lang_room": "Raum", "lang_roomId": "Raum ID", - "lang_roomIdTooltip": "Die Raum ID, die der Server ben\u00f6tigt, um Kalenderdaten abzurufen", + "lang_roomIdTooltip": "Die Raum ID, die der Server ben\u00f6tigt, um Kalenderdaten abzurufen (bei Exchange die Postfachadresse)", "lang_roomupdateTooltip": "Zeit nach der die PCs aktualisiert werden (in Sekunden)", "lang_rotation": "Rotation", "lang_rotation0": "0\u00b0", diff --git a/modules-available/locationinfo/lang/en/template-tags.json b/modules-available/locationinfo/lang/en/template-tags.json index 558ddff0..f041dc0a 100644 --- a/modules-available/locationinfo/lang/en/template-tags.json +++ b/modules-available/locationinfo/lang/en/template-tags.json @@ -76,7 +76,7 @@ "lang_remoteSchedule": "Time table retrieval", "lang_room": "Room", "lang_roomId": "Room ID", - "lang_roomIdTooltip": "The ID of the room the server needs, for querying the calendar data", + "lang_roomIdTooltip": "The ID of the room the server needs, for querying the calendar data (when using exchange the room mailbox)", "lang_roomupdateTooltip": "Time the PCs in the room gets updated (in seconds)", "lang_rotation": "Rotation", "lang_rotation0": "0\u00b0", -- cgit v1.2.3-55-g7522