if (!empty($roleObj->capabilities)) {
foreach ($roleObj->capabilities as $ckey => $cname) {
if (array_key_exists($ckey, $permissionsArray)) {
- $elementName = $role.'['.$ckey.']';
+ $elementName = $role . '[' . $ckey . ']';
$defaults[$elementName] = 1;
}
}
// Compose the checkbox array for each role, to assign to form
$rolePerms[$role] = $permissionsArray;
foreach ($rolePerms[$role] as $key => $value) {
- $elementName = $role.'['.$key.']';
+ $elementName = $role . '[' . $key . ']';
$this->add('checkbox', $elementName, $value);
}
$roles[$role] = $name;
//Setting Upload File Size
$config = CRM_Core_Config::singleton();
- $uploadFileSize = CRM_Core_Config_Defaults::formatUnitSize($config->maxFileSize.'m', TRUE);
+ $uploadFileSize = CRM_Core_Config_Defaults::formatUnitSize($config->maxFileSize . 'm', TRUE);
$uploadSize = round(($uploadFileSize / (1024 * 1024)), 2);
$this->assign('uploadSize', $uploadSize);
//CRM-14466 initialize variable to avoid php notice
$sortSQL = "";
if ($sort && $sortOrder) {
- $sortSQL = $sort .' '.$sortOrder;
+ $sortSQL = $sort . ' ' . $sortOrder;
}
// get the activities related to given case
$params = $_POST;
if ($sort && $sortOrder) {
- $sortSQL = $sort .' '.$sortOrder;
+ $sortSQL = $sort . ' ' . $sortOrder;
}
// Retrieve ALL client relationships
// after sort we can update username fields to be a url
foreach ($clientRelationships as $key => $value) {
- $clientRelationships[$key]['name'] = '<a href='.CRM_Utils_System::url('civicrm/contact/view',
- 'action=view&reset=1&cid='.$clientRelationships[$key]['cid']).'>'.$clientRelationships[$key]['name'].'</a>';
+ $clientRelationships[$key]['name'] = '<a href=' . CRM_Utils_System::url('civicrm/contact/view',
+ 'action=view&reset=1&cid=' . $clientRelationships[$key]['cid']) . '>' . $clientRelationships[$key]['name'] . '</a>';
}
$iFilteredTotal = $iTotal = $params['total'] = count($allClientRelationships);
$params = $_POST;
if ($sort && $sortOrder) {
- $sortSQL = $sort .' '.$sortOrder;
+ $sortSQL = $sort . ' ' . $sortOrder;
}
$caseRelationships = CRM_Case_BAO_Case::getCaseRoles($contactID, $caseID);
list($typeLabel) = explode('<', $row['relation']);
// view user links
if (!empty($row['cid'])) {
- $row['name'] = '<a class="view-contact" title="'. ts('View Contact') .'" href='.CRM_Utils_System::url('civicrm/contact/view',
- 'action=view&reset=1&cid='.$row['cid']).'>'.$row['name'].'</a>';
+ $row['name'] = '<a class="view-contact" title="' . ts('View Contact') . '" href=' . CRM_Utils_System::url('civicrm/contact/view',
+ 'action=view&reset=1&cid=' . $row['cid']) . '>' . $row['name'] . '</a>';
}
// email column links/icon
if ($row['email']) {
- $row['email'] = '<a class="crm-hover-button crm-popup" href="'.CRM_Utils_System::url('civicrm/activity/email/add', 'reset=1&action=add&atype=3&cid='.$row['cid']).'&caseid='.$caseID.'" title="'. ts('Send an Email') . '"><span class="icon email-icon"></span></a>';
+ $row['email'] = '<a class="crm-hover-button crm-popup" href="' . CRM_Utils_System::url('civicrm/activity/email/add', 'reset=1&action=add&atype=3&cid=' . $row['cid']) . '&caseid=' . $caseID . '" title="' . ts('Send an Email') . '"><span class="icon email-icon"></span></a>';
}
// edit links
$row['actions'] = '';
switch ($row['source']) {
case 'caseRel':
$row['actions'] =
- '<a href="#editCaseRoleDialog" title="'. ts('Reassign %1', array(1 => $typeLabel)) .'" class="crm-hover-button case-miniform" data-contact_type="' . $contactType . '" data-rel_type="'. $row['relation_type'] .'" data-rel_id="'. $row['rel_id'] .'"data-key="'. CRM_Core_Key::get('civicrm/ajax/relation') .'">'.
- '<span class="icon edit-icon"></span>'.
- '</a>'.
- '<a href="#deleteCaseRoleDialog" title="'. ts('Remove %1', array(1 => $typeLabel)) .'" class="crm-hover-button case-miniform" data-contact_type="' . $contactType . '" data-rel_type="'.$row['relation_type'].'" data-key="'. CRM_Core_Key::get('civicrm/ajax/delcaserole') .'">'.
- '<span class="icon delete-icon"></span>'.
+ '<a href="#editCaseRoleDialog" title="' . ts('Reassign %1', array(1 => $typeLabel)) . '" class="crm-hover-button case-miniform" data-contact_type="' . $contactType . '" data-rel_type="' . $row['relation_type'] . '" data-rel_id="' . $row['rel_id'] . '"data-key="' . CRM_Core_Key::get('civicrm/ajax/relation') . '">' .
+ '<span class="icon edit-icon"></span>' .
+ '</a>' .
+ '<a href="#deleteCaseRoleDialog" title="' . ts('Remove %1', array(1 => $typeLabel)) . '" class="crm-hover-button case-miniform" data-contact_type="' . $contactType . '" data-rel_type="' . $row['relation_type'] . '" data-key="' . CRM_Core_Key::get('civicrm/ajax/delcaserole') . '">' .
+ '<span class="icon delete-icon"></span>' .
'</a>';
break;
case 'caseRoles':
$row['actions'] =
- '<a href="#editCaseRoleDialog" title="'. ts('Assign %1', array(1 => $typeLabel)) .'" class="crm-hover-button case-miniform" data-contact_type="' . $contactType . '" data-rel_type="'. $row['relation_type'] .'" data-key="'. CRM_Core_Key::get('civicrm/ajax/relation') .'">'.
- '<span class="icon edit-icon"></span>'.
+ '<a href="#editCaseRoleDialog" title="' . ts('Assign %1', array(1 => $typeLabel)) . '" class="crm-hover-button case-miniform" data-contact_type="' . $contactType . '" data-rel_type="' . $row['relation_type'] . '" data-key="' . CRM_Core_Key::get('civicrm/ajax/relation') . '">' .
+ '<span class="icon edit-icon"></span>' .
'</a>';
break;
}
//Check if recurring activity
if (CRM_Utils_Array::value('is_recurring_activity', $value)) {
if ($key == $value['is_recurring_activity']) {
- $activities[$key]['activity_type'] = $activities[$key]['activity_type'].'<br/><span class="bold">Recurring Activity - (Parent)</span>';
+ $activities[$key]['activity_type'] = $activities[$key]['activity_type'] . '<br/><span class="bold">Recurring Activity - (Parent)</span>';
}
else {
- $activities[$key]['activity_type'] = $activities[$key]['activity_type'].'<br/><span class="bold">Recurring Activity - (Child)</span>';
+ $activities[$key]['activity_type'] = $activities[$key]['activity_type'] . '<br/><span class="bold">Recurring Activity - (Child)</span>';
}
}
}
$resources = CRM_Core_Resources::singleton();
$resources->addSetting(
array(
- 'kcfinderPath' => $config->userFrameworkResourceURL .'packages' .DIRECTORY_SEPARATOR
+ 'kcfinderPath' => $config->userFrameworkResourceURL . 'packages' . DIRECTORY_SEPARATOR
)
);
$resources->addScriptFile('civicrm', 'templates/CRM/Badge/Form/Layout.js', 1, 'html-header');
"' name='check_" .
$object->id .
"' value='1' data-status_id='" .
- $values['status_id']."' class='select-row'></input>";
+ $values['status_id'] . "' class='select-row'></input>";
switch ($batchStatusByName[$values['status_id']]) {
case 'Open':
// action is taken depending upon the mode
$select = 'civicrm_financial_trxn.id ';
if (!empty($returnValues)) {
- $select .= " , ".implode(' , ', $returnValues);
+ $select .= " , " . implode(' , ', $returnValues);
}
$orderBy = " ORDER BY civicrm_financial_trxn.id";
public static function getBatchNames($batchIds) {
$query = 'SELECT id, title
FROM civicrm_batch
- WHERE id IN ('. $batchIds . ')';
+ WHERE id IN (' . $batchIds . ')';
$batches = array();
$dao = CRM_Core_DAO::executeQuery($query);
public static function getBatchStatuses($batchIds) {
$query = 'SELECT id, status_id
FROM civicrm_batch
- WHERE id IN ('.$batchIds.')';
+ WHERE id IN (' . $batchIds . ')';
$batches = array();
$dao = CRM_Core_DAO::executeQuery($query);
// build line item params
$this->_priceSet['fields'][$priceFieldID]['options'][$priceFieldValueID]['amount'] = $value['total_amount'];
- $value['price_'. $priceFieldID] = 1;
+ $value['price_' . $priceFieldID] = 1;
$lineItem = array();
CRM_Price_BAO_PriceSet::processAmount($this->_priceSet['fields'], $value, $lineItem[$priceSetId]);
$surveysData[$sid]['is_default'] = $isDefault;
if ($surveysData[$sid]['result_id']) {
- $resultSet = '<a href= "javascript:displayResultSet( ' . $sid . ',' . "'" . $surveysData[$sid]['title'] . "'" . ', ' . $surveysData[$sid]['result_id'] . ' )" title="' . ts('view result set').'">' . ts('Result Set') . '</a>';
+ $resultSet = '<a href= "javascript:displayResultSet( ' . $sid . ',' . "'" . $surveysData[$sid]['title'] . "'" . ', ' . $surveysData[$sid]['result_id'] . ' )" title="' . ts('view result set') . '">' . ts('Result Set') . '</a>';
$surveysData[$sid]['result_id'] = $resultSet;
}
else {
foreach ($caseRelationships as $key => & $value) {
$reporters[$value['cid']] = $value['name'] . " ( {$value['relation']} )";
}
- $form->add('select', 'reporter_id', ts('Reporter/Role'), $reporters, FALSE, array('id' => 'reporter_id_'.$form->_caseID));
+ $form->add('select', 'reporter_id', ts('Reporter/Role'), $reporters, FALSE, array('id' => 'reporter_id_' . $form->_caseID));
// take all case activity types for search filter, CRM-7187
$aTypesFilter = array();
}
$aTypesFilter = $aTypesFilter + $aTypes;
asort($aTypesFilter);
- $form->add('select', 'activity_type_filter_id', ts('Activity Type'), array('' => ts('- select activity type -')) + $aTypesFilter, FALSE, array('id' => 'activity_type_filter_id_'.$form->_caseID));
+ $form->add('select', 'activity_type_filter_id', ts('Activity Type'), array('' => ts('- select activity type -')) + $aTypesFilter, FALSE, array('id' => 'activity_type_filter_id_' . $form->_caseID));
$activityStatus = CRM_Core_PseudoConstant::activityStatus();
- $form->add('select', 'status_id', ts('Status'), array("" => ts(' - any status - ')) + $activityStatus, FALSE, array('id' => 'status_id_'.$form->_caseID));
+ $form->add('select', 'status_id', ts('Status'), array("" => ts(' - any status - ')) + $activityStatus, FALSE, array('id' => 'status_id_' . $form->_caseID));
// activity dates
- $form->addDate('activity_date_low_'.$form->_caseID, ts('Activity Dates - From'), FALSE, array('formatType' => 'searchDate'));
- $form->addDate('activity_date_high_'.$form->_caseID, ts('To'), FALSE, array('formatType' => 'searchDate'));
+ $form->addDate('activity_date_low_' . $form->_caseID, ts('Activity Dates - From'), FALSE, array('formatType' => 'searchDate'));
+ $form->addDate('activity_date_high_' . $form->_caseID, ts('To'), FALSE, array('formatType' => 'searchDate'));
if (CRM_Core_Permission::check('administer CiviCRM')) {
- $form->add('checkbox', 'activity_deleted', ts('Deleted Activities'), '', FALSE, array('id' => 'activity_deleted_'.$form->_caseID));
+ $form->add('checkbox', 'activity_deleted', ts('Deleted Activities'), '', FALSE, array('id' => 'activity_deleted_' . $form->_caseID));
}
}
}
foreach ($groupIds as $gId) {
$title[] = $allGroups[$gId];
}
- $groupList[$id]['group_name'] .= '<div class="crm-row-parent-name"><em>'.ts('Child of').'</em>: ' . implode(', ', $title) . '</div>';
+ $groupList[$id]['group_name'] .= '<div class="crm-row-parent-name"><em>' . ts('Child of') . '</em>: ' . implode(', ', $title) . '</div>';
$value['class'] = array_diff($value['class'], array('crm-row-parent'));
}
$value['class'][] = 'crm-entity';
FALSE,
$values['cid']
);
- $contactRelationships[$relationshipId]['name'] = $icon.' '.CRM_Utils_System::href(
+ $contactRelationships[$relationshipId]['name'] = $icon . ' ' . CRM_Utils_System::href(
$values['name'],
'civicrm/contact/view',
"reset=1&cid={$values['cid']}");
}
if (count($hasPrimary) > 1) {
- $errors["email[".array_pop($hasPrimary)."][is_primary]"] = ts('Only one email can be marked as primary.');
+ $errors["email[" . array_pop($hasPrimary) . "][is_primary]"] = ts('Only one email can be marked as primary.');
}
}
return $errors;
}
if (count($hasPrimary) > 1) {
- $errors["im[".array_pop($hasPrimary)."][is_primary]"] = ts('Only one IM can be marked as primary.');
+ $errors["im[" . array_pop($hasPrimary) . "][is_primary]"] = ts('Only one IM can be marked as primary.');
}
}
return $errors;
}
if (count($hasPrimary) > 1) {
- $errors["openid[".array_pop($hasPrimary)."][is_primary]"] = ts('Only one OpenID can be marked as primary.');
+ $errors["openid[" . array_pop($hasPrimary) . "][is_primary]"] = ts('Only one OpenID can be marked as primary.');
}
}
return $errors;
}
if (count($hasPrimary) > 1) {
- $errors["phone[".array_pop($hasPrimary)."][is_primary]"] = ts('Only one phone can be marked as primary.');
+ $errors["phone[" . array_pop($hasPrimary) . "][is_primary]"] = ts('Only one phone can be marked as primary.');
}
}
return $errors;
//update pre/next cache using single insert query
if (!empty($insertValues)) {
$sql = 'INSERT INTO civicrm_prevnext_cache ( entity_table, entity_id1, entity_id2, cacheKey, data ) VALUES
-'.implode(',', $insertValues);
+' . implode(',', $insertValues);
$result = CRM_Core_DAO::executeQuery($sql);
}
'toName' => $contributorDisplayName,
'toEmail' => $contributorEmail,
'isTest' => $form->_mode == 'test',
- 'PDFFilename' => ts('receipt').'.pdf',
+ 'PDFFilename' => ts('receipt') . '.pdf',
'isEmailPdf' => $isEmailPdf,
)
);
'groupName' => 'msg_tpl_workflow_contribution',
'valueName' => 'payment_or_refund_notification',
'contactId' => $this->_contactId,
- 'PDFFilename' => ts('notification').'.pdf',
+ 'PDFFilename' => ts('notification') . '.pdf',
);
// try to send emails only if email id is present
if ($is_quick_config) {
foreach ($this->_values['fee'] as $key => & $val) {
if ($val['name'] == 'other_amount' && $val['html_type'] == 'Text' && array_key_exists('price_'.$key, $params) ) {
- $params['price_'.$key] = CRM_Utils_Rule::cleanMoney($params['price_'.$key]); //Clean out any currency symbols
+ $params['price_' . $key] = CRM_Utils_Rule::cleanMoney($params['price_' . $key]); //Clean out any currency symbols
if ($params['price_'.$key] != 0) {
foreach ($val['options'] as $optionKey => & $options) {
$options['amount'] = CRM_Utils_Array::value('price_'.$key, $params);
break;
}
}
- $params['price_'.$key] = 1;
+ $params['price_' . $key] = 1;
break;
}
}
private function _resizeImage($filename, $resizedName, $width, $height) {
// figure out the new filename
$pathParts = pathinfo($filename);
- $newFilename = $pathParts['dirname']."/".$pathParts['filename'].$resizedName.".".$pathParts['extension'];
+ $newFilename = $pathParts['dirname'] . "/" . $pathParts['filename'] . $resizedName . "." . $pathParts['extension'];
// get image about original image
$imageInfo = getimagesize($filename);
// return the URL to link to
$config = CRM_Core_Config::singleton();
- return $config->imageUploadURL.basename($newFilename);
+ return $config->imageUploadURL . basename($newFilename);
}
}
public static function isHtmlTokenInTableCell($token, $entity, $textToSearch) {
$tokenToMatch = $entity . '.' . $token;
$dontCare = array();
- $within = preg_match_all("|<td.+?{".$tokenToMatch."}.+?</td|si", $textToSearch, $dontCare);
- $total = preg_match_all("|{".$tokenToMatch."}|", $textToSearch, $dontCare);
+ $within = preg_match_all("|<td.+?{" . $tokenToMatch . "}.+?</td|si", $textToSearch, $dontCare);
+ $total = preg_match_all("|{" . $tokenToMatch . "}|", $textToSearch, $dontCare);
return ($within == $total);
}
//Setting Upload File Size
$config = CRM_Core_Config::singleton();
- $uploadFileSize = CRM_Core_Config_Defaults::formatUnitSize($config->maxFileSize.'m', TRUE);
+ $uploadFileSize = CRM_Core_Config_Defaults::formatUnitSize($config->maxFileSize . 'm', TRUE);
$uploadSize = round(($uploadFileSize / (1024 * 1024)), 2);
$this->assign('uploadSize', $uploadSize);
);
}
if (!empty($mapperKeysValues) && $mapperKeysValues[$i][0] == 'soft_credit') {
- $js .= "cj('#mapper_".$i."_1').val($mapperKeysValues[$i][1]);\n";
- $js .= "cj('#mapper_".$i."_2').val($mapperKeysValues[$i][2]);\n";
+ $js .= "cj('#mapper_" . $i . "_1').val($mapperKeysValues[$i][1]);\n";
+ $js .= "cj('#mapper_" . $i . "_2').val($mapperKeysValues[$i][2]);\n";
}
}
$sel->setOptions(array($sel1, $sel2, $sel3, $sel4));
public static function &financialAccount($id = NULL, $financialAccountTypeId = NULL, $retrieveColumn = 'name', $key = 'id') {
$condition = NULL;
if ($financialAccountTypeId) {
- $condition = " financial_account_type_id = ". $financialAccountTypeId;
+ $condition = " financial_account_type_id = " . $financialAccountTypeId;
}
$cacheKey = "{$id}_{$financialAccountTypeId}_{$retrieveColumn}_{$key}";
if (!isset(self::$financialAccount[$cacheKey])) {
$date = $operator . "({$dateField}, INTERVAL {$actionSchedule->start_action_offset} {$actionSchedule->start_action_unit})";
$startDateClause[] = "'{$now}' >= {$date}";
if ($mapping->entity == 'civicrm_participant') {
- $startDateClause[] = $operator. "({$now}, INTERVAL 1 DAY ) {$op} " . $dateField;
+ $startDateClause[] = $operator . "({$now}, INTERVAL 1 DAY ) {$op} " . $dateField;
}
else {
$startDateClause[] = "DATE_SUB({$now}, INTERVAL 1 DAY ) <= {$date}";
}
if (!empty($excludeIds)) {
- $clause = "AND {$field} NOT IN ( " .implode(', ', $excludeIds) . ' ) ';
+ $clause = "AND {$field} NOT IN ( " . implode(', ', $excludeIds) . ' ) ';
return $clause;
}
return NULL;
<ul id='civicrm-home'>
<li><a href='$homeURL'>$homeLabel</a></li>
<li><a href='#' class='crm-hidemenu'>$hideLabel</a></li>
- <li><a href='$logoutURL' class='crm-logout-link'>". ts('Log out') ."</a></li>
+ <li><a href='$logoutURL' class='crm-logout-link'>" . ts('Log out') . "</a></li>
</ul>";
// <li> tag doesn't need to be closed
}
$settingsMetadata = CRM_Core_BAO_Cache::getItem('CiviCRM setting Spec', 'All', $componentID);
if (empty($settingsMetadata)) {
global $civicrm_root;
- $metaDataFolders = array($civicrm_root. '/settings');
+ $metaDataFolders = array($civicrm_root . '/settings');
CRM_Utils_Hook::alterSettingsFolders($metaDataFolders);
$settingsMetadata = self::loadSettingsMetaDataFolders($metaDataFolders);
CRM_Core_BAO_Cache::setItem($settingsMetadata,'CiviCRM setting Spec', 'All', $componentID);
$formattedTags = array();
foreach ($tags as $key => $tag) {
if (!empty($tag[2])) {
- $key = $tag[2]. "-" . $key;
+ $key = $tag[2] . "-" . $key;
}
$formattedTags[$key] = $tag[0] . $tag[1];
}
unlink($this->digestPath);
}
- echo "\ncivicrm_domain.version := ". $this->db_version . "\n\n";
+ echo "\ncivicrm_domain.version := " . $this->db_version . "\n\n";
if ($this->buildVersion < 1.1) {
echo "The Database is not compatible for this version";
exit();
public function parse($schemaPath, $buildVersion) {
$this->buildVersion = $buildVersion;
- echo "Parsing schema description ".$schemaPath."\n";
+ echo "Parsing schema description " . $schemaPath . "\n";
$dbXML = CRM_Core_CodeGen_Util_Xml::parse($schemaPath);
// print_r( $dbXML );
}
foreach ($inputs as $infile) {
// FIXME: does not beautify. Document.
- file_put_contents($outpath, $this->smarty->fetch($infile) ."\n", FILE_APPEND);
+ file_put_contents($outpath, $this->smarty->fetch($infile) . "\n", FILE_APPEND);
}
}
break;
case 'string':
- $args[] = '"' . CRM_Utils_String::ellipsify(addcslashes((string) $arg, "\r\n\t\""), $maxArgLen). '"';
+ $args[] = '"' . CRM_Utils_String::ellipsify(addcslashes((string) $arg, "\r\n\t\""), $maxArgLen) . '"';
break;
case 'array':
- $args[] = '(Array:'.count($arg).')';
+ $args[] = '(Array:' . count($arg) . ')';
break;
case 'object':
}
}
if ($entityTable) {
- CRM_Core_OptionValue::getValues(array('name' => $entityTable.'_repeat_exclude_dates_'.self::$_parentEntityId), $optionValue);
+ CRM_Core_OptionValue::getValues(array('name' => $entityTable . '_repeat_exclude_dates_' . self::$_parentEntityId), $optionValue);
$excludeOptionValues = array();
if (!empty($optionValue)) {
foreach ($optionValue as $key => $val) {
$form->add('select', 'repetition_frequency_interval', ts('Repeats every:'), $numericOptions, '', array('style' => 'width:55px;'));
$form->addDateTime('repetition_start_date', ts('Repetition Start Date'), FALSE, array('formatType' => 'activityDateTime'));
foreach ($dayOfTheWeek as $key => $val) {
- $startActionCondition[] = $form->createElement('checkbox', $key, NULL, substr($val." ", 0, 3));
+ $startActionCondition[] = $form->createElement('checkbox', $key, NULL, substr($val . " ", 0, 3));
}
$form->addGroup($startActionCondition, 'start_action_condition', ts('Repeats on'));
$roptionTypes = array(
//Check if there exists any values for this option group
$optionGroupIdExists = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_OptionGroup',
- $type.'_repeat_exclude_dates_'.$params['parent_entity_id'],
+ $type . '_repeat_exclude_dates_' . $params['parent_entity_id'],
'id',
'name'
);
}
$optionGroupParams =
array(
- 'name' => $type.'_repeat_exclude_dates_'.$actionScheduleObj->entity_value,
- 'title' => $type.' recursion',
+ 'name' => $type . '_repeat_exclude_dates_' . $actionScheduleObj->entity_value,
+ 'title' => $type . ' recursion',
'is_reserved' => 0,
'is_active' => 1
);
'label' => CRM_Utils_Date::processDate($val),
'value' => CRM_Utils_Date::processDate($val),
'name' => $opGroup->name,
- 'description' => 'Used for recurring '.$type,
+ 'description' => 'Used for recurring ' . $type,
'weight' => CRM_Utils_Weight::updateOtherWeights('CRM_Core_DAO_OptionValue', $oldWeight, CRM_Utils_Array::value('weight', $params), $fieldValues),
'is_active' => 1
);
$display[] = $val['label'];
}
- $el['html'] = implode('; ', $display) . '<input type="hidden" value="'. $field->getValue() . '" name="' . $field->getAttribute('name') . '">';
+ $el['html'] = implode('; ', $display) . '<input type="hidden" value="' . $field->getValue() . '" name="' . $field->getAttribute('name') . '">';
}
/**
public static function setJsHeaders() {
// Encourage browsers to cache for a long time - 1 year
$year = 60 * 60 * 24 * 364;
- header('Expires: '.gmdate('D, d M Y H:i:s \G\M\T', time() + $year));
+ header('Expires: ' . gmdate('D, d M Y H:i:s \G\M\T', time() + $year));
header('Content-Type: application/javascript');
header("Cache-Control: max-age=$year, public");
}
$ids['contact'] = $contRecur->contact_id;
}
if (!$ids['contributionRecur']) {
- CRM_Core_Error::debug_log_message("Could not find contributionRecur id: ".print_r($input, TRUE));
+ CRM_Core_Error::debug_log_message("Could not find contributionRecur id: " . print_r($input, TRUE));
echo "Failure: Could not find contributionRecur<p>";
exit();
}
$contact = new CRM_Contact_BAO_Contact();
$contact->id = $ids['contact'];
if (!$contact->find(TRUE)) {
- CRM_Core_Error::debug_log_message("Could not find contact record: {$ids['contact']} in IPN request: ".print_r($input, TRUE));
+ CRM_Core_Error::debug_log_message("Could not find contact record: {$ids['contact']} in IPN request: " . print_r($input, TRUE));
echo "Failure: Could not find contact record: {$ids['contact']}<p>";
return FALSE;
}
$contribution = new CRM_Contribute_BAO_Contribution();
$contribution->id = $ids['contribution'];
if (!$contribution->find(TRUE)) {
- CRM_Core_Error::debug_log_message("Could not find contribution record: {$contribution->id} in IPN request: ".print_r($input, TRUE));
+ CRM_Core_Error::debug_log_message("Could not find contribution record: {$contribution->id} in IPN request: " . print_r($input, TRUE));
echo "Failure: Could not find contribution record for {$contribution->id}<p>";
return FALSE;
}
'MerchantReference' => $merchantRef,
'TxnData1' => $params['qfKey'],
'TxnData2' => $privateData,
- 'TxnData3' => $component . ",".$this->_paymentProcessor['id'],
+ 'TxnData3' => $component . "," . $this->_paymentProcessor['id'],
'TxnType' => 'Purchase',
// Leave this empty for now, causes an error with DPS if we populate it
'TxnId' => '',
* @return array - array of all payment processor types
*/
public static function &paymentProcessorType($all = FALSE, $id = NULL, $return = 'title') {
- $cacheKey = $id . '_' .$return;
+ $cacheKey = $id . '_' . $return;
if (empty(self::$paymentProcessorType[$cacheKey])) {
self::populate(self::$paymentProcessorType[$cacheKey], 'CRM_Financial_DAO_PaymentProcessorType', $all, $return, 'is_active', NULL, "is_default, $return", 'id');
}
}
if (!empty($result['is_error'])) {
- $smarty->trigger_error("{crmAPI} ".$result["error_message"]);
+ $smarty->trigger_error("{crmAPI} " . $result["error_message"]);
}
if (!array_key_exists('var', $params)) {
return
'{crmScope extensionKey=""}'
. $tpl_source
- .'{/crmScope}';
+ . '{/crmScope}';
}
//Setting Upload File Size
$config = CRM_Core_Config::singleton();
- $uploadFileSize = CRM_Core_Config_Defaults::formatUnitSize($config->maxFileSize.'m', TRUE);
+ $uploadFileSize = CRM_Core_Config_Defaults::formatUnitSize($config->maxFileSize . 'm', TRUE);
$uploadSize = round(($uploadFileSize / (1024 * 1024)), 2);
$this->assign('uploadSize', $uploadSize);
CRM_Contact_Import_Parser_Contact::formatCommonData($this->_params, $formatted, $formatted);
foreach ($formatted['custom'] as $key => $val) {
- $this->_params['custom_'.$key] = $val[-1]['value'];
+ $this->_params['custom_' . $key] = $val[-1]['value'];
}
$this->_params['skipRecentView'] = TRUE;
$this->_params['check_permissions'] = TRUE;
}
if (!empty($allEventIds)) {
$op = "IN";
- $value = "(".implode(",", $allEventIds).")";
+ $value = "(" . implode(",", $allEventIds) . ")";
}
}
$query->_where[$grouping][] = "civicrm_event.id $op {$value}";
'pay_later_receipt' => $this->pay_later_receipt,
),
'valueName' => 'event_registration_receipt',
- 'PDFFilename' => ts('confirmation').'.pdf',
+ 'PDFFilename' => ts('confirmation') . '.pdf',
);
$template_params_to_copy = array(
'billing_name',
public function buildMultipleProfileBottom(&$form, $count, $prefix = '', $label = 'Include Profile', $configs = NULL) {
extract((is_null($configs)) ? self::getProfileSelectorTypes() : $configs);
$element = $prefix . "custom_post_id_multiple[$count]";
- $label .= '<br />'.ts('(bottom of page)');
+ $label .= '<br />' . ts('(bottom of page)');
$form->addProfileSelector($element, $label, $allowCoreTypes, $allowSubTypes, $profileEntities, TRUE);
}
$query = "
SELECT *
FROM civicrm_event
- WHERE id IN (".implode(",", $allEventIds).")
+ WHERE id IN (" . implode(",", $allEventIds) . ")
ORDER BY start_date asc
";
'valueName' => 'event_offline_receipt',
'contactId' => $contactID,
'isTest' => (bool) CRM_Utils_Array::value('is_test', $this->_defaultValues),
- 'PDFFilename' => ts('confirmation').'.pdf',
+ 'PDFFilename' => ts('confirmation') . '.pdf',
);
// try to send emails only if email id is present
else {
foreach ($priceFieldId as $key => $value) {
if (!empty($value) && ($this->_values['fee'][$value]['html_type'] == 'Radio' || $this->_values['fee'][$value]['html_type'] == 'Select') && !$this->_values['fee'][$value]['is_required']) {
- $defaults[$this->_participantId]['price_'.array_keys($this->_values['fee'])[$key]] = 0;
+ $defaults[$this->_participantId]['price_' . array_keys($this->_values['fee'])[$key]] = 0;
}
}
}
'valueName' => 'event_offline_receipt',
'contactId' => $this->_contactId,
'isTest' => FALSE,
- 'PDFFilename' => ts('confirmation').'.pdf',
+ 'PDFFilename' => ts('confirmation') . '.pdf',
);
// try to send emails only if email id is present
//Setting Upload File Size
$config = CRM_Core_Config::singleton();
- $uploadFileSize = CRM_Core_Config_Defaults::formatUnitSize($config->maxFileSize.'m', TRUE);
+ $uploadFileSize = CRM_Core_Config_Defaults::formatUnitSize($config->maxFileSize . 'm', TRUE);
$uploadSize = round(($uploadFileSize / (1024 * 1024)), 2);
$this->assign('uploadSize', $uploadSize);
$details = '<p>' . ts('Record:') . ' ' . $values['title'] . '</p><p>' . ts('Description:') . '</p><p>' . ts('Created By:') . " $createdBy" . '</p><p>' . ts('Created Date:') . ' ' . $values['created_date'] . '</p><p>' . ts('Last Modified By:') . ' ' . $modifiedBy . '</p><p>' . ts('Payment Instrument:') . ' ' . $values['payment_instrument_id'] . '</p>';
$subject = '';
if (!empty($values['total'])) {
- $subject .= ts('Total') . '['. CRM_Utils_Money::format($values['total']) .'],';
+ $subject .= ts('Total') . '[' . CRM_Utils_Money::format($values['total']) . '],';
}
if (!empty($values['item_count'])) {
- $subject .= ' ' . ts('Count') . '['. $values['item_count'] .'],';
+ $subject .= ' ' . ts('Count') . '[' . $values['item_count'] . '],';
}
//create activity.
- $subject .= ' ' . ts('Batch') . '['. $values['title'] .']';
+ $subject .= ' ' . ts('Batch') . '[' . $values['title'] . ']';
$activityTypes = CRM_Core_PseudoConstant::activityType(TRUE, FALSE, FALSE, 'name');
$activityParams = array(
'activity_type_id' => array_search('Export Accounting Batch', $activityTypes),
*/
public function putFile($export) {
$config = CRM_Core_Config::singleton();
- $fileName = $config->uploadDir.'Financial_Transactions_'.$this->_batchIds.'_'.date('YmdHis').'.'.$this->getFileExtension();
- $this->_downloadFile[] = $config->customFileUploadDir.CRM_Utils_File::cleanFileName(basename($fileName));
+ $fileName = $config->uploadDir . 'Financial_Transactions_' . $this->_batchIds . '_' . date('YmdHis') . '.' . $this->getFileExtension();
+ $this->_downloadFile[] = $config->customFileUploadDir . CRM_Utils_File::cleanFileName(basename($fileName));
$out = fopen($fileName, 'w');
fputcsv($out, $export['headers']);
unset($export['headers']);
*/
public function putFile($out) {
$config = CRM_Core_Config::singleton();
- $fileName = $config->uploadDir.'Financial_Transactions_'.$this->_batchIds.'_'.date('YmdHis').'.'.$this->getFileExtension();
- $this->_downloadFile[] = $config->customFileUploadDir.CRM_Utils_File::cleanFileName(basename($fileName));
+ $fileName = $config->uploadDir . 'Financial_Transactions_' . $this->_batchIds . '_' . date('YmdHis') . '.' . $this->getFileExtension();
+ $this->_downloadFile[] = $config->customFileUploadDir . CRM_Utils_File::cleanFileName(basename($fileName));
$buffer = fopen($fileName, 'w');
fwrite($buffer, $out);
fclose($buffer);
'trxn_date' => $this->format($itemDAO->transaction_date, 'date'),
'spl_id' => $this->format($itemDAO->financial_item_id),
'account_name' => $this->format($itemDAO->account_name),
- 'amount' => '-' .$this->format($itemDAO->amount, 'money'),
+ 'amount' => '-' . $this->format($itemDAO->amount, 'money'),
'contact_name' => $this->format($itemDAO->contact_name),
'payment_instrument' => $this->format($itemDAO->payment_instrument),
'description' => $this->format($itemDAO->description),
if (isset($this->_id)) {
$this->_title = CRM_Core_DAO::getFieldValue('CRM_Batch_DAO_Batch', $this->_id, 'title');
- CRM_Utils_System::setTitle($this->_title .' - '.ts('Accounting Batch'));
+ CRM_Utils_System::setTitle($this->_title . ' - ' . ts('Accounting Batch'));
$this->assign('batchTitle', $this->_title);
$contactID = CRM_Core_DAO::getFieldValue('CRM_Batch_DAO_Batch', $this->_id, 'created_id');
$contactName = CRM_Contact_BAO_Contact::displayName($contactID);
//create activity.
$activityParams = array(
'activity_type_id' => array_search($activityTypeName, $activityTypes),
- 'subject' => $batch->title ."- Batch",
+ 'subject' => $batch->title . "- Batch",
'status_id' => 2,
'priority_id' => 2,
'activity_date_time' => date('YmdHis'),
if ($this->_id) {
$financialAccount = CRM_Core_DAO::getFieldValue('CRM_Financial_DAO_EntityFinancialAccount', $this->_id, 'financial_account_id');
$fieldTitle = CRM_Core_DAO::getFieldValue('CRM_Financial_DAO_FinancialAccount', $financialAccount, 'name');
- CRM_Utils_System::setTitle($fieldTitle . ' - '. ts('Financial Type Accounts'));
+ CRM_Utils_System::setTitle($fieldTitle . ' - ' . ts('Financial Type Accounts'));
}
$breadCrumb = array(
}
$row[$financialItem->id][$columnKey] = $financialItem->$columnKey;
if ($columnKey == 'sort_name' && $financialItem->$columnKey) {
- $url = CRM_Utils_System::url('civicrm/contact/view', "reset=1&cid=".$financialItem->contact_id);
- $row[$financialItem->id][$columnKey] = '<a href='.$url.'>'.$financialItem->$columnKey.'</a>';
+ $url = CRM_Utils_System::url('civicrm/contact/view', "reset=1&cid=" . $financialItem->contact_id);
+ $row[$financialItem->id][$columnKey] = '<a href=' . $url . '>' . $financialItem->$columnKey . '</a>';
}
elseif ($columnKey == 'payment_method' && $financialItem->$columnKey) {
$row[$financialItem->id][$columnKey] = CRM_Core_OptionGroup::getLabel('payment_instrument', $financialItem->$columnKey);
if ($row[$financialItem->id][$columnKey] == 'Check') {
- $row[$financialItem->id][$columnKey] = $row[$financialItem->id][$columnKey].' ('.$financialItem->check_number.')';
+ $row[$financialItem->id][$columnKey] = $row[$financialItem->id][$columnKey] . ' (' . $financialItem->check_number . ')';
}
}
elseif ($columnKey == 'amount' && $financialItem->$columnKey) {
if ($statusID == CRM_Core_OptionGroup::getValue('batch_status', 'Open')) {
if (isset($notPresent)) {
$js = "enableActions('x')";
- $row[$financialItem->id]['check'] = "<input type='checkbox' id='mark_x_". $financialItem->id."' name='mark_x_". $financialItem->id."' value='1' onclick={$js}></input>";
+ $row[$financialItem->id]['check'] = "<input type='checkbox' id='mark_x_" . $financialItem->id . "' name='mark_x_" . $financialItem->id . "' value='1' onclick={$js}></input>";
$row[$financialItem->id]['action'] = CRM_Core_Action::formLink(
CRM_Financial_Form_BatchTransaction::links(),
NULL,
}
else {
$js = "enableActions('y')";
- $row[$financialItem->id]['check'] = "<input type='checkbox' id='mark_y_". $financialItem->id."' name='mark_y_". $financialItem->id."' value='1' onclick={$js}></input>";
+ $row[$financialItem->id]['check'] = "<input type='checkbox' id='mark_y_" . $financialItem->id . "' name='mark_y_" . $financialItem->id . "' value='1' onclick={$js}></input>";
$row[$financialItem->id]['action'] = CRM_Core_Action::formLink(
CRM_Financial_Page_BatchTransaction::links(),
NULL,
if ($this->_aid) {
$relationTypeId = key(CRM_Core_PseudoConstant::accountOptionValues('account_relationship', NULL, " AND v.name LIKE 'Accounts Receivable Account is' "));
$this->_title = CRM_Core_DAO::getFieldValue('CRM_Financial_DAO_FinancialType', $this->_aid, 'name');
- CRM_Utils_System::setTitle($this->_title .' - '.ts('Assigned Financial Accounts'));
+ CRM_Utils_System::setTitle($this->_title . ' - ' . ts('Assigned Financial Accounts'));
$financialAccountType = CRM_Core_PseudoConstant::get('CRM_Financial_DAO_FinancialAccount', 'financial_account_type_id');
$accountRelationship = CRM_Core_PseudoConstant::get('CRM_Financial_DAO_EntityFinancialAccount', 'account_relationship');
$dao->copyValues($params);
$config = CRM_Core_Config::singleton();
- $uploadFileSize = CRM_Core_Config_Defaults::formatUnitSize($config->maxFileSize.'m', TRUE);
+ $uploadFileSize = CRM_Core_Config_Defaults::formatUnitSize($config->maxFileSize . 'm', TRUE);
$uploadSize = round(($uploadFileSize / (1024 * 1024)), 2);
$form->assign('uploadSize', $uploadSize);
$form->add('File', 'uploadFile', ts('Import Data File'), 'size=30 maxlength=255', TRUE);
"reset=1&cid={$values['creator_id']}");
//CRM-12814
- $contactMailings[$mailingId]['openstats'] = "Opens: ".
- CRM_Utils_Array::value($values['mailing_id'], $openCounts, 0).
- "<br />Clicks: ".
+ $contactMailings[$mailingId]['openstats'] = "Opens: " .
+ CRM_Utils_Array::value($values['mailing_id'], $openCounts, 0) .
+ "<br />Clicks: " .
CRM_Utils_Array::value($values['mailing_id'], $clickCounts, 0);
$actionLinks = array(
if (is_array($value)) {
$query->_where[$grouping][] = "$tableName.$fieldName $op (" . implode(',', $value) . ")";
- $query->_qill[$grouping][] = "$fieldTitle $op ". implode(', ', array_intersect_key($valueTitles, array_flip($value)));
+ $query->_qill[$grouping][] = "$fieldTitle $op " . implode(', ', array_intersect_key($valueTitles, array_flip($value)));
}
else {
$query->_qill[$grouping][] = $fieldTitle . ' - ' . $valueTitles[$value];
'from' => $receiptFrom,
'toName' => $form->_contributorDisplayName,
'toEmail' => $form->_contributorEmail,
- 'PDFFilename' => ts('receipt').'.pdf',
+ 'PDFFilename' => ts('receipt') . '.pdf',
'isEmailPdf' => $isEmailPdf,
'contributionId' => $formValues['contribution_id'],
'isTest' => (bool) ($form->_action & CRM_Core_Action::PREVIEW)
foreach ($options as $k => $v) {
$newMembershipType[$v['membership_type_id']] = 1;
if (!empty($defaults['auto_renew'])) {
- $defaults["auto_renew_".$v['membership_type_id']] = $defaults['auto_renew'][$v['membership_type_id']];
+ $defaults["auto_renew_" . $v['membership_type_id']] = $defaults['auto_renew'][$v['membership_type_id']];
}
}
$defaults['membership_type'] = $newMembershipType;
//Setting Upload File Size
$config = CRM_Core_Config::singleton();
- $uploadFileSize = CRM_Core_Config_Defaults::formatUnitSize($config->maxFileSize.'m', TRUE);
+ $uploadFileSize = CRM_Core_Config_Defaults::formatUnitSize($config->maxFileSize . 'm', TRUE);
$uploadSize = round(($uploadFileSize / (1024 * 1024)), 2);
$this->assign('uploadSize', $uploadSize);
}
else {
$opt['label'] = '<span class="crm-price-amount-label">' . $opt['label'] . '</span>' . '<span class="crm-price-amount-amount">' . CRM_Utils_Money::format($opt[$valueFieldName]) . '</span>';
- $opt['label'] .= '<span class="crm-price-amount-tax"> + '. CRM_Utils_Money::format($opt['tax_amount']) . ' ' . $taxTerm . '</span>';
+ $opt['label'] .= '<span class="crm-price-amount-tax"> + ' . CRM_Utils_Money::format($opt['tax_amount']) . ' ' . $taxTerm . '</span>';
}
}
else {
);
if ($is_pay_later) {
$txtcheck[$opId] =& $qf->createElement('text', $opId, $opt['label'], array('size' => '4'));
- $qf->addGroup($txtcheck, 'txt-'.$elementName, $label);
+ $qf->addGroup($txtcheck, 'txt-' . $elementName, $label);
}
// CRM-6902 - Add "max" option for a price set field
if (in_array($opId, $freezeOptions)) {
}
else {
$label = CRM_Utils_Money::format($opt[$valueFieldName]);
- $label .= '<span class="crm-price-amount-tax"> + '. CRM_Utils_Money::format($opt['tax_amount']) . ' ' . $taxTerm . '</span>';
+ $label .= '<span class="crm-price-amount-tax"> + ' . CRM_Utils_Money::format($opt['tax_amount']) . ' ' . $taxTerm . '</span>';
}
return $label;
//Financial Type
$this->add(
'select',
- 'option_financial_type_id['.$i.']',
+ 'option_financial_type_id[' . $i . ']',
ts('Financial Type'),
array('' => ts('- select -')) + $financialType
);
'key' => CRM_Core_Key::get('civicrm/ajax/customvalue'),
);
$links[CRM_Core_Action::DELETE]['url'] = '#';
- $links[CRM_Core_Action::DELETE]['extra'] = ' data-delete_params="'. htmlspecialchars(json_encode($deleteData)) .'"';
+ $links[CRM_Core_Action::DELETE]['extra'] = ' data-delete_params="' . htmlspecialchars(json_encode($deleteData)) . '"';
$links[CRM_Core_Action::DELETE]['class'] = 'delete-custom-row';
}
if (!empty($pageCheckSum)) {
$date = CRM_Utils_Date::isoToMysql($row['log_civicrm_entity_log_date']);
if ('Update' == CRM_Utils_Array::value('log_civicrm_entity_log_action', $row)) {
- $q = "reset=1&log_conn_id={$row['log_civicrm_entity_log_conn_id']}&log_date=". $date;
+ $q = "reset=1&log_conn_id={$row['log_civicrm_entity_log_conn_id']}&log_date=" . $date;
if ($this->cid) {
$q .= '&cid=' . $this->cid;
}
- $q .= (!empty($row['log_civicrm_entity_altered_contact'])) ? '&alteredName='.$row['log_civicrm_entity_altered_contact'] : '';
- $q .= (!empty($row['altered_by_contact_display_name'])) ? '&alteredBy='.$row['altered_by_contact_display_name'] : '';
- $q .= (!empty($row['log_civicrm_entity_log_user_id'])) ? '&alteredById='.$row['log_civicrm_entity_log_user_id'] : '';
+ $q .= (!empty($row['log_civicrm_entity_altered_contact'])) ? '&alteredName=' . $row['log_civicrm_entity_altered_contact'] : '';
+ $q .= (!empty($row['altered_by_contact_display_name'])) ? '&alteredBy=' . $row['altered_by_contact_display_name'] : '';
+ $q .= (!empty($row['log_civicrm_entity_log_user_id'])) ? '&alteredById=' . $row['log_civicrm_entity_log_user_id'] : '';
$url1 = CRM_Report_Utils_Report::getNextUrl('logging/contact/detail', "{$q}&snippet=4§ion=2&layout=overlay", FALSE, TRUE);
$url2 = CRM_Report_Utils_Report::getNextUrl('logging/contact/detail', "{$q}§ion=2", FALSE, TRUE);
}
}
if ($rev == '4.4.6') {
- $postUpgradeMessage .= '<br /><br /><strong>'. ts('Your contact image urls have been upgraded. If your contact image urls did not follow the standard format for image Urls they have not been upgraded. Please check the log to see image urls that were not upgraded.');
+ $postUpgradeMessage .= '<br /><br /><strong>' . ts('Your contact image urls have been upgraded. If your contact image urls did not follow the standard format for image Urls they have not been upgraded. Please check the log to see image urls that were not upgraded.');
}
}
}
elseif ($urlElements[1] == 'report') {
$url = explode('&', $urlElements[3]);
- $name = 'report/' .$url[0];
+ $name = 'report/' . $url[0];
}
$values .= "
WHEN {$dashboard->id} THEN '{$name}'
* @param $rev
*/
public function upgrade_4_4_6($rev) {
- $sql = "SELECT count(*) AS count FROM INFORMATION_SCHEMA.STATISTICS where ".
+ $sql = "SELECT count(*) AS count FROM INFORMATION_SCHEMA.STATISTICS where " .
"TABLE_SCHEMA = database() AND INDEX_NAME = 'index_image_url' AND TABLE_NAME = 'civicrm_contact';";
$dao = CRM_Core_DAO::executeQuery($sql);
$dao->fetch();
if (substr($imageURL, 0, $baselen) == $baseurl) {
$photo = basename($dao->image_url);
$config = CRM_Core_Config::singleton();
- $fullpath = $config->customFileUploadDir.$photo;
+ $fullpath = $config->customFileUploadDir . $photo;
if (file_exists($fullpath)) {
// For anyone who upgraded 4.4.6 release (eg 4.4.0=>4.4.6), the $newImageUrl incorrectly used backend URLs.
// For anyone who skipped 4.4.6 (eg 4.4.0=>4.4.7), the $newImageUrl correctly uses frontend URLs
self::setContactImageUrl($dao->id,
- CRM_Utils_System::url('civicrm/contact/imagefile', 'photo='.$photo, TRUE, NULL, TRUE, TRUE));
+ CRM_Utils_System::url('civicrm/contact/imagefile', 'photo=' . $photo, TRUE, NULL, TRUE, TRUE));
}
else{
$failures[$dao->id] = $dao->image_url;
$imageUrlParts = parse_url($imageUrl);
parse_str($imageUrlParts['query'], $imageUrlQuery);
self::setContactImageUrl($dao->id,
- CRM_Utils_System::url('civicrm/contact/imagefile', 'photo='.$imageUrlQuery['photo'], TRUE, NULL, TRUE, TRUE));
+ CRM_Utils_System::url('civicrm/contact/imagefile', 'photo=' . $imageUrlQuery['photo'], TRUE, NULL, TRUE, TRUE));
}
}
return TRUE;
}
if (!empty($reminder)) {
$list = "<br /><ul>" . $list . "</ul>";
- $postUpgradeMessage .= '<br />' .ts("Scheduled Reminders must be linked to one or more 'entities' (Events, Event Templates, Activity Types, Membership Types). The following reminders are not configured properly and will not be run. Please review them and update or delete them: %1", array(1 => $list));
+ $postUpgradeMessage .= '<br />' . ts("Scheduled Reminders must be linked to one or more 'entities' (Events, Event Templates, Activity Types, Membership Types). The following reminders are not configured properly and will not be run. Please review them and update or delete them: %1", array(1 => $list));
}
}
if ($rev == '4.3.beta2') {
cfi.description = %5,
cli.financial_type_id = %6
WHERE cfi.entity_table = 'civicrm_line_item'
-AND cli.entity_table = 'civicrm_contribution' AND cli.id IN (" . implode(',', $value). ');';
+AND cli.entity_table = 'civicrm_contribution' AND cli.id IN (" . implode(',', $value) . ');';
$params = array(
1 => array($financialTrxn[$key]['label'], 'String'),
2 => array($financialTrxn[$key]['price_field_id'], 'Integer'),
INNER JOIN civicrm_price_set cps ON cps.id = cpf.price_set_id AND cps.name <>'default_membership_type_amount' ";
$dao = CRM_Core_DAO::executeQuery($query);
if ($dao->N) {
- $preUpgradeMessage .= "<br /><strong>". ts('We have identified extraneous data in your database that a previous upgrade likely introduced. We STRONGLY recommend making a backup of your site before continuing. We also STRONGLY suggest fixing this issue with unneeded records BEFORE you upgrade. You can find more information about this issue and the way to fix it by visiting <a href="http://forum.civicrm.org/index.php/topic,26181.0.html">http://forum.civicrm.org/index.php/topic,26181.0.html</a>.') ."</strong>";
+ $preUpgradeMessage .= "<br /><strong>" . ts('We have identified extraneous data in your database that a previous upgrade likely introduced. We STRONGLY recommend making a backup of your site before continuing. We also STRONGLY suggest fixing this issue with unneeded records BEFORE you upgrade. You can find more information about this issue and the way to fix it by visiting <a href="http://forum.civicrm.org/index.php/topic,26181.0.html">http://forum.civicrm.org/index.php/topic,26181.0.html</a>.') . "</strong>";
}
}
*/
public function fileName ($key) {
if (strlen($key) > 50) {
- return CIVICRM_TEMPLATE_COMPILEDIR ."CRM_".md5($key).".php";
+ return CIVICRM_TEMPLATE_COMPILEDIR . "CRM_" . md5($key) . ".php";
}
- return CIVICRM_TEMPLATE_COMPILEDIR .$key.".php";
+ return CIVICRM_TEMPLATE_COMPILEDIR . $key . ".php";
}
/**
return;
}
$this->_cache[$key] = $value;
- file_put_contents($this->fileName($key), "<?php //".serialize($value));
+ file_put_contents($this->fileName($key), "<?php //" . serialize($value));
}
/**
}
while (FALSE !== ($entry = readdir($handle))) {
if (substr($entry, 0, 4) == $prefix) {
- unlink(CIVICRM_TEMPLATE_COMPILEDIR.$entry);
+ unlink(CIVICRM_TEMPLATE_COMPILEDIR . $entry);
}
}
closedir($handle);
$store = CRM_Mailing_MailStore::getStore($dao->name);
}
catch(Exception$e) {
- $message = ts('Could not connect to MailStore for ') . $dao->username . '@' . $dao->server .'<p>';
+ $message = ts('Could not connect to MailStore for ') . $dao->username . '@' . $dao->server . '<p>';
$message .= ts('Error message: ');
$message .= '<pre>' . $e->getMessage() . '</pre><p>';
CRM_Core_Error::fatal($message);
// close and output the PDF
$pdf->Close();
- $pdf_file = 'CiviLetter'.'.pdf';
+ $pdf_file = 'CiviLetter' . '.pdf';
$pdf->Output($pdf_file, 'D');
CRM_Utils_System::civiExit(1);
}
$entity = _civicrm_api_get_camel_name($request[2]);
$tplfile = _civicrm_api_get_camel_name($request[3]);
- $tpl = 'CRM/'.$entity.'/Page/Inline/'.$tplfile.'.tpl';
+ $tpl = 'CRM/' . $entity . '/Page/Inline/' . $tplfile . '.tpl';
$smarty = CRM_Core_Smarty::singleton();
CRM_Utils_System::setTitle("$entity::$tplfile inline $tpl");
if (!$smarty->template_exists($tpl)) {
$offset = floor(($len - $maskCount) / 2);
$masked = substr($user, 0, $offset)
- .str_repeat($maskChar, $maskCount)
- .substr($user, $maskCount + $offset);
+ . str_repeat($maskChar, $maskCount)
+ . substr($user, $maskCount + $offset);
- return ($masked.'@'.$domain);
+ return ($masked . '@' . $domain);
}
/**
//CRM-14872 append destination
if (!empty($destination)) {
- $loginURL .= '&return='.urlencode(base64_encode($destination));
+ $loginURL .= '&return=' . urlencode(base64_encode($destination));
}
return $loginURL;
}
$destination = NULL;
if ($args) {
// append destination so user is returned to form they came from after login
- $args = 'reset=1'.$args;
+ $args = 'reset=1' . $args;
$destination = CRM_Utils_System::url(CRM_Utils_System::currentPath(), $args, TRUE, NULL, TRUE, TRUE);
}
$ids = CRM_Dedupe_Finder::dupesByParams($dedupeParams, $params['contact_type'], 'Unsupervised', array());
if (count($ids) > 0) {
- throw new API_Exception("Found matching contacts: ". implode(',', $ids), "duplicate", array("ids" => $ids));
+ throw new API_Exception("Found matching contacts: " . implode(',', $ids), "duplicate", array("ids" => $ids));
}
}
break;
default:
- return civicrm_api3_create_error("Param '$field' is of a type not managed yet (".$def['type']."). Join the API team and help us implement it", array('error_code' => 'NOT_IMPLEMENTED'));
+ return civicrm_api3_create_error("Param '$field' is of a type not managed yet (" . $def['type'] . "). Join the API team and help us implement it", array('error_code' => 'NOT_IMPLEMENTED'));
}
$dao_name = _civicrm_api3_get_DAO($entity);
}
if (!empty($result['api.email.get.1']['count'])) {
- $values['billing-email'. '-' . $locationTypeID] = $result['api.email.get.1']['values'][0]['email'];
+ $values['billing-email' . '-' . $locationTypeID] = $result['api.email.get.1']['values'][0]['email'];
}
elseif(!empty($result['api.email.get.2']['count'])) {
- $values['billing-email'. '-' . $locationTypeID] = $result['api.email.get.2']['values'][0]['email'];
+ $values['billing-email' . '-' . $locationTypeID] = $result['api.email.get.2']['values'][0]['email'];
}
else{
- $values['billing-email'. '-' . $locationTypeID] = $result['email'];
+ $values['billing-email' . '-' . $locationTypeID] = $result['email'];
}
// return both variants of email to reflect inconsistencies in form layer
- $values['email'. '-' . $locationTypeID] = $values['billing-email'. '-' . $locationTypeID];
+ $values['email' . '-' . $locationTypeID] = $values['billing-email' . '-' . $locationTypeID];
return $values;
}
$legacyreturnProperties[substr($n, 7)] = $v;
}
elseif ($n == 'id') {
- $inputParams[$entity. '_id'] = $v;
+ $inputParams[$entity . '_id'] = $v;
}
elseif (in_array($n, $otherVars)) {
}
public function setUp() {
parent::setUp();
- $students = 'indivi_student'.substr(sha1(rand()), 0, 7);
+ $students = 'indivi_student' . substr(sha1(rand()), 0, 7);
$params = array(
'label' => $students,
'name' => $students,
$result = CRM_Contact_BAO_ContactType::add($params);
$this->student = $params['name'];
- $parents = 'indivi_parent'.substr(sha1(rand()), 0, 7);
+ $parents = 'indivi_parent' . substr(sha1(rand()), 0, 7);
$params = array(
'label' => $parents,
'name' => $parents,
$result = CRM_Contact_BAO_ContactType::add($params);
$this->parent = $params['name'];
- $orgs = 'org_sponsor'.substr(sha1(rand()), 0, 7);
+ $orgs = 'org_sponsor' . substr(sha1(rand()), 0, 7);
$params = array(
'label' => $orgs,
'name' => $orgs,
public function setUp() {
parent::setUp();
- $labelsub1 = 'sub1_individual'.substr(sha1(rand()), 0, 7);
+ $labelsub1 = 'sub1_individual' . substr(sha1(rand()), 0, 7);
$params = array(
'label' => $labelsub1,
'name' => $labelsub1,
$result = CRM_Contact_BAO_ContactType::add($params);
$this->subTypesIndividual[] = $params['name'];
- $labelsub2 = 'sub2_individual'.substr(sha1(rand()), 0, 7);
+ $labelsub2 = 'sub2_individual' . substr(sha1(rand()), 0, 7);
$params = array(
'label' => $labelsub2,
'name' => $labelsub2,
$result = CRM_Contact_BAO_ContactType::add($params);
$this->subTypesIndividual[] = $params['name'];
- $labelsub = 'sub_organization'.substr(sha1(rand()), 0, 7);
+ $labelsub = 'sub_organization' . substr(sha1(rand()), 0, 7);
$params = array(
'label' => $labelsub,
'name' => $labelsub,
$result = CRM_Contact_BAO_ContactType::add($params);
$this->subTypesOrganization[] = $params['name'];
- $labelhousehold = 'sub_household'.substr(sha1(rand()), 0, 7);
+ $labelhousehold = 'sub_household' . substr(sha1(rand()), 0, 7);
$params = array(
'label' => $labelhousehold,
'name' => $labelhousehold,
*/
public function assertLogRegexp($pattern) {
$config = CRM_Core_Config::singleton();
- $logFiles = glob($config->configAndLogDir.'/CiviCRM*.log');
- $this->assertEquals(1, count($logFiles), 'Expect to find 1 file matching: ' . $config->configAndLogDir.'/CiviCRM*log*/');
+ $logFiles = glob($config->configAndLogDir . '/CiviCRM*.log');
+ $this->assertEquals(1, count($logFiles), 'Expect to find 1 file matching: ' . $config->configAndLogDir . '/CiviCRM*log*/');
foreach ($logFiles as $logFile) {
$this->assertRegexp($pattern, file_get_contents($logFile));
}
'mc_gross' => '15.00',
'payment_date' => '03:59:05 Jul 14, 2013 PDT',
'rp_invoice_id' => 'i=' . $this->_invoiceID
- .'&m=contribute&c='
+ . '&m=contribute&c='
. $this->_contactID
. '&r=' . $this->_contributionRecurID
. '&b=' . $this->_contributionID . '&p=' . $this->_contributionPageID,
}
public function testCheckRequirements_BadCachedir_false() {
- $browser = new CRM_Extension_Browser('file://' . dirname(__FILE__) .'/dataset/good-repository', '/index.html', FALSE);
+ $browser = new CRM_Extension_Browser('file://' . dirname(__FILE__) . '/dataset/good-repository', '/index.html', FALSE);
$this->assertEquals(TRUE, $browser->isEnabled());
$reqs = $browser->checkRequirements();
$this->assertEquals(1, count($reqs));
}
public function testCheckRequirements_BadCachedir_nonexistent() {
- $browser = new CRM_Extension_Browser('file://' . dirname(__FILE__) .'/dataset/good-repository', '/index.html', '/tot/all/yin/v/alid');
+ $browser = new CRM_Extension_Browser('file://' . dirname(__FILE__) . '/dataset/good-repository', '/index.html', '/tot/all/yin/v/alid');
$this->assertEquals(TRUE, $browser->isEnabled());
$reqs = $browser->checkRequirements();
$this->assertEquals(1, count($reqs));
}
public function testGetExtensions_good() {
- $browser = new CRM_Extension_Browser('file://' . dirname(__FILE__) .'/dataset/good-repository', '/index.html', $this->createTempDir('ext-cache-'));
+ $browser = new CRM_Extension_Browser('file://' . dirname(__FILE__) . '/dataset/good-repository', '/index.html', $this->createTempDir('ext-cache-'));
$this->assertEquals(TRUE, $browser->isEnabled());
$this->assertEquals(array(), $browser->checkRequirements());
$exts = $browser->getExtensions();
}
public function testGetExtension_good() {
- $browser = new CRM_Extension_Browser('file://' . dirname(__FILE__) .'/dataset/good-repository', '/index.html', $this->createTempDir('ext-cache-'));
+ $browser = new CRM_Extension_Browser('file://' . dirname(__FILE__) . '/dataset/good-repository', '/index.html', $this->createTempDir('ext-cache-'));
$this->assertEquals(TRUE, $browser->isEnabled());
$this->assertEquals(array(), $browser->checkRequirements());
}
public function testGetExtension_nonexistent() {
- $browser = new CRM_Extension_Browser('file://' . dirname(__FILE__) .'/dataset/good-repository', '/index.html', $this->createTempDir('ext-cache-'));
+ $browser = new CRM_Extension_Browser('file://' . dirname(__FILE__) . '/dataset/good-repository', '/index.html', $this->createTempDir('ext-cache-'));
$this->assertEquals(TRUE, $browser->isEnabled());
$this->assertEquals(array(), $browser->checkRequirements());
$basedir = $this->createTempDir('ext-');
mkdir("$basedir/weird");
mkdir("$basedir/weird/foobar");
- file_put_contents("$basedir/weird/foobar/info.xml", "<extension key='test.foo.bar' type='".self::TESTING_TYPE."'><file>oddball</file></extension>");
+ file_put_contents("$basedir/weird/foobar/info.xml", "<extension key='test.foo.bar' type='" . self::TESTING_TYPE . "'><file>oddball</file></extension>");
// not needed for now // file_put_contents("$basedir/weird/bar/oddball.php", "<?php\n");
mkdir("$basedir/weird/whizbang");
- file_put_contents("$basedir/weird/whizbang/info.xml", "<extension key='test.whiz.bang' type='".self::TESTING_TYPE."'><file>oddball</file></extension>");
+ file_put_contents("$basedir/weird/whizbang/info.xml", "<extension key='test.whiz.bang' type='" . self::TESTING_TYPE . "'><file>oddball</file></extension>");
// not needed for now // file_put_contents("$basedir/weird/whizbang/oddball.php", "<?php\n");
$c = new CRM_Extension_Container_Basic($basedir, 'http://example/basedir', $cache, $cacheKey);
return array($basedir, $c);
*/
public function _createDownload($key, $file) {
$basedir = $this->createTempDir('ext-dl-');
- file_put_contents("$basedir/info.xml", "<extension key='$key' type='".self::TESTING_TYPE."'><file>$file</file></extension>");
+ file_put_contents("$basedir/info.xml", "<extension key='$key' type='" . self::TESTING_TYPE . "'><file>$file</file></extension>");
file_put_contents("$basedir/$file.php", "<?php\n");
return $basedir;
}
*/
public function testCreateEntityTrxn() {
$fParams = array(
- 'name' => 'Donations'.substr(sha1(rand()), 0, 7),
+ 'name' => 'Donations' . substr(sha1(rand()), 0, 7),
'is_deductible' => 0,
'is_active' => 1,
);
$this->assertEquals(
count($actualCsvArray[$intKey]),
count($expectedCsvArray[$intKey]),
- 'Arrays have different number of columns at row ' . $intKey . '; in line ' . __LINE__. '; data: ' . $rowData
+ 'Arrays have different number of columns at row ' . $intKey . '; in line ' . __LINE__ . '; data: ' . $rowData
);
$this->assertEquals($expectedCsvArray[$intKey], $strVal);
}
$this->clickLink('_qf_Search_refresh');
- $targetContacts = array("Summerson, ". $firstName1, "Andersonnn, ". $firstName2, "Anderson, ". $firstName3);
+ $targetContacts = array("Summerson, " . $firstName1, "Andersonnn, " . $firstName2, "Anderson, " . $firstName3);
//check whether separate activities are created for the target contacts
foreach ($targetContacts as $contact) {
$this->waitForElementPresent('_qf_CaseView_cancel-bottom');
$id = $this->urlArg('id');
- $this->waitForElementPresent("xpath=//div[@id='activities']//table[@id='case_id_".$id."']/tbody/tr[1]/td[2]");
+ $this->waitForElementPresent("xpath=//div[@id='activities']//table[@id='case_id_" . $id . "']/tbody/tr[1]/td[2]");
- $this->click("xpath=//div[@id='activities']//table[@id='case_id_".$id."']/tbody/tr[1]/td[2]//a[text()='{$subject}']");
+ $this->click("xpath=//div[@id='activities']//table[@id='case_id_" . $id . "']/tbody/tr[1]/td[2]//a[text()='{$subject}']");
$this->waitForElementPresent('ActivityView');
$this->waitForElementPresent("css=table#crm-activity-view-table tr.crm-case-activityview-form-block-groupTitle");
$this->assertElementContainsText('crm-activity-view-table', "$textField");
$this->click("xpath=//span[@class='ui-button-icon-primary ui-icon ui-icon-closethick']");
- $this->waitForElementPresent("xpath=//div[@id='activities']//table[@id='case_id_".$id."']/tbody/tr[1]/td[2]");
+ $this->waitForElementPresent("xpath=//div[@id='activities']//table[@id='case_id_" . $id . "']/tbody/tr[1]/td[2]");
- $this->click("xpath=//div[@id='activities']//table[@id='case_id_".$id."']/tbody//tr/td[2]/a[text()='{$subject}']/../../td[6]/a[text()='Scheduled']");
+ $this->click("xpath=//div[@id='activities']//table[@id='case_id_" . $id . "']/tbody//tr/td[2]/a[text()='{$subject}']/../../td[6]/a[text()='Scheduled']");
$this->waitForElementPresent("xpath=//html/body/div[7]");
$this->waitForElementPresent('activity_change_status');
$this->click("xpath=//table[@class='caseSelector']/tbody//tr/td[2]/a[text()='{$contactName}']/../../td[9]/span/a[text()='Manage']");
$this->waitForElementPresent('_qf_CaseView_cancel-bottom');
$id2 = $this->urlArg('id');
- $this->waitForElementPresent("xpath=//div[@id='activities']//table[@id='case_id_".$id2."']/tbody/tr[1]/td[2]");
- $this->click("xpath=//div[@id='activities']//table[@id='case_id_".$id2."']//a[text()='{$subject}']");
+ $this->waitForElementPresent("xpath=//div[@id='activities']//table[@id='case_id_" . $id2 . "']/tbody/tr[1]/td[2]");
+ $this->click("xpath=//div[@id='activities']//table[@id='case_id_" . $id2 . "']//a[text()='{$subject}']");
$this->waitForElementPresent('ActivityView');
$this->waitForElementPresent("css=table#crm-activity-view-table tr.crm-case-activityview-form-block-groupTitle");
}
$this->openCiviPage('a/#/caseType/new');
- $caseTypeLabel = "Case Type". substr(sha1(rand()), 0, 7);
+ $caseTypeLabel = "Case Type" . substr(sha1(rand()), 0, 7);
$this->waitForElementPresent('title');
$this->type('title', $caseTypeLabel);
$this->click("xpath=//table/tbody//tr/td[1][text()='{$caseTypeLabel}']/../td[5]/span/a[text()='Edit']");
$this->waitForElementPresent("xpath=//div[@class='crm-submit-buttons']/span/input[@value='Save']");
- $editCaseTypeLabel = "Case Type Edit". substr(sha1(rand()), 0, 7);
+ $editCaseTypeLabel = "Case Type Edit" . substr(sha1(rand()), 0, 7);
$this->waitForElementPresent('title');
$this->type('title', $editCaseTypeLabel);
$this->click("_qf_AddToGroup_next-bottom");
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->waitForText('crm-notification-container', "Added Contacts to ".$groupName);
+ $this->waitForText('crm-notification-container', "Added Contacts to " . $groupName);
$this->waitForText('crm-notification-container', '2 contacts added to group');
$this->_testSearchResult($relType);
}
$Ndate = date('F jS, Y h:i:s A', mktime(0, 0, 0, date('m'), date('d') + 1, date('Y')));
//create a contact and return the contact id
- $firstNameSoft = "John_".substr(sha1(rand()), 0, 5);
- $lastNameSoft = "Doe_".substr(sha1(rand()), 0, 5);
+ $firstNameSoft = "John_" . substr(sha1(rand()), 0, 5);
+ $lastNameSoft = "Doe_" . substr(sha1(rand()), 0, 5);
$this->webtestAddContact($firstNameSoft, $lastNameSoft);
$cid = $this->urlArg('cid');
//advance search for created contacts
$this->openCiviPage('contact/search/advanced', 'reset=1', '_qf_Advanced_refresh');
- $this->type('sort_name', $lastNameSoft.', '.$firstNameSoft);
+ $this->type('sort_name', $lastNameSoft . ', ' . $firstNameSoft);
$this->click('changeLog');
$this->waitForElementPresent("log_date_low");
$this->select("log_date_relative", "value=0");
//contact details section
//fill in first name
- $firstName = 'Jimmy'.substr(sha1(rand()), 0, 7);
+ $firstName = 'Jimmy' . substr(sha1(rand()), 0, 7);
$this->type('first_name', $firstName);
//fill in last name
- $lastName = 'Page'.substr(sha1(rand()), 0, 7);
+ $lastName = 'Page' . substr(sha1(rand()), 0, 7);
$this->type('last_name', $lastName);
//fill in email id
$this->type("phone_1_phone", "2222-4444");
$this->click("xpath=//table//tr/td/label[text()=\"$customField\"]");
- $value = "custom".rand();
+ $value = "custom" . rand();
$this->type("xpath=//table//tr/td/label[text()=\"$customField\"]/../following-sibling::td/input", $value);
//check for matching contact
$this->waitForElementPresent("xpath=//ul[@id='actions']/li[2]/a/span");
$this->clickLink("xpath=//ul[@id='actions']/li[2]/a/span");
$this->click("xpath=//table//tr/td/label[text()=\"$customField\"]");
- $value1 = "custom_1".rand();
+ $value1 = "custom_1" . rand();
$this->type("xpath=//table//tr/td/label[text()=\"$customField\"]/../following-sibling::td/input", $value1);
$this->click("_qf_Contact_upload_view-bottom");
$this->waitForPageToLoad($this->getTimeoutMsec());
//Create contact.
$group = "Advisory Board";
- $firstName = "Adams".substr(sha1(rand()), 0, 4);
+ $firstName = "Adams" . substr(sha1(rand()), 0, 4);
$lastName = substr(sha1(rand()), 0, 4);
$email = "{$lastName}.{$firstName}@example.org";
$this->type('first_name', $firstName);
$this->openCiviPage("contact/add", "reset=1&ct=Individual");
$this->waitForElementPresent('_qf_Contact_cancel-bottom');
//fill in first name
- $firstName = "Anderson".substr(sha1(rand()), 0, 4);
+ $firstName = "Anderson" . substr(sha1(rand()), 0, 4);
$this->type('first_name', $firstName);
//fill in last name
$this->openCiviPage("contact/add", "reset=1&ct=Individual");
$this->waitForElementPresent('_qf_Contact_cancel-bottom');
- $fName = "John".substr(sha1(rand()), 0, 4);
+ $fName = "John" . substr(sha1(rand()), 0, 4);
$this->type('first_name', $fName);
$lName = substr(sha1(rand()), 0, 4);
$this->type('last_name', $lName);
// add contact1 and its duplicate
//first name
- $firstName = "Kerry".substr(sha1(rand()), 0, 7);
+ $firstName = "Kerry" . substr(sha1(rand()), 0, 7);
//last name
- $lastName = "King".substr(sha1(rand()), 0, 7);
+ $lastName = "King" . substr(sha1(rand()), 0, 7);
$this->_createContacts($firstName, $lastName);
//add contact2 and its duplicate
$this->openCiviPage("contact/add", "reset=1&ct=Individual");
//fill in first name
- $firstName1 = "Kurt".substr(sha1(rand()), 0, 7);
+ $firstName1 = "Kurt" . substr(sha1(rand()), 0, 7);
$this->type('first_name', $firstName1);
//fill in last name
- $lastName1 = "Cobain".substr(sha1(rand()), 0, 7);
+ $lastName1 = "Cobain" . substr(sha1(rand()), 0, 7);
$this->type('last_name', $lastName1);
//fill in email id
// add contact3 and its duplicate
//fill in first name
- $firstName2 = "David".substr(sha1(rand()), 0, 7);
+ $firstName2 = "David" . substr(sha1(rand()), 0, 7);
//fill in last name
- $lastName2 = "Gilmour".substr(sha1(rand()), 0, 7);
+ $lastName2 = "Gilmour" . substr(sha1(rand()), 0, 7);
$this->_createContacts($firstName2, $lastName2);
// add contact4 and its duplicate
//fill in first name
- $firstName3 = "Dave".substr(sha1(rand()), 0, 7);
+ $firstName3 = "Dave" . substr(sha1(rand()), 0, 7);
//fill in last name
- $lastName3 = "Mustaine".substr(sha1(rand()), 0, 7);
+ $lastName3 = "Mustaine" . substr(sha1(rand()), 0, 7);
$this->_createContacts($firstName3, $lastName3);
// Find and Merge Contacts with Supervised Rule
$this->webtestLogin();
// build organisation name
- $orgnaizationName = 'org_'.substr(sha1(rand()), 0, 7);
+ $orgnaizationName = 'org_' . substr(sha1(rand()), 0, 7);
$contactIds = array();
// create organization and its duplicate
//test for individual contact and household subtype contact
//relationship
- $typeb = "Household__". $householdSubtypeName;
+ $typeb = "Household__" . $householdSubtypeName;
//create a relationship type between different contact types
$params = array(
// We're using Quick Add block on the main page for this.
$firstName = substr(sha1(rand()), 0, 7);
// Add new Financial Account
- $orgName = 'Alberta '.substr(sha1(rand()), 0, 7);
- $financialAccountTitle = 'Financial Account '.substr(sha1(rand()), 0, 4);
+ $orgName = 'Alberta ' . substr(sha1(rand()), 0, 7);
+ $financialAccountTitle = 'Financial Account ' . substr(sha1(rand()), 0, 4);
$financialAccountDescription = "{$financialAccountTitle} Description";
$accountingCode = 1033;
$financialAccountType = 'Asset';
$this->click("link=Add Field");
$this->waitForElementPresent('_qf_Field_next-bottom');
$this->select('field_name[0]', 'value=Membership');
- $label = $checkboxFieldLabel.' :: '. $customGroupTitle;
+ $label = $checkboxFieldLabel . ' :: ' . $customGroupTitle;
$this->select('field_name[1]', "label=$label");
$this->click('field_name[1]');
$this->click('_qf_Field_next_new-bottom');
$this->waitForPageToLoad($this->getTimeoutMsec());
$this->select('field_name[0]', 'value=Membership');
- $label = $radioFieldLabel.' :: '. $customGroupTitle;
+ $label = $radioFieldLabel . ' :: ' . $customGroupTitle;
$this->select('field_name[1]', "label=$label");
$this->click('field_name[1]');
$this->click('_qf_Field_next-bottom');
$this->assertTrue($this->isTextPresent("Your CiviCRM Profile Field '{$radioFieldLabel}' has been saved to 'On Behalf Of Organization'."));
//create organisation
- $orgName = "Org WebAccess ". substr(sha1(rand()), 0, 7);
- $orgEmail = "org". substr(sha1(rand()), 0, 7) . "@web.com";
+ $orgName = "Org WebAccess " . substr(sha1(rand()), 0, 7);
+ $orgEmail = "org" . substr(sha1(rand()), 0, 7) . "@web.com";
$this->webtestAddOrganization($orgName, $orgEmail);
$this->waitForPageToLoad($this->getTimeoutMsec());
$this->waitForPageToLoad($this->getTimeoutMsec());
//create organisation
- $orgName = "Org WebAccess ". substr(sha1(rand()), 0, 7);
- $orgEmail = "org". substr(sha1(rand()), 0, 7) . "@web.com";
+ $orgName = "Org WebAccess " . substr(sha1(rand()), 0, 7);
+ $orgEmail = "org" . substr(sha1(rand()), 0, 7) . "@web.com";
$this->webtestAddOrganization($orgName, $orgEmail);
$this->waitForPageToLoad($this->getTimeoutMsec());
$this->webtestLogin();
//create organisation
- $orgName = "Org WebAccess ". substr(sha1(rand()), 0, 7);
- $orgEmail = "org". substr(sha1(rand()), 0, 7) . "@web.com";
+ $orgName = "Org WebAccess " . substr(sha1(rand()), 0, 7);
+ $orgEmail = "org" . substr(sha1(rand()), 0, 7) . "@web.com";
$contactSubType = 'Sponsor';
$this->webtestAddOrganization($orgName, $orgEmail, $contactSubType);
$this->webtestAddContact($softCreditFname, $softCreditLname, FALSE);
// Add new Financial Account
- $orgName = 'Alberta '.substr(sha1(rand()), 0, 7);
- $financialAccountTitle = 'Financial Account '.substr(sha1(rand()), 0, 4);
+ $orgName = 'Alberta ' . substr(sha1(rand()), 0, 7);
+ $financialAccountTitle = 'Financial Account ' . substr(sha1(rand()), 0, 4);
$financialAccountDescription = "{$financialAccountTitle} Description";
$accountingCode = 1033;
$financialAccountType = 'Asset';
$from = 'Premiums';
$to = 'Premiums inventory';
$financialType = array(
- 'name' => 'Test Financial'.substr(sha1(rand()), 0, 7),
+ 'name' => 'Test Financial' . substr(sha1(rand()), 0, 7),
'is_reserved' => 1,
'is_deductible' => 1,
);
$this->addeditFinancialType($financialType);
- $this->waitForElementPresent("xpath=//div[@id='ltype']/div/table/tbody//tr/td[text()='".$financialType['name']."']/../td[7]/span/a[text()='Accounts']");
- $this->click("xpath=//div[@id='ltype']/div/table/tbody//tr/td[text()='".$financialType['name']."']/../td[7]/span/a[text()='Accounts']");
+ $this->waitForElementPresent("xpath=//div[@id='ltype']/div/table/tbody//tr/td[text()='" . $financialType['name'] . "']/../td[7]/span/a[text()='Accounts']");
+ $this->click("xpath=//div[@id='ltype']/div/table/tbody//tr/td[text()='" . $financialType['name'] . "']/../td[7]/span/a[text()='Accounts']");
$this->waitForElementPresent("xpath=//a[@id='newfinancialTypeAccount']");
$this->clickAjaxLink("xpath=//a[@id='newfinancialTypeAccount']", "_qf_FinancialTypeAccount_cancel-botttom");
$this->select("account_relationship", "label=Premiums Inventory Account is");
$this->select("financial_account_id", "label=$to");
$this->clickAjaxLink("_qf_FinancialTypeAccount_next-botttom", "xpath=//a[@id='newfinancialTypeAccount']");
- $premiumName = 'Premium'.substr(sha1(rand()), 0, 7);
+ $premiumName = 'Premium' . substr(sha1(rand()), 0, 7);
$amount = 500;
$sku = 'SKU';
$price = 300;
$this->addPremium($premiumName, $sku, $amount, $price, $cost, $financialType['name']);
//add second premium
- $premiumName2 = 'Premium'.substr(sha1(rand()), 0, 7);
+ $premiumName2 = 'Premium' . substr(sha1(rand()), 0, 7);
$amount2 = 600;
$sku2 = 'SKU';
$price2 = 200;
'is_deductible' => 1,
);
$this->addeditFinancialType($financialType);
- $this->waitForElementPresent("xpath=//div[@id='ltype']/div/table/tbody//tr/td[text()='".$financialType['name']."']/../td[7]/span/a[text()='Accounts']");
- $this->click("xpath=//div[@id='ltype']/div/table/tbody//tr/td[text()='".$financialType['name']."']/../td[7]/span/a[text()='Accounts']");
+ $this->waitForElementPresent("xpath=//div[@id='ltype']/div/table/tbody//tr/td[text()='" . $financialType['name'] . "']/../td[7]/span/a[text()='Accounts']");
+ $this->click("xpath=//div[@id='ltype']/div/table/tbody//tr/td[text()='" . $financialType['name'] . "']/../td[7]/span/a[text()='Accounts']");
$this->waitForElementPresent("xpath=//a[@id='newfinancialTypeAccount']");
$this->clickLink("xpath=//a[@id='newfinancialTypeAccount']", "_qf_FinancialTypeAccount_cancel-botttom", FALSE);
public function testChangePaymentInstrument() {
$this->webtestLogin();
- $label = 'TEST'.substr(sha1(rand()), 0, 7);
+ $label = 'TEST' . substr(sha1(rand()), 0, 7);
$amount = 100.00;
$financialAccount = CRM_Contribute_PseudoConstant::financialAccount();
$to = array_search('Accounts Receivable', $financialAccount);
$this->type('first_name', $firstName);
//fill in last name
- $lastName = 'Recuron'.substr(sha1(rand()), 0, 7);
+ $lastName = 'Recuron' . substr(sha1(rand()), 0, 7);
$this->type('last_name', $contactName);
$email = $firstName . '@example.com';
$this->type('email-Primary', $email);
break;
}
$this->clickLink('_qf_Field_next_new-bottom', '_qf_Field_next-bottom');
- $this->waitForText('crm-notification-container', "Price Field '".$label."' has been saved.");
+ $this->waitForText('crm-notification-container', "Price Field '" . $label . "' has been saved.");
}
}
// Adding contact with randomized first name (so we can then select that contact when creating event registration)
// We're using Quick Add block on the main page for this.
$firstName = substr(sha1(rand()), 0, 7);
- $lastName = 'Anderson'. substr(sha1(rand()), 0, 7);
+ $lastName = 'Anderson' . substr(sha1(rand()), 0, 7);
$this->webtestAddContact($firstName, $lastName, TRUE);
$contactName = "$lastName, $firstName";
$displayName = "$firstName $lastName";
// Adding contact with randomized first name (so we can then select that contact when creating event registration)
// We're using Quick Add block on the main page for this.
$firstName = substr(sha1(rand()), 0, 7);
- $lastName = 'Anderson'. substr(sha1(rand()), 0, 7);
+ $lastName = 'Anderson' . substr(sha1(rand()), 0, 7);
$this->webtestAddContact($firstName, $lastName, TRUE);
$contactName = "$lastName, $firstName";
$displayName = "$firstName $lastName";
$email = 'jane_' . substr(sha1(rand()), 0, 5) . '@example.org';
$this->type('first_name', 'Mary');
- $this->type('last_name', 'Jones'. substr(sha1(rand()), 0, 5));
+ $this->type('last_name', 'Jones' . substr(sha1(rand()), 0, 5));
$this->type('email-Primary', $email);
// fill billing details and register
$this->click("xpath=//input[@class='crm-form-radio']");
$email = 'jane_' . substr(sha1(rand()), 0, 5) . '@example.org';
$this->type('first_name', 'Mary');
- $this->type('last_name', 'Jones'. substr(sha1(rand()), 0, 5));
+ $this->type('last_name', 'Jones' . substr(sha1(rand()), 0, 5));
$this->type('email-Primary', $email);
// fill billing details and register
$this->select("price_{$selectFieldId}", "value={$selectFieldOp1}");
$this->type('first_name', 'Mary');
- $this->type('last_name', 'Jones'. substr(sha1(rand()), 0, 5));
+ $this->type('last_name', 'Jones' . substr(sha1(rand()), 0, 5));
$email = 'jane_' . substr(sha1(rand()), 0, 5) . '@example.org';
$this->type('email-Primary', $email);
// exceed maximun count for text field, check for form rule
$this->type("xpath=//input[@id='price_{$textFieldId}']", '2');
$this->type('first_name', 'Mary');
- $this->type('last_name', 'Jane'. substr(sha1(rand()), 0, 5));
+ $this->type('last_name', 'Jane' . substr(sha1(rand()), 0, 5));
$email = 'jane_' . substr(sha1(rand()), 0, 5) . '@example.org';
$this->type('email-Primary', $email);
$this->type("xpath=//input[@id='price_{$textFieldId}']", '3');
$this->type('first_name', 'Mary');
- $this->type('last_name', 'Jane'. substr(sha1(rand()), 0, 5));
+ $this->type('last_name', 'Jane' . substr(sha1(rand()), 0, 5));
$email = 'jane_' . substr(sha1(rand()), 0, 5) . '@example.org';
$this->type('email-Primary', $email);
// check for form rule
$this->type("xpath=//input[@id='price_{$textFieldId}']", '2');
$this->type('first_name', 'Mary');
- $this->type('last_name', 'Jane'. substr(sha1(rand()), 0, 5));
+ $this->type('last_name', 'Jane' . substr(sha1(rand()), 0, 5));
$email = 'jane_' . substr(sha1(rand()), 0, 5) . '@example.org';
$this->type('email-Primary', $email);
$this->type("xpath=//input[@id='price_{$textFieldId}']", '7');
$this->type('first_name', 'Mary');
- $this->type('last_name', 'Jane'. substr(sha1(rand()), 0, 5));
+ $this->type('last_name', 'Jane' . substr(sha1(rand()), 0, 5));
$email = 'jane_' . substr(sha1(rand()), 0, 5) . '@example.org';
$this->type('email-Primary', $email);
$this->type("xpath=//input[@id='price_{$textFieldId}']", '6');
$this->type('first_name', 'Mary Add 2');
- $this->type('last_name', 'Jane'. substr(sha1(rand()), 0, 5));
+ $this->type('last_name', 'Jane' . substr(sha1(rand()), 0, 5));
$email = 'jane_' . substr(sha1(rand()), 0, 5) . '@example.org';
$this->type('email-Primary', $email);
$this->type("xpath=//input[@id='price_{$textFieldId}']", '3');
$this->type('first_name', 'Mary Add 2');
- $this->type('last_name', 'Jane'. substr(sha1(rand()), 0, 5));
+ $this->type('last_name', 'Jane' . substr(sha1(rand()), 0, 5));
$email = 'jane_' . substr(sha1(rand()), 0, 5) . '@example.org';
$this->type('email-Primary', $email);
$this->type("xpath=//input[@id='price_{$textFieldId}']", '3');
$this->type('first_name', 'Mary');
- $this->type('last_name', 'Jane'. substr(sha1(rand()), 0, 5));
+ $this->type('last_name', 'Jane' . substr(sha1(rand()), 0, 5));
$email = 'jane_' . substr(sha1(rand()), 0, 5) . '@example.org';
$this->type('email-Primary', $email);
$this->type("xpath=//input[@id='price_{$textFieldId}']", '2');
$this->type('first_name', 'Mary Add 1');
- $this->type('last_name', 'Jane'. substr(sha1(rand()), 0, 5));
+ $this->type('last_name', 'Jane' . substr(sha1(rand()), 0, 5));
$email = 'jane_' . substr(sha1(rand()), 0, 5) . '@example.org';
$this->type('email-Primary', $email);
$this->type("xpath=//input[@id='price_{$textFieldId}']", '7');
$this->type('first_name', 'Mary');
- $this->type('last_name', 'Jane'. substr(sha1(rand()), 0, 5));
+ $this->type('last_name', 'Jane' . substr(sha1(rand()), 0, 5));
$email = 'jane_' . substr(sha1(rand()), 0, 5) . '@example.org';
$this->type('email-Primary', $email);
$this->type("xpath=//input[@id='price_{$textFieldId}']", '6');
$this->type('first_name', 'Mary Add 1');
- $this->type('last_name', 'Jane'. substr(sha1(rand()), 0, 5));
+ $this->type('last_name', 'Jane' . substr(sha1(rand()), 0, 5));
$email = 'jane_' . substr(sha1(rand()), 0, 5) . '@example.org';
$this->type('email-Primary', $email);
$this->type("xpath=//input[@id='price_{$textFieldId}']", '3');
$this->type('first_name', 'Mary Add 2');
- $this->type('last_name', 'Jane'. substr(sha1(rand()), 0, 5));
+ $this->type('last_name', 'Jane' . substr(sha1(rand()), 0, 5));
$email = 'jane_' . substr(sha1(rand()), 0, 5) . '@example.org';
$this->type('email-Primary', $email);
$this->type("xpath=//input[@id='price_{$textFieldId}']", '3');
$this->type('first_name', 'Mary');
- $this->type('last_name', 'Jane'. substr(sha1(rand()), 0, 5));
+ $this->type('last_name', 'Jane' . substr(sha1(rand()), 0, 5));
$email = 'jane_' . substr(sha1(rand()), 0, 5) . '@example.org';
$this->type('email-Primary', $email);
$this->type("xpath=//input[@id='price_{$textFieldId}']", '2');
$this->type('first_name', 'Mary Add 1');
- $this->type('last_name', 'Jane'. substr(sha1(rand()), 0, 5));
+ $this->type('last_name', 'Jane' . substr(sha1(rand()), 0, 5));
$email = 'jane_' . substr(sha1(rand()), 0, 5) . '@example.org';
$this->type('email-Primary', $email);
$this->open($registerUrl);
$this->waitForElementPresent('_qf_Register_upload-bottom');
- $firstName = 'Jane' .substr(sha1(rand()), 0, 7);
+ $firstName = 'Jane' . substr(sha1(rand()), 0, 7);
$lastName = 'Doe' . substr(sha1(rand()), 0, 7);
$this->type('first_name', "$firstName");
$this->type('last_name', "$lastName");
1 => array(
'First Name' => $firstContactName,
'Last Name' => 'Smith',
- 'Email' => ''.strtolower($emailContactFirst).'',
+ 'Email' => '' . strtolower($emailContactFirst) . '',
'Sort Name' => $sortFirstName,
- 'Display Name' => $prefixLabelContactFrst.' '.$displayFirstName.' '.$suffixLabelContactFrst,
+ 'Display Name' => $prefixLabelContactFrst . ' ' . $displayFirstName . ' ' . $suffixLabelContactFrst,
'Individual Prefix' => $prefixLabelContactFrst,
'Individual Suffix' => $suffixLabelContactFrst,
'Gender' => $genderLabelContactFrst,
2 => array(
'First Name' => $secondContactName,
'Last Name' => 'John',
- 'Email' => ''.strtolower($emailContactSecond).'',
+ 'Email' => '' . strtolower($emailContactSecond) . '',
'Sort Name' => $sortSecondName,
- 'Display Name' => $prefixLabelContactScnd.' '.$displaySecondName.' '.$suffixLabelContactScnd,
+ 'Display Name' => $prefixLabelContactScnd . ' ' . $displaySecondName . ' ' . $suffixLabelContactScnd,
'Individual Prefix' => $prefixLabelContactScnd,
'Individual Suffix' => $suffixLabelContactScnd,
'Gender' => $genderLabelContactScnd,
$prefix = rand(1, 4);
$suffix = rand(1, 8);
$gender = rand(1, 3);
- $genderLabel = "civicrm_gender_".$genderLabelArray[$gender]."_$gender";
+ $genderLabel = "civicrm_gender_" . $genderLabelArray[$gender] . "_$gender";
$this->select("prefix_id", "value=$prefix");
$this->select("suffix_id", "value=$suffix");
$this->click("demographics");
$this->webtestLogin();
// Add new Financial Account
- $orgName = 'Alberta '.substr(sha1(rand()), 0, 7);
+ $orgName = 'Alberta ' . substr(sha1(rand()), 0, 7);
$uniqueName = explode(" ", $orgName);
- $financialAccountTitle = 'Financial Account '.substr(sha1(rand()), 0, 4);
+ $financialAccountTitle = 'Financial Account ' . substr(sha1(rand()), 0, 4);
$financialAccountDescription = "{$financialAccountTitle} Description";
$accountingCode = 1033;
$financialAccountType = 'Liability';
$financialAccountType = 'Liability';
if ($orgNameEdit) {
- $orgNameEdit = 'NGO '.substr(sha1(rand()), 0, 7);
+ $orgNameEdit = 'NGO ' . substr(sha1(rand()), 0, 7);
$this->webtestAddOrganization($orgNameEdit);
$uniqueName = explode(" ", $orgNameEdit);
}
$this->webtestLogin();
//Add new Financial Type
- $financialType['name'] = 'FinancialType '.substr(sha1(rand()), 0, 4);
+ $financialType['name'] = 'FinancialType ' . substr(sha1(rand()), 0, 4);
$financialType['is_deductible'] = TRUE;
$financialType['is_reserved'] = FALSE;
$this->addeditFinancialType($financialType);
//edit financial type
$financialType['oldname'] = $financialType['name'];
- $financialType['name'] = 'Edited FinancialType '.substr(sha1(rand()), 0, 4);
+ $financialType['name'] = 'Edited FinancialType ' . substr(sha1(rand()), 0, 4);
$financialType['is_deductible'] = TRUE;
$financialType['is_reserved'] = FALSE;
$this->addeditFinancialType($financialType, 'Edit');
public function _createMultipleValueCustomField($customFieldName, $type) {
$this->type('label', $customFieldName);
$this->select("data_type[0]", "value=0");
- $this->select("data_type[1]", "value=".$type);
+ $this->select("data_type[1]", "value=" . $type);
$this->type("option_label_1", "label1");
$this->type("option_value_1", "label1");
$this->type("option_label_2", "label2");
$this->select('html_type', "value={$fields[1]}");
$options = array(
1 => array(
- 'label' => $memTypeTitle1."_1",
+ 'label' => $memTypeTitle1 . "_1",
'membership_type_id' => $memTypeId1,
'amount' => 50.00,
'membership_num_terms' => 1,
),
2 => array(
- 'label' => $memTypeTitle1."_2",
+ 'label' => $memTypeTitle1 . "_2",
'membership_type_id' => $memTypeId1,
'amount' => 90.00,
'membership_num_terms' => 2,
),
3 => array(
- 'label' => $memTypeTitle1."_3",
+ 'label' => $memTypeTitle1 . "_3",
'membership_type_id' => $memTypeId1,
'amount' => 120.00,
'membership_num_terms' => 3,
$this->select('html_type', "value={$fields[1]}");
$options = array(
1 => array(
- 'label' => $memTypeTitle1."_1",
+ 'label' => $memTypeTitle1 . "_1",
'membership_type_id' => $memTypeId1,
'amount' => 50.00,
'membership_num_terms' => 1,
),
2 => array(
- 'label' => $memTypeTitle1."_2",
+ 'label' => $memTypeTitle1 . "_2",
'membership_type_id' => $memTypeId1,
'amount' => 90.00,
'membership_num_terms' => 2,
),
3 => array(
- 'label' => $memTypeTitle1."_3",
+ 'label' => $memTypeTitle1 . "_3",
'membership_type_id' => $memTypeId1,
'amount' => 120.00,
'membership_num_terms' => 3,
// verify soft credit data
$expected = array(
- '1' => $giftMemberfirstName.' Memberson',
+ '1' => $giftMemberfirstName . ' Memberson',
'2' => $totalAmount,
'3' => 'Gift',
'4' => 'Donation',
$this->select('field_name[0]', 'value=Contact');
$this->click("//option[@value='Contact']");
$this->click('field_name_1');
- $this->select('field_name_1', 'label='.$params['textFieldLabel'].' :: '.$params['customGroupTitle']);
+ $this->select('field_name_1', 'label=' . $params['textFieldLabel'] . ' :: ' . $params['customGroupTitle']);
if ($checkMultiRecord) {
$this->click('is_multi_summary');
}
$this->select('field_name[0]', 'value=Contact');
$this->click("//option[@value='Contact']");
$this->click('field_name_1');
- $this->select('field_name_1', 'label='.$params['selectFieldLabel'].' :: '.$params['customGroupTitle']);
+ $this->select('field_name_1', 'label=' . $params['selectFieldLabel'] . ' :: ' . $params['customGroupTitle']);
if ($checkMultiRecord) {
$this->click('is_multi_summary');
}
$this->click("//div[@id='custom--table-wrapper']/div/div/table/tbody/tr/td[3]/span/a[text()='Edit']");
$this->waitForElementPresent("xpath=//div[@class='ui-dialog-content ui-widget-content modal-dialog crm-ajax-container']/form/div[2]//div[@id='crm-profile-block']");
$this->verifyText("//div[@id='custom--table-wrapper']/div/div/table/thead/tr/th[1]", preg_quote($params['textFieldLabel']));
- $this->type("//div[@id='crm-profile-block']/div/div[2]/input[@class='crm-form-text required']", $recordNew['text'].'edit');
+ $this->type("//div[@id='crm-profile-block']/div/div[2]/input[@class='crm-form-text required']", $recordNew['text'] . 'edit');
$this->click("css=.ui-dialog-buttonset button[data-identifier=_qf_Edit_next]");
- $this->waitForText("//div[@id='custom--table-wrapper']/div/div/table/tbody/tr[1]/td[1]", $recordNew['text'].'edit');
+ $this->waitForText("//div[@id='custom--table-wrapper']/div/div/table/tbody/tr[1]/td[1]", $recordNew['text'] . 'edit');
$editalertText = $this->getAlert();
$this->assertEquals("Thank you. Your information has been saved.", $editalertText);
- $this->verifyText("//div[@id='custom--table-wrapper']/div/div/table/tbody/tr[1]/td[1]", preg_quote($recordNew['text'].'edit'));
+ $this->verifyText("//div[@id='custom--table-wrapper']/div/div/table/tbody/tr[1]/td[1]", preg_quote($recordNew['text'] . 'edit'));
// Check the delete functionality
$this->click("//div[@id='custom--table-wrapper']/div/div/table/tbody/tr/td[3]/span/a[text()='Delete']");
$this->assertEquals("Deleted Your record has been deleted.", $delText);
$this->click("//div[@id='custom--table-wrapper']/div/div/table/tbody/tr/td[3]/span/a[text()='View']");
- $this->waitForText("css=.ui-dialog-title", 'View '.$params['customGroupTitle'] . ' Record');
+ $this->waitForText("css=.ui-dialog-title", 'View ' . $params['customGroupTitle'] . ' Record');
$this->assertElementContainsText("css=.ui-dialog-content.crm-ajax-container", $params['textFieldLabel']);
if ($checkSearchable) {
$this->verifyElementNotPresent("//div[@id='profile-dialog']/div/div/div/div/div[1]/div[2]/a");
$this->type('first_name', $params['firstname']);
$params['lastname'] = 'Anderson' . substr(sha1(rand()), 0, 3);
$this->type('last_name', $params['lastname']);
- $params['email'] = $params['firstname'].$params['lastname'].'@exa.com';
+ $params['email'] = $params['firstname'] . $params['lastname'] . '@exa.com';
$this->type('email-Primary', $params['email']);
$this->waitForElementPresent("//div[@id='crm-profile-block']//div/div[2]/select");
$this->select("//div[@id='crm-profile-block']//div/div[2]/select", 'value=1');
$uselink = explode('?', $this->getAttribute("xpath=//*[@id='field_page']/div[1]/a[4]@href"));
$this->openCiviPage('profile/create', "$uselink[1]", '_qf_Edit_next');
$lastName = substr(sha1(rand()), 0, 7);
- $orgName = 'Organisation'.substr(sha1(rand()), 0, 7);
+ $orgName = 'Organisation' . substr(sha1(rand()), 0, 7);
// Fill Last Name
$this->type('last_name', $lastName);
$this->waitForElementPresent("xpath=//div[@class='view-content']//div[@class='action-link']/a");
$this->click("xpath=//div[@class='view-content']//div[@class='action-link']/a");
$this->waitForElementPresent("_qf_Case_cancel-bottom");
- $this->type('activity_subject', "subject".rand());
+ $this->type('activity_subject', "subject" . rand());
$this->select('case_type_id', 'value=1');
$this->click('_qf_Case_upload-bottom');
$this->waitForElementPresent("xpath=//form[@id='Search']/div[2]/div/table/tbody/tr[2]/td[9]/span[1]/a[1][text()='Manage']");
$scheduledStatus = CRM_Core_OptionGroup::getValue('activity_status', 'Scheduled', 'name');
$mappingId = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_ActionMapping', 'activity_type', 'id', 'entity_value');
$activityTypeId = CRM_Core_OptionGroup::getValue('activity_type', "Meeting", 'name');
- $title = "simpleActionSchedule".substr(sha1(rand()), 0, 7);
+ $title = "simpleActionSchedule" . substr(sha1(rand()), 0, 7);
$params = array(
'title' => $title,
'recipient' => $assigneeID,
$scheduledStatus = CRM_Core_OptionGroup::getValue('activity_status', 'Scheduled', 'name');
$mappingId = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_ActionMapping', 'activity_type', 'id', 'entity_value');
$activityTypeId = CRM_Core_OptionGroup::getValue('activity_type', "Meeting", 'name');
- $title = "simpleActionSchedule".substr(sha1(rand()), 0, 7);
+ $title = "simpleActionSchedule" . substr(sha1(rand()), 0, 7);
$params = array(
'title' => $title,
'recipient' => $assigneeID,
$reportTemplates[] = array($report['value']);
}
else {
- $reportTemplates[] = array($report['value']. " has existing issues : " . $reportsToSkip[$report['value']]);
+ $reportTemplates[] = array($report['value'] . " has existing issues : " . $reportsToSkip[$report['value']]);
}
}
$this->_orgId = $this->organizationCreate(NULL);
$this->params = array(
- 'title' => "Test Contribution Page".substr(sha1(rand()), 0, 7),
+ 'title' => "Test Contribution Page" . substr(sha1(rand()), 0, 7),
'financial_type_id' => 1,
'payment_processor' => 1,
'currency' => 'NZD',
);
$this->_priceSetParams = array(
- 'name' => 'tax_contribution'.substr(sha1(rand()), 0, 7),
- 'title' => 'contributiontax'.substr(sha1(rand()), 0, 7),
+ 'name' => 'tax_contribution' . substr(sha1(rand()), 0, 7),
+ 'title' => 'contributiontax' . substr(sha1(rand()), 0, 7),
'is_active' => 1,
'help_pre' => "Where does your goat sleep",
'help_post' => "thank you for your time",
// Financial Account with 20% tax rate
$financialAccountSetparams = array(
#[domain_id] =>
- 'name' => 'vat full taxrate account'.substr(sha1(rand()), 0, 7),
+ 'name' => 'vat full taxrate account' . substr(sha1(rand()), 0, 7),
'contact_id' => $this->_orgId,
'financial_account_type_id' => 2,
'is_tax' => 1,
// Financial type having 'Sales Tax Account is' with liability financail account
$financialType = array(
- 'name' => 'grassvariety1'.substr(sha1(rand()), 0, 7),
+ 'name' => 'grassvariety1' . substr(sha1(rand()), 0, 7),
'is_reserved' => 0,
'is_active' => 1,
);
// Financial type with 5% tax rate
$financialAccHalftax = array(
- 'name' => 'vat half taxrate account'.substr(sha1(rand()), 0, 7),
+ 'name' => 'vat half taxrate account' . substr(sha1(rand()), 0, 7),
'contact_id' => $this->_orgId,
'financial_account_type_id' => 2,
'is_tax' => 1,
$halfFinancialAccount = CRM_Financial_BAO_FinancialAccount::add($financialAccHalftax);
$this->halfFinancialAccId = $halfFinancialAccount->id;
$halfFinancialtypeHalftax = array(
- 'name' => 'grassvariety2'.substr(sha1(rand()), 0, 7),
+ 'name' => 'grassvariety2' . substr(sha1(rand()), 0, 7),
'is_reserved' => 0,
'is_active' => 1,
);
// Payment Processor
$paymentProceParams = array(
'domain_id' => 1,
- 'name' => 'dummy'.substr(sha1(rand()), 0, 7),
+ 'name' => 'dummy' . substr(sha1(rand()), 0, 7),
'payment_processor_type_id' => 10,
'financial_account_id' => 12,
'is_active' => 1,