by_object as $name => $object){ if($object instanceOf department){ $this->base_name = get_class($object); break; } } /* Add references/acls/snapshots */ $this->addSpecialTabs(); if(isset($this->by_object['acl'])){ $this->by_object['acl']->skipTagging= TRUE; } } function check($ignore_account= FALSE) { return (tabs::check(TRUE)); } function save($ignore_account= FALSE) { $baseobject= &$this->by_object[$this->base_name]; $namingAttr = $baseobject->namingAttr; $nAV = preg_replace('/,/', '\,', $baseobject->$namingAttr); $nAV = preg_replace('/"/', '\"', $nAV); $new_dn = @LDAP::convert($namingAttr.'='.$nAV.','.$baseobject->base); /* Move group? */ if ($this->dn != $new_dn && $this->dn != "new"){ $baseobject->move($this->dn,$new_dn); } /* Update department cache. */ if($this->dn != $new_dn){ global $config; $config->get_departments(); } $this->dn= $new_dn; $baseobject->dn= $this->dn; if (!$ignore_account){ tabs::save(TRUE); } } } // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: ?>