From c78a95c1d58582a6586f3975dce16b2ebadd2643 Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Tue, 29 Jul 2008 13:45:02 +0000 Subject: [PATCH] =?UTF-8?q?-=20LSldapObject=20:=20=20=20->=20Ajout=20de=20?= =?UTF-8?q?la=20possibilit=C3=A9=20de=20changer=20le=20RDN=20d'un=20objet?= =?UTF-8?q?=20=20=20=20=20->=20Mise=20=C3=A0=20jour=20automatique=20des=20?= =?UTF-8?q?relations=20d=C3=A9finis=20avec=20les=20autres=20types=20=20=20?= =?UTF-8?q?=20=20d'objet=20=C3=A0=20partir=20du=20moment=20que=20le=20para?= =?UTF-8?q?m=C3=A8tre=20'rename=5Ffunction'=20est=20d=C3=A9fini=20=20=20?= =?UTF-8?q?=20=20dans=20la=20configuration=20de=20la=20relation=20=20=20?= =?UTF-8?q?=20=20->=20Ajout=20des=20m=C3=A9thodes=20suivantes=20:=20=20=20?= =?UTF-8?q?=20=20=20=20->=20beforeRename()=20:=20Executer=20avant=20le=20c?= =?UTF-8?q?hangement=20de=20DN=20elle=20permet=20de=20=20=20=20=20=20=20pr?= =?UTF-8?q?=C3=A9parer=20le=20renomage.=20=20=20=20=20=20=20->=20afterRena?= =?UTF-8?q?me()=20:=20Executer=20apr=C3=A8s=20le=20changement=20de=20DN=20?= =?UTF-8?q?elle=20finalise=20le=20=20=20=20=20=20=20renomage.=20=20=20=20?= =?UTF-8?q?=20->=20M=C3=A9thode=20submitData()=20:=20prise=20en=20charge?= =?UTF-8?q?=20du=20changement=20du=20RDN=20-=20LSrelation=20:=20=20=20->?= =?UTF-8?q?=20Correction=20d'une=20erreur=20dans=20index=5Fajax.php=20:=20?= =?UTF-8?q?le=20param=C3=A8tre=20=20=20$relationConf['remove=5Ffunction']?= =?UTF-8?q?=20n'=C3=A9tait=20pas=20utilis=C3=A9=20-=20LSeegroup=20:=20=20?= =?UTF-8?q?=20->=20Cr=C3=A9ation=20d'une=20propri=C3=A9t=C3=A9=20$userObje?= =?UTF-8?q?ctType=20pour=20stock=C3=A9=20le=20type=20des=20objets=20=20=20?= =?UTF-8?q?utilisateurs=20=20=20->=20Cr=C3=A9ation=20de=20la=20m=C3=A9thod?= =?UTF-8?q?e=20renameOneMember()=20pour=20assurer=20les=20modifications=20?= =?UTF-8?q?=20=20n=C3=A9c=C3=A9ssaire=20lors=20du=20changement=20de=20DN?= =?UTF-8?q?=20d'un=20utilisateur=20-=20LSformElement=5Fdate=20:=20Suppress?= =?UTF-8?q?ion=20du=20chargement=20du=20fichier=20js=20:=20calendar-setup?= =?UTF-8?q?=20=20=20inutile=20l'utilisation=20faite=20de=20jscalendar.=20-?= =?UTF-8?q?=20LSattribute=20:=20=20=20->=20Ajout=20d'une=20possibilit?= =?UTF-8?q?=C3=A9=20pour=20g=C3=A9n=C3=A9rer=20une=20valeur=20=C3=A0=20par?= =?UTF-8?q?tir=20d'un=20format=20de=20=20=20chaine=20et=20la=20m=C3=A9thod?= =?UTF-8?q?e=20getFData()=20des=20objets=20LSldapObject.=20Cette=20m=C3=A9?= =?UTF-8?q?thode=20fait=20=20=20r=C3=A9f=C3=A9rence=20au=20param=C3=A8tre?= =?UTF-8?q?=20'generate=5Fvalue=5Fformat'=20de=20la=20configuration=20d'un?= =?UTF-8?q?=20=20=20attribut=20pour=20g=C3=A9n=C3=A9rer=20la=20valeur=20-?= =?UTF-8?q?=20LSldap=20:=20=20=20->=20Ajout=20d'une=20m=C3=A9thode=20move(?= =?UTF-8?q?)=20pour=20changer=20le=20DN=20d'un=20objet=20-=20LSsession=20:?= =?UTF-8?q?=20=20=20->=20Ajout=20de=20la=20m=C3=A9thode=20changeAuthUser()?= =?UTF-8?q?=20pour=20changer=20l'utilisateur=20connect=C3=A9=20=20=20en=20?= =?UTF-8?q?cour=20de=20session.=20(Utile=20lors=20de=20la=20modification?= =?UTF-8?q?=20de=20l'utilisateur=20par=20lui=20=20=20m=C3=AAme)=20-=20func?= =?UTF-8?q?tions.php=20:=20Correction=20d'un=20bug=20dans=20la=20fontion?= =?UTF-8?q?=20getFData().=20-=20modify.php=20:=20V=C3=A9rification=20des?= =?UTF-8?q?=20droits=20de=20l'utilisateur=20apr=C3=A8s=20chargement=20et?= =?UTF-8?q?=20=20=20eventuellement=20modification=20de=20celui-ci=20pour?= =?UTF-8?q?=20int=C3=A9grer=20les=20eventuelles=20=20=20modifications=20fa?= =?UTF-8?q?ites=20par=20l'utilisateur.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LSobjects/config.LSobjects.LSeepeople.php | 14 +-- trunk/conf/config.error_code.php | 10 +- trunk/includes/class/class.LSattribute.php | 18 +++- .../class/class.LSformElement_date.php | 2 +- trunk/includes/class/class.LSldap.php | 11 ++ trunk/includes/class/class.LSldapObject.php | 100 +++++++++++++++++- .../class/class.LSobjects.LSeegroup.php | 47 ++++++-- .../class/class.LSobjects.LSeepeople.php | 6 +- trunk/includes/class/class.LSsession.php | 28 +++++ trunk/includes/functions.php | 12 ++- trunk/index_ajax.php | 2 +- trunk/modify.php | 29 +++-- 12 files changed, 236 insertions(+), 43 deletions(-) diff --git a/trunk/conf/LSobjects/config.LSobjects.LSeepeople.php b/trunk/conf/LSobjects/config.LSobjects.LSeepeople.php index f28cce64..a5f7ba7e 100644 --- a/trunk/conf/LSobjects/config.LSobjects.LSeepeople.php +++ b/trunk/conf/LSobjects/config.LSobjects.LSeepeople.php @@ -39,7 +39,8 @@ $GLOBALS['LSobjects']['LSeepeople'] = array ( 'LSobject' => 'LSeegroup', 'list_function' => 'listUserGroups', 'update_function' => 'updateUserGroups', - 'remove_function' => 'removeMember', + 'remove_function' => 'deleteOneMember', + 'rename_function' => 'renameOneMember', 'rights' => array( 'self' => 'r', 'admin' => 'w' @@ -72,8 +73,11 @@ $GLOBALS['LSobjects']['LSeepeople'] = array ( ), 'view' => 1, 'form' => array ( - 'modify' => 0, + 'modify' => 1, 'create' => 1 + ), + 'dependAttrs' => array( + 'homeDirectory' ) ), 'uidNumber' => array ( @@ -243,15 +247,11 @@ $GLOBALS['LSobjects']['LSeepeople'] = array ( 'ldap_type' => 'ascii', 'html_type' => 'text', 'required' => 1, - 'default_value' => '/home/%{uid}', 'generate_function' => 'generate_homeDirectory', 'rights' => array( 'self' => 'r' ), - 'view' => 1, - 'form' => array ( - 'modify' => 1, - ) + 'view' => 1 ), 'mail' => array ( 'label' => _('Adresse e-mail'), diff --git a/trunk/conf/config.error_code.php b/trunk/conf/config.error_code.php index beb7b121..729f084e 100644 --- a/trunk/conf/config.error_code.php +++ b/trunk/conf/config.error_code.php @@ -116,8 +116,16 @@ $GLOBALS['LSerror_code'] = array ( 'msg' => _("LSldapObject : Erreur durant la suppression de %{objectname}."), 'level' => 'c' ), + 36 => array ( + 'msg' => _("LSldapObject : Erreur durant les actions avant renomage."), + 'level' => 'c' + ), + 37 => array ( + 'msg' => _("LSldapObject : Erreur durant les actions après renomage."), + 'level' => 'c' + ), - // LSldapObject + // LSattribute 41 => array ( 'msg' => _("LSattribute : Attribut %{attr} : Type d'attribut (ldap // html) inconnu (ldap = %{ldap} | html = %{html})."), 'level' => 'c' diff --git a/trunk/includes/class/class.LSattribute.php b/trunk/includes/class/class.LSattribute.php index d51533be..903eefc8 100644 --- a/trunk/includes/class/class.LSattribute.php +++ b/trunk/includes/class/class.LSattribute.php @@ -404,7 +404,15 @@ class LSattribute { * @retval boolean true si la valeur de l'attribut peut être générée, false sinon */ function canBeGenerated() { - return (function_exists($this -> config['generate_function'])); + if (function_exists($this -> config['generate_function'])) { + return true; + } + else if (isset($this -> config['generate_value_format'])) { + return true; + } + else { + return ; + } } /** @@ -415,10 +423,12 @@ class LSattribute { * @retval boolean true si la valeur à put être générée, false sinon */ function generateValue() { - if ( ! $this -> canBeGenerated() ) { - return; + if (function_exists($this -> config['generate_function'])) { + $value=call_user_func($this -> config['generate_function'],$this -> ldapObject); + } + else if (isset($this -> config['generate_value_format'])) { + $value = $this -> ldapObject -> getFData($this -> config['generate_value_format']); } - $value=call_user_func($this -> config['generate_function'],$this -> ldapObject); if (!empty($value)) { //$this -> setValue($value); // pas nécéssaire ?? $this -> updateData=array($value); diff --git a/trunk/includes/class/class.LSformElement_date.php b/trunk/includes/class/class.LSformElement_date.php index 8c8970e1..8f78e66e 100644 --- a/trunk/includes/class/class.LSformElement_date.php +++ b/trunk/includes/class/class.LSformElement_date.php @@ -149,7 +149,7 @@ class LSformElement_date extends LSformElement { $GLOBALS['LSsession'] -> addJSscript('calendar-en.js',LS_LIB_DIR.'jscalendar/lang/'); $codeLang = strtolower($GLOBALS['LSconfig']['lang'][0].$GLOBALS['LSconfig']['lang'][1]); $GLOBALS['LSsession'] -> addJSscript('calendar-'.$codeLang.'.js',LS_LIB_DIR.'jscalendar/lang/'); - $GLOBALS['LSsession'] -> addJSscript('calendar-setup.js',LS_LIB_DIR.'jscalendar/'); + //$GLOBALS['LSsession'] -> addJSscript('calendar-setup.js',LS_LIB_DIR.'jscalendar/'); $GLOBALS['LSsession'] -> addJSscript('LSformElement_date_field.js'); $GLOBALS['LSsession'] -> addJSscript('LSformElement_date.js'); } diff --git a/trunk/includes/class/class.LSldap.php b/trunk/includes/class/class.LSldap.php index 9eedc008..4aa94a9e 100644 --- a/trunk/includes/class/class.LSldap.php +++ b/trunk/includes/class/class.LSldap.php @@ -337,6 +337,17 @@ class LSldap { return $this -> cnx -> delete($dn,array('recursive' => true)); } + /** + * Déplace un objet LDAP dans l'annuaire + * + * @param[in] $old string Le DN actuel + * @param[in] $new string Le futur DN + * + * @retval boolean True si l'objet a été déplacé, false sinon + */ + function move($old,$new) { + return (!Net_LDAP2::isError($this -> cnx -> move($old,$new))); + } } ?> diff --git a/trunk/includes/class/class.LSldapObject.php b/trunk/includes/class/class.LSldapObject.php index 6534a8c2..06b44f09 100644 --- a/trunk/includes/class/class.LSldapObject.php +++ b/trunk/includes/class/class.LSldapObject.php @@ -41,6 +41,7 @@ class LSldapObject { var $submitError=true; var $_whoami=NULL; var $_subDn_value=NULL; + var $_relationsCache=array(); /** * Constructeur @@ -447,7 +448,7 @@ class LSldapObject { } } else { - if($ret<=0) { + if($ret<0) { $LSform -> setElementError($attr,$msg_error); return; } @@ -512,7 +513,31 @@ class LSldapObject { $submitData=array(); foreach($this -> attrs as $attr) { if(($attr -> isUpdate())&&($attr -> isValidate())) { - $submitData[$attr -> name] = $attr -> getUpdateData(); + if($attr -> name == $this -> config['rdn']) { + debug('Rename'); + if (!$this -> beforeRename()) { + $GLOBALS['LSerror'] -> addErrorCode(36); + return; + } + $oldDn = $this -> getDn(); + $this -> dn = false; + $newDn = $this -> getDn(); + if ($newDn) { + if (!$GLOBALS['LSldap'] -> move($oldDn,$newDn)) { + return; + } + if (!$this -> afterRename($oldDn,$newDn)) { + $GLOBALS['LSerror'] -> addErrorCode(37); + return; + } + } + else { + return; + } + } + else { + $submitData[$attr -> name] = $attr -> getUpdateData(); + } } } if(!empty($submitData)) { @@ -977,6 +1002,77 @@ class LSldapObject { $subDnLdapServer = $GLOBALS['LSsession'] -> getSortSubDnLdapServer(); return $subDnLdapServer[$this -> getSubDnValue()]; } + + /** + * Methode executant les actions nécéssaires avant le changement du DN de + * l'objet. + * + * Cette méthode n'est qu'un exemple et elle doit être certainement réécrite + * pour les objets plus complexe. + * + * @retval True en cas de cas ce succès, False sinon. + */ + function beforeRename() { + if (is_array($this->config['relations'])) { + foreach($this->config['relations'] as $relation_name => $relation_conf) { + if ( isset($relation_conf['list_function']) && isset($relation_conf['rename_function']) ) { + if ($GLOBALS['LSsession'] -> loadLSobject($relation_conf['LSobject'])) { + $obj = new $relation_conf['LSobject'](); + if (method_exists($obj,$relation_conf['list_function'])) { + $list = $obj -> $relation_conf['list_function']($this); + if (is_array($list)) { + $this -> _relationsCache[$relation_name] = $list; + } + else { + return; + } + } + else { + return; + } + } + else { + return; + } + } + } + } + return true; + } + + /** + * Methode executant les actions nécéssaires après le changement du DN de + * l'objet. + * + * Cette méthode n'est qu'un exemple et elle doit être certainement réécrite + * pour les objets plus complexe. + * + * @param[in] $oldDn string L'ancien DN de l'objet + * @param[in] $newDn string Le nouveau DN de l'objet + * + * @retval True en cas de cas ce succès, False sinon. + */ + function afterRename($oldDn,$newDn) { + $error = 0; + if($GLOBALS['LSsession'] -> dn == $oldDn) { + $GLOBALS['LSsession'] -> changeAuthUser($this); + } + + foreach($this -> _relationsCache as $relation_name => $objList) { + foreach($objList as $obj) { + $meth = $this->config['relations'][$relation_name]['rename_function']; + if (method_exists($obj,$meth)) { + if (!($obj -> $meth($this,$oldDn))) { + $error=1; + } + } + else { + $error=1; + } + } + } + return !$error; + } } ?> diff --git a/trunk/includes/class/class.LSobjects.LSeegroup.php b/trunk/includes/class/class.LSobjects.LSeegroup.php index 2eaa6f69..1e58db26 100644 --- a/trunk/includes/class/class.LSobjects.LSeegroup.php +++ b/trunk/includes/class/class.LSobjects.LSeegroup.php @@ -27,6 +27,8 @@ */ class LSeegroup extends LSldapObject { + var $userObjectType = 'LSeepeople'; + /** * Constructeur * @@ -50,7 +52,7 @@ class LSeegroup extends LSldapObject { * Retourne un tableau de LSeegroup correspondant aux groupes * auxquels appartient un utilisateur * - * @param[in] $userObject Un object LSeepeople + * @param[in] $userObject Un object user (type : $this -> userObjectType) * * @retval Array of LSeegroup Les groupes de l'utilisateur **/ @@ -64,12 +66,12 @@ class LSeegroup extends LSldapObject { /** * Ajoute un utilisateur au groupe * - * @param[in] $object Un object LSeepeople : l'utilisateur à ajouter + * @param[in] $object Un object user ($this -> userObjectType) : l'utilisateur à ajouter * * @retval boolean true si l'utilisateur à été ajouté, False sinon **/ function addOneMember($object) { - if ($object instanceof LSeepeople) { + if ($object instanceof $this -> userObjectType) { if ($this -> attrs['uniqueMember'] instanceof LSattribute) { $dn = $object -> getDn(); $values = $this -> attrs['uniqueMember'] -> getValue(); @@ -92,12 +94,12 @@ class LSeegroup extends LSldapObject { /** * Supprime un utilisateur du groupe * - * @param[in] $object Un object LSeepeople : l'utilisateur à supprimer + * @param[in] $object Un object (type : $this -> userObjectType) : l'utilisateur à supprimer * * @retval boolean true si l'utilisateur à été supprimé, False sinon **/ function deleteOneMember($object) { - if ($object instanceof LSeepeople) { + if ($object instanceof $this -> userObjectType) { if ($this -> attrs['uniqueMember'] instanceof LSattribute) { $dn = $object -> getDn(); $values = $this -> attrs['uniqueMember'] -> getValue(); @@ -113,7 +115,38 @@ class LSeegroup extends LSldapObject { } return $GLOBALS['LSldap'] -> update($this -> getType(),$this -> getDn(), array('uniqueMember' => $updateData)); } - return; + } + } + return; + } + + /** + * Renome un utilisateur + * + * @param[in] $object Un object (type : $this -> userObjectType) : l'utilisateur à renomer + * @param[in] $oldDn string L'ancien DN de l'utilisateur + * + * @retval boolean True en cas de succès, False sinon + */ + function renameOneMember($object,$oldDn) { + if ($object instanceof $this -> userObjectType) { + if ($this -> attrs['uniqueMember'] instanceof LSattribute) { + $values = $this -> attrs['uniqueMember'] -> getValue(); + if ((!is_array($values)) && (!empty($values))) { + $values = array($values); + } + if (is_array($values)) { + $updateData=array(); + foreach($values as $value) { + if ($value!=$oldDn) { + $updateData[] = $value; + } + else { + $updateData[] = $object-> getDn(); + } + } + return $GLOBALS['LSldap'] -> update($this -> getType(),$this -> getDn(), array('uniqueMember' => $updateData)); + } } } return; @@ -122,7 +155,7 @@ class LSeegroup extends LSldapObject { /** * Met à jour les groupes d'un utilisateur * - * @param[in] $userObject LSeepeople Un object LSeepeople : l'utilisateur + * @param[in] $userObject Mixed Un object (type : $this -> userObjectType) : l'utilisateur * @param[in] $listDns Array(string) Un tableau des DNs des groupes de l'utilisateur * * @retval boolean true si tout c'est bien passé, False sinon diff --git a/trunk/includes/class/class.LSobjects.LSeepeople.php b/trunk/includes/class/class.LSobjects.LSeepeople.php index d650535e..f5209dd4 100644 --- a/trunk/includes/class/class.LSobjects.LSeepeople.php +++ b/trunk/includes/class/class.LSobjects.LSeepeople.php @@ -37,9 +37,9 @@ class LSeepeople extends LSldapObject { * @param[in] $config array La configuration de l'objet * * @retval boolean true si l'objet a été construit, false sinon. - * - * @see LSldapObject::LSldapObject() - */ + * + * @see LSldapObject::LSldapObject() + */ function LSeepeople ($config='auto') { return $this -> LSldapObject('LSeepeople',$config); } diff --git a/trunk/includes/class/class.LSsession.php b/trunk/includes/class/class.LSsession.php index 07dd6ed8..1abfd785 100644 --- a/trunk/includes/class/class.LSsession.php +++ b/trunk/includes/class/class.LSsession.php @@ -486,6 +486,34 @@ class LSsession { } } + /** + * Modifie l'utilisateur connecté à la volé + * + * @param[in] $object Mixed L'objet Ldap du nouvel utilisateur + * le type doit correspondre à + * $this -> ldapServer['authobject'] + * + * @retval boolean True en cas de succès, false sinon + */ + function changeAuthUser($object) { + if ($object instanceof $this -> ldapServer['authobject']) { + $this -> dn = $object -> getDn(); + $rdn = $object -> getValue('rdn'); + if(is_array($rdn)) { + $rdn = $rdn[0]; + } + $this -> rdn = $rdn; + $this -> LSuserObject = $object; + + if($this -> loadLSrights()) { + $this -> loadLSaccess(); + $_SESSION['LSsession']=get_object_vars($this); + return true; + } + } + return; + } + /** * Définition du serveur Ldap de la session * diff --git a/trunk/includes/functions.php b/trunk/includes/functions.php index f78707a5..56a1704f 100644 --- a/trunk/includes/functions.php +++ b/trunk/includes/functions.php @@ -53,7 +53,11 @@ function getFData($format,$data,$meth=NULL) { else { while (ereg("%{([A-Za-z0-9]+)}",$format[$i],$ch)) { if (method_exists($data[$ch[1]],$meth)) { - $format[$i]=ereg_replace($ch[0],$data[$ch[1]] -> $meth(),$format[$i]); + $value = $data[$ch[1]] -> $meth(); + if (is_array($value)) { + $value = $value[0]; + } + $format[$i]=ereg_replace($ch[0],$value,$format[$i]); } else { $GLOBALS['LSerror'] -> addErrorCode(901,array('meth' => $meth,'obj' => $ch[1])); @@ -70,7 +74,11 @@ function getFData($format,$data,$meth=NULL) { else { while (ereg("%{([A-Za-z0-9]+)}",$format[$i],$ch)) { if (method_exists($data,$meth)) { - $format[$i]=ereg_replace($ch[0],$data -> $meth($ch[1]),$format[$i]); + $value = $data -> $meth($ch[1]); + if (is_array($value)) { + $value = $value[0]; + } + $format[$i]=ereg_replace($ch[0],$value,$format[$i]); } else { $GLOBALS['LSerror'] -> addErrorCode(901,array('meth' => $meth,'obj' => get_class($data))); diff --git a/trunk/index_ajax.php b/trunk/index_ajax.php index 899ef8d0..dfc60f0e 100644 --- a/trunk/index_ajax.php +++ b/trunk/index_ajax.php @@ -241,7 +241,7 @@ if (!isset($_ERRORS)) { $ok=false; foreach($list as $o) { if($o -> getDn() == $_REQUEST['dn']) { - if (!$o -> deleteOneMember($object)) { + if (!$o -> $relationConf['remove_function']($object)) { $GLOBALS['LSerror'] -> addErrorCode(1015,$conf['relationName']); } else { diff --git a/trunk/modify.php b/trunk/modify.php index 1d36856f..fc64f78c 100644 --- a/trunk/modify.php +++ b/trunk/modify.php @@ -45,20 +45,6 @@ if($LSsession -> startLSsession()) { // Création d'un LSobject if ($GLOBALS['LSsession'] -> loadLSobject($LSobject)) { if ( $GLOBALS['LSsession'] -> canEdit($LSobject,$dn) ) { - $LSview_actions[] = array( - 'label' => _('Voir'), - 'url' =>'view.php?LSobject='.$LSobject.'&dn='.$dn, - 'action' => 'view' - ); - - if ($GLOBALS['LSsession'] -> canRemove($LSobject,$dn)) { - $LSview_actions[] = array( - 'label' => _('Supprimer'), - 'url' => 'remove.php?LSobject='.$LSobject.'&dn='.$dn, - 'action' => 'delete' - ); - } - $object = new $LSobject(); if ($object -> loadData($dn)) { // Définition du Titre de la page @@ -68,10 +54,23 @@ if($LSsession -> startLSsession()) { // MàJ des données de l'objet LDAP if ($object -> updateData('modify')) { debug('ok'); - //header('Location: view.php?LSobject='.$LSobject.'&dn='.$object -> getDn()); } } + $LSview_actions[] = array( + 'label' => _('Voir'), + 'url' =>'view.php?LSobject='.$LSobject.'&dn='.$object -> getDn(), + 'action' => 'view' + ); + + if ($GLOBALS['LSsession'] -> canRemove($LSobject,$object -> getDn())) { + $LSview_actions[] = array( + 'label' => _('Supprimer'), + 'url' => 'remove.php?LSobject='.$LSobject.'&dn='.$object -> getDn(), + 'action' => 'delete' + ); + } + $GLOBALS['LSsession'] -> addJSscript('LSsmoothbox.js');