/** * ファイルのアクセス履歴を登録する * * @param $file_id * @return 成功(true) / 失敗(false) */ static function set_file_access_history($user_community_id, $file_id) { // ファイルアクセス履歴 $file_access_history_row = ACSFile::get_file_access_history_row($user_community_id, $file_id); $file_access_history_form = array('user_community_id' => $user_community_id, 'file_id' => $file_id, 'access_date' => 'now'); // レコードが存在する場合はUPDATE if ($file_access_history_row) { ACSFileAccessHistoryModel::update_file_access_history($file_access_history_form); // レコードが存在しない場合はINSERT } else { ACSFileAccessHistoryModel::insert_file_access_history($file_access_history_form); } }