diff --git a/plugins/admin/applications/class_applicationManagement.inc b/plugins/admin/applications/class_applicationManagement.inc
index fb4d3f98d939e1233926c77a08caceab1682ebb4..3be16fae584810def87323b9137a938d1b53f213 100644 (file)
$s_action="open";
$s_entry = base64_decode($_GET['dep_id']);
$appfilter['depselect']= "".$this->config->departments[trim($s_entry)];
- $this->reload();
}
/* Test Posts */
/* Department changed? */
if(isset($_POST['depselect']) && $_POST['depselect']){
$appfilter['depselect']= $_POST['depselect'];
- $this->reload();
}
/* Homebutton is posted */
if($s_action=="home"){
$appfilter['depselect']=(preg_replace("/^[^,]+,/","",$this->ui->dn));
$appfilter['depselect']=(preg_replace("/^[^,]+,/","",$appfilter['depselect']));
- $this->reload();
}
if($s_action=="root"){
$appfilter['depselect']=($this->config->current['BASE']);
- $this->reload();
}
/* If Backbutton is Posted */
}else{
$appfilter['depselect']= $this->config->departments["/"];
}
- $this->reload();
}
if (isset($_POST['regex'])){
register_global("appfilter", $appfilter);
/* Check sorting variable */
- if (!isset($this->apptabs) &&
- !isset($_POST['new_app']) &&
- !isset($_POST['delete_app']) &&
- !isset($_POST['select_app'])){
- $this->reload();
- }
+ $this->reload();
$smarty= get_smarty();
/* Check for exeeded sizelimit */
$empty = "<img src='images/empty.png' style='width:16px;height:16px;' alt=''>";
- $divlist = new divlist();
+ $divlist = new divlist("applicationtabs");
$divlist->SetHeader(array(
array("string" => ""),
array("string" => _("Application name")." / "._("Department")),
foreach($this->departments as $key=> $val){
- $field1 = array("string" => "<img src='images/folder.png' alt='department'>");
+ if(!isset($this->config->departments[trim($key)])){
+ $this->config->departments[trim($key)]="";
+ }
+
+ $non_empty="";
+ $keys= str_replace("/","\/",$key);
+ foreach($this->config->departments as $keyd=>$vald ){
+ if(preg_match("/".$keys."\/.*/",$keyd)){
+ $non_empty="full";
+ }
+ }
+
+ $field1 = array("string" => "<img src='images/".$non_empty."folder.png' alt='department'>");
$field2 = array("string" => sprintf($linkopen,base64_encode($key),$val));
$field3 = array("string" => " ","attach"=>"style='text-align:right;border:none'");
} else {
$regex= "*";
}
-
+
/* Generate application list */
- $res= get_list($this->ui->subtreeACL, "(&(cn=$regex)(objectClass=gosaApplication))", TRUE, $base, array("*"), TRUE);
+ $res= get_list($this->ui->subtreeACL, "(&(cn=$regex)(objectClass=gosaApplication))", FALSE, "ou=apps,".$base, array("*"), TRUE);
$this->applications= array();
foreach ($res as $value){
$this->applications[]= $value;