/** * 保存快照 * @param int $user_id 用户ID * @return bool */ public function save_snapshot($user_id) { if (Kohana::config('contact.save_snapshot')) { if ($this->is_snapshot) { if ($this->contact_mapper->save_snapshot($user_id)) { $this->is_snapshot = FALSE; return TRUE; } else { return FALSE; } } } return TRUE; }