aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/install/install_update.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2007-07-10 17:36:59 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2007-07-10 17:36:59 +0000
commite5ae1698cac8f0eb222e23170cf3459bdff103c5 (patch)
tree3bcb69ffac15fc90433c75198c91bf1df58584fe /phpBB/install/install_update.php
parentd81f96877ffc873722e30298bbec96d5d26d9717 (diff)
downloadforums-e5ae1698cac8f0eb222e23170cf3459bdff103c5.tar
forums-e5ae1698cac8f0eb222e23170cf3459bdff103c5.tar.gz
forums-e5ae1698cac8f0eb222e23170cf3459bdff103c5.tar.bz2
forums-e5ae1698cac8f0eb222e23170cf3459bdff103c5.tar.xz
forums-e5ae1698cac8f0eb222e23170cf3459bdff103c5.zip
more failsafe "glob()" method.
git-svn-id: file:///svn/phpbb/trunk@7863 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/install/install_update.php')
-rw-r--r--phpBB/install/install_update.php21
1 files changed, 20 insertions, 1 deletions
diff --git a/phpBB/install/install_update.php b/phpBB/install/install_update.php
index 2140e557e4..9bf475abfa 100644
--- a/phpBB/install/install_update.php
+++ b/phpBB/install/install_update.php
@@ -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))
{