diff options
author | Tristan Darricau <github@nicofuma.fr> | 2017-01-15 18:15:00 +0100 |
---|---|---|
committer | Tristan Darricau <github@nicofuma.fr> | 2017-01-15 18:15:00 +0100 |
commit | 0f640ab7af20865e25897f47973e350e481fe1c8 (patch) | |
tree | 308692cec38920a2705cf699288d24c749aa8b5d | |
parent | 766839a60a897c1e5bee812b644b66ea3c94f832 (diff) | |
parent | a0bd23b74728ab6aa2a3e37197e4cc34bfe3ff38 (diff) | |
download | forums-0f640ab7af20865e25897f47973e350e481fe1c8.tar forums-0f640ab7af20865e25897f47973e350e481fe1c8.tar.gz forums-0f640ab7af20865e25897f47973e350e481fe1c8.tar.bz2 forums-0f640ab7af20865e25897f47973e350e481fe1c8.tar.xz forums-0f640ab7af20865e25897f47973e350e481fe1c8.zip |
Merge pull request #4651 from marc1706/ticket/15011
[ticket/15011] Output meaningful errors when validating all metadata
* marc1706/ticket/15011:
[ticket/15011] Output meaningful errors when validating all metadata
-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; |