mirror of
https://github.com/openvk/openvk
synced 2025-01-08 00:39:40 +03:00
Fih
This commit is contained in:
parent
0e4aff8bea
commit
c39780c3f9
9 changed files with 12 additions and 10 deletions
|
@ -21,7 +21,7 @@ final class Groups extends VKAPIRequestHandler
|
|||
if(is_null($user) || $user->isDeleted() || $user->isBanned())
|
||||
$this->fail(15, "Invalid user");
|
||||
|
||||
if($user->getPrivacyPermission("page.info.read", $this->getUser() ?? NULL)) {
|
||||
if(!$user->getPrivacyPermission("groups.read", $this->getUser() ?? NULL)) {
|
||||
$this->fail(8, "Access denied: this user chose to hide his groups.");
|
||||
}
|
||||
|
||||
|
|
|
@ -223,7 +223,7 @@ final class Users extends VKAPIRequestHandler
|
|||
$user = $users->get($user_id);
|
||||
|
||||
if(!$user || $user->isDeleted()) {
|
||||
$this->fail(4, "User deleted");
|
||||
$this->fail(4, "User is deleted");
|
||||
}
|
||||
|
||||
if(!$user->canBeViewedBy($this->getUser() ?? NULL)) {
|
||||
|
|
|
@ -230,7 +230,7 @@ class Video extends Media
|
|||
return $this->getOwner()->canBeViewedBy($user) && $this->getOwner()->getPrivacyPermission('videos.read', $user);
|
||||
} else {
|
||||
# когда у видосов появятся группы
|
||||
return true;
|
||||
return $this->getOwner()->canBeViewedBy($user);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@ class Clubs
|
|||
$nnparamsCount = 0;
|
||||
|
||||
foreach($pars as $paramName => $paramValue)
|
||||
if($paramName != "before" && $paramName != "after" && $paramName != "gender" && $paramName != "maritalstatus" && $paramName != "politViews" && $paramName != "doNotSearchMe")
|
||||
if($paramName != "doNotShowDeleted")
|
||||
$paramValue != NULL ? $notNullParams += ["$paramName" => "%$paramValue%"] : NULL;
|
||||
else
|
||||
$paramValue != NULL ? $notNullParams += ["$paramName" => "$paramValue"] : NULL;
|
||||
|
@ -93,7 +93,7 @@ class Clubs
|
|||
];
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
function getWriteableClubs(int $id): \Traversable
|
||||
{
|
||||
$result = $this->clubs->where("owner", $id)->where("deleted", 0);
|
||||
|
|
|
@ -454,7 +454,7 @@ final class GroupPresenter extends OpenVKPresenter
|
|||
}
|
||||
|
||||
if($club->isBanned()) {
|
||||
$this->flashFail("err", tr("error"));
|
||||
$this->flashFail("err", tr("error"), tr("banned_restore"));
|
||||
}
|
||||
|
||||
$club->setDeleted(0);
|
||||
|
|
|
@ -188,7 +188,7 @@
|
|||
</div>
|
||||
{elseif $type == "posts"}
|
||||
<div n:foreach="$data as $dat" class="content">
|
||||
{if !$dat->canBeViewedBy($thisUser ?? NULL) || $dat->getTargetWall() < 0 && $dat->getOwner()->isHideFromGlobalFeedEnabled()}
|
||||
{if !$dat->canBeViewedBy($thisUser ?? NULL) || $dat->getTargetWall() < 0 && $dat->getWallOwner()->isHideFromGlobalFeedEnabled()}
|
||||
{_dont_need_to_see_post}
|
||||
{else}
|
||||
{include "../components/post.xml", post => $dat, commentSection => true, onWallOf => true}
|
||||
|
|
|
@ -59,7 +59,7 @@
|
|||
{/block}
|
||||
|
||||
{block content}
|
||||
{if !is_null($thisUser) && $thisUser->getId() != $user->getId() && $user->getProfileType() == 1 && $thisUser->getChandlerUser()->can("access")->model("admin")->whichBelongsTo(NULL)}
|
||||
{if !is_null($thisUser) && $thisUser->getId() != $user->getId() && $user->getProfileType() == 1 && $thisUser->getChandlerUser()->can("access")->model("admin")->whichBelongsTo(NULL) && $thisUser->getSubscriptionStatus($user) < 3}
|
||||
<div class="msg msg_err" style="width:96%;">
|
||||
<b>{_private_profile_warning}</b>
|
||||
<br>
|
||||
|
@ -124,7 +124,7 @@
|
|||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div n:if="$user->getPrivacyPermission('page.info.read', $thisUser ?? NULL)">
|
||||
<table id="basicInfo" class="ugc-table" border="0" cellspacing="0" cellpadding="0" border="0" cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
|
@ -134,7 +134,7 @@
|
|||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="msg msg_yellow" style="width: 93%;">
|
||||
<div class="msg msg_yellow" style="width: 93%;{if !$user->getPrivacyPermission('page.info.read', $thisUser ?? NULL)}margin-top: 5px;{/if}">
|
||||
{var $m = $user->isFemale() ? "f" : "m"}
|
||||
{tr("limited_access_to_page_$m", $user->getFirstName())}
|
||||
|
||||
|
|
|
@ -348,6 +348,7 @@
|
|||
"search_group_desc" = "Here you can browse through the existing groups and choose a group to suit your needs...";
|
||||
"owners_delete" = "Only group's creator can delete it.";
|
||||
"owners_restore" = "Only group's creator can restore it?";
|
||||
"banned_restore" = "You can't unban banned club.";
|
||||
|
||||
"delete_group" = "Delete group";
|
||||
"restore_group" = "Restore group";
|
||||
|
|
|
@ -332,6 +332,7 @@
|
|||
|
||||
"owners_delete" = "Только создатель группы может удалить её.";
|
||||
"owners_restore" = "Только создатель группы может восстановить её?";
|
||||
"banned_restore" = "Вы не можете разблокировать заблокированную группу.";
|
||||
|
||||
"delete_group" = "Удалить группу";
|
||||
"restore_group" = "Восстановить группу";
|
||||
|
|
Loading…
Reference in a new issue