]> git.mxchange.org Git - mailer.git/blobdiff - inc/db/lib-mysql3.php
Fixes for installation phase
[mailer.git] / inc / db / lib-mysql3.php
index d586a0aebe46452c2b443ded6a804cf381612d41..8715bc7b4a796de68afc2fa102a5526dc515936c 100644 (file)
@@ -718,7 +718,7 @@ function getLastSqlError () {
 }
 
 // Gets an array (or false if none is found) from all supported engines
-function getArrayFromSupportedSqlEngines ($support = 'YES') {
+function getArrayFromSupportedSqlEngines ($requestedEngine = 'ALL') {
        // Init array
        $engines = array();
 
@@ -726,16 +726,19 @@ function getArrayFromSupportedSqlEngines ($support = 'YES') {
        $result = SQL_QUERY('SHOW ENGINES', __FUNCTION__, __LINE__);
 
        // Are there entries? (Bad if not)
-       if (SQL_NUMROWS($result) > 0) {
+       if (!SQL_HASZERONUMS($result)) {
                // Load all and check for active entries
                while ($content = SQL_FETCHARRAY($result)) {
+                       // Debug message
+                       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'support=' . $requestedEngine . ',Engine=' . $content['Engine'] . ',Support=' . $content['Support']);
+
                        // Is this supported?
-                       if (($support == 'ALL') || ($content['Support'] == $support)) {
+                       if ((($requestedEngine == 'ALL') || ($content['Engine'] == $requestedEngine)) && (in_array($content['Support'], array('YES', 'DEFAULT')))) {
                                // Add it
                                array_push($engines, $content);
                        } elseif (isDebugModeEnabled()) {
                                // Log it away in debug mode
-                               logDebugMessage(__FUNCTION__, __LINE__, 'Engine ' . $content['Engine'] . ' is not supported (' . $content['Supported'] . ' - ' . $support . ')');
+                               logDebugMessage(__FUNCTION__, __LINE__, 'Engine ' . $content['Engine'] . ' is not supported (' . $content['Supported'] . ' - ' . $requestedEngine . ')');
                        }
                } // END - if
        } else {