Ajout d'une étape de linting dans DroneCi (#3)
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Corrige un doublons laissé par le rebase semi-manuel Ajout d'une étape de linting dans DroneCi Fix linting Co-authored-by: Nigel Sheldon <nigelsheldon@live.fr> Reviewed-on: https://gitea.nemunai.re/halo-battle/game/pulls/3
This commit is contained in:
parent
5b17a7dbd7
commit
dd61d3b66b
263 changed files with 45327 additions and 42695 deletions
|
|
@ -1,26 +1,27 @@
|
|||
<?php
|
||||
|
||||
if(!defined('ONYX')) exit;
|
||||
if (!defined('ONYX')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
if(!is_readable(ONYX.'lang/'.$OPT['type'].'.xml')) trigger_error('Fichier de langue introuvable',E_USER_ERROR);
|
||||
if (!is_readable(ONYX.'lang/'.$OPT['type'].'.xml')) {
|
||||
trigger_error('Fichier de langue introuvable', E_USER_ERROR);
|
||||
}
|
||||
|
||||
define('LANG', $OPT['type']);
|
||||
|
||||
$langdoc = Cache::read('traduction'.LANG);
|
||||
if ($langdoc['check'] != md5_file(ONYX.'lang/'.LANG.'.xml'))
|
||||
{
|
||||
$langdoc = new DOMDocument();
|
||||
if ($langdoc['check'] != md5_file(ONYX.'lang/'.LANG.'.xml')) {
|
||||
$langdoc = new DOMDocument();
|
||||
|
||||
$langdoc->load(ONYX.'lang/'.LANG.'.xml') or trigger_error('Erreur du fichier de langue',E_USER_ERROR);
|
||||
$langdoc->normalizeDocument();
|
||||
$langdoc->load(ONYX.'lang/'.LANG.'.xml') or trigger_error('Erreur du fichier de langue', E_USER_ERROR);
|
||||
$langdoc->normalizeDocument();
|
||||
|
||||
$LANG = parse_config($langdoc->documentElement);
|
||||
$LANG = parse_config($langdoc->documentElement);
|
||||
|
||||
Cache::set('traduction'.LANG, array(LANG => $LANG, 'check' => md5_file(ONYX.'lang/'.LANG.'.xml')));
|
||||
}
|
||||
else
|
||||
Cache::set('traduction'.LANG, array(LANG => $LANG, 'check' => md5_file(ONYX.'lang/'.LANG.'.xml')));
|
||||
} else {
|
||||
$LANG = $langdoc[LANG];
|
||||
}
|
||||
|
||||
unset($langdoc);
|
||||
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue