diff --git a/docker/Dockerfile b/docker/Dockerfile index f656b3a3..8bcb05ce 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -28,7 +28,7 @@ COPY --from=composer /app/composer.lock /app/ RUN find /app/storage/ -type f -not -name VERSION -exec rm {} \; # Build the PHP container -FROM php:7-fpm-alpine +FROM php:8-fpm-alpine WORKDIR /var/www RUN apk add --no-cache icu-dev && \ docker-php-ext-install intl pdo_mysql diff --git a/docker/dev/Dockerfile b/docker/dev/Dockerfile index 98fb3177..cc89b9f4 100644 --- a/docker/dev/Dockerfile +++ b/docker/dev/Dockerfile @@ -1,11 +1,11 @@ # Engelsystem PHP FPM development image including Xdebug -FROM php:7-fpm-alpine AS es_php_fpm +FROM php:8-fpm-alpine AS es_php_fpm WORKDIR /var/www RUN apk add --no-cache icu-dev $PHPIZE_DEPS && \ pecl install pcov xdebug && \ docker-php-ext-install intl pdo_mysql && \ docker-php-ext-enable pcov xdebug -RUN echo -e "xdebug.remote_enable=1\nxdebug.remote_connect_back=1\n" >> /usr/local/etc/php/conf.d/xdebug.ini +RUN echo -e "xdebug.mode=debug\nxdebug.discover_client_host=1\n" >> /usr/local/etc/php/conf.d/xdebug.ini ENV TRUSTED_PROXIES 10.0.0.0/8,::ffff:10.0.0.0/8,\ 127.0.0.0/8,::ffff:127.0.0.0/8,\ diff --git a/docker/nginx/nginx.conf b/docker/nginx/nginx.conf index 63e934bc..c2f52aef 100644 --- a/docker/nginx/nginx.conf +++ b/docker/nginx/nginx.conf @@ -11,6 +11,9 @@ http { scgi_temp_path /tmp/scgi_temp; uwsgi_temp_path /tmp/uwsgi_temp; + fastcgi_buffers 16 16k; + fastcgi_buffer_size 32k; + map $http_x_forwarded_proto $forwarded_proto { default $http_x_forwarded_proto; https https; diff --git a/includes/pages/user_shifts.php b/includes/pages/user_shifts.php index bbaeb708..be43b67e 100644 --- a/includes/pages/user_shifts.php +++ b/includes/pages/user_shifts.php @@ -115,12 +115,15 @@ function load_rooms() */ function load_days() { - $days = DB::select(' - SELECT DISTINCT DATE(FROM_UNIXTIME(`start`)) AS `id`, DATE(FROM_UNIXTIME(`start`)) AS `name` - FROM `Shifts` - ORDER BY `id`, `name` - '); - $days = array_map('array_shift', $days); + $days = (new Collection(DB::select( + ' + SELECT DISTINCT DATE(FROM_UNIXTIME(`start`)) AS `id`, DATE(FROM_UNIXTIME(`start`)) AS `name` + FROM `Shifts` + ORDER BY `id`, `name` + ' + ))) + ->pluck('id') + ->toArray(); if (empty($days)) { error(__('The administration has not configured any shifts yet.'));