]> git.sur5r.net Git - contagged/blobdiff - inc/functions.php
support multiple URLs
[contagged] / inc / functions.php
index f2db92f7837c9201f7385f5dcce017f3ac0f2859..84a29f2539a7c978bc57b856b398f0d9a5500008 100644 (file)
@@ -344,7 +344,7 @@ function ldap_store_objectclasses($dn,$classes){
   $add['objectClass'] = $set;
 
   $r = @ldap_mod_replace($LDAP_CON,$dn,$add);
-  tpl_ldaperror();
+  tpl_ldaperror('store object classes');
 
 /*  print '<pre>';
   print_r($set);
@@ -526,4 +526,24 @@ function get_fields_from_template($tpl){
     return $return;
 }
 
+function addCoords(&$coords, $entry, $geocoder)
+{
+    $priv = $geocoder->getPrivateCoords($entry);
+    if ($priv !== null) {
+        $priv->address = '<b>'
+            . $entry['givenname'] . ' ' . $entry['name'] . '</b><br/>'
+            . str_replace("\n", '<br/>', $entry['homestreet']);
+        $coords[] = $priv;
+    }
+
+    $busi = $geocoder->getBusinessCoords($entry);
+    if ($busi !== null) {
+        $busi->address = '<b>' . $entry['organization'] . '<br/>'
+            . $entry['givenname'] . ' ' . $entry['name'] . '</b><br/>'
+            . $entry['street'] . '<br/>'
+            . $entry['zip'] . $entry['location'];
+        $coords[] = $busi;
+    }
+}
+
 ?>