mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-17 15:59:06 +01:00
- Ajout de la méthode LSdebugDefined() et utilisation dans index_ajax.php et
modify.php
This commit is contained in:
parent
5435f1355b
commit
7a79198d2f
3 changed files with 9 additions and 4 deletions
|
@ -156,6 +156,12 @@ function LSdebug_print($return=false) {
|
|||
return;
|
||||
}
|
||||
|
||||
function LSdebugDefined() {
|
||||
if (!$GLOBALS['LSdebug']['active'])
|
||||
return;
|
||||
return (!empty($GLOBALS['LSdebug']['fields']));
|
||||
}
|
||||
|
||||
/**
|
||||
* Vérifie la compatibilite des DN
|
||||
*
|
||||
|
|
|
@ -410,9 +410,8 @@ if (isset($_REQUEST['imgload'])) {
|
|||
$data['imgload'] = $_REQUEST['imgload'];
|
||||
}
|
||||
|
||||
$debug_txt = LSdebug_print(true);
|
||||
if ($debug_txt != "") {
|
||||
$data['LSdebug'] = $debug_txt;
|
||||
if (LSdebugDefined()) {
|
||||
$data['LSdebug'] = LSdebug_print(true);
|
||||
}
|
||||
|
||||
echo json_encode($data);
|
||||
|
|
|
@ -54,7 +54,7 @@ if($LSsession -> startLSsession()) {
|
|||
// MàJ des données de l'objet LDAP
|
||||
if ($object -> updateData('modify')) {
|
||||
$GLOBALS['LSsession'] -> addInfo(_("L'objet a bien été modifié."));
|
||||
if (!$GLOBALS['LSdebug']['active']) {
|
||||
if ((!LSdebugDefined()) && !$GLOBALS['LSerror']->errorsDefined()) {
|
||||
$GLOBALS['LSsession'] -> redirect('view.php?LSobject='.$LSobject.'&dn='.$object -> getDn());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue