<?php
/**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2022, the Friendica project
*
* @license GNU AGPL version 3 or any later version
*
use Friendica\DI;
use Friendica\Model\Contact;
use Friendica\Model\Post;
+use Friendica\Model\User;
use Friendica\Util\Crypto;
function editpost_content(App $a)
return;
}
- $post_id = (($a->argc > 1) ? intval($a->argv[1]) : 0);
+ $post_id = ((DI::args()->getArgc() > 1) ? intval(DI::args()->getArgv()[1]) : 0);
if (!$post_id) {
notice(DI::l10n()->t('Item not found'));
return;
}
+ $user = User::getById(local_user());
+
$geotag = '';
$o .= Renderer::replaceMacros(Renderer::getMarkupTemplate("section_title.tpl"), [
DI::page()['htmlhead'] .= Renderer::replaceMacros($tpl, [
'$ispublic' => ' ', // DI::l10n()->t('Visible to <strong>everybody</strong>'),
'$geotag' => $geotag,
- '$nickname' => $a->user['nickname'],
+ '$nickname' => $a->getLoggedInUserNickname(),
'$is_mobile' => DI::mode()->isMobile(),
]);
'$posttype' => $item['post-type'],
'$content' => undo_post_tagging($item['body']),
'$post_id' => $post_id,
- '$defloc' => $a->user['default-location'],
+ '$defloc' => $user['default-location'],
'$visitor' => 'none',
'$pvisit' => 'none',
'$emailcc' => DI::l10n()->t('CC: email addresses'),
'$cancel' => DI::l10n()->t('Cancel'),
'$rand_num' => Crypto::randomDigits(12),
+ // Formatting button labels
+ '$edbold' => DI::l10n()->t('Bold'),
+ '$editalic' => DI::l10n()->t('Italic'),
+ '$eduline' => DI::l10n()->t('Underline'),
+ '$edquote' => DI::l10n()->t('Quote'),
+ '$edcode' => DI::l10n()->t('Code'),
+ '$edurl' => DI::l10n()->t('Link'),
+ '$edattach' => DI::l10n()->t('Link or Media'),
+
//jot nav tab (used in some themes)
'$message' => DI::l10n()->t('Message'),
'$browser' => DI::l10n()->t('Browser'),