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 */ /* Register another callback which removes the preview images of the document */
require_once("SeedDMS/Preview.php");
$previewer = new SeedDMS_Preview_Previewer($settings->_cacheDir); $previewer = new SeedDMS_Preview_Previewer($settings->_cacheDir);
$dms->addCallback('onPreRemoveDocument', 'SeedDMS_Controller_EmptyFolder::removePreviews', array($previewer)); $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); $result = $this->callHook('removeDocument', $document);
if($result === null) { if($result === null) {
require_once("SeedDMS/Preview.php");
$previewer = new SeedDMS_Preview_Previewer($settings->_cacheDir); $previewer = new SeedDMS_Preview_Previewer($settings->_cacheDir);
$previewer->deleteDocumentPreviews($document); $previewer->deleteDocumentPreviews($document);
if (!$document->remove()) { 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 */ /* Register another callback which removes the preview images of the document */
require_once("SeedDMS/Preview.php");
$previewer = new SeedDMS_Preview_Previewer($settings->_cacheDir); $previewer = new SeedDMS_Preview_Previewer($settings->_cacheDir);
$dms->addCallback('onPreRemoveDocument', 'SeedDMS_Controller_RemoveFolder::removePreviews', array($previewer)); $dms->addCallback('onPreRemoveDocument', 'SeedDMS_Controller_RemoveFolder::removePreviews', array($previewer));

View File

@ -48,7 +48,7 @@ if($settings->_enableFullSearch) {
$fulltextservice->setConversionMgr($conversionmgr); $fulltextservice->setConversionMgr($conversionmgr);
$fulltextservice->setMaxSize($settings->_maxSizeForFullText); $fulltextservice->setMaxSize($settings->_maxSizeForFullText);
$fulltextservice->setCmdTimeout($settings->_cmdTimeout); $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); $txtpreviewer = new SeedDMS_Preview_TxtPreviewer($settings->_cacheDir, $settings->_cmdTimeout, $settings->_enableXsendfile);
if($conversionmgr) if($conversionmgr)
$txtpreviewer->setConversionMgr($conversionmgr); $txtpreviewer->setConversionMgr($conversionmgr);

View File

@ -510,7 +510,6 @@ switch($command) {
$previewer->deleteDocumentPreviews($document); $previewer->deleteDocumentPreviews($document);
return null; return null;
} }
require_once("SeedDMS/Preview.php");
$previewer = new SeedDMS_Preview_Previewer($settings->_cacheDir); $previewer = new SeedDMS_Preview_Previewer($settings->_cacheDir);
$dms->addCallback('onPreRemoveDocument', 'removePreviews', array($previewer)); $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.ClassUI.php");
include("../inc/inc.Authentication.php"); include("../inc/inc.Authentication.php");
/**
* Include class to preview documents
*/
require_once("SeedDMS/Preview.php");
if (!isset($_GET["filename"])) { if (!isset($_GET["filename"])) {
exit; exit;
} }

View File

@ -30,11 +30,6 @@ include("../inc/inc.ClassUI.php");
include("../inc/inc.ClassController.php"); include("../inc/inc.ClassController.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']));
$controller = Controller::factory($tmp[1], array('dms'=>$dms, 'user'=>$user)); $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.ClassController.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']));
$controller = Controller::factory($tmp[1], array('dms'=>$dms, 'user'=>$user)); $controller = Controller::factory($tmp[1], array('dms'=>$dms, 'user'=>$user));

View File

@ -64,7 +64,6 @@ if($document->isLocked()) {
$folder = $document->getFolder(); $folder = $document->getFolder();
/* Remove all preview images. */ /* Remove all preview images. */
require_once("SeedDMS/Preview.php");
$previewer = new SeedDMS_Preview_Previewer($settings->_cacheDir); $previewer = new SeedDMS_Preview_Previewer($settings->_cacheDir);
$previewer->deleteDocumentPreviews($document); $previewer->deleteDocumentPreviews($document);

View File

@ -60,7 +60,6 @@ if (($document->getAccessMode($user, 'removeDocumentFile') < M_ALL)&&($user->get
} }
/* Remove preview image. */ /* Remove preview image. */
require_once("SeedDMS/Preview.php");
$previewer = new SeedDMS_Preview_Previewer($settings->_cacheDir); $previewer = new SeedDMS_Preview_Previewer($settings->_cacheDir);
$previewer->deletePreview($file, $settings->_previewWidthDetail); $previewer->deletePreview($file, $settings->_previewWidthDetail);

View File

@ -62,7 +62,7 @@ function removePreviews($arr, $document) {
$previewer->deleteDocumentPreviews($document); $previewer->deleteDocumentPreviews($document);
return null; return null;
} }
require_once("SeedDMS/Preview.php"); require_once("vendor/seeddms/preview/Preview.php");
$previewer = new SeedDMS_Preview_Previewer($settings->_cacheDir); $previewer = new SeedDMS_Preview_Previewer($settings->_cacheDir);
$dms->addCallback('onPreRemoveDocument', 'removePreviews', array($previewer)); $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")); UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_version"));
} }
require_once("SeedDMS/Preview.php");
$previewer = new SeedDMS_Preview_Previewer($settings->_cacheDir); $previewer = new SeedDMS_Preview_Previewer($settings->_cacheDir);
$folder = $document->getFolder(); $folder = $document->getFolder();
/* Check if there is just one version. In that case remove the document */ /* 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) { /* {{{ */ function getDocumentPreview($request, $response, $args) { /* {{{ */
require_once "SeedDMS/Preview.php";
$dms = $this->container->dms; $dms = $this->container->dms;
$userobj = $this->container->userobj; $userobj = $this->container->userobj;
$settings = $this->container->config; $settings = $this->container->config;

View File

@ -18,11 +18,6 @@
*/ */
//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 ApprovalSummary view * Class which outputs the html page for ApprovalSummary view
* *

View File

@ -18,11 +18,6 @@
*/ */
//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 AttributeMgr view * Class which outputs the html page for AttributeMgr view
* *

View File

@ -18,11 +18,6 @@
*/ */
//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 Calendar view * Class which outputs the html page for Calendar view
* *

View File

@ -18,11 +18,6 @@
*/ */
//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 Categories view * Class which outputs the html page for Categories view
* *

View File

@ -18,11 +18,6 @@
*/ */
//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 clipboard view * Class which outputs the html page for clipboard view
* *

View File

@ -18,11 +18,6 @@
*/ */
//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 DocumentVersionDetail view * Class which outputs the html page for DocumentVersionDetail view
* *

View File

@ -18,11 +18,6 @@
*/ */
//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 DropFolderChooser view * Class which outputs the html page for DropFolderChooser view
* *

View File

@ -18,11 +18,6 @@
*/ */
//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 ExpiredDocuments view * Class which outputs the html page for ExpiredDocuments view
* *

View File

@ -18,11 +18,6 @@
*/ */
//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 GroupMgr view * Class which outputs the html page for GroupMgr view
* *

View File

@ -18,11 +18,6 @@
*/ */
//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 ManageNotify view * Class which outputs the html page for ManageNotify view
* *

View File

@ -18,11 +18,6 @@
*/ */
//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 MyDocuments view * Class which outputs the html page for MyDocuments view
* *

View File

@ -18,11 +18,6 @@
*/ */
//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 ObjectCheck view * Class which outputs the html page for ObjectCheck view
* *

View File

@ -16,11 +16,6 @@
*/ */
//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 RemoveUserFromProcesses view * Class which outputs the html page for RemoveUserFromProcesses view
* *

View File

@ -18,11 +18,6 @@
*/ */
//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 ReviewSummary view * Class which outputs the html page for ReviewSummary view
* *

View File

@ -18,11 +18,6 @@
*/ */
//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 Search result view * Class which outputs the html page for Search result view
* *

View File

@ -18,11 +18,6 @@
*/ */
//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 clipboard view * Class which outputs the html page for clipboard view
* *

View File

@ -18,11 +18,6 @@
*/ */
//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 Timeline view * Class which outputs the html page for Timeline view
* *

View File

@ -18,11 +18,6 @@
*/ */
//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 ViewDocument view * Class which outputs the html page for ViewDocument view
* *

View File

@ -18,11 +18,6 @@
*/ */
//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 ViewFolder view * Class which outputs the html page for ViewFolder view
* *

View File

@ -18,11 +18,6 @@
*/ */
//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 WorkflowSummary view * Class which outputs the html page for WorkflowSummary view
* *