| @@ -11,9 +11,9 @@ | ||
| 11 | 11 | parent::boot(); |
| 12 | 12 | |
| 13 | 13 | static::creating(function ($model) { |
| 14 | 14 | $uid = wp_generate_uuid4(); |
| 15 | - $model->file_hash = md5($uid . mt_rand(0, 1000)); | |
| 15 | + $model->file_hash = md5($uid . wp_rand(0, 1000)); | |
| 16 | 16 | }); |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | 19 | public function scopeWithComment($query) |
| @@ -30,9 +30,9 @@ | ||
| 30 | 30 | } |
| 31 | 31 | return add_query_arg([ |
| 32 | 32 | 'fbs' => 1, |
| 33 | 33 | 'fbs_comment_image' => $this->file_hash, |
| 34 | - 'secure_sign' => md5($this->id . date('YmdH')) | |
| 34 | + 'secure_sign' => md5($this->id . gmdate('YmdH')) | |
| 35 | 35 | ], site_url('/index.php')); |
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | /** |