Projects
Kolab:3.4
roundcubemail
roundcubemail-1.1-assets.patch
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File roundcubemail-1.1-assets.patch of Package roundcubemail (Revision 49)
Currently displaying revision
49
,
Show latest
diff --git a/program/include/rcmail_output_html.php b/program/include/rcmail_output_html.php index aae54d4..3df5589 100644 --- a/program/include/rcmail_output_html.php +++ b/program/include/rcmail_output_html.php @@ -184,7 +184,7 @@ EOF; } $path = (rcube_utils::https_check() ? 'https' : 'http') . '://' - . $_SERVER['SERVER_NAME'] . $base . '/' . $path; + . $_SERVER['HTTP_HOST'] . rtrim($base, '/') . '/' . ltrim($path, '/'); } $this->assets_path = $path; @@ -306,10 +306,27 @@ EOF; } foreach ($skin_paths as $skin_path) { - $path = realpath($skin_path . $file); + $path = $skin_path . $file; + + if (is_file($path)) { + return $skin_path . $file; + } + + $path = rtrim(RCUBE_INSTALL_PATH, '/'); + $path .= '/' . 'public_html/assets/'; + $path .= rtrim($skin_path, '/') . '/' . $file; + if (is_file($path)) { return $skin_path . $file; } + + $path = rtrim(RCUBE_INSTALL_PATH, '/'); + $path .= '/' . $skin_path . $file; + $path = realpath($path); + + if ($skin_path[0] != '/' && is_file($path)) { + return $path; + } } return false; @@ -491,9 +491,10 @@ EOF; // fallback to deprecated template names if (!is_readable($path) && $this->deprecated_templates[$realname]) { - $path = "$skin_path/templates/" . $this->deprecated_templates[$realname] . ".html"; + // Try an old path + $tpath = "$skin_path/templates/" . $this->deprecated_templates[$realname] . ".html"; - if (is_readable($path)) { + if (is_readable($tpath)) { rcube::raise_error(array( 'code' => 502, 'type' => 'php', 'file' => __FILE__, 'line' => __LINE__, @@ -552,6 +569,10 @@ EOF; } } + if (!is_readable($path) && $path[0] != '/' && is_readable(rtrim(RCUBE_INSTALL_PATH, '/') . '/' . $path)) { + $path = rtrim(RCUBE_INSTALL_PATH, '/') . '/' . $path; + } + if (is_readable($path)) { $this->config->set('skin_path', $skin_path); $this->base_path = preg_replace('!plugins/\w+/!', '', $skin_path); // set base_path to core skin directory (not plugin's skin)
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.