Example #1
0
 /**
  * Get all the mailings which are send
  * @since 2.1 12-11-2010
  * @return array An array of pages
  */
 public function getSendMailings()
 {
     $sql = 'SELECT pageId, UNIX_TIMESTAMP(dateadded) as `dateadded` FROM mailqueue WHERE issend=2';
     $ids = $this->_conn->getFields($sql);
     $rows = $this->_conn->getRows($sql);
     $page = new Page();
     $result = $page->getPagesByIds($ids, true);
     if ($result) {
         foreach ($result as $page) {
             foreach ($rows as $row) {
                 if ($row->pageId == $page->pageId) {
                     $page->publicationdate = $row->dateadded;
                     break;
                 }
             }
         }
     }
     return $result;
 }