/** * @param Page $c */ public function refreshCollectionEdit(&$c) { if ($this->isLoggedIn() && $c->getCollectionCheckedOutUserID() == $this->getUserID()) { $app = Application::getFacadeApplication(); $db = $app['database']->connection(); $cID = $c->getCollectionID(); $dh = $app->make('helper/date'); $datetime = $dh->getOverridableNow(); $q = 'update Pages set cCheckedOutDatetimeLastEdit = ? where cID = ?'; $r = $db->executeQuery($q, array($datetime, $cID)); $c->cCheckedOutDatetimeLastEdit = $datetime; } }
/** * Returns the uID for a page that is checked out. * * @return int */ public function getCollectionCheckedOutUserID() { return parent::getCollectionCheckedOutUserID(); }