/** * @param int $cID * @param mixed $version 'RECENT'|'ACTIVE'|version id * * @return Collection */ public static function getByID($cID, $version = 'RECENT') { $db = Loader::db(); $q = 'select Collections.cDateAdded, Collections.cDateModified, Collections.cID from Collections where cID = ?'; $row = $db->getRow($q, array($cID)); $c = new self(); $c->setPropertiesFromArray($row); if ($version != false) { // we don't do this on the front page $c->loadVersionObject($version); } return $c; }