Merge pull request #22255 from MegaphoneJon/membership-14-2021
[civicrm-core.git] / CRM / Admin / Page / JobLog.php
index 6f23cf0857c6dfcfdafde58c88d0adb3ea0b0844..e31a52558d6fd66fbf18688adf44c0d25554f813 100644 (file)
@@ -73,17 +73,17 @@ class CRM_Admin_Page_JobLog extends CRM_Core_Page_Basic {
    * Browse all jobs.
    */
   public function browse() {
-    $jid = CRM_Utils_Request::retrieve('jid', 'Positive', $this);
+    $jid = CRM_Utils_Request::retrieve('jid', 'Positive');
 
     $sj = new CRM_Core_JobManager();
 
-    $jobName = NULL;
     if ($jid) {
       $jobName = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_Job', $jid);
+      $this->assign('jobName', $jobName);
+      $jobRunUrl = CRM_Utils_System::url('civicrm/admin/job', 'action=view&reset=1&context=joblog&id=' . $jid);
+      $this->assign('jobRunUrl', $jobRunUrl);
     }
 
-    $this->assign('jobName', $jobName);
-
     $dao = new CRM_Core_DAO_JobLog();
     $dao->orderBy('id desc');
 
@@ -95,7 +95,7 @@ class CRM_Admin_Page_JobLog extends CRM_Core_Page_Basic {
     }
     $dao->find();
 
-    $rows = array();
+    $rows = [];
     while ($dao->fetch()) {
       unset($row);
       CRM_Core_DAO::storeValues($dao, $row);