Aleksander Machniak
2013-10-16 f2d4e40f094135fabcab4261930921e13fee40fd
Do not add css files to the page when body is empty, e.g. upload iframes
1 files modified
11 ■■■■ changed files
program/include/rcmail_output_html.php 11 ●●●● patch | view | raw | blame | history
program/include/rcmail_output_html.php
@@ -1274,7 +1274,12 @@
     */
    public function _write($templ = '', $base_path = '')
    {
        $output = empty($templ) ? $this->default_template : trim($templ);
        $output = trim($templ);
        if (empty($output)) {
            $output   = $this->default_template;
            $is_empty = true;
        }
        // set default page title
        if (empty($this->pagetitle)) {
@@ -1365,8 +1370,8 @@
        }
        // add css files in head, before scripts, for speed up with parallel downloads
        if (!empty($this->css_files) &&
            (($pos = stripos($output, '<script ')) || ($pos = stripos($output, '</head>')))
        if (!empty($this->css_files) && !$is_empty
            && (($pos = stripos($output, '<script ')) || ($pos = stripos($output, '</head>')))
        ) {
            $css = '';
            foreach ($this->css_files as $file) {