From fc52af24f1418d6590a2d37a0d8cc31b123e38f6 Mon Sep 17 00:00:00 2001 From: Thomas Bruederli <thomas@roundcube.net> Date: Tue, 19 Aug 2014 12:08:35 -0400 Subject: [PATCH] Fix merge error that disabled contact drag'n'drop --- program/include/rcmail_output_html.php | 13 +++++++++---- 1 files changed, 9 insertions(+), 4 deletions(-) diff --git a/program/include/rcmail_output_html.php b/program/include/rcmail_output_html.php index 577a2c8..c1da9f5 100644 --- a/program/include/rcmail_output_html.php +++ b/program/include/rcmail_output_html.php @@ -1176,7 +1176,7 @@ // generate html code for button if ($btn_content) { - $attrib_str = html::attrib_string($attrib, $link_attrib); + $attrib_str = html::attrib_string($attrib, array_merge(array('unselectable'), $link_attrib)); $out = sprintf('<a%s>%s</a>', $attrib_str, $btn_content); } @@ -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) { -- Gitblit v1.9.1