Commit 1a3e606b authored by skummer's avatar skummer

ZP-338 #comment prevent that the same user agent is added to the history several times #time 30m

git-svn-id: https://z-push.org/svn/z-push/trunk@1611 b7dd7b3b-3a3c-0410-9da9-bee62a6cc5b5
parent 36ca9f60
......@@ -262,9 +262,13 @@ class ASDevice extends StateObject {
if ($this->useragent != "") {
// [] = changedate, previous user agent
$a = $this->useragentHistory;
// only add if this agent was not seen before
if (! in_array(array(true, $this->useragent), $a)) {
$a[] = array(time(), $this->useragent);
$this->useragentHistory = $a;
}
}
$this->useragent = $useragent;
return true;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment