/
Make current theme/language objects self-sustained [5.2.1]

Make current theme/language objects self-sustained [5.2.1]

There are 2 units in the In-Portal, that represent:

  • themes (unit name: theme)
  • languages (unit name: lang)

They are pretty important, because every website request need to know "what to show" (theme) and "on what language it should be" (lang).

Each of units have "current" Special (e.g. "theme.current"), that allows to get currently active theme/language. There are 2 ways how "current" theme/language detection can be done:

  1. when we know ID from URL and we just return it
  2. when we don't know ID from URL and we need to get ID of a primary theme/language without doing an extra SQL query

The 1st case is covered within corresponding unit, but the 2nd case is covered in VerifyThemeId and VerifyLanguageId methods within kApplication class. This is incorrect approach, because now kApplication class is using internal workings of theme/lang unit to do something and these units can't be safely refactored anymore.

I propose, that we move that 2nd part to the corresponding units.

Related Tasks

INP-1387 - Getting issue details... STATUS