CMS zeigt nun die vorherige Englische Version an, wenn die höchste Deutsche Version in Englisch nicht vorhanden ist. Bisher wurde die englische Version in diesen Fällen nicht angezeigt.

This commit is contained in:
Andreas Österreicher
2014-03-05 13:05:35 +00:00
parent ff12296627
commit b478d1f3b6
3 changed files with 134 additions and 55 deletions
+18 -4
View File
@@ -1393,16 +1393,30 @@ class content extends basis_db
NOT EXISTS(SELECT * FROM campus.tbl_contentsprache
WHERE
content_id=".$this->db_add_param($id, FHC_INTEGER)."
AND sprache=".$this->db_add_param($sprache).")))";
AND sprache=".$this->db_add_param($sprache);
$qry.=")))";
if($sichtbar)
$qry.=" AND sichtbar=true";
//Hoechste (sichtbare) Version
$qry.=" AND version=(SELECT max(version) FROM campus.tbl_contentsprache
$qry.=" AND (version=(SELECT max(version) FROM campus.tbl_contentsprache
WHERE content_id=".$this->db_add_param($id, FHC_INTEGER);
//." AND tbl_contentsprache.sprache=".$this->db_add_param($sprache);
$qry.=" AND tbl_contentsprache.sprache=".$this->db_add_param($sprache);
if($sichtbar)
$qry.=" AND sichtbar=true";
$qry.=")";
$qry.=")
OR
((SELECT max(version) FROM campus.tbl_contentsprache
WHERE content_id=".$this->db_add_param($id, FHC_INTEGER);
$qry.=" AND tbl_contentsprache.sprache=".$this->db_add_param($sprache);
if($sichtbar)
$qry.=" AND sichtbar=true";
$qry.=") is null
AND version = (SELECT max(version) FROM campus.tbl_contentsprache
WHERE content_id=".$this->db_add_param($id, FHC_INTEGER);
$qry.=" AND tbl_contentsprache.sprache=".$this->db_add_param(DEFAULT_LANGUAGE);
if($sichtbar)
$qry.=" AND sichtbar=true";
$qry.=")))";
}
if($result = $this->db_query($qry))