]> git.mxchange.org Git - mailer.git/blobdiff - inc/ajax/ajax_installer.php
Mailer project rwritten:
[mailer.git] / inc / ajax / ajax_installer.php
index 1fedf138f03ac6fb463ccae4ab03854486501340..f1e7eb7aaa5d0f55b8119a98cac4fd560e08a8cd 100644 (file)
@@ -37,7 +37,8 @@
 
 // Some security stuff...
 if ((!defined('__SECURITY')) || (!isAjaxOutputMode()) || (!isInstallationPhase())) {
-       die();
+       header('HTTP/1.1 403 Forbidden');
+       die(json_encode(array('reply_content' => 'Access forbidden'), JSON_FORCE_OBJECT));
 } // END - if
 
 //-----------------------------------------------------------------------------
@@ -52,6 +53,9 @@ function establishAjaxInstallerDatabaseLink () {
                reportBug(__FUNCTION__, __LINE__, 'Required session data for this step not found.');
        } // END - if
 
+       // Remove any previous flag
+       unsetSqlLinkUp(__FUNCTION__, __LINE__);
+
        // Establish link
        $linkResource = SQL_CONNECT(getSession('mysql_host'), getSession('mysql_login'), getSession('mysql_password1'), __FUNCTION__, __LINE__);
 
@@ -245,7 +249,7 @@ function doAjaxInstallerChangeWarning () {
                // Is it an extension?
                if (substr($element, 0, 4) == 'ext_') {
                        // Add row for extension
-                       $OUT .= '<li>{%message=INSTALLER_CHANGED_ELEMENT_EXTENSION=' . str_replace('_', '-', $element) . '%}</li>';
+                       $OUT .= '<li>{%message,INSTALLER_CHANGED_ELEMENT_EXTENSION=' . str_replace('_', '-', $element) . '%}</li>';
                } else {
                        // Add generic row
                        $OUT .= '<li>{--INSTALLER_CHANGED_ELEMENT_' . strtoupper($element) . '--}</li>';
@@ -628,9 +632,6 @@ function doAjaxInstallerStepInstallExtensions () {
                        reportBug(__FUNCTION__, __LINE__, 'Cannot load/register extension ' . $ext_name . '.');
                } // END - if
        } // END - foreach
-
-       // Close SQL link
-       SQL_CLOSE(__FUNCTION__, __LINE__);
 }
 
 // Call-back function to write local configuration file