X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=gosa-core%2Finclude%2Fclass_CopyPasteHandler.inc;h=4d6fb1ddb04928d4e27061661fa2e7dfc6607ba6;hb=c24abf1e4216c3cea0eff19346e6c7da1a346e47;hp=c7367c5b943189692db38463f05e96d298766b19;hpb=be76f0dc781ae6d982e92e39b10fb91ca4c7cf6b;p=gosa.git
diff --git a/gosa-core/include/class_CopyPasteHandler.inc b/gosa-core/include/class_CopyPasteHandler.inc
index c7367c5b9..4d6fb1ddb 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 {
@@ -61,9 +61,9 @@ class CopyPasteHandler {
* array['tab_class'] - Tab object that should be used to initialize the new object
* array['tab_object'] - Tab object name used to initialize correct object Type like USERTABS
*/
- function add_to_queue($dn,$action,$tab_class,$tab_object,$tab_acl_category)
+ function add_to_queue($dn,$action,$tab_class,$tab_object,$tab_acl_category,&$parent = NULL)
{
- if(!class_exists($tab_class)){
+ if(!class_available($tab_class)){
trigger_error(sprintf("Specified class object '%s' does not exists.",$tab_class));
return(FALSE);
}
@@ -86,6 +86,7 @@ class CopyPasteHandler {
$tmp['tab_class'] = $tab_class;
$tmp['tab_object']= $tab_object;
$tmp['tab_acl_category']= $tab_acl_category;
+ $tmp['parent'] = $parent;
$this->queue[] = $tmp;
$this->require_update = TRUE;
}
@@ -111,19 +112,19 @@ class CopyPasteHandler {
/* Create patch if it doesn't exists */
if(!is_dir(LDAP_DUMP_PATH)){
@mkdir(LDAP_DUMP_PATH);
+
+ /* Update folder permissions */
+ if(!@chmod(LDAP_DUMP_PATH,0700)){
+ $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);
+ }
}
-
- /* Update folder permissions */
- if(!@chmod(LDAP_DUMP_PATH,0700)){
- $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);
- }
/* check if we are able to create a new file the given directory */
if(!is_writeable(LDAP_DUMP_PATH)){
- $msg= _("Copy and paste failed!")."
"._("Error").": ".msgPool::cannotWrite(LDAP_DUMP_PATH)."";
+ $msg= _("Copy and paste failed!")."