From b58a019e87f0c91b39e5a102a7c5f8f9c4b6aa3e Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Fri, 4 Jun 2010 12:59:44 +0000 Subject: [PATCH] Better ms lang file check. Props ocean90. fixes #13706 git-svn-id: https://develop.svn.wordpress.org/trunk@15138 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/l10n.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wp-includes/l10n.php b/wp-includes/l10n.php index 1938471568..8baa2ab521 100644 --- a/wp-includes/l10n.php +++ b/wp-includes/l10n.php @@ -511,8 +511,9 @@ function get_available_languages( $dir = null ) { $languages = array(); foreach( (array)glob( ( is_null( $dir) ? WP_LANG_DIR : $dir ) . '/*.mo' ) as $lang_file ) { - if ( false === strpos( $lang_file, 'continents-cities' ) && false === strpos( $lang_file, 'ms-' ) ) - $languages[] = basename($lang_file, '.mo'); + $lang_file = basename($lang_file, '.mo'); + if ( 0 !== strpos( $lang_file, 'continents-cities' ) && 0 !== strpos( $lang_file, 'ms-' ) ) + $languages[] = $lang_file; } return $languages;