diff --git a/trunk/index_ajax.php b/trunk/index_ajax.php index 7f12ed00..a27d9dfa 100644 --- a/trunk/index_ajax.php +++ b/trunk/index_ajax.php @@ -7,7 +7,8 @@ $GLOBALS['LSsession'] = new LSsession(); if (($_REQUEST['template'] != 'login')&&($_REQUEST['template'] != 'recoverPassword')) { if ( !$GLOBALS['LSsession'] -> startLSsession() ) { - $_ERRORS = 'LSsession : Impossible d\'initialiser la LSsession.'; + $GLOBALS['LSerror'] -> addErrorCode(1022); + $_ERRORS = true; } } $data=NULL; @@ -417,20 +418,6 @@ if (!isset($_ERRORS)) { } } -if ($GLOBALS['LSerror']->errorsDefined()) { - $data['LSerror'] = $GLOBALS['LSerror']->getErrors(); -} -else if (isset($_ERRORS)) { - $data['LSerror'] = $_ERRORS; -} +$GLOBALS['LSsession'] -> displayAjaxReturn($data); -if (isset($_REQUEST['imgload'])) { - $data['imgload'] = $_REQUEST['imgload']; -} - -if (LSdebugDefined()) { - $data['LSdebug'] = LSdebug_print(true); -} - -echo json_encode($data); ?>