mirror of
https://github.com/openvk/openvk
synced 2025-07-07 08:19:49 +03:00
ownedClubs → writeableClubs
This commit is contained in:
parent
231cd23eef
commit
46dd7754ae
4 changed files with 6 additions and 6 deletions
|
@ -71,7 +71,7 @@ class Clubs
|
|||
*/
|
||||
}
|
||||
|
||||
function getOwnedClubs(int $id): \Traversable
|
||||
function getWriteableClubs(int $id): \Traversable
|
||||
{
|
||||
|
||||
$result = DatabaseConnection::i()->getConnection()->query("SELECT * FROM `groups` WHERE `owner` = $id ORDER BY `id`;");
|
||||
|
|
|
@ -708,12 +708,12 @@ final class UserPresenter extends OpenVKPresenter
|
|||
}
|
||||
}
|
||||
|
||||
function renderOwnedClubs(int $id)
|
||||
function renderGetWriteableClubs(int $id)
|
||||
{
|
||||
$this->assertUserLoggedIn();
|
||||
|
||||
if($this->user->id == $id) {
|
||||
$clubs = iterator_to_array((new Clubs)->getOwnedClubs($id));
|
||||
$clubs = iterator_to_array((new Clubs)->getWriteableClubs($id));
|
||||
$json = [];
|
||||
|
||||
foreach($clubs as $club)
|
||||
|
|
|
@ -93,8 +93,8 @@ routes:
|
|||
handler: "User->increaseRating"
|
||||
- url: "/id{num}"
|
||||
handler: "User->view"
|
||||
- url: "/id{num}/getOwnedClubs"
|
||||
handler: "User->ownedClubs"
|
||||
- url: "/id{num}/getWriteableClubs"
|
||||
handler: "User->getWriteableClubs"
|
||||
- url: "/friends{num}"
|
||||
handler: "User->friends"
|
||||
- url: "/edit"
|
||||
|
|
|
@ -216,7 +216,7 @@ function repostPost(id, hash, owner) {
|
|||
Function.noop
|
||||
]);
|
||||
let xhrj = new XMLHttpRequest();
|
||||
xhrj.open("GET", "id"+owner+"/getOwnedClubs?hash="+hash)
|
||||
xhrj.open("GET", "id"+owner+"/getWriteableClubs?hash="+hash)
|
||||
xhrj.send()
|
||||
xhrj.onload = () =>
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue