From: Tim Otten Date: Fri, 9 Jan 2015 02:09:06 +0000 (-0800) Subject: INFRA-132 - s/false/FALSE/ X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=ab8a593e7715c1b7feca58e5311f01a42509b3b6;p=civicrm-core.git INFRA-132 - s/false/FALSE/ --- diff --git a/CRM/Campaign/Form/Survey/TabHeader.php b/CRM/Campaign/Form/Survey/TabHeader.php index cf88c4c3a5..b43e5c1f43 100644 --- a/CRM/Campaign/Form/Survey/TabHeader.php +++ b/CRM/Campaign/Form/Survey/TabHeader.php @@ -164,7 +164,7 @@ class CRM_Campaign_Form_Survey_TabHeader { $tabs = $form->get('tabHeader'); if (is_array($tabs)) { - $current = false; + $current = FALSE; foreach ($tabs as $subPage => $pageVal) { if ($current) { $next = $subPage; diff --git a/CRM/Contact/BAO/Contact/Optimizer.php b/CRM/Contact/BAO/Contact/Optimizer.php index 6cf962ba1b..4f4042200d 100644 --- a/CRM/Contact/BAO/Contact/Optimizer.php +++ b/CRM/Contact/BAO/Contact/Optimizer.php @@ -63,14 +63,14 @@ class CRM_Contact_BAO_Contact_Optimizer { foreach ($oldWebsiteValues as $idx => $value) { if (! empty($value['url'])) { - $oldEmpty = false; + $oldEmpty = FALSE; $old[] = array('website_type_id' => $value['website_type_id'], 'url' => $value['url']); } } foreach ($newWebsiteValues as $idx => $value) { if (! empty($value['url'])) { - $newEmpty = false; + $newEmpty = FALSE; $new[] = array('website_type_id' => $value['website_type_id'], 'url' => $value['url']); } } @@ -87,7 +87,7 @@ class CRM_Contact_BAO_Contact_Optimizer { // same number of entries, check if they are exactly the same foreach ($old as $oldID => $oldValues) { - $found = false; + $found = FALSE; foreach ($new as $newID => $newValues) { if ( $old['website_type_id'] == $new['website_type_id'] && @@ -126,7 +126,7 @@ class CRM_Contact_BAO_Contact_Optimizer { foreach ($oldEmailValues as $idx => $value) { if (! empty($value['email'])) { - $oldEmpty = false; + $oldEmpty = FALSE; $old[] = array( 'email' => $value['email'], 'location_type_id' => $value['location_type_id'], @@ -141,7 +141,7 @@ class CRM_Contact_BAO_Contact_Optimizer { foreach ($newEmailValues as $idx => $value) { if (! empty($value['email'])) { - $newEmpty = false; + $newEmpty = FALSE; $new[] = array( 'email' => $value['email'], 'location_type_id' => $value['location_type_id'], @@ -166,7 +166,7 @@ class CRM_Contact_BAO_Contact_Optimizer { // same number of entries, check if they are exactly the same foreach ($old as $oldID => $oldValues) { - $found = false; + $found = FALSE; foreach ($new as $newID => $newValues) { if ( $old['email_type_id'] == $new['email_type_id'] && diff --git a/CRM/Contact/BAO/Group.php b/CRM/Contact/BAO/Group.php index c60eff217f..68dfe71cbd 100644 --- a/CRM/Contact/BAO/Group.php +++ b/CRM/Contact/BAO/Group.php @@ -938,7 +938,7 @@ class CRM_Contact_BAO_Group extends CRM_Contact_DAO_Group { ); // If group has children, add class for link to view children - $values[$object->id]['is_parent'] = false; + $values[$object->id]['is_parent'] = FALSE; if (array_key_exists('children', $values[$object->id])) { $values[$object->id]['class'][] = "crm-group-parent"; $values[$object->id]['is_parent'] = TRUE; diff --git a/CRM/Contact/BAO/GroupContactCache.php b/CRM/Contact/BAO/GroupContactCache.php index 8948c33c97..4ebd3a618b 100644 --- a/CRM/Contact/BAO/GroupContactCache.php +++ b/CRM/Contact/BAO/GroupContactCache.php @@ -43,7 +43,7 @@ class CRM_Contact_BAO_GroupContactCache extends CRM_Contact_DAO_GroupContactCach * @param $groupIDs * Of group that we are checking against. * - * @return boolean TRUE if we did not regenerate, false if we did + * @return boolean TRUE if we did not regenerate, FALSE if we did */ public static function check($groupIDs) { if (empty($groupIDs)) { @@ -121,7 +121,7 @@ AND ( g.cache_date IS NULL OR * @param int $limit * Limits the number of groups we evaluate. * - * @return boolean TRUE if we did not regenerate, false if we did + * @return boolean TRUE if we did not regenerate, FALSE if we did */ public static function loadAll($groupIDs = NULL, $limit = 0) { // ensure that all the smart groups are loaded diff --git a/CRM/Contact/Form/Search.php b/CRM/Contact/Form/Search.php index 8c6cf410f5..964cc5c95b 100644 --- a/CRM/Contact/Form/Search.php +++ b/CRM/Contact/Form/Search.php @@ -337,7 +337,7 @@ class CRM_Contact_Form_Search extends CRM_Core_Form_Search { } else { $className = $this->_modeValue['taskClassName']; - $tasks += $className::permissionedTaskTitles($permission, false); + $tasks += $className::permissionedTaskTitles($permission, FALSE); } if (isset($this->_ssID)) { @@ -658,7 +658,7 @@ class CRM_Contact_Form_Search extends CRM_Core_Form_Search { $this->_params, $this->_returnProperties, $this->_action, - false, TRUE, + FALSE, TRUE, $this->_context, $this->_contextMenu ); @@ -668,7 +668,7 @@ class CRM_Contact_Form_Search extends CRM_Core_Form_Search { $selector = new self::$_selectorName( $this->_params, $this->_action, - NULL, false, NULL, + NULL, FALSE, NULL, "search", "advanced" ); } @@ -799,7 +799,7 @@ class CRM_Contact_Form_Search extends CRM_Core_Form_Search { $this->_params, $this->_returnProperties, $this->_action, - false, + FALSE, $searchChildGroups, $this->_context, $this->_contextMenu @@ -811,7 +811,7 @@ class CRM_Contact_Form_Search extends CRM_Core_Form_Search { $this->_params, $this->_action, NULL, - false, + FALSE, NULL, "search", "advanced" diff --git a/CRM/Contact/Form/Search/Builder.php b/CRM/Contact/Form/Search/Builder.php index e9850f164c..bfcc5d20e8 100644 --- a/CRM/Contact/Form/Search/Builder.php +++ b/CRM/Contact/Form/Search/Builder.php @@ -475,7 +475,7 @@ class CRM_Contact_Form_Search_Builder extends CRM_Contact_Form_Search { $v2empty = TRUE; foreach ($val as $vk => $vv) { if (!empty($vk)) { - $v2empty = false; + $v2empty = FALSE; } } if ($v2empty) { diff --git a/CRM/Contact/Form/Search/Criteria.php b/CRM/Contact/Form/Search/Criteria.php index b491667cac..4234e81019 100644 --- a/CRM/Contact/Form/Search/Criteria.php +++ b/CRM/Contact/Form/Search/Criteria.php @@ -85,7 +85,7 @@ class CRM_Contact_Form_Search_Criteria { $used_for = CRM_Core_OptionGroup::values('tag_used_for'); $tagsTypes = array(); - $showAllTagTypes = false; + $showAllTagTypes = FALSE; foreach ($used_for as $key => $value) { //check tags for every type and find if there are any defined $tags = CRM_Core_BAO_Tag::getTagsUsedFor($key, FALSE, TRUE, NULL); diff --git a/CRM/Contact/Form/Task/PDFLetterCommon.php b/CRM/Contact/Form/Task/PDFLetterCommon.php index 2aaa42f5c9..7cfe3a757a 100644 --- a/CRM/Contact/Form/Task/PDFLetterCommon.php +++ b/CRM/Contact/Form/Task/PDFLetterCommon.php @@ -156,7 +156,7 @@ class CRM_Contact_Form_Task_PDFLetterCommon { ); $config = CRM_Core_Config::singleton(); - if ($config->wkhtmltopdfPath == false) { + if ($config->wkhtmltopdfPath == FALSE) { $form->add( 'text', 'stationery', diff --git a/CRM/Core/BAO/FinancialTrxn.php b/CRM/Core/BAO/FinancialTrxn.php index 9edc2974c9..ed988c535a 100644 --- a/CRM/Core/BAO/FinancialTrxn.php +++ b/CRM/Core/BAO/FinancialTrxn.php @@ -297,7 +297,7 @@ WHERE lt.entity_id = %1 "; * * @param int $entity_id * @return bool - * TRUE on success, false otherwise. + * TRUE on success, FALSE otherwise. * @static */ public static function deleteFinancialTrxn($entity_id) { diff --git a/CRM/Core/BAO/Mapping.php b/CRM/Core/BAO/Mapping.php index e6bc7d2821..6d68b1384e 100644 --- a/CRM/Core/BAO/Mapping.php +++ b/CRM/Core/BAO/Mapping.php @@ -1037,7 +1037,7 @@ class CRM_Core_BAO_Mapping extends CRM_Core_DAO_Mapping { } // CRM-14983: verify if values are comma separated convert to array - if (!is_array($value) && (strpos($value,',') !== false || strstr($value, '(')) && empty($isCustomField) && $params['operator'][$key][$k] == 'IN') { + if (!is_array($value) && (strpos($value,',') !== FALSE || strstr($value, '(')) && empty($isCustomField) && $params['operator'][$key][$k] == 'IN') { preg_match('#\((.*?)\)#', $value, $match); $tmpArray = explode(',', $match[1]); $value = array_combine(array_values($tmpArray),array_values($tmpArray)); diff --git a/CRM/Core/BAO/MessageTemplate.php b/CRM/Core/BAO/MessageTemplate.php index f68ed7b97f..121a4648e7 100644 --- a/CRM/Core/BAO/MessageTemplate.php +++ b/CRM/Core/BAO/MessageTemplate.php @@ -205,7 +205,7 @@ class CRM_Core_BAO_MessageTemplate extends CRM_Core_DAO_MessageTemplate { } list($details) = CRM_Utils_Token::getTokenDetails(array($contactId), $returnProperties, - NULL, NULL, false, + NULL, NULL, FALSE, $tokens, 'CRM_Core_BAO_MessageTemplate'); $contact = reset($details); @@ -222,7 +222,7 @@ class CRM_Core_BAO_MessageTemplate extends CRM_Core_DAO_MessageTemplate { if ($$bodyType) { CRM_Utils_Token::replaceGreetingTokens($$bodyType, NULL, $contact['contact_id']); $$bodyType = CRM_Utils_Token::replaceDomainTokens($$bodyType, $domain, TRUE, $tokens, TRUE); - $$bodyType = CRM_Utils_Token::replaceContactTokens($$bodyType, $contact, false, $tokens, false, TRUE); + $$bodyType = CRM_Utils_Token::replaceContactTokens($$bodyType, $contact, FALSE, $tokens, FALSE, TRUE); $$bodyType = CRM_Utils_Token::replaceComponentTokens($$bodyType, $contact, $tokens, TRUE); $$bodyType = CRM_Utils_Token::replaceHookTokens($$bodyType, $contact , $categories, TRUE); } @@ -237,7 +237,7 @@ class CRM_Core_BAO_MessageTemplate extends CRM_Core_DAO_MessageTemplate { } // do replacements in message subject - $messageSubject = CRM_Utils_Token::replaceContactTokens($body_subject, $contact, false, $tokens); + $messageSubject = CRM_Utils_Token::replaceContactTokens($body_subject, $contact, FALSE, $tokens); $messageSubject = CRM_Utils_Token::replaceDomainTokens($messageSubject, $domain, TRUE, $tokens); $messageSubject = CRM_Utils_Token::replaceComponentTokens($messageSubject, $contact, $tokens, TRUE); $messageSubject = CRM_Utils_Token::replaceHookTokens($messageSubject, $contact, $categories, TRUE); diff --git a/CRM/Core/BAO/Navigation.php b/CRM/Core/BAO/Navigation.php index a608743a17..9a68eae56f 100644 --- a/CRM/Core/BAO/Navigation.php +++ b/CRM/Core/BAO/Navigation.php @@ -755,7 +755,7 @@ ORDER BY parent_id, weight"; $newWeight = $newWeight + 1; // since this is a last node we don't need to increment other nodes - $incrementOtherNodes = false; + $incrementOtherNodes = FALSE; } $transaction = new CRM_Core_Transaction(); diff --git a/CRM/Core/BAO/Note.php b/CRM/Core/BAO/Note.php index b683350309..557f5cedcf 100644 --- a/CRM/Core/BAO/Note.php +++ b/CRM/Core/BAO/Note.php @@ -289,7 +289,7 @@ class CRM_Core_BAO_Note extends CRM_Core_DAO_Note { * @param bool $showStatus * Do we need to set status or not. * - * @return mixed|NULL $return no of deleted notes on success, false otherwise@access public + * @return mixed|NULL $return no of deleted notes on success, FALSE otherwise@access public * @static */ public static function del($id, $showStatus = TRUE) { @@ -473,7 +473,7 @@ ORDER BY modified_date desc"; */ private static function buildNoteTree($parentId, $maxDepth = 0, $snippet = FALSE, &$tree = array(), $depth = 0) { if ($maxDepth && $depth > $maxDepth) { - return false; + return FALSE; } // get direct children of given parentId note diff --git a/CRM/Core/BAO/PrevNextCache.php b/CRM/Core/BAO/PrevNextCache.php index 499b20b868..09aa7085f5 100644 --- a/CRM/Core/BAO/PrevNextCache.php +++ b/CRM/Core/BAO/PrevNextCache.php @@ -211,7 +211,7 @@ WHERE cacheKey = %1 * @return bool */ public static function is_serialized($string) { - return (@unserialize($string) !== false); + return (@unserialize($string) !== FALSE); } /** diff --git a/CRM/Core/BAO/SchemaHandler.php b/CRM/Core/BAO/SchemaHandler.php index 6ceae0068a..c7adca4c00 100644 --- a/CRM/Core/BAO/SchemaHandler.php +++ b/CRM/Core/BAO/SchemaHandler.php @@ -66,7 +66,7 @@ class CRM_Core_BAO_SchemaHandler { * * @param array $params * - * @return TRUE if successfully created, false otherwise + * @return TRUE if successfully created, FALSE otherwise * * @static */ @@ -367,7 +367,7 @@ ALTER TABLE {$tableName} * Name of the table to be created. * * @return bool - * TRUE if successfully deleted, false otherwise. + * TRUE if successfully deleted, FALSE otherwise. * * @static */ diff --git a/CRM/Event/Form/Registration/Register.php b/CRM/Event/Form/Registration/Register.php index ccad8f888b..7a49e25293 100644 --- a/CRM/Event/Form/Registration/Register.php +++ b/CRM/Event/Form/Registration/Register.php @@ -611,7 +611,7 @@ class CRM_Event_Form_Registration_Register extends CRM_Event_Form_Registration { $form->add('hidden', 'priceSetId', $form->_priceSetId); // CRM-14492 Admin price fields should show up on event registration if user has 'administer CiviCRM' permissions - $adminFieldVisible = false; + $adminFieldVisible = FALSE; if (CRM_Core_Permission::check('administer CiviCRM')) { $adminFieldVisible = TRUE; } diff --git a/CRM/Event/Page/EventInfo.php b/CRM/Event/Page/EventInfo.php index 3bdf94b7f9..d6ff5b4705 100644 --- a/CRM/Event/Page/EventInfo.php +++ b/CRM/Event/Page/EventInfo.php @@ -120,7 +120,7 @@ class CRM_Event_Page_EventInfo extends CRM_Core_Page { $visibility = CRM_Core_PseudoConstant::visibility('name'); // CRM-14492 Admin price fields should show up on event registration if user has 'administer CiviCRM' permissions - $adminFieldVisible = false; + $adminFieldVisible = FALSE; if (CRM_Core_Permission::check('administer CiviCRM')) { $adminFieldVisible = TRUE; } @@ -128,7 +128,7 @@ class CRM_Event_Page_EventInfo extends CRM_Core_Page { foreach ($priceSetFields as $fid => $fieldValues) { if (!is_array($fieldValues['options']) || empty($fieldValues['options']) || - (CRM_Utils_Array::value('visibility_id', $fieldValues) != array_search('public', $visibility) && $adminFieldVisible == false) + (CRM_Utils_Array::value('visibility_id', $fieldValues) != array_search('public', $visibility) && $adminFieldVisible == FALSE) ) { continue; } diff --git a/CRM/Logging/Differ.php b/CRM/Logging/Differ.php index e01fde6b67..03f9a66f15 100644 --- a/CRM/Logging/Differ.php +++ b/CRM/Logging/Differ.php @@ -128,7 +128,7 @@ LEFT JOIN civicrm_activity_contact source ON source.activity_id = lt.id AND sour if (empty($contactIdClause)) { $contactIdClause = "AND contact_id = %3"; } - if (strpos($table, 'civicrm_value') !== false) { + if (strpos($table, 'civicrm_value') !== FALSE) { $contactIdClause = "AND entity_id = %3"; } }