13 private $keywordDesc =
"Performs file scanning to find text fragments that could be relevant for given keywords. Note: More keywords can be included using the configuration file.";
15 public function __construct()
17 $this->Name =
"agent_keyword";
18 $this->Title = _(
"Keyword Analysis <img src=\"images/info_16.png\" data-toggle=\"tooltip\" title=\"".$this->keywordDesc.
"\" class=\"info-bullet\"/>");
19 $this->AgentName =
"keyword";
21 parent::__construct();
30 return CheckARS($uploadId, $this->AgentName,
"keyword scanner",
"keyword_ars");
38 public function AgentAdd($jobId, $uploadId, &$errorMsg, $dependencies=[],
39 $arguments=
null, $request=
null, $unpackArgs=
null)
41 if ($request !=
null && !is_array($request)) {
42 $unpackArgs = intval($request->get(
'scm', 0)) == 1 ?
'-I' :
'';
44 $unpackArgs = intval(@$_POST[
'scm']) == 1 ?
'-I' :
'';
51 if ($jobQueueId != 0) {
56 if (!empty($unpackArgs)) {
57 return $this->
doAgentAdd($jobId, $uploadId, $errorMsg, array(
"agent_mimetype"),$uploadId,$args,$request);
59 return $this->
doAgentAdd($jobId, $uploadId, $errorMsg, array(
"agent_adj2nest"), $uploadId,
null, $request);
71 foreach ($dependencies as $dependency) {
72 if ($dependency == $agentName) {
75 if (is_array($dependency) && $agentName == $dependency[
'name']) {
doAgentAdd($jobId, $uploadId, &$errorMsg, $dependencies, $jqargs="", $jq_cmd_args=null, $request=null)
AgentHasResults($uploadId=0)
isAgentIncluded($dependencies, $agentName)
AgentAdd($jobId, $uploadId, &$errorMsg, $dependencies=[], $arguments=null, $request=null, $unpackArgs=null)
CheckARS($upload_pk, $AgentName, $AgentDesc, $AgentARSTableName)
Check the ARS table to see if an agent has successfully scanned an upload.
IsAlreadyScheduled($job_pk, $AgentName, $upload_pk)
Check if an agent is already scheduled in a job.