protected $_settings = array(
'debug_enabled' => CRM_Core_BAO_Setting::DEVELOPER_PREFERENCES_NAME,
'backtrace' => CRM_Core_BAO_Setting::DEVELOPER_PREFERENCES_NAME,
- 'fatalErrorTemplate' => CRM_Core_BAO_Setting::DEVELOPER_PREFERENCES_NAME,
'fatalErrorHandler' => CRM_Core_BAO_Setting::DEVELOPER_PREFERENCES_NAME,
);
*/
public $enableSSL = FALSE;
- /**
- * Error template to use for fatal errors
- *
- * @var string
- */
- public $fatalErrorTemplate = 'CRM/common/fatal.tpl';
-
/**
* Fatal error handler
*
}
$template = CRM_Core_Smarty::singleton();
-
$template->assign($vars);
-
- $config->userSystem->outputError($template->fetch($config->fatalErrorTemplate));
+ $config->userSystem->outputError($template->fetch('CRM/common/fatal.tpl'));
self::abend(CRM_Core_Error::FATAL_ERROR);
}
// print to screen
$template = CRM_Core_Smarty::singleton();
$template->assign($vars);
- $content = $template->fetch($config->fatalErrorTemplate);
+ $content = $template->fetch('CRM/common/fatal.tpl');
if ($config->backtrace) {
$content = self::formatHtmlException($exception) . $content;
}
*/
class CRM_Upgrade_Incremental_php_FourSeven extends CRM_Upgrade_Incremental_Base {
+ /**
+ * Compute any messages which should be displayed beforeupgrade.
+ *
+ * Note: This function is called iteratively for each upcoming
+ * revision to the database.
+ *
+ * @param $preUpgradeMessage
+ * @param string $rev
+ * a version number, e.g. '4.4.alpha1', '4.4.beta3', '4.4.0'.
+ * @param null $currentVer
+ *
+ * @return void
+ */
+ public function setPreUpgradeMessage(&$preUpgradeMessage, $rev, $currentVer = NULL) {
+ if ($rev == '4.7.alpha1') {
+
+ // CRM-16478 Remove custom fatal error template path option
+ $config = CRM_Core_Config::singleton();
+ if ($config->fatalErrorTemplate != 'CRM/common/fatal.tpl') {
+ $preUpgradeMessage .= '<p>' . ts('The custom fatal error template setting will be removed during the upgrade. You are currently using this custom template: %1 . Following the upgrade you will need to use the standard approach to overriding template files, as described in the documentation.', array(1 => $config->fatalErrorTemplate)) . '</p>';
+ }
+ else {
+ $preUpgradeMessage .= '<p>' . ts('The custom fatal error template setting will be removed during the upgrade, but you are not currently using this option.') . '</p>';
+ }
+
+ }
+ }
+
/**
* Compute any messages which should be displayed after upgrade.
*
$postUpgradeMessage .= '<p>' . ts('CiviCRM now includes the easy-to-use CKEditor Configurator. To customize the features and display of your wysiwyg editor, visit the <a %1>Display Preferences</a> page. <a %2>Learn more...</a>', array(1 => $dsp_href, 2 => $blog_href)) . '</p>';
$postUpgradeMessage .= '<br /><br />' . ts('Default version of the following System Workflow Message Templates have been modified: <ul><li>Personal Campaign Pages - Owner Notification</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).');
+
+ $postUpgradeMessage .= '<p>' . ts('The custom fatal error template setting has been removed.') . '</p>';
}
}
{include file='../CRM/Upgrade/4.7.alpha1.msg_template/civicrm_msg_template.tpl'}
+-- CRM-16478 Remove custom fatal error template path
+DELETE FROM civicrm_setting WHERE name = 'fatalErrorTemplate';
+
UPDATE civicrm_state_province SET name = 'Bataan' WHERE name = 'Batasn';
--CRM-16914
UPDATE civicrm_country SET `name` = UPPER( `name` );
-- CRM-16447
-UPDATE civicrm_state_province SET name = 'Northern Ostrobothnia' WHERE name = 'Nothern Ostrobothnia';
\ No newline at end of file
+UPDATE civicrm_state_province SET name = 'Northern Ostrobothnia' WHERE name = 'Nothern Ostrobothnia';
'description' => 'Set this value to Yes if you want to display a backtrace listing when a fatal error is encountered. This feature should NOT be enabled for production sites',
'prefetch' => 1,
),
- 'fatalErrorTemplate' => array(
- 'group_name' => 'Developer Preferences',
- 'group' => 'developer',
- 'name' => 'fatalErrorTemplate',
- 'type' => 'String',
- 'quick_form_type' => 'Element',
- 'html_type' => 'text',
- 'default' => 'CRM/common/fatal.tpl',
- 'add' => '4.3',
- 'title' => 'Fatal Error Template',
- 'is_domain' => 1,
- 'is_contact' => 0,
- 'description' => 'Enter the path and filename for a custom Smarty template if you want to define your own screen for displaying fatal errors.',
- 'prefetch' => 1,
- ),
'fatalErrorHandler' => array(
'group_name' => 'Developer Preferences',
'group' => 'developer',
'description' => "Set this value to Yes if you want to display a backtrace listing when a fatal error is encountered. This feature should NOT be enabled for production sites",
'prefetch' => 1,
),
- 'fatalErrorTemplate' => array(
- 'group_name' => 'Developer Preferences',
- 'group' => 'developer',
- 'name' => 'fatalErrorTemplate',
- 'type' => 'String',
- 'quick_form_type' => 'Element',
- 'html_type' => 'text',
- 'default' => 'CRM/common/fatal.tpl',
- 'add' => '4.3',
- 'title' => 'Fatal Error Template',
- 'is_domain' => 1,
- 'is_contact' => 0,
- 'description' => "Enter the path and filename for a custom Smarty template if you want to define your own screen for displaying fatal errors.",
- 'prefetch' => 1,
- ),
'fatalErrorHandler' => array(
'group_name' => 'Developer Preferences',
'group' => 'developer',
<td>{$form.backtrace.html}<br />
<span class="description">{ts}<strong>This feature should NOT be enabled for production sites.</strong><br />Set this value to <strong>Yes</strong> if you want to display a backtrace listing when a fatal error is encountered.{/ts}</span></td>
</tr>
- <tr class="crm-debugging-form-block-fatalErrorTemplate">
- <td class="label">{$form.fatalErrorTemplate.label}</td>
- <td>{$form.fatalErrorTemplate.html}<br />
- <span class="description">{ts}Enter the path and filename for a custom Smarty template if you want to define your own screen for displaying fatal errors.{/ts}</span></td>
- </tr>
<tr class="crm-debugging-form-block-fatalErrorHandler">
<td class="label">{$form.fatalErrorHandler.label}</td>
<td>{$form.fatalErrorHandler.html}<br />