Blame SOURCES/config.patch

1c3a77
diff -urN 4.0.1.orig/ui/include/classes/core/CConfigFile.php 4.0.1/ui/include/classes/core/CConfigFile.php
1c3a77
--- 4.0.1.orig/ui/include/classes/core/CConfigFile.php	2018-10-29 19:00:25.270221980 +0200
1c3a77
+++ 4.0.1/ui/include/classes/core/CConfigFile.php	2018-10-29 19:00:54.666586770 +0200
1c3a77
@@ -24,7 +24,7 @@
1c3a77
 	const CONFIG_NOT_FOUND = 1;
1c3a77
 	const CONFIG_ERROR = 2;
1c3a77
 
1c3a77
-	const CONFIG_FILE_PATH = '/conf/zabbix.conf.php';
1c3a77
+	const CONFIG_FILE_PATH = '/etc/zabbix/web/zabbix.conf.php';
1c3a77
 
1c3a77
 	private static $supported_db_types = [
1c3a77
 		ZBX_DB_MYSQL => true,
1c3a77
diff -urN 4.0.1.orig/ui/include/classes/core/ZBase.php 4.0.1/ui/include/classes/core/ZBase.php
1c3a77
--- 4.0.1.orig/ui/include/classes/core/ZBase.php	2018-10-29 19:00:25.270221980 +0200
1c3a77
+++ 4.0.1/ui/include/classes/core/ZBase.php	2018-10-29 19:00:36.450360730 +0200
1c3a77
@@ -320,7 +320,7 @@
1c3a77
 	 * @throws Exception
1c3a77
 	 */
1c3a77
 	protected function setMaintenanceMode() {
1c3a77
-		require_once 'conf/maintenance.inc.php';
1c3a77
+		require_once '/etc/zabbix/web/maintenance.inc.php';
1c3a77
 
1c3a77
 		if (defined('ZBX_DENY_GUI_ACCESS')) {
1c3a77
			if (!isset($ZBX_GUI_ACCESS_IP_RANGE) || !in_array(CWebUser::getIp(), $ZBX_GUI_ACCESS_IP_RANGE)) {
1c3a77
@@ -289,7 +289,7 @@
1c3a77
 	 * Load zabbix config file.
1c3a77
 	 */
1c3a77
 	protected function loadConfigFile() {
1c3a77
-		$configFile = $this->getRootDir().CConfigFile::CONFIG_FILE_PATH;
1c3a77
+		$configFile = CConfigFile::CONFIG_FILE_PATH;
1c3a77
 		$config = new CConfigFile($configFile);
1c3a77
 		$this->config = $config->load();
1c3a77
 	}
1c3a77
diff -urN 4.0.1.orig/ui/include/classes/setup/CSetupWizard.php 4.0.1/ui/include/classes/setup/CSetupWizard.php
1c3a77
--- 4.0.1.orig/ui/include/classes/setup/CSetupWizard.php	2018-10-29 19:00:25.274222030 +0200
1c3a77
+++ 4.0.1/ui/include/classes/setup/CSetupWizard.php	2018-10-29 19:00:36.450360730 +0200
1c3a77
@@ -336,7 +336,7 @@
1c3a77
 	private function stage5(): array {
1c3a77
 		$this->setConfig('ZBX_CONFIG_FILE_CORRECT', true);
1c3a77
 
1c3a77
-		$config_file_name = APP::getInstance()->getRootDir().CConfigFile::CONFIG_FILE_PATH;
1c3a77
+		$config_file_name = CConfigFile::CONFIG_FILE_PATH;
1c3a77
 		$config = new CConfigFile($config_file_name);
1c3a77
 		$config->config = [
1c3a77
 			'DB' => [
1c3a77
@@ -507,7 +507,7 @@
1c3a77
 				// make zabbix.conf.php downloadable
1c3a77
 				header('Content-Type: application/x-httpd-php');
1c3a77
 				header('Content-Disposition: attachment; filename="'.basename(CConfigFile::CONFIG_FILE_PATH).'"');
1c3a77
-				$config = new CConfigFile(APP::getInstance()->getRootDir().CConfigFile::CONFIG_FILE_PATH);
1c3a77
+				$config = new CConfigFile(CConfigFile::CONFIG_FILE_PATH);
1c3a77
 				$config->config = [
1c3a77
 					'DB' => [
1c3a77
 						'TYPE' => $this->getConfig('DB_TYPE'),