X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=gosa-core%2Finclude%2Fclass_CopyPasteHandler.inc;h=4ceb83a1f76507f088b7a39adcbf07711acce1d8;hb=888516587f0cda06601ab943d2851bfaf5b23578;hp=e18c26b7c1cf37c130d3185a3f3a1d9d402aa80b;hpb=6b08ffcaafe0d9755aca07c6b9f624c3775c2dd0;p=gosa.git
diff --git a/gosa-core/include/class_CopyPasteHandler.inc b/gosa-core/include/class_CopyPasteHandler.inc
index e18c26b7c..4ceb83a1f 100644
--- a/gosa-core/include/class_CopyPasteHandler.inc
+++ b/gosa-core/include/class_CopyPasteHandler.inc
@@ -20,7 +20,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-define("LDAP_DUMP_PATH","/tmp/gosa");
+define("LDAP_DUMP_PATH","/var/cache/gosa/tmp");
class CopyPasteHandler {
@@ -63,7 +63,7 @@ class CopyPasteHandler {
*/
function add_to_queue($dn,$action,$tab_class,$tab_object,$tab_acl_category)
{
- if(!class_exists($tab_class)){
+ if(!class_available($tab_class)){
trigger_error(sprintf("Specified class object '%s' does not exists.",$tab_class));
return(FALSE);
}
@@ -115,7 +115,7 @@ class CopyPasteHandler {
/* 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= sprintf(_("Copy and paste failed!")."
"._("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);
@@ -123,7 +123,7 @@ class CopyPasteHandler {
/* 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::cannotWrite(LDAP_DUMP_PATH)."";
msg_dialog::display(_("Configuration error"), $msg, ERROR_DIALOG);
new log("copy","all/all","copy & paste, event queue.",array(), $msg);
return(FALSE);
@@ -155,7 +155,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);
@@ -172,7 +172,7 @@ 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);
@@ -180,7 +180,7 @@ class CopyPasteHandler {
/* Update folder permissions */
if(!@chmod(LDAP_DUMP_PATH,0700)){
- $msg= sprintf(_("Cannot save LDAP dump: setting permissions for '%s' failed!"),LDAP_DUMP_PATH);
+ $msg= sprintf(_("Copy and paste failed!")."
"._("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);
@@ -189,7 +189,7 @@ class CopyPasteHandler {
/* 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!")."