X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=install.php;h=d72cf69b07b68dd1429755a73ad6fff4ee2b2d25;hb=261ccfac8699534ff584a2f93d5dcd384529d855;hp=a468d2a6f00a2710c4877156e853225fbb1b7bb2;hpb=cb183359e23ae7a5cfb483fa06c6c4b7a8b05fff;p=quix0rs-gnu-social.git diff --git a/install.php b/install.php index a468d2a6f0..d72cf69b07 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 @@ -117,7 +118,7 @@ class WebInstaller extends Installer function main() { if (!$this->checkPrereqs()) { - $this->showForm(); + $this->warning(_('Please fix the above stated problems and refresh this page to continue installing.')); return; } @@ -164,10 +165,19 @@ class WebInstaller extends Installer } else { $checked = ''; } - $dbRadios .= " $info[name]
\n"; + $dbRadios .= sprintf('%3$s
', + htmlspecialchars($type), $checked, + htmlspecialchars($info['name'])); } } + $ssl = array('always'=>null, 'never'=>null); + if (!empty($_SERVER['HTTPS'])) { + $ssl['always'] = 'checked="checked"'; + } else { + $ssl['never'] = 'checked="checked"'; + } + echo<<
@@ -185,6 +195,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.

    +
  • @@ -198,7 +214,7 @@ class WebInstaller extends Installer
  • - $dbRadios + {$dbRadios}

    Database type

  • @@ -225,12 +241,12 @@ class WebInstaller extends Installer
  • -

    Nickname for the initial StatusNet user (administrator)

    +

    Nickname for the initial user (administrator)

  • -

    Password for the initial StatusNet user (administrator)

    +

    Password for the initial user (administrator)

  • @@ -239,12 +255,22 @@ class WebInstaller extends Installer
  • -

    Optional email address for the initial StatusNet user (administrator)

    +

    Optional email address for the initial user (administrator)

  • + + +
    + Site profile +
    • - - -

      Release and security feed from update@status.net (recommended)

      + + +

      Initial access settings for your site

    @@ -284,7 +310,7 @@ STR; /** * Read and validate input data. * May output side effects. - * + * * @return boolean success */ function prepare() @@ -302,7 +328,10 @@ STR; $this->adminPass = $post->string('admin_password'); $adminPass2 = $post->string('admin_password2'); $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 +344,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; } @@ -333,36 +371,47 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - Install StatusNet - + Install GNU social + + - - - - + +
    +
    +
    + +
    +
    +