mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-07-21 11:14:56 +02:00
feat: introduce template engine (#2899)
This commit is contained in:
parent
951092eef3
commit
abfc6b4633
9 changed files with 92 additions and 20 deletions
|
@ -13,7 +13,8 @@ class SQLiteCache implements CacheInterface
|
|||
public function __construct()
|
||||
{
|
||||
if (!extension_loaded('sqlite3')) {
|
||||
die('"sqlite3" extension not loaded. Please check "php.ini"');
|
||||
print render('error.html.php', ['message' => '"sqlite3" extension not loaded. Please check "php.ini"']);
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!is_writable(PATH_CACHE)) {
|
||||
|
@ -25,12 +26,16 @@ class SQLiteCache implements CacheInterface
|
|||
|
||||
$file = Configuration::getConfig(get_called_class(), 'file');
|
||||
if (empty($file)) {
|
||||
die('Configuration for ' . get_called_class() . ' missing. Please check your ' . FILE_CONFIG);
|
||||
$message = sprintf('Configuration for %s missing. Please check your %s', get_called_class(), FILE_CONFIG);
|
||||
print render('error.html.php', ['message' => $message]);
|
||||
exit;
|
||||
}
|
||||
if (dirname($file) == '.') {
|
||||
$file = PATH_CACHE . $file;
|
||||
} elseif (!is_dir(dirname($file))) {
|
||||
die('Invalid configuration for ' . get_called_class() . '. Please check your ' . FILE_CONFIG);
|
||||
$message = sprintf('Invalid configuration for %s. Please check your %s', get_called_class(), FILE_CONFIG);
|
||||
print render('error.html.php', ['message' => $message]);
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!is_file($file)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue