diff options
author | Tristan Darricau <tristan.darricau@sensiolabs.com> | 2015-08-24 12:33:32 +0200 |
---|---|---|
committer | Tristan Darricau <github@nicofuma.fr> | 2016-12-03 16:37:35 +0100 |
commit | 8481bd4e1831e3f9911263957637f4095fb088b0 (patch) | |
tree | 38f1b70929abfa155cea422172e6301a1ed03d2a /phpBB/phpbb/extension | |
parent | 376042d845a18058d93d289a1227096794da06d2 (diff) | |
download | forums-8481bd4e1831e3f9911263957637f4095fb088b0.tar forums-8481bd4e1831e3f9911263957637f4095fb088b0.tar.gz forums-8481bd4e1831e3f9911263957637f4095fb088b0.tar.bz2 forums-8481bd4e1831e3f9911263957637f4095fb088b0.tar.xz forums-8481bd4e1831e3f9911263957637f4095fb088b0.zip |
[ticket/12610] Use exception_interface
PHPBB3-12610
Diffstat (limited to 'phpBB/phpbb/extension')
-rw-r--r-- | phpBB/phpbb/extension/manager.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/phpBB/phpbb/extension/manager.php b/phpBB/phpbb/extension/manager.php index 6cdc8c0cc7..da1f06c885 100644 --- a/phpBB/phpbb/extension/manager.php +++ b/phpBB/phpbb/extension/manager.php @@ -13,6 +13,8 @@ namespace phpbb\extension; +use phpbb\exception\runtime_exception; +use phpbb\file_downloader; use Symfony\Component\DependencyInjection\ContainerInterface; /** @@ -572,7 +574,7 @@ class manager * @param bool $force_cache Force the use of the cache. Override $force_update. * @param string $stability Force the stability (null by default). * @return string - * @throws \RuntimeException + * @throws runtime_exception */ public function version_check(\phpbb\extension\metadata_manager $md_manager, $force_update = false, $force_cache = false, $stability = null) { @@ -580,12 +582,12 @@ class manager if (!isset($meta['extra']['version-check'])) { - throw new \RuntimeException($this->user->lang('NO_VERSIONCHECK'), 1); + throw new runtime_exception('NO_VERSIONCHECK'); } $version_check = $meta['extra']['version-check']; - $version_helper = new \phpbb\version_helper($this->cache, $this->config, $this->user); + $version_helper = new \phpbb\version_helper($this->cache, $this->config, new file_downloader()); $version_helper->set_current_version($meta['version']); $version_helper->set_file_location($version_check ['host'], $version_check ['directory'], $version_check ['filename']); $version_helper->force_stability($stability); |