Merge branch '2013.03' into 2013.10
authorPhilipp Schüle <p.schuele@metaways.de>
Mon, 10 Feb 2014 12:19:55 +0000 (13:19 +0100)
committerPhilipp Schüle <p.schuele@metaways.de>
Mon, 10 Feb 2014 12:19:55 +0000 (13:19 +0100)
Conflicts:
tine20/Tinebase/Setup/Update/Release7.php
tine20/Tinebase/Setup/setup.xml

1  2 
tine20/Tinebase/Frontend/Http.php
tine20/Tinebase/Server/Json.php
tine20/Tinebase/Setup/Update/Release8.php
tine20/Tinebase/Setup/setup.xml
tine20/Tinebase/User/Sql.php

Simple merge
Simple merge
index a918ba3,0000000..d205135
mode 100644,000000..100644
--- /dev/null
@@@ -1,44 -1,0 +1,62 @@@
 +<?php
 +/**
 + * Tine 2.0
 + *
 + * @package     Tinebase
 + * @subpackage  Setup
 + * @license     http://www.gnu.org/licenses/agpl.html AGPL3
 + * @copyright   Copyright (c) 2013 Metaways Infosystems GmbH (http://www.metaways.de)
 + * @author      Philipp Schüle <p.schuele@metaways.de>
 + */
 +class Tinebase_Setup_Update_Release8 extends Setup_Update_Abstract
 +{
 +    /**
 +     * update to 8.1
 +     * 
 +     * @see 0009152: saving of record fails because of too many relations
 +     */
 +    public function update_0()
 +    {
 +        $valueFields = array('old_value', 'new_value');
 +        foreach ($valueFields as $field) {
 +            
 +            // check schema, only change if type == text
 +            $typeMapping = $this->_backend->getTypeMapping('text');
 +            $schema = Tinebase_Db_Table::getTableDescriptionFromCache(SQL_TABLE_PREFIX . 'timemachine_modlog', $this->_backend->getDb());
 +            
 +            if ($schema[$field]['DATA_TYPE'] === $typeMapping['defaultType']) {
 +                if (Tinebase_Core::isLogLevel(Zend_Log::DEBUG)) Tinebase_Core::getLogger()->debug(__METHOD__ . '::' . __LINE__
 +                    . ' Old column type (' . $schema[$field]['DATA_TYPE'] . ') is going to be altered to clob');
 +                
 +                $declaration = new Setup_Backend_Schema_Field_Xml('
 +                    <field>
 +                        <name>' . $field . '</name>
 +                        <type>clob</type>
 +                    </field>
 +                ');
 +            
 +                $this->_backend->alterCol('timemachine_modlog', $declaration);
 +            }
 +        }
 +        $this->setTableVersion('timemachine_modlog', '3');
 +        $this->setApplicationVersion('Tinebase', '8.1');
 +    }
++
++    /**
++     * update to 8.2
++     * 
++     * @see 0009644: remove user registration
++     */
++    public function update_1()
++    {
++        if ($this->_backend->tableExists('registrations')) {
++            $this->dropTable('registrations');
++        }
++        
++        if ($this->_backend->tableExists('registration_invitation')) {
++            $this->dropTable('registration_invitation');
++        }
++        
++        $this->setApplicationVersion('Tinebase', '8.2');
++    }
 +}
@@@ -1,7 -1,7 +1,7 @@@
  <?xml version="1.0" encoding="utf-8"?>
  <application>
      <name>Tinebase</name>
-     <version>8.1</version>
 -    <version>7.8</version>
++    <version>8.2</version>
      <tables>
          <table>
              <name>applications</name>
                  </index>
              </declaration>
          </table>
-         <table>
-             <name>registrations</name>
-             <version>2</version>
-             <declaration>
-                 <field>
-                     <name>id</name>
-                     <type>integer</type>
-                     <autoincrement>true</autoincrement>
-                 </field>
-                 <field>
-                     <name>login_name</name>
-                     <type>text</type>
-                     <length>64</length>
-                     <notnull>true</notnull>
-                 </field>
-                 <field>
-                     <name>login_hash</name>
-                     <type>text</type>
-                     <length>32</length>
-                     <notnull>true</notnull>
-                 </field>
-                 <field>
-                     <name>email</name>
-                     <type>text</type>
-                     <length>128</length>
-                     <notnull>true</notnull>
-                 </field>
-                 <field>
-                     <name>date</name>
-                     <type>datetime</type>
-                 </field>
-                 <field>
-                     <name>status</name>
-                     <type>text</type>
-                     <length>32</length>
-                     <value>activated</value>
-                     <notnull>true</notnull>
-                 </field>
-                 <field>
-                     <name>expires_at</name>
-                     <type>datetime</type>
-                 </field>
-                 <field>
-                     <name>email_sent</name>
-                     <type>boolean</type>
-                     <default>false</default>
-                 </field>
-                 <index>
-                     <name>account_id</name>
-                     <primary>true</primary>
-                     <field>
-                         <name>id</name>
-                     </field>
-                 </index>
-                 <index>
-                     <name>login_name</name>
-                     <unique>true</unique>
-                     <field>
-                         <name>login_name</name>
-                     </field>
-                 </index>
-             </declaration>
-         </table>
-         <table>
-             <name>registration_invitation</name>
-             <version>2</version>
-             <declaration>
-                 <field>
-                     <name>id</name>
-                     <type>text</type>
-                     <length>40</length>
-                     <notnull>true</notnull>
-                 </field>
-                 <field>
-                     <name>email</name>
-                     <type>text</type>
-                     <length>128</length>
-                     <notnull>true</notnull>
-                 </field>
-                 <index>
-                     <name>id</name>
-                     <primary>true</primary>
-                     <field>
-                         <name>id</name>
-                     </field>
-                 </index>
-                 <index>
-                     <name>email</name>
-                     <unique>true</unique>
-                     <field>
-                         <name>email</name>
-                     </field>
-                 </index>
-             </declaration>
-         </table>
          <table>
              <name>container</name>
 -            <version>7</version>
 +            <version>8</version>
              <declaration>
                  <field>
                      <name>id</name>
Simple merge