Merge branch 'seeddms-5.0.x' into develop

This commit is contained in:
Uwe Steinmann 2015-08-11 14:11:14 +02:00
commit d8b42af4b1
2 changed files with 7 additions and 2 deletions

View File

@ -55,8 +55,7 @@ class SeedDMS_SQLiteFTS_Indexer {
* @param string $indexerDir directory on disk containing the index * @param string $indexerDir directory on disk containing the index
*/ */
static function create($indexerDir) { /* {{{ */ static function create($indexerDir) { /* {{{ */
if(!@unlink($indexerDir.'/index.db')) unlink($indexerDir.'/index.db');
return null;
$index = new SeedDMS_SQLiteFTS_Indexer($indexerDir); $index = new SeedDMS_SQLiteFTS_Indexer($indexerDir);
$sql = 'CREATE VIRTUAL TABLE docs USING fts4(title, comment, keywords, category, owner, content, created, notindexed=created, matchinfo=fts3)'; $sql = 'CREATE VIRTUAL TABLE docs USING fts4(title, comment, keywords, category, owner, content, created, notindexed=created, matchinfo=fts3)';
$res = $index->_conn->exec($sql); $res = $index->_conn->exec($sql);

View File

@ -140,6 +140,7 @@ function getLockedDocuments() { /* {{{ */
'name'=>$document->getName(), 'name'=>$document->getName(),
'mimetype'=>$lc->getMimeType(), 'mimetype'=>$lc->getMimeType(),
'version'=>$lc->getVersion(), 'version'=>$lc->getVersion(),
'size'=>$lc->getFileSize(),
'comment'=>$document->getComment(), 'comment'=>$document->getComment(),
'keywords'=>$document->getKeywords(), 'keywords'=>$document->getKeywords(),
); );
@ -249,6 +250,7 @@ function getFolderChildren($id) { /* {{{ */
'name'=>htmlspecialchars($document->getName()), 'name'=>htmlspecialchars($document->getName()),
'mimetype'=>$lc->getMimeType(), 'mimetype'=>$lc->getMimeType(),
'version'=>$lc->getVersion(), 'version'=>$lc->getVersion(),
'size'=>$lc->getFileSize(),
'comment'=>$document->getComment(), 'comment'=>$document->getComment(),
'keywords'=>$document->getKeywords(), 'keywords'=>$document->getKeywords(),
); );
@ -436,6 +438,7 @@ function getDocument($id) { /* {{{ */
'date'=>$document->getDate(), 'date'=>$document->getDate(),
'mimetype'=>$lc->getMimeType(), 'mimetype'=>$lc->getMimeType(),
'version'=>$lc->getVersion(), 'version'=>$lc->getVersion(),
'size'=>$lc->getFileSize(),
'keywords'=>htmlspecialchars($document->getKeywords()), 'keywords'=>htmlspecialchars($document->getKeywords()),
); );
$app->response()->header('Content-Type', 'application/json'); $app->response()->header('Content-Type', 'application/json');
@ -540,6 +543,7 @@ function getDocumentVersions($id) { /* {{{ */
'version'=>$lc->getVersion(), 'version'=>$lc->getVersion(),
'date'=>$lc->getDate(), 'date'=>$lc->getDate(),
'mimetype'=>$lc->getMimeType(), 'mimetype'=>$lc->getMimeType(),
'size'=>$lc->getFileSize(),
'comment'=>htmlspecialchars($lc->getComment()), 'comment'=>htmlspecialchars($lc->getComment()),
); );
} }
@ -752,6 +756,7 @@ function doSearch() { /* {{{ */
'name'=>$document->getName(), 'name'=>$document->getName(),
'mimetype'=>$lc->getMimeType(), 'mimetype'=>$lc->getMimeType(),
'version'=>$lc->getVersion(), 'version'=>$lc->getVersion(),
'size'=>$lc->getFileSize(),
'comment'=>$document->getComment(), 'comment'=>$document->getComment(),
'keywords'=>$document->getKeywords(), 'keywords'=>$document->getKeywords(),
); );
@ -814,6 +819,7 @@ function doSearchByAttr() { /* {{{ */
'name'=>$document->getName(), 'name'=>$document->getName(),
'mimetype'=>$lc->getMimeType(), 'mimetype'=>$lc->getMimeType(),
'version'=>$lc->getVersion(), 'version'=>$lc->getVersion(),
'size'=>$lc->getFileSize(),
'comment'=>$document->getComment(), 'comment'=>$document->getComment(),
'keywords'=>$document->getKeywords(), 'keywords'=>$document->getKeywords(),
); );