nagiosql/debian/patches/10_service_pack_1_additional_fixes_only.patch
2017-05-22 11:26:31 +02:00

281 lines
16 KiB
Diff

diff -uNr nagiosql32.orig/admin/contacts.php nagiosql32/admin/contacts.php
--- nagiosql32.orig/admin/contacts.php 2012-04-20 12:39:53.983095000 +0200
+++ nagiosql32/admin/contacts.php 2012-04-20 12:39:56.000000000 +0200
@@ -10,7 +10,7 @@
// Project : NagiosQL
// Component : Contact definitions
// Website : http://www.nagiosql.org
-// Date : $LastChangedDate: 2012-04-20 12:39:53 +0200 (Fri, 20 Apr 2012) $
+// Date : $LastChangedDate: 2012-04-20 12:39:53 +0200 (Fr, 20. Apr 2012) $
// Author : $LastChangedBy: martin $
// Version : 3.2.0
// Revision : $LastChangedRevision: 1323 $
diff -uNr nagiosql32.orig/admin/hosts.php nagiosql32/admin/hosts.php
--- nagiosql32.orig/admin/hosts.php 2012-04-17 12:09:50.082574000 +0200
+++ nagiosql32/admin/hosts.php 2012-04-17 11:54:12.000000000 +0200
@@ -10,10 +10,10 @@
// Project : NagiosQL
// Component : Host definition
// Website : http://www.nagiosql.org
-// Date : $LastChangedDate: 2012-04-17 12:09:50 +0200 (Tue, 17 Apr 2012) $
+// Date : $LastChangedDate: 2012-04-05 08:11:59 +0200 (Do, 05. Apr 2012) $
// Author : $LastChangedBy: martin $
// Version : 3.2.0
-// Revision : $LastChangedRevision: 1321 $
+// Revision : $LastChangedRevision: 1315 $
//
///////////////////////////////////////////////////////////////////////////////
//
diff -uNr nagiosql32.orig/admin/services.php nagiosql32/admin/services.php
--- nagiosql32.orig/admin/services.php 2012-04-17 12:09:50.082574000 +0200
+++ nagiosql32/admin/services.php 2012-04-17 11:53:36.000000000 +0200
@@ -10,10 +10,10 @@
// Project : NagiosQL
// Component : Service definition
// Website : http://www.nagiosql.org
-// Date : $LastChangedDate: 2012-04-17 12:09:50 +0200 (Tue, 17 Apr 2012) $
+// Date : $LastChangedDate: 2012-04-05 08:11:59 +0200 (Do, 05. Apr 2012) $
// Author : $LastChangedBy: martin $
// Version : 3.2.0
-// Revision : $LastChangedRevision: 1321 $
+// Revision : $LastChangedRevision: 1315 $
//
///////////////////////////////////////////////////////////////////////////////
//
diff -uNr nagiosql32.orig/admin/templatedefinitions.php nagiosql32/admin/templatedefinitions.php
--- nagiosql32.orig/admin/templatedefinitions.php 2012-04-05 08:11:59.091878000 +0200
+++ nagiosql32/admin/templatedefinitions.php 2012-04-05 08:12:08.000000000 +0200
@@ -10,7 +10,7 @@
// Project : NagiosQL
// Component : Template definition list
// Website : http://www.nagiosql.org
-// Date : $LastChangedDate: 2012-04-05 08:11:59 +0200 (Thu, 05 Apr 2012) $
+// Date : $LastChangedDate: 2012-04-05 08:11:59 +0200 (Do, 05. Apr 2012) $
// Author : $LastChangedBy: martin $
// Version : 3.2.0
// Revision : $LastChangedRevision: 1315 $
diff -uNr nagiosql32.orig/functions/config_class.php nagiosql32/functions/config_class.php
--- nagiosql32.orig/functions/config_class.php 2013-01-10 09:46:11.799949000 +0100
+++ nagiosql32/functions/config_class.php 2012-04-17 11:59:16.000000000 +0200
@@ -10,10 +10,10 @@
// Project : NagiosQL
// Component : Configuration Class
// Website : http://www.nagiosql.org
-// Date : $LastChangedDate: 2013-01-10 09:46:11 +0100 (Thu, 10 Jan 2013) $
+// Date : $LastChangedDate: 2012-04-17 11:47:05 +0200 (Di, 17. Apr 2012) $
// Author : $LastChangedBy: martin $
// Version : 3.2.0
-// Revision : $LastChangedRevision: 1351 $
+// Revision : $LastChangedRevision: 1319 $
//
///////////////////////////////////////////////////////////////////////////////////////////////
//
@@ -710,8 +710,6 @@
} else {
$this->myDataClass->writeLog(translate('Writing of the configuration failed - no dataset or not activated dataset found'));
$this->processClassMessage(translate('Writing of the configuration failed - no dataset or not activated dataset found')."::",$this->strErrorMessage);
- $configtp->parse();
- $booReturn = $this->writeConfigFile($configtp->get(),$strFile,0,$intConfigID,$resConfigFile,$strConfigFile);
return(1);
}
$configtp->parse();
@@ -1254,7 +1252,7 @@
if ($strDataValue == 2) {$strDataValue = "*,";} else {$strDataValue = "";}
foreach ($arrDataRel AS $data) {
if ($data['exclude'] == 0) {
- $strDataValue .= $data['strSlave'].",";
+ $strDataValue .= $data['strSlave'].",";
} else if ($this->intNagVersion >=3) {
$strDataValue .= "!".$data['strSlave'].",";
}
diff -uNr nagiosql32.orig/functions/import_class.php nagiosql32/functions/import_class.php
--- nagiosql32.orig/functions/import_class.php 2012-09-18 10:44:22.198475000 +0200
+++ nagiosql32/functions/import_class.php 2012-04-17 11:47:08.000000000 +0200
@@ -10,10 +10,10 @@
// Project : NagiosQL
// Component : Import Class
// Website : http://www.nagiosql.org
-// Date : $LastChangedDate: 2012-09-18 10:44:22 +0200 (Tue, 18 Sep 2012) $
+// Date : $LastChangedDate: 2012-04-17 11:47:05 +0200 (Di, 17. Apr 2012) $
// Author : $LastChangedBy: martin $
// Version : 3.2.0
-// Revision : $LastChangedRevision: 1346 $
+// Revision : $LastChangedRevision: 1319 $
//
///////////////////////////////////////////////////////////////////////////////////////////////
//
@@ -899,7 +899,6 @@
$booResult = $this->myDBClass->insertData($strSQL);
if ($booResult == false) $this->strErrorMessage .= $this->myDBClass->strErrorMessage;
$intSlaveId = $this->myDBClass->intLastId;
-
// Special processing for serviceextinfo
if (($strDataTable == "tbl_serviceextinfo") && ($strKey == "service_description")) {
$strSQL = "SELECT `id` FROM `tbl_host` WHERE `host_name`='".$arrImportData['host_name']['value']."'";
@@ -997,7 +996,7 @@
}
// Does the entry already exist?
$strSQL = "SELECT `id` FROM `".$arrRelData['tableName1']."` $strLink WHERE `".$arrRelData['target1']."` = '".$elem."'
- $strWhere AND `config_id`=".$this->intDomainId;
+ $strWhere AND `active`='1' AND `config_id`=".$this->intDomainId;
$strId = $this->myDBClass->getFieldData($strSQL);
if ($strId != "") {
$intSlaveId = $strId+0;
@@ -1014,7 +1013,7 @@
}
// Insert relations
$strSQL = "INSERT INTO `".$arrRelData['linkTable']."` SET `idMaster` = ".$intDataId.", `idSlave` = ".$intSlaveId.",
- `exclude`=".$intExclude;
+ `exclude`=".$intExclude;
$booResult = $this->myDBClass->insertData($strSQL);
if ($booResult == false) $this->strErrorMessage .= $this->myDBClass->strErrorMessage;
// Keep values
@@ -1105,7 +1104,7 @@
// Process data values
foreach ($arrValues AS $elem) {
// Does the template already exist? (table 1)
- $strSQL = "SELECT `id` FROM `".$arrRelData['tableName1']."` WHERE `".$arrRelData['target1']."` = '".$elem."'
+ $strSQL = "SELECT `id` FROM `".$arrRelData['tableName1']."` WHERE `".$arrRelData['target1']."` = '".$elem."' AND `active`='1'
AND `config_id`=".$this->intDomainId;
$strId = $this->myDBClass->getFieldData($strSQL);
if ($strId != "") {
@@ -1114,7 +1113,7 @@
}
if ($intSlaveId == 0) {
// Does the template already exist? (table 2)
- $strSQL = "SELECT `id` FROM `".$arrRelData['tableName2']."` WHERE `".$arrRelData['target2']."` = '".$elem."'
+ $strSQL = "SELECT `id` FROM `".$arrRelData['tableName2']."` WHERE `".$arrRelData['target2']."` = '".$elem."' AND `active`='1'
AND `config_id`=".$this->intDomainId;
$strId = $this->myDBClass->getFieldData($strSQL);
if ($strId != "") {
@@ -1219,8 +1218,7 @@
// Process data values
foreach ($arrValues AS $elem) {
// Does the entry already exist?
- $strSQL = "SELECT `id` FROM `".$arrRelData['tableName1']."` WHERE `".$arrRelData['target1']."` = '".$elem."'
- AND `config_id`=".$this->intDomainId;
+ $strSQL = "SELECT `id` FROM `".$arrRelData['tableName1']."` WHERE `".$arrRelData['target1']."` = '".$elem."' AND `active`='1' AND `config_id`=".$this->intDomainId;
$strId = $this->myDBClass->getFieldData($strSQL);
if ($strId != "") {
$intSlaveId = $strId+0;
@@ -1422,7 +1420,7 @@
}
// Does the entry already exist?
$strSQL = "SELECT `id` FROM `".$arrRelData['tableName1']."` WHERE `".$arrRelData['target1']."` = '".$elem."'
- $strWhere AND `config_id`=".$this->intDomainId;
+ $strWhere AND `active`='1' AND `config_id`=".$this->intDomainId;
$strId = $this->myDBClass->getFieldData($strSQL);
if ($strId != "") {
$intSlaveId = $strId+0;
diff -uNr nagiosql32.orig/functions/prepend_adm.php nagiosql32/functions/prepend_adm.php
--- nagiosql32.orig/functions/prepend_adm.php 2013-01-10 09:46:11.799949000 +0100
+++ nagiosql32/functions/prepend_adm.php 2012-03-27 12:47:58.000000000 +0200
@@ -9,14 +9,14 @@
// Project : NagiosQL
// Component : Preprocessing script
// Website : http://www.nagiosql.org
-// Date : $LastChangedDate: 2013-01-10 09:46:11 +0100 (Thu, 10 Jan 2013) $
+// Date : $LastChangedDate: 2012-03-27 12:47:56 +0200 (Di, 27. Mär 2012) $
// Author : $LastChangedBy: martin $
// Version : 3.2.0
-// Revision : $LastChangedRevision: 1351 $
+// Revision : $LastChangedRevision: 1308 $
//
///////////////////////////////////////////////////////////////////////////////
//error_reporting(E_ALL);
-error_reporting(E_ALL & ~E_STRICT);
+error_reporting(E_ALL);
//
// Security Protection
// ===================
@@ -253,7 +253,7 @@
$_SESSION['userid'] = $arrDataUser[0]['id'];
$_SESSION['groupadm'] = $arrDataUser[0]['admin_enable'];
$_SESSION['startsite'] = $_SESSION['SETS']['path']['base_url']."admin.php";
- $_SESSION['timestamp'] = time();
+ $_SESSION['timestamp'] = mktime();
$_SESSION['logged_in'] = 1;
$_SESSION['domain'] = $arrDataUser[0]['domain'];
// Update language settings
@@ -273,10 +273,8 @@
}
}
if (($_SESSION['logged_in'] == 0) && isset($chkInsName) && ($chkInsName != "") && ($intError == 0)) {
- $chkInsName = mysql_real_escape_string($chkInsName);
- $chkInsPasswd = mysql_real_escape_string($chkInsPasswd);
- $strSQL = "SELECT * FROM `tbl_user` WHERE `username`='".$chkInsName."'
- AND `password`=MD5('".$chkInsPasswd."') AND `active`='1'";
+ $strSQL = "SELECT * FROM `tbl_user` WHERE `username`='".mysql_real_escape_string($chkInsName)."'
+ AND `password`=MD5('$chkInsPasswd') AND `active`='1'";
$booReturn = $myDBClass->getDataArray($strSQL,$arrDataUser,$intDataCount);
if ($booReturn == false) {
$myVisClass->processMessage(translate('Error while selecting data from database:'),$strErrorMessage);
@@ -288,7 +286,7 @@
$_SESSION['userid'] = $arrDataUser[0]['id'];
$_SESSION['groupadm'] = $arrDataUser[0]['admin_enable'];
$_SESSION['startsite'] = $_SESSION['SETS']['path']['base_url'] ."admin.php";
- $_SESSION['timestamp'] = time();
+ $_SESSION['timestamp'] = mktime();
$_SESSION['logged_in'] = 1;
$_SESSION['domain'] = $arrDataUser[0]['domain'];
// Update language settings
@@ -329,9 +327,9 @@
$myVisClass->processMessage($myDBClass->strErrorMessage,$strErrorMessage);
} else if ($intDataCount == 1) {
// Time expired?
- if (time() - $_SESSION['timestamp'] > $_SESSION['SETS']['security']['logofftime']) {
+ if (mktime() - $_SESSION['timestamp'] > $_SESSION['SETS']['security']['logofftime']) {
// Force new login
- $myDataClass->writeLog(translate('Session timeout reached - Seconds:')." ".(time() - $_SESSION['timestamp']." - User: ".$_SESSION['username']));
+ $myDataClass->writeLog(translate('Session timeout reached - Seconds:')." ".(mktime() - $_SESSION['timestamp']." - User: ".$_SESSION['username']));
$_SESSION['logged_in'] = 0;
header("Location: ".$_SESSION['SETS']['path']['protocol']."://".$_SERVER['HTTP_HOST'].$_SESSION['SETS']['path']['base_url']."index.php");
@@ -347,7 +345,7 @@
}
}
// Update login time
- $_SESSION['timestamp'] = time();
+ $_SESSION['timestamp'] = mktime();
if (isset($preContent) && ($preContent == "index.tpl.htm")) {
header("Location: ".$_SESSION['SETS']['path']['protocol']."://".$_SERVER['HTTP_HOST'].$_SESSION['startsite']);
}
diff -uNr nagiosql32.orig/functions/prepend_content.php nagiosql32/functions/prepend_content.php
--- nagiosql32.orig/functions/prepend_content.php 2012-05-03 15:15:32.673020000 +0200
+++ nagiosql32/functions/prepend_content.php 2012-04-04 07:30:16.000000000 +0200
@@ -144,14 +144,14 @@
$chkButValue3 = isset($_POST['butValue3']) ? $_POST['butValue3'] : ""; // Common button value
$chkButValue4 = isset($_POST['butValue4']) ? $_POST['butValue4'] : ""; // Common button value
$chkButValue5 = isset($_POST['butValue5']) ? $_POST['butValue5'] : ""; // Common button value
-$chkTfNullVal1 = (isset($_POST['tfNullVal1']) && ($_POST['tfNullVal1'] != "")) ? $myVisClass->checkNull($_POST['tfNullVal1'])+0 : "NULL"; // Common text NULL field value
-$chkTfNullVal2 = (isset($_POST['tfNullVal2']) && ($_POST['tfNullVal2'] != "")) ? $myVisClass->checkNull($_POST['tfNullVal2'])+0 : "NULL"; // Common text NULL field value
-$chkTfNullVal3 = (isset($_POST['tfNullVal3']) && ($_POST['tfNullVal3'] != "")) ? $myVisClass->checkNull($_POST['tfNullVal3'])+0 : "NULL"; // Common text NULL field value
-$chkTfNullVal4 = (isset($_POST['tfNullVal4']) && ($_POST['tfNullVal4'] != "")) ? $myVisClass->checkNull($_POST['tfNullVal4'])+0 : "NULL"; // Common text NULL field value
-$chkTfNullVal5 = (isset($_POST['tfNullVal5']) && ($_POST['tfNullVal5'] != "")) ? $myVisClass->checkNull($_POST['tfNullVal5'])+0 : "NULL"; // Common text NULL field value
-$chkTfNullVal6 = (isset($_POST['tfNullVal6']) && ($_POST['tfNullVal6'] != "")) ? $myVisClass->checkNull($_POST['tfNullVal6'])+0 : "NULL"; // Common text NULL field value
-$chkTfNullVal7 = (isset($_POST['tfNullVal7']) && ($_POST['tfNullVal7'] != "")) ? $myVisClass->checkNull($_POST['tfNullVal7'])+0 : "NULL"; // Common text NULL field value
-$chkTfNullVal8 = (isset($_POST['tfNullVal8']) && ($_POST['tfNullVal8'] != "")) ? $myVisClass->checkNull($_POST['tfNullVal8'])+0 : "NULL"; // Common text NULL field value
+$chkTfNullVal1 = (isset($_POST['tfNullVal1']) && ($_POST['tfNullVal1'] != "")) ? $myVisClass->checkNull($_POST['tfNullVal1']) : "NULL"; // Common text NULL field value
+$chkTfNullVal2 = (isset($_POST['tfNullVal2']) && ($_POST['tfNullVal2'] != "")) ? $myVisClass->checkNull($_POST['tfNullVal2']) : "NULL"; // Common text NULL field value
+$chkTfNullVal3 = (isset($_POST['tfNullVal3']) && ($_POST['tfNullVal3'] != "")) ? $myVisClass->checkNull($_POST['tfNullVal3']) : "NULL"; // Common text NULL field value
+$chkTfNullVal4 = (isset($_POST['tfNullVal4']) && ($_POST['tfNullVal4'] != "")) ? $myVisClass->checkNull($_POST['tfNullVal4']) : "NULL"; // Common text NULL field value
+$chkTfNullVal5 = (isset($_POST['tfNullVal5']) && ($_POST['tfNullVal5'] != "")) ? $myVisClass->checkNull($_POST['tfNullVal5']) : "NULL"; // Common text NULL field value
+$chkTfNullVal6 = (isset($_POST['tfNullVal6']) && ($_POST['tfNullVal6'] != "")) ? $myVisClass->checkNull($_POST['tfNullVal6']) : "NULL"; // Common text NULL field value
+$chkTfNullVal7 = (isset($_POST['tfNullVal7']) && ($_POST['tfNullVal7'] != "")) ? $myVisClass->checkNull($_POST['tfNullVal7']) : "NULL"; // Common text NULL field value
+$chkTfNullVal8 = (isset($_POST['tfNullVal8']) && ($_POST['tfNullVal8'] != "")) ? $myVisClass->checkNull($_POST['tfNullVal8']) : "NULL"; // Common text NULL field value
//
// Quote special characters
// ==========================
diff -uNr nagiosql32.orig/templates/admin/user.tpl.htm nagiosql32/templates/admin/user.tpl.htm
--- nagiosql32.orig/templates/admin/user.tpl.htm 2012-03-27 12:47:56.208241000 +0200
+++ nagiosql32/templates/admin/user.tpl.htm 2012-03-27 12:47:58.000000000 +0200
@@ -3,7 +3,7 @@
<!-- Project : NagiosQL -->
<!-- Component : User template -->
<!-- Website : http://www.nagiosql.org -->
-<!-- Date : $LastChangedDate: 2012-03-27 12:47:56 +0200 (Tue, 27 Mar 2012) $ -->
+<!-- Date : $LastChangedDate: 2012-03-27 12:47:56 +0200 (Di, 27. Mär 2012) $ -->
<!-- Author : $LastChangedBy: martin $ -->
<!-- Version : 3.2.0 -->
<!-- Revision : $LastChangedRevision: 1308 $ -->