mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-11 11:13:59 +02:00
[ticket/13740] Clean up install config file when installation has finished
PHPBB3-13740
This commit is contained in:
@@ -73,6 +73,13 @@ class config
|
||||
*/
|
||||
protected $navigation_data;
|
||||
|
||||
/**
|
||||
* Flag indicating that config file should be cleaned up
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
protected $do_clean_up;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
@@ -81,6 +88,7 @@ class config
|
||||
$this->filesystem = $filesystem;
|
||||
$this->php_ini = $php_ini;
|
||||
$this->phpbb_root_path = $phpbb_root_path;
|
||||
$this->do_clean_up = false;
|
||||
|
||||
// Set up data arrays
|
||||
$this->navigation_data = array();
|
||||
@@ -228,6 +236,12 @@ class config
|
||||
*/
|
||||
public function save_config()
|
||||
{
|
||||
if ($this->do_clean_up)
|
||||
{
|
||||
@unlink($this->install_config_file);
|
||||
return;
|
||||
}
|
||||
|
||||
// Create array to save
|
||||
$save_array = array(
|
||||
'installer_config' => $this->installer_config,
|
||||
@@ -336,6 +350,15 @@ class config
|
||||
return $this->navigation_data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes install config file
|
||||
*/
|
||||
public function clean_up_config_file()
|
||||
{
|
||||
$this->do_clean_up = true;
|
||||
@unlink($this->install_config_file);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filling up system_data array
|
||||
*/
|
||||
|
Reference in New Issue
Block a user