3 * @file mod/viewsrc.php
6 use Friendica\Core\L10n;
7 use Friendica\Database\DBA;
8 use Friendica\Model\Item;
10 function viewsrc_content(App $a)
13 notice(L10n::t('Access denied.') . EOL);
18 $item_id = (($a->argc > 1) ? intval($a->argv[1]) : 0);
22 notice(L10n::t('Item not found.') . EOL);
26 $item = Item::selectFirst(['body'], ['uid' => local_user(), 'id' => $item_id]);
28 if (DBA::isResult($item)) {
30 echo str_replace("\n", '<br />', $item['body']);
33 $o .= str_replace("\n", '<br />', $item['body']);