INFRA-132 - CRM/Group - phpcbf
authorTim Otten <totten@civicrm.org>
Tue, 6 Jan 2015 21:21:21 +0000 (13:21 -0800)
committerTim Otten <totten@civicrm.org>
Tue, 6 Jan 2015 23:07:43 +0000 (15:07 -0800)
CRM/Group/Form/Edit.php
CRM/Group/Page/AJAX.php
CRM/Group/Page/Group.php

index a5dc723cf08f206b99717afbb322f7740e476e75..8892eae7b11d7142fd6e8484a5ef9aa0a91a6d0e 100644 (file)
@@ -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(
index 010d5664c21877dc9547010b3d1953e34bf89fd3..86aa51b19677089229749fb9a5d3efd48caa0d62 100644 (file)
@@ -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);
       }
index 211226541cf19092c53290c498f74423bed58079..dd148c4094a35665643acb5977e888305cf04c08 100644 (file)
@@ -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
       )