[dev] Another DataTree patch

Vilius Šumskas vilius at lnk.lt
Mon May 3 07:41:23 PDT 2004


Hi,

I think I nailed this one: http://bugs.horde.org/details.php?id=130
See patch attached.

--
   Best Regards,

   Vilius Šumskas
   LNK TV system administrator
   mob.: +370 614 75713
   www.lnk.lt
-------------- next part --------------
Index: sql.php
===================================================================
RCS file: /repository/framework/DataTree/DataTree/sql.php,v
retrieving revision 1.116
diff -u -r1.116 sql.php
--- sql.php	30 Mar 2004 22:29:31 -0000	1.116
+++ sql.php	3 May 2004 14:36:26 -0000
@@ -750,7 +750,7 @@
                 }
                 $data[$row['datatree_id']][] = array('name' => $row['name'],
                                                      'key' => $row['key'],
-                                                     'value' => $row['value']);
+                                                     'value' => String::convertCharset($row['value'], NLS::getCharset(true)));
             }
             return $data;
         } else {
@@ -994,7 +994,7 @@
                                  (int)$id,
                                  $this->_db->quote($attr['name']),
                                  $this->_db->quote($attr['key']),
-                                 $this->_db->quote($attr['value']));
+                                 $this->_db->quote(String::convertCharset($attr['value'], NLS::getCharset(), $this->_params['charset'])));
 
                 Horde::logMessage('SQL Query by DataTree_sql::updateData(): ' . $query, __FILE__, __LINE__, PEAR_LOG_DEBUG);
                 $result = $this->_db->query($query);


More information about the dev mailing list