diff --git a/plugins/admin/fai/class_faiPartitionTable.inc b/plugins/admin/fai/class_faiPartitionTable.inc
index 3c83b3484c2edb7b1a5170a0cc5a2d90b755d67f..fc35fd188204f1ff3cc2218af40e4c03074100bd 100644 (file)
}
}
}
}
}
}
+ ksort($this->disks);
}
function execute()
{
}
function execute()
{
+ /* Call parent execute */
+ plugin::execute();
+
/* Fill templating stuff */
$smarty= get_smarty();
$display= "";
/* Fill templating stuff */
$smarty= get_smarty();
$display= "";
/* Edit disk.
* Open dialog which allows us to edit the selected entry
*/
/* Edit disk.
* Open dialog which allows us to edit the selected entry
*/
+
+ if($this->dn != "new"){
+ $_SESSION['objectinfo']= $this->dn;
+ }
+
if((isset($_POST['EditDisk']))&&(isset($_POST['disks']))){
$usedDiskNames =array();
foreach($this->disks as $key=>$disk){
if((isset($_POST['EditDisk']))&&(isset($_POST['disks']))){
$usedDiskNames =array();
foreach($this->disks as $key=>$disk){
}
}
$this->dialog = new faiPartitionTableEntry($this->config,$this->dn,$usedDiskNames,$this->disks[$_POST['disks']]);
}
}
$this->dialog = new faiPartitionTableEntry($this->config,$this->dn,$usedDiskNames,$this->disks[$_POST['disks']]);
+ $_SESSION['objectinfo'] = $this->disks[$_POST['disks']]['dn'];
$this->is_dialog = true;
}
$this->is_dialog = true;
}
unset($this->dialog);
$this->dialog = NULL;
$this->is_dialog=false;
unset($this->dialog);
$this->dialog = NULL;
$this->is_dialog=false;
+ ksort($this->disks);
}
}
}
}
}
}
if(!empty($disk['description'])){
}
}
if(!empty($disk['description'])){
- $a_return[$key]= $disk['cn']." [".$disk['description']."], ".sprintf(_("%s partition(s)"), $cnt);
+ if($cnt == 1){
+ $a_return[$key]= $disk['cn']." [".$disk['description']."], ".sprintf(_("%s partition"), $cnt);
+ }else{
+ $a_return[$key]= $disk['cn']." [".$disk['description']."], ".sprintf(_("%s partition(s)"), $cnt);
+ }
}else{
}else{
- $a_return[$key]= $disk['cn'].", ".sprintf(_("%s partition(s)"), $cnt);
+ if($cnt == 1){
+ $a_return[$key]= $disk['cn'].", ".sprintf(_("%s partition"), $cnt);
+ }else{
+ $a_return[$key]= $disk['cn'].", ".sprintf(_("%s partition(s)"), $cnt);
+ }
}
}
}
}
}
}
{
$message= array();
{
$message= array();
-
- $str = utf8_encode("üöä");
- if(preg_match("/[^a-z0-9".$str."\.,;:\-_\? ]/i",$this->description)){
- $message[]=_("Please enter a valid description.");
- }
-
- if((empty($this->cn))||(preg_match("/[^a-z0-9]/i",$this->cn))){
- $message[]=_("Please enter a valid name.");
- }
-
return ($message);
}
return ($message);
}