From a895fb1b91d6a423ac00ce22283c887b6f9dadf5 Mon Sep 17 00:00:00 2001 From: Mary Strodl Date: Wed, 21 Oct 2026 16:09:59 -0400 Subject: [PATCH] Update to PHP 8.4 --- Dockerfile | 8 ++++---- api/entity.php | 2 +- .../directives/scheduleActionsDirective.ts | 4 ++-- inc/config.env.php | 19 +------------------ index.php | 5 ++++- 5 files changed, 12 insertions(+), 26 deletions(-) diff --git a/Dockerfile b/Dockerfile index da9f06a..8ac5804 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,7 +11,7 @@ COPY assets ./assets RUN npm run-script build -FROM docker.io/php:7.3-apache +FROM docker.io/php:8.4-apache LABEL author="Devin Matte " RUN echo "deb-src http://deb.debian.org/debian buster main" >> /etc/apt/sources.list @@ -36,6 +36,7 @@ RUN apt-get -yq update && \ libxml2-dev \ unzip \ wget \ + fonts-roboto \ --no-install-recommends RUN apt-get -yq build-dep imagemagick @@ -44,10 +45,9 @@ RUN wget https://github.com/ImageMagick/ImageMagick6/archive/6.9.11-22.tar.gz && tar -xzvf 6.9.11-22.tar.gz && \ cd ImageMagick6-6.9.11-22 && \ ./configure && \ - make && \ + make -j16 && \ make install && \ - ldconfig /usr/local/lib && \ - make check + ldconfig /usr/local/lib RUN docker-php-ext-install mysqli && \ yes '' | pecl install imagick && docker-php-ext-enable imagick diff --git a/api/entity.php b/api/entity.php index 2c920f1..35c04cc 100644 --- a/api/entity.php +++ b/api/entity.php @@ -114,7 +114,7 @@ "id" => $department['id'], "title" => $department['title'], "code" => isset($department['code']) ? $department['code'] : null, - "number" => trim($department['number'], " ,") + "number" => $department['number'] ? trim($department['number'], " ,") : null, ]; } diff --git a/assets/src/modules/sm/Schedule/directives/scheduleActionsDirective.ts b/assets/src/modules/sm/Schedule/directives/scheduleActionsDirective.ts index 2a245c4..7630b54 100644 --- a/assets/src/modules/sm/Schedule/directives/scheduleActionsDirective.ts +++ b/assets/src/modules/sm/Schedule/directives/scheduleActionsDirective.ts @@ -154,7 +154,7 @@ angular.module('sm').directive('scheduleActions', function ($http, $q, shareServ const popup = openPopup(true) getSavedInfo().then(function (data) { - popup.location = ('http://' + window.location.hostname + + popup.location = (window.location.origin + '/img/schedules/' + parseInt(data.id, 16) + '.png') }) }, @@ -174,7 +174,7 @@ angular.module('sm').directive('scheduleActions', function ($http, $q, shareServ popup.localStorage.setItem('reloadSchedule', angular.toJson(reloadSchedule)) popup.document.title = 'My Schedule' - popup.location = 'http://' + window.location.hostname + '/schedule/render/print' + popup.location = window.location.origin + '/schedule/render/print' }, hide: function () { diff --git a/inc/config.env.php b/inc/config.env.php index 4ec3ba1..3781a35 100644 --- a/inc/config.env.php +++ b/inc/config.env.php @@ -1,6 +1,6 @@ $v) { - unset($process[$key][$k]); - if (is_array($v)) { - $process[$key][stripslashes($k)] = $v; - $process[] = &$process[$key][stripslashes($k)]; - } else { - $process[$key][stripslashes($k)] = stripslashes($v); - } - } - } - unset($process); -} //////////////////////////////////////////////////////////////////////////// // CALCULATIONS diff --git a/index.php b/index.php index 627d54c..0f59766 100644 --- a/index.php +++ b/index.php @@ -32,7 +32,10 @@ // HACK FOR OPEN-GRAPH TAGS, I KNOW, THIS IS TERRIBLE $path = explode('/', $_SERVER['REQUEST_URI']); if ($path[1] == 'schedule') { - $id = (empty($path[2]))? '': hexdec($path[2]); + $id = ''; + if (!empty($path[2]) && preg_match('/^[a-fA-F0-9]*$/', $path[2]) === 1) { + $id = hexdec($path[2]); + } if(!empty($id)) { // We are making the assumption that only new schedules with images