X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=install.php;h=088116d5c222034bea45fa6768fcbc70f8c55e6c;hb=398491b39b2105fa5bb443a9cf679f3e62234620;hp=f44999285aeddf7758006daf60d8be808452c06f;hpb=f79aec36feaa4760201a7e88d5b31513a3c458ba;p=quix0rs-gnu-social.git diff --git a/install.php b/install.php index f44999285a..088116d5c2 100644 --- a/install.php +++ b/install.php @@ -27,6 +27,7 @@ * @author Craig Andrews * @author Eric Helgeson * @author Evan Prodromou + * @author Mikael Nordfeldth * @author Robin Millette * @author Sarven Capadisli * @author Tom Adams @@ -168,6 +169,13 @@ class WebInstaller extends Installer } } + $ssl = array('always'=>null, 'never'=>null); + if (!empty($_SERVER['HTTPS'])) { + $ssl['always'] = 'checked="checked"'; + } else { + $ssl['never'] = 'checked="checked"'; + } + echo<<
@@ -185,6 +193,12 @@ class WebInstaller extends Installer disable

Enable fancy (pretty) URLs. Auto-detection failed, it depends on Javascript.

+
  • + + enable
    + disable
    +

    Enabling SSL (https://) requires extra webserver configuration and certificate generation not offered by this installation.

    +
  • @@ -321,6 +335,8 @@ STR; $this->siteProfile = $post->string('site_profile'); + $this->ssl = $post->string('ssl'); + $this->server = $_SERVER['HTTP_HOST']; $this->path = substr(dirname($_SERVER['PHP_SELF']), 1); @@ -338,6 +354,11 @@ STR; $fail = true; } + if (!in_array($this->ssl, array('never', 'sometimes', 'always'))) { + $this->updateStatus("Bad value for server SSL enabling."); + $fail = true; + } + if (!$this->validateSiteProfile()) { $fail = true; } @@ -361,7 +382,7 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" - +