From 077befb38e9a6bdec302c0f97a0d8429f929e112 Mon Sep 17 00:00:00 2001
From: Thomas Bruederli <thomas@roundcube.net>
Date: Sun, 27 May 2012 12:05:25 -0400
Subject: [PATCH] Add listcontrols template container in Larry skin (#1488498)

---
 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