<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.7 |
+ | CiviCRM version 5 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2018 |
+--------------------------------------------------------------------+
$id = CRM_Utils_Type::escape($_REQUEST['id'], 'Integer');
}
- if (!empty($_REQUEST['context'])) {
- $context = CRM_Utils_Type::escape($_REQUEST['context'], 'String');
- }
+ $context = CRM_Utils_Request::retrieve('context', 'Alphanumeric');
+
// return false if $id is null and
// $context is not civicrm_event or civicrm_contribution_page
if (!$id || !in_array($context, array('civicrm_event', 'civicrm_contribution_page'))) {