use Friendica\Model\Item;
use Friendica\Database\DBA;
-function editpost_content(App $a) {
-
+function editpost_content(App $a)
+{
$o = '';
if (!local_user()) {
}
$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;
$jotplugins = '';
$jotnets = '';
- $mail_disabled = ((function_exists('imap_open') && !Config::get('system','imap_disabled')) ? 0 : 1);
+ $mail_disabled = ((function_exists('imap_open') && !Config::get('system', 'imap_disabled')) ? 0 : 1);
$mail_enabled = false;
$pubmail_enabled = false;
$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;
}