mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 15:32:13 +00:00
set parameter $plain for exitError() in case of an ajax call
This commit is contained in:
parent
58e52856b2
commit
8b9d4b98d5
|
@ -27,21 +27,22 @@ include("../inc/inc.DBInit.php");
|
|||
include("../inc/inc.ClassUI.php");
|
||||
include("../inc/inc.Authentication.php");
|
||||
|
||||
$isajax = isset($_GET['action']) && ($_GET['action'] == 'info' || $_GET['action'] == 'form');
|
||||
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
|
||||
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user));
|
||||
$accessop = new SeedDMS_AccessOperation($dms, $user, $settings);
|
||||
if (!$accessop->check_view_access($view, $_GET)) {
|
||||
UI::exitError(getMLText("admin_tools"),getMLText("access_denied"));
|
||||
UI::exitError(getMLText("admin_tools"),getMLText("access_denied"), false, $isajax);
|
||||
}
|
||||
|
||||
$allUsers = $dms->getAllUsers($settings->_sortUsersInList);
|
||||
if (is_bool($allUsers)) {
|
||||
UI::exitError(getMLText("admin_tools"),getMLText("internal_error"));
|
||||
UI::exitError(getMLText("admin_tools"),getMLText("internal_error"), false, $isajax);
|
||||
}
|
||||
|
||||
$allGroups = $dms->getAllGroups();
|
||||
if (is_bool($allGroups)) {
|
||||
UI::exitError(getMLText("admin_tools"),getMLText("internal_error"));
|
||||
UI::exitError(getMLText("admin_tools"),getMLText("internal_error"), false, $isajax);
|
||||
}
|
||||
|
||||
if(isset($_GET['groupid']) && $_GET['groupid']) {
|
||||
|
|
|
@ -31,15 +31,12 @@ include("../inc/inc.Authentication.php");
|
|||
*/
|
||||
require_once("SeedDMS/Preview.php");
|
||||
|
||||
$isajax = isset($_GET['action']) && ($_GET['action'] == 'items' || $_GET['action'] == 'form');
|
||||
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
|
||||
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user));
|
||||
$accessop = new SeedDMS_AccessOperation($dms, $user, $settings);
|
||||
if (!$accessop->check_view_access($view, $_GET)) {
|
||||
UI::exitError(getMLText("my_transmittals"),getMLText("access_denied"));
|
||||
}
|
||||
|
||||
if ($user->isGuest()) {
|
||||
UI::exitError(getMLText("my_transmittals"),getMLText("access_denied"));
|
||||
UI::exitError(getMLText("my_transmittals"),getMLText("access_denied"), false, $isajax);
|
||||
}
|
||||
|
||||
if(isset($_GET['transmittalid']) && $_GET['transmittalid']) {
|
||||
|
|
|
@ -27,26 +27,27 @@ include("../inc/inc.DBInit.php");
|
|||
include("../inc/inc.ClassUI.php");
|
||||
include("../inc/inc.Authentication.php");
|
||||
|
||||
$isajax = isset($_GET['action']) && ($_GET['action'] == 'info' || $_GET['action'] == 'form');
|
||||
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
|
||||
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user));
|
||||
$accessop = new SeedDMS_AccessOperation($dms, $user, $settings);
|
||||
if (!$accessop->check_view_access($view, $_GET)) {
|
||||
UI::exitError(getMLText("admin_tools"),getMLText("access_denied"));
|
||||
UI::exitError(getMLText("admin_tools"),getMLText("access_denied"), false, $isajax);
|
||||
}
|
||||
|
||||
$users = $dms->getAllUsers($settings->_sortUsersInList);
|
||||
if (is_bool($users)) {
|
||||
UI::exitError(getMLText("admin_tools"),getMLText("internal_error"));
|
||||
UI::exitError(getMLText("admin_tools"),getMLText("internal_error"), false, $isajax);
|
||||
}
|
||||
|
||||
$groups = $dms->getAllGroups();
|
||||
if (is_bool($groups)) {
|
||||
UI::exitError(getMLText("admin_tools"),getMLText("internal_error"));
|
||||
UI::exitError(getMLText("admin_tools"),getMLText("internal_error"), false, $isajax);
|
||||
}
|
||||
|
||||
$roles = $dms->getAllRoles();
|
||||
if (is_bool($roles)) {
|
||||
UI::exitError(getMLText("admin_tools"),getMLText("internal_error"));
|
||||
UI::exitError(getMLText("admin_tools"),getMLText("internal_error"), false, $isajax);
|
||||
}
|
||||
|
||||
if(isset($_GET['userid']) && $_GET['userid']) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user