diff --git a/plugins/admin/fai/class_faiProfileEntry.inc b/plugins/admin/fai/class_faiProfileEntry.inc
index 571584926f9002932b8250ac023bbd350a86bc61..3729141b80d197f34de51cbec317eb935df0a277 100644 (file)
plugin::plugin ($config, $dn);
/* Search only in fai tree */
- $base = "ou=fai,ou=configs,ou=systems,".$_SESSION['faifilter']['base'];
+ $base = "ou=fai,ou=configs,ou=systems,".$_SESSION['CurrentMainBase'];
/* Create array with categories to be able to sort different types of objects */
$categories = array("FAIscript","FAItemplate","FAIhook","FAIvariable","FAIpartitionTable","FAIpackageList");
/* If no search filter is set, create one */
if (!is_global("SUBfaifilter")){
- $SUBfaifilter= array("base" => "ou=fai,ou=configs,ou=systems,".$base, "Sregex" => "*");
+ $SUBfaifilter= array("base" => "ou=fai,ou=configs,ou=systems,".$_SESSION['CurrentMainBase'], "Sregex" => "*");
$SUBfaifilter['SShowTemplates'] = true;
$SUBfaifilter['SShowScripts'] = true;
$SUBfaifilter['SShowHooks'] = true;
/* Check if we used a checkboxe from the list, to select dselect an entry */
foreach($_POST as $name => $value){
foreach($this->FAIAllclasses as $class => $obj){
- if(isset($_POST["ON_PAGE_".$class])){
- if(isset($_POST['USE_'.$class])){
+ $bclass = base64_encode($class);
+ if(isset($_POST["ON_PAGE_".$bclass])){
+ if(isset($_POST['USE_'.$bclass])){
$this->FAIAllclasses[$class]['status']=true;
}else{
$this->FAIAllclasses[$class]['status']=false;
}
/* Create different picture for each object type */
- $objTypes['FAIhook'] = "<image src='images/fai_hook.png' title='"._("Hook bundle")."' alt=''> ";
- $objTypes['FAItemplate'] = "<image src='images/fai_template.png' title='"._("Template bundle")."' alt=''> ";
- $objTypes['FAIscript'] = "<image src='images/fai_script.png' title='"._("Script bundle")."' alt=''> ";
- $objTypes['FAIvariable'] = "<image src='images/fai_variable.png' title='"._("Variable bundle")."' alt=''> ";
- $objTypes['FAIpackageList'] = "<image src='images/fai_packages.png' title='"._("Package bundle")."' alt=''> ";
- $objTypes['FAIpartitionTable'] = "<image src='images/fai_partitionTable.png' title='"._("Partition table")."' alt=''> ";
+ $objTypes['FAIhook'] = "<img src='images/fai_hook.png' title='"._("Hook bundle")."' alt=''> ";
+ $objTypes['FAItemplate'] = "<img src='images/fai_template.png' title='"._("Template bundle")."' alt=''> ";
+ $objTypes['FAIscript'] = "<img src='images/fai_script.png' title='"._("Script bundle")."' alt=''> ";
+ $objTypes['FAIvariable'] = "<img src='images/fai_variable.png' title='"._("Variable bundle")."' alt=''> ";
+ $objTypes['FAIpackageList'] = "<img src='images/fai_packages.png' title='"._("Package bundle")."' alt=''> ";
+ $objTypes['FAIpartitionTable'] = "<img src='images/fai_partitionTable.png' title='"._("Partition table")."' alt=''> ";
/* Magic quotes GPC, escapes every ' " \, to solve some security risks
* If we post the escaped strings they will be escaped again
/* Action button allows us to delete an entry */
$action = "<input type='hidden' name='ON_PAGE_%KEY%' value='1'>
- <input type='checkbox' name='USE_%KEY%' value='%KEY%' onChange='document.mainform.submit();' %CHECK%>";
+ <input type='checkbox' name='USE_%KEY%' value='%KEY%' onClick='document.mainform.submit();' %CHECK%>";
/* Check every single class name to match the current search filter */
foreach($this->FAIAllclasses as $usedClass => $classes){
}
/* Append to list */
- $field1 = array("string"=> preg_replace("/%KEY%/",$usedClass,$action_check).$usedClass,"attach"=>"");
+ $field1 = array("string"=> str_replace("%KEY%",base64_encode($usedClass),$action_check).$usedClass,"attach"=>"");
$field2 = array("string"=> $str,"attach"=>"style='border-right:0px;'");
$divlist->AddEntry(array($field1,$field2));
}
/* Check supplied data */
function check()
{
- $message= array();
+ /* Call common method to give check the hook */
+ $message= plugin::check();
+
return ($message);
}