From f3ea79a12a7bdf0d4efcd7eb706d25ae81b7fad9 Mon Sep 17 00:00:00 2001 From: Robin Millette Date: Sun, 17 May 2009 00:05:07 -0400 Subject: Added site path field to installer + fancy URL javascript auto-detection. --- install.php | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) (limited to 'install.php') diff --git a/install.php b/install.php index 66e8e8712..32915200b 100644 --- a/install.php +++ b/install.php @@ -86,7 +86,8 @@ function checkExtension($name) function showForm() { -?> + $config_path = htmlentities(trim(dirname($_SERVER['REQUEST_URI']), '/')); + echo<< @@ -108,11 +109,21 @@ function showForm()

The name of your site

  • + + enable
    + disable
    +

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

    +
  • Database hostname

  • +
  • + + +

    Site path, following the "/" after the domain name in the URL. Empty is fine. Field should be filled automatically.

    +
  • @@ -132,7 +143,8 @@ function showForm() -
    Page notice
    @@ -225,29 +239,34 @@ function handlePost() } updateStatus("Writing config file..."); $sqlUrl = "mysqli://$username:$password@$host/$database"; - $res = writeConf($sitename, $sqlUrl); + $res = writeConf($sitename, $sqlUrl, $fancy, $path); if (!$res) { updateStatus("Can't write config file.", true); showForm(); return; } updateStatus("Done!"); + if ($path) $path .= '/'; + updateStatus("You can visit your new Laconica site + +
    -- cgit v1.2.3-54-g00ecf