use setParam() instead of passing array to view

This commit is contained in:
Uwe Steinmann 2016-04-22 12:28:19 +02:00
parent 8b3289aa8a
commit 00e45dd63a

View File

@ -59,8 +59,18 @@ $folder = $document->getFolder();
$accessop = new SeedDMS_AccessOperation($document, $user, $settings);
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'folder'=>$folder, 'document'=>$document, 'strictformcheck'=>$settings->_strictFormCheck, 'enablelargefileupload'=>$settings->_enableLargeFileUpload, 'enableadminrevapp'=>$settings->_enableAdminRevApp, 'enableownerrevapp'=>$settings->_enableOwnerRevApp, 'enableselfrevapp'=>$settings->_enableSelfRevApp, 'dropfolderdir'=>$settings->_dropFolderDir, 'workflowmode'=>$settings->_workflowMode, 'presetexpiration'=>$settings->_presetExpirationDate));
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user));
if($view) {
$view->setParam('folder', $folder);
$view->setParam('document', $document);
$view->setParam('strictformcheck', $settings->_strictFormCheck);
$view->setParam('enablelargefileupload', $settings->_enableLargeFileUpload);
$view->setParam('enableadminrevapp', $settings->_enableAdminRevApp);
$view->setParam('enableownerrevapp', $settings->_enableOwnerRevApp);
$view->setParam('enableselfrevapp', $settings->_enableSelfRevApp);
$view->setParam('dropfolderdir', $settings->_dropFolderDir);
$view->setParam('workflowmode', $settings->_workflowMode);
$view->setParam('presetexpiration', $settings->_presetExpirationDate);
$view->setParam('accessobject', $accessop);
$view($_GET);
exit;