//CRM-11636
//here we do the financial type check and migration
$isDefaultsModified = self::_checkAndMigrateDefaultFinancialTypes();
- if($isDefaultsModified) {
+ if ($isDefaultsModified) {
$postUpgradeMessage .= '<br />' . ts('Please review all price set financial type assignments.');
}
list($context, $orgName) = self::createDomainContacts();
}
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') {
if ($isOrphanData) {
$postUpgradeMessage .= "</br> <strong>" . ts('Your database contains extraneous financial records related to deleted contacts and contributions. These records should not affect the site and will not appear in reports, search results or exports. However you may wish to clean them up. Refer to <a href="%1" target="_blank">this wiki page for details</a>.
- ', array( 1 => 'http://wiki.civicrm.org/confluence/display/CRMDOC/Clean+up+extraneous+financial+data+-+4.3+upgrades')) . "</strong>";
+ ', array(1 => 'http://wiki.civicrm.org/confluence/display/CRMDOC/Clean+up+extraneous+financial+data+-+4.3+upgrades')) . "</strong>";
}
}
if ($rev == '4.3.4') {
$postUpgradeMessage .= '<br />' . ts('System Administrator Alert: If you are running scheduled jobs using CLI.php, you will need to reconfigure cron tasks to include a password. Scheduled jobs will no longer run if the password is not provided (<a href="%1" target="_blank">learn more</a>).',
- array( 1 => 'http://wiki.civicrm.org/confluence/display/CRMDOC/Managing+Scheduled+Jobs'));
+ array(1 => 'http://wiki.civicrm.org/confluence/display/CRMDOC/Managing+Scheduled+Jobs'));
}
if ($rev == '4.3.5') {
$postUpgradeMessage .= '<br />' . ts('Default versions of the following System Workflow Message Templates have been modified to handle new functionality: <ul><li>Events - Registration Confirmation and Receipt (on-line)</li><li>Events - Registration Confirmation and Receipt (off-line)</li></ul> If you have modified these templates, please review the new default versions and implement updates as needed to your copies (Administer > Communications > Message Templates > System Workflow Messages).');
WHERE ccp.financial_type_id IS NULL and cp.cost > 0');
if ($flag) {
$postUpgradeMessage .= '<br />' . ts('Your database contains one or more premiums which have a cost but are not linked to a financial type. If you are exporting transations to an accounting package, this will result in unbalanced transactions. <a href="%1" target="_blank">You can review steps to correct this situation on the wiki.</a>',
- array( 1 => 'http://wiki.civicrm.org/confluence/display/CRMDOC/Fixing+Issues+Caused+by+Missing+Cost+of+Goods+Account+-+4.3+Upgrades'));
+ array(1 => 'http://wiki.civicrm.org/confluence/display/CRMDOC/Fixing+Issues+Caused+by+Missing+Cost+of+Goods+Account+-+4.3+Upgrades'));
}
}
}
// CRM-10893
// fix WP access control
- $config = CRM_Core_Config::singleton( );
+ $config = CRM_Core_Config::singleton();
if ($config->userFramework == 'WordPress') {
- civicrm_wp_set_capabilities( );
+ civicrm_wp_set_capabilities();
}
// Update phones CRM-11292.
WHERE name IN ('Donation', 'Event Fee', 'Member Dues');
";
$daoFinancialIds = CRM_Core_DAO::executeQuery($sqlFinancialIds);
- while($daoFinancialIds->fetch()) {
+ while ($daoFinancialIds->fetch()) {
$financialIds[$daoFinancialIds->name] = $daoFinancialIds->id;
}
$sqlPriceSetUpdate = "
if ($daoFetchTypes->N < 3) {
$modifiedDefaults = TRUE;
- $insertStatments = array (
+ $insertStatments = array(
'Donation' => "('Donation', 0, 1, 1)",
'Member' => "('Member Dues', 0, 1, 1)",
'Event Fee' => "('Event Fee', 0, 1, 0)",
$validCurrencyCodes = implode("','", $validCurrencyCodes);
$config = CRM_Core_Config::singleton();
$defaultCurrency = $config->defaultCurrency;
- $now = date( 'YmdHis' );
+ $now = date('YmdHis');
//adding financial_trxn records and entity_financial_trxn records related to contribution
//Add temp column for easy entry in entity_financial_trxn
LEFT JOIN civicrm_email ce ON ce.id = clb.email_id ;
' ;
$dao = CRM_Core_DAO::executeQuery($query);
- while($dao->fetch()) {
+ while ($dao->fetch()) {
$query = "
SELECT cc.id FROM civicrm_contact cc
LEFT JOIN civicrm_email ce ON ce.contact_id = cc.id
";
$params = array(1 => array($dbUf['database'], 'String'));
$dao = CRM_Core_DAO::executeQuery($query, $params, TRUE, NULL, FALSE, FALSE);
- foreach($tables as $columnName => $value){
+ foreach ($tables as $columnName => $value) {
if ($value['tableName'] == 'civicrm_membership_type' || $value['tableName'] == 'civicrm_contribution_recur') {
$foreignKeyExists = CRM_Core_DAO::checkConstraintExists($value['tableName'], $value['fkey']);
$fKey = $value['fkey'];
- } else {
+ }
+ else {
$foreignKeyExists = CRM_Core_DAO::checkFKConstraintInFormat($value['tableName'], $columnName);
$fKey = "`FK_{$value['tableName']}_{$columnName}`";
}
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'),
$formValues[$value]['financial_type_id'] = $formValues[$value]['contribution_type_id'];
unset($formValues[$value]['contribution_type_id']);
}
- else if (array_key_exists('contribution_type', $formValues[$value])) {
+ elseif (array_key_exists('contribution_type', $formValues[$value])) {
$formValues[$value]['financial_type'] = $formValues[$value]['contribution_type'];
unset($formValues[$value]['contribution_type']);
}