示例#1
0
文件: wfLog.php 项目: ashenkar/sanga
 /**
  * @return bool|int
  */
 public function logHit()
 {
     $liveTrafficEnabled = wfConfig::liveTrafficEnabled();
     $action = $this->currentRequest->action;
     $logHitOK = $this->logHitOK();
     if (!$logHitOK) {
         return false;
     }
     if (!$liveTrafficEnabled && !$action) {
         return false;
     }
     if ($this->currentRequest !== null) {
         if ($this->currentRequest->save()) {
             return $this->currentRequest->getPrimaryKey();
         }
     }
     return false;
 }