X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Ffilerm.php;h=9013dd62b4880ee1d80c920570b4a0c6a7729e10;hb=6c341962648b73c935c2de26996b07332b776a1f;hp=d8da0e125511fdcc240b9547acdbcc7c72dcd056;hpb=52eb2281e41b8493438d21b770572cdc9af8fcb2;p=friendica.git diff --git a/mod/filerm.php b/mod/filerm.php index d8da0e1255..9013dd62b4 100644 --- a/mod/filerm.php +++ b/mod/filerm.php @@ -2,7 +2,6 @@ use Friendica\App; use Friendica\Core\Logger; -use Friendica\Core\System; use Friendica\Model\FileTag; use Friendica\Util\XML; @@ -10,10 +9,10 @@ function filerm_content(App $a) { if (! local_user()) { - killme(); + exit(); } - $term = XML::unescape(trim($_GET['term'])); + $term = XML::unescape(trim(defaults($_GET, 'term', ''))); $cat = XML::unescape(trim(defaults($_GET, 'cat', ''))); $category = (($cat) ? true : false); @@ -27,9 +26,8 @@ function filerm_content(App $a) Logger::log('filerm: tag ' . $term . ' item ' . $item_id . ' category ' . ($category ? 'true' : 'false')); - if ($item_id && strlen($term)) - { - if (FileTag::unsaveFile(local_user(), $item_id, $term, $category)){ + if ($item_id && strlen($term)) { + if (FileTag::unsaveFile(local_user(), $item_id, $term, $category)) { info('Item removed'); } } @@ -37,6 +35,6 @@ function filerm_content(App $a) info('Item was not deleted'); } - $a->internalRedirect('/network?f=&file=' . $term); - killme(); + $a->internalRedirect('/network?f=&file=' . rawurlencode($term)); + exit(); }