mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-16 13:44:12 +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:
@@ -485,15 +485,21 @@ class acp_search
|
||||
|
||||
$search_types = array();
|
||||
|
||||
$dp = opendir($phpbb_root_path . 'includes/search');
|
||||
while (($file = readdir($dp)) !== false)
|
||||
$dp = @opendir($phpbb_root_path . 'includes/search');
|
||||
|
||||
if ($dp)
|
||||
{
|
||||
if ((preg_match('#\.' . $phpEx . '$#', $file)) && ($file != "search.$phpEx"))
|
||||
while (($file = readdir($dp)) !== false)
|
||||
{
|
||||
$search_types[] = preg_replace('#^(.*?)\.' . $phpEx . '$#', '\1', $file);
|
||||
if ((preg_match('#\.' . $phpEx . '$#', $file)) && ($file != "search.$phpEx"))
|
||||
{
|
||||
$search_types[] = preg_replace('#^(.*?)\.' . $phpEx . '$#', '\1', $file);
|
||||
}
|
||||
}
|
||||
closedir($dp);
|
||||
|
||||
sort($search_types);
|
||||
}
|
||||
sort($search_types);
|
||||
|
||||
return $search_types;
|
||||
}
|
||||
|
Reference in New Issue
Block a user