예제 #1
0
 private static function clarificationUpdated(Request $r, $time)
 {
     try {
         if (is_null($r['problem'])) {
             $r['problem'] = ProblemsDAO::GetByPK($r['clarification']->problem_id);
         }
         if (is_null($r['contest']) && !is_null($r['clarification']->contest_id)) {
             $r['contest'] = ContestsDAO::GetByPK($r['clarification']->contest_id);
         }
         if (is_null($r['user'])) {
             $r['user'] = UsersDAO::GetByPK($r['clarification']->author_id);
         }
     } catch (Exception $e) {
         self::$log->error("Failed to broadcast clarification: " . $e);
         return;
     }
     self::$broadcaster->broadcastClarification($r, $time);
 }