diff --git a/phpBB/admin/admin_styles.php b/phpBB/admin/admin_styles.php index 9d311a09ef..11e84c3a89 100644 --- a/phpBB/admin/admin_styles.php +++ b/phpBB/admin/admin_styles.php @@ -129,7 +129,7 @@ switch( $mode ) { while( $sub_dir = @readdir($dir) ) { - if( $sub_dir != "." && $sub_dir != ".." && $sub_dir != "CVS" ) + if( !is_file($phpbb_root_path . 'templates/' .$sub_dir) && !is_link($phpbb_root_path . 'templates/' .$sub_dir) && $sub_dir != "." && $sub_dir != ".." && $sub_dir != "CVS" ) { if( @file_exists($phpbb_root_dir . "templates/" . $sub_dir . "/theme_info.cfg") ) { @@ -544,7 +544,7 @@ switch( $mode ) $s_template_select = ''; while( $file = @readdir($dir) ) { - if( $file != "." && $file != ".." && $file != "CVS" ) + if( !is_file($phpbb_root_path . 'templates/' . $file) && !is_link($phpbb_root_path . 'templates/' .$file) && $file != "." && $file != ".." && $file != "CVS" ) { $s_template_select .= '\n"; }