Commit 86bfa4f6 authored by totten's avatar totten

INFRA-132 - Remove extra spaces around '.'

parent def009f6
......@@ -92,7 +92,7 @@ class CRM_Activity_Page_AJAX {
//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
......@@ -129,7 +129,7 @@ class CRM_Activity_Page_AJAX {
$params = $_POST;
if ($sort && $sortOrder) {
$sortSQL = $sort . ' ' . $sortOrder;
$sortSQL = $sort . ' ' . $sortOrder;
}
// Retrieve ALL client relationships
......@@ -194,7 +194,7 @@ class CRM_Activity_Page_AJAX {
$params = $_POST;
if ($sort && $sortOrder) {
$sortSQL = $sort . ' ' . $sortOrder;
$sortSQL = $sort . ' ' . $sortOrder;
}
$caseRelationships = CRM_Case_BAO_Case::getCaseRoles($contactID, $caseID);
......@@ -270,12 +270,12 @@ class CRM_Activity_Page_AJAX {
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',
$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 ui-icon-mail-closed"></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 ui-icon-mail-closed"></span></a>';
}
// edit links
$row['actions'] = '';
......@@ -285,17 +285,17 @@ class CRM_Activity_Page_AJAX {
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') . '">' .
'<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 ui-icon-pencil"></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') . '">' .
'<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') . '">' .
'<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 ui-icon-pencil"></span>' .
'</a>';
break;
......
......@@ -108,12 +108,12 @@ class CRM_Admin_Form_Extensions extends CRM_Admin_Form {
switch ($this->_action) {
case CRM_Core_Action::ADD:
$buttonName = ts('Install');
$title = ts('Install ' . $extName . '?');
$title = ts('Install ' . $extName . '?');
break;
case CRM_Core_Action::UPDATE:
$buttonName = ts('Download and Install');
$title = ts('Download and Install ' . $extName . '?');
$title = ts('Download and Install ' . $extName . '?');
break;
case CRM_Core_Action::DELETE:
......
......@@ -54,7 +54,7 @@ class CRM_Badge_Form_Layout extends CRM_Admin_Form {
$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');
......
......@@ -780,7 +780,7 @@ WHERE {$where}
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);
......
......@@ -492,7 +492,7 @@ class CRM_Batch_Form_Entry extends CRM_Core_Form {
// 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]);
......
......@@ -168,7 +168,7 @@ class CRM_Contribute_Form_ContributionView extends CRM_Core_Form {
}
// omitting contactImage from title for now since the summary overlay css doesn't work outside of our crm-container
CRM_Utils_System::setTitle(ts('View Contribution from') . ' ' . $displayName);
CRM_Utils_System::setTitle(ts('View Contribution from') . ' ' . $displayName);
// add viewed contribution to recent items list
$url = CRM_Utils_System::url('civicrm/contact/view/contribution',
......
......@@ -160,7 +160,7 @@ class CRM_Contribute_PseudoConstant extends CRM_Core_PseudoConstant {
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])) {
......
......@@ -1207,7 +1207,7 @@ reminder.action_schedule_id = %1";
$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}";
......@@ -1390,7 +1390,7 @@ WHERE m.owner_membership_id IS NOT NULL AND
}
if (!empty($excludeIds)) {
$clause = "AND {$field} NOT IN ( " . implode(', ', $excludeIds) . ' ) ';
$clause = "AND {$field} NOT IN ( " . implode(', ', $excludeIds) . ' ) ';
return $clause;
}
return NULL;
......
......@@ -630,7 +630,7 @@ ORDER BY parent_id, weight";
<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
}
......
......@@ -663,7 +663,7 @@ class CRM_Core_BAO_Setting extends CRM_Core_DAO_Setting {
$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);
......
......@@ -304,7 +304,7 @@ class CRM_Core_BAO_Tag extends CRM_Core_DAO_Tag {
$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];
}
......
......@@ -76,7 +76,7 @@ class CRM_Core_CodeGen_Main {
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();
......
......@@ -50,7 +50,7 @@ class CRM_Core_CodeGen_Util_Template {
}
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);
}
}
......
......@@ -739,7 +739,7 @@ class CRM_Core_Error extends PEAR_ErrorStack {
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':
......
......@@ -266,7 +266,7 @@ class CRM_Core_Form_Renderer extends HTML_QuickForm_Renderer_ArraySmarty {
$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') . '">';
}
/**
......
......@@ -1473,7 +1473,7 @@ WHERE id = %1";
* @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');
}
......
......@@ -1104,7 +1104,7 @@ class CRM_Event_Form_Participant extends CRM_Contribute_Form_AbstractEditPayment
// also add location name to the array
$params["address_name-{$this->_bltID}"] =
CRM_Utils_Array::value('billing_first_name', $params) . ' ' .
CRM_Utils_Array::value('billing_first_name', $params) . ' ' .
CRM_Utils_Array::value('billing_middle_name', $params) . ' ' .
CRM_Utils_Array::value('billing_last_name', $params);
......
......@@ -194,7 +194,7 @@ class CRM_Event_Form_ParticipantView extends CRM_Core_Form {
}
$this->assign('displayName', $displayName);
// omitting contactImage from title for now since the summary overlay css doesn't work outside of our crm-container
CRM_Utils_System::setTitle(ts('View Event Registration for') . ' ' . $displayName);
CRM_Utils_System::setTitle(ts('View Event Registration for') . ' ' . $displayName);
$roleId = CRM_Utils_Array::value('role_id', $values[$participantID]);
$title = $displayName . ' (' . CRM_Utils_Array::value($roleId, $participantRoles) . ' - ' . $eventTitle . ')';
......
......@@ -197,14 +197,14 @@ class CRM_Financial_BAO_ExportFormat {
$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),
......
......@@ -263,7 +263,7 @@ class CRM_Financial_BAO_ExportFormat_IIF extends CRM_Financial_BAO_ExportFormat
'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),
......
......@@ -271,7 +271,7 @@ WHERE cc.id IN (' . implode(',', $contactIds) . ') AND con.is_test = 0';
$errorStatus = '<ul><li>' . implode('</li><li>', $not_deleted) . '</li></ul>';
}
$error['_qf_default'] = $errorStatus . ts('This contact(s) can not be permanently deleted because the contact record is linked to one or more live financial transactions. Deleting this contact would result in the loss of financial data.');
$error['_qf_default'] = $errorStatus . ts('This contact(s) can not be permanently deleted because the contact record is linked to one or more live financial transactions. Deleting this contact would result in the loss of financial data.');
return $error;
}
}
......
......@@ -91,7 +91,7 @@ class CRM_Financial_Form_FinancialBatch extends CRM_Contribute_Form {
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);
......@@ -245,7 +245,7 @@ class CRM_Financial_Form_FinancialBatch extends CRM_Contribute_Form {
//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'),
......
......@@ -106,7 +106,7 @@ class CRM_Financial_Form_FinancialTypeAccount extends CRM_Contribute_Form {
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(
......
......@@ -390,7 +390,7 @@ class CRM_Financial_Page_AJAX {
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,
......@@ -408,7 +408,7 @@ class CRM_Financial_Page_AJAX {
}
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,
......
......@@ -134,7 +134,7 @@ class CRM_Financial_Page_FinancialTypeAccount extends CRM_Core_Page {
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);
......
......@@ -467,7 +467,7 @@ class CRM_Mailing_BAO_Query {
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];
......
......@@ -119,7 +119,7 @@ class CRM_Pledge_Form_PledgeView extends CRM_Core_Form {
$displayName .= ' (' . ts('default organization') . ')';
}
// omitting contactImage from title for now since the summary overlay css doesn't work outside of our crm-container
CRM_Utils_System::setTitle(ts('View Pledge by') . ' ' . $displayName);
CRM_Utils_System::setTitle(ts('View Pledge by') . ' ' . $displayName);
//do check for campaigns
if ($campaignId = CRM_Utils_Array::value('campaign_id', $values)) {
......
......@@ -384,7 +384,7 @@ class CRM_Price_BAO_PriceField extends CRM_Price_DAO_PriceField {
}
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 {
......@@ -794,7 +794,7 @@ WHERE id IN (" . implode(',', array_keys($priceFields)) . ')';
}
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;
......
......@@ -365,7 +365,7 @@ class CRM_Profile_Page_MultipleRecordFieldsListing extends CRM_Core_Page_Basic {
'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)) {
......
......@@ -205,7 +205,7 @@ class CRM_Report_Form_Contact_LoggingSummary extends CRM_Logging_ReportSummary {
$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;
}
......
......@@ -106,7 +106,7 @@ WHERE ceft.entity_table = 'civicrm_contribution' AND cft.payment_instrument_id I
}
}
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.');
}
}
......@@ -311,7 +311,7 @@ ALTER TABLE civicrm_dashboard
}
elseif ($urlElements[1] == 'report') {
$url = explode('&', $urlElements[3]);
$name = 'report/' . $url[0];
$name = 'report/' . $url[0];
}
$values .= "
WHEN {$dashboard->id} THEN '{$name}'
......@@ -788,7 +788,7 @@ CREATE TABLE IF NOT EXISTS `civicrm_word_replacement` (
// add civicrm_report_instance.name
$sql = "SELECT count(*) FROM information_schema.columns "
. "WHERE table_schema = database() AND table_name = 'civicrm_report_instance' AND COLUMN_NAME = 'name' ";
. "WHERE table_schema = database() AND table_name = 'civicrm_report_instance' AND COLUMN_NAME = 'name' ";
$res = CRM_Core_DAO::singleValueQuery($sql);
......
......@@ -1111,7 +1111,7 @@ cfi.financial_account_id = %4,
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'),
......
......@@ -130,7 +130,7 @@ INNER JOIN civicrm_price_field cpf ON cpf.id = cpfv.price_field_id and cpf.id !=
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>";
}
}
......
......@@ -54,9 +54,9 @@ class CRM_Utils_Cache_SerializeCache implements CRM_Utils_Cache_Interface {
*/
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";
}
/**
......
......@@ -177,7 +177,7 @@ class CRM_Utils_Mail_EmailProcessor {
$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);
......
......@@ -376,7 +376,7 @@ SELECT count(*)
FROM civicrm_contact
WHERE id IN (' . implode(', ', $contactIds) . ' )';
if (count($contactIds) != CRM_Core_DAO::singleValueQuery($sql)) {
throw new API_Exception('Invalid ' . ' Contact Id');
throw new API_Exception('Invalid ' . ' Contact Id');
}
}
......
......@@ -362,7 +362,7 @@ function _civicrm_api3_contact_check_params(&$params, $dupeCheck = TRUE, $dupeEr
$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));
}
}
......
......@@ -457,16 +457,16 @@ function _civicrm_api3_profile_getbillingpseudoprofile(&$params) {
}
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;
}
......
......@@ -780,7 +780,7 @@ function _civicrm_api3_get_options_from_params(&$params, $queryObject = FALSE, $
$legacyreturnProperties[substr($n, 7)] = $v;
}
elseif ($n == 'id') {
$inputParams[$entity . '_id'] = $v;
$inputParams[$entity . '_id'] = $v;
}
elseif (in_array($n, $otherVars)) {
}
......
......@@ -65,7 +65,7 @@ class CRM_Core_Payment_AuthorizeNetTest extends CiviUnitTestCase {
* Test works but not both due to some form of caching going on in the SmartySingleton
*/
public function testCreateSingleNowDated() {
$firstName = 'John_' . substr(sha1(rand()), 0, 7);
$firstName = 'John_' . substr(sha1(rand()), 0, 7);
$lastName = 'Smith_' . substr(sha1(rand()), 0, 7);
$nameParams = array('first_name' => $firstName, 'last_name' => $lastName);
$contactId = $this->individualCreate($nameParams);
......@@ -198,7 +198,7 @@ class CRM_Core_Payment_AuthorizeNetTest extends CiviUnitTestCase {
public function testCreateSinglePostDated() {
$start_date = date('Ymd', strtotime("+ 1 week"));
$firstName = 'John_' . substr(sha1(rand()), 0, 7);
$firstName = 'John_' . substr(sha1(rand()), 0, 7);
$lastName = 'Smith_' . substr(sha1(rand()), 0, 7);
$nameParams = array('first_name' => $firstName, 'last_name' => $lastName);
$contactId = $this->individualCreate($nameParams);
......
......@@ -22,21 +22,21 @@ class CRM_Extension_BrowserTest extends CiviUnitTestCase {
}
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();
......@@ -50,7 +50,7 @@ class CRM_Extension_BrowserTest extends CiviUnitTestCase {
}
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());
......@@ -60,7 +60,7 @@ class CRM_Extension_BrowserTest extends CiviUnitTestCase {
}
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());
......
......@@ -146,7 +146,7 @@ class CiviReportTestCase extends CiviUnitTestCase {
$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);
}
......
......@@ -2,8 +2,8 @@
// ADAPTED FROM tools/scripts/phpunit