fix: [feed:edit] Do not override feed settings if not provided via the

API. Fix #5896
pull/5906/head
mokaddem 2020-05-14 15:50:08 +02:00
parent 252bd94b09
commit 0c8d233787
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
1 changed files with 5 additions and 1 deletions

View File

@ -364,7 +364,11 @@ class FeedsController extends AppController
}
}
if (!isset($this->request->data['Feed']['settings'])) {
$this->request->data['Feed']['settings'] = array();
if (!empty($this->Feed->data['Feed']['settings'])) {
$this->request->data['Feed']['settings'] = $this->Feed->data['Feed']['settings'];
} else {
$this->request->data['Feed']['settings'] = array();
}
} else {
if (!empty($this->request->data['Feed']['settings']['common']['excluderegex']) && !$this->__checkRegex($this->request->data['Feed']['settings']['common']['excluderegex'])) {
$this->Flash->error('Invalid exclude regex. Make sure it\'s a delimited PCRE regex pattern.');