Repository navigation
Conversation
Member
|
I removed the ‘Authorities’ label because this is not a PR that should change authority assignments in the maintenance.md. |
… introduce Activities
c-knof
force-pushed
the
language-component-revision
branch
from
October 12, 2026 15:53
9b99a5f to
1d1950c
Compare
The seven Activities now get `ILIAS\AccessControl\PublicInterface\RBAC` via `$use` instead of reaching into `$GLOBALS['DIC']->rbac()`, and call `system()` only in `isAllowedToPerform()`. The Setup agent uses `InstallLanguage::forSetup()`/`UpdateLanguage::forSetup()`, since Setup checks no permissions and needs no RBAC.
`InstalledLanguageDatabaseRepository`, `LanguageInstallationManager`, `AddLanguageEntry` and the `ilSetupLanguage` of the web Activities now get `ILIAS\Database\Connection` via `$pull` instead of resolving `$GLOBALS['ilDB']`. `ilSetupLanguage` takes an optional connection; Setup keeps handing in its database via `setDbHandler()`, also for the metrics, and the file-only checks need no database.
The Setup CLI asks `ilLanguagesInstalledAndUpdatedObjective` for its label before `achieve()`, so `getLabel()` only worked through a leftover `$GLOBALS['ilDB']`. `isApplicable()`, which the CLI calls first, now reads the languages from the Setup database and `getLabel()` lists them without database access.
The repository and the installation manager in the component graph now get the root from `ILIAS\Environment\Configuration\Installation\Directories` at resolve time instead of a path computed in `init()`. Callers outside the graph keep passing the path themselves.
… container `AllModernComponents` bound `$DIC[ILIAS\Language\Language::class]` to the `$use`d language, whose legacy adapter itself delegates to `$DIC->language()`. Nothing reads the key, so the constructor parameter and the binding are removed.
No component pulls `InstalledLanguageRepository` or `LanguageInstallationManager`, so they stay internal services of the component; `ilSetupLanguage` remains the entry point for callers outside it.
The Activities took the ref_id of the language folder as `int|\Closure` defaulting to 0. They now require `ILIAS\Language\LanguageFolder`, whose `LanguageFolderLegacyProxy` looks the ref_id up only when a permission is checked.
Keep only what the code does not say itself (the why, a constraint or a pitfall), mostly in one line, and drop the history of how it got there.
mjansenDatabay
approved these changes
Oct 13, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Migrates the Language component to the Component Revision architecture (
$define/$implement/$use/$contribute/$seek/$provide/$pull/$internal) and introducesActivityimplementations for its domain operations, replacing logic previously embedded directly in the GUI classes.Activities(components/ILIAS/Language/src/Activities):InstallLanguage,UninstallLanguage,UpdateLanguage,AddLanguageEntry,RemoveLocalLanguageChanges,SetLanguageDetectionEnabled,SetLanguageTranslationEnabled, plus supporting traits/classes (GrindsFormInput,GrindingInputAccess,ParsesLanguageKeyList,ResolvesLanguageKeysToObjIds,RendersActivityErrors, exception types)class.ilObjLanguageFolderGUI.php/class.ilObjLanguageExtGUI.phpinto these ActivitiesInstalledLanguageRepository/InstalledLanguageDatabaseRepositoryandLanguageInstallationManager/LanguageFileParsingundersrc/Setupto back the new Activities and setup objectivesComponentTranslationsupport (ComponentLanguageFileDirectory,CustomizingLanguageFileDirectory,MainLanguageFileDirectory,LanguageFileDirectoryManager) so individual components can ship their own language files instead of everything living in the centrallang/files; implemented exemplarily for the File component (components/ILIAS/File/File.php,components/ILIAS/File/lang/ilias_{de,en}.lang) as a reference for how other components can adopt this going forwardSELECT * FROM lng_modulesqueries with queries selecting only the needed columns (e.g.SELECT lang_array FROM lng_modules) as part of thelng_modulesaccess rewrite inclass.ilSetupLanguage.php/class.ilObjLanguage.phpLanguage.php,Init.php, andAllModernComponents.phpREADME.mdanddocs/development/language.mdwith the Activities overview and documented, known deviations from theActivitycontractOther changes
ilCertificateDateHelperTest.php: loosen thelng_modulesquery mock match (SELECT * FROM lng_modules→FROM lng_modules), since the column list actually queried againstlng_moduleschanged as part of this migration (see above) and the previous exact-string match no longer applied.