Skip to content
Commits on Source (3)
......@@ -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'),
......
......@@ -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;
......
......@@ -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());
......
......@@ -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;
......
......@@ -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;
}
......
......@@ -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' => '',
......