Commit 3e298792d8fbfdf24df4cfb2aa338ead1b0fc085
1 parent
de2e435e
Only try index Microsoft Office files.
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@4221 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
2 changed files
with
12 additions
and
0 deletions
plugins/ktstandard/contents/PowerpointIndexer.php
| ... | ... | @@ -6,6 +6,12 @@ class KTPowerpointIndexerTrigger { |
| 6 | 6 | } |
| 7 | 7 | |
| 8 | 8 | function transform() { |
| 9 | + $iMimeTypeId = $this->oDocument->getMimeTypeId(); | |
| 10 | + $sMimeType = KTMime::getMimeTypeName($iMimeTypeId); | |
| 11 | + if ($sMimeType != "application/msword") { | |
| 12 | + return; | |
| 13 | + } | |
| 14 | + | |
| 9 | 15 | $oStorage = KTStorageManagerUtil::getSingleton(); |
| 10 | 16 | $sFile = $oStorage->temporaryFile($this->oDocument); |
| 11 | 17 | ... | ... |
plugins/ktstandard/contents/WordIndexer.php
| ... | ... | @@ -6,6 +6,12 @@ class KTWordIndexerTrigger { |
| 6 | 6 | } |
| 7 | 7 | |
| 8 | 8 | function transform() { |
| 9 | + $iMimeTypeId = $this->oDocument->getMimeTypeId(); | |
| 10 | + $sMimeType = KTMime::getMimeTypeName($iMimeTypeId); | |
| 11 | + if ($sMimeType != "application/msword") { | |
| 12 | + return; | |
| 13 | + } | |
| 14 | + | |
| 9 | 15 | $oStorage = KTStorageManagerUtil::getSingleton(); |
| 10 | 16 | $sFile = $oStorage->temporaryFile($this->oDocument); |
| 11 | 17 | ... | ... |