index 8545c60a997afb8d7ceb7b3c2bbc1cd4c9627b1f..397557ed5d35b546eb765742cd2db493d5f173b3 100644 (file)
class grouptabs extends tabs
{
- function grouptabs($config, $data, $dn)
- {
- tabs::tabs($config, $data, $dn);
- }
+ function grouptabs($config, $data, $dn)
+ {
+ tabs::tabs($config, $data, $dn);
+ $baseobject= $this->by_object['group'];
+ foreach ($this->by_object as $name => $obj){
+ if(isset($obj->parent)){
+ $this->by_object[$name]->parent = $this;
+ }
+ }
- function save_object($save_current= FALSE)
- {
- tabs::save_object($save_current);
+ /* Add references/acls/snapshots */
+ $this->addSpecialTabs();
+ }
- /* Update reference, transfer variables */
- $baseobject= $this->by_object['group'];
- foreach ($this->by_object as $name => $obj){
- /* Don't touch base object */
- if ($name != 'group'){
- $obj->parent= &$this;
- $obj->cn= $baseobject->cn;
- $this->by_object[$name]= $obj;
- }
- }
- }
+ function save_object($save_current= FALSE)
+ {
+ tabs::save_object($save_current);
- function save()
- {
- $baseobject= $this->by_object['group'];
+ /* Update reference, transfer variables */
+ $baseobject= $this->by_object['group'];
+ foreach ($this->by_object as $name => $obj){
+ /* Don't touch base object */
+ if ($name != 'group'){
+ $obj->parent= &$this;
+ $obj->cn= $baseobject->cn;
+ $this->by_object[$name]= $obj;
+ }
+ }
+ }
- /* Check for new 'dn', in order to propagate the
- 'dn' to all plugins */
- $new_dn= 'cn='.$baseobject->cn.','.get_groups_ou().$baseobject->base;
+ function save()
+ {
+ $baseobject= $this->by_object['group'];
- /* Put baseobjects 'cn' to mailobjects 'uid' */
- if (isset($this->by_object['mailgroup'])){
- $this->by_object['mailgroup']->uid= $baseobject->cn;
- }
+ /* Check for new 'dn', in order to propagate the
+ 'dn' to all plugins */
+ $new_dn= 'cn='.$baseobject->cn.','.get_groups_ou().$baseobject->base;
+ /* Put baseobjects 'cn' to mailobjects 'uid' */
+ if (isset($this->by_object['mailgroup'])){
+ $this->by_object['mailgroup']->uid= $baseobject->cn;
+ }
- /* Update reference, transfer variables */
- foreach ($this->by_object as $name => $obj){
- /* Transfer attributes for mailgroup account */
- if ($name == 'mailgroup'){
- $obj->members= $baseobject->memberUid;
- $this->by_object['mailgroup']= $obj;
- }
- }
- /* Move group? */
- if ($this->dn != $new_dn){
+ /* Update reference, transfer variables */
+ foreach ($this->by_object as $name => $obj){
+ /* Transfer attributes for mailgroup account */
+ if ($name == 'mailgroup'){
+ $this->by_object['mailgroup']->members= $baseobject->memberUid;;
+ }
+ }
+
+ /* Move group? */
+ if ($this->dn != $new_dn){
+
+ /* Write entry on new 'dn' */
+ if ($this->dn != "new"){
+ $baseobject->move($this->dn, $new_dn);
+ $this->by_object['group']= $baseobject;
+ }
- /* Write entry on new 'dn' */
- if ($this->dn != "new"){
- $baseobject->move($this->dn, $new_dn);
- $this->by_object['group']= $baseobject;
+ /* Happen to use the new one */
+ $this->dn= $new_dn;
}
- /* Happen to use the new one */
- $this->dn= $new_dn;
- }
+ $ret= tabs::save();
+
+ /* Fix tagging if needed */
+ $baseobject->dn= $new_dn;
+ $baseobject->handle_object_tagging();
- return tabs::save();
- }
+ return $ret;
+ }
+ function saveCopyDialog()
+ {
+ tabs::saveCopyDialog();
+
+ /* Update reference, transfer variables */
+ $baseobject= $this->by_object['group'];
+ foreach ($this->by_object as $name => $obj){
+ /* Don't touch base object */
+ if ($name != 'group'){
+ $obj->parent= &$this;
+ $obj->cn= $baseobject->cn;
+ $this->by_object[$name]= $obj;
+ }
+ }
+ }
+
}
?>