- if (!$this->_gName) {
- $this->_gName = CRM_Utils_Request::retrieve('group', 'String', $this, FALSE, 0);
- $this->_gid = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_OptionGroup',
- $this->_gName,
- 'id',
- 'name'
- );
+ if (!$this->_gName && !empty($this->urlPath[3])) {
+ $this->_gName = $this->urlPath[3];
+ }
+ if (!$this->_gName && !empty($_GET['gid'])) {
+ $this->_gName = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_OptionGroup', (int) $_GET['gid'], 'name');