aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/install/helper/iohandler/ajax_iohandler.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/install/helper/iohandler/ajax_iohandler.php')
-rw-r--r--phpBB/install/helper/iohandler/ajax_iohandler.php51
1 files changed, 51 insertions, 0 deletions
diff --git a/phpBB/install/helper/iohandler/ajax_iohandler.php b/phpBB/install/helper/iohandler/ajax_iohandler.php
index 960dd615b5..71571fecba 100644
--- a/phpBB/install/helper/iohandler/ajax_iohandler.php
+++ b/phpBB/install/helper/iohandler/ajax_iohandler.php
@@ -34,6 +34,16 @@ class ajax_iohandler extends iohandler_base
protected $form;
/**
+ * @var bool
+ */
+ protected $request_client_refresh;
+
+ /**
+ * @var array
+ */
+ protected $nav_data;
+
+ /**
* Constructor
*
* @param \phpbb\request\request_interface $request HTTP request interface
@@ -44,6 +54,7 @@ class ajax_iohandler extends iohandler_base
$this->request = $request;
$this->template = $template;
$this->form = '';
+ $this->nav_data = array();
parent::__construct();
}
@@ -89,6 +100,8 @@ class ajax_iohandler extends iohandler_base
// This code is pretty ugly... but works
//
+ $this->template->assign_var('S_FORM_ELEM_COUNT', sizeof($form));
+
$this->template->assign_block_vars('options', array(
'LEGEND' => $this->language->lang($title),
'S_LEGEND' => true,
@@ -187,9 +200,21 @@ class ajax_iohandler extends iohandler_base
);
}
+ if (!empty($this->nav_data))
+ {
+ $json_array['nav'] = $this->nav_data;
+ }
+
$this->errors = array();
$this->warnings = array();
$this->logs = array();
+ $this->nav_data = array();
+
+ if ($this->request_client_refresh)
+ {
+ $json_array['refresh'] = true;
+ $this->request_client_refresh = false;
+ }
return $json_array;
}
@@ -204,6 +229,32 @@ class ajax_iohandler extends iohandler_base
}
/**
+ * {@inheritdoc}
+ */
+ public function request_refresh()
+ {
+ $this->request_client_refresh = true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function set_active_stage_menu($menu_path)
+ {
+ $this->nav_data['active'] = $menu_path[sizeof($menu_path) - 1];
+ $this->send_response();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function set_finished_stage_menu($menu_path)
+ {
+ $this->nav_data['finished'][] = $menu_path[sizeof($menu_path) - 1];
+ $this->send_response();
+ }
+
+ /**
* Callback function for language replacing
*
* @param array $matches