mirror of
https://github.com/Deutscher-Tischfussballbund/com_sportsmanager.git
synced 2026-06-10 14:37:52 +00:00
Add symboltitel to json output
This commit is contained in:
@@ -16458,6 +16458,23 @@ function adminVereineImportBilder() {
|
||||
HTML_sportsmanager_admin::adminVereineImportBilderBericht($anzahlVereine, $neue_bilder_alle);
|
||||
}
|
||||
|
||||
|
||||
function adminTerminePrepareJSON($termin){
|
||||
return [
|
||||
"bestaetigt" => $termin->bestaetigt,
|
||||
"erster_tag" => $termin->erster_tag,
|
||||
"letzter_tag" => $termin->letzter_tag,
|
||||
"bezeichnung" => $termin->bezeichnung,
|
||||
"tischtyp" => !empty($termin->symboltitel) ? $termin->symboltitel : '',
|
||||
"ort" => $termin->ort,
|
||||
"land" => $termin->land,
|
||||
"zusaetze" => $termin->zusaetze,
|
||||
"url" => $termin->url,
|
||||
"ergebnisse_url" => $termin->ergebnisse_url,
|
||||
"email" => $termin->email,
|
||||
];
|
||||
}
|
||||
|
||||
function adminTermine($admin_uebersicht) {
|
||||
$db =& getDatabase();
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
@@ -16497,9 +16514,11 @@ function adminTermine($admin_uebersicht) {
|
||||
|
||||
$query = "SELECT *, DATEDIFF(erster_tag, NOW()) AS datumsdifferenz, GROUP_CONCAT(zusatz ORDER BY zusatz SEPARATOR ', ') AS zusaetze"
|
||||
. "\n FROM #__sportsmanager_termin"
|
||||
. "\n INNER JOIN #__sportsmanager_termin_aktion USING (termin_id)"
|
||||
. "\n INNER JOIN #__sportsmanager_termin_aktion AS ta USING (termin_id)"
|
||||
. "\n LEFT JOIN #__sportsmanager_termin_zusatz USING (termin_id)"
|
||||
. "\n WHERE YEAR(erster_tag) = '$filter_jahr' AND status = 0 AND (typ = 0 OR typ = 1)";
|
||||
. "\n LEFT JOIN #__sportsmanager_termin_symbolanzeige USING (termin_id)"
|
||||
. "\n LEFT JOIN #__sportsmanager_termin_symbol USING (termin_symbol_id)"
|
||||
. "\n WHERE YEAR(erster_tag) = '$filter_jahr' AND ta.status = 0 AND (typ = 0 OR typ = 1)";
|
||||
if (!empty($filter_veranstaltung))
|
||||
$query .= " AND bezeichnung = '" . $db->escape($filter_veranstaltung) . "'";
|
||||
if (!empty($filter_zusatz))
|
||||
@@ -16585,25 +16604,10 @@ function adminTermine($admin_uebersicht) {
|
||||
$laender = $db->loadObjectList();
|
||||
|
||||
if (isJson()) {
|
||||
$jsonexport = array_map(
|
||||
function ($termin) {
|
||||
return [
|
||||
"bestaetigt" => $termin->bestaetigt,
|
||||
"erster_tag" => $termin->erster_tag,
|
||||
"letzter_tag" => $termin->letzter_tag,
|
||||
"bezeichnung" => $termin->bezeichnung,
|
||||
"ort" => $termin->ort,
|
||||
"land" => $termin->land,
|
||||
"zusaetze" => $termin->zusaetze,
|
||||
"url" => $termin->url,
|
||||
"ergebnisse_url" => $termin->ergebnisse_url,
|
||||
"email" => $termin->email,
|
||||
];
|
||||
}, $termine);
|
||||
$jsonexport = array_map('adminTerminePrepareJSON', $termine);
|
||||
JSON_sportsmanager::JSON($jsonexport);
|
||||
} else {
|
||||
$sm_admin = new HTML_sportsmanager_admin();
|
||||
$sm_admin->adminTermine($termine, $termineSymbole, $jahre, $filter_jahr, $filter_veranstaltung, $filter_zusatz, $filter_land, $veranstaltungen, $zusaetze, $laender, $anzahl_beantragte_termine, $zugriffsebene, $admin_uebersicht, isExternalDatabase());
|
||||
HTML_sportsmanager_admin::adminTermine($termine, $termineSymbole, $jahre, $filter_jahr, $filter_veranstaltung, $filter_zusatz, $filter_land, $veranstaltungen, $zusaetze, $laender, $anzahl_beantragte_termine, $zugriffsebene, $admin_uebersicht, isExternalDatabase());
|
||||
|
||||
if (!$admin_uebersicht) {
|
||||
administrationFooter();
|
||||
|
||||
Reference in New Issue
Block a user