From bbc8565e5afa7e5352bc3aaf7cf067066ec6d4b1 Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Thu, 04 Mar 2010 03:17:04 -0500
Subject: [PATCH] Flag original messages after sending a draft (#1486203)

---
 program/lib/MDB2/Driver/Function/mssql.php |   23 +++++++++++++++++++----
 1 files changed, 19 insertions(+), 4 deletions(-)

diff --git a/program/lib/MDB2/Driver/Function/mssql.php b/program/lib/MDB2/Driver/Function/mssql.php
index 4ee0281..972c5ad 100644
--- a/program/lib/MDB2/Driver/Function/mssql.php
+++ b/program/lib/MDB2/Driver/Function/mssql.php
@@ -2,7 +2,7 @@
 // +----------------------------------------------------------------------+
 // | PHP versions 4 and 5                                                 |
 // +----------------------------------------------------------------------+
-// | Copyright (c) 1998-2006 Manuel Lemos, Tomas V.V.Cox,                 |
+// | Copyright (c) 1998-2008 Manuel Lemos, Tomas V.V.Cox,                 |
 // | Stig. S. Bakken, Lukas Smith                                         |
 // | All rights reserved.                                                 |
 // +----------------------------------------------------------------------+
@@ -42,7 +42,7 @@
 // | Author: Frank M. Kromann <frank@kromann.info>                        |
 // +----------------------------------------------------------------------+
 //
-// $Id: mssql.php,v 1.15 2007/08/11 16:02:22 quipo Exp $
+// $Id: mssql.php 292715 2009-12-28 14:06:34Z quipo $
 //
 
 require_once 'MDB2/Driver/Function/Common.php';
@@ -57,7 +57,6 @@
  */
 class MDB2_Driver_Function_mssql extends MDB2_Driver_Function_Common
 {
-     // }}}
     // {{{ executeStoredProc()
 
     /**
@@ -109,6 +108,22 @@
     }
 
     // }}}
+    // {{{ unixtimestamp()
+
+    /**
+     * return string to call a function to get the unix timestamp from a iso timestamp
+     *
+     * @param string $expression
+     *
+     * @return string to call a variable with the timestamp
+     * @access public
+     */
+    function unixtimestamp($expression)
+    {
+        return 'DATEDIFF(second, \'19700101\', '. $expression.') + DATEDIFF(second, GETDATE(), GETUTCDATE())';
+    }
+
+    // }}}
     // {{{ substring()
 
     /**
@@ -119,7 +134,7 @@
      */
     function substring($value, $position = 1, $length = null)
     {
-        if (!is_null($length)) {
+        if (null !== $length) {
             return "SUBSTRING($value, $position, $length)";
         }
         return "SUBSTRING($value, $position, LEN($value) - $position + 1)";

--
Gitblit v1.9.1