diff --git a/panels/mensaPlan/gericht.php b/panels/mensaPlan/gericht.php index 3d4ca023ce3a4e6e1d29d8a7b568bd740a5b0c17..d020b7b72a886088fb38e0e5e8557b7b659b925b 100644 --- a/panels/mensaPlan/gericht.php +++ b/panels/mensaPlan/gericht.php @@ -272,16 +272,16 @@ class GERICHT { public function toJson($inc_original = true, $inc_short = true, $inc_art = true, $inc_kind = true, $inc_img = true, $inc_stoffe = true, $inc_date = true) { $json = "{"; if ($inc_original) { - $json .= '"originalText": "' . $this->originalText; + $json .= '"originalText": "' . $this->originalText . '"'; } if ($inc_original && ($inc_short || $inc_art || $inc_kind || $inc_img || $inc_stoffe || $inc_date)) { - $json .= '",'; + $json .= ','; } if ($inc_short) { - $json .= '"shortText": "' . $this->shortText; + $json .= '"shortText": "' . $this->shortText . '"'; } if ($inc_short && ($inc_art || $inc_kind || $inc_img || $inc_stoffe || $inc_date)) { - $json .= '",'; + $json .= ','; } if ($inc_art) { $json .= '"rind":' . $this->rind; @@ -294,22 +294,22 @@ class GERICHT { $json .= '",'; $json .= '"vegetarisch":' . $this->vegetarisch; $json .= '",'; - $json .= '"vegan":' . $this->vegan; + $json .= '"vegan":' . $this->vegan . '"'; } if ($inc_art && ($inc_kind || $inc_img || $inc_stoffe || $inc_date)) { - $json .= '",'; + $json .= ','; } if ($inc_kind) { - $json .= '"kinderteller":' . $this->kinderteller; + $json .= '"kinderteller":' . $this->kinderteller . '"'; } if ($inc_kind && ($inc_img || $inc_stoffe || $inc_date)) { - $json .= '",'; + $json .= ','; } if ($inc_img) { - $json .= '"image": "' . $this->image; + $json .= '"image": "' . $this->image . '"'; } if ($inc_img && ($inc_stoffe || $inc_date)) { - $json .= '",'; + $json .= ','; } if ($inc_stoffe) { $json .= '"zusatzStoffe": {' . '"0":' . $this->zusatzStoffe [0] . ',' . '"1":' . $this->zusatzStoffe [1] . ',' . '"2":' . $this->zusatzStoffe [2] . ',' . '"3":' . $this->zusatzStoffe [3] . ',' . '"4":' . $this->zusatzStoffe [4] . ',' . '"5":' . $this->zusatzStoffe [5] . ',' . '"6":' . $this->zusatzStoffe [6] . ',' . '"7":' . $this->zusatzStoffe [7] . ',' . '"8":' . $this->zusatzStoffe [8] . ',' . '"9":' . $this->zusatzStoffe [9] . ',' . '"10":' . $this->zusatzStoffe [10] . ',' . '"11":' . $this->zusatzStoffe [11] . ',' . '"12":' . $this->zusatzStoffe [12] . ',' . '"13":' . $this->zusatzStoffe [13] . ',' . '"14":' . $this->zusatzStoffe [14] . ',' . '"15":' . $this->zusatzStoffe [15] . ',' . '"16":' . $this->zusatzStoffe [16] . ',' . '"17":' . $this->zusatzStoffe [17] . ',' . '"18":' . $this->zusatzStoffe [18] . ',' . '"19":' . $this->zusatzStoffe [19] . ',' . '"20":' . $this->zusatzStoffe [20] . ',' . '"21":' . $this->zusatzStoffe [21] . ',' . '"22":' . $this->zusatzStoffe [22] . ',' . '"23":' . $this->zusatzStoffe [23] . ',' . '"24":' . $this->zusatzStoffe [24] . ',' . '"25":' . $this->zusatzStoffe [25] . ',' . '"26":' . $this->zusatzStoffe [26] . ',' . '"27":' . $this->zusatzStoffe [27] . ',' . '"28":' . $this->zusatzStoffe [28] . ',' . '"29":' . $this->zusatzStoffe [29] . ',' . '"30":' . $this->zusatzStoffe [30] . ',' . '"31":' . $this->zusatzStoffe [31] . ',' . '"32":' . $this->zusatzStoffe [32] . ',' . '"33":' . $this->zusatzStoffe [33] . '}';