diff --git a/application/controllers/api/frontend/v1/stv/Favorites.php b/application/controllers/api/frontend/v1/stv/Favorites.php index e651bf85e..8d7a6cd14 100644 --- a/application/controllers/api/frontend/v1/stv/Favorites.php +++ b/application/controllers/api/frontend/v1/stv/Favorites.php @@ -46,9 +46,9 @@ class Favorites extends FHCAPI_Controller $data = $this->getDataOrTerminateWithError($result); if (!$data) - $this->outputJson(null); + $this->terminateWithSuccess(null); else - $this->outputJson($data['stv_favorites']); + $this->terminateWithSuccess($data['stv_favorites']); } public function set() @@ -66,6 +66,6 @@ class Favorites extends FHCAPI_Controller $this->getDataOrTerminateWithError($result); - $this->outputJsonSuccess(true); + $this->terminateWithSuccess(true); } } diff --git a/application/controllers/api/frontend/v1/stv/Konto.php b/application/controllers/api/frontend/v1/stv/Konto.php index a4344889c..ac36b5d8f 100644 --- a/application/controllers/api/frontend/v1/stv/Konto.php +++ b/application/controllers/api/frontend/v1/stv/Konto.php @@ -246,11 +246,11 @@ class Konto extends FHCAPI_Controller if (isError($id)) { $this->addError(getError($id), self::ERROR_TYPE_DB); } else { - $data = $this->KontoModel->withAdditionalInfo()->load(getData($id)); - if (isError($data)) - $this->addError(getError($data), self::ERROR_TYPE_DB); + $kontodata = $this->KontoModel->withAdditionalInfo()->load(getData($id)); + if (isError($kontodata)) + $this->addError(getError($kontodata), self::ERROR_TYPE_DB); else - $result[] = current(getData($data)); + $result[] = current(getData($kontodata)); } } diff --git a/system/dbupdate_3.4.php b/system/dbupdate_3.4.php index f728910e9..11880fd55 100644 --- a/system/dbupdate_3.4.php +++ b/system/dbupdate_3.4.php @@ -57,6 +57,7 @@ require_once('dbupdate_3.4/34543_ux_template.php'); require_once('dbupdate_3.4/17513_Entwicklungsteam.php'); require_once('dbupdate_3.4/28575_softwarebereitstellung.php'); require_once('dbupdate_3.4/41150_oe-pfad_db_view.php'); +require_once('dbupdate_3.4/44031_stv_favorites.php'); // *** Pruefung und hinzufuegen der neuen Attribute und Tabellen echo '

Pruefe Tabellen und Attribute!

'; diff --git a/system/dbupdate_3.4/44031_stv_favorites.php b/system/dbupdate_3.4/44031_stv_favorites.php new file mode 100644 index 000000000..473001c68 --- /dev/null +++ b/system/dbupdate_3.4/44031_stv_favorites.php @@ -0,0 +1,16 @@ +db_query("SELECT 1 FROM public.tbl_variablenname WHERE name = 'stv_favorites';")) +{ + if ($db->db_num_rows($result) == 0) + { + $qry = "INSERT INTO public.tbl_variablenname(name, defaultwert) VALUES('stv_favorites', null);"; + + if (!$db->db_query($qry)) + echo 'public.tbl_variablenname '.$db->db_last_error().'
'; + else + echo 'public.tbl_variablenname: Added name "stv_favorites"
'; + } +}