mirror of
https://github.com/openvk/openvk
synced 2024-12-23 00:51:03 +03:00
Fix spacing in WallPresenter.php
This commit is contained in:
parent
eba579046e
commit
3eb5b6b4fc
1 changed files with 14 additions and 15 deletions
|
@ -178,14 +178,6 @@ final class WallPresenter extends OpenVKPresenter
|
||||||
|
|
||||||
if($_FILES["_pic_attachment"]["error"] === UPLOAD_ERR_OK) {
|
if($_FILES["_pic_attachment"]["error"] === UPLOAD_ERR_OK) {
|
||||||
try {
|
try {
|
||||||
$post = new Post;
|
|
||||||
$post->setOwner($this->user->id);
|
|
||||||
$post->setWall($wall);
|
|
||||||
$post->setCreated(time());
|
|
||||||
$post->setContent($this->postParam("text"));
|
|
||||||
$post->setFlags($flags);
|
|
||||||
$post->save();
|
|
||||||
|
|
||||||
$photo = new Photo;
|
$photo = new Photo;
|
||||||
$photo->setOwner($this->user->id);
|
$photo->setOwner($this->user->id);
|
||||||
$photo->setDescription(iconv_substr($this->postParam("text"), 0, 36) . "...");
|
$photo->setDescription(iconv_substr($this->postParam("text"), 0, 36) . "...");
|
||||||
|
@ -200,6 +192,13 @@ final class WallPresenter extends OpenVKPresenter
|
||||||
$this->flashFail("err", "Не удалось опубликовать пост", "Файл повреждён.");
|
$this->flashFail("err", "Не удалось опубликовать пост", "Файл повреждён.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$post = new Post;
|
||||||
|
$post->setOwner($this->user->id);
|
||||||
|
$post->setWall($wall);
|
||||||
|
$post->setCreated(time());
|
||||||
|
$post->setContent($this->postParam("text"));
|
||||||
|
$post->setFlags($flags);
|
||||||
|
$post->save();
|
||||||
$post->attach($photo);
|
$post->attach($photo);
|
||||||
} elseif($this->postParam("text")) {
|
} elseif($this->postParam("text")) {
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in a new issue