diff options
-rw-r--r-- | phpBB/includes/acp/acp_styles.php | 6 | ||||
-rw-r--r-- | phpBB/includes/functions.php | 5 |
2 files changed, 6 insertions, 5 deletions
diff --git a/phpBB/includes/acp/acp_styles.php b/phpBB/includes/acp/acp_styles.php index 1bf5a3c6a8..b5507005b0 100644 --- a/phpBB/includes/acp/acp_styles.php +++ b/phpBB/includes/acp/acp_styles.php @@ -1123,7 +1123,13 @@ class acp_styles */ protected function read_style_cfg($dir) { + if (!file_exists($this->styles_path . $dir . '/style.cfg')) + { + trigger_error('NO_STYLE_DATA', E_USER_ERROR); + } + static $required = array('name', 'phpbb_version', 'copyright'); + $cfg = parse_cfg_file($this->styles_path . $dir . '/style.cfg'); // Check if it is a valid file diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 1af919b8a6..c9f589c174 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -2734,11 +2734,6 @@ function build_hidden_fields($field_ary, $specialchar = false, $stripslashes = f */ function parse_cfg_file($filename, $lines = false) { - if (!file_exists($filename)) - { - trigger_error('NO_STYLE_DATA', E_USER_ERROR); - } - $parsed_items = array(); if ($lines === false) |