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 department extends plugin
24 {
25 /* department attributes */
26 var $ou= "";
27 var $description= "";
28 var $base= "";
29 var $st= "";
30 var $l= "";
31 var $postalAddress= "";
32 var $businessCategory= "";
33 var $telephoneNumber= "";
34 var $facsimileTelephoneNumber= "";
35 var $is_administrational_unit= false;
36 var $gosaUnitTag= "";
37 var $view_logged = FALSE;
39 var $type ="ou";
40 var $namingAttr = "ou";
42 /* Headpage attributes */
43 var $last_dep_sorting= "invalid";
44 var $departments= array();
45 var $must_be_tagged = false;
47 /* attribute list for save action */
48 var $attributes= array("ou", "description", "businessCategory", "st", "l", "postalAddress",
49 "telephoneNumber", "facsimileTelephoneNumber", "gosaUnitTag");
50 var $objectclasses= array("top", "gosaDepartment", "organizationalUnit");
51 var $initially_was_tagged = false;
53 var $orig_base = "";
54 var $orig_ou = "";
56 function department (&$config, $dn)
57 {
59 plugin::plugin($config, $dn);
60 $this->is_account= TRUE;
61 $this->ui= get_userinfo();
62 $this->dn= $dn;
63 $this->orig_dn= $dn;
65 /* Save current naming attribuet
66 */
67 $nA = $this->namingAttr;
68 $orig_nA = "orig_".$nA;
69 $this->$orig_nA = $this->$nA;
71 $this->config= $config;
73 /* Set base */
74 if ($this->dn == "new"){
75 $ui= get_userinfo();
76 if(session::is_set('CurrentMainBase')){
77 $this->base = session::get('CurrentMainBase');
78 }else{
79 $this->base= dn2base($ui->dn);
80 }
81 } else {
82 $this->base= preg_replace ("/^[^,]+,/", "", $this->dn);
83 }
85 $this->orig_base = $this->base;
87 /* Is administrational Unit? */
88 if ($dn != "new" && in_array_ics('gosaAdministrativeUnit', $this->attrs['objectClass'])){
89 $this->is_administrational_unit= true;
90 $this->initially_was_tagged = true;
91 }
92 }
94 function execute()
95 {
96 /* Call parent execute */
97 plugin::execute();
99 /* Log view */
100 if($this->is_account && !$this->view_logged){
101 $this->view_logged = TRUE;
102 new log("view","department/".get_class($this),$this->dn);
103 }
105 /* Reload departments */
106 $this->config->get_departments($this->dn);
107 $this->config->make_idepartments();
108 $smarty= get_smarty();
110 $tmp = $this->plInfo();
111 foreach($tmp['plProvidedAcls'] as $name => $translation){
112 $smarty->assign($name."ACL",$this->getacl($name));
113 }
115 /* Hide base selector, if this object represents the base itself
116 */
117 $smarty->assign("is_root_dse", FALSE);
118 if($this->dn == $this->config->current['BASE']){
119 $smarty->assign("is_root_dse", TRUE);
120 $nA = $this->namingAttr."ACL";
121 $smarty->assign($nA,$this->getacl($this->namingAttr,TRUE));
122 }
124 /* Base select dialog */
125 $once = true;
126 foreach($_POST as $name => $value){
127 if((preg_match("/^chooseBase/",$name) && $once) && ($this->acl_is_moveable())){
128 $once = false;
129 $this->dialog = new baseSelectDialog($this->config,$this,$this->get_allowed_bases());
130 $this->dialog->setCurrentBase($this->base);
131 }
132 }
134 /* Dialog handling */
135 if(is_object($this->dialog)){
136 /* Must be called before save_object */
137 $this->dialog->save_object();
139 if($this->dialog->isClosed()){
140 $this->dialog = false;
141 }elseif($this->dialog->isSelected()){
143 /* A new base was selected, check if it is a valid one */
144 $tmp = $this->get_allowed_bases();
145 if(isset($tmp[$this->dialog->isSelected()])){
146 $this->base = $this->dialog->isSelected();
147 }
149 $this->dialog= false;
150 }else{
151 return($this->dialog->execute());
152 }
153 }
155 /* Hide all departments, that are subtrees of this department */
156 $bases = $this->get_allowed_bases();
157 if(($this->dn == "new")||($this->dn == "")){
158 $tmp = $bases;
159 }else{
160 $tmp = array();
161 foreach($bases as $dn=>$base){
162 $fixed = str_replace("/","\\",$this->dn);
163 /* Only attach departments which are not a subtree of this one */
164 if(!preg_match("/".$fixed."/",$dn)){
165 $tmp[$dn]=$base;
166 }
167 }
168 }
169 $smarty->assign("bases", $tmp);
171 foreach ($this->attributes as $val){
172 $smarty->assign("$val", $this->$val);
173 }
174 $smarty->assign("base_select", $this->base);
176 /* Set admin unit flag */
177 if ($this->is_administrational_unit) {
178 $smarty->assign("unitTag", "checked");
179 } else {
180 $smarty->assign("unitTag", "");
181 }
183 $smarty->assign("dep_type",$this->type);
186 $dep_types = departmentManagement::get_support_departments();
187 $tpl ="";
188 foreach($dep_types as $key => $data){
189 if($data['ATTR'] == $this->type){
190 $tpl = $data['TPL'];
191 break;
192 }
193 }
194 if($tpl == "") {
195 trigger_error("No template specified for container type '".$this->type."', please update epartmentManagement::get_support_departments().");
196 $tpl = "generic.tpl";
197 }
198 return($smarty->fetch (get_template_path($tpl, TRUE)));
199 }
201 function clear_fields()
202 {
203 $this->dn = "";
204 $this->base = "";
206 foreach ($this->attributes as $val){
207 $this->$val= "";
208 }
209 }
211 function remove_from_parent()
212 {
213 $ldap= $this->config->get_ldap_link();
214 $ldap->cd ($this->dn);
215 $ldap->rmdir_recursive($this->dn);
216 new log("remove","department/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
217 if (!$ldap->success()){
218 msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_DEL, get_class()));
219 }
221 /* Optionally execute a command after we're done */
222 $this->handle_post_events('remove');
223 }
225 function must_be_tagged()
226 {
227 return $this->must_be_tagged;
228 }
230 /* Save data to object */
231 function save_object()
232 {
233 if (isset($_POST['dep_generic_posted'])){
235 $nA = $this->namingAttr;
236 $old_nA = $this->$nA;
240 /* Create a base backup and reset the
241 base directly after calling plugin::save_object();
242 Base will be set seperatly a few lines below */
243 $base_tmp = $this->base;
244 plugin::save_object();
245 $this->base = $base_tmp;
247 /* Set new base if allowed */
248 $tmp = $this->get_allowed_bases();
249 if(isset($_POST['base'])){
250 if(isset($tmp[$_POST['base']])){
251 $this->base= $_POST['base'];
252 }
253 }
255 /* Save tagging flag */
256 if ($this->acl_is_writeable("unitTag")){
257 if (isset($_POST['unitTag'])){
258 $this->is_administrational_unit= true;
259 } else {
260 $this->is_administrational_unit= false;
261 }
262 }
264 /* If this is the root directory service entry (rootDSE)
265 then avoid changing the naming attribute of this entry.
266 */
267 if($this->dn == $this->config->current['BASE']){
268 $this->$nA = $old_nA;
269 }
270 }
271 }
274 /* Check values */
275 function check()
276 {
277 /* Call common method to give check the hook */
278 $message= plugin::check();
280 /* Check for presence of this department */
281 $ldap= $this->config->get_ldap_link();
282 $ldap->ls ("(&(ou=".$this->ou.")(objectClass=organizationalUnit))", $this->base, array('dn'));
283 if ($this->orig_dn == "new" && $ldap->count()){
284 $message[]= msgPool::duplicated(_("Name"));
285 } elseif ($this->orig_dn != $this->dn && $ldap->count()){
286 $message[]= msgPool::duplicated(_("Name"));
287 }
289 /* All required fields are set? */
290 if ($this->ou == ""){
291 $message[]= msgPool::required(_("Name"));
292 }
293 if ($this->description == ""){
294 $message[]= msgPool::required(_("Description"));
295 }
297 if(tests::is_department_name_reserved($this->ou,$this->base)){
298 $message[]= msgPool::reserved(_("Name"));
299 }
301 if (preg_match ('/[#+:=>\\\\\/]/', $this->ou)){
302 $message[]= msgPool::invalid(_("Name"), $this->ou, "/[^#+:=>\\\\\/]/");
303 }
304 if (!tests::is_phone_nr($this->telephoneNumber)){
305 $message[]= msgPool::invalid(_("Phone"), $this->telephoneNumber, "/[\/0-9 ()+*-]/");
306 }
307 if (!tests::is_phone_nr($this->facsimileTelephoneNumber)){
308 $message[]= msgPool::invalid(_("Fax"), $this->facsimileTelephoneNumber, "/[\/0-9 ()+*-]/");
309 }
311 /* Check if we are allowed to create or move this object
312 */
313 if($this->orig_dn == "new" && !$this->acl_is_createable($this->base)){
314 $message[] = msgPool::permCreate();
315 }elseif($this->orig_dn != "new" && $this->base != $this->orig_base && !$this->acl_is_moveable($this->base)){
316 $message[] = msgPool::permMove();
317 }
319 return $message;
320 }
323 /* Save to LDAP */
324 function save()
325 {
326 $ldap= $this->config->get_ldap_link();
328 /* Ensure that ou is saved too, it is required by objectClass gosaDepartment
329 */
330 $nA = $this->namingAttr;
331 $this->ou = $this->$nA;
333 /* Add tag objects if needed */
334 if ($this->is_administrational_unit){
336 /* If this wasn't tagged before add oc an reset unit tag */
337 if(!$this->initially_was_tagged){
338 $this->objectclasses[]= "gosaAdministrativeUnit";
339 $this->gosaUnitTag= "";
341 /* It seams that this method is called twice,
342 set this to true. to avoid adding this oc twice */
343 $this->initially_was_tagged = true;
344 }
346 if ($this->gosaUnitTag == ""){
348 /* It's unlikely, but check if already used... */
349 $try= 5;
350 $ldap->cd($this->config->current['BASE']);
351 while ($try--){
353 /* Generate microtime stamp as tag */
354 list($usec, $sec)= explode(" ", microtime());
355 $time_stamp= preg_replace("/\./", "", $sec.$usec);
357 $ldap->search("(&(objectClass=gosaAdministrativeUnit)(gosaUnitTag=$time_stamp))",array("gosaUnitTag"));
358 if ($ldap->count() == 0){
359 break;
360 }
361 }
362 if($try == 0) {
363 msg_dialog::display(_("Fatal error"), _("Cannot find an unused tag for this administrative unit!"), WARNING_DIALOG);
364 return;
365 }
366 $this->gosaUnitTag= preg_replace("/\./", "", $sec.$usec);
367 }
368 }
369 $this->skipTagging = TRUE;
370 plugin::save();
373 /* Remove tag information if needed */
374 if (!$this->is_administrational_unit && $this->initially_was_tagged){
375 $tmp= array();
377 /* Remove gosaAdministrativeUnit from this plugin */
378 $has_unit_tag= false;
379 foreach($this->attrs['objectClass'] as $oc){
380 if (!preg_match("/^gosaAdministrativeUnit$/i", $oc)){
381 $tmp[]= $oc;
382 }
383 if (preg_match("/^gosaAdministrativeUnitTag$/i", $oc)){
384 $has_unit_tag= true;
385 }
386 }
387 $this->attrs['objectClass']= $tmp;
388 $this->attrs['gosaUnitTag']= array();
389 $this->gosaUnitTag = "";
390 }
393 /* Write back to ldap */
394 $ldap->cat($this->dn, array('dn'));
395 $ldap->cd($this->dn);
397 if ($ldap->count()){
398 $this->cleanup();
399 $ldap->modify ($this->attrs);
400 new log("modify","department/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
401 $this->handle_post_events('modify');
402 } else {
403 $ldap->add($this->attrs);
404 $this->handle_post_events('add');
405 new log("create","department/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
406 }
407 if (!$ldap->success()){
408 msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
409 }
411 /* The parameter forces only to set must_be_tagged, and don't touch any objects
412 This will be done later */
413 $this->tag_objects(true);
415 /* Optionally execute a command after we're done */
416 $this->postcreate();
417 return(false);
418 }
421 /* Tag objects to have the gosaAdministrativeUnitTag */
422 function tag_objects($OnlySetTagFlag = false)
423 {
424 if(!$OnlySetTagFlag){
425 $smarty= get_smarty();
426 /* Print out html introduction */
427 echo ' <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
428 <html>
429 <head>
430 <title></title>
431 <style type="text/css">@import url("themes/default/style.css");</style>
432 <script language="javascript" src="include/focus.js" type="text/javascript"></script>
433 </head>
434 <body style="background: none; margin:4px;" id="body" >
435 ';
436 echo "<h3>".sprintf(_("Tagging '%s'."),"<i>".@LDAP::fix($this->dn)."</i>")."</h3>";
437 }
439 $add= $this->is_administrational_unit;
440 $len= strlen($this->dn);
441 $ldap= $this->config->get_ldap_link();
442 $ldap->cd($this->dn);
443 if ($add){
444 $ldap->search('(!(&(objectClass=gosaAdministrativeUnitTag)(gosaUnitTag='.
445 $this->gosaUnitTag.')))', array('dn'));
446 } else {
447 $ldap->search('objectClass=gosaAdministrativeUnitTag', array('dn'));
448 }
450 $objects = array();
451 while ($attrs= $ldap->fetch()){
452 $objects[] = $attrs;
453 }
454 foreach($objects as $attrs){
456 /* Skip self */
457 if ($attrs['dn'] == $this->dn){
458 continue;
459 }
461 /* Check for confilicting administrative units */
462 $fix= true;
463 foreach ($this->config->adepartments as $key => $tag){
464 /* This one is shorter than our dn, its not relevant... */
465 if ($len >= strlen($key)){
466 continue;
467 }
469 /* This one matches with the latter part. Break and don't fix this entry */
470 if (preg_match('/(^|,)'.normalizePreg($key).'$/', $attrs['dn'])){
471 $fix= false;
472 break;
473 }
474 }
476 /* Fix entry if needed */
477 if ($fix){
478 if($OnlySetTagFlag){
479 $this->must_be_tagged =true;
480 return;
481 }
482 $this->handle_object_tagging($attrs['dn'], $this->gosaUnitTag, TRUE );
483 echo "<script language=\"javascript\" type=\"text/javascript\">scrollDown2();</script>" ;
484 }
485 }
487 if(!$OnlySetTagFlag){
488 $this->must_be_tagged = FALSE;
489 echo '<p class="seperator"> </p>';
490 echo "<div style='width:100%;text-align:right;'><form name='form' method='post' action='?plug=".$_GET['plug']."' target='_parent'>
491 <br><input type='submit' name='back' value='"._("Continue")."'>
492 </form></div>";
493 echo "<script language=\"javascript\" type=\"text/javascript\">scrollDown2();</script>" ;
494 }
495 }
498 /* Move/Rename complete trees */
499 function recursive_move($src_dn, $dst_dn,$force = false)
500 {
501 /* Print header to have styles included */
502 $smarty= get_smarty();
504 echo ' <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
505 <html>
506 <head>
507 <title></title>
508 <style type="text/css">@import url("themes/default/style.css");</style>
509 <script language="javascript" src="include/focus.js" type="text/javascript"></script>
510 </head>
511 <body style="background: none; margin:4px;" id="body" >
512 ';
513 echo "<h3>".sprintf(_("Moving '%s' to '%s'"),"<i>".@LDAP::fix($src_dn)."</i>","<i>".@LDAP::fix($dst_dn)."</i>")."</h3>";
516 /* Check if the destination entry exists */
517 $ldap= $this->config->get_ldap_link();
519 /* Check if destination exists - abort */
520 $ldap->cat($dst_dn, array('dn'));
521 if ($ldap->fetch()){
522 trigger_error("Recursive_move ".@LDAP::fix($dst_dn)." already exists.",
523 E_USER_WARNING);
524 echo sprintf("Recursive_move: '%s' already exists", @LDAP::fix($dst_dn))."<br>";
525 return (FALSE);
526 }
528 /* Perform a search for all objects to be moved */
529 $objects= array();
530 $ldap->cd($src_dn);
531 $ldap->search("(objectClass=*)", array("dn"));
532 while($attrs= $ldap->fetch()){
533 $dn= $attrs['dn'];
534 $objects[$dn]= strlen($dn);
535 }
537 /* Sort objects by indent level */
538 asort($objects);
539 reset($objects);
541 /* Copy objects from small to big indent levels by replacing src_dn by dst_dn */
542 foreach ($objects as $object => $len){
545 $src= str_replace("\\","\\\\",$object);
546 $dst= preg_replace("/".str_replace("\\","\\\\",$src_dn)."$/", "$dst_dn", $object);
547 $dst= str_replace($src_dn,$dst_dn,$object);
549 echo "<b>"._("Object").":</b> ".@LDAP::fix($src)."<br>";
551 $this->update_acls($object, $dst,TRUE);
553 if (!$this->copy($src, $dst)){
554 echo "<font color='#FF0000'><br>".sprintf(_("FAILED to copy %s, aborting operation"),@LDAP::fix($src))."</font>";
555 return (FALSE);
556 }
557 echo "<script language=\"javascript\" type=\"text/javascript\">scrollDown2();</script>" ;
558 flush();
559 }
561 /* Remove src_dn */
562 $ldap->cd($src_dn);
563 $ldap->recursive_remove();
564 $this->orig_dn = $this->dn = $dst_dn;
565 $this->orig_base= $this->base;
566 $this->entryCSN = getEntryCSN($this->dn);
568 echo '<p class="seperator"> </p>';
570 echo "<div style='width:100%;text-align:right;'><form name='form' method='post' action='?plug=".$_GET['plug']."' target='_parent'>
571 <br><input type='submit' name='back' value='"._("Continue")."'>
572 </form></div>";
574 echo "<script language=\"javascript\" type=\"text/javascript\">scrollDown2();</script>" ;
575 echo "</body></html>";
577 return (TRUE);
578 }
581 /* Return plugin informations for acl handling */
582 static function plInfo()
583 {
584 return (array("plShortName" => _("Generic"),
585 "plDescription" => _("Departments"),
586 "plSelfModify" => FALSE,
587 "plPriority" => 0,
588 "plDepends" => array(),
589 "plSection" => array("admin"),
590 "plCategory" => array("department" => array("objectClass" => "gosaDepartment", "description" => _("Departments"))),
592 "plProvidedAcls" => array(
593 "description" => _("Description"),
594 "c" => _("Country"),
595 "base" => _("Base"),
596 "l" => _("Location"),
597 "telephoneNumber" => _("Telephone"),
598 "ou" => _("Department name"),
599 "businessCategory" => _("Category"),
600 "st" => _("State"),
601 "postalAddress" => _("Address"),
602 "gosaUnitTag" => _("Administrative settings"),
603 "facsimileTelephoneNumber" => _("Fax"))
604 ));
605 }
607 function handle_object_tagging($dn= "", $tag= "", $show= false)
608 {
609 /* No dn? Self-operation... */
610 if ($dn == ""){
611 $dn= $this->dn;
613 /* No tag? Find it yourself... */
614 if ($tag == ""){
615 $len= strlen($dn);
617 @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__, "No tag for $dn - looking for one...", "Tagging");
618 $relevant= array();
619 foreach ($this->config->adepartments as $key => $ntag){
621 /* This one is bigger than our dn, its not relevant... */
622 if ($len <= strlen($key)){
623 continue;
624 }
626 /* This one matches with the latter part. Break and don't fix this entry */
627 if (preg_match('/(^|,)'.normalizePreg($key).'$/', $dn)){
628 @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__, "DEBUG: Possibly relevant: $key", "Tagging");
629 $relevant[strlen($key)]= $ntag;
630 continue;
631 }
633 }
635 /* If we've some relevant tags to set, just get the longest one */
636 if (count($relevant)){
637 ksort($relevant);
638 $tmp= array_keys($relevant);
639 $idx= end($tmp);
640 $tag= $relevant[$idx];
641 $this->gosaUnitTag= $tag;
642 }
643 }
644 }
646 /* Set tag? */
647 if ($tag != ""){
648 /* Set objectclass and attribute */
649 $ldap= $this->config->get_ldap_link();
650 $ldap->cat($dn, array('gosaUnitTag', 'objectClass'));
651 $attrs= $ldap->fetch();
652 if(isset($attrs['gosaUnitTag'][0]) && $attrs['gosaUnitTag'][0] == $tag){
653 if ($show) {
654 echo sprintf(_("Object '%s' is already tagged"), @LDAP::fix($dn))."<br>";
655 flush();
656 }
657 return;
658 }
659 if (count($attrs)){
660 if ($show){
661 echo sprintf(_("Adding tag (%s) to object '%s'"), $tag, @LDAP::fix($dn))."<br>";
662 flush();
663 }
664 $nattrs= array("gosaUnitTag" => $tag);
665 $nattrs['objectClass']= array();
666 for ($i= 0; $i<$attrs['objectClass']['count']; $i++){
667 $oc= $attrs['objectClass'][$i];
668 if ($oc != "gosaAdministrativeUnitTag"){
669 $nattrs['objectClass'][]= $oc;
670 }
671 }
672 $nattrs['objectClass'][]= "gosaAdministrativeUnitTag";
673 $ldap->cd($dn);
674 $ldap->modify($nattrs);
675 if (!$ldap->success()){
676 msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $dn, LDAP_MOD, get_class()));
677 }
678 } else {
679 @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__, "Not tagging ($tag) $dn - seems to have moved away", "Tagging");
680 }
682 } else {
683 /* Remove objectclass and attribute */
684 $ldap= $this->config->get_ldap_link();
685 $ldap->cat($dn, array('gosaUnitTag', 'objectClass'));
686 $attrs= $ldap->fetch();
687 if (isset($attrs['objectClass']) && !in_array_ics("gosaAdministrativeUnitTag", $attrs['objectClass'])){
688 @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__, "$dn is not tagged", "Tagging");
689 return;
690 }
691 if (count($attrs)){
692 if ($show){
693 echo sprintf(_("Removing tag from object '%s'"), @LDAP::fix($dn))."<br>";
694 flush();
695 }
696 $nattrs= array("gosaUnitTag" => array());
697 $nattrs['objectClass']= array();
698 for ($i= 0; $i<$attrs['objectClass']['count']; $i++){
699 $oc= $attrs['objectClass'][$i];
700 if ($oc != "gosaAdministrativeUnitTag"){
701 $nattrs['objectClass'][]= $oc;
702 }
703 }
704 $ldap->cd($dn);
705 $ldap->modify($nattrs);
706 if (!$ldap->success()){
707 msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $dn, LDAP_MOD, get_class()));
708 }
709 } else {
710 @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__, "Not removing tag ($tag) $dn - seems to have moved away", "Tagging");
711 }
712 }
713 }
715 }
717 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
718 ?>