From: Tim Otten Date: Tue, 6 Jan 2015 21:21:21 +0000 (-0800) Subject: INFRA-132 - CRM/Group - phpcbf X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=5c61c74733e3f2efab6dfa1b98f34d290a54f915;p=civicrm-core.git INFRA-132 - CRM/Group - phpcbf --- diff --git a/CRM/Group/Form/Edit.php b/CRM/Group/Form/Edit.php index a5dc723cf0..8892eae7b1 100644 --- a/CRM/Group/Form/Edit.php +++ b/CRM/Group/Form/Edit.php @@ -89,7 +89,8 @@ class CRM_Group_Form_Edit extends CRM_Core_Form { public function preProcess() { $this->_id = $this->get('id'); if ($this->_id) { - $breadCrumb = array(array('title' => ts('Manage Groups'), + $breadCrumb = array(array( + 'title' => ts('Manage Groups'), 'url' => CRM_Utils_System::url('civicrm/group', 'reset=1' ), @@ -124,8 +125,7 @@ class CRM_Group_Form_Edit extends CRM_Core_Form { 'id' => $this->_id, 'title' => $this->_title, 'saved_search_id' => - isset($this->_groupValues['saved_search_id']) ? - $this->_groupValues['saved_search_id'] : '', + isset($this->_groupValues['saved_search_id']) ? $this->_groupValues['saved_search_id'] : '', ); if (isset($this->_groupValues['saved_search_id'])) { $groupValues['mapping_id'] = CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_SavedSearch', @@ -137,13 +137,14 @@ class CRM_Group_Form_Edit extends CRM_Core_Form { 'search_custom_id' ); } - if (!empty($this->_groupValues['created_id'])) + if (!empty($this->_groupValues['created_id'])) { $groupValues['created_by'] = - CRM_Core_DAO::getFieldValue("CRM_Contact_DAO_Contact", $this->_groupValues['created_id'] , 'sort_name', 'id'); + CRM_Core_DAO::getFieldValue("CRM_Contact_DAO_Contact", $this->_groupValues['created_id'], 'sort_name', 'id'); + } if (!empty($this->_groupValues['modified_id'])) { $groupValues['modified_by'] = - CRM_Core_DAO::getFieldValue("CRM_Contact_DAO_Contact", $this->_groupValues['modified_id'] , 'sort_name', 'id'); + CRM_Core_DAO::getFieldValue("CRM_Contact_DAO_Contact", $this->_groupValues['modified_id'], 'sort_name', 'id'); } $this->assign_by_ref('group', $groupValues); @@ -281,8 +282,7 @@ class CRM_Group_Form_Edit extends CRM_Core_Form { array( 'type' => 'upload', 'name' => - ($this->_action == CRM_Core_Action::ADD) ? - ts('Continue') : ts('Save'), + ($this->_action == CRM_Core_Action::ADD) ? ts('Continue') : ts('Save'), 'isDefault' => TRUE, ), array( diff --git a/CRM/Group/Page/AJAX.php b/CRM/Group/Page/AJAX.php index 010d5664c2..86aa51b196 100644 --- a/CRM/Group/Page/AJAX.php +++ b/CRM/Group/Page/AJAX.php @@ -49,8 +49,12 @@ class CRM_Group_Page_AJAX { } else { $sortMapper = array( - 0 => 'groups.title', 1 => 'count', 2 => 'createdBy.sort_name', 3 => '', - 4 => 'groups.group_type', 5 => 'groups.visibility', + 0 => 'groups.title', + 1 => 'count', + 2 => 'createdBy.sort_name', + 3 => '', + 4 => 'groups.group_type', + 5 => 'groups.visibility', ); $sEcho = CRM_Utils_Type::escape($_REQUEST['sEcho'], 'Integer'); @@ -90,9 +94,9 @@ class CRM_Group_Page_AJAX { if (empty($params['showOrgInfo'])) { unset($selectorElements[6]); } - //add setting so this can be tested by unit test - //@todo - ideally the portion of this that retrieves the groups should be extracted into a function separate - // from the one which deals with web inputs & outputs so we have a properly testable & re-usable function + //add setting so this can be tested by unit test + //@todo - ideally the portion of this that retrieves the groups should be extracted into a function separate + // from the one which deals with web inputs & outputs so we have a properly testable & re-usable function if(!empty($params['is_unit_test'])) { return array($groups, $iFilteredTotal); } diff --git a/CRM/Group/Page/Group.php b/CRM/Group/Page/Group.php index 211226541c..dd148c4094 100644 --- a/CRM/Group/Page/Group.php +++ b/CRM/Group/Page/Group.php @@ -47,7 +47,8 @@ class CRM_Group_Page_Group extends CRM_Core_Page_Basic { * * @return array self::$_links array of action links */ - public function &links() {} + public function &links() { + } /** * Return class name of edit form @@ -149,8 +150,7 @@ class CRM_Group_Page_Group extends CRM_Core_Page_Basic { } public function search() { - if ($this->_action & - (CRM_Core_Action::ADD | + if ($this->_action & (CRM_Core_Action::ADD | CRM_Core_Action::UPDATE | CRM_Core_Action::DELETE )