diff --git a/code/DMSDocument.php b/code/DMSDocument.php index c09f091..26398dc 100755 --- a/code/DMSDocument.php +++ b/code/DMSDocument.php @@ -802,6 +802,19 @@ class DMSDocument extends DataObject implements DMSDocumentInterface { $file->delete(); } + /** + * Get Content For FullTextSearch module (using Solr) */ + function getContent() { + if (class_exists('FileTextExtractor')) { + // Determine which extractor can process this file. + $extractor = FileTextExtractor::for_file($this->owner->FullPath); + if (!$extractor) return null; + + $text = $extractor->getContent($this->owner->FullPath); + return $text; + } + } + } class DMSDocument_Controller extends Controller { @@ -944,18 +957,5 @@ class DMSDocument_Controller extends Controller { return $linkText; } - /** - * Get Content For FullTextSearch module (using Solr) */ - function getContent() { - if (class_exists('FileTextExtractor')) { - // Determine which extractor can process this file. - $extractor = FileTextExtractor::for_file($this->owner->FullPath); - if (!$extractor) return null; - - $text = $extractor->getContent($this->owner->FullPath); - return $text; - } - } - }