Beispiel #1
0
 public static function addTrackEntry(TrackEntry $te)
 {
     // can be switched of once we decide this is not needed
     if (true) {
         if (!$te->getKs()) {
             $te->setKs(kCurrentContext::$ks);
         }
         if (!$te->getPartnerId()) {
             $te->setPartnerId(kCurrentContext::$partner_id);
         }
         if (!$te->getPsVersion()) {
             $te->setPsVersion(kCurrentContext::$ps_vesion);
         }
         if (!$te->getHostName()) {
             $te->setHostName(kCurrentContext::$host);
         }
         if (!$te->getUid()) {
             $te->setUid(kCurrentContext::$uid);
         }
         if (!$te->getUserIp()) {
             $te->setUserIp(kCurrentContext::$user_ip);
         }
         $te->setContext(kCurrentContext::$client_version . "|" . kCurrentContext::$client_lang . "|" . kCurrentContext::$service . "|" . kCurrentContext::$action);
         $te->setSessionId((string) new UniqueId());
         $te->save();
     }
 }