*
* $access public
*/
- function del($groupContactId, $status, $contactID) {
+ static function del($groupContactId, $status, $contactID) {
$groupId = CRM_Contact_BAO_GroupContact::getGroupId($groupContactId);
switch ($status) {
break;
}
- $groupNum = CRM_Contact_BAO_GroupContact::getContactGroup($this->_contactId, 'Added',
- NULL, TRUE, TRUE
- );
+ $groupNum =
+ CRM_Contact_BAO_GroupContact::getContactGroup($contactID, 'Added', NULL, TRUE, TRUE);
if ($groupNum == 1 &&
$groupStatus == 'Removed' &&
CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::MULTISITE_PREFERENCES_NAME,
* @access public
*/
function browse() {
- $count = CRM_Contact_BAO_GroupContact::getContactGroup($this->_contactId,
+ $count = CRM_Contact_BAO_GroupContact::getContactGroup(
+ $this->_contactId,
NULL,
NULL, TRUE, TRUE,
$this->_onlyPublicGroups
);
- $in = &CRM_Contact_BAO_GroupContact::getContactGroup($this->_contactId,
+ $in =& CRM_Contact_BAO_GroupContact::getContactGroup(
+ $this->_contactId,
'Added',
NULL, FALSE, TRUE,
$this->_onlyPublicGroups
);
- $pending = &CRM_Contact_BAO_GroupContact::getContactGroup($this->_contactId,
+
+ $pending =& CRM_Contact_BAO_GroupContact::getContactGroup(
+ $this->_contactId,
'Pending',
NULL, FALSE, TRUE,
$this->_onlyPublicGroups
);
- $out = &CRM_Contact_BAO_GroupContact::getContactGroup($this->_contactId,
+
+ $out =& CRM_Contact_BAO_GroupContact::getContactGroup(
+ $this->_contactId,
'Removed',
NULL, FALSE, TRUE,
$this->_onlyPublicGroups
);
if ($action == CRM_Core_Action::DELETE) {
- $groupContactId = CRM_Utils_Request::retrieve('gcid', 'Positive',
- CRM_Core_DAO::$_nullObject, TRUE
- );
- $status = CRM_Utils_Request::retrieve('st', 'String',
- CRM_Core_DAO::$_nullObject, TRUE
- );
+ $groupContactId =
+ CRM_Utils_Request::retrieve('gcid', 'Positive', CRM_Core_DAO::$_nullObject, TRUE);
+ $status =
+ CRM_Utils_Request::retrieve('st', 'String', CRM_Core_DAO::$_nullObject, TRUE);
if (is_numeric($groupContactId) && $status) {
CRM_Contact_Page_View_GroupContact::del($groupContactId, $status, $this->_contactId);
}
- $url = CRM_Utils_System::url('civicrm/user',
- "reset=1&id={$this->_contactId}"
- );
+ $url = CRM_Utils_System::url('civicrm/user', "reset=1&id={$this->_contactId}");
CRM_Utils_System::redirect($url);
}
- $controller = new CRM_Core_Controller_Simple('CRM_Contact_Form_GroupContact',
+ $controller = new CRM_Core_Controller_Simple(
+ 'CRM_Contact_Form_GroupContact',
ts("Contact's Groups"),
- CRM_Core_Action::ADD
+ CRM_Core_Action::ADD,
+ FALSE, FALSE, TRUE, FALSE
);
$controller->setEmbedded(TRUE);
$session = CRM_Core_Session::singleton();
- $session->pushUserContext(CRM_Utils_System::url('civicrm/user',
- "reset=1&id={$this->_contactId}"
- ),
+ $session->pushUserContext(
+ CRM_Utils_System::url('civicrm/user', "reset=1&id={$this->_contactId}"),
FALSE
);
* @access public
*/
function listContribution() {
- $controller = new CRM_Core_Controller_Simple('CRM_Contribute_Form_Search', ts('Contributions'), NULL);
+ $controller = new CRM_Core_Controller_Simple(
+ 'CRM_Contribute_Form_Search',
+ ts('Contributions'),
+ NULL,
+ FALSE, FALSE, TRUE, FALSE
+ );
$controller->setEmbedded(TRUE);
$controller->reset();
$controller->set('limit', 12);
* @access public
*/
function listParticipations() {
- $controller = new CRM_Core_Controller_Simple('CRM_Event_Form_Search', ts('Events'), NULL);
+ $controller = new CRM_Core_Controller_Simple(
+ 'CRM_Event_Form_Search',
+ ts('Events'),
+ NULL,
+ FALSE, FALSE, TRUE, FALSE
+ );
$controller->setEmbedded(TRUE);
$controller->reset();
$controller->set('context', 'user');
* @access public
*/
function listPledges() {
- $controller = new CRM_Core_Controller_Simple('CRM_Pledge_Form_Search', ts('Pledges'), NULL);
+ $controller = new CRM_Core_Controller_Simple(
+ 'CRM_Pledge_Form_Search',
+ ts('Pledges'),
+ NULL,
+ FALSE, FALSE, TRUE, FALSE
+ );
$controller->setEmbedded(TRUE);
$controller->reset();
$controller->set('limit', 12);
* @access public
*
*/
- static function &links($hideOption, $key = NULL) {
+ static function &links() {
+ $args = func_get_args();
+ $hideOption = CRM_Utils_Array::value(0, $args);
+ $key = CRM_Utils_Array::value(1, $args);
+
$extraParams = ($key) ? "&key={$key}" : NULL;
$cancelExtra = ts('Cancelling this pledge will also cancel any scheduled (and not completed) pledge payments.') . ' ' . ts('This action cannot be undone.') . ' ' . ts('Do you want to continue?');