diff options
-rw-r--r-- | .gitignore | 12 | ||||
-rw-r--r-- | admin/inc/pwd.inc.php | 1 | ||||
-rw-r--r-- | cache/.gitignore | 4 | ||||
-rw-r--r-- | cache/.gitkeep | 0 | ||||
-rw-r--r-- | custom/people.opml | 10 | ||||
-rwxr-xr-x | install.php | 10 |
6 files changed, 13 insertions, 24 deletions
@@ -1,6 +1,10 @@ -custom/config.yml -custom/people.opml -custom/people.opml.bak +/cache +/custom/config.yml +/custom/people.opml +/custom/people.opml.bak +/admin/inc/pwd.inc.php /vendor/ -tests/_output/*
\ No newline at end of file +/tests/_output/* + +/nbproject/private/ diff --git a/admin/inc/pwd.inc.php b/admin/inc/pwd.inc.php deleted file mode 100644 index 10d9225..0000000 --- a/admin/inc/pwd.inc.php +++ /dev/null @@ -1 +0,0 @@ -<?php $login="admin"; $password=md5("admin"); ?>
\ No newline at end of file diff --git a/cache/.gitignore b/cache/.gitignore deleted file mode 100644 index 5e7d273..0000000 --- a/cache/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -# Ignore everything in this directory -* -# Except this file -!.gitignore diff --git a/cache/.gitkeep b/cache/.gitkeep deleted file mode 100644 index e69de29..0000000 --- a/cache/.gitkeep +++ /dev/null diff --git a/custom/people.opml b/custom/people.opml deleted file mode 100644 index 2ea977c..0000000 --- a/custom/people.opml +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0"?> -<opml version="1.1"> -<head> -<title>Untitled</title> -<dateCreated>2008-12-14T15:51:52+01:00</dateCreated> -<dateModified>2008-12-14T15:51:52+01:00</dateModified> -</head> -<body> -</body> -</opml>
\ No newline at end of file diff --git a/install.php b/install.php index e0c23bd..cc539dd 100755 --- a/install.php +++ b/install.php @@ -8,9 +8,9 @@ function installStatus($str, $msg, $result) { return '<tr><td>' . $str . '</td><td class="' . $class . '">' . $msg . '</td></tr>'; } -// If the password and config files exist, moonmoon is already installed -if (file_exists(__DIR__ . '/custom/config.yml') - && file_exists(__DIR__ . '/admin/inc/pwd.inc.php')) { +// If the config file exists and the auth variables are set, moonmoon is already installed +include dirname(__FILE__) . '/admin/inc/pwd.inc.php'; +if (file_exists(dirname(__FILE__) . '/custom/config.yml') && isset($login) && isset($password)) { $status = 'installed'; } elseif (isset($_REQUEST['url'])) { $save = array(); @@ -56,9 +56,9 @@ if (file_exists(__DIR__ . '/custom/config.yml') '/cache', ); - // We now test that all required files are writable + // We now test that all required files and directories are writable. foreach ($tests as $v) { - if(is_writable(__DIR__ . $v)) { + if(touch(dirname(__FILE__) . $v)) { $strInstall .= installStatus("<code>$v</code> is writable", 'OK', true); } else { $strInstall .= installStatus("<code>$v</code> is writable", 'FAIL',false); |