Do not accidentially delete the logo if we update the project conf.
This commit is contained in:
parent
6bbabaebdd
commit
126f94016f
@ -193,16 +193,14 @@ class IDF_Form_ProjectConf extends Pluf_Form
|
|||||||
$this->project->update();
|
$this->project->update();
|
||||||
|
|
||||||
$conf = $this->project->getConf();
|
$conf = $this->project->getConf();
|
||||||
$keys = array('logo', 'external_project_url');
|
if (!empty($this->cleaned_data['logo'])) {
|
||||||
foreach ($keys as $key) {
|
$conf->setVal('logo', $this->cleaned_data['logo']);
|
||||||
if (array_key_exists($key, $this->cleaned_data)) {
|
}
|
||||||
if (!empty($this->cleaned_data[$key])) {
|
if (!empty($this->cleaned_data['external_project_url'])) {
|
||||||
$conf->setVal($key, $this->cleaned_data[$key]);
|
$conf->setVal('external_project_url', $this->cleaned_data['external_project_url']);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$conf->delVal($key);
|
$conf->delVal('external_project_url');
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->cleaned_data['logo_remove'] === true) {
|
if ($this->cleaned_data['logo_remove'] === true) {
|
||||||
|
Loading…
Reference in New Issue
Block a user