X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=plugins%2Fadmin%2Fapplications%2Fclass_applicationManagement.inc;h=26cb834c5e3b797ea7623a32d59889381ee7a6ad;hb=969b5c3e6fb3643d2b9b77bcb92b7c329f22512b;hp=8924f4382169ffce8f537c61ada935d60ce37cf4;hpb=7051f96d9beec19e62dd0dacf5c4036333e9fcba;p=gosa.git diff --git a/plugins/admin/applications/class_applicationManagement.inc b/plugins/admin/applications/class_applicationManagement.inc index 8924f4382..26cb834c5 100644 --- a/plugins/admin/applications/class_applicationManagement.inc +++ b/plugins/admin/applications/class_applicationManagement.inc @@ -301,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); @@ -315,7 +315,7 @@ class applicationManagement extends plugin $options= ""; foreach ($this->config->idepartments as $key => $value){ if ($appfilter['depselect'] == $key){ - $options.= ""; + $options.= ""; } else { $options.= ""; } @@ -323,39 +323,39 @@ class applicationManagement extends plugin // Managment $listhead = "
". - "  ". - "  ". - "  ". - "  ". - "  ". - "  ". - _("Current base")." ". - "  ". + "  ". + "  ". + "  ". + "  ". + "  ". + "  ". + _("Current base")." ". + "  ". "
"; - $actions = ""; - $actions.= ""; + $actions = ""; + $actions.= ""; // Defining Links $linkopen = "%s"; // image Buttons $editlink = "%s"; - $userimg = "User"; + $userimg = "User"; // Extension images - $applimg = "A"; + $applimg = "A"; // Space - $empty = ""; + $empty = ""; $divlist = new divlist("applicationtabs"); $divlist->SetHeader(array( array("string" => " ", "attach" => "style='text-align:center;width:20px;'"), array("string" => _("Application name")." / "._("Department"), "attach" => "style=''"), - array("string" => _("Actions"), "attach" => "style='width:52px;border-right:0px;text-align:right;'") + array("string" => _("Actions"), "attach" => "style='width:60px;border-right:0px;text-align:right;'") )); @@ -378,7 +378,7 @@ class applicationManagement extends plugin $field1 = array("string" => "department", "attach" => "style='text-align:center;width:20px;'"); $field2 = array("string" => sprintf($linkopen,base64_encode($key),$val), "attach" => "style=''"); - $field3 = array("string" => " ", "attach" => "style='width:52px;border-right:0px;text-align:right;'"); + $field3 = array("string" => " ", "attach" => "style='width:60px;border-right:0px;text-align:right;'"); $divlist->AddEntry(array($field1,$field2,$field3)); } @@ -393,7 +393,7 @@ class applicationManagement extends plugin } $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:52px;border-right:0px;text-align:right;'"); + $field3 = array("string" => preg_replace("/%KEY%/", $key, $actions), "attach" => "style='width:60px;border-right:0px;text-align:right;'"); $divlist->AddEntry(array($field1,$field2,$field3)); } @@ -445,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){ @@ -459,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]; } }