Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REF] Add in Post Upgrade message about %A format change #24070

Closed

Conversation

seamuslee001
Copy link
Contributor

Overview

This is a follow up to #24032 as per suggestion from Dave D

Before

No Post upgrade message

After

There is a post upgrade message about change in %A output

ping @demeritcowboy

@civibot
Copy link

civibot bot commented Jul 28, 2022

(Standard links)

@civibot civibot bot added the master label Jul 28, 2022
@@ -21,6 +21,16 @@
*/
class CRM_Upgrade_Incremental_php_FiveFiftyThree extends CRM_Upgrade_Incremental_Base {

public function setPostUpgradeMessage(&$postUpgradeMessage, $rev) {
if ($rev === '5.53.alpha1') {
$postUpgradeMessage .= '<br/>' . ts("WARNING: CiviCRM has changed our the date format variable %1 is outputted when using CRM_Core_Date::customFormat / crmDate. Please review your <a href='%2' target='_blank'>Date Format</a> settings and your <a href='%3' target='_blank'>system message templates</a> for usage of the %1 variable", [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CiviCRM has changed our the date format variable

our => how ?

Also CRM_Utils_Date not Core_Date. But I think I'll put up an alternate PR because while a message is still good, it seems safe to just go ahead and have the upgrade replace %A with %P in any of the settings on the admin page, and for message templates it could tell you which ones have the string %A in them.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tricky part is that if it is date_format|%A is fine but not crmDate|%A

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the settings on the admin page they don't have smarty code in them and are purely format strings, so I think it's safe to just replace there. In message templates yes there might be all kinds of whack.

@seamuslee001
Copy link
Contributor Author

closing in favour of #24077

@seamuslee001 seamuslee001 deleted the remove_dependency_strftime branch July 28, 2022 23:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants