W.I.P. migration of mainscreen to et2:

- Fix not saving data when the content is empty
This commit is contained in:
Hadi Nategh 2018-10-30 15:42:04 +01:00
parent 6b633b2c50
commit 60be39ec2c

View File

@ -55,11 +55,8 @@ class admin_messages
foreach (array ('mainscreen', 'loginscreen') as $section) foreach (array ('mainscreen', 'loginscreen') as $section)
{ {
$prefix = $content['html'] == true ? 'html_' : 'text_'; $prefix = $content['html'] == true ? 'html_' : 'text_';
if ($content[$prefix.$section] && $content[$prefix.$section])
{
Api\Translation::write($content['lang'], $section, $section.'_message',$content[$prefix.$section]); Api\Translation::write($content['lang'], $section, $section.'_message',$content[$prefix.$section]);
} }
}
Framework::message(lang('message has been updated')); Framework::message(lang('message has been updated'));
if ($button == 'apply') break; if ($button == 'apply') break;
//fall through //fall through