aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/install/helper/config.php
diff options
context:
space:
mode:
authorCHItA <mate.bartus@gmail.com>2015-06-11 19:32:11 +0200
committerMate Bartus <mate.bartus@gmail.com>2015-07-08 01:28:02 +0200
commitdb4cfa7df62d5911bc5a0edcdc59236c39aede08 (patch)
tree35c6a99c900a0b9a3fa5db0e8d60e39045ed6591 /phpBB/install/helper/config.php
parent1b81bf5b2370c045a6369705d2a11a2b35fe2281 (diff)
downloadforums-db4cfa7df62d5911bc5a0edcdc59236c39aede08.tar
forums-db4cfa7df62d5911bc5a0edcdc59236c39aede08.tar.gz
forums-db4cfa7df62d5911bc5a0edcdc59236c39aede08.tar.bz2
forums-db4cfa7df62d5911bc5a0edcdc59236c39aede08.tar.xz
forums-db4cfa7df62d5911bc5a0edcdc59236c39aede08.zip
[ticket/13740] Add navigation bar support for the installer
Also added various UI elements and texts. [ci skip] PHPBB3-13740
Diffstat (limited to 'phpBB/install/helper/config.php')
-rw-r--r--phpBB/install/helper/config.php49
1 files changed, 48 insertions, 1 deletions
diff --git a/phpBB/install/helper/config.php b/phpBB/install/helper/config.php
index 0c04b5e950..5c1348c06d 100644
--- a/phpBB/install/helper/config.php
+++ b/phpBB/install/helper/config.php
@@ -13,6 +13,8 @@
namespace phpbb\install\helper;
+use phpbb\install\exception\installer_config_not_writable_exception;
+
/**
* Stores common settings and installation status
*/
@@ -65,6 +67,13 @@ class config
protected $system_data;
/**
+ * Array containing navigation bar information
+ *
+ * @var array
+ */
+ protected $navigation_data;
+
+ /**
* Constructor
*/
public function __construct(\phpbb\filesystem\filesystem_interface $filesystem, \phpbb\php\ini $php_ini, $phpbb_root_path)
@@ -74,6 +83,7 @@ class config
$this->phpbb_root_path = $phpbb_root_path;
// Set up data arrays
+ $this->navigation_data = array();
$this->installer_config = array();
$this->system_data = array();
$this->progress_data = array(
@@ -206,6 +216,7 @@ class config
$this->installer_config = $unserialized_data['installer_config'];
$this->progress_data = $unserialized_data['progress_data'];
+ $this->navigation_data = $unserialized_data['navigation_data'];
}
/**
@@ -217,6 +228,7 @@ class config
$save_array = array(
'installer_config' => $this->installer_config,
'progress_data' => $this->progress_data,
+ 'navigation_data' => $this->navigation_data,
);
// Create file content
@@ -225,7 +237,12 @@ class config
$file_content .= "\n";
// Dump file_content to disk
- $fp = fopen($this->install_config_file, 'w');
+ $fp = @fopen($this->install_config_file, 'w');
+ if (!$fp)
+ {
+ throw new installer_config_not_writable_exception();
+ }
+
fwrite($fp, $file_content);
fclose($fp);
}
@@ -286,6 +303,36 @@ class config
}
/**
+ * Marks stage as completed in the navigation bar
+ *
+ * @param array $nav_path Array to the navigation elem
+ */
+ public function set_finished_navigation_stage($nav_path)
+ {
+ $this->navigation_data['finished'][] = $nav_path;
+ }
+
+ /**
+ * Marks stage as active in the navigation bar
+ *
+ * @param array $nav_path Array to the navigation elem
+ */
+ public function set_active_navigation_stage($nav_path)
+ {
+ $this->navigation_data['active'] = $nav_path;
+ }
+
+ /**
+ * Returns navigation data
+ *
+ * @return array
+ */
+ public function get_navigation_data()
+ {
+ return $this->navigation_data;
+ }
+
+ /**
* Filling up system_data array
*/
protected function setup_system_data()