Added urldecode() of parameters in request and urlendode() of parameters in links's URL

This commit is contained in:
Benjamin Renard 2012-05-03 14:42:58 +02:00
parent 697369e3ca
commit 4a80c35557

View file

@ -25,17 +25,19 @@ require_once 'core.php';
if(LSsession :: startLSsession()) {
if ((isset($_GET['LSobject'])) && (isset($_GET['dn']))) {
$LSobject=urldecode($_GET['LSobject']);
$dn=urldecode($_GET['dn']);
if (LSsession ::loadLSobject($_GET['LSobject'])) {
if ( LSsession :: canRemove($_GET['LSobject'],$_GET['dn']) ) {
$object = new $_GET['LSobject']();
if ($object -> loadData($_GET['dn'])) {
if (LSsession ::loadLSobject($LSobject)) {
if ( LSsession :: canRemove($LSobject,$dn) ) {
$object = new $LSobject();
if ($object -> loadData($dn)) {
if (isset($_GET['valid'])) {
$objectname=$object -> getDisplayName();
$GLOBALS['Smarty'] -> assign('pagetitle',_('Deleting').' : '.$objectname);
if ($object -> remove()) {
LSsession :: addInfo($objectname.' '._('has been deleted successfully').'.');
LSsession :: redirect('view.php?LSobject='.$_GET['LSobject'].'&refresh');
LSsession :: redirect('view.php?LSobject='.$LSobject.'&refresh');
}
else {
LSerror :: addErrorCode('LSldapObject_15',$objectname);
@ -45,7 +47,7 @@ if(LSsession :: startLSsession()) {
// Définition du Titre de la page
$GLOBALS['Smarty'] -> assign('pagetitle',_('Deleting').' : '.$object -> getDisplayName());
$GLOBALS['Smarty'] -> assign('question',_('Do you really want to delete').' <strong>'.$object -> getDisplayName().'</strong> ?');
$GLOBALS['Smarty'] -> assign('validation_url','remove.php?LSobject='.$_GET['LSobject'].'&amp;dn='.$_GET['dn'].'&amp;valid');
$GLOBALS['Smarty'] -> assign('validation_url','remove.php?LSobject='.$LSobject.'&amp;dn='.urlencode($dn).'&amp;valid');
$GLOBALS['Smarty'] -> assign('validation_label',_('Validate'));
}
LSsession :: setTemplate('question.tpl');