tmake sure all depths are set before writing the php output file - cosmo - front and backend for Markov-Chain Monte Carlo inversion of cosmogenic nuclide concentrations (HTM) git clone git://src.adamsgaard.dk/cosmo (DIR) Log (DIR) Files (DIR) Refs (DIR) README (DIR) LICENSE --- (DIR) commit 6be67ba3b54f4b63cce286d9b432807f437a8494 (DIR) parent 37dfba641e7fb914e7301b9e0957ac17fb22e3f9 (HTM) Author: Anders Damsgaard <anders.damsgaard@geo.au.dk> Date: Wed, 18 Nov 2015 14:31:48 +0100 make sure all depths are set before writing the php output file Diffstat: M uploadhistory.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+), 0 deletions(-) --- (DIR) diff --git a/uploadhistory.php b/uploadhistory.php t@@ -165,6 +165,21 @@ if (count($missing_fields) > 0) { die(); } +// The matlab scripts need all depths, even for unused isotopes. Use the value +// 0.0 if the depth isn't set +if (!isset($_POST['be_zobs']) || $_POST['be_zobs'] == '') { + $_POST['be_zobs'] = 0.0; +} +if (!isset($_POST['al_zobs']) || $_POST['al_zobs'] == '') { + $_POST['al_zobs'] = 0.0; +} +if (!isset($_POST['c_zobs']) || $_POST['c_zobs'] == '') { + $_POST['c_zobs'] = 0.0; +} +if (!isset($_POST['ne_zobs']) || $_POST['ne_zobs'] == '') { + $_POST['ne_zobs'] = 0.0; +} + // If this is reached, input is ok and it is time to write the file for matlab