fix

parent 2b4e49b1
...@@ -63,7 +63,8 @@ class SessionUrl extends \common\components\ActiveRecordModel ...@@ -63,7 +63,8 @@ class SessionUrl extends \common\components\ActiveRecordModel
{ {
return [ return [
[['session_id'], 'required'], [['session_id'], 'required'],
[['session_id', 'created_at', 'updated_at', 'utm'], 'integer'], [['session_id', 'created_at', 'updated_at'], 'integer'],
[['utm'], 'boolean'],
[['url', 'referer'], 'string'], [['url', 'referer'], 'string'],
[['session_id'], 'exist', 'skipOnError' => true, 'targetClass' => Session::className(), 'targetAttribute' => ['session_id' => 'id']], [['session_id'], 'exist', 'skipOnError' => true, 'targetClass' => Session::className(), 'targetAttribute' => ['session_id' => 'id']],
]; ];
...@@ -121,10 +122,10 @@ class SessionUrl extends \common\components\ActiveRecordModel ...@@ -121,10 +122,10 @@ class SessionUrl extends \common\components\ActiveRecordModel
$params = $this->parseUrl(); $params = $this->parseUrl();
if(isset($params['utm_source'])) { if(isset($params['utm_source'])) {
return 1; return true;
} }
return 0; return false;
} }
/** /**
......
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