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
273
Merge Requests
34
CI / CD
Security & Compliance
Packages
Analytics
Wiki
Snippets
Members
Collapse sidebar
Close sidebar
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Minds
Minds Backend - Engine
Commits
190b6772
Commit
190b6772
authored
1 hour ago
by
Marcelo Rivera
Browse files
Options
Download
(fix): remove full exports
parent
4ec92246
feat/hide-share-buttons
1 merge request
!463
Allow users to permanently hide "share" buttons in settings
Pipeline
#117594820
failed with stages
in 42 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
6 additions
and
16 deletions
+6
-16
Controllers/api/v1/blog.php
View file @
190b6772
...
...
@@ -146,8 +146,6 @@ class blog implements Interfaces\Api
break
;
}
$blog
->
setFullExport
(
true
);
$response
[
'blog'
]
=
$blog
;
}
break
;
...
...
This diff is collapsed.
Controllers/api/v1/media.php
View file @
190b6772
...
...
@@ -43,8 +43,6 @@ class media implements Interfaces\Api, Interfaces\ApiIgnorePam
]);
}
$entity
->
fullExport
=
true
;
switch
(
$entity
->
subtype
)
{
case
"video"
:
// Helpers\Counters::increment($pages[0], 'plays');
...
...
This diff is collapsed.
Controllers/api/v1/newsfeed.php
View file @
190b6772
...
...
@@ -53,7 +53,6 @@ class newsfeed implements Interfaces\Api
if
(
!
$activity
->
guid
||
Helpers\Flags
::
shouldFail
(
$activity
))
{
return
Factory
::
response
([
'status'
=>
'error'
]);
}
$activity
->
fullExport
=
true
;
return
Factory
::
response
([
'activity'
=>
$activity
->
export
()]);
break
;
default
:
...
...
This diff is collapsed.
Core/Blogs/Blog.php
View file @
190b6772
...
...
@@ -97,8 +97,6 @@ use Minds\Traits\MagicAttributes;
* @method bool getAllowComments()
* @method int getTimeSent()
* @method Blog setTimeSent(int $time_sent)
* @method bool getFullExport()
* @method Blog setFullExport(bool $value)
*/
class
Blog
extends
RepositoryEntity
{
...
...
@@ -247,9 +245,6 @@ class Blog extends RepositoryEntity
/** @var int */
protected
$timeSent
;
/** @var bool */
protected
$fullExport
=
false
;
/**
* Blog constructor.
* @param null $eventsDispatcher
...
...
@@ -332,7 +327,7 @@ class Blog extends RepositoryEntity
*/
public
function
getOwnerObj
()
{
if
(
$this
->
fullExport
||
(
!
$this
->
ownerObj
&&
$this
->
ownerGuid
)
)
{
if
(
!
$this
->
ownerObj
&&
$this
->
ownerGuid
)
{
$user
=
new
User
(
$this
->
ownerGuid
);
$this
->
setOwnerObj
(
$user
->
export
());
}
...
...
@@ -478,9 +473,9 @@ class Blog extends RepositoryEntity
}
/**
* Get NSFW options
* @return array
*/
* Get NSFW options
* @return array
*/
public
function
getNsfw
()
{
$array
=
[];
...
...
This diff is collapsed.
Core/Events/Defaults.php
View file @
190b6772
...
...
@@ -31,8 +31,8 @@ class Defaults
}
$export
=
$event
->
response
()
?:
[];
if
(
$params
[
'entity'
]
->
fullExport
&&
$params
[
'entity'
]
->
owner
_guid
)
{
$export
[
'ownerObj'
]
=
Entities\Factory
::
build
(
$params
[
'entity'
]
->
owner
_guid
)
->
export
();
if
(
$params
[
'entity'
]
->
fullExport
&&
$params
[
'entity'
]
->
owner
Obj
&&
is_array
(
$params
[
'entity'
]
->
ownerObj
)
)
{
$export
[
'ownerObj'
]
=
Entities\Factory
::
build
(
$params
[
'entity'
]
->
owner
Obj
)
->
export
();
//$export['ownerObj'] = \Minds\Helpers\Export::sanitize($params['entity']->ownerObj);
// $export['ownerObj']['guid'] = (string) $params['entity']->ownerObj['guid'];
$event
->
setResponse
(
$export
);
...
...
This diff is collapsed.
Please
register
or
sign in
to comment