Entropy/phpBB3AuthInterface:

- handle utf8 strings correctly

git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@2550 cd1c1023-2f26-0410-ae45-c471fc1f0318
This commit is contained in:
lxnay
2008-10-23 15:51:27 +00:00
parent 3bcfdf9d81
commit 4c59e26e02
+2 -2
View File
@@ -19623,7 +19623,7 @@ class phpBB3AuthInterface(DistributionAuthInterface,RemoteDbSkelInterface):
self.dbconn.commit()
def _generate_sql(self, action, table, data, where = ''):
sql = ''
sql = u''
keys = sorted(data.keys())
if action == "update":
sql += 'UPDATE %s SET ' % (self.dbconn.escape_string(table),)
@@ -19637,7 +19637,7 @@ class phpBB3AuthInterface(DistributionAuthInterface,RemoteDbSkelInterface):
sql += ', '.join(keys_data)
sql += ' WHERE %s' % (where,)
elif action == "insert":
sql = 'INSERT INTO %s (%s) VALUES (%s)' % (
sql = u'INSERT INTO %s (%s) VALUES (%s)' % (
self.dbconn.escape_string(table),
', '.join([self.dbconn.escape_string(x) for x in keys]),
', '.join(["'"+self.dbconn.escape_string(unicode(data[x]))+"'" for x in keys])