Exemple #1
0
 /**
  * Returns a peer instance associated with this om.
  *
  * Since Peer classes are not to have any instance attributes, this method returns the
  * same instance for all member of this class. The method could therefore
  * be static, but this would prevent one from overriding the behavior.
  *
  * @return     AuditTrailPeer
  */
 public function getPeer()
 {
     if (self::$peer === null) {
         self::$peer = new AuditTrailPeer();
     }
     return self::$peer;
 }
Exemple #2
0
 public function save(PropelPDO $con = null)
 {
     if (!kAuditTrailManager::traceEnabled($this->getPartnerId(), $this)) {
         KalturaLog::debug("No audit created object type [{$this->object_type}] action [{$this->action}]");
         return 0;
     }
     if (is_null($this->getKuserId())) {
         $this->setPuserId(kCurrentContext::$uid);
     }
     if (is_null($this->getClientTag())) {
         $this->setClientTag(kCurrentContext::$client_lang);
     }
     $this->setRequestId($this->getUniqueRequestId());
     $this->setMasterPartnerId(kCurrentContext::$master_partner_id);
     $this->setKs(kCurrentContext::$ks);
     $this->setIpAddress(kCurrentContext::$user_ip);
     $this->setServerName(kCurrentContext::$host);
     $this->setEntryPoint(kCurrentContext::getEntryPoint());
     $this->setUserAgent(requestUtils::getRemoteUserAgent());
     return parent::save($con);
 }
Exemple #3
0
 public function save(PropelPDO $con = null)
 {
     if (!kAuditTrailManager::traceEnabled($this->getPartnerId(), $this)) {
         return 0;
     }
     if (is_null($this->getKuserId())) {
         $this->setPuserId(kCurrentContext::$uid);
         if (kCurrentContext::$uid == '') {
             $this->setPuserId(kCurrentContext::$ks_uid);
         }
     }
     if (is_null($this->getClientTag())) {
         $this->setClientTag(kCurrentContext::$client_lang);
     }
     $this->setRequestId(new UniqueId());
     $this->setMasterPartnerId(kCurrentContext::$master_partner_id);
     $this->setKs(kCurrentContext::$ks);
     $this->setIpAddress(kCurrentContext::$user_ip);
     $this->setServerName(kCurrentContext::$host);
     $this->setEntryPoint(kCurrentContext::getEntryPoint());
     $this->setUserAgent(requestUtils::getRemoteUserAgent());
     return parent::save($con);
 }