From 8552370e5f0b36c22f0026230b66486a0de2d5a5 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Thu, 18 Apr 2019 10:30:35 -0700 Subject: [PATCH 1/2] CRM_Utils_System - Allow docURL functions to support "sysadmin" and "dev" links --- CRM/Utils/System.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Utils/System.php b/CRM/Utils/System.php index 1ac8d03d0be..0aa8fe3e67d 100644 --- a/CRM/Utils/System.php +++ b/CRM/Utils/System.php @@ -1385,7 +1385,7 @@ public static function docURL($params) { * @return mixed */ public static function formatDocUrl($url) { - return preg_replace('#^user/#', 'user/en/stable/', $url); + return preg_replace('#^(user|sysadmin|dev)/#', '\1/en/stable/', $url); } /** From 6f0dbc296efa2762df294f95f686114302af98b8 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Thu, 18 Apr 2019 10:31:27 -0700 Subject: [PATCH 2/2] Cron Status Check - Better hyperlinks * The old link pointed to a frozen wiki page with bad styling * The old link was buried --- CRM/Utils/Check/Component/Env.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/CRM/Utils/Check/Component/Env.php b/CRM/Utils/Check/Component/Env.php index cbc58df44c1..4ecc374275c 100644 --- a/CRM/Utils/Check/Component/Env.php +++ b/CRM/Utils/Check/Component/Env.php @@ -303,6 +303,10 @@ public function checkLastCron() { ); } else { + $cronLink = 'target="_blank" href="' . htmlentities(CRM_Utils_System::docURL2('sysadmin/setup/jobs/', TRUE)) . '""'; + $msg .= '

' . ts('To enable scheduling support, please set up the cron job.', [ + 1 => $cronLink, + ]) . '

'; $message = new CRM_Utils_Check_Message( __FUNCTION__, $msg, @@ -310,11 +314,6 @@ public function checkLastCron() { ($lastCron > gmdate('U') - 86400) ? \Psr\Log\LogLevel::WARNING : \Psr\Log\LogLevel::ERROR, 'fa-clock-o' ); - $docUrl = 'target="_blank" href="' . CRM_Utils_System::docURL(['resource' => 'wiki', 'page' => 'Managing Scheduled Jobs', 'URLonly' => TRUE]) . '""'; - $message->addHelp( - ts('Configuring cron on your server is necessary for running scheduled jobs such as sending mail and scheduled reminders.') . '
' . - ts("Learn more in the online documentation.", [1 => $docUrl]) - ); $messages[] = $message; }