aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2014-11-22 00:15:24 +0100
committerMarc Alexander <admin@m-a-styles.de>2014-11-22 00:15:24 +0100
commitafc658c71a582af2565787683d889ddc9abf0ee7 (patch)
tree48dcaa8ad5412e0bf9d25b09e47bd3f349856f13 /phpBB/includes
parent47d3865fa6097e5c1925ef3af96ec124e8c78d68 (diff)
parent70692dd52260f91094fb200708603b6abf9cd895 (diff)
downloadforums-afc658c71a582af2565787683d889ddc9abf0ee7.tar
forums-afc658c71a582af2565787683d889ddc9abf0ee7.tar.gz
forums-afc658c71a582af2565787683d889ddc9abf0ee7.tar.bz2
forums-afc658c71a582af2565787683d889ddc9abf0ee7.tar.xz
forums-afc658c71a582af2565787683d889ddc9abf0ee7.zip
Merge branch 'develop-ascraeus' into develop
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/acp/acp_styles.php27
1 files changed, 25 insertions, 2 deletions
diff --git a/phpBB/includes/acp/acp_styles.php b/phpBB/includes/acp/acp_styles.php
index af3fd7937c..6bd27a8bca 100644
--- a/phpBB/includes/acp/acp_styles.php
+++ b/phpBB/includes/acp/acp_styles.php
@@ -29,14 +29,31 @@ class acp_styles
protected $styles_path;
protected $styles_path_absolute = 'styles';
protected $default_style = 0;
+ protected $styles_list_cols = 0;
+ protected $reserved_style_names = array('adm', 'admin', 'all');
+ /** @var \phpbb\db\driver\driver_interface */
protected $db;
+
+ /** @var \phpbb\user */
protected $user;
+
+ /** @var \phpbb\template\template */
protected $template;
+
+ /** @var \phpbb\request\request_interface */
protected $request;
+
+ /** @var \phpbb\cache\driver\driver_interface */
protected $cache;
+
+ /** @var \phpbb\auth\auth */
protected $auth;
+
+ /** @var string */
protected $phpbb_root_path;
+
+ /** @var string */
protected $php_ext;
public function main($id, $mode)
@@ -164,6 +181,12 @@ class acp_styles
$last_installed = false;
foreach ($dirs as $dir)
{
+ if (in_array($dir, $this->reserved_style_names))
+ {
+ $messages[] = $this->user->lang('STYLE_NAME_RESERVED', htmlspecialchars($dir));
+ continue;
+ }
+
$found = false;
foreach ($styles as &$style)
{
@@ -809,7 +832,7 @@ class acp_styles
* Update styles tree
*
* @param array $styles Styles list, passed as reference
- * @param array $style Current style, false if root
+ * @param array|false $style Current style, false if root
* @return bool True if something was updated, false if not
*/
protected function update_styles_tree(&$styles, $style = false)
@@ -1091,7 +1114,7 @@ class acp_styles
/**
* Install style
*
- * @param $style style data
+ * @param array $style style data
* @return int Style id
*/
protected function install_style($style)