mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-26 00:54:27 +00:00
Merge branch 'master' into permissions
This commit is contained in:
@@ -7,7 +7,7 @@ class Extensions_model extends DB_Model
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
parent::__construct('system');
|
||||
$this->dbTable = 'system.tbl_extensions';
|
||||
$this->pk = 'extension_id';
|
||||
}
|
||||
|
||||
@@ -54,4 +54,21 @@ class Phrase_model extends DB_Model
|
||||
|
||||
return $this->execQuery($query, $parametersArray);
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads phrases using category(s) and language as keys
|
||||
* The retrived fields are category, phrase, orgeinheit_kurzbz, orgform_kurzbz and text
|
||||
* They are ordered by p.category, p.phrase, pt.orgeinheit_kurzbz DESC and pt.orgform_kurzbz DESC'
|
||||
*/
|
||||
public function getPhrasesByCategoryAndLanguage($categories, $language)
|
||||
{
|
||||
$query = 'SELECT p.category, p.phrase, pt.orgeinheit_kurzbz, pt.orgform_kurzbz, pt.text
|
||||
FROM system.tbl_phrase p
|
||||
INNER JOIN system.tbl_phrasentext pt USING(phrase_id)
|
||||
WHERE p.category IN ?
|
||||
AND pt.sprache = ?
|
||||
ORDER BY p.category, p.phrase, pt.orgeinheit_kurzbz DESC, pt.orgform_kurzbz DESC';
|
||||
|
||||
return $this->execQuery($query, array($categories, $language));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user