]> git.mxchange.org Git - mailer.git/blobdiff - inc/install-functions.php
But only when it is not empty
[mailer.git] / inc / install-functions.php
index f6d75436b9fe615da6f8e0d9e2f853a4b0e6f051..85b3b9c54e939b878883d0b3ea4e941e635eab81 100644 (file)
@@ -16,7 +16,7 @@
  * $Author::                                                          $ *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009 - 2012 by Mailer Developer Team                   *
+ * Copyright (c) 2009 - 2013 by Mailer Developer Team                   *
  * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -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');