]> git.mxchange.org Git - mailer.git/blobdiff - inc/ajax/ajax_installer.php
Fixed some badly broken stuff in installation phase.
[mailer.git] / inc / ajax / ajax_installer.php
index eea4629ee956909843db01033d9a79a452daf530..e0fd4e8c6049df81d8d50b22a6e9e595d1fbc27e 100644 (file)
@@ -668,9 +668,17 @@ function doAjaxInstallerStepInstallExtensions () {
 
        // "Walk" through all extensions
        foreach ($extensions as $key => $ext_name) {
+               // Debug message
+               //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'key=' . $key . ',ext_name=' . $ext_name);
+
                // Is ext-sql_patches not at key=0?
-               if (($key == 0) && ($ext_name == 'sql_patches')) {
+               if (($ext_name == 'sql_patches') && ($key > 0)) {
                        // Then skip this entry
+                       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Skipping sql_changes at key=' . $key);
+                       continue;
+               } elseif (isExtensionInstalled($ext_name)) {
+                       // Skip already installed extensions
+                       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Skipping extension ' . $ext_name . ' at key=' . $key . ': Already installed.');
                        continue;
                } elseif ((!loadExtension($ext_name, 'test', '0.0.0', TRUE)) || (!registerExtension($ext_name, NULL))) {
                        // Didn't work