Skip to content
This repository has been archived by the owner on Aug 2, 2019. It is now read-only.

Commit

Permalink
Merge branch 'akrabat-fix-related-tab'
Browse files Browse the repository at this point in the history
  • Loading branch information
lornajane committed Mar 25, 2016
2 parents 63c6b79 + 5bdabd2 commit 564153d
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 deletions.
12 changes: 11 additions & 1 deletion src/system/application/models/event_model.php
Expand Up @@ -826,7 +826,17 @@ function getEventRelatedSessions($id)
);

$q = $this->db->query($sql);
return $q->result();
$res = $q->result();

// get the speakers from the talk_speaker_model
$CI = &get_instance();
$CI->load->model('talk_speaker_model', 'tsm');
foreach ($res as $k => $talk) {
$res[$k]->speaker = $CI->tsm->getTalkSpeakers($talk->ID);
}


return $res;
}

/**
Expand Down
Expand Up @@ -11,7 +11,24 @@
<td>
<a href="/talk/view/<?php echo $iv->ID; ?>"><?php echo escape($iv->talk_title); ?></a>
</td>
<td><?php echo $iv->speaker; ?></td>
<td>
<?php
if (isset($iv->speaker) && is_array($iv->speaker)) {
$speaker_list = array();
foreach ($iv->speaker as $speaker) {
if (isset($claimed[$iv->ID][$speaker->speaker_id])) {
$claim_data = $claimed[$iv->ID][$speaker->speaker_id];
$speaker_list[]='<a href="/user/view/'.$claim_data->speaker_id.'">'.
escape($claim_data->full_name).'</a>';
} else {
$speaker_list[]=escape($speaker->speaker_name);
}

}
echo implode(', ', $speaker_list);
}
?>
</td>
<td>
<a class="comment-count" href="/talk/view/<?php echo $iv->ID; ?>/#comments"><?php echo $iv->comment_count; ?></a>
</td>
Expand Down

0 comments on commit 564153d

Please sign in to comment.