cvs: pear /Translation2 package.xml /Translation2/Admin/Container mdb2.php
| From: | Lorenzo Alberton | Date: | Tue, 13 Feb 2007 11:11:55 +0000 |
| Subject: | cvs: pear /Translation2 package.xml /Translation2/Admin/Container mdb2.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-44657@lists.php.net to get a copy of this message | ||
quipo Tue Feb 13 11:11:55 2007 UTC
Modified files:
/pear/Translation2/Admin/Container mdb2.php
/pear/Translation2 package.xml
Log:
fixed constraint creation in addLang() in the MDB2 Admin driver
http://cvs.php.net/viewvc.cgi/pear/Translation2/Admin/Container/mdb2.php?r1=1.31&r2=1.32&diff_format=u
Index: pear/Translation2/Admin/Container/mdb2.php
diff -u pear/Translation2/Admin/Container/mdb2.php:1.31
pear/Translation2/Admin/Container/mdb2.php:1.32
--- pear/Translation2/Admin/Container/mdb2.php:1.31 Wed Sep 27 10:24:34 2006
+++ pear/Translation2/Admin/Container/mdb2.php Tue Feb 13 11:11:55 2007
@@ -32,7 +32,7 @@
* @author Lorenzo Alberton <l dot alberton at quipo dot it>
* @copyright 2004-2005 Lorenzo Alberton
* @license http://www.debian.org/misc/bsd.license BSD
License (3 Clause)
- * @version CVS: $Id: mdb2.php,v 1.31 2006/09/27 10:24:34 quipo Exp $
+ * @version CVS: $Id: mdb2.php,v 1.32 2007/02/13 11:11:55 quipo Exp $
* @link http://pear.php.net/package/Translation2
*/
@@ -142,6 +142,7 @@
if (PEAR::isError($res)) {
return $res;
}
+ $mysqlClause = ($this->db->phptype == 'mysql') ? '(255)' :
'';
$constraint_name = $langData['table_name']
.'_'. $this->options['string_page_id_col']
@@ -149,8 +150,9 @@
$constraint_definition = array(
'fields' => array(
$this->options['string_page_id_col'] => array(),
- $this->options['string_id_col'] => array(),
- )
+ $this->options['string_id_col'].$mysqlClause => array(),
+ ),
+ 'unique' => true,
);
++$this->_queries;
$res = $this->db->manager->createConstraint($langData['table_name'],
$constraint_name, $constraint_definition);
http://cvs.php.net/viewvc.cgi/pear/Translation2/package.xml?r1=1.107&r2=1.108&diff_format=u
Index: pear/Translation2/package.xml
diff -u pear/Translation2/package.xml:1.107 pear/Translation2/package.xml:1.108
--- pear/Translation2/package.xml:1.107 Tue Jan 30 20:53:15 2007
+++ pear/Translation2/package.xml Tue Feb 13 11:11:55 2007
@@ -45,14 +45,15 @@
</maintainers>
<release>
<version>2.0.0beta13</version>
- <date>2007-01-30</date>
+ <date>2007-02-13</date>
<license>BSD License</license>
<state>beta</state>
<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 problem with class redeclaration
+- fixed constraint creation in addLang() in the MDB2 Admin driver
</notes>
<deps>
<dep type="pkg" rel="has"
optional="yes">Cache_Lite</dep>
@@ -153,14 +154,15 @@
<changelog>
<release>
<version>2.0.0beta13</version>
- <date>2007-01-30</date>
+ <date>2007-02-13</date>
<license>BSD License</license>
<state>beta</state>
<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 problem with class redeclaration
+- fixed constraint creation in addLang() in the MDB2 Admin driver
</notes>
</release>
<release>