($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();
}
}
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);
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);
}
}
$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');
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;
}
* @return void
* @access public
*/
- function addRules() {}
+ function addRules() {
+ }
/**
* Function to actually build the form
*
* @return void
*/
- public function postProcess() {}
+ public function postProcess() {
+ }
+
//end of function
/**