mirror of
https://github.com/Deutscher-Tischfussballbund/com_sportsmanager.git
synced 2026-06-10 06:27: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);
|
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) {
|
function adminTermine($admin_uebersicht) {
|
||||||
$db =& getDatabase();
|
$db =& getDatabase();
|
||||||
$jinput = JFactory::getApplication()->input;
|
$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"
|
$query = "SELECT *, DATEDIFF(erster_tag, NOW()) AS datumsdifferenz, GROUP_CONCAT(zusatz ORDER BY zusatz SEPARATOR ', ') AS zusaetze"
|
||||||
. "\n FROM #__sportsmanager_termin"
|
. "\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 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))
|
if (!empty($filter_veranstaltung))
|
||||||
$query .= " AND bezeichnung = '" . $db->escape($filter_veranstaltung) . "'";
|
$query .= " AND bezeichnung = '" . $db->escape($filter_veranstaltung) . "'";
|
||||||
if (!empty($filter_zusatz))
|
if (!empty($filter_zusatz))
|
||||||
@@ -16585,25 +16604,10 @@ function adminTermine($admin_uebersicht) {
|
|||||||
$laender = $db->loadObjectList();
|
$laender = $db->loadObjectList();
|
||||||
|
|
||||||
if (isJson()) {
|
if (isJson()) {
|
||||||
$jsonexport = array_map(
|
$jsonexport = array_map('adminTerminePrepareJSON', $termine);
|
||||||
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);
|
|
||||||
JSON_sportsmanager::JSON($jsonexport);
|
JSON_sportsmanager::JSON($jsonexport);
|
||||||
} else {
|
} else {
|
||||||
$sm_admin = new HTML_sportsmanager_admin();
|
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());
|
||||||
$sm_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) {
|
if (!$admin_uebersicht) {
|
||||||
administrationFooter();
|
administrationFooter();
|
||||||
|
|||||||
Reference in New Issue
Block a user