}
// check if we had a value in the old
- $oldEmpty = $newEmpty = true;
+ $oldEmpty = $newEmpty = TRUE;
$old = $new = array();
foreach ($oldWebsiteValues as $idx => $value) {
$old['website_type_id'] == $new['website_type_id'] &&
$old['url'] == $new['url']
) {
- $found = true;
+ $found = TRUE;
unset($new[$newID]);
break;
}
}
// check if we had a value in the old
- $oldEmpty = $newEmpty = true;
+ $oldEmpty = $newEmpty = TRUE;
$old = $new = array();
foreach ($oldEmailValues as $idx => $value) {
$old['email_type_id'] == $new['email_type_id'] &&
$old['url'] == $new['url']
) {
- $found = true;
+ $found = TRUE;
unset($new[$newID]);
break;
}
$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;
+ $values[$object->id]['is_parent'] = TRUE;
}
// If group is a child, add child class
* @param bool $excludeHidden
*
* @return array (reference )|int $values the relevant data object values for the contact or
- * the total count when $count is true
+ * the total count when $count is TRUE
*
* $access public
*/
* @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)) {
* @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
static $invoked = FALSE;
// typically this needs to happy only once per instance
- // this is especially true in import, where we dont need
+ // this is especially TRUE in import, where we dont need
// to do this all the time
// this optimization is done only when no groupID is passed
// i.e. cache is reset for all groups
* Removes one or more contacts from the smart group cache
* @param int|array $cid
* @param int $groupId
- * @return bool - true if successful
+ * @return bool
+ * TRUE if successful.
*/
public static function removeContact($cid, $groupId = NULL) {
$cids = array();
* The uploaded files if any.
* @param int $contactID
*
- * @return true if no errors, else array of errors
+ * @return bool
+ * TRUE if no errors, else array of errors.
* @static
*/
public static function formRule($fields, $files, $contactID = NULL) {
$params = $this->exportValues();
// Process / save websites
- CRM_Core_BAO_Website::create($params['website'], $this->_contactId, true);
+ CRM_Core_BAO_Website::create($params['website'], $this->_contactId, TRUE);
$this->log();
$this->response();
// get user submitted values
// get it from controller only if form has been submitted, else preProcess has set this
- // $this->controller->isModal( ) returns true if page is
- // valid, i.e all the validations are true
+ // $this->controller->isModal( ) returns TRUE if page is
+ // valid, i.e all the validations are TRUE
if (!empty($_POST) && !$this->controller->isModal()) {
$this->_formValues = $this->controller->exportValues($this->_name);
$this->_params,
$this->_returnProperties,
$this->_action,
- false, true,
+ false, TRUE,
$this->_context,
$this->_contextMenu
);
*/
public static function checkArrayKeyEmpty($val) {
if (is_array($val)) {
- $v2empty = true;
+ $v2empty = TRUE;
foreach ($val as $vk => $vv) {
if (!empty($vk)) {
$v2empty = false;
if (count($tags) && $key != 'civicrm_file' && $key != 'civicrm_contact') {
//if tags exists then add type to display in adv search form help text
$tagsTypes[] = ts($value);
- $showAllTagTypes = true;
+ $showAllTagTypes = TRUE;
}
}
$tagTypesText = implode(" or ", $tagsTypes);
* @param array $self
* Additional values form 'this'.
*
- * @return true if no errors, else array of errors
+ * @return TRUE if no errors, else array of errors
*
*/
public static function formRule($fields, $dontCare, $self) {
$allEmails = explode(',', $formValues[$element]);
foreach ($allEmails as $value) {
list($contactId, $email) = explode('::', $value);
- $contactURL = CRM_Utils_System::url('civicrm/contact/view', "reset=1&force=1&cid={$contactId}", true);
+ $contactURL = CRM_Utils_System::url('civicrm/contact/view', "reset=1&force=1&cid={$contactId}", TRUE);
switch ($element) {
case 'cc_id':
$ccValues['email'][] = '"' . $form->_contactDetails[$contactId]['sort_name'] . '" <' . $email . '>';
* @param array $self
* Additional values form 'this'.
*
- * @return true if no errors, else array of errors
+ * @return bool
+ * TRUE if no errors, else array of errors.
*
*/
public static function formRule($fields, $dontCare, $self) {
$message = '';
$params['subscriptionId'] = $this->_subscriptionDetails->subscription_id;
- $updateSubscription = true;
+ $updateSubscription = TRUE;
if ($this->_paymentProcessorObj->isSupported('changeSubscriptionAmount')) {
$updateSubscription = $this->_paymentProcessorObj->changeSubscriptionAmount($message, $params);
}
public static function retrieve(&$params, &$defaults) {
$financialItem = new CRM_Financial_DAO_FinancialTrxn();
$financialItem->copyValues($params);
- if ($financialItem->find(true)) {
+ if ($financialItem->find(TRUE)) {
CRM_Core_DAO::storeValues($financialItem, $defaults);
return $financialItem;
}
* Delete financial transaction
*
* @param int $entity_id
- * @return true on success, false otherwise
+ * @return bool
+ * TRUE on success, false otherwise.
* @static
*/
public static function deleteFinancialTrxn($entity_id) {
$bodyType = "body_{$value}";
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::replaceComponentTokens($$bodyType, $contact, $tokens, true);
- $$bodyType = CRM_Utils_Token::replaceHookTokens($$bodyType, $contact , $categories, true);
+ $$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::replaceComponentTokens($$bodyType, $contact, $tokens, TRUE);
+ $$bodyType = CRM_Utils_Token::replaceHookTokens($$bodyType, $contact , $categories, TRUE);
}
}
$html = $body_html;
// do replacements in message subject
$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);
+ $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);
$messageSubject = $smarty->fetch("string:{$messageSubject}");
$parentClause = 'parent_id IS NULL';
}
- $incrementOtherNodes = true;
+ $incrementOtherNodes = TRUE;
$sql = "SELECT weight from civicrm_navigation WHERE {$parentClause} ORDER BY weight LIMIT %1, 1";
$params = array(1 => array($position, 'Positive'));
$newWeight = CRM_Core_DAO::singleValueQuery($sql, $params);
* 'class' => FIELD_CLASS_TYPE,
* 'primary' => BOOLEAN,
* 'required' => BOOLEAN,
- * 'searchable' => true,
+ * 'searchable' => TRUE,
* 'fk_table_name' => FOREIGN_KEY_TABLE_NAME,
* 'fk_field_name' => FOREIGN_KEY_FIELD_NAME,
* 'comment' => COMMENT,
*
* @param array $params
*
- * @return true if successfully created, false otherwise
+ * @return TRUE if successfully created, false otherwise
*
* @static
*/
* @param String $tableName
* Name of the table to be created.
*
- * @return true if successfully deleted, false otherwise
+ * @return bool
+ * TRUE if successfully deleted, false otherwise.
*
* @static
*/
// Symfony-based invocation path
require_once CIVICRM_SYMFONY_PATH . '/app/bootstrap.php.cache';
require_once CIVICRM_SYMFONY_PATH . '/app/AppKernel.php';
- $kernel = new AppKernel('dev', true);
+ $kernel = new AppKernel('dev', TRUE);
$kernel->loadClassCache();
$response = $kernel->handle(Symfony\Component\HttpFoundation\Request::createFromGlobals());
if (preg_match(':^text/html:', $response->headers->get('Content-Type'))) {
$addSequence = $addSequence ? 'true' : 'false';
unset($pageArgs['addSequence']);
}
- $object = new $item['page_callback'] ($title, true, $mode, NULL, $addSequence);
+ $object = new $item['page_callback'] ($title, TRUE, $mode, NULL, $addSequence);
}
else {
CRM_Core_Error::fatal();
// CRM-14492 Admin price fields should show up on event registration if user has 'administer CiviCRM' permissions
$adminFieldVisible = false;
if (CRM_Core_Permission::check('administer CiviCRM')) {
- $adminFieldVisible = true;
+ $adminFieldVisible = TRUE;
}
foreach ($form->_feeBlock as $field) {
// public AND admin visibility fields are included for back-office registration and back-office change selections
if (CRM_Utils_Array::value('visibility', $field) == 'public' ||
- (CRM_Utils_Array::value('visibility', $field) == 'admin' && $adminFieldVisible == true) ||
+ (CRM_Utils_Array::value('visibility', $field) == 'admin' && $adminFieldVisible == TRUE) ||
$className == 'CRM_Event_Form_Participant' ||
$className == 'CRM_Event_Form_ParticipantFeeSelection'
) {
* @param $self
*
*
- * @return true if no errors, else array of errors
+ * @return TRUE if no errors, else array of errors
* @static
*/
public static function formRule($fields, $files, $self) {
// CRM-14492 Admin price fields should show up on event registration if user has 'administer CiviCRM' permissions
$adminFieldVisible = false;
if (CRM_Core_Permission::check('administer CiviCRM')) {
- $adminFieldVisible = true;
+ $adminFieldVisible = TRUE;
}
foreach ($priceSetFields as $fid => $fieldValues) {