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] Only printOnly once #17850

Merged
merged 1 commit into from
Jul 15, 2020

Conversation

demeritcowboy
Copy link
Contributor

Overview

It assigns printOnly twice.

Before

printOnly is assigned to the template first before being set to its proper value and then assigns it again later after.

After

Only printOnly once

Technical Details

Look down at line 2867. Also note the intervening lines might change its value, so it doesn't make sense to assign it before that.

Comments

This is part of a larger PR, so if you're thinking that if else block could be cleaned up it's coming later.

@civibot civibot bot added the master label Jul 15, 2020
@civibot
Copy link

civibot bot commented Jul 15, 2020

(Standard links)

@eileenmcnaughton
Copy link
Contributor

Looking at the code it's clear this line exists only to confuse (e.g this PR title!). Given the code does nothing it can't be tested :-)

@eileenmcnaughton eileenmcnaughton merged commit 9320992 into civicrm:master Jul 15, 2020
@demeritcowboy
Copy link
Contributor Author

Thanks!
For what it's worth there are some pending tests that indirectly test part of it.

@demeritcowboy demeritcowboy deleted the you-only-print-once branch July 15, 2020 22:22
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