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 (3)
(fix): ensure arrays are sent to tags and not objects
· be1bb7c5
Mark Harding
authored
Jul 12, 2019
be1bb7c5
(fix): decode search query
· 36a7971f
Mark Harding
authored
Jul 12, 2019
36a7971f
Adding in max video filesize config for front/1506
· bdd634c0
Ben Hayward
authored
Jul 12, 2019
bdd634c0
Hide whitespace changes
Inline
Side-by-side
Controllers/api/v1/minds/config.php
View file @
bdd634c0
...
...
@@ -34,6 +34,7 @@ class config implements Interfaces\Api, Interfaces\ApiIgnorePam
"max_video_length"
=>
(
Core\Session
::
getLoggedInUser
()
&&
Core\Session
::
getLoggedInUser
()
->
isPlus
())
?
Minds\Core\Config
::
_
()
->
get
(
'max_video_length_plus'
)
:
Minds\Core\Config
::
_
()
->
get
(
'max_video_length'
),
"max_video_file_size"
=>
Minds\Core\Config
::
_
()
->
get
(
'max_video_file_size'
)
?:
[],
"features"
=>
(
object
)
(
Minds\Core\Config
::
_
()
->
get
(
'features'
)
?:
[]),
"blockchain"
=>
(
object
)
Minds\Core\Di\Di
::
_
()
->
get
(
'Blockchain\Manager'
)
->
getPublicSettings
(),
"plus"
=>
Minds\Core\Config
::
_
()
->
get
(
'plus'
),
...
...
Controllers/api/v2/feeds.php
View file @
bdd634c0
...
...
@@ -121,7 +121,7 @@ class feeds implements Interfaces\Api
$asActivities
=
(
bool
)
(
$_GET
[
'as_activities'
]
??
true
);
$query
=
$_GET
[
'query'
]
?
?
null
;
$query
=
isset
(
$_GET
[
'query'
]
)
?
urldecode
(
$_GET
[
'query'
])
:
null
;
$container_guid
=
$_GET
[
'container_guid'
]
??
null
;
$custom_type
=
isset
(
$_GET
[
'custom_type'
])
&&
$_GET
[
'custom_type'
]
?
[
$_GET
[
'custom_type'
]]
:
null
;
...
...
Core/Search/Mappings/EntityMapping.php
View file @
bdd634c0
...
...
@@ -186,7 +186,7 @@ class EntityMapping implements MappingInterface
$map
[
'tags'
]
=
[];
}
$map
[
'tags'
]
=
array_unique
(
array_merge
(
$map
[
'tags'
],
array_map
(
'strtolower'
,
$tags
)));
$map
[
'tags'
]
=
array_values
(
array_unique
(
array_merge
(
$map
[
'tags'
],
array_map
(
'strtolower'
,
$tags
)))
)
;
$map
[
'nsfw'
]
=
array_unique
(
$this
->
entity
->
getNsfw
());
...
...
Core/Search/Mappings/GroupMapping.php
View file @
bdd634c0
...
...
@@ -33,7 +33,7 @@ class GroupMapping extends EntityMapping implements MappingInterface
$map
[
'membership'
]
=
(
int
)
$this
->
entity
->
getMembership
();
$map
[
'public'
]
=
$map
[
'membership'
]
==
ACCESS_PUBLIC
;
$map
[
'tags'
]
=
array_unique
(
array_merge
(
$map
[
'tags'
],
$this
->
entity
->
getTags
()));
$map
[
'tags'
]
=
array_values
(
array_unique
(
array_merge
(
$map
[
'tags'
],
$this
->
entity
->
getTags
()))
)
;
$map
[
'rating'
]
=
$this
->
entity
->
getRating
();
return
$map
;
...
...
Core/Search/Mappings/UserMapping.php
View file @
bdd634c0
...
...
@@ -53,7 +53,7 @@ class UserMapping extends EntityMapping implements MappingInterface
$map
[
'group_membership'
]
=
[];
}
$map
[
'tags'
]
=
array_unique
(
$this
->
entity
->
getTags
());
$map
[
'tags'
]
=
array_values
(
array_unique
(
$this
->
entity
->
getTags
())
)
;
return
$map
;
}
...
...
settings.example.php
View file @
bdd634c0
...
...
@@ -481,10 +481,15 @@ $CONFIG->set('email', [
]
]);
/* Maximum video length for non-plus users */
$CONFIG
->
set
(
'max_video_length'
,
900
);
/* Maximum video length for plus */
$CONFIG
->
set
(
'max_video_length_plus'
,
1860
);
/* Maximum video file size, in bytes */
$CONFIG
->
set
(
'max_video_file_size'
,
3900000000
);
$CONFIG
->
set
(
'aws'
,
[
'key'
=>
''
,
'secret'
=>
''
,
...
...