Example #1
0
 /**
  * @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;
     }
 }
Example #2
0
 /**
  * Returns the uID for a page that is checked out.
  *
  * @return int
  */
 public function getCollectionCheckedOutUserID()
 {
     return parent::getCollectionCheckedOutUserID();
 }