X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=gosa-plugins%2Ffai%2Fadmin%2Ffai%2Fclass_faiProfileEntry.inc;h=652b36052540a3590076686481e3a7fa2372c9d1;hb=fd75cee204401a00a137e1c795d5a7d887ab2903;hp=fe7decf65103a16fdd9a679a1f862099de0343d9;hpb=0b6b6a8b4d73127ca0b4e559f0105fa9cb5dd49e;p=gosa.git diff --git a/gosa-plugins/fai/admin/fai/class_faiProfileEntry.inc b/gosa-plugins/fai/admin/fai/class_faiProfileEntry.inc index fe7decf65..652b36052 100644 --- a/gosa-plugins/fai/admin/fai/class_faiProfileEntry.inc +++ b/gosa-plugins/fai/admin/fai/class_faiProfileEntry.inc @@ -29,7 +29,7 @@ class faiProfileEntry extends plugin "FAIhook" => "faiHook", "FAIvariable" => "faiVariable", "FAIpartitionTable" => "faiPartitionTable", - "FAIpackageList" => "faiPackageList"); + "FAIpackageList" => "faiPackage"); /* Read out all objects from fai tree */ $ldap= $this->config->get_ldap_link(); @@ -75,7 +75,7 @@ class faiProfileEntry extends plugin /* If no search filter is set, create one */ if (!session::is_set("SUBfaifilter")){ - $SUBfaifilter= array("base" => get_ou('faiou').session::get('CurrentMainBase'), "Sregex" => "*"); + $SUBfaifilter= array("base" => get_ou('faiBaseRDN').session::get('CurrentMainBase'), "Sregex" => "*"); $SUBfaifilter['SShowTemplates'] = true; $SUBfaifilter['SShowScripts'] = true; $SUBfaifilter['SShowHooks'] = true; @@ -88,8 +88,8 @@ class faiProfileEntry extends plugin function execute() { - /* Call parent execute */ - plugin::execute(); + /* Call parent execute */ + plugin::execute(); /* Fill templating stuff */ $smarty = get_smarty(); @@ -97,6 +97,11 @@ class faiProfileEntry extends plugin $SUBfaifilter = session::get('SUBfaifilter'); + /* Get alphabet selection */ + if(isset($_GET['search'])){ + $SUBfaifilter['Sregex'] = strtolower($_GET['search'])."*"; + } + /* If someone used the apply button, update searchfilter */ if(isset($_POST['Sregex'])){ foreach($SUBfaifilter as $key => $val){ @@ -130,12 +135,12 @@ class faiProfileEntry extends plugin } /* Create different picture for each object type */ - $objTypes['FAIhook'] = " "; - $objTypes['FAItemplate'] = " "; - $objTypes['FAIscript'] = " "; - $objTypes['FAIvariable'] = " "; - $objTypes['FAIpackageList'] = " "; - $objTypes['FAIpartitionTable'] = " "; + $objTypes['FAIhook'] = " "; + $objTypes['FAItemplate'] = " "; + $objTypes['FAIscript'] = " "; + $objTypes['FAIvariable'] = " "; + $objTypes['FAIpackageList'] = " "; + $objTypes['FAIpartitionTable'] = " "; /* Magic quotes GPC, escapes every ' " \, to solve some security risks * If we post the escaped strings they will be escaped again @@ -184,7 +189,7 @@ class faiProfileEntry extends plugin $fi = str_replace("*",".*",$SUBfaifilter['Sregex']); $abort = true; - if(!preg_match("/".$fi."/",$usedClass)){ + if(!preg_match("/^".$fi."/i",$usedClass)){ $abort = false; continue; } @@ -233,7 +238,7 @@ class faiProfileEntry extends plugin $smarty->assign("launchimage" , get_template_path('images/lists/action.png')); $smarty->assign("alphabet" , generate_alphabet()); $smarty->assign("apply" , apply_filter(TRUE)); - $smarty->assign("search_image" , get_template_path('images/search.png')); + $smarty->assign("search_image" , get_template_path('images/lists/search.png')); $display.= $smarty->fetch(get_template_path('faiProfileEntry.tpl', TRUE)); return($display);