include LogInit, move incluѕion of Preview.php into view

This commit is contained in:
Uwe Steinmann 2018-02-05 08:57:05 +01:00
parent 2ad6a04965
commit 51f3416c70
2 changed files with 7 additions and 5 deletions

View File

@ -20,6 +20,7 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php"); include("../inc/inc.Settings.php");
include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php"); include("../inc/inc.Language.php");
include("../inc/inc.Init.php"); include("../inc/inc.Init.php");
include("../inc/inc.Extension.php"); include("../inc/inc.Extension.php");
@ -27,11 +28,6 @@ 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");
/**
* Include class to preview documents
*/
require_once("SeedDMS/Preview.php");
$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);
@ -41,6 +37,7 @@ if ($user->isGuest()) {
} }
if($view) { if($view) {
$view->setParam('showtree', showtree());
$view->setParam('cachedir', $settings->_cacheDir); $view->setParam('cachedir', $settings->_cacheDir);
$view->setParam('previewWidthList', $settings->_previewWidthList); $view->setParam('previewWidthList', $settings->_previewWidthList);
$view->setParam('previewconverters', $settings->_converters['preview']); $view->setParam('previewconverters', $settings->_converters['preview']);

View File

@ -18,6 +18,11 @@
*/ */
require_once("class.Bootstrap.php"); require_once("class.Bootstrap.php");
/**
* Include class to preview documents
*/
require_once("SeedDMS/Preview.php");
/** /**
* Class which outputs the html page for ReceiptSummary view * Class which outputs the html page for ReceiptSummary view
* *