$this->set('gid', $this->_gid);
}
- if (!$this->_gid) {
- CRM_Core_Error::fatal(ts('The required parameter "gid" is missing or malformed.'));
- }
-
$this->_activityId = CRM_Utils_Request::retrieve('aid', 'Positive', $this, FALSE, 0, 'GET');
if (is_numeric($this->_activityId)) {
$latestRevisionId = CRM_Activity_BAO_Activity::getLatestActivityId($this->_activityId);
$this->_ufGroup = (array) $dao;
}
$dao->free();
- }
- $this->assign('ufGroupName', $this->_ufGroup['name']);
- if (!CRM_Utils_Array::value('is_active', $this->_ufGroup)) {
- CRM_Core_Error::fatal(ts('The requested profile (gid=%1) is inactive or does not exist.', array(
- 1 => $this->_gid,
- )));
+ if (!CRM_Utils_Array::value('is_active', $this->_ufGroup)) {
+ CRM_Core_Error::fatal(ts('The requested profile (gid=%1) is inactive or does not exist.', array(
+ 1 => $this->_gid,
+ )));
+ }
}
+ $this->assign('ufGroupName', $this->_ufGroup['name']);
$gids = empty($this->_profileIds) ? $this->_gid : $this->_profileIds;
parent::preProcess();
+ // make sure the gid is set and valid
+ if (!$this->_gid) {
+ CRM_Core_Error::fatal(ts('The requested Profile (gid=%1) is disabled, OR there is no Profile with that ID, OR a valid \'gid=\' integer value is missing from the URL. Contact the site administrator if you need assistance.',
+ array(1 => $this->_gid)
+ ));
+ }
+
// and also the profile is of type 'Profile'
$query = "
SELECT module