aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/install/helper/iohandler
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/phpbb/install/helper/iohandler')
-rw-r--r--phpBB/phpbb/install/helper/iohandler/ajax_iohandler.php23
-rw-r--r--phpBB/phpbb/install/helper/iohandler/cli_iohandler.php7
-rw-r--r--phpBB/phpbb/install/helper/iohandler/iohandler_interface.php8
3 files changed, 38 insertions, 0 deletions
diff --git a/phpBB/phpbb/install/helper/iohandler/ajax_iohandler.php b/phpBB/phpbb/install/helper/iohandler/ajax_iohandler.php
index ce1112c7a1..fa628f3365 100644
--- a/phpBB/phpbb/install/helper/iohandler/ajax_iohandler.php
+++ b/phpBB/phpbb/install/helper/iohandler/ajax_iohandler.php
@@ -44,6 +44,11 @@ class ajax_iohandler extends iohandler_base
protected $nav_data;
/**
+ * @var array
+ */
+ protected $cookies;
+
+ /**
* Constructor
*
* @param \phpbb\request\request_interface $request HTTP request interface
@@ -55,6 +60,7 @@ class ajax_iohandler extends iohandler_base
$this->template = $template;
$this->form = '';
$this->nav_data = array();
+ $this->cookies = array();
parent::__construct();
}
@@ -214,6 +220,12 @@ class ajax_iohandler extends iohandler_base
$this->request_client_refresh = false;
}
+ if (!empty($this->cookies))
+ {
+ $json_array['cookies'] = $this->cookies;
+ $this->cookies = array();
+ }
+
return $json_array;
}
@@ -253,6 +265,17 @@ class ajax_iohandler extends iohandler_base
}
/**
+ * {@inheritdoc}
+ */
+ public function set_cookie($cookie_name, $cookie_value)
+ {
+ $this->cookies[] = array(
+ 'name' => $cookie_name,
+ 'value' => $cookie_value
+ );
+ }
+
+ /**
* Callback function for language replacing
*
* @param array $matches
diff --git a/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php b/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php
index bf68f363c3..c5b2bb06bc 100644
--- a/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php
+++ b/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php
@@ -255,4 +255,11 @@ class cli_iohandler extends iohandler_base
public function set_finished_stage_menu($menu_path)
{
}
+
+ /**
+ * {@inheritdoc}
+ */
+ public function set_cookie($cookie_name, $cookie_value)
+ {
+ }
}
diff --git a/phpBB/phpbb/install/helper/iohandler/iohandler_interface.php b/phpBB/phpbb/install/helper/iohandler/iohandler_interface.php
index 44b409bb0a..5f5f8499d6 100644
--- a/phpBB/phpbb/install/helper/iohandler/iohandler_interface.php
+++ b/phpBB/phpbb/install/helper/iohandler/iohandler_interface.php
@@ -163,4 +163,12 @@ interface iohandler_interface
* @param string $message_lang_key Language key for the message
*/
public function finish_progress($message_lang_key);
+
+ /**
+ * Sends and sets cookies
+ *
+ * @param string $cookie_name Name of the cookie to set
+ * @param string $cookie_value Value of the cookie to set
+ */
+ public function set_cookie($cookie_name, $cookie_value);
}