commit 4e25a4f8
Use hashedid if id is not availeble
git-svn-id: http://oastat.googlecode.com/svn/trunk@39 a36be8df-c75f-1e49-46ad-4f0ee64bdc62
Changed files
| M | src/oss2db/userinfo2db.cpp before |
diff --git a/src/oss2db/userinfo2db.cpp b/src/oss2db/userinfo2db.cpp
index 92ca34d..54a5bfb 100644
--- a/src/oss2db/userinfo2db.cpp
+++ b/src/oss2db/userinfo2db.cpp
@@ -45,11 +45,12 @@ void Userinfo2Db::process(OaStatStruct oss) {
while(clientIdMap.size() < oss.parameters.at(0)+2)
clientIdMap.push_back("");
- if(arguments["id"].length()>0 || arguments["hashedid"].length() > 0) //Not bot
- if(arguments["id"].length()>0)
- clientIdMap[oss.parameters.at(0)] = getHashedId(arguments["id"]);
- else
- clientIdMap[oss.parameters.at(0)] = arguments["hashedid"];
+ if(arguments["id"].length()>0 || arguments["hashedid"].length() > 0) { //Not bot
+ if(arguments["id"].length()>0)
+ clientIdMap[oss.parameters.at(0)] = getHashedId(arguments["id"]);
+ else
+ clientIdMap[oss.parameters.at(0)] = arguments["hashedid"];
+ }
else //bot
{
clientIdMap[oss.parameters.at(0)] = (boost::format("%1%_client%2%") % arguments["n"] % oss.parameters.at(0) ).str();