Merge branch 'seeddms-5.1.x' into seeddms-6.0.x

This commit is contained in:
Uwe Steinmann 2026-04-05 22:24:00 +02:00
commit 637ae49775
2 changed files with 8 additions and 4 deletions

View File

@ -57,7 +57,8 @@ class SeedDMS_ConversionServiceTextToText extends SeedDMS_ConversionServiceBase
$encoding = $this->detect_utf_encoding($content);
// mb_detect_encoding() is not a good as detect_utf_encoding()
// $encoding = mb_detect_encoding($content);
$content = mb_convert_encoding($content, 'utf8', $encoding);
if ($encoding)
$content = mb_convert_encoding($content, 'utf8', $encoding);
if($target) {
file_put_contents($target, $content);
return true;

View File

@ -189,9 +189,12 @@ class SeedDMS_FulltextService {
* @return object indexed Document ready for passing to the indexer
*/
public function IndexedDocument($object, $forceupdate=false) { /* {{{ */
if($object->isType('document'))
$nocontent = $object->getLatestContent()->getFileSize() > $this->maxsize && $this->maxsize && !$forceupdate;
else
if($object->isType('document')) {
if ($lc = $object->getLatestContent())
$nocontent = $lc->getFileSize() > $this->maxsize && $this->maxsize && !$forceupdate;
else
$nocontent = true;
} else
$nocontent = true;
$convcallback = $this->getConversionWithPreviewCallback();
return new $this->services[0]['IndexedDocument']($object->getDMS(), $object, $convcallback /*$this->conversionmgr ? $this->conversionmgr : $this->converters*/, $nocontent, $this->cmdtimeout);