aboutsummaryrefslogtreecommitdiff
path: root/app/controllers/shared
diff options
context:
space:
mode:
authorMichaela Brückner <brueckner@data-quest.de>2022-06-22 13:24:34 +0000
committerDavid Siegfried <david.siegfried@uni-vechta.de>2022-06-22 13:24:34 +0000
commitfd79ab0950d2a2ee711d1d6d785f4aeb2ba916b0 (patch)
treeb92e05bb28f07f303d266e32a41b49aa0f3ba443 /app/controllers/shared
parent45be65437b602b062a3ead9e25f778587b3f92fd (diff)
re #208
Merge request studip/studip!603
Diffstat (limited to 'app/controllers/shared')
-rw-r--r--app/controllers/shared/contacts.php9
-rw-r--r--app/controllers/shared/modul.php3
2 files changed, 4 insertions, 8 deletions
diff --git a/app/controllers/shared/contacts.php b/app/controllers/shared/contacts.php
index f2d5cee..d4a9576 100644
--- a/app/controllers/shared/contacts.php
+++ b/app/controllers/shared/contacts.php
@@ -43,12 +43,9 @@ class Shared_ContactsController extends MVVController
// set default semester filter
if (!isset($this->filter['start_sem.beginn'], $this->filter['end_sem.ende'])) {
- $sem_time_switch = Config::get()->SEMESTER_TIME_SWITCH;
// switch semester according to time switch
// (n weeks before next semester)
- $current_sem = Semester::findByTimestamp(
- time() + $sem_time_switch * 7 * 24 * 3600
- );
+ $current_sem = Semester::findDefault();
if ($current_sem) {
$this->filter['start_sem.beginn'] = $current_sem->beginn;
$this->filter['end_sem.ende'] = $current_sem->beginn;
@@ -443,7 +440,7 @@ class Shared_ContactsController extends MVVController
if (Request::submitted('store_ansprechpartner')) {
CSRFProtection::verifySecurityToken();
-
+
if (!$user_id) {
if (Request::get('exansp_name')) {
$ext_contact->name = Request::i18n('exansp_name');
@@ -540,7 +537,7 @@ class Shared_ContactsController extends MVVController
public function store_ansprechpartner_action ($contact_range_id, $origin = 'index') {
CSRFProtection::verifySecurityToken();
-
+
$contact_range = MvvContactRange::find($contact_range_id);
if (!$contact_range) {
throw new Exception(_('Fehlerhafte Zuordnung!'));
diff --git a/app/controllers/shared/modul.php b/app/controllers/shared/modul.php
index 55644db..0c3a39b 100644
--- a/app/controllers/shared/modul.php
+++ b/app/controllers/shared/modul.php
@@ -49,8 +49,7 @@ class Shared_ModulController extends AuthenticatedController
}
if (!$semester_id) {
- $semesterSwitch = (int) Config::get()->SEMESTER_TIME_SWITCH;
- $currentSemester = Semester::findByTimestamp(time() + $semesterSwitch * 7 * 24 * 60 * 60);
+ $currentSemester = Semester::findDefault();
} else {
$currentSemester = Semester::find($semester_id);
}