Some extra firstcap keywords

Sat, 02 Mar 2019 17:42:08 +0100

author
Michiel Broek <mbroek@mbse.eu>
date
Sat, 02 Mar 2019 17:42:08 +0100
changeset 308
a59413ba4057
parent 307
75f8b569043c
child 309
88ef2501b9a0

Some extra firstcap keywords

www/upl_recipe.php file | annotate | diff | comparison | revisions
--- a/www/upl_recipe.php	Sat Mar 02 17:32:50 2019 +0100
+++ b/www/upl_recipe.php	Sat Mar 02 17:42:08 2019 +0100
@@ -167,7 +167,7 @@
 			$fermentables .= ',"f_type":1';
 		else if ($fermentable->TYPE == 'Extract')
 			$fermentables .= ',"f_type":2';
-		else if ($fermentable->TYPE == 'Dry extract')
+		else if (($fermentable->TYPE == 'Dry extract') || ($fermentable->TYPE == 'Dry Extract'))
 			$fermentables .= ',"f_type":3';
 		else if ($fermentable->TYPE == 'Adjunct')
 			$fermentables .= ',"f_type":4';
@@ -213,11 +213,11 @@
 			$fermentables .= ',"f_graintype":2';
 		else if ($fermentable->GRAINTYPE == 'Kilned')
 			$fermentables .= ',"f_graintype":3';
-		else if ($fermentable->GRAINTYPE == 'Sour malt')
+		else if (($fermentable->GRAINTYPE == 'Sour malt') || ($fermentable->GRAINTYPE == 'Sour Malt'))
 			$fermentables .= ',"f_graintype":4';
 		else if ($fermentable->GRAINTYPE == 'Special')
 			$fermentables .= ',"f_graintype":5';
-		else if ($fermentable->GRAINTYPE == 'No malt')
+		else if (($fermentable->GRAINTYPE == 'No malt') || ($fermentable->GRAINTYPE == 'No Malt'))
 			$fermentables .= ',"f_graintype":6';
 		else
 			$fermentables .= ',"f_graintype":0'; // Base, default
@@ -353,7 +353,7 @@
 			$miscs .= ',"m_cost":' . floatval($misc->COST);
 		} else {
 			/* Brouwhulp bug, added water agents have no cost field. */
-			if ($misc->TYPE == "Water agent") {
+			if (($misc->TYPE == "Water agent") || ($misc->TYPE == "Water Agent")) {
 				$miscs .= ',"m_cost":'. get_miscs_cost($mname);
 			} else {
 				$miscs .= ',"m_cost":0';
@@ -370,7 +370,7 @@
 			$miscs .= ',"m_type":3';
 		else if (($misc->TYPE == 'Water agent') || ($misc->TYPE == 'Water Agent'))
 			$miscs .= ',"m_type":4';
-		else if ($misc->TYPE == 'Yeast nutrient')
+		else if (($misc->TYPE == 'Yeast nutrient') || ($misc->TYPE == 'Yeast Nutrient'))
 			$miscs .= ',"m_type":5';
 		else if ($misc->TYPE == 'Other')
 			$miscs .= ',"m_type":6';

mercurial