18 require_once SQ_CORE_PACKAGE_PATH.
'/files/file/file.inc';
19 require_once SQ_DATA_PATH.
'/private/conf/tools.inc';
45 public $allowed_extensions = Array(
'doc',
'dot',
'docx',
'docm',
'dotx',
'dotm');
56 parent::__construct($assetid);
70 if (empty($file_info))
return '';
71 $file = $file_info[
'path'];
72 $file = str_replace(
'"',
'\\\"', $file);
75 if (SQ_TOOL_ANTIWORD_ENABLED) {
77 $cmd =
'ANTIWORDHOME='.SQ_TOOL_ANTIWORD_MAPPING_PATH.
' '.SQ_TOOL_ANTIWORD_PATH.
' '.$file;
78 $content = shell_exec($cmd);
82 if (!$content)
return '';
85 $content = strtolower(trim(preg_replace(
'/[\s]+/',
' ', $content)));