Shortened an if statement to p ? x : y

This commit is contained in:
Rudi Grinberg 2012-09-11 14:05:40 -04:00
parent 5a90521107
commit 1afdcb8c2d
1 changed files with 2 additions and 6 deletions

View File

@ -192,12 +192,8 @@ class Application_Model_Datatables
$r['length'] = $pl->getLength();
} elseif ($r['ftype'] == "block") {
$bl = new Application_Model_Block($r['id']);
if ($bl->isStatic()) {
$r['bl_type'] = 'static';
} else {
$r['bl_type'] = 'dynamic';
}
$r['length'] = $bl->getLength();
$r['bl_type'] = $bl->isStatic() ? 'static' : 'dynamic';
$r['length'] = $bl->getLength();
}
}
}