mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-06-18 02:59:27 +00:00
docs and folders can be repaired again
This commit is contained in:
parent
f0fc1bfcc3
commit
da2174fafd
|
@ -103,7 +103,7 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Theme_Style {
|
|||
|
||||
if($objects) {
|
||||
if($repair) {
|
||||
echo "<div class=\"alert\">".getMLText('repairing_objects')."</div>";
|
||||
$this->warningMsg(getMLText('repairing_objects'));
|
||||
}
|
||||
print "<table class=\"table table-condensed table-sm\">";
|
||||
print "<thead>\n<tr>\n";
|
||||
|
@ -114,6 +114,7 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Theme_Style {
|
|||
print "<th>".getMLText("error")."</th>\n";
|
||||
print "<th></th>\n";
|
||||
print "</tr>\n</thead>\n<tbody>\n";
|
||||
$needsrepair = false;
|
||||
foreach($objects as $object) {
|
||||
if($object['object']->isType('document')) {
|
||||
$document = $object['object'];
|
||||
|
@ -123,6 +124,11 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Theme_Style {
|
|||
echo $txt;
|
||||
else
|
||||
echo $this->documentListRow($document, $previewer, false);
|
||||
echo "<td>".$object['msg'];
|
||||
if($repair)
|
||||
$document->repair();
|
||||
echo "</td>";
|
||||
$needsrepair = true;
|
||||
}
|
||||
} elseif($object['object']->isType('documentcontent')) {
|
||||
$document = $object['object']->getDocument();
|
||||
|
@ -145,16 +151,19 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Theme_Style {
|
|||
echo $txt;
|
||||
else
|
||||
echo $this->folderListRow($folder, true);
|
||||
echo "<td>".$object['msg']."</td>";
|
||||
echo "<td>".$object['msg'];
|
||||
if($repair)
|
||||
$folder->repair();
|
||||
echo "</td>";
|
||||
echo $this->folderListRowEnd($folder);
|
||||
$needsrepair = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->needsrepair = false;
|
||||
print "</tbody></table>\n";
|
||||
|
||||
if($this->needsrepair && $repair == 0) {
|
||||
echo '<p><a class="btn btn-primary" href="out.ObjectCheck.php?repair=1">'.getMLText('do_object_repair').'</a></p>';
|
||||
if($needsrepair && $repair == 0) {
|
||||
echo '<div class="repair"><a class="btn btn-primary" href="out.ObjectCheck.php?list=listRepair&repair=1">'.getMLText('do_object_repair').'</a></div>';
|
||||
}
|
||||
}
|
||||
} /* }}} */
|
||||
|
@ -593,7 +602,7 @@ $(document).ready( function() {
|
|||
$repairobjects = $this->params['repairobjects'];
|
||||
$this->enableClipboard = $this->params['enableclipboard'];
|
||||
|
||||
$this->htmlAddHeader('<script type="text/javascript" src="../styles/'.$this->theme.'/bootbox/bootbox.min.js"></script>'."\n", 'js');
|
||||
// $this->htmlAddHeader('<script type="text/javascript" src="../styles/'.$this->theme.'/bootbox/bootbox.min.js"></script>'."\n", 'js');
|
||||
|
||||
$this->htmlStartPage(getMLText("admin_tools"));
|
||||
$this->globalNavigation();
|
||||
|
|
Loading…
Reference in New Issue
Block a user