diff options
author | Marc Alexander <admin@m-a-styles.de> | 2017-01-15 17:56:12 +0100 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2017-01-15 17:56:12 +0100 |
commit | a0bd23b74728ab6aa2a3e37197e4cc34bfe3ff38 (patch) | |
tree | 8cbd6e64212d0ac58c48cbae1140f06c652d616e /phpBB/phpbb/extension/metadata_manager.php | |
parent | Merge pull request #4646 from javiexin/ticket/15011 (diff) | |
download | phpbb-a0bd23b74728ab6aa2a3e37197e4cc34bfe3ff38.tar.gz phpbb-a0bd23b74728ab6aa2a3e37197e4cc34bfe3ff38.tar.bz2 phpbb-a0bd23b74728ab6aa2a3e37197e4cc34bfe3ff38.zip |
[ticket/15011] Output meaningful errors when validating all metadata
PHPBB3-15011
Diffstat (limited to 'phpBB/phpbb/extension/metadata_manager.php')
-rw-r--r-- | phpBB/phpbb/extension/metadata_manager.php | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/phpBB/phpbb/extension/metadata_manager.php b/phpBB/phpbb/extension/metadata_manager.php index 35a88d6991..107907609b 100644 --- a/phpBB/phpbb/extension/metadata_manager.php +++ b/phpBB/phpbb/extension/metadata_manager.php @@ -230,9 +230,19 @@ class metadata_manager case 'all': $this->validate('display'); - if (!$this->validate_enable()) + if (!$this->validate_dir()) { - throw new \phpbb\extension\exception($this->user->lang('META_FIELD_NOT_SET', $name)); + throw new \phpbb\extension\exception($this->user->lang('EXTENSION_DIR_INVALID')); + } + + if (!$this->validate_require_phpbb()) + { + throw new \phpbb\extension\exception($this->user->lang('META_FIELD_NOT_SET', 'soft-require')); + } + + if (!$this->validate_require_php()) + { + throw new \phpbb\extension\exception($this->user->lang('META_FIELD_NOT_SET', 'require php')); } break; |