Merge pull request #2966 from eileenmcnaughton/patch-2
authorEileen McNaughton <eileen@mcnaughty.com>
Sun, 27 Apr 2014 23:10:18 +0000 (16:10 -0700)
committerEileen McNaughton <eileen@mcnaughty.com>
Sun, 27 Apr 2014 23:10:18 +0000 (16:10 -0700)
E-Notice fix

1  2 
CRM/Contact/Page/AJAX.php

index 93992854879bcc8e995b5d2fb564c6b202fbb1c1,a2e9a7e9bd38a8a42205e0da6d8ae7031c6ef63c..ddc6f2907c56d24c19bdf2e0bb6f4f6bc01f31e9
@@@ -102,14 -102,14 +102,14 @@@ class CRM_Contact_Page_AJAX 
      // check that this is a valid, active custom field of Contact Reference type
      $params           = array('id' => $cfID);
      $returnProperties = array('filter', 'data_type', 'is_active');
-     $fldValues        = array();
+     $fldValues = $cf = array();
      CRM_Core_DAO::commonRetrieve('CRM_Core_DAO_CustomField', $params, $cf, $returnProperties);
      if (!$cf['id'] || !$cf['is_active'] || $cf['data_type'] = !'ContactReference') {
        echo "$name|error\n";
        CRM_Utils_System::civiExit();
      }
  
-     if ($cf['filter']) {
+     if (!empty($cf['filter'])) {
        $filterParams = array();
        parse_str($cf['filter'], $filterParams);
  
@@@ -1074,7 -1074,7 +1074,7 @@@ LIMIT {$offset}, {$rowCount
      $sEcho     = CRM_Utils_Type::escape($_REQUEST['sEcho'], 'Integer');
      $offset    = isset($_REQUEST['iDisplayStart']) ? CRM_Utils_Type::escape($_REQUEST['iDisplayStart'], 'Integer') : 0;
      $rowCount  = isset($_REQUEST['iDisplayLength']) ? CRM_Utils_Type::escape($_REQUEST['iDisplayLength'], 'Integer') : 25;
 -    $sort      = isset($_REQUEST['iSortCol_0']) ? $sortMapper[CRM_Utils_Type::escape($_REQUEST['iSortCol_0'], 'Integer')] : 'sort_name';
 +    $sort      = 'sort_name';
      $sortOrder = isset($_REQUEST['sSortDir_0']) ? CRM_Utils_Type::escape($_REQUEST['sSortDir_0'], 'String') : 'asc';
  
      $gid         = isset($_REQUEST['gid']) ? CRM_Utils_Type::escape($_REQUEST['gid'], 'Integer') : 0;