Merge with 0.10
authorMatthew Wild <mwild1@gmail.com>
Wed, 24 Jun 2015 22:25:42 +0000 (23:25 +0100)
committerMatthew Wild <mwild1@gmail.com>
Wed, 24 Jun 2015 22:25:42 +0000 (23:25 +0100)
1  2 
plugins/mod_storage_sql2.lua

index 5411e50055d66b7ed12f4f97d371b2dd1a72909a,e15668af8b584bd34789b559b2ac0f6b5ed2c81d..7c797447028ba888afbeeed8c8eddd6c2f8a3120
@@@ -123,13 -214,14 +123,16 @@@ function keyval_store:users(
        return iterator(result);
  end
  
 +--- Archive store API
 +
  local archive_store = {}
+ archive_store.caps = {
+       total = true;
+ };
  archive_store.__index = archive_store
- function archive_store:append(username, key, when, with, value)
-       if value == nil then -- COMPAT early versions
-               when, with, value, key = key, when, with, value
+ function archive_store:append(username, key, value, when, with)
+       if type(when) ~= "number" then
+               when, with, value = value, when, with;
        end
        local user,store = username,self.store;
        return engine:transaction(function()