1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 05:50:42 +02:00

- fixing some bugs

- removing utf8 characters from email files (has been discussed internally, you guys know why)
- making sure some opendir calls are checked before calling readdir.


git-svn-id: file:///svn/phpbb/trunk@6912 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2007-01-20 17:58:27 +00:00
parent fae887b3a1
commit 31e546c5e4
47 changed files with 253 additions and 147 deletions

View File

@@ -940,31 +940,35 @@ class acp_language
$db->sql_freeresult($result);
$new_ary = $iso = array();
$dp = opendir("{$phpbb_root_path}language");
$dp = @opendir("{$phpbb_root_path}language");
while (($file = readdir($dp)) !== false)
if ($dp)
{
if ($file[0] != '.' && file_exists("{$phpbb_root_path}language/$file/iso.txt"))
while (($file = readdir($dp)) !== false)
{
if (!in_array($file, $installed))
if ($file[0] != '.' && file_exists("{$phpbb_root_path}language/$file/iso.txt"))
{
if ($iso = file("{$phpbb_root_path}language/$file/iso.txt"))
if (!in_array($file, $installed))
{
if (sizeof($iso) == 3)
if ($iso = file("{$phpbb_root_path}language/$file/iso.txt"))
{
$new_ary[$file] = array(
'iso' => $file,
'name' => trim($iso[0]),
'local_name'=> trim($iso[1]),
'author' => trim($iso[2])
);
if (sizeof($iso) == 3)
{
$new_ary[$file] = array(
'iso' => $file,
'name' => trim($iso[0]),
'local_name'=> trim($iso[1]),
'author' => trim($iso[2])
);
}
}
}
}
}
closedir($dp);
}
unset($installed);
@closedir($dp);
if (sizeof($new_ary))
{