13 use Symfony\Component\HttpFoundation\Request;
14 use Symfony\Component\HttpFoundation\Response;
18 const NAME =
"jobinfo";
22 function __construct()
24 parent::__construct(self::NAME, array(
36 protected function handle(Request $request)
38 $userId = $_SESSION[
'UserId'];
39 $jqIds = (array) $request->get(
'jqIds');
42 foreach ($jqIds as $jq_pk) {
43 $jobInfo = $this->
dbManager->getSingleRow(
44 "SELECT jobqueue.jq_end_bits as end_bits FROM jobqueue INNER JOIN job ON jobqueue.jq_job_fk = job.job_pk
45 WHERE jobqueue.jq_pk = $1 AND job_user_fk = $2",
46 array($jq_pk, $userId)
48 if ($jobInfo !==
false) {
49 $result[$jq_pk] = array(
'end_bits' => $jobInfo[
'end_bits']);
54 $status = empty($result) ? Response::HTTP_INTERNAL_SERVER_ERROR : Response::HTTP_OK;
56 $result = array(
"error" =>
"no info");
58 $response =
new Response(json_encode($result),$status,array(
'content-type'=>
'text/json'));
63 register_plugin(
new AjaxJobInfo());
Contains the constants and helpers for authentication of user.
ReportCachePurgeAll()
Purge all records from the report cache.
fo_dbManager * dbManager
fo_dbManager object