| @@ -13,9 +13,9 @@ | ||
| 13 | 13 | parent::boot(); |
| 14 | 14 | |
| 15 | 15 | static::creating(function ($model) { |
| 16 | 16 | $uid = wp_generate_uuid4(); |
| 17 | - $model->file_hash = md5($uid . mt_rand(0, 1000)); | |
| 17 | + $model->file_hash = md5($uid . wp_rand(0, 1000)); | |
| 18 | 18 | }); |
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | public function scopeWithComment($query) |
| @@ -37,9 +37,9 @@ | ||
| 37 | 37 | } |
| 38 | 38 | return add_query_arg([ |
| 39 | 39 | 'fbs' => 1, |
| 40 | 40 | 'fbs_comment_image' => $this->file_hash, |
| 41 | - 'secure_sign' => md5($this->id . date('YmdH')) | |
| 41 | + 'secure_sign' => md5($this->id . gmdate('YmdH')) | |
| 42 | 42 | ], site_url('/index.php')); |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | |