bug fix, prevent lost tags

This commit is contained in:
Diego Najar 2019-02-28 15:32:08 +01:00
parent 89b4c5fc92
commit c14e86f96f
1 changed files with 2 additions and 6 deletions

View File

@ -157,12 +157,8 @@ class Pages extends dbJSON {
// Check values from the arguments ($args)
// If some field is missing the current value is taken
foreach ($this->dbFields as $field=>$value) {
if ($field=='tags') {
$tags = '';
if (isset($args['tags'])) {
$tags = $args['tags'];
}
$finalValue = $this->generateTags($tags);
if ( ($field=='tags') && isset($args['tags'])) {
$finalValue = $this->generateTags($args['tags']);
} elseif (isset($args[$field])) {
// Sanitize if will be stored on database
$finalValue = Sanitize::html($args[$field]);