From: Seamus Lee Date: Tue, 19 Sep 2017 03:23:29 +0000 (+1000) Subject: CRM-21123 Ensure that the selectedChild on message templates is one of allowed types X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=79f869723b14def7f57db9fc3b6144564fb3082f;p=civicrm-core.git CRM-21123 Ensure that the selectedChild on message templates is one of allowed types CRM-21123 Put the array into the if statement --- diff --git a/CRM/Admin/Page/MessageTemplates.php b/CRM/Admin/Page/MessageTemplates.php index d94ffc020e..b9b99b4235 100644 --- a/CRM/Admin/Page/MessageTemplates.php +++ b/CRM/Admin/Page/MessageTemplates.php @@ -199,9 +199,10 @@ class CRM_Admin_Page_MessageTemplates extends CRM_Core_Page_Basic { CRM_Core_BAO_MessageTemplate::revert($id); } - - $this->assign('selectedChild', CRM_Utils_Request::retrieve('selectedChild', 'String', $this)); - + $selectedChild = CRM_Utils_Request::retrieve('selectedChild', 'String', $this); + if (in_array($selectedChild, array('user', 'workflow'))) { + $this->assign('selectedChild', $selectedChild); + } return parent::run($args, $pageArgs, $sort); }