From: Richard van Oosterhout Date: Tue, 9 Jan 2018 11:42:19 +0000 (+0100) Subject: CRM-21639 NOINDEX Event Info page when event is non-public X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=c6d4092b7b24222d235529dcf13eff87fbf27577;p=civicrm-core.git CRM-21639 NOINDEX Event Info page when event is non-public --- diff --git a/CRM/Contact/Form/Task/Map/Event.php b/CRM/Contact/Form/Task/Map/Event.php index 257fc1b1a8..f05e616be8 100644 --- a/CRM/Contact/Form/Task/Map/Event.php +++ b/CRM/Contact/Form/Task/Map/Event.php @@ -50,6 +50,10 @@ class CRM_Contact_Form_Task_Map_Event extends CRM_Contact_Form_Task_Map { self::createMapXML($ids, $lid, $this, TRUE, $type); $this->assign('single', FALSE); $this->assign('skipLocationType', TRUE); + + if ($is_public == 0) { + CRM_Utils_System::addHTMLHead(''); + } } /** diff --git a/CRM/Event/Page/EventInfo.php b/CRM/Event/Page/EventInfo.php index 8a7b54aa11..7bc9df1bca 100644 --- a/CRM/Event/Page/EventInfo.php +++ b/CRM/Event/Page/EventInfo.php @@ -80,6 +80,10 @@ class CRM_Event_Page_EventInfo extends CRM_Core_Page { return CRM_Utils_System::permissionDenied(); } + if (!$values['event']['is_public']) { + CRM_Utils_System::addHTMLHead(''); + } + if (!empty($values['event']['is_template'])) { // form is an Event Template CRM_Core_Error::fatal(ts('The page you requested is currently unavailable.'));