aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/install/helper/iohandler
diff options
context:
space:
mode:
authorMate Bartus <mate.bartus@gmail.com>2015-07-23 20:50:33 +0200
committerMate Bartus <mate.bartus@gmail.com>2015-07-23 20:50:33 +0200
commitfbd5929606169d3f780f0a59760c171b20bd906d (patch)
treef7aa8cc2ad7933df8ef2b16cf08a01c3051ffcc5 /phpBB/phpbb/install/helper/iohandler
parentdd31020fb3dd4ab96b48dd1854f73190900319b1 (diff)
downloadforums-fbd5929606169d3f780f0a59760c171b20bd906d.tar
forums-fbd5929606169d3f780f0a59760c171b20bd906d.tar.gz
forums-fbd5929606169d3f780f0a59760c171b20bd906d.tar.bz2
forums-fbd5929606169d3f780f0a59760c171b20bd906d.tar.xz
forums-fbd5929606169d3f780f0a59760c171b20bd906d.zip
[ticket/13740] Login admin when install finished
PHPBB3-13740
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);
}