check for documents with a link to themselves

This commit is contained in:
Uwe Steinmann 2024-04-28 19:38:10 +02:00
parent dc14fc5217
commit 0d0fc4e50a
2 changed files with 31 additions and 0 deletions

View File

@ -102,6 +102,10 @@ if(!isset($_GET['action']) || $_GET['action'] == 'listDuplicateSequence')
$duplicatesequences = $dms->getDuplicateSequenceNo(); $duplicatesequences = $dms->getDuplicateSequenceNo();
else else
$duplicatesequences = null; $duplicatesequences = null;
if(!isset($_GET['action']) || $_GET['action'] == 'listLinkToItself')
$docslinktoitself = $dms->getLinksToItself();
else
$docslinktoitself = null;
$processwithoutusergroup = array(); $processwithoutusergroup = array();
foreach(array('review', 'approval', 'receipt', 'revision') as $process) { foreach(array('review', 'approval', 'receipt', 'revision') as $process) {
foreach(array('user', 'group') as $ug) { foreach(array('user', 'group') as $ug) {
@ -256,6 +260,7 @@ if($view) {
$view->setParam('wrongfiletypeversions', $wrongfiletypeversions); $view->setParam('wrongfiletypeversions', $wrongfiletypeversions);
$view->setParam('duplicateversions', $duplicateversions); $view->setParam('duplicateversions', $duplicateversions);
$view->setParam('duplicatesequences', $duplicatesequences); $view->setParam('duplicatesequences', $duplicatesequences);
$view->setParam('docslinktoitself', $docslinktoitself);
$view->setParam('docsinrevisionnoaccess', $docsinrevisionnoaccess); $view->setParam('docsinrevisionnoaccess', $docsinrevisionnoaccess);
$view->setParam('docsinrevisiondisabled', $docsinrevisiondisabled); $view->setParam('docsinrevisiondisabled', $docsinrevisiondisabled);
$view->setParam('docsmissingrevsiondate', $docsmissingrevsiondate); $view->setParam('docsmissingrevsiondate', $docsmissingrevsiondate);

View File

@ -470,6 +470,30 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Theme_Style {
} }
} /* }}} */ } /* }}} */
function listLinkToItself() { /* {{{ */
$dms = $this->params['dms'];
$user = $this->params['user'];
$folder = $this->params['folder'];
$docslinktoitself = $this->params['docslinktoitself'];
$conversionmgr = $this->params['conversionmgr'];
$cachedir = $this->params['cachedir'];
$previewwidth = $this->params['previewWidthList'];
$previewconverters = $this->params['previewConverters'];
$timeout = $this->params['timeout'];
$previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidth, $timeout);
if($conversionmgr)
$previewer->setConversionMgr($conversionmgr);
else
$previewer->setConverters($previewconverters);
$this->contentHeading(getMLText("docs_with_link_to_itself"));
if($docslinktoitself) {
$this->printList($docslinktoitself, $previewer);
}
} /* }}} */
function listDocsInRevisionNoAccess() { /* {{{ */ function listDocsInRevisionNoAccess() { /* {{{ */
$dms = $this->params['dms']; $dms = $this->params['dms'];
$user = $this->params['user']; $user = $this->params['user'];
@ -722,6 +746,7 @@ $(document).ready( function() {
$nochecksumversions = $this->params['nochecksumversions']; $nochecksumversions = $this->params['nochecksumversions'];
$duplicateversions = $this->params['duplicateversions']; $duplicateversions = $this->params['duplicateversions'];
$duplicatesequences = $this->params['duplicatesequences']; $duplicatesequences = $this->params['duplicatesequences'];
$docslinktoitself = $this->params['docslinktoitself'];
$docsinrevisionnoaccess = $this->params['docsinrevisionnoaccess']; $docsinrevisionnoaccess = $this->params['docsinrevisionnoaccess'];
$docsinrevisiondisabled = $this->params['docsinrevisiondisabled']; $docsinrevisiondisabled = $this->params['docsinrevisiondisabled'];
$docsinreceptionnoaccess = $this->params['docsinreceptionnoaccess']; $docsinreceptionnoaccess = $this->params['docsinreceptionnoaccess'];
@ -759,6 +784,7 @@ $(document).ready( function() {
$menuitems = []; $menuitems = [];
$menuitems[] = array('label'=>getMLText('duplicate_content'), 'badge'=>count($duplicateversions), 'attributes'=>array(array('data-href', "#duplicate_content"), array('data-action', "listDuplicateContent"))); $menuitems[] = array('label'=>getMLText('duplicate_content'), 'badge'=>count($duplicateversions), 'attributes'=>array(array('data-href', "#duplicate_content"), array('data-action', "listDuplicateContent")));
$menuitems[] = array('label'=>getMLText('duplicate_sequences'), 'badge'=>count($duplicatesequences), 'attributes'=>array(array('data-href', "#duplicate_sequences"), array('data-action', "listDuplicateSequence"))); $menuitems[] = array('label'=>getMLText('duplicate_sequences'), 'badge'=>count($duplicatesequences), 'attributes'=>array(array('data-href', "#duplicate_sequences"), array('data-action', "listDuplicateSequence")));
$menuitems[] = array('label'=>getMLText('link_to_itself'), 'badge'=>count($docslinktoitself), 'attributes'=>array(array('data-href', "#link_to_itself"), array('data-action', "listLinkToItself")));
$menuitems[] = array('label'=>getMLText('docs_in_revision_no_access'), 'badge'=>count($docsinrevisionnoaccess), 'attributes'=>array(array('data-href', "#inrevision_no_access"), array('data-action', "listDocsInRevisionNoAccess"))); $menuitems[] = array('label'=>getMLText('docs_in_revision_no_access'), 'badge'=>count($docsinrevisionnoaccess), 'attributes'=>array(array('data-href', "#inrevision_no_access"), array('data-action', "listDocsInRevisionNoAccess")));
$menuitems[] = array('label'=>getMLText('docs_in_revision_disabled'), 'badge'=>count($docsinrevisiondisabled), 'attributes'=>array(array('data-href', "#inrevision_disabled"), array('data-action', "listDocsInRevisionDisabled"))); $menuitems[] = array('label'=>getMLText('docs_in_revision_disabled'), 'badge'=>count($docsinrevisiondisabled), 'attributes'=>array(array('data-href', "#inrevision_disabled"), array('data-action', "listDocsInRevisionDisabled")));
$menuitems[] = array('label'=>getMLText('docs_in_reception_no_access'), 'badge'=>count($docsinreceptionnoaccess), 'attributes'=>array(array('data-href', "#inreception_no_access"), array('data-action', "listDocsInReceptionNoAccess"))); $menuitems[] = array('label'=>getMLText('docs_in_reception_no_access'), 'badge'=>count($docsinreceptionnoaccess), 'attributes'=>array(array('data-href', "#inreception_no_access"), array('data-action', "listDocsInReceptionNoAccess")));