-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TRUNK-6192 init method should be called once
- Loading branch information
Showing
1 changed file
with
2 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -64,8 +64,9 @@ private void init() { | |
|
||
if (nameTemplate != null) { | ||
updateLayoutTemplates(nameTemplate); | ||
initialized = true; | ||
} | ||
|
||
initialized = true; | ||
} | ||
|
||
/** | ||
|
@@ -121,9 +122,6 @@ public boolean supportsPropertyName(String propertyName) { | |
*/ | ||
@Override | ||
public void globalPropertyChanged(GlobalProperty newValue) { | ||
if (!OpenmrsConstants.GLOBAL_PROPERTY_LAYOUT_NAME_TEMPLATE.equals(newValue.getPropertyValue())) { | ||
return; | ||
} | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
Ruhanga
Member
|
||
NameTemplate nameTemplate = deserializeXmlTemplate(newValue.getPropertyValue()); | ||
if (nameTemplate != null) { | ||
updateLayoutTemplates(nameTemplate); | ||
|
Hi @dkayiwa, thanks for the fix. But this can soon be catastrophic as, for which ever global property get's changed, that value gets updated as the value for
OpenmrsConstants.GLOBAL_PROPERTY_LAYOUT_NAME_TEMPLATE
.There was this fix here part of the PR I'd made earlier, maybe can be a follow-on commit separately for the above commit,
https://github.com/openmrs/openmrs-core/pull/4586/files#diff-e90a7ebea383f369ad59af638163aea623fe04d6338aef4211ba3bc2c5bc2004R120-R121