Indefero

Indefero Commit Details


Date:2011-12-23 19:56:11 (12 years 11 months ago)
Author:Thomas Keller
Branch:develop, release-1.3
Commit:ff7704678306a1bd3e4c5e9227aa61d97b40c2cf
Parents: 6e305eb5418a8690b9b6f5de2a0b457954376a88
Message:getOne checks for uniqueness, but its perfectly valid to have more than a single check, do'h!

Changes:

File differences

src/IDF/ProjectActivity.php
6969
7070
7171
72
73
74
72
73
74
7575
7676
7777
{
$prj = $this->get_project();
$sql = new Pluf_SQL('project=%s', array($prj->id));
$latest = Pluf::factory('IDF_ProjectActivity')->getOne(array('filter' => $sql->gen(), 'order' => 'date desc'));
if ($prj->current_activity != $latest->id) {
$prj->current_activity = $latest;
$list = Pluf::factory('IDF_ProjectActivity')->getList(array('filter' => $sql->gen(), 'order' => 'date desc'));
if (count($list) > 0 && $prj->current_activity != $list[0]->id) {
$prj->current_activity = $list[0];
$prj->update();
}
}

Archive Download the corresponding diff file

Page rendered in 0.07344s using 13 queries.