mirror of
https://github.com/rsyslog/loganalyzer.git
synced 2025-09-26 11:19:26 +02:00
Fixed bug in databasemapping admin.
The form parameter and database fieldname of EventID field were interfering. Also fixed a bug in maintenance.php, the ID parameter was forced to an integer. A leftover from earlier loganalyzer days.
This commit is contained in:
parent
731a265a4f
commit
753ce6bb2e
@ -1,4 +1,10 @@
|
||||
---------------------------------------------------------------------------
|
||||
Version 3.6.6 (stable), 2014-??-??
|
||||
- Fixed bug in databasemapping admin. The form parameter and database
|
||||
fieldname of EventID field were interfering.
|
||||
- Fixed a bug in maintenance.php, the ID parameter was forced to
|
||||
an integer. A leftover from earlier loganalyzer days.
|
||||
---------------------------------------------------------------------------
|
||||
Version 3.6.5 (stable), 2013-10-08
|
||||
- LogStreamDB Driver, LogStreamPDO Driver, UserDB:
|
||||
Added backticks arround tablenames in all SQL Statements.
|
||||
|
@ -86,10 +86,10 @@ if ( isset($_GET['op']) )
|
||||
$content['DBMP'] = $dbmapping;
|
||||
|
||||
// View must be loaded as well already!
|
||||
if ( isset($_GET['id']) && isset($content['DBMP'][$_GET['id']]) )
|
||||
if ( isset($_GET['dbmpid']) && isset($content['DBMP'][$_GET['dbmpid']]) )
|
||||
{
|
||||
//PreInit these values
|
||||
$content['DBMPID'] = DB_RemoveBadChars($_GET['id']);
|
||||
$content['DBMPID'] = DB_RemoveBadChars($_GET['dbmpid']);
|
||||
if ( isset($content['DBMP'][ $content['DBMPID'] ]) )
|
||||
{
|
||||
//Set the FormAdd URL
|
||||
@ -110,15 +110,15 @@ if ( isset($_GET['op']) )
|
||||
{
|
||||
$content['ISEDITORNEWDBMP'] = false;
|
||||
$content['ISERROR'] = true;
|
||||
$content['ERROR_MSG'] = GetAndReplaceLangStr( $content['LN_DBMP_ERROR_INVALIDID'], isset($_GET['id']) ? $_GET['id'] : "<unknown>" );
|
||||
$content['ERROR_MSG'] = GetAndReplaceLangStr( $content['LN_DBMP_ERROR_INVALIDID'], isset($_GET['dbmpid']) ? $_GET['dbmpid'] : "<unknown>" );
|
||||
}
|
||||
}
|
||||
else if ($_GET['op'] == "delete")
|
||||
{
|
||||
if ( isset($_GET['id']) )
|
||||
if ( isset($_GET['dbmpid']) )
|
||||
{
|
||||
//PreInit these values
|
||||
$content['DBMPID'] = DB_RemoveBadChars($_GET['id']);
|
||||
$content['DBMPID'] = DB_RemoveBadChars($_GET['dbmpid']);
|
||||
|
||||
// Get UserInfo
|
||||
$result = DB_Query("SELECT DisplayName FROM " . DB_MAPPINGS . " WHERE ID = " . $content['DBMPID'] );
|
||||
@ -249,7 +249,7 @@ if ( isset($content['ISEDITORNEWDBMP']) && $content['ISEDITORNEWDBMP'] )
|
||||
// --- Process POST Form Data
|
||||
if ( isset($_POST['op']) )
|
||||
{
|
||||
if ( isset ($_POST['id']) ) { $content['DBMPID'] = DB_RemoveBadChars($_POST['id']); } else {$content['DBMPID'] = ""; }
|
||||
if ( isset ($_POST['dbmpid']) ) { $content['DBMPID'] = DB_RemoveBadChars($_POST['dbmpid']); } else {$content['DBMPID'] = ""; }
|
||||
if ( isset ($_POST['DisplayName']) ) { $content['DisplayName'] = DB_StripSlahes($_POST['DisplayName']); } else {$content['DisplayName'] = ""; }
|
||||
|
||||
// --- Check mandotary values
|
||||
|
@ -179,7 +179,7 @@ function CleanData($optParam1, $optParam2, $optParam3, $optParam4)
|
||||
if ( isset($_SERVER["argv"][2]) )
|
||||
{
|
||||
// Set to SourceID property!
|
||||
$content['SOURCEID'] = intval( $_SERVER["argv"][2] );
|
||||
$content['SOURCEID'] = $_SERVER["argv"][2];
|
||||
|
||||
// Check if exists
|
||||
if ( !isset($content['Sources'][ $content['SOURCEID'] ]) )
|
||||
|
@ -34,7 +34,7 @@
|
||||
<td align="center" class="{cssclass}"><b>{ID}</b></td>
|
||||
<td align="left" class="{cssclass}">
|
||||
<!-- IF ActionsAllowed="true" -->
|
||||
<a href="{BASEPATH}admin/dbmappings.php?op=edit&id={ID}">{DisplayName}</a>
|
||||
<a href="{BASEPATH}admin/dbmappings.php?op=edit&dbmpid={ID}">{DisplayName}</a>
|
||||
<!-- ENDIF ActionsAllowed="true" -->
|
||||
<!-- IF ActionsAllowed!="true" -->
|
||||
<b>{DisplayName}</b>
|
||||
@ -45,8 +45,8 @@
|
||||
</td>
|
||||
<td align="center" class="{cssclass}">
|
||||
<!-- IF ActionsAllowed="true" -->
|
||||
<a href="{BASEPATH}admin/dbmappings.php?op=edit&id={ID}"><img src="{MENU_EDIT}" width="16" title="{LN_DBMP_EDIT}"></a>
|
||||
<a href="{BASEPATH}admin/dbmappings.php?op=delete&id={ID}"><img src="{MENU_DELETE}" width="16" title="{LN_DBMP_DELETE}"></a>
|
||||
<a href="{BASEPATH}admin/dbmappings.php?op=edit&dbmpid={ID}"><img src="{MENU_EDIT}" width="16" title="{LN_DBMP_EDIT}"></a>
|
||||
<a href="{BASEPATH}admin/dbmappings.php?op=delete&dbmpid={ID}"><img src="{MENU_DELETE}" width="16" title="{LN_DBMP_DELETE}"></a>
|
||||
<!-- ENDIF ActionsAllowed="true" -->
|
||||
<!-- IF ActionsAllowed!="true" -->
|
||||
<img src="{MENU_EDIT_DISABLED}" width="16" title="{LN_GEN_DISABLED}">
|
||||
@ -116,7 +116,7 @@
|
||||
<br>
|
||||
<input type="submit" value="{DBMP_SENDBUTTON}">
|
||||
<input type="hidden" name="op" value="{DBMP_FORMACTION}">
|
||||
<input type="hidden" name="id" value="{DBMPID}">
|
||||
<input type="hidden" name="dbmpid" value="{DBMPID}">
|
||||
<br><br>
|
||||
</td>
|
||||
</tr>
|
||||
|
Loading…
x
Reference in New Issue
Block a user