Merge branch 'feature-39579/Studierendenverwaltung_stabilisieren'

This commit is contained in:
Harald Bamberger
2024-08-14 13:59:18 +02:00
4 changed files with 24 additions and 7 deletions
@@ -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);
}
}
@@ -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));
}
}
+1
View File
@@ -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 '<H2>Pruefe Tabellen und Attribute!</H2>';
@@ -0,0 +1,16 @@
<?php
if (!defined('DB_NAME')) exit('No direct script access allowed');
// Add new name type in public.tbl_variablenname
if ($result = @$db->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 '<strong>public.tbl_variablenname '.$db->db_last_error().'</strong><br>';
else
echo 'public.tbl_variablenname: Added name "stv_favorites"<br>';
}
}