diff --git a/phpBB/includes/acp/acp_styles.php b/phpBB/includes/acp/acp_styles.php index d33be274b45..fde1cf48c55 100644 --- a/phpBB/includes/acp/acp_styles.php +++ b/phpBB/includes/acp/acp_styles.php @@ -28,6 +28,7 @@ class acp_styles protected $styles_path; protected $styles_path_absolute = 'styles'; protected $default_style = 0; + protected $reserved_paths = array('all', 'admin'); protected $db; protected $user; @@ -757,6 +758,13 @@ protected function find_available($all) } } + // Check for reserved paths + if (in_array($dir, $this->reserved_paths)) + { + $style['_available'] = false; + $style['_note'] = sprintf($user->lang['RESERVED_STYLE_DIR'], htmlspecialchars($dir)); + } + if ($all || $style['_available']) { $styles[] = $style; diff --git a/phpBB/language/en/acp/styles.php b/phpBB/language/en/acp/styles.php index f5bab1d76fc..74be6d84468 100644 --- a/phpBB/language/en/acp/styles.php +++ b/phpBB/language/en/acp/styles.php @@ -272,6 +272,7 @@ 'REPLACE_THEME_EXPLAIN' => 'This theme will replace the one you are deleting in any styles that use it.', 'REPLACE_WITH_OPTION' => 'Replace with ā€œ%sā€', 'REQUIRES_STYLE' => 'This style requires the style "%s" to be installed.', + 'RESERVED_STYLE_DIR' => 'Directory "%s" is reserved, please move style to a different directory.', 'SELECT_IMAGE' => 'Select image', 'SELECT_TEMPLATE' => 'Select template file',