X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=languages%2FLanguage.php;h=067231557b749628218a2807a4455916f18a72f9;hb=03c0a12b8b63d7be6320e0b531babfd43757b313;hp=6a83044730a1353e16c069ec5cce1cca677af780;hpb=dcfec00f3b1224081e5192d5cf6d426a3c66029c;p=lhc%2Fweb%2Fwiklou.git diff --git a/languages/Language.php b/languages/Language.php index 6a83044730..067231557b 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -415,10 +415,10 @@ class Language { function __construct() { $this->mConverter = new FakeConverter( $this ); // Set the code to the name of the descendant - if ( get_class( $this ) == 'Language' ) { + if ( static::class === 'Language' ) { $this->mCode = 'en'; } else { - $this->mCode = str_replace( '_', '-', strtolower( substr( get_class( $this ), 8 ) ) ); + $this->mCode = str_replace( '_', '-', strtolower( substr( static::class, 8 ) ) ); } self::getLocalisationCache(); } @@ -2158,12 +2158,10 @@ class Language { * the date preference they're supposed to use, it should be used in * all children. * - * - * function timeanddate([...], $format = true) { - * $datePreference = $this->dateFormat($format); - * [...] - * } - * + * function timeanddate([...], $format = true) { + * $datePreference = $this->dateFormat($format); + * [...] + * } * * @param int|string|bool $usePrefs If true, the user's preference is used * if false, the site/language default is used