/** * Return via Ajax current status of running tool job */ public function GetJobStatus() { if (!$this->request->isLoggedIn() || !$this->request->user->canDoAction('can_use_plugin_tools')) { $this->response->setRedirect($this->request->config->get('error_display_url') . '/n/3500?r=' . urlencode($this->request->getFullUrlPath())); return; } $ps_job_id = $this->request->getParameter('job_id', pString); $o_progress = new ProgressBar('WebUI', null, $ps_job_id); $va_data = $o_progress->getDataForJobID(); $va_data['elapsedTime'] = caFormatInterval(time() - $va_data['start']); $this->view->setVar('jobinfo', $va_data); $this->render('tools/tool_runjob_json.php'); }
/** * Return via Ajax current status of running import job */ public function GetImportStatus() { if (!$this->request->user->canDoAction('can_import_worldcat')) { return; } $ps_job_id = $this->request->getParameter('job_id', pString); $o_progress = new ProgressBar('WebUI', null, $ps_job_id); $va_data = $o_progress->getDataForJobID(); $va_data['elapsedTime'] = caFormatInterval(time() - $va_data['start']); $this->view->setVar('info', $va_data); $this->render('import_run_json.php'); }