Skip to content
Snippets Groups Projects
Commit b50c93d2 authored by Mark Harding's avatar Mark Harding
Browse files

Merge branch 'feat/self-declare-nsfw' into 'master'

[Sprint/GiddyGiraffe] (feat): ability for channels to self-declare nsfw

Closes minds#486

See merge request !248
parents 4f0eea59 b14691c5
Branches
No related tags found
Loading
......@@ -222,6 +222,11 @@ class channel implements Interfaces\Api
}
}
if (isset($_POST['nsfw']) && is_array($_POST['nsfw'])) {
$nsfw = array_unique(array_merge($_POST['nsfw'], $owner->getNsfwLock()));
$update['nsfw'] = json_encode($nsfw);
$owner->setNsfw($nsfw);
}
if (isset($_POST['tags']) && $_POST['tags']) {
$update['tags'] = json_encode($_POST['tags']);
......
......@@ -71,8 +71,6 @@ abstract class ElggEntity extends ElggData implements
$this->attributes['tags'] = null;
$this->attributes['nsfw'] = [];
$this->attributes['nsfw_lock'] = [];
$this->attributes['nsfw'] = [];
$this->attributes['nsfw_lock'] = [];
$this->attributes['moderator_guid'] = null;
$this->attributes['time_moderated'] = null;
$this->attributes['allow_comments'] = true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment