mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-16 14:32:18 +00:00
changes the db query and adopts the layout of the Vue component to show the correct betreff and content of the news
This commit is contained in:
@@ -20,8 +20,12 @@ class News_model extends DB_Model
|
||||
public function getAll($limit = null)
|
||||
{
|
||||
$this->addJoin("campus.tbl_content","content_id");
|
||||
return $this->loadWhere('
|
||||
text IS NOT NULL
|
||||
return $this->execReadOnlyQuery('
|
||||
SELECT *
|
||||
FROM campus.tbl_news
|
||||
JOIN campus.tbl_content content ON content.content_id = campus.tbl_news.content_id
|
||||
WHERE
|
||||
--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