]> git.mxchange.org Git - mailer.git/blobdiff - inc/install-inc.php
Surfbar continued and some rewrites/fixes:
[mailer.git] / inc / install-inc.php
index 80f4686904fdc7ba1e97d6201ec4e45233a0a4c0..f9ce4811d86f8057fe55d2c55be8cad977485725 100644 (file)
@@ -104,7 +104,7 @@ if (isset($_POST['mysql']) && is_array($_POST['mysql'])) $mysql = $_POST['mysql'
 if (URL != "http://your-server.com") {
        // Already installed???
        $burl = URL;
-} elseif ($burl == "") {
+} elseif (empty($burl)) {
        // Auto-detect URL
        $burl = "http://".$SERVER_NAME.$_SERVER['PHP_SELF'];
        $burl = substr($burl, 0, strpos($burl, "install.php"));
@@ -136,7 +136,7 @@ if ((isset($_GET['page']) && ($_GET['page'] == 5))) {
 }
 
 // Is MXChange installed or no admin registered so far?
-if ((!defined('mxchange_installed')) || (!defined('admin_registered')))
+if ((!isBooleanConstantAndTrue('mxchange_installed')) || (!isBooleanConstantAndTrue('admin_registered')))
 {
        // Set URL for FORM actions
        define('__BURL_ACTION', $burl);
@@ -331,7 +331,7 @@ if ((!defined('mxchange_installed')) || (!defined('admin_registered')))
                break;
 
        case "finalize": // Write captured data to files
-               if ((!empty($_POST['finalize'])) && (!defined('mxchange_installed'))) {
+               if ((!empty($_POST['finalize'])) && (!isBooleanConstantAndTrue('mxchange_installed'))) {
                        // You have submitted data then we have to reset the fatal messages
                        $FATAL = array(); $SQLs = array();
 
@@ -409,7 +409,7 @@ if ((!defined('mxchange_installed')) || (!defined('admin_registered')))
                                        }
                                }
                        }
-                       if ((sizeof($FATAL) > 0) || ($FATAL[0] != ''))
+                       if ((sizeof($FATAL) > 0) || ((isset($FATAL[0])) && ($FATAL[0] != '')))
                        {
                                $OUT = "";
                                foreach ($FATAL as $value)
@@ -479,6 +479,7 @@ if ((!defined('mxchange_installed')) || (!defined('admin_registered')))
                break;
 
        default:
+               DEBUG_LOG(__FILE__, __LINE__, sprintf("Wrong page %s detected.", $_GET['page']));
                OUTPUT_HTML("    <STRONG class=\"install_error\">".WRONG_PAGE."</STRONG>");
                break;
        }