From: hickert Date: Wed, 17 Oct 2007 12:56:57 +0000 (+0000) Subject: Updated multiple edit X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=e0629ce8348953810b585ffca15625943f83a6f0;p=gosa.git Updated multiple edit git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7585 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/include/class_tabs.inc b/include/class_tabs.inc index c7be1b784..036d42d42 100644 --- a/include/class_tabs.inc +++ b/include/class_tabs.inc @@ -53,7 +53,6 @@ class tabs $this->multiple_entries = TRUE; } - foreach ($data as &$tab){ /* Check we want to handle multiple obejcts at once @@ -270,19 +269,24 @@ class tabs function save($ignore_account= FALSE) { - /* Save all plugins */ - foreach ($this->by_object as $key => &$obj){ - @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__, - $key, "Saving"); + if($this->multiple_entries){ + echo "Save is not supported for multiple entries yet"; - $obj->dn= $this->dn; + }else{ + /* Save all plugins */ + foreach ($this->by_object as $key => &$obj){ + @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__, + $key, "Saving"); - if ($obj->is_account || $ignore_account || $obj->ignore_account){ - if ($obj->save() == 1){ - return (1); + $obj->dn= $this->dn; + + if ($obj->is_account || $ignore_account || $obj->ignore_account){ + if ($obj->save() == 1){ + return (1); + } + } else { + $obj->remove_from_parent(); } - } else { - $obj->remove_from_parent(); } } return (0); @@ -337,7 +341,7 @@ class tabs function addSpecialTabs() { - if(!is_array($this->dn)){ + if(!$this->multiple_entries){ $this->by_name['acl']= _("ACL"); $this->by_object['acl']= new acl($this->config, $this, $this->dn); $this->by_object['acl']->parent= &$this; diff --git a/plugins/admin/users/tabs_user.inc b/plugins/admin/users/tabs_user.inc index b67882fa0..97c60aa1b 100644 --- a/plugins/admin/users/tabs_user.inc +++ b/plugins/admin/users/tabs_user.inc @@ -93,26 +93,29 @@ class usertabs extends tabs function save($ignore_account= FALSE) { - /* Check for new 'dn', in order to propagate the - 'dn' to all plugins */ - $baseobject= $this->by_object['user']; + if(!$this->multiple_entries){ - if ($this->dn != 'new'){ - - $new_dn= $baseobject->new_dn; - if (strtolower($this->dn) != strtolower($new_dn)){ + /* Check for new 'dn', in order to propagate the + 'dn' to all plugins */ + $baseobject= $this->by_object['user']; + + if ($this->dn != 'new'){ + + $new_dn= $baseobject->new_dn; + if (strtolower($this->dn) != strtolower($new_dn)){ - /* Udpate acls */ - $baseobject->update_acls($this->dn,$new_dn); - $baseobject->move($this->dn, $new_dn); - $this->by_object['user']= $baseobject; + /* Udpate acls */ + $baseobject->update_acls($this->dn,$new_dn); + $baseobject->move($this->dn, $new_dn); + $this->by_object['user']= $baseobject; - /* Did we change ourselves? Update ui object. */ - change_ui_dn($this->dn, $new_dn); + /* Did we change ourselves? Update ui object. */ + change_ui_dn($this->dn, $new_dn); + } } - } - $this->dn= $baseobject->new_dn; + $this->dn= $baseobject->new_dn; + } return tabs::save(); } diff --git a/plugins/personal/generic/class_user.inc b/plugins/personal/generic/class_user.inc index 4cec1ec53..bfd6bd462 100644 --- a/plugins/personal/generic/class_user.inc +++ b/plugins/personal/generic/class_user.inc @@ -83,7 +83,7 @@ class user extends plugin /* variables to trigger password changes */ var $pw_storage= "crypt"; - var $last_pw_storage= "unset"; + var $last_pw_storage= "crypt"; var $had_userCertificate= FALSE; var $view_logged = FALSE;