mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-12 08:55:54 +00:00
Merge branch 'seeddms-4.3.x' into seeddms-5.0.x
This commit is contained in:
commit
d0b9084ad6
|
@ -2127,6 +2127,34 @@ class SeedDMS_Core_DMS {
|
||||||
|
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a list of reviews, approvals which are not linked
|
||||||
|
* to a user, group anymore
|
||||||
|
*
|
||||||
|
* This method is for finding reviews or approvals whose user
|
||||||
|
* or group was deleted and not just removed from the process.
|
||||||
|
*/
|
||||||
|
function getProcessWithoutUserGroup($process, $usergroup) { /* {{{ */
|
||||||
|
switch($process) {
|
||||||
|
case 'review':
|
||||||
|
$queryStr = "SELECT a.*, b.name FROM tblDocumentReviewers";
|
||||||
|
break;
|
||||||
|
case 'approval':
|
||||||
|
$queryStr = "SELECT a.*, b.name FROM tblDocumentApprovers";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
$queryStr .= " a LEFT JOIN tblDocuments b ON a.documentID=b.id where";
|
||||||
|
switch($usergroup) {
|
||||||
|
case 'user':
|
||||||
|
$queryStr .= " a.type=0 and a.required not in (select id from tblUsers) ORDER by b.id";
|
||||||
|
break;
|
||||||
|
case 'group':
|
||||||
|
$queryStr .= " a.type=1 and a.required not in (select id from tblGroups) ORDER by b.id";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return $this->db->getResultArray($queryStr);
|
||||||
|
} /* }}} */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns statitical information
|
* Returns statitical information
|
||||||
*
|
*
|
||||||
|
|
|
@ -66,6 +66,11 @@ $unlinkeddocuments = $dms->checkDocuments();
|
||||||
$nofilesizeversions = $dms->getNoFileSizeDocumentContent();
|
$nofilesizeversions = $dms->getNoFileSizeDocumentContent();
|
||||||
$nochecksumversions = $dms->getNoChecksumDocumentContent();
|
$nochecksumversions = $dms->getNoChecksumDocumentContent();
|
||||||
$duplicateversions = $dms->getDuplicateDocumentContent();
|
$duplicateversions = $dms->getDuplicateDocumentContent();
|
||||||
|
foreach(array('review', 'approval') as $process) {
|
||||||
|
foreach(array('user', 'group') as $ug) {
|
||||||
|
$processwithoutusergroup[$process][$ug] = $dms->getProcessWithoutUserGroup($process, $ug);
|
||||||
|
}
|
||||||
|
}
|
||||||
$rootfolder = $dms->getFolder($settings->_rootFolderID);
|
$rootfolder = $dms->getFolder($settings->_rootFolderID);
|
||||||
|
|
||||||
if($view) {
|
if($view) {
|
||||||
|
@ -76,6 +81,7 @@ if($view) {
|
||||||
$view->setParam('nofilesizeversions', $nofilesizeversions);
|
$view->setParam('nofilesizeversions', $nofilesizeversions);
|
||||||
$view->setParam('nochecksumversions', $nochecksumversions);
|
$view->setParam('nochecksumversions', $nochecksumversions);
|
||||||
$view->setParam('duplicateversions', $duplicateversions);
|
$view->setParam('duplicateversions', $duplicateversions);
|
||||||
|
$view->setParam('processwithoutusergroup', $processwithoutusergroup);
|
||||||
$view->setParam('unlink', $unlink);
|
$view->setParam('unlink', $unlink);
|
||||||
$view->setParam('setfilesize', $setfilesize);
|
$view->setParam('setfilesize', $setfilesize);
|
||||||
$view->setParam('setchecksum', $setchecksum);
|
$view->setParam('setchecksum', $setchecksum);
|
||||||
|
|
|
@ -205,6 +205,7 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Bootstrap_Style {
|
||||||
$nofilesizeversions = $this->params['nofilesizeversions'];
|
$nofilesizeversions = $this->params['nofilesizeversions'];
|
||||||
$nochecksumversions = $this->params['nochecksumversions'];
|
$nochecksumversions = $this->params['nochecksumversions'];
|
||||||
$duplicateversions = $this->params['duplicateversions'];
|
$duplicateversions = $this->params['duplicateversions'];
|
||||||
|
$processwithoutusergroup = $this->params['processwithoutusergroup'];
|
||||||
$repair = $this->params['repair'];
|
$repair = $this->params['repair'];
|
||||||
$unlink = $this->params['unlink'];
|
$unlink = $this->params['unlink'];
|
||||||
$setfilesize = $this->params['setfilesize'];
|
$setfilesize = $this->params['setfilesize'];
|
||||||
|
@ -407,6 +408,37 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Bootstrap_Style {
|
||||||
print "</tbody></table>\n";
|
print "</tbody></table>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->contentContainerEnd();
|
||||||
|
|
||||||
|
$this->contentHeading(getMLText("process_without_user_group"));
|
||||||
|
$this->contentContainerStart();
|
||||||
|
|
||||||
|
if($processwithoutusergroup) {
|
||||||
|
print "<table class=\"table table-condensed\">";
|
||||||
|
print "<thead>\n<tr>\n";
|
||||||
|
print "<th>".getMLText("process")."</th>\n";
|
||||||
|
print "<th>".getMLText("user_group")."</th>\n";
|
||||||
|
print "<th>".getMLText("documentid")."</th>\n";
|
||||||
|
print "<th>".getMLText("version")."</th>\n";
|
||||||
|
print "<th>".getMLText("required")."</th>\n";
|
||||||
|
print "</tr>\n</thead>\n<tbody>\n";
|
||||||
|
foreach(array('review', 'approval') as $process) {
|
||||||
|
foreach(array('user', 'group') as $ug) {
|
||||||
|
if($processwithoutusergroup[$process][$ug]) {
|
||||||
|
foreach($processwithoutusergroup[$process][$ug] as $rec) {
|
||||||
|
print "<tr>";
|
||||||
|
print "<td>".$process."</td>";
|
||||||
|
print "<td>".$ug."</td>";
|
||||||
|
print "<td>".$rec['documentID']."</td><td>".$rec['version']."</td><td>".$rec['name']."</td>";
|
||||||
|
print "<td>".$rec['required']."</td>";
|
||||||
|
print "</tr>\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
print "</tbody></table>\n";
|
||||||
|
}
|
||||||
|
|
||||||
$this->contentContainerEnd();
|
$this->contentContainerEnd();
|
||||||
$this->contentEnd();
|
$this->contentEnd();
|
||||||
$this->htmlEndPage();
|
$this->htmlEndPage();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user