mirror of
https://github.com/openvk/openvk
synced 2024-12-23 09:01:15 +03:00
Compare commits
2 commits
8c98359904
...
4d996fddac
Author | SHA1 | Date | |
---|---|---|---|
|
4d996fddac | ||
|
4bfdeddd22 |
8 changed files with 14 additions and 14 deletions
|
@ -418,7 +418,7 @@ final class Wall extends VKAPIRequestHandler
|
||||||
}
|
}
|
||||||
|
|
||||||
if($_FILES["video"]["error"] === UPLOAD_ERR_OK)
|
if($_FILES["video"]["error"] === UPLOAD_ERR_OK)
|
||||||
$video = Video::fastMake($this->getUser()->getId(), $message, $_FILES["video"], $anon);
|
$video = Video::fastMake($this->getUser()->getId(), $_FILES["video"]["name"], $message, $_FILES["video"], $anon);
|
||||||
} catch(\DomainException $ex) {
|
} catch(\DomainException $ex) {
|
||||||
$this->fail(-156, "The media file is corrupted");
|
$this->fail(-156, "The media file is corrupted");
|
||||||
} catch(ISE $ex) {
|
} catch(ISE $ex) {
|
||||||
|
|
|
@ -195,11 +195,11 @@ class Video extends Media
|
||||||
$this->save();
|
$this->save();
|
||||||
}
|
}
|
||||||
|
|
||||||
static function fastMake(int $owner, string $description = "", array $file, bool $unlisted = true, bool $anon = false): Video
|
static function fastMake(int $owner, string $name = "Unnamed Video.ogv", string $description = "", array $file, bool $unlisted = true, bool $anon = false): Video
|
||||||
{
|
{
|
||||||
$video = new Video;
|
$video = new Video;
|
||||||
$video->setOwner($owner);
|
$video->setOwner($owner);
|
||||||
$video->setName("Unnamed Video.ogv");
|
$video->setName(ovk_proc_strtr($name, 61));
|
||||||
$video->setDescription(ovk_proc_strtr($description, 300));
|
$video->setDescription(ovk_proc_strtr($description, 300));
|
||||||
$video->setAnonymous($anon);
|
$video->setAnonymous($anon);
|
||||||
$video->setCreated(time());
|
$video->setCreated(time());
|
||||||
|
|
|
@ -74,7 +74,7 @@ final class CommentPresenter extends OpenVKPresenter
|
||||||
}
|
}
|
||||||
|
|
||||||
if($_FILES["_vid_attachment"]["error"] === UPLOAD_ERR_OK) {
|
if($_FILES["_vid_attachment"]["error"] === UPLOAD_ERR_OK) {
|
||||||
$video = Video::fastMake($this->user->id, $this->postParam("text"), $_FILES["_vid_attachment"]);
|
$video = Video::fastMake($this->user->id, $_FILES["_vid_attachment"]["name"], $this->postParam("text"), $_FILES["_vid_attachment"]);
|
||||||
}
|
}
|
||||||
} catch(ISE $ex) {
|
} catch(ISE $ex) {
|
||||||
$this->flashFail("err", "Не удалось опубликовать комментарий", "Файл медиаконтента повреждён или слишком велик.");
|
$this->flashFail("err", "Не удалось опубликовать комментарий", "Файл медиаконтента повреждён или слишком велик.");
|
||||||
|
|
|
@ -105,7 +105,7 @@ final class TopicsPresenter extends OpenVKPresenter
|
||||||
}
|
}
|
||||||
|
|
||||||
if($_FILES["_vid_attachment"]["error"] === UPLOAD_ERR_OK) {
|
if($_FILES["_vid_attachment"]["error"] === UPLOAD_ERR_OK) {
|
||||||
$video = Video::fastMake($this->user->id, $this->postParam("text"), $_FILES["_vid_attachment"]);
|
$video = Video::fastMake($this->user->id, $_FILES["_vid_attachment"]["name"], $this->postParam("text"), $_FILES["_vid_attachment"]);
|
||||||
}
|
}
|
||||||
} catch(ISE $ex) {
|
} catch(ISE $ex) {
|
||||||
$this->flash("err", "Не удалось опубликовать комментарий", "Файл медиаконтента повреждён или слишком велик.");
|
$this->flash("err", "Не удалось опубликовать комментарий", "Файл медиаконтента повреждён или слишком велик.");
|
||||||
|
|
|
@ -258,7 +258,7 @@ final class WallPresenter extends OpenVKPresenter
|
||||||
}
|
}
|
||||||
|
|
||||||
if($_FILES["_vid_attachment"]["error"] === UPLOAD_ERR_OK)
|
if($_FILES["_vid_attachment"]["error"] === UPLOAD_ERR_OK)
|
||||||
$video = Video::fastMake($this->user->id, $this->postParam("text"), $_FILES["_vid_attachment"], $anon);
|
$video = Video::fastMake($this->user->id, $_FILES["_vid_attachment"]["name"], $this->postParam("text"), $_FILES["_vid_attachment"], $anon);
|
||||||
} catch(\DomainException $ex) {
|
} catch(\DomainException $ex) {
|
||||||
$this->flashFail("err", tr("failed_to_publish_post"), tr("media_file_corrupted"));
|
$this->flashFail("err", tr("failed_to_publish_post"), tr("media_file_corrupted"));
|
||||||
} catch(ISE $ex) {
|
} catch(ISE $ex) {
|
||||||
|
|
|
@ -458,7 +458,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="e">Initial hosting</td>
|
<td class="e">Initial hosting</td>
|
||||||
<td class="v">Ilya Prokopenko (dsrev) and Celestora</td>
|
<td class="v">Lumaeris and Celestora</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="e">Initial bug-tracker hosting</td>
|
<td class="e">Initial bug-tracker hosting</td>
|
||||||
|
@ -492,7 +492,7 @@
|
||||||
<td>
|
<td>
|
||||||
kovaltim, Vladimir Lapskiy (0x7d5), Alexander Minkin (WerySkok), Polina Katunina (RousPhaul), veth,
|
kovaltim, Vladimir Lapskiy (0x7d5), Alexander Minkin (WerySkok), Polina Katunina (RousPhaul), veth,
|
||||||
Egor Shevchenko, Vadim Korovin (yuni), Ash Defenders,
|
Egor Shevchenko, Vadim Korovin (yuni), Ash Defenders,
|
||||||
Pavel Silaev, Dmitriy Daemon, Ilya Prokopenko (dsrev),
|
Pavel Silaev, Dmitriy Daemon, Lumaeris,
|
||||||
cmed404 and unknown tester, who disappeared shortly after trying to upload post with cat.
|
cmed404 and unknown tester, who disappeared shortly after trying to upload post with cat.
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -129,12 +129,12 @@
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{_registration_disabled_info}
|
{_registration_disabled_info}
|
||||||
{if OPENVK_ROOT_CONF['openvk']['preferences']['registration']['reason']}
|
{if OPENVK_ROOT_CONF['openvk']['preferences']['registration']['disablingReason']}
|
||||||
<br/>
|
<br/>
|
||||||
<br/>
|
<br/>
|
||||||
{_admin_banned_link_reason}:
|
{_admin_banned_link_reason}:
|
||||||
<br>
|
<br>
|
||||||
<b>{php echo OPENVK_ROOT_CONF['openvk']['preferences']['registration']['reason']}</b>
|
<b>{php echo OPENVK_ROOT_CONF['openvk']['preferences']['registration']['disablingReason']}</b>
|
||||||
{/if}
|
{/if}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -37,9 +37,9 @@ openvk:
|
||||||
autoban: true
|
autoban: true
|
||||||
registration:
|
registration:
|
||||||
enable: true
|
enable: true
|
||||||
reason: "" # reason for disabling registration
|
disablingReason: ""
|
||||||
support:
|
support:
|
||||||
supportName: "Moderator"
|
supportName: "Agent"
|
||||||
adminAccount: 1 # Change this ok
|
adminAccount: 1 # Change this ok
|
||||||
fastAnswers:
|
fastAnswers:
|
||||||
- "This is a list of quick answers to common questions for support. Post your responses here and agents can send it quickly with just 3 clicks"
|
- "This is a list of quick answers to common questions for support. Post your responses here and agents can send it quickly with just 3 clicks"
|
||||||
|
@ -125,9 +125,9 @@ openvk:
|
||||||
token: "TOKEN_HERE"
|
token: "TOKEN_HERE"
|
||||||
helpdeskChat: ""
|
helpdeskChat: ""
|
||||||
eventDB:
|
eventDB:
|
||||||
enable: false # Better enable this
|
enable: true
|
||||||
database:
|
database:
|
||||||
dsn: "mysql:unix_socket=/tmp/mysql.sock;dbname=openvk-eventdb"
|
dsn: "mysql:unix_host=localhost;dbname=openvk-eventdb" # or unix_socket=/tmp/mysql.sock
|
||||||
user: "root"
|
user: "root"
|
||||||
password: "DATABASE_PASSWORD"
|
password: "DATABASE_PASSWORD"
|
||||||
notificationsBroker:
|
notificationsBroker:
|
||||||
|
|
Loading…
Reference in a new issue