mirror of
https://github.com/openvk/openvk
synced 2024-11-11 01:19:53 +03:00
VKAPI: Fix 500 error if user didn't subscribed or created a group
VKAPI: Add avatar sizes to the Groups.get method VKAPI: Fix strange avatar behaviour
This commit is contained in:
parent
f5bec29bf6
commit
2e1ef59353
2 changed files with 60 additions and 41 deletions
|
@ -37,6 +37,7 @@ final class Groups extends VKAPIRequestHandler
|
|||
|
||||
if(sizeof($clbs) > $count) $ic = $count;
|
||||
|
||||
if (!empty($clbs)) {
|
||||
$clbs = array_slice($clbs, $offset * $count);
|
||||
|
||||
for ($i=0; $i < $ic; $i++) {
|
||||
|
@ -73,7 +74,22 @@ final class Groups extends VKAPIRequestHandler
|
|||
$rClubs[$i]->photo_max_orig = $usr->getAvatarURL();
|
||||
break;
|
||||
case 'photo_max':
|
||||
$rClubs[$i]->photo_max = $usr->getAvatarURL();
|
||||
$rClubs[$i]->photo_max = $usr->getAvatarURL("original"); // ORIGINAL ANDREI CHINITEL 🥵🥵🥵🥵
|
||||
break;
|
||||
case 'photo_50':
|
||||
$rClubs[$i]->photo_50 = $usr->getAvatarURL();
|
||||
break;
|
||||
case 'photo_100':
|
||||
$rClubs[$i]->photo_100 = $usr->getAvatarURL("tiny");
|
||||
break;
|
||||
case 'photo_200':
|
||||
$rClubs[$i]->photo_200 = $usr->getAvatarURL("normal");
|
||||
break;
|
||||
case 'photo_200_orig':
|
||||
$rClubs[$i]->photo_200_orig = $usr->getAvatarURL("normal");
|
||||
break;
|
||||
case 'photo_400_orig':
|
||||
$rClubs[$i]->photo_400_orig = $usr->getAvatarURL("normal");
|
||||
break;
|
||||
case 'members_count':
|
||||
$rClubs[$i]->members_count = $usr->getFollowersCount();
|
||||
|
@ -82,6 +98,9 @@ final class Groups extends VKAPIRequestHandler
|
|||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$rClubs = [];
|
||||
}
|
||||
|
||||
return (object) [
|
||||
"count" => $clbsCount,
|
||||
|
|
|
@ -68,16 +68,16 @@ final class Users extends VKAPIRequestHandler
|
|||
$response[$i]->photo_50 = $usr->getAvatarURL();
|
||||
break;
|
||||
case 'photo_100':
|
||||
$response[$i]->photo_50 = $usr->getAvatarURL("tiny");
|
||||
$response[$i]->photo_100 = $usr->getAvatarURL("tiny");
|
||||
break;
|
||||
case 'photo_200':
|
||||
$response[$i]->photo_50 = $usr->getAvatarURL("normal");
|
||||
$response[$i]->photo_200 = $usr->getAvatarURL("normal");
|
||||
break;
|
||||
case 'photo_200_orig': # вообще не ебу к чему эта строка ну пусть будет кек
|
||||
$response[$i]->photo_50 = $usr->getAvatarURL("normal");
|
||||
$response[$i]->photo_200_orig = $usr->getAvatarURL("normal");
|
||||
break;
|
||||
case 'photo_400_orig':
|
||||
$response[$i]->photo_50 = $usr->getAvatarURL("normal");
|
||||
$response[$i]->photo_400_orig = $usr->getAvatarURL("normal");
|
||||
break;
|
||||
|
||||
# Она хочет быть выебанной видя матан
|
||||
|
|
Loading…
Reference in a new issue