Merge branch '2014.11-develop' into 2015.07
authorPhilipp Schüle <p.schuele@metaways.de>
Thu, 22 Oct 2015 09:49:30 +0000 (11:49 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Thu, 22 Oct 2015 09:49:30 +0000 (11:49 +0200)
Conflicts:
tine20/Felamimail/Setup/Update/Release8.php
tine20/Felamimail/Setup/setup.xml
tine20/Tinebase/Setup/Update/Release8.php
tine20/Tinebase/Setup/setup.xml

Change-Id: Iaa9ad8b8f18e53dcc468b92ca8525028cf95fa59

13 files changed:
1  2 
tests/tine20/Filemanager/Controller/DownloadLinkTests.php
tests/tine20/TestCase.php
tests/tine20/Tinebase/AllTests.php
tests/tine20/Tinebase/ContainerTest.php
tine20/Felamimail/Setup/Update/Release8.php
tine20/Felamimail/Setup/Update/Release9.php
tine20/Felamimail/Setup/setup.xml
tine20/Tinebase/Container.php
tine20/Tinebase/Setup/Update/Release8.php
tine20/Tinebase/Setup/Update/Release9.php
tine20/Tinebase/Setup/setup.xml
tine20/Tinebase/Timemachine/ModificationLog.php
tine20/Tinebase/WebDav/Collection/AbstractContainerTree.php

Simple merge
@@@ -69,8 -68,8 +69,9 @@@ class Tinebase_AllTest
          $suite->addTestSuite('Tinebase_Redis_QueueTest');
          $suite->addTestSuite('Tinebase_Pluggable_ConcreteTest');
          $suite->addTestSuite('Tinebase_TempFileTest');
 +        $suite->addTestSuite('Tinebase_Server_AllTests');
          $suite->addTestSuite('Tinebase_LockTest');
+         $suite->addTestSuite('Tinebase_ScheduledImportTest');
  
          $suite->addTest(Tinebase_User_AllTests::suite());
          $suite->addTest(Tinebase_Group_AllTests::suite());
@@@ -151,14 -151,42 +151,57 @@@ class Felamimail_Setup_Update_Release8 
          ), $where);
          $this->setApplicationVersion('Felamimail', '8.4');
      }
-     
+     /**
+      * update to 8.5
+      * - add account_id-folder_id index to felamimail_cache_message
+      *
+      */
+     public function update_4()
+     {
 -        $backend = new Felamimail_Backend_Cache_Sql_Message();
 -        $db = $backend->getAdapter();
 -        $skip = false;
++        $tableVersion = $this->getTableVersion('felamimail_cache_message');
 -        if ($db instanceof Zend_Db_Adapter_Pdo_Mysql) {
 -            if ( !($stmt = $db->query('select @@innodb_version')) ||
 -                 ! $stmt->setFetchMode(Zend_Db::FETCH_NUM) ||
 -                 !($row = $stmt->fetchAll())) {
 -                $skip = true;
++        if ($tableVersion < 10) {
++            $backend = new Felamimail_Backend_Cache_Sql_Message();
++            $db = $backend->getAdapter();
++            $skip = false;
++
++            if ($db instanceof Zend_Db_Adapter_Pdo_Mysql) {
++                if (!($stmt = $db->query('select @@innodb_version')) ||
++                    !$stmt->setFetchMode(Zend_Db::FETCH_NUM) ||
++                    !($row = $stmt->fetchAll())
++                ) {
++                    $skip = true;
++                }
+             }
 -        }
 -        if ( !$skip ) {
 -            $declaration = new Setup_Backend_Schema_Index_Xml(
 -                '<index>
 -                     <name>account_id-folder_id</name>
 -                     <field>
 -                         <name>account_id</name>
 -                     </field>
 -                     <field>
 -                         <name>folder_id</name>
 -                     </field>
 -                </index>'
 -            );
 -            $this->_backend->addIndex('felamimail_cache_message', $declaration);
 -        }
++            if (!$skip) {
++                $declaration = new Setup_Backend_Schema_Index_Xml(
++                    '<index>
++                         <name>account_id-folder_id</name>
++                         <field>
++                             <name>account_id</name>
++                         </field>
++                         <field>
++                             <name>folder_id</name>
++                         </field>
++                    </index>'
++                );
++                $this->_backend->addIndex('felamimail_cache_message', $declaration);
++            }
 -        $this->setTableVersion('felamimail_cache_message', '10');
++            $this->setTableVersion('felamimail_cache_message', '10');
++        }
+         $this->setApplicationVersion('Felamimail', '8.5');
+     }
++
 +    /**
 +     * update to 9.0
 +     *
 +     * @return void
 +     */
-     public function update_4()
++    public function update_5()
 +    {
 +        $this->setApplicationVersion('Felamimail', '9.0');
 +    }
  }
index 0000000,0000000..8f02ace
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,24 @@@
++<?php
++/**
++ * Tine 2.0
++ *
++ * @package     Felamimail
++ * @subpackage  Setup
++ * @license     http://www.gnu.org/licenses/agpl.html AGPL3
++ * @copyright   Copyright (c) 2015 Metaways Infosystems GmbH (http://www.metaways.de)
++ * @author      Philipp Schüle <p.schuele@metaways.de>
++ */
++class Felamimail_Setup_Update_Release9 extends Setup_Update_Abstract
++{
++    /**
++     * update to 9.1
++     * 
++     * add account_id-folder_id index to felamimail_cache_message
++     */
++    public function update_0()
++    {
++        $update8 = new Felamimail_Setup_Update_Release8($this->_backend);
++        $update8->update_4();
++        $this->setApplicationVersion('Felamimail', '9.1');
++    }
++}
@@@ -1,7 -1,7 +1,7 @@@
  <?xml version="1.0" encoding="utf-8"?>
  <application>
      <name>Felamimail</name>
-     <version>9.0</version>
 -    <version>8.5</version>
++    <version>9.1</version>
      <order>30</order>
      <status>enabled</status>
      <tables>
Simple merge
@@@ -544,12 -542,26 +544,36 @@@ class Tinebase_Setup_Update_Release8 ex
      }
  
      /**
-     public function update_12()
+      * update 10 -> adds index to relations
+      */
+     public function update_12()
+     {
+         $tableVersion = $this->getTableVersion('relations');
+         if ($tableVersion < 8) {
+             $declaration = new Setup_Backend_Schema_Index_Xml('
+                     <index>
+                         <name>own_id</name>
+                         <field>
+                             <name>own_id</name>
+                         </field>
+                     </index>
+                 ');
+             $this->_backend->addIndex('relations', $declaration);
+             $this->setTableVersion('relations', '8');
+         }
+         $this->setApplicationVersion('Tinebase', '8.13');
+     }
++
++    /**
 +     * update to 9.0
 +     *
 +     * @return void
 +     */
++    public function update_13()
 +    {
 +        $this->setApplicationVersion('Tinebase', '9.0');
 +    }
  }
index 78899bc,0000000..2cbc70d
mode 100644,000000..100644
--- /dev/null
@@@ -1,24 -1,0 +1,36 @@@
 +<?php
 +/**
 + * Tine 2.0
 + *
 + * @package     Tinebase
 + * @subpackage  Setup
 + * @license     http://www.gnu.org/licenses/agpl.html AGPL3
 + * @copyright   Copyright (c) 2015 Metaways Infosystems GmbH (http://www.metaways.de)
 + * @author      Philipp Schüle <p.schuele@metaways.de>
 + */
 +class Tinebase_Setup_Update_Release9 extends Setup_Update_Abstract
 +{
 +    /**
 +     * update to 9.1
 +     * 
 +     * @see 0011178: allow to lock preferences for individual users
 +     */
 +    public function update_0()
 +    {
 +        $update8 = new Tinebase_Setup_Update_Release8($this->_backend);
 +        $update8->update_11();
 +        $this->setApplicationVersion('Tinebase', '9.1');
 +    }
++
++    /**
++     * update to 9.2
++     *
++     * adds index to relations
++     */
++    public function update_1()
++    {
++        $update8 = new Tinebase_Setup_Update_Release8($this->_backend);
++        $update8->update_12();
++        $this->setApplicationVersion('Tinebase', '9.2');
++    }
 +}
@@@ -1,7 -1,7 +1,7 @@@
  <?xml version="1.0" encoding="utf-8"?>
  <application>
      <name>Tinebase</name>
-     <version>9.1</version>
 -    <version>8.13</version>
++    <version>9.2</version>
      <tables>
          <table>
              <name>applications</name>