mirror of
https://github.com/rsyslog/loganalyzer.git
synced 2025-09-25 10:57:52 +02:00
Fixed issue with deleting all data in MongoDB LogStream source.
This commit is contained in:
parent
e9781d2791
commit
690df992b5
@ -705,12 +705,20 @@ class LogStreamMongoDB extends LogStream {
|
|||||||
|
|
||||||
// Set default rowcount
|
// Set default rowcount
|
||||||
$rowcount = null;
|
$rowcount = null;
|
||||||
|
|
||||||
|
if ( $nDateTimeStamp > 0 )
|
||||||
|
{
|
||||||
|
// Create MongoDate Object from Timestamp
|
||||||
|
$myMongoDate = new MongoDate($nDateTimeStamp);
|
||||||
|
|
||||||
// Create MongoDate Object from Timestamp
|
// Create Criteria Array
|
||||||
$myMongoDate = new MongoDate($nDateTimeStamp);
|
$myCriteria = array( $dbmapping[$szTableType]['DBMAPPINGS'][SYSLOG_DATE] => array('$lte' => $myMongoDate) );
|
||||||
|
}
|
||||||
// Create Criteria Array
|
else
|
||||||
$myCriteria = array( $dbmapping[$szTableType]['DBMAPPINGS'][SYSLOG_DATE] => array('$lte' => $myMongoDate) );
|
{
|
||||||
|
// Use EMPTY array to delete all!
|
||||||
|
$myCriteria = array();
|
||||||
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user