From 5c985f32b1bee55e5e903b73a396700c948d3f0d Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sun, 22 Jan 2023 19:15:11 +0100 Subject: [PATCH] do not include SeedDMS/Preview.php anymore because it is included in inc.FulltextInit.php already --- controllers/class.EmptyFolder.php | 1 - controllers/class.RemoveDocument.php | 1 - controllers/class.RemoveFolder.php | 1 - inc/inc.FulltextInit.php | 2 +- op/op.Ajax.php | 1 - op/op.DropFolderPreview.php | 5 ----- op/op.PdfPreview.php | 5 ----- op/op.Preview.php | 5 ----- op/op.RemoveDocument.php | 1 - op/op.RemoveDocumentFile.php | 1 - op/op.RemoveFolder.php | 2 +- op/op.RemoveVersion.php | 1 - restapi/index.php | 2 -- views/bootstrap/class.ApprovalSummary.php | 5 ----- views/bootstrap/class.AttributeMgr.php | 5 ----- views/bootstrap/class.Calendar.php | 5 ----- views/bootstrap/class.Categories.php | 5 ----- views/bootstrap/class.Clipboard.php | 5 ----- views/bootstrap/class.DocumentVersionDetail.php | 5 ----- views/bootstrap/class.DropFolderChooser.php | 5 ----- views/bootstrap/class.ExpiredDocuments.php | 5 ----- views/bootstrap/class.GroupMgr.php | 5 ----- views/bootstrap/class.ManageNotify.php | 5 ----- views/bootstrap/class.MyDocuments.php | 5 ----- views/bootstrap/class.ObjectCheck.php | 5 ----- views/bootstrap/class.RemoveUserFromProcesses.php | 5 ----- views/bootstrap/class.ReviewSummary.php | 5 ----- views/bootstrap/class.Search.php | 5 ----- views/bootstrap/class.Tasks.php | 5 ----- views/bootstrap/class.Timeline.php | 5 ----- views/bootstrap/class.ViewDocument.php | 5 ----- views/bootstrap/class.ViewFolder.php | 5 ----- views/bootstrap/class.WorkflowSummary.php | 5 ----- 33 files changed, 2 insertions(+), 126 deletions(-) diff --git a/controllers/class.EmptyFolder.php b/controllers/class.EmptyFolder.php index eb1c5a629..4fdc7ef62 100644 --- a/controllers/class.EmptyFolder.php +++ b/controllers/class.EmptyFolder.php @@ -77,7 +77,6 @@ class SeedDMS_Controller_EmptyFolder extends SeedDMS_Controller_Common { } /* Register another callback which removes the preview images of the document */ - require_once("SeedDMS/Preview.php"); $previewer = new SeedDMS_Preview_Previewer($settings->_cacheDir); $dms->addCallback('onPreRemoveDocument', 'SeedDMS_Controller_EmptyFolder::removePreviews', array($previewer)); diff --git a/controllers/class.RemoveDocument.php b/controllers/class.RemoveDocument.php index 56e165e6a..96a5c1bb3 100644 --- a/controllers/class.RemoveDocument.php +++ b/controllers/class.RemoveDocument.php @@ -43,7 +43,6 @@ class SeedDMS_Controller_RemoveDocument extends SeedDMS_Controller_Common { $result = $this->callHook('removeDocument', $document); if($result === null) { - require_once("SeedDMS/Preview.php"); $previewer = new SeedDMS_Preview_Previewer($settings->_cacheDir); $previewer->deleteDocumentPreviews($document); if (!$document->remove()) { diff --git a/controllers/class.RemoveFolder.php b/controllers/class.RemoveFolder.php index ac64f246a..6b3a8fc73 100644 --- a/controllers/class.RemoveFolder.php +++ b/controllers/class.RemoveFolder.php @@ -77,7 +77,6 @@ class SeedDMS_Controller_RemoveFolder extends SeedDMS_Controller_Common { } /* Register another callback which removes the preview images of the document */ - require_once("SeedDMS/Preview.php"); $previewer = new SeedDMS_Preview_Previewer($settings->_cacheDir); $dms->addCallback('onPreRemoveDocument', 'SeedDMS_Controller_RemoveFolder::removePreviews', array($previewer)); diff --git a/inc/inc.FulltextInit.php b/inc/inc.FulltextInit.php index 5433c8f83..450086571 100644 --- a/inc/inc.FulltextInit.php +++ b/inc/inc.FulltextInit.php @@ -48,7 +48,7 @@ if($settings->_enableFullSearch) { $fulltextservice->setConversionMgr($conversionmgr); $fulltextservice->setMaxSize($settings->_maxSizeForFullText); $fulltextservice->setCmdTimeout($settings->_cmdTimeout); - require_once("SeedDMS/Preview.php"); +// require_once("vendor/seeddms/preview/Preview.php"); $txtpreviewer = new SeedDMS_Preview_TxtPreviewer($settings->_cacheDir, $settings->_cmdTimeout, $settings->_enableXsendfile); if($conversionmgr) $txtpreviewer->setConversionMgr($conversionmgr); diff --git a/op/op.Ajax.php b/op/op.Ajax.php index f4c5ad884..9999186b8 100644 --- a/op/op.Ajax.php +++ b/op/op.Ajax.php @@ -510,7 +510,6 @@ switch($command) { $previewer->deleteDocumentPreviews($document); return null; } - require_once("SeedDMS/Preview.php"); $previewer = new SeedDMS_Preview_Previewer($settings->_cacheDir); $dms->addCallback('onPreRemoveDocument', 'removePreviews', array($previewer)); diff --git a/op/op.DropFolderPreview.php b/op/op.DropFolderPreview.php index 96f2209d1..b70d01e6a 100644 --- a/op/op.DropFolderPreview.php +++ b/op/op.DropFolderPreview.php @@ -29,11 +29,6 @@ include("../inc/inc.DBInit.php"); include("../inc/inc.ClassUI.php"); include("../inc/inc.Authentication.php"); -/** - * Include class to preview documents - */ -require_once("SeedDMS/Preview.php"); - if (!isset($_GET["filename"])) { exit; } diff --git a/op/op.PdfPreview.php b/op/op.PdfPreview.php index 4b963426f..178470706 100644 --- a/op/op.PdfPreview.php +++ b/op/op.PdfPreview.php @@ -30,11 +30,6 @@ include("../inc/inc.ClassUI.php"); include("../inc/inc.ClassController.php"); include("../inc/inc.Authentication.php"); -/** - * Include class to preview documents - */ -require_once("SeedDMS/Preview.php"); - $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); $controller = Controller::factory($tmp[1], array('dms'=>$dms, 'user'=>$user)); diff --git a/op/op.Preview.php b/op/op.Preview.php index 3ded08099..9ceacf462 100644 --- a/op/op.Preview.php +++ b/op/op.Preview.php @@ -30,11 +30,6 @@ include("../inc/inc.ClassUI.php"); include("../inc/inc.ClassController.php"); include("../inc/inc.Authentication.php"); -/** - * Include class to preview documents - */ -require_once("SeedDMS/Preview.php"); - $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); $controller = Controller::factory($tmp[1], array('dms'=>$dms, 'user'=>$user)); diff --git a/op/op.RemoveDocument.php b/op/op.RemoveDocument.php index e889dbf14..93ef70497 100644 --- a/op/op.RemoveDocument.php +++ b/op/op.RemoveDocument.php @@ -64,7 +64,6 @@ if($document->isLocked()) { $folder = $document->getFolder(); /* Remove all preview images. */ -require_once("SeedDMS/Preview.php"); $previewer = new SeedDMS_Preview_Previewer($settings->_cacheDir); $previewer->deleteDocumentPreviews($document); diff --git a/op/op.RemoveDocumentFile.php b/op/op.RemoveDocumentFile.php index 5d16b9b39..4a8df3033 100644 --- a/op/op.RemoveDocumentFile.php +++ b/op/op.RemoveDocumentFile.php @@ -60,7 +60,6 @@ if (($document->getAccessMode($user, 'removeDocumentFile') < M_ALL)&&($user->get } /* Remove preview image. */ -require_once("SeedDMS/Preview.php"); $previewer = new SeedDMS_Preview_Previewer($settings->_cacheDir); $previewer->deletePreview($file, $settings->_previewWidthDetail); diff --git a/op/op.RemoveFolder.php b/op/op.RemoveFolder.php index 312945ea1..8f5f0c9e7 100644 --- a/op/op.RemoveFolder.php +++ b/op/op.RemoveFolder.php @@ -62,7 +62,7 @@ function removePreviews($arr, $document) { $previewer->deleteDocumentPreviews($document); return null; } -require_once("SeedDMS/Preview.php"); +require_once("vendor/seeddms/preview/Preview.php"); $previewer = new SeedDMS_Preview_Previewer($settings->_cacheDir); $dms->addCallback('onPreRemoveDocument', 'removePreviews', array($previewer)); */ diff --git a/op/op.RemoveVersion.php b/op/op.RemoveVersion.php index 0d9045a24..8c224209a 100644 --- a/op/op.RemoveVersion.php +++ b/op/op.RemoveVersion.php @@ -62,7 +62,6 @@ if (!is_object($version)) { UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_version")); } -require_once("SeedDMS/Preview.php"); $previewer = new SeedDMS_Preview_Previewer($settings->_cacheDir); $folder = $document->getFolder(); /* Check if there is just one version. In that case remove the document */ diff --git a/restapi/index.php b/restapi/index.php index 215674dc9..ae2021838 100644 --- a/restapi/index.php +++ b/restapi/index.php @@ -1392,8 +1392,6 @@ class RestapiController { /* {{{ */ } /* }}} */ function getDocumentPreview($request, $response, $args) { /* {{{ */ - require_once "SeedDMS/Preview.php"; - $dms = $this->container->dms; $userobj = $this->container->userobj; $settings = $this->container->config; diff --git a/views/bootstrap/class.ApprovalSummary.php b/views/bootstrap/class.ApprovalSummary.php index 21233bd98..02350de30 100644 --- a/views/bootstrap/class.ApprovalSummary.php +++ b/views/bootstrap/class.ApprovalSummary.php @@ -18,11 +18,6 @@ */ //require_once("class.Bootstrap.php"); -/** - * Include class to preview documents - */ -require_once("SeedDMS/Preview.php"); - /** * Class which outputs the html page for ApprovalSummary view * diff --git a/views/bootstrap/class.AttributeMgr.php b/views/bootstrap/class.AttributeMgr.php index 9864705f6..f73a40589 100644 --- a/views/bootstrap/class.AttributeMgr.php +++ b/views/bootstrap/class.AttributeMgr.php @@ -18,11 +18,6 @@ */ //require_once("class.Bootstrap.php"); -/** - * Include class to preview documents - */ -require_once("SeedDMS/Preview.php"); - /** * Class which outputs the html page for AttributeMgr view * diff --git a/views/bootstrap/class.Calendar.php b/views/bootstrap/class.Calendar.php index 5cae5f01e..504801f28 100644 --- a/views/bootstrap/class.Calendar.php +++ b/views/bootstrap/class.Calendar.php @@ -18,11 +18,6 @@ */ //require_once("class.Bootstrap.php"); -/** - * Include class to preview documents - */ -require_once("SeedDMS/Preview.php"); - /** * Class which outputs the html page for Calendar view * diff --git a/views/bootstrap/class.Categories.php b/views/bootstrap/class.Categories.php index 35f775cca..356ed03db 100644 --- a/views/bootstrap/class.Categories.php +++ b/views/bootstrap/class.Categories.php @@ -18,11 +18,6 @@ */ //require_once("class.Bootstrap.php"); -/** - * Include class to preview documents - */ -require_once("SeedDMS/Preview.php"); - /** * Class which outputs the html page for Categories view * diff --git a/views/bootstrap/class.Clipboard.php b/views/bootstrap/class.Clipboard.php index cab5ce739..1f157e88d 100644 --- a/views/bootstrap/class.Clipboard.php +++ b/views/bootstrap/class.Clipboard.php @@ -18,11 +18,6 @@ */ //require_once("class.Bootstrap.php"); -/** - * Include class to preview documents - */ -require_once("SeedDMS/Preview.php"); - /** * Class which outputs the html page for clipboard view * diff --git a/views/bootstrap/class.DocumentVersionDetail.php b/views/bootstrap/class.DocumentVersionDetail.php index 541621f86..9ea58444e 100644 --- a/views/bootstrap/class.DocumentVersionDetail.php +++ b/views/bootstrap/class.DocumentVersionDetail.php @@ -18,11 +18,6 @@ */ //require_once("class.Bootstrap.php"); -/** - * Include class to preview documents - */ -require_once("SeedDMS/Preview.php"); - /** * Class which outputs the html page for DocumentVersionDetail view * diff --git a/views/bootstrap/class.DropFolderChooser.php b/views/bootstrap/class.DropFolderChooser.php index bae2b04da..8cc315669 100644 --- a/views/bootstrap/class.DropFolderChooser.php +++ b/views/bootstrap/class.DropFolderChooser.php @@ -18,11 +18,6 @@ */ //require_once("class.Bootstrap.php"); -/** - * Include class to preview documents - */ -require_once("SeedDMS/Preview.php"); - /** * Class which outputs the html page for DropFolderChooser view * diff --git a/views/bootstrap/class.ExpiredDocuments.php b/views/bootstrap/class.ExpiredDocuments.php index 4c3aacc61..d16cca9c4 100644 --- a/views/bootstrap/class.ExpiredDocuments.php +++ b/views/bootstrap/class.ExpiredDocuments.php @@ -18,11 +18,6 @@ */ //require_once("class.Bootstrap.php"); -/** - * Include class to preview documents - */ -require_once("SeedDMS/Preview.php"); - /** * Class which outputs the html page for ExpiredDocuments view * diff --git a/views/bootstrap/class.GroupMgr.php b/views/bootstrap/class.GroupMgr.php index 3330fe46c..fa53d78dd 100644 --- a/views/bootstrap/class.GroupMgr.php +++ b/views/bootstrap/class.GroupMgr.php @@ -18,11 +18,6 @@ */ //require_once("class.Bootstrap.php"); -/** - * Include class to preview documents - */ -require_once("SeedDMS/Preview.php"); - /** * Class which outputs the html page for GroupMgr view * diff --git a/views/bootstrap/class.ManageNotify.php b/views/bootstrap/class.ManageNotify.php index 533159659..72af7a5a2 100644 --- a/views/bootstrap/class.ManageNotify.php +++ b/views/bootstrap/class.ManageNotify.php @@ -18,11 +18,6 @@ */ //require_once("class.Bootstrap.php"); -/** - * Include class to preview documents - */ -require_once("SeedDMS/Preview.php"); - /** * Class which outputs the html page for ManageNotify view * diff --git a/views/bootstrap/class.MyDocuments.php b/views/bootstrap/class.MyDocuments.php index 4e000f217..5509b4274 100644 --- a/views/bootstrap/class.MyDocuments.php +++ b/views/bootstrap/class.MyDocuments.php @@ -18,11 +18,6 @@ */ //require_once("class.Bootstrap.php"); -/** - * Include class to preview documents - */ -require_once("SeedDMS/Preview.php"); - /** * Class which outputs the html page for MyDocuments view * diff --git a/views/bootstrap/class.ObjectCheck.php b/views/bootstrap/class.ObjectCheck.php index fba181150..b10565f5b 100644 --- a/views/bootstrap/class.ObjectCheck.php +++ b/views/bootstrap/class.ObjectCheck.php @@ -18,11 +18,6 @@ */ //require_once("class.Bootstrap.php"); -/** - * Include class to preview documents - */ -require_once("SeedDMS/Preview.php"); - /** * Class which outputs the html page for ObjectCheck view * diff --git a/views/bootstrap/class.RemoveUserFromProcesses.php b/views/bootstrap/class.RemoveUserFromProcesses.php index 3dceb9835..7fbcbfff4 100644 --- a/views/bootstrap/class.RemoveUserFromProcesses.php +++ b/views/bootstrap/class.RemoveUserFromProcesses.php @@ -16,11 +16,6 @@ */ //require_once("class.Bootstrap.php"); -/** - * Include class to preview documents - */ -require_once("SeedDMS/Preview.php"); - /** * Class which outputs the html page for RemoveUserFromProcesses view * diff --git a/views/bootstrap/class.ReviewSummary.php b/views/bootstrap/class.ReviewSummary.php index a3e62a25e..60d6ad838 100644 --- a/views/bootstrap/class.ReviewSummary.php +++ b/views/bootstrap/class.ReviewSummary.php @@ -18,11 +18,6 @@ */ //require_once("class.Bootstrap.php"); -/** - * Include class to preview documents - */ -require_once("SeedDMS/Preview.php"); - /** * Class which outputs the html page for ReviewSummary view * diff --git a/views/bootstrap/class.Search.php b/views/bootstrap/class.Search.php index 9d947d802..72e70b053 100644 --- a/views/bootstrap/class.Search.php +++ b/views/bootstrap/class.Search.php @@ -18,11 +18,6 @@ */ //require_once("class.Bootstrap.php"); -/** - * Include class to preview documents - */ -require_once("SeedDMS/Preview.php"); - /** * Class which outputs the html page for Search result view * diff --git a/views/bootstrap/class.Tasks.php b/views/bootstrap/class.Tasks.php index b30b5ad79..ee111f4a3 100644 --- a/views/bootstrap/class.Tasks.php +++ b/views/bootstrap/class.Tasks.php @@ -18,11 +18,6 @@ */ //require_once("class.Bootstrap.php"); -/** - * Include class to preview documents - */ -require_once("SeedDMS/Preview.php"); - /** * Class which outputs the html page for clipboard view * diff --git a/views/bootstrap/class.Timeline.php b/views/bootstrap/class.Timeline.php index 93732e9dc..a23870530 100644 --- a/views/bootstrap/class.Timeline.php +++ b/views/bootstrap/class.Timeline.php @@ -18,11 +18,6 @@ */ //require_once("class.Bootstrap.php"); -/** - * Include class to preview documents - */ -require_once("SeedDMS/Preview.php"); - /** * Class which outputs the html page for Timeline view * diff --git a/views/bootstrap/class.ViewDocument.php b/views/bootstrap/class.ViewDocument.php index 06614a509..a229be4a9 100644 --- a/views/bootstrap/class.ViewDocument.php +++ b/views/bootstrap/class.ViewDocument.php @@ -18,11 +18,6 @@ */ //require_once("class.Bootstrap.php"); -/** - * Include class to preview documents - */ -require_once("SeedDMS/Preview.php"); - /** * Class which outputs the html page for ViewDocument view * diff --git a/views/bootstrap/class.ViewFolder.php b/views/bootstrap/class.ViewFolder.php index 9827acd10..75c2f8838 100644 --- a/views/bootstrap/class.ViewFolder.php +++ b/views/bootstrap/class.ViewFolder.php @@ -18,11 +18,6 @@ */ //require_once("class.Bootstrap.php"); -/** - * Include class to preview documents - */ -require_once("SeedDMS/Preview.php"); - /** * Class which outputs the html page for ViewFolder view * diff --git a/views/bootstrap/class.WorkflowSummary.php b/views/bootstrap/class.WorkflowSummary.php index e4bf58631..b73f9eab3 100644 --- a/views/bootstrap/class.WorkflowSummary.php +++ b/views/bootstrap/class.WorkflowSummary.php @@ -18,11 +18,6 @@ */ //require_once("class.Bootstrap.php"); -/** - * Include class to preview documents - */ -require_once("SeedDMS/Preview.php"); - /** * Class which outputs the html page for WorkflowSummary view *