Commit 5a510bff authored by Ben Hayward's avatar Ben Hayward

Update for feedback

1 merge request!384[Sprint/QuietQuail](fix): Blog & media edit updated to new nsfw system #1936
Pipeline #100701650 passed with stages
in 6 minutes and 54 seconds
......@@ -190,7 +190,6 @@ class Image extends File
'cinemr_guid',
'license',
'mature',
'nsfw',
'boost_rejection_reason',
'rating',
'width',
......@@ -223,7 +222,6 @@ class Image extends File
$export['thumbs:down:count'] = Helpers\Counters::get($this->guid, 'thumbs:down');
$export['description'] = $this->description; //videos need to be able to export html.. sanitize soon!
$export['mature'] = $this->mature ?: $this->getFlag('mature');
$export['nsfw'] = $this->nsfw ?: [];
$export['rating'] = $this->getRating();
$export['width'] = $this->width ?: 0;
$export['height'] = $this->height ?: 0;
......@@ -301,6 +299,8 @@ class Image extends File
$data[$field] = (int) $data[$field];
} elseif ($field == 'mature') {
$this->setFlag('mature', !!$data['mature']);
} elseif ($field == 'nsfw') {
$this->setNsfw($data['nsfw']);
}
$this->$field = $data[$field];
......
Please register or to comment