]> git.sur5r.net Git - contagged/commitdiff
fix for removing tags through ajax
authorAndreas Gohr <gohr@cosmocode.de>
Tue, 31 Jan 2006 11:09:21 +0000 (12:09 +0100)
committerAndreas Gohr <gohr@cosmocode.de>
Tue, 31 Jan 2006 11:09:21 +0000 (12:09 +0100)
darcs-hash:20060131110921-6e07b-c16feedc1fae07b68b26c2987ddd9c97aa86ac8d.gz

ajax.php

index 75da75ae44c7b33acaf73300056aae65e0a8190f..fafe45a8a5fc39fa06931f350943dae5ee881fb7 100644 (file)
--- a/ajax.php
+++ b/ajax.php
@@ -46,9 +46,10 @@ function ajax_settags($dn,$tags){
   $tags = explode(',',$tags);
   $tags = array_map('trim',$tags);
   $tags = array_unique($tags);
+  $tags = array_diff($tags, array('')); //strip empty ones
 
   $entry['marker'] = $tags;
-  ldap_modify($LDAP_CON,$dn,$entry);
+  ldap_mod_replace($LDAP_CON,$dn,$entry);
 
   foreach ($tags as $tag){
     print '<a href="index.php?marker=';