]> git.stg.codes - stg.git/blobdiff - projects/stargazer/plugins/store/firebird/firebird_store_users.cpp
Merge branch 'stg-2.409'
[stg.git] / projects / stargazer / plugins / store / firebird / firebird_store_users.cpp
index 8c214fbf2b6ccc97ee8781b7e3065fbee1d5207c..fbeacae5332e115fc6d7d3092fa78863eaea16b0 100644 (file)
@@ -127,9 +127,9 @@ return SaveStat(stat, login);
 }
 //-----------------------------------------------------------------------------
 int FIREBIRD_STORE::SaveStat(const USER_STAT & stat,
-                                 const std::string & login,
-                                 int year,
-                                 int month) const
+                             const std::string & login,
+                             int year,
+                             int month) const
 {
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amWrite, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
@@ -147,7 +147,7 @@ try
     tr->Rollback();
     return -1;
     }
-    st->Get(1, uid);
+    int32_t uid = Get<int32_t>(st, 1);
     st->Close();
     st->Prepare("select first 1 pk_stat from tb_stats where fk_user = ? order by stats_date desc");
     st->Set(1, uid);
@@ -302,7 +302,7 @@ try
     st->Prepare("insert into tb_users_services (fk_user, fk_service) \
                     values (?, (select pk_service from tb_services \
                                 where name = ?))");
-    for(std::vector<std::string>::const_iterator it = conf.service.begin(); it != conf.service.end(); ++it)
+    for(std::vector<std::string>::const_iterator it = conf.services.begin(); it != conf.services.end(); ++it)
         {
         st->Set(1, uid);
         st->Set(2, *it);
@@ -516,7 +516,7 @@ try
         {
         std::string name;
         st->Get(1, name);
-        conf->service.push_back(name);
+        conf->services.push_back(name);
         }
 
     // User data