From f8c96f737c1916377e361e3fbaa8a415c4101ca4 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Thu, 07 Jun 2012 04:34:56 -0400
Subject: [PATCH] Enable attachments drag&drop upload for default skin
---
program/include/rcube_output_html.php | 44 ++++++++++++++++++++++++++------------------
1 files changed, 26 insertions(+), 18 deletions(-)
diff --git a/program/include/rcube_output_html.php b/program/include/rcube_output_html.php
index 237bc81..142755b 100644
--- a/program/include/rcube_output_html.php
+++ b/program/include/rcube_output_html.php
@@ -17,10 +17,7 @@
+-----------------------------------------------------------------------+
| Author: Thomas Bruederli <roundcube@gmail.com> |
+-----------------------------------------------------------------------+
-
- $Id$
-
- */
+*/
/**
@@ -770,6 +767,13 @@
if (preg_match('/Revision:\s(\d+)/', @shell_exec('svn info'), $regs))
$ver .= ' [SVN r'.$regs[1].']';
}
+ else if (is_file(INSTALL_PATH . '.git/index')) {
+ if (preg_match('/Date:\s+([^\n]+)/', @shell_exec('git log -1'), $regs)) {
+ if ($date = date('Ymd.Hi', strtotime($regs[1]))) {
+ $ver .= ' [GIT '.$date.']';
+ }
+ }
+ }
$content = html::quote($ver);
}
else if ($object == 'steptitle') {
@@ -1225,21 +1229,21 @@
*/
protected function file_callback($matches)
{
- $file = $matches[3];
+ $file = $matches[3];
// correct absolute paths
- if ($file[0] == '/') {
- $file = $this->base_path . $file;
+ if ($file[0] == '/') {
+ $file = $this->base_path . $file;
}
// add file modification timestamp
- if (preg_match('/\.(js|css)$/', $file)) {
+ if (preg_match('/\.(js|css)$/', $file)) {
if ($fs = @filemtime($file)) {
$file .= '?s=' . $fs;
}
}
- return $matches[1] . '=' . $matches[2] . $file . $matches[4];
+ return $matches[1] . '=' . $matches[2] . $file . $matches[4];
}
@@ -1560,16 +1564,20 @@
'GB2312' => 'GB2312 ('.$this->app->gettext('chinese').')',
);
- if (!empty($_POST['_charset']))
- $set = $_POST['_charset'];
- else if (!empty($attrib['selected']))
- $set = $attrib['selected'];
- else
- $set = $this->get_charset();
+ if (!empty($_POST['_charset'])) {
+ $set = $_POST['_charset'];
+ }
+ else if (!empty($attrib['selected'])) {
+ $set = $attrib['selected'];
+ }
+ else {
+ $set = $this->get_charset();
+ }
- $set = strtoupper($set);
- if (!isset($charsets[$set]))
- $charsets[$set] = $set;
+ $set = strtoupper($set);
+ if (!isset($charsets[$set])) {
+ $charsets[$set] = $set;
+ }
$select = new html_select($field_attrib);
$select->add(array_values($charsets), array_keys($charsets));
--
Gitblit v1.9.1