Skip to content

Commit

Permalink
request #11711: added setCharset() method in the DB container
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.php.net/repository/pear/packages/Translation2/trunk@241158 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information
quipo committed Aug 13, 2007
1 parent 319abdd commit 213d844
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 12 deletions.
16 changes: 16 additions & 0 deletions Container/db.php
Expand Up @@ -151,6 +151,22 @@ function _setDefaultOptions()
// or a pattern (i.e. "tr_%s" => "tr_EN_US")
}

// }}}
// {{{ setCharset()

/**
* Set charset used to read/store the translations
*
* @param string $charset
*/
function setCharset($charset)
{
if (in_array('setcharset', array_map('strtolower', get_class_methods($this->db)))) {
return $this->db->setCharset($charset);
}
return $this->db->query('SET NAMES ' .$this->db->quoteSmart($charset));
}

// }}}
// {{{ fetchLangs()

Expand Down
32 changes: 20 additions & 12 deletions package.xml
Expand Up @@ -45,25 +45,18 @@ Currently, the following decorators are provided:
<email>mike@php.net</email>
<active>yes</active>
</developer>
<date>2007-07-29</date>
<time>17:45:30</time>
<date>2007-08-13</date>
<time>11:40:30</time>
<version>
<release>2.0.0RC1</release>
<api>2.0.0RC1</api>
<release>2.0.0RC2</release>
<api>2.0.0RC2</api>
</version>
<stability>
<release>beta</release>
<api>beta</api>
</stability>
<license uri="http://www.debian.org/misc/bsd.license">BSD</license>
<notes>- fixed bug #9855: missing call to _prepare() in setLang()
- propagate errors in the decorators
- fixed testsuite: added missing db_test_base.php file and
fixed problem with class redeclaration
- fixed constraint creation in addLang() in the MDB2 Admin driver
- fixed setCharset() proxy in the Decorator
- fixed bug #11482: missing return in Translation2_Admin_Container_mdb2::addLang()
when the table already exists
<notes>- request #11711: added setCharset() method in the DB container

</notes>
<contents>
Expand Down Expand Up @@ -201,6 +194,21 @@ Currently, the following decorators are provided:
</dependencies>
<phprelease />
<changelog>
<release>
<version>
<release>2.0.0RC2</release>
<api>2.0.0RC2</api>
</version>
<stability>
<release>beta</release>
<api>beta</api>
</stability>
<date>2007-08-13</date>
<license uri="http://www.debian.org/misc/bsd.license">BSD</license>
<notes>- request #11711: added setCharset() method in the DB container

</notes>
</release>
<release>
<version>
<release>2.0.0RC1</release>
Expand Down

0 comments on commit 213d844

Please sign in to comment.