diff options
author | Simon Rettberg | 2020-12-16 14:11:43 +0100 |
---|---|---|
committer | Simon Rettberg | 2020-12-16 14:11:43 +0100 |
commit | a40362564fa659ffa92d9ad9bd0ca164b592ff55 (patch) | |
tree | 03a27e80b52b46bd13ec1d3781d86f095089900f /modules-available/locations/pages | |
parent | [roomplanner] Remove duplicate files (diff) | |
download | slx-admin-a40362564fa659ffa92d9ad9bd0ca164b592ff55.tar.gz slx-admin-a40362564fa659ffa92d9ad9bd0ca164b592ff55.tar.xz slx-admin-a40362564fa659ffa92d9ad9bd0ca164b592ff55.zip |
[locations] Avoid potentially duplicate ids in ajax fragments
Diffstat (limited to 'modules-available/locations/pages')
-rw-r--r-- | modules-available/locations/pages/details.inc.php | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/modules-available/locations/pages/details.inc.php b/modules-available/locations/pages/details.inc.php index aa279570..2f444157 100644 --- a/modules-available/locations/pages/details.inc.php +++ b/modules-available/locations/pages/details.inc.php @@ -33,15 +33,16 @@ class SubPage return false; } - private static function updateOpeningTimes() { - $openingTimes = Request::post('openingtimes', '', 'string'); - $locationid = Request::post('locationid', false, 'int'); + private static function updateOpeningTimes() + { + $openingTimes = Request::post('openingtimes', Request::REQUIRED, 'string'); + $locationid = Request::post('locationid', Request::REQUIRED, 'int'); $wol = Request::post('wol', false, 'bool'); $woloffset = Request::post('wol-offset', 0, 'int'); $sd = Request::post('sd', false, 'bool'); $sdoffset = Request::post('sd-offset', 0, 'int'); - User::assertPermission('location.edit', $locationid); + User::assertPermission('location.edit.*', $locationid); // TODO: Introduce permission // Construct opening-times for database if ($openingTimes !== '') { @@ -109,8 +110,6 @@ class SubPage Scheduler::deleteSchedule($locationid, 'sd'); } } - - return true; } private static function getTime($str) |