]> git.sur5r.net Git - contagged/blobdiff - index.php
Merge pull request #11 from araname/patch-1
[contagged] / index.php
index 17240acffdd52721e427600539cb6f852143d700..56e98ab43823daf0cfb5e9b77bab5c497291b7fc 100644 (file)
--- a/index.php
+++ b/index.php
@@ -12,6 +12,8 @@
     $entrytpl = 'list_entry.tpl';
   }
 
+  tpl_std();
+
   // check which fields are needed
   $fields = get_fields_from_template($entrytpl);
 
@@ -37,7 +39,6 @@
   }
 
   //prepare templates
-  tpl_std();
   if (empty($_REQUEST['filter'])) $_REQUEST['filter']='';
   if (empty($_REQUEST['marker'])) $_REQUEST['marker']='';
   if (empty($_REQUEST['search'])) $_REQUEST['search']='';
       $words=preg_split('/\s+/',$search);
       $filter='';
       foreach($words as $word){
-       $wordfilter='';
+        $wordfilter='';
         foreach($conf['searchfields'] as $field) {
           $wordfilter .= '('.$field.'=*'.$word.'*)';
-       }
+        }
         for($i=0; $i <count($conf['searchfields']); $i++){
           $wordfilter = '(|'.$wordfilter.')';
-       }
+        }
         $filter .= '(&'.$wordfilter.')';
       }
       $ldapfilter = "(&(objectClass=inetOrgPerson)$filter)";