mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-18 08:19:05 +01:00
LSurl handlers : fix always display template after adding error
This commit is contained in:
parent
feb346acef
commit
119ce68a35
1 changed files with 6 additions and 3 deletions
|
@ -103,11 +103,13 @@ function get_LSobject_from_request($request, $instanciate=true, $check_access=nu
|
|||
if ($dn) {
|
||||
if (!call_user_func($check_access, $LSobject, $dn)) {
|
||||
LSerror :: addErrorCode('LSsession_11');
|
||||
LSsession :: displayTemplate();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if (!LSsession :: in_menu($LSobject) && !call_user_func($check_access, $LSobject)) {
|
||||
LSerror :: addErrorCode('LSsession_11');
|
||||
LSsession :: displayTemplate();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -146,7 +148,8 @@ function handle_LSobject_search($request) {
|
|||
$LSobject = $object -> getType();
|
||||
|
||||
if (!LSsession :: loadLSclass('LSsearch')) {
|
||||
LSsession :: addErrorCode('LSsession_05','LSsearch');
|
||||
LSsession :: addErrorCode('LSsession_05', 'LSsearch');
|
||||
LSsession :: displayTemplate();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -814,13 +817,13 @@ function handle_addon_view($request) {
|
|||
if (LSsession ::loadLSaddon($request -> LSaddon)) {
|
||||
if ( LSsession :: canAccessLSaddonView($request -> LSaddon, $request -> view) ) {
|
||||
LSsession :: showLSaddonView($request -> LSaddon, $request -> view);
|
||||
// Print template
|
||||
LSsession :: displayTemplate();
|
||||
}
|
||||
else {
|
||||
LSerror :: addErrorCode('LSsession_11');
|
||||
}
|
||||
}
|
||||
// Print template
|
||||
LSsession :: displayTemplate();
|
||||
}
|
||||
LSurl :: add_handler('#^addon/(?P<LSaddon>[^/]+)/(?P<view>[^/]+)$#', 'handle_addon_view');
|
||||
|
||||
|
|
Loading…
Reference in a new issue