X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=plugins%2Fadmin%2Fapplications%2Fclass_applicationManagement.inc;h=26cb834c5e3b797ea7623a32d59889381ee7a6ad;hb=969b5c3e6fb3643d2b9b77bcb92b7c329f22512b;hp=f26efa05bc73f75a8e8cba076414761f3383cfc3;hpb=3082209baacc737659b444a6de4ed6ef5588faaf;p=gosa.git
diff --git a/plugins/admin/applications/class_applicationManagement.inc b/plugins/admin/applications/class_applicationManagement.inc
index f26efa05b..26cb834c5 100644
--- a/plugins/admin/applications/class_applicationManagement.inc
+++ b/plugins/admin/applications/class_applicationManagement.inc
@@ -50,6 +50,7 @@ class applicationManagement extends plugin
{
/* Call parent execute */
plugin::execute();
+
/* Save data */
$appfilter = get_global("appfilter");
$smarty = get_smarty(); // Smarty instance
@@ -300,9 +301,9 @@ class applicationManagement extends plugin
/* Don't show buttons if tab dialog requests this */
if (!$this->apptabs->by_object[$this->apptabs->current]->dialog){
$display.= "
\n";
- $display.= "\n";
+ $display.= "\n";
$display.= " \n";
- $display.= "\n";
+ $display.= "\n";
$display.= "
";
}
return ($display);
@@ -314,7 +315,7 @@ class applicationManagement extends plugin
$options= "";
foreach ($this->config->idepartments as $key => $value){
if ($appfilter['depselect'] == $key){
- $options.= "";
+ $options.= "";
} else {
$options.= "";
}
@@ -322,39 +323,39 @@ class applicationManagement extends plugin
// Managment
$listhead = "";
- $actions = "";
- $actions.= "";
+ $actions = "";
+ $actions.= "";
// Defining Links
$linkopen = "%s";
// image Buttons
$editlink = "%s";
- $userimg = "
";
+ $userimg = "
";
// Extension images
- $applimg = "
";
+ $applimg = "
";
// Space
- $empty = "
";
+ $empty = "
";
$divlist = new divlist("applicationtabs");
$divlist->SetHeader(array(
- array("string" => ""),
- array("string" => _("Application name")." / "._("Department")),
- array("string" => _("Actions") ,"attach"=>"style='border:none;width:40px;'")
+ array("string" => " ", "attach" => "style='text-align:center;width:20px;'"),
+ array("string" => _("Application name")." / "._("Department"), "attach" => "style=''"),
+ array("string" => _("Actions"), "attach" => "style='width:60px;border-right:0px;text-align:right;'")
));
@@ -375,9 +376,9 @@ class applicationManagement extends plugin
}
}
- $field1 = array("string" => "
");
- $field2 = array("string" => sprintf($linkopen,base64_encode($key),$val));
- $field3 = array("string" => " ","attach"=>"style='text-align:right;border:none'");
+ $field1 = array("string" => "
", "attach" => "style='text-align:center;width:20px;'");
+ $field2 = array("string" => sprintf($linkopen,base64_encode($key),$val), "attach" => "style=''");
+ $field3 = array("string" => " ", "attach" => "style='width:60px;border-right:0px;text-align:right;'");
$divlist->AddEntry(array($field1,$field2,$field3));
}
@@ -390,9 +391,9 @@ class applicationManagement extends plugin
}else{
$desc = " - [ ".$val['description'][0]." ]";
}
- $field1 = array("string" => sprintf($applimg,$val['dn']),"attach"=>"style='width:20px;align:middle;'");
- $field2 = array("string" => sprintf($editlink,$key,($val['cn']['0'].$desc)),"attach"=>$title);
- $field3 = array("string" => preg_replace("/%KEY%/", $key, $actions),"attach"=>"style='text-align:right;border:none'");
+ $field1 = array("string" => sprintf($applimg,$val['dn']), "attach" => "style='text-align:center;width:20px;'");
+ $field2 = array("string" => sprintf($editlink,$key,($val['cn']['0'].$desc)), "attach" => "style='' ".$title);
+ $field3 = array("string" => preg_replace("/%KEY%/", $key, $actions), "attach" => "style='width:60px;border-right:0px;text-align:right;'");
$divlist->AddEntry(array($field1,$field2,$field3));
}
@@ -444,13 +445,17 @@ class applicationManagement extends plugin
* We also need to search for the departments
* So we are able to navigate like in konquerer
*/
- $base2 = preg_replace("/ou=people,/i","",$base);
+ $peopleOU = get_people_ou();
+
+ if(empty($peopleOU)){
+ $base2 = $base;
+ }else{
+ $base2 = preg_replace("/".$peopleOU."/i","",$base);
+ }
$res3 = get_list2($this->ui->subtreeACL, "(&(|(ou=$regex)(description=$regex))(objectClass=gosaDepartment))",
TRUE, $base2, array("ou", "description"), TRUE);
-
-
$this->departments= array();
$tmp = array();
foreach ($res3 as $value){
@@ -458,10 +463,10 @@ class applicationManagement extends plugin
}
ksort($tmp);
foreach($tmp as $value){
- if($value["description"][0]!=".."){
+ if(isset($value["description"][0])){
$this->departments[$value['dn']]=convert_department_dn2($value['dn'])." - [".$value["description"][0]."]";
}else{
- $this->departments[$value['dn']]=$value["description"][0];
+ $this->departments[$value['dn']]=convert_department_dn2($value['dn']);//$value["description"][0];
}
}