예제 #1
0
 public function addRevision(SxCms_Page_Revision $rev)
 {
     $this->revisions[$rev->getId()] = $rev;
     return $this;
 }
예제 #2
0
 public function getPageRevisions($pageId, $language = 'nl')
 {
     $db = Zend_Registry::get('db');
     $select = $db->select()->from(array('p' => 'Page'), array('*'))->join(array('t' => 'PageRev'), 'p.page_id = t.page_id')->where('p.page_id = ?', $pageId)->where('t.language = ?', $language)->order('t.revision_id DESC');
     $stmt = $db->query($select);
     $result = $stmt->fetchAll();
     $revisions = array();
     foreach ($result as $revision) {
         $rev = new SxCms_Page_Revision();
         $rev->setFromArray($revision);
         $revisions[$rev->getId()] = $rev;
     }
     return $revisions;
 }