]> source.dussan.org Git - nextcloud-server.git/commitdiff
LDAP: fix db update for Postgres
authorArthur Schiwon <blizzz@owncloud.com>
Mon, 22 Oct 2012 22:18:43 +0000 (00:18 +0200)
committerArthur Schiwon <blizzz@owncloud.com>
Mon, 22 Oct 2012 22:18:43 +0000 (00:18 +0200)
apps/user_ldap/appinfo/database.xml
apps/user_ldap/appinfo/update.php

index a785bbf4221c0b8c745ea56a2c4e2e8c7b3969cf..812e450dde7a444acd7eb7592743ea64604cc09a 100644 (file)
    </field>
 
    <index>
-    <name>ldap_group_members</name>
+    <name>ldap_group_members_index</name>
     <unique>true</unique>
     <field>
      <name>owncloudname</name>
index f23285a0dc63a744d5ae9776c9c435b66948ed88..e6e25cec73456b9c7ba6336a2f58c14a4ecc00c5 100644 (file)
@@ -34,7 +34,7 @@ $groupBE = new \OCA\user_ldap\GROUP_LDAP();
 $groupBE->setConnector($connector);
 
 foreach($objects as $object) {
-       $fetchDNSql = 'SELECT `ldap_dn`, `owncloud_name` FROM `*PREFIX*ldap_'.$object.'_mapping` WHERE `directory_uuid` = ""';
+       $fetchDNSql = 'SELECT `ldap_dn`, `owncloud_name` FROM `*PREFIX*ldap_'.$object.'_mapping` WHERE `directory_uuid` = \'\'';
        $updateSql = 'UPDATE `*PREFIX*ldap_'.$object.'_mapping` SET `ldap_DN` = ?, `directory_uuid` = ? WHERE `ldap_dn` = ?';
 
        $query = OCP\DB::prepare($fetchDNSql);