X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=install.php;h=088116d5c222034bea45fa6768fcbc70f8c55e6c;hb=8912cdc7a4acaeaea3b2b323efc86333ffd5ef63;hp=054be3d8d723a66783d612f893154af51115f9fb;hpb=38eefd1b329f0f2b991427c704185e954f4a3ce3;p=quix0rs-gnu-social.git diff --git a/install.php b/install.php index 054be3d8d7..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.

    +
  • @@ -257,6 +271,7 @@ class WebInstaller extends Installer +

    Initial access settings for your site

    @@ -320,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); @@ -337,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; } @@ -359,8 +381,8 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" - - + +