diff options
| author | Mate Bartus <mate.bartus@gmail.com> | 2015-07-21 14:42:15 +0200 |
|---|---|---|
| committer | Mate Bartus <mate.bartus@gmail.com> | 2015-07-21 14:42:15 +0200 |
| commit | b2b9fb1df2e6d37c8a327b7b6c380f19e1ff6496 (patch) | |
| tree | f279a46f8da3f4320ac157d8e909f042cf33edea /phpBB/phpbb/install/helper | |
| parent | 0488c49116f77de55da3ddf36aa2b08f6a5fd085 (diff) | |
| download | forums-b2b9fb1df2e6d37c8a327b7b6c380f19e1ff6496.tar forums-b2b9fb1df2e6d37c8a327b7b6c380f19e1ff6496.tar.gz forums-b2b9fb1df2e6d37c8a327b7b6c380f19e1ff6496.tar.bz2 forums-b2b9fb1df2e6d37c8a327b7b6c380f19e1ff6496.tar.xz forums-b2b9fb1df2e6d37c8a327b7b6c380f19e1ff6496.zip | |
[ticket/13740] Fix CS and docblocks
PHPBB3-13740
Diffstat (limited to 'phpBB/phpbb/install/helper')
| -rw-r--r-- | phpBB/phpbb/install/helper/container_factory.php | 17 | ||||
| -rw-r--r-- | phpBB/phpbb/install/helper/iohandler/ajax_iohandler.php | 8 |
2 files changed, 19 insertions, 6 deletions
diff --git a/phpBB/phpbb/install/helper/container_factory.php b/phpBB/phpbb/install/helper/container_factory.php index 255f8f428e..eb44b470b7 100644 --- a/phpBB/phpbb/install/helper/container_factory.php +++ b/phpBB/phpbb/install/helper/container_factory.php @@ -93,9 +93,26 @@ class container_factory * @param string $param_name * * @return mixed + * + * @throws \phpbb\install\exception\cannot_build_container_exception When container cannot be built */ public function get_parameter($param_name) { + // Check if container was built, if not try to build it + if ($this->container === null) + { + // Check whether container can be built + // We need config.php for that so let's check if it has been set up yet + if (filesize($this->phpbb_root_path . 'config.' . $this->php_ext)) + { + $this->build_container(); + } + else + { + throw new cannot_build_container_exception(); + } + } + return $this->container->getParameter($param_name); } diff --git a/phpBB/phpbb/install/helper/iohandler/ajax_iohandler.php b/phpBB/phpbb/install/helper/iohandler/ajax_iohandler.php index 85cb2ca753..ce1112c7a1 100644 --- a/phpBB/phpbb/install/helper/iohandler/ajax_iohandler.php +++ b/phpBB/phpbb/install/helper/iohandler/ajax_iohandler.php @@ -96,10 +96,6 @@ class ajax_iohandler extends iohandler_base */ public function add_user_form_group($title, $form) { - // - // This code is pretty ugly... but works - // - $this->template->assign_var('S_FORM_ELEM_COUNT', sizeof($form)); $this->template->assign_block_vars('options', array( @@ -166,8 +162,8 @@ class ajax_iohandler extends iohandler_base $json_data = json_encode($json_data_array); // Try to push content to the browser - print (str_pad(' ', 4096) . "\n"); - print ($json_data . "\n\n"); + print(str_pad(' ', 4096) . "\n"); + print($json_data . "\n\n"); flush(); } |
