diff --git a/plugins/admin/mimetypes/class_mimetypeGeneric.inc b/plugins/admin/mimetypes/class_mimetypeGeneric.inc
index 882c2b8625551f1e8eea9a3a4109972eec20fac3..e7585c90b44a1c5551795b8774f10673367c4637 100644 (file)
if(!$this->view_logged){
$this->view_logged =TRUE;
- @log::log("view","mimetypes/".get_class($this),$this->dn);
+ new log("view","mimetypes/".get_class($this),$this->dn);
}
$tmp = $this->plInfo();
$ldap->cd($this->dn);
$this->cleanup();
$ldap->modify($this->attrs);
- @log::log("modify","mimetypes/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+ new log("modify","mimetypes/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
}else{
$ldap->create_missing_trees(preg_replace('/^[^,]+,/', '', $this->dn));
$ldap->cd($this->dn);
$ldap->add($this->attrs);
- @log::log("create","mimetypes/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+ new log("create","mimetypes/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
}
show_ldap_error($ldap->get_error(), sprintf(_("Saving of mime type/generic with dn '%s' failed."),$this->dn));
}
$ldap = $this->config->get_ldap_link();
$ldap->rmDir($this->dn);
show_ldap_error($ldap->get_error(), sprintf(_("Removing of mime type/generic with dn '%s' failed."),$this->dn));
- @log::log("remove","mimetypes/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+ new log("remove","mimetypes/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
/* Optionally execute a command after we're done */
$this->handle_post_events("remove");
function PrepareForCopyPaste($source)
{
plugin::PrepareForCopyPaste($source);
- $this->gotoMimeIcon = $this->iconData;
- $this->use_gotoMimeIcon = $source->use_gotoMimeIcon;
+
+ $source_o = new mimetype($this->config,$source['dn'],$this->parent);
+
+ foreach(array("gotoMimeLeftClickAction_Q","gotoMimeEmbeddedApplication","gotoMimeApplication","gotoMimeFilePattern","gotoMimeIcon","iconData") as $name){
+ $use_attr = "use_".$name;
+ if(isset($this->$use_attr)){
+ $this->$use_attr= $source_o->$use_attr;
+ }
+ $this->$name = $source_o->$name;
+ }
+ foreach($this->attributes as $name){
+ $this->$name = $source_o->$name;
+ }
+
+ if($this->iconData){
+ $this->use_gotoMimeIcon ="Not emtpy, causes icon to be written.";
+ }
}
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: