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

Remove ad-hoc client-side variable in favor of the one already available #795

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

colemanw
Copy link

@colemanw colemanw commented May 25, 2021

Overview

CiviCRM core already sets CRM.config.cid so there is no need to reinvent it.

Before

This extension sets a custom client-side variable with current user cid.

After

Just use the one that's already there.

Comments

It's been available in Core since 2019:

https://github.com/civicrm/civicrm-core/blob/2daeb956defabc57f2ea517dec4a793a4ec283b8/templates/CRM/common/l10n.js.tpl#L21

@colemanw
Copy link
Author

@tunbola I'd like to do a larger cleanup for Angular best practices - to avoid merge conflicts can you go ahead & merge this one first, it should be a no-brainer.

@deb1990
Copy link

deb1990 commented May 26, 2021

Thanks @colemanw. One of the places was missed, thats why the unit tests are failing.


Please fix this aswell.

CiviCRM core already sets `CRM.config.cid` so there is no need to reinvent it.
@colemanw
Copy link
Author

@deb1990 it's passing now.

@deb1990
Copy link

deb1990 commented May 28, 2021

This has been sent for QA, just to be sure that it is not producing any regressions. Will update soon.

@deb1990 deb1990 added the from community from community label May 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
from community from community improvements improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants