Fixes a bug if module=index is called with no ext-sql_patches
[mailer.git] / inc / mysql-manager.php
index 311fdb0a19483dedccb8b8e199d737f1974f5084..2b88cfbc83d96a54f261cf86457dfdb3120fe7d8 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: