diff --git a/plugins/admin/groups/class_groupApplication.inc b/plugins/admin/groups/class_groupApplication.inc
index edc3239b34d1a8465448bdaa888a90dc36caa1f2..b66f40e85ddb5c5ea2e86062735be8bc845e06d0 100644 (file)
$this->InitialFAIrelease = $this->FAIrelease;
$this->Releases = $this->getReleases();
}
+
+ if($this->is_account){
+ @log::log("view","groups/".get_class($this),$this->dn);
+ }
}
}
/* Check if category was selected */
- if((isset($_GET['act']))&&($_GET['act']=="open") && isset($this->Categories[base64_decode($_GET['id'])])){
+ if((isset($_GET['act']))&&($_GET['act']=="open") && (empty($_GET['id']) || isset($this->Categories[base64_decode($_GET['id'])]))){
$this->curCatDir = base64_decode($_GET['id']);
}
}
}
+ /* Add multiple */
+ if(isset($_POST['AddApps'])){
+ foreach($_POST as $name => $value){
+ if(preg_match("/AddApp_/",$name)){
+ $app = preg_replace("/AddApp_/","",$name);
+ $this->addApp($app);
+ }
+ }
+ }
+
/* Add application with post */
if((isset($_GET['act']))&&($_GET['act']=="add")){
$this->used_apps[$_GET['id']]= $_GET['id'];
$departments = array();
$res = get_list("(objectClass=gosaDepartment)", "application", $this->curbase,array("description","cn","ou"),GL_SIZELIMIT);
foreach($res as $value){
- $fdn= @LDAP::fix(str_replace($this->curbase,"",$value['dn']));
+ $fdn = $value['dn'];
+ $fdn = preg_replace("/".normalizePreg($this->curbase)."/","",$fdn);
+ $fdn= @LDAP::fix($fdn);
if($value["description"][0]!=".."){
$departments[$value['dn']]= convert_department_dn($fdn)." - [".$value["description"][0]."]";
}else{
/* release managent is active
*/
if(!$this->enableReleaseManagement){
- $image = "<img class='center' src='images/select_invalid_application.png'
+ $image = "<img class='center' alt='R' src='images/select_invalid_application.png'
title='"._("This application is no longer available.")."'> ";
}else{
- $image = "<img class='center' src='images/select_invalid_application.png'
- title='".sprintf(_("This application is not available in any release named %s."),$this->FAIrelease)."'> ";
+ $image = "<img class='center' alt='F' src='images/select_invalid_application.png'
+ title=\"".sprintf(_("This application is not available in any release named %s."),$this->FAIrelease)."\"> ";
}
}elseif(isset($Differences[$entry['App']]) && ($Differences[$entry['App']] == true)) {
$this->cleanup();
$ldap->modify ($this->attrs);
-
+ @log::log("remove","group/".get_class($this),$use_dn,array_keys($this->attrs),$ldap->get_error());
show_ldap_error($ldap->get_error(), sprintf(_("Removing of groups/applications with dn '%s' failed."),$this->dn));
/* Optionally execute a command after we're done */
$this->cleanup();
$ldap->modify ($this->attrs);
+ if($this->initially_was_account){
+ @log::log("modify","group/".get_class($this),$use_dn,array_keys($this->attrs),$ldap->get_error());
+ }else{
+ @log::log("create","group/".get_class($this),$use_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));
/* Optionally execute a command after we're done */
/* Special handling for release managed apps */
$tmp = search_config($this->config->data,"faiManagement","CLASS");
- if(!empty($tmp)){
+ if(!empty($tmp) && count($this->Releases)){
$this->enableReleaseManagement = true;
/* Check if release is available */
}
/* Get all apps ... */
- $res = get_list("objectClass=gosaApplication","application",$this->config->current['BASE'],array("gosaApplicationParameter","cn"));
+ $res = get_list("objectClass=gosaApplication","application",$this->config->current['BASE'],array("gosaApplicationParameter","cn"),GL_SUBSEARCH);
$tmp = search_config($this->config->data,"faiManagement","CLASS");
$this->AllAppsForRelease = array();
if(!empty($tmp)){
}
+ function PrepareForCopyPaste($source)
+ {
+ $this->FAIrelease = $this->InitialFAIrelease = $source->FAIrelease;
+ $this->gosaMemberApplication = $source->gosaMemberApplication;
+ $this->appoption = $source->appoption;
+ }
+
+
/* Return plugin informations for acl handling */
function plInfo()
{