Remove unused T_BOOL constant
authorColeman Watts <coleman@civicrm.org>
Mon, 29 Jul 2013 16:28:01 +0000 (09:28 -0700)
committerColeman Watts <coleman@civicrm.org>
Mon, 29 Jul 2013 16:28:01 +0000 (09:28 -0700)
CRM/Core/DAO.php
CRM/Export/BAO/Export.php
CRM/Utils/Type.php
api/v3/CustomField.php
api/v3/UFField.php
tests/phpunit/api/v3/GrantTest.php
tests/phpunit/api/v3/SyntaxConformanceTest.php

index bbf4eebc875a4ec517bd7f7bf230fd98eb1fc3a5..64ecaecff1480557a7280cc0311ea91c5ab200bb 100644 (file)
@@ -1317,7 +1317,7 @@ SELECT contact_id
             continue;
           }
           // Pick an option value if needed
-          if ($value['type'] !== CRM_Utils_Type::T_BOOL) {
+          if ($value['type'] !== CRM_Utils_Type::T_BOOLEAN) {
             $options = $daoName::buildOptions($dbName, 'create');
             if ($options) {
               $object->$dbName = key($options);
@@ -1332,7 +1332,7 @@ SELECT contact_id
               $object->$dbName = $counter;
               break;
 
-            case CRM_Utils_Type::T_BOOL:
+            case CRM_Utils_Type::T_BOOLEAN:
               if (isset($value['default'])) {
                 $object->$dbName = $value['default'];
               }
index 57e4ad7a2767e4cbfd9ff4aa547636101548fa3c..55e50b7c2e54198f8286f9ae46e6c3676883ddb5 100644 (file)
@@ -1230,7 +1230,6 @@ INSERT INTO {$componentTable} SELECT distinct gc.contact_id FROM civicrm_group_c
     if (isset($query->_fields[$field]['type'])) {
       switch ($query->_fields[$field]['type']) {
         case CRM_Utils_Type::T_INT:
-        case CRM_Utils_Type::T_BOOL:
         case CRM_Utils_Type::T_BOOLEAN:
           $sqlColumns[$fieldName] = "$fieldName varchar(16)";
           break;
index e794297021d045f7853faa1382f2e0d1b5554257..eb5fe6ded9c0ddf7347f7b86e37e6f192406c0a2 100644 (file)
@@ -39,7 +39,6 @@ class CRM_Utils_Type {
     T_ENUM       = 2,
     T_DATE       = 4,
     T_TIME       = 8,
-    T_BOOL       = 16,
     T_BOOLEAN    = 16,
     T_TEXT       = 32,
     T_LONGTEXT   = 32,
index 300f0d72e672db08af9f6f8b0a0212d05672b1b8..10d7fedead2057cb0a21a19f5cdba5a6d87e06dd 100644 (file)
@@ -92,7 +92,7 @@ function _civicrm_api3_custom_field_create_spec(&$params) {
   $params['option_type'] = array(
     'title' => 'This (boolean) field tells the BAO to create an option group for the field if the field type is appropriate',
     'api.default' => 1,
-    'type' => CRM_Utils_Type::T_BOOL,
+    'type' => CRM_Utils_Type::T_BOOLEAN,
   );
   $params['data_type']['api.default'] = 'String';
   $params['is_active']['api.default'] = 1;
index 5c2293b5429138caae67c4991d7f8c5d4ac5505d..86522551e66858d92e1de5af5dc4ffe7f5fa7a6d 100644 (file)
@@ -114,7 +114,7 @@ function civicrm_api3_uf_field_create($params) {
 function _civicrm_api3_uf_field_create_spec(&$params) {
   $params['option.autoweight'] = array(
     'title' => "Automatically adjust weights in UFGroup to align with UFField",
-    'type' => CRM_Utils_Type::T_BOOL
+    'type' => CRM_Utils_Type::T_BOOLEAN
   );
 }
 
index 92ebf565a97754a8ac3d1c6761f2e37fa778fc54..6249317f4d16c8ecb75ace3717db8d82c9462252 100644 (file)
@@ -144,7 +144,6 @@ class api_v3_GrantTest extends CiviUnitTestCase {
           }
           break;
 
-        case CRM_Utils_Type::T_BOOL:
         case CRM_Utils_Type::T_BOOLEAN:
           // probably created with a 1
           $entity[$field] = 0;
index 85f00009e9628ffa8e7281fdc708a73b422b7051..765a5971625c88d03f0bdd788debe36c4aebcebb 100644 (file)
@@ -700,7 +700,6 @@ class api_v3_SyntaxConformanceTest extends CiviUnitTestCase {
           }
           break;
 
-        case CRM_Utils_Type::T_BOOL:
         case CRM_Utils_Type::T_BOOLEAN:
           // probably created with a 1
           $entity[$fieldName] = '0';