$returnProperties = array('filter', 'data_type', 'is_active');
$fldValues = array();
CRM_Core_DAO::commonRetrieve('CRM_Core_DAO_CustomField', $params, $cf, $returnProperties);
- if (!$cf['id'] || !$cf['is_active'] || $cf['data_type'] = !'ContactReference') {
+ if (!$cf['id'] || !$cf['is_active'] || $cf['data_type'] != 'ContactReference') {
echo "$name|error\n";
CRM_Utils_System::civiExit();
}
if (isset($_GET['org']) || isset($_GET['hh'])) {
$json = FALSE;
- if ($splitName = explode(' :: ', $name)) {
+ $splitName = explode(' :: ', $name);
+ if ($splitName) {
$contactName = trim(CRM_Utils_Array::value('0', $splitName));
$street = trim(CRM_Utils_Array::value('1', $splitName));
$city = trim(CRM_Utils_Array::value('2', $splitName));
$customGroupID = CRM_Utils_Type::escape($_REQUEST['groupID'], 'Positive');
CRM_Core_BAO_CustomValue::deleteCustomValue($customValueID, $customGroupID);
- if ($contactId = CRM_Utils_Array::value('contactId', $_REQUEST)) {
+ $contactId = CRM_Utils_Array::value('contactId', $_REQUEST);
+ if ($contactId) {
echo CRM_Contact_BAO_Contact::getCountComponent('custom_' . $_REQUEST['groupID'], $contactId);
}
else {
$noemail = CRM_Utils_Array::value('noemail', $_GET);
$queryString = NULL;
- if ($name = CRM_Utils_Array::value('name', $_GET)) {
+ $name = CRM_Utils_Array::value('name', $_GET);
+ if ($name) {
$name = CRM_Utils_Type::escape($name, 'String');
if ($noemail) {
$queryString = " cc.sort_name LIKE '%$name%'";
$queryString = " ( cc.sort_name LIKE '%$name%' OR ce.email LIKE '%$name%' ) ";
}
}
- elseif ($cid = CRM_Utils_Array::value('cid', $_GET)) {
- //check cid for interger
- $contIDS = explode(',', $cid);
- foreach ($contIDS as $contID) {
- CRM_Utils_Type::escape($contID, 'Integer');
- }
- $queryString = " cc.id IN ( $cid )";
+ else {
+ $cid = CRM_Utils_Array::value('cid', $_GET);
+ if ($cid) {
+ //check cid for interger
+ $contIDS = explode(',', $cid);
+ foreach ($contIDS as $contID) {
+ CRM_Utils_Type::escape($contID, 'Integer');
+ }
+ $queryString = " cc.id IN ( $cid )";
+ }
}
if ($queryString) {
//check for mobile type
$phoneTypes = CRM_Core_OptionGroup::values('phone_type', TRUE, FALSE, FALSE, NULL, 'name');
$mobileType = CRM_Utils_Array::value('Mobile', $phoneTypes);
-
- if ($name = CRM_Utils_Array::value('name', $_GET)) {
+
+ $name = CRM_Utils_Array::value('name', $_GET);
+ if ($name) {
$name = CRM_Utils_Type::escape($name, 'String');
$queryString = " ( cc.sort_name LIKE '%$name%' OR cp.phone LIKE '%$name%' ) ";
}
- elseif ($cid = CRM_Utils_Array::value('cid', $_GET)) {
- //check cid for interger
- $contIDS = explode(',', $cid);
- foreach ($contIDS as $contID) {
- CRM_Utils_Type::escape($contID, 'Integer');
+ else {
+ $cid = CRM_Utils_Array::value('cid', $_GET);
+ if ($cid) {
+ //check cid for interger
+ $contIDS = explode(',', $cid);
+ foreach ($contIDS as $contID) {
+ CRM_Utils_Type::escape($contID, 'Integer');
+ }
+ $queryString = " cc.id IN ( $cid )";
}
- $queryString = " cc.id IN ( $cid )";
}
if ($queryString) {