aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Darricau <github@nicofuma.fr>2017-01-15 18:15:00 +0100
committerTristan Darricau <github@nicofuma.fr>2017-01-15 18:15:00 +0100
commit0f640ab7af20865e25897f47973e350e481fe1c8 (patch)
tree308692cec38920a2705cf699288d24c749aa8b5d
parent766839a60a897c1e5bee812b644b66ea3c94f832 (diff)
parenta0bd23b74728ab6aa2a3e37197e4cc34bfe3ff38 (diff)
downloadforums-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.php14
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;