X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Ftagrm.php;h=32cb19e691a461c97298e7b6300c79e6f53c8d00;hb=b5d2d32b443f7aa8ec6e0e91f36da3cc0a0f2a82;hp=f376573fefffcc69ee62fdd345ab4ab0d80dfce7;hpb=0668b2dfd57a1b246d179c13978a14308b6b23ef;p=friendica.git diff --git a/mod/tagrm.php b/mod/tagrm.php index f376573fef..32cb19e691 100644 --- a/mod/tagrm.php +++ b/mod/tagrm.php @@ -1,6 +1,6 @@ redirect($_SESSION['photo_return']); + DI::baseUrl()->redirect($photo_return); // NOTREACHED } - if ($a->argc == 3) { - update_tags($a->argv[1], [Strings::escapeTags(trim(hex2bin($a->argv[2])))]); - DI::baseUrl()->redirect($_SESSION['photo_return']); + if (DI::args()->getArgc()== 3) { + update_tags(DI::args()->getArgv()[1], [trim(hex2bin(DI::args()->getArgv()[2]))]); + DI::baseUrl()->redirect($photo_return); } - $item_id = (($a->argc > 1) ? intval($a->argv[1]) : 0); + $item_id = ((DI::args()->getArgc()> 1) ? intval(DI::args()->getArgv()[1]) : 0); if (!$item_id) { - DI::baseUrl()->redirect($_SESSION['photo_return']); + DI::baseUrl()->redirect($photo_return); // NOTREACHED } $item = Post::selectFirst(['uri-id'], ['id' => $item_id, 'uid' => local_user()]); if (!DBA::isResult($item)) { - DI::baseUrl()->redirect($_SESSION['photo_return']); + DI::baseUrl()->redirect($photo_return); } $tag_text = Tag::getCSVByURIId($item['uri-id']); @@ -107,7 +107,7 @@ function tagrm_content(App $a) $arr = explode(',', $tag_text); if (empty($arr)) { - DI::baseUrl()->redirect($_SESSION['photo_return']); + DI::baseUrl()->redirect($photo_return); } $o .= '