aboutsummaryrefslogtreecommitdiff
path: root/app/Models/Entry.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2021-01-02 21:20:19 +0100
committerGravatar GitHub <noreply@github.com> 2021-01-02 21:20:19 +0100
commit9c6682e7edf8cbad828088cbeeef66c7ecefdd9a (patch)
treec8c8a6ba34d49d22497a14ddaf18ae97d8cd5bb1 /app/Models/Entry.php
parent7bc2cc5825547f5b5cf15005fda937e06065b45d (diff)
Avoid manual initialisations of system or user configuration (#3070)
* Avoid manual intialisations of system or user configuration More consistent use of Context * Simplify FreshRSS_Context::initUser * Remove a few manual get_user_configuration * A bit of debugging * Fix context user init * Fix install * Fix concurrency Concurrent requests could lead to bad race condition * Fix actualize cron Fix case when system i initialised several times
Diffstat (limited to 'app/Models/Entry.php')
-rw-r--r--app/Models/Entry.php7
1 files changed, 3 insertions, 4 deletions
diff --git a/app/Models/Entry.php b/app/Models/Entry.php
index ed0c1245c..96e1cf3a6 100644
--- a/app/Models/Entry.php
+++ b/app/Models/Entry.php
@@ -355,11 +355,10 @@ class FreshRSS_Entry extends Minz_Model {
}
public static function getContentByParsing($url, $path, $attributes = array(), $maxRedirs = 3) {
- $system_conf = Minz_Configuration::get('system');
- $limits = $system_conf->limits;
+ $limits = FreshRSS_Context::$system_conf->limits;
$feed_timeout = empty($attributes['timeout']) ? 0 : intval($attributes['timeout']);
- if ($system_conf->simplepie_syslog_enabled) {
+ if (FreshRSS_Context::$system_conf->simplepie_syslog_enabled) {
syslog(LOG_INFO, 'FreshRSS GET ' . SimplePie_Misc::url_remove_credentials($url));
}
@@ -377,7 +376,7 @@ class FreshRSS_Entry extends Minz_Model {
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_ENCODING => '', //Enable all encodings
]);
- curl_setopt_array($ch, $system_conf->curl_options);
+ curl_setopt_array($ch, FreshRSS_Context::$system_conf->curl_options);
if (isset($attributes['ssl_verify'])) {
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, $attributes['ssl_verify'] ? 2 : 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, $attributes['ssl_verify'] ? true : false);