X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=gosa-plugins%2Ffai%2Fadmin%2Ffai%2Fclass_faiProfileEntry.inc;h=652b36052540a3590076686481e3a7fa2372c9d1;hb=fd75cee204401a00a137e1c795d5a7d887ab2903;hp=86ca1c6b2227ca239c426ffe6088bde804d81a2f;hpb=aa01ea38f1fceba6725fed12214bf94b1197fd7c;p=gosa.git
diff --git a/gosa-plugins/fai/admin/fai/class_faiProfileEntry.inc b/gosa-plugins/fai/admin/fai/class_faiProfileEntry.inc
index 86ca1c6b2..652b36052 100644
--- a/gosa-plugins/fai/admin/fai/class_faiProfileEntry.inc
+++ b/gosa-plugins/fai/admin/fai/class_faiProfileEntry.inc
@@ -11,13 +11,11 @@ class faiProfileEntry extends plugin
var $FAIAllclasses = array();
var $ui;
- function faiProfileEntry (&$config, $dn= NULL,$used=array(),$objects=false)
+ function faiProfileEntry (&$config, $dn= NULL,$used=array(),$base)
{
plugin::plugin ($config, $dn);
/* Search only in fai tree */
-
- $base = $this->parent->parent->fai_release;
$this->ui = get_userinfo();
$filter = "(|(objectClass=FAIscript)(objectClass=FAItemplate)(objectClass=FAIhook)".
@@ -31,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();
@@ -77,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;
@@ -90,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();
@@ -99,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){
@@ -132,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
@@ -186,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;
}
@@ -235,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);