Changeset:
        952ae7cf5bfe
        
https://sourceforge.net/p/mrbs/hg-code/ci/952ae7cf5bfe0936818d42897a47ddb660e261d5
Author:
        Campbell Morrison <[email protected]>
Date:
        Tue Oct 06 15:15:19 2015 +0100
Log message:

Fixed potential bug when the datables/language directory has extra files in it

diffstat:

 web/language.inc |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (20 lines):

diff -r 09f811e5dd91 -r 952ae7cf5bfe web/language.inc
--- a/web/language.inc  Tue Oct 06 14:34:07 2015 +0100
+++ b/web/language.inc  Tue Oct 06 15:15:19 2015 +0100
@@ -961,6 +961,7 @@
     $default_langtags = array(); 
   } 
   $available_langtags = $default_langtags;
+  
   foreach ($files as $file)
   {
     // . and .. will be included in the output of scandir(), so 
@@ -970,7 +971,7 @@
       // Then strip out the language tag from the file name
       $langtag = substr($file, $prefix_length);
       $langtag = substr($langtag, 0, -$suffix_length);
-      $available_langtags[] = (isset($lang_map)) ? $lang_map[$langtag] : 
$langtag;
+      $available_langtags[] = (isset($lang_map) && isset($lang_map[$langtag])) 
? $lang_map[$langtag] : $langtag;
     }
   }
   

------------------------------------------------------------------------------
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to