place login form elements before login button. #1245070.
[squirrelmail.git] / src / configtest.php
index e5d11de34bf2b3789675aa1086c7fe191fe28623..1710aade294f05b0d9eb803589af42a4f0dca0b8 100644 (file)
@@ -50,6 +50,7 @@ if (file_exists(SM_PATH . 'config/config.php')) {
 ?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html>
 <head>
+    <meta name="robots" content="noindex,nofollow">
     <title>SquirrelMail configtest</title>
 </head>
 <body>
@@ -78,7 +79,7 @@ if(!in_array('strings.php', $included)) {
 if (! $allow_remote_configtest) {
     sqGetGlobalVar('REMOTE_ADDR',$client_ip,SQ_SERVER);
     if (! isset($client_ip) || $client_ip!='127.0.0.1') {
-       do_err('Enable "Allow remote configtest" option in squirrelmail configuration in order to use this script.');
+        do_err('Enable "Allow remote configtest" option in squirrelmail configuration in order to use this script.');
     }
 }
 /* checking PHP specs */
@@ -205,12 +206,12 @@ echo $IND . "Themes OK.<br />\n";
 if ( $squirrelmail_default_language != 'en_US' ) {
     $loc_path = SM_PATH .'locale/'.$squirrelmail_default_language.'/LC_MESSAGES/squirrelmail.mo';
     if( ! file_exists( $loc_path ) ) {
-        do_err('You have set <i>' . $squirrelmail_default_language . 
+        do_err('You have set <i>' . $squirrelmail_default_language .
             '</i> as your default language, but I cannot find this translation (should be '.
             'in <tt>' . $loc_path . '</tt>). Please note that you have to download translations '.
             'separately from the main SquirrelMail package.', FALSE);
     } elseif ( ! is_readable( $loc_path ) ) {
-        do_err('You have set <i>' . $squirrelmail_default_language . 
+        do_err('You have set <i>' . $squirrelmail_default_language .
             '</i> as your default language, but I cannot read this translation (file '.
             'in <tt>' . $loc_path . '</tt> unreadable).', FALSE);
     } else {
@@ -350,7 +351,7 @@ if (function_exists('mb_detect_encoding')) {
 echo "$IND recode - ";
 if (function_exists('recode')) {
     echo "Recode functions are available.<br />\n";
-} elseif ($use_php_recode) {
+} elseif (isset($use_php_recode) && $use_php_recode) {
     echo "Recode functions are unavailable.<br />\n";
     do_err('Your configuration requires recode support, but recode support is missing.');
 } else {
@@ -359,7 +360,7 @@ if (function_exists('recode')) {
 echo "$IND iconv - ";
 if (function_exists('iconv')) {
     echo "Iconv functions are available.<br />\n";
-} elseif ($use_php_iconv) {
+} elseif (isset($use_php_iconv) && $use_php_iconv) {
     echo "Iconv functions are unavailable.<br />\n";
     do_err('Your configuration requires iconv support, but iconv support is missing.');
 } else {
@@ -410,7 +411,8 @@ if($addrbook_dsn || $prefs_dsn || $addrbook_global_dsn) {
         }
 
         foreach($dsns as $type => $dsn) {
-            $dbtype = array_shift(explode(':', $dsn));
+            $aDsn = explode(':', $dsn);
+            $dbtype = array_shift($aDsn);
             if(isset($db_functions[$dbtype]) && function_exists($db_functions[$dbtype])) {
                 echo "$IND$dbtype database support present.<br />\n";
 
@@ -425,7 +427,7 @@ if($addrbook_dsn || $prefs_dsn || $addrbook_global_dsn) {
                 echo "$IND$type database connect successful.<br />\n";
 
             } else {
-                do_err($db.' database support not present!');
+                do_err($dbtype.' database support not present!');
             }
         }
     } else {
@@ -478,6 +480,7 @@ if( empty($ldap_server) ) {
         }
     }
 }
+
 ?>
 
 <p>Congratulations, your SquirrelMail setup looks fine to me!</p>
@@ -485,7 +488,4 @@ if( empty($ldap_server) ) {
 <p><a href="login.php">Login now</a></p>
 
 </body>
-</html>
-<?php
-// vim: et ts=4
-?>
+</html>
\ No newline at end of file