X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=install.php;h=088116d5c222034bea45fa6768fcbc70f8c55e6c;hb=398491b39b2105fa5bb443a9cf679f3e62234620;hp=9b0d19882cf5e4f3e4af9507230490eef9ca6f31;hpb=a2090ecc97f93894ba6f833acde5f44058988510;p=quix0rs-gnu-social.git diff --git a/install.php b/install.php index 9b0d19882c..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.

    +
  • @@ -248,6 +262,21 @@ class WebInstaller extends Installer +
    + Site profile +
      +
    • + + +

      Initial access settings for your site

      +
    • +
    +
    @@ -284,7 +313,7 @@ STR; /** * Read and validate input data. * May output side effects. - * + * * @return boolean success */ function prepare() @@ -304,6 +333,10 @@ STR; $this->adminEmail = $post->string('admin_email'); $this->adminUpdates = $post->string('admin_updates'); + $this->siteProfile = $post->string('site_profile'); + + $this->ssl = $post->string('ssl'); + $this->server = $_SERVER['HTTP_HOST']; $this->path = substr(dirname($_SERVER['PHP_SELF']), 1); @@ -315,12 +348,21 @@ STR; if (!$this->validateAdmin()) { $fail = true; } - + if ($this->adminPass != $adminPass2) { $this->updateStatus("Administrator passwords do not match. Did you mistype?", true); $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; + } + return !$fail; } @@ -335,11 +377,12 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" Install StatusNet - + + - - + + @@ -347,22 +390,34 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    +
    +
    + +
    +
    +