mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-01-16 21:58:21 +01:00
[Config] Don't check PATH_CACHE for memcached (#1489)
This commit is contained in:
parent
0d20e9a05c
commit
8e2b65556f
1
.gitignore
vendored
1
.gitignore
vendored
@ -213,6 +213,7 @@ pip-log.txt
|
||||
|
||||
# Unit test / coverage reports
|
||||
.coverage
|
||||
.phpunit.result.cache
|
||||
.tox
|
||||
|
||||
#Translations
|
||||
|
@ -6,6 +6,15 @@ class FileCache implements CacheInterface {
|
||||
protected $path;
|
||||
protected $key;
|
||||
|
||||
public function __construct() {
|
||||
if (!is_writable(PATH_CACHE)) {
|
||||
returnServerError(
|
||||
'RSS-Bridge does not have write permissions for '
|
||||
. PATH_CACHE . '!'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public function loadData(){
|
||||
if(file_exists($this->getCacheFile())) {
|
||||
return unserialize(file_get_contents($this->getCacheFile()));
|
||||
|
@ -13,6 +13,13 @@ class SQLiteCache implements CacheInterface {
|
||||
die('"sqlite3" extension not loaded. Please check "php.ini"');
|
||||
}
|
||||
|
||||
if (!is_writable(PATH_CACHE)) {
|
||||
returnServerError(
|
||||
'RSS-Bridge does not have write permissions for '
|
||||
. PATH_CACHE . '!'
|
||||
);
|
||||
}
|
||||
|
||||
$file = Configuration::getConfig(get_called_class(), 'file');
|
||||
if (empty($file)) {
|
||||
die('Configuration for ' . get_called_class() . ' missing. Please check your ' . FILE_CONFIG);
|
||||
|
@ -102,10 +102,6 @@ final class Configuration {
|
||||
if(!extension_loaded('json'))
|
||||
self::reportError('"json" extension not loaded. Please check "php.ini"');
|
||||
|
||||
// Check cache folder permissions (write permissions required)
|
||||
if(!is_writable(PATH_CACHE))
|
||||
self::reportError('RSS-Bridge does not have write permissions for ' . PATH_CACHE . '!');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user