"._("Error").": "._("Cannot set permission for '%s'")."" ,LDAP_DUMP_PATH);
+ msg_dialog::display(_("Configuration error"), $msg, ERROR_DIALOG);
+ new log("copy","all/all","copy & paste, event queue.",array(), $msg);
+ return(FALSE);
+ }
}
-
- /* Update folder permissions */
- if(!@chmod(LDAP_DUMP_PATH,0700)){
- $msg= sprintf(_("Cannot cleanup copy & paste queue: setting permissions for '%s' failed!"),LDAP_DUMP_PATH);
- msg_dialog::display(_("Configuration error"), $msg, ERROR_DIALOG);
- new log("copy","all/all","copy & paste, event queue.",array(), $msg);
- return(FALSE);
- }
/* check if we are able to create a new file the given directory */
if(!is_writeable(LDAP_DUMP_PATH)){
- $msg= sprintf(_("Cannot cleanup copy & paste queue: no write permission inside '%s'!"),LDAP_DUMP_PATH);
+ $msg= _("Copy and paste failed!")."
"._("Error").": ".msgPool::cannotWriteFile(LDAP_DUMP_PATH)."";
msg_dialog::display(_("Configuration error"), $msg, ERROR_DIALOG);
new log("copy","all/all","copy & paste, event queue.",array(), $msg);
return(FALSE);
@@ -135,7 +156,7 @@ class CopyPasteHandler {
/* Check if given dn is valid and ldap search was succesfull */
if(!$res){
- $msg= sprintf(_("Copy and paste failed: object '%s' is not a valid ldap object!"), LDAP::fix($dn));
+ $msg= sprintf(_("Copy and paste failed!")."
"._("Error").": "._("'%s' is no vaild LDAP object"), LDAP::fix($dn));
msg_dialog::display(_("Internal error"), $msg, ERROR_DIALOG);
new log("copy","all/all",$dn,array(), $msg);
return(FALSE);
@@ -152,29 +173,29 @@ class CopyPasteHandler {
/* check if we are able to create a new file the given directory */
if(!is_writeable($path)){
- $msg= sprintf(_("Cannot save LDAP dump: no write permission inside '%s'!"),LDAP_DUMP_PATH);
+ $msg= sprintf(_("Copy and paste failed!")."
"._("Error").": "._("No write permission in '%s'"),LDAP_DUMP_PATH);
msg_dialog::display(_("Configuration error"), $msg, ERROR_DIALOG);
new log("copy","all/all",$dn,array(), $msg);
return(FALSE);
}
- /* Update folder permissions */
- if(!@chmod(LDAP_DUMP_PATH,0700)){
- $msg= sprintf(_("Cannot save LDAP dump: setting permissions for '%s' failed!"),LDAP_DUMP_PATH);
- msg_dialog::display(_("Configuration error"), $msg, ERROR_DIALOG);
- new log("copy","all/all","copy & paste, event queue.",array(), $msg);
- return(FALSE);
- }
-
/* Create file handle */
$fp = @fopen($path."/".$filename,"w+");
if(!$fp){
- $msg= sprintf(_("Cannot save LDAP dump: no write permission to '%s/%s'!"),$path,$filename);
+ $msg= _("Copy and paste failed!")."