mirror of
https://github.com/openvk/openvk
synced 2025-04-23 16:43:02 +03:00
Compare commits
8 commits
45e53b2a3e
...
f672e5001a
Author | SHA1 | Date | |
---|---|---|---|
f672e5001a | |||
a1f5fcbe88 | |||
87c7c2ec76 | |||
ac87ab52e6 | |||
b74775fcf5 | |||
059950bbe6 | |||
4ecae18853 | |||
1c4305d44f |
8 changed files with 18 additions and 12 deletions
|
@ -18,6 +18,7 @@ define("NANOTON", 1000000000);
|
||||||
class FetchToncoinTransactions extends Command
|
class FetchToncoinTransactions extends Command
|
||||||
{
|
{
|
||||||
private $images;
|
private $images;
|
||||||
|
private $transactions;
|
||||||
|
|
||||||
protected static $defaultName = "fetch-ton";
|
protected static $defaultName = "fetch-ton";
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,7 @@ class Wall implements Handler
|
||||||
protected $user;
|
protected $user;
|
||||||
protected $posts;
|
protected $posts;
|
||||||
protected $notes;
|
protected $notes;
|
||||||
|
protected $videos;
|
||||||
|
|
||||||
public function __construct(?User $user)
|
public function __construct(?User $user)
|
||||||
{
|
{
|
||||||
|
|
|
@ -248,8 +248,9 @@ final class Board extends VKAPIRequestHandler
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function editComment(int $comment_id, int $group_id = 0, int $topic_id = 0, string $message, string $attachments)
|
public function editComment(string $message, string $attachments, int $comment_id, int $group_id = 0, int $topic_id = 0)
|
||||||
{
|
{
|
||||||
|
# FIXME
|
||||||
/*
|
/*
|
||||||
$this->requireUser();
|
$this->requireUser();
|
||||||
$this->willExecuteWriteAction();
|
$this->willExecuteWriteAction();
|
||||||
|
|
|
@ -45,7 +45,7 @@ final class Groups extends VKAPIRequestHandler
|
||||||
$clbsCount = $user->getClubCount();
|
$clbsCount = $user->getClubCount();
|
||||||
}
|
}
|
||||||
|
|
||||||
$rClubs;
|
$rClubs = array();
|
||||||
|
|
||||||
$ic = sizeof($clbs);
|
$ic = sizeof($clbs);
|
||||||
if (sizeof($clbs) > $count) {
|
if (sizeof($clbs) > $count) {
|
||||||
|
|
|
@ -52,7 +52,7 @@ final class Newsfeed extends VKAPIRequestHandler
|
||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getGlobal(string $fields = "", int $start_from = 0, int $start_time = 0, int $end_time = 0, int $offset = 0, int $count = 30, int $extended = 0, int $rss = 0)
|
public function getGlobal(string $fields = "", int $start_from = 0, int $start_time = 0, int $end_time = 0, int $offset = 0, int $count = 30, int $extended = 0, int $rss = 0, int $return_banned = 0)
|
||||||
{
|
{
|
||||||
$this->requireUser();
|
$this->requireUser();
|
||||||
|
|
||||||
|
|
|
@ -185,12 +185,14 @@ final class Notes extends VKAPIRequestHandler
|
||||||
$this->fail(15, "Access denied");
|
$this->fail(15, "Access denied");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($note_ids)) {
|
|
||||||
$notes = array_slice(iterator_to_array((new NotesRepo())->getUserNotes($user, 1, $count + $offset, $sort == 0 ? "ASC" : "DESC")), $offset);
|
|
||||||
$nodez = (object) [
|
$nodez = (object) [
|
||||||
"count" => (new NotesRepo())->getUserNotesCount((new UsersRepo())->get($user_id)),
|
"count" => 0,
|
||||||
"notes" => [],
|
"notes" => [],
|
||||||
];
|
];
|
||||||
|
if (empty($note_ids)) {
|
||||||
|
$nodez->count = (new NotesRepo())->getUserNotesCount($user);
|
||||||
|
|
||||||
|
$notes = array_slice(iterator_to_array((new NotesRepo())->getUserNotes($user, 1, $count + $offset, $sort == 0 ? "ASC" : "DESC")), $offset);
|
||||||
|
|
||||||
foreach ($notes as $note) {
|
foreach ($notes as $note) {
|
||||||
if ($note->isDeleted()) {
|
if ($note->isDeleted()) {
|
||||||
|
@ -210,6 +212,7 @@ final class Notes extends VKAPIRequestHandler
|
||||||
$note = (new NotesRepo())->getNoteById((int) $id[0], (int) $id[1]);
|
$note = (new NotesRepo())->getNoteById((int) $id[0], (int) $id[1]);
|
||||||
if ($note && !$note->isDeleted()) {
|
if ($note && !$note->isDeleted()) {
|
||||||
$nodez->notes[] = $note->toVkApiStruct();
|
$nodez->notes[] = $note->toVkApiStruct();
|
||||||
|
$nodez->count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@ abstract class VKAPIRequestHandler
|
||||||
$this->platform = $platform;
|
$this->platform = $platform;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function fail(int $code, string $message): void
|
protected function fail(int $code, string $message): never
|
||||||
{
|
{
|
||||||
throw new APIErrorException($message, $code);
|
throw new APIErrorException($message, $code);
|
||||||
}
|
}
|
||||||
|
|
|
@ -478,8 +478,8 @@ return (function () {
|
||||||
define('YEAR', 365 * DAY);
|
define('YEAR', 365 * DAY);
|
||||||
|
|
||||||
define("nullptr", null);
|
define("nullptr", null);
|
||||||
define("OPENVK_DEFAULT_INSTANCE_NAME", "OpenVK", false);
|
define("OPENVK_DEFAULT_INSTANCE_NAME", "OpenVK");
|
||||||
define("OPENVK_VERSION", "Altair Preview ($ver)", false);
|
define("OPENVK_VERSION", "Altair Preview ($ver)");
|
||||||
define("OPENVK_DEFAULT_PER_PAGE", 10, false);
|
define("OPENVK_DEFAULT_PER_PAGE", 10);
|
||||||
define("__OPENVK_ERROR_CLOCK_IN_FUTURE", "Server clock error: FK1200-DTF", false);
|
define("__OPENVK_ERROR_CLOCK_IN_FUTURE", "Server clock error: FK1200-DTF");
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue