-use Friendica\Core\System;
-
-require_once('include/bbcode.php');
-
-function tagrm_post(App $a) {
+use Friendica\Content\Text\BBCode;
+use Friendica\Core\L10n;
+use Friendica\Database\DBA;
+use Friendica\DI;
+use Friendica\Model\Item;
+use Friendica\Model\Term;
+use Friendica\Util\Strings;
+
+function tagrm_post(App $a)
+{
+ if (!local_user()) {
+ DI::baseUrl()->redirect($_SESSION['photo_return']);
+ }