From d43bfc5e25e590b4e9233aa8a64e3ed7712a54f0 Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 21 Nov 2007 08:27:28 +0000 Subject: [PATCH] Fixed several w3c errors git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7837 594d385d-05f5-0310-b6e9-bd551577e9d8 --- ihtml/themes/default/headers.tpl | 1 + plugins/admin/fai/class_faiPartitionTable.inc | 70 ++++++++++--------- .../fai/class_faiPartitionTableEntry.inc | 7 +- plugins/admin/fai/class_faiScript.inc | 2 +- plugins/admin/fai/class_faiScriptEntry.inc | 5 ++ plugins/admin/fai/faiPartitionTable.tpl | 1 + plugins/admin/fai/faiProfileEntry.tpl | 2 +- plugins/admin/fai/faiScriptEntry.tpl | 5 +- 8 files changed, 54 insertions(+), 39 deletions(-) diff --git a/ihtml/themes/default/headers.tpl b/ihtml/themes/default/headers.tpl index 8004e8dad..b52a00abf 100644 --- a/ihtml/themes/default/headers.tpl +++ b/ihtml/themes/default/headers.tpl @@ -19,6 +19,7 @@ + diff --git a/plugins/admin/fai/class_faiPartitionTable.inc b/plugins/admin/fai/class_faiPartitionTable.inc index 52f587e58..a16ac272b 100644 --- a/plugins/admin/fai/class_faiPartitionTable.inc +++ b/plugins/admin/fai/class_faiPartitionTable.inc @@ -158,30 +158,31 @@ class faiPartitionTable extends plugin if((isset($_POST['EditDisk']))&&(isset($_POST['disks']))){ $usedDiskNames =array(); - $Udisk = $_POST['disks'][0]; - - foreach($this->disks as $key=>$disk){ - if($key != $Udisk){ - $usedDiskNames[]= $key; + if(isset($this->disks[$Udisk])){ + + foreach($this->disks as $key=>$disk){ + if($key != $Udisk){ + $usedDiskNames[]= $key; + } } - } - - /* Set object info string, which will be displayed in plugin info line */ - if(isset($this->disks[$Udisk]['dn'])){ - $_SESSION['objectinfo'] = $this->disks[$Udisk]['dn']; - $dn = $this->disks[$Udisk]['dn']; - }else{ - $_SESSION['objectinfo'] = ""; - $dn = "new"; - } - $this->dialog = new faiPartitionTableEntry($this->config,$this->dn,$usedDiskNames,$this->disks[$Udisk]); - $this->dialog->set_acl_base($this->acl_base_for_current_object($dn)); - $this->dialog->set_acl_category("fai"); - $this->dialog->FAIstate = $this->FAIstate; - - $this->is_dialog = true; + /* Set object info string, which will be displayed in plugin info line */ + if(isset($this->disks[$Udisk]['dn'])){ + $_SESSION['objectinfo'] = $this->disks[$Udisk]['dn']; + $dn = $this->disks[$Udisk]['dn']; + }else{ + $_SESSION['objectinfo'] = ""; + $dn = "new"; + } + + $this->dialog = new faiPartitionTableEntry($this->config,$this->dn,$usedDiskNames,$this->disks[$Udisk]); + $this->dialog->set_acl_base($this->acl_base_for_current_object($dn)); + $this->dialog->set_acl_category("fai"); + $this->dialog->FAIstate = $this->FAIstate; + + $this->is_dialog = true; + } } /* Edit aborted, close dialog, without saving anything @@ -240,20 +241,23 @@ class faiPartitionTable extends plugin if((isset($_POST['DelDisk']))&&(!empty($_POST['disks']))){ if($this->FAIstate != "freeze"){ foreach($_POST['disks'] as $disk) { - if($this->disks[$disk]['status']=="edited"){ - $this->disks[$disk."-delete"]=$this->disks[$disk]; - unset($this->disks[$disk]); - $disk = $disk."-delete"; - $this->disks[$disk]['status']="delete"; - foreach($this->disks[$disk]['partitions'] as $name => $value ){ - if($value['status']=="edited"){ - $this->disks[$disk]['partitions'][$name]['status']="delete"; - }else{ - unset($this->disks[$disk]['partitions'][$name]); + + if(isset($this->disks[$disk])){ + if($this->disks[$disk]['status']=="edited"){ + $this->disks[$disk."-delete"]=$this->disks[$disk]; + unset($this->disks[$disk]); + $disk = $disk."-delete"; + $this->disks[$disk]['status']="delete"; + foreach($this->disks[$disk]['partitions'] as $name => $value ){ + if($value['status']=="edited"){ + $this->disks[$disk]['partitions'][$name]['status']="delete"; + }else{ + unset($this->disks[$disk]['partitions'][$name]); + } } + }else{ + unset($this->disks[$disk]); } - }else{ - unset($this->disks[$disk]); } } } diff --git a/plugins/admin/fai/class_faiPartitionTableEntry.inc b/plugins/admin/fai/class_faiPartitionTableEntry.inc index 991ed324d..e8ded4e3a 100644 --- a/plugins/admin/fai/class_faiPartitionTableEntry.inc +++ b/plugins/admin/fai/class_faiPartitionTableEntry.inc @@ -183,7 +183,7 @@ class faiPartitionTableEntry extends plugin $FAIfsTypes = array("ext2","ext3","xfs","swap","reiser","dosfat16","winfat32"); /* Display Header */ - $str = ""; + $str = ""; if (count($this->partitions)){ $str .= ""; $str .= ""; @@ -298,7 +298,10 @@ class faiPartitionTableEntry extends plugin $str .= "\n"; } } - $str.="
"._("Type")."
"; + + if(!empty($str)){ + $str = "".$str."
"; + } return($str); } diff --git a/plugins/admin/fai/class_faiScript.inc b/plugins/admin/fai/class_faiScript.inc index a595a0289..43741e45c 100644 --- a/plugins/admin/fai/class_faiScript.inc +++ b/plugins/admin/fai/class_faiScript.inc @@ -369,7 +369,7 @@ class faiScript extends plugin /* Check if we are allowed to view this object */ $s_acl = $this->ui->get_permissions($dn,"fai/faiScriptEntry","cn") ; if(preg_match("/r/",$s_acl)){ - $divlist->AddEntry(array( array("string"=>"".$name['name'].""), + $divlist->AddEntry(array( array("string"=>"".$name['name'].""), array("string"=>$name['FAIpriority'] , "attach" => "style='width:100px;'"), array("string"=>$down , "attach" => "style='width:100px;'"), array("string"=>str_replace("%s",base64_encode($key),$act), diff --git a/plugins/admin/fai/class_faiScriptEntry.inc b/plugins/admin/fai/class_faiScriptEntry.inc index 5761751c2..5e162f05d 100644 --- a/plugins/admin/fai/class_faiScriptEntry.inc +++ b/plugins/admin/fai/class_faiScriptEntry.inc @@ -106,6 +106,11 @@ class faiScriptEntry extends plugin } $smarty->assign("FAIprioritys",$FAIprioritys); + if(get_magic_quotes_gpc()){ + $smarty->assign("FAIscript" , htmlentities(stripslashes($this->FAIscript))); + }else{ + $smarty->assign("FAIscript" , htmlentities($this->FAIscript)); + } $display.= $smarty->fetch(get_template_path('faiScriptEntry.tpl', TRUE)); return($display); } diff --git a/plugins/admin/fai/faiPartitionTable.tpl b/plugins/admin/fai/faiPartitionTable.tpl index 20f6ee197..f330fe67b 100644 --- a/plugins/admin/fai/faiPartitionTable.tpl +++ b/plugins/admin/fai/faiPartitionTable.tpl @@ -43,6 +43,7 @@
{if $sub_object_is_addable} diff --git a/plugins/admin/fai/faiProfileEntry.tpl b/plugins/admin/fai/faiProfileEntry.tpl index 66616287c..72e865bea 100644 --- a/plugins/admin/fai/faiProfileEntry.tpl +++ b/plugins/admin/fai/faiProfileEntry.tpl @@ -64,7 +64,7 @@ - +
diff --git a/plugins/admin/fai/faiScriptEntry.tpl b/plugins/admin/fai/faiScriptEntry.tpl index 78e4db350..36db68c31 100644 --- a/plugins/admin/fai/faiScriptEntry.tpl +++ b/plugins/admin/fai/faiScriptEntry.tpl @@ -40,7 +40,7 @@ {render acl=$FAIpriorityACL} - {html_options options=$FAIprioritys selected=$FAIpriority} {/render} @@ -60,7 +60,8 @@ {render acl=$FAIscriptACL} - + {/render} -- 2.30.2