X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=index.php;h=e3ab16469b17f75d07a6e522b7206a18efec9229;hb=12a71f0155784890d8d0d2da4899fdb43953f036;hp=fba16263ab10c230ebb5b7bbc0327033a07509f9;hpb=3086666c38e6595d2254a08534668b900524927f;p=friendica.git diff --git a/index.php b/index.php index fba16263ab..e3ab16469b 100644 --- a/index.php +++ b/index.php @@ -51,9 +51,13 @@ if (!$install) { require_once "include/dba.php"; if (!$install) { - dba::connect($db_host, $db_user, $db_pass, $db_data, $install); + $result = dba::connect($db_host, $db_user, $db_pass, $db_data); unset($db_host, $db_user, $db_pass, $db_data); + if (!$result) { + System::unavailable(); + } + /** * Load configs from db. Overwrite configs from .htconfig.php */ @@ -70,7 +74,7 @@ if (!$install) { if (Config::get('system', 'force_ssl') && ($a->get_scheme() == "http") && (intval(Config::get('system', 'ssl_policy')) == SSL_POLICY_FULL) && (substr(System::baseUrl(), 0, 8) == "https://") - ) { + && ($_SERVER['REQUEST_METHOD'] == 'GET')) { header("HTTP/1.1 302 Moved Temporarily"); header("Location: " . System::baseUrl() . "/" . $a->query_string); exit();