summaryrefslogtreecommitdiff
path: root/install.php
diff options
context:
space:
mode:
authorJeffery To <jeffery.to@gmail.com>2009-06-24 01:18:35 +0800
committerJeffery To <jeffery.to@gmail.com>2009-06-24 01:18:35 +0800
commit65f784120b45dc187e28313fa2c2dca2c976c150 (patch)
treecf1cb3e34483466d4f4a312c528579292e7603fc /install.php
parentf7d488d4b2bfdc8dfa6b5a2bc2931dbf824509a0 (diff)
parenteb40fbc17ad1efb0a4c51ee00b1e9408d2af382f (diff)
Merge branch '0.8.x' into notice-search-no-results
Diffstat (limited to 'install.php')
-rw-r--r--install.php18
1 files changed, 5 insertions, 13 deletions
diff --git a/install.php b/install.php
index 133f2b30f..b94a92936 100644
--- a/install.php
+++ b/install.php
@@ -1,7 +1,7 @@
<?php
/**
* Laconica - a distributed open-source microblogging tool
- * Copyright (C) 2009, Controlez-Vous, Inc.
+ * Copyright (C) 2009, Control Yourself, Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
@@ -36,7 +36,7 @@ function main()
function checkPrereqs()
{
$pass = true;
-
+
if (file_exists(INSTALLDIR.'/config.php')) {
?><p class="error">Config file &quot;config.php&quot; already exists.</p>
<?php
@@ -88,7 +88,6 @@ function checkExtension($name)
function showForm()
{
- $config_path = htmlentities(trim(dirname($_SERVER['REQUEST_URI']), '/'));
echo<<<E_O_T
</ul>
</dd>
@@ -117,11 +116,6 @@ function showForm()
<p class="form_guide" id='fancy-form_guide'>Enable fancy (pretty) URLs. Auto-detection failed, it depends on Javascript.</p>
</li>
<li>
- <label for="host">Site path</label>
- <input type="text" id="path" name="path" value="$config_path" />
- <p class="form_guide">Site path, following the "/" after the domain name in the URL. Empty is fine. Field should be filled automatically.</p>
- </li>
- <li>
<label for="host">Hostname</label>
<input type="text" id="host" name="host" />
<p class="form_guide">Database hostname</p>
@@ -167,7 +161,6 @@ function handlePost()
$username = $_POST['username'];
$password = $_POST['password'];
$sitename = $_POST['sitename'];
- $path = $_POST['path'];
$fancy = !empty($_POST['fancy']);
?>
<dl class="system_notice">
@@ -176,7 +169,7 @@ function handlePost()
<ul>
<?php
$fail = false;
-
+
if (empty($host)) {
updateStatus("No hostname specified.", true);
$fail = true;
@@ -243,7 +236,7 @@ function handlePost()
}
updateStatus("Writing config file...");
$sqlUrl = "mysqli://$username:$password@$host/$database";
- $res = writeConf($sitename, $sqlUrl, $fancy, $path);
+ $res = writeConf($sitename, $sqlUrl, $fancy);
if (!$res) {
updateStatus("Can't write config file.", true);
showForm();
@@ -257,14 +250,13 @@ function handlePost()
<?php
}
-function writeConf($sitename, $sqlUrl, $fancy, $path)
+function writeConf($sitename, $sqlUrl, $fancy)
{
$res = file_put_contents(INSTALLDIR.'/config.php',
"<?php\n".
"if (!defined('LACONICA')) { exit(1); }\n\n".
"\$config['site']['name'] = \"$sitename\";\n\n".
($fancy ? "\$config['site']['fancy'] = true;\n\n":'').
- "\$config['site']['path'] = \"$path\";\n\n".
"\$config['db']['database'] = \"$sqlUrl\";\n\n".
"?>");
return $res;