From 8428a815aa0d99014410bf7cb1bbfc08324df8bb Mon Sep 17 00:00:00 2001 From: pdontthink Date: Fri, 15 Jan 2021 16:30:25 +0000 Subject: [PATCH] PHP 8 compatibility fix git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@14876 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- class/template/Template.class.php | 18 +++++++++--------- doc/ChangeLog | 1 + 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/class/template/Template.class.php b/class/template/Template.class.php index a7bec92..c48de7c 100644 --- a/class/template/Template.class.php +++ b/class/template/Template.class.php @@ -159,7 +159,7 @@ class Template * @static * */ - function construct_template($template_set_id) { + static function construct_template($template_set_id) { $template = new Template($template_set_id); $template->override_plugins(); @@ -234,7 +234,7 @@ class Template * @static * */ - function get_fallback_template_set($default='default') { + static function get_fallback_template_set($default='default') { // FIXME: do we want to place any restrictions on the ID such as // making sure no slashes included? @@ -285,7 +285,7 @@ class Template * @static * */ - function get_default_template_set($default='default') { + static function get_default_template_set($default='default') { // FIXME: do we want to place any restrictions on the ID such as // making sure no slashes included? @@ -336,7 +336,7 @@ class Template * @static * */ - function get_rpc_template_set($default='default_rpc') { + static function get_rpc_template_set($default='default_rpc') { // FIXME: do we want to place any restrictions on the ID such as // making sure no slashes included? @@ -475,7 +475,7 @@ class Template * @static * */ - function calculate_template_file_directory($template_set_id) { + static function calculate_template_file_directory($template_set_id) { return 'templates/' . $template_set_id . '/'; @@ -493,7 +493,7 @@ class Template * @static * */ - function calculate_template_images_directory($template_set_id) { + static function calculate_template_images_directory($template_set_id) { return 'templates/' . $template_set_id . '/images/'; @@ -592,7 +592,7 @@ class Template * @static * */ - function get_template_config($template_set_id, $setting, + static function get_template_config($template_set_id, $setting, $default=NULL, $live_config=FALSE) { sqGetGlobalVar('template_configuration_settings', @@ -714,7 +714,7 @@ class Template * @static * */ - function cache_template_file_hierarchy($template_set_id, + static function cache_template_file_hierarchy($template_set_id, $regenerate_cache=FALSE, $additional_files=array()) { @@ -793,7 +793,7 @@ class Template * @static * */ - function catalog_template_files($template_set_id, $file_list=array(), $directory='') { + static function catalog_template_files($template_set_id, $file_list=array(), $directory='') { $template_base_dir = SM_PATH . Template::calculate_template_file_directory($template_set_id); diff --git a/doc/ChangeLog b/doc/ChangeLog index 81b291d..28a53db 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -441,6 +441,7 @@ Version 1.5.2 - SVN $PHP_SELF does not resolve to what it should be for the real client. - Show more accurate filesize for uploaded files and base64-encoded attachments (when reading a message) + - Added fixes for PHP version 8 compatibility Version 1.5.1 (branched on 2006-02-12) -------------------------------------- -- 1.9.1