From: hickert Date: Tue, 26 Oct 2010 06:29:41 +0000 (+0000) Subject: Code indentation X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=1bdcbfb9f8bde57cdb0ffc899a760518b17731f9;p=gosa.git Code indentation git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20143 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/html/autocomplete.php b/gosa-core/html/autocomplete.php index 880436391..79d9f5a22 100644 --- a/gosa-core/html/autocomplete.php +++ b/gosa-core/html/autocomplete.php @@ -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('/"/', '"', current($_POST)); - foreach ($department_info as $dn => $info) { - if (!isset($pathMapping[$dn])) { - continue; - } - if (mb_stristr($info['name'], $search) !== false) { - $res.= "
  • ".mark($search, $pathMapping[$dn]).($info['description']==''?"":" [".mark($search, $info['description'])."]")."
  • "; - continue; - } - if (mb_stristr($info['description'], $search) !== false) { - $res.= "
  • ".mark($search, $pathMapping[$dn]).($info['description']==''?"":" [".mark($search, $info['description'])."]")."
  • "; - continue; - } - if (mb_stristr($pathMapping[$dn], $search) !== false) { - $res.= "
  • ".mark($search, $pathMapping[$dn]).($info['description']==''?"":" [".mark($search, $info['description'])."]")."
  • "; - continue; - } - } + $search= preg_replace('/"/', '"', current($_POST)); + foreach ($department_info as $dn => $info) { + if (!isset($pathMapping[$dn])) { + continue; + } + if (mb_stristr($info['name'], $search) !== false) { + $res.= "
  • ".mark($search, $pathMapping[$dn]).($info['description']==''?"":" [".mark($search, $info['description'])."]")."
  • "; + continue; + } + if (mb_stristr($info['description'], $search) !== false) { + $res.= "
  • ".mark($search, $pathMapping[$dn]).($info['description']==''?"":" [".mark($search, $info['description'])."]")."
  • "; + continue; + } + if (mb_stristr($pathMapping[$dn], $search) !== false) { + $res.= "
  • ".mark($search, $pathMapping[$dn]).($info['description']==''?"":" [".mark($search, $info['description'])."]")."
  • "; + continue; + } + } - /* Return results */ - if (!empty($res)) { - echo ""; + /* Return results */ + if (!empty($res)) { + echo ""; + } } - } } 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(); + } } ?>