Skip to content
Projects
Groups
Snippets
Help
Sign in / Register
Toggle navigation
Minds Backend - Engine
Project overview
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
298
Merge Requests
38
CI / CD
Security & Compliance
Packages
Wiki
Snippets
Members
Collapse sidebar
Close sidebar
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Minds
Minds Backend - Engine
Commits
d888d9c9
Commit
d888d9c9
authored
1 minute ago
by
Ben Hayward
Browse files
Options
Download
Fixed breaking media and blogs
parent
cf9b88dc
fix/blog-media-nsfw-update-1936
1 merge request
!384
[Sprint/QuietQuail](fix): Blog & media edit updated to new nsfw system #1936
Pipeline
#97365924
running with stages
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
4 deletions
+9
-4
Core/Blogs/Blog.php
View file @
d888d9c9
...
...
@@ -502,6 +502,7 @@ class Blog extends RepositoryEntity
}
}
$this
->
nsfw
=
$array
;
$this
->
markAsDirty
(
'nsfw'
);
return
$this
;
}
...
...
This diff is collapsed.
Entities/Image.php
View file @
d888d9c9
...
...
@@ -296,7 +296,7 @@ class Image extends File
if
(
$field
==
'access_id'
)
{
$data
[
$field
]
=
(
int
)
$data
[
$field
];
}
elseif
(
$field
==
'nsfw'
)
{
$this
->
setFlag
(
'nsfw'
,
!
is_array
(
$data
[
'nsfw'
])
?
json_decode
(
$data
[
'nsfw'
])
:
$data
[
'nsfw'
])
;
$this
->
nsfw
=
!
is_array
(
$data
[
'nsfw'
])
?
json_decode
(
$data
[
'nsfw'
])
:
$data
[
'nsfw'
]
;
continue
;
}
...
...
This diff is collapsed.
Entities/Video.php
View file @
d888d9c9
...
...
@@ -187,7 +187,7 @@ class Video extends MindsObject
'title'
=>
null
,
'description'
=>
null
,
'license'
=>
null
,
'
mature
'
=>
null
,
'
nsfw
'
=>
null
,
'boost_rejection_reason'
=>
null
,
'hidden'
=>
null
,
'access_id'
=>
null
,
...
...
@@ -204,7 +204,7 @@ class Video extends MindsObject
'hidden'
,
'access_id'
,
'container_guid'
,
'
mature
'
,
'
nsfw
'
,
'boost_rejection_reason'
,
'rating'
,
'time_sent'
,
...
...
@@ -218,11 +218,15 @@ class Video extends MindsObject
if
(
$field
==
'access_id'
)
{
$data
[
$field
]
=
(
int
)
$data
[
$field
];
}
elseif
(
in_array
(
$field
,
[
'
mature'
,
'
full_hd'
],
true
))
{
}
elseif
(
in_array
(
$field
,
[
'full_hd'
],
true
))
{
$this
->
setFlag
(
$field
,
!!
$data
[
$field
]);
continue
;
}
if
(
in_array
(
$field
,
[
'nsfw'
],
true
))
{
$this
->
nsfw
=
!
is_array
(
$data
[
'nsfw'
])
?
json_decode
(
$data
[
'nsfw'
])
:
$data
[
'nsfw'
];
}
$this
->
$field
=
$data
[
$field
];
}
...
...
This diff is collapsed.
Please
register
or
sign in
to comment