From 5cad71c0ab894d3b64cfef0ded930265d3300695 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Fri, 24 Feb 2017 18:54:18 -0700 Subject: [PATCH] CRM-20180 - Documentation URLs should contain "stable" *or* "current", not both Examples: * In "Administer => Communications => Scheduled Reminders", the green box has a link to "learn more". This links to "https://docs.civicrm.org/user/en/stable/current/email/scheduled-reminders/" * In "Search =>= Advanced Search", view the help for "Views for Display Contacts". The help message includes a link to "https://docs.civicrm.org/user/en/stable/current/organising-your-data/profiles" Both examples include the redundant formulation "user/en/stable/current" and point to non-existent pages. Use either "stable" or "current". It would be silly for one installation to contain a mix of links for "stable" and "current". It appears that `formatDocUrl()` aims to normalize these. --- 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 8079cec6f2..3ded33fe19 100644 --- a/CRM/Utils/System.php +++ b/CRM/Utils/System.php @@ -1391,7 +1391,7 @@ class CRM_Utils_System { * @return mixed */ public static function formatDocUrl($url) { - return preg_replace('#^user/((\w\w/)?stable/)?#', 'user/en/stable/', $url); + return preg_replace('#^user/((\w\w/)?(stable|current)/)?#', 'user/en/stable/', $url); } /** -- 2.25.1