1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-22 16:22:58 +02:00

[ticket/13740] Login admin when install finished

PHPBB3-13740
This commit is contained in:
Mate Bartus
2015-07-23 20:50:33 +02:00
parent dd31020fb3
commit fbd5929606
7 changed files with 101 additions and 7 deletions

View File

@@ -43,6 +43,11 @@ class ajax_iohandler extends iohandler_base
*/
protected $nav_data;
/**
* @var array
*/
protected $cookies;
/**
* Constructor
*
@@ -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;
}
@@ -252,6 +264,17 @@ class ajax_iohandler extends iohandler_base
$this->send_response();
}
/**
* {@inheritdoc}
*/
public function set_cookie($cookie_name, $cookie_value)
{
$this->cookies[] = array(
'name' => $cookie_name,
'value' => $cookie_value
);
}
/**
* Callback function for language replacing
*

View File

@@ -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)
{
}
}

View File

@@ -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);
}