diff -uNr nagiosql32/functions/data_class.php nsql/functions/data_class.php --- nagiosql32/functions/data_class.php 2017-05-21 04:16:26.144000000 +0200 +++ nsql/functions/data_class.php 2017-01-06 14:55:10.000000000 +0100 @@ -110,7 +110,7 @@ $strSQL = "DELETE FROM `".$strTableName."` WHERE `id` = $intDataId $strNoDelete"; $booReturn = $this->myDBClass->insertData($strSQL); if ($booReturn == false) { - $this->processClassMessage(translate('Delete failed because a database error:')."::".mysql_error()."::",$this->strInfoMessage); + $this->processClassMessage(translate('Delete failed because a database error:')."::".mysqli_error()."::",$this->strInfoMessage); return(1); } else if ($this->myDBClass->intAffectedRows == 0) { $this->processClassMessage(translate('No data deleted. Probably the dataset does not exist or it is protected from delete.')."::",$this->strErrorMessage); @@ -134,7 +134,7 @@ $strSQL = "DELETE FROM `".$strTableName."` WHERE `id` = ".$elem['id']; $booReturn = $this->myDBClass->insertData($strSQL); if ($booReturn == false) { - $this->processClassMessage(translate('Delete failed because a database error:')."::".mysql_error()."::",$this->strInfoMessage); + $this->processClassMessage(translate('Delete failed because a database error:')."::".mysqli_error()."::",$this->strInfoMessage); return(1); } else { $intDeleteCount = $intDeleteCount + $this->myDBClass->intAffectedRows; diff -uNr nagiosql32/functions/import_class.php nsql/functions/import_class.php --- nagiosql32/functions/import_class.php 2017-05-21 04:16:11.976000000 +0200 +++ nsql/functions/import_class.php 2017-01-04 13:11:32.000000000 +0100 @@ -632,8 +632,8 @@ if ($strKeyField == "") {$strKey = $strConfigName;} else {$strKey = $strKeyField;} if ($booResult != true) { $this->strErrorMessage .= $this->myDBClass->strErrorMessage; - if ($strKeyField != "") $this->strErrorMessage .= translate('Entry')." ".$strKey." -> ".$arrImportData[$strKeyField]['value']." ".translate('inside')." ".$strTable." ".translate('could not be inserted:')." ".mysql_error()."::"; - if ($strKeyField == "") $this->strErrorMessage .= translate('Entry')." ".$strTemp1." -> ".$strTemp2.translate('inside')." ".$strTable." ".$strTable." ".translate('could not be inserted:')." ".mysql_error()."::"; + if ($strKeyField != "") $this->strErrorMessage .= translate('Entry')." ".$strKey." -> ".$arrImportData[$strKeyField]['value']." ".translate('inside')." ".$strTable." ".translate('could not be inserted:')." ".mysqli_error()."::"; + if ($strKeyField == "") $this->strErrorMessage .= translate('Entry')." ".$strTemp1." -> ".$strTemp2.translate('inside')." ".$strTable." ".$strTable." ".translate('could not be inserted:')." ".mysqli_error()."::"; return(1); } else { if ($strKeyField != "") $this->strInfoMessage .= translate('Entry')." ".$strKey." -> ".$arrImportData[$strKeyField]['value']." ".translate('inside')." ".$strTable." ".translate('successfully inserted')."::"; @@ -1236,7 +1236,7 @@ // Update data in master table $arrCommand[0] = $intSlaveId; $strValue = implode("!",$arrCommand); - $strSQL = "UPDATE `".$strDataTable."` SET `".$arrRelData['fieldName']."` = '".mysql_real_escape_string($strValue)."' WHERE `id` = ".$intDataId; + $strSQL = "UPDATE `".$strDataTable."` SET `".$arrRelData['fieldName']."` = '".mysqli_real_escape_string($strValue)."' WHERE `id` = ".$intDataId; $booResult = $this->myDBClass->insertData($strSQL); if ($booResult == false) $this->strErrorMessage .= $this->myDBClass->strErrorMessage; } diff -uNr nagiosql32/functions/mysql_class.php nsql/functions/mysql_class.php --- nagiosql32/functions/mysql_class.php 2017-05-21 04:16:26.144000000 +0200 +++ nsql/functions/mysql_class.php 2017-01-06 14:55:18.000000000 +0100 @@ -330,7 +330,7 @@ // /////////////////////////////////////////////////////////////////////////////////////////// function dbdisconnect() { - @mysql_close($this->strDBId); + @mysqli_close($this->strDBId); return true; } diff -uNr nagiosql32/functions/prepend_content.php nsql/functions/prepend_content.php --- nagiosql32/functions/prepend_content.php 2017-05-21 04:16:11.980000000 +0200 +++ nsql/functions/prepend_content.php 2017-01-06 15:15:59.000000000 +0100 @@ -321,7 +321,7 @@ if ($intSuccess != 0) $myVisClass->processMessage(translate('Configuration files successfully written!'),$strInfoMessage); if ($intError != 0) $myVisClass->processMessage(translate('Some configuration files were not written. Dataset not activated, not found or you do not have write permission!'),$strErrorMessage); } else if ($preTableName == 'tbl_service') { - $strSQL = "SELECT `id`, `$preKeyField` FROM `$preTableName` WHERE $strDomainWhere AND `access_group` IN ($strAccess) AND `active`='1' GROUP BY `$preKeyField`"; + $strSQL = "SELECT `id`, `$preKeyField` FROM `$preTableName` WHERE $strDomainWhere AND `access_group` IN ($strAccess) AND `active`='1' GROUP BY `$preKeyField`, `id`"; $myDBClass->getDataArray($strSQL,$arrData,$intDataCount); if ($booReturn == false) $myVisClass->processMessage($myDBClass->strErrorMessage,$strErrorMessage); if ($booReturn && ($intDataCount != 0)) {