summaryrefslogtreecommitdiffstats
path: root/install.php
diff options
context:
space:
mode:
authorMaurice Svay <maurice@svay.com>2010-05-17 22:02:34 +0200
committerMaurice Svay <maurice@svay.com>2010-05-17 22:02:34 +0200
commit91e68adac9adcd3914f4111c427a9d6c85ff559c (patch)
tree00d9b24b213999f9b0b3f41188654cd1d9ee5e5f /install.php
parentec4326e4bab52c558d1f2564ab2fa0545f81b071 (diff)
downloadplanet-91e68adac9adcd3914f4111c427a9d6c85ff559c.tar
planet-91e68adac9adcd3914f4111c427a9d6c85ff559c.tar.gz
planet-91e68adac9adcd3914f4111c427a9d6c85ff559c.tar.bz2
planet-91e68adac9adcd3914f4111c427a9d6c85ff559c.tar.xz
planet-91e68adac9adcd3914f4111c427a9d6c85ff559c.zip
Make install process less painful by preventing
making it not replayable.
Diffstat (limited to 'install.php')
-rw-r--r--install.php16
1 files changed, 9 insertions, 7 deletions
diff --git a/install.php b/install.php
index 72283c5..051c719 100644
--- a/install.php
+++ b/install.php
@@ -1,9 +1,16 @@
<?php
include (dirname(__FILE__).'/app/classes/Planet.class.php');
+define('CONFIG_FILE', dirname(__FILE__).'/custom/config.yml');
+define('PWD_FILE', dirname(__FILE__).'/admin/inc/pwd.inc.php');
+define('OPML_FILE',dirname(__FILE__).'/custom/people.opml');
+
$status = 'install';
-if (isset($_REQUEST['url'])) {
+if (file_exists(CONFIG_FILE) && file_exists(PWD_FILE)) {
+ //Nothing to do, already installed;
+ $status = 'installed';
+} elseif (isset($_REQUEST['url'])) {
$save = Array();
//Save config file
@@ -39,10 +46,6 @@ if (isset($_REQUEST['url'])) {
'label' => '<code>./custom</code> is writable',
'solution' => 'Change the access rights for <code>./custom</code> with CHMOD'
),
- 'config' => array(
- 'label'=>'<code>./custom/config.yml</code> is writable',
- 'solution' => 'Change the access right for <code>./custom/config.yml</code> with CHMOD'
- ),
'opml' => array(
'label'=>'<code>./custom/people.opml</code> is writable',
'solution' => 'Change the access rights for <code>./custom/people.opml</code> with CHMOD'
@@ -59,8 +62,7 @@ if (isset($_REQUEST['url'])) {
$tests['php5']['result'] = (5 <= phpversion());
$tests['custom']['result'] = is_writable(dirname(__FILE__).'/custom');
- $tests['opml']['result'] = is_writable(dirname(__FILE__).'/custom/people.opml');
- $tests['config']['result'] = is_writable(dirname(__FILE__).'/custom/config.yml');
+ $tests['opml']['result'] = is_writable(dirname(__FILE__).'/custom/people.opml');
$tests['changepassword']['result'] = is_writable(dirname(__FILE__).'/admin/inc/pwd.inc.php');
$tests['cache']['result'] = is_writable(dirname(__FILE__).'/cache');