Skip to content

Commit

Permalink
Make config.ini optional
Browse files Browse the repository at this point in the history
The introduction of offline mode accidentaly made it mandatory
to have config.ini. Even though having it is recommended, selfoss
should not crash without it.

Closes: #1106
  • Loading branch information
jtojnar committed May 17, 2019
1 parent d3fdff4 commit 8afb1a2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion helpers/View.php
Original file line number Diff line number Diff line change
Expand Up @@ -267,11 +267,14 @@ public static function offlineFiles() {
public static function offlineMtime(array $offlineFiles) {
$indirectResources = [
'defaults.ini',
'config.ini',
'templates/home.phtml',
'public/js/selfoss-sw-offline.js'
];

if (file_exists(\F3::get('BASEDIR') . '/config.ini')) {
$indirectResources[] = 'config.ini';
}

return self::maxmtime(array_merge($offlineFiles, $indirectResources));
}

Expand Down

0 comments on commit 8afb1a2

Please sign in to comment.