mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 05:50:42 +02:00
more failsafe "glob()" method.
git-svn-id: file:///svn/phpbb/trunk@7863 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -433,8 +433,27 @@ class install_update extends module
|
||||
else if (!$recache)
|
||||
{
|
||||
$last_change = $theme['theme_mtime'];
|
||||
$file_list = @glob("{$phpbb_root_path}styles/{$theme['theme_path']}/theme/*.css", GLOB_NOSORT);
|
||||
|
||||
foreach (glob("{$phpbb_root_path}styles/{$theme['theme_path']}/theme/*.css", GLOB_NOSORT) as $file)
|
||||
if ($file_list === false || $file_list === NULL)
|
||||
{
|
||||
$file_list = array();
|
||||
$dir = @opendir("{$phpbb_root_path}styles/{$theme['theme_path']}/theme");
|
||||
|
||||
if ($dir)
|
||||
{
|
||||
while (($entry = readdir($dir)) !== false)
|
||||
{
|
||||
if (substr(strrchr($entry, '.'), 1) == 'css')
|
||||
{
|
||||
$file_list[] = $entry;
|
||||
}
|
||||
}
|
||||
closedir($dir);
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($file_list as $file)
|
||||
{
|
||||
if ($last_change < @filemtime($file))
|
||||
{
|
||||
|
Reference in New Issue
Block a user