From ef902ee12007529b1c2462d04233dc16564b269f Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 11 Aug 2015 14:10:28 +0200 Subject: [PATCH] return file size of version where appropriate --- restapi/index.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/restapi/index.php b/restapi/index.php index 34036dae4..708544206 100644 --- a/restapi/index.php +++ b/restapi/index.php @@ -140,6 +140,7 @@ function getLockedDocuments() { /* {{{ */ 'name'=>$document->getName(), 'mimetype'=>$lc->getMimeType(), 'version'=>$lc->getVersion(), + 'size'=>$lc->getFileSize(), 'comment'=>$document->getComment(), 'keywords'=>$document->getKeywords(), ); @@ -249,6 +250,7 @@ function getFolderChildren($id) { /* {{{ */ 'name'=>htmlspecialchars($document->getName()), 'mimetype'=>$lc->getMimeType(), 'version'=>$lc->getVersion(), + 'size'=>$lc->getFileSize(), 'comment'=>$document->getComment(), 'keywords'=>$document->getKeywords(), ); @@ -436,6 +438,7 @@ function getDocument($id) { /* {{{ */ 'date'=>$document->getDate(), 'mimetype'=>$lc->getMimeType(), 'version'=>$lc->getVersion(), + 'size'=>$lc->getFileSize(), 'keywords'=>htmlspecialchars($document->getKeywords()), ); $app->response()->header('Content-Type', 'application/json'); @@ -540,6 +543,7 @@ function getDocumentVersions($id) { /* {{{ */ 'version'=>$lc->getVersion(), 'date'=>$lc->getDate(), 'mimetype'=>$lc->getMimeType(), + 'size'=>$lc->getFileSize(), 'comment'=>htmlspecialchars($lc->getComment()), ); } @@ -752,6 +756,7 @@ function doSearch() { /* {{{ */ 'name'=>$document->getName(), 'mimetype'=>$lc->getMimeType(), 'version'=>$lc->getVersion(), + 'size'=>$lc->getFileSize(), 'comment'=>$document->getComment(), 'keywords'=>$document->getKeywords(), ); @@ -814,6 +819,7 @@ function doSearchByAttr() { /* {{{ */ 'name'=>$document->getName(), 'mimetype'=>$lc->getMimeType(), 'version'=>$lc->getVersion(), + 'size'=>$lc->getFileSize(), 'comment'=>$document->getComment(), 'keywords'=>$document->getKeywords(), );