must have functions/i18n.php available to use $squirrelmail_language further
[squirrelmail.git] / src / configtest.php
index d0080d53f1796331586124e3a35c019c7bbe8222..bcd2d2de9b0d8e50a39d23dfcbdd3a0621564f2e 100644 (file)
@@ -46,7 +46,8 @@ if (file_exists(SM_PATH . 'config/config.php')) {
     include(SM_PATH . 'config/config.php');
     include(SM_PATH . 'functions/strings.php');
 }
-?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+  "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
 <html>
 <head>
     <meta name="robots" content="noindex,nofollow">
@@ -92,7 +93,10 @@ echo "<p><table>\n<tr><td>SquirrelMail version:</td><td><b>" . $version . "</b><
          date ('d F Y H:i:s', filemtime(SM_PATH . 'config/config.php')) .
          "</b></td></tr>\n</table>\n</p>\n\n";
 
-/* TODO: check $config_version here */
+/* check $config_version */
+if ($config_version!='1.4.0') {
+    do_err('Configuration file version does not match required version. Please update your configuration file.');
+}
 
 echo "Checking PHP configuration...<br />\n";
 
@@ -392,7 +396,7 @@ while ($line=fgets($stream, 1024)){
 /* don't display capabilities before STARTTLS */
 if ($use_imap_tls==2 && stristr($capline, 'STARTTLS') === false) {
     do_err('Your server doesn\'t support STARTTLS.');
-} else {
+} elseif($use_imap_tls==2) {
     /* try starting starttls */
     fwrite($stream,"A002 STARTTLS\r\n");
     $starttls_line=fgets($stream, 1024);