summaryrefslogtreecommitdiff
path: root/install.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2009-11-14 17:14:35 +0100
committerEvan Prodromou <evan@status.net>2009-11-14 17:14:35 +0100
commit959d278c347fdf90e0227adc57c0215f5d82404a (patch)
tree16eb3b0155b446ada520566e187b4c47b0b9e76b /install.php
parent093857c582a68b39e0d65523d27f25ede7b7fed6 (diff)
parent2147ac510f5489c860a4bebf3ab48a069b89ecfb (diff)
Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x
Diffstat (limited to 'install.php')
-rw-r--r--install.php16
1 files changed, 12 insertions, 4 deletions
diff --git a/install.php b/install.php
index e7f7cf318..8e76f6198 100644
--- a/install.php
+++ b/install.php
@@ -1,4 +1,3 @@
-
<?php
/**
* StatusNet - the distributed open-source microblogging tool
@@ -26,7 +25,7 @@
* @author Brion Vibber <brion@pobox.com>
* @author CiaranG <ciaran@ciarang.com>
* @author Craig Andrews <candrews@integralblue.com>
- * @author Eric Helgeson <helfire@Erics-MBP.local>
+ * @author Eric Helgeson <erichelgeson@gmail.com>
* @author Evan Prodromou <evan@status.net>
* @author Robin Millette <millette@controlyourself.ca>
* @author Sarven Capadisli <csarven@status.net>
@@ -500,6 +499,11 @@ function showForm()
<input type="password" id="password" name="password" />
<p class="form_guide">Database password (optional)</p>
</li>
+ <li>
+ <label for="snapshot">Send stats to StatusNet Inc?</label>
+ <input type="checkbox" id="snapshot" name="snapshot" checked />
+ <p class="form_guide">Periodically send information about your site to StatusNet Inc</p>
+ </li>
</ul>
<input type="submit" name="submit" class="submit" value="Submit" />
</fieldset>
@@ -521,6 +525,7 @@ function handlePost()
$username = $_POST['username'];
$password = $_POST['password'];
$sitename = $_POST['sitename'];
+ $snapshot = $_POST['snapshot'];
$fancy = !empty($_POST['fancy']);
$server = $_SERVER['HTTP_HOST'];
$path = substr(dirname($_SERVER['PHP_SELF']), 1);
@@ -567,7 +572,7 @@ STR;
}
updateStatus("Writing config file...");
- $res = writeConf($sitename, $server, $path, $fancy, $db);
+ $res = writeConf($sitename, $server, $path, $fancy, $db, $snapshot);
if (!$res) {
updateStatus("Can't write config file.", true);
@@ -688,7 +693,7 @@ function Mysql_Db_installer($host, $database, $username, $password)
return $db;
}
-function writeConf($sitename, $server, $path, $fancy, $db)
+function writeConf($sitename, $server, $path, $fancy, $db, $snapshot)
{
// assemble configuration file in a string
$cfg = "<?php\n".
@@ -704,6 +709,9 @@ function writeConf($sitename, $server, $path, $fancy, $db)
// checks if fancy URLs are enabled
($fancy ? "\$config['site']['fancy'] = true;\n\n":'').
+ // send site stats to SNI
+ ($snapshot ? "\$config['snapshot']['run'] = 'web';\n\n":'').
+
// database
"\$config['db']['database'] = '{$db['database']}';\n\n".
($db['type'] == 'pgsql' ? "\$config['db']['quote_identifiers'] = true;\n\n":'').