Überprüfung beim Sprachwechsel hinzugefügt. Bei Fehlerhafter Sprachübergabe wird die Defaultsprache verwendet

This commit is contained in:
Andreas Österreicher
2013-01-23 13:55:47 +00:00
parent c2fb972575
commit 366915f03a
2 changed files with 21 additions and 11 deletions
+18 -10
View File
@@ -58,19 +58,27 @@ class sprache extends basis_db
{
$qry = "SELECT * FROM public.tbl_sprache WHERE sprache=".$this->db_add_param($sprache, FHC_STRING, false).";";
if(!$this->db_query($qry))
if($this->db_query($qry))
{
if($row = $this->db_fetch_object())
{
$this->sprache = $row->sprache;
$this->locale = $row->locale;
$this->index = $row->index;
$this->content = $this->db_parse_bool($row->content);
return true;
}
else
{
$this->errormsg = 'Sprache nicht gefunden';
return false;
}
}
else
{
$this->errormsg = "Fehler bei der Abfrage.";
return false;
return false;
}
if($row = $this->db_fetch_object())
{
$this->sprache = $row->sprache;
$this->locale = $row->locale;
$this->index = $row->index;
$this->content = $this->db_parse_bool($row->content);
}
return true;
}
/**