Ejemplo n.º 1
0
 function getRoundScore($field, $round_id)
 {
     global $database;
     if (!isset($this->{$field})) {
         $jHistory = new jHistory($database);
         $params = array('round_id' => $round_id, 'user_id' => $this->id);
         $jHistory->loadByParams($params);
         if ($jHistory->exists()) {
             $this->{$field} = $jHistory->{$field};
         } else {
             $this->{$field} = 0;
         }
     }
     return $this->{$field};
 }