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 Migrate the print_array smarty plugin from in packages into core… #19206

Merged
merged 1 commit into from
Dec 14, 2020

Conversation

seamuslee001
Copy link
Contributor

… as it seems to not be supplied by the upstream package

Overview

This migrates the print_array modifier that is used by DAO processing and I think the Examples processing into civicrm_core from civicrm_packages as it seems it isn't provided by the upstream plugin as per https://github.com/smarty-php/smarty/tree/Smarty2/libs/plugins

Before

Modifier in packages

After

Modifier in core

ping @eileenmcnaughton

@civibot
Copy link

civibot bot commented Dec 14, 2020

(Standard links)

* Type: modifier<br>
* Name: print_array<br>
* Purpose: formats variable contents for display in the console
* @link http://smarty.php.net/manual/en/language.modifier.debug.print.var.php
Copy link
Contributor

Choose a reason for hiding this comment

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

From this (now invalid) link it looks like maybe it used to ship with core

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it was actually a copy of the debug print var modifier

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

@seamuslee001 OK - I see it used here

$expectedResult = {$result|@print_array};

I'm OK with merging this but I want a bit more work on the comments so when people say 'can this be removed now' the comment block will make it clear they just need to grep '|@print_array}'

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@eileenmcnaughton thanks for that feedback, I have updated the comments now and also swapped out to use the CiviCRM copywrite as I cannot see it was ever part of the actual Smarty Package

…as it seems to not be supplied by the upstream package
@eileenmcnaughton
Copy link
Contributor

It's a bit more succinct than I would have been - but it does the trick

@seamuslee001 seamuslee001 merged commit 9ff75ce into civicrm:master Dec 14, 2020
@seamuslee001 seamuslee001 deleted the migrate_print_array branch December 14, 2020 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants