mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-06-18 02:59:27 +00:00
replace functions directly accessing file system if documents or attachments are involved
This commit is contained in:
parent
54c3ec54fc
commit
37fd1ac969
|
@ -308,7 +308,7 @@ $(document).ready( function() {
|
||||||
|
|
||||||
foreach($files as $file) {
|
foreach($files as $file) {
|
||||||
|
|
||||||
$file_exists=file_exists($dms->contentDir . $file->getPath());
|
$file_exists = $file->exists();//file_exists($dms->contentDir . $file->getPath());
|
||||||
|
|
||||||
$responsibleUser = $file->getUser();
|
$responsibleUser = $file->getUser();
|
||||||
|
|
||||||
|
@ -344,7 +344,7 @@ $(document).ready( function() {
|
||||||
print "<li>".htmlspecialchars($file->getOriginalFileName())."</li>\n";
|
print "<li>".htmlspecialchars($file->getOriginalFileName())."</li>\n";
|
||||||
if ($file_exists) {
|
if ($file_exists) {
|
||||||
$realmimetype = $file->getRealMimeType();
|
$realmimetype = $file->getRealMimeType();
|
||||||
print "<li>".SeedDMS_Core_File::format_filesize(filesize($dms->contentDir . $file->getPath())) ." bytes, ".htmlspecialchars($file->getMimeType())."</li>";
|
print "<li>".SeedDMS_Core_File::format_filesize($file->size()) ." bytes, ".htmlspecialchars($file->getMimeType())."</li>";
|
||||||
} else print "<li>".htmlspecialchars($file->getMimeType())." - <span class=\"warning\">".getMLText("document_deleted")."</span></li>";
|
} else print "<li>".htmlspecialchars($file->getMimeType())." - <span class=\"warning\">".getMLText("document_deleted")."</span></li>";
|
||||||
|
|
||||||
print "<li>".getMLText("uploaded_by")." <a href=\"mailto:".htmlspecialchars($responsibleUser->getEmail())."\">".htmlspecialchars($responsibleUser->getFullName())."</a></li>";
|
print "<li>".getMLText("uploaded_by")." <a href=\"mailto:".htmlspecialchars($responsibleUser->getEmail())."\">".htmlspecialchars($responsibleUser->getFullName())."</a></li>";
|
||||||
|
@ -703,7 +703,7 @@ $(document).ready( function() {
|
||||||
$previewwidthdetail = $this->params['previewWidthDetail'];
|
$previewwidthdetail = $this->params['previewWidthDetail'];
|
||||||
|
|
||||||
// verify if file exists
|
// verify if file exists
|
||||||
$file_exists=file_exists($dms->contentDir . $latestContent->getPath());
|
$file_exists = $latestContent->exists(); //file_exists($dms->contentDir . $latestContent->getPath());
|
||||||
|
|
||||||
$status = $latestContent->getStatus();
|
$status = $latestContent->getStatus();
|
||||||
|
|
||||||
|
@ -1717,4 +1717,3 @@ $(document).ready( function() {
|
||||||
$this->htmlEndPage();
|
$this->htmlEndPage();
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user