fix location of default mysql table options
authorChuck Hagenbuch <chuck@horde.org>
Tue, 23 Dec 2008 19:22:07 +0000 (14:22 -0500)
committerChuck Hagenbuch <chuck@horde.org>
Tue, 23 Dec 2008 19:22:07 +0000 (14:22 -0500)
framework/Db/lib/Horde/Db/Adapter/Mysql/Schema.php
framework/Db/lib/Horde/Db/Adapter/Mysql/TableDefinition.php [deleted file]
framework/Db/package.xml

index 92a300a..3f370b4 100644 (file)
@@ -247,8 +247,8 @@ class Horde_Db_Adapter_Mysql_Schema extends Horde_Db_Adapter_Abstract_Schema
      */
     public function endTable($name, $options=array())
     {
-        $inno = array('options' => 'ENGINE=InnoDB');
-        return parent::endTable($name, array_merge($inno, $options));
+        $opts = array('options' => 'ENGINE=InnoDB DEFAULT CHARSET=' . $this->getCharset());
+        return parent::endTable($name, array_merge($opts, $options));
     }
 
     /**
diff --git a/framework/Db/lib/Horde/Db/Adapter/Mysql/TableDefinition.php b/framework/Db/lib/Horde/Db/Adapter/Mysql/TableDefinition.php
deleted file mode 100644 (file)
index 4b608dd..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-<?php
-/**
- * Copyright 2007 Maintainable Software, LLC
- * Copyright 2008 The Horde Project (http://www.horde.org/)
- *
- * @author     Mike Naberezny <mike@maintainable.com>
- * @author     Derek DeVries <derek@maintainable.com>
- * @author     Chuck Hagenbuch <chuck@horde.org>
- * @license    http://opensource.org/licenses/bsd-license.php
- * @category   Horde
- * @package    Horde_Db
- * @subpackage Adapter
- */
-
-/**
- * @author     Mike Naberezny <mike@maintainable.com>
- * @author     Derek DeVries <derek@maintainable.com>
- * @author     Chuck Hagenbuch <chuck@horde.org>
- * @license    http://opensource.org/licenses/bsd-license.php
- * @category   Horde
- * @package    Horde_Db
- * @subpackage Adapter
- */
-class Horde_Db_Adapter_Mysql_TableDefinition extends Horde_Db_Adapter_Abstract_TableDefinition
-{
-    /**
-     * @param   string  $name
-     * @param   array   $options
-     */
-    public function end()
-    {
-        if (empty($this->_options['temporary'])) {
-            $this->_options['options'] = 'ENGINE=InnoDB DEFAULT CHARSET=' . $this->_base->getCharset();
-        }
-        return parent::end();
-    }
-
-}
index 17778d0..dafafcd 100644 (file)
@@ -50,7 +50,6 @@ http://pear.php.net/dtd/package-2.0.xsd">
        <dir name="Mysql">
         <file name="Column.php" role="php" />
         <file name="Schema.php" role="php" />
-        <file name="TableDefinition.php" role="php" />
        </dir> <!-- /lib/Horde/Db/Adapter/Mysql -->
        <dir name="Mysqli">
         <file name="Result.php" role="php" />
@@ -107,7 +106,6 @@ http://pear.php.net/dtd/package-2.0.xsd">
 
    <install name="lib/Horde/Db/Adapter/Mysql/Column.php" as="Horde/Db/Adapter/Mysql/Column.php" />
    <install name="lib/Horde/Db/Adapter/Mysql/Schema.php" as="Horde/Db/Adapter/Mysql/Schema.php" />
-   <install name="lib/Horde/Db/Adapter/Mysql/TableDefinition.php" as="Horde/Db/Adapter/Mysql/TableDefinition.php" />
 
    <install name="lib/Horde/Db/Adapter/Mysqli/Result.php" as="Horde/Db/Adapter/Mysqli/Statement.php" />
    <install name="lib/Horde/Db/Adapter/Mysqli.php" as="Horde/Db/Adapter/Mysqli.php" />