From ecde98729becf84652783cd90f368d453f80edee Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Sun, 15 Apr 2018 12:21:56 +0200 Subject: [PATCH] Fix skin extending for assets (#5115) Remove redundant is_file() calls. --- CHANGELOG | 1 + program/include/rcmail_output_html.php | 11 ++++------- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index d6fb82e3b..ac5b33eae 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -68,6 +68,7 @@ CHANGELOG Roundcube Webmail - Handle inline images also inside multipart/mixed messages (#5905) - Allow style tags in HTML editor on composed/reply messages (#5751) - Use Github API as a fallback to fetch js dependencies to workaround throttling issues (#6248) +- Fix skin extending for assets (#5115) - Fix handling of forwarded messages inside of a TNEF message (#5632) - Fix bug where attachment size wasn't visible when the filename was too long (#6033) - Fix checking table columns when there's more schemas/databases in postgres/mysql (#6047) diff --git a/program/include/rcmail_output_html.php b/program/include/rcmail_output_html.php index ed20ecfb3..89300d726 100644 --- a/program/include/rcmail_output_html.php +++ b/program/include/rcmail_output_html.php @@ -349,16 +349,12 @@ EOF; } foreach ($skin_paths as $skin_path) { - $path = realpath(RCUBE_INSTALL_PATH . $skin_path . $file); - - if ($path && is_file($path)) { + if (realpath(RCUBE_INSTALL_PATH . $skin_path . $file)) { return $skin_path . $file; } if ($this->assets_dir != RCUBE_INSTALL_PATH) { - $path = realpath($this->assets_dir . $skin_path . $file); - - if ($path && is_file($path)) { + if (realpath($this->assets_dir . $skin_path . $file)) { return $skin_path . $file; } } @@ -833,7 +829,8 @@ EOF; // correct absolute paths if ($file[0] == '/') { - $file = $this->base_path . $file; + $this->get_skin_file($file, $skin_path); + $file = $skin_path . $file; } // add file modification timestamp