whitespace cleanup
authorkurund <kurund@civicrm.org>
Mon, 26 Aug 2013 15:44:55 +0000 (21:14 +0530)
committerkurund <kurund@civicrm.org>
Mon, 26 Aug 2013 15:44:55 +0000 (21:14 +0530)
CRM/Contact/Form/Task.php

index bbd918f4ae99e6c8354189f2a9f6c58ebf19b799..ed9e84b63b9ac6dfe1b4ff1c63167a7e8f27b6e4 100644 (file)
@@ -153,13 +153,13 @@ class CRM_Contact_Form_Task extends CRM_Core_Form {
       ($form->_task == CRM_Contact_Task::SAVE_SEARCH)
     ) {
       $sortByCharacter = $form->get('sortByCharacter');
-      $cacheKey        = ($sortByCharacter && $sortByCharacter != 'all') ? "{$cacheKey}_alphabet" : $cacheKey;
+      $cacheKey = ($sortByCharacter && $sortByCharacter != 'all') ? "{$cacheKey}_alphabet" : $cacheKey;
 
       if ($form->_action == CRM_Core_Action::COPY) {
-        $allCids[$cacheKey] = $form->getContactIds( );
+        $allCids[$cacheKey] = $form->getContactIds();
       }
       else {
-      $allCids         = CRM_Core_BAO_PrevNextCache::getSelection($cacheKey, "getall");
+        $allCids = CRM_Core_BAO_PrevNextCache::getSelection($cacheKey, "getall");
       }
 
       $form->_contactIds = array();
@@ -216,17 +216,17 @@ class CRM_Contact_Form_Task extends CRM_Core_Form {
         }
       }
       else {
-      // fetching selected contact ids of passed cache key
-      $selectedCids = CRM_Core_BAO_PrevNextCache::getSelection($cacheKey);
-      foreach ($selectedCids[$cacheKey] as $selectedCid => $ignore) {
-        if ($useTable) {
-          $insertString[] = " ( {$selectedCid} ) ";
-        }
-        else {
-          $form->_contactIds[] = $selectedCid;
+        // fetching selected contact ids of passed cache key
+        $selectedCids = CRM_Core_BAO_PrevNextCache::getSelection($cacheKey);
+        foreach ($selectedCids[$cacheKey] as $selectedCid => $ignore) {
+          if ($useTable) {
+            $insertString[] = " ( {$selectedCid} ) ";
+          }
+          else {
+            $form->_contactIds[] = $selectedCid;
+          }
         }
       }
-      }
 
       if (!empty($insertString)) {
         $string = implode(',', $insertString);
@@ -254,10 +254,11 @@ class CRM_Contact_Form_Task extends CRM_Core_Form {
 
 
     if (CRM_Utils_Array::value('radio_ts', self::$_searchFormValues) == 'ts_sel'
-    && ($form->_action != CRM_Core_Action::COPY) ) {
+      && ($form->_action != CRM_Core_Action::COPY)
+    ) {
       $params = array();
       $sel = CRM_Utils_Array::value('radio_ts', self::$_searchFormValues);
-      $form->assign('searchtype',$sel);
+      $form->assign('searchtype', $sel);
       $result = CRM_Core_BAO_PrevNextCache::getSelectedContacts();
       $form->assign("value", $result);
     }
@@ -285,16 +286,14 @@ class CRM_Contact_Form_Task extends CRM_Core_Form {
     }
 
     $selectorName = $this->controller->selectorName();
-    require_once (str_replace('_', DIRECTORY_SEPARATOR, $selectorName) . '.php');
+    require_once(str_replace('_', DIRECTORY_SEPARATOR, $selectorName) . '.php');
 
     $fv = $this->get('formValues');
     $customClass = $this->get('customSearchClass');
     require_once 'CRM/Core/BAO/Mapping.php';
     $returnProperties = CRM_Core_BAO_Mapping::returnProperties(self::$_searchFormValues);
 
-    $selector   = new $selectorName(
-      $customClass, $fv, null, $returnProperties
-    );
+    $selector = new $selectorName($customClass, $fv, NULL, $returnProperties);
 
     $params = $this->get('queryParams');
 
@@ -309,13 +308,13 @@ class CRM_Contact_Form_Task extends CRM_Core_Form {
     if (!$queryOperator) {
       $queryOperator = 'AND';
     }
-    $dao = &$selector->contactIDQuery($params, $this->_action, $sortID,
-      CRM_Utils_Array::value('display_relationship_type', $fv ),
+    $dao = & $selector->contactIDQuery($params, $this->_action, $sortID,
+      CRM_Utils_Array::value('display_relationship_type', $fv),
       $queryOperator
     );
 
     $contactIds = array();
-    while$dao->fetch()) {
+    while ($dao->fetch()) {
       $contactIds[$dao->contact_id] = $dao->contact_id;
     }
 
@@ -342,7 +341,8 @@ class CRM_Contact_Form_Task extends CRM_Core_Form {
    * @return void
    * @access public
    */
-  function addRules() {}
+  function addRules() {
+  }
 
   /**
    * Function to actually build the form
@@ -361,7 +361,9 @@ class CRM_Contact_Form_Task extends CRM_Core_Form {
    *
    * @return void
    */
-  public function postProcess() {}
+  public function postProcess() {
+  }
+
   //end of function
 
   /**