Code

Fixed locking for object groups
[gosa.git] / gosa-core / plugins / admin / ogroups / class_ogroupManagement.inc
1 <?php
2 /*
3  * This code is part of GOsa (http://www.gosa-project.org)
4  * Copyright (C) 2003-2008 GONICUS GmbH
5  *
6  * ID: $$Id$$
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
21  */
23 class ogroupManagement extends plugin
24 {
25   /* Definitions */
26   var $plHeadline= "Object groups";
27   var $plDescription= "Manage object groups";
29   /* attribute list for save action */
30   var $attributes= array();
31   var $objectclasses= array();
32   var $obtypes= array();
33   var $ogroup;
35   var $CopyPasteHandler = NULL;
36   var $DivListOGroup    = NULL;
37   var $start_pasting_copied_objects = FALSE;
39   var $dns = array();
41   function ogroupManagement (&$config, $dn= NULL)
42   {
43     /* Include config object */
44     $this->config= &$config;
45     $this->ui= get_userinfo();
47     /* Copy & Paste enabled ?
48      */
49     if((isset($this->config->data['MAIN']['ENABLECOPYPASTE']))&&(preg_match("/true/i",$this->config->data['MAIN']['ENABLECOPYPASTE'] ))){
50       $this->CopyPasteHandler = new CopyPasteHandler($this->config);
51     }
53     /* Div lsit management */
54     $this->DivListOGroup = new divListOGroup($this->config,$this);
55   }
57   function execute()
58   {
59     /* Call parent execute */
60     plugin::execute();
62     /****************
63       Variable intialisation && Check posts for commands  
64      ****************/
66     session::set('LOCK_VARS_TO_USE',array("/^act$/","/^id$/","/^group_edit_/","/^group_del_/","/^item_selected/","/^remove_multiple_ogroups/","/^menu_action/"));
68     $smarty     = get_smarty();
69     $s_action   = "";
70     $s_entry    = "";
72     /* Test Posts */
73     foreach($_POST as $key => $val){
74       // Post for delete
75       if(preg_match("/^group_del.*/",$key)){
76         $s_action = "del";
77         $s_entry  = preg_replace("/^group_".$s_action."_/i","",$key);
78         // Post for edit
79       }elseif(preg_match("/^group_edit_.*/",$key)){
80         $s_action="edit";
81         $s_entry  = preg_replace("/^group_".$s_action."_/i","",$key);
82         // Post for new
83       }elseif(preg_match("/^group_new.*/",$key)){
84         $s_action="new";
85       }elseif(preg_match("/^editPaste.*/i",$key)){
86         $s_action="editPaste";
87       }elseif(preg_match("/^copy_.*/",$key)){
88         $s_action="copy";
89         $s_entry  = preg_replace("/^copy_/i","",$key);
90       }elseif(preg_match("/^cut_.*/",$key)){
91         $s_action="cut";
92         $s_entry  = preg_replace("/^cut_/i","",$key);
93       }elseif(preg_match("/^remove_multiple_ogroups/",$key)){
94         $s_action="del_multiple";
95       }elseif(preg_match("/^multiple_cut_ogroups/",$key)){
96         $s_action = "cut_multiple";
97       }elseif(preg_match("/^multiple_copy_ogroups/",$key)){
98         $s_action = "copy_multiple";
99       }elseif(preg_match("/_group_edit_/",$key)){
100         $type = preg_replace("/_group_edit_.*$/","",$key);
101         $s_action="edit";
102         $s_entry  = preg_replace("/".$type."_group_edit_/i","",$key);
103         $_POST['arg'] = $type;
104       }
105     }
106     $s_entry  = preg_replace("/_.$/","",$s_entry);
108     // Edit if
109     if((isset($_GET['act']))&&($_GET['act']=="edit_entry")){
110       $s_action ="edit";
111       $s_entry  = $_GET['id'];
112     }
116     /* handle C&P from layers menu */
117     if(isset($_POST['menu_action']) && preg_match("/^multiple_copy_systems/",$_POST['menu_action'])){
118       $s_action = "copy_multiple";
119     }
120     if(isset($_POST['menu_action']) && preg_match("/^multiple_cut_systems/",$_POST['menu_action'])){
121       $s_action = "cut_multiple";
122     }
123     if(isset($_POST['menu_action']) && preg_match("/^editPaste/",$_POST['menu_action'])){
124       $s_action = "editPaste";
125     }
127     /* Create options */
128     if(isset($_POST['menu_action']) && $_POST['menu_action'] == "group_new"){
129       $s_action = "new";
130     }
132     /* handle remove from layers menu */
133     if(isset($_POST['menu_action']) && preg_match("/^remove_multiple/",$_POST['menu_action'])){
134       $s_action = "del_multiple";
135     }
137     /* Hanlde notification event requests */
138     if(isset($_POST['menu_action']) && preg_match("/^event/",$_POST['menu_action'])){
139       $s_action = $_POST['menu_action'];
140     }
143     /********************
144       Create notification event
145      ********************/
147     if(preg_match("/^event_/",$s_action) && class_available("DaemonEvent")){
148       $ids = $this->list_get_selected_items();
149       $uids = array();
150       foreach($ids as $id){
151         $uids[] = $this->ogrouplist[$id]['cn'][0];
152       }
153       if(count($uids)){
154         $events = DaemonEvent::get_event_types(USER_EVENT);
155         $event = preg_replace("/^event_/","",$s_action);
156         if(isset($events['BY_CLASS'][$event])){
157           $type = $events['BY_CLASS'][$event];
158           $this->ogroup = new $type['CLASS_NAME']($this->config);
159           $this->ogroup->add_targets($uids);
160           $this->ogroup->set_type(TRIGGERED_EVENT);
161         }
162       }
163     }
165     /* Abort event dialog */
166     if(isset($_POST['abort_event_dialog'])){
167       $this->ogroup = FALSE;
168     }
170     /* Save event */
171     if(isset($_POST['save_event_dialog'])){
172       $o_queue = new gosaSupportDaemon();
173       $o_queue->append($this->ogroup);
174       if($o_queue->is_error()){
175         msg_dialog::display(_("Infrastructure error"), msgPool::siError($o_queue->get_error()),ERROR_DIALOG);
176       }else{
177         $this->ogroup = FALSE;
178       }
179     }
181     /* Display event */
182     if($this->ogroup instanceof DaemonEvent){
183       $this->ogroup->save_object();
184       return($this->ogroup->execute());
185     }
188     /****************
189       Copy & Paste handling 
190      ****************/
192     /* Display the copy & paste dialog, if it is currently open */
193     $ret = $this->copyPasteHandling_from_queue($s_action,$s_entry);
194     if($ret){
195       return($ret);
196     }
199     /***************
200       Create a new object group 
201      ****************/
203     /* New group? */
204     if ($s_action=="new"){
206       /* By default we set 'dn' to 'new', all relevant plugins will
207          react on this. */
208       $this->dn= "new";
210       /* Create new ogroup- object */
211       $this->ogroup= new ogrouptabs($this->config,$this->config->data['TABS']['OGROUPTABS'], $this->dn,"ogroups");
212       $this->ogroup->set_acl_base($this->DivListOGroup->selectedBase);
213     }
216     /********************
217       Delete MULTIPLE entries requested, display confirm dialog
218      ********************/
219     if ($s_action=="del_multiple"){
220       $ids = $this->list_get_selected_items();
222       if(count($ids)){
223         foreach($ids as $id){
224           $this->dns[$id] = $this->ogrouplist[$id]['dn'];
225         }
227         /* Check locks */
228         if ($user= get_multiple_locks($this->dns)){
229           return(gen_locked_message($user,$this->dns));
230         }
232         $dns_names = array();
233         foreach($this->dns as $dn){
234           $dns_names[] = @LDAP::fix($dn);
235         }
237         add_lock ($this->dns, $this->ui->dn);
239         /* Lock the current entry, so nobody will edit it during deletion */
240         $smarty->assign("info", msgPool::deleteInfo($dns_names,_("object group")));
241         $smarty->assign("multiple", true);
242         return($smarty->fetch(get_template_path('remove.tpl', TRUE)));
243       }
244     }
247     /********************
248       Delete MULTIPLE entries confirmed
249      ********************/
251     /* Confirmation for deletion has been passed. Users should be deleted. */
252     if (isset($_POST['delete_multiple_ogroup_confirm'])){
254       /* Remove user by user and check acls before removeing them */
255       foreach($this->dns as $key => $dn){
257         $acl = $this->ui->get_permissions($dn, "ogroups");
258         if (preg_match('/d/', $acl)){
260           /* Delete request is permitted, perform LDAP action */
261           $this->ogroup= new ogrouptabs($this->config,$this->config->data['TABS']['OGROUPTABS'], $dn);
262           $this->ogroup->delete ();
263           unset ($this->ogroup);
264           $this->ogroup= NULL;
265         } else {
267           /* Normally this shouldn't be reached, send some extra
268              logs to notify the administrator */
269           msg_dialog::display(_("Permission error"), msgPool::permDelete(), INFO_DIALOG);
270           new log("security","ogroups/".get_class($this),$dn,array(),"Tried to trick deletion.");
271         }
272       }
274       /* Remove lock file after successfull deletion */
275       $this->remove_lock();
276       $this->dns = array();
277     }
280     /********************
281       Delete MULTIPLE entries Canceled
282      ********************/
284     /* Remove lock */
285     if(isset($_POST['delete_multiple_ogroup_cancel'])){
287       /* Remove lock file after successfull deletion */
288       $this->remove_lock();
289       $this->dns = array();
290     }
293     /****************
294       Delete object group
295      ****************/
297     if ($s_action=="del"){
299       /* Get 'dn' from posted 'uid' */
300       $this->dn= $this->ogrouplist[$s_entry]['dn'];
302       /* Load permissions for selected 'dn' and check if
303          we're allowed to remove this 'dn' */
304       $acl = $this->ui->get_permissions($this->dn,"ogroups");
305       if(preg_match("/d/",$acl)){
307         /* Check locking, save current plugin in 'back_plugin', so
308            the dialog knows where to return. */
309         if (($user= get_lock($this->dn)) != ""){
310           return(gen_locked_message ($user, $this->dn));
311         }
313         /* Lock the current entry, so nobody will edit it during deletion */
314         add_lock ($this->dn, $this->ui->dn);
315         $smarty->assign("info", msgPool::deleteInfo(@LDAP::fix($this->dn),_("object group")));
316         $smarty->assign("multiple", false);
317         return($smarty->fetch(get_template_path('remove.tpl', TRUE)));
318       } else {
320         /* Obviously the user isn't allowed to delete. Show message and
321            clean session. */
322         msg_dialog::display(_("Permission error"), msgPool::permDelete(), INFO_DIALOG);
323       }
324     }
327     /****************
328       Delete confirmed 
329      ****************/
331     /* Confirmation for deletion has been passed. Group should be deleted. */
332     if (isset($_POST['delete_group_confirm'])){
334       /* Some nice guy may send this as POST, so we've to check
335          for the permissions again. */
336       $acl = $this->ui->get_permissions($this->dn,"ogroups");
337       if(preg_match("/d/",$acl)){
339         /* Delete request is permitted, perform LDAP action */
340         $this->ogroup= new ogrouptabs($this->config,
341             $this->config->data['TABS']['OGROUPTABS'], $this->dn);
342         $this->ogroup->delete ();
343         unset ($this->ogroup);
344         $this->ogroup= NULL;
345       } else {
347         /* Normally this shouldn't be reached, send some extra
348            logs to notify the administrator */
349         msg_dialog::display(_("Permission error"), msgPool::permDelete(), INFO_DIALOG);
350         new log("security","ogroups/".get_class($this),$dn,array(),"Tried to trick deletion.");
351       }
353       /* Remove lock file after successfull deletion */
354       $this->remove_lock();
355       session::un_set('objectinfo');
356     }
359     /****************
360       Delete object group Canceled
361      ****************/
363     /* Delete group canceled? */
364     if (isset($_POST['delete_cancel'])){
365       $this->remove_lock();
366       session::un_set('objectinfo');
367     }
370     /****************
371       Edit group
372      ****************/
374     if (($s_action=="edit") && (! isset($this->ogroup->config)) ){
376       /* Get 'dn' from posted 'uid', must be unique */
377       $this->dn= $this->ogrouplist[$s_entry]['dn'];
379       /* Check locking, save current plugin in 'back_plugin', so
380          the dialog knows where to return. */
381       if (($user= get_lock($this->dn)) != ""){
382         return(gen_locked_message ($user, $this->dn));
383       }
385       /* Lock the current entry, so everyone will get the
386          above dialog */
387       add_lock ($this->dn, $this->ui->dn);
389       /* Register grouptab to trigger edit dialog */
390       $this->ogroup= new ogrouptabs($this->config, $this->config->data['TABS']['OGROUPTABS'], $this->dn, "ogroups");
391       $this->ogroup->set_acl_base($this->dn);
392       session::set('objectinfo',$this->dn);
393     }
396     /****************
397       Edit finished save 
398      ****************/
400     /* Finish button has been pressed */
401     if ((isset($_POST['edit_finish']) || isset($_POST['edit_apply'])) && (isset($this->ogroup->config)) ){
403       /* Check tabs, will feed message array */
404       $message= $this->ogroup->check();
406       /* Save, or display error message? */
407       if (count($message) == 0){
409         /* Save user data to ldap */
410         $this->ogroup->save();
412         if (!isset($_POST['edit_apply'])){
413           /* Group has been saved successfully, remove lock from
414              LDAP. */
415           if ($this->dn != "new"){
416             $this->remove_lock();
417           }
419           unset ($this->ogroup);
420           $this->ogroup= NULL;
421           session::un_set('objectinfo');
422         }else{
424           /* Reinitialize tab */
425           if($this->ogroup instanceof tabs){
426             $this->ogroup->re_init();
427           }
428         }
429       } else {
430         /* Ok. There seem to be errors regarding to the tab data,
431            show message and continue as usual. */
432         msg_dialog::displayChecks($message);
433       }
434     }
437     /****************
438       Cancel edit object group
439      ****************/
441     /* Cancel dialogs */
442     if ((isset($_POST['edit_cancel']))  && (isset($this->ogroup->dn))){
443       $this->remove_lock();
444       $this->ogroup= NULL;
445       session::un_set('objectinfo');
446     }
449     /****************
450       Display open dialogs 
451      ****************/
453     /* Show dialog if object is present */
454     if (isset($this->ogroup->config)){
455       $display= $this->ogroup->execute();
457       /* Don't show buttons if tab dialog requests this */
458       if (!$this->ogroup->by_object[$this->ogroup->current]->dialog){
459         $display.= "<p style=\"text-align:right\">\n";
460         $display.= "<input type=submit name=\"edit_finish\" style=\"width:80px\" value=\"".msgPool::okButton()."\">\n";
461         $display.= "&nbsp;\n";
462         if ($this->dn != "new"){
463           $display.= "<input type=submit name=\"edit_apply\" value=\"".msgPool::applyButton()."\">\n";
464           $display.= "&nbsp;\n";
465         }
466         $display.= "<input type=submit name=\"edit_cancel\" value=\"".msgPool::cancelButton()."\">\n";
467         $display.= "</p>";
468       }
469       return ($display);
470     }
473     /****************
474       Display list 
475      ****************/
477     /* Check if there is a snapshot dialog open */
478     $base = $this->DivListOGroup->selectedBase;
479     if($str = $this->showSnapshotDialog($base,$this->get_used_snapshot_bases())){
480       return($str);
481     }
483     /* Display dialog with group list */
484     $this->DivListOGroup->parent = $this;
485     $this->DivListOGroup->execute();
487     /* Add departments if subsearch is disabled */
488     if(!$this->DivListOGroup->SubSearch){
489       $this->DivListOGroup->AddDepartments($this->DivListOGroup->selectedBase,4,1);
490     }
491     $this->reload ();
492     $this->DivListOGroup->setEntries($this->ogrouplist);
493     return($this->DivListOGroup->Draw());
494   }
497   /* Return departments, that will be included within snapshot detection */
498   function get_used_snapshot_bases()
499   {
500     return(array(get_ou('ogroupou').$this->DivListOGroup->selectedBase));
501   }
503   
505   function convert_list($input)
506   {
507     $temp= "";
509     $conv= array(   
510         "U" => array("plugins/generic/images/head.png"        ,_("User")        , "ogroup"),
511         "G" => array("plugins/groups/images/groups.png"       ,_("Group")       , "ogroup"),
512         "A" => array("plugins/ogroups/images/application.png" ,_("Application") , "ogroup"),
513         "D" => array("plugins/departments/department.png"     ,_("Department")  , "ogroup"),
514         "S" => array("plugins/ogroups/images/server.png"      ,_("Server")      , "ogroup"),
515         "F" => array("plugins/ogroups/images/asterisk.png"    ,_("Phone")       , "phonequeue"),
516         "W" => array("plugins/ogroups/images/workstation.png" ,_("Workstation") , "workstartup"),
517         "O" => array("plugins/ogroups/images/winstation.png"  ,_("Windows Install") , "ogroup"),
518         "T" => array("plugins/ogroups/images/terminal.png"    ,_("Terminal")    , "termgroup"),
519         "P" => array("plugins/ogroups/images/printer.png"     ,_("Printer")     , "ogroup"));
521     /* Assemble picture */
522     $type= $input['gosaGroupObjects'][0];
523     $type= preg_replace("/[^A-Z]/i","",$type);
524     if (isset($type[0])){
525       $p1['pic']= $conv[$type[0]][0];
526       $p1['tit']= $conv[$type[0]][1];
527       $p1['alt']= $type[0];
528       $p1['lnk']= $conv[$type[0]][2];
529       $html_object_1 = "<input type='image' name='".$p1['lnk']."_group_edit_%KEY' ";
530     } else {
531       $p1['pic']= "images/empty.png";
532       $p1['tit']= "";
533       $p1['alt']= "";
534       $p1['lnk']= "";//$conv[$type[0]][2];
535       $html_object_1 = "<img ";
536     }
538     if (isset($type[1])){
539       $p2['pic']= $conv[$type[1]][0];
540       $p2['alt']= $type[1];
541       $p2['tit']= $conv[$type[1]][1];
542       $p2['lnk']= $conv[$type[1]][2];
543       $html_object_2 = "<input type='image' name='".$p2['lnk']."_group_edit_%KEY' ";
544     } else {
545       $p2['pic']= "images/empty.png";
546       $p2['alt']= "";
547       $p2['tit']= "";
548       $p2['lnk']= ""; //$conv[$type[0]][2];
549       $html_object_2 = "<img ";
550     }
551     
552     $temp = $html_object_1." class='center' id='iconA".preg_replace("/_/","",$p1['lnk']."_group_edit_%KEY")."' 
553       src='".$p1['pic']."' alt='".$p1['alt']."' title='".$p1['tit']."'>";
554     $temp.= $html_object_2." class='center' id='iconB".preg_replace("/_/","",$p2['lnk']."_group_edit_%KEY")."' 
555       src='".$p2['pic']."' alt='".$p2['alt']."' title='".$p2['tit']."'>";
556     return ($temp);
557   }
560   function reload()
561   {
562     /* Set base for all searches && initialise some vars */
563     $this->ogrouplist= array();
564     $base     = $this->DivListOGroup->selectedBase;
565     $filter   = "(gosaGroupObjects=[])";
566     $Regex    = $this->DivListOGroup->Regex;
568     $chk = array(
569         "UserGroups"          => "(gosaGroupObjects=*U*)" ,
570         "GroupGroups"         => "(gosaGroupObjects=*G*)" ,
571         "ApplicationGroups"   => "(gosaGroupObjects=*A*)" ,
572         "DepartmentGroups"    => "(gosaGroupObjects=*D*)" ,
573         "ServerGroups"        => "(gosaGroupObjects=*S*)" ,
574         "WorkstationGroups"   => "(gosaGroupObjects=*W*)" ,
575         "WindowsGroups"       => "(gosaGroupObjects=*O*)" ,
576         "TerminalGroups"      => "(gosaGroupObjects=*T*)" ,
577         "PrinterGroups"       => "(gosaGroupObjects=*P*)" ,
578         "PhoneGroups"         => "(gosaGroupObjects=*F*)" );
579     /* Create filter */ 
580     foreach($chk as $chkBox => $FilterPart){
581       if($this->DivListOGroup->$chkBox){
582         $filter .=  $FilterPart;
583       }
584     }
585     $filter= "(&(cn=$Regex)(objectClass=gosaGroupOfNames)(|$filter))";
587     if($this->DivListOGroup->SubSearch){
588       $res= get_sub_list($filter, "ogroups",get_ou('ogroupou'), $base, array("cn","objectClass","gosaGroupObjects"), GL_SIZELIMIT | GL_SUBSEARCH);
589     }else{
590       $res= get_sub_list($filter, "ogroups",get_ou('ogroupou'), get_ou('ogroupou').$base, array("cn","objectClass","gosaGroupObjects"), GL_SIZELIMIT );
591     }
593     $this->ogrouplist= $res;
594     ksort ($this->ogrouplist);
595     reset ($this->ogrouplist);
596     $tmp=array();
597     $tmp2 = array();
598     foreach($this->ogrouplist as $tkey => $val ){
599       $tmp[strtolower($val['cn'][0]).$val['cn'][0]]=$val;
600       $tmp2[strtolower($val['cn'][0]).$val['cn'][0]] = strtolower($val['cn'][0]).$val['cn'][0];
601     }
602     natcasesort($tmp2);
603     $this->ogrouplist=array();
604     foreach($tmp2 as $val){
605       $this->ogrouplist[]=$tmp[$val];
606     }
607     reset ($this->ogrouplist);
608   }
611   function list_get_selected_items()
612   {
613     $ids = array();
614     foreach($_POST as $name => $value){
615       if(preg_match("/^item_selected_[0-9]*$/",$name)){
616         $id   = preg_replace("/^item_selected_/","",$name);
617         $ids[$id] = $id;
618       }
619     }
620     return($ids);
621   }
624   function copyPasteHandling_from_queue($s_action,$s_entry)
625   {
626     /* Check if Copy & Paste is disabled */
627     if(!is_object($this->CopyPasteHandler)){
628       return("");
629     }
631     /* Add a single entry to queue */
632     if($s_action == "cut" || $s_action == "copy"){
634       /* Cleanup object queue */
635       $this->CopyPasteHandler->cleanup_queue();
636       $dn = $this->ogrouplist[$s_entry]['dn'];
637       $this->CopyPasteHandler->add_to_queue($dn,$s_action,"ogrouptabs","OGROUPTABS","ogroups");
638     }
641     /* Add entries to queue */
642     if($s_action == "copy_multiple" || $s_action == "cut_multiple"){
644       /* Cleanup object queue */
645       $this->CopyPasteHandler->cleanup_queue();
647       /* Add new entries to CP queue */
648       foreach($this->list_get_selected_items() as $id){
649         $dn = $this->ogrouplist[$id]['dn'];
651         if($s_action == "copy_multiple"){
652           $this->CopyPasteHandler->add_to_queue($dn,"copy","ogrouptabs","OGROUPTABS","ogroups");
653         }
654         if($s_action == "cut_multiple"){
655           $this->CopyPasteHandler->add_to_queue($dn,"cut","ogrouptabs","OGROUPTABS","ogroups");
656         }
657       }
658     }
660     /* Start pasting entries */
661     if($s_action == "editPaste"){
662       $this->start_pasting_copied_objects = TRUE;
663     }
665     /* Return C&P dialog */
666     if($this->start_pasting_copied_objects && $this->CopyPasteHandler->entries_queued()){
668       /* Get dialog */
669       $data = $this->CopyPasteHandler->execute();
670       $this->CopyPasteHandler->SetVar("base",$this->DivListOGroup->selectedBase);
672       /* Return dialog data */
673       if(!empty($data)){
674         return($data);
675       }
676     }
677     /* Automatically disable status for pasting */
678     if(!$this->CopyPasteHandler->entries_queued()){
679       $this->start_pasting_copied_objects = FALSE;
680     }
681     return("");
682   }
685   function remove_lock()
686   {
687     if (isset($this->apptabs->dn)){
688       del_lock ($this->apptabs->dn);
689     }
690     if(isset($this->dn) && !empty($this->dn) && $this->dn != "new"){
691       del_lock($this->dn);
692     }
693     if(isset($this->dns) && is_array($this->dns) && count($this->dns)){
694       del_lock($this->dns);
695     }
696   }
699   function save_object()
700   {
701     $this->DivListOGroup->save_object();
702     if(is_object($this->CopyPasteHandler)){
703       $this->CopyPasteHandler->save_object();
704     }
705   }
710 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
711 ?>