install/index.php
changeset 568 3700f7124c2b
parent 536 218a627eb53e
child 589 88d4ed0a2898
--- a/install/index.php	Mon Jun 09 20:52:34 2008 -0400
+++ b/install/index.php	Tue Jun 10 00:21:34 2008 -0400
@@ -36,6 +36,9 @@
   require('includes/common.php');
 }
 
+// are we in PHP5?
+define('HAVE_PHP5', version_compare(PHP_VERSION, '5.0.0', '>='));
+
 ?>
 
           <div id="installnotice">
@@ -112,7 +115,18 @@
                   }
                   else
                   {
-                    echo '<li><a href="upgrade.php" class="upgrade icon">Upgrade</a></li>';
+                    if ( HAVE_PHP5 && !isset($_GET['debug_warn_php4']) )
+                      echo '<li><a href="upgrade.php" class="upgrade icon">Upgrade</a></li>';
+                    else
+                      echo '<li>
+                    <span class="upgrade-disabled icon icon-disabled">
+                      Upgrade
+                      <small>
+                        Your server doesn\'t have PHP 5 or later installed. Enano 1.2 does not have support for PHP 4.
+                        <a href="install.php?debug_warn_php4">Learn more &raquo;</a>
+                      </small> <!-- CSS takes care of making this position properly -->
+                    </span>
+                  </li>';
                   }
                   endif;
                   ?>