Fixes a bug if module=index is called with no ext-sql_patches
authorRoland Häder <roland@mxchange.org>
Fri, 30 Oct 2009 07:50:56 +0000 (07:50 +0000)
committerRoland Häder <roland@mxchange.org>
Fri, 30 Oct 2009 07:50:56 +0000 (07:50 +0000)
inc/mysql-manager.php

index 311fdb0..2b88cfb 100644 (file)
@@ -1718,7 +1718,14 @@ function getWhatFromModule ($modCheck) {
 
                case 'login':
                case 'index':
-                       $what = getConfig('index_home');
+                       // Is ext-sql_patches installed and newer than 0.0.5?
+                       if (isExtensionInstalledAndNewer('sql_patches', '0.0.5')) {
+                               // Use it from config
+                               $what = getConfig('index_home');
+                       } else {
+                               // Use default 'welcome'
+                               $what = 'welcome';
+                       }
                        break;
 
                default: