From f380c5bc157e0d6f7390134daf0200f864cf4c2f Mon Sep 17 00:00:00 2001 From: Edoardo Gusmaroli Date: Mon, 11 Dec 2023 15:39:38 +0100 Subject: [PATCH 1/3] update to support PHP 8.1.0 --- composer.json | 25 +- composer.lock | 813 ++++++++++++++---- cron/status.cron.php | 10 +- img/alert.jpg | Bin 0 -> 7601 bytes img/alert.png | Bin 0 -> 3663 bytes src/config/services.xml | 6 +- src/includes/functions.inc.php | 51 +- src/psm/Module/AbstractController.php | 4 +- .../Config/Controller/ConfigController.php | 2 +- src/psm/Module/ControllerInterface.php | 2 +- .../Error/Controller/ErrorController.php | 2 +- .../Install/Controller/InstallController.php | 2 +- .../Controller/AbstractServerController.php | 2 +- .../Server/Controller/LogController.php | 2 +- .../Server/Controller/ServerController.php | 8 +- .../Server/Controller/StatusController.php | 15 +- .../Server/Controller/UpdateController.php | 2 +- .../User/Controller/LoginController.php | 2 +- .../User/Controller/ProfileController.php | 2 +- .../Module/User/Controller/UserController.php | 2 +- src/psm/Router.php | 2 +- src/psm/Util/Module/Modal.php | 6 +- src/psm/Util/Module/ModalInterface.php | 2 +- src/psm/Util/Module/Sidebar.php | 4 +- src/psm/Util/Module/SidebarInterface.php | 2 +- src/psm/Util/Server/HistoryGraph.php | 8 +- .../module/server/server/view.tpl.html | 4 +- 27 files changed, 745 insertions(+), 235 deletions(-) create mode 100644 img/alert.jpg create mode 100644 img/alert.png diff --git a/composer.json b/composer.json index 511ec417..f04136f8 100644 --- a/composer.json +++ b/composer.json @@ -4,20 +4,20 @@ "license": "GPL-3.0-or-later", "homepage": "https://www.phpservermonitor.org", "require": { - "php": "^5.5.9|>=7.0.8", + "php": ">=8.1.0", "ext-curl": "*", "ext-json": "*", "ext-pdo": "*", "ext-xml": "*", - "phpmailer/phpmailer": ">=6.5.0 ~6.0", - "symfony/config": "~3.4", - "symfony/dependency-injection": "~3.4", - "symfony/event-dispatcher": "~3.4", - "symfony/http-foundation": ">=3.4.35 ~3.4", - "symfony/filesystem": "~3.4", - "php-pushover/php-pushover": "dev-master", - "paragonie/random_compat": "^2.0", - "twig/twig": "~1.35", + "phpmailer/phpmailer": "^6.9", + "symfony/config": "^4.4", + "symfony/dependency-injection": "^4.4", + "symfony/event-dispatcher": "^5.4", + "symfony/http-foundation": "^6.4", + "symfony/filesystem": "^5.4", + "php-pushover/php-pushover": "^1.0", + "paragonie/random_compat": "^9.99", + "twig/twig": "^3.8", "jaxl/jaxl": "^3.1", "viharm/psm-ldap-auth": "^1.1" }, @@ -29,5 +29,10 @@ "psr-4": { "psm\\": "src/psm/" } + }, + "config": { + "allow-plugins": { + "mnsami/composer-custom-directory-installer": true + } } } \ No newline at end of file diff --git a/composer.lock b/composer.lock index 0ac4f53c..313e0ed3 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "c967e1466fd2a2effd7f76650bba60d7", + "content-hash": "083c1eada4c6f99210f4eacc76ce8b5f", "packages": [ { "name": "jaxl/jaxl", @@ -142,33 +142,29 @@ }, { "name": "paragonie/random_compat", - "version": "v2.0.20", + "version": "v9.99.100", "source": { "type": "git", "url": "https://github.com/paragonie/random_compat.git", - "reference": "0f1f60250fccffeaf5dda91eea1c018aed1adc2a" + "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/0f1f60250fccffeaf5dda91eea1c018aed1adc2a", - "reference": "0f1f60250fccffeaf5dda91eea1c018aed1adc2a", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/996434e5492cb4c3edcb9168db6fbb1359ef965a", + "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a", "shasum": "" }, "require": { - "php": ">=5.2.0" + "php": ">= 7" }, "require-dev": { - "phpunit/phpunit": "4.*|5.*" + "phpunit/phpunit": "4.*|5.*", + "vimeo/psalm": "^1" }, "suggest": { "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." }, "type": "library", - "autoload": { - "files": [ - "lib/random.php" - ] - }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" @@ -192,23 +188,22 @@ "issues": "https://github.com/paragonie/random_compat/issues", "source": "https://github.com/paragonie/random_compat" }, - "time": "2021-04-17T09:33:01+00:00" + "time": "2020-10-15T08:29:30+00:00" }, { "name": "php-pushover/php-pushover", - "version": "dev-master", + "version": "v1.0.1", "source": { "type": "git", "url": "https://github.com/cschalenborgh/php-pushover.git", - "reference": "ef1df985bf3acb17b1f1f8fe2df2c3c9a16bef32" + "reference": "b2d060efacf48e4c6821427691b19db0315ccedd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/cschalenborgh/php-pushover/zipball/ef1df985bf3acb17b1f1f8fe2df2c3c9a16bef32", - "reference": "ef1df985bf3acb17b1f1f8fe2df2c3c9a16bef32", + "url": "https://api.github.com/repos/cschalenborgh/php-pushover/zipball/b2d060efacf48e4c6821427691b19db0315ccedd", + "reference": "b2d060efacf48e4c6821427691b19db0315ccedd", "shasum": "" }, - "default-branch": true, "type": "library", "autoload": { "files": [ @@ -227,20 +222,20 @@ "issues": "https://github.com/cschalenborgh/php-pushover/issues", "source": "https://github.com/cschalenborgh/php-pushover/tree/master" }, - "time": "2021-01-12T12:43:39+00:00" + "time": "2019-09-26T19:38:11+00:00" }, { "name": "phpmailer/phpmailer", - "version": "v6.5.0", + "version": "v6.9.1", "source": { "type": "git", "url": "https://github.com/PHPMailer/PHPMailer.git", - "reference": "a5b5c43e50b7fba655f793ad27303cd74c57363c" + "reference": "039de174cd9c17a8389754d3b877a2ed22743e18" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/a5b5c43e50b7fba655f793ad27303cd74c57363c", - "reference": "a5b5c43e50b7fba655f793ad27303cd74c57363c", + "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/039de174cd9c17a8389754d3b877a2ed22743e18", + "reference": "039de174cd9c17a8389754d3b877a2ed22743e18", "shasum": "" }, "require": { @@ -250,20 +245,25 @@ "php": ">=5.5.0" }, "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", - "doctrine/annotations": "^1.2", + "dealerdirect/phpcodesniffer-composer-installer": "^1.0", + "doctrine/annotations": "^1.2.6 || ^1.13.3", + "php-parallel-lint/php-console-highlighter": "^1.0.0", + "php-parallel-lint/php-parallel-lint": "^1.3.2", "phpcompatibility/php-compatibility": "^9.3.5", "roave/security-advisories": "dev-latest", - "squizlabs/php_codesniffer": "^3.5.6", - "yoast/phpunit-polyfills": "^0.2.0" + "squizlabs/php_codesniffer": "^3.7.2", + "yoast/phpunit-polyfills": "^1.0.4" }, "suggest": { + "decomplexity/SendOauth2": "Adapter for using XOAUTH2 authentication", "ext-mbstring": "Needed to send email in multibyte encoding charset or decode encoded addresses", + "ext-openssl": "Needed for secure SMTP sending and DKIM signing", + "greew/oauth2-azure-provider": "Needed for Microsoft Azure XOAUTH2 authentication", "hayageek/oauth2-yahoo": "Needed for Yahoo XOAUTH2 authentication", "league/oauth2-google": "Needed for Google XOAUTH2 authentication", "psr/log": "For optional PSR-3 debug logging", - "stevenmaguire/oauth2-microsoft": "Needed for Microsoft XOAUTH2 authentication", - "symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)" + "symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)", + "thenetworg/oauth2-azure": "Needed for Microsoft XOAUTH2 authentication" }, "type": "library", "autoload": { @@ -295,7 +295,7 @@ "description": "PHPMailer is a full-featured email creation and transfer class for PHP", "support": { "issues": "https://github.com/PHPMailer/PHPMailer/issues", - "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.5.0" + "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.9.1" }, "funding": [ { @@ -303,24 +303,24 @@ "type": "github" } ], - "time": "2021-06-16T14:33:43+00:00" + "time": "2023-11-25T22:23:28+00:00" }, { "name": "psr/container", - "version": "1.1.1", + "version": "1.1.2", "source": { "type": "git", "url": "https://github.com/php-fig/container.git", - "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf" + "reference": "513e0666f7216c7459170d56df27dfcefe1689ea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf", - "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf", + "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea", + "reference": "513e0666f7216c7459170d56df27dfcefe1689ea", "shasum": "" }, "require": { - "php": ">=7.2.0" + "php": ">=7.4.0" }, "type": "library", "autoload": { @@ -349,38 +349,90 @@ ], "support": { "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/1.1.1" + "source": "https://github.com/php-fig/container/tree/1.1.2" }, - "time": "2021-03-05T17:36:06+00:00" + "time": "2021-11-05T16:50:12+00:00" }, { - "name": "symfony/config", - "version": "v3.4.47", + "name": "psr/event-dispatcher", + "version": "1.0.0", "source": { "type": "git", - "url": "https://github.com/symfony/config.git", - "reference": "bc6b3fd3930d4b53a60b42fe2ed6fc466b75f03f" + "url": "https://github.com/php-fig/event-dispatcher.git", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/bc6b3fd3930d4b53a60b42fe2ed6fc466b75f03f", - "reference": "bc6b3fd3930d4b53a60b42fe2ed6fc466b75f03f", + "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", "shasum": "" }, "require": { - "php": "^5.5.9|>=7.0.8", - "symfony/filesystem": "~2.8|~3.0|~4.0", - "symfony/polyfill-ctype": "~1.8" + "php": ">=7.2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\EventDispatcher\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Standard interfaces for event handling.", + "keywords": [ + "events", + "psr", + "psr-14" + ], + "support": { + "issues": "https://github.com/php-fig/event-dispatcher/issues", + "source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0" + }, + "time": "2019-01-08T18:20:26+00:00" + }, + { + "name": "symfony/config", + "version": "v4.4.44", + "source": { + "type": "git", + "url": "https://github.com/symfony/config.git", + "reference": "ed42f8f9da528d2c6cae36fe1f380b0c1d8f0658" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/config/zipball/ed42f8f9da528d2c6cae36fe1f380b0c1d8f0658", + "reference": "ed42f8f9da528d2c6cae36fe1f380b0c1d8f0658", + "shasum": "" + }, + "require": { + "php": ">=7.1.3", + "symfony/filesystem": "^3.4|^4.0|^5.0", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-php80": "^1.16", + "symfony/polyfill-php81": "^1.22" }, "conflict": { - "symfony/dependency-injection": "<3.3", - "symfony/finder": "<3.3" + "symfony/finder": "<3.4" }, "require-dev": { - "symfony/dependency-injection": "~3.3|~4.0", - "symfony/event-dispatcher": "~3.3|~4.0", - "symfony/finder": "~3.3|~4.0", - "symfony/yaml": "~3.0|~4.0" + "symfony/event-dispatcher": "^3.4|^4.0|^5.0", + "symfony/finder": "^3.4|^4.0|^5.0", + "symfony/messenger": "^4.1|^5.0", + "symfony/service-contracts": "^1.1|^2", + "symfony/yaml": "^3.4|^4.0|^5.0" }, "suggest": { "symfony/yaml": "To use the yaml reference dumper" @@ -408,10 +460,10 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Config Component", + "description": "Helps you find, load, combine, autofill and validate configuration values of any kind", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/config/tree/v3.4.47" + "source": "https://github.com/symfony/config/tree/v4.4.44" }, "funding": [ { @@ -427,39 +479,42 @@ "type": "tidelift" } ], - "time": "2020-10-24T10:57:07+00:00" + "time": "2022-07-20T09:59:04+00:00" }, { "name": "symfony/dependency-injection", - "version": "v3.4.47", + "version": "v4.4.49", "source": { "type": "git", "url": "https://github.com/symfony/dependency-injection.git", - "reference": "51d2a2708c6ceadad84393f8581df1dcf9e5e84b" + "reference": "9065fe97dbd38a897e95ea254eb5ddfe1310f734" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/51d2a2708c6ceadad84393f8581df1dcf9e5e84b", - "reference": "51d2a2708c6ceadad84393f8581df1dcf9e5e84b", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/9065fe97dbd38a897e95ea254eb5ddfe1310f734", + "reference": "9065fe97dbd38a897e95ea254eb5ddfe1310f734", "shasum": "" }, "require": { - "php": "^5.5.9|>=7.0.8", - "psr/container": "^1.0" + "php": ">=7.1.3", + "psr/container": "^1.0", + "symfony/polyfill-php80": "^1.16", + "symfony/service-contracts": "^1.1.6|^2" }, "conflict": { - "symfony/config": "<3.3.7", - "symfony/finder": "<3.3", + "symfony/config": "<4.3|>=5.0", + "symfony/finder": "<3.4", "symfony/proxy-manager-bridge": "<3.4", - "symfony/yaml": "<3.4" + "symfony/yaml": "<4.4.26" }, "provide": { - "psr/container-implementation": "1.0" + "psr/container-implementation": "1.0", + "symfony/service-implementation": "1.0|2.0" }, "require-dev": { - "symfony/config": "~3.3|~4.0", - "symfony/expression-language": "~2.8|~3.0|~4.0", - "symfony/yaml": "~3.4|~4.0" + "symfony/config": "^4.3", + "symfony/expression-language": "^3.4|^4.0|^5.0", + "symfony/yaml": "^4.4.26|^5.0" }, "suggest": { "symfony/config": "", @@ -491,10 +546,10 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony DependencyInjection Component", + "description": "Allows you to standardize and centralize the way objects are constructed in your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/dependency-injection/tree/v3.4.47" + "source": "https://github.com/symfony/dependency-injection/tree/v4.4.49" }, "funding": [ { @@ -510,35 +565,111 @@ "type": "tidelift" } ], - "time": "2020-10-24T10:57:07+00:00" + "time": "2022-11-16T16:18:09+00:00" }, { - "name": "symfony/event-dispatcher", - "version": "v3.4.47", + "name": "symfony/deprecation-contracts", + "version": "v3.4.0", "source": { "type": "git", - "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "31fde73757b6bad247c54597beef974919ec6860" + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/31fde73757b6bad247c54597beef974919ec6860", - "reference": "31fde73757b6bad247c54597beef974919ec6860", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/7c3aff79d10325257a001fcf92d991f24fc967cf", + "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf", "shasum": "" }, "require": { - "php": "^5.5.9|>=7.0.8" + "php": ">=8.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.4-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "files": [ + "function.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.4.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-05-23T14:45:45+00:00" + }, + { + "name": "symfony/event-dispatcher", + "version": "v5.4.26", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "5dcc00e03413f05c1e7900090927bb7247cb0aac" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/5dcc00e03413f05c1e7900090927bb7247cb0aac", + "reference": "5dcc00e03413f05c1e7900090927bb7247cb0aac", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/event-dispatcher-contracts": "^2|^3", + "symfony/polyfill-php80": "^1.16" }, "conflict": { - "symfony/dependency-injection": "<3.3" + "symfony/dependency-injection": "<4.4" + }, + "provide": { + "psr/event-dispatcher-implementation": "1.0", + "symfony/event-dispatcher-implementation": "2.0" }, "require-dev": { - "psr/log": "~1.0", - "symfony/config": "~2.8|~3.0|~4.0", - "symfony/debug": "~3.4|~4.4", - "symfony/dependency-injection": "~3.3|~4.0", - "symfony/expression-language": "~2.8|~3.0|~4.0", - "symfony/stopwatch": "~2.8|~3.0|~4.0" + "psr/log": "^1|^2|^3", + "symfony/config": "^4.4|^5.0|^6.0", + "symfony/dependency-injection": "^4.4|^5.0|^6.0", + "symfony/error-handler": "^4.4|^5.0|^6.0", + "symfony/expression-language": "^4.4|^5.0|^6.0", + "symfony/http-foundation": "^4.4|^5.0|^6.0", + "symfony/service-contracts": "^1.1|^2|^3", + "symfony/stopwatch": "^4.4|^5.0|^6.0" }, "suggest": { "symfony/dependency-injection": "", @@ -567,10 +698,10 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony EventDispatcher Component", + "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v3.4.47" + "source": "https://github.com/symfony/event-dispatcher/tree/v5.4.26" }, "funding": [ { @@ -586,25 +717,103 @@ "type": "tidelift" } ], - "time": "2020-10-24T10:57:07+00:00" + "time": "2023-07-06T06:34:20+00:00" }, { - "name": "symfony/filesystem", - "version": "v3.4.47", + "name": "symfony/event-dispatcher-contracts", + "version": "v3.4.0", "source": { "type": "git", - "url": "https://github.com/symfony/filesystem.git", - "reference": "e58d7841cddfed6e846829040dca2cca0ebbbbb3" + "url": "https://github.com/symfony/event-dispatcher-contracts.git", + "reference": "a76aed96a42d2b521153fb382d418e30d18b59df" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/e58d7841cddfed6e846829040dca2cca0ebbbbb3", - "reference": "e58d7841cddfed6e846829040dca2cca0ebbbbb3", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/a76aed96a42d2b521153fb382d418e30d18b59df", + "reference": "a76aed96a42d2b521153fb382d418e30d18b59df", "shasum": "" }, "require": { - "php": "^5.5.9|>=7.0.8", - "symfony/polyfill-ctype": "~1.8" + "php": ">=8.1", + "psr/event-dispatcher": "^1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.4-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\EventDispatcher\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to dispatching event", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.4.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-05-23T14:45:45+00:00" + }, + { + "name": "symfony/filesystem", + "version": "v5.4.25", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "0ce3a62c9579a53358d3a7eb6b3dfb79789a6364" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/0ce3a62c9579a53358d3a7eb6b3dfb79789a6364", + "reference": "0ce3a62c9579a53358d3a7eb6b3dfb79789a6364", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-mbstring": "~1.8", + "symfony/polyfill-php80": "^1.16" }, "type": "library", "autoload": { @@ -629,10 +838,10 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Filesystem Component", + "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v3.4.47" + "source": "https://github.com/symfony/filesystem/tree/v5.4.25" }, "funding": [ { @@ -648,29 +857,40 @@ "type": "tidelift" } ], - "time": "2020-10-24T10:57:07+00:00" + "time": "2023-05-31T13:04:02+00:00" }, { "name": "symfony/http-foundation", - "version": "v3.4.47", + "version": "v6.4.0", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "b9885fcce6fe494201da4f70a9309770e9d13dc8" + "reference": "44a6d39a9cc11e154547d882d5aac1e014440771" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/b9885fcce6fe494201da4f70a9309770e9d13dc8", - "reference": "b9885fcce6fe494201da4f70a9309770e9d13dc8", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/44a6d39a9cc11e154547d882d5aac1e014440771", + "reference": "44a6d39a9cc11e154547d882d5aac1e014440771", "shasum": "" }, "require": { - "php": "^5.5.9|>=7.0.8", + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-mbstring": "~1.1", - "symfony/polyfill-php70": "~1.6" + "symfony/polyfill-php83": "^1.27" + }, + "conflict": { + "symfony/cache": "<6.3" }, "require-dev": { - "symfony/expression-language": "~2.8|~3.0|~4.0" + "doctrine/dbal": "^2.13.1|^3|^4", + "predis/predis": "^1.1|^2.0", + "symfony/cache": "^6.3|^7.0", + "symfony/dependency-injection": "^5.4|^6.0|^7.0", + "symfony/expression-language": "^5.4|^6.0|^7.0", + "symfony/http-kernel": "^5.4.12|^6.0.12|^6.1.4|^7.0", + "symfony/mime": "^5.4|^6.0|^7.0", + "symfony/rate-limiter": "^5.4|^6.0|^7.0" }, "type": "library", "autoload": { @@ -695,10 +915,10 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony HttpFoundation Component", + "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v3.4.47" + "source": "https://github.com/symfony/http-foundation/tree/v6.4.0" }, "funding": [ { @@ -714,32 +934,35 @@ "type": "tidelift" } ], - "time": "2020-10-24T10:57:07+00:00" + "time": "2023-11-20T16:41:16+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.23.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce" + "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce", - "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", + "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", "shasum": "" }, "require": { "php": ">=7.1" }, + "provide": { + "ext-ctype": "*" + }, "suggest": { "ext-ctype": "For best performance" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -747,12 +970,12 @@ } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - }, "files": [ "bootstrap.php" - ] + ], + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -777,7 +1000,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.23.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.28.0" }, "funding": [ { @@ -793,32 +1016,35 @@ "type": "tidelift" } ], - "time": "2021-02-19T12:13:01+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.23.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "2df51500adbaebdc4c38dea4c89a2e131c45c8a1" + "reference": "42292d99c55abe617799667f454222c54c60e229" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/2df51500adbaebdc4c38dea4c89a2e131c45c8a1", - "reference": "2df51500adbaebdc4c38dea4c89a2e131c45c8a1", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/42292d99c55abe617799667f454222c54c60e229", + "reference": "42292d99c55abe617799667f454222c54c60e229", "shasum": "" }, "require": { "php": ">=7.1" }, + "provide": { + "ext-mbstring": "*" + }, "suggest": { "ext-mbstring": "For best performance" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -826,12 +1052,12 @@ } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - }, "files": [ "bootstrap.php" - ] + ], + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -857,7 +1083,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.28.0" }, "funding": [ { @@ -873,35 +1099,290 @@ "type": "tidelift" } ], - "time": "2021-05-27T09:27:20+00:00" + "time": "2023-07-28T09:04:16+00:00" }, { - "name": "symfony/polyfill-php70", - "version": "v1.20.0", + "name": "symfony/polyfill-php80", + "version": "v1.28.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php70.git", - "reference": "5f03a781d984aae42cebd18e7912fa80f02ee644" + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/5f03a781d984aae42cebd18e7912fa80f02ee644", - "reference": "5f03a781d984aae42cebd18e7912fa80f02ee644", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/6caa57379c4aec19c0a12a38b59b26487dcfe4b5", + "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5", "shasum": "" }, "require": { "php": ">=7.1" }, - "type": "metapackage", + "type": "library", "extra": { "branch-alias": { - "dev-main": "1.20-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" } }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php80/tree/v1.28.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-01-26T09:26:14+00:00" + }, + { + "name": "symfony/polyfill-php81", + "version": "v1.28.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php81.git", + "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/7581cd600fa9fd681b797d00b02f068e2f13263b", + "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.28-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php81\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php81/tree/v1.28.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-01-26T09:26:14+00:00" + }, + { + "name": "symfony/polyfill-php83", + "version": "v1.28.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php83.git", + "reference": "b0f46ebbeeeda3e9d2faebdfbf4b4eae9b59fa11" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php83/zipball/b0f46ebbeeeda3e9d2faebdfbf4b4eae9b59fa11", + "reference": "b0f46ebbeeeda3e9d2faebdfbf4b4eae9b59fa11", + "shasum": "" + }, + "require": { + "php": ">=7.1", + "symfony/polyfill-php80": "^1.14" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.28-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php83\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.3+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php83/tree/v1.28.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-08-16T06:22:46+00:00" + }, + { + "name": "symfony/service-contracts", + "version": "v2.5.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/service-contracts.git", + "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/4b426aac47d6427cc1a1d0f7e2ac724627f5966c", + "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "psr/container": "^1.1", + "symfony/deprecation-contracts": "^2.1|^3" + }, + "conflict": { + "ext-psr": "<1.1|>=2" + }, + "suggest": { + "symfony/service-implementation": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.5-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Service\\": "" + } + }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" @@ -916,16 +1397,18 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions", + "description": "Generic abstractions related to writing services", "homepage": "https://symfony.com", "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" ], "support": { - "source": "https://github.com/symfony/polyfill-php70/tree/v1.20.0" + "source": "https://github.com/symfony/service-contracts/tree/v2.5.2" }, "funding": [ { @@ -941,40 +1424,34 @@ "type": "tidelift" } ], - "time": "2020-10-23T14:02:19+00:00" + "time": "2022-05-30T19:17:29+00:00" }, { "name": "twig/twig", - "version": "v1.44.4", + "version": "v3.8.0", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "4d400421528e9fa40caaffcf7824c172526dd99d" + "reference": "9d15f0ac07f44dc4217883ec6ae02fd555c6f71d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/4d400421528e9fa40caaffcf7824c172526dd99d", - "reference": "4d400421528e9fa40caaffcf7824c172526dd99d", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/9d15f0ac07f44dc4217883ec6ae02fd555c6f71d", + "reference": "9d15f0ac07f44dc4217883ec6ae02fd555c6f71d", "shasum": "" }, "require": { "php": ">=7.2.5", - "symfony/polyfill-ctype": "^1.8" + "symfony/polyfill-ctype": "^1.8", + "symfony/polyfill-mbstring": "^1.3", + "symfony/polyfill-php80": "^1.22" }, "require-dev": { - "psr/container": "^1.0", - "symfony/phpunit-bridge": "^4.4.9|^5.0.9" + "psr/container": "^1.0|^2.0", + "symfony/phpunit-bridge": "^5.4.9|^6.3|^7.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.44-dev" - } - }, "autoload": { - "psr-0": { - "Twig_": "lib/" - }, "psr-4": { "Twig\\": "src/" } @@ -1007,7 +1484,7 @@ ], "support": { "issues": "https://github.com/twigphp/Twig/issues", - "source": "https://github.com/twigphp/Twig/tree/v1.44.4" + "source": "https://github.com/twigphp/Twig/tree/v3.8.0" }, "funding": [ { @@ -1019,7 +1496,7 @@ "type": "tidelift" } ], - "time": "2021-05-16T12:11:20+00:00" + "time": "2023-11-21T18:54:41+00:00" }, { "name": "viharm/php-db-auth", @@ -1219,18 +1696,16 @@ "packages-dev": [], "aliases": [], "minimum-stability": "stable", - "stability-flags": { - "php-pushover/php-pushover": 20 - }, + "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "^5.5.9|>=7.0.8", + "php": ">=8.1.0", "ext-curl": "*", "ext-json": "*", "ext-pdo": "*", "ext-xml": "*" }, "platform-dev": [], - "plugin-api-version": "2.2.0" + "plugin-api-version": "2.6.0" } diff --git a/cron/status.cron.php b/cron/status.cron.php index 0151d202..64a1bbac 100644 --- a/cron/status.cron.php +++ b/cron/status.cron.php @@ -63,7 +63,7 @@ namespace { } $cron_timeout = PSM_CRON_TIMEOUT; -// parse a couple of arguments + // parse a couple of arguments if (!empty($_SERVER['argv'])) { foreach ($_SERVER['argv'] as $argv) { $argi = explode('=', ltrim($argv, '--')); @@ -83,10 +83,10 @@ namespace { } } -// prevent cron from running twice at the same time -// however if the cron has been running for X mins, we'll assume it died and run anyway -// if you want to change PSM_CRON_TIMEOUT, have a look in src/includes/psmconfig.inc.php. -// or you can provide the --timeout=x argument + // prevent cron from running twice at the same time + // however if the cron has been running for X mins, we'll assume it died and run anyway + // if you want to change PSM_CRON_TIMEOUT, have a look in src/includes/psmconfig.inc.php. + // or you can provide the --timeout=x argument $status = null; if (PHP_SAPI === 'cli') { diff --git a/img/alert.jpg b/img/alert.jpg new file mode 100644 index 0000000000000000000000000000000000000000..14276824457828d62d1474c04d2b121255325b1c GIT binary patch literal 7601 zcmd6LXFwC{w)W7gAW9V^TR=onP?27;MF9aJA|e7pjs>NtND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vs;wXH6wT?nL+ASSyc$hFQorTqEga4Njdj@ixDN zr#f1v;LRhpJW^a3ThQSzaX-kjX0(?j*?ctJ;OcpuBevuDAMnjJEW-5bWnYj(H-u)0 zU~581hMaEbNxxep{P-yU9dj-aWE0JKg-uym_1%^aHdc(YeX+-_N6|_pV;QVXQtA+- znTsUTjf|Txv-Ixm*DY7`_eY_EarNQOoeR?HvxNt^Aw&-^2%To^8Bs^K zyKNB?@G27YO}}eQ=RsHdRKLunmzA=GpC%@Bp9(oXI?+>)P==XDtd+UCwoT(yZ>2rF zwlvq99BlX*lWbiaG0vGD2Swv0q~H!2N)M~LI3x`i9shD!LGY~w-{_@)tx0hc&Ad|Y za^njywZ{X4SL?E0N0>keZ{z~@1h{exZBA7&?b zw9jhrKFG7Hh_BG9G89t`q@TzC<0NV@OCTHs_OlR;29oUQU?|BD^{V*~Go47khy&U5 zoj%77B>fhGp9RFJi3{{pZ2iKS=;i{8TDcq{ZK}ba?E3x`htDv{ e3XTi)I_728z!WOSe}L7o@V~M;{+SJT_}>7tl^W*& literal 0 HcmV?d00001 diff --git a/img/alert.png b/img/alert.png new file mode 100644 index 0000000000000000000000000000000000000000..5b0551eb2f8004b5f79b5bdf8ebb764bb94290e8 GIT binary patch literal 3663 zcmZ`*2{@E%8~&`5wd_I?Bd2V$7<;mBg$P-Sv1AWfvPIS?BU?#AW$92^>oAxywvfRg z``9v;LI|OV|C{;FIsf%v|NmdtJKy`f&v)PVb3f1b&0KTmf~f%qs}L&y031e!x)$KR zM*SRO0Iw{`N1uWlqq~-g764SGvh6uBfoCxnLkklC2tNq`(eVKA6HG;a27q7$04!nw zKs6fx1pIUB&D8;b0l0A9QV#@7qtWAN^u&LyNi=#=K>=KU-BnPSK%oYurN_a5Mwvn& z$Vem@LrC)93X>?*ztw0I@HmCR8~^~6AC;GfFf$MxtU}|07!c5?sreV3R-K}vLOr5T zpXKDpGyoWb8PM32rY7X=z{-l60rNC(ps^_$=HGoODnjvJc+d$71vLVe9;eB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klvPq(oDPdLVT&l@BFMtY{Y<=WWTe*wN~ Brp5pO literal 0 HcmV?d00001 diff --git a/src/config/services.xml b/src/config/services.xml index 43446dcd..4b3f3e24 100644 --- a/src/config/services.xml +++ b/src/config/services.xml @@ -42,16 +42,16 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/sc %db.port% - + - + %path.templates%/%config.theme% - + diff --git a/src/includes/functions.inc.php b/src/includes/functions.inc.php index 85e11b3c..65f4b1b9 100644 --- a/src/includes/functions.inc.php +++ b/src/includes/functions.inc.php @@ -489,20 +489,19 @@ namespace { $time = strtotime($time); } if ($time < strtotime(date('Y-m-d 00:00:00')) - 60 * 60 * 24 * 3) { - $format = psm_get_lang('system', (date('Y') !== date('Y', $time)) ? - 'long_day_format' : 'short_day_format'); + $format = psm_get_lang('system', (date('Y') !== date('Y', $time) ? 'long_day_format' : 'short_day_format')); // Check for Windows to find and replace the %e // modifier correctly if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') { $format = preg_replace('#(?= 60 * 60 * 24) { $format = psm_get_lang('system', (date('l', time() - 60 * 60 * 24) == date('l', $time)) ? - 'yesterday_format' : 'other_day_format'); - return strftime($format, $time); + 'yesterday_format' : 'other_day_format'); + return date(strftime_format_to_date_format($format), $time); } if ($d >= 60 * 60 * 2) { return sprintf(psm_get_lang('system', 'hours_ago'), intval($d / (60 * 60))); @@ -533,7 +532,7 @@ namespace { if (empty($time) || $time == '0000-00-00 00:00:00') { return psm_get_lang('system', 'never'); } - return strftime('%x %X', strtotime($time)); + return date(strftime_format_to_date_format('%x %X'), strtotime($time)); } /** @@ -1006,13 +1005,43 @@ namespace { return $decrypted; } - + /** - * Send notification to Telegram - * - * @return string - * @author Tim Zandbergen + * Convert strftime format to php date format + * @param $strftimeformat + * @return string|string[] + * @throws Exception */ + function strftime_format_to_date_format($strftimeformat){ + $unsupported = ['%U', '%V', '%C', '%g', '%G']; + $foundunsupported = []; + foreach($unsupported as $unsup){ + if (strpos($strftimeformat, $unsup) !== false){ + $foundunsupported[] = $unsup; + } + } + if (!empty($foundunsupported)){ + throw new \Exception("Found these unsupported chars: ".implode(",", $foundunsupported).' in '.$strftimeformat); + } + // It is important to note that some do not translate accurately ie. lowercase L is supposed to convert to number with a preceding space if it is under 10, there is no accurate conversion so we just use 'g' + $phpdateformat = str_replace( + ['%a','%A','%d','%e','%u','%w','%W','%b','%h','%B','%m','%y','%Y', '%D', '%F', '%x', '%n', '%t', '%H', '%k', '%I', '%l', '%M', '%p', '%P', '%r' /* %I:%M:%S %p */, '%R' /* %H:%M */, '%S', '%T' /* %H:%M:%S */, '%X', '%z', '%Z', + '%c', '%s', + '%%'], + ['D','l', 'd', 'j', 'N', 'w', 'W', 'M', 'M', 'F', 'm', 'y', 'Y', 'm/d/y', 'Y-m-d', 'm/d/y',"\n","\t", 'H', 'G', 'h', 'g', 'i', 'A', 'a', 'h:i:s A', 'H:i', 's', 'H:i:s', 'H:i:s', 'O', 'T', + 'D M j H:i:s Y' /*Tue Feb 5 00:45:10 2009*/, 'U', + '%'], + $strftimeformat + ); + return $phpdateformat; + } + + /** + * Send notification to Telegram + * + * @return string + * @author Tim Zandbergen + */ class Telegram { private $token; diff --git a/src/psm/Module/AbstractController.php b/src/psm/Module/AbstractController.php index d5cc0187..fb5d2be9 100644 --- a/src/psm/Module/AbstractController.php +++ b/src/psm/Module/AbstractController.php @@ -109,7 +109,7 @@ abstract class AbstractController implements ControllerInterface /** * Twig object - * @var \Twig_Environment $twig + * @var \Twig\Environment $twig */ protected $twig; @@ -146,7 +146,7 @@ abstract class AbstractController implements ControllerInterface */ protected $xhr = false; - public function __construct(Database $db, \Twig_Environment $twig) + public function __construct(Database $db, \Twig\Environment $twig) { $this->db = $db; $this->twig = $twig; diff --git a/src/psm/Module/Config/Controller/ConfigController.php b/src/psm/Module/Config/Controller/ConfigController.php index 5285ea70..fecd4eff 100644 --- a/src/psm/Module/Config/Controller/ConfigController.php +++ b/src/psm/Module/Config/Controller/ConfigController.php @@ -114,7 +114,7 @@ class ConfigController extends AbstractController private $default_tab = 'general'; - public function __construct(Database $db, \Twig_Environment $twig) + public function __construct(Database $db, \Twig\Environment $twig) { parent::__construct($db, $twig); diff --git a/src/psm/Module/ControllerInterface.php b/src/psm/Module/ControllerInterface.php index 672fbe1a..d16fa5bd 100644 --- a/src/psm/Module/ControllerInterface.php +++ b/src/psm/Module/ControllerInterface.php @@ -35,7 +35,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface; interface ControllerInterface extends ContainerAwareInterface { - public function __construct(Database $db, \Twig_Environment $twig); + public function __construct(Database $db, \Twig\Environment $twig); /** * Run the controller diff --git a/src/psm/Module/Error/Controller/ErrorController.php b/src/psm/Module/Error/Controller/ErrorController.php index 83d4a0fe..23c1ac20 100644 --- a/src/psm/Module/Error/Controller/ErrorController.php +++ b/src/psm/Module/Error/Controller/ErrorController.php @@ -35,7 +35,7 @@ use psm\Service\Database; class ErrorController extends AbstractController { - public function __construct(Database $db, \Twig_Environment $twig) + public function __construct(Database $db, \Twig\Environment $twig) { parent::__construct($db, $twig); diff --git a/src/psm/Module/Install/Controller/InstallController.php b/src/psm/Module/Install/Controller/InstallController.php index 7afd97f1..c8bc5dd6 100644 --- a/src/psm/Module/Install/Controller/InstallController.php +++ b/src/psm/Module/Install/Controller/InstallController.php @@ -47,7 +47,7 @@ class InstallController extends AbstractController */ protected $path_config_old; - public function __construct(Database $db, \Twig_Environment $twig) + public function __construct(Database $db, \Twig\Environment $twig) { parent::__construct($db, $twig); diff --git a/src/psm/Module/Server/Controller/AbstractServerController.php b/src/psm/Module/Server/Controller/AbstractServerController.php index 8ae2968c..5b24a0e4 100644 --- a/src/psm/Module/Server/Controller/AbstractServerController.php +++ b/src/psm/Module/Server/Controller/AbstractServerController.php @@ -81,7 +81,7 @@ abstract class AbstractServerController extends AbstractController `s`.`active`, `s`.`email`, `s`.`sms`, - `s`.`discord`, + `s`.`discord`, `s`.`webhook`, `s`.`pushover`, `s`.`telegram`, diff --git a/src/psm/Module/Server/Controller/LogController.php b/src/psm/Module/Server/Controller/LogController.php index 39817695..2f68f79b 100644 --- a/src/psm/Module/Server/Controller/LogController.php +++ b/src/psm/Module/Server/Controller/LogController.php @@ -36,7 +36,7 @@ use psm\Service\Database; class LogController extends AbstractServerController { - public function __construct(Database $db, \Twig_Environment $twig) + public function __construct(Database $db, \Twig\Environment $twig) { parent::__construct($db, $twig); diff --git a/src/psm/Module/Server/Controller/ServerController.php b/src/psm/Module/Server/Controller/ServerController.php index cb08e5fc..53ab97ab 100644 --- a/src/psm/Module/Server/Controller/ServerController.php +++ b/src/psm/Module/Server/Controller/ServerController.php @@ -42,7 +42,7 @@ class ServerController extends AbstractServerController */ protected $server_id; - public function __construct(Database $db, \Twig_Environment $twig) + public function __construct(Database $db, \Twig\Environment $twig) { parent::__construct($db, $twig); @@ -518,14 +518,14 @@ class ServerController extends AbstractServerController 'label' => $server_available['label'], ); } - + $tpl_data['last_output_truncated'] = $tpl_data['last_output']; $tpl_data['last_error_output_truncated'] = $tpl_data['last_error_output']; - + if (strlen($tpl_data['last_output']) > 255) { $tpl_data['last_output_truncated'] = substr($tpl_data['last_output'], 0, 255) . '...'; } - + if (strlen($tpl_data['last_error_output']) > 255) { $tpl_data['last_error_output_truncated'] = substr($tpl_data['last_error_output'], 0, 255) . '...'; } diff --git a/src/psm/Module/Server/Controller/StatusController.php b/src/psm/Module/Server/Controller/StatusController.php index d4ee083d..43dbf2c3 100644 --- a/src/psm/Module/Server/Controller/StatusController.php +++ b/src/psm/Module/Server/Controller/StatusController.php @@ -37,7 +37,7 @@ use psm\Service\Database; class StatusController extends AbstractServerController { - public function __construct(Database $db, \Twig_Environment $twig) + public function __construct(Database $db, \Twig\Environment $twig) { parent::__construct($db, $twig); @@ -70,6 +70,13 @@ class StatusController extends AbstractServerController 'layout' => $layout, 'url_save' => psm_build_url(array('mod' => 'server', 'action' => 'edit')), ); + + $auto_refresh_seconds = psm_get_conf('auto_refresh_servers'); + if (intval($auto_refresh_seconds) > 0) { + $this->twig->addGlobal('auto_refresh', true); + $this->twig->addGlobal('auto_refresh_seconds', $auto_refresh_seconds); + } + $this->setHeaderAccessories($this->twig->render('module/server/status/header.tpl.html', $layout_data)); $this->addFooter(false); @@ -107,12 +114,6 @@ class StatusController extends AbstractServerController } } - $auto_refresh_seconds = psm_get_conf('auto_refresh_servers'); - if (intval($auto_refresh_seconds) > 0) { - $this->twig->addGlobal('auto_refresh', true); - $this->twig->addGlobal('auto_refresh_seconds', $auto_refresh_seconds); - } - if ($this->isXHR() || isset($_SERVER["HTTP_X_REQUESTED_WITH"])) { $this->xhr = true; //disable auto refresh in ajax return html diff --git a/src/psm/Module/Server/Controller/UpdateController.php b/src/psm/Module/Server/Controller/UpdateController.php index d2addcac..8b92c7b9 100644 --- a/src/psm/Module/Server/Controller/UpdateController.php +++ b/src/psm/Module/Server/Controller/UpdateController.php @@ -36,7 +36,7 @@ use psm\Service\Database; class UpdateController extends AbstractController { - public function __construct(Database $db, \Twig_Environment $twig) + public function __construct(Database $db, \Twig\Environment $twig) { parent::__construct($db, $twig); diff --git a/src/psm/Module/User/Controller/LoginController.php b/src/psm/Module/User/Controller/LoginController.php index 4c50272d..4026ff83 100644 --- a/src/psm/Module/User/Controller/LoginController.php +++ b/src/psm/Module/User/Controller/LoginController.php @@ -35,7 +35,7 @@ use psm\Service\Database; class LoginController extends AbstractController { - public function __construct(Database $db, \Twig_Environment $twig) + public function __construct(Database $db, \Twig\Environment $twig) { parent::__construct($db, $twig); diff --git a/src/psm/Module/User/Controller/ProfileController.php b/src/psm/Module/User/Controller/ProfileController.php index 6b9b0cf1..2c285a43 100644 --- a/src/psm/Module/User/Controller/ProfileController.php +++ b/src/psm/Module/User/Controller/ProfileController.php @@ -41,7 +41,7 @@ class ProfileController extends AbstractController protected $profile_fields = array('name', 'user_name', 'email', 'mobile', 'pushover_key', 'pushover_device', 'discord', 'webhook_url', 'webhook_json', 'telegram_id', 'jabber'); - public function __construct(Database $db, \Twig_Environment $twig) + public function __construct(Database $db, \Twig\Environment $twig) { parent::__construct($db, $twig); diff --git a/src/psm/Module/User/Controller/UserController.php b/src/psm/Module/User/Controller/UserController.php index ba55a0e2..5423eee0 100644 --- a/src/psm/Module/User/Controller/UserController.php +++ b/src/psm/Module/User/Controller/UserController.php @@ -39,7 +39,7 @@ class UserController extends AbstractController { public $servers = array(); - public function __construct(Database $db, \Twig_Environment $twig) + public function __construct(Database $db, \Twig\Environment $twig) { parent::__construct($db, $twig); diff --git a/src/psm/Router.php b/src/psm/Router.php index 41533989..5ed5c634 100644 --- a/src/psm/Router.php +++ b/src/psm/Router.php @@ -231,7 +231,7 @@ class Router } $twig->addFunction( - new \Twig_SimpleFunction( + new \Twig\TwigFunction( 'csrf_token', function ($lock_to = null) use ($session) { if (empty($lock_to)) { diff --git a/src/psm/Util/Module/Modal.php b/src/psm/Util/Module/Modal.php index 21176096..ce5e4c9e 100644 --- a/src/psm/Util/Module/Modal.php +++ b/src/psm/Util/Module/Modal.php @@ -67,11 +67,11 @@ class Modal implements ModalInterface /** * Twig environment - * @var \Twig_Environment $twig + * @var \Twig\Environment $twig */ protected $twig; - public function __construct(\Twig_Environment $twig, $modal_id = 'main', $type = self::MODAL_TYPE_OK) + public function __construct(\Twig\Environment $twig, $modal_id = 'main', $type = self::MODAL_TYPE_OK) { $this->modal_id = $modal_id; $this->twig = $twig; @@ -142,7 +142,7 @@ class Modal implements ModalInterface } } - $tpl = $this->twig->loadTemplate('util/module/modal.tpl.html'); + $tpl = $this->twig->load('util/module/modal.tpl.html'); $html = $tpl->render(array( 'modal_id' => $this->modal_id, 'modal_title' => !empty($this->title) ? $this->title : psm_get_conf('site_title', psm_get_lang('system', 'title')), diff --git a/src/psm/Util/Module/ModalInterface.php b/src/psm/Util/Module/ModalInterface.php index a7d79bb3..e5c0d2c6 100644 --- a/src/psm/Util/Module/ModalInterface.php +++ b/src/psm/Util/Module/ModalInterface.php @@ -32,7 +32,7 @@ namespace psm\Util\Module; interface ModalInterface { - public function __construct(\Twig_Environment $twig); + public function __construct(\Twig\Environment $twig); public function getModalID(); public function createHTML(); diff --git a/src/psm/Util/Module/Sidebar.php b/src/psm/Util/Module/Sidebar.php index 26f05c0d..ae16726d 100644 --- a/src/psm/Util/Module/Sidebar.php +++ b/src/psm/Util/Module/Sidebar.php @@ -57,7 +57,7 @@ class Sidebar implements SidebarInterface */ protected $twig; - public function __construct(\Twig_Environment $twig) + public function __construct(\Twig\Environment $twig) { $this->twig = $twig; } @@ -182,7 +182,7 @@ class Sidebar implements SidebarInterface } } - $tpl = $this->twig->loadTemplate('util/module/sidebar.tpl.html'); + $tpl = $this->twig->load('util/module/sidebar.tpl.html'); $html = $tpl->render($tpl_data); return $html; diff --git a/src/psm/Util/Module/SidebarInterface.php b/src/psm/Util/Module/SidebarInterface.php index f99775a7..a7e4eb4b 100644 --- a/src/psm/Util/Module/SidebarInterface.php +++ b/src/psm/Util/Module/SidebarInterface.php @@ -31,7 +31,7 @@ namespace psm\Util\Module; interface SidebarInterface { - public function __construct(\Twig_Environment $twig); + public function __construct(\Twig\Environment $twig); public function createHTML(); } diff --git a/src/psm/Util/Server/HistoryGraph.php b/src/psm/Util/Server/HistoryGraph.php index 11425e8b..2f285b67 100644 --- a/src/psm/Util/Server/HistoryGraph.php +++ b/src/psm/Util/Server/HistoryGraph.php @@ -32,7 +32,7 @@ namespace psm\Util\Server; use DateTime; use psm\Service\Database; use Twig\Error\Error; -use Twig_Environment; +use Twig\Environment; /** * History util, create HTML for server graphs @@ -52,7 +52,7 @@ class HistoryGraph */ protected $twig; - public function __construct(Database $db, Twig_Environment $twig) + public function __construct(Database $db, \Twig\Environment $twig) { $this->db = $db; $this->twig = $twig; @@ -294,7 +294,7 @@ class HistoryGraph // Previous datapoint was offline : ['x' => $time_ms, 'y' => null]; // new outage start - $lines['offline'][] = ['x' => $time_ms, 'y' => $highest_latency]; + $lines['offline'][] = ['x' => $time_ms, 'y' => 0]; if ($prev_downtime === 0) { $prev_downtime = $time; @@ -306,7 +306,7 @@ class HistoryGraph // Previous datapoint was online ? ['x' => $time_ms, 'y' => null] // Previous datapoint was offline - : ['x' => $time_ms, 'y' => $highest_latency]; + : ['x' => $time_ms, 'y' => 0]; $lines['online'][] = ['x' => $time_ms, 'y' => round($record['latency'] * 1000, 3)]; if ($prev_downtime !== 0) { diff --git a/src/templates/default/module/server/server/view.tpl.html b/src/templates/default/module/server/server/view.tpl.html index e6d37498..76be3990 100644 --- a/src/templates/default/module/server/server/view.tpl.html +++ b/src/templates/default/module/server/server/view.tpl.html @@ -237,7 +237,7 @@
  • {{ label_last_output }}:
    -
    {{ last_output_truncated|nl2br }}
    +
    {{ last_output_truncated|raw|nl2br }}
    {% if last_output_truncated != last_output %}
    @@ -420,7 +420,7 @@