mirror of
https://github.com/openvk/openvk
synced 2025-07-07 08:19:49 +03:00
fix video.php video.get items bug
This commit is contained in:
parent
4b7d2b9b17
commit
41100469d0
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