mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-13 21:21:27 +00:00
list docs and folder that fail the general object check
This commit is contained in:
parent
590a93525c
commit
363fdf7a1a
|
@ -91,9 +91,16 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Bootstrap_Style {
|
||||||
$folder = $this->params['folder'];
|
$folder = $this->params['folder'];
|
||||||
$repair = $this->params['repair'];
|
$repair = $this->params['repair'];
|
||||||
$objects = $this->params['repairobjects'];
|
$objects = $this->params['repairobjects'];
|
||||||
|
$cachedir = $this->params['cachedir'];
|
||||||
|
$previewwidth = $this->params['previewWidthList'];
|
||||||
|
$previewconverters = $this->params['previewConverters'];
|
||||||
|
$timeout = $this->params['timeout'];
|
||||||
|
|
||||||
$this->contentHeading(getMLText("objectcheck"));
|
$this->contentHeading(getMLText("objectcheck"));
|
||||||
|
|
||||||
|
$previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidth, $timeout);
|
||||||
|
$previewer->setConverters($previewconverters);
|
||||||
|
|
||||||
if($objects) {
|
if($objects) {
|
||||||
if($repair) {
|
if($repair) {
|
||||||
echo "<div class=\"alert\">".getMLText('repairing_objects')."</div>";
|
echo "<div class=\"alert\">".getMLText('repairing_objects')."</div>";
|
||||||
|
@ -102,15 +109,52 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Bootstrap_Style {
|
||||||
print "<thead>\n<tr>\n";
|
print "<thead>\n<tr>\n";
|
||||||
print "<th></th>\n";
|
print "<th></th>\n";
|
||||||
print "<th>".getMLText("name")."</th>\n";
|
print "<th>".getMLText("name")."</th>\n";
|
||||||
print "<th>".getMLText("owner")."</th>\n";
|
print "<th>".getMLText("status")."</th>\n";
|
||||||
|
print "<th>".getMLText("action")."</th>\n";
|
||||||
print "<th>".getMLText("error")."</th>\n";
|
print "<th>".getMLText("error")."</th>\n";
|
||||||
print "<th></th>\n";
|
print "<th></th>\n";
|
||||||
print "</tr>\n</thead>\n<tbody>\n";
|
print "</tr>\n</thead>\n<tbody>\n";
|
||||||
|
foreach($objects as $object) {
|
||||||
|
if($object['object']->isType('document')) {
|
||||||
|
$document = $object['object'];
|
||||||
|
if($document->getAccessMode($user) >= M_READ && $document->getLatestContent()) {
|
||||||
|
$txt = $this->callHook('documentListItem', $document, $previewer, false);
|
||||||
|
if(is_string($txt))
|
||||||
|
echo $txt;
|
||||||
|
else
|
||||||
|
echo $this->documentListRow($document, $previewer, false);
|
||||||
|
}
|
||||||
|
} elseif($object['object']->isType('documentcontent')) {
|
||||||
|
$document = $object['object']->getDocument();
|
||||||
|
if($document->getAccessMode($user) >= M_READ && $document->getLatestContent()) {
|
||||||
|
echo $this->documentListRowStart($document);
|
||||||
|
$txt = $this->callHook('documentListItem', $document, $previewer, true, $object['object']->getVersion());
|
||||||
|
if(is_string($txt))
|
||||||
|
echo $txt;
|
||||||
|
else
|
||||||
|
echo $this->documentListRow($document, $previewer, true, $object['object']->getVersion());
|
||||||
|
echo "<td>".$object['msg']."</td>";
|
||||||
|
echo $this->documentListRowEnd($document);
|
||||||
|
}
|
||||||
|
} elseif($object['object']->isType('folder')) {
|
||||||
|
$folder = $object['object'];
|
||||||
|
if($folder->getAccessMode($user) >= M_READ) {
|
||||||
|
echo $this->folderListRowStart($folder);
|
||||||
|
$txt = $this->callHook('folderListItem', $folder, true);
|
||||||
|
if(is_string($txt))
|
||||||
|
echo $txt;
|
||||||
|
else
|
||||||
|
echo $this->folderListRow($folder, true);
|
||||||
|
echo "<td>".$object['msg']."</td>";
|
||||||
|
echo $this->folderListRowEnd($folder);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
$this->needsrepair = false;
|
$this->needsrepair = false;
|
||||||
print "</tbody></table>\n";
|
print "</tbody></table>\n";
|
||||||
|
|
||||||
if($this->needsrepair && $repair == 0) {
|
if($this->needsrepair && $repair == 0) {
|
||||||
echo '<p><a href="out.ObjectCheck.php?repair=1">'.getMLText('do_object_repair').'</a></p>';
|
echo '<p><a class="btn btn-primary" href="out.ObjectCheck.php?repair=1">'.getMLText('do_object_repair').'</a></p>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
Loading…
Reference in New Issue
Block a user