mirror of
https://github.com/openvk/openvk
synced 2025-06-07 22:59:58 +03:00
fix(video api): fix items bug
This commit is contained in:
parent
ecdbc2ef1c
commit
b2d389a7b8
1 changed files with 8 additions and 2 deletions
|
@ -20,12 +20,18 @@ final class Video extends VKAPIRequestHandler
|
||||||
$this->requireUser();
|
$this->requireUser();
|
||||||
|
|
||||||
if (!empty($videos)) {
|
if (!empty($videos)) {
|
||||||
$vids = explode(',', $videos);
|
$vids = array_unique(explode(',', $videos));
|
||||||
|
|
||||||
|
if (sizeof($vids) > 100) {
|
||||||
|
$this->fail(15, "Too many ids given");
|
||||||
|
}
|
||||||
|
|
||||||
$profiles = [];
|
$profiles = [];
|
||||||
$groups = [];
|
$groups = [];
|
||||||
|
$items = [];
|
||||||
|
|
||||||
foreach ($vids as $vid) {
|
foreach ($vids as $vid) {
|
||||||
$id = explode("_", $vid);
|
$id = explode("_", $vid);
|
||||||
$items = [];
|
|
||||||
|
|
||||||
$video = (new VideosRepo())->getByOwnerAndVID(intval($id[0]), intval($id[1]));
|
$video = (new VideosRepo())->getByOwnerAndVID(intval($id[0]), intval($id[1]));
|
||||||
if ($video && !$video->isDeleted()) {
|
if ($video && !$video->isDeleted()) {
|
||||||
|
|
Loading…
Reference in a new issue