changeset 331:7e6ca29133bb misc

Show full mix "formula" if there are no known alloy combos.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 31 Dec 2015 03:05:39 +0200
parents 27356bea526a
children d6a03237017f
files materials/info.php
diffstat 1 files changed, 14 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/materials/info.php	Thu Dec 31 03:04:48 2015 +0200
+++ b/materials/info.php	Thu Dec 31 03:05:39 2015 +0200
@@ -254,25 +254,23 @@
       // No alloy combos known, show "generic" formula
       //
       echo "<p>No known alloy combinations.</p>\n";
-    }
+
+      $typeMats = [];
+      foreach ($matDataTable as $name => $data)
+      {
+        if ($data[14] == $matDataTable[$setShowMat][14] && $name != $setShowMat)
+          $typeMats[] = $name;
+      }
 
-/*
-    $typeMats = [];
-    foreach ($matDataTable as $name => $data)
-    {
-      if ($data[14] == $matDataTable[$setShowMat][14] && $name != $setShowMat)
-        $typeMats[] = $name;
+      echo "<p>Full mix: ";
+      if (list($a, $b) = each($typeMats))
+        echo stGetMatLink($b);
+          
+      while (list($a, $b) = each($typeMats))
+        echo " <b>+</b> ".stGetMatLink($b);
+      echo "</p>\n";
     }
 
-    echo "<p>Full mix: ";
-    if (list($a, $b) = each($typeMats))
-      echo stGetMatLink($b);
-        
-    while (list($a, $b) = each($typeMats))
-      echo " <b>+</b> ".stGetMatLink($b);
-    echo "</p>\n";
-*/
-
     //
     // Show mix table for this material
     //