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.ClassUI.php");
|
||||||
include("../inc/inc.Authentication.php");
|
include("../inc/inc.Authentication.php");
|
||||||
|
|
||||||
|
$isajax = isset($_GET['action']) && ($_GET['action'] == 'info' || $_GET['action'] == 'form');
|
||||||
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
|
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
|
||||||
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user));
|
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user));
|
||||||
$accessop = new SeedDMS_AccessOperation($dms, $user, $settings);
|
$accessop = new SeedDMS_AccessOperation($dms, $user, $settings);
|
||||||
if (!$accessop->check_view_access($view, $_GET)) {
|
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);
|
$allUsers = $dms->getAllUsers($settings->_sortUsersInList);
|
||||||
if (is_bool($allUsers)) {
|
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();
|
$allGroups = $dms->getAllGroups();
|
||||||
if (is_bool($allGroups)) {
|
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']) {
|
if(isset($_GET['groupid']) && $_GET['groupid']) {
|
||||||
|
|
|
@ -31,15 +31,12 @@ include("../inc/inc.Authentication.php");
|
||||||
*/
|
*/
|
||||||
require_once("SeedDMS/Preview.php");
|
require_once("SeedDMS/Preview.php");
|
||||||
|
|
||||||
|
$isajax = isset($_GET['action']) && ($_GET['action'] == 'items' || $_GET['action'] == 'form');
|
||||||
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
|
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
|
||||||
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user));
|
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user));
|
||||||
$accessop = new SeedDMS_AccessOperation($dms, $user, $settings);
|
$accessop = new SeedDMS_AccessOperation($dms, $user, $settings);
|
||||||
if (!$accessop->check_view_access($view, $_GET)) {
|
if (!$accessop->check_view_access($view, $_GET)) {
|
||||||
UI::exitError(getMLText("my_transmittals"),getMLText("access_denied"));
|
UI::exitError(getMLText("my_transmittals"),getMLText("access_denied"), false, $isajax);
|
||||||
}
|
|
||||||
|
|
||||||
if ($user->isGuest()) {
|
|
||||||
UI::exitError(getMLText("my_transmittals"),getMLText("access_denied"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($_GET['transmittalid']) && $_GET['transmittalid']) {
|
if(isset($_GET['transmittalid']) && $_GET['transmittalid']) {
|
||||||
|
|
|
@ -27,26 +27,27 @@ include("../inc/inc.DBInit.php");
|
||||||
include("../inc/inc.ClassUI.php");
|
include("../inc/inc.ClassUI.php");
|
||||||
include("../inc/inc.Authentication.php");
|
include("../inc/inc.Authentication.php");
|
||||||
|
|
||||||
|
$isajax = isset($_GET['action']) && ($_GET['action'] == 'info' || $_GET['action'] == 'form');
|
||||||
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
|
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
|
||||||
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user));
|
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user));
|
||||||
$accessop = new SeedDMS_AccessOperation($dms, $user, $settings);
|
$accessop = new SeedDMS_AccessOperation($dms, $user, $settings);
|
||||||
if (!$accessop->check_view_access($view, $_GET)) {
|
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);
|
$users = $dms->getAllUsers($settings->_sortUsersInList);
|
||||||
if (is_bool($users)) {
|
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();
|
$groups = $dms->getAllGroups();
|
||||||
if (is_bool($groups)) {
|
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();
|
$roles = $dms->getAllRoles();
|
||||||
if (is_bool($roles)) {
|
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']) {
|
if(isset($_GET['userid']) && $_GET['userid']) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user