do not include SeedDMS/Preview.php anymore because it is included in inc.FulltextInit.php already

This commit is contained in:
Uwe Steinmann 2023-01-22 19:15:11 +01:00
parent 29cae0fb65
commit 5c985f32b1
33 changed files with 2 additions and 126 deletions

View File

@ -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));

View File

@ -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()) {

View File

@ -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));

View File

@ -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);

View File

@ -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));

View File

@ -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;
}

View File

@ -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));

View File

@ -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));

View File

@ -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);

View File

@ -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);

View File

@ -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));
*/

View File

@ -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 */

View File

@ -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;

View File

@ -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
*

View File

@ -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
*

View File

@ -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
*

View File

@ -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
*

View File

@ -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
*

View File

@ -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
*

View File

@ -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
*

View File

@ -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
*

View File

@ -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
*

View File

@ -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
*

View File

@ -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
*

View File

@ -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
*

View File

@ -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
*

View File

@ -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
*

View File

@ -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
*

View File

@ -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
*

View File

@ -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
*

View File

@ -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
*

View File

@ -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
*

View File

@ -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
*