index eb152e1e12b1b3a573493ba9660cf041cf0af979..a05c6a1c0de4fbb3195d818ada9e9cd70fd6ec28 100644 (file)
var $attributes = array("gotoMode","gotoSyslogServer", "gotoNtpServer");
var $objectclasses = array("gotoWorkstationTemplate");
var $CopyPasteVars = array("gotoNtpServers","modes","inheritTimeServer","members");
var $attributes = array("gotoMode","gotoSyslogServer", "gotoNtpServer");
var $objectclasses = array("gotoWorkstationTemplate");
var $CopyPasteVars = array("gotoNtpServers","modes","inheritTimeServer","members");
+ var $view_logged = FALSE;
+
function termgroup ($config, $dn= NULL, $parent= NULL)
{
function termgroup ($config, $dn= NULL, $parent= NULL)
{
unset($this->gotoNtpServers[$key]);
}
}
unset($this->gotoNtpServers[$key]);
}
}
-
-
}
function check()
}
function check()
$ldap->cd($this->orig_dn);
$ldap->modify($this->attrs);
$this->handle_post_events("remove");
$ldap->cd($this->orig_dn);
$ldap->modify($this->attrs);
$this->handle_post_events("remove");
+ @log::log("remove","ogroups/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
}
}
{
/* Get required informations */
$og = $this->parent->by_object['ogroup'];
{
/* Get required informations */
$og = $this->parent->by_object['ogroup'];
- $allobs = $og->allobjects;
+ $allobs = $og->objcache;
/* Get correct value for FAIstate */
$action = $this->mapActions[$act];
/* Get correct value for FAIstate */
$action = $this->mapActions[$act];
$ldap->cd ($this->config->current['BASE']);
/* Foreach member of mthis ogroup ... */
$ldap->cd ($this->config->current['BASE']);
/* Foreach member of mthis ogroup ... */
- foreach($og->mem as $key ){
+ foreach($og->member as $key ){
/* check objectClasses and create attributes array */
$attrs = array("FAIstate"=>$action);
/* check objectClasses and create attributes array */
$attrs = array("FAIstate"=>$action);
$ldap->cd ($key);
$ldap->modify($attrs);
show_ldap_error($ldap->get_error(),sprintf(_("Setting action state (FAIstate) failed for object '%s', value was '%s'."),$key,$action));
$ldap->cd ($key);
$ldap->modify($attrs);
show_ldap_error($ldap->get_error(),sprintf(_("Setting action state (FAIstate) failed for object '%s', value was '%s'."),$key,$action));
-
- if(!preg_match("/success/i",$ldap->get_error())) {
- gosa_log("FAILED !! Updating FAIstate to '".$action."' : ".$key);
- }else{
- gosa_log("OK. Updating FAIstate to '".$action."' : ".$key);
- }
}
}
}
}
}
}
/* Call parent execute */
plugin::execute();
/* Call parent execute */
plugin::execute();
+ if(!$this->view_logged){
+ $this->view_logged = TRUE;
+ @log::log("view","ogroups/".get_class($this),$this->dn);
+ }
/***************
Handle requested action
/***************
Handle requested action
$this->cleanup();
$ldap->modify ($this->attrs);
$this->cleanup();
$ldap->modify ($this->attrs);
+ if($this->initially_was_account){
+ @log::log("modify","ogroups/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+ }else{
+ @log::log("create","ogroups/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+ }
+
if(!$this->didAction){
$this->handle_post_events("modify");
}
if(!$this->didAction){
$this->handle_post_events("modify");
}