mirror of
https://github.com/openvk/openvk
synced 2024-11-11 01:19:53 +03:00
Fix video upload
This commit is contained in:
parent
6c872cdeca
commit
0049dbc5c7
1 changed files with 2 additions and 2 deletions
|
@ -51,7 +51,7 @@ final class VideosPresenter extends OpenVKPresenter
|
|||
$this->assertUserLoggedIn();
|
||||
|
||||
if($_SERVER["REQUEST_METHOD"] === "POST") {
|
||||
if(empty($this->postParam("name"))) {
|
||||
if(!empty($this->postParam("name"))) {
|
||||
$video = new Video;
|
||||
$video->setOwner($this->user->id);
|
||||
$video->setName($this->postParam("name"));
|
||||
|
@ -72,7 +72,7 @@ final class VideosPresenter extends OpenVKPresenter
|
|||
$video->save();
|
||||
|
||||
$this->redirect("/video" . $video->getPrettyId(), static::REDIRECT_TEMPORARY);
|
||||
}else{
|
||||
} else {
|
||||
$this->flashFail("err", "Произошла ошибка", "Видео не может быть опубликовано без названия.");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue