Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Commits on Source (2)
(fix) exporting allow comments so its boolean
· 47c9459a
Brian Hatchet
authored
Jul 23, 2019
and
Mark Harding
committed
Jul 23, 2019
47c9459a
Merge branch 'feat/disable-comments-526' into 'master'
· 4f056092
Mark Harding
authored
Jul 23, 2019
(fix) exporting allow comments so its boolean See merge request
!277
4f056092
Hide whitespace changes
Inline
Side-by-side
classes/ElggEntity.php
View file @
4f056092
...
...
@@ -1377,18 +1377,19 @@ abstract class ElggEntity extends ElggData implements
);
}
public
function
export
(){
$export
=
array
();
foreach
(
$this
->
getExportableValues
()
as
$v
){
if
(
!
is_null
(
$this
->
$v
)){
$export
[
$v
]
=
$this
->
$v
;
}
}
$export
=
array_merge
(
$export
,
\Minds\Core\Events\Dispatcher
::
trigger
(
'export:extender'
,
'all'
,
array
(
'entity'
=>
$this
),
[])
?:
[]);
public
function
export
(){
$export
=
array
();
foreach
(
$this
->
getExportableValues
()
as
$v
)
{
if
(
!
is_null
(
$this
->
$v
))
{
$export
[
$v
]
=
$this
->
$v
;
}
}
$export
=
array_merge
(
$export
,
\Minds\Core\Events\Dispatcher
::
trigger
(
'export:extender'
,
'all'
,
array
(
'entity'
=>
$this
),
[])
?:
[]);
$export
=
\Minds\Helpers\Export
::
sanitize
(
$export
);
$export
[
'nsfw'
]
=
$this
->
getNsfw
();
$export
[
'nsfw'
]
=
$this
->
getNsfw
();
$export
[
'nsfw_lock'
]
=
$this
->
getNsfwLock
();
$export
[
'urn'
]
=
$this
->
getUrn
();
$export
[
'urn'
]
=
$this
->
getUrn
();
$export
[
'allow_comments'
]
=
$this
->
getAllowComments
();
return
$export
;
}
...
...
@@ -1673,6 +1674,6 @@ abstract class ElggEntity extends ElggData implements
* Gets the flag for allowing comments on an entity
*/
public
function
getAllowComments
()
{
return
$this
->
allow_comments
;
return
(
bool
)
$this
->
allow_comments
;
}
}