18 private $copyrightDesc =
"Performs file scanning to find text fragments that could be relevant to copyrights, emails, and URLs";
20 public function __construct()
22 $this->Name =
"agent_copyright";
23 $this->Title = _(
"Copyright/Email/URL/Author Analysis <img src=\"images/info_16.png\" data-toggle=\"tooltip\" title=\"".$this->copyrightDesc.
"\" class=\"info-bullet\"/>");
24 $this->AgentName =
"copyright";
26 parent::__construct();
35 return CheckARS($uploadId, $this->AgentName,
"copyright scanner",
"copyright_ars");
42 public function AgentAdd($jobId, $uploadId, &$errorMsg, $dependencies=[],
43 $arguments=
null, $request=
null, $unpackArgs=
null)
45 if ($request !=
null && !is_array($request)) {
46 $unpackArgs = intval($request->get(
'scm', 0)) == 1 ?
'-I' :
'';
48 $unpackArgs = intval(@$_POST[
'scm']) == 1 ?
'-I' :
'';
55 if ($jobQueueId != 0) {
60 if (!empty($unpackArgs)) {
61 return $this->
doAgentAdd($jobId, $uploadId, $errorMsg, array(
"agent_mimetype"),$uploadId,$args,$request);
63 return $this->
doAgentAdd($jobId, $uploadId, $errorMsg, array(
"agent_adj2nest"), $uploadId,
null, $request);
75 foreach ($dependencies as $dependency) {
76 if ($dependency == $agentName) {
79 if (is_array($dependency) && $agentName == $dependency[
'name']) {
Create UI plugin for copyright agent.
AgentAdd($jobId, $uploadId, &$errorMsg, $dependencies=[], $arguments=null, $request=null, $unpackArgs=null)
AgentHasResults($uploadId=0)
isAgentIncluded($dependencies, $agentName)
doAgentAdd($jobId, $uploadId, &$errorMsg, $dependencies, $jqargs="", $jq_cmd_args=null, $request=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.