Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

enh(smarty/tpl): simplify the initSmartyTplForPopup function & compatibility #8178

Merged
merged 1 commit into from
Dec 16, 2019

Conversation

jdelpierre
Copy link
Contributor

@jdelpierre jdelpierre commented Dec 5, 2019

Pull Request Template

Description

The initialization of Smarty templates for "popins" & "custom view widgets" was on a different function.
To keep the compatibility with all consumers of this function, it is not destroyed but it uses the "main" function with the same arguments.
Also, the path to the folders was not very aligned with the standards (DIR) so I changed that too so that it would be consistent and compatible everywhere.

Refs: STUDIO-2228

Type of change

  • Patch fixing an issue (non-breaking change)
  • New functionality (non-breaking change)
  • Breaking change (patch or feature) that might cause side effects breaking part of the Software
  • Updating documentation (missing information, typo...)

Target serie

  • 2.8.x
  • 18.10.x
  • 19.04.x
  • 19.10.x
  • 20.04.x (master)

How this pull request can be tested ?

Check if the display and operation of the widgets of the different modules is still ok

Checklist

Community contributors & Centreon team

  • I followed the coding style guidelines provided by Centreon
  • I have commented my code, especially new classes, functions or any legacy code modified. (docblock)
  • I have commented my code, especially hard-to-understand areas of the PR.
  • I have made corresponding changes to the documentation.
  • I have rebased my development branch on the base branch (master, maintenance).

Centreon team only

  • I have made sure that the unit tests related to the story are successful.
  • I have made sure that unit tests cover 80% of the code written for the story.
  • I have made sure that acceptance tests related to the story are successful (local and CI)

@jdelpierre jdelpierre force-pushed the STUDIO-2228-map-inacessible-not-license branch from 6b85ff7 to e7972a5 Compare December 12, 2019 13:00
…ibility

When you are in a "widget" type element (custom view), the initialization of the Smarty template is not the same so you need to check this when calling to avoid errors.

Refs: STUDIO-2228
@jdelpierre jdelpierre force-pushed the STUDIO-2228-map-inacessible-not-license branch from e7972a5 to 398a16b Compare December 16, 2019 14:58
@jdelpierre jdelpierre merged commit c51a278 into master Dec 16, 2019
@jdelpierre jdelpierre deleted the STUDIO-2228-map-inacessible-not-license branch December 16, 2019 18:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants