index bc1012c97fb367fb1992db9485ea730845d8c4c1..1a5db9bca3162789803ffcf7918338b605357f0f 100644 (file)
var $member= array();
var $orig_dn= "";
var $group_dialog= FALSE;
+ var $view_logged = FALSE;
/* attribute list for save action */
var $attributes= array("cn", "description", "gosaGroupObjects","member");
if (isset($this->attrs['member'])){
foreach ($this->attrs['member'] as $key => $value){
if ("$key" != "count"){
+ $value= @LDAP::convert($value);
$this->member["$value"]= "$value";
}
}
function execute()
{
- /* Call parent execute */
- plugin::execute();
+ /* Call parent execute */
+ plugin::execute();
+
+ if(!$this->view_logged){
+ $this->view_logged = TRUE;
+ new log("view","ogroups/".get_class($this),$this->dn);
+ }
-// $this->reload();
/* Do we represent a valid group? */
if (!$this->is_account){
foreach ($input as $key => $value){
/* Generate output */
- $temp.= "<option value=\"$key\" class=\"select\" style=\"background-image:url('".get_template_path("images/".$conv[$value['type']])."');\">".$value['text']."</option>\n";
+ $temp.= "<option title='".addslashes( $key)."' value=\"$key\" class=\"select\" style=\"background-image:url('".get_template_path("images/".$conv[$value['type']])."');\">".$value['text']."</option>\n";
}
return ($temp);
$this->attrs['member']= array();
}
$mode= "modify";
+
} else {
$mode= "add";
$ldap->cd($this->config->current['BASE']);
$this->cleanup();
$ldap->$mode($this->attrs);
+ if($mode == "add"){
+ new log("create","ogroups/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+ }else{
+ new log("modify","ogroups/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+ }
+
/* Trigger post signal */
$this->handle_post_events($mode);
$ldap->rmdir($this->dn);
show_ldap_error($ldap->get_error(), sprintf(_("Removing of object group/generic with dn '%s' failed."),$this->dn));
+ new log("remove","ogroups/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+
/* Trigger remove signal */
$this->handle_post_events("remove");
}
+
+ function PrepareForCopyPaste($source)
+ {
+ /* Update available object types */
+ if(isset($source['gosaGroupObjects'][0])){
+ $this->gosaGroupObjects = $source['gosaGroupObjects'][0];
+ }
+
+ /* Reload tabs */
+ $this->parent->reload($this->gosaGroupObjects );
+
+ /* Reload plugins */
+ foreach($this->parent->by_object as $name => $class ){
+ if(get_class($this) != $name) {
+ $this->parent->by_object[$name]->PrepareForCopyPaste($source);
+ }
+ }
+
+ /* Load member objects */
+ if (isset($source['member'])){
+ foreach ($source['member'] as $key => $value){
+ if ("$key" != "count"){
+ $value= @LDAP::convert($value);
+ $this->member["$value"]= "$value";
+ }
+ }
+ }
+
+ }
+
function getCopyDialog()
{