FHC Helper

This commit is contained in:
Paminger
2016-06-29 08:41:02 +02:00
parent 6af45f99f6
commit 9a44c818ea
31 changed files with 957 additions and 71 deletions
+7 -7
View File
@@ -8,7 +8,7 @@ class Phrase_model extends DB_Model
public function __construct()
{
parent::__construct();
$this->dbTable = 'public.tbl_phrase';
$this->dbTable = 'system.tbl_phrase';
$this->pk = 'phrase_id';
}
@@ -18,10 +18,10 @@ class Phrase_model extends DB_Model
public function getPhrases($app, $sprache, $phrase = null, $orgeinheit_kurzbz = null, $orgform_kurzbz = null)
{
// Checks if the operation is permitted by the API caller
if (! $this->fhc_db_acl->isBerechtigt($this->acl['public.tbl_phrase'], 's'))
return $this->_error(lang('fhc_'.FHC_NORIGHT).' -> '.$this->acl['public.tbl_phrase'], FHC_MODEL_ERROR);
if (! $this->fhc_db_acl->isBerechtigt($this->acl['public.tbl_phrase_inhalt'], 's'))
return $this->_error(lang('fhc_'.FHC_NORIGHT).' -> '.$this->acl['public.tbl_phrase_inhalt'], FHC_MODEL_ERROR);
if (! $this->fhc_db_acl->isBerechtigt($this->acl['system.tbl_phrase'], 's'))
return $this->_error(lang('fhc_'.FHC_NORIGHT).' -> '.$this->acl['system.tbl_phrase'], FHC_MODEL_ERROR);
if (! $this->fhc_db_acl->isBerechtigt($this->acl['system.tbl_phrase_inhalt'], 's'))
return $this->_error(lang('fhc_'.FHC_NORIGHT).' -> '.$this->acl['system.tbl_phrase_inhalt'], FHC_MODEL_ERROR);
$parametersArray = array('app' => $app, 'sprache' => $sprache);
@@ -30,7 +30,7 @@ class Phrase_model extends DB_Model
orgeinheit_kurzbz,
orgform_kurzbz,
text
FROM public.tbl_phrase JOIN public.tbl_phrase_inhalt USING (phrase_id)
FROM system.tbl_phrase JOIN system.tbl_phrase_inhalt USING (phrase_id)
WHERE app = ? AND sprache = ?';
if (isset($phrase))
@@ -65,4 +65,4 @@ class Phrase_model extends DB_Model
else
return $this->_error($this->db->error(), FHC_DB_ERROR);
}
}
}