]> git.mxchange.org Git - friendica.git/blobdiff - mod/filerm.php
Just some more fixed notice
[friendica.git] / mod / filerm.php
index cdc5a034aa8d7b24b5a29932b894fe7427de2a42..bd46a8bfea2cc540eac71b44b24a9d0637654195 100644 (file)
@@ -1,6 +1,9 @@
 <?php
 
-function filerm_content(App &$a) {
+use Friendica\App;
+use Friendica\Core\System;
+
+function filerm_content(App $a) {
 
        if (! local_user()) {
                killme();
@@ -10,18 +13,21 @@ function filerm_content(App &$a) {
        $cat = unxmlify(trim($_GET['cat']));
 
        $category = (($cat) ? true : false);
-       if($category)
+       if ($category) {
                $term = $cat;
+       }
 
        $item_id = (($a->argc > 1) ? intval($a->argv[1]) : 0);
 
        logger('filerm: tag ' . $term . ' item ' . $item_id);
 
-       if($item_id && strlen($term))
+       if ($item_id && strlen($term)) {
                file_tag_unsave_file(local_user(),$item_id,$term, $category);
+       }
 
-       if(x($_SESSION,'return_url'))
-               goaway($a->get_baseurl() . '/' . $_SESSION['return_url']);
+       if (x($_SESSION,'return_url')) {
+               goaway(System::baseUrl() . '/' . $_SESSION['return_url']);
+       }
 
        killme();
 }