diff OrthancServer/DatabaseWrapper.cpp @ 1300:919dfb2fb3fe

DANGEROUS refactoring
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 06 Feb 2015 15:30:46 +0100
parents 4ce47e8ed0d2
children 5d56cfa49f68
line wrap: on
line diff
--- a/OrthancServer/DatabaseWrapper.cpp	Fri Feb 06 15:13:05 2015 +0100
+++ b/OrthancServer/DatabaseWrapper.cpp	Fri Feb 06 15:30:46 2015 +0100
@@ -573,18 +573,12 @@
   void DatabaseWrapper::LogChange(int64_t internalId,
                                   const ServerIndexChange& change)
   {
-    if (change.GetChangeType() <= ChangeType_INTERNAL_LastLogged)
-    {
-      SQLite::Statement s(db_, SQLITE_FROM_HERE, "INSERT INTO Changes VALUES(NULL, ?, ?, ?, ?)");
-      s.BindInt(0, change.GetChangeType());
-      s.BindInt64(1, internalId);
-      s.BindInt(2, change.GetResourceType());
-      s.BindString(3, change.GetDate());
-      s.Run();
-    }
-
-    assert(listener_ != NULL);
-    listener_->SignalChange(change);
+    SQLite::Statement s(db_, SQLITE_FROM_HERE, "INSERT INTO Changes VALUES(NULL, ?, ?, ?, ?)");
+    s.BindInt(0, change.GetChangeType());
+    s.BindInt64(1, internalId);
+    s.BindInt(2, change.GetResourceType());
+    s.BindString(3, change.GetDate());
+    s.Run();
   }