dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make Language::hasVariant() more strict
[lhc/web/wiklou.git]
/
languages
/
LanguageConverter.php
diff --git
a/languages/LanguageConverter.php
b/languages/LanguageConverter.php
index
ea26c64
..
21902af
100644
(file)
--- a/
languages/LanguageConverter.php
+++ b/
languages/LanguageConverter.php
@@
-212,9
+212,13
@@
class LanguageConverter {
}
/**
}
/**
- * Validate the variant
+ * Validate the variant and return an appropriate strict internal
+ * variant code if one exists. Compare to Language::hasVariant()
+ * which does a strict test.
+ *
* @param string|null $variant The variant to validate
* @param string|null $variant The variant to validate
- * @return mixed Returns the variant if it is valid, null otherwise
+ * @return mixed Returns an equivalent valid variant code if possible,
+ * null otherwise
*/
public function validateVariant( $variant = null ) {
if ( $variant === null ) {
*/
public function validateVariant( $variant = null ) {
if ( $variant === null ) {