Merge branch '2015.11-develop' into 2016.11
authorPhilipp Schüle <p.schuele@metaways.de>
Thu, 2 Feb 2017 08:12:17 +0000 (09:12 +0100)
committerPhilipp Schüle <p.schuele@metaways.de>
Thu, 2 Feb 2017 08:12:17 +0000 (09:12 +0100)
tine20/Setup/Backend/Abstract.php
tine20/Tinebase/DateTime.php

index 5bfd72b..2e6833c 100644 (file)
@@ -306,7 +306,8 @@ abstract class Setup_Backend_Abstract implements Setup_Backend_Interface
      */
     public function columnExists($_columnName, $_tableName)
     {
-        $columns = Tinebase_Db_Table::getTableDescriptionFromCache(SQL_TABLE_PREFIX . $_tableName, $this->_db); 
+        // read description from database
+        $columns = $this->_db->describeTable(SQL_TABLE_PREFIX . $_tableName);
         return (isset($columns[$_columnName]) || array_key_exists($_columnName, $columns));
     }
     
index 7ea4909..a340740 100644 (file)
@@ -430,10 +430,15 @@ class Tinebase_DateTime extends DateTime
      * (non-PHPdoc)
      * @see DateTime::setTime()
      * @note PHP 5.3.0 changed the return value on success from NULL to DateTime.
+     * @note PHP 7.1 added param $microseconds
      */
-    public function setTime($hour, $minute, $second = 0)
+    public function setTime($hour, $minute, $second = 0, $microseconds = null)
     {
-        parent::setTime($hour, $minute, $second);
+        if (PHP_VERSION_ID < 70100) {
+            parent::setTime($hour, $minute, $second);
+        } else {
+            parent::setTime($hour, $minute, $second, $microseconds);
+        }
         return $this;
     }