]> git.mxchange.org Git - mailer.git/blobdiff - inc/install-functions.php
More fixes for new installer and script in general :(
[mailer.git] / inc / install-functions.php
index f6d75436b9fe615da6f8e0d9e2f853a4b0e6f051..b8db7c8dd1cee281654ce3784e01ea229ae87a00 100644 (file)
@@ -651,11 +651,14 @@ function isInstallerPostDatabaseConfigValid ($currentTab) {
                return FALSE;
        } // END - if
 
+       // Remove any previous flag
+       unsetSqlLinkUp(__FUNCTION__, __LINE__);
+
        // Try to connect to the database
-       $linkResource = SQL_CONNECT(postRequestElement('mysql_host'), postRequestElement('mysql_login'), postRequestElement('mysql_password1'), __FUNCTION__, __LINE__);
+       SQL_CONNECT(postRequestElement('mysql_host'), postRequestElement('mysql_login'), postRequestElement('mysql_password1'), __FUNCTION__, __LINE__);
 
        // Is the link up
-       if (!is_resource($linkResource)) {
+       if (!SQL_IS_LINK_UP()) {
                // Cannot connect to database
                $GLOBALS['installer_post_error'][$currentTab] = '{--INSTALLER_POST_DATABASE_CONNECT_ERROR--}';
                array_push($GLOBALS['installer_failed_fields'][$currentTab], 'mysql_login', 'mysql_password1', 'mysql_password2');