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);
21 throw new \Friendica\Network\HTTPException\NotFoundException(L10n::t('Item not found.'));
24 $item = Item::selectFirst(['body'], ['uid' => local_user(), 'id' => $item_id]);
26 if (DBA::isResult($item)) {
28 echo str_replace("\n", '<br />', $item['body']);
31 $o .= str_replace("\n", '<br />', $item['body']);