Skip to content

Commit

Permalink
Remove unused $LANG global variable
Browse files Browse the repository at this point in the history
  • Loading branch information
cedric-anne authored and trasher committed Jun 27, 2024
1 parent 472bbb4 commit b2747dd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ The present file will list all changes made to the project; according to the
#### Removed
- `GLPI_USE_CSRF_CHECK`, `GLPI_USE_IDOR_CHECK`, `GLPI_CSRF_EXPIRES`, `GLPI_CSRF_MAX_TOKENS` and `GLPI_IDOR_EXPIRES` constants.
- `$CFG_GLPI_PLUGINS` global variable.
- `$LANG` global variable.
- `$PLUGINS_EXCLUDED` global variable.
- Usage of `csrf_compliant` plugins hook.
- Usage of `migratetypes` plugin hooks.
Expand Down
9 changes: 2 additions & 7 deletions inc/based_config.php
Original file line number Diff line number Diff line change
Expand Up @@ -318,14 +318,9 @@ function ($matches) {

define('GLPI_I18N_DIR', GLPI_ROOT . "/locales");

// For plugins
/**
* @var array $PLUGIN_HOOKS
* @var array $LANG
*/
global $PLUGIN_HOOKS,
$LANG
;

// For plugins
global $PLUGIN_HOOKS;
$PLUGIN_HOOKS = [];
$LANG = [];
1 change: 0 additions & 1 deletion src/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,6 @@ public static function loadLang($plugin_key, $forcelang = '', $coretrytoload = '
*/
global $CFG_GLPI, $TRANSLATE;

// For compatibility for plugins using $LANG
$trytoload = 'en_GB';
if (isset($_SESSION['glpilanguage'])) {
$trytoload = $_SESSION["glpilanguage"];
Expand Down

0 comments on commit b2747dd

Please sign in to comment.