minor bug in tikilib
i fixed, on my local site, a minor bug in the tikilib.php
probably somone else already fixed it but here goes:
some where around row 6272 if found this (in the checkbrowser language part:
if (!strpos($lang,'.') and file_exists("lang/$lang/language.php")) {
this gives an error when $lang is not a dir. so a changed it to:
if (!strpos($lang,'.') and is_dir("lang/$lang") and indexfile_exists("lang/$lang/language.php")) {
(in the lang dir there are some files like _httaccess and index.php)
here is some more context.
// Get available languages
$available = array();
$available_aprox = array();
if (is_dir("lang")) {
$dh = opendir("lang");
while ($lang = readdir($dh)) {
if (!strpos($lang,'.') and is_dir("lang/$lang") and file_exists("lang/$lang/language.php")) {
$available[] = $lang;
$available_aprox[substr($lang, 0, 2)] = $lang;
}
}
}