mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-23 09:52:22 +00:00
Added Url Widget
This commit is contained in:
@@ -11,4 +11,18 @@ class News_model extends DB_Model
|
||||
$this->dbTable = 'campus.tbl_news';
|
||||
$this->pk = 'news_id';
|
||||
}
|
||||
|
||||
public function getAll($limit = null)
|
||||
{
|
||||
// TODO check ob über content table. Aktuell sind die news texte NULL, deshalb über content table holen.
|
||||
// $this->addJoin('campus.tbl_content', 'content_id');
|
||||
// $this->addJoin('campus.tbl_contentsprache', 'content_id');
|
||||
|
||||
return $this->loadWhere('
|
||||
text IS NOT NULL
|
||||
AND datum <= NOW() AND (datum_bis IS NULL OR datum_bis >= now()::date)
|
||||
ORDER BY datum DESC
|
||||
LIMIT '. $this->escape($limit)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user