From 1e6b547cf11c385e5535f361772f04ed493d680e Mon Sep 17 00:00:00 2001 From: Jamie McClelland Date: Fri, 21 Apr 2017 12:12:06 -0400 Subject: [PATCH] CRM-20463 - simplify parsing of doc URLs and ensure all work. --- CRM/Utils/System.php | 2 +- templates/CRM/ACL/Header.tpl | 4 ++-- templates/CRM/Admin/Page/Access.tpl | 2 +- templates/CRM/Admin/Page/MessageTemplates.hlp | 2 +- templates/CRM/Admin/Page/ScheduleReminders.tpl | 2 +- templates/CRM/Contact/Form/Search/Advanced.hlp | 2 +- templates/CRM/Contact/Form/Task/SaveSearch.tpl | 2 +- templates/CRM/Event/Form/Task/SaveSearch.tpl | 2 +- templates/CRM/Group/Page/Group.hlp | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/CRM/Utils/System.php b/CRM/Utils/System.php index 3ded33fe19..bee39e8e0b 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|current)/)?#', 'user/en/stable/', $url); + return preg_replace('#^user/#', 'user/en/stable/', $url); } /** diff --git a/templates/CRM/ACL/Header.tpl b/templates/CRM/ACL/Header.tpl index c3bc140613..b2cbfed984 100644 --- a/templates/CRM/ACL/Header.tpl +++ b/templates/CRM/ACL/Header.tpl @@ -23,7 +23,7 @@ | see the CiviCRM license FAQ at http://civicrm.org/licensing | +--------------------------------------------------------------------+ *} -{capture assign=docLink}{docURL page='user/current/initial-set-up/permissions-and-access-control/' text='Access Control Documentation'}{/capture} +{capture assign=docLink}{docURL page='user/initial-set-up/permissions-and-access-control/' text='Access Control Documentation'}{/capture}

{ts 1=$docLink}ACLs allow you to control access to CiviCRM data. An ACL consists of an Operation (e.g. 'View' or 'Edit'), a set of data that the operation can be performed on (e.g. a group of contacts), and a Role that has permission to do this operation. Refer to the %1 for more info.{/ts}

@@ -58,4 +58,4 @@ $this->assign('wizard', $wizard); {/php} -{include file="CRM/common/WizardHeader.tpl"} \ No newline at end of file +{include file="CRM/common/WizardHeader.tpl"} diff --git a/templates/CRM/Admin/Page/Access.tpl b/templates/CRM/Admin/Page/Access.tpl index 345e62eb0d..96215fe803 100644 --- a/templates/CRM/Admin/Page/Access.tpl +++ b/templates/CRM/Admin/Page/Access.tpl @@ -23,7 +23,7 @@ | see the CiviCRM license FAQ at http://civicrm.org/licensing | +--------------------------------------------------------------------+ *} -{capture assign=docLink}{docURL page="user/current/initial-set-up/permissions-and-access-control/" text="Access Control Documentation"}{/capture} +{capture assign=docLink}{docURL page="user/initial-set-up/permissions-and-access-control/" text="Access Control Documentation"}{/capture}

{ts 1=$docLink}ACLs (Access Control Lists) allow you control access to CiviCRM data. An ACL consists of an Operation (e.g. 'View' or 'Edit'), a set of Data that the operation can be performed on (e.g. a group of contacts), and a Role that has permission to do this operation. Refer to the %1 for more info.{/ts} {if $config->userSystem->is_drupal EQ '1'}{ts}Note that a CiviCRM ACL Role is not related to the Drupal Role.{/ts}{/if}

diff --git a/templates/CRM/Admin/Page/MessageTemplates.hlp b/templates/CRM/Admin/Page/MessageTemplates.hlp index d0179e1651..80aea46229 100644 --- a/templates/CRM/Admin/Page/MessageTemplates.hlp +++ b/templates/CRM/Admin/Page/MessageTemplates.hlp @@ -24,7 +24,7 @@ +--------------------------------------------------------------------+ *} {capture assign=tokenDocLink}{docURL page="user/common-workflows/tokens-and-mail-merge"}{/capture} -{capture assign=schedRemindersDocLink}{docURL page="user/current/email/scheduled-reminders/"}{/capture} +{capture assign=schedRemindersDocLink}{docURL page="user/email/scheduled-reminders/"}{/capture} {capture assign=schedRemURL}{crmURL p='civicrm/admin/scheduleReminders' q="reset=1"}{/capture} {capture assign=upgradeTemplatesDocLink}{docURL page="Updating System Workflow Message Templates after Upgrades - method 1 - kdiff" resource="wiki"}{/capture} {htxt id="id-intro-title"} diff --git a/templates/CRM/Admin/Page/ScheduleReminders.tpl b/templates/CRM/Admin/Page/ScheduleReminders.tpl index 4e9947e1d9..7f1d4b415a 100644 --- a/templates/CRM/Admin/Page/ScheduleReminders.tpl +++ b/templates/CRM/Admin/Page/ScheduleReminders.tpl @@ -33,7 +33,7 @@ {include file="CRM/Admin/Form/ScheduleReminders.tpl"} {else} {if !$component} - {capture assign=schedRemindersDocLink}{docURL page="user/current/email/scheduled-reminders/"}{/capture} + {capture assign=schedRemindersDocLink}{docURL page="user/email/scheduled-reminders/"}{/capture}
{ts}Scheduled reminders allow you to automatically send messages to contacts regarding their memberships, participation in events, or other activities.{/ts} {$schedRemindersDocLink}
diff --git a/templates/CRM/Contact/Form/Search/Advanced.hlp b/templates/CRM/Contact/Form/Search/Advanced.hlp index 54ed4f2311..77a0649f6e 100644 --- a/templates/CRM/Contact/Form/Search/Advanced.hlp +++ b/templates/CRM/Contact/Form/Search/Advanced.hlp @@ -65,7 +65,7 @@ {ts}Views For Display Contacts{/ts} {/htxt} {htxt id="id-search-views"} -

{ts}If you are displaying the search results as contacts, you can modify the columns displayed by creating a Profile containing a different set of contact fields and then selecting that Profile here. For example you may want to include columns for Gender and Date of Birth, while eliminating Country.{/ts} {docURL page="user/current/organising-your-data/profiles"}

+

{ts}If you are displaying the search results as contacts, you can modify the columns displayed by creating a Profile containing a different set of contact fields and then selecting that Profile here. For example you may want to include columns for Gender and Date of Birth, while eliminating Country.{/ts} {docURL page="user/organising-your-data/profiles"}

{/htxt} {htxt id="id-search-operator-title"} diff --git a/templates/CRM/Contact/Form/Task/SaveSearch.tpl b/templates/CRM/Contact/Form/Task/SaveSearch.tpl index 3a99f4a56b..18b6a22d4f 100644 --- a/templates/CRM/Contact/Form/Task/SaveSearch.tpl +++ b/templates/CRM/Contact/Form/Task/SaveSearch.tpl @@ -39,7 +39,7 @@
{/if} -

{docURL page='user/current/organising-your-data/smart-groups/'}

+

{docURL page='user/organising-your-data/smart-groups/'}

diff --git a/templates/CRM/Event/Form/Task/SaveSearch.tpl b/templates/CRM/Event/Form/Task/SaveSearch.tpl index b651300b4b..0a1da31376 100644 --- a/templates/CRM/Event/Form/Task/SaveSearch.tpl +++ b/templates/CRM/Event/Form/Task/SaveSearch.tpl @@ -41,7 +41,7 @@ {/if} -

{docURL page='user/current/organising-your-data/smart-groups/'}

+

{docURL page='user/organising-your-data/smart-groups/'}

diff --git a/templates/CRM/Group/Page/Group.hlp b/templates/CRM/Group/Page/Group.hlp index 8e755d8d29..d354852951 100644 --- a/templates/CRM/Group/Page/Group.hlp +++ b/templates/CRM/Group/Page/Group.hlp @@ -37,7 +37,7 @@ {ts}Group Type{/ts} {/htxt} {htxt id="id-group-type"} -{capture assign=docLinkAccess}{docURL page="user/current/initial-set-up/permissions-and-access-control/"}{/capture} +{capture assign=docLinkAccess}{docURL page="user/initial-set-up/permissions-and-access-control/"}{/capture} {capture assign=docLinkMail}{docURL page="user/email/what-is-civimail" text="CiviMail component"}{/capture}

{if $config->userFramework neq 'Joomla'}{ts 1=$docLinkAccess}Check 'Access Control' if you want to use this group to assign access permissions to a set of contacts. %1{/ts}{/if} {ts 1=$docLinkMail}Check 'Mailing List' if you are using this group as a mailing list in the %1.{/ts}

{/htxt} -- 2.25.1