correct settings.php patch
This commit is contained in:
parent
6e95c7dfae
commit
bbf5043eab
69
debian/patches/40_settings_php.patch
vendored
69
debian/patches/40_settings_php.patch
vendored
@ -1,6 +1,6 @@
|
||||
diff -uNr nagiosql32.orig/admin/settings.php nagiosql32/admin/settings.php
|
||||
--- nagiosql32.orig/admin/settings.php 2012-02-21 14:10:41.579203000 +0100
|
||||
+++ nagiosql32/admin/settings.php 2017-05-20 20:02:31.568000000 +0200
|
||||
diff -uNr nagiosql.orig/admin/settings.php nagiosql/admin/settings.php
|
||||
--- nagiosql.orig/admin/settings.php 2017-10-20 15:00:09.000000000 +0200
|
||||
+++ nagiosql/admin/settings.php 2017-10-20 15:26:23.004000000 +0200
|
||||
@@ -92,8 +92,8 @@
|
||||
}
|
||||
}
|
||||
@ -12,9 +12,18 @@ diff -uNr nagiosql32.orig/admin/settings.php nagiosql32/admin/settings.php
|
||||
if ($filSettings) {
|
||||
fwrite($filSettings,"<?php\n");
|
||||
fwrite($filSettings,"exit;\n");
|
||||
diff -uNr nagiosql32.orig/admin/support.php nagiosql32/admin/support.php
|
||||
--- nagiosql32.orig/admin/support.php 2012-03-08 08:40:12.245037000 +0100
|
||||
+++ nagiosql32/admin/support.php 2017-05-20 20:01:59.792000000 +0200
|
||||
@@ -138,7 +138,7 @@
|
||||
$myVisClass->processMessage(translate("An error occured while writing settings.php, please check permissions!"),$strErrorMessage);
|
||||
}
|
||||
} else {
|
||||
- $myVisClass->processMessage($strBasePath."config/settings.php ".translate("is not writeable, please check permissions!"),$strErrorMessage);
|
||||
+ $myVisClass->processMessage("/etc/nagiosql/settings.php ".translate("is not writeable, please check permissions!"),$strErrorMessage);
|
||||
}
|
||||
}
|
||||
//
|
||||
diff -uNr nagiosql.orig/admin/support.php nagiosql/admin/support.php
|
||||
--- nagiosql.orig/admin/support.php 2017-10-20 15:00:09.000000000 +0200
|
||||
+++ nagiosql/admin/support.php 2017-10-20 15:25:10.844000000 +0200
|
||||
@@ -211,7 +211,7 @@
|
||||
}
|
||||
// File access checks
|
||||
@ -24,10 +33,10 @@ diff -uNr nagiosql32.orig/admin/support.php nagiosql32/admin/support.php
|
||||
if (file_exists($strConfigFile) && is_readable($strConfigFile) && is_writable($strConfigFile)) {
|
||||
$conttp->setVariable("RW_CONFIG_CLASS","checkgreen");
|
||||
$conttp->setVariable("RW_CONFIG_RESULT",translate("ok"));
|
||||
diff -uNr nagiosql32.orig/functions/prepend_adm.php nagiosql32/functions/prepend_adm.php
|
||||
--- nagiosql32.orig/functions/prepend_adm.php 2017-05-20 20:08:12.900000000 +0200
|
||||
+++ nagiosql32/functions/prepend_adm.php 2017-05-20 20:04:18.164000000 +0200
|
||||
@@ -77,14 +77,14 @@
|
||||
diff -uNr nagiosql.orig/functions/prepend_adm.php nagiosql/functions/prepend_adm.php
|
||||
--- nagiosql.orig/functions/prepend_adm.php 2017-10-20 15:00:09.000000000 +0200
|
||||
+++ nagiosql/functions/prepend_adm.php 2017-10-20 15:27:19.124000000 +0200
|
||||
@@ -79,14 +79,14 @@
|
||||
//
|
||||
// Start installer
|
||||
// ===============
|
||||
@ -44,22 +53,22 @@ diff -uNr nagiosql32.orig/functions/prepend_adm.php nagiosql32/functions/prepend
|
||||
if (!isset($_SESSION['SETS']['db'])) $_SESSION['SETS']['db'] = $SETS['db'];
|
||||
//
|
||||
// Include external function/class files - part 1
|
||||
diff -uNr nagiosql32.orig/functions/prepend_scripting.php nagiosql32/functions/prepend_scripting.php
|
||||
--- nagiosql32.orig/functions/prepend_scripting.php 2012-02-29 09:54:45.611973000 +0100
|
||||
+++ nagiosql32/functions/prepend_scripting.php 2017-05-20 20:03:34.636000000 +0200
|
||||
@@ -42,7 +42,7 @@
|
||||
diff -uNr nagiosql.orig/functions/prepend_scripting.php nagiosql/functions/prepend_scripting.php
|
||||
--- nagiosql.orig/functions/prepend_scripting.php 2017-10-20 15:00:09.000000000 +0200
|
||||
+++ nagiosql/functions/prepend_scripting.php 2017-10-20 15:26:47.384000000 +0200
|
||||
@@ -43,7 +43,7 @@
|
||||
// Read settings file
|
||||
// ==================
|
||||
$preBasePath = str_replace("scripts","",getcwd());
|
||||
$preBasePath = str_replace("functions","",dirname(__FILE__));
|
||||
-$preIniFile = $preBasePath.'config/settings.php';
|
||||
+$preIniFile = '/etc/nagiosql/settings.php';
|
||||
//
|
||||
// Read file settings
|
||||
// ==================
|
||||
diff -uNr nagiosql32.orig/install/functions/install_class.php nagiosql32/install/functions/install_class.php
|
||||
--- nagiosql32.orig/install/functions/install_class.php 2017-05-20 20:08:12.900000000 +0200
|
||||
+++ nagiosql32/install/functions/install_class.php 2017-05-20 20:05:46.564000000 +0200
|
||||
@@ -659,7 +659,7 @@
|
||||
diff -uNr nagiosql.orig/install/functions/install_class.php nagiosql/install/functions/install_class.php
|
||||
--- nagiosql.orig/install/functions/install_class.php 2017-10-20 15:00:09.000000000 +0200
|
||||
+++ nagiosql/install/functions/install_class.php 2017-10-20 15:28:51.144000000 +0200
|
||||
@@ -764,7 +764,7 @@
|
||||
$strBasePath = substr(realpath('.'),0,-7);
|
||||
$strE_ID = error_reporting();
|
||||
error_reporting(0);
|
||||
@ -68,27 +77,27 @@ diff -uNr nagiosql32.orig/install/functions/install_class.php nagiosql32/install
|
||||
error_reporting($strE_ID);
|
||||
if ($filSettings) {
|
||||
// Write Database Configuration into settings.php
|
||||
diff -uNr nagiosql32.orig/install/index.php nagiosql32/install/index.php
|
||||
--- nagiosql32.orig/install/index.php 2017-05-20 20:08:12.904000000 +0200
|
||||
+++ nagiosql32/install/index.php 2017-05-20 20:04:52.492000000 +0200
|
||||
@@ -27,7 +27,7 @@
|
||||
diff -uNr nagiosql.orig/install/index.php nagiosql/install/index.php
|
||||
--- nagiosql.orig/install/index.php 2017-10-20 15:00:09.000000000 +0200
|
||||
+++ nagiosql/install/index.php 2017-10-20 15:27:52.532000000 +0200
|
||||
@@ -22,7 +22,7 @@
|
||||
$preContent = "templates/index.tpl.htm";
|
||||
$preEncode = 'utf-8';
|
||||
$preLocale = "../config/locale";
|
||||
-$filConfig = "../config/settings.php";
|
||||
+$filConfig = "/etc/nagiosql/settings.php";
|
||||
$preDBType = "mysqli";
|
||||
$preDBType = "mysql";
|
||||
$strLangOpt = "";
|
||||
$intError = 0;
|
||||
diff -uNr nagiosql32.orig/install/step1.php nagiosql32/install/step1.php
|
||||
--- nagiosql32.orig/install/step1.php 2017-05-20 20:08:12.904000000 +0200
|
||||
+++ nagiosql32/install/step1.php 2017-05-20 20:05:19.420000000 +0200
|
||||
@@ -186,7 +186,7 @@
|
||||
$strVersion = "3.3.0";
|
||||
diff -uNr nagiosql.orig/install/step1.php nagiosql/install/step1.php
|
||||
--- nagiosql.orig/install/step1.php 2017-10-20 15:00:09.000000000 +0200
|
||||
+++ nagiosql/install/step1.php 2017-10-20 15:28:25.108000000 +0200
|
||||
@@ -199,7 +199,7 @@
|
||||
}
|
||||
$arrTemplate['CHECK_5_CONTENT_1'] = $strHTML;
|
||||
// File access checks
|
||||
-$strConfigFile = "../config/settings.php";
|
||||
+$strConfigFile = "/etc/nagiosql/settings.php";
|
||||
if (file_exists($strConfigFile) && is_readable($strConfigFile)) {
|
||||
$arrTemplate['CHECK_6_CONTENT_1'] = $strHTMLPart1.translate("Read test on settings file (config/settings.php)").$strHTMLPart4.translate("OK")."</span><br>\n";
|
||||
$arrTemplate['CHECK_6_CONTENT_1'] = $strHTMLPart1.$myInstClass->translate("Read test on settings file (config/settings.php)").$strHTMLPart4.$myInstClass->translate("OK")."</span><br>\n";
|
||||
} else if (file_exists($strConfigFile)&& !is_readable($strConfigFile)) {
|
||||
|
Loading…
Reference in New Issue
Block a user