From bc66f7d6d208ac99dcec57992c4eb955570d85bc Mon Sep 17 00:00:00 2001 From: Thomas Bruederli <thomas@roundcube.net> Date: Mon, 12 Nov 2012 09:51:21 -0500 Subject: [PATCH] Avoid deprecated template warnings in extended skins --- program/include/rcube_output_html.php | 15 +++++++++------ 1 files changed, 9 insertions(+), 6 deletions(-) diff --git a/program/include/rcube_output_html.php b/program/include/rcube_output_html.php index db947bd..7b186b9 100644 --- a/program/include/rcube_output_html.php +++ b/program/include/rcube_output_html.php @@ -447,12 +447,15 @@ // fallback to deprecated template names if (!is_readable($path) && $this->deprecated_templates[$realname]) { $path = "$skin_path/templates/" . $this->deprecated_templates[$realname] . ".html"; - rcube::raise_error(array( - 'code' => 502, 'type' => 'php', - 'file' => __FILE__, 'line' => __LINE__, - 'message' => "Using deprecated template '" . $this->deprecated_templates[$realname] - . "' in $skin_path/templates. Please rename to '$realname'"), - true, false); + + if (is_readable($path)) { + rcube::raise_error(array( + 'code' => 502, 'type' => 'php', + 'file' => __FILE__, 'line' => __LINE__, + 'message' => "Using deprecated template '" . $this->deprecated_templates[$realname] + . "' in $skin_path/templates. Please rename to '$realname'"), + true, false); + } } if (is_readable($path)) { -- Gitblit v1.9.1