mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-11 09:35:00 +00:00
pass instance of Access Operation to view
This commit is contained in:
parent
4f70b6822b
commit
4e2313d387
|
@ -27,6 +27,10 @@ include("../inc/inc.Language.php");
|
|||
include("../inc/inc.ClassUI.php");
|
||||
include("../inc/inc.Authentication.php");
|
||||
|
||||
$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 (!isset($_GET["folderid"]) || !is_numeric($_GET["folderid"]) || intval($_GET["folderid"])<1) {
|
||||
UI::exitError(getMLText("folder_title", array("foldername" => getMLText("invalid_folder_id"))),getMLText("invalid_folder_id"));
|
||||
}
|
||||
|
@ -60,8 +64,6 @@ if($settings->_libraryFolder) {
|
|||
$libfolder = null;
|
||||
}
|
||||
|
||||
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
|
||||
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user));
|
||||
if($view) {
|
||||
$view->setParam('folder', $folder);
|
||||
$view->setParam('strictformcheck', $settings->_strictFormCheck);
|
||||
|
@ -75,6 +77,7 @@ if($view) {
|
|||
$view->setParam('presetexpiration', $settings->_presetExpirationDate);
|
||||
$view->setParam('sortusersinlist', $settings->_sortUsersInList);
|
||||
$view->setParam('orderby', $settings->_sortFoldersDefault);
|
||||
$view->setParam('accessobject', $accessop);
|
||||
$view($_GET);
|
||||
exit;
|
||||
}
|
||||
|
|
|
@ -28,6 +28,10 @@ include("../inc/inc.DBInit.php");
|
|||
include("../inc/inc.ClassUI.php");
|
||||
include("../inc/inc.Authentication.php");
|
||||
|
||||
$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 (!isset($_GET["folderid"]) || !is_numeric($_GET["folderid"]) || intval($_GET["folderid"])<1) {
|
||||
UI::exitError(getMLText("folder_title", array("foldername" => getMLText("invalid_folder_id"))),getMLText("invalid_folder_id"));
|
||||
}
|
||||
|
@ -40,12 +44,11 @@ if ($folder->getAccessMode($user) < M_READWRITE) {
|
|||
UI::exitError(getMLText("folder_title", array("foldername" => htmlspecialchars($folder->getName()))),getMLText("access_denied"));
|
||||
}
|
||||
|
||||
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
|
||||
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user));
|
||||
if($view) {
|
||||
$view->setParam('folder', $folder);
|
||||
$view->setParam('strictformcheck', $settings->_strictFormCheck);
|
||||
$view->setParam('orderby', $settings->_sortFoldersDefault);
|
||||
$view->setParam('accessobject', $accessop);
|
||||
$view($_GET);
|
||||
exit;
|
||||
}
|
||||
|
|
|
@ -25,6 +25,10 @@ include("../inc/inc.ClassUI.php");
|
|||
include("../inc/inc.Calendar.php");
|
||||
include("../inc/inc.Authentication.php");
|
||||
|
||||
$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 ($user->isGuest()) {
|
||||
UI::exitError(getMLText("edit_event"),getMLText("access_denied"));
|
||||
}
|
||||
|
@ -42,11 +46,10 @@ if (($user->getID()!=$event["userID"])&&(!$user->isAdmin())){
|
|||
UI::exitError(getMLText("edit_event"),getMLText("access_denied"));
|
||||
}
|
||||
|
||||
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
|
||||
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user));
|
||||
if($view) {
|
||||
$view->setParam('event', $event);
|
||||
$view->setParam('strictformcheck', $settings->_strictFormCheck);
|
||||
$view->setParam('accessobject', $accessop);
|
||||
$view($_GET);
|
||||
exit;
|
||||
}
|
||||
|
|
|
@ -26,6 +26,10 @@ include("../inc/inc.DBInit.php");
|
|||
include("../inc/inc.ClassUI.php");
|
||||
include("../inc/inc.Authentication.php");
|
||||
|
||||
$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 (!isset($_GET["folderid"]) || !is_numeric($_GET["folderid"]) || intval($_GET["folderid"])<1) {
|
||||
UI::exitError(getMLText("folder_title", array("foldername" => getMLText("invalid_folder_id"))),getMLText("invalid_folder_id"));
|
||||
}
|
||||
|
@ -41,14 +45,13 @@ if ($folder->getAccessMode($user) < M_READWRITE) {
|
|||
|
||||
$attrdefs = $dms->getAllAttributeDefinitions(array(SeedDMS_Core_AttributeDefinition::objtype_folder, SeedDMS_Core_AttributeDefinition::objtype_all));
|
||||
|
||||
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
|
||||
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user));
|
||||
if($view) {
|
||||
$view->setParam('folder', $folder);
|
||||
$view->setParam('attrdefs', $attrdefs);
|
||||
$view->setParam('strictformcheck', $settings->_strictFormCheck);
|
||||
$view->setParam('rootfolderid', $settings->_rootFolderID);
|
||||
$view->setParam('orderby', $settings->_sortFoldersDefault);
|
||||
$view->setParam('accessobject', $accessop);
|
||||
$view($_GET);
|
||||
exit;
|
||||
}
|
||||
|
|
|
@ -27,6 +27,10 @@ include("../inc/inc.DBInit.php");
|
|||
include("../inc/inc.ClassUI.php");
|
||||
include("../inc/inc.Authentication.php");
|
||||
|
||||
$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 (!isset($_GET["folderid"]) || !is_numeric($_GET["folderid"]) || intval($_GET["folderid"])<1) {
|
||||
UI::exitError(getMLText("folder_title", array("foldername" => getMLText("invalid_folder_id"))),getMLText("invalid_folder_id"));
|
||||
}
|
||||
|
@ -43,13 +47,12 @@ if ($folder->getAccessMode($user) < M_ALL) {
|
|||
$allUsers = $dms->getAllUsers();
|
||||
$allGroups = $dms->getAllGroups();
|
||||
|
||||
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
|
||||
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user));
|
||||
if($view) {
|
||||
$view->setParam('folder', $folder);
|
||||
$view->setParam('allusers', $allUsers);
|
||||
$view->setParam('allgroups', $allGroups);
|
||||
$view->setParam('rootfolderid', $settings->_rootFolderID);
|
||||
$view->setParam('accessobject', $accessop);
|
||||
$view($_GET);
|
||||
exit;
|
||||
}
|
||||
|
|
|
@ -29,6 +29,7 @@ include("../inc/inc.Authentication.php");
|
|||
|
||||
$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 (!isset($_GET["folderid"]) || !is_numeric($_GET["folderid"]) || intval($_GET["folderid"])<1) {
|
||||
UI::exitError(getMLText("folder_title", array("foldername" => getMLText("invalid_folder_id"))),getMLText("invalid_folder_id"));
|
||||
|
@ -51,6 +52,7 @@ if($view) {
|
|||
$view->setParam('allusers', $allUsers);
|
||||
$view->setParam('allgroups', $allGroups);
|
||||
$view->setParam('strictformcheck', $settings->_strictFormCheck);
|
||||
$view->setParam('accessobject', $accessop);
|
||||
$view($_GET);
|
||||
exit;
|
||||
}
|
||||
|
|
|
@ -27,6 +27,10 @@ include("../inc/inc.DBInit.php");
|
|||
include("../inc/inc.ClassUI.php");
|
||||
include("../inc/inc.Authentication.php");
|
||||
|
||||
$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 (!isset($_GET["folderid"]) || !is_numeric($_GET["folderid"]) || intval($_GET["folderid"])<1) {
|
||||
UI::exitError(getMLText("folder_title", array("foldername" => getMLText("invalid_folder_id"))),getMLText("invalid_folder_id"));
|
||||
}
|
||||
|
@ -62,11 +66,10 @@ if(isset($_GET['targetid']) && $_GET['targetid']) {
|
|||
$target = null;
|
||||
}
|
||||
|
||||
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
|
||||
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user));
|
||||
if($view) {
|
||||
$view->setParam('folder', $folder);
|
||||
$view->setParam('target', $target);
|
||||
$view->setParam('accessobject', $accessop);
|
||||
$view($_GET);
|
||||
exit;
|
||||
}
|
||||
|
|
|
@ -26,6 +26,10 @@ include("../inc/inc.DBInit.php");
|
|||
include("../inc/inc.ClassUI.php");
|
||||
include("../inc/inc.Authentication.php");
|
||||
|
||||
$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 (!isset($_GET["folderid"]) || !is_numeric($_GET["folderid"]) || intval($_GET["folderid"])<1) {
|
||||
UI::exitError(getMLText("folder_title", array("foldername" => getMLText("invalid_folder_id"))),getMLText("invalid_folder_id"));
|
||||
}
|
||||
|
@ -44,10 +48,9 @@ if ($folder->getAccessMode($user) < M_ALL) {
|
|||
UI::exitError(getMLText("folder_title", array("foldername" => htmlspecialchars($folder->getName()))),getMLText("access_denied"));
|
||||
}
|
||||
|
||||
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
|
||||
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user));
|
||||
if($view) {
|
||||
$view->setParam('folder', $folder);
|
||||
$view->setParam('accessobject', $accessop);
|
||||
$view($_GET);
|
||||
exit;
|
||||
}
|
||||
|
|
|
@ -444,8 +444,17 @@ if(count($entries) == 1) {
|
|||
}
|
||||
} else {
|
||||
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
|
||||
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'query'=>$query, 'searchhits'=>$entries, 'totalpages'=>$totalPages, 'pagenumber'=>$pageNumber, 'searchtime'=>$searchTime, 'urlparams'=>$_GET, 'cachedir'=>$settings->_cacheDir));
|
||||
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user));
|
||||
$accessop = new SeedDMS_AccessOperation($dms, $user, $settings);
|
||||
if($view) {
|
||||
$view->setParam('accessobject', $accessop);
|
||||
$view->setParam('query', $query);
|
||||
$view->setParam('searchhits', $entries);
|
||||
$view->setParam('totalpages', $totalPages);
|
||||
$view->setParam('pagenumber', $pageNumber);
|
||||
$view->setParam('searchtime', $searchTime);
|
||||
$view->setParam('urlparams', $_GET);
|
||||
$view->setParam('cachedir', $settings->_cacheDir);
|
||||
$view->setParam('totaldocs', $dcount /*resArr['totalDocs']*/);
|
||||
$view->setParam('totalfolders', $fcount /*resArr['totalFolders']*/);
|
||||
$view->setParam('fullsearch', (isset($_GET["fullsearch"]) && $_GET["fullsearch"] && $settings->_enableFullSearch) ? true : false);
|
||||
|
|
|
@ -25,16 +25,19 @@ include("../inc/inc.DBInit.php");
|
|||
include("../inc/inc.ClassUI.php");
|
||||
include("../inc/inc.Authentication.php");
|
||||
|
||||
$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 ($user->isGuest()) {
|
||||
UI::exitError(getMLText("edit_default_keywords"),getMLText("access_denied"));
|
||||
}
|
||||
|
||||
$categories = $dms->getAllUserKeywordCategories($user->getID());
|
||||
|
||||
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
|
||||
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user));
|
||||
if($view) {
|
||||
$view->setParam('categories', $categories);
|
||||
$view->setParam('accessobject', $accessop);
|
||||
$view($_GET);
|
||||
exit;
|
||||
}
|
||||
|
|
|
@ -25,6 +25,9 @@ include("../inc/inc.ClassUI.php");
|
|||
include("../inc/inc.Calendar.php");
|
||||
include("../inc/inc.Authentication.php");
|
||||
|
||||
$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 (!isset($_GET["id"])){
|
||||
UI::exitError(getMLText("event_details"),getMLText("error_occured"));
|
||||
}
|
||||
|
@ -34,10 +37,9 @@ if (is_bool($event)&&!$event){
|
|||
UI::exitError(getMLText("event_details"),getMLText("error_occured"));
|
||||
}
|
||||
|
||||
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
|
||||
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user));
|
||||
if($view) {
|
||||
$view->setParam('event', $event);
|
||||
$view->setParam('accessobject', $accessop);
|
||||
$view($_GET);
|
||||
exit;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user