www/import/from_brouwhulp.php

changeset 213
b0d484a5525e
parent 209
dc30801e6961
child 217
318aab371497
--- a/www/import/from_brouwhulp.php	Sat Jan 26 19:25:10 2019 +0100
+++ b/www/import/from_brouwhulp.php	Sat Jan 26 22:01:11 2019 +0100
@@ -573,9 +573,14 @@
 					$steps .= ',';
 				$comma = TRUE;
 				$steps .= '{"step_name":"' . mysqli_real_escape_string($db, $step->NAME) . '"';
-				if ($step->TYPE) {
-					$steps .= ',"step_type":"' . $step->TYPE . '"';
-				}
+				if ($step->TYPE == 'Infusion')
+					$steps .= ',"step_type":"0"';
+				else if ($step->TYPE == 'Temperature')
+					$steps .= ',"step_type":"1"';
+				else if ($step->TYPE == 'Decoction')
+					$steps .= ',"step_type":"2"';
+				else
+					echo "Unknown step TYPE " . $step->TYPE . PHP_EOL;
 				if ($step->STEP_TEMP) {
 					$steps .= ',"step_temp":"' . floatval($step->STEP_TEMP) . '"';
 				}

mercurial