summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 03b7c74)
raw | patch | inline | side by side (parent: 03b7c74)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 21 Jun 2007 13:36:21 +0000 (13:36 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 21 Jun 2007 13:36:21 +0000 (13:36 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6659 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/groups/class_groupApplication.inc | patch | blob | history | |
plugins/admin/ogroups/tabs_ogroups.inc | patch | blob | history |
diff --git a/plugins/admin/groups/class_groupApplication.inc b/plugins/admin/groups/class_groupApplication.inc
index 3468c735a00275f282a76ddc53bcbc627d91bad2..c774568645da6706865d3da69877a8a92e7d351f 100644 (file)
/* Show main page */
if ($this->dialog){
$smarty->assign("table", $this->table);
- $display.= $smarty->fetch (get_template_path('application_options.tpl', TRUE));
+ $display.= $smarty->fetch (get_template_path('application_options.tpl', TRUE,dirname(__FILE__)));
} else {
- $display.= $smarty->fetch (get_template_path('application.tpl', TRUE));
+ $display.= $smarty->fetch (get_template_path('application.tpl', TRUE,dirname(__FILE__)));
}
return ($display);
$ret =array();
foreach($res as $attrs){
- if(preg_match("/ou=fai,/",$attrs['dn'])){
- $bb = preg_replace("/ou=fai,.*/","",$attrs['dn']);
+ if(preg_match("/ou=apps,/",$attrs['dn'])){
+ $bb = preg_replace("/ou=apps,.*/","",$attrs['dn']);
$parts = array_reverse(split("ou=",$bb));
$str ="";
$ldap->modify ($this->attrs);
if($this->initially_was_account){
- new log("modify","group/".get_class($this),$use_dn,array_keys($this->attrs),$ldap->get_error());
+ new log("modify","group/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
}else{
- new log("create","group/".get_class($this),$use_dn,array_keys($this->attrs),$ldap->get_error());
+ new log("create","group/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
}
show_ldap_error($ldap->get_error(), sprintf(_("Saving of groups/applications with dn '%s' failed."),$this->dn));
index 1e2c75fb50e87bcba273027849ead9c4112d5362..7575a134e1b0ef18ae7aaa0b513f5a57b0c12408 100644 (file)
}
}
+ /* Add application tab if user or group is member in this object group*/
+ if((preg_match("/G/",$objects) || preg_match("/U/",$objects)) && !isset($this->by_name['appgroup'])){
+ $this->by_name['appgroup']= _("Application");
+ $this->by_object['appgroup']= new appgroup($this->config, $this->dn);
+ $this->by_object['appgroup']->acl = "#all#";
+ $this->by_object['appgroup']->parent= &$this;
+ }
+
+ /* Remove application tab if not required any longer */
+ if(!preg_match("/G/",$objects) && !preg_match("/U/",$objects) && isset($this->by_name['appgroup'])){
+ $this->by_object['appgroup']->remove_from_parent();
+ unset($this->by_name['appgroup']);
+ unset($this->by_object['appgroup']);
+ }
+
/* Move reference tab to second position from right */
if(isset($this->by_name['acl'])){
$tmp = $this->by_name['acl'];