ts('Administration'), 'url' => CRM_Utils_System::url('civicrm/admin', 'reset=1' ), )); CRM_Utils_System::appendBreadCrumb($breadCrumb); return parent::run(); } /** * Browse all jobs. * * @return void * @access public * @static */ function browse($action = NULL) { $jid = CRM_Utils_Request::retrieve('jid', 'Positive', $this); $sj = new CRM_Core_JobManager(); $jobName = NULL; foreach ($sj->jobs as $i => $job) { if ($job->id == $jid) { $jobName = $job->name; } } $this->assign('jobName', $jobName); $dao = new CRM_Core_DAO_JobLog(); $dao->orderBy('id desc'); if ($jobName) { $dao->job_id = $jid; } $dao->find(); $rows = array(); while ($dao->fetch()) { unset($row); CRM_Core_DAO::storeValues($dao, $row); $rows[$dao->id] = $row; } $this->assign('rows', $rows); $this->assign('jobId', $jid); } /** * Get name of edit form * * @return string Classname of edit form. */ function editForm() { return 'CRM_Admin_Form_Job'; } /** * Get edit form name * * @return string name of this page. */ function editName() { return 'Scheduled Jobs'; } /** * Get user context. * * @return string user context. */ function userContext($mode = NULL) { return 'civicrm/admin/job'; } }