Merge branch 'seeddms-4.3.x' into seeddms-5.0.x

This commit is contained in:
Uwe Steinmann 2015-08-11 14:11:01 +02:00
commit 71057f90d9
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
*/
static function create($indexerDir) { /* {{{ */
if(!@unlink($indexerDir.'/index.db'))
return null;
unlink($indexerDir.'/index.db');
$index = new SeedDMS_SQLiteFTS_Indexer($indexerDir);
$sql = 'CREATE VIRTUAL TABLE docs USING fts4(title, comment, keywords, category, owner, content, created, notindexed=created, matchinfo=fts3)';
$res = $index->_conn->exec($sql);

View File

@ -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(),
);