Skip to content

Commit

Permalink
bugfixed ivpmodel.php
Browse files Browse the repository at this point in the history
  • Loading branch information
cpf-ch committed Jun 16, 2011
1 parent b65160b commit 0c5c848
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions application/models/ivpmodel.php
Expand Up @@ -8,16 +8,18 @@ function __construct() {

private function load_editors(&$ivp) {
$ivp['editors'] = array();
$editors = $this->db
->select('username')
->select("to_char(stamp, 'YYYY-MM-DD HH24:MI:SS') as stamp", FALSE)
->from('ivp_editors')
->join('users', 'ivp_editors.user = users.id', 'inner')
->where('ivp_editors.ivp', $ivp['id'])
->order_by('stamp', 'desc')
->get();
foreach ($editors->result_array() as $ed) {
$ivp['editors'][] = $ed;
if (isset($ivp['id'])) {
$editors = $this->db
->select('username')
->select("to_char(stamp, 'YYYY-MM-DD HH24:MI:SS') as stamp", FALSE)
->from('ivp_editors')
->join('users', 'ivp_editors.user = users.id', 'inner')
->where('ivp_editors.ivp', $ivp['id'])
->order_by('stamp', 'desc')
->get();
foreach ($editors->result_array() as $ed) {
$ivp['editors'][] = $ed;
}
}
}

Expand Down

0 comments on commit 0c5c848

Please sign in to comment.