Fixes for E_NOTICE in editpost.php (#5480)
* Added missing columns 'wall' and 'post-type'. * Convention: - curly brace after a a method/function declaration belongs to next line - added space for better readability
This commit is contained in:
parent
876081af82
commit
a38a842e86
1 changed files with 8 additions and 4 deletions
|
@ -11,8 +11,8 @@ use Friendica\Core\System;
|
|||
use Friendica\Model\Item;
|
||||
use Friendica\Database\DBA;
|
||||
|
||||
function editpost_content(App $a) {
|
||||
|
||||
function editpost_content(App $a)
|
||||
{
|
||||
$o = '';
|
||||
|
||||
if (!local_user()) {
|
||||
|
@ -28,8 +28,10 @@ function editpost_content(App $a) {
|
|||
}
|
||||
|
||||
$fields = ['allow_cid', 'allow_gid', 'deny_cid', 'deny_gid',
|
||||
'type', 'body', 'title', 'file'];
|
||||
'type', 'body', 'title', 'file', 'wall', 'post-type'];
|
||||
|
||||
$item = Item::selectFirstForUser(local_user(), $fields, ['id' => $post_id, 'uid' => local_user()]);
|
||||
|
||||
if (!DBA::isResult($item)) {
|
||||
notice(L10n::t('Item not found') . EOL);
|
||||
return;
|
||||
|
@ -78,8 +80,10 @@ function editpost_content(App $a) {
|
|||
$r = q("SELECT * FROM `mailacct` WHERE `uid` = %d AND `server` != '' LIMIT 1",
|
||||
intval(local_user())
|
||||
);
|
||||
|
||||
if (DBA::isResult($r)) {
|
||||
$mail_enabled = true;
|
||||
|
||||
if (intval($r[0]['pubmail'])) {
|
||||
$pubmail_enabled = true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue