mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 16:24:54 +02:00
Cleaned event create control for centralized management
This commit is contained in:
parent
3d3beca727
commit
a6936f16d5
@ -182,20 +182,9 @@ class Event extends Entity
|
||||
*/
|
||||
public function save()
|
||||
{
|
||||
global $config;
|
||||
|
||||
if (is_metaconsole() === false && isset($config['centralized_management']) === true
|
||||
&& (bool) $config['centralized_management'] === true
|
||||
) {
|
||||
throw new \Exception(
|
||||
'error, cannot save in centralized management environment.'
|
||||
);
|
||||
}
|
||||
|
||||
$values = $this->fields;
|
||||
// Clean null fields.
|
||||
foreach ($values as $k => $v) {
|
||||
hd('"'.$k.'" "'.$v.'"', true);
|
||||
if ($v === null) {
|
||||
unset($values[$k]);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user