]> git.sur5r.net Git - contagged/blobdiff - entry.php
minor english lang file fix
[contagged] / entry.php
index 19b1777367433b3cb25ae927e0d504f6235b90dd..bb207ceb10e62d40a22faade43995ac6e9dfe9dd 100644 (file)
--- a/entry.php
+++ b/entry.php
@@ -2,6 +2,11 @@
 require_once('inc/init.php');
 ldap_login();
 
+if ($conf['userlogreq'] && $user == ''){
+  header('Location: login.php');
+  exit();
+}
+
 $users = get_users();
 
 //select template to use
@@ -173,6 +178,27 @@ print '</pre>';
         tpl_ldaperror("mod $key");
       }
     }
+
+    // special tag handling for Thunderbird
+    if($conf['tbtaghack'] && in_array('contactPerson',$OCLASSES)){
+        for($i=1;$i<5;$i++){
+            if(empty($entry["custom$i"])){
+                // deletion
+                unset($del);
+                $del["custom$i"]=array();
+                $r = @ldap_mod_replace($LDAP_CON,$dn,$del);
+                tpl_ldaperror("del custom$i");
+            }else{
+                // modification
+                unset($add);
+                $add["custom$i"]=$entry["custom$i"];
+                $r = @ldap_mod_replace($LDAP_CON,$dn,$add);
+                tpl_ldaperror("mod custom$i");
+            }
+        }
+    }
+
+
     return $dn;
   }
 }