Code

Code indentation
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 26 Oct 2010 06:29:41 +0000 (06:29 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 26 Oct 2010 06:29:41 +0000 (06:29 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20143 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/html/autocomplete.php

index 8804363913ee6de1514d5a9bac14f7c4623d5d0d..79d9f5a22333d9f9cdae1e7441038ee11de63df5 100644 (file)
@@ -30,55 +30,55 @@ session::global_set('errorsAlreadyPosted',array());
 
 /* Logged in? Simple security check */
 if (!session::global_is_set('ui')){
-  new log("security","unknown","",array(),"Error: autocomplete.php called without session") ;
-  header ("Location: index.php");
-  exit;
+    new log("security","unknown","",array(),"Error: autocomplete.php called without session") ;
+    header ("Location: index.php");
+    exit;
 }
 
 /* Base completition or filter completition? */
 if (isset($_GET['type']) && $_GET['type'] == "base") {
 
-  // Find dn based on name and description
-  if (session::is_set("pathMapping") && count($_POST) == 1) {
-    $res= "";
-    $pathMapping= session::get("pathMapping");
-    $department_info= session::get("department_info");
+    // Find dn based on name and description
+    if (session::is_set("pathMapping") && count($_POST) == 1) {
+        $res= "";
+        $pathMapping= session::get("pathMapping");
+        $department_info= session::get("department_info");
 
-    $search= preg_replace('/&quot;/', '"', current($_POST));
-    foreach ($department_info as $dn => $info) {
-      if (!isset($pathMapping[$dn])) {
-        continue;
-      }
-      if (mb_stristr($info['name'], $search) !== false) {
-        $res.= "<li>".mark($search, $pathMapping[$dn]).($info['description']==''?"":"<span class='informal'> [".mark($search, $info['description'])."]</span>")."</li>";
-        continue;
-      }
-      if (mb_stristr($info['description'], $search) !== false) {
-        $res.= "<li>".mark($search, $pathMapping[$dn]).($info['description']==''?"":"<span class='informal'> [".mark($search, $info['description'])."]</span>")."</li>";
-        continue;
-      }
-      if (mb_stristr($pathMapping[$dn], $search) !== false) {
-        $res.= "<li>".mark($search, $pathMapping[$dn]).($info['description']==''?"":"<span class='informal'> [".mark($search, $info['description'])."]</span>")."</li>";
-        continue;
-      }
-    }
+        $search= preg_replace('/&quot;/', '"', current($_POST));
+        foreach ($department_info as $dn => $info) {
+            if (!isset($pathMapping[$dn])) {
+                continue;
+            }
+            if (mb_stristr($info['name'], $search) !== false) {
+                $res.= "<li>".mark($search, $pathMapping[$dn]).($info['description']==''?"":"<span class='informal'> [".mark($search, $info['description'])."]</span>")."</li>";
+                continue;
+            }
+            if (mb_stristr($info['description'], $search) !== false) {
+                $res.= "<li>".mark($search, $pathMapping[$dn]).($info['description']==''?"":"<span class='informal'> [".mark($search, $info['description'])."]</span>")."</li>";
+                continue;
+            }
+            if (mb_stristr($pathMapping[$dn], $search) !== false) {
+                $res.= "<li>".mark($search, $pathMapping[$dn]).($info['description']==''?"":"<span class='informal'> [".mark($search, $info['description'])."]</span>")."</li>";
+                continue;
+            }
+        }
 
-    /* Return results */
-    if (!empty($res)) {
-      echo "<ul>$res</ul>";
+        /* Return results */
+        if (!empty($res)) {
+            echo "<ul>$res</ul>";
+        }
     }
-  }
 
 } else {
 
-  $ui = session::global_get('ui');
-  $config = session::global_get('config');
+    $ui = session::global_get('ui');
+    $config = session::global_get('config');
 
-  /* Is there a filter object arround? */
-  if (session::is_set("autocomplete")){
-    $filter= session::get("autocomplete");
-    $filter->processAutocomplete();
-  }
+    /* Is there a filter object arround? */
+    if (session::is_set("autocomplete")){
+        $filter= session::get("autocomplete");
+        $filter->processAutocomplete();
+    }
 }
 
 ?>