diff options
-rwxr-xr-x | app/app.php | 5 | ||||
-rw-r--r-- | postload.php | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/app/app.php b/app/app.php index dca9bc4..5cda95c 100755 --- a/app/app.php +++ b/app/app.php @@ -7,8 +7,7 @@ require_once __DIR__.'/../vendor/autoload.php'; $savedConfig = __DIR__.'/../custom/config.yml'; $moon_version = file_get_contents(__DIR__.'/../VERSION'); -if (is_file($savedConfig)){ - +if (is_installed()) { $conf = Spyc::YAMLLoad($savedConfig); // this is a check to upgrade older config file without l10n @@ -39,7 +38,7 @@ function custom_path($file = '') return __DIR__.'/../custom' . (!empty($file) ? '/'.$file : ''); } -function ensure_installed() +function is_installed() { return file_exists(custom_path('config.yml')) && file_exists(custom_path('people.opml')); } diff --git a/postload.php b/postload.php index 389f1d8..943a84e 100644 --- a/postload.php +++ b/postload.php @@ -2,7 +2,9 @@ require_once __DIR__.'/app/app.php'; -ensure_installed(); +if (!is_installed()) { + die(); +} $xml = new SimpleXMLElement(file_get_contents(custom_path('people.opml'))); |