BUG moving new getContent method into DataObject, not Controller

This commit is contained in:
Julian Seidenberg 2013-04-30 18:14:13 +12:00
parent 687b4f5f97
commit f02303793d

View File

@ -802,6 +802,19 @@ class DMSDocument extends DataObject implements DMSDocumentInterface {
$file->delete(); $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 { class DMSDocument_Controller extends Controller {
@ -944,18 +957,5 @@ class DMSDocument_Controller extends Controller {
return $linkText; 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;
}
}
} }